A Large-Scale Study on Recommendations of Composite Refactorings in Practice

Refactoring is a non-trivial maintenance activity. Developers spend time and effort refactoring code to remove structural problems, i.e., code smells. Recent studies indicated that developers often apply composite refactoring (composite, for short), i.e., two or more interrelated refactorings. However, previous studies revealed that only 10% of composite refactorings in practice are considered complete, i.e., those fully removing code smells. However, the literature is scarce to catalog the most common complete composites and their side effects. Aim: To fill this gap, we performed a mixed-method study to create an enhanced catalog of complete composites derived from practice knowledge. Method: We empirically collected the most common complete composites and their side effects applied in 42 open and closed-source projects, generating a catalog of composite recommendations. Then, our catalog was evaluated by 21 software developers. Results: The derived catalog includes four recommendations to fully remove multiple code smells, minimizing possible side effects. The evaluation indicates that 85% of developers reported that their own solutions could have worse side effects without our recommendations, increasing the effort to remove smells critical to them. Conclusion: Our catalog can guide both developers and researchers on how to better combine refactorings in composites that effectively reduce side effects in the practice.

Authors

Institutions

Publication Details

Published
2024-09-30
DOI
https://doi.org/10.5753/cbsoft_estendido.2024.4116
Primary Topic
Manufacturing Process and Optimization
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Large-Scale Study on Recommendations of Composite Refactorings in Practice

Ana Carla Bibiano, Alessandro Garcia, Wesley K. G. Assunção
Manufacturing Process and Optimization
article

A Large-Scale Study on Recommendations of Composite Refactorings in Practice

Ana Carla Bibiano, Alessandro Garcia, Wesley K. G. Assunção
article en

Abstract

Refactoring is a non-trivial maintenance activity. Developers spend time and effort refactoring code to remove structural problems, i.e., code smells. Recent studies indicated that developers often apply composite refactoring (composite, for short), i.e., two or more interrelated refactorings. However, previous studies revealed that only 10% of composite refactorings in practice are considered complete, i.e., those fully removing code smells. However, the literature is scarce to catalog the most common complete composites and their side effects. Aim: To fill this gap, we performed a mixed-method study to create an enhanced catalog of complete composites derived from practice knowledge. Method: We empirically collected the most common complete composites and their side effects applied in 42 open and closed-source projects, generating a catalog of composite recommendations. Then, our catalog was evaluated by 21 software developers. Results: The derived catalog includes four recommendations to fully remove multiple code smells, minimizing possible side effects. The evaluation indicates that 85% of developers reported that their own solutions could have worse side effects without our recommendations, increasing the effort to remove smells critical to them. Conclusion: Our catalog can guide both developers and researchers on how to better combine refactorings in composites that effectively reduce side effects in the practice.

North Carolina State University (US), Pontifícia Universidade Católica do Rio de Janeiro (BR)
Openalex Percentile: Top 74%
Manufacturing Process and Optimization
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.