论文标题
不要重新发明轮子:用API自动更换自定义实现
Don't Reinvent the Wheel: Towards Automatic Replacement of Custom Implementations with APIs
论文作者
论文摘要
重复使用代码是软件开发中的一种常见实践:它可以帮助开发人员加速实施任务,同时还减少了引入错误的机会,因为假设重复使用的代码已经进行了测试,可能正在生产中。尽管有这些好处,但重复使用的机会并不总是很明显,因此,开发人员可能会错过他们。我们介绍了构建retiwa的初步步骤,这是一个推荐人,能够自动识别给定项目中的自定义实现,这是一个很好的候选者,可以用开源API替换。 retiwa依赖于``知识库'',其中包括自定义实现对API替换的真实示例。在这项工作中,我们介绍了我们定制的采矿策略,可自动且可靠地提取开源项目的API来替换自定义实现。这是建立设想的推荐人的第一步。
Reusing code is a common practice in software development: It helps developers speedup the implementation task while also reducing the chances of introducing bugs, given the assumption that the reused code has been tested, possibly in production. Despite these benefits, opportunities for reuse are not always in plain sight and, thus, developers may miss them. We present our preliminary steps in building RETIWA, a recommender able to automatically identify custom implementations in a given project that are good candidates to be replaced by open source APIs. RETIWA relies on a ``knowledge base'' consisting of real examples of custom implementation-to-API replacements. In this work, we present the mining strategy we tailored to automatically and reliably extract replacements of custom implementations with APIs from open source projects. This is the first step towards building the envisioned recommender.