Skip to main content
Article
RACK: Automatic API recommendation using crowdsourced knowledge
2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER): March 14-18, Osaka: Proceedings
  • Mohammad M. RAHMAN
  • Chanchal K. ROY
  • David LO, Singapore Management University
Publication Type
Conference Proceeding Article
Version
publishedVersion
Publication Date
3-2016
Abstract

Traditional code search engines often do not perform well with natural language queries since they mostly apply keyword matching. These engines thus need carefully designed queries containing information about programming APIs for code search. Unfortunately, existing studies suggest that preparing an effective code search query is both challenging and time consuming for the developers. In this paper, we propose a novel API recommendation technique -- RACK that recommends a list of relevant APIs for a natural language query for code search by exploiting keyword-API associations from the crowdsourced knowledge of Stack Overflow. We first motivate our technique using an exploratory study with 11 core Java packages and 344K Java posts from Stack Overflow. Experiments using 150 code search queries randomly chosen from three Java tutorial sites show that our technique recommends correct API classes within the top 10 results for about 79% of the queries which is highly promising. Comparison with two variants of the state-of-the-art technique also shows that RACK outperforms both of them not only in Top-K accuracy but also in mean average precision and mean recall by a large margin.

Keywords
  • Stack Overflow,
  • Code search,
  • query reformulation,
  • keyword-API association,
  • crowdsourced knowledge
ISBN
9781509018550
Identifier
10.1109/SANER.2016.80
Publisher
IEEE
City or Country
Piscataway, NJ
Creative Commons License
Creative Commons Attribution-NonCommercial-No Derivative Works 4.0 International
Additional URL
http://doi.org/10.1109/SANER.2016.80
Citation Information
Mohammad M. RAHMAN, Chanchal K. ROY and David LO. "RACK: Automatic API recommendation using crowdsourced knowledge" 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER): March 14-18, Osaka: Proceedings (2016)
Available at: http://works.bepress.com/david_lo/312/