Tampere University of Technology

TUTCRIS Research Portal

How developers perceive smells in source code: A replicated study

Research output: Contribution to journalArticleScientificpeer-review

Details

Original languageEnglish
Pages (from-to)223-235
Number of pages13
JournalInformation and Software Technology
Volume92
DOIs
Publication statusPublished - 1 Dec 2017
Externally publishedYes
Publication typeA1 Journal article-refereed

Abstract

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.

Keywords

  • Antipatterns, Bad smells, Code smells, Refactoring, Software maintenance

Publication forum classification