Learning API Suggestion Via Single LSTM Network with Deterministic Negative Sampling.

Jinpei Yan,Yong Qi,Qifan Rao,Hui He
DOI: https://doi.org/10.18293/seke2018-193
2018-01-01
Abstract:Modern programming relies on a large number of fundamental APIs, but programmers often take great effort to remember names and the usage of APIs when coding, and repeatedly search the related API documents or Q&A websites.To improve the programming efficiency, we present a Java API suggestion approach called APIHelper which learns API sequence pattern via the Long Short-Term Memory (LSTM) network, then provides API suggestion based on the program context.Previous related works use statistical methods based on Hidden Markov Model (HMM), which require establishing one specific model for each class.We propose Determininstic Negative Sampling (DNS) to make API suggestion for a large number of Java classes by one single end-to-end LSTM.To verify this approach, we make API suggestion for 50,000 Java classes and evaluate it with top-K accuracy.Results show that APIHelper outperforms other prior works both on accuracy and computation efficiency.
What problem does this paper attempt to address?