Thex: Mining Metapatterns in Java - Posnett, Daryl; Bird, Christian; Devanbu, Premkumar (Proceedings of the Seventh Working Conference on Mining Software Repositories, 2010)
Design patterns are codified solutions to common object-oriented design (OOD) problems in software development. One of the proclaimed benefits of the use of design patterns is that they decouple functionality and enable different parts of a system to change frequently without undue disruption throughout the system. These OOD patterns have received a wealth of attention in the research community since their introduction; however, identifying them in source code is a difficult problem. In contrast, metapatterns have similar effects on software design, by enabling portions of the system to be extended or modified easily, but are purely structural in nature, and thus easier to detect. Our long-term goal is to evaluate the effects of different OOD patterns on coordination in software teams as well as outcomes such as developer productivity and software quality. In this paper we present Thex, a metapattern detector which scales to large codebases and works on any Java bytecode. We evaluate Thex by examining its performance on codebases with known design patterns (and therefore metapatterns) and find that it performs quite well, with recall of over 90%.