Understanding the Impact of Refactoring on Smells: A Longitudinal Study of 23 Software Projects

被引:56
|
作者
Cedrim, Diego [1 ]
Garcia, Alessandro [1 ]
Mongiovi, Melina [2 ]
Gheyi, Rohit [2 ]
Sousa, Leonardo [1 ]
de Mello, Rafael [1 ]
Fonseca, Baldoino [3 ]
Ribeiro, Marcio [3 ]
Chavez, Alexander [1 ]
机构
[1] Pontificia Univ Catolica Rio de Janeiro, Rio de Janeiro, Brazil
[2] Univ Fed Campina Grande, Campina Grande, Brazil
[3] Univ Fed Alagoas, Maceio, Brazil
来源
ESEC/FSE 2017: PROCEEDINGS OF THE 2017 11TH JOINT MEETING ON FOUNDATIONS OF SOFTWARE ENGINEERING | 2017年
关键词
Refactoring; Code Smells; Structural Quality; CODE SMELLS; MAINTENANCE PROBLEMS;
D O I
10.1145/3106237.3106259
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:465 / 475
页数:11
相关论文
共 50 条
  • [11] An Ontology-Based Approach to Reduce the Negative Impact of Code Smells in Software Development Projects
    Castellano, Ivian L.
    Aguilar, Gilberto Fernando Castro
    Silega, Nemury
    Kamal, Tahir
    Al-Gaashani, Mehdhar S. A. M.
    Samee, Nagwan Abdel
    Alabdulhafith, Maali
    IEEE ACCESS, 2023, 11 : 100146 - 100153
  • [12] An Exploratory Study of the Impact of Code Smells on Software Change-proneness
    Khomh, Foutse
    Di Penta, Massimiliano
    Gueheneuc, Yann-Gael
    16TH WORKING CONFERENCE ON REVERSE ENGINEERING (WCRE 2009), 2009, : 75 - +
  • [13] Understanding metric-based detectable smells in Python']Python software: A comparative study
    Chen Zhifei
    Chen Lin
    Ma Wanwangying
    Zhou Xiaoyu
    Zhou Yuming
    Xu Baowen
    INFORMATION AND SOFTWARE TECHNOLOGY, 2018, 94 : 14 - 29
  • [14] "Project smells" - Experiences in Analysing the Software Quality of ML Projects with mllint
    van Oort, Bart
    Cruz, Luis
    Loni, Babak
    van Deursen, Arie
    2022 ACM/IEEE 44TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: SOFTWARE ENGINEERING IN PRACTICE (ICSE-SEIP 2022), 2022, : 211 - 220
  • [15] A probabilistic-based approach for automatic identification and refactoring of software code smells
    Saheb-Nassagh, Raana
    Ashtiani, Mehrdad
    Minaei-Bidgoli, Behrouz
    APPLIED SOFT COMPUTING, 2022, 130
  • [16] An Empirical Study of Refactoring Rhythms and Tactics in the Software Development Process
    Noei, Shayan
    Li, Heng
    Georgiou, Stefanos
    Zou, Ying
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2023, 49 (12) : 5103 - 5119
  • [17] A game of refactoring. Studying the impact of gamification in software refactoring
    Elezi, Leonard
    Sali, Sara
    Demeyer, Serge
    Murgia, Alessandro
    Perez, Javier
    PROCEEDINGS OF THE XP2016 SCIENTIFIC WORKSHOPS, 2016,
  • [18] Understanding the effect of batch refactoring on software quality
    Agnihotri, Mansi
    Chug, Anuradha
    INTERNATIONAL JOURNAL OF SYSTEM ASSURANCE ENGINEERING AND MANAGEMENT, 2024, 15 (06) : 2328 - 2336
  • [19] VISMELLS: An Interactive Visualization for Identifying and Evaluating the Effects of Code Smells on Software Projects
    Silva, Isaac de Jesus
    Santos, Matheus Sampaio R.
    Ramos, Leandro Lopes
    Carvalho, Luis Paulo da S.
    2018 XLIV LATIN AMERICAN COMPUTER CONFERENCE (CLEI 2018), 2018, : 40 - 49
  • [20] Software Metric Based Impact Analysis of Code Smells - A Large Scale Empirical Study
    Rahman, Md. Masudur
    Satter, Abdus
    Joarder, Md. Mahbubul Alam
    Sakib, Kazi
    SOFTWARE-PRACTICE & EXPERIENCE, 2025,