mlsanityData to 14 Oct 2026

RePaCA: Leveraging Reasoning Large Language Models for Static Automated Patch Correctness Assessment

arXiv 2507.22580 ↗First posted 30 Jul 2025cs.SE cs.AIcited by 1

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

Automated Program Repair (APR) seeks to automatically correct software bugs without requiring human intervention. However, existing tools tend to generate patches that satisfy test cases without fixing the underlying bug, those are known as overfitting patches. To address this issue, Automated Patch Correctness Assessment (APCA) attempts to identify overfitting patches generated by APR tools. It can be solved as a static approach, meaning that no additional information is needed beyond the original and fixed code snippets. Current static techniques often struggle with reliability, flexibility and transparency. To address these issues, we introduce RePaCA, a novel static APCA technique that leverages Large Language Models (LLMs) specialized in thinking tasks. Our model is prompted with both buggy and fixed code snippets and guided to generate a Chain of Thought that analyses code differences, reasons about how the patch addresses the root cause, and ultimately provides a binary classification: correct or overfitting. To enhance these reasoning capabilities for the APCA task specifically, the LLM is finetuned using Reinforcement Learning with the Group Relative Policy Optimization algorithm. When evaluated on a standard Defects4J-derived test, our approach achieves state-of-the-art performance, with 83.1% accuracy and an 84.8% F1-score. Furthermore, our model demonstrates superior generalization capabilities when trained on different datasets, outperforming the leading technique. This reasoning capability also provides enhanced explainability for the patch assessment. These findings underscore the considerable promise of finetuned, reasoning LLMs to advance static APCA by enhancing accuracy, generalization, and explainability.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 19 of its 33 references that are in the map. First posted on arXiv 30 Jul 2025.

Builds on

19 of 33 references.

References · 19

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2017Proximal Policy Optimization Algorithmscited by 15,215
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  4. 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
  5. 2024Qwen2.5 Technical Reportcited by 4,942
  6. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  7. 2021Randomness In Neural Network Training: Characterizing The Impact of Toolingcited by 59
  8. 2023A Survey of Learning-based Automated Program Repaircited by 55
  9. 2019How Often Do Single-Statement Bugs Occur? The ManySStuBs4J Datasetcited by 36
  10. 2020Evaluating Representation Learning of Code Changes for Predicting Patch Correctness in Program Repaircited by 22
  11. 2017Identifying Patch Correctness in Test-Based Program Repaircited by 17
  12. 2019Automated Patch Assessment for Program Repair at Scalecited by 14
7 more
  1. 2019Empirical Review of Java Program Repair Tools: A Large-Scale Experiment on 2,141 Bugs and 23,551 Repair Attemptscited by 12
  2. 2023Invalidator: Automated Patch Correctness Assessment via Semantic and Syntactic Reasoningcited by 11
  3. 2019Automated Classification of Overfitting Patches with Statically Extracted Code Featurescited by 10
  4. 2025Group Relative Policy Optimization for Image Captioningcited by 9
  5. 2022Is this Change the Answer to that Problem? Correlating Descriptions of Bug and Code Changes for Evaluating Patch Correctnesscited by 7
  6. 2023APPT: Boosting Automated Patch Correctness Prediction via Fine-tuning Pre-trained Modelscited by 4
  7. 2024Strategic Prompting for Conversational Tasks: A Comparative Analysis of Large Language Models Across Diverse Conversational Taskscited by 3

Built on by

Cited by year

Citing papers per year: 2025: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026ComPass: Contrastive Learning for Automated Patch Correctness Assessment in Program Repair
  2. 2025REFINE: Enhancing Program Repair Agents through Context-Aware Patch Refinement
  3. 2024ThinkRepair: Self-Directed Automated Program Repair
  4. 2025The Art of Repair: Optimizing Iterative Program Repair with Instruction-Tuned Models
  5. 2025Understanding Automated Program Repair Agents Through the Lens of Traceability: An Empirical Study
  6. 2026EviACT: An Evidence-to-Action Framework for Agentic Program Repair
  7. 2026Refine After Generation: Toward Correct and Concise Patches in LLM-based Program Repair
  8. 2025Repair-R1: Better Test Before Repair