paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Better Automatic Program Repair by Using Bug Reports and Tests Together

通过同时使用缺陷报告与测试来改进自动程序修复
ICSE 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)2023匹配度 3/10 · 论文属于自动程序修复与故障定位,虽与程序分析/调试相关,但不涉及用户核心方向(LLM/Agent 与静态分析、浮点程序分析、贝叶斯程序分析),也未面向 ML/Agentic 程序。其方法为 IR 与 SBFL 的无监督融合,与用户研究画像交集有限。引用 33 inbox
Manish Motwani, Yuriy Brun
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:结合缺陷报告与测试执行进行故障定位并无监督融合,显著提升自动程序修复的补丁正确数。

自动程序修复的补丁质量受故障定位(FL)不精确的制约。本文首次同时利用自然语言缺陷报告与测试执行信息进行 FL 与修复。作者提出 Blues——首个基于信息检索、语句级、无需训练数据的 FL 技术,以及 RAFL——首个无监督融合多种 FL 的方法,其效果超过监督方法。将 Blues 与基于频谱的 SBFL 通过 RAFL 组合成 SBIR。在 815 个真实缺陷上,SBIR 对缺陷语句的排序始终优于其组成技术。把 Arja、SequenceR、SimFix 的内部 FL 替换为 SBIR/SBFL/Blues 并在 689 个缺陷上评估:Arja 用 SBIR 正确修复 28 个缺陷,SBFL 为 21,Blues 为 15;SequenceR 为 12/10/4;SimFix 为 30/30/13。该工作首次探索同时使用多个软件工件进行自动修复。

问题
自动程序修复常因故障定位不准确而生成看似正确实则错误的补丁;此前工作未研究如何同时利用缺陷报告与测试等多种软件工件来提升定位与修复质量。
方法
提出基于信息检索的语句级故障定位技术 Blues(无需训练数据)与无监督融合方法 RAFL,并将 Blues 与频谱定位 SBFL 融合为 SBIR,再将其嵌入 Arja、SequenceR、SimFix 三种修复工具作为内部 FL。
评估
在 815 个真实缺陷上比较 SBIR 与其组成技术的缺陷语句排序;在 689 个缺陷上以三种修复工具为对象,比较分别使用 SBIR、SBFL、Blues 时正确修复的缺陷数量。
原文摘要(Abstract)

Automated program repair is already deployed in industry, but concerns remain about repair quality. Recent research has shown that one of the main reasons repair tools produce incorrect (but seemingly correct) patches is imperfect fault localization (FL). This paper demonstrates that combining information from natural-language bug reports and test executions when localizing faults can have a significant positive impact on repair quality. For example, existing repair tools with such FL are able to correctly repair 7 defects in the Defects4J benchmark that no prior tools have repaired correctly. We develop, Blues, the first information-retrieval-based, statement-level FL technique that requires no training data. We further develop RAFL, the first unsupervised method for combining multiple FL techniques, which outperforms a supervised method. Using RAFL, we create SBIR by combining Blues with a spectrum-based (SBFL) technique. Evaluated on 815 real-world defects, SBIR consistently ranks buggy statements higher than its underlying techniques. We then modify three state-of-the-art repair tools, Arja, SequenceR, and SimFix, to use SBIR, SBFL, and Blues as their internal FL. We evaluate the quality of the produced patches on 689 real-world defects. Arja and SequenceR significantly benefit from SBIR: Arja using SBIR correctly repairs 28 defects, but only 21 using SBFL, and only 15 using Blues; SequenceR using SBIR correctly repairs 12 defects, but only 10 using SBFL, and only 4 using Blues. SimFix, (which has internal mechanisms to overcome poor FL), correctly repairs 30 defects using SBIR and SBFL, but only 13 using Blues. Our work is the first investigation of simultaneously using multiple software artifacts for automated program repair, and our promising findings suggest future research in this directions is likely to be fruitful.

链接与引用

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

BibTeX
@inproceedings{MotwaniB23,
  title = {Better Automatic Program Repair by Using Bug Reports and Tests Together},
  author = {Manish Motwani and Yuriy Brun},
  booktitle = {ICSE},
  year = {2023},
  doi = {10.1109/icse48619.2023.00109}
}