IComment: Bugs or bad comments?. Tan, L., Yuan, D., Krishna, G., & Zhou, Y. In of Operating Systems Review (ACM), pages 145–158, 2007. tex.author_keywords: Comment analysis; Natural language processing for software engineering; Programming rules and static analysis tex.document_type: Conference Paper tex.source: Scopus
IComment: Bugs or bad comments? [link]Paper  doi  abstract   bibtex   
Commenting source code has long been a common practice in software development. Compared to source code, comments are more direct, descriptive and easy-to-understand. Comments and sourcecode provide relatively redundant and independent information regarding a program's semantic behavior. As software evolves, they can easily grow out-of-sync, indicating two problems: (1) bugs -the source code does not follow the assumptions and requirements specified by correct program comments; (2) bad comments - comments that are inconsistent with correct code, which can confuse and mislead programmers to introduce bugs in subsequent versions. Unfortunately, as most comments are written in natural language, no solution has been proposed to automatically analyze commentsand detect inconsistencies between comments and source code. This paper takes the first step in automatically analyzing commentswritten in natural language to extract implicit program rulesand use these rules to automatically detect inconsistencies between comments and source code, indicating either bugs or bad comments. Our solution, iComment, combines Natural Language Processing(NLP), Machine Learning, Statistics and Program Analysis techniques to achieve these goals. We evaluate iComment on four large code bases: Linux, Mozilla, Wine and Apache. Our experimental results show that iComment automatically extracts 1832 rules from comments with 90.8-100
@inproceedings{tan_icomment_2007,
	series = {Operating {Systems} {Review} ({ACM})},
	title = {{IComment}: {Bugs} or bad comments?},
	url = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-41149128704&doi=10.1145%2f1294261.1294276&partnerID=40&md5=4b9fd7b3215d2f1f578a301a7b198622},
	doi = {10.1145/1294261.1294276},
	abstract = {Commenting source code has long been a common practice in software development. Compared to source code, comments are more direct, descriptive and easy-to-understand. Comments and sourcecode provide relatively redundant and independent information regarding a program's semantic behavior. As software evolves, they can easily grow out-of-sync, indicating two problems: (1) bugs -the source code does not follow the assumptions and requirements specified by correct program comments; (2) bad comments - comments that are inconsistent with correct code, which can confuse and mislead programmers to introduce bugs in subsequent versions. Unfortunately, as most comments are written in natural language, no solution has been proposed to automatically analyze commentsand detect inconsistencies between comments and source code. This paper takes the first step in automatically analyzing commentswritten in natural language to extract implicit program rulesand use these rules to automatically detect inconsistencies between comments and source code, indicating either bugs or bad comments. Our solution, iComment, combines Natural Language Processing(NLP), Machine Learning, Statistics and Program Analysis techniques to achieve these goals. We evaluate iComment on four large code bases: Linux, Mozilla, Wine and Apache. Our experimental results show that iComment automatically extracts 1832 rules from comments with 90.8-100},
	author = {Tan, L. and Yuan, D. and Krishna, G. and Zhou, Y.},
	year = {2007},
	note = {tex.author\_keywords: Comment analysis; Natural language processing for software engineering; Programming rules and static analysis
tex.document\_type: Conference Paper
tex.source: Scopus},
	keywords = {\#nosource},
	pages = {145--158},
}

Downloads: 0