Software developers often look for solutions to their code-level problems using the Stack Overflow Q&A website. To receive help, developers frequently submit questions containing sample code segments and the description of the programming issue. Unfortunately, it is not always possible to reproduce the issues from the code segments that may impede questions from receiving prompt and appropriate solutions. We conducted an exploratory study on the reproducibility of issues discussed in 400 Java and 400 Python questions. We parsed, compiled, executed, and carefully examined the code segments from these questions to reproduce the reported programming issues. The outcomes of our study are three-fold. First, we found that we can reproduce approximately 68% of Java and 71% of Python issues, whereas we were unable to reproduce approximately 22% of Java and 19% of Python issues using the code segments. Of the issues that were reproducible, approximately 67% of the Java code segments and 20% of the Python code segments required minor or major modifications to reproduce the issues. Second, we carefully investigated why programming issues could not be reproduced and provided evidence-based guidelines for writing effective code examples for Stack Overflow questions. Third, we investigated the correlation between the issue reproducibility status of questions and the corresponding answer meta-data, such as the presence of an accepted answer. According to our analysis, a reproducible question has at least two times higher chance of receiving an accepted answer than an irreproducible question. Besides, the median time delay in receiving accepted answers is double if the issues reported in questions could not be reproduced. We also investigate the confounding factors (e.g., reputation) and find that confounding factors do not hurt the correlation between reproducibility status and answer meta-data.
翻译:软件开发者经常使用 Stack Overflow {A} 网站寻找代码层面问题的解决办法。 为了获得帮助,开发者经常提交含有代码样本部分的问题和对编程问题的描述。 不幸的是,并非总能复制代码部分中可能妨碍获得快速和适当解决方案的问题。 我们对400 Java 和400 Python 问题中讨论的问题的可复制性进行了探索性研究。 我们从这些问题中分析、汇编、执行和仔细检查代码部分以复制所报道的编程问题。 我们的研究结果是三重。 首先,我们发现我们可以复制大约68%的Java 和71%的Python 问题。 我们无法复制代码部分的代码部分中的问题, 我们无法复制大约22%的 Java 和19%的 Python 问题 。 关于重现问题, 大约67%的 Java 和 Python 代码部分的可复制问题需要微小或重大修改才能复制这些问题。 其次,我们仔细研究为什么编程问题不能复制,我们提供了基于证据的指南, 来撰写有效的代码示例示例,如果接受 Stavrop refrold der reful repal deflation ad repald 问题, 我们接受一个在重新解读问题中可以重新调查。