SlideShare una empresa de Scribd logo
1 de 37
Descargar para leer sin conexión
Playing Roles in Design Patterns:
           An Empirical Descriptive and
                  Analytic Study

                 Foutse Khomh, Yann-Gaël Guéhéneuc,
                         and Giuliano Antoniol
                                                  ICSM’09
                                                 2009/09/22



Ptidej Team – OO Programs Quality Evaluation and Enhancement using Patterns
Department of Computer Science and Operations Research
University of Montréal, Québec, Canada                                        © Khomh, 2009
Context

        Design patterns are proven solutions to
        recurrent design problems

        Classes in a program may play one or
        more roles in one or more design
        patterns


2/32
Motivation                       (1/2)
        Some authors like Bieman and
        Di Penta showed that classes playing
        some role(s) in one design motif are
        more complex and–or change-prone
        than classes playing no roles

        Previous works only considered classes
        playing no role or some roles in design
3/32
        motifs
Motivation                          (2/2)

        Study the the impact on classes of
        playing one role in a motif or two roles in
        two different motifs wrt. playing zero role

        Show how some previous work on
        design patterns could benefit from this
        novel fine-grain perspective

4/32
Outline
        Study Definition
        Study Design
        Study Results
        Revisiting Previous Work
        Conclusion and Future Work




5/32
Study Definition
        Goal: study classes playing zero, one, or two
        roles in some design motifs.

        Quality focus: is that playing zero, one, or two
        roles impact differently classes.

        The perspective: is that both researchers
        and practitioners should be aware of the
        impact of playing roles on classes to make
        inform design and implementation choices.
6/32
Objects: Programs

        ArgoUML v0.18.1
        Azureus v2.1.0.0
        Eclipse JDT Core plug-in v2.1.2
        JHotDraw v5.4b2
        Xalan v2.7.0
        Xerces v1.4.4

7/32
Objects: Motifs and their Roles

              Pattern     Main roles
              Command     Command, Invoker

              Composite   Component, Composite

              Decorator   Component, Decorator

              Observer    Observer, Subject

              Singleton   Singleton

              State       Context, State




8/32
Objects: Selection of Roles

        We study only main roles because they
        are most likely to impact classes

        They allow us to concentrate on a fewer
        number of roles during the manual
        validation


9/32
Objects: Selection of Pairs
         We exclude pairs with the same role because
         identical roles in different motifs have similar
         characteristics.

         We exclude pairs involving roles from the
         same motif because a class playing both the
         roles of Composite.Component and
         Composite.Composite are degenerated case

         Consequently, we retain 45 possible pairs
10/32
Study Design

         Research questions
         – Descriptive
           • RQ1: What is the proportion of classes playing
             zero, one, or two roles in some motif(s)?
         – Analytic
           • RQ2: What are the internal characteristics of a
             class that are the most impacted by playing one
             or two roles wrt. zero role?
           • RQ3: What are the external characteristics of a
             class that are the most impacted by playing one
11/32
             or two roles wrt. zero role?
Study Design

         Null hypotheses
         – H0mi/j: the distribution of the values of
           metric m for the classes playing i ∈ [1, 2]
           role (s) is similar to that of classes playing j
           ∈ [0, 1] and j ≠ i role




12/32
Descriptive Research Question (1/2)

         Analysis method
          – Selection of a population of programs
          – Computation of classes playing zero, one,
            and two roles with our identification
            approach DeMIMA
          – Computation of the accuracy of our
            approach through manual validation
          – Estimation of the proportion of one and two
            roles
13/32
Descriptive Research Question (2/2)

         Result of RQ1
          – Classes playing
            one or two roles
            do exist in
            programs and are
            not negligible




14/32
Analytic Research Question (1/12)

         Analysis method
          – We use the Wilcoxon rank-sum test
          – We compute for each metric and each pair
            of samples (0-role, 1-role), (0-role, 2-roles),
            and (1-role, 2-role), the p-values for the
            corresponding null hypotheses



15/32
Analytic Research Question (2/12)

         Independent variables
          – Three samples of classes playing zero,
            one, and two roles in design motifs
          – We name these samples 0-role sample,
            1-role sample, and 2-role sample


         BUT problem of the Oracle
          – Use of samples
16/32
Analytic Research Question (3/12)

         Sample size
          – We compute the sample size in two steps
            • First we assume the normality of the population
              and compute for a two-sample t-test
            • We adjust this size based on the Asymptotic
              Relative Efficiency (ARE)


          – We obtain a sample size of 58

17/32
Analytic Research Question (4/12)

         Sample size
          – We distribute the sample size along the
            strata formed by the six programs




18/32
Analytic Research Question (5/12)
                Building of the Samples
                                             Population of classes playing
              Manually validated sample of   0 roles in some design motifs
              0-role classes




        Subset of the classes
        in the general
        population that has
        been manually
        studied to identify 0-
        role classes




                                              Set of all classes and
19/32
                                              interfaces belonging to the 6
                                              programs
Analytic Research Question (6/12)
         Building of the samples
          – We manually validated 238 classes
            detected by DeMIMA as playing roles in a
            design pattern

          – Each class was marked as true when it
            played one role (respectively, two roles) or
            false else
             • 88 classes played 1 role
             • 69 classes played 2 roles
             • 81 classes was playing no roles
20/32
Analytic Research Question (7/12)

         Parameters of the study
          – We obtained the following parameters for
            our study
            •   Power: 0.8 (typical)
            •   Significance level: 0.05 (typical)
            •   Minimum effect size: 0.58 (medium)
            •   Sizes of the samples: 58 classes



21/32
Analytic Research Question (8/12)
         Dependent variables
          – Internal Characteristics: 56 different metrics from
            the literature
             • Briand et al.’s class method import and export coupling
             • Chidamber and Kemerer’s Coupling Between Objects
               (CBO), Lack of Cohesion in Methods (LCOM5), and
               Weighted Method Count (WMC)
             • Hitz and Montazeri ‘C’ connectivity of a class
             • Lorenz and Kidd numbers of new, inherited, and
               overridden methods and total number of methods.
             • McCabe’s Cyclomatic Complexity Metric (CC)
             • Tegarden et al.’s numbers of hierarchical levels below a
22/32          class and class-to-leaf depth
Analytic Research Question (9/12)

         Dependent variables
          – External Characteristics: Change-
            proneness of classes in this study
            • Computed the numbers and frequencies of past
              and future changes per class.




23/32
Analytic Research Question (10/12)
        Results RQ2




        Not significant (8), Significant   29   48   26

24/32
Analytic Research Question (11/12)
           Results RQ2




25/32   Expected more inheritance and connection   Shallow inheritance tree
Analytic Research Question (12/12)
          Results RQ3




           – Playing roles do impact the number of changes as well as
             the frequencies of the changes.

           – Confirming previous studies that playing roles has a major
             impact on change-proneness.

           – However, there is no significance difference between playing
26/32        one role and two roles for change-proneness.
Revisiting previous work
         Bieman and McNatt’s Work. Our result
         confirm their claim that design motifs impact
         the cohesion and coupling of programs.

         Hannemann and Kicazles’ Work
         – The decrease in cohesion and increase in
           coupling may suggest that design motif-related
           methods may be orthogonal to the responsibilities
           of the classes.
         – Confirming that design motifs are often “cross-
           cutting concern” that could benefit from being
           “separated” using, for example, aspect-oriented
27/32      programming.
Revisiting previous work
         Di Penta et al.’s Work. We replicate their
         study and found that:
         – Their results on the change-proneness of
           classes playing roles in design motifs was
           in large part due to classes playing 2 roles.
         – Classes playing 2 roles change 1.52 times
           more than classes playing one role.
         – Developers should be careful with classes
           playing roles, in particular those playing
           two roles.
28/32
Conclusion                                   (1/2)
         We answered the research questions
         – RQ1. In average, 8.24% (respectively 17.81%) of
           the classes of the six studied programs played
           one role (respectively two roles) in some motifs.

         – RQ2. There is a significant increase in many
           metric values, in particular for classes playing two
           roles. Confirming a posteriori the warning
           addressed to the community by Bieman, Beck,
           and others on the use of design patterns.

29/32
Conclusion                             (2/2)

         – RQ3. There is a significant increase in the
           frequencies and numbers of changes of
           classes playing two roles.

         – We confirmed our samples on previous
           results.

         – We justify the usefulness of this study by
           revisiting previous work.
30/32
Future work

         We plan to replicate this study on
         – Other motifs and programs
         – Classes playing three roles and more to
           confirm its generalisability
         – Analyse the semantic of classes playing
           roles in motifs



31/32
Questions




         Thank you for listening
32/32
Ranking Design Motif Occurrences
        We get inspiration from previous works by Antoniol
         et al. [1], Gueheneuc et al. [11], and Jahnke et al.
         [15] to use the study results to rank occurrences.

          We assign to each class in a program its probability to
          play one or more roles in a design motif using its
          metrics values.

          From the probability of classes, we assign a
          probability to an occurrence.


33/32
Ranking Design Motif Occurrences
          We apply this naive approach using the metrics CAM, CBO,
          LCOM5, McCabe, MOA, NAD, NMO, SIX, and WMC.

              This metrics have proven in this study to be the most discriminating
              of classes playing 0, 1, and 2.
              We choose




        This approach on JHotDraw v5.1, and the occurrences of
          Decorator detected by DeMIMA leaded to 100% precision
          and recall on the first occurrence, to be compared to the
          previously reported 7.7% precision and 100% recall.

34/32
Ranking Design Motif Occurrences
        Comparison with DeMIMA




35/32
Conclusion                          (2/2)
         We justify the usefulness of this study by
         revisiting previous work
         We propose a naive approach to rank
         occurrences which leaded to an increase
         in precision and recall
         Extending on this naïve approach, a new
         family of design pattern identification
         approaches could be designed to
         include the knowledge of the numbers of
36/32
         roles played by classes
Future work
         We plan to replicate this study on other
         motifs and programs as well as study
         classes playing three roles and more to
         confirm its generalisability

         We also plan to further study the ranking of
         occurrences using
         –   Other a more sophisticated approach,
         –   Other identification approaches,
         –   Other programs,
         –   Also, the use of Bayesian beliefs networks to
37/32        assign probabilities

Más contenido relacionado

La actualidad más candente

Influence of the population structure on the performance of an Agent-Based Ev...
Influence of the population structure on the performance of an Agent-Based Ev...Influence of the population structure on the performance of an Agent-Based Ev...
Influence of the population structure on the performance of an Agent-Based Ev...Juan J. Merelo
 
Evaluation of subjective answers using glsa enhanced with contextual synonymy
Evaluation of subjective answers using glsa enhanced with contextual synonymyEvaluation of subjective answers using glsa enhanced with contextual synonymy
Evaluation of subjective answers using glsa enhanced with contextual synonymyijnlc
 
Nonlinear Programming: Theories and Algorithms of Some Unconstrained Optimiza...
Nonlinear Programming: Theories and Algorithms of Some Unconstrained Optimiza...Nonlinear Programming: Theories and Algorithms of Some Unconstrained Optimiza...
Nonlinear Programming: Theories and Algorithms of Some Unconstrained Optimiza...Dr. Amarjeet Singh
 
Design Principles of Advanced Task Elicitation Systems
Design Principles of Advanced Task Elicitation SystemsDesign Principles of Advanced Task Elicitation Systems
Design Principles of Advanced Task Elicitation SystemsProf. Dr. Alexander Maedche
 
Design theorizing ecis practise workshop 09062012
Design theorizing ecis practise workshop 09062012Design theorizing ecis practise workshop 09062012
Design theorizing ecis practise workshop 09062012Matti Rossi
 
The+application+of+irt+using+the+rasch+model presnetation1
The+application+of+irt+using+the+rasch+model presnetation1The+application+of+irt+using+the+rasch+model presnetation1
The+application+of+irt+using+the+rasch+model presnetation1Carlo Magno
 
Feature selection for classification
Feature selection for classificationFeature selection for classification
Feature selection for classificationefcastillo744
 
Kamelia Aryafar: Musical Genre Classification Using Sparsity-Eager Support Ve...
Kamelia Aryafar: Musical Genre Classification Using Sparsity-Eager Support Ve...Kamelia Aryafar: Musical Genre Classification Using Sparsity-Eager Support Ve...
Kamelia Aryafar: Musical Genre Classification Using Sparsity-Eager Support Ve...pamselle
 
TAO DAYS - Challenges of Modern Computer Based Assessment
TAO DAYS - Challenges of Modern Computer Based AssessmentTAO DAYS - Challenges of Modern Computer Based Assessment
TAO DAYS - Challenges of Modern Computer Based AssessmentOpen Assessment Technologies
 

La actualidad más candente (11)

Influence of the population structure on the performance of an Agent-Based Ev...
Influence of the population structure on the performance of an Agent-Based Ev...Influence of the population structure on the performance of an Agent-Based Ev...
Influence of the population structure on the performance of an Agent-Based Ev...
 
Evaluation of subjective answers using glsa enhanced with contextual synonymy
Evaluation of subjective answers using glsa enhanced with contextual synonymyEvaluation of subjective answers using glsa enhanced with contextual synonymy
Evaluation of subjective answers using glsa enhanced with contextual synonymy
 
Nonlinear Programming: Theories and Algorithms of Some Unconstrained Optimiza...
Nonlinear Programming: Theories and Algorithms of Some Unconstrained Optimiza...Nonlinear Programming: Theories and Algorithms of Some Unconstrained Optimiza...
Nonlinear Programming: Theories and Algorithms of Some Unconstrained Optimiza...
 
Malhotra03
Malhotra03Malhotra03
Malhotra03
 
Design Principles of Advanced Task Elicitation Systems
Design Principles of Advanced Task Elicitation SystemsDesign Principles of Advanced Task Elicitation Systems
Design Principles of Advanced Task Elicitation Systems
 
Design theorizing ecis practise workshop 09062012
Design theorizing ecis practise workshop 09062012Design theorizing ecis practise workshop 09062012
Design theorizing ecis practise workshop 09062012
 
The+application+of+irt+using+the+rasch+model presnetation1
The+application+of+irt+using+the+rasch+model presnetation1The+application+of+irt+using+the+rasch+model presnetation1
The+application+of+irt+using+the+rasch+model presnetation1
 
Feature selection for classification
Feature selection for classificationFeature selection for classification
Feature selection for classification
 
Kamelia Aryafar: Musical Genre Classification Using Sparsity-Eager Support Ve...
Kamelia Aryafar: Musical Genre Classification Using Sparsity-Eager Support Ve...Kamelia Aryafar: Musical Genre Classification Using Sparsity-Eager Support Ve...
Kamelia Aryafar: Musical Genre Classification Using Sparsity-Eager Support Ve...
 
TAO DAYS - Challenges of Modern Computer Based Assessment
TAO DAYS - Challenges of Modern Computer Based AssessmentTAO DAYS - Challenges of Modern Computer Based Assessment
TAO DAYS - Challenges of Modern Computer Based Assessment
 
35 38
35 3835 38
35 38
 

Destacado

Epi chapter 4
Epi chapter 4Epi chapter 4
Epi chapter 4emmoss21
 
Infertility; Causes and Management
Infertility; Causes and ManagementInfertility; Causes and Management
Infertility; Causes and ManagementSami Shawer
 
Descriptive and Analytical Epidemiology
Descriptive and Analytical Epidemiology Descriptive and Analytical Epidemiology
Descriptive and Analytical Epidemiology coolboy101pk
 
The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017LinkedIn
 

Destacado (7)

Quantitative study
Quantitative study Quantitative study
Quantitative study
 
Epi chapter 4
Epi chapter 4Epi chapter 4
Epi chapter 4
 
Analytic studies
Analytic studiesAnalytic studies
Analytic studies
 
Infertility; Causes and Management
Infertility; Causes and ManagementInfertility; Causes and Management
Infertility; Causes and Management
 
Infertility
InfertilityInfertility
Infertility
 
Descriptive and Analytical Epidemiology
Descriptive and Analytical Epidemiology Descriptive and Analytical Epidemiology
Descriptive and Analytical Epidemiology
 
The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017
 

Similar a ICSM09.ppt

ECOOP05 QAOOSEb.ppt
ECOOP05 QAOOSEb.pptECOOP05 QAOOSEb.ppt
ECOOP05 QAOOSEb.pptPtidej Team
 
Presentation based on "Hierarchical Bayesian Models of Subtask Learning. Angl...
Presentation based on "Hierarchical Bayesian Models of Subtask Learning. Angl...Presentation based on "Hierarchical Bayesian Models of Subtask Learning. Angl...
Presentation based on "Hierarchical Bayesian Models of Subtask Learning. Angl...Jeromy Anglim
 
The effect of number of concepts on readability of schemas 2
The effect of number of concepts on readability of schemas 2The effect of number of concepts on readability of schemas 2
The effect of number of concepts on readability of schemas 2Saman Sara
 
Validation of Design Tools-PPT for CEDAR Meeting-04-15-2016
Validation of Design Tools-PPT for CEDAR Meeting-04-15-2016Validation of Design Tools-PPT for CEDAR Meeting-04-15-2016
Validation of Design Tools-PPT for CEDAR Meeting-04-15-2016Varun Singh
 
Cs6502 ooad-cse-vst-au-unit-v dce
Cs6502 ooad-cse-vst-au-unit-v dceCs6502 ooad-cse-vst-au-unit-v dce
Cs6502 ooad-cse-vst-au-unit-v dcetagoreengineering
 
Optimizing Market Segmentation
Optimizing Market SegmentationOptimizing Market Segmentation
Optimizing Market SegmentationRobert Colner
 
Thesis+of+zohreh+sharafi.ppt
Thesis+of+zohreh+sharafi.pptThesis+of+zohreh+sharafi.ppt
Thesis+of+zohreh+sharafi.pptPtidej Team
 
Naver learning to rank question answer pairs using hrde-ltc
Naver learning to rank question answer pairs using hrde-ltcNaver learning to rank question answer pairs using hrde-ltc
Naver learning to rank question answer pairs using hrde-ltcNAVER Engineering
 
Promise 2011: "A Principled Evaluation of Ensembles of Learning Machines for ...
Promise 2011: "A Principled Evaluation of Ensembles of Learning Machines for ...Promise 2011: "A Principled Evaluation of Ensembles of Learning Machines for ...
Promise 2011: "A Principled Evaluation of Ensembles of Learning Machines for ...CS, NcState
 
An Automatic Question Paper Generation : Using Bloom's Taxonomy
An Automatic Question Paper Generation : Using Bloom's   TaxonomyAn Automatic Question Paper Generation : Using Bloom's   Taxonomy
An Automatic Question Paper Generation : Using Bloom's TaxonomyIRJET Journal
 
Patterns of Interaction Description Including Aspects of Constraints
Patterns of Interaction Description Including Aspects of ConstraintsPatterns of Interaction Description Including Aspects of Constraints
Patterns of Interaction Description Including Aspects of ConstraintsJuan Manuel Gonzalez Calleros
 
Software Systems as Cities: a Controlled Experiment
Software Systems as Cities: a Controlled ExperimentSoftware Systems as Cities: a Controlled Experiment
Software Systems as Cities: a Controlled ExperimentRichard Wettel
 
Model Manipulation for End-User Modelers
Model Manipulation for End-User ModelersModel Manipulation for End-User Modelers
Model Manipulation for End-User ModelersVlad Acretoaie
 
OO Development 1 - Introduction to Object-Oriented Development
OO Development 1 - Introduction to Object-Oriented DevelopmentOO Development 1 - Introduction to Object-Oriented Development
OO Development 1 - Introduction to Object-Oriented DevelopmentRandy Connolly
 
Low rank models for recommender systems with limited preference information
Low rank models for recommender systems with limited preference informationLow rank models for recommender systems with limited preference information
Low rank models for recommender systems with limited preference informationEvgeny Frolov
 
Technological Problem Solving Seminar
Technological Problem Solving SeminarTechnological Problem Solving Seminar
Technological Problem Solving SeminarDavid Morrison-Love
 
Kdd'20 presentation 223
Kdd'20 presentation 223Kdd'20 presentation 223
Kdd'20 presentation 223Manh Tuan Do
 

Similar a ICSM09.ppt (20)

Icsm09.ppt
Icsm09.pptIcsm09.ppt
Icsm09.ppt
 
ECOOP05 QAOOSEb.ppt
ECOOP05 QAOOSEb.pptECOOP05 QAOOSEb.ppt
ECOOP05 QAOOSEb.ppt
 
Thesis Proposal Presentation
Thesis Proposal PresentationThesis Proposal Presentation
Thesis Proposal Presentation
 
Presentation based on "Hierarchical Bayesian Models of Subtask Learning. Angl...
Presentation based on "Hierarchical Bayesian Models of Subtask Learning. Angl...Presentation based on "Hierarchical Bayesian Models of Subtask Learning. Angl...
Presentation based on "Hierarchical Bayesian Models of Subtask Learning. Angl...
 
The effect of number of concepts on readability of schemas 2
The effect of number of concepts on readability of schemas 2The effect of number of concepts on readability of schemas 2
The effect of number of concepts on readability of schemas 2
 
Validation of Design Tools-PPT for CEDAR Meeting-04-15-2016
Validation of Design Tools-PPT for CEDAR Meeting-04-15-2016Validation of Design Tools-PPT for CEDAR Meeting-04-15-2016
Validation of Design Tools-PPT for CEDAR Meeting-04-15-2016
 
Cs6502 ooad-cse-vst-au-unit-v dce
Cs6502 ooad-cse-vst-au-unit-v dceCs6502 ooad-cse-vst-au-unit-v dce
Cs6502 ooad-cse-vst-au-unit-v dce
 
Optimizing Market Segmentation
Optimizing Market SegmentationOptimizing Market Segmentation
Optimizing Market Segmentation
 
Thesis+of+zohreh+sharafi.ppt
Thesis+of+zohreh+sharafi.pptThesis+of+zohreh+sharafi.ppt
Thesis+of+zohreh+sharafi.ppt
 
Naver learning to rank question answer pairs using hrde-ltc
Naver learning to rank question answer pairs using hrde-ltcNaver learning to rank question answer pairs using hrde-ltc
Naver learning to rank question answer pairs using hrde-ltc
 
Promise 2011: "A Principled Evaluation of Ensembles of Learning Machines for ...
Promise 2011: "A Principled Evaluation of Ensembles of Learning Machines for ...Promise 2011: "A Principled Evaluation of Ensembles of Learning Machines for ...
Promise 2011: "A Principled Evaluation of Ensembles of Learning Machines for ...
 
An Automatic Question Paper Generation : Using Bloom's Taxonomy
An Automatic Question Paper Generation : Using Bloom's   TaxonomyAn Automatic Question Paper Generation : Using Bloom's   Taxonomy
An Automatic Question Paper Generation : Using Bloom's Taxonomy
 
Patterns of Interaction Description Including Aspects of Constraints
Patterns of Interaction Description Including Aspects of ConstraintsPatterns of Interaction Description Including Aspects of Constraints
Patterns of Interaction Description Including Aspects of Constraints
 
Software Systems as Cities: a Controlled Experiment
Software Systems as Cities: a Controlled ExperimentSoftware Systems as Cities: a Controlled Experiment
Software Systems as Cities: a Controlled Experiment
 
Model Manipulation for End-User Modelers
Model Manipulation for End-User ModelersModel Manipulation for End-User Modelers
Model Manipulation for End-User Modelers
 
CASCON06.ppt
CASCON06.pptCASCON06.ppt
CASCON06.ppt
 
OO Development 1 - Introduction to Object-Oriented Development
OO Development 1 - Introduction to Object-Oriented DevelopmentOO Development 1 - Introduction to Object-Oriented Development
OO Development 1 - Introduction to Object-Oriented Development
 
Low rank models for recommender systems with limited preference information
Low rank models for recommender systems with limited preference informationLow rank models for recommender systems with limited preference information
Low rank models for recommender systems with limited preference information
 
Technological Problem Solving Seminar
Technological Problem Solving SeminarTechnological Problem Solving Seminar
Technological Problem Solving Seminar
 
Kdd'20 presentation 223
Kdd'20 presentation 223Kdd'20 presentation 223
Kdd'20 presentation 223
 

Más de Ptidej Team

From IoT to Software Miniaturisation
From IoT to Software MiniaturisationFrom IoT to Software Miniaturisation
From IoT to Software MiniaturisationPtidej Team
 
Presentation by Lionel Briand
Presentation by Lionel BriandPresentation by Lionel Briand
Presentation by Lionel BriandPtidej Team
 
Manel Abdellatif
Manel AbdellatifManel Abdellatif
Manel AbdellatifPtidej Team
 
Azadeh Kermansaravi
Azadeh KermansaraviAzadeh Kermansaravi
Azadeh KermansaraviPtidej Team
 
CSED - Manel Grichi
CSED - Manel GrichiCSED - Manel Grichi
CSED - Manel GrichiPtidej Team
 
Cristiano Politowski
Cristiano PolitowskiCristiano Politowski
Cristiano PolitowskiPtidej Team
 
Will io t trigger the next software crisis
Will io t trigger the next software crisisWill io t trigger the next software crisis
Will io t trigger the next software crisisPtidej Team
 
Thesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptThesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptPtidej Team
 
Thesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptThesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptPtidej Team
 

Más de Ptidej Team (20)

From IoT to Software Miniaturisation
From IoT to Software MiniaturisationFrom IoT to Software Miniaturisation
From IoT to Software Miniaturisation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation by Lionel Briand
Presentation by Lionel BriandPresentation by Lionel Briand
Presentation by Lionel Briand
 
Manel Abdellatif
Manel AbdellatifManel Abdellatif
Manel Abdellatif
 
Azadeh Kermansaravi
Azadeh KermansaraviAzadeh Kermansaravi
Azadeh Kermansaravi
 
Mouna Abidi
Mouna AbidiMouna Abidi
Mouna Abidi
 
CSED - Manel Grichi
CSED - Manel GrichiCSED - Manel Grichi
CSED - Manel Grichi
 
Cristiano Politowski
Cristiano PolitowskiCristiano Politowski
Cristiano Politowski
 
Will io t trigger the next software crisis
Will io t trigger the next software crisisWill io t trigger the next software crisis
Will io t trigger the next software crisis
 
MIPA
MIPAMIPA
MIPA
 
Thesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptThesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.ppt
 
Thesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptThesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.ppt
 
Medicine15.ppt
Medicine15.pptMedicine15.ppt
Medicine15.ppt
 
Qrs17b.ppt
Qrs17b.pptQrs17b.ppt
Qrs17b.ppt
 
Icpc11c.ppt
Icpc11c.pptIcpc11c.ppt
Icpc11c.ppt
 
Icsme16.ppt
Icsme16.pptIcsme16.ppt
Icsme16.ppt
 
Msr17a.ppt
Msr17a.pptMsr17a.ppt
Msr17a.ppt
 
Icsoc15.ppt
Icsoc15.pptIcsoc15.ppt
Icsoc15.ppt
 

Último

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 

Último (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 

ICSM09.ppt

  • 1. Playing Roles in Design Patterns: An Empirical Descriptive and Analytic Study Foutse Khomh, Yann-Gaël Guéhéneuc, and Giuliano Antoniol ICSM’09 2009/09/22 Ptidej Team – OO Programs Quality Evaluation and Enhancement using Patterns Department of Computer Science and Operations Research University of Montréal, Québec, Canada © Khomh, 2009
  • 2. Context Design patterns are proven solutions to recurrent design problems Classes in a program may play one or more roles in one or more design patterns 2/32
  • 3. Motivation (1/2) Some authors like Bieman and Di Penta showed that classes playing some role(s) in one design motif are more complex and–or change-prone than classes playing no roles Previous works only considered classes playing no role or some roles in design 3/32 motifs
  • 4. Motivation (2/2) Study the the impact on classes of playing one role in a motif or two roles in two different motifs wrt. playing zero role Show how some previous work on design patterns could benefit from this novel fine-grain perspective 4/32
  • 5. Outline Study Definition Study Design Study Results Revisiting Previous Work Conclusion and Future Work 5/32
  • 6. Study Definition Goal: study classes playing zero, one, or two roles in some design motifs. Quality focus: is that playing zero, one, or two roles impact differently classes. The perspective: is that both researchers and practitioners should be aware of the impact of playing roles on classes to make inform design and implementation choices. 6/32
  • 7. Objects: Programs ArgoUML v0.18.1 Azureus v2.1.0.0 Eclipse JDT Core plug-in v2.1.2 JHotDraw v5.4b2 Xalan v2.7.0 Xerces v1.4.4 7/32
  • 8. Objects: Motifs and their Roles Pattern Main roles Command Command, Invoker Composite Component, Composite Decorator Component, Decorator Observer Observer, Subject Singleton Singleton State Context, State 8/32
  • 9. Objects: Selection of Roles We study only main roles because they are most likely to impact classes They allow us to concentrate on a fewer number of roles during the manual validation 9/32
  • 10. Objects: Selection of Pairs We exclude pairs with the same role because identical roles in different motifs have similar characteristics. We exclude pairs involving roles from the same motif because a class playing both the roles of Composite.Component and Composite.Composite are degenerated case Consequently, we retain 45 possible pairs 10/32
  • 11. Study Design Research questions – Descriptive • RQ1: What is the proportion of classes playing zero, one, or two roles in some motif(s)? – Analytic • RQ2: What are the internal characteristics of a class that are the most impacted by playing one or two roles wrt. zero role? • RQ3: What are the external characteristics of a class that are the most impacted by playing one 11/32 or two roles wrt. zero role?
  • 12. Study Design Null hypotheses – H0mi/j: the distribution of the values of metric m for the classes playing i ∈ [1, 2] role (s) is similar to that of classes playing j ∈ [0, 1] and j ≠ i role 12/32
  • 13. Descriptive Research Question (1/2) Analysis method – Selection of a population of programs – Computation of classes playing zero, one, and two roles with our identification approach DeMIMA – Computation of the accuracy of our approach through manual validation – Estimation of the proportion of one and two roles 13/32
  • 14. Descriptive Research Question (2/2) Result of RQ1 – Classes playing one or two roles do exist in programs and are not negligible 14/32
  • 15. Analytic Research Question (1/12) Analysis method – We use the Wilcoxon rank-sum test – We compute for each metric and each pair of samples (0-role, 1-role), (0-role, 2-roles), and (1-role, 2-role), the p-values for the corresponding null hypotheses 15/32
  • 16. Analytic Research Question (2/12) Independent variables – Three samples of classes playing zero, one, and two roles in design motifs – We name these samples 0-role sample, 1-role sample, and 2-role sample BUT problem of the Oracle – Use of samples 16/32
  • 17. Analytic Research Question (3/12) Sample size – We compute the sample size in two steps • First we assume the normality of the population and compute for a two-sample t-test • We adjust this size based on the Asymptotic Relative Efficiency (ARE) – We obtain a sample size of 58 17/32
  • 18. Analytic Research Question (4/12) Sample size – We distribute the sample size along the strata formed by the six programs 18/32
  • 19. Analytic Research Question (5/12) Building of the Samples Population of classes playing Manually validated sample of 0 roles in some design motifs 0-role classes Subset of the classes in the general population that has been manually studied to identify 0- role classes Set of all classes and 19/32 interfaces belonging to the 6 programs
  • 20. Analytic Research Question (6/12) Building of the samples – We manually validated 238 classes detected by DeMIMA as playing roles in a design pattern – Each class was marked as true when it played one role (respectively, two roles) or false else • 88 classes played 1 role • 69 classes played 2 roles • 81 classes was playing no roles 20/32
  • 21. Analytic Research Question (7/12) Parameters of the study – We obtained the following parameters for our study • Power: 0.8 (typical) • Significance level: 0.05 (typical) • Minimum effect size: 0.58 (medium) • Sizes of the samples: 58 classes 21/32
  • 22. Analytic Research Question (8/12) Dependent variables – Internal Characteristics: 56 different metrics from the literature • Briand et al.’s class method import and export coupling • Chidamber and Kemerer’s Coupling Between Objects (CBO), Lack of Cohesion in Methods (LCOM5), and Weighted Method Count (WMC) • Hitz and Montazeri ‘C’ connectivity of a class • Lorenz and Kidd numbers of new, inherited, and overridden methods and total number of methods. • McCabe’s Cyclomatic Complexity Metric (CC) • Tegarden et al.’s numbers of hierarchical levels below a 22/32 class and class-to-leaf depth
  • 23. Analytic Research Question (9/12) Dependent variables – External Characteristics: Change- proneness of classes in this study • Computed the numbers and frequencies of past and future changes per class. 23/32
  • 24. Analytic Research Question (10/12) Results RQ2 Not significant (8), Significant 29 48 26 24/32
  • 25. Analytic Research Question (11/12) Results RQ2 25/32 Expected more inheritance and connection Shallow inheritance tree
  • 26. Analytic Research Question (12/12) Results RQ3 – Playing roles do impact the number of changes as well as the frequencies of the changes. – Confirming previous studies that playing roles has a major impact on change-proneness. – However, there is no significance difference between playing 26/32 one role and two roles for change-proneness.
  • 27. Revisiting previous work Bieman and McNatt’s Work. Our result confirm their claim that design motifs impact the cohesion and coupling of programs. Hannemann and Kicazles’ Work – The decrease in cohesion and increase in coupling may suggest that design motif-related methods may be orthogonal to the responsibilities of the classes. – Confirming that design motifs are often “cross- cutting concern” that could benefit from being “separated” using, for example, aspect-oriented 27/32 programming.
  • 28. Revisiting previous work Di Penta et al.’s Work. We replicate their study and found that: – Their results on the change-proneness of classes playing roles in design motifs was in large part due to classes playing 2 roles. – Classes playing 2 roles change 1.52 times more than classes playing one role. – Developers should be careful with classes playing roles, in particular those playing two roles. 28/32
  • 29. Conclusion (1/2) We answered the research questions – RQ1. In average, 8.24% (respectively 17.81%) of the classes of the six studied programs played one role (respectively two roles) in some motifs. – RQ2. There is a significant increase in many metric values, in particular for classes playing two roles. Confirming a posteriori the warning addressed to the community by Bieman, Beck, and others on the use of design patterns. 29/32
  • 30. Conclusion (2/2) – RQ3. There is a significant increase in the frequencies and numbers of changes of classes playing two roles. – We confirmed our samples on previous results. – We justify the usefulness of this study by revisiting previous work. 30/32
  • 31. Future work We plan to replicate this study on – Other motifs and programs – Classes playing three roles and more to confirm its generalisability – Analyse the semantic of classes playing roles in motifs 31/32
  • 32. Questions Thank you for listening 32/32
  • 33. Ranking Design Motif Occurrences We get inspiration from previous works by Antoniol et al. [1], Gueheneuc et al. [11], and Jahnke et al. [15] to use the study results to rank occurrences. We assign to each class in a program its probability to play one or more roles in a design motif using its metrics values. From the probability of classes, we assign a probability to an occurrence. 33/32
  • 34. Ranking Design Motif Occurrences We apply this naive approach using the metrics CAM, CBO, LCOM5, McCabe, MOA, NAD, NMO, SIX, and WMC. This metrics have proven in this study to be the most discriminating of classes playing 0, 1, and 2. We choose This approach on JHotDraw v5.1, and the occurrences of Decorator detected by DeMIMA leaded to 100% precision and recall on the first occurrence, to be compared to the previously reported 7.7% precision and 100% recall. 34/32
  • 35. Ranking Design Motif Occurrences Comparison with DeMIMA 35/32
  • 36. Conclusion (2/2) We justify the usefulness of this study by revisiting previous work We propose a naive approach to rank occurrences which leaded to an increase in precision and recall Extending on this naïve approach, a new family of design pattern identification approaches could be designed to include the knowledge of the numbers of 36/32 roles played by classes
  • 37. Future work We plan to replicate this study on other motifs and programs as well as study classes playing three roles and more to confirm its generalisability We also plan to further study the ranking of occurrences using – Other a more sophisticated approach, – Other identification approaches, – Other programs, – Also, the use of Bayesian beliefs networks to 37/32 assign probabilities