fine-grained processing of cvs archives with apfel

32
Fine-grained processing of CVS archives with APFEL Tom Zimmermann Saarland University, Saarbrücken, Germany

Upload: thomas-zimmermann

Post on 05-Jul-2015

884 views

Category:

Technology


3 download

DESCRIPTION

Presented at ETX 2006.

TRANSCRIPT

Page 1: Fine-grained Processing of CVS Archives with APFEL

Fine-grained processing of CVS archives with APFEL

Tom ZimmermannSaarland University, Saarbrücken, Germany

Page 2: Fine-grained Processing of CVS Archives with APFEL

Guiding developers

Zimmermann, Weissgerber, Diehl, Zeller (TSE 2005)

Page 3: Fine-grained Processing of CVS Archives with APFEL
Page 4: Fine-grained Processing of CVS Archives with APFEL
Page 5: Fine-grained Processing of CVS Archives with APFEL

eROSE suggests further locations.

Page 6: Fine-grained Processing of CVS Archives with APFEL
Page 7: Fine-grained Processing of CVS Archives with APFEL

eROSE prevents incomplete changes.

Page 8: Fine-grained Processing of CVS Archives with APFEL

eROSE is customizable.

Page 9: Fine-grained Processing of CVS Archives with APFEL

APFEL collects CVS data

APFEL

Page 10: Fine-grained Processing of CVS Archives with APFEL

APFEL collects CVS data

APFEL

Page 11: Fine-grained Processing of CVS Archives with APFEL

APFEL collects CVS data

APFEL

Page 12: Fine-grained Processing of CVS Archives with APFEL

Fine-grained changes

public static void initDefaults(IPreferenceStore store) { store.setDefault(OPEN_STRUCTURE_COMPARE, true); store.setDefault(SYNCHRONIZE_SCROLLING, true); store.setDefault(SHOW_PSEUDO_CONFLICTS, false); store.setDefault(INITIALLY_SHOW_ANCESTOR_PANE, false); store.setDefault(SHOW_MORE_INFO, false); store.setDefault(IGNORE_WHITESPACE, false); store.setDefault(PREF_SAVE_ALL_EDITORS, false); //store.setDefault(USE_SPLINES, false); store.setDefault(USE_SINGLE_LINE, true); //store.setDefault(USE_RESOLVE_UI, false); store.setDefault(PATH_FILTER, ""); //$NON-NLS-1$}

initDefaults(IPreferenceStore store)

Page 13: Fine-grained Processing of CVS Archives with APFEL

Fine-grained changes

public static void initDefaults(IPreferenceStore store) { store.setDefault(OPEN_STRUCTURE_COMPARE, true); store.setDefault(SYNCHRONIZE_SCROLLING, true); store.setDefault(SHOW_PSEUDO_CONFLICTS, false); store.setDefault(INITIALLY_SHOW_ANCESTOR_PANE, false); store.setDefault(SHOW_MORE_INFO, false); store.setDefault(IGNORE_WHITESPACE, false); store.setDefault(PREF_SAVE_ALL_EDITORS, false); //store.setDefault(USE_SPLINES, false); store.setDefault(USE_SINGLE_LINE, true); //store.setDefault(USE_RESOLVE_UI, false); store.setDefault(PATH_FILTER, ""); //$NON-NLS-1$}

initDefaults(IPreferenceStore store)

CHANGED

Page 14: Fine-grained Processing of CVS Archives with APFEL

Fine-grained changes

public static void initDefaults(IPreferenceStore store) { store.setDefault(OPEN_STRUCTURE_COMPARE, true); store.setDefault(SYNCHRONIZE_SCROLLING, true); store.setDefault(SHOW_PSEUDO_CONFLICTS, false); store.setDefault(INITIALLY_SHOW_ANCESTOR_PANE, false); store.setDefault(SHOW_MORE_INFO, false); store.setDefault(IGNORE_WHITESPACE, false); store.setDefault(PREF_SAVE_ALL_EDITORS, false); //store.setDefault(USE_SPLINES, false); store.setDefault(USE_SINGLE_LINE, true); //store.setDefault(USE_RESOLVE_UI, false); store.setDefault(PATH_FILTER, ""); //$NON-NLS-1$}

initDefaults(IPreferenceStore store)

Removed call to setDefault (2x):store.setDefault(USE_SPLINES, false);store.setDefault(USE_RESOLVE_UI, false);

Inserted comments (2x): //store.setDefault(USE_SPLINES, false);//store.setDefault(USE_RESOLVE_UI, false);

Page 15: Fine-grained Processing of CVS Archives with APFEL

Collecting tokens

public static void main(String[] args) { System.out.println("Hello Portland."); System.out.println(“Hello eTX.”);}

Page 16: Fine-grained Processing of CVS Archives with APFEL

Collecting tokens

public static void main(String[] args) { System.out.println("Hello Portland."); System.out.println(“Hello eTX.”);}

T-SystemV-outM-printlnY-”Hello eTX.”

T-SystemV-outM-printlnY-”Hello eTX.”

T-String[]V-args

P-publicP-static

Page 17: Fine-grained Processing of CVS Archives with APFEL

Collecting tokens

Modularization packages, imports

Inheritance extends, implements

Method calls inner vs final call

Variable usage identifiers, types

Exceptions throws, throw, catch

Comments Javadoc, blocks, lines

Various modifiers, literals, operator, keywords

Page 18: Fine-grained Processing of CVS Archives with APFEL

Comparing token sets

Page 19: Fine-grained Processing of CVS Archives with APFEL

Comparing token sets

A()

C()

E()

D()

B()

Page 20: Fine-grained Processing of CVS Archives with APFEL

Comparing token sets

A()

C()

E()

D()

B()

A()

B()

E()

F()

D()

Page 21: Fine-grained Processing of CVS Archives with APFEL

Comparing token sets

A()

C()

E()

D()

B()

A()

B()

E()

F()

D()

Page 22: Fine-grained Processing of CVS Archives with APFEL

Cross-cutting changes

Page 23: Fine-grained Processing of CVS Archives with APFEL

Cross-cutting changes

SELECT token_name, COUNT(DISTINCT element_id) FROM cvs_tokens_method NATURAL JOIN cvs_revisions WHERE token_type='M' AND change_type='CHG' GROUP BY transaction_id, token_name  ORDER BY COUNT(DISTINCT element_id) DESC; 

Page 24: Fine-grained Processing of CVS Archives with APFEL

Cross-cutting changes

SELECT token_name, COUNT(DISTINCT element_id) FROM cvs_tokens_method NATURAL JOIN cvs_revisions WHERE token_type='M' AND change_type='CHG' GROUP BY transaction_id, token_name  ORDER BY COUNT(DISTINCT element_id) DESC; 

getString lock unlock error isValidWidget

token_name 1462 1284 1284 996 988

count

Page 25: Fine-grained Processing of CVS Archives with APFEL

ASPECTS?

Cross-cutting changes

SELECT token_name, COUNT(DISTINCT element_id) FROM cvs_tokens_method NATURAL JOIN cvs_revisions WHERE token_type='M' AND change_type='CHG' GROUP BY transaction_id, token_name  ORDER BY COUNT(DISTINCT element_id) DESC; 

getString lock unlock error isValidWidget

token_name 1462 1284 1284 996 988

count

Page 26: Fine-grained Processing of CVS Archives with APFEL

Cross-cutting changes

SELECT token_name, COUNT(DISTINCT element_id) FROM cvs_tokens_method NATURAL JOIN cvs_revisions WHERE token_type='M' AND change_type='CHG' GROUP BY transaction_id, token_name  ORDER BY COUNT(DISTINCT element_id) DESC; 

getString lock unlock error isValidWidget

token_name 1462 1284 1284 996 988

count

HAM: Cross-Cutting Concerns in Eclipse

SOON!

Page 27: Fine-grained Processing of CVS Archives with APFEL

One line fixes

>301 Expression150 Method call120 Literal (boundaries, constants)73 Keyword (true/false confusion)60 Operator39 Identifier39 Comment (!!)

Page 28: Fine-grained Processing of CVS Archives with APFEL

>301 Expression150 Method call120 Literal (boundaries, constants)73 Keyword (true/false confusion)60 Operator39 Identifier39 Comment (!!)

One line fixes

39 Comment (!!)

Page 29: Fine-grained Processing of CVS Archives with APFEL

>301 Expression150 Method call120 Literal (boundaries, constants)73 Keyword (true/false confusion)60 Operator39 Identifier39 Comment (!!)

One line fixes

39 Comment (!!)

Bug report: 119638 - Typo in ToolItem.getControl252c252< * the item when the items is a <code>SEPARATOR</code>.---> * the item when the item is a <code>SEPARATOR</code>

Page 30: Fine-grained Processing of CVS Archives with APFEL

Future work

• Capture the context of a change, e.g., within an if/while/switch expression.

• Integrate with dynamic analysis, i.e., signature in addition to handles.

• Package and ship APFEL.

Page 31: Fine-grained Processing of CVS Archives with APFEL

Conclusion

• APFEL collects CVS and change data.

• APFEL supports software evolution research, in particular early testing of hypotheses.

• http://www.st.cs.uni-sb.de/softevo/

Page 32: Fine-grained Processing of CVS Archives with APFEL

Conclusion

• APFEL collects CVS and change data.

• APFEL supports software evolution research, in particular early testing of hypotheses.

• http://www.st.cs.uni-sb.de/softevo/

MSR Challenge 2007