arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.10023cs.SE
收藏

Stack Overflow 问题中所报告问题的可复现性:挑战、影响与评估

Reproducibility of Issues Reported in Stack Overflow Questions: Challenges, Impact & Estimation

Saikat Mondal, Banani Roy

AI总结:

本研究针对Stack Overflow问题中代码片段的问题可复现性挑战,通过从业者调研明确挑战认可度与影响,构建机器学习模型实现82.8%准确率的可复现性预测,并解释了两类代码片段的差异。

摘要:

软件开发者经常向Stack Overflow(SO)等技术问答网站提交问题以解决代码层面的问题。实际操作中,他们会在问题中附上示例代码片段来解释所遇到的编程问题。现有研究表明,用户在回答问题时会尝试利用给出的代码片段复现所报告的问题。遗憾的是,由于存在多项未解决的挑战,这类代码片段并非总能复现问题,导致问题无法获得恰当且及时的解答。\n此前有一项研究调查了可复现性挑战并整理出了一份挑战清单,但从业者对这份挑战清单的看法尚不明确。在验证这些挑战并评估其严重程度的过程中,从业者的视角是不可或缺的。本研究首先对53名从业者开展了调查,以了解他们对可复现性挑战的看法。我们试图:(a)了解他们是否认同这些挑战;(b)确定每项挑战对问题回答的影响;(c)明确对提升可复现性的工具的需求。调查结果显示:(a)约90%的参与者认同这些挑战;(b)“缺少代码的重要部分”对可复现性的损害最为严重;(c)参与者强烈建议引入自动化工具支持以提升可复现性。\n其次,我们提取了9项基于代码的特征(例如代码行数LOC、可编译性),并构建了5个机器学习(ML)模型来预测问题的可复现性。早期检测或许能帮助用户优化代码片段,提升其可复现性。我们的模型实现了84.5%的精确率、83.0%的召回率、82.8%的F1值以及82.8%的总体准确率,效果十分可观。第三,我们对机器学习模型进行了系统的解释,阐明了包含可复现问题的代码片段与包含不可复现问题的代码片段之间的差异。

英文摘要:

Software developers often submit questions to technical Q&A sites like Stack Overflow (SO) to resolve code-level problems. In practice, they include example code snippets with questions to explain the programming issues. Existing research suggests that users attempt to reproduce the reported issues using given code snippets when answering questions. Unfortunately, such code snippets could not always reproduce the issues due to several unmet challenges that prevent questions from receiving appropriate and prompt solutions. One previous study investigated reproducibility challenges and produced a catalog. However, how the practitioners perceive this challenge catalog is unknown. Practitioners' perspectives are inevitable in validating these challenges and estimating their severity. This study first surveyed 53 practitioners to understand their perspectives on reproducibility challenges. We attempt to (a) see whether they agree with these challenges, (b) determine the impact of each challenge on answering questions, and (c) identify the need for tools to promote reproducibility. Survey results show that - (a) about 90% of the participants agree with the challenges, (b) "missing an important part of code" most severely hurt reproducibility, and (c) participants strongly recommend introducing automated tool support to promote reproducibility. Second, we extract \emph{nine} code-based features (e.g., LOC, compilability) and build five Machine Learning (ML) models to predict issue reproducibility. Early detection might help users improve code snippets and their reproducibility. Our models achieve 84.5% precision, 83.0% recall, 82.8% F1-score, and 82.8% overall accuracy, which are highly promising. Third, we systematically interpret the ML model and explain how code snippets with reproducible issues differ from those with irreproducible issues.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑