Lune

ASE2021顶会

REPFINDER: Finding Replacements for Missing APIs in Library Update

Kaifeng Huang, Bihuan Chen, Linghao Pan, Shuai Wu, Xin Peng

2021年份
14被引次数
2顶会引用

摘要

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 也一样。你提问,回答直接引用原文。

可以从这些问题问起

智能体调用

Luneget_paper_fulltext

在 Lune 里问

免费开始,无需绑卡

引用它的顶会 Paper2

问问它们各自怎么用它

它引用的顶会 Paper8

相关 Paper

黄昏的海面,两侧是细线勾勒的悬崖