eROSE: Guiding programmers in Eclipse

24
Thomas Zimmermann, [email protected] Saarland University eROSE Guiding Programmers in Eclipse Joint work with Valentin Dallmeier, Konstantin Halachev, Peter Weißgerber, Stephan Diehl, Andreas Zeller

description

Demonstrated at OOPSLA 2005.

Transcript of eROSE: Guiding programmers in Eclipse

Page 1: eROSE: Guiding programmers in Eclipse

Thomas Zimmermann, [email protected] University

eROSEGuiding Programmers in Eclipse

Joint work with Valentin Dallmeier, Konstantin Halachev, Peter Weißgerber, Stephan Diehl, Andreas Zeller

Page 2: eROSE: Guiding programmers in Eclipse

Programming in the LargeWhat’s next?

27,000 files

And documentation? xml xmlxml html html html

12,000 files

xml

Programanalysis

Missed byprogram analysis

Page 3: eROSE: Guiding programmers in Eclipse
Page 4: eROSE: Guiding programmers in Eclipse

“Programmers who changed this function also changed…”

Page 5: eROSE: Guiding programmers in Eclipse

Demo: eROSE

Your task: Extend Eclipse with a new preference.

Page 6: eROSE: Guiding programmers in Eclipse

Demo: eROSE

You changed the field fKeys[].eROSE recommends further changes:

Page 7: eROSE: Guiding programmers in Eclipse

Co-Change

ComparePreferencePage.java

fKeys[]

initDefaults()

11

40

15

11

ComparePreferencePage.java plugin.properties

## Preference Page#ComparePreferencePage.name= Compare/Patch

ComparePreferencePage.generalTab.label= &General

ComparePreferencePage.structureCompare.label= &Open structure compare automaticallyComparePreferencePage.showMoreInfo.label= &Show additional compare information in the status lineComparePreferencePage.ignoreWhitespace.label= Ignore &white spaceComparePreferencePage.saveBeforePatching.label= A&utomatically save dirty editors before patching

ComparePreferencePage.filter.description= Enter member names that should be excluded from 'Compare With Each Other'.\nList is comma separated (e.g. '*.class, .project, bin/')ComparePreferencePage.filter.label= &Filtered Members:ComparePreferencePage.filter.invalidsegment.error= Filter is invalid: {0}

ComparePreferencePage.textCompareTab.label= &Text Compare

ComparePreferencePage.initiallyShowAncestorPane.label= Initially show a&ncestor paneComparePreferencePage.showPseudoConflicts.label= Show &pseudo conflictsComparePreferencePage.synchronizeScrolling.label= Synchronize &scrolling between panes in compare viewersComparePreferencePage.useSingleLine.label= Connect &ranges with single line

ComparePreferencePage.preview.label= Preview:

fKeys[]

initDefaults()

10

13

20

11

40 69

15

11

Page 8: eROSE: Guiding programmers in Eclipse

Demo: Co-Change

internal files

icons

public API

Coupling for ComparePreferencePage.java

and plugin.properties

buildnotes_compare.html

EPOSEEwww.eposoft.org

Page 9: eROSE: Guiding programmers in Eclipse

2003-02-19 (aweinand): fixed #13332

createGeneralPage()createTextComparePage()fKeys[]initDefaults()buildnotes_compare.htmlPatchMessages.propertiesplugin.properties

Learning from History

1/47,000

Page 10: eROSE: Guiding programmers in Eclipse

Mining Associations

#42 fKeys[], initDefaults(), …, plugin.properties, …

#752 fKeys[], initDefaults(), …, plugin.properties, …

#9872 fKeys[], initDefaults(), …, plugin.properties, …

#11386 fKeys[], initDefaults(), …

#20814 fKeys[], initDefaults(), …, plugin.properties, …

#30989 fKeys[], initDefaults(), …, plugin.properties, …

#41999 fKeys[], initDefaults(), …, plugin.properties, …

#47423 fKeys[], initDefaults(), …, plugin.properties, …

Page 11: eROSE: Guiding programmers in Eclipse

Mining Associations

#42 fKeys[], initDefaults(), …, plugin.properties, …

#752 fKeys[], initDefaults(), …, plugin.properties, …

#9872 fKeys[], initDefaults(), …, plugin.properties, …

#11386 fKeys[], initDefaults(), …

#20814 fKeys[], initDefaults(), …, plugin.properties, …

#30989 fKeys[], initDefaults(), …, plugin.properties, …

#41999 fKeys[], initDefaults(), …, plugin.properties, …

#47423 fKeys[], initDefaults(), …, plugin.properties, …{fKeys[], initDefaults()} ⇒ {plugin.properties}Support 7, Confidence 7/8 = 0.875

Page 12: eROSE: Guiding programmers in Eclipse

Effective Mining

TxID Itemset

100

200

300

400

500

600

700

A, B, C

A,D

A, B, C

B, D

A, D

B, E

A, B

TxID Itemset

100

300

700

A, B, C

A, B, C

A, B

find group & sort { A, B }

{ A, B }

{ A, B, C }

Item Count

A

B

C

3

3

2

Item Count

A

B

C

count = 3

3

2

{ A, B } => { A } is trivial

{ A, B } => { B } is trivial

{ A, B } => { C } has count=2, confidence=2/3 and is strong

Changes made by user: A, B

Find transactions that contain A, B:

Create recommendations on the fly:

Page 13: eROSE: Guiding programmers in Eclipse

Demo: Association Rules

Page 14: eROSE: Guiding programmers in Eclipse

Evaluation

Can eROSE suggest related entities?

Evaluation using eight open-source projectsTraining: all transactions before evaluation

Userfoo()

changes

one item

eROSE

recommendsxml

bar()

Page 15: eROSE: Guiding programmers in Eclipse

Precision vs. RecallWhat EROSE finds What it should find

False positives False negativesCorrect prediction

High precision = returned entities are relevantHigh recall = relevant entities are returned

Page 16: eROSE: Guiding programmers in Eclipse

Results #1ENTITIES FILES

Recall Precision Top 3 Recall Precision Top 3Eclipse 0.34 0.30 0.57 0.36 0.29 0.57

GCC 0.45 0.31 0.91 0.59 0.35 0.88Gimp 0.35 0.30 0.92 0.48 0.28 0.92JBoss 0.36 0.31 0.62 0.36 0.19 0.51jEdit 0.21 0.31 0.86 0.41 0.31 0.88

KOffice 0.24 0.23 0.54 0.45 0.30 0.70Postgres 0.29 0.29 0.65 0.37 0.29 0.72

Python 0.37 0.27 0.54 0.46 0.34 0.61AVERAGE 0.33 0.29 0.70 0.44 0.29 0.72

Page 17: eROSE: Guiding programmers in Eclipse

ENTITIES FILESRecall Precision Top 3 Recall Precision Top 3

Eclipse 0.34 0.30 0.57 0.36 0.29 0.57GCC 0.45 0.31 0.91 0.59 0.35 0.88Gimp 0.35 0.30 0.92 0.48 0.28 0.92JBoss 0.36 0.31 0.62 0.36 0.19 0.51jEdit 0.21 0.31 0.86 0.41 0.31 0.88

KOffice 0.24 0.23 0.54 0.45 0.30 0.70Postgres 0.29 0.29 0.65 0.37 0.29 0.72

Python 0.37 0.27 0.54 0.46 0.34 0.61AVERAGE 0.33 0.29 0.70 0.44 0.29 0.72

Results #1

eROSE predicts 33% of all changed entities(files: 44%)

In 70% of all transactions, eROSE’s topmost three suggestions contain a changed entity(files: 72%)

Page 18: eROSE: Guiding programmers in Eclipse

Results #2

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

(Xm

as)

(Xm

as)

(Xm

as)

3.0

2.1

.3

2.1

.2

2.1

.1

2.1

2.0

.12.0

(Fre

eze)

OS

S

Releases

Txs per Day

RecallPrecision

Feedback

Likelihood 10

Page 19: eROSE: Guiding programmers in Eclipse

Upcoming: Reorganizer

Page 20: eROSE: Guiding programmers in Eclipse

Upcoming: Reorganizer

Page 21: eROSE: Guiding programmers in Eclipse

Upcoming: HATARI

Raising Risk Awareness

Movie withJohn Wayne

(1962)

Swahili for “Danger”

Page 22: eROSE: Guiding programmers in Eclipse

HATARI: Annotations

“Safe” Location(green)

Risky Location(dark red)

Page 23: eROSE: Guiding programmers in Eclipse

HATARI: Risk HistoryBug, Fix, or both?

Bug information

Change information

Page 24: eROSE: Guiding programmers in Eclipse

Conclusion

The history of a software project contains a multitude of information.

eROSE recommends related changes.

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