Computer Science ›› 2020, Vol. 47 ›› Issue (11A): 544-548.doi: 10.11896/jsjkx.191200010

• Software Engineering • Previous Articles     Next Articles

API Recommendation Model with Fusion Domain Knowledge

LI Hao, ZHONG Sheng, KANG Yan, LI Tao, ZHANG Ya-chuan, BU Rong-jing   

  1. College of Software,Yunnan University,Kunming 650504,China
  • Online:2020-11-15 Published:2020-11-17
  • About author:LI Hao,born in 1970,Ph.D,professor.His main research intere-sts include hybrid cloud computing,computer vision and robotics.
    KANG Yan,born in 1972,Ph.D,associate professor.Her main research interests include software engineering,system optimization,big data processing and mining.
  • Supported by:
    This work was supported by the National Natural Science Foundation of China (61762092,61762089),Yunnan Provincial Key Laboratory of Software Engineering Open Fund Project (2017SE204) and Development of MatCloud-based High-throughput Computational Module for MGI Platform(2019CLJY06).

Abstract: Application Programming Interfaces (API) play an important role in modern software development,and developers often need to search for the appropriate API for their programming tasks.However,with the development of the information industry,API reference documents have become larger and larger,and traditional search methods have also caused inconvenience to engineers' queries because of redundant and erroneous information on the Internet.At the same time,due to the vocabulary and knowledge gap between the natural language description of programming tasks and the description in the API documentation,it is difficult to find a suitable API.Based on these issues,this paper proposes an algorithm called ARDSQ (Recommendation base on Documentation and Solved Question) which is an API recommendation algorithm that integrates domain knowledge.ARDSQ can retrieve the closest API in the knowledge base based on the natural language description given by the engineer.Experiments show that,compared with two advanced API recommendation algorithms(BIKER,DeepAPILearning),ARDSQ has greater advantages in the key evaluation index (Hit-n,MRR,MAP ) of the recommendation system.

Key words: API, Code recommendation, Deep learning, Information retrieval, Program analysis

CLC Number: 

  • TP311.5
[1] CAY S.Horstmann and Gary Cornell.Core java Volume 1Foundations[M].Prentice-Hall,2018:12.
[2] YU H,SONG W,MINE T.Apibook:an effective approach for finding APIs[C]//Asia Pacific Symposium on Internetware.2016:45-53.
[3] CHEN Z Z,JIANG R H,PAN M X,et al.Empirical Study of Code Query Technique Based on Constraint Solving on StackOverflow[J].Computer Science,2019,46(11):137-144.
[4] TIAN Y,THUNG F,SHARMA A,et al.Apibot:Question answering bot for api documentation[C]//32nd IEEE/ACM International Conference on Automated Software Engineering.2017:153-158.
[5] RAHMAN,MOHAMMAD M,ROY,et al.ACK:Automatic APIrecommendation using crowdsourced knowledge[C]//2016 IEEE 23rd International Conference on Software Analysis,Evolution,and Reengineering (SANER).2016:14-18.
[6] ZHANG J,JIANG H,REN Z,et al.Recommending apis for api related questions in stack overflow[J].IEEE Access,2018,6:6205-6219.
[7] HUANG Q,XIA X,XING Z C,et al.API Method Recommendation without Worrying about the Task-API Knowledge Gap[C]//Proceedings of the 2018 33rd ACM/IEEE International Conference on Automated Software Engineering (ASE'18).2018:3-7.
[8] GU X,ZHANG H,ZHANG D,et al.Deep API learning[C] //FSE 2016:Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering.2016:631-642.
[9] WALLACH,HANNA M.Topic modeling:beyond bag-of-words[C]//Proceedings of the 23rd International Conference on Machine Learning.ACM,2006.
[10] RAMOS J.Using tf-idf to determine word relevance in document queries[C]//Proceedings of the First Instructional Conference on Machine Learning.2003:133-142.
[11] GU X D,ZHANG H Y,KIM S H.Deep Code Search[C]//40th International Conference on Software Engineering(ICSE'18).2018:12.
[12] CAMPBELL B A,TREUDE C.NLP2Code:Code snippet con-tent assist via natural language tasks[J].arXiv:1701.05648,2017.
[13] MIKOLOV T,KARAFIÁT M,BURGETL L,et al.Recurrent neural network based language model[C]//Eleventh Annual Conference of the International Speech Communication Association.2010.
[14] DEVLIN J,CHANG M W,LEE K,et al.Bert:Pre-training of deep bidirectional transformers for language understanding[J].arXiv:1810.04805,2018.
[15] MATTHEW E P,NEUMANN M,IYYER M,et al.Deep contextualized word representations[J].arXiv:1802.05365,2018.
[1] RAO Zhi-shuang, JIA Zhen, ZHANG Fan, LI Tian-rui. Key-Value Relational Memory Networks for Question Answering over Knowledge Graph [J]. Computer Science, 2022, 49(9): 202-207.
[2] TANG Ling-tao, WANG Di, ZHANG Lu-fei, LIU Sheng-yun. Federated Learning Scheme Based on Secure Multi-party Computation and Differential Privacy [J]. Computer Science, 2022, 49(9): 297-305.
[3] XU Yong-xin, ZHAO Jun-feng, WANG Ya-sha, XIE Bing, YANG Kai. Temporal Knowledge Graph Representation Learning [J]. Computer Science, 2022, 49(9): 162-171.
[4] WANG Jian, PENG Yu-qi, ZHAO Yu-fei, YANG Jian. Survey of Social Network Public Opinion Information Extraction Based on Deep Learning [J]. Computer Science, 2022, 49(8): 279-293.
[5] HAO Zhi-rong, CHEN Long, HUANG Jia-cheng. Class Discriminative Universal Adversarial Attack for Text Classification [J]. Computer Science, 2022, 49(8): 323-329.
[6] JIANG Meng-han, LI Shao-mei, ZHENG Hong-hao, ZHANG Jian-peng. Rumor Detection Model Based on Improved Position Embedding [J]. Computer Science, 2022, 49(8): 330-335.
[7] SUN Qi, JI Gen-lin, ZHANG Jie. Non-local Attention Based Generative Adversarial Network for Video Abnormal Event Detection [J]. Computer Science, 2022, 49(8): 172-177.
[8] HU Yan-yu, ZHAO Long, DONG Xiang-jun. Two-stage Deep Feature Selection Extraction Algorithm for Cancer Classification [J]. Computer Science, 2022, 49(7): 73-78.
[9] CHENG Cheng, JIANG Ai-lian. Real-time Semantic Segmentation Method Based on Multi-path Feature Extraction [J]. Computer Science, 2022, 49(7): 120-126.
[10] HOU Yu-tao, ABULIZI Abudukelimu, ABUDUKELIMU Halidanmu. Advances in Chinese Pre-training Models [J]. Computer Science, 2022, 49(7): 148-163.
[11] ZHOU Hui, SHI Hao-chen, TU Yao-feng, HUANG Sheng-jun. Robust Deep Neural Network Learning Based on Active Sampling [J]. Computer Science, 2022, 49(7): 164-169.
[12] SU Dan-ning, CAO Gui-tao, WANG Yan-nan, WANG Hong, REN He. Survey of Deep Learning for Radar Emitter Identification Based on Small Sample [J]. Computer Science, 2022, 49(7): 226-235.
[13] WANG Jun-feng, LIU Fan, YANG Sai, LYU Tan-yue, CHEN Zhi-yu, XU Feng. Dam Crack Detection Based on Multi-source Transfer Learning [J]. Computer Science, 2022, 49(6A): 319-324.
[14] CHU Yu-chun, GONG Hang, Wang Xue-fang, LIU Pei-shun. Study on Knowledge Distillation of Target Detection Algorithm Based on YOLOv4 [J]. Computer Science, 2022, 49(6A): 337-344.
[15] LIU Wei-ye, LU Hui-min, LI Yu-peng, MA Ning. Survey on Finger Vein Recognition Research [J]. Computer Science, 2022, 49(6A): 1-11.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!