《计算机应用》唯一官方网站

• •    下一篇

自动代码编辑推荐综述

陈浩轩1,叶培昌1,刘磊2,刘承明1,胡文华3*   

  1. 1. 武汉理工大学 计算机与人工智能学院,武汉 430070; 2. 西安交通大学 电子与科学工程学院,西安 710049; 3. 交通物联网技术湖北省重点实验室(武汉理工大学),武汉 430070


  • 收稿日期:2025-05-02 修回日期:2025-07-06 接受日期:2025-07-08 发布日期:2025-07-23 出版日期:2025-07-23
  • 通讯作者: 胡文华
  • 基金资助:
    基于认知心理学的软件需求错误自动化检测模型及工具研发

Survey of automated code edit suggestion

CHEN Haoxuan1, YE Peichang1, LIU Lei2, LIU Chengming1, HU Wenhua3*   

  • Received:2025-05-02 Revised:2025-07-06 Accepted:2025-07-08 Online:2025-07-23 Published:2025-07-23

摘要: 代码编辑作为软件开发的核心环节,对软件系统的持续优化至关重要。随着代码编辑行为规律性的发现,自动代码编辑推荐(Automated Code Edit Suggestion,ACES)技术成为提升编辑效率、减少人工错误的关键方向。然而,现有研究存在成果分散、缺乏系统性整合和统一框架的问题。因此,围绕自动代码编辑推荐技术展开系统性综述,全面回顾2004—2025年的相关研究成果。首先,梳理该领域研究的发表趋势,从传统智能方法、深度学习模型和大语言模型这3个维度总结推荐模型的技术演进和相关辅助技术的发展;在此基础上,根据推荐任务的不同类型,将它们划分为基于上下文信息、任务描述与指令、历史编辑和输入输出示例的4类推荐任务,详细阐述各类型任务的技术思路与研究成果。其次,通过剖析自动代码编辑推荐的评价体系,系统介绍现有实验数据集的编程语言、粒度、规模分布及文本相似度和功能正确性等评价指标。最后,通过深入剖析当前研究现状,指出现有研究中的一系列突出挑战,并展望未来研究的潜在机遇,为该领域的进一步发展提供理论参考与方向指引。

关键词: 软件工程, 自动代码编辑推荐, 深度学习, 大语言模型, 代码变更

Abstract: Code editing, as a core component of software development, is crucial for the continuous optimization of software systems. With the discovery of regularities in code editing behaviors, automated code edit suggestion techniques have emerged as a key direction to enhance editing efficiency and reduce human errors. However, existing research suffers from issues such as scattered findings, lack of systematic integration, and a unified framework. Therefore, a systematic review of automated code edit suggestion techniques was conducted, comprehensively reviewing relevant studies published between 2004 and 2025. First, the publication trends in this field were summarized, and the technical evolution of suggestion models along with the development of related auxiliary technologies were outlined from three dimensions: traditional intelligent methods, deep learning models, and large language models. Based on this, suggestion tasks were classified into four types according to their objectives: context-based information, task descriptions and instructions, historical edits, and input-output examples. The technical approaches and research outcomes of each task type were elaborated in detail. Second, through the analysis of the evaluation systems for automated code edit suggestion, the programming languages, granularity, scale distribution of existing evaluation datasets, as well as evaluation metrics such as text similarity and functional correctness were systematically introduced. Finally, an in-depth analysis of the current research landscape was conducted, and a series of prominent challenges were identified while potential future opportunities were outlined, providing theoretical references and directional guidance for the further development of this field.

Key words: software engineering, Automated Code Edit Suggestion (ACES), deep learning, large language model, code change
 

中图分类号: