On the Role of Fault Localization Context for LLM-Based Program Repair
Melika Sepidband, Hung Viet Pham, Hadi Hemmati

TL;DR
This study empirically evaluates how different fault localization contexts affect LLM-based program repair, revealing that more context does not always enhance performance and that optimal strategies involve a mix of semantic and precise localization.
Contribution
It provides a comprehensive empirical analysis of context strategies in LLM-based program repair, highlighting the nuanced effects of context size and type on repair success.
Findings
File-level localization significantly improves repair performance.
Expanding to 6-10 relevant files often yields best results.
Line-level context expansion can degrade performance due to noise.
Abstract
Fault Localization (FL) is a key component of Large Language Model (LLM)-based Automated Program Repair (APR), yet its impact remains underexplored. In particular, it is unclear how much localization is needed, whether additional context beyond the predicted buggy location is beneficial, and how such context should be retrieved. We conduct a large-scale empirical study on 500 SWE-bench Verified instances using GPT-5-mini, evaluating 61 configurations that vary file-level, element-level, and line-level context. Our results show that more context does not consistently improve repair performance. File-level localization is the dominant factor, yielding a 15-17x improvement over a no-file baseline. Expanding file context is often associated with improved performance, with successful repairs most commonly observed in configurations with approximately 6-10 relevant files. Element-level…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
