A Technique to Test Refactoring Detection Tools - Leandro, Osmar; Gheyi, Rohit; Teixeira, Leopoldo; Ribeiro, Márcio; Garcia, Alessandro (Anais do Simpósio Brasileiro de Engenharia de Software (SBES), 2022)
Refactoring detection tools, such as RefactoringMiner and RefDiff, are helpful to study refactorings applied to software repositories. To evaluate them, the tools’ authors study software repositories and manually classify transformations as refactorings. However, this is a time-consuming and an error-prone activity. It is unclear to what extent the refactoring mechanics is consistent with refactoring implementations available in IDEs. In this paper, we propose a technique to test refactoring detection tools. In our technique, we apply a single refactoring using a popular IDE, and then we run the refactoring detection tool to check whether it detects the transformation applied by the IDE. We evaluate our technique by automatically performing 9,885 transformations on four real open-source projects using eight Eclipse IDE refactorings. RefactoringMiner and RefDiff detect more refactorings in 20.41% and 14.11% of the analyzed transformations, respectively. In the remaining cases, RefactoringMiner and RefDiff either do not detect the refactoring or classify it as other types of refactorings. We report 34 issues to refactoring detection tools, and developers fixed 16 bugs, and 3 bugs are duplicated. In other cases, 3 issues are not accepted. This study brings evidence for the need of a shared understanding of refactoring mechanics.