Do Critical Components Smell Bad? An Empirical Study with Component-based Software Product Lines

  • Anderson Uchôa PUC-Rio
  • Wesley Klewerton Guez Assunção PUC-Rio
  • Alessandro Garcia PUC-Rio

Resumo


Component-based software product line (SPL) consists of a set of software products that share common components. For a proper SPL product composition, each component has to follow three principles: encapsulating a single feature, restricting data access, and be replaceable. However, it is known that developers usually introduce anomalous structures, i.e., code smells, along the implementation of components. These code smells might violate one or more component principles and hinder the SPL product composition. Thus, developers should identify code smells in component-based SPLs, especially those affecting highly interconnected components, which are called critical components. Nevertheless, there is limited evidence of how smelly these critical components tend to be in component-based SPLs. To address this limitation, this paper presents a survey with developers of three SPLs. We inquire these developers about their perceptions of a critical component. Then, we characterize critical components per SPL, and identify nine recurring types of code smells. Finally, we quantitatively assess the smelliness of the critical components. Our results suggest that: (i) critical components are ten times more prone to have code smells than non-critical ones; (ii) the most frequent code smell types affecting critical components violate several component principles together; and (iii) these smell types affect multiple SPL components.
Publicado
27/09/2021
Como Citar

Selecione um Formato
UCHÔA, Anderson; ASSUNÇÃO, Wesley Klewerton Guez; GARCIA, Alessandro. Do Critical Components Smell Bad? An Empirical Study with Component-based Software Product Lines. In: SIMPÓSIO BRASILEIRO DE COMPONENTES, ARQUITETURAS E REUTILIZAÇÃO DE SOFTWARE (SBCARS), 15. , 2021, Joinville. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2021 . p. 21–30.