The Effect of GoF Design Patterns on Stability: A Case Study

Author(s): Apostolos Ampatzoglou, Alexander Chatzigeorgiou, Sofia Charalampidou, Paris Avgeriou
Venue: IEEE Transactions on Software Engineering
Date: 2015

Type of Experiement: Case Study
Sample Size: 65000
Class/Experience Level: Professional, Other
Participant Selection: data acquired from percerons.com
Data Collection Method: Code Metric

Quality
3

This study focuses on evaluating how often and how major the changes are on classes that incorporate the Gang of Four design patterns. The goal is to determine which patterns cause classes to become more unstable. The paper defines stability as "characterizing the sensitivity to change of a given system that is the negative impact that may be caused by system changes", meaning that classes with high stability do not experience change propagation when other code is added.

Many studies concerning design patterns' effects on have considered all types of changes, including changes from new requirements as well as changes from debugging. This study aims to focus solely on the relationship between design patterns and change propagation, i.e. how volatile the classes incorporating the design patterns are when other code changes occur.

The context of the study is open source software. In order to gather as many cases as possible, they used a software engineering repository that documents design pattern occurrences in open-source software, which provided information about 65,000 Java classes. The repository is created using software that automatically finds design pattern usages.

The results determined that the instability of classes is weakly correlated to the number of patterns the class incorporates. A the number of patterns increases, so does the instability. However, the number of classes that did not incorporate design patterns also experienced similar levels of instability. The results also determined that different design patterns correlate with different levels of instability. For example class incorporating singleton, facade, mediator, observer, composite, and decorator are the most resistant to change propagation.

0