Characterizing Multi-Hunk Patches: Divergence, Proximity, and LLM Repair Challenges
Noor Nashid, Daniel Ding, Keheliya Gallaba, Ahmed E. Hassan, Ali Mesbah
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Issue2Test: Generating Reproducing Test Cases from Issue Reports 引用了 Less training, more repairing please: revisiting automated program repair via zero-shot learning
- Issue2Test: Generating Reproducing Test Cases from Issue Reports 引用了 Automated Repair of Programs from Large Language Models
- Less training, more repairing please: revisiting automated program repair via zero-shot learning 引用了 CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- Less training, more repairing please: revisiting automated program repair via zero-shot learning 引用了 CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- Less training, more repairing please: revisiting automated program repair via zero-shot learning 引用了 A syntax-guided edit decoder for neural program repair
- Automated Repair of Programs from Large Language Models 引用了 CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- Automated Repair of Programs from Large Language Models 引用了 CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- Automated Repair of Programs from Large Language Models 引用了 A syntax-guided edit decoder for neural program repair
- CURE: Code-Aware Neural Machine Translation for Automatic Program Repair 引用了 CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- A syntax-guided edit decoder for neural program repair 引用了 CoCoNuT: combining context-aware neural translation models using ensemble for program repair
引用它的顶会 Paper1
它引用的 Paper25
- CoCoNuT: combining context-aware neural translation models using ensemble for program repairThibaud Lutellier, Hung Viet Pham, Lawrence Pang, Yitong Li 等ISSTA 2020 · 325 次引用
- CURE: Code-Aware Neural Machine Translation for Automatic Program RepairNan Jiang, Thibaud Lutellier, Lin TanICSE 2021 · 267 次引用
- Less training, more repairing please: revisiting automated program repair via zero-shot learningChunqiu Steven Xia, Lingming ZhangFSE 2022 · 223 次引用
- A syntax-guided edit decoder for neural program repairQihao Zhu, Zeyu Sun, Yuan-an Xiao, Wenjie Zhang 等FSE 2021 · 214 次引用
- Automated Repair of Programs from Large Language ModelsZhiyu Fan, Xiang Gao, Martin Mirchev, Abhik Roychoudhury 等ICSE 2023 · 213 次引用
相关 Paper
- Detecting, Creating, Repairing, and Understanding Indivisible Multi-Hunk BugsQi Xin, Haojun Wu, Jinran Tang, Xinyu Liu 等FSE 2024 · 3 次引用
- PReMM: LLM-Based Program Repair for Multi-method Bugs via Divide and ConquerLinna Xie, Zhong Li, Yu Pei, Zhongzhen Wen 等OOPSLA 2025 · 1 次引用
- CascadeFix: Multi-Location Program Repair via Cascading Planning and GenerationHuan Zhang, Li Kuang, Yang Yang, Yilei Fang 等ACL Findings 2026
- DEAR: A Novel Deep Learning-based Approach for Automated Program RepairYi Li, Shaohua Wang, Tien N. NguyenICSE 2022 · 91 次引用
- Repair Ingredients Are All You Need: Improving Large Language Model-Based Program Repair via Repair Ingredients SearchJiayi Zhang, Kai Huang, Jian Zhang, Yang Liu 等ICSE 2026
