Measuring Trivial and Non-Trivial Refactoring: A Predictive Analysis and Index Proposal

This study investigates the relationship between trivial and non-trivial refactorings and proposes a metric to evaluate refactoring triviality. We analyzed 1.9M refactorings from 1,291 open-source projects with 45 code metrics using supervised learning. We evaluate 5 classification models and 7 regression models under various configurations. Based on these results, we propose a metric based on complexity, speed and risk, with insights from 15 developers on 58 selected features. The results show that separating the refactorings by triviality improves the predictions and that the use of all features outperforms the prioritization of the developer. Ensemble models outperformed linear ones, and expert perceptions aligned with model results. These findings support refactoring decisions and highlight future research opportunities.

Authors

Publication Details

Published
2025-09-19
DOI
https://doi.org/10.5753/cbsoft_estendido.2025.12268
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Measuring Trivial and Non-Trivial Refactoring: A Predictive Analysis and Index Proposal

Darwin Pinheiro, Carla Bezerra, Anderson Uchôa
Software Engineering Research
article

Measuring Trivial and Non-Trivial Refactoring: A Predictive Analysis and Index Proposal

Darwin Pinheiro, Carla Bezerra, Anderson Uchôa
article en

Abstract

This study investigates the relationship between trivial and non-trivial refactorings and proposes a metric to evaluate refactoring triviality. We analyzed 1.9M refactorings from 1,291 open-source projects with 45 code metrics using supervised learning. We evaluate 5 classification models and 7 regression models under various configurations. Based on these results, we propose a metric based on complexity, speed and risk, with insights from 15 developers on 58 selected features. The results show that separating the refactorings by triviality improves the predictions and that the use of all features outperforms the prioritization of the developer. Ensemble models outperformed linear ones, and expert perceptions aligned with model results. These findings support refactoring decisions and highlight future research opportunities.

Openalex Percentile: Top 63%
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.