DocumentCode
2443708
Title
Graph-based pattern-oriented, context-sensitive source code completion
Author
Nguyen, Anh Tuan ; Nguyen, Tung Thanh ; Nguyen, Hoan Anh ; Tamrawi, Ahmed ; Nguyen, Hung Viet ; Al-Kofahi, Jafar ; Nguyen, Tien N.
Author_Institution
Electr. & Comput. Eng. Dept., Iowa State Univ., Ames, IA, USA
fYear
2012
fDate
2-9 June 2012
Firstpage
69
Lastpage
79
Abstract
Code completion helps improve developers´ programming productivity. However, the current support for code completion is limited to context-free code templates or a single method call of the variable on focus. Using software libraries for development, developers often repeat API usages for certain tasks. Thus, a code completion tool could make use of API usage patterns. In this paper, we introduce GraPacc, a graph-based, pattern-oriented, context-sensitive code completion approach that is based on a database of such patterns. GraPacc represents and manages the API usage patterns of multiple variables, methods, and control structures via graph-based models. It extracts the context-sensitive features from the code under editing, e.g. the API elements on focus and their relations to other code elements. Those features are used to search and rank the patterns that are most fitted with the current code. When a pattern is selected, the current code will be completed via a novel graph-based code completion algorithm. Empirical evaluation on several real-world systems shows that GraPacc has a high level of accuracy in code completion.
Keywords
application program interfaces; feature extraction; graph theory; software libraries; source coding; API elements; API usage patterns; GraPacc; code elements; context-free code templates; context-sensitive feature extraction; developer programming productivity improvement; graph-based pattern-oriented context-sensitive source code completion; single method call; software libraries; Context; Databases; Feature extraction; Graphical user interfaces; Layout; Libraries; Pattern matching; API usage pattern; pattern-based code completion;
fLanguage
English
Publisher
ieee
Conference_Titel
Software Engineering (ICSE), 2012 34th International Conference on
Conference_Location
Zurich
ISSN
0270-5257
Print_ISBN
978-1-4673-1066-6
Electronic_ISBN
0270-5257
Type
conf
DOI
10.1109/ICSE.2012.6227205
Filename
6227205
Link To Document