SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
Using FCA to Suggest Refactorings
    to Correct Design Defects


Naouel Moha, Jihene Rezgui, Yann-Gaël Guéhéneuc,
    Petko Valtchev, and Ghizlane El Boussaidi
          DIRO, University of Montreal, Canada


           Présenté par Ghada Gasmi

                        CLA 2006
          Oct 30 – Sept 1st , 2006, Tunis, Tunisie
Context
   Design Patterns are “good” solutions to recurring design problems

   Design Defects (DDs)
        are “bad” solutions to recurring problems
        transgress good OO (Object-Oriented) principles
           Cohesion
           Coupling


   Why it is important to detect and correct DDs ?
        DDs lessen the quality of OO architectures and impede their
        evolution and their maintenance
        Maintenance is expensive because of DDs [PER 92] : adding,
        debugging, and evolving of features are difficult
        A good software architecture without DDs: easier to understand,
        change, and thus maintain
Moha © CLA 2006         Using FCA to Suggest Refactorings to Correct Design Defects   2
Context
  An example of high-level DDs

                       Blob
                             Large controller class
                             Many fields and methods with a low cohesion*
                             Highly coupled** with data stored in associated
                             data classes


                        *Cohesion: How closely the methods (Lack of Cohesioninstance
                       variables in the class. Measure: LCOM
                                                             are related to the
                                                                                Metric)

                       **Coupling: the degree of reliance on services provided by other
                       classes.


     Bad impact : low cohesion and high coupling!

Moha © CLA 2006       Using FCA to Suggest Refactorings to Correct Design Defects   3
Overview

                  Related Work
                  Problem Description
                  Proposed Approach
                  Implementation
                  Conclusion



Moha © CLA 2006     Using FCA to Suggest Refactorings to Correct Design Defects   4
Related Work
   Huchard and LeBlanc (ASE, 2000)
        use FCA to suggest restructurations of class hierarchies
        to maximise the sharing of data structure and code through fields and
        methods


   Arévalo et al. (ICFCA, 2005)
        applied FCA to identify implicit dependencies among classes in
        program models

   None of these approaches attempts to suggest refactorings to correct
   DDs!




Moha © CLA 2006         Using FCA to Suggest Refactorings to Correct Design Defects   5
Overview

                  Related Work
                  Problem Description
                  Proposed Approach
                  Methodology
                  Validation
                  Conclusion

Moha © CLA 2006     Using FCA to Suggest Refactorings to Correct Design Defects   6
Problem Description

                  What are the problems ?
                    Lack of (semi-)automated techniques and tools
                    Lack of work on high-level DDs
                    Semi-manual detection and correction
                    The detection and correction are time-consuming and
                    error-prone activities




Moha © CLA 2006             Using FCA to Suggest Refactorings to Correct Design Defects   7
Overview

                  Related Work
                  Problem Description
                  Proposed Approach
                  Implementation

                  Conclusion



Moha © CLA 2006     Using FCA to Suggest Refactorings to Correct Design Defects   8
Proposed Approach
          We propose to apply FCA on a suitable representation of a program
          to suggest appropriate refactorings for certain DDs.



   Refactorings ?
        Change performed on the source code of a program to improve its
        internal structure without changing its external behaviour [Fowler].


   We illustrate our approach with the Blob
   Azureus version 2.3.0.6
        A peer-to-peer program
        143 Blobs for 1,449 classes (191,963 lines of code)

   We show that FCA can suggest relevant refactorings to improve the program!

Moha © CLA 2006          Using FCA to Suggest Refactorings to Correct Design Defects   9
Proposed Approach




Moha © CLA 2006   Using FCA to Suggest Refactorings to Correct Design Defects   10
Encoding Blobs into Formal Contexts 1/2
 To Identify cohesive sets of methods and fields, we define
 three formal contexts:

       K1, individuals are methods of a suspect large class and
      properties are fields of that class.
                  allows to assess the cohesion of a class because methods sharing the same fields
                  are, by definition, cohesive.

      K2, both individuals and properties are methods of the
      suspect large class.
                  highlights subsets of cohesive methods, because methods invoking the same set
                  of other methods are highly cohesive.

      K3, individuals are methods and fields of the large class and
      properties are the surrounding data classes.
                  allows to assess the coupling between the large class and its data classes.


Moha © CLA 2006                 Using FCA to Suggest Refactorings to Correct Design Defects     11
Encoding Blobs into Formal Contexts 2/2




         Context K1 linking methods of the large class to fields of the class.

Moha © CLA 2006           Using FCA to Suggest Refactorings to Correct Design Defects   12
Interpretation of Lattice Structure 1/3
    We build Lattices from the 3 contexts K1, K2, K3 to
         Interpret the inner structure of the large class
         Suggest refactorings


    We define two interpretations rules:
         Rule1: collection of cohesive and independent subsets (figure, zone2)
         Rule2: Detect large cohesive subset (figure, zone1)




Moha © CLA 2006          Using FCA to Suggest Refactorings to Correct Design Defects   13
Interpretation of Lattice Structure 2/3




Moha © CLA 2006   Using FCA to Suggest Refactorings to Correct Design Defects   14
Interpretation of Lattice Structure 3/3

          Refactorings:
            Split large class into 2 ways:
     1.     Move disjoint and cohesive subsets of methods and/or fields
            that are related to a data class.
     2.     Organise cohesive subsets that are not related to data class in
            separate classes.

            Azureus, class DHTTransportUDPImpl
                  Before the refactorings: cohesion: 0.542, coupling: 41
                  After the refactorings: cohesion: 0.278, coupling: 39




Moha © CLA 2006               Using FCA to Suggest Refactorings to Correct Design Defects   15
Overview

                  Related Work
                  Problem Description
                  Proposed Approach
                  Implementation
                  Conclusion



Moha © CLA 2006     Using FCA to Suggest Refactorings to Correct Design Defects   16
Implementation
        PADL (Pattern and Abstract-level Description Language)
            Metamodel of the tool suite Ptidej
            To model source code


        GALICIA
            Multi-tool open-source plateform for creating, visualizing, and
            storing lattices


        Both tools communicate by means of XML files
            Ptidej generates contexts in the XML format of Galicia
            Galicia tranforms the contexts into lattices




Moha © CLA 2006           Using FCA to Suggest Refactorings to Correct Design Defects   17
Overview

                  Related Work
                  Problem Description
                  Proposed Approach
                  Implementation
                  Conclusion



Moha © CLA 2006     Using FCA to Suggest Refactorings to Correct Design Defects   18
Conclusion
     DDs transgress good OO principles
         Low coupling and high cohesion

     Our approach
         Joint use of metrics and FCA to suggest refactorings to correct
         DDs
         Can be generalised to other DDs characterised by a high
         coupling and a low cohesion

     Future Work
         Fully automatic correction mechanisms
         An integrated tool plateform to support FCA-based refactorings
         Refinement of the proposed rules for lattice structure
         interpretation

Moha © CLA 2006         Using FCA to Suggest Refactorings to Correct Design Defects   19
Questions




                                      For any question,
                             please contact directly the authors at
                                             mohanaou@iro.umontreal.ca
                                              rezguiji@iro.umontreal.ca




Moha © CLA 2006   Using FCA to Suggest Refactorings to Correct Design Defects   20

Más contenido relacionado

Similar a CLA06.ppt

Tech challenges in a large scale agile project
Tech challenges in a large scale agile projectTech challenges in a large scale agile project
Tech challenges in a large scale agile project
Harald Soevik
 
Capella Based System Engineering Modelling and Multi-Objective Optimization o...
Capella Based System Engineering Modelling and Multi-Objective Optimization o...Capella Based System Engineering Modelling and Multi-Objective Optimization o...
Capella Based System Engineering Modelling and Multi-Objective Optimization o...
MehdiJahromi
 
Learning Software Performance Models for Dynamic and Uncertain Environments
Learning Software Performance Models for Dynamic and Uncertain EnvironmentsLearning Software Performance Models for Dynamic and Uncertain Environments
Learning Software Performance Models for Dynamic and Uncertain Environments
Pooyan Jamshidi
 
A Framework for Model-Driven Evolution in Families of Software Architectures
A Framework for Model-Driven Evolution in Families of Software ArchitecturesA Framework for Model-Driven Evolution in Families of Software Architectures
A Framework for Model-Driven Evolution in Families of Software Architectures
Pooyan Jamshidi
 
Soa design pattern
Soa design patternSoa design pattern
Soa design pattern
Lap Doan
 
Software engineering principles in system software design
Software engineering principles in system software designSoftware engineering principles in system software design
Software engineering principles in system software design
Tech_MX
 

Similar a CLA06.ppt (20)

Cla06.ppt
Cla06.pptCla06.ppt
Cla06.ppt
 
Object oriented framework
Object oriented frameworkObject oriented framework
Object oriented framework
 
Tech challenges in a large scale agile project
Tech challenges in a large scale agile projectTech challenges in a large scale agile project
Tech challenges in a large scale agile project
 
An Integrated Solver For Optimization Problems
An Integrated Solver For Optimization ProblemsAn Integrated Solver For Optimization Problems
An Integrated Solver For Optimization Problems
 
Icfca08.ppt
Icfca08.pptIcfca08.ppt
Icfca08.ppt
 
A Novel Scheduling Mechanism for Hybrid Cloud Systems
A Novel Scheduling Mechanism for Hybrid Cloud SystemsA Novel Scheduling Mechanism for Hybrid Cloud Systems
A Novel Scheduling Mechanism for Hybrid Cloud Systems
 
Capella Based System Engineering Modelling and Multi-Objective Optimization o...
Capella Based System Engineering Modelling and Multi-Objective Optimization o...Capella Based System Engineering Modelling and Multi-Objective Optimization o...
Capella Based System Engineering Modelling and Multi-Objective Optimization o...
 
Getting relational database from legacy data mdre approach
Getting relational database from legacy data mdre approachGetting relational database from legacy data mdre approach
Getting relational database from legacy data mdre approach
 
From Concepts to Implementation: Why I Missed My First Paper Submission Deadline
From Concepts to Implementation: Why I Missed My First Paper Submission DeadlineFrom Concepts to Implementation: Why I Missed My First Paper Submission Deadline
From Concepts to Implementation: Why I Missed My First Paper Submission Deadline
 
Learning Software Performance Models for Dynamic and Uncertain Environments
Learning Software Performance Models for Dynamic and Uncertain EnvironmentsLearning Software Performance Models for Dynamic and Uncertain Environments
Learning Software Performance Models for Dynamic and Uncertain Environments
 
Service Oriented & Model Driven Architectures
Service Oriented & Model Driven ArchitecturesService Oriented & Model Driven Architectures
Service Oriented & Model Driven Architectures
 
Configurability for Cloud-Native Applications: Observability and Control
Configurability for Cloud-Native Applications: Observability and ControlConfigurability for Cloud-Native Applications: Observability and Control
Configurability for Cloud-Native Applications: Observability and Control
 
A Comparative Study of Forward and Reverse Engineering
A Comparative Study of Forward and Reverse EngineeringA Comparative Study of Forward and Reverse Engineering
A Comparative Study of Forward and Reverse Engineering
 
[ Capella Day 2019 ] Augmenting requirements with models to improve the artic...
[ Capella Day 2019 ] Augmenting requirements with models to improve the artic...[ Capella Day 2019 ] Augmenting requirements with models to improve the artic...
[ Capella Day 2019 ] Augmenting requirements with models to improve the artic...
 
A Framework for Model-Driven Evolution in Families of Software Architectures
A Framework for Model-Driven Evolution in Families of Software ArchitecturesA Framework for Model-Driven Evolution in Families of Software Architectures
A Framework for Model-Driven Evolution in Families of Software Architectures
 
MODAClouds - Underpinning the Leap to DevOps Movement on Clouds scenarios
MODAClouds - Underpinning the Leap to DevOps Movement on Clouds scenariosMODAClouds - Underpinning the Leap to DevOps Movement on Clouds scenarios
MODAClouds - Underpinning the Leap to DevOps Movement on Clouds scenarios
 
An Adjacent Analysis of the Parallel Programming Model Perspective: A Survey
 An Adjacent Analysis of the Parallel Programming Model Perspective: A Survey An Adjacent Analysis of the Parallel Programming Model Perspective: A Survey
An Adjacent Analysis of the Parallel Programming Model Perspective: A Survey
 
Aspect Oriented Programming
Aspect Oriented ProgrammingAspect Oriented Programming
Aspect Oriented Programming
 
Soa design pattern
Soa design patternSoa design pattern
Soa design pattern
 
Software engineering principles in system software design
Software engineering principles in system software designSoftware engineering principles in system software design
Software engineering principles in system software design
 

Más de Ptidej 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

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

CLA06.ppt

  • 1. Using FCA to Suggest Refactorings to Correct Design Defects Naouel Moha, Jihene Rezgui, Yann-Gaël Guéhéneuc, Petko Valtchev, and Ghizlane El Boussaidi DIRO, University of Montreal, Canada Présenté par Ghada Gasmi CLA 2006 Oct 30 – Sept 1st , 2006, Tunis, Tunisie
  • 2. Context Design Patterns are “good” solutions to recurring design problems Design Defects (DDs) are “bad” solutions to recurring problems transgress good OO (Object-Oriented) principles Cohesion Coupling Why it is important to detect and correct DDs ? DDs lessen the quality of OO architectures and impede their evolution and their maintenance Maintenance is expensive because of DDs [PER 92] : adding, debugging, and evolving of features are difficult A good software architecture without DDs: easier to understand, change, and thus maintain Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 2
  • 3. Context An example of high-level DDs Blob Large controller class Many fields and methods with a low cohesion* Highly coupled** with data stored in associated data classes *Cohesion: How closely the methods (Lack of Cohesioninstance variables in the class. Measure: LCOM are related to the Metric) **Coupling: the degree of reliance on services provided by other classes. Bad impact : low cohesion and high coupling! Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 3
  • 4. Overview Related Work Problem Description Proposed Approach Implementation Conclusion Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 4
  • 5. Related Work Huchard and LeBlanc (ASE, 2000) use FCA to suggest restructurations of class hierarchies to maximise the sharing of data structure and code through fields and methods Arévalo et al. (ICFCA, 2005) applied FCA to identify implicit dependencies among classes in program models None of these approaches attempts to suggest refactorings to correct DDs! Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 5
  • 6. Overview Related Work Problem Description Proposed Approach Methodology Validation Conclusion Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 6
  • 7. Problem Description What are the problems ? Lack of (semi-)automated techniques and tools Lack of work on high-level DDs Semi-manual detection and correction The detection and correction are time-consuming and error-prone activities Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 7
  • 8. Overview Related Work Problem Description Proposed Approach Implementation Conclusion Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 8
  • 9. Proposed Approach We propose to apply FCA on a suitable representation of a program to suggest appropriate refactorings for certain DDs. Refactorings ? Change performed on the source code of a program to improve its internal structure without changing its external behaviour [Fowler]. We illustrate our approach with the Blob Azureus version 2.3.0.6 A peer-to-peer program 143 Blobs for 1,449 classes (191,963 lines of code) We show that FCA can suggest relevant refactorings to improve the program! Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 9
  • 10. Proposed Approach Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 10
  • 11. Encoding Blobs into Formal Contexts 1/2 To Identify cohesive sets of methods and fields, we define three formal contexts: K1, individuals are methods of a suspect large class and properties are fields of that class. allows to assess the cohesion of a class because methods sharing the same fields are, by definition, cohesive. K2, both individuals and properties are methods of the suspect large class. highlights subsets of cohesive methods, because methods invoking the same set of other methods are highly cohesive. K3, individuals are methods and fields of the large class and properties are the surrounding data classes. allows to assess the coupling between the large class and its data classes. Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 11
  • 12. Encoding Blobs into Formal Contexts 2/2 Context K1 linking methods of the large class to fields of the class. Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 12
  • 13. Interpretation of Lattice Structure 1/3 We build Lattices from the 3 contexts K1, K2, K3 to Interpret the inner structure of the large class Suggest refactorings We define two interpretations rules: Rule1: collection of cohesive and independent subsets (figure, zone2) Rule2: Detect large cohesive subset (figure, zone1) Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 13
  • 14. Interpretation of Lattice Structure 2/3 Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 14
  • 15. Interpretation of Lattice Structure 3/3 Refactorings: Split large class into 2 ways: 1. Move disjoint and cohesive subsets of methods and/or fields that are related to a data class. 2. Organise cohesive subsets that are not related to data class in separate classes. Azureus, class DHTTransportUDPImpl Before the refactorings: cohesion: 0.542, coupling: 41 After the refactorings: cohesion: 0.278, coupling: 39 Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 15
  • 16. Overview Related Work Problem Description Proposed Approach Implementation Conclusion Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 16
  • 17. Implementation PADL (Pattern and Abstract-level Description Language) Metamodel of the tool suite Ptidej To model source code GALICIA Multi-tool open-source plateform for creating, visualizing, and storing lattices Both tools communicate by means of XML files Ptidej generates contexts in the XML format of Galicia Galicia tranforms the contexts into lattices Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 17
  • 18. Overview Related Work Problem Description Proposed Approach Implementation Conclusion Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 18
  • 19. Conclusion DDs transgress good OO principles Low coupling and high cohesion Our approach Joint use of metrics and FCA to suggest refactorings to correct DDs Can be generalised to other DDs characterised by a high coupling and a low cohesion Future Work Fully automatic correction mechanisms An integrated tool plateform to support FCA-based refactorings Refinement of the proposed rules for lattice structure interpretation Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 19
  • 20. Questions For any question, please contact directly the authors at mohanaou@iro.umontreal.ca rezguiji@iro.umontreal.ca Moha © CLA 2006 Using FCA to Suggest Refactorings to Correct Design Defects 20