Original title: When Models Edit Too Much: On the Fidelity of Minimal Code Edits
Tongyao Zhu, Wei Hern Lim, Min-Yen Kan · September 2026
When artificial intelligence fixes broken code, it should only change what is broken. Often, it rewrites far too much. This problem is called over-editing. To test it, researchers took 400 coding problems and broke them in tiny, controlled ways. This meant they knew the exact, smallest patch needed to fix each one. They found that even powerful models often rewrite working code, which adds unnecessary complexity. Giving the model a clear instruction to preserve original code helped a lot. It shrank extra changes, lowered complexity, and even made the fixes more accurate. Larger models or extra thinking time did not solve this problem on their own. Finally, training models with reinforcement learning produced the best balance between fixing code accurately and making minimal, faithful edits.
Suppose you ask someone to fix a typo in a recipe. Instead of just correcting the misspelled word, they rewrite several sentences, changing measurements and steps unnecessarily. This makes it hard to see what was essential to the fix and what was extra. In this paper, AI models do the same with code—they fix a bug but add many unnecessary changes, making it difficult for programmers to review and trust the edit.
When AI models edit code, they often add unnecessary changes that make code harder for humans to review and maintain. This affects developers who use these tools, leading to increased work and potential errors in software.
The study uses a synthetic evaluation framework with 400 BigCodeBench problems and controlled AST-level corruptions, so results may not directly apply to real-world codebases or other types of bugs. It does not address over-editing in different programming languages or with unstructured edits.
Ask anything about this paper. Answers come from its abstract, and say so when the abstract doesn't cover your question.
When Models Edit Too Much: On the Fidelity of Minimal Code Edits — Tongyao Zhu, Wei Hern Lim, Min-Yen Kan
Abstract licence: CC0
Explanation generated by Synthesis from the abstract — it is not the original paper. This is a preprint, so it hasn't necessarily been peer reviewed.