which warnings should i fix first?

23
Sung Kim and Michael D. Ernst {hunkim, mernst}@csail.mit.edu CSAIL • MIT

Upload: sung-kim

Post on 25-Jun-2015

1.027 views

Category:

Technology


3 download

DESCRIPTION

2007 European Software Engineering Conference and 2007 Foundations of Software Engineering (ESEC/FSE 2007)

TRANSCRIPT

Page 1: Which Warnings Should I Fix First?

Sung Kim and Michael D. Ernst{hunkim, mernst}@csail.mit.edu

CSAIL • MIT

Page 2: Which Warnings Should I Fix First?

Sung Kim and Michael D. Ernst{hunkim, mernst}@csail.mit.edu

CSAIL • MIT

Page 3: Which Warnings Should I Fix First?

Static analysis I can find bugs for

you!

Page 4: Which Warnings Should I Fix First?

Bug-finding tool

Page 5: Which Warnings Should I Fix First?

Warnings

Page 6: Which Warnings Should I Fix First?

Warning examples

Page 7: Which Warnings Should I Fix First?

Are warnings useful?

Are all warnings Are all warnings important to be important to be

fixed?fixed?

Does tools’ Does tools’ prioritization help prioritization help

totoidentify important identify important

ones?ones?

Page 8: Which Warnings Should I Fix First?

Buggy lines

Rev 100

……

Mark as a Mark as a buggybuggy lineline if a line is changed if a line is changed in future fixes.in future fixes.

Page 9: Which Warnings Should I Fix First?

Warning evaluation

Rev 100

50% of warnings are fixed later

50% of warnings are fixed later

Page 10: Which Warnings Should I Fix First?

0 5 10 15 20

Scarab

Lucene

Columba

% of warnings that are fixed later

Proj

ects

FindBugs

JLint

PMD

NOonly 3~18% are fixed!

Are warnings important?

Page 11: Which Warnings Should I Fix First?

0 5 10 15

Scarab

Lucene

Columba

% of warnings that are fixed later

Proj

ects

All

Tool's priority 1

NOTools’ priority 1

warnings are not better.

Does tools’ prioritization help?

Page 12: Which Warnings Should I Fix First?

Warning A

File ……

Warning B

Foo ……

Our solution: using change history

Page 13: Which Warnings Should I Fix First?

Reprioritization algorithmWarning A

File 1 ……

Score(A) +=non-fix-weight (0.1)

Score(A) +=fix-weight (0.9)

Fixed Fixed bug bug #3576#3576

Score(A) +=Non-fix-weight(0.1)

Score(A)=1.1

Warning B Foo ……

Score(B)=0

fix

Score(A)=0Score(A)=0.1Score(A)=1

Page 14: Which Warnings Should I Fix First?

Evaluation

Rev n/2Rev 1

Train warnings

Rev n/2-1 Rev n

Mark buggy lines

Rev n/2+1

Page 15: Which Warnings Should I Fix First?

Comparison• History-based warning prioritization• Tools’ warning prioritization

• Compare precision of top 100 warnings

Page 16: Which Warnings Should I Fix First?

Columba

Page 17: Which Warnings Should I Fix First?

Columba

Page 18: Which Warnings Should I Fix First?

Lucene

Page 19: Which Warnings Should I Fix First?

Lucene

Page 20: Which Warnings Should I Fix First?

Scarab

Page 21: Which Warnings Should I Fix First?

Scarab

Page 22: Which Warnings Should I Fix First?

Summary

Page 23: Which Warnings Should I Fix First?

Sung Kim and Michael D. Ernst{hunkim, mernst}@csail.mit.edu

CSAIL • MIT