11
An Empirical Study on Reducing Omission Errors in Practice Jihun Park 1 , Miryung Kim 2 , Doo-Hwan Bae 1 1. KAIST, South Korea 2. University of California, Los Angeles (UCLA), USA ASE 2014

[ASE2014] An Empirical Study on Reducing Omission Errors in Practice

Embed Size (px)

Citation preview

Page 1: [ASE2014] An Empirical Study on Reducing Omission Errors in Practice

An Empirical Study on Reducing Omission Errors in Practice

Jihun Park1, Miryung Kim2, Doo-Hwan Bae1

1. KAIST, South Korea2. University of California, Los Angeles (UCLA), USA

ASE 2014

Page 2: [ASE2014] An Empirical Study on Reducing Omission Errors in Practice

2

Predicting co-changed entities

A.javaB.javaC.java

Revision 7365 Version history

Can we predict an additional change location in a transaction?• Change coupling (mining SW repositories): Zimmermann et al.,

Ying et al., Hassan and Holt, Herzig and Zeller

• Structural dependency: Robillard, Saul et al.

• Cloning-based relationship: Nguyen et al.

… …

Page 3: [ASE2014] An Empirical Study on Reducing Omission Errors in Practice

3

Predicting omission errors

Version history

A.javaB.javaC.java

Revision 101

A.javaD.javaE.java

Revision 125

… …

Log: Fix bug #10000 Log: Patch bug #10000

Initial change Supplementary change

Can we predict the supplementary change location, given the initial change location?

A developer missed to update D and E (omission error)

Page 4: [ASE2014] An Empirical Study on Reducing Omission Errors in Practice

4

Key contributions• To systematically investigate a real-world supplementary

patch data set, we suggest a graph representation change relationship graph (CRG).

1. While a single trait is inadequate, combining multiple traits is limited as well.

2. A boosting approach does not significantly improve the accuracy.

3. There is no package or developer specific pattern.4. There is no repeated mistake.

Page 5: [ASE2014] An Empirical Study on Reducing Omission Errors in Practice

5

Change Relationship Graph (CRG)

• Graph Edges• Extends• Contains• Method invocation (calls, called by)• Historical co-change• Code clone• Name similarity

• Graph Nodes• Classes• Methods

ClassClass

Method

contains contains

Code clone

calls

Method

Method

An initial change location

The supplementary change location

* Saha et al. A graph-based framework for reasoning about relationships among software modifications. TR 2014

Study subjects: Eclipse JDT core, Eclipse SWT, and Equinox p2

Page 6: [ASE2014] An Empirical Study on Reducing Omission Errors in Practice

6

Observation 1: While a single trait is inadequate, com-bining multiple traits is limited as well.

• Only 10% to 20% of supplementary change locations can be connected with one edge from their initial change location.

• Combining multiple traits as a prediction rule shows at most 10% accuracy

Combining multiple traits does not predict supplemen-tary change locations accurately

Initial

X (arbitrar

y)

Supplementar

y

Code clone calls

Code clone edge, and calls edge: Suggest locations that are called by some location X, and the content of X is similar to the initial change location

Page 7: [ASE2014] An Empirical Study on Reducing Omission Errors in Practice

7

Observation 2: A boosting approach does not improve the accuracy.

• We design a boosting approach that sums up the trained accuracy of rules connecting initial and supplementary change locations to calculate a prediction score

• This approach cannot accurately predict supplementary change location (at most 7% precision).

Method 1

Method 2

Co-change

calls, called by

Initial CandidateSupplementary

A Prediction scorefor method 2

Sums up the trained accuracy of these rules.

A boosting approach based on the past prediction accuracy also cannot accurately predict supplementary change loca-

tions.

Suggest locations which have high prediction scores

Page 8: [ASE2014] An Empirical Study on Reducing Omission Errors in Practice

8

Observation 3: There is no package or developer spe-cific pattern.

• We filter prediction rules based on package or devel-oper specific information.

• We make boosting approaches based on the package and developer specific prediction rules.

• The improvements are negligible; the highest accu-racy improvement is only 1.2%

No package or developer specific pattern between initial and supplementary change locations exists.

Package AAccuracy of code clone: 40%Accuracy of co-change: 10%

Page 9: [ASE2014] An Empirical Study on Reducing Omission Errors in Practice

9

Observation 4: There is no repeated mistake.

• We investigate whether repeated patterns between ini-tial and supplementary change locations exist.

• 78% to 96% of the discovered patterns appear only once.• 69% to 84% of initial change locations appear only once.

Developers rarely make repeated mistakes at the same location

Version history

A.java B.java

Initial Supplementary

…… A.java

Initial

Rev. 100 Rev. 109 Rev. 200

?

Page 10: [ASE2014] An Empirical Study on Reducing Omission Errors in Practice

10

Conclusion• We systematically study omission errors using a real-

world supplementary patch data set.

• Version history based pattern mining cannot be accu-rate at finding supplementary change locations.

• Past prediction accuracy, and package or developer spe-cific information do not help.

• We share our skepticism that reducing real-world omis-sion errors is inherently challenging.

Page 11: [ASE2014] An Empirical Study on Reducing Omission Errors in Practice

ASE 2014

Thank you for lis-teningAn Empirical Study on Reducing

Omission Errors in Practice

Jihun Park1, Miryung Kim2, Doo-Hwan Bae1

1. KAIST, South Korea2. University of California, Los Angeles (UCLA), USA