erose: guiding programmers in eclipse

Post on 29-Jun-2015

1.248 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

Demonstrated at OOPSLA 2005.

TRANSCRIPT

Thomas Zimmermann, zimmerth@cs.uni-sb.deSaarland University

eROSEGuiding Programmers in Eclipse

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

Programming in the LargeWhat’s next?

27,000 files

And documentation? xml xmlxml html html html

12,000 files

xml

Programanalysis

Missed byprogram analysis

“Programmers who changed this function also changed…”

Demo: eROSE

Your task: Extend Eclipse with a new preference.

Demo: eROSE

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

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

Demo: Co-Change

internal files

icons

public API

Coupling for ComparePreferencePage.java

and plugin.properties

buildnotes_compare.html

EPOSEEwww.eposoft.org

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

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

Learning from History

1/47,000

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, …

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

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:

Demo: Association Rules

Evaluation

Can eROSE suggest related entities?

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

Userfoo()

changes

one item

eROSE

recommendsxml

bar()

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

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

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%)

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

Upcoming: Reorganizer

Upcoming: Reorganizer

Upcoming: HATARI

Raising Risk Awareness

Movie withJohn Wayne

(1962)

Swahili for “Danger”

HATARI: Annotations

“Safe” Location(green)

Risky Location(dark red)

HATARI: Risk HistoryBug, Fix, or both?

Bug information

Change information

Conclusion

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

eROSE recommends related changes.

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

top related