Graph Embedding Based API Graph Search and Recommendation

被引:0
作者
Chun-Yang Ling
Yan-Zhen Zou
Ze-Qi Lin
Bing Xie
机构
[1] Key Laboratory of High Confidence Software Technologies,School of Electronics Engineering and Computer Science
[2] Ministry of Education,undefined
[3] Peking University,undefined
来源
Journal of Computer Science and Technology | 2019年 / 34卷
关键词
application programming interface (API) recommendation; API graph; graph embedding; software reuse;
D O I
暂无
中图分类号
学科分类号
摘要
Searching application programming interfaces (APIs) is very important for developers to reuse software projects. Existing natural language based API search mainly faces the following challenges. 1) More accurate results are required as software projects evolve to be more heterogeneous and complex. 2) The semantic relationships between APIs (e.g., inheritances between classes, and invocations between methods) need to be illustrated so that developers can better understand their usage scenarios. To deal with these issues, we propose GeAPI, a novel graph embedding based approach for API graph search and recommendation in this paper. First, we build a software project’s API graph automatically from its source code and represent each API using graph embedding methods. Second, we search the API graph with a question in natural language, and return the corresponding subgraph that is composed of relevant code elements and their associated relationships, as the best answer of the question. In experiments, we select three well-known open source projects, JodaTime, Apache Lucene and POI, as examples to perform API search tasks. The experimental results show that our approach GeAPI improves F1-score by 10% compared with the existing shortest path based API search approach, while reduces the average response time about 60 times.
引用
收藏
页码:993 / 1006
页数:13
相关论文
共 32 条
[1]  
Sirres R(2018)Augmenting and structuring user queries to support efficient free-form code search Empirical Softwarengineering 23 2622-2654
[2]  
Bissyandé TF(2009)Sourcerer: Mining and searching internet-scale software repositories Data Mining and Knowledge Discovery 18 300-336
[3]  
Kim D(2018)Graph embedding techniques, applications, and performance: A survey Knowledge-Based Systems 151 78-94
[4]  
Lo D(2018)A survey on network embedding IEEE Transactions on Knowledge and Data Engineering 31 833-852
[5]  
Klein J(2019)ROSF: Leveraging information retrieval and supervised learning for recommending code snippets IEEE Transactions on Services Computing 12 34-46
[6]  
Kim K(2008)Asking and answering questions during a programming change task IEEE Transactions on Software Engineering 34 434-451
[7]  
Traon LY(2014)Feature location method based on call chain analysis Computer Science 41 36-39
[8]  
Linstead E(undefined)undefined undefined undefined undefined-undefined
[9]  
Bajracharya S(undefined)undefined undefined undefined undefined-undefined
[10]  
Ngo T(undefined)undefined undefined undefined undefined-undefined