CSCC: Simple, Efficient, Context Sensitive Code Completion

Code Completion helps developers learn APIs and frees them from remembering every detail. In this paper, we describe a novel technique called CSCC (Context Sensitive Code Completion) for improving the performance of API method call completion. CSCC is context sensitive in that it uses new sources of information as the context of a target method call. CSCC indexes method calls in code examples by their contexts. To recommend completion proposals, CSCC ranks candidate methods by the similarities between their contexts and the context of the target call. Evaluation using a set of subject systems and five popular state of-the-art techniques suggests that CSCC performs better than existing type or example-based code completion systems. We also investigate how the different contextual elements of the target call benefit CSCC.

[1]  Daqing Hou,et al.  BCC: Enhancing code completion for better API usability , 2009, 2009 IEEE International Conference on Software Maintenance.

[2]  Gurmeet Singh Manku,et al.  Detecting near-duplicates for web crawling , 2007, WWW '07.

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

[4]  Moses Charikar,et al.  Similarity estimation techniques from rounding algorithms , 2002, STOC '02.

[5]  Chanchal Kumar Roy,et al.  On the Effectiveness of Simhash for Detecting Near-Miss Clones in Large Scale Software Systems , 2011, 2011 18th Working Conference on Reverse Engineering.

[6]  Christopher D. Manning,et al.  Introduction to Information Retrieval , 2010, J. Assoc. Inf. Sci. Technol..

[7]  J. NORMAN LOCKYER The Eclipse , 1878, Nature.

[8]  Daqing Hou,et al.  Towards a better code completion system by API grouping, filtering, and popularity-based ranking , 2010, RSSE '10.

[9]  Hiroaki Kuwabara,et al.  A study on repetitiveness of code completion operations , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

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

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

[12]  Brad A. Myers,et al.  Calcite: Completing Code Completion for Constructors Using Crowds , 2010, 2010 IEEE Symposium on Visual Languages and Human-Centric Computing.

[13]  Anh Tuan Nguyen,et al.  GraPacc: A graph-based pattern-oriented, context-sensitive code completion tool , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[14]  Anh Tuan Nguyen,et al.  A statistical semantic language model for source code , 2013, ESEC/FSE 2013.

[15]  Yi Zhang,et al.  Automatic parameter recommendation for practical API usage , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[16]  Rob Miller,et al.  Keyword programming in Java , 2008, Automated Software Engineering.

[17]  Premkumar T. Devanbu,et al.  On the naturalness of software , 2016, Commun. ACM.

[18]  Hinrich Schütze,et al.  Introduction to information retrieval , 2008 .

[19]  Rob Miller,et al.  Code Completion from Abbreviated Input , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[20]  Hung Viet Nguyen,et al.  Graph-based pattern-oriented, context-sensitive source code completion , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[21]  Daqing Hou,et al.  An evaluation of the strategies of sorting, filtering, and grouping API methods for Code Completion , 2011, 2011 27th IEEE International Conference on Software Maintenance (ICSM).

[22]  Mira Mezini,et al.  Learning from examples to improve code completion systems , 2009, ESEC/SIGSOFT FSE.

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

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