Assessing the Impact of Code Changes on the Fault Localizability of Large Language Models
Not on the map. Why?
Abstract (arXiv)
Generative Large Language Models (LLMs) are increasingly used in non-generative software maintenance tasks, such as fault localization (FL). Success in FL depends on a models ability to reason about program semantics beyond surface-level syntactic and lexical features. However, widely used LLM benchmarks primarily evaluate code generation, which differs fundamentally from semantic program reasoning. Meanwhile, traditional FL benchmarks such as Defect4J and BugsInPy are either not scalable or obsolete, as their datasets have become part of LLM training data, leading to biased results. This paper presents the first large-scale empirical investigation into the robustness of LLMs fault localizability. Inspired by mutation testing, we develop an end-to-end evaluation framework that addresses key limitations in existing LLM evaluation, including data contamination, scalability, automation, and extensibility. Using real-world programs with specifications, we inject unseen faults and ask LLMs to localize them, filtering out underspecified programs where localization is ambiguous. For each successfully localized program, we apply semantic-preserving mutations (SPMs) and rerun localization to assess robustness and determine whether LLM reasoning relies on syntactic cues rather than semantics. We evaluate 10 state-of-the-art LLMs on 750,013 fault localization tasks from over 1,300 Java and Python programs. We find that SPMs cause LLMs to fail on previously localized faults in 78% of cases, and that reasoning is stronger when relevant code appears earlier in context. These results indicate that LLM code reasoning is often tied to features irrelevant to semantics. We also identify code patterns that are challenging for LLMs to reason about. Overall, our findings motivate fundamental advances in how LLMs represent, interpret, and prioritize code semantics to reason more deeply about program logic
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 37 of its 81 references that are in the map. First posted on arXiv 6 Apr 2025.
Builds on
37 of 81 references.
References · 37
- 2023GPT-4 Technical Reportcited by 18,396
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2024GPT-4o System Cardcited by 4,588
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,224
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2024Qwen2.5-Coder Technical Reportcited by 1,203
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2024Phi-4 Technical Reportcited by 711
25 more
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
- 2024LiveBench: A Challenging, Contamination-Limited LLM Benchmarkcited by 262
- 2023Investigating Data Contamination in Modern Benchmarks for Large Language Modelscited by 138
- 2024Generalization or Memorization: Data Contamination and Trustworthy Evaluation for Large Language Modelscited by 122
- 2024DebugBench: Evaluating Debugging Capability of Large Language Modelscited by 76
- 2023Large Language Models for Test-Free Fault Localizationcited by 67
- 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 60
- 2025On the Emergence of Position Bias in Transformerscited by 59
- 2023A Quantitative and Qualitative Evaluation of LLM-Based Explainable Fault Localizationcited by 50
- 2025Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMscited by 47
- 2020On the Generalizability of Neural Program Models with respect to Semantic-Preserving Program Transformationscited by 44
- 2024BugsInPy: A Database of Existing Bugs in Python Programs to Enable Controlled Testing and Debugging Studiescited by 36
- 2024CodeMind: Evaluating Large Language Models for Code Reasoningcited by 32
- 2024Top Score on the Wrong Exam: On Benchmarking in Machine Learning for Vulnerability Detectioncited by 28
- 2025Dynamic Benchmarking of Reasoning Capabilities in Code Large Language Models Under Data Contaminationcited by 23
- 2025A Study of LLMs' Preferences for Libraries and Programming Languagescited by 20
- 2018Dissection of a Bug Dataset: Anatomy of 395 Patches from Defects4Jcited by 14
- 2024Are Large Language Models Memorizing Bug Benchmarks?cited by 12
- 2024FlexFL: Flexible and Effective Fault Localization with Open-Source Large Language Modelscited by 8
- 2025A Tool for In-depth Analysis of Code Execution Reasoning of Large Language Modelscited by 7
- 2024Bug In the Code Stack: Can LLMs Find Bugs in Large Python Code Stackscited by 6
- 2021Learning Off-By-One Mistakes: An Empirical Studycited by 3
- 2024Impact of Large Language Models of Code on Fault Localizationcited by 3
- 2024Beyond Surface Structure: A Causal Assessment of LLMs' Comprehension Abilitycited by 3
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detectioncited by 2
Built on by
Citing papers per year: 2025: 3; 2026: 1.
4 papers.
- 2025GraphLocator: Graph-guided Causal Reasoning for Issue Localizationcited by 4
- 2025Agents Require Metacognitive and Strategic Reasoning to Succeed in the Coming Labor Marketscited by 2
- 2025textttReMind: Understanding Deductive Code Reasoning in LLMscited by 2
- 2026VulReaD: Knowledge-Graph-guided Software Vulnerability Reasoning and Detectioncited by 0
- 2026VulReaD: Knowledge-Graph-guided Software Vulnerability Reasoning and Detection11 Feb 2026
- 2025GraphLocator: Graph-guided Causal Reasoning for Issue Localization27 Dec 2025
- 2025textttReMind: Understanding Deductive Code Reasoning in LLMs1 Nov 2025
- 2025Agents Require Metacognitive and Strategic Reasoning to Succeed in the Coming Labor Markets26 May 2025
Similar, not cited
Close in wording, no citation either way
- 2025Large Language Models for Fault Localization: An Empirical Study ↗
- 2025Exploring the Potential and Limitations of Large Language Models for Novice Program Fault Localization ↗
- 2025Enhancing LLM-based Fault Localization with a Functionality-Aware Retrieval-Augmented Generation Framework ↗
- 2024Demystifying Faulty Code with LLM: Step-by-Step Reasoning for Explainable Fault Localization
- 2026SemLoc: Structured Grounding of Free-Form LLM Reasoning for Fault Localization
- 2026RGFL: Reasoning Guided Fault Localization for Automated Program Repair Using Large Language Models
- 2026Rethinking Automated Program Repair: The Impact of Bug Complexity, Fault Localization, and LLM Cost-efficiency
- 2025Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generation