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, B. L., Bigonha, M. A. S., & Ferreira, K. A. M. (2018). When GOF Design Patterns occur with God Class and Long Method Bad Smells? - An Empirical Analysis. INFOCOMP Journal of Computer Science, 17(1), 11–22. Retrieved from https://infocomp.dcc.ufla.br/index.php/infocomp/article/view/555
Section
Software Engineering