Identification of behavioural and creational design motifs through dynamic analysis

Janice Ka‐Yee Ng, Yann‐Gaël Guéhéneuc, Giuliano Antoniol · Journal of Software Maintenance and Evolution Research and Practice · 2009

Abstract Design patterns offer design motifs, solutions to object‐oriented design problems. Design motifs lead to well‐structured designs and thus are believed to ease software maintenance. However, after use, they are often ‘lost’ and are consequently of little help during program comprehension and other maintenance activities. Therefore, several works proposed design pattern identification approaches to recover occurrences of the motifs. These approaches mainly used the structure and organization of classes as input. Consequently, they have a low precision when considering behavioural and creational motifs, which pertain to the assignment of responsibilities and the collaborations among objects at runtime. We propose MoDeC, an approach to describe behavioural and creational motifs as collaborations among objects in the form of scenario diagrams. We identify these motifs using dynamic analysis and constraint programming. Using a proof‐of‐concept implementation of MoDeC and different scenarios for five other Java programs andBuilder,Command, andVisitor, we show that MoDeC has a better precision than the state‐of‐the‐art static approaches. Copyright © 2009 John Wiley & Sons, Ltd.

Read the paper · More papers on PaperTik