大模型
arxiv.org ·
LLM 用于编程:是在真正修复还是重新实现错误代码?
该论文研究 LLM 修 bug 与解题能力之间的关系,构建了约 3000 份 Codeforces 提交及其对应人工修复的数据集,以 buggy 解与人工补丁的相似度为基线,评估 gpt-5-nano、gpt-5-mini、gpt-5.1 的修复质量,并用 Codeforces-R1 数据集检验生成解是否通过测试。结果显示,相比人工修复,LLM 倾向于修改更多行,有时直接生成全新解;且允许从零生成时解题正确率高于在 buggy 提交上打补丁,即使该提交已接近人工补丁。作者认为这对 AI 辅助编程工具设计有影响,应支持用户调试与增量式问题解决,而非直接替换解。
AI推荐理由 arXiv 论文,作者与摘要明确,方法可验证:构建约 3000 份 Codeforces 提交与人工修复配对的数据集,以 buggy 解与人工补丁的相似度为基线,评估 gpt-5-nano、gpt-5-mini、gpt-5.1 三个模型的修复质量,并用 Codeforces-R1 数据集验证是否通过测试。核心发现具体且对 AI 编程工具有直接含义:LLM 修复时改动行数多于人工补丁,部分情况直接重写整份解;允许从零生成时解题正确率高于在 buggy 提交上打补丁,即使该提交已接近人工补丁。局限在于样本仅来自少数 Codeforces 用户,测试集依赖 DeepSeek-R1 生成的测试,结论的泛化性未在摘要中说明。
78
正文
Computer Science > Computation and Language
arXiv:2609.29410 (cs)
[Submitted on 24 Sep 2026]
Title:Large Language Models for Programming: Actually Fixing or Reimplementing Incorrect Code?
Authors:Alexandru Stefan Stoica, Traian Rebedea, Marian Cristian Mihaescu
View a PDF of the paper titled Large Language Models for Programming: Actually Fixing or Reimplementing Incorrect Code?, by Alexandru Stefan Stoica and 2 other authors
View PDF
HTML (experimental)
Abstract: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 ($\sim$ 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.
Subjects:
Computation and Language (cs.CL); Software Engineering (cs.SE)
Cite as:
arXiv:2609.29410 [cs.CL]
(or
arXiv:2609.29410v1 [cs.CL] for this version)
https://doi.org/10.48550/arXiv.2609.29410
Focus to learn more
arXiv-issued DOI via DataCite (pending registration)
Submission history
From: Traian Rebedea [view email]
[v1]
Thu, 24 Sep 2026 11:33:36 UTC (91 KB)
Full-text links:
Access Paper:
View a PDF of the paper titled Large Language Models for Programming: Actually Fixing or Reimplementing Incorrect Code?, by Alexandru Stefan Stoica and 2 other authors
View PDF
HTML (experimental)
TeX Source
view license
Current browse context:
cs.CL
new
|
recent
| 2026-09
Change to browse by:
cs
cs.SE
References & Citations
NASA ADS
Google Scholar
Semantic Scholar
export BibTeX citation
Loading...
BibTeX formatted citation
×
loading...
Data provided by:
Bookmark
Bibliographic Tools
Bibliographic and Citation Tools
Bibliographic Explorer Toggle
Bibliographic Explorer (What is the Explorer?)
Connected Papers Toggle
Connected Papers (What is Connected Papers?)
Litmaps Toggle
Litmaps (What is Litmaps?)
scite.ai Toggle
scite Smart Citations (What are Smart Citations?)
Code, Data, Media
Code, Data and Media Associated with this Article
alphaXiv Toggle
alphaXiv (What is alphaXiv?)
Links to Code Toggle
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub Toggle
DagsHub (What is DagsHub?)
GotitPub Toggle
Gotit.pub (What is GotitPub?)
Huggingface Toggle
Hugging Face (What is Huggingface?)
ScienceCast Toggle
ScienceCast (What is ScienceCast?)
Demos
Demos
Replicate Toggle
Replicate (What is Replicate?)
Spaces Toggle
Hugging Face Spaces (What is Spaces?)
Spaces Toggle
TXYZ.AI (What is TXYZ.AI?)
Related Papers
Recommenders and Search Tools
Link to Influence Flower
Influence Flower (What are Influence Flowers?)
Core recommender toggle
CORE Recommender (What is CORE?)
Author
Venue
Institution
Topic
About arXivLabs
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.
Which authors of this paper are endorsers? |
Disable MathJax (What is MathJax?)