跳到主要导航 跳到搜索 跳到主要内容

LSTM-Based with Deterministic Negative Sampling for API Suggestion

  • Jinpei Yan
  • , Yong Qi
  • , Qifan Rao
  • , Hui He
  • , Saiyu Qi
  • Xi'an Jiaotong University
  • Xidian University

科研成果: 期刊稿件文章同行评审

7 引用 (Scopus)

摘要

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 (e.g. Stack Overflow). To improve the programming efficiency, we present a Java API suggestion model called APIHelper which learns API sequence pattern via the Long Short-Term Memory (LSTM) network, then provides API suggestion based on the program context. Comparing with statistical methods (e.g. Hidden Markov Model (HMM), N-gram), which require establishing one specific model for each class, we propose Deterministic 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 accuracy and top-K accuracy. The results show that APIHelper outperforms other research works both on accuracy and computation efficiency.

源语言英语
页(从-至)1029-1051
页数23
期刊International Journal of Software Engineering and Knowledge Engineering
29
7
DOI
出版状态已出版 - 1 7月 2019
已对外发布

学术指纹

探究 'LSTM-Based with Deterministic Negative Sampling for API Suggestion' 的科研主题。它们共同构成独一无二的学术指纹。

引用此