paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Harnessing Evolution for Multi-Hunk Program Repair

利用演化实现多 hunk 程序修复
ICSE 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE)2019匹配度 2/10 · 该论文研究自动程序修复中的多 hunk 缺陷修复,属于软件工程/调试与修复方向,与用户关注的静态分析、LLM/Agent 改进程序分析、浮点程序分析及贝叶斯程序分析均无直接关系。其使用测试谱、代码相似性和版本历史定位演化兄弟并修复,未涉及 LLM 或形式化验证。引用 135 inbox
Seemanta Saha, Ripon k. Saha, Mukul r. Prasad
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出 HERCULES,利用测试谱、代码相似性与版本历史定位演化兄弟并同时修复多 hunk 缺陷。

自动程序修复(APR)虽取得显著进展,但仍难以实际部署,其中一个重要瓶颈是当前技术通常无法生成需要在多个位置修改的多 hunk 补丁。本文提出一种新的 APR 技术,将单 hunk 修复推广到一类重要的多 hunk 缺陷:需要在多个位置施加高度相似补丁的缺陷,并将这些修复位置称为“演化兄弟”(evolutionary siblings),即代码相似、上下文相似且预期发生相似变更的位置。方法核心是准确识别给定缺陷的演化兄弟集合,分析综合了测试套件谱、一种新的代码相似性分析以及项目的修订历史;识别出的兄弟位置随后以相似方式被同时修复。作者将该技术实现为 HERCULES,并在 Defects4J 数据集上评估,正确修复了 46 个缺陷,其中包含 15 个多 hunk 缺陷,并有 11 个缺陷此前未被其他技术修复,达到当时单个 APR 技术的最高修复数量。

问题
现有自动程序修复技术大多只能生成单 hunk 补丁,难以处理需要在多个位置进行编辑的多 hunk 缺陷,从而限制其实际部署。
方法
将单 hunk 修复推广到“演化兄弟”类多 hunk 缺陷,结合测试套件谱、代码相似性分析和项目修订历史识别需类似修改的位置,并同时施加相似修复,实现工具 HERCULES。
评估
在 Defects4J 数据集上评估,HERCULES 正确修复 46 个缺陷,包括 15 个多 hunk 缺陷和 11 个其他技术未修复的缺陷,修复数量为当时单个 APR 技术最高。
原文摘要(Abstract)

Despite significant advances in automatic program repair (APR) techniques over the past decade, practical deployment remains an elusive goal. One of the important challenges in this regard is the general inability of current APR techniques to produce patches that require edits in multiple locations, i.e., multi-hunk patches. In this work, we present a novel APR technique that generalizes single-hunk repair techniques to include an important class of multi-hunk bugs, namely bugs that may require applying a substantially similar patch at a number of locations. We term such sets of repair locations as evolutionary siblings - similar looking code, instantiated in similar contexts, that are expected to undergo similar changes. At the heart of our proposed method is an analysis to accurately identify a set of evolutionary siblings, for a given bug. This analysis leverages three distinct sources of information, namely the test-suite spectrum, a novel code similarity analysis, and the revision history of the project. The discovered siblings are then simultaneously repaired in a similar fashion. We instantiate this technique in a tool called HERCULES and demonstrate that it is able to correctly fix 46 bugs in the Defects4J dataset, the highest of any individual APR technique to date. This includes 15 multi-hunk bugs and overall 11 bugs which have not been fixed by any other technique so far.

链接与引用

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

BibTeX
@inproceedings{abs-1906-08903,
  title = {Harnessing Evolution for Multi-Hunk Program Repair},
  author = {Seemanta Saha and Ripon k. Saha and Mukul r. Prasad},
  booktitle = {ICSE},
  year = {2019},
  doi = {10.1109/icse.2019.00020}
}