A Survey of Automatic Generation of Source Code Comments: Algorithms and Techniques
As an integral part of source code files, code comments help improve program readability and comprehension. However, developers sometimes do not comment their program code adequately due to the incurred extra efforts, lack of relevant knowledge, unawareness of the importance of code commenting or so...
Main Authors: | , , , |
---|---|
Format: | Article |
Language: | English |
Published: |
IEEE
2019-01-01
|
Series: | IEEE Access |
Subjects: | |
Online Access: | https://ieeexplore.ieee.org/document/8778714/ |
_version_ | 1818678464453017600 |
---|---|
author | Xiaotao Song Hailong Sun Xu Wang Jiafei Yan |
author_facet | Xiaotao Song Hailong Sun Xu Wang Jiafei Yan |
author_sort | Xiaotao Song |
collection | DOAJ |
description | As an integral part of source code files, code comments help improve program readability and comprehension. However, developers sometimes do not comment their program code adequately due to the incurred extra efforts, lack of relevant knowledge, unawareness of the importance of code commenting or some other factors. As a result, code comments can be inadequate, absent or even mismatched with source code, which affects the understanding, reusing and the maintenance of software. To solve these problems of code comments, researchers have been concerned with generating code comments automatically. In this work, we aim at conducting a survey of automatic code commenting researches. First, we generally analyze the challenges and research framework of automatic generation of program comments. Second, we present the classification of representative algorithms, the design principles, strengths and weaknesses of each category of algorithms. Meanwhile, we also provide an overview of the quality assessment of the generated comments. Finally, we summarize some future directions for advancing the techniques of automatic generation of code comments and the quality assessment of comments. |
first_indexed | 2024-12-17T09:15:41Z |
format | Article |
id | doaj.art-f189068dff4a40538b246357e3cf2a76 |
institution | Directory Open Access Journal |
issn | 2169-3536 |
language | English |
last_indexed | 2024-12-17T09:15:41Z |
publishDate | 2019-01-01 |
publisher | IEEE |
record_format | Article |
series | IEEE Access |
spelling | doaj.art-f189068dff4a40538b246357e3cf2a762022-12-21T21:55:00ZengIEEEIEEE Access2169-35362019-01-01711141111142810.1109/ACCESS.2019.29315798778714A Survey of Automatic Generation of Source Code Comments: Algorithms and TechniquesXiaotao Song0Hailong Sun1https://orcid.org/0000-0001-7654-5574Xu Wang2Jiafei Yan3School of Software, Taiyuan University of Technology, Taiyuan, ChinaSKLSDE Laboratory, School of Computer Science and Engineering, Beihang University, Beijing, ChinaSKLSDE Laboratory, School of Computer Science and Engineering, Beihang University, Beijing, ChinaSKLSDE Laboratory, School of Computer Science and Engineering, Beihang University, Beijing, ChinaAs an integral part of source code files, code comments help improve program readability and comprehension. However, developers sometimes do not comment their program code adequately due to the incurred extra efforts, lack of relevant knowledge, unawareness of the importance of code commenting or some other factors. As a result, code comments can be inadequate, absent or even mismatched with source code, which affects the understanding, reusing and the maintenance of software. To solve these problems of code comments, researchers have been concerned with generating code comments automatically. In this work, we aim at conducting a survey of automatic code commenting researches. First, we generally analyze the challenges and research framework of automatic generation of program comments. Second, we present the classification of representative algorithms, the design principles, strengths and weaknesses of each category of algorithms. Meanwhile, we also provide an overview of the quality assessment of the generated comments. Finally, we summarize some future directions for advancing the techniques of automatic generation of code comments and the quality assessment of comments.https://ieeexplore.ieee.org/document/8778714/Code commentdeep learninginformation retrievalmachine learningprogram annotation |
spellingShingle | Xiaotao Song Hailong Sun Xu Wang Jiafei Yan A Survey of Automatic Generation of Source Code Comments: Algorithms and Techniques IEEE Access Code comment deep learning information retrieval machine learning program annotation |
title | A Survey of Automatic Generation of Source Code Comments: Algorithms and Techniques |
title_full | A Survey of Automatic Generation of Source Code Comments: Algorithms and Techniques |
title_fullStr | A Survey of Automatic Generation of Source Code Comments: Algorithms and Techniques |
title_full_unstemmed | A Survey of Automatic Generation of Source Code Comments: Algorithms and Techniques |
title_short | A Survey of Automatic Generation of Source Code Comments: Algorithms and Techniques |
title_sort | survey of automatic generation of source code comments algorithms and techniques |
topic | Code comment deep learning information retrieval machine learning program annotation |
url | https://ieeexplore.ieee.org/document/8778714/ |
work_keys_str_mv | AT xiaotaosong asurveyofautomaticgenerationofsourcecodecommentsalgorithmsandtechniques AT hailongsun asurveyofautomaticgenerationofsourcecodecommentsalgorithmsandtechniques AT xuwang asurveyofautomaticgenerationofsourcecodecommentsalgorithmsandtechniques AT jiafeiyan asurveyofautomaticgenerationofsourcecodecommentsalgorithmsandtechniques AT xiaotaosong surveyofautomaticgenerationofsourcecodecommentsalgorithmsandtechniques AT hailongsun surveyofautomaticgenerationofsourcecodecommentsalgorithmsandtechniques AT xuwang surveyofautomaticgenerationofsourcecodecommentsalgorithmsandtechniques AT jiafeiyan surveyofautomaticgenerationofsourcecodecommentsalgorithmsandtechniques |