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