RGFL: Reasoning Guided Fault Localization for Automated Program Repair Using Large Language Models
Melika Sepidband, Hamed Taherkhani, Hung Viet Pham, Hadi Hemmati

TL;DR
This paper introduces a hierarchical reasoning approach for fault localization in automated program repair using large language models, significantly improving localization accuracy and repair success rates on Python and Java projects.
Contribution
It proposes a novel hierarchical reasoning module and a two-stage ranking scheme that enhance project-level fault localization for LLM-based repair agents.
Findings
File-level Hit@1 improved from 71.4% to 85%.
Element-level Exact Match under top-3 files increased from 36% to 69%.
End-to-end repair success improved by 12.8%.
Abstract
Fault Localization (FL) is a critical step in Automated Program Repair (APR), and its importance has increased with the rise of Large Language Model (LLM)-based repair agents. In realistic project-level repair scenarios, software repositories often span millions of tokens, far exceeding current LLM context limits. Consequently, models must first identify a small, relevant subset of code, making accurate FL essential for effective repair. We present a novel project-level FL approach that improves both file- and element-level localization. Our method introduces a hierarchical reasoning module that (i) generates structured, bug-specific explanations for candidate files and elements, and (ii) leverages these explanations in a two-stage ranking scheme combining LLM-based and embedding-based signals. We further propose a counterfactual upper-bound analysis to quantify the contribution of each…
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.
Taxonomy
TopicsSoftware Engineering Research · Software System Performance and Reliability · Software Testing and Debugging Techniques
