Revisiting, Benchmarking and Exploring API Recommendation: How Far Are We?

12/23/2021
by   Yun Peng, et al.
0

Application Programming Interfaces (APIs), which encapsulate the implementation of specific functions as interfaces, greatly improve the efficiency of modern software development. As numbers of APIs spring up nowadays, developers can hardly be familiar with all the APIs, and usually need to search for appropriate APIs for usage. So lots of efforts have been devoted to improving the API recommendation task. However, it has been increasingly difficult to gauge the performance of new models due to the lack of a uniform definition of the task and a standardized benchmark. For example, some studies regard the task as a code completion problem; while others recommend relative APIs given natural language queries. To reduce the challenges and better facilitate future research, in this paper, we revisit the API recommendation task and aim at benchmarking the approaches. Specifically, the paper groups the approaches into two categories according to the task definition, i.e., query-based API recommendation and code-based API recommendation. We study 11 recently-proposed approaches along with 4 widely-used IDEs. One benchmark named as APIBench is then built for the two respective categories of approaches. Based on APIBench, we distill some actionable insights and challenges for API recommendation. We also achieve some implications and directions for improving the performance of recommending APIs, including data source selection, appropriate query reformulation, low resource setting, and cross-domain adaptation.

READ FULL TEXT

page 11

page 12

page 14

page 15

page 17

page 18

research
09/13/2023

APICom: Automatic API Completion via Prompt Learning and Adversarial Training-based Data Augmentation

Based on developer needs and usage scenarios, API (Application Programmi...
research
03/22/2023

PICASO: Enhancing API Recommendations with Relevant Stack Overflow Posts

While having options could be liberating, too many options could lead to...
research
08/03/2022

API Usage Recommendation via Multi-View Heterogeneous Graph Representation Learning

Developers often need to decide which APIs to use for the functions bein...
research
02/04/2020

Boosting API Recommendation with Implicit Feedback

Developers often need to use appropriate APIs to program efficiently, bu...
research
03/15/2021

Embedding Code Contexts for Cryptographic API Suggestion:New Methodologies and Comparisons

Despite recent research efforts, the vision of automatic code generation...
research
06/26/2022

1+1>2: Programming Know-What and Know-How Knowledge Fusion, Semantic Enrichment and Coherent Application

Software programming requires both API reference (know-what) knowledge a...
research
05/27/2016

Deep API Learning

Developers often wonder how to implement a certain functionality (e.g., ...

Please sign up or login with your details

Forgot password? Click here to reset