Lune

ASE2025Top-tier venue

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

Noor Nashid, Daniel Ding, Keheliya Gallaba, Ahmed E. Hassan, Ali Mesbah

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Issue2Test: Generating Reproducing Test Cases from Issue Reports cites Less training, more repairing please: revisiting automated program repair via zero-shot learning
  • Issue2Test: Generating Reproducing Test Cases from Issue Reports cites Automated Repair of Programs from Large Language Models
  • Less training, more repairing please: revisiting automated program repair via zero-shot learning cites 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 cites CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
  • Less training, more repairing please: revisiting automated program repair via zero-shot learning cites A syntax-guided edit decoder for neural program repair
  • Automated Repair of Programs from Large Language Models cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
  • Automated Repair of Programs from Large Language Models cites CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
  • Automated Repair of Programs from Large Language Models cites A syntax-guided edit decoder for neural program repair
  • CURE: Code-Aware Neural Machine Translation for Automatic Program Repair cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
  • A syntax-guided edit decoder for neural program repair cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Issue2Test: Generating Reproducing Test Cases from Issue ReportsNoor Nashid, Islem Bouzenia, Michael Pradel, Ali MesbahICSE 2026 · 1 citation

Builds on25

  1. CoCoNuT: combining context-aware neural translation models using ensemble for program repairThibaud Lutellier, Hung Viet Pham, Lawrence Pang, Yitong Li et al.ISSTA 2020 · 325 citations
  2. CURE: Code-Aware Neural Machine Translation for Automatic Program RepairNan Jiang, Thibaud Lutellier, Lin TanICSE 2021 · 267 citations
  3. Less training, more repairing please: revisiting automated program repair via zero-shot learningChunqiu Steven Xia, Lingming ZhangFSE 2022 · 223 citations
  4. A syntax-guided edit decoder for neural program repairQihao Zhu, Zeyu Sun, Yuan-an Xiao, Wenjie Zhang et al.FSE 2021 · 214 citations
  5. Automated Repair of Programs from Large Language ModelsZhiyu Fan, Xiang Gao, Martin Mirchev, Abhik Roychoudhury et al.ICSE 2023 · 213 citations

Related papers

  1. Detecting, Creating, Repairing, and Understanding Indivisible Multi-Hunk BugsQi Xin, Haojun Wu, Jinran Tang, Xinyu Liu et al.FSE 2024 · 3 citations
  2. PReMM: LLM-Based Program Repair for Multi-method Bugs via Divide and ConquerLinna Xie, Zhong Li, Yu Pei, Zhongzhen Wen et al.OOPSLA 2025 · 1 citation
  3. CascadeFix: Multi-Location Program Repair via Cascading Planning and GenerationHuan Zhang, Li Kuang, Yang Yang, Yilei Fang et al.ACL Findings 2026
  4. DEAR: A Novel Deep Learning-based Approach for Automated Program RepairYi Li, Shaohua Wang, Tien N. NguyenICSE 2022 · 91 citations
  5. Repair Ingredients Are All You Need: Improving Large Language Model-Based Program Repair via Repair Ingredients SearchJiayi Zhang, Kai Huang, Jian Zhang, Yang Liu et al.ICSE 2026
Dusk over the sea between two cliffs drawn in fine vertical lines