arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1704.01544cs.SE
收藏

RefDiff:检测版本历史中的重构

RefDiff: Detecting Refactorings in Version Histories

Danilo Silva, Marco Tulio Valente

摘要:

重构是一种众所周知的技术,被软件工程师广泛采用,以改进设计并使系统能够进化。了解在代码更改中应用了哪些重构操作对于理解软件演化、调整软件组件、合并代码更改和其他应用程序是有价值的信息。在本文中,我们提出了RefDiff,这是一种自动化方法,可以识别git存储库中两个代码修订之间执行的重构。RefDiff采用了基于静态分析和代码相似性的方法来检测13种常见的重构类型。在使用分布在7个Java项目中的448个已知重构操作的Oracle进行的评估中,我们的方法实现了100%的精确度和88%的召回率。此外,我们的评估表明,RefDiff比现有的最先进的方法具有更高的精度和召回率。

英文摘要:

Refactoring is a well-known technique that is widely adopted by software engineers to improve the design and enable the evolution of a system. Knowing which refactoring operations were applied in a code change is a valuable information to understand software evolution, adapt software components, merge code changes, and other applications. In this paper, we present RefDiff, an automated approach that identifies refactorings performed between two code revisions in a git repository. RefDiff employs a combination of heuristics based on static analysis and code similarity to detect 13 well-known refactoring types. In an evaluation using an oracle of 448 known refactoring operations, distributed across seven Java projects, our approach achieved precision of 100% and recall of 88%. Moreover, our evaluation suggests that RefDiff has superior precision and recall than existing state-of-the-art approaches.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑