| 本文已被:浏览 6052次 下载 14322次 |
 码上扫一扫! |
|
|
| 代码注释自动生成方法综述 |
|
陈翔1,2,3, 杨光1, 崔展齐4, 孟国柱2, 王赞5
|
|
1.南通大学 信息科学技术学院, 江苏 南通 226019;2.信息安全国家重点实验室(中国科学院 信息工程研究所), 北京 100093;3.高安全系统的软件开发与验证技术工业和信息化部重点实验室(南京航空航天大学), 江苏 南京 211106;4.北京信息科技大学 计算机学院, 北京 100101;5.天津大学 智能与计算学部, 天津 300350
|
|
| 摘要: |
| 在软件的开发和维护过程中,与代码对应的注释经常存在缺失、不足或者与代码实际内容不匹配等问题,但手工编写代码注释对开发人员来说费时费力,且注释质量难以保证,因此亟需研究人员提出有效的代码注释自动生成方法.代码注释自动生成问题是当前程序理解研究领域的一个研究热点,对该问题进行了系统综述.主要将已有的自动生成方法细分为3类:基于模板的方法、基于信息检索的方法和基于深度学习的方法.依次对每一类方法的已有研究成果进行了系统的梳理、总结和点评.随后分析了已有的实证研究中经常使用的语料库和主要的注释质量评估方法,以利于针对该问题的后续研究可以进行合理的实验设计.最后进行总结,并对未来值得关注的研究方向进行了展望. |
| 关键词: 程序理解 代码注释自动生成 模板 信息检索 深度学习 机器翻译 |
| DOI:10.13328/j.cnki.jos.006258 |
| 分类号: |
| 基金项目:国家重点研发计划(2019AAA0104301);国家自然科学基金(61702041,61872263,61902395,61202006);信息安全国家重点实验室开放课题(2020-MS-07);南京航空航天大学高安全系统的软件开发与验证技术工业和信息化部重点实验室开放课题(NJ2020022);江苏省前沿引领技术基础研究专项(BK20202001);天津市智能制造专项资金(20193155) |
|
| Survey of State-of-the-art Automatic Code Comment Generation |
|
CHEN Xiang1,2,3, YANG Guang1, CUI Zhan-Qi4, MENG Guo-Zhu2, WANG Zan5
|
|
1.School of Information Science and Technology, Nantong University, Nantong 226019, China;2.State Key Laboratory of Information Security(Institute of Information Engineering, Chinese Academy of Sciences), Beijing 100093, China;3.Key Laboratory of Safety-Critical Software of Ministry of Industry and Information Technology(Nanjing University of Aeronautics and Astronautics), Nanjing 211106, China;4.School of Computer, Beijing Information Science and Technology University, Beijing 100101, China;5.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, therefore, 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. This study conducts 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. Related studies are analyzed and summarizedfor each category. Then, the corpora and comment quality evaluation methods that are often used in previous studiesare analyzed, which can facilitate the experimental study for future studies. Finally, the potential research directions in the future aresummarized and discussed. |
| Key words: program comprehension code comment generation template information retrieval deep learning machine translation |