mlsanityData to 7 Oct 2026

ThinkRepair: Self-Directed Automated Program Repair

arXiv 2407.20898 ↗First posted 30 Jul 2024cs.SEcited by 22

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

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2017Proximal Policy Optimization Algorithmscited by 14,441
  3. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  4. 2023A Multitask, Multilingual, Multimodal Evaluation of ChatGPT on Reasoning, Hallucination, and Interactivitycited by 888

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 10; 2026: 11.

22 papers.

Sort:

By area:

  1. 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
  2. 2025Issue Localization via LLM-Driven Iterative Code Graph Searchingcited by 22
  3. 2025SWE-Synth: Synthesizing Verifiable Bug-Fix Data to Enable Large Language Models in Resolving Real-World Bugscited by 22
  4. 2025ReCode: Improving LLM-based Code Repair with Fine-Grained Retrieval-Augmented Generationcited by 6
  5. 2026TraceCoder: A Trace-Driven Multi-Agent Framework for Automated Debugging of LLM-Generated Codecited by 6
  6. 2025Uncovering Systematic Failures of LLMs in Verifying Code Against Natural Language Specificationscited by 5
  7. 2025AutoPatch: Multi-Agent Framework for Patching Real-World CVE Vulnerabilitiescited by 4
  8. 2026Are LLMs Reliable Code Reviewers? Systematic Overcorrection in Requirement Conformance Judgementcited by 4
  9. 2025AuPair: Golden Example Pairs for Code Repaircited by 3
  10. 2025Evaluating the Generalizability of LLMs in Automated Program Repaircited by 3
  11. 2026Loc2Repair: A Framework for Evaluating the Impact of File-Level Issue Localization in Repo-Level LLM Repaircited by 3
  12. 2026VulnResolver: A Hybrid Agent Framework for LLM-Based Automated Vulnerability Issue Resolutioncited by 2
10 more
  1. 2025Reinforcement Learning-Guided Chain-of-Draft for Token-Efficient Code Generationcited by 1
  2. 2026Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMscited by 1
  3. 2026Multi-Perspective Agentic Program Repair via Code Property Graphs and Temporal Execution Graphscited by 1
  4. 2026Rethinking Automated Program Repair: The Impact of Bug Complexity, Fault Localization, and LLM Cost-efficiencycited by 1
  5. 2025From Benchmark Data To Applicable Program Repair: An Experience Reportcited by 0
  6. 2025SLEAN: Simple Lightweight Ensemble Analysis Network for Multi-Provider LLM Coordination: Design, Implementation, and Vibe Coding Bug Investigation Case Studycited by 0
  7. 2026FVRuleLearner: Operator-Level Reasoning Tree (Op-Tree)-Based Rules Learning for Formal Verificationcited by 0
  8. 2026Knowledge-Enhanced Agentic Vulnerability Repaircited by 0
  9. 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Testscited by 0
  10. 2026Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skillscited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2025T3: Multi-level Tree-based Automatic Program Repair with Large Language Models
  2. 2025BloomAPR: A Bloom's Taxonomy-based Framework for Assessing the Capabilities of LLM-Powered APR Solutions
  3. 2025The Art of Repair: Optimizing Iterative Program Repair with Instruction-Tuned Models
  4. 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repair
  5. 2025Towards Effectively Leveraging Execution Traces for Program Repair with Code LLMs
  6. 2025REFINE: Enhancing Program Repair Agents through Context-Aware Patch Refinement
  7. 2024RePair: Automated Program Repair with Process-based Feedback
  8. 2025FeedbackEval: A Benchmark for Evaluating Large Language Models in Feedback-Driven Code Repair Tasks