{"title":"An Empirical Investigation into the Effects of Code Comments on Issue Resolution","authors":"Qiwei Song, Xianglong Kong, Lulu Wang, Bixin Li","doi":"10.1109/COMPSAC48688.2020.0-150","DOIUrl":null,"url":null,"abstract":"Comments are beneficial for developers to understand and maintain the code in software development life cycle. Well-commented code can generally help developers to resolve issues efficiently. Due to the complexity of code implementation, code comments may be generated to represent different types of information. And it is hard to keep all the code well-commented in real-world projects. In this case, it is meaningful to investigate how the different types of comments impact the resolution of issues. Then we can maintain the code comments purposefully, and we can also provide some suggestions for the comment generation techniques. To analyze the efforts of different comments on issue resolution, we classify code comments into two categories, i.e., functionality-aspect and non-functionality-aspect comments. In this paper, we analyze the effects of 53k pieces of code comments on the issues from 10 open-source projects within a period of 24 months. The results show that the majority of code comments are used to represent the functionality, e.g., the summary and purpose of code. Nevertheless, the other non-functionality-aspect comments have much stronger correlation with the resolution of software issues. For the resolved patches, the non-functionality-aspect comments are more frequently to be updated or added than the functionality-aspect comments. These findings confirm the important role of non-functionality-aspect comments during issue resolution, although their proportion is far less than that of functionality-aspect comments.","PeriodicalId":430098,"journal":{"name":"2020 IEEE 44th Annual Computers, Software, and Applications Conference (COMPSAC)","volume":"14 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2020 IEEE 44th Annual Computers, Software, and Applications Conference (COMPSAC)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/COMPSAC48688.2020.0-150","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Comments are beneficial for developers to understand and maintain the code in software development life cycle. Well-commented code can generally help developers to resolve issues efficiently. Due to the complexity of code implementation, code comments may be generated to represent different types of information. And it is hard to keep all the code well-commented in real-world projects. In this case, it is meaningful to investigate how the different types of comments impact the resolution of issues. Then we can maintain the code comments purposefully, and we can also provide some suggestions for the comment generation techniques. To analyze the efforts of different comments on issue resolution, we classify code comments into two categories, i.e., functionality-aspect and non-functionality-aspect comments. In this paper, we analyze the effects of 53k pieces of code comments on the issues from 10 open-source projects within a period of 24 months. The results show that the majority of code comments are used to represent the functionality, e.g., the summary and purpose of code. Nevertheless, the other non-functionality-aspect comments have much stronger correlation with the resolution of software issues. For the resolved patches, the non-functionality-aspect comments are more frequently to be updated or added than the functionality-aspect comments. These findings confirm the important role of non-functionality-aspect comments during issue resolution, although their proportion is far less than that of functionality-aspect comments.