一句话:提出迭代式实体匹配算法 ReMapper,大幅降低跨版本实体匹配错误并提升重构发现效果。
版本控制系统以文本行管理代码,无法呈现软件实体的演化,已有实体匹配算法准确率不足。本文提出自动化迭代算法 ReMapper,其核心洞察是限定名、实现与引用三者结合可区分实体;由于引用相似度依赖实体映射,而映射又依赖引用相似度,算法采用迭代匹配。作者在来自21个真实项目、215个提交的基准上评估,ReMapper 将错误(假阳性加假阴性)减少 85.8%,显著优于现有方法;在依赖实体匹配的自动重构发现任务中,召回率提升 6.9%,假阳性减少 72.6%。
Version control systems are widely used to manage the evolution of software applications. However, such version control systems take source code as lines of plain text, and thus they cannot present the evolution of software entities embedded in the source code. To this end, a few approaches have been proposed to match software entities before and after a given commit, known as software entity matching algorithms. However, the accuracy of such algorithms requires further improvement. In this paper, we propose an automated iterative algorithm (called ReMapper) to match software entities between two successive versions. The key insight of ReMapper is that the qualified name, the implementation, and the references of a software entity together can distinguish it from others. It matches software entities iteratively because the mapping depends on the reference-based similarity whereas the reference-based similarity depends on the mapping of entities as well. We evaluated ReMapper on a benchmark consisting of 215 commits from 21 real-world projects. Our evaluation results suggest that ReMapper substantially outperformed the state of the art, reducing the number of mistakes (false positives plus false negatives) substantially by 85.8%. We also evaluated to what extent it may improve the automated refactoring discovery (mining) that relies heavily on automated entity matching. Our evaluation results suggest that it substantially improved the state of the art in refactoring discovery, improving recall by 6.9% and reducing the number of false positives by 72.6%.