《计算机应用》唯一官方网站 ›› 2026, Vol. 46 ›› Issue (4): 1227-1237.DOI: 10.11772/j.issn.1001-9081.2025040486

• 计算机软件技术 • 上一篇    

自动代码编辑推荐综述

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

  1. 1.武汉理工大学 计算机与人工智能学院,武汉 430070
    2.西安交通大学 电子科学与工程学院,西安 710049
    3.交通物联网技术湖北省重点实验室(武汉理工大学),武汉 430070
  • 收稿日期:2025-05-06 修回日期:2025-07-06 接受日期:2025-07-08 发布日期:2025-07-23 出版日期:2026-04-10
  • 通讯作者: 胡文华
  • 作者简介:陈浩轩(2002—),男,湖北黄冈人,硕士研究生,主要研究方向:智能软件工程
    叶培昌(1997—),男,江西上饶人,硕士研究生,主要研究方向:智能软件工程
    刘磊(2002—),男,湖南益阳人,硕士研究生,主要研究方向:智能软件工程
    刘承明(2005—),男,湖北武汉人,主要研究方向:智能软件工程
  • 基金资助:
    国家自然科学基金资助项目(62202350)

Survey of automated code edit suggestion

Haoxuan CHEN1, Peichang YE1, Lei LIU2, Chengming LIU1, Wenhua HU3()   

  1. 1.School of Computer Science and Artificial Intelligence,Wuhan University of Technology,Wuhan Hubei 430070,China
    2.School of Electronic Science and Engineering,Xi’an Jiaotong University,Xi’an Shaanxi 710049,China
    3.Hubei Key Laboratory of Transportation Internet of Things (Wuhan University of Technology),Wuhan Hubei 430070,China
  • Received:2025-05-06 Revised:2025-07-06 Accepted:2025-07-08 Online:2025-07-23 Published:2026-04-10
  • Contact: Wenhua HU
  • About author:CHEN Haoxuan, born in 2002, M. S. candidate. His research interests include intelligent software engineering.
    YE Peichang, born in 1997, M. S. candidate. His research interests include intelligent software engineering.
    LIU Lei, born in 2002, M. S. candidate. His research interests include intelligent software engineering.
    LIU Chengming, born in 2005. His research interests include intelligent software engineering.
  • Supported by:
    National Natural Science Foundation of China(62202350)

摘要:

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

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

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 (ACES) techniques have emerged as a key direction to enhance editing efficiency and reduce human errors. However, the existing research suffers from issues such as scattered findings, and lack of systematic integration and a unified framework. Therefore, a systematic review of ACES techniques was conducted, reviewing relevant research findings published from 2004 to 2025 comprehensively. Firstly, the publication trends in this field were sorted out, and the technical evolution of suggestion models along with the development of related auxiliary technologies were summed up from three dimensions: traditional intelligent methods, deep learning models, and large language models. Based on the above, suggestion tasks were classified into four different types: context information-based, task descriptions and instructions-based, historical edits-based, and input-output examples-based suggestion tasks, and the technical approaches and research findings of each task type were elaborated in detail. Secondly, through analysis of the ACES evaluation systems, the programming languages, editing granularity, scale distribution of the existing evaluation datasets, as well as evaluation metrics such as text similarity and functional correctness of the code were introduced systematically. Finally, an in-depth analysis of the current research status was conducted, a series of prominent challenges in the research were identified, and potential future opportunities were prospected, 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

中图分类号: