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

迈向更优质的答案:Stack Overflow帖子自动更新

Towards Better Answers: Automated Stack Overflow Post Updating

Yubo Mai, Zhipeng Gao, Haoye Wang, Tingting Bi, Xing Hu, Xin Xia, Jianling Sun

AI总结:

针对Stack Overflow评论常被忽略、问题代码片段难以及时修正的现状,研究提出Soup框架,通过有效评论-编辑预测和自动帖子更新两项任务实现帖子自动更新,实验效果优于基准,且真实环境提交的50条编辑中有21条被平台维护者采纳。

摘要:

开发者在解决问题时普遍会使用Stack Overflow(SO)上的代码片段。尽管SO的代码片段是宝贵的资源,但必须承认它们并非完美无缺,复用存在问题的代码片段可能会给软件项目引入次优或有缺陷的代码。SO的评论通常会指出帖子的不足,并为提升答案质量提供有价值的见解,但这些评论往往被遗漏和/或忽略,导致有问题的代码片段得不到修正。在本研究中,我们首先探究了基于关联评论自动更新SO帖子的任务,为此提出了一个名为Soup(Stack Overflow Updator for Post,Stack Overflow帖子更新器)的新型框架。Soup负责解决两项核心任务:有效评论-编辑预测(Valid Comment-Edit Prediction, VCP)和自动帖子更新(Automatic Post Updating, APU)。大量实验结果表明,相较于一组基准方法,我们的模型展现出了优异的性能。此外,我们还在Stack Overflow上开展了真实环境评估,将我们的方法生成的50条编辑提交到SO帖子中,其中21条已通过SO维护者的验证并被采纳,进一步证明了Soup的实用价值。

英文摘要:

Utilizing code snippets on Stack Overflow (SO) is a common practice among developers for problem-solving. Although SO code snippets serve as valuable resources, it is important to acknowledge their imperfections, reusing problematic code snippets can lead to the introduction of suboptimal or buggy code into software projects. SO comments often point out weaknesses of a post and provide valuable insights to improve the quality of answers, while SO comments are usually missed and/or ignored, leaving these problematic code snippets untouched. In this work, we first investigate the task of automatic SO posts updating based on their associated comments. We introduce a novel framework, named Soup (Stack Overflow Updator for Post) for this task. Soup addresses two key tasks: Valid Comment-Edit Prediction (VCP) and Automatic Post Updating (APU). Extensive experimental results show the promising performance of our model over a set of benchmarks. Moreover, we also performed an in-the-wild evaluation on Stack Overflow, we submitted 50 edits generated by our approach to Stack Overflow posts and 21 of them have been verified and accepted by SO maintainers, further proving the practical value of Soup.

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

↑