arXiv:2411.07586cs.AI2024-11综述被引 14

综述大模型在自动修复与代码生成中的应用进展

A Comprehensive Survey of AI-Driven Advancements and Techniques in Automated Program Repair and Code Generation

  • 梳理27篇论文,分自动修复与代码生成两类研究
  • 大模型显著提升修复准确率与生成效率,支持上下文感知修复
  • 适合关注AI辅助编程、软件工程自动化的研究者

Bug修复与代码生成是软件开发的核心研究方向。随着大语言模型的爆发式增长,这两个领域迎来了前所未有的变革,使强大工具成为可能。本文综述了27篇近期论文,分为两类:一类聚焦于大模型与自动程序修复(APR)的融合,涵盖语义错误、安全漏洞和运行时失败的定位与修复;另一类关注基于大模型的代码生成,涵盖通用编程模型的微调及任务专用模型。文章还介绍了提升代码生成效果的方法,如标识符感知训练、指令级微调和引入语义代码结构。通过对比两类方法,揭示了使用大模型、反馈循环实现迭代优化以及开源模型的趋势。同时讨论了功能正确性与安全性挑战,并提出未来研究方向。

原文摘要 · Abstract (English)

Bug fixing and code generation have been core research topics in software development for many years. The recent explosive growth in Large Language Models has completely transformed these spaces, putting in reach incredibly powerful tools for both. In this survey, 27 recent papers have been reviewed and split into two groups: one dedicated to Automated Program Repair (APR) and LLM integration and the other to code generation using LLMs. The first group consists of new methods for bug detection and repair, which include locating semantic errors, security vulnerabilities, and runtime failure bugs. The place of LLMs in reducing manual debugging efforts is emphasized in this work by APR toward context-aware fixes, with innovations that boost accuracy and efficiency in automatic debugging. The second group dwells on code generation, providing an overview of both general-purpose LLMs fine-tuned for programming and task-specific models. It also presents methods to improve code generation, such as identifier-aware training, fine-tuning at the instruction level, and incorporating semantic code structures. This survey work contrasts the methodologies in APR and code generation to identify trends such as using LLMs, feedback loops to enable iterative code improvement and open-source models. It also discusses the challenges of achieving functional correctness and security and outlines future directions for research in LLM-based software development.

自动修复代码生成大模型软件工程

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。