Which Warnings Should I Fix First?
-
Upload
sung-kim -
Category
Technology
-
view
1.027 -
download
3
description
Transcript of Which Warnings Should I Fix First?
![Page 1: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/1.jpg)
Sung Kim and Michael D. Ernst{hunkim, mernst}@csail.mit.edu
CSAIL • MIT
![Page 2: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/2.jpg)
Sung Kim and Michael D. Ernst{hunkim, mernst}@csail.mit.edu
CSAIL • MIT
![Page 3: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/3.jpg)
Static analysis I can find bugs for
you!
![Page 4: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/4.jpg)
Bug-finding tool
![Page 5: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/5.jpg)
Warnings
![Page 6: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/6.jpg)
Warning examples
![Page 7: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/7.jpg)
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?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/8.jpg)
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?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/9.jpg)
Warning evaluation
Rev 100
50% of warnings are fixed later
50% of warnings are fixed later
![Page 10: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/10.jpg)
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?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/11.jpg)
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?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/12.jpg)
Warning A
File ……
Warning B
Foo ……
Our solution: using change history
![Page 13: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/13.jpg)
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?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/14.jpg)
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?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/15.jpg)
Comparison• History-based warning prioritization• Tools’ warning prioritization
• Compare precision of top 100 warnings
![Page 16: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/16.jpg)
Columba
![Page 17: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/17.jpg)
Columba
![Page 18: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/18.jpg)
Lucene
![Page 19: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/19.jpg)
Lucene
![Page 20: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/20.jpg)
Scarab
![Page 21: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/21.jpg)
Scarab
![Page 22: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/22.jpg)
Summary
![Page 23: Which Warnings Should I Fix First?](https://reader033.fdocuments.in/reader033/viewer/2022060118/558bcf9dd8b42aab0b8b47aa/html5/thumbnails/23.jpg)
Sung Kim and Michael D. Ernst{hunkim, mernst}@csail.mit.edu
CSAIL • MIT