Hunter: next-generation code reuse for Java

In many common scenarios, programmers need to implement functionality that is already provided by some third party library. This paper presents a tool called Hunter that facilitates code reuse by finding relevant methods in large code bases and automatically synthesizing any necessary wrapper code. Since Hunter internally uses advanced program synthesis technology, it can automatically reuse existing methods even when code adaptation is necessary. We have implemented Hunter as an Eclipse plug-in and evaluate it by (a) comparing it against S6, a state-of-the-art code reuse tool, and (b) performing a user study. Our evaluation shows that Hunter compares favorably with S6 and increases programmer productivity.

[1]  Collin McMillan,et al.  Portfolio: finding relevant functions and their usage , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[2]  Shailendra Kadre,et al.  Introduction to Statistical Analysis , 2015 .

[3]  André van der Hoek,et al.  CodeExchange: Supporting Reformulation of Internet-Scale Code Queries in Context (T) , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[4]  Sushil Krishna Bajracharya,et al.  Sourcerer: An infrastructure for large-scale collection and analysis of open-source code , 2014, Sci. Comput. Program..

[5]  Koushik Sen,et al.  CodeHint: dynamic and interactive synthesis of code snippets , 2014, ICSE.

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

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

[8]  Koushik Sen,et al.  SNIFF: A Search Engine for Java Using Free-Form Queries , 2009, FASE.

[9]  Jeannette M. Wing,et al.  Specification matching of software components , 1995, TSEM.

[10]  Colin Atkinson,et al.  Code Conjurer: Pulling Reusable Software out of Thin Air , 2008, IEEE Software.

[11]  Kathryn T. Stolee,et al.  Solving the Search for Source Code , 2014, ACM Trans. Softw. Eng. Methodol..

[12]  Ralf,et al.  Swing to SWT and back: Patterns for API migration by wrapping , 2010, ICSM 2010.

[13]  Gerhard Fischer,et al.  Supporting reuse by delivering task-relevant and personalized information , 2002, ICSE '02.

[14]  Isil Dillig,et al.  Type-Directed Code Reuse using Integer Linear Programming , 2016, ArXiv.

[15]  Ruzica Piskac,et al.  Complete completion using types and weights , 2013, PLDI.

[16]  Mark Harman,et al.  Automated software transplantation , 2015, ISSTA.

[17]  Jun Li,et al.  SWIN: Towards Type-Safe Java Program Adaptation between APIs , 2015, PEPM.

[18]  Sushil Krishna Bajracharya,et al.  Applying test-driven code search to the reuse of auxiliary functionality , 2009, SAC '09.

[19]  David Notkin,et al.  Using twinning to adapt programs to alternative APIs , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[20]  Ralf Lämmel,et al.  Swing to SWT and back: Patterns for API migration by wrapping , 2010, 2010 IEEE International Conference on Software Maintenance.

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

[22]  Steven P. Reiss,et al.  Semantics-based code search , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[23]  Jeannette M. Wing,et al.  Signature matching: a tool for using software libraries , 1995, TSEM.