Towards Automatically Generating Comments for Java Methods

Author : Sridhara, Giriprasad; Hill, Emily; Muppaneni, Divya; Pollock, Lori; Vijay-Shanker, K
Booktitle : 25th IEEE/ACM International Conference on Automated Software Engineering
Date : Sep 2010
Publisher : IEEE/ACM
Description : ACM SIGSOFT Distinguished Paper Award
Keyword(s) : generating comments, program comprehension
Document Type : In Conference Proceedings

Abstract :

Studies have shown that good comments can help programmers quickly understand what a method does, aiding program comprehension and software maintenance. Unfortunately, few software projects adequately comment the code. One way to overcome the lack of human-written summary comments, and guard against obsolete comments, is to automatically generate them. In this paper, we present a novel technique to automatically generate descriptive summary comments for Java methods. Given the signature and body of a method, our automatic comment generator identifies the content for the summary and generates natural language text that summarizes the method’s overall actions. According to programmers who judged our generated comments, the summaries are accurate, do not miss important content, and are reasonably concise.

Paper Link

Presentation Link