Large Language Models for Programming: Actually Fixing or Reimplementing Incorrect Code?
Not on the map. Why?
Abstract (arXiv)
Recent studies have shown that Large Language Models can effectively solve problems and fix bugs in diverse programming environments, including competitive programming. Existing approaches primarily evaluate LLM performance in problem solving or bug fixing independently, but do not explore the relationship between these two capabilities. This work focuses on determining how much the LLM deviates from a buggy solution to fix the bug compared to a human-written patch, and if there is a bias towards generating entirely new solutions. We construct a dataset with all the submissions (~ 3000) from a couple of users from Codeforces, and we match each buggy submission with its corresponding human fix. By using the similarity between the buggy solution and the human fix as a baseline, we evaluate the quality of LLM-generated bug fixes on 3 OpenAI GPT models (gpt-5-nano, gpt-5-mini, gpt-5.1). We check if the generated solutions solve the problem by using the Codeforces-R1 dataset, an openly available dataset that has tests generated with the DeepSeek-R1 model. Our findings suggest that LLMs tend to modify more lines than necessary compared to human fixes and, in some cases, generate entirely new solutions. We also observe that LLMs solve more problems correctly when allowed to generate solutions from scratch rather than patch buggy submissions, even when those submissions are close to the human patch. This has important implications for the design of AI-assisted programming tools, particularly in supporting user debugging processes and promoting incremental problem-solving strategies rather than solution replacement.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 11 of its 14 references that are in the map. First posted on arXiv 24 Sep 2026.
Builds on
11 of 14 references.
References · 11
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2023DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelinescited by 832
- 2025GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learningcited by 542
- 2021Unified Pre-training for Program Understanding and Generationcited by 366
- 2023Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPTcited by 125
- 2024DebugBench: Evaluating Debugging Capability of Large Language Modelscited by 76
- 2025LiveCodeBench Pro: How Do Olympiad Medalists Judge LLMs in Competitive Programming?cited by 55
- 2022FixEval: Execution-based Evaluation of Program Fixes for Programming Problemscited by 17
- 2025ELABORATION: A Comprehensive Benchmark on Human-LLM Competitive Programmingcited by 16
- 2025AuPair: Golden Example Pairs for Code Repaircited by 3
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Evaluating and Improving Large Language Models for Competitive Program Generation
- 2025Holistic Evaluation of State-of-the-Art LLMs for Code Generation
- 2026If It's Not Buggy, Don't Fix It: On the Dynamics of Iterative Bug-fixing with LLMs
- 2026Where Do Large Language Models Fail on Competitive Programming? A Taxonomy of Failures by Algorithm Type and Difficulty Rating ↗
- 2023Exploring Large Language Models in Resolving Environment-Related Crash Bugs: Localizing and Repairing
- 2026SelfHeal: Empirical Fix Pattern Analysis and Bug Repair in LLM Agents
- 2025LLM-Based Detection of Tangled Code Changes for Higher-Quality Method-Level Bug Datasets
- 2026Narrowing the Complexity Gap in the Evaluation of Large Language Models ↗