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 条
  • [41] Survey on Code Smells
    Tian Y.-C.
    Li K.-J.
    Wang T.-M.
    Jiao Q.-Q.
    Li G.-J.
    Zhang Y.-X.
    Liu H.
    Ruan Jian Xue Bao/Journal of Software, 2023, 34 (01): : 150 - 170
  • [42] A Hybrid Approach To Detect Code Smells using Deep Learning
    Hadj-Kacem, Mouna
    Bouassida, Nadia
    PROCEEDINGS OF THE 13TH INTERNATIONAL CONFERENCE ON EVALUATION OF NOVEL APPROACHES TO SOFTWARE ENGINEERING, 2018, : 137 - 146
  • [43] Are Code smells the root cause of faults? A continuous experimentation approach
    Pellegrini, Luca
    Lenarduzzi, Valentina
    19TH INTERNATIONAL CONFERENCE ON AGILE SOFTWARE DEVELOPMENT (XP '18), 2018,
  • [44] An Approach to Regression Testing Selection based on Code Changes and Smells
    Mori, Allan
    Paiva, Ana C. R.
    Souza, Simone R. S.
    PROCEEDINGS OF THE 8TH BRAZILIAN SYMPOSIUM ON SYSTEMATIC AND AUTOMATED SOFT-WARE TESTING, SAST 2023, 2023, : 25 - 34
  • [45] How Do Community Smells Influence Code Smells?
    Palomba, Fabio
    Tamburri, Damian A.
    Serebrenik, Alexander
    Zaidman, Andy
    Fontana, Francesca Arcelli
    Oliveto, Rocco
    PROCEEDINGS 2018 IEEE/ACM 40TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING - COMPANION (ICSE-COMPANION, 2018, : 240 - 241
  • [46] An Automated Refactoring Approach to Remove Unnecessary Complexity in Source Code
    Magalhaes, Nathan Manera
    Campos Junior, Heleno de Souza
    Pereira Araujo, Marco Antonio
    Neves, Vania de Oliveira
    II BRAZILIAN SYMPOSIUM ON SYSTEMATIC AND AUTOMATED SOFTWARE TESTING (SAST 2017), 2017,
  • [47] An Ontology-based Approach to Analyzing the Occurrence of Code Smells in Software
    da Silva Carvalho, Luis Paulo
    Novais, Renato
    Salvador, Lais do Nascimento
    de Mendonca Neto, Manoel Gomes
    ICEIS: PROCEEDINGS OF THE 19TH INTERNATIONAL CONFERENCE ON ENTERPRISE INFORMATION SYSTEMS - VOL 2, 2017, : 155 - 165
  • [48] Refactoring Community Smells: An Empirical Study on the Software Practitioners of Bangladesh
    Tahsin, Noshin
    Sakib, Kazi
    2022 29TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE, APSEC, 2022, : 422 - 426
  • [49] Handling uncertainty in SBSE: a possibilistic evolutionary approach for code smells detection
    Boutaib, Sofien
    Elarbi, Maha
    Bechikh, Slim
    Palomba, Fabio
    Ben Said, Lamjed
    EMPIRICAL SOFTWARE ENGINEERING, 2022, 27 (06)
  • [50] Facilitating Software Refactoring with Appropriate Resolution Order of Bad Smells
    Liu, Hui
    Yang, Limei
    Niu, Zhendong
    Ma, Zhiyi
    Shao, Weizhong
    7TH JOINT MEETING OF THE EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND THE ACM SIGSOFT SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, 2009, : 265 - 268