Understanding the impact of refactoring on smells: a longitudinal study of 23 software projects
Diego Cedrim
1
,
Alessandro Garcia
1
,
Melina Mongiovi
2
,
Rohit Gheyi
2
,
Leonardo Sousa
1
,
Rafael G. Licursi de Mello
1
,
Baldoino F. S. Neto
3
,
Márcio Ribeiro
3
,
Alexander Chávez
1
1
PUC-Rio, Brazil
|
2
Federal University of Campina Grande, Brazil
|
3
Federal University of Alagoas, Brazil
|
Publication type: Proceedings Article
Publication date: 2017-08-21
Abstract
Code smells in a program represent indications of structural quality problems, which can be addressed by software refactoring. However, refactoring intends to achieve different goals in practice, and its application may not reduce smelly structures. Developers may neglect or end up creating new code smells through refactoring. Unfortunately, little has been reported about the beneficial and harmful effects of refactoring on code smells. This paper reports a longitudinal study intended to address this gap. We analyze how often commonly-used refactoring types affect the density of 13 types of code smells along the version histories of 23 projects. Our findings are based on the analysis of 16,566 refactorings distributed in 10 different types. Even though 79.4% of the refactorings touched smelly elements, 57% did not reduce their occurrences. Surprisingly, only 9.7% of refactorings removed smells, while 33.3% induced the introduction of new ones. More than 95% of such refactoring-induced smells were not removed in successive commits, which suggest refactorings tend to more frequently introduce long-living smells instead of eliminating existing ones. We also characterized and quantified typical refactoring-smell patterns, and observed that harmful patterns are frequent, including: (i) approximately 30% of the Move Method and Pull Up Method refactorings induced the emergence of God Class, and (ii) the Extract Superclass refactoring creates the smell Speculative Generality in 68% of the cases.
Found
Found
Top-30
Journals
1
2
3
|
|
Empirical Software Engineering
3 publications, 6%
|
|
IEEE Transactions on Software Engineering
3 publications, 6%
|
|
Journal of Systems and Software
2 publications, 4%
|
|
Journal of Software Evolution and Process
2 publications, 4%
|
|
ACM Transactions on Software Engineering and Methodology
1 publication, 2%
|
|
Applied Sciences (Switzerland)
1 publication, 2%
|
|
IEEE Access
1 publication, 2%
|
|
Lecture Notes in Computer Science
1 publication, 2%
|
|
Advances in Intelligent Systems and Computing
1 publication, 2%
|
|
Software Quality Journal
1 publication, 2%
|
|
ACM Computing Surveys
1 publication, 2%
|
|
Science of Computer Programming
1 publication, 2%
|
|
International Journal of Quality and Reliability Management
1 publication, 2%
|
|
1
2
3
|
Publishers
5
10
15
20
25
|
|
Institute of Electrical and Electronics Engineers (IEEE)
22 publications, 44%
|
|
Association for Computing Machinery (ACM)
13 publications, 26%
|
|
Springer Nature
6 publications, 12%
|
|
Elsevier
3 publications, 6%
|
|
Wiley
2 publications, 4%
|
|
MDPI
1 publication, 2%
|
|
Emerald
1 publication, 2%
|
|
5
10
15
20
25
|
- We do not take into account publications without a DOI.
- Statistics recalculated only for publications connected to researchers, organizations and labs registered on the platform.
- Statistics recalculated weekly.
Are you a researcher?
Create a profile to get free access to personal recommendations for colleagues and new articles.