An Android API Recommendation Approach Based on API Dependency Paths Learning

ABSTRACT Software development plays a crucial role in the modern mobile application domain, reflecting its significance through widespread application. With the continuous evolution and vast number of Android APIs, developers need to invest considerable effort in learning how to use various suitable APIs for their projects. Unfortunately, most current recommendation methods, when representing programs as source code sequences, abstract syntax trees, or API call paths, often focus only on contextual relationships while ignoring valuable information in API dependency relationships. Moreover, existing sequence models (such as RNN, LSTM) often fail to make correct predictions for low‐frequency API methods with high‐frequency suffixes, as these models tend to capture the most common API sequence patterns, causing these relatively low‐frequency but potentially more applicable APIs to be overlooked. To address this issue, we propose an API dependency path‐based Android API recommendation method, DPAPIRec. This approach combines program analysis with deep learning, which first extracts API methods and their data flow and control flow dependency relationships from a large number of Android APPs through program analysis techniques and then obtains a comprehensive API dependency paths repository. Finally, a deep learning method is applied to learn and represent these dependency relationships to improve API recommendation accuracy. Furthermore, to better extract dependency relationships, we employ an improved attention‐based LSTM model with a novel loss architecture, enhancing the global dependency relationships between APIs through a weighted mixed loss, thereby strengthening the weight of initial nodes and alleviating the problem of low‐frequency APIs with high‐frequency suffixes. Our experiments on the AndroZoo dataset demonstrate that DPAPIRec significantly outperforms baseline methods in Android API recommendation tasks, showing substantial improvements in both Accuracy and Mean Reciprocal Rank (MRR).

Authors

Institutions

Publication Details

Journal
Concurrency and Computation Practice and Experience
Published
2025-06-18
DOI
https://doi.org/10.1002/cpe.70159
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

An Android API Recommendation Approach Based on API Dependency Paths Learning

Yong Xiao, Deng Jia, Yiming Yin, Yi Liu et al.
Concurrency and Computation Practice and Experience
Web Data Mining and Analysis
article

An Android API Recommendation Approach Based on API Dependency Paths Learning

Yong Xiao, Deng Jia, Yiming Yin, Yi Liu, Jianxun Liu
article en

Abstract

ABSTRACT Software development plays a crucial role in the modern mobile application domain, reflecting its significance through widespread application. With the continuous evolution and vast number of Android APIs, developers need to invest considerable effort in learning how to use various suitable APIs for their projects. Unfortunately, most current recommendation methods, when representing programs as source code sequences, abstract syntax trees, or API call paths, often focus only on contextual relationships while ignoring valuable information in API dependency relationships. Moreover, existing sequence models (such as RNN, LSTM) often fail to make correct predictions for low‐frequency API methods with high‐frequency suffixes, as these models tend to capture the most common API sequence patterns, causing these relatively low‐frequency but potentially more applicable APIs to be overlooked. To address this issue, we propose an API dependency path‐based Android API recommendation method, DPAPIRec. This approach combines program analysis with deep learning, which first extracts API methods and their data flow and control flow dependency relationships from a large number of Android APPs through program analysis techniques and then obtains a comprehensive API dependency paths repository. Finally, a deep learning method is applied to learn and represent these dependency relationships to improve API recommendation accuracy. Furthermore, to better extract dependency relationships, we employ an improved attention‐based LSTM model with a novel loss architecture, enhancing the global dependency relationships between APIs through a weighted mixed loss, thereby strengthening the weight of initial nodes and alleviating the problem of low‐frequency APIs with high‐frequency suffixes. Our experiments on the AndroZoo dataset demonstrate that DPAPIRec significantly outperforms baseline methods in Android API recommendation tasks, showing substantial improvements in both Accuracy and Mean Reciprocal Rank (MRR).

Concurrency and Computation Practice and ExperienceVol. 37(15-17)
Hunan University of Science and Technology (CN)
National Natural Science Foundation of China, National Key Research and Development Program of China
Openalex Percentile: Top 78%
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.