Java API Sequence Recommendation Method Based on Attention Mechanism
CSTR:
Author:
Affiliation:

Clc Number:

Fund Project:

  • Article
  • |
  • Figures
  • |
  • Metrics
  • |
  • Reference
  • |
  • Related
  • |
  • Cited by
  • |
  • Materials
  • |
  • Comments
    Abstract:

    It is a difficult process for developers to use API and API sequences (APIs) correctly in software development. When developers are faced with unfamiliar function libraries or code repositories like Github that contains a large number of APIs, they need assistance of some recommendation tools or system. To the best of our knowledge, DeepApi can better understand the semantics of user’s query, but the RNN-based model has some problems: (1) it does not consider the weight of each word, (2) the input sequence is compressed into a fixed length vector, which loses much useful information, (3) long sentences lead to loss of key information. Therefore, this study uses a model based on attention mechanism to distinguish the importance of each word and solve the problem of long-distance dependence caused by long query input. We crawled 649 Java open source projects from Github and processed them to get a training set of 114 364 pairs of annotation-API sequences. The experimental results show that the proposed method can increase BLUE index by more than about 20% compared with DeepApi method on Top1, Top5, and Top10.

    Reference
    Related
    Cited by
Get Citation

张睿峰,王鹏程,吴鸣,徐云.基于注意力机制的Java API序列推荐方法.计算机系统应用,2019,28(9):209-214

Copy
Share
Article Metrics
  • Abstract:
  • PDF:
  • HTML:
  • Cited by:
History
  • Received:February 26,2019
  • Revised:March 14,2019
  • Adopted:
  • Online: September 09,2019
  • Published: September 15,2019
Article QR Code
You are the firstVisitors
Copyright: Institute of Software, Chinese Academy of Sciences Beijing ICP No. 05046678-3
Address:4# South Fourth Street, Zhongguancun,Haidian, Beijing,Postal Code:100190
Phone:010-62661041 Fax: Email:csa (a) iscas.ac.cn
Technical Support:Beijing Qinyun Technology Development Co., Ltd.

Beijing Public Network Security No. 11040202500063