Extending Refactoring Detection to Kotlin: A Dataset and Comparative Study - Moghadam, Iman Hemati; Afkhami, Mohammad Mehdi; Kamalipour, Parsa; Zaytsev, Vadim (Proceedings of the European Conference on Software Maintenance and Reengineering, 2024)
Refactoring, as one of the best practices in software development, has been also the centre of attention of much research. Particularly, a plethora of studies have been performed to understand the impact of refactorings on different dimensions of software development including software quality, program comprehension, fault-proneness, and non-functional requirements, among others. Among the employed approaches, analysing refactorings applied previously in real-world scenarios has been used by many researchers and proves to be a valuable way to delve deeper into the subject. The results of these research studies not only enhance our understanding of the advantages and potential drawbacks of refactorings but also guide us in developing more efficient automated refactoring tools based on how developers actually use refactorings in practice. However, the majority of studies in this regard have focused on refactorings applied in Java programs, and the other programming languages have received significantly less attention. In reality, the lack of comprehensive datasets of real-world applied refactorings makes it challenging for researchers to conduct comprehensive studies in programming languages other than Java. The primary obstacle can be the lack of automated tool support for identifying refactorings applied in programs implemented in other languages. To mitigate this limitation, we extended a previously available refactoring detection tool, Refdetect, to be able to identify refactorings applied in Kotlin programs. We conducted an experiment on 200 commits of 10 Kotlin repositories sourced on GitHub and compared the performance of our tool with an existing Kotlin refactoring detection tool called Ko T L I Nrmi Ne R. We found that our tool has a precision of 90% and a recall of 82 %, achieving an average F -score of 84 % which is 17 % better than the one achieved by KOTLINRMINER. We also provide the resulting dataset containing 2,043 true refactoring instances detected by at least one of Refdetect or Kotlinrminer and validated by one up to three refactoring experts. By releasing this initial dataset, we aim to address the existing gap in the availability of Kotlin refactoring datasets.