Identification of behavioural and creational design motifs through dynamic analysis

  • Authors:
  • Janice Ka-Yee Ng;Yann-Gaël Guéhéneuc;Giuliano Antoniol

  • Affiliations:
  • Ptidej Team and SOCCER Lab, Département de génie informatique et génie logiciel, École Polytechnique de Montréal, CP 6079 succ. Centre Ville, Montréal, QC ...;Ptidej Team and SOCCER Lab, Département de génie informatique et génie logiciel, École Polytechnique de Montréal, CP 6079 succ. Centre Ville, Montréal, QC ...;Ptidej Team and SOCCER Lab, Département de génie informatique et génie logiciel, École Polytechnique de Montréal, CP 6079 succ. Centre Ville, Montréal, QC ...

  • Venue:
  • Journal of Software Maintenance and Evolution: Research and Practice
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

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 and Builder, Command, and Visitor, we show that MoDeC has a better precision than the state-of-the-art static approaches. Copyright © 2009 John Wiley & Sons, Ltd.