Treffer: Empirical study of the relationship between design patterns and code smells.

Title:
Empirical study of the relationship between design patterns and code smells.
Authors:
Alfadel M; Department of Computer Science and Software Engineering, Concordia University, Montreal, Canada., Aljasser K; Information and Computer Science Department, King Fahd University of Petroleum and Minerals, Dhahran, Saudi Arabia., Alshayeb M; Information and Computer Science Department, King Fahd University of Petroleum and Minerals, Dhahran, Saudi Arabia.
Source:
PloS one [PLoS One] 2020 Apr 16; Vol. 15 (4), pp. e0231731. Date of Electronic Publication: 2020 Apr 16 (Print Publication: 2020).
Publication Type:
Journal Article; Research Support, Non-U.S. Gov't
Language:
English
Journal Info:
Publisher: Public Library of Science Country of Publication: United States NLM ID: 101285081 Publication Model: eCollection Cited Medium: Internet ISSN: 1932-6203 (Electronic) Linking ISSN: 19326203 NLM ISO Abbreviation: PLoS One Subsets: MEDLINE
Imprint Name(s):
Original Publication: San Francisco, CA : Public Library of Science
Entry Date(s):
Date Created: 20200417 Date Completed: 20200803 Latest Revision: 20200803
Update Code:
20250114
PubMed Central ID:
PMC7162509
DOI:
10.1371/journal.pone.0231731
PMID:
32298360
Database:
MEDLINE

Weitere Informationen

Software systems are often developed in such a way that good practices in the object-oriented paradigm are not met, causing the occurrence of specific disharmonies which are sometimes called code smells. Design patterns catalogue best practices for developing object-oriented software systems. Although code smells and design patterns are widely divergent, there might be a co-occurrence relation between them. The objective of this paper is to empirically evaluate if the presence of design patterns is related to the presence of code smells at different granularity levels. We performed an empirical study using 20 design patterns and 13 code smells in ten small-size to medium-size, open source Java-based systems. We applied statistical analysis and association rules. Results confirm that classes participating in design patterns have less smell-proneness and smell frequency than classes not participating in design patterns. We also noticed that every design pattern category act in the same way in terms of smell-proneness in the subject systems. However, we observed, based on the association rules learning and the proposed validation technique, that some patterns may be associated with certain smells in some cases. For instance, Command patterns can co-occur with God Class, Blob and External Duplication smell.

NO authors have competing interests