SlideShare una empresa de Scribd logo
1 de 68
Descargar para leer sin conexión
Reverse engineering
    techniques



      Tudor Gîrba
    www.tudorgirba.com
fo
                                            rw
                                              ar
                                                d
                                                 en
                                                     gin
                                                      ee
                                                       rin
                                                           g
{               {
    {                   {                                      {               {
                            }                                      {               {
        }
        }                       actual development                     }               }
            }       {       }                                              }               }
fo
                                                              rw
                                              g
                                            rin




                                                                ar
                                         ee




                                                                  d
                                        gin




                                                                   en
                                                                       gin
                                       en




                                                                        ee
                                   se




                                                                         rin
                                 erv




                                                                             g
                                re




{               {
    {                   {                                                        {               {
                            }                                                        {               {
        }
        }                                         actual development                     }               }
            }       {       }                                                                }               }
McCabe = 21

NOM                          0
      = 102
                        3 ,00
                      75
                  =
              C
         LO


  Metrics                        Queries                                   Visualizations   ...


                                           {               {
                                               {                   {
                                                                       }
                                                   }
                                                   }
                                                       }       {       }
McCabe = 21

NOM                          0
      = 102
                        3 ,00
                      75
                  =
              C
         LO


  Metrics                        Queries                                   Visualizations   ...


                                           {               {
                                               {                   {
                                                                       }
                                                   }
                                                   }
                                                       }       {       }
McCabe = 21

NOM                          0
      = 102
                        3 ,00
                      75
                  =
              C
         LO


Metrics                          Queries                                   Visualizations   ...


                                           {               {
                                               {                   {
                                                                       }
                                                   }
                                                   }
                                                       }       {       }
What are software metrics?
Youcannot control
what you cannot measure.




                           Tom de Marco
Software metrics are measurements which
relate to software systems, processes or
related documents
Examples of size metrics


NOM - number of methods
NOA - number of attributes
LOC - number of lines of code
NOS - number of statements
NOC - number of children



                                Lorentz, Kidd, 1994
                                  Chidamber, 1994
McCabe cyclomatic complexity counts
the number of possible paths through the code of a
function.




                                           McCabe, 1977
Metrics compress the system into numbers
McCabe = 21

NOM                          0
      = 102
                        3 ,00
                      75
                  =
              C
         LO


Metrics                          Queries                                   Visualizations   ...


                                           {               {
                                               {                   {
                                                                       }
                                                   }
                                                   }
                                                       }       {       }
McCabe = 21

NOM                          0
      = 102
                        3 ,00
                      75
                  =
              C
         LO


  Metrics                        Queries                               Visualizations   ...


                                       {               {
                                           {                   {
                                                                   }
                                               }
                                               }
                                                   }       {       }
Queries reduce the analysis space
Detection Strategies are metric-based queries to
detect design flaws
    Class uses directly more than a
    few attributes of other classes

            ATFD > FEW




     Functional complexity of the
          class is very high
                                      AND   GodClass
         WMC ! VERY HIGH




        Class cohesion is low


         TCC < ONE THIRD
Flaw: a God Class centralizes too much
intelligence in the system
    Class uses directly more than a
    few attributes of other classes

            ATFD > FEW




     Functional complexity of the
          class is very high
                                      AND   GodClass
         WMC ! VERY HIGH




        Class cohesion is low


         TCC < ONE THIRD
Flaw: a Data Class provides data to other classes,
but little or no functionality of its own
McCabe = 21

NOM                          0
      = 102
                        3 ,00
                      75
                  =
              C
         LO


  Metrics                        Queries                               Visualizations   ...


                                       {               {
                                           {                   {
                                                                   }
                                               }
                                               }
                                                   }       {       }
McCabe = 21

NOM                          0
      = 102
                        3 ,00
                      75
                  =
              C
         LO


  Metrics                        Queries               Visualizations      ...


                                           {               {
                                               {                   {
                                                                       }
                                                   }
                                                   }
                                                       }       {       }
Visualization compresses the system into pictures
1854, London cholera epidemic
a picture is worth

a   thousand words
UML took it literally :)
We
are

visual
beings
How many groups do you see?
How many groups do you see?
How many groups do you see?
How many groups do you see?
Gestalt principles




proximity                        similarity




enclosure                        connectivity
More Gestalt principles




closure                             continuity
We
are

visual
beings
a picture is worth

a   thousand words
example: what is   ?
Polymetric views show up to 5 metrics
                                            Lanza, 2003

                        Width metric

        Height metric



  Position metrics

                                   Color
                                   metric
System Complexity shows class hierarchies
                                        Lanza, Ducasse, 2003




                                          attributes


                              methods       lines
Class Blueprint shows class internals
                                                      Lanza, Ducasse, 2005


   Initialize   Interface       Internal       Accessor   Attribute




                   invocation and access direction
Class Blueprint has a rich vocabulary

              internal access
                                              Access
  external
                Attribute
   access                                    Invocation



                                   Regular                Constant

               invocations
                                Overriding                Delegating

      lines      Method
                                Extending                 Setter

                                  Abstract                Getter
Class Blueprint shows class internals
Distribution Map shows properties
                                    Ducasse etal, 2006
fo
                                                              rw
                                              g
                                            rin




                                                                ar
                                         ee




                                                                  d
                                        gin




                                                                   en
                                                                       gin
                                       en




                                                                        ee
                                   se




                                                                         rin
                                 erv




                                                                             g
                                re




{               {
    {                   {                                                        {               {
                            }                                                        {               {
        }
        }                                         actual development                     }               }
            }       {       }                                                                }               }
{
                     {
    }  }
}
                         {



{
                         {
                }

}
                             re
                                v  er
                                        se
                                              en
                                                   gin
                                                         ee
                                                              rin
                                                                    g


                         reverse engineering

                                                                        fo
                                                                  rw
                                                             ar
    actual development
                                                         d
                                                    en
                                              gin
                                         ee
                                   rin
                               g
                         {
             {
    }
}
                         {
             {
    }
}
Spectographs show change activity
                             Wu etal, 2004




 commit




                  time
Evolution Matrix shows changes in classes
                                      Lanza, Ducasse, 2002


Idle class



Pulsar class




Supernova class




White dwarf class
Evolution Matrix shows changes in classes
What happens with inheritance?


  A                 A                A                A                A




         B    C            B   C            B   C            B                B




                               D                D                D            E


ver .1            ver. 2           ver. 3           ver. 4           ver. 5
History contains too much data


  A                A                A                A                A            A                A                A                A                A            A                A                A                A                A            A                A                A                A                A




         B   C            B   C            B   C            B                B            B   C            B   C            B   C            B                B            B   C            B   C            B   C            B                B            B   C            B   C            B   C            B                B




                              D                D                D            E                                 D                D                D            E                                 D                D                D            E                                 D                D                D            E


ver .1           ver. 2           ver. 3           ver. 4           ver. 5       ver .1           ver. 2           ver. 3           ver. 4           ver. 5       ver .1           ver. 2           ver. 3           ver. 4           ver. 5       ver .1           ver. 2           ver. 3           ver. 4           ver. 5


  A                A                A                A                A            A                A                A                A                A            A                A                A                A                A            A                A                A                A                A




         B   C            B   C            B   C            B                B            B   C            B   C            B   C            B                B            B   C            B   C            B   C            B                B            B   C            B   C            B   C            B                B




                              D                D                D            E                                 D                D                D            E                                 D                D                D            E                                 D                D                D            E


ver .1           ver. 2           ver. 3           ver. 4           ver. 5       ver .1           ver. 2           ver. 3           ver. 4           ver. 5       ver .1           ver. 2           ver. 3           ver. 4           ver. 5       ver .1           ver. 2           ver. 3           ver. 4           ver. 5


  A                A                A                A                A            A                A                A                A                A            A                A                A                A                A            A                A                A                A                A




         B   C            B   C            B   C            B                B            B   C            B   C            B   C            B                B            B   C            B   C            B   C            B                B            B   C            B   C            B   C            B                B




                              D                D                D            E                                 D                D                D            E                                 D                D                D            E                                 D                D                D            E


ver .1           ver. 2           ver. 3           ver. 4           ver. 5       ver .1           ver. 2           ver. 3           ver. 4           ver. 5       ver .1           ver. 2           ver. 3           ver. 4           ver. 5       ver .1           ver. 2           ver. 3           ver. 4           ver. 5

  A                A                A                A                A            A                A                A                A                A            A                A                A                A                A            A                A                A                A                A




         B   C            B   C            B   C            B                B            B   C            B   C            B   C            B                B            B   C            B   C            B   C            B                B            B   C            B   C            B   C            B                B




                              D                D                D            E                                 D                D                D            E                                 D                D                D            E                                 D                D                D            E


ver .1           ver. 2           ver. 3           ver. 4           ver. 5       ver .1           ver. 2           ver. 3           ver. 4           ver. 5       ver .1           ver. 2           ver. 3           ver. 4           ver. 5       ver .1           ver. 2           ver. 3           ver. 4           ver. 5
History contains too much data

   A                 A                A                A                A




          B    C            B   C            B   C            B                B




                                D                D                D            E


 ver .1            ver. 2           ver. 3           ver. 4           ver. 5

A is persistent, B is stable, C was removed, E is newborn ...
Hierarchy Evolution encapsulates time
                                                   Girba etal, 2005
                 A
                                                   changed
                                                   methods

                                         changed
                                                     age
                                           lines
         C                  B

                                                Removed

                                                Removed
        D               E


A is persistent, B is stable, C was removed, E is newborn ...
Hierarchy Evolution View reveals patterns
McCabe = 21

NOM                          0
      = 102
                        3 ,00
                      75
                  =
              C
         LO


  Metrics                        Queries               Visualizations      ...


                                           {               {
                                               {                   {
                                                                       }
                                                   }
                                                   }
                                                       }       {       }
But, what actually happens
behind the scene?
Example: CVS shows activity
Who did this?
Alphabetical order is no order
                                 Kuhn
Ownership Map orders histories
                                 Girba etal, 2006
McCabe = 21

NOM                          0
      = 102
                        3 ,00
                      75
                  =
              C
         LO


  Metrics                        Queries               Visualizations      ...


                                           {               {
                                               {                   {
                                                                       }
                                                   }
                                                   }
                                                       }       {       }
McCabe = 21

NOM                          0
      = 102
                        3 ,00
                      75
                  =
              C



                                                                                            ...
         LO


  Metrics                        Queries                                   Visualizations




                                           {               {
                                               {                   {
                                                                       }
                                                   }
                                                   }
                                                       }       {       }
Tudor Gîrba
       www.tudorgirba.com




creativecommons.org/licenses/by/3.0/

Más contenido relacionado

Destacado

Reverse engineering & its application
Reverse engineering & its applicationReverse engineering & its application
Reverse engineering & its applicationmapqrs
 
Reverse Engineering Object-Oriented Distributed Systems
Reverse Engineering Object-Oriented Distributed SystemsReverse Engineering Object-Oriented Distributed Systems
Reverse Engineering Object-Oriented Distributed SystemsICSM 2010
 
Reverse Engineering (EVO 2008)
Reverse Engineering (EVO 2008)Reverse Engineering (EVO 2008)
Reverse Engineering (EVO 2008)Tudor Girba
 
Introduction of Reverse Engineering
Introduction of Reverse EngineeringIntroduction of Reverse Engineering
Introduction of Reverse EngineeringYC Ling
 
Reverse Engineering.pptx
Reverse Engineering.pptxReverse Engineering.pptx
Reverse Engineering.pptxSameer Sapra
 
Maintenance, Re-engineering &Reverse Engineering in Software Engineering
Maintenance,Re-engineering &Reverse Engineering in Software EngineeringMaintenance,Re-engineering &Reverse Engineering in Software Engineering
Maintenance, Re-engineering &Reverse Engineering in Software EngineeringManish Kumar
 
Reverse engineering
Reverse engineeringReverse engineering
Reverse engineeringdspokale25
 
data acquisition methods in reverse engineering
data acquisition methods in reverse engineeringdata acquisition methods in reverse engineering
data acquisition methods in reverse engineeringRanjith Mech
 
ravi reverseengineeringitsapplication01 121101044845-phpapp02
ravi reverseengineeringitsapplication01 121101044845-phpapp02ravi reverseengineeringitsapplication01 121101044845-phpapp02
ravi reverseengineeringitsapplication01 121101044845-phpapp02Akash Maurya
 
Reversing Engineering a Web Application - For fun, behavior and detection
Reversing Engineering a Web Application - For fun, behavior and detectionReversing Engineering a Web Application - For fun, behavior and detection
Reversing Engineering a Web Application - For fun, behavior and detectionRodrigo Montoro
 
Reverse Engineering Web Applications
Reverse Engineering Web ApplicationsReverse Engineering Web Applications
Reverse Engineering Web ApplicationsPorfirio Tramontana
 
WARE: a tool for the Reverse Engineering of Web Applications
WARE: a tool for the Reverse Engineering of Web Applications WARE: a tool for the Reverse Engineering of Web Applications
WARE: a tool for the Reverse Engineering of Web Applications Porfirio Tramontana
 
Introduction to Reverse Engineering
Introduction to Reverse EngineeringIntroduction to Reverse Engineering
Introduction to Reverse EngineeringDobromir Enchev
 
Reverse engineering
Reverse  engineeringReverse  engineering
Reverse engineeringYuffie Valen
 
Software Reengineering
Software ReengineeringSoftware Reengineering
Software ReengineeringAbdul Wahid
 
Reverse Engineering 101
Reverse Engineering 101Reverse Engineering 101
Reverse Engineering 101ysurer
 
Reengineering including reverse & forward Engineering
Reengineering including reverse & forward EngineeringReengineering including reverse & forward Engineering
Reengineering including reverse & forward EngineeringMuhammad Chaudhry
 
Pergub no 1 th 2016 pedoman rt-rw konsolidasi
Pergub no 1 th 2016 pedoman rt-rw konsolidasiPergub no 1 th 2016 pedoman rt-rw konsolidasi
Pergub no 1 th 2016 pedoman rt-rw konsolidasiNugroho Satrio S
 
Mi 291 chapter 3 (reverse engineering)(1)
Mi 291 chapter 3 (reverse engineering)(1)Mi 291 chapter 3 (reverse engineering)(1)
Mi 291 chapter 3 (reverse engineering)(1)varun teja G.V.V
 

Destacado (20)

Reverse engineering & its application
Reverse engineering & its applicationReverse engineering & its application
Reverse engineering & its application
 
Reverse Engineering Object-Oriented Distributed Systems
Reverse Engineering Object-Oriented Distributed SystemsReverse Engineering Object-Oriented Distributed Systems
Reverse Engineering Object-Oriented Distributed Systems
 
Reverse Engineering (EVO 2008)
Reverse Engineering (EVO 2008)Reverse Engineering (EVO 2008)
Reverse Engineering (EVO 2008)
 
Introduction of Reverse Engineering
Introduction of Reverse EngineeringIntroduction of Reverse Engineering
Introduction of Reverse Engineering
 
Reverse Engineering.pptx
Reverse Engineering.pptxReverse Engineering.pptx
Reverse Engineering.pptx
 
Maintenance, Re-engineering &Reverse Engineering in Software Engineering
Maintenance,Re-engineering &Reverse Engineering in Software EngineeringMaintenance,Re-engineering &Reverse Engineering in Software Engineering
Maintenance, Re-engineering &Reverse Engineering in Software Engineering
 
Reverse engineering
Reverse engineeringReverse engineering
Reverse engineering
 
data acquisition methods in reverse engineering
data acquisition methods in reverse engineeringdata acquisition methods in reverse engineering
data acquisition methods in reverse engineering
 
ravi reverseengineeringitsapplication01 121101044845-phpapp02
ravi reverseengineeringitsapplication01 121101044845-phpapp02ravi reverseengineeringitsapplication01 121101044845-phpapp02
ravi reverseengineeringitsapplication01 121101044845-phpapp02
 
Reversing Engineering a Web Application - For fun, behavior and detection
Reversing Engineering a Web Application - For fun, behavior and detectionReversing Engineering a Web Application - For fun, behavior and detection
Reversing Engineering a Web Application - For fun, behavior and detection
 
Reverse Engineering Web Applications
Reverse Engineering Web ApplicationsReverse Engineering Web Applications
Reverse Engineering Web Applications
 
WARE: a tool for the Reverse Engineering of Web Applications
WARE: a tool for the Reverse Engineering of Web Applications WARE: a tool for the Reverse Engineering of Web Applications
WARE: a tool for the Reverse Engineering of Web Applications
 
Introduction to Reverse Engineering
Introduction to Reverse EngineeringIntroduction to Reverse Engineering
Introduction to Reverse Engineering
 
Reverse engineering
Reverse  engineeringReverse  engineering
Reverse engineering
 
Software Reengineering
Software ReengineeringSoftware Reengineering
Software Reengineering
 
Reverse Engineering 101
Reverse Engineering 101Reverse Engineering 101
Reverse Engineering 101
 
Reengineering including reverse & forward Engineering
Reengineering including reverse & forward EngineeringReengineering including reverse & forward Engineering
Reengineering including reverse & forward Engineering
 
Pergub no 1 th 2016 pedoman rt-rw konsolidasi
Pergub no 1 th 2016 pedoman rt-rw konsolidasiPergub no 1 th 2016 pedoman rt-rw konsolidasi
Pergub no 1 th 2016 pedoman rt-rw konsolidasi
 
Mi 291 chapter 3 (reverse engineering)(1)
Mi 291 chapter 3 (reverse engineering)(1)Mi 291 chapter 3 (reverse engineering)(1)
Mi 291 chapter 3 (reverse engineering)(1)
 
Ch15 software reuse
Ch15 software reuseCh15 software reuse
Ch15 software reuse
 

Similar a Reverse Engineering Techniques 2007-11-29

Pragmatic Design Quality Assessment - (Tutorial at ICSE 2008)
Pragmatic Design Quality Assessment - (Tutorial at ICSE 2008)Pragmatic Design Quality Assessment - (Tutorial at ICSE 2008)
Pragmatic Design Quality Assessment - (Tutorial at ICSE 2008)Tudor Girba
 
A Moose Slideshow
A Moose SlideshowA Moose Slideshow
A Moose SlideshowTudor Girba
 
Problem Detection (EVO 2008)
Problem Detection (EVO 2008)Problem Detection (EVO 2008)
Problem Detection (EVO 2008)Tudor Girba
 
Humane assessment at ICSM 2010
Humane assessment at ICSM 2010Humane assessment at ICSM 2010
Humane assessment at ICSM 2010Tudor Girba
 
Enhancing agile development through software assessment
Enhancing agile development through software assessmentEnhancing agile development through software assessment
Enhancing agile development through software assessmentTudor Girba
 
Reverse Engineering 2007-11-27
Reverse Engineering 2007-11-27 Reverse Engineering 2007-11-27
Reverse Engineering 2007-11-27 Tudor Girba
 
What history can tell us
What history can tell usWhat history can tell us
What history can tell usTudor Girba
 
Helping you reengineering your legacy
Helping you reengineering your legacyHelping you reengineering your legacy
Helping you reengineering your legacyStéphane Ducasse
 
Humane assessment with Moose at Benevol 2010
Humane assessment with Moose at Benevol 2010Humane assessment with Moose at Benevol 2010
Humane assessment with Moose at Benevol 2010Tudor Girba
 
05 Problem Detection
05 Problem Detection05 Problem Detection
05 Problem DetectionJorge Ressia
 
Modeling History to Understand Software Evolution with Hismo 2008-03-12
Modeling History to Understand Software Evolution with Hismo 2008-03-12Modeling History to Understand Software Evolution with Hismo 2008-03-12
Modeling History to Understand Software Evolution with Hismo 2008-03-12Tudor Girba
 
Modeling History to Understand Software Evolution With Hismo 2008-02-25
Modeling History to Understand Software Evolution With Hismo 2008-02-25 Modeling History to Understand Software Evolution With Hismo 2008-02-25
Modeling History to Understand Software Evolution With Hismo 2008-02-25 Tudor Girba
 
History Analysis (EVO 2008)
History Analysis (EVO 2008)History Analysis (EVO 2008)
History Analysis (EVO 2008)Tudor Girba
 
Software understanding in the large (EVO 2008)
Software understanding in the large (EVO 2008)Software understanding in the large (EVO 2008)
Software understanding in the large (EVO 2008)Tudor Girba
 
Moose Tutorial at WCRE 2008
Moose Tutorial at WCRE 2008Moose Tutorial at WCRE 2008
Moose Tutorial at WCRE 2008Tudor Girba
 
Holistic software assessment at the University of Zurich
Holistic software assessment at the University of ZurichHolistic software assessment at the University of Zurich
Holistic software assessment at the University of ZurichTudor Girba
 

Similar a Reverse Engineering Techniques 2007-11-29 (17)

Pragmatic Design Quality Assessment - (Tutorial at ICSE 2008)
Pragmatic Design Quality Assessment - (Tutorial at ICSE 2008)Pragmatic Design Quality Assessment - (Tutorial at ICSE 2008)
Pragmatic Design Quality Assessment - (Tutorial at ICSE 2008)
 
Moose Overview
Moose OverviewMoose Overview
Moose Overview
 
A Moose Slideshow
A Moose SlideshowA Moose Slideshow
A Moose Slideshow
 
Problem Detection (EVO 2008)
Problem Detection (EVO 2008)Problem Detection (EVO 2008)
Problem Detection (EVO 2008)
 
Humane assessment at ICSM 2010
Humane assessment at ICSM 2010Humane assessment at ICSM 2010
Humane assessment at ICSM 2010
 
Enhancing agile development through software assessment
Enhancing agile development through software assessmentEnhancing agile development through software assessment
Enhancing agile development through software assessment
 
Reverse Engineering 2007-11-27
Reverse Engineering 2007-11-27 Reverse Engineering 2007-11-27
Reverse Engineering 2007-11-27
 
What history can tell us
What history can tell usWhat history can tell us
What history can tell us
 
Helping you reengineering your legacy
Helping you reengineering your legacyHelping you reengineering your legacy
Helping you reengineering your legacy
 
Humane assessment with Moose at Benevol 2010
Humane assessment with Moose at Benevol 2010Humane assessment with Moose at Benevol 2010
Humane assessment with Moose at Benevol 2010
 
05 Problem Detection
05 Problem Detection05 Problem Detection
05 Problem Detection
 
Modeling History to Understand Software Evolution with Hismo 2008-03-12
Modeling History to Understand Software Evolution with Hismo 2008-03-12Modeling History to Understand Software Evolution with Hismo 2008-03-12
Modeling History to Understand Software Evolution with Hismo 2008-03-12
 
Modeling History to Understand Software Evolution With Hismo 2008-02-25
Modeling History to Understand Software Evolution With Hismo 2008-02-25 Modeling History to Understand Software Evolution With Hismo 2008-02-25
Modeling History to Understand Software Evolution With Hismo 2008-02-25
 
History Analysis (EVO 2008)
History Analysis (EVO 2008)History Analysis (EVO 2008)
History Analysis (EVO 2008)
 
Software understanding in the large (EVO 2008)
Software understanding in the large (EVO 2008)Software understanding in the large (EVO 2008)
Software understanding in the large (EVO 2008)
 
Moose Tutorial at WCRE 2008
Moose Tutorial at WCRE 2008Moose Tutorial at WCRE 2008
Moose Tutorial at WCRE 2008
 
Holistic software assessment at the University of Zurich
Holistic software assessment at the University of ZurichHolistic software assessment at the University of Zurich
Holistic software assessment at the University of Zurich
 

Más de Tudor Girba

Beyond software evolution: Software environmentalism
Beyond software evolution: Software environmentalismBeyond software evolution: Software environmentalism
Beyond software evolution: Software environmentalismTudor Girba
 
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...Tudor Girba
 
Don't demo facts. Demo stories! (handouts)
Don't demo facts. Demo stories! (handouts)Don't demo facts. Demo stories! (handouts)
Don't demo facts. Demo stories! (handouts)Tudor Girba
 
Don't demo facts. Demo stories!
Don't demo facts. Demo stories!Don't demo facts. Demo stories!
Don't demo facts. Demo stories!Tudor Girba
 
Humane assessment on cards
Humane assessment on cardsHumane assessment on cards
Humane assessment on cardsTudor Girba
 
Underneath Scrum: Reflective Thinking
Underneath Scrum: Reflective ThinkingUnderneath Scrum: Reflective Thinking
Underneath Scrum: Reflective ThinkingTudor Girba
 
1800+ TED talks later
1800+ TED talks later1800+ TED talks later
1800+ TED talks laterTudor Girba
 
Software assessment by example (lecture at the University of Bern)
Software assessment by example (lecture at the University of Bern)Software assessment by example (lecture at the University of Bern)
Software assessment by example (lecture at the University of Bern)Tudor Girba
 
Humane assessment: Taming the elephant from the development room
Humane assessment: Taming the elephant from the development roomHumane assessment: Taming the elephant from the development room
Humane assessment: Taming the elephant from the development roomTudor Girba
 
Moose: how to solve real problems without reading code
Moose: how to solve real problems without reading codeMoose: how to solve real problems without reading code
Moose: how to solve real problems without reading codeTudor Girba
 
Software Environmentalism (ECOOP 2014 Keynote)
Software Environmentalism (ECOOP 2014 Keynote)Software Environmentalism (ECOOP 2014 Keynote)
Software Environmentalism (ECOOP 2014 Keynote)Tudor Girba
 
The emergent nature of software systems
The emergent nature of software systemsThe emergent nature of software systems
The emergent nature of software systemsTudor Girba
 
Presenting is storytelling at Uni Zurich - slides (2014-03-05)
Presenting is storytelling at Uni Zurich - slides (2014-03-05)Presenting is storytelling at Uni Zurich - slides (2014-03-05)
Presenting is storytelling at Uni Zurich - slides (2014-03-05)Tudor Girba
 
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)Tudor Girba
 
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)Tudor Girba
 
Demo-driven innovation teaser
Demo-driven innovation teaserDemo-driven innovation teaser
Demo-driven innovation teaserTudor Girba
 
Software assessment essentials (lecture at the University of Bern 2013)
Software assessment essentials (lecture at the University of Bern 2013)Software assessment essentials (lecture at the University of Bern 2013)
Software assessment essentials (lecture at the University of Bern 2013)Tudor Girba
 
Demo-driven innovation (University of Zurich, June 2013)
Demo-driven innovation (University of Zurich, June 2013)Demo-driven innovation (University of Zurich, June 2013)
Demo-driven innovation (University of Zurich, June 2013)Tudor Girba
 
Humane assessment with Moose at GOTO Aarhus 2011
Humane assessment with Moose at GOTO Aarhus 2011Humane assessment with Moose at GOTO Aarhus 2011
Humane assessment with Moose at GOTO Aarhus 2011Tudor Girba
 

Más de Tudor Girba (20)

Beyond software evolution: Software environmentalism
Beyond software evolution: Software environmentalismBeyond software evolution: Software environmentalism
Beyond software evolution: Software environmentalism
 
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
 
GT Spotter
GT SpotterGT Spotter
GT Spotter
 
Don't demo facts. Demo stories! (handouts)
Don't demo facts. Demo stories! (handouts)Don't demo facts. Demo stories! (handouts)
Don't demo facts. Demo stories! (handouts)
 
Don't demo facts. Demo stories!
Don't demo facts. Demo stories!Don't demo facts. Demo stories!
Don't demo facts. Demo stories!
 
Humane assessment on cards
Humane assessment on cardsHumane assessment on cards
Humane assessment on cards
 
Underneath Scrum: Reflective Thinking
Underneath Scrum: Reflective ThinkingUnderneath Scrum: Reflective Thinking
Underneath Scrum: Reflective Thinking
 
1800+ TED talks later
1800+ TED talks later1800+ TED talks later
1800+ TED talks later
 
Software assessment by example (lecture at the University of Bern)
Software assessment by example (lecture at the University of Bern)Software assessment by example (lecture at the University of Bern)
Software assessment by example (lecture at the University of Bern)
 
Humane assessment: Taming the elephant from the development room
Humane assessment: Taming the elephant from the development roomHumane assessment: Taming the elephant from the development room
Humane assessment: Taming the elephant from the development room
 
Moose: how to solve real problems without reading code
Moose: how to solve real problems without reading codeMoose: how to solve real problems without reading code
Moose: how to solve real problems without reading code
 
Software Environmentalism (ECOOP 2014 Keynote)
Software Environmentalism (ECOOP 2014 Keynote)Software Environmentalism (ECOOP 2014 Keynote)
Software Environmentalism (ECOOP 2014 Keynote)
 
The emergent nature of software systems
The emergent nature of software systemsThe emergent nature of software systems
The emergent nature of software systems
 
Presenting is storytelling at Uni Zurich - slides (2014-03-05)
Presenting is storytelling at Uni Zurich - slides (2014-03-05)Presenting is storytelling at Uni Zurich - slides (2014-03-05)
Presenting is storytelling at Uni Zurich - slides (2014-03-05)
 
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
 
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
 
Demo-driven innovation teaser
Demo-driven innovation teaserDemo-driven innovation teaser
Demo-driven innovation teaser
 
Software assessment essentials (lecture at the University of Bern 2013)
Software assessment essentials (lecture at the University of Bern 2013)Software assessment essentials (lecture at the University of Bern 2013)
Software assessment essentials (lecture at the University of Bern 2013)
 
Demo-driven innovation (University of Zurich, June 2013)
Demo-driven innovation (University of Zurich, June 2013)Demo-driven innovation (University of Zurich, June 2013)
Demo-driven innovation (University of Zurich, June 2013)
 
Humane assessment with Moose at GOTO Aarhus 2011
Humane assessment with Moose at GOTO Aarhus 2011Humane assessment with Moose at GOTO Aarhus 2011
Humane assessment with Moose at GOTO Aarhus 2011
 

Último

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"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
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
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
 

Último (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"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
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
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
 

Reverse Engineering Techniques 2007-11-29

  • 1. Reverse engineering techniques Tudor Gîrba www.tudorgirba.com
  • 2. fo rw ar d en gin ee rin g { { { { { { } { { } } actual development } } } { } } }
  • 3. fo rw g rin ar ee d gin en gin en ee se rin erv g re { { { { { { } { { } } actual development } } } { } } }
  • 4. McCabe = 21 NOM 0 = 102 3 ,00 75 = C LO Metrics Queries Visualizations ... { { { { } } } } { }
  • 5. McCabe = 21 NOM 0 = 102 3 ,00 75 = C LO Metrics Queries Visualizations ... { { { { } } } } { }
  • 6. McCabe = 21 NOM 0 = 102 3 ,00 75 = C LO Metrics Queries Visualizations ... { { { { } } } } { }
  • 8. Youcannot control what you cannot measure. Tom de Marco
  • 9. Software metrics are measurements which relate to software systems, processes or related documents
  • 10. Examples of size metrics NOM - number of methods NOA - number of attributes LOC - number of lines of code NOS - number of statements NOC - number of children Lorentz, Kidd, 1994 Chidamber, 1994
  • 11. McCabe cyclomatic complexity counts the number of possible paths through the code of a function. McCabe, 1977
  • 12. Metrics compress the system into numbers
  • 13. McCabe = 21 NOM 0 = 102 3 ,00 75 = C LO Metrics Queries Visualizations ... { { { { } } } } { }
  • 14. McCabe = 21 NOM 0 = 102 3 ,00 75 = C LO Metrics Queries Visualizations ... { { { { } } } } { }
  • 15. Queries reduce the analysis space
  • 16.
  • 17. Detection Strategies are metric-based queries to detect design flaws Class uses directly more than a few attributes of other classes ATFD > FEW Functional complexity of the class is very high AND GodClass WMC ! VERY HIGH Class cohesion is low TCC < ONE THIRD
  • 18. Flaw: a God Class centralizes too much intelligence in the system Class uses directly more than a few attributes of other classes ATFD > FEW Functional complexity of the class is very high AND GodClass WMC ! VERY HIGH Class cohesion is low TCC < ONE THIRD
  • 19. Flaw: a Data Class provides data to other classes, but little or no functionality of its own
  • 20. McCabe = 21 NOM 0 = 102 3 ,00 75 = C LO Metrics Queries Visualizations ... { { { { } } } } { }
  • 21. McCabe = 21 NOM 0 = 102 3 ,00 75 = C LO Metrics Queries Visualizations ... { { { { } } } } { }
  • 22. Visualization compresses the system into pictures
  • 24. a picture is worth a thousand words
  • 25.
  • 26. UML took it literally :)
  • 28. How many groups do you see?
  • 29. How many groups do you see?
  • 30. How many groups do you see?
  • 31. How many groups do you see?
  • 32. Gestalt principles proximity similarity enclosure connectivity
  • 35. a picture is worth a thousand words
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42. Polymetric views show up to 5 metrics Lanza, 2003 Width metric Height metric Position metrics Color metric
  • 43. System Complexity shows class hierarchies Lanza, Ducasse, 2003 attributes methods lines
  • 44. Class Blueprint shows class internals Lanza, Ducasse, 2005 Initialize Interface Internal Accessor Attribute invocation and access direction
  • 45. Class Blueprint has a rich vocabulary internal access Access external Attribute access Invocation Regular Constant invocations Overriding Delegating lines Method Extending Setter Abstract Getter
  • 46. Class Blueprint shows class internals
  • 47. Distribution Map shows properties Ducasse etal, 2006
  • 48. fo rw g rin ar ee d gin en gin en ee se rin erv g re { { { { { { } { { } } actual development } } } { } } }
  • 49. { { } } } { { { } } re v er se en gin ee rin g reverse engineering fo rw ar actual development d en gin ee rin g { { } } { { } }
  • 50. Spectographs show change activity Wu etal, 2004 commit time
  • 51. Evolution Matrix shows changes in classes Lanza, Ducasse, 2002 Idle class Pulsar class Supernova class White dwarf class
  • 52. Evolution Matrix shows changes in classes
  • 53. What happens with inheritance? A A A A A B C B C B C B B D D D E ver .1 ver. 2 ver. 3 ver. 4 ver. 5
  • 54. History contains too much data A A A A A A A A A A A A A A A A A A A A B C B C B C B B B C B C B C B B B C B C B C B B B C B C B C B B D D D E D D D E D D D E D D D E ver .1 ver. 2 ver. 3 ver. 4 ver. 5 ver .1 ver. 2 ver. 3 ver. 4 ver. 5 ver .1 ver. 2 ver. 3 ver. 4 ver. 5 ver .1 ver. 2 ver. 3 ver. 4 ver. 5 A A A A A A A A A A A A A A A A A A A A B C B C B C B B B C B C B C B B B C B C B C B B B C B C B C B B D D D E D D D E D D D E D D D E ver .1 ver. 2 ver. 3 ver. 4 ver. 5 ver .1 ver. 2 ver. 3 ver. 4 ver. 5 ver .1 ver. 2 ver. 3 ver. 4 ver. 5 ver .1 ver. 2 ver. 3 ver. 4 ver. 5 A A A A A A A A A A A A A A A A A A A A B C B C B C B B B C B C B C B B B C B C B C B B B C B C B C B B D D D E D D D E D D D E D D D E ver .1 ver. 2 ver. 3 ver. 4 ver. 5 ver .1 ver. 2 ver. 3 ver. 4 ver. 5 ver .1 ver. 2 ver. 3 ver. 4 ver. 5 ver .1 ver. 2 ver. 3 ver. 4 ver. 5 A A A A A A A A A A A A A A A A A A A A B C B C B C B B B C B C B C B B B C B C B C B B B C B C B C B B D D D E D D D E D D D E D D D E ver .1 ver. 2 ver. 3 ver. 4 ver. 5 ver .1 ver. 2 ver. 3 ver. 4 ver. 5 ver .1 ver. 2 ver. 3 ver. 4 ver. 5 ver .1 ver. 2 ver. 3 ver. 4 ver. 5
  • 55. History contains too much data A A A A A B C B C B C B B D D D E ver .1 ver. 2 ver. 3 ver. 4 ver. 5 A is persistent, B is stable, C was removed, E is newborn ...
  • 56. Hierarchy Evolution encapsulates time Girba etal, 2005 A changed methods changed age lines C B Removed Removed D E A is persistent, B is stable, C was removed, E is newborn ...
  • 57. Hierarchy Evolution View reveals patterns
  • 58. McCabe = 21 NOM 0 = 102 3 ,00 75 = C LO Metrics Queries Visualizations ... { { { { } } } } { }
  • 59. But, what actually happens behind the scene?
  • 62. Alphabetical order is no order Kuhn
  • 63. Ownership Map orders histories Girba etal, 2006
  • 64.
  • 65. McCabe = 21 NOM 0 = 102 3 ,00 75 = C LO Metrics Queries Visualizations ... { { { { } } } } { }
  • 66. McCabe = 21 NOM 0 = 102 3 ,00 75 = C ... LO Metrics Queries Visualizations { { { { } } } } { }
  • 67.
  • 68. Tudor Gîrba www.tudorgirba.com creativecommons.org/licenses/by/3.0/