Learning from examples to improve code completion systems

The suggestions made by current IDE's code completion features are based exclusively on static type system of the programming language. As a result, often proposals are made which are irrelevant for a particular working context. Also, these suggestions are ordered alphabetically rather than by their relevance in a particular context. In this paper, we present intelligent code completion systems that learn from existing code repositories. We have implemented three such systems, each using the information contained in repositories in a different way. We perform a large-scale quantitative evaluation of these systems, integrate the best performing one into Eclipse, and evaluate the latter also by a user study. Our experiments give evidence that intelligent code completion systems which learn from examples significantly outperform mainstream code completion systems in terms of the relevance of their suggestions and thus have the potential to enhance developers' productivity.

[1]  R. Holmes,et al.  Using structural context to recommend source code examples , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[2]  Mik Kersten,et al.  How are Java software developers using the Elipse IDE? , 2006, IEEE Software.

[3]  Kajal T. Claypool,et al.  XSnippet: mining For sample code , 2006, OOPSLA '06.

[4]  Christopher M. Bishop,et al.  Pattern Recognition and Machine Learning (Information Science and Statistics) , 2006 .

[5]  Ron Kohavi,et al.  A Study of Cross-Validation and Bootstrap for Accuracy Estimation and Model Selection , 1995, IJCAI.

[6]  Donna K. Harman,et al.  Overview of the Third Text REtrieval Conference (TREC-3) , 1995, TREC.

[7]  Gregory Butler,et al.  A framework for framework documentation , 2000, CSUR.

[8]  Michael Eichberg,et al.  The SEXTANT Software Exploration Tool , 2006, IEEE Transactions on Software Engineering.

[9]  Mira Mezini,et al.  On evaluating recommender systems for API usages , 2008, RSSE '08.

[10]  Gerhard Fischer,et al.  Integrating active information delivery and reuse repository systems , 2000, SIGSOFT '00/FSE-8.

[11]  Peter E. Hart,et al.  Nearest neighbor pattern classification , 1967, IEEE Trans. Inf. Theory.

[12]  Radford M. Neal Pattern Recognition and Machine Learning , 2007, Technometrics.

[13]  Ralph E. Johnson,et al.  Patterns Generate Architectures , 1994, ECOOP.

[14]  Tomasz Imielinski,et al.  Mining association rules between sets of items in large databases , 1993, SIGMOD Conference.

[15]  Mik Kersten,et al.  Using task context to improve programmer productivity , 2006, SIGSOFT '06/FSE-14.

[16]  William B. Frakes,et al.  Software reuse through information retrieval , 1986, SIGF.

[17]  Mira Mezini,et al.  FrUiT: IDE support for framework understanding , 2006, ETX.

[18]  Amir Michail,et al.  Data mining library reuse patterns using generalized association rules , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[19]  Tao Xie,et al.  Parseweb: a programmer assistant for reusing open source code on the web , 2007, ASE.

[20]  Ralph E. Johnson,et al.  Documenting frameworks using patterns , 1992, OOPSLA '92.

[21]  Rosco Hill,et al.  Automatic method completion , 2004, Proceedings. 19th International Conference on Automated Software Engineering, 2004..

[22]  Romain Robbes,et al.  How Program History Can Improve Code Completion , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[23]  Subrata Mitra,et al.  Design by framework completion , 1996, Automated Software Engineering.

[24]  Rastislav Bodík,et al.  Jungloid mining: helping to navigate the API jungle , 2005, PLDI '05.

[25]  Steve Northover,et al.  SWT : the standard widget toolkit , 2004 .

[26]  C MurphyGail,et al.  How Are Java Software Developers Using the Eclipse IDE , 2006 .

[27]  Flaviu Ghitulescu,et al.  Google Code Search , 2006 .