系统梳理AI生成代码中的各类缺陷,为提升代码质量提供依据。
A Survey of Bugs in AI-Generated Code
- 归纳不同模型生成代码的缺陷类型与模式
- 发现生成代码普遍存在可复现的错误模式
- 适合关注AI编程工具质量的研究者与开发者
开发者广泛使用AI代码生成模型以提升效率,但生成代码的质量问题引发关注。这些代码由训练于公开代码的数据集构建,而原始数据中本身存在漏洞和质量问题,导致生成结果可能引入信任与维护难题。已有研究零散报告了多种缺陷,但缺乏系统性总结。本文系统分析现有文献,揭示生成代码中缺陷的类型分布、与模型的关系及可行修复策略。通过分类整理常见错误模式,为未来模型优化与质量评估提供参考。
原文摘要 · Abstract (English)
Developers are widely using AI code-generation models, aiming to increase productivity and efficiency. However, there are also quality concerns regarding the AI-generated code. The generated code is produced by models trained on publicly available code, which are known to contain bugs and quality issues. Those issues can cause trust and maintenance challenges during the development process. Several quality issues associated with AI-generated code have been reported, including bugs and defects. However, these findings are often scattered and lack a systematic summary. A comprehensive review is currently lacking to reveal the types and distribution of these errors, possible remediation strategies, as well as their correlation with the specific models. In this paper, we systematically analyze the existing AI-generated code literature to establish an overall understanding of bugs and defects in generated code, providing a reference for future model improvement and quality assessment. We aim to understand the nature and extent of bugs in AI-generated code, and provide a classification of bug types and patterns present in code generated by different models. We also discuss possible fixes and mitigation strategies adopted to eliminate bugs from the generated code.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。