Abstract
In order to improve the accuracy of API recommendations, this paper proposes a novel API recommendation approach of APIGAN fully leveraging structural and textual information based on Generative Adversarial Networks, in which a Long Short-Term Memory (LSTM) is used as a generator while a Convolutional Neural Network (CNN) is used as a discriminator. The structural and semantic information of a source code extracted from an abstract syntax tree is used to construct a program dependence graph (PDG) which is also the input of the generator and the discriminator. By evaluating the difference in outputs of them, LSTM is evolved gradually till an optimized program dependence network is obtained to recommend top-k APIs. The results of the experiments show that APIGAN outperforms state-of-the-art research such as APIREC, GraLan, and n-gram in the aspect of top-k accuracy.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.