30
Baishakhi Ray, Christopher Wiley, Miryung Kim The University of Texas at Austin

demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

Baishakhi  Ray,  Christopher  Wiley,  Miryung  Kim  The  University  of  Texas  at  Austin    

Page 2: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

¡  Software  forking  has  become  popular.  ¡  Open  source  forked  projects:  

§  OpenBSD  from  NetBSD  §  XEmacs  from  GNU  Emacs  

¡  Proprietary  forked  projects:  § Mac  OS  X  from  FreeBSD  §  EnterpriseDB  from  PostgreSQL  

   

Page 3: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

 ¡  Developers  port  similar  feature  additions  and  bug-­‐fixes  across  the  projects.  

 ¡  Repertoire  analyzes  the  extent  and  characteristics  of  cross-­‐system  porting  across  forked  projects.  

   

Page 4: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

gEmacs_1.0  

gEmacs_5.0  

gEmacs_18.0  

gEmacs_20.0  gEmacs_24.0  

Gnu Emacs

4

Page 5: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

5

gEmacs_1.0  

gEmacs_5.0  

gEmacs_18.0  

gEmacs_20.0  gEmacs_24.0  

Gnu Emacs Urgent    Requirement?  

Page 6: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

6

gEmacs_1.0  

gEmacs_5.0  

gEmacs_18.0  

gEmacs_20.0  gEmacs_24.0  

Gnu Emacs Urgent    Requirement?  

Fork  

Page 7: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

Gnu Emacs

XEmacs XE_1.0 XE_10.0 XE_20.0

GE_1.0 GE_5.0 GE_18.0 GE_20.0 GE_24.0

7

Page 8: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

q  Involves  repetitive  work  to  port  bug-­‐fixes  and  new  feature.  

 

8

Gnu Emacs

XEmacs

XE_1.0 XE_10.0 XE_20.0

GE_1.0 GE_5.0 GE_18.0 GE_20.0 GE_24.0

Page 9: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

Gnu  Emacs  Commit  Messages  showing  evidence  of  cross-­‐system  porting  

Author:  Stefan  Monnier  <[email protected]>  Date:      Tue  Jan  11  00:07:32  2011  -­‐0500            *  lisp/progmodes/prolog.el:  Fix  up  coding  conventions  and  such.          …          (prolog-­‐emacs):  Remove.    Use  (featurep  'xemacs)  instead.        …    

Author:  Richard  M.  Stallman  <[email protected]>  Date:      Sun  Jan  22  02:21:32  1995  +0000            (term-­‐if-­‐emacs19,  term-­‐if-­‐xemacs,  term-­‐ifnot-­‐xemacs):    New  macros          to  conditionalize  at  compile-­‐time  for  different  emacs  versions.  

9

Page 10: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

C/  Header  files  

KLOC   Authors   Number  of  

Commits  Gnu  Emacs   372   246   266   10525  

XEmacs   496   282   11   754  

Page 11: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

User Interface

Back End

11

Input  Wizard  Projects,  Repository  URLs,  and  Time  Period  

Analysis  Wizard:    Porting  Frequency  /    File  Distribution  /  Developer  /  Porting  Latency  

Data  extraction:  diff  patches  Developers  Commit  dates  

Ported  edits  identification:  (CCFinderX,  N-­‐gram  Matching)  

Repertoire  DB  

Page 12: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

User Interface

Back End

12

Input  Wizard  Projects,  Repository  URLs,  and  Time  Period  

Analysis  Wizard:    Porting  Frequency  /    File  Distribution  /  Developer  /  Porting  Latency  

Data  extraction:  diff  patches  Developers  Commit  dates  

Ported  edits  identification:  (CCFinderX,  N-­‐gram  Matching)  

Repertoire  DB  

Page 13: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’
Page 14: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

User Interface

Back End

14

Input  Wizard  Projects,  Repository  URLs,  and  Time  Period  

Analysis  Wizard:    Porting  Frequency  /    File  Distribution  /  Developer  /  Porting  Latency  

Data  extraction:  diff  patches  Developers  Commit  dates  

Ported  edits  identification:  (CCFinderX,  N-­‐gram  Matching)  

Repertoire  DB  

Page 15: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

User Interface

Back End

15

Input  Wizard  Projects,  Repository  URLs,  and  Time  Period  

Analysis  Wizard:    Porting  Frequency  /    File  Distribution  /  Developer  /  Porting  Latency  

Data  extraction:  diff  patches  Developers  Commit  dates  

Ported  edits  identification:  (CCFinderX,  N-­‐gram  Matching)  

Repertoire  DB  

Page 16: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

¡  Input:  two  set  of  diff  based  program  patches  from  the  two  input  projects.  

 ¡  Output:  ported  edits  among  the  patches.    ¡  Repertoire  compares  patches  to  identify  contents  and  edit  operations’  similarity.    

16

Page 17: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

Patch1 (Jan ’10)

Patch2 (Mar ‘10)

**** Old **** X1 for(i=0;i<MAX;i++){ X2 - x = array[i]+x; X3 - y = foo(x); X4 - x = x-y; X5 } **** New **** X6 for(i=0;i<MAX;i++) { X7 + y = x+y; X8 + x = array[i]+x; X9 + y = foo(x,y); X10 } !

**** Old **** Y1 for(j=0;j<MAX;j++) { Y2 q = p + q; Y3 - q = array[j]+p; Y4 - p = foo1(q); Y5 } **** New **** Y6 for(j=0;j<MAX;j++) { Y7 q = p + q; Y8 + q = array[j] + q; Y9 + p = foo1(p,q); Y10 } !

17

Page 18: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

Patch1 (Jan ’10)

Patch2 (Mar ‘10)

**** Old **** X1 for(i=0;i<MAX;i++){ X2 - x = array[i]+x; X3 - y = foo(x); X4 - x = x-y; X5 } **** New **** X6 for(i=0;i<MAX;i++) { X7 + y = x+y; X8 + x = array[i]+x; X9 + y = foo(x,y); X10 } !

**** Old **** Y1 for(j=0;j<MAX;j++) { Y2 q = p + q; Y3 - q = array[j]+p; Y4 - p = foo1(q); Y5 } **** New **** Y6 for(j=0;j<MAX;j++) { Y7 q = p + q; Y8 + q = array[j] + q; Y9 + p = foo1(p,q); Y10 } !

18

Page 19: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

Patch1 (Jan ’10)

Patch2 (Mar ‘10)

**** Old **** X1 for(i=0;i<MAX;i++){ X2 - x = array[i]+x; X3 - y = foo(x); X4 - x = x-y; X5 } **** New **** X6 for(i=0;i<MAX;i++) { X7 + y = x+y; X8 + x = array[i]+x; X9 + y = foo(x,y); X10 } !

**** Old **** Y1 for(j=0;j<MAX;j++) { Y2 q = p + q; Y3 - q = array[j]+p; Y4 - p = foo1(q); Y5 } **** New **** Y6 for(j=0;j<MAX;j++) { Y7 q = p + q; Y8 + q = array[j] + q; Y9 + p = foo1(p,q); Y10 } !

Ported  edits  

19

Page 20: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

Patch1 (Jan ’10)

Patch2 (Mar ‘10)

**** Old **** X1 for(i=0;i<MAX;i++){ X2 - x = array[i]+x; X3 - y = foo(x); X4 - x = x-y; X5 } **** New **** X6 for(i=0;i<MAX;i++) { X7 + y = x+y; X8 + x = array[i]+x; X9 + y = foo(x,y); X10 } !

**** Old **** Y1 for(j=0;j<MAX;j++) { Y2 q = p + q; Y3 - q = array[j]+p; Y4 - p = foo1(q); Y5 } **** New **** Y6 for(j=0;j<MAX;j++) { Y7 q = p + q; Y8 + q = array[j] + q; Y9 + p = foo1(p,q); Y10 } !

20

Page 21: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

¡  From  our  empirical  study  of  cross-­‐system  porting  in  the  BSD  product  family,  we  find  Repertoire’s  Precision:  94%,    Recall:  84%.    

 

21

Page 22: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

User Interface

Back End

22

Input  Wizard  Projects,  Repository  URLs,  and  Time  Period  

Analysis  Wizard:    Porting  Frequency  /    File  Distribution  /  Developer  /  Porting  Latency  

Data  extraction:  diff  patches  Developers  Commit  dates  

Ported  edits  identification:  (CCFinderX,  N-­‐gram  Matching)  

Repertoire  DB  

Page 23: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

23

ported_edit  § porting  id  § Edit  1  § Edit  2  § total  ported  lines    

Edit  § commit  id  § start  line  § end  line  § patch  id    

patch  § patch  id  § patch  name  § total  edited  lines    § Total  ported  lines    

commits  § commit_id  § project  id  § author  § commit  date    § List[patch]  

Repertoire  Database  

List[ported_edit]  

List[commits]  

Populated by “Data Extraction” Module Populated by “Ported edits identification” Module

Page 24: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

User Interface

Back End

24

Input  Wizard  Projects,  Repository  URLs,  and  Time  Period  

Analysis  Wizard:    Porting  Frequency  /    File  Distribution  /  Developer  /  Porting  Latency  

Data  extraction:  diff  patches  Developers  Commit  dates  

Ported  edits  identification:  (CCFinderX,  N-­‐gram  Matching)  

Repertoire  DB  

Page 25: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

¡  Porting  Frequency  View  §  How  much  duplicate  work  is  taking  place  to  maintain  the  forked  project?  

¡  File  Distribution  View  §  Is  porting  mostly  concentrated  to  certain  files?    

¡  Developer  Distribution  View  §  Which  developers  primarily  port  edits  from  one  project  to  another?  

¡  Porting  Latency  View  §  How  long  it  takes  a  patch  to  port  from  one  project  to  another?  

Page 26: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’
Page 27: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

Managers  and  product  architects  can  make  informed  decision  about  how  to  manage  a  

product  family.  

REPERTOIRE  helps  to  monitor  cross  system  porting.  

27

Page 28: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

¡  Repertoire  can  be  downloaded  from  :            http://dolphin.ece.utexas.edu/Repertoire.html    ¡  A  Case  Study  of  Cross-­‐System  Porting  in  Forked  Software  Projects,  Baishakhi  Ray,  Miryung  Kim,  FSE  '12  §  Presentation:  8:30  am  on  Thursday    

28

Page 29: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

¡  This  work  was  in  part  supported  by  National  Science  Foundation  under  the  grants  CCF-­‐1117902,  CCF-­‐1149391,  and  CCF-­‐1043810  and  by  Microsoft  SEIF  award.    

Page 30: demo presentation finalmiryung/Publications/fse2012repertoire-sli… · 6 gEmacs_1.0 gEmacs_5.0’ gEmacs_18.0 gEmacs_20.0 gEmacs_24.0 Urgent’’ Gnu Emacs Requirement?’ Fork’

Baishakhi  Ray,  Christopher  Wiley,  Miryung  Kim  The  University  of  Texas  at  Austin