RefactorHub: A Commit Annotator for Refactoring

It is necessary to gather real refactoring instances while conducting empirical studies on refactoring. However, existing refactoring detection approaches are insufficient in terms of their accuracy and coverage. Reducing the manual effort of curating refactoring data is challenging in terms of obtaining various refactoring data accurately. This paper proposes a tool named RefactorHub, which supports users to manually annotate potential refactoring-related commits obtained from existing refactoring detection approaches to make their refactoring information more accurate and complete with rich details. In the proposed approach, the parameters of each refactoring operation are defined as a meaningful set of code elements in the versions before or after refactoring. RefactorHub provides interfaces and supporting features to annotate each parameter, such as the automated filling of dependent parameters, thereby avoiding wrong or uncertain selections. A preliminary user study showed that RefactorHub reduced annotation effort and improved the degree of agreement among users. Source code and demo video are available at https://github.com/salab/RefactorHub

[1]  Martin Fowler,et al.  Refactoring - Improving the Design of Existing Code , 1999, Addison Wesley object technology series.

[2]  Mauricio A. Saca Refactoring improving the design of existing code , 2017, 2017 IEEE 37th Central America and Panama Convention (CONCAPAN XXXVII).

[3]  Marco Tulio Valente,et al.  Why we refactor? confessions of GitHub contributors , 2016, SIGSOFT FSE.

[4]  Marco Tulio Valente,et al.  RefDiff: Detecting Refactorings in Version Histories , 2017, 2017 IEEE/ACM 14th International Conference on Mining Software Repositories (MSR).

[5]  Danny Dig,et al.  Accurate and Efficient Refactoring Detection in Commit History , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE).

[6]  Diomidis Spinellis,et al.  Refactoring--Does It Improve Software Quality? , 2007, Fifth International Workshop on Software Quality (WoSQ'07: ICSE Workshops 2007).

[7]  Andre Hora,et al.  Characteristics of method extractions in Java: a large scale empirical study , 2020, Empirical Software Engineering.

[8]  Marco Tulio Valente,et al.  RefDiff 2.0: A Multi-Language Refactoring Detection Tool , 2021, IEEE Transactions on Software Engineering.

[9]  Danny Dig,et al.  RefactoringMiner 2.0 , 2020, IEEE Transactions on Software Engineering.

[10]  Sarah Nadi,et al.  Are Refactorings to Blame? An Empirical Study of Refactorings in Merge Conflicts , 2019, 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER).

[11]  Cristina V. Lopes,et al.  Towards Automating Precision Studies of Clone Detectors , 2018, 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE).

[12]  Harald C. Gall,et al.  On the relation of refactorings and software defect prediction , 2008, MSR '08.

[13]  Miryung Kim,et al.  Characterizing and Identifying Composite Refactorings: Concepts, Heuristics and Patterns , 2020, 2020 IEEE/ACM 17th International Conference on Mining Software Repositories (MSR).

[14]  Gabriele Bavota,et al.  Landfill: An Open Dataset of Code Smells with Public Evaluation , 2015, 2015 IEEE/ACM 12th Working Conference on Mining Software Repositories.

[15]  Mohamed Wiem Mkaouer,et al.  Can Refactoring Be Self-Affirmed? An Exploratory Study on How Developers Document Their Refactoring Activities in Commit Messages , 2019, 2019 IEEE/ACM 3rd International Workshop on Refactoring (IWoR).