QiMeng-PRepair: Precise Code Repair via Edit-Aware Reward Optimization
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.
69d5eb59b9b236b710ae8240
Changxin Ke
claimed_verified
2026-04-08T07:42:46.723Z
634563f3d54fb141ded92b84
/avatars/b2ad5afd012559374a2195c0b20d3f82.svg
Changxin Ke
kcxain
user
kcxain
69d5eb59b9b236b710ae8241
Rui Zhang
69d5eb59b9b236b710ae8242
Jiaming Guo
69d5eb59b9b236b710ae8243
Yuanbo Wen
69d5eb59b9b236b710ae8244
Li Ding
69d5eb59b9b236b710ae8245
Shuo Wang
69d5eb59b9b236b710ae8246
Xuyuan Zhu
69d5eb59b9b236b710ae8247
Xiong Peng
69d5eb59b9b236b710ae8248
Di Huang
69d5eb59b9b236b710ae8249
Zidong Du
69d5eb59b9b236b710ae824a
Xing Hu
69d5eb59b9b236b710ae824b
Qi Guo
69d5eb59b9b236b710ae824c
Yunji Chen
QiMeng-PRepair: Precise Code Repair via Edit-Aware Reward Optimization
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.
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.
program repair over-editing precise repair task Self-Breaking bug injection min-max sampling Self-Repairing Edit-Aware Group Relative Policy Optimization EA-GRPO edit-aware reward fix_1@1 speculative editing decoding throughput