@ericbouwers

Micro patterns in Java code

, and . OOPSLA '05: Proceedings of the 20th annual ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, page 97--116. San Diego, CA, USA, ACM, (2005)
DOI: http://doi.acm.org/10.1145/1094811.1094819

Abstract

Micro patterns are similar to design patterns, except that micro patterns are stand at a lower, closer to the implementation, level of abstraction. Micro patterns are also unique in that they are mechanically recognizable, since each such pattern can be expressed as a formal condition on the structure of a class.This paper presents a catalog of 27 micro-patterns defined on Java classes and interfaces. The catalog captures a wide spectrum of common programming practices, including a particular and (intentionally restricted) use of inheritance, immutability, data management and wrapping, restricted creation, and emulation of procedural-, modular-, and even functional- programming paradigms with object oriented constructs. Together, the patterns present a set of prototypes after which a large portion of all Java classes and interfaces are modeled. We provide empirical indication that this portion is as high as 75\%.A statistical analysis of occurrences of micro patterns in a large software corpus, spanning some 70,000 Java classes drawn from a rich set of application domains, shows, with high confidence level that the use of these patterns is not random. These results indicate consciousness and discernible design decisions, which are sustained in the software evolution. With high confidence level, we can also show that the use of these patterns is tied to the specification, or the purpose, that the software realizes.The traceability, abundance and the statistical significance of micro pattern occurrence raise the hope of using the classification of software into these patterns for a more founded appreciation of its design and code quality.

Description

Thorough statistical analyses Good description of set-up Works on class files Same project with different versions used in caseStudy Future work links to software quality Has link to architectural smell, 'Function Pointer' pattern is one smell. See: Identifying Architectural Bad Smells by Joshua Garcia, Daniel Popescu

Links and resources

Tags

community

  • @sjbutler
  • @ericbouwers
  • @dblp
@ericbouwers's tags highlighted