paperbot · PL 论文追踪

全部论文 待读 收藏

P2 REPFINDER: Finding Replacements for Missing APIs in Library Update

REPFINDER:在库更新中为缺失的 API 寻找替代 API
ASE 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE)2021匹配度 2/10 · 该论文属于程序分析与软件维护领域,研究库更新中缺失 API 的替代查找,但不涉及静态分析在机器学习/Agentic 程序中的应用、LLM 与静态分析/形式化验证的结合、浮点程序分析或贝叶斯程序分析,与研究画像的核心方向仅有较远的领域邻近性。引用 16 inbox
Kaifeng Huang, Bihuan Chen, Linghao Pan, Shuai Wu, Xin Peng
crossref: 2026-09-12

AI 速览

一句话:提出基于启发式的方法 REPFINDER,通过分层搜索弃用消息、自身库和外部库,自动为库更新中缺失的 API 寻找替代 API。

库演化过程中,API 常因弃用、移除或重构而缺失,客户端开发者在更新库版本时必须手动寻找替代 API,这是一项困难且昂贵的维护任务。现有自动化方法通常仅将库本身作为唯一来源,严重限制了准确性。本文首先开展实证研究,量化缺失 API 的普遍性,总结替代 API 的知识来源、代码变更及映射基数。基于这些发现,提出基于启发式的方法 REPFINDER,通过组合一组启发式规则,分层搜索弃用消息、自身库和外部库三个来源以寻找替代 API。评估表明,REPFINDER 能高效、有效地找到替代 API,并显著优于当前最优方法。

问题
库更新时 API 缺失导致客户端代码无法编译,开发者需手动寻找替代 API;现有方法仅以库本身为来源,准确率受限。
方法
通过实证研究总结缺失 API 及其替代品的特征,提出 REPFINDER,利用启发式规则按层次搜索弃用消息、自身库和外部库三个来源。
评估
在真实库更新场景中评估 REPFINDER 的有效性和效率,并与当前最优方法对比,显示其显著优越性。
原文摘要(Abstract)

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.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot6486,
  title = {REPFINDER: Finding Replacements for Missing APIs in Library Update},
  author = {Kaifeng Huang and Bihuan Chen and Linghao Pan and Shuai Wu and Xin Peng},
  booktitle = {ASE},
  year = {2021},
  doi = {10.1109/ase51524.2021.9678905}
}