Automatically Detecting and Describing High Level Actions within Methods
Author : Sridhara, Giriprasad; Pollock, Lori; Vijay-Shanker, K
Booktitle : International Conference on Software Engineering
Date : May 2011
Publisher : ACM
Keyword(s) : Algorithms, Documentation
Document Type : In Conference Proceedings
One approach to easing program comprehension is to reduce the amount of code that a developer has to read. Describing the high level abstract algorithmic actions associated with code fragments using succinct natural language phrases enables a newcomer to focus on fewer and more abstract concepts when trying to understand a given method. Unfortunately, such descriptions are typically missing because it is tedious to create them manually. We present an automatic technique for identifying code fragments that implement high level abstractions of actions and expressing them as a natural language description. Our studies of 1000 Java programs indicate that our heuristics for identifying code fragments implementing high level actions are widely applicable. Judgments of our generated descriptions by 15 experienced Java programmers strongly suggest that indeed they view the fragments that we identify as representing high level actions and our synthesized descriptions accurately express the abstraction.