首页 | 本学科首页   官方微博 | 高级检索  
     

代码注释自动生成方法综述
引用本文:陈翔,杨光,崔展齐,孟国柱,王赞.代码注释自动生成方法综述[J].软件学报,2021,32(7):2118-2141.
作者姓名:陈翔  杨光  崔展齐  孟国柱  王赞
作者单位:南通大学 信息科学技术学院, 江苏 南通 226019;中国科学院信息工程研究所, 信息安全国家重点实验室, 北京 100093;高安全系统的软件开发与验证技术工业和信息化部重点实验室(南京航空航天大学), 江苏 南京 211106;北京信息科技大学 计算机学院, 北京 100101;天津大学 智能与计算学部, 天津 300350
基金项目:科技创新2030-“新一代人工智能”重大项目(2019AAA0104301);国家自然科学基金(61702041,61872263,61902395,61202006);信息安全国家重点实验室开放课题(2020-MS-07);南京航空航天大学高安全系统的软件开发与验证技术工业和信息化部重点实验室开放课题(NJ2020022);江苏省前沿引领技术基础研究专项(BK20202001);天津市智能制造专项资金项目(20193155).
摘    要:在软件的开发和维护过程中,与代码对应的注释经常存在缺失、不足或者与代码实际内容不匹配等问题,但手工编写代码注释对开发人员来说费时费力,且注释质量难以保证,因此亟需研究人员提出有效的代码注释自动生成方法.代码注释自动生成问题是当前程序理解研究领域的一个研究热点,论文对该问题进行了系统综述.主要将已有的自动生成方法细分为三类:基于模板的方法、基于信息检索的方法和基于深度学习的方法.论文依次对每一类方法的已有研究成果进行了系统的梳理、总结和点评.随后分析了已有的实证研究中经常使用的语料库和主要的注释质量评估方法,以利于针对该问题的后续研究可以进行合理的实验设计.最后总结全文,并对未来值得关注的研究方向进行了展望.

关 键 词:程序理解  代码注释自动生成  模板  信息检索  深度学习  机器翻译
收稿时间:2020/9/2 0:00:00
修稿时间:2020/10/26 0:00:00

Survey of State-of-the-art Automatic Code Comment Generation
CHEN Xiang,YANG Guang,CUI Zhan-Qi,MENG Guo-Zhu,WANG Zan.Survey of State-of-the-art Automatic Code Comment Generation[J].Journal of Software,2021,32(7):2118-2141.
Authors:CHEN Xiang  YANG Guang  CUI Zhan-Qi  MENG Guo-Zhu  WANG Zan
Affiliation:School of Information Science and Technology, Nantong University, Nantong 226019, China;State Key Laboratory of Information Security, Institute of Information Engineering, Chinese Academy of Sciences, Beijing 100093, China;Key Laboratory of Safety-Critical Software (Nanjing University of Aeronautics and Astronautics), Ministry of Industry and Information Technology, Nanjing 211106, China;School of Computer, Beijing Information Science and Technology University, Beijing 100101, China; College of Intelligence and Computing, Tianjin University, Tianjin 300350, China
Abstract:During software development and maintenance, code comments often have some problems, such as missing, insufficient, or mismatching with code content. Writing high-quality code comments takes time and effort for developers, and the quality can not be guaranteed, so it is urgent for researchers to design effective automatic code comment generation methods. The automatic code comment generation issue is an active research topic in the program comprehension domain. In this paper, we conduct a systematic review of this research topic. The existing methods are divided into three categories:template-based generation methods, information retrieval-based methods, and deep learning-based methods. We analyze and summarize related studies for each category. Then we analyze the corpora and comment quality evaluation methods that are often used in previous studies, which can facilitate the experimental study for future studies. Finally, we summarize this paper and discuss the potential research direction in the future.
Keywords:code comment generation  template  information retrieval  deep learning  machine translation
点击此处可从《软件学报》浏览原始摘要信息
点击此处可从《软件学报》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号