Smell Patterns as Indicators of Design Degradation: Do Developers Agree?

  • Anderson Oliveira PUC-RIO
  • Willian Oizumi PUC-RIO
  • Leonardo Sousa Carnegie Mellon University
  • Wesley K. G. Assunção PUC-RIO
  • Alessandro Garcia PUC-RIO
  • Carlos Lucena PUC-RIO
  • Diego Cedrim Amazon


Design degradation problems occur as a result of sub-optimal decisions that negatively impact internal software quality. These problems can affect isolated elements (e.g., a class) or multiple code elements (e.g., components). When neglected, design degradation increases maintenance costs. In this scenario, refactoring is paramount to keep internal software quality. However, the identification and removal of design degradation problems are not trivial tasks. For example, architectural documentation is an artifact that facilitates the identification of architectural problems, but often the documentation is unavailable or outdated. Hence, developers rely on the source code, mainly by identifying code smells. A code smell is a sub-optimal decision in the system implementation that can often be considered a counterpart of design degradation problems. Code smells allow developers to spot a design degradation problem and use them to reason about which refactoring operations need to be applied. Certain groups of code smells, called smell patterns, seem to indicate some specific design degradation problems. Intending to investigate the usefulness of smell patterns to help developers in the identification and removal of design degradation problems, we have conducted a quasi-experiment with 13 professional developers. Developers agree that smell patterns are indicators of design degradation problems, but their perceptions are influenced by factors such as the development platform (e.g., Android), type of functionality, and effort for refactoring the problem. Furthermore, they see as degradation problems only the sub-optimal decisions not intentionally taken. Among the smell patterns investigated, the patterns for Fat Interface, Concern Overload, and Scattered Concern were the most useful indicators of design degradation. We also observed that refactorings associated with code smells contribute to the (partial) removal of degradation problems. Our results led us to develop an automated tool to support developers during the identification and removal of some design degradation problems.
Palavras-chave: architectural refactoring, architectural problem, code smells, smell patterns
OLIVEIRA, Anderson; OIZUMI, Willian; SOUSA, Leonardo; ASSUNÇÃO, Wesley K. G.; GARCIA, Alessandro; LUCENA, Carlos; CEDRIM, Diego. Smell Patterns as Indicators of Design Degradation: Do Developers Agree?. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SOFTWARE (SBES), 36. , 2022, Uberlândia. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2022 . p. 311–320.