The validation of design pattern implementations to identify pattern violations has gained more relevance as part of re-engineering processes in order to preserve, extend, reuse software projects in rapid development environments. If design pattern implementations do not conform to their definitions, they are considered a violation. Software aging and the lack of experience of developers are the origins of design pattern violations. It is important to check the correctness of the design pattern implementations against some predefined characteristics to detect and to correct violations, thus, to reduce costs. Currently, several tools have been developed to detect design pattern instances, but there has been little work done in creating an automated tool to identify and validate design pattern violations. In this paper we propose a Design Pattern Violations Identification and Assessment (DPVIA) tool, which has the ability to identify software design pattern violations and report the conformance score of pattern instance implementations towards a set of predefined characteristics for any design pattern definition whether Gang of Four (GoF) design patterns by [1]; or custom pattern by software developer. Moreover, we have verified the validity of the proposed tool using two evaluation experiments and the results were manually checked. Finally, in order to assess the functionality of the proposed tool, it is evaluated with a data-set containing 5,679,964 Lines of Code among 28,669 in 15 open-source projects, with a large and small size of open-source projects that extensively and systematically employing design patterns, to determine design pattern violations and suggest refactoring solutions, thus keeping costs of software evolution. The results can be used by software architects to develop best practices while using design patterns.
Furthermore, Naouel @cite_3 defined a taxonomy of potential design pattern defects and conducted an empirical study to investigate their existence. The authors defined design pattern defects as errors occurring in the design of the software that come from the absence or the bad use of design patterns. The taxonomy includes the following four types of defects: is a design pattern that has not been well conforming with GoF @cite_7 definition but that is not erroneous. is a distorted form of a design motif which is harmful for the quality of the code. is when a design is missing a needed design pattern. According to GoF @cite_7 , missing patterns generates poor design. is the over use of design patterns in a software design. Later on, Izurieta cooperated with other researchers to obtain better comprehensions of patterns decay. Afterwards, Dale and Izurieta @cite_1 proposed study on impacts of design patterns decay on quality of project.
@cite_1 @cite_7 @cite_3
1975335185 1649645444
Context Software systems need to be of high enough quality to enable growth and stability. Goal The purpose of this research is to study the effects of code changes that violate a design pattern's intended role on the quality of a project. Method To investigate this problem, we have developed a grime injector to model grime growth, a form of design pattern decay, on Java projects. We use SonarQube's technical debt software to compare the technical debt scores of six different types of modular grime. These six types can be classified along three major dimensions: strength, scope, and direction. Results We find that the strength dimension is the most important contributor to the quality of a design and that temporary grime results in higher technical debt scores than persistent grime. Conclusion This knowledge helps with design decisions that help manage a project's technical debt. The book is an introduction to the idea of design patterns in software engineering, and a catalog of twenty-three common patterns. The nice thing is, most experienced OOP designers will find out they've known about patterns all along. It's just that they've never considered them as such, or tried to centralize the idea behind a given pattern so that it will be easily reusable.