Large language models frequently fail to produce correct code on their first attempt, yet most benchmarks evaluate them in a single-shot setting. We investigate iterative self-repair (feeding execution errors back to the model for correction) across seven models spanning three families and both open-weight and proprietary providers: Llama 3.1 8B, Llama 3.3 70B, Llama 4 Scout (MoE, 16 experts), Llama 4 Maverick (MoE, 128 experts), Qwen3 32B, Gemini 2.5 Flash, and Gemini 2.5 Pro. On HumanEval (164 problems) and MBPP Sanitized (257 problems) with up to five attempts, self-repair universally improves pass rates: +4.9 to +17.1 pp on HumanEval and +16.0 to +30.0 pp on MBPP. Gemini 2.5 Flash achieves the highest final pass rates (96.3% HumanEval, 93.8% MBPP). Most gains concentrate in the first two rounds.Error-type analysis shows assertion errors (logical mistakes) are the hardest to repair at ~45%, while syntax and name errors are repaired at substantially higher rates, connecting to broader findings on the limits of LLM self-correction. Prior work found that weaker models fail at self-repair or require fine-tuning; we show that modern instruction-tuned models succeed with prompting alone, even at 8B scale. We also provide the first comparison of dense and MoE architectures for self-repair, and extend the repair-vs-resampling tradeoff analysis to modern models. A prompt ablation reveals chain-of-thought repair yields up to +5.5 pp additional self-repair gain (measured as improvement in repair delta) over minimal prompting for capable models.
Southwest University(西南大学);Aarhus University(奥胡斯大学);University of York(约克大学);Centro de Informática, Universidade Federal de Pernambuco (UFPE)(伯南布哥联邦大学信息中心);University of Lancaster(兰卡斯特大学)
RisConFix: LLM-based Automated Repair of Risk-Prone Drone Configurations
School of Computer Science Nanjing University of Posts and Telecommunications(南京邮电大学计算机科学学院);School of Computer Science and Engineering Beihang University(北京航空航天大学计算机科学与工程学院)
How Well Do Large Language Models Serve as End-to-End Secure Code Agents for Python?
School of Computer Science and Engineering, Beihang University(北京航空航天大学计算机科学与工程学院);State Key Laboratory of Software Development Environment(软件开发环境国家重点实验室);Zhongguancun Laboratory(中关村实验室);Tsinghua University(清华大学)
ModelWisdom: An Integrated Toolkit for TLA+ Model Visualization, Digest and Repair
State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing, China(新型软件技术国家重点实验室,南京大学,中国);Department of Computer Science and Engineering, The Hong Kong University of Science and Technology(香港科学与技术大学计算机科学与工程系)
EvidenT: An Evidence-Preserving Framework for Iterative System-Level Package Repair
Nankai University(南开大学);Microsoft(微软);Haihe Laboratory of Information Technology Application Innovation(海河信息技术应用创新实验室);Key Laboratory of Data and Intelligent System Security, Ministry of Education(教育部数据与智能系统安全重点实验室);Tianjin Key Laboratory of Software Experience and Human Computer Interaction(天津市软件体验与人机交互重点实验室);Tsinghua University(清华大学)
Escaping the Self-Repair Trap: Improving Test Oracle Generation via Dual-Context Awareness
Beihang University(北京航空航天大学);National College for Excellent Engineers(卓越工程师学院);Qingdao Research Institute(青岛研究院);Hangzhou Innovation Institute(杭州创新研究院)
FeedbackEval: A Benchmark for Evaluating Large Language Models in Feedback-Driven Code Repair Tasks
School of Software Engineering Sun Yat-sen University(中山大学软件学院);The Hong Kong University of Science and Technology(香港科技大学);School of Computer Science and Engineering Nanyang Technological University(南洋理工大学计算机科学与工程学院);School of Computer Science Fudan University(复旦大学计算机科学学院)
TraceCoder: A Trace-Driven Multi-Agent Framework for Automated Debugging of LLM-Generated Code
School of Computer Science and Technology, Chongqing University of Posts and Telecommunications(重庆邮电大学计算机科学与技术学院);Nanyang Technological University(南洋理工大学);Beihang University(北京航空航天大学);Southwest University(西南大学)
Unlocking LLM Repair Capabilities Through Cross-Language Translation and Multi-Agent Refinement
City University of Hong Kong(香港城市大学);Beijing JudaoYouda Network Technology Co. Ltd.(北京极道有道网络科技有限公司);SnT, University of Luxembourg(卢森堡大学科学与技术学院);Aalto University(阿尔托大学);University of Melbourne(墨尔本大学)