Year: 2025
Type: article
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).
DOI: 10.1002/cpe.70159
Authors: Jia Deng, Jianxun Liu, Yi Liu, Yiming Yin, Yong Xiao
Institution: Hunan University of Science and Technology
Language: English
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: bronze
OpenAlex ID: W4411768745
