4.5 Article

What can violations of good practices tell about the relationship between GoF patterns and run-time quality attributes?

Journal

INFORMATION AND SOFTWARE TECHNOLOGY
Volume 105, Issue -, Pages 1-16

Publisher

ELSEVIER SCIENCE BV
DOI: 10.1016/j.infsof.2018.07.014

Keywords

Software architecture; GoF patterns; Design; Quality analysis; Evaluation

Funding

  1. Brazilian agency CAPES/Nuffic [034/12]
  2. Brazilian agency CNPq [204607/2013-2]
  3. Brazilian agency INCT-SEC [573963/2008-8, 2008/57870-9]
  4. Dutch agency CAPES/Nuffic [034/12]
  5. Dutch agency CNPq [204607/2013-2]
  6. Dutch agency INCT-SEC [573963/2008-8, 2008/57870-9]

Ask authors/readers for more resources

Context: GoF patterns have been extensively studied with respect to the benefit they provide as problem-solving, communication and quality improvement mechanisms. The latter has been mostly investigated through empirical studies, but some aspects of quality (esp. run-time ones) are still under-investigated. Objective: In this paper, we study if the presence of patterns enforces the conformance to good coding practices. To achieve this goal, we explore the relationship between the presence of GoF design patterns and violations of good practices related to source code correctness, performance and security, via static analysis. Method: Specifically, we exploit static analysis so as to investigate whether the number of violations of good coding practices identified on classes is related to: (a) their participation in pattern occurrences, (b) the pattern category, (c) the pattern in which they participate, and (d) their role within the pattern occurrence. To answer these questions, we performed a case study on approximately 13,000 classes retrieved from five open-source projects. Results: The obtained results suggest that classes not participating in patterns are more probable to violate good coding practices for correctness, performance and security. In a more fine-grained level of analysis, by focusing on specific patterns, we observed that patterns with more complex structure (e.g., Decorator) and pattern roles that are more change-prone (e.g., Subclasses) are more likely to be associated with a higher number of violations (up to 50 times more violations). Conclusion: This finding implies that investing in a well-thought architecture based on best practices, such as patterns, is often accompanied with cleaner code with fewer violations.

Authors

I am an author on this paper
Click your name to claim this paper and add it to your profile.

Reviews

Primary Rating

4.5
Not enough ratings

Secondary Ratings

Novelty
-
Significance
-
Scientific rigor
-
Rate this paper

Recommended

No Data Available
No Data Available