Generating Concept based API Element Comparison Using a Knowledge Graph
Yang Liu, Mingwei Liu, Xin Peng, Christoph Treude, Zhenchang Xing, Xiaoxin Zhang
Abstract
Developers are concerned with the comparison of similar APIs in terms of their commonalities and (often subtle) differences. Our empirical study of Stack Overflow questions and API documentation confirms that API comparison questions are common and can often be answered by knowledge contained in API reference documentation. Our study also identifies eight types of API statements that are useful for API comparison. Based on these findings, we propose a knowledge graph based approach APIComp that automatically extracts API knowledge from API reference documentation to support the comparison of a pair of API classes or methods from different aspects. Our approach includes an offline phase for constructing an API knowledge graph, and an online phase for generating an API comparison result for a given pair of API elements. Our evaluation shows that the quality of different kinds of extracted knowledge in the API knowledge graph is generally high. Furthermore, the comparison results generated by APIComp are significantly better than those generated by a baseline approach based on heuristic rules and text similarity, and our generated API comparison results are useful for helping developers in API selection tasks.
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 3a6c766d-ea0e-4a7b-8ea6-e5559a6315daCited by top-tier papers5
- Let's Chat to Find the APIs: Connecting Human, LLM and Knowledge Graph through AI ChainQing Huang, Zhenyu Wan, Zhenchang Xing, Changjing Wang et al.ASE 2023 · 15 citations
- Recommending Analogical APIs via Knowledge Graph EmbeddingMingwei Liu, Yanjun Yang, Yiling Lou, Xin Peng et al.FSE 2023 · 8 citations
- Improving API Knowledge Discovery with ML: A Case Study of Comparable API MethodsDaye Nam, Brad A. Myers, Bogdan Vasilescu, Vincent J. HellendoornICSE 2023 · 6 citations
- Identifying Multi-parameter Constraint Errors in Python Data Science Library API DocumentationXiufeng Xu, Fuman Xie, Chenguang Zhu, Guangdong Bai et al.ISSTA 2025
- Knowledge-Graph-Driven Data Synthesis for Low-Resource Software Development: A HarmonyOS Case StudyMingwei Liu, Zheng Pei, Yanlin Wang, Zihao Wang et al.FSE 2026
Related papers
- How to formulate specific how-to questions in software development?Mingwei Liu, Xin Peng, Andrian Marcus, Christoph Treude et al.FSE 2022 · 11 citations
- API-Misuse Detection Driven by Fine-Grained API-Constraint Knowledge GraphXiaoxue Ren, Xinyuan Ye, Zhenchang Xing, Xin Xia et al.ASE 2020 · 62 citations
- API-Knowledge Aware Search-Based Software Testing: Where, What, and HowXiaoxue Ren, Xinyuan Ye, Yun Lin, Zhenchang Xing et al.FSE 2023 · 4 citations
- API method recommendation via explicit matching of functionality verb phrasesWenkai Xie, Xin Peng, Mingwei Liu, Christoph Treude et al.FSE 2020 · 33 citations
- Supporting Web-Based API Searches in the IDE Using SignaturesNick C. Bradley, Thomas Fritz, Reid HolmesICSE 2024
