Your SlideShare is downloading. ×
Automatic Identification of  bug inducing changes
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Automatic Identification of bug inducing changes

163
views

Published on

Presented in CMPUT664 , Wi '12 in UofAlberta

Presented in CMPUT664 , Wi '12 in UofAlberta

Published in: Technology, News & Politics

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
163
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. 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
  • 2. Control DevelopmentMulti User Access Change History Capture Problems Multi User Access Error History
  • 3. Bug Report #5612 reports an errorError fixed in version 0.13Commit Message in 0.13 : "Fixed Bug #5612"
  • 4. Finding changes that have repaired a bugsearching for keywords such as "Fixed" or "Bug" searching for references to bug reports like “#42233”
  • 5. when? who?
  • 6. 1: public void bar() { 1: public void foo() { 1: public void foo() {2: // print report 2: // print report 2: // print out report3: if (report == null) { 3: if (report == null) 3: if (report != null)4: println(report); 4: { 4: {5: } 5: println(report); 5: println(report);6: } 6: } 6: } 7: } 7. }Revision 0.11 Revision 0.12 Revision 0.13
  • 7. 1: public void bar() { 1: public void foo() { 1: public void foo() {2: // print report 2: // print report 2: // print out report3: if (report == null) { 3: if (report == null) 3: if (report != null)4: println(report); 4: { 4: {5: 5: println(report); 5: println(report);6: } 6: } 6: } 7: }Revision 0.11 Revision 0.12 Revision 0.13 Running diff tool between 0.12 and 0.13
  • 8. 1: public void bar() { 0.12 sam 1: public void foo() { public void foo() {2: // print report 0.11 kim 2: // print report // print out report3: if (report == null) { 0.12 sam 3: if (report == null) 3: if (report != null)4: println(report); 0.12 sam 4: { 4: {5: } 0.11 kim 5: println(report); 5: println(report);6: } 0.11 kim 6: } 6: } 0.11 kim 7: } 7: }Revision 0.11 Revision 0.12 Revision 0.13 $ cvs annotate –r 0.12 Foo.java
  • 9. 1: public void bar() { 0.12 sam 1: public void foo() { public void foo() {2: // print report 0.11 kim 2: // print report // print out report3: if (report == null) { 0.12 sam 3: if (report == null) 3: if (report != null)4: println(report); 0.12 sam 4: { 4: {5: } 0.11 kim 5: println(report); 5: println(report);6: } 0.11 kim 6: } 6: } 0.11 kim 7: } 7: }Revision 0.11 Revision 0.12 Revision 0.13 Not Necessary Not Necessary but WRONG Necessary
  • 10. Use Annotation Graphs
  • 11. 1: public void bar() { 1: public void foo() { 1: public void foo() {2: // print report 2: // print report 2: // print out report3: if (report == null) { 3: if (report == null) 3: if (report != null)4: println(report); 4: { 4: {5:} 5: println(report); 5: println(report);6: } 6: } 6: } 7: } 7. }Revision 0.11 Revision 0.12 Revision 0.13
  • 12. 1: public void bar() { 1: public void foo() { 1: public void foo() {2: // print report 2: // print report 2: // print out report3: if (report == null) { 3: if (report == null) 3: if (report != null)4: println(report); 4: { 4: {5: 5: println(report); 5: println(report);6: } 6: ----- 6: } 7: }Revision 0.11 Revision 0.12 Revision 0.13 Detect function name Find Bug Inducing changes Change
  • 13. 4.1. Using Annotation GraphFalse Positive - Indicated as Bug Inducing Change but actually notFalse Negative- NOT Indicated as Bug Inducing Change butactually is one
  • 14. 4.2. Non Behavior Changes 1. Comments 2. Changes to source code format 3. Addition/removal of blank lines 1: public void bar() { 1: public void bar() { 2: if (report == null) { 2: // print report Addition of comment 3: println(report); 3: if (report == null) 4: } 4: { Change of Source code format 5: println(report); 6: Addition of Blank Lines 7: }
  • 15. Ignoring Blank Lines and Comments removes 14%~20% of false positives
  • 16. Ignoring Source Code Format Changesremoves 18%~25% of false positives and 13%~14% of falsenegatives.
  • 17. 4.4. Remove Fix Revision Outliers
  • 18. most of the changes are method name and parameter name changes ignoring outlier revisions removes 7%~16% of false positives
  • 19. possible that we are ignoring changes are real bug-fixes
  • 20. 4.5. Manual Fix Hunk Verification how many bug-fix hunks are true bug-fixes???
  • 21. Not perfect BUT Close Enough!!
  • 22. Train Data
  • 23. Help HATARI