How We Refactor and How We Document it? On the Use of Supervised Machine Learning Algorithms to Classify Refactoring Documentation
Eman Abdullah AlOmar, Anthony Peruma, Mohamed Wiem Mkaouer, Christian, Newman, Ali Ouni, Marouane Kessentini

TL;DR
This study uses supervised machine learning to classify refactoring commits in Java projects, revealing diverse motivations beyond traditional design improvement and analyzing developer documentation patterns.
Contribution
It introduces a multi-class classifier for refactoring motivations and analyzes textual patterns in commit messages, expanding understanding of refactoring practices.
Findings
Refactoring motivations extend beyond design improvement and code smells.
Distribution of refactorings varies between production and test files.
Developers use specific textual patterns to describe refactoring actions.
Abstract
Refactoring is the art of improving the design of a system without altering its external behavior. Refactoring has become a well established and disciplined software engineering practice that has attracted a significant amount of research presuming that refactoring is primarily motivated by the need to improve system structures. However, recent studies have shown that developers may incorporate refactorings in other development activities that go beyond improving the design. Unfortunately, these studies are limited to developer interviews and a reduced set of projects. To cope with the above-mentioned limitations, we aim to better understand what motivates developers to apply refactoring by mining and classifying a large set of 111,884 commits containing refactorings, extracted from 800 Java projects. We trained a multi-class classifier to categorize these commits into 3 categories,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
