Putting APIs in the Right Order with Gated Graph Neural Networks

API plays an important role in modern software development. Automatic API recommendation has been studied for years to facilitate developers' learning process of APIs. Previous approaches mainly use statistical models and collab-orative filtering (CF) techniques to mine API usage patterns for recommendation. Despite the encouraging results, they still struggle to obtain the accurate embeddings of the client methods and called APIs. Prior studies generally formulate the process of API call interactions as undirected graph structure, neglecting the order in which the API invocations appear, thus fail to seize the rich relationship and complex transitions of API calls. To transcend the limitations, we propose a novel method, namely PARO, to predict the next API invocations using gated graph neural networks (GGNNs). In our proposed method, the API call sequences are modeled as directed graphs, thus the GNN models prone to capture features such as the partial order and complex transitions between API invocations. Besides, we also learn the text attribute representations of API invocations and client methods through word embedding, which further corroborates the semantic and lexical similarities between them. We conduct experimental evaluations on a large number of Java projects extracted from Github and Maven Central. Results show that our approach outperforms the state-of-the-art by a large margin, in terms of Hit@N and MRR@N.

Authors

Institutions

Publication Details

Published
2024-12-03
DOI
https://doi.org/10.1109/apsec65559.2024.00042
Primary Topic
Software System Performance and Reliability
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Putting APIs in the Right Order with Gated Graph Neural Networks

Ping Yu, Ling Wan, Yuan Yao
Software System Performance and Reliability
article

Putting APIs in the Right Order with Gated Graph Neural Networks

Ping Yu, Ling Wan, Yuan Yao
article en

Abstract

API plays an important role in modern software development. Automatic API recommendation has been studied for years to facilitate developers' learning process of APIs. Previous approaches mainly use statistical models and collab-orative filtering (CF) techniques to mine API usage patterns for recommendation. Despite the encouraging results, they still struggle to obtain the accurate embeddings of the client methods and called APIs. Prior studies generally formulate the process of API call interactions as undirected graph structure, neglecting the order in which the API invocations appear, thus fail to seize the rich relationship and complex transitions of API calls. To transcend the limitations, we propose a novel method, namely PARO, to predict the next API invocations using gated graph neural networks (GGNNs). In our proposed method, the API call sequences are modeled as directed graphs, thus the GNN models prone to capture features such as the partial order and complex transitions between API invocations. Besides, we also learn the text attribute representations of API invocations and client methods through word embedding, which further corroborates the semantic and lexical similarities between them. We conduct experimental evaluations on a large number of Java projects extracted from Github and Maven Central. Results show that our approach outperforms the state-of-the-art by a large margin, in terms of Hit@N and MRR@N.

Nanjing University (CN)
Openalex Percentile: Top 65%
Software System Performance and Reliability
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Putting APIs in the Right Order with Gated Graph Neural Networks — Ping Yu, Ling Wan, et al. · (2024) | TGRS Research Map | TGRS