Recommending Analogical APIs via Knowledge Graph Embedding
Mingwei Liu, Yanjun Yang, Yiling Lou, Xin Peng, Zhong Zhou, Xueying Du, Tianyong Yang
Abstract
Library migration, which replaces the current library with a different one to retain the same software behavior, is common in software evolution. An essential part of this is finding an analogous API for the desired functionality. However, due to the multitude of libraries/APIs, manually finding such an API is time-consuming and error-prone. Researchers created automated analogical API recommendation techniques, notably documentation-based methods. Despite potential, these methods have limitations, e.g., incomplete semantic understanding in documentation and scalability issues.
In this study, we present KGE4AR, a novel documentation-based approach using knowledge graph (KG) embedding for recommending analogical APIs during library migration. KGE4AR introduces a unified API KG to comprehensively represent documentation knowledge, capturing high-level semantics. It further embeds this unified API KG into vectors for efficient, scalable similarity calculation. We assess KGE4AR with 35,773 Java libraries in two scenarios, with and without target libraries. KGE4AR notably outperforms state-of-the-art techniques (e.g., 47.1%-143.0% and 11.7%-80.6% MRR improvements), showcasing scalability with growing library counts.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 3a3cca7d-d61b-492f-bf39-0a64e01dfe20Cited by top-tier papers2
- RLCoder: Reinforcement Learning for Repository-Level Code CompletionYanlin Wang, Yanli Wang, Daya Guo, Jiachi Chen et al.ICSE 2025 · 13 citations
- Compiler-directed Migrating API Callsite of Client CodeHao Zhong, Na MengICSE 2024 · 5 citations
Builds on6
- API-Misuse Detection Driven by Fine-Grained API-Constraint Knowledge GraphXiaoxue Ren, Xinyuan Ye, Zhenchang Xing, Xin Xia et al.ASE 2020 · 62 citations
- A large-scale empirical study on Java library migrations: prevalence, trends, and rationalesHao He, Runzhi He, Haiqiao Gu, Minghui ZhouFSE 2021 · 47 citations
- API method recommendation via explicit matching of functionality verb phrasesWenkai Xie, Xin Peng, Mingwei Liu, Christoph Treude et al.FSE 2020 · 33 citations
- Generating Concept based API Element Comparison Using a Knowledge GraphYang Liu, Mingwei Liu, Xin Peng, Christoph Treude et al.ASE 2020 · 28 citations
- Reducing Bug Triaging Confusion by Learning from Mistakes with a Bug Tossing Knowledge GraphYanqi Su, Zhenchang Xing, Xin Peng, Xin Xia et al.ASE 2021 · 19 citations
Related papers
- REPFINDER: Finding Replacements for Missing APIs in Library UpdateKaifeng Huang, Bihuan Chen, Linghao Pan, Shuai Wu et al.ASE 2021 · 14 citations
- M3: Semantic API MigrationsBruce Collie, Philip Ginsbach, Jackson Woodruff, Ajitha Rajan et al.ASE 2020 · 14 citations
- SOAR: A Synthesis Approach for Data Science API RefactoringAnsong Ni, Daniel Ramos, Aidan Z. H. Yang, Inês Lynce et al.ICSE 2021 · 27 citations
- A Benchmarking Study of Embedding-based Entity Alignment for Knowledge GraphsZequn Sun, Qingheng Zhang, Wei Hu, Chengming Wang et al.VLDB 2020 · 297 citations
- Characterizing Python Library MigrationsMohayeminul Islam, Ajay Kumar Jha, Ildar Akhmetov, Sarah NadiFSE 2024 · 3 citations
