CUES FOR SCENT INTENSIFICATION IN DEBUGGING
Alexandre Perez and Rui Abreu
Faculty of Engineering University of Porto, Portugal
November 4th 2013, International Workshop on Program Debugging
C UES FOR S CENT I NTENSIFICATION IN D EBUGGING Alexandre Perez and - - PowerPoint PPT Presentation
C UES FOR S CENT I NTENSIFICATION IN D EBUGGING Alexandre Perez and Rui Abreu Faculty of Engineering University of Porto, Portugal November 4th 2013, International Workshop on Program Debugging F AULT L OCALIZATION Runs mid() { Suspiciousness
November 4th 2013, International Workshop on Program Debugging
2 mid() { int x,y,z,m; read(“Enter 3 numbers:”,x,y,z); m = z; if (y<z) { if (x<y) m = y; else if (x<z) m = y; // ***BUG*** } else { if (x>y) m = y; else if (x>z) m = x; } print(“Middle number is:”,m); }
0.41 0.41 0.41 0.50 0.0 0.58 0.71 0.0 0.0 0.0 0.0 0.0 0.0 0.41
Runs 1 2 3 4 5 6 Suspiciousness
3 mid() { int x,y,z,m; read(“Enter 3 numbers:”,x,y,z); m = z; if (y<z) { if (x<y) m = y; else if (x<z) m = y; // ***BUG*** } else { if (x>y) m = y; else if (x>z) m = x; } print(“Middle number is:”,m); }
0.41 0.41 0.41 0.50 0.0 0.58 0.71 0.0 0.0 0.0 0.0 0.0 0.0 0.41
Runs 1 2 3 4 5 6 Suspiciousness
Are Automated Debugging Techniques Actually Helping Programmers?
Chris Parnin and Alessandro Orso
G e
g i a I n s t i t u t e
T e c h n
y C
l e g e
C
p u t i n g
{chris.parnin|orso}@gatech.edu ABSTRACT
is notoriously difficult and extremely time con- esearchers have therefore invested a co effort in developi second activity, fault understandin the root caus
4
5
6
7
8
8
1 1 Project
8
1 2 1 Project 2 Source Folder
8
1 2 3 1 Project 2 Source Folder 3 Package
8
1 2 3 4 1 Project 2 Source Folder 3 Package 4 File
8
1 2 3 4 5 1 Project 2 Source Folder 3 Package 4 File 5 Class
8
1 2 3 4 5 6 1 Project 2 Source Folder 3 Package 4 File 5 Class 6 Method
8
1 2 3 4 5 6 7 1 Project 2 Source Folder 3 Package 4 File 5 Class 6 Method 7 Statement
9
High Suspiciousness Low Suspiciousness
10
10
Root Change
11
11
Check it out at www.gzoltar.com
12
12
color coding and the hierarchical visualization increase information scent interaction features can reduce the cost
13
14
15
16
http://xstream.codehaus.org/
17
454 final List<Object> parameter = new ArrayList<Object>(); 455 if (targetType == null) { 456 parameter.add(targetType); 457 } 458 final List<Object> arrays = new ArrayList<Object>();
com.thoughtworks.xstream.mapper.AnnotationMapper
17
454 final List<Object> parameter = new ArrayList<Object>(); 455 if (targetType == null) { 456 parameter.add(targetType); 457 } 458 final List<Object> arrays = new ArrayList<Object>();
== instead of !=
com.thoughtworks.xstream.mapper.AnnotationMapper
18
19
20
*Those that did not find the fault were assigned as taking the maximum time (30 minutes)
21
22
23
24
FAULT LOCALIZATION
mid() { int x,y,z,m; read(“Enter 3 numbers:”,x,y,z); m = z; if (y<z) { if (x<y) m = y; else if (x<z) m = y; // ***BUG*** } else { if (x>y) m = y; else if (x>z) m = x; } print(“Middle number is:”,m); }
0.41 0.41 0.41 0.50 0.0 0.58 0.71 0.0 0.0 0.0 0.0 0.0 0.0 0.41
Runs 1 2 3 4 5 6 Suspiciousness
24
FAULT LOCALIZATION
mid() { int x,y,z,m; read(“Enter 3 numbers:”,x,y,z); m = z; if (y<z) { if (x<y) m = y; else if (x<z) m = y; // ***BUG*** } else { if (x>y) m = y; else if (x>z) m = x; } print(“Middle number is:”,m); }
0.41 0.41 0.41 0.50 0.0 0.58 0.71 0.0 0.0 0.0 0.0 0.0 0.0 0.41
Runs 1 2 3 4 5 6 Suspiciousness
INFORMATION FORAGING
Proximal cues: runtime behaviors that suggest information relative to the prey. Information scent: perceived likelihood that a cue will potentially lead to the fault. Topology: is the collection of paths through which the programmer can navigate.
24
SUNBURST
1 2 3 4 5 6 7 1 Project 2 Source Folder 3 Package 4 File 5 Class 6 Method 7 Statement
FAULT LOCALIZATION
mid() { int x,y,z,m; read(“Enter 3 numbers:”,x,y,z); m = z; if (y<z) { if (x<y) m = y; else if (x<z) m = y; // ***BUG*** } else { if (x>y) m = y; else if (x>z) m = x; } print(“Middle number is:”,m); }
0.41 0.41 0.41 0.50 0.0 0.58 0.71 0.0 0.0 0.0 0.0 0.0 0.0 0.41
Runs 1 2 3 4 5 6 Suspiciousness
INFORMATION FORAGING
Proximal cues: runtime behaviors that suggest information relative to the prey. Information scent: perceived likelihood that a cue will potentially lead to the fault. Topology: is the collection of paths through which the programmer can navigate.
24
SUNBURST
1 2 3 4 5 6 7 1 Project 2 Source Folder 3 Package 4 File 5 Class 6 Method 7 Statement
FAULT LOCALIZATION
mid() { int x,y,z,m; read(“Enter 3 numbers:”,x,y,z); m = z; if (y<z) { if (x<y) m = y; else if (x<z) m = y; // ***BUG*** } else { if (x>y) m = y; else if (x>z) m = x; } print(“Middle number is:”,m); }
0.41 0.41 0.41 0.50 0.0 0.58 0.71 0.0 0.0 0.0 0.0 0.0 0.0 0.41
Runs 1 2 3 4 5 6 Suspiciousness
INFORMATION FORAGING
Proximal cues: runtime behaviors that suggest information relative to the prey. Information scent: perceived likelihood that a cue will potentially lead to the fault. Topology: is the collection of paths through which the programmer can navigate.