How developers perceive smells in source code: A replicated study

被引:58
|
作者
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 条
  • [1] Do Developers Care about Code Smells? A Replicated Study from Chile
    Ancan, Oscar
    Cares, Carlos
    2017 CHILEAN CONFERENCE ON ELECTRICAL, ELECTRONICS ENGINEERING, INFORMATION AND COMMUNICATION TECHNOLOGIES (CHILECON), 2017,
  • [2] An Investigative Study on How Developers Filter and Prioritize Code Smells
    Sae-Lim, Natthawute
    Hayashi, Shinpei
    Saeki, Motoshi
    IEICE TRANSACTIONS ON INFORMATION AND SYSTEMS, 2018, E101D (07) : 1733 - 1742
  • [3] How Do Developers Select and Prioritize Code Smells? A Preliminary Study
    Sae-Lim, Natthawute
    Hayashi, Shinpei
    Saeki, Motoshi
    2017 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME), 2017, : 484 - 488
  • [4] Video Game Bad Smells: What They Are and How Developers Perceive Them
    Nardone, Vittoria
    Muse, Biruk
    Abidi, Mouna
    Khomh, Foutse
    Di Penta, Massimiliano
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2023, 32 (04)
  • [5] Recommendations for Developers Identifying Code Smells
    de Mello, Rafael
    Oliveira, Roberto
    Uchoa, Anderson
    Oizumi, Willian
    Garcia, Alessandro
    Fonseca, Baldoino
    de Mello, Fernanda
    IEEE SOFTWARE, 2023, 40 (02) : 90 - 98
  • [6] Are you smelling it? Investigating how similar developers detect code smells
    Hozano, Mario
    Garcia, Alessandro
    Fonseca, Baldoino
    Costa, Evandro
    INFORMATION AND SOFTWARE TECHNOLOGY, 2018, 93 : 130 - 146
  • [7] A field study of how developers locate features in source code
    Damevski, Kostadin
    Shepherd, David
    Pollock, Lori
    EMPIRICAL SOFTWARE ENGINEERING, 2016, 21 (02) : 724 - 747
  • [8] A field study of how developers locate features in source code
    Kostadin Damevski
    David Shepherd
    Lori Pollock
    Empirical Software Engineering, 2016, 21 : 724 - 747
  • [9] How effective developers investigate source code: An exploratory study
    Robillard, MP
    Coelho, W
    Murphy, GC
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2004, 30 (12) : 889 - 903
  • [10] Do Developers Focus on Severe Code Smells?
    Saika, Tsubasa
    Choi, Eunjong
    Yoshida, Norihiro
    Haruna, Shusuke
    Inoue, Katsuro
    2016 IEEE 23RD INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), VOL 4, 2016, : 1 - 3