Can We Identify Stack Overflow Questions Requiring Code Snippets? Investigating the Cause Effect of Missing Code Snippets
CoRR(2024)
摘要
On the Stack Overflow (SO) Q A site, users often request solutions to their
code-related problems (e.g., errors, unexpected behavior). Unfortunately, they
often miss required code snippets during their question submission, which could
prevent their questions from getting prompt and appropriate answers. In this
study, we conduct an empirical study investigating the cause effect of
missing code snippets in SO questions whenever required. Here, our
contributions are threefold. First, we analyze how the presence or absence of
required code snippets affects the correlation between question types (missed
code, included code after requests had code snippets during submission) and
corresponding answer meta-data (e.g., presence of an accepted answer).
According to our analysis, the chance of getting accepted answers is three
times higher for questions that include required code snippets during their
question submission than those that missed the code. We also investigate
whether the confounding factors (e.g., user reputation) affect questions
receiving answers besides the presence or absence of required code snippets. We
found that such factors do not hurt the correlation between the presence or
absence of required code snippets and answer meta-data. Second, we surveyed 64
practitioners to understand why users miss necessary code snippets. About 60
of them agree that users are unaware of whether their questions require any
code snippets. Third, we thus extract four text-based features (e.g., keywords)
and build six ML models to identify the questions that need code snippets. Our
models can predict the target questions with 86.5
85.3
significant time in programming question-answering and improve the quality of
the valuable knowledge base by decreasing unanswered and unresolved questions.
更多查看译文
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要