Title :
AutoComment: Mining question and answer sites for automatic comment generation
Author :
Wong, Elaine ; Jinqiu Yang ; Lin Tan
Author_Institution :
Univ. of WaterlooWaterloo, Waterloo, ON, Canada
Abstract :
Code comments improve software maintainability. To address the comment scarcity issue, we propose a new automatic comment generation approach, which mines comments from a large programming Question and Answer (Q&A) site. Q&A sites allow programmers to post questions and receive solutions, which contain code segments together with their descriptions, referred to as code-description mappings.We develop AutoComment to extract such mappings, and leverage them to generate description comments automatically for similar code segments matched in open-source projects. We apply AutoComment to analyze Java and Android tagged Q&A posts to extract 132,767 code-description mappings, which help AutoComment to generate 102 comments automatically for 23 Java and Android projects. The user study results show that the majority of the participants consider the generated comments accurate, adequate, concise, and useful in helping them understand the code.
Keywords :
Android (operating system); Java; data mining; public domain software; question answering (information retrieval); software maintenance; Android tagged Q&A post analysis; AutoComment; Java tagged Q&A post analysis; automatic comment generation; code comments; code segments; code-description mapping extraction; comment scarcity issue; natural language processing; open-source projects; program comprehension; programming question-and-answer site mining; software engineering; software maintainability improvement; Androids; Cloning; Databases; Humanoid robots; Java; Natural language processing; Software; automated comment generation; documentation; natural language processing for software engineering; program comprehension;
Conference_Titel :
Automated Software Engineering (ASE), 2013 IEEE/ACM 28th International Conference on
Conference_Location :
Silicon Valley, CA
DOI :
10.1109/ASE.2013.6693113