A Survey on Query-based API Recommendation
Moshi Wei, Nima Shiri Harzevili, Alvine Boaye Belle, Junjie Wang, Lin Shi, Jinqiu Yang, Song Wang, Ming Zhen, Jiang
TL;DR
This survey addresses the challenge of recommending APIs for specific tasks by systematically reviewing query-based API recommendation research from 2012 to 2023. It synthesizes data sources, data processing techniques, modeling approaches (from statistics to deep learning and language models), and evaluation practices, while highlighting persistent gaps such as lack of benchmarks, dataset quality concerns, and language variety. The authors analyze 34 papers across major venues like ICSE, FSE, and ASE, and provide a replication package to support reproducibility. They advocate for unified benchmarks, continuous learning for pre-trained code models, and exploration of new paradigms such as prompt learning to advance API method recommendation.
Abstract
Application Programming Interfaces (APIs) are designed to help developers build software more effectively. Recommending the right APIs for specific tasks has gained increasing attention among researchers and developers in recent years. To comprehensively understand this research domain, we have surveyed to analyze API recommendation studies published in the last 10 years. Our study begins with an overview of the structure of API recommendation tools. Subsequently, we systematically analyze prior research and pose four key research questions. For RQ1, we examine the volume of published papers and the venues in which these papers appear within the API recommendation field. In RQ2, we categorize and summarize the prevalent data sources and collection methods employed in API recommendation research. In RQ3, we explore the types of data and common data representations utilized by API recommendation approaches. We also investigate the typical data extraction procedures and collection approaches employed by the existing approaches. RQ4 delves into the modeling techniques employed by API recommendation approaches, encompassing both statistical and deep learning models. Additionally, we compile an overview of the prevalent ranking strategies and evaluation metrics used for assessing API recommendation tools. Drawing from our survey findings, we identify current challenges in API recommendation research that warrant further exploration, along with potential avenues for future research.
