Recommending Analogical APIs via Knowledge Graph Embedding

Dec 7, 2023

Speakers

About

Library migration, which re-implements the same software behavior by using a different library instead of using the current one, has been widely observed in software evolution. One essential part of library migration is to find an analogical API that could provide the same functionality as current ones. However, given the large number of libraries/APIs, manually finding an analogical API could be very time-consuming and error-prone. To date, researchers have proposed various automated analogical API recommendation techniques, among which documentation-based techniques have been intensively studied in the literature. However, existing documentation-based analogical API recommendation techniques have limited effectiveness by missing semantic similarity in the documentation and also suffer from the scalability issue. In this work, we propose KGE4AM, a novel documentation-based approach that leverages knowledge graph (KG) embedding to recommend analogical APIs during library migration. In particular, KGE4AM proposes a novel unified API KG to comprehensively and structurally represent three types of knowledge in documentation, which could better capture the high-level semantics. In addition, KGE4AM then proposes to embed the unified API KG into vectors, enabling more effective and scalable similarity calculation. We implement KGE4AM as a fully automated technique with constructing a unified API KG of 35,773 Java libraries. We further evaluate KGE4AM in two API recommendation scenarios (i.e., with given target libraries and without given target libraries), and our results show that KGE4AM substantially outperforms state-of-the-art documentation-based techniques in both evaluation scenarios in terms of all metrics (e.g., 47.1%-143.0% and 11.7%-80.6% MRR improvements in each scenario). In addition, we further investigate the scalability of KGE4AM and find that KGE4AM can scale well with the increasing number of libraries.

Organizer

Categories

Store presentation

Should this presentation be stored for 1000 years?

How do we store presentations

Total of 0 viewers voted for saving the presentation to eternal vault which is 0.0%

Sharing

Recommended Videos

Presentations on similar topic, category or speaker

Interested in talks like this? Follow ESEC-FSE