paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Recommending stack overflow posts for fixing runtime exceptions using failure scenario matching

基于故障场景匹配的 Stack Overflow 帖子推荐用于修复运行时异常
FSE Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2020匹配度 2/10 · 论文聚焦 Java 运行时异常修复的 Stack Overflow 帖子推荐,属于软件工程/调试与修复工具;虽然涉及程序图表示与代码匹配,但与用户关注的 LLM/Agentic 程序静态分析、LLM 辅助静态分析/形式化验证、浮点程序分析或贝叶斯程序分析均无直接交集。引用 21 inbox
Sonal Mahajan, Negarsadat Abolhassani, Mukul R. Prasad
crossref: 2026-09-12

AI 速览

一句话:提出 MAESTRO,通过比较异常生成场景自动推荐最相关的 Stack Overflow 帖子以修复 Java 运行时异常。

开发者在修复 Java 运行时异常时常检索 Stack Overflow,但人工找到相关帖子耗时且不准确。本文提出 MAESTRO 技术及原型工具,为给定异常自动推荐最相关的 SO 帖子。MAESTRO 先利用帖子的答案代码片段,定位其问题代码中导致异常的行,再将候选行与开发者代码表示为抽象程序图(APG)并比较异常生成场景;APG 是 AST 的简化抽象,可忽略底层语法语义差异。在来自 GitHub 前 500 Java 项目的 78 个运行时异常基准上,MAESTRO 在 71% 案例中返回高度相关或部分相关的帖子,四个对比工具仅为 8%–44%。10 名 Java 开发者的用户体验研究显示 80% 的推荐被判定为相关或部分相关,有时优于人工找到的帖子。

问题
开发者需为 Java 运行时异常寻找相关 Stack Overflow 帖子,但现有检索或推荐方法难以准确匹配异常生成场景。
方法
MAESTRO 利用帖子答案代码定位问题代码中导致异常的行,并将候选代码与开发者代码转换为抽象程序图(APG)来比较异常场景,从而推荐最相关帖子。
评估
在 78 个 Java 运行时异常基准上,MAESTRO 的推荐在 71% 案例中相关,优于四个基线(8%–44%);并由 10 名 Java 开发者参与的用户体验研究(80% 判定相关)。
原文摘要(Abstract)

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.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot5837,
  title = {Recommending stack overflow posts for fixing runtime exceptions using failure scenario matching},
  author = {Sonal Mahajan and Negarsadat Abolhassani and Mukul R. Prasad},
  booktitle = {FSE},
  year = {2020},
  doi = {10.1145/3368089.3409764}
}