An approach to prioritize code smells for refactoring

被引:71
|
作者
Vidal, Santiago A. [1 ,2 ]
Marcos, Claudia [1 ,3 ]
Andres Diaz-Pace, J. [1 ,2 ]
机构
[1] UNICEN, ISISTAN, Tandil, Argentina
[2] Consejo Nacl Invest Cient & Tecn, Tandil, Argentina
[3] CIC, Buenos Aires, DF, Argentina
关键词
Code smells; Refactoring; Software evolution; Design problems; IDENTIFICATION; OPPORTUNITIES; EVOLUTION;
D O I
10.1007/s10515-014-0175-x
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Code smells are a popular mechanism to find structural design problems in software systems. Consequently, several tools have emerged to support the detection of code smells. However, the number of smells returned by current tools usually exceeds the amount of problems that the developer can deal with, particularly when the effort available for performing refactorings is limited. Moreover, not all the code smells are equally relevant to the goals of the system or its health. This article presents a semi-automated approach that helps developers focus on the most critical problems of the system. We have developed a tool that suggests a ranking of code smells, based on a combination of three criteria, namely: past component modifications, important modifiability scenarios for the system, and relevance of the kind of smell. These criteria are complementary and enable our approach to assess the smells from different perspectives. Our approach has been evaluated in two case-studies, and the results show that the suggested code smells are useful to developers.
引用
收藏
页码:501 / 532
页数:32
相关论文
共 50 条
  • [1] An approach to prioritize code smells for refactoring
    Santiago A. Vidal
    Claudia Marcos
    J. Andrés Díaz-Pace
    Automated Software Engineering, 2016, 23 : 501 - 532
  • [2] Context-based approach to prioritize code smells for prefactoring
    Sae-Lim, Natthawute
    Hayashi, Shinpei
    Saeki, Motoshi
    JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2018, 30 (06)
  • [3] Detecting and refactoring code smells in spreadsheet formulas
    Hermans, Felienne
    Pinzger, Martin
    van Deursen, Arie
    EMPIRICAL SOFTWARE ENGINEERING, 2015, 20 (02) : 549 - 575
  • [4] Revisiting the Relationship Between Code Smells and Refactoring
    Yoshida, Norihiro
    Saika, Tsubasa
    Choi, Eunjong
    Ouni, Ali
    Inoue, Katsuro
    2016 IEEE 24TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC), 2016,
  • [5] Detecting and refactoring code smells in spreadsheet formulas
    Felienne Hermans
    Martin Pinzger
    Arie van Deursen
    Empirical Software Engineering, 2015, 20 : 549 - 575
  • [6] Android code smells: From introduction to refactoring
    Habchi, Sarra
    Moha, Naouel
    Rouvoy, Romain
    JOURNAL OF SYSTEMS AND SOFTWARE, 2021, 177
  • [7] 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
  • [8] Identification and Refactoring of Exception Handling Code Smells in Java']JavaScript
    Hsieh, Chin-Yun
    Canh Le My
    Kim Thoa Ho
    Cheng, Yu Chin
    JOURNAL OF INTERNET TECHNOLOGY, 2017, 18 (06): : 1461 - 1471
  • [9] Refactoring Android Source Code Smells From Android Applications
    Fawad, Muhammad
    Rasool, Ghulam
    Riaz, Muhammad Bilal
    IEEE ACCESS, 2025, 13 : 14122 - 14150
  • [10] Code smells and refactoring: A tertiary systematic review of challenges and observations
    Lacerda, Guilherme
    Petrillo, Fabio
    Pimenta, Marcelo
    Guéhéneuc, Yann Gaël
    Journal of Systems and Software, 2020, 167