paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Characterizing Multi-Hunk Patches: Divergence, Proximity, and LLM Repair Challenges

刻画多 Hunk 补丁:差异性、邻近性与 LLM 修复挑战
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 5/10 · 论文研究多 hunk 补丁的刻画与 LLM 自动修复,属于程序修复/软件工程方向,与用户核心关注的静态分析、形式化验证、浮点/贝叶斯程序分析及其与 LLM 的交叉不直接相关;但其问题驱动地构建多 hunk 修复数据集并揭示 LLM 修复失败模式,对 LLM+PL 的实证研究有一定参考价值。引用 1 inbox
Noor Nashid, Daniel Ding, Keheliya Gallaba, Ahmed E. Hassan, Ali Mesbah
crossref: 2026-09-12

AI 速览

一句话:提出 hunk divergence 与空间邻近性度量,刻画多 hunk 补丁并揭示 LLM 修复成功率随差异性与分散度上升而下降。

多 hunk 缺陷指修复跨越代码中互不相交的区域,在实践中常见,但自动修复研究多聚焦单 hunk 场景,忽视了跨代码库协调语义相关修改的额外复杂性。本文构建了 Hunk4J——一个源自 372 个真实缺陷的多 hunk 补丁数据集,并据此展开刻画研究。作者提出 hunk divergence 指标,通过词法、结构及文件层面的差异并结合 hunk 数量,量化补丁内部编辑之间的差异程度;同时定义 spatial proximity 分类,刻画各 hunk 在程序层次结构中的空间分布方式。基于六个 LLM 的实证研究表明,模型修复成功率随差异性与空间分散度的增加而下降;尤其在使用 LLM 单独修复时,没有任何模型能在最分散的 Fragment 类别中取得成功。这些发现揭示了 LLM 能力的关键缺口,并推动差异感知的修复策略。

问题
多 hunk 缺陷的自动修复研究不足:现有技术与基准主要面向单 hunk 场景,缺乏对多 hunk 补丁特性的刻画,也不清楚 LLM 在此类修复中为何失败。
方法
从 372 个真实缺陷构建多 hunk 补丁数据集 Hunk4J,提出量化编辑差异的 hunk divergence 指标,以及刻画 hunk 在程序层次结构中空间分布的 spatial proximity 分类。
评估
使用六个 LLM 进行修复实验,分析模型成功率与补丁差异性、空间分散度之间的关系,并观察到最分散 Fragment 类别中单 LLM 修复全部失败。
原文摘要(Abstract)

Multi-hunk bugs, where fixes span disjoint regions of code, are common in practice, yet remain underrepresented in automated repair. Existing techniques and benchmarks predominantly target single-hunk scenarios, overlooking the added complexity of coordinating semantically related changes across the codebase. In this work, we characterize Hunk4J, a dataset of multi-hunk patches derived from 372 real-world defects. We propose hunk divergence, a metric that quantifies the variation among edits in a patch by capturing lexical, structural, and file-level differences, while incorporating the number of hunks involved. We further define spatial proximity, a classification that models how hunks are spatially distributed across the program hierarchy. Our empirical study spanning six LLMs reveals that model success rates decline with increased divergence and spatial dispersion. Notably, when using the LLM alone, no model succeeds in the most dispersed Fragment class. These findings highlight a critical gap in LLM capabilities and motivate divergence-aware repair strategies.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9244,
  title = {Characterizing Multi-Hunk Patches: Divergence, Proximity, and LLM Repair Challenges},
  author = {Noor Nashid and Daniel Ding and Keheliya Gallaba and Ahmed E. Hassan and Ali Mesbah},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00137}
}