QiMeng-PRepair: Precise Code Repair via Edit-Aware Reward Optimization
Abstract
PRepair framework reduces over-editing in program repair by combining controlled bug injection and edit-aware policy optimization to maximize correct code reuse while minimizing unnecessary modifications.
Large Language Models (LLMs) achieve strong program repair performance but often suffer from over-editing, where excessive modifications overwrite correct code and hinder bug localization. We systematically quantify its impact and introduce precise repair task, which maximizes reuse of correct code while fixing only buggy parts. Building on this insight, we propose PRepair, a framework that mitigates over-editing and improves repair accuracy. PRepair has two components: Self-Breaking, which generates diverse buggy programs via controlled bug injection and min-max sampling, and Self-Repairing, which trains models with Edit-Aware Group Relative Policy Optimization (EA-GRPO) using an edit-aware reward to encourage minimal yet correct edits. Experiments show that PRepair improves repair precision by up to 31.4% under fix_1@1, a metric that jointly considers repair correctness and extent, and significantly increases decoding throughput when combined with speculative editing, demonstrating its potential for precise and practical code repair.
Community
How to process over-editing?
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- PAFT: Preservation Aware Fine-Tuning for Minimal-Edit Program Repair (2026)
- Learning to Generate Secure Code via Token-Level Rewards (2026)
- An Iterative Test-and-Repair Framework for Competitive Code Generation (2026)
- ReflexiCoder: Teaching Large Language Models to Self-Reflect on Generated Code and Self-Correct It via Reinforcement Learning (2026)
- Specification Vibing for Automated Program Repair (2026)
- PACE: Prefix-Protected and Difficulty-Aware Compression for Efficient Reasoning (2026)
- From Guessing to Placeholding: A Cost-Theoretic Framework for Uncertainty-Aware Code Completion (2026)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend
Get this paper in your agent:
hf papers read 2604.05963 Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash Models citing this paper 2
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper