Research on API Sequence Recommendation Based on Code Property Graph

The utilization of APIs not only enhances software reusability but also improves development efficiency and reduces costs. However, with the continuous increase in the number of APIs, developers face difficulties in quickly recalling and comprehending the appropriate API call sequences and their constraints. Thus, there is a need for an efficient API sequence recommendation tool. The key task in achieving efficient API sequence recommendation is to understand the semantic structure of the code context. However, most researchers currently lack an analysis of program structure in API sequence recommendation studies, leading to a decrease in the accuracy of these tools. To achieve a deeper understanding of the semantic context of code, this paper employs semantic syntax information and incorporates control structure information to improve the accuracy of API sequence recommendations. Specifically, this study first employs early fusion techniques based on the abstract syntax tree to incorporate control flow edges and data dependency edges—two types of heterogeneous edges—to construct a new representation of code known as a code property graph. This graph is then used to analyze the semantic syntax information and control structures of the code. Subsequently, a relational graph attention network model is employed to analyze the code property graph. Experimental results indicate that the accuracy of API sequence recommendations significantly improves with the incorporation of code control structures.

Authors

Institutions

Publication Details

Published
2024-11-01
DOI
https://doi.org/10.1109/iccbd-ai65562.2024.00058
Primary Topic
Web Data Mining and Analysis
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Research on API Sequence Recommendation Based on Code Property Graph

Xun-Jiang Luo
Web Data Mining and Analysis
article

Research on API Sequence Recommendation Based on Code Property Graph

Xun-Jiang Luo
article en

Abstract

The utilization of APIs not only enhances software reusability but also improves development efficiency and reduces costs. However, with the continuous increase in the number of APIs, developers face difficulties in quickly recalling and comprehending the appropriate API call sequences and their constraints. Thus, there is a need for an efficient API sequence recommendation tool. The key task in achieving efficient API sequence recommendation is to understand the semantic structure of the code context. However, most researchers currently lack an analysis of program structure in API sequence recommendation studies, leading to a decrease in the accuracy of these tools. To achieve a deeper understanding of the semantic context of code, this paper employs semantic syntax information and incorporates control structure information to improve the accuracy of API sequence recommendations. Specifically, this study first employs early fusion techniques based on the abstract syntax tree to incorporate control flow edges and data dependency edges—two types of heterogeneous edges—to construct a new representation of code known as a code property graph. This graph is then used to analyze the semantic syntax information and control structures of the code. Subsequently, a relational graph attention network model is employed to analyze the code property graph. Experimental results indicate that the accuracy of API sequence recommendations significantly improves with the incorporation of code control structures.

Ningbo University (CN)
Ministry of Education, Natural Science Foundation of Zhejiang Province
Openalex Percentile: Top 54%
Web Data Mining and Analysis
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.