2021 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) | 2021

Graph Neural Network Based Collaborative Filtering for API Usage Recommendation

 
 
 

Abstract


Developers often face the need to find out how to use different APIs suitable for their purposes. API usage recommendation has been shown very useful to facilitate the process of software reuse and daily development. Previous approaches mainly use statistical models and collaborative filtering(CF) techniques to improve the accuracy of recommendation. However, they fail to exploit the high-order connectivity of the interaction of API calls and the structural information of software projects. In this paper, we formulate this problem in terms of the graph-based collaborative filtering recommendation. We propose a novel approach for API usage recommendation, named GAPI, which uses graph neural networks (GNNs) to capture the high-order collaborative signals from API calls. Besides, GAPI integrates project structures into the graph and incorporates text attributes in the network, which are helpful to represent the program semantics. We evaluate our approach on large-scale open-source repositories collected from Github and Maven Central. The experimental results demonstrate that our approach is effective and outperforms the state-of-the-art approaches in terms of success rate and accuracy.

Volume None
Pages 36-47
DOI 10.1109/SANER50967.2021.00013
Language English
Journal 2021 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)

Full Text