Code Comment Quality Analysis and Improvement Recommendation: an Automated Approach.
Xiaobing Sun,Qiang Geng,David Lo,Yucong Duan,Xiangyue Liu,Bin Li
DOI: https://doi.org/10.1142/s0218194016500339
IF: 1.007
2016-01-01
International Journal of Software Engineering and Knowledge Engineering
Abstract:Program comprehension is one of the first and most frequently performed activities during software maintenance and evolution. In a program, there are not only source code, but also comments. Comments in a program is one of the main sources of information for program comprehension. If a program has good comments, it will be easier for developers to understand it. Unfortunately, for many software systems, due to developers’ poor coding style or hectic work schedule, it is often the case that a number of methods and classes are not written with good comments. This can make it difficult for developers to understand the methods and classes, when they are performing future software maintenance tasks. To deal with this problem, in this paper we propose an approach which assesses the quality of a code comment and generates suggestions to improve comment quality. A user study is conducted to assess the effectiveness of our approach and the results show that our comment quality assessments are similar to the assessments made by our user study participants, the suggestions provided by our approach are useful to improve comment quality, and our approach can improve the accuracy of the previous comment quality analysis approaches.