RACK: Code Search in the IDE Using Crowdsourced Knowledge

Traditional code search engines often do not perform well with natural language queries since they mostly apply keyword matching. These engines thus require carefully designed queries containing information about programming APIs for code search. Unfortunately, existing studies suggest that preparing an effective query for code search is both challenging and time consuming for the developers. In this paper, we propose a novel code search tool–RACK–that returns relevant source code for a given code search query written in natural language text. The tool first translates the query into a list of relevant API classes by mining keyword-API associations from the crowdsourced knowledge of Stack Overflow, and then applies the reformulated query to GitHub code search API for collecting relevant results. Once a query related to a programming task is submitted, the tool automatically mines relevant code snippets from thousands of open-source projects, and displays them as a ranked list within the context of the developer's programming environment–the IDE. Tool page: http://www.usask.ca/~masud.rahman/rack.

[1]  David Lo,et al.  Automatic recommendation of API methods from feature requests , 2013, 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[2]  Chanchal Kumar Roy,et al.  RACK: Automatic API Recommendation Using Crowdsourced Knowledge , 2016, 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[3]  Andrian Marcus,et al.  On the Effect of the Query in IR-based Concept Location , 2011, 2011 IEEE 19th International Conference on Program Comprehension.

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

[5]  Susan T. Dumais,et al.  The vocabulary problem in human-system communication , 1987, CACM.

[6]  Philip J. Guo,et al.  Two studies of opportunistic programming: interleaving web foraging, learning, and writing code , 2009, CHI.

[7]  Hong Cheng,et al.  Searching connected API subgraph via text phrases , 2012, SIGSOFT FSE.

[8]  Thomas Fritz,et al.  Automatic search term identification for change tasks , 2014, ICSE Companion.

[9]  Denys Poshyvanyk,et al.  Feature location via information retrieval based filtering of a single scenario execution trace , 2007, ASE.

[10]  Cristina V. Lopes,et al.  How Well Do Search Engines Support Code Retrieval on the Web? , 2011, TSEM.