REPFINDER: Finding Replacements for Missing APIs in Library Update
Kaifeng Huang, Bihuan Chen, Linghao Pan, Shuai Wu, Xin Peng
摘要
Libraries are widely adopted in developing software projects. Library APIs are often missing during library evolution as library developers may deprecate, remove or refactor APIs. As a result, client developers have to manually find replacement APIs for missing APIs when updating library versions in their projects, which is a difficult and expensive software maintenance task. One of the key limitations of the existing automated approaches is that they usually consider the library itself as the single source to find replacement APIs, which heavily limits their accuracy. In this paper, we first present an empirical study to understand characteristics about missing APIs and their replacements. Specifically, we quantify the prevalence of missing APIs, and summarize the knowledge sources where the replacements are found, and the code change and mapping cardinality between missing APIs and their replacements. Then, inspired by the insights from our study, we propose a heuristic-based approach, REPFINDER, to automatically find replacements for missing APIs in library update. We design and combine a set of heuristics to hierarchically search three sources (deprecation message, own library, and external library) for finding replacements. Our evaluation has demonstrated that REPFINDER can find replacement APIs effectively and efficiently, and significantly outperform the state-of-the-art approaches. TABLE I. Examples of Missing APIs and Their Replacements in Library Update No. Library Version Update Missing API Replacement API Source 1 org.mapdb mapdb 0.9.3 0.9.13 org.mapdb. DBMaker.writeAheadLogDisable() org.mapdb. DBMaker.transactionDisable() Deprecation Message 2 org.apache.lucene lucene-core 5.1.0 6.0.0 org.apache.lucene.search. PhraseQuery.add(Term) org.apache.lucene.search. PhraseQuery.Builder.add(Term) Own Library 3 org.apache.lucene lucene-core 3.0.3 4.0.0 org.apache.lucene.analysis.standard. StandardAnalyzer.StandardAnalyzer(Version) org.apache.lucene.analysis.standard. StandardAnalyzer.StandardAnalyzer(Version) Vendor Library 4 org.elasticsearch elasticsearch 1.7.1 2.0.0 org.elasticsearch.common.joda.time.format. DateTimeFormatter.print(long) org.joda.time.format. DateTimeFormatter.print(long) Dependency Library 5 org.elasticsearch elasticsearch 0.20.6 1.2.1 org.elasticsearch.common.trove.list.array. TIntArrayList.toArray()
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper2
- LLMs Meet Library Evolution: Evaluating Deprecated API Usage in LLM-Based Code CompletionChong Wang, Kaifeng Huang, Jian Zhang, Yebo Feng 等ICSE 2025 · 被引用 3 次
- Your "Notice" Is Missing: Detecting and Fixing Violations of Modification Terms in Open Source Licenses during ForkingKaifeng Huang, Yingfeng Xia, Bihuan Chen, Siyang He 等ISSTA 2024 · 被引用 3 次
它引用的顶会 Paper8
- Small World with High Risks: A Study of Security Threats in the npm EcosystemMarkus Zimmermann, Cristian-Alexandru Staicu, Cam Tenny, Michael PradelUSENIX Security 2019 · 被引用 281 次
- Keep me Updated: An Empirical Study of Third-Party Library Updatability on AndroidErik Derr, Sven Bugiel, Sascha Fahl, Yasemin Acar 等CCS 2017 · 被引用 196 次
- Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the WebTobias Lauinger, Abdelberi Chaabane, Sajjad Arshad, William Robertson 等NDSS 2017 · 被引用 183 次
- Watchman: monitoring dependency conflicts for Python library ecosystemYing Wang, Ming Wen, Yepang Liu, Yibo Wang 等ICSE 2020 · 被引用 65 次
- Exploring how deprecated Python library APIs are (not) handledJiawei Wang, Li Li, Kui Liu, Haipeng CaiFSE 2020 · 被引用 52 次
相关 Paper
- Compiler-directed Migrating API Callsite of Client CodeHao Zhong, Na MengICSE 2024 · 被引用 5 次
- Interactive, effort-aware library version harmonizationKaifeng Huang, Bihuan Chen, Bowen Shi, Ying Wang 等FSE 2020 · 被引用 32 次
- Understanding Breaking Changes in the WildDhanushka Jayasuriya, Valerio Terragni, Jens Dietrich, Samuel Ou 等ISSTA 2023 · 被引用 19 次
- Break to Adapt: Knowledge-Based Updates of Breaking Dependencies in JavaScriptYifan Xia, Chengwei Liu, Zifan Xie, Lyuye Zhang 等FSE 2026
- Recommending Analogical APIs via Knowledge Graph EmbeddingMingwei Liu, Yanjun Yang, Yiling Lou, Xin Peng 等FSE 2023 · 被引用 8 次
