Extending refactoring detection to Kotlin: A dataset and comparative study.
- Conference: The IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)
- DOI: http://dx.doi.org/10.1109/SANER60148.2024.00034
- Dataset’s website: https://sites.google.com/view/refdetectkotlin/home
Abstract:
Refactoring, as one of the best practices in soft- ware 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 au tomated tool support for identifying refac- torings 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 KOTLINRMINER. 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.