When GOF Design Patterns occur with God Class and Long Method Bad Smells? - An Empirical Analysis

Main Article Content

Bruno Luan Sousa Mariza Andrade Silva Bigonha Kecia Aline Marques Ferreira

Abstract

Design patterns are general reusable solutions to common recurring problems in software projects. These solutions, when correctly applied, are supposed to enhance modular and flexible structures in software. The aim of this work is to study the occurrences of God Class and Long Method bad smells in software systems developed with design patterns. To achieve this aim, we carried out an exploratory study with five Java systems to: (i) investigate if design patterns avoid bad smells; (ii) identify design patterns that may have co-occurrence with bad smells; and (iii) extract the main reasons that impact on such co-occurrence. We consider in our analysis eleven of the twenty-three GOF design patterns. We also consider the God Class and Long Method bad smells. The results obtained suggest that Composite and Factory Method have a low co-occurrence with these bad smells, and Template Method and Observer have a high co-occurrence with God Class and Long Method, respectively. In addition, we have identified that the misuse of design patterns and the scattering and crosscutting concerns has contributed to such co-occurrences.

Article Details

How to Cite
SOUSA, Bruno Luan; BIGONHA, Mariza Andrade Silva; FERREIRA, Kecia Aline Marques. When GOF Design Patterns occur with God Class and Long Method Bad Smells? - An Empirical Analysis. INFOCOMP, [S.l.], v. 17, n. 1, p. 11-22, june 2018. ISSN 1982-3363. Available at: <http://www.dcc.ufla.br/infocomp/index.php/INFOCOMP/article/view/555>. Date accessed: 20 aug. 2018.
Section
Software Engineering