Toward the Automatic Classification of Self-Affirmed Refactoring

09/19/2020
by   Eman Abdullah AlOmar, et al.
0

The concept of Self-Affirmed Refactoring (SAR) was introduced to explore how developers document their refactoring activities in commit messages, i.e., developers' explicit documentation of refactoring operations intentionally introduced during a code change. In our previous study, we have manually identified refactoring patterns and defined three main common quality improvement categories, including internal quality attributes, external quality attributes, and code smells, by only considering refactoring-related commits. However, this approach heavily depends on the manual inspection of commit messages. In this paper, we propose a two-step approach to first identify whether a commit describes developer-related refactoring events, then to classify it according to the refactoring common quality improvement categories. Specifically, we combine the N-Gram TF-IDF feature selection with binary and multiclass classifiers to build a new model to automate the classification of refactorings based on their quality improvement categories. We challenge our model using a total of 2,867 commit messages extracted from well-engineered open-source Java projects. Our findings show that (1) our model is able to accurately classify SAR commits, outperforming the pattern-based and random classifier approaches, and allowing the discovery of 40 more relevant SAR patterns, and (2) our model reaches an F-measure of up to 90 relatively small training dataset.

READ FULL TEXT

page 10

page 38

research
06/09/2023

State of Refactoring Adoption: Better Understanding Developer Perception of Refactoring

We aim to explore how developers document their refactoring activities d...
research
10/26/2020

How We Refactor and How We Document it? On the Use of Supervised Machine Learning Algorithms to Classify Refactoring Documentation

Refactoring is the art of improving the design of a system without alter...
research
03/19/2022

An Exploratory Study on Refactoring Documentation in Issues Handling

Understanding the practice of refactoring documentation is of paramount ...
research
07/10/2019

Do Design Metrics Capture Developers Perception of Quality? An Empirical Study on Self-Affirmed Refactoring Activities

Background. Refactoring is a critical task in software maintenance and i...
research
12/02/2021

On the Documentation of Refactoring Types

Commit messages are the atomic level of software documentation. They pro...
research
07/21/2020

The Corrective Commit Probability Code Quality Metric

We present a code quality metric, Corrective Commit Probability (CCP), m...
research
06/29/2016

How Many Folders Do You Really Need?

Email classification is still a mostly manual task. Consequently, most W...

Please sign up or login with your details

Forgot password? Click here to reset