We use cookies to improve your experience with our site.
Chun-Yang Ling, Yan-Zhen Zou, Ze-Qi Lin, Bing Xie. Graph Embedding Based API Graph Search and Recommendation[J]. Journal of Computer Science and Technology, 2019, 34(5): 993-1006. DOI: 10.1007/s11390-019-1956-2
Citation: Chun-Yang Ling, Yan-Zhen Zou, Ze-Qi Lin, Bing Xie. Graph Embedding Based API Graph Search and Recommendation[J]. Journal of Computer Science and Technology, 2019, 34(5): 993-1006. DOI: 10.1007/s11390-019-1956-2

Graph Embedding Based API Graph Search and Recommendation

  • 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.
  • loading

Catalog

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return