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

Mahmoud Alfadel, and Khalid Aljasser, and Mohammad Alshayeb
Department of Computer Science and Software Engineering, Concordia University, Montreal, Canada.

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.

UI MeSH Term Description Entries
D011381 Programming Languages Specific languages used to prepare computer programs. Language, Programming,Languages, Programming,Programming Language
D003625 Data Collection Systematic gathering of data for a particular purpose from various sources, including questionnaires, interviews, observation, existing records, and electronic devices. The process is usually preliminary to statistical analysis of the data. Data Collection Methods,Dual Data Collection,Collection Method, Data,Collection Methods, Data,Collection, Data,Collection, Dual Data,Data Collection Method,Method, Data Collection,Methods, Data Collection
D000078332 Data Analysis Process of systematically applying statistical and/or logical techniques to describe and illustrate, condense and recap, and evaluate data (https://ori.hhs.gov/education). Analyses, Data,Analysis, Data,Data Analyses
D012984 Software Sequential operating programs and data which instruct the functioning of a digital computer. Computer Programs,Computer Software,Open Source Software,Software Engineering,Software Tools,Computer Applications Software,Computer Programs and Programming,Computer Software Applications,Application, Computer Software,Applications Software, Computer,Applications Softwares, Computer,Applications, Computer Software,Computer Applications Softwares,Computer Program,Computer Software Application,Engineering, Software,Open Source Softwares,Program, Computer,Programs, Computer,Software Application, Computer,Software Applications, Computer,Software Tool,Software, Computer,Software, Computer Applications,Software, Open Source,Softwares, Computer Applications,Softwares, Open Source,Source Software, Open,Source Softwares, Open,Tool, Software,Tools, Software
D012985 Software Design Specifications and instructions applied to the software. Flowcharts (Computer),Flow Charts (Computer),Flowcharts,Chart, Flow (Computer),Charts, Flow (Computer),Design, Software,Designs, Software,Flow Chart (Computer),Flowchart,Flowchart (Computer),Software Designs
D012986 Software Validation The act of testing the software for compliance with a standard. Software Verification,Software Validations,Software Verifications,Validation, Software,Validations, Software,Verification, Software,Verifications, Software

Related Publications

Mahmoud Alfadel, and Khalid Aljasser, and Mohammad Alshayeb
May 2002, Psychotherapie, Psychosomatik, medizinische Psychologie,
Mahmoud Alfadel, and Khalid Aljasser, and Mohammad Alshayeb
January 1987, Archives of general psychiatry,
Mahmoud Alfadel, and Khalid Aljasser, and Mohammad Alshayeb
March 1986, Archives of general psychiatry,
Mahmoud Alfadel, and Khalid Aljasser, and Mohammad Alshayeb
September 1973, Behavioral science,
Mahmoud Alfadel, and Khalid Aljasser, and Mohammad Alshayeb
January 2023, PeerJ. Computer science,
Mahmoud Alfadel, and Khalid Aljasser, and Mohammad Alshayeb
January 1947, Educational and psychological measurement,
Mahmoud Alfadel, and Khalid Aljasser, and Mohammad Alshayeb
August 2019, Proceedings of the National Academy of Sciences of the United States of America,
Mahmoud Alfadel, and Khalid Aljasser, and Mohammad Alshayeb
October 1996, Risk analysis : an official publication of the Society for Risk Analysis,
Mahmoud Alfadel, and Khalid Aljasser, and Mohammad Alshayeb
June 2021, Data in brief,
Mahmoud Alfadel, and Khalid Aljasser, and Mohammad Alshayeb
January 2006, Zeitschrift fur Psychosomatische Medizin und Psychotherapie,
Copied contents to your clipboard!