当前位置: X-MOL 学术arXiv.cs.SE › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Recommending Stack Overflow Posts for Fixing Runtime Exceptions using Failure Scenario Matching
arXiv - CS - Software Engineering Pub Date : 2020-09-21 , DOI: arxiv-2009.10174
Sonal Mahajan (1), Negarsadat Abolhassani (2), Mukul R. Prasad (1) ((1) Fujitsu Laboratories of America, Inc., (2) University of Southern California)

Using online Q&A forums, such as Stack Overflow (SO), for guidance to resolve program bugs, among other development issues, is commonplace in modern software development practice. Runtime exceptions (RE) is one such important class of bugs that is actively discussed on SO. In this work we present a technique and prototype tool called MAESTRO that can automatically recommend an SO post that is most relevant to a given Java RE in a developer's code. MAESTRO compares the exception-generating program scenario in the developer's code with that discussed in an SO post and returns the post with the closest match. To extract and compare the exception scenario effectively, MAESTRO first uses the answer code snippets in a post to implicate a subset of lines in the post's question code snippet as responsible for the exception and then compares these lines with the developer's code in terms of their respective Abstract Program Graph (APG) representations. The APG is a simplified and abstracted derivative of an abstract syntax tree, proposed in this work, that allows an effective comparison of the functionality embodied in the high-level program structure, while discarding many of the low-level syntactic or semantic differences. We evaluate MAESTRO on a benchmark of 78 instances of Java REs extracted from the top 500 Java projects on GitHub and show that MAESTRO can return either a highly relevant or somewhat relevant SO post corresponding to the exception instance in 71% of the cases, compared to relevant posts returned in only 8% - 44% instances, by four competitor tools based on state-of-the-art techniques. We also conduct a user experience study of MAESTRO with 10 Java developers, where the participants judge MAESTRO reporting a highly relevant or somewhat relevant post in 80% of the instances. In some cases the post is judged to be even better than the one manually found by the participant.

中文翻译:

推荐使用故障场景匹配修复运行时异常的堆栈溢出帖子

在现代软件开发实践中,使用在线问答论坛(例如 Stack Overflow (SO))作为解决程序错误和其他开发问题的指导是很常见的。运行时异常 (RE) 是在 SO 上积极讨论的一类重要错误。在这项工作中,我们提出了一种称为 MAESTRO 的技术和原型工具,它可以自动推荐与开发人员代码中给定 Java RE 最相关的 SO 帖子。MAESTRO 将开发人员代码中的异常生成程序场景与 SO 帖子中讨论的场景进行比较,并返回最匹配的帖子。为了有效地提取和比较异常场景,MAESTRO 首先使用帖子中的答案代码片段来暗示帖子中的行子集' s 问题代码片段负责异常,然后根据各自的抽象程序图 (APG) 表示将这些行与开发人员的代码进行比较。APG 是在这项工作中提出的抽象语法树的简化和抽象派生,它允许对包含在高级程序结构中的功能进行有效比较,同时丢弃许多低级句法或语义差异。我们在从 GitHub 上前 500 个 Java 项目中提取的 78 个 Java RE 实例的基准测试中评估 MAESTRO,并表明 MAESTRO 可以在 71% 的情况下返回与异常实例相对应的高度相关或有些相关的 SO 帖子,相比之下相关帖子仅在 8% - 44% 的情况下通过基于最先进技术的四个竞争对手工具返回。我们还与 10 名 Java 开发人员一起对 MAESTRO 进行了用户体验研究,参与者判断 MAESTRO 在 80% 的实例中报告了高度相关或有些相关的帖子。在某些情况下,该帖子被认为比参与者手动找到的帖子更好。
更新日期:2020-09-23
down
wechat
bug