Building empirical knowledge on the relationship between code smells and design patterns: An exploratory study
Code smell is a concept describing potential problems in software design. In opposition, design pattern describes good design solutions in terms of maintainability and reusability. Code smell and design pattern might be perceived as metaphors supporting software design activity in terms of understan...
Gespeichert in:
Veröffentlicht in: | Journal of software : evolution and process 2022-09, Vol.34 (9), p.n/a |
---|---|
Hauptverfasser: | , |
Format: | Artikel |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | Code smell is a concept describing potential problems in software design. In opposition, design pattern describes good design solutions in terms of maintainability and reusability. Code smell and design pattern might be perceived as metaphors supporting software design activity in terms of understanding and communication. However, empirical evaluation is needed to investigate their effect in terms of programming activity. Our objective is to build empirical knowledge on the relationship between code smells and design patterns. We carried out an exploratory study based on mining software repositories and in a baseline study addressing software evolution. In total, we analyzed 61 software. Their classes were identified as linked to both code smells and design patterns metaphors. Then, we analyzed the co‐occurrence of these metaphors. Our findings indicate that the relationship between smells and design patterns is software dependent. Some software present many smells linked to design patterns while for other software, smelly classes are not linked to design patterns. We also found that the instability metric weakly reflects this idea. Our study supports better understanding of the topic. It presents results in the opposite direction of expectations that the presence of smells is correlated with the absence of design patterns and vice versa.
There are studies investigating co‐occurrence of the code smells and design patterns metaphors. The premise of these studies is based on the intuitive idea that these metaphors reflect opposite design quality characteristics. Our study builds on empirical knowledge on the topic, investigating co‐occurrence between code smells and design patters from a dataset with 61 software objects. We found that the relationship between code smells and design patterns is software dependent. The instability metric weakly reflects this idea. |
---|---|
ISSN: | 2047-7473 2047-7481 |
DOI: | 10.1002/smr.2487 |