Exploring API method parameter recommendations

A number of techniques have been developed that support method call completion. However, there has been little research on the problem of method parameter completion. In this paper, we first present a study that helps us to understand how developers complete method parameters. Based on our observations, we developed a recommendation technique, called Parc, that collects parameter usage context using a source code localness property that suggests that developers tend to collocate related code fragments. Parc uses previous code examples together with contextual and static type analysis to recommend method parameters. Evaluating our technique against the only available state-of-the-art tool using a number of subject systems and different Java libraries shows that our approach has potential. We also explore the parameter recommendation support provided by the Eclipse Java Development Tools (JDT). Finally, we discuss limitations of our proposed technique and outline future research directions.

[1]  Martin P. Robillard,et al.  A field study of API learning obstacles , 2011, Empirical Software Engineering.

[2]  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).

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

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

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

[6]  Premkumar T. Devanbu,et al.  On the localness of software , 2014, SIGSOFT FSE.

[7]  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).

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

[9]  Thomas R. Gross,et al.  Static detection of brittle parameter typing , 2012, ISSTA 2012.

[10]  Thomas R. Gross,et al.  Detecting anomalies in the order of equally-typed method arguments , 2011, ISSTA '11.

[11]  Chanchal Kumar Roy,et al.  CSCC: Simple, Efficient, Context Sensitive Code Completion , 2014, 2014 IEEE International Conference on Software Maintenance and Evolution.

[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]  David Lo,et al.  Automatic recommendation of API methods from feature requests , 2013, 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE).

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

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

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

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

[18]  Martin P. Robillard,et al.  What Makes APIs Hard to Learn? Answers from Developers , 2009, IEEE Software.

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

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

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

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