SlideShare une entreprise Scribd logo
1  sur  73
Télécharger pour lire hors ligne
what history can tell us



Tudor Gîrba
www.tudorgirba.com
2002
PhD
2002         2005
PhD          PostDoc
2002         2005             2009
PhD           PostDoc
2002         2005                 2009
                    Consultant




                                          eng.ch
                                 w ww.sw-
{
    {
}
}
    {
    {
}
}
        for
              wa
                   rd
                        en
                             gin
                                   eer
                                         ing
ing
                                       eer
                                      gin
                                      en
                                  rd
                                 wa
                                for




                                                                  {               {
{               {                                                                         {
                                                                      {
    {               {                                                                         }
        }               }                    actual development           }
                                                                          }
            }               }                                                 }       {       }
ing
                                       eer




                                                                  rev
                                      gin




                                                                   ers
                                      en




                                                                    ee
                                  rd




                                                                        ng
                                 wa




                                                                         ine
                                for




                                                                          eri
                                                                             ng
                                                                                {               {
{               {                                                                                       {
                                                                                    {
    {               {                                                                                       }
        }               }                    actual development                         }
                                                                                        }
            }               }                                                               }       {       }
e.uni be.ch
m oos
03
         ucasse 20
Lanza, D
{
              {
    }
}
                         {
              {
    }
}
                                   for
                                         wa
                                              rd
                                                   en
                                                        gin
                                                              eer
                                                                    ing




    actual development
                                                         er ing
                                                 g ine
                                          e en
                                 ev ers
                             r
                         {
                         {
    }}
}
                         {



{
                         {
                }

}
{
              {
    }
}
                         {
              {
    }
}
                                    for
                                          wa
                                               rd
                                                    en
                                                         gin
                                                               eer
                                                                     ing




                             reverse engineering



    actual development
                                                          er ing
                                                  g ine
                                           e en
                                  ev ers
                              r
                         {
                         {
    }}
}
                         {



{
                         {
                }

}
001
Lehma n etal, 2
commit




                      time




   Wu etal
           ,2   004
Evolution Matrix shows changes in classes

Idle class



Pulsar class




Supernova class




White dwarf class

                                                     2002
                                             ucasse,
                                    Lanza, D
2002
         ucasse,
Lanza, D
eta-model?
 h at is the m
w
{               {
          {                   {
                                  }
              }
              }
                  }       {       }




complex, large
      {
          {
                      {
                              {
{               {               {               {               {               {               {               {               {               {               {               {
    {                   {           {                   {           {                   {           {                   {           {                   {           {                   {
                            }                               }                               }                               }                               }                               }
        }
        }                               }
                                        }                               }
                                                                        }                               }
                                                                                                        }                               }
                                                                                                                                        }                               }
                                                                                                                                                                        }
            }       {       }               }       {       }               }       {       }               }       {       }               }       {       }               }       {       }




{               {               {               {               {               {               {               {               {               {               {               {
    {                   {           {                   {           {                   {           {                   {           {                   {           {                   {
                            }                               }                               }                               }                               }                               }
        }
        }                               }
                                        }                               }
                                                                        }                               }
                                                                                                        }                               }
                                                                                                                                        }                               }
                                                                                                                                                                        }
            }       {       }               }       {       }               }       {       }               }       {       }               }       {       }               }       {       }




{               {               {               {               {               {               {               {               {               {               {               {
    {                   {           {                   {           {                   {           {                   {           {                   {           {                   {
                            }                               }                               }                               }                               }                               }
        }
        }                               }
                                        }                               }
                                                                        }                               }
                                                                                                        }                               }
                                                                                                                                        }                               }
                                                                                                                                                                        }
            }       {       }               }       {       }               }       {       }               }       {       }               }       {       }               }       {       }




{               {               {               {               {               {               {               {               {               {               {               {
    {                   {           {                   {           {                   {           {                   {           {                   {           {                   {
                            }                               }                               }                               }                               }                               }
        }
        }                               }
                                        }                               }
                                                                        }                               }
                                                                                                        }                               }
                                                                                                                                        }                               }
                                                                                                                                                                        }
            }       {       }               }       {       }               }       {       }               }       {       }               }       {       }               }       {       }
eta-model?
 h at is the m
w
Modeling History
                              to Understand Software Evolution


                                           Inauguraldissertation der
                                    Philosophisch-naturwissenschaftlichen
                                         Fakultät der Universität Bern




                                                vorgelegt von


                                           Tudor Gîrba
                                               von Rumänien




Leiter der Arbeit:

Prof. Dr. Stéphane Ducasse
Prof. Dr. Oscar Nierstrasz

Institut für Informatik und
angewandte Mathematik
Idle
class

Pulsar
class


Supernova
class


White dwarf             attributes
class

              methods     Class
Idle
class

Pulsar
class


Supernova
class


White dwarf             attributes
class

              methods     Class
Idle
class history

Pulsar
class history


Supernova
class history


White dwarf     ClassHistory
class history
                isPulsar
                isIdle
System
Version




 Class
Version
System
          Version




 Class     Class
History   Version
System    System
History   Version




 Class     Class
History   Version
System    System
History   Version




 Class     Class
History   Version
History   Version




History   Version
ry exp licitl0y5
            dels h isto              0
                                Girba 2

H ismo   mo
                             History      Version




                             History      Version
what changed? when, how?


  2   4    3    5    7


  2   2    3    4    9


  2   2    1    2    3


  2   2    2    2    2


  1   5    3    4    4
Evolution of
                                LENOM(C) = ∑ |NOMi(C)-NOMi-1(C)| 2i-n
Number of Methods




    LENOM(C)        =   4   +     2   +   1   +   0   =    7

                    1       5         3       4       4



                                                                         4
                                                           Gîrba etal 200
Latest Evolution of
                                   LENOM(C) = ∑ |NOMi(C)-NOMi-1(C)| 2i-n
Number of Methods

Earliest Evolution of
                                   EENOM(C) = ∑ |NOMi(C)-NOMi-1(C)| 22-i
Number of Methods




     LENOM(C)           = 4 2-3 + 2 2-2 + 1 2-1 + 0 20 =      1.5

                        1      5         3       4       4

     EENOM(C)           = 4 20 + 2 2-1 + 1 2-2 + 0 2-3 =      5.25

                                                                             4
                                                              Gîrba etal 200
ENOM   LENOM   EENOM


2   4   3   5   7    7      3.5     3.25


2   2   3   4   9    7      5.75    1.37


2   2   1   2   3    3       1       2


2   2   2   2   2    0       0       0


1   5   3   4   4    7      1.25    5.25
ENOM   LENOM   EENOM


balanced changer    7      3.5     3.25


  late changer      7      5.75    1.37


                    3       1       2


  dead stable       0       0       0


 early changer      7      1.25    5.25
mea suredENOM
        ry ca n be                 LENOM   EENOM
Histo
         balanced changer     7     3.5     3.25


           late changer       7     5.75    1.37


                              3      1       2


           dead stable        0      0       0


          early changer       7     1.25    5.25
Evolution                 Number of Methods
Stability             Number of Lines of Code
Historical Max   of    Cyclomatic Complexity
Growth Trend              Number of Modules
...                                        ...
common wisdom: recently changed parts are likely to
change in the near future
common wisdom: recently changed parts are likely to
change in the near future

                                   r eally?
30%   90%
present
past




       present
past             future




       present
past             future




       present
past             future




       present
past             future




prediction hit          present
past             future




YesterdayWeatherHit(present):

 past:=histories.topLENOM(start, present)

 future:=histories.topEENOM(present, end)

 past.intersectWith(future).notEmpty()



                        prediction hit             present
Yesterday’s Weather shows the localization of
change


hit              hit               hit

                                         YW = 3 / 8 = 37%




hit        hit   hit   hit   hit   hit   hit

                                          YW = 7 / 8 = 87%

                                                          04
                                           Girba etal, 20
Detection Strategies
are metric-based queries
to detect design flaws
God Class:

class.ATFD()	 >	 FEW 	 	       &
class.WMC()	 >= VERY HIGH &
class.TCC()		   <	 ONE THIRD
God Class:

class.ATFD()	 >	 FEW 	 	       &
class.WMC()	 >= VERY HIGH &
class.TCC()		   <	 ONE THIRD




                                         f it is s table?
                                   what i
Harmless God Class:

classhistory.last.isGodClass() 	&
classhistory.STABILITY(NOM) >= VERY HIGH




                                                        2004
                                           Rat iu etal,
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                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
System    System
History   Version




 Class     Class
History   Version
System             System
History            Version



          Inheritance
            Version




 Class              Class
History            Version
System             System
         History            Version



Inheritance        Inheritance
  History            Version




          Class              Class
         History            Version
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 ...
A


  A                A                A                A                A




         B   C            B   C            B   C            B                B
                                                                                 C                           B

                              D                D                D            E


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


                                                                                 D                       E




         A is persistent, B is stable, C was removed, E is newborn ...
                                                                                                    05
                                                                                     Girba etal, 20
Hierarchy Evolution reveals evolution patterns




                                                    05
                                     Girba etal, 20
1   2   3   4   5   6

A
                                      A

B
                            B                          E
C

D

E                               C                D




                                                  99 8
                                    Ga ll etal, 1
1   2   3   4   5   6

A

B

C

D
                            Version
E
1   2   3   4   5   6

A

B

C

D
                            Version
E                           changed
1   2   3   4   5   6

A                            History
                            changed(i)
B

C

D
                             Version
E                            changed
1   2   3   4   5   6

A

B

C

D

E
{A, B, C, D, E}
    1   2   3   4   5   6                             Ø

A                                       {A, D, B}         {A, E, C, D}
                                          {2}                  {6}
B
                                   {D, B}           {A, D}         {A, E, C}
C                           FCA
                                   {2, 4}            {2, 6}         {5, 6}

D
                                    {D}             {A}              {C}
E                                 {2, 4, 6}       {2, 5, 6}        {3, 5, 6}


                                                      Ø
                                              {1, 2, 3, 4, 5, 6}
{A, B, C, D, E}
    1   2   3   4   5   6                             Ø

A                                       {A, D, B}         {A, E, C, D}
                                          {2}                  {6}
B
                                   {D, B}           {A, D}         {A, E, C}
C                           FCA
                                   {2, 4}            {2, 6}         {5, 6}

D
                                    {D}             {A}              {C}
E                                 {2, 4, 6}       {2, 5, 6}        {3, 5, 6}


                                                      Ø
                                              {1, 2, 3, 4, 5, 6}


                                                                   0     7
                                                    Girba etal, 20
Parallel Inheritance
add simultaneously children to several classes


Shotgun Surgery
change several classes simultaneously, but do not add methods
{
              {
    }
}
                         {
              {
    }
}
                                  for
                                        wa
                                             rd
                                                  en
                                                       gin
                                                             eer
                                                                     ing




                             reverse engineering



    actual development
                                                             n   g
                                                       e eri
                                               n gin
                                       rs ee
                               r eve
                         {
                         {
    }}
}
                         {



{
                         {
                }

}
Tudor Gîrba
        www.tudorgirba.com




creativecommons.org/licenses/by/3.0/

Contenu connexe

Similaire à What history can tell us

Helping you reengineering your legacy
Helping you reengineering your legacyHelping you reengineering your legacy
Helping you reengineering your legacy
Stéphane Ducasse
 

Similaire à What history can tell us (15)

Moose Overview
Moose OverviewMoose Overview
Moose Overview
 
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
 
Assessing software systems
Assessing software systemsAssessing software systems
Assessing software systems
 
Reverse Engineering (EVO 2008)
Reverse Engineering (EVO 2008)Reverse Engineering (EVO 2008)
Reverse Engineering (EVO 2008)
 
Humane assessment at ICSM 2010
Humane assessment at ICSM 2010Humane assessment at ICSM 2010
Humane assessment at ICSM 2010
 
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)
 
Enhancing agile development through software assessment
Enhancing agile development through software assessmentEnhancing agile development through software assessment
Enhancing agile development through software assessment
 
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
 
Restructuring (EVO 2008)
Restructuring (EVO 2008)Restructuring (EVO 2008)
Restructuring (EVO 2008)
 
Reverse Engineering 2007-11-27
Reverse Engineering 2007-11-27 Reverse Engineering 2007-11-27
Reverse Engineering 2007-11-27
 
Helping you reengineering your legacy
Helping you reengineering your legacyHelping you reengineering your legacy
Helping you reengineering your legacy
 
Reverse Engineering Techniques 2007-11-29
Reverse Engineering Techniques 2007-11-29 Reverse Engineering Techniques 2007-11-29
Reverse Engineering Techniques 2007-11-29
 
Software in Pictures 2008-03-12
Software in Pictures 2008-03-12Software in Pictures 2008-03-12
Software in Pictures 2008-03-12
 
The humane software assessment (Choose Forum 2009)
The humane software assessment (Choose Forum 2009)The humane software assessment (Choose Forum 2009)
The humane software assessment (Choose Forum 2009)
 

Plus de Tudor Girba

Plus 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
 

Dernier

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Dernier (20)

Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 

What history can tell us

  • 1. what history can tell us Tudor Gîrba www.tudorgirba.com
  • 3. PhD 2002 2005
  • 4. PhD PostDoc 2002 2005 2009
  • 5. PhD PostDoc 2002 2005 2009 Consultant eng.ch w ww.sw-
  • 6. { { } } { { } } for wa rd en gin eer ing
  • 7. ing eer gin en rd wa for { { { { { { { { } } } actual development } } } } } { }
  • 8. ing eer rev gin ers en ee rd ng wa ine for eri ng { { { { { { { { } } } actual development } } } } } { }
  • 10. 03 ucasse 20 Lanza, D
  • 11. { { } } { { } } for wa rd en gin eer ing actual development er ing g ine e en ev ers r { { }} } { { { } }
  • 12. { { } } { { } } for wa rd en gin eer ing reverse engineering actual development er ing g ine e en ev ers r { { }} } { { { } }
  • 14. commit time Wu etal ,2 004
  • 15. Evolution Matrix shows changes in classes Idle class Pulsar class Supernova class White dwarf class 2002 ucasse, Lanza, D
  • 16. 2002 ucasse, Lanza, D
  • 17.
  • 18. eta-model? h at is the m w
  • 19. { { { { } } } } { } complex, large { { { {
  • 20. { { { { { { { { { { { { { { { { { { { { { { { { } } } } } } } } } } } } } } } } } } } { } } { } } { } } { } } { } } { } { { { { { { { { { { { { { { { { { { { { { { { { } } } } } } } } } } } } } } } } } } } { } } { } } { } } { } } { } } { } { { { { { { { { { { { { { { { { { { { { { { { { } } } } } } } } } } } } } } } } } } } { } } { } } { } } { } } { } } { } { { { { { { { { { { { { { { { { { { { { { { { { } } } } } } } } } } } } } } } } } } } { } } { } } { } } { } } { } } { }
  • 21. eta-model? h at is the m w
  • 22. Modeling History to Understand Software Evolution Inauguraldissertation der Philosophisch-naturwissenschaftlichen Fakultät der Universität Bern vorgelegt von Tudor Gîrba von Rumänien Leiter der Arbeit: Prof. Dr. Stéphane Ducasse Prof. Dr. Oscar Nierstrasz Institut für Informatik und angewandte Mathematik
  • 23. Idle class Pulsar class Supernova class White dwarf attributes class methods Class
  • 24. Idle class Pulsar class Supernova class White dwarf attributes class methods Class
  • 25. Idle class history Pulsar class history Supernova class history White dwarf ClassHistory class history isPulsar isIdle
  • 27. System Version Class Class History Version
  • 28. System System History Version Class Class History Version
  • 29. System System History Version Class Class History Version
  • 30. History Version History Version
  • 31. ry exp licitl0y5 dels h isto 0 Girba 2 H ismo mo History Version History Version
  • 32. what changed? when, how? 2 4 3 5 7 2 2 3 4 9 2 2 1 2 3 2 2 2 2 2 1 5 3 4 4
  • 33. Evolution of LENOM(C) = ∑ |NOMi(C)-NOMi-1(C)| 2i-n Number of Methods LENOM(C) = 4 + 2 + 1 + 0 = 7 1 5 3 4 4 4 Gîrba etal 200
  • 34. Latest Evolution of LENOM(C) = ∑ |NOMi(C)-NOMi-1(C)| 2i-n Number of Methods Earliest Evolution of EENOM(C) = ∑ |NOMi(C)-NOMi-1(C)| 22-i Number of Methods LENOM(C) = 4 2-3 + 2 2-2 + 1 2-1 + 0 20 = 1.5 1 5 3 4 4 EENOM(C) = 4 20 + 2 2-1 + 1 2-2 + 0 2-3 = 5.25 4 Gîrba etal 200
  • 35. ENOM LENOM EENOM 2 4 3 5 7 7 3.5 3.25 2 2 3 4 9 7 5.75 1.37 2 2 1 2 3 3 1 2 2 2 2 2 2 0 0 0 1 5 3 4 4 7 1.25 5.25
  • 36. ENOM LENOM EENOM balanced changer 7 3.5 3.25 late changer 7 5.75 1.37 3 1 2 dead stable 0 0 0 early changer 7 1.25 5.25
  • 37. mea suredENOM ry ca n be LENOM EENOM Histo balanced changer 7 3.5 3.25 late changer 7 5.75 1.37 3 1 2 dead stable 0 0 0 early changer 7 1.25 5.25
  • 38. Evolution Number of Methods Stability Number of Lines of Code Historical Max of Cyclomatic Complexity Growth Trend Number of Modules ... ...
  • 39. common wisdom: recently changed parts are likely to change in the near future
  • 40. common wisdom: recently changed parts are likely to change in the near future r eally?
  • 41. 30% 90%
  • 42.
  • 43.
  • 45. past present
  • 46. past future present
  • 47. past future present
  • 48. past future present
  • 49. past future prediction hit present
  • 50. past future YesterdayWeatherHit(present): past:=histories.topLENOM(start, present) future:=histories.topEENOM(present, end) past.intersectWith(future).notEmpty() prediction hit present
  • 51. Yesterday’s Weather shows the localization of change hit hit hit YW = 3 / 8 = 37% hit hit hit hit hit hit hit YW = 7 / 8 = 87% 04 Girba etal, 20
  • 52. Detection Strategies are metric-based queries to detect design flaws
  • 53. God Class: class.ATFD() > FEW & class.WMC() >= VERY HIGH & class.TCC() < ONE THIRD
  • 54. God Class: class.ATFD() > FEW & class.WMC() >= VERY HIGH & class.TCC() < ONE THIRD f it is s table? what i
  • 55. Harmless God Class: classhistory.last.isGodClass() & classhistory.STABILITY(NOM) >= VERY HIGH 2004 Rat iu etal,
  • 56. 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
  • 57. 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
  • 58. System System History Version Class Class History Version
  • 59. System System History Version Inheritance Version Class Class History Version
  • 60. System System History Version Inheritance Inheritance History Version Class Class History Version
  • 61. 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 ...
  • 62. A A A A A A B C B C B C B B C B D D D E ver .1 ver. 2 ver. 3 ver. 4 ver. 5 D E A is persistent, B is stable, C was removed, E is newborn ... 05 Girba etal, 20
  • 63. Hierarchy Evolution reveals evolution patterns 05 Girba etal, 20
  • 64. 1 2 3 4 5 6 A A B B E C D E C D 99 8 Ga ll etal, 1
  • 65. 1 2 3 4 5 6 A B C D Version E
  • 66. 1 2 3 4 5 6 A B C D Version E changed
  • 67. 1 2 3 4 5 6 A History changed(i) B C D Version E changed
  • 68. 1 2 3 4 5 6 A B C D E
  • 69. {A, B, C, D, E} 1 2 3 4 5 6 Ø A {A, D, B} {A, E, C, D} {2} {6} B {D, B} {A, D} {A, E, C} C FCA {2, 4} {2, 6} {5, 6} D {D} {A} {C} E {2, 4, 6} {2, 5, 6} {3, 5, 6} Ø {1, 2, 3, 4, 5, 6}
  • 70. {A, B, C, D, E} 1 2 3 4 5 6 Ø A {A, D, B} {A, E, C, D} {2} {6} B {D, B} {A, D} {A, E, C} C FCA {2, 4} {2, 6} {5, 6} D {D} {A} {C} E {2, 4, 6} {2, 5, 6} {3, 5, 6} Ø {1, 2, 3, 4, 5, 6} 0 7 Girba etal, 20
  • 71. Parallel Inheritance add simultaneously children to several classes Shotgun Surgery change several classes simultaneously, but do not add methods
  • 72. { { } } { { } } for wa rd en gin eer ing reverse engineering actual development n g e eri n gin rs ee r eve { { }} } { { { } }
  • 73. Tudor Gîrba www.tudorgirba.com creativecommons.org/licenses/by/3.0/