Recommending Analogical APIs via Knowledge Graph Embedding

08/22/2023
by   Mingwei Liu, et al.
0

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. Researchers have developed multiple automated analogical API recommendation techniques. Documentation-based methods have particularly attracted significant interest. Despite their potential, these methods have limitations, such as a lack of comprehensive semantic understanding in documentation and scalability challenges. In this work, we propose KGE4AR, a novel documentation-based approach that leverages knowledge graph (KG) embedding to recommend analogical APIs during library migration. Specifically, KGE4AR proposes a novel unified API KG to comprehensively and structurally represent three types of knowledge in documentation, which can better capture the high-level semantics. Moreover, KGE4AR then proposes to embed the unified API KG into vectors, enabling more effective and scalable similarity calculation. We build KGE4AR' s unified API KG for 35,773 Java libraries and assess it in two API recommendation scenarios: with and without target libraries. Our results show that KGE4AR substantially outperforms state-of-the-art documentation-based techniques in both evaluation scenarios in terms of all metrics (e.g., 47.1 improvements in each scenario). Additionally, we explore KGE4AR' s scalability, confirming its effective scaling with the growing number of libraries.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/03/2022

PyMigBench and PyMigTax: A Benchmark and Taxonomy for Python Library Migration

Developers heavily rely on Application Programming Interfaces (APIs) fro...
research
08/27/2020

M3: Semantic API Migrations

Library migration is a challenging problem, where most existing approach...
research
06/07/2019

Learning to Recommend Third-Party Library Migration Opportunities at the API Level

The manual migration between different third-party libraries represents ...
research
05/06/2021

Migrating Client Code without Change Examples

API developers evolve software libraries to fix bugs, add new features, ...
research
10/12/2021

UCX Programming Interface for Remote Function Injection and Invocation

Network library APIs have historically been developed with the emphasis ...
research
08/28/2023

MELT: Mining Effective Lightweight Transformations from Pull Requests

Software developers often struggle to update APIs, leading to manual, ti...
research
07/03/2022

FasterAI: A Lightweight Library for Creating Sparse Neural Networks

FasterAI is a PyTorch-based library, aiming to facilitate the utilizatio...

Please sign up or login with your details

Forgot password? Click here to reset