automatic identification of bug inducing changes
DESCRIPTION
Presented in CMPUT664 , Wi '12 in UofAlbertaTRANSCRIPT
![Page 1: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/1.jpg)
Automatic Identification of Bug-
Introducing Changes
Kim, Zimmermann, Pan, Whitehead
Presented By**:
Arnamoy Bhattacharyya
University of Alberta
**some slides are taken from the presentation of Nicolas Bettenburg
![Page 2: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/2.jpg)
![Page 3: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/3.jpg)
Control Development
Multi User Access
Change History
Capture Problems
Multi User Access
Error History
![Page 4: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/4.jpg)
![Page 5: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/5.jpg)
Bug Report #5612 reports an error
Error fixed in version 0.13
Commit Message in 0.13 : "Fixed Bug #5612"
![Page 6: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/6.jpg)
Finding changes that have repaired a bug
searching for keywords such as "Fixed" or "Bug"
searching for references to bug reports like “#42233”
![Page 7: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/7.jpg)
when?
who?
![Page 8: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/8.jpg)
![Page 9: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/9.jpg)
![Page 10: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/10.jpg)
1: public void bar() {
2: // print report
3: if (report == null) {
4: println(report);
5: }
6: }
1: public void foo() {
2: // print report
3: if (report == null)
4: {
5: println(report);
6: }
7: }
1: public void foo() {
2: // print out report
3: if (report != null)
4: {
5: println(report);
6: }
7. }
Revision 0.11 Revision 0.12 Revision 0.13
![Page 11: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/11.jpg)
1: public void bar() {
2: // print report
3: if (report == null) {
4: println(report);
5:
6: }
1: public void foo() {
2: // print report
3: if (report == null)
4: {
5: println(report);
6: }
7: }
1: public void foo() {
2: // print out report
3: if (report != null)
4: {
5: println(report);
6: }
Revision 0.11 Revision 0.12 Revision 0.13
Running diff tool between 0.12 and 0.13
![Page 12: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/12.jpg)
1: public void bar() {
2: // print report
3: if (report == null) {
4: println(report);
5: }
6: }
0.12 sam 1: public void foo() {
0.11 kim 2: // print report
0.12 sam 3: if (report == null)
0.12 sam 4: {
0.11 kim 5: println(report);
0.11 kim 6: }
0.11 kim 7: }
public void foo() {
// print out report
3: if (report != null)
4: {
5: println(report);
6: }
7: }
Revision 0.11 Revision 0.12 Revision 0.13
$ cvs annotate –r 0.12 Foo.java
![Page 13: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/13.jpg)
1: public void bar() {
2: // print report
3: if (report == null) {
4: println(report);
5: }
6: }
0.12 sam 1: public void foo() {
0.11 kim 2: // print report
0.12 sam 3: if (report == null)
0.12 sam 4: {
0.11 kim 5: println(report);
0.11 kim 6: }
0.11 kim 7: }
public void foo() {
// print out report
3: if (report != null)
4: {
5: println(report);
6: }
7: }
Revision 0.11 Revision 0.12 Revision 0.13
Not
Necessary
Not
Necessary
Necessary
but WRONG
![Page 14: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/14.jpg)
![Page 15: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/15.jpg)
Use Annotation Graphs
![Page 16: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/16.jpg)
1: public void bar() {
2: // print report
3: if (report == null) {
4: println(report);
5:}
6: }
1: public void foo() {
2: // print report
3: if (report == null)
4: {
5: println(report);
6: }
7: }
1: public void foo() {
2: // print out report
3: if (report != null)
4: {
5: println(report);
6: }
7. }
Revision 0.11 Revision 0.12 Revision 0.13
![Page 17: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/17.jpg)
1: public void bar() {
2: // print report
3: if (report == null) {
4: println(report);
5:
6: }
1: public void foo() {
2: // print report
3: if (report == null)
4: {
5: println(report);
6: -----
7: }
1: public void foo() {
2: // print out report
3: if (report != null)
4: {
5: println(report);
6: }
Revision 0.11 Revision 0.12 Revision 0.13
Detect
function name
changesFind Bug Inducing
Change
![Page 18: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/18.jpg)
![Page 19: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/19.jpg)
False Positive - Indicated as Bug Inducing Change but actually not
False Negative- NOT Indicated as Bug Inducing Change but
actually is one
4.1. Using Annotation Graph
![Page 20: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/20.jpg)
4.2. Non Behavior Changes
1. Comments2. Changes to source code format
3. Addition/removal of blank lines
1: public void bar() {
2: if (report == null) {
3: println(report);
4: }
1: public void bar() {
2: // print report
3: if (report == null)
4: {
5: println(report);
6:
7: }
����Addition of comment
� Change of Source code format
� Addition of Blank Lines
![Page 21: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/21.jpg)
Ignoring Blank Lines and Comments
removes 14%~20% of false positives
![Page 22: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/22.jpg)
removes 18%~25% of false positives and 13%~14% of false
negatives.
Ignoring Source Code Format Changes
![Page 23: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/23.jpg)
4.4. Remove Fix Revision Outliers
![Page 24: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/24.jpg)
most of the changes are method name and parameter name changes
ignoring outlier revisions removes 7%~16% of false positives
![Page 25: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/25.jpg)
possible that we are ignoring changes are real bug-fixes
![Page 26: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/26.jpg)
4.5. Manual Fix Hunk Verification
how many bug-fix hunks are true bug-fixes???
![Page 27: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/27.jpg)
![Page 28: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/28.jpg)
Not perfect BUT Close Enough!!
![Page 29: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/29.jpg)
![Page 30: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/30.jpg)
![Page 31: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/31.jpg)
![Page 32: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/32.jpg)
Train Data
![Page 33: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/33.jpg)
Help HATARI
![Page 34: Automatic Identification of bug inducing changes](https://reader033.vdocuments.us/reader033/viewer/2022052904/55836edcd8b42a79658b4d19/html5/thumbnails/34.jpg)