ThinkRepair: Self-Directed Automated Program Repair
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
Though many approaches have been proposed for Automated Program Repair (APR) and indeed achieved remarkable performance, they still have limitations in fixing bugs that require analyzing and reasoning about the logic of the buggy program. Recently, large language models (LLMs) instructed by prompt engineering have attracted much attention for their powerful ability to address many kinds of tasks including bug-fixing. However, the quality of the prompt will highly affect the ability of LLMs and manually constructing high-quality prompts is a costly endeavor. To address this limitation, we propose a self-directed LLM-based automated program repair, ThinkRepair, with two main phases: collection phase and fixing phase. The former phase automatically collects various chains of thoughts that constitute pre-fixed knowledge by instructing LLMs with the Chain-of-Thought (CoT) prompt. The latter phase targets fixing a bug by first selecting examples for few-shot learning and second automatically interacting with LLMs, optionally appending with feedback of testing information. Evaluations on two widely studied datasets (Defects4J and QuixBugs) by comparing ThinkRepair with 12 SOTA APRs indicate the priority of ThinkRepair in fixing bugs. Notably, ThinkRepair fixes 98 bugs and improves baselines by 27%-344.4% on Defects4J V1.2. On Defects4J V2.0, ThinkRepair fixes 12-65 more bugs than the SOTA APRs. Additionally, ThinkRepair also makes a considerable improvement on QuixBugs (31 for Java and 21 for Python at most).
Key facts. Cited by 22 papers in the map (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 4 of its 49 references that are in the map. First posted on arXiv 30 Jul 2024.
Builds on
4 of 49 references.
References · 4
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023A Multitask, Multilingual, Multimodal Evaluation of ChatGPT on Reasoning, Hallucination, and Interactivitycited by 888
Built on by
Citing papers per year: 2024: 1; 2025: 10; 2026: 11.
22 papers.
Sort:
By area:
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
- 2025Issue Localization via LLM-Driven Iterative Code Graph Searchingcited by 22
- 2025SWE-Synth: Synthesizing Verifiable Bug-Fix Data to Enable Large Language Models in Resolving Real-World Bugscited by 22
- 2025ReCode: Improving LLM-based Code Repair with Fine-Grained Retrieval-Augmented Generationcited by 6
- 2026TraceCoder: A Trace-Driven Multi-Agent Framework for Automated Debugging of LLM-Generated Codecited by 6
- 2025Uncovering Systematic Failures of LLMs in Verifying Code Against Natural Language Specificationscited by 5
- 2025AutoPatch: Multi-Agent Framework for Patching Real-World CVE Vulnerabilitiescited by 4
- 2026Are LLMs Reliable Code Reviewers? Systematic Overcorrection in Requirement Conformance Judgementcited by 4
- 2025AuPair: Golden Example Pairs for Code Repaircited by 3
- 2025Evaluating the Generalizability of LLMs in Automated Program Repaircited by 3
- 2026Loc2Repair: A Framework for Evaluating the Impact of File-Level Issue Localization in Repo-Level LLM Repaircited by 3
- 2026VulnResolver: A Hybrid Agent Framework for LLM-Based Automated Vulnerability Issue Resolutioncited by 2
10 more
- 2025Reinforcement Learning-Guided Chain-of-Draft for Token-Efficient Code Generationcited by 1
- 2026Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMscited by 1
- 2026Multi-Perspective Agentic Program Repair via Code Property Graphs and Temporal Execution Graphscited by 1
- 2026Rethinking Automated Program Repair: The Impact of Bug Complexity, Fault Localization, and LLM Cost-efficiencycited by 1
- 2025From Benchmark Data To Applicable Program Repair: An Experience Reportcited by 0
- 2025SLEAN: Simple Lightweight Ensemble Analysis Network for Multi-Provider LLM Coordination: Design, Implementation, and Vibe Coding Bug Investigation Case Studycited by 0
- 2026FVRuleLearner: Operator-Level Reasoning Tree (Op-Tree)-Based Rules Learning for Formal Verificationcited by 0
- 2026Knowledge-Enhanced Agentic Vulnerability Repaircited by 0
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Testscited by 0
- 2026Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skillscited by 0
- 2026Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skills10 Sep 2026
- 2026Rethinking Automated Program Repair: The Impact of Bug Complexity, Fault Localization, and LLM Cost-efficiency14 Aug 2026
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Tests24 Jul 2026
- 2026Multi-Perspective Agentic Program Repair via Code Property Graphs and Temporal Execution Graphs14 Jul 2026
- 2026Knowledge-Enhanced Agentic Vulnerability Repair1 Jul 2026
- 2026Loc2Repair: A Framework for Evaluating the Impact of File-Level Issue Localization in Repo-Level LLM Repair29 Jun 2026
- 2026Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMs22 Apr 2026
- 2026FVRuleLearner: Operator-Level Reasoning Tree (Op-Tree)-Based Rules Learning for Formal Verification6 Mar 2026
- 2026Are LLMs Reliable Code Reviewers? Systematic Overcorrection in Requirement Conformance Judgement28 Feb 2026
- 2026TraceCoder: A Trace-Driven Multi-Agent Framework for Automated Debugging of LLM-Generated Code6 Feb 2026
- 2026VulnResolver: A Hybrid Agent Framework for LLM-Based Automated Vulnerability Issue Resolution20 Jan 2026
- 2025SLEAN: Simple Lightweight Ensemble Analysis Network for Multi-Provider LLM Coordination: Design, Implementation, and Vibe Coding Bug Investigation Case Study11 Oct 2025
10 more
- 2025Reinforcement Learning-Guided Chain-of-Draft for Token-Efficient Code Generation26 Sep 2025
- 2025ReCode: Improving LLM-based Code Repair with Fine-Grained Retrieval-Augmented Generation2 Sep 2025
- 2025From Benchmark Data To Applicable Program Repair: An Experience Report22 Aug 2025
- 2025Uncovering Systematic Failures of LLMs in Verifying Code Against Natural Language Specifications17 Aug 2025
- 2025AutoPatch: Multi-Agent Framework for Patching Real-World CVE Vulnerabilities7 May 2025
- 2025SWE-Synth: Synthesizing Verifiable Bug-Fix Data to Enable Large Language Models in Resolving Real-World Bugs20 Apr 2025
- 2025Issue Localization via LLM-Driven Iterative Code Graph Searching28 Mar 2025
- 2025Evaluating the Generalizability of LLMs in Automated Program Repair12 Mar 2025
- 2025AuPair: Golden Example Pairs for Code Repair12 Feb 2025
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debugging2 Oct 2024
- 2026TraceCoder: A Trace-Driven Multi-Agent Framework for Automated Debugging of LLM-Generated Codecited by 6
- 2025AutoPatch: Multi-Agent Framework for Patching Real-World CVE Vulnerabilitiescited by 4
- 2026VulnResolver: A Hybrid Agent Framework for LLM-Based Automated Vulnerability Issue Resolutioncited by 2
- 2026Multi-Perspective Agentic Program Repair via Code Property Graphs and Temporal Execution Graphscited by 1
- 2026Knowledge-Enhanced Agentic Vulnerability Repaircited by 0
- 2026Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skillscited by 0
- 2026Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skills10 Sep 2026
- 2026Multi-Perspective Agentic Program Repair via Code Property Graphs and Temporal Execution Graphs14 Jul 2026
- 2026Knowledge-Enhanced Agentic Vulnerability Repair1 Jul 2026
- 2026TraceCoder: A Trace-Driven Multi-Agent Framework for Automated Debugging of LLM-Generated Code6 Feb 2026
- 2026VulnResolver: A Hybrid Agent Framework for LLM-Based Automated Vulnerability Issue Resolution20 Jan 2026
- 2025AutoPatch: Multi-Agent Framework for Patching Real-World CVE Vulnerabilities7 May 2025
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
- 2025Issue Localization via LLM-Driven Iterative Code Graph Searchingcited by 22
- 2025SWE-Synth: Synthesizing Verifiable Bug-Fix Data to Enable Large Language Models in Resolving Real-World Bugscited by 22
- 2025Uncovering Systematic Failures of LLMs in Verifying Code Against Natural Language Specificationscited by 5
- 2026Are LLMs Reliable Code Reviewers? Systematic Overcorrection in Requirement Conformance Judgementcited by 4
- 2025Evaluating the Generalizability of LLMs in Automated Program Repaircited by 3
- 2026Loc2Repair: A Framework for Evaluating the Impact of File-Level Issue Localization in Repo-Level LLM Repaircited by 3
- 2025Reinforcement Learning-Guided Chain-of-Draft for Token-Efficient Code Generationcited by 1
- 2026Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMscited by 1
- 2026Rethinking Automated Program Repair: The Impact of Bug Complexity, Fault Localization, and LLM Cost-efficiencycited by 1
- 2025From Benchmark Data To Applicable Program Repair: An Experience Reportcited by 0
- 2025SLEAN: Simple Lightweight Ensemble Analysis Network for Multi-Provider LLM Coordination: Design, Implementation, and Vibe Coding Bug Investigation Case Studycited by 0
12 most cited of 13 All 13 (JSON)
- 2026Rethinking Automated Program Repair: The Impact of Bug Complexity, Fault Localization, and LLM Cost-efficiency14 Aug 2026
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Tests24 Jul 2026
- 2026Loc2Repair: A Framework for Evaluating the Impact of File-Level Issue Localization in Repo-Level LLM Repair29 Jun 2026
- 2026Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMs22 Apr 2026
- 2026Are LLMs Reliable Code Reviewers? Systematic Overcorrection in Requirement Conformance Judgement28 Feb 2026
- 2025SLEAN: Simple Lightweight Ensemble Analysis Network for Multi-Provider LLM Coordination: Design, Implementation, and Vibe Coding Bug Investigation Case Study11 Oct 2025
- 2025Reinforcement Learning-Guided Chain-of-Draft for Token-Efficient Code Generation26 Sep 2025
- 2025From Benchmark Data To Applicable Program Repair: An Experience Report22 Aug 2025
- 2025Uncovering Systematic Failures of LLMs in Verifying Code Against Natural Language Specifications17 Aug 2025
- 2025SWE-Synth: Synthesizing Verifiable Bug-Fix Data to Enable Large Language Models in Resolving Real-World Bugs20 Apr 2025
- 2025Issue Localization via LLM-Driven Iterative Code Graph Searching28 Mar 2025
- 2025Evaluating the Generalizability of LLMs in Automated Program Repair12 Mar 2025
12 newest of 13 All 13 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2025T3: Multi-level Tree-based Automatic Program Repair with Large Language Models
- 2025BloomAPR: A Bloom's Taxonomy-based Framework for Assessing the Capabilities of LLM-Powered APR Solutions
- 2025The Art of Repair: Optimizing Iterative Program Repair with Instruction-Tuned Models
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repair
- 2025Towards Effectively Leveraging Execution Traces for Program Repair with Code LLMs
- 2025REFINE: Enhancing Program Repair Agents through Context-Aware Patch Refinement
- 2024RePair: Automated Program Repair with Process-based Feedback
- 2025FeedbackEval: A Benchmark for Evaluating Large Language Models in Feedback-Driven Code Repair Tasks