一句话:提出首个公开可用的 C++ 重构检测工具 RefactoringMiner++,基于 Java 的 RefactoringMiner 3 扩展实现。
提交中经常包含重构——旨在改进软件设计且保持行为的代码修改,代码审查者难以将其与改变行为的变更区分开来。过去二十年出现了许多自动重构检测工具,但大多仅支持 Java 项目。本文提出 RefactoringMiner++,它基于当前最先进的 Java 重构检测器 RefactoringMiner 3,是(据作者所知)首个公开可用的 C++ 重构检测工具。由于源于 Java 检测器,该工具尚不支持许多 C++ 特有的重构,但支持最常见的语言无关重构类型,并调和了若干语言不兼容问题。RefactoringMiner 的详尽评估为其性能提供了信心;作者还在一个小型种子数据集上测试了该工具,并通过一个同时包含重构与行为改变变更的简短演示展示了其能力。
Commits often involve refactorings—behavior-preserving code modifications aiming at software design improvements. Refactoring operations pose a challenge to code reviewers, as distinguishing them from behavior-altering changes is often not a trivial task. Accordingly, research on automated refactoring detection tools has flourished over the past two decades, however, the majority of suggested tools is limited to Java projects. In this work, we present RefactoringMiner++, a refactoring detection tool based on the current state of the art: RefactoringMiner 3. While the latter focuses exclusively on Java, our tool is—to the best of our knowledge—the first publicly available refactoring detection tool for C++ projects. Being based on a refactoring detector for Java projects, our tool lacks support for many refactorings specific to C++. The most common language-independent refactoring types, however, are supported and even several language incompatibilities were reconciled. RefactoringMiner's thorough evaluation provides confidence in our tool's performance. In addition, we test RefactoringMiner++ on a small seeded dataset and demonstrate the tool's capability in a short demo involving both refactorings and behavior-altering changes. A screencast demonstrating our tool can be found at https://www.youtube.com/watch?v=tFTysQfGYSM.