cs.SEApr 7, 2026

QiMeng-PRepair: Precise Code Repair via Edit-Aware Reward Optimization

Authors: Changxin Ke, Rui Zhang, Jiaming Guo, Yuanbo Wen, Li Ding, Shuo Wang, Xuyuan Zhu, Xiong Peng, 

Organizations: State Key Lab of Processors, Institute of Computing Technology, CAS · University of Chinese Academy of Sciences · Institute of Microelectronics, CAS

Abstract

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 fix1@1\mathrm{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.

Figures & tables

Appendix figures & tables6 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Make Every Expansion Count: Learning to Search Efficiently in LLM Code Repair

    Oct 11, 2026Elad Sharony, Ido Greenberg, Jialin Song +3Automated Program Repair

  2. PreciseCoder: Faithful and Generalizable Debugging Beyond Unit-Test Rewards

    Oct 13, 2026Yunkai Zhan, Miaosen Chai, Shangshang Wang +5Automated Program RepairRL Post-Training

  3. When Models Edit Too Much: On the Fidelity of Minimal Code Edits

    Sep 3, 2026Tongyao Zhu, Wei Hern Lim, Min-Yen KanAutomated Program RepairLanguage Model Editing