DocumentCode
3694195
Title
Developing a model of loop actions by mining loop characteristics from a large code corpus
Author
Xiaoran Wang;Lori Pollock;K. Vijay-Shanker
Author_Institution
Computer and Information Sciences, University of Delaware, Newark, 19716 USA
fYear
2015
Firstpage
51
Lastpage
60
Abstract
Some high level algorithmic steps require more than one statement to implement, but are not large enough to be a method on their own. Specifically, many algorithmic steps (e.g., count, compare pairs of elements, find the maximum) are implemented as loop structures, which lack the higher level abstraction of the action being performed, and can negatively affect both human readers and automatic tools. Additionally, in a study of 14,317 projects, we found that less than 20% of loops are documented to help readers. In this paper, we present a novel automatic approach to identify the high level action implemented by a given loop. We leverage the available, large source of high-quality open source projects to mine loop characteristics and develop an action identification model. We use the model and feature vectors extracted from loop code to automatically identify the high level actions implemented by loops. We have evaluated the accuracy of the loop action identification and coverage of the model over 7159 open source programs. The results show great promise for this approach to automatically insert internal comments and provide additional higher level naming for loop actions to be used by tools such as code search.
Keywords
"Feature extraction","Java","Terminology","Pragmatics","Syntactics","Generators","Computational modeling"
Publisher
ieee
Conference_Titel
Software Maintenance and Evolution (ICSME), 2015 IEEE International Conference on
Type
conf
DOI
10.1109/ICSM.2015.7332451
Filename
7332451
Link To Document