How developers perceive smells in source code: A replicated study

被引:55
|
作者
Taibi, Davide [1 ]
Janes, Andrea [1 ]
Lenarduzzi, Valentina [1 ]
机构
[1] Free Univ Bozen Bolzano, Piazza Univ 1, I-39100 Bolzano, Italy
关键词
Software maintenance; Code smells; Bad smells; Antipatterns; Refactoring;
D O I
10.1016/j.infsof.2017.08.008
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Context. In recent years, smells, also referred to as bad smells, have gained popularity among developers. However, it is still not clear how harmful they are perceived from the developers' point of view. Many developers talk about them, but only few know what they really are, and even fewer really take care of them in their source code. Objective. The goal of this work is to understand the perceived criticality of code smells both in theory, when reading their description, and in practice. Method. We executed an empirical study as a differentiated external replication of two previous studies. The studies were conducted as surveys involving only highly experienced developers (63 in the first study and 41 in the second one). First the perceived criticality was analyzed by proposing the description of the smells, then different pieces of code infected by the smells were proposed, and finally their ability to identify the smells in the analyzed code was tested. Results. According to our knowledge, this is the largest study so far investigating the perception of code smells with professional software developers. The results show that developers are very concerned about code smells in theory, nearly always considering them as harmful or very harmful (17 out of 23 smells). However, when they were asked to analyze an infected piece of code, only few infected classes were considered harmful and even fewer were considered harmful because of the smell. Conclusions. The results confirm our initial hypotheses that code smells are perceived as more critical in theory but not as critical in practice. (C) 2017 Elsevier B.V. All rights reserved.
引用
下载
收藏
页码:223 / 235
页数:13
相关论文
共 50 条
  • [31] An Analytical Study of Code Smells
    Bamizadeh, Lida
    Kumar, Binod
    Kumar, Ajay
    Shirwaikar, Shailaja
    TEHNICKI GLASNIK-TECHNICAL JOURNAL, 2021, 15 (01): : 121 - 126
  • [32] Refactoring Test Smells: A Perspective from Open-Source Developers
    Soares, Elvys
    Ribeiro, Marcio
    Amaral, Guilherme
    Gheyi, Rohit
    Fernandes, Leo
    Garcia, Alessandro
    Fonseca, Baldoino
    Santos, Andre
    PROCEEDINGS OF THE 5TH BRAZILIAN SYMPOSIUM ON SYSTEMATIC AND AUTOMATED SOFTWARE TESTING, SAST 2020, 2020, : 50 - 59
  • [33] The Evolution and Impact of Code Smells: A Case Study of Two Open Source Systems
    Olbrich, Steffen
    Cruzes, Daniela S.
    Basili, Victor
    Zazworka, Nico
    ESEM: 2009 3RD INTERNATIONAL SYMPOSIUM ON EMPIRICAL SOFTWARE ENGINEERING AND MEASUREMENT, 2009, : 391 - +
  • [34] Why Developers Refactor Source Code: A Mining-based Study
    Pantiuchina, Jevgenija
    Zampetti, Fiorella
    Scalabrino, Simone
    Piantadosi, Valentina
    Oliveto, Rocco
    Bavota, Gabriele
    Di Penta, Massimiliano
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2020, 29 (04)
  • [35] Are architectural smells independent from code smells? An empirical study
    Fontana, Francesca Arcelli
    Lenarduzzi, Valentina
    Roveda, Riccardo
    Taibi, Davide
    JOURNAL OF SYSTEMS AND SOFTWARE, 2019, 154 : 139 - 156
  • [36] On the relation between architectural smells and source code changes
    Sas, Darius
    Avgeriou, Paris
    Pigazzini, Ilaria
    Fontana, Francesca Arcelli
    JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2022, 34 (01)
  • [37] How Do Developers Refactor Code to Improve Code Reusability?
    AlOmar, Eman Abdullah
    Rodriguez, Philip T.
    Bowman, Jordan
    Wang, Tianjia
    Adepoju, Benjamin
    Lopez, Kevin
    Newman, Christian
    Ouni, Ali
    Mkaouer, Mohamed Wiem
    REUSE IN EMERGING SOFTWARE ENGINEERING PRACTICES, ICSR 2020, 2020, 12541 : 261 - 276
  • [38] Beyond Technical Aspects: How Do Community Smells Influence the Intensity of Code Smells?
    Palomba, Fabio
    Tamburri, Damian Andrew
    Fontana, Francesca Arcelli
    Oliveto, Rocco
    Zaidman, Andy
    Serebrenik, Alexander
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 47 (01) : 108 - 129
  • [39] Code Review Quality: How Developers See It
    Kononenko, Oleksii
    Baysal, Olga
    Godfrey, Michael W.
    2016 IEEE/ACM 38TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2016, : 1028 - 1038
  • [40] A Systematic Literature Review: Code Bad Smells in Java']Java Source Code
    Gupta, Aakanshi
    Suri, Bharti
    Misra, Sanjay
    COMPUTATIONAL SCIENCE AND ITS APPLICATIONS - ICCSA 2017, PT V, 2017, 10408 : 665 - 682