mlsanityData to 7 Oct 2026

REFINE: Enhancing Program Repair Agents through Context-Aware Patch Refinement

arXiv 2510.03588 ↗First posted 4 Oct 2025cs.SE cs.MAcited by 6

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

Large Language Models (LLMs) have recently shown strong potential in automatic program repair (APR), especially in repository-level settings where the goal is to generate patches based on natural language issue descriptions, large codebases, and regression tests. However, despite their promise, current LLM-based APR techniques often struggle to produce correct fixes due to limited understanding of code context and over-reliance on incomplete test suites. As a result, they frequently generate Draft Patches-partially correct patches that either incompletely address the bug or overfit to the test cases. In this work, we propose a novel patch refinement framework, Refine, that systematically transforms Draft Patches into correct ones. Refine addresses three key challenges: disambiguating vague issue and code context, diversifying patch candidates through test-time scaling, and aggregating partial fixes via an LLM-powered code review process. We implement Refine as a general refinement module that can be integrated into both open-agent-based and workflow-based APR systems. Our evaluation on the SWE-Bench Lite benchmark shows that Refine achieves state-of-the-art results among workflow-based approaches and approaches the best-known performance across all APR categories. Specifically, Refine boosts AutoCodeRover's performance by 14.67%, achieving a score of 51.67% and surpassing all prior baselines. On SWE-Bench Verified, Refine improves the resolution rate by 12.2%, and when integrated across multiple APR systems, it yields an average improvement of 14%-demonstrating its broad effectiveness and generalizability. These results highlight the effectiveness of refinement as a missing component in current APR pipelines and the potential of agentic collaboration in closing the gap between near-correct and correct patches. We also open source our code.

Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 28 of its 64 references that are in the map. First posted on arXiv 4 Oct 2025.

Builds on

28 of 64 references.

Closest ancestors · 6

Same direction, newest first

  1. 2025DARS: Dynamic Action Re-Sampling to Enhance Coding Agent Performance by Adaptive Tree Traversal18 Mar
  2. 2024SpecRover: Code Intent Extraction via LLMs5 Aug
  3. 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agents23 Jul
  4. 2024Agentless: Demystifying LLM-based Software Engineering Agents1 Jul
  5. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
  6. 2024Executable Code Actions Elicit Better LLM Agents1 Feb

Other references · 22

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  4. 2025Multi-SWE-bench: A Multilingual Benchmark for Issue Resolvingcited by 165
  5. 2022Few-shot training LLMs for project-specific code-summarizationcited by 128
  6. 2022Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproductioncited by 110
  7. 2022Automating Code Review Activities by Large-Scale Pre-trainingcited by 98
  8. 2023ChatUniTest: A Framework for LLM-Based Test Generationcited by 94
  9. 2023CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translationcited by 55
  10. 2024HITS: High-coverage LLM-based Unit Test Generation via Method Slicingcited by 37
  11. 2024Hybrid Automated Program Repair by Combining Large Language Models and Program Analysiscited by 22
  12. 2025Dynamic Benchmarking of Reasoning Capabilities in Code Large Language Models Under Data Contaminationcited by 22
10 more
  1. 2023CoTran: An LLM-based Code Translator using Reinforcement Learning with Feedback from Compiler and Symbolic Executioncited by 21
  2. 2025On the Effectiveness of LLM-as-a-judge for Code Generation and Summarizationcited by 17
  3. 2023ITER: Iterative Neural Repair for Multi-Location Patchescited by 16
  4. 2025Large Language Model (LLM) for Software Security: Code Analysis, Malware Analysis, Reverse Engineeringcited by 15
  5. 2024Exploring LLMs for Malware Detection: Review, Framework Design, and Countermeasure Approachescited by 13
  6. 2024KGym: A Platform and Dataset to Benchmark Large Language Models on Linux Kernel Crash Resolutioncited by 12
  7. 2019iFixR: Bug Report driven Program Repaircited by 11
  8. 2018Alleviating Patch Overfitting with Automatic Test Generation: A Study of Feasibility and Effectiveness for the Nopol Repair Systemcited by 7
  9. 2024PPM: Automated Generation of Diverse Programming Problems for Benchmarking Code Generation Modelscited by 7
  10. 2024LLM-based Unit Test Generation via Property Retrievalcited by 6

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 6.

6 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Refine After Generation: Toward Correct and Concise Patches in LLM-based Program Repair
  2. 2026Multi-Perspective Agentic Program Repair via Code Property Graphs and Temporal Execution Graphs
  3. 2025Enhancing Automated Program Repair via Faulty Token Localization and Quality-Aware Patch Refinement ↗
  4. 2026REFINE: A Multi-Agent LLM Approach for Evidence-Guided Code Refactoring
  5. 2025Understanding Automated Program Repair Agents Through the Lens of Traceability: An Empirical Study
  6. 2026MultiFixer: A Coordinator-Proposer Based Multi-Agent Framework For Fixing Multi-Hunk Bugs
  7. 2026AgenticRepair: Multi-Faceted Program Context Engineering for Agentic Vulnerability Repair
  8. 2025SWE-Synth: Synthesizing Verifiable Bug-Fix Data to Enable Large Language Models in Resolving Real-World Bugs