arrow
Return

API Usage Recommendation Via Multi-View Heterogeneous Graph Representation Learning

delete2023-05-01
delete10
delete
OA
AI
Y
Yujia Chen
高
高翠云 (Cuiyun Gao) *
X
Xiaoxue Ren
Y
Yun Peng
X
Xin Xia
M
Michael R. Lyu
DOI:10.1109/TSE.2023.3252259delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Developers often need to decide which APIs to use for the functions being implemented. With the ever-growing number of APIs and libraries, it becomes increasingly difficult for developers to find appropriate APIs, indicating the necessity of automatic API usage recommendation. Previous studies adopt statistical models or collaborative filtering methods to mine the implicit API usage patterns for recommendation. However, they rely on the occurrence frequencies of APIs for mining usage patterns, thus prone to fail for the low-frequency APIs. Besides, prior studies generally regard the API call interaction graph as homogeneous graph, ignoring the rich information (e.g., edge types) in the structure graph. In this work, we propose a novel method named MEGA for improving the recommendation accuracy especially for the low-frequency APIs. Specifically, besides call interaction graph, MEGA considers another two new heterogeneous graphs: global API co-occurrence graph enriched with the API frequency information and hierarchical structure graph enriched with the project component information. With the three multi-view heterogeneous graphs, MEGA can capture the API usage patterns more accurately. Experiments on three Java benchmark datasets demonstrate that MEGA significantly outperforms the baseline models by at least 19% with respect to the Success Rate@1 metric. Especially, for the low-frequency APIs, MEGA also increases the baselines by at least 55% regarding the Success Rate@1 score.
Keywords:
Codes
Java
Source coding
Benchmark testing
Software
Representation learning
Programming
API recommendation
graph representation learning
multi-view heterogeneous graphs

Journal

IEEE Transactions on Software Engineering cover
IEEE Transactions on Software Engineering
IF:
5.6
Papers:
2.9K
Citations:
1.1W

Organization

H
harbin institute of technology
Scholars:
8.0W
Papers: 6.6W
Citations: 66
C
Chinese University of Hong Kong
Scholars:
3.4W
Papers: 3.2W
Citations: 5.6W
Cited Papers

Cited Papers

Firefighting Acutely Increases Airway Responsiveness
err1989-07-01
err0
PREAI
errCharles B. Sherman; Scott Barnhart; Mary F. Miller; Mark R. Segal; Moira Aitken; Robert Schoene; William Daniell; Linda Rosenstock
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
Dual Hole Transport Layers Heterojunction and Band Alignment Engineered Mo:BiVO4 Photoanodes for Efficient Water Splitting (Small 37/2024)
err2024-09-13
err0
PREAI
errGuilin Wang; Tongxin Tang; Kai‐Hang Ye; Xin Ding; Junwei Chen; WenHao Zou; Yushen Xiao; JieYu Li; Long Zhao; Chaojie Chen; Sitong Ge; Lei Li; Xiujuan Wei; Chao Chen; Yang Cao; Zhan Lin; Shanqing Zhang
errShare
errSave
Genitourinary injuries in the newborn
err2001-01-01
err0
PREAI
errHaroon I. Patel; Kevin P. Moriarty; Paul A. Brisson; Neil R. Feins
errShare
errSave
researcher View more