C UES FOR S CENT I NTENSIFICATION IN D EBUGGING Alexandre Perez and - - PowerPoint PPT Presentation

c ues for s cent
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

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

slide-2
SLIDE 2

FAULT LOCALIZATION

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

slide-3
SLIDE 3

FAULT LOCALIZATION

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

  • r

g i a I n s t i t u t e

  • f

T e c h n

  • l
  • g

y C

  • l

l e g e

  • f

C

  • m

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

slide-4
SLIDE 4

INFORMATION FORAGING

4

Predator: person debugging the program. Prey: what the predator seeks to know to pinpoint the fault.

slide-5
SLIDE 5

INFORMATION FORAGING

5

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.

slide-6
SLIDE 6

INFORMATION FORAGING

6

choice = max ✓information gain cost ◆

slide-7
SLIDE 7

SUNBURST

7

slide-8
SLIDE 8

SUNBURST

8

slide-9
SLIDE 9

SUNBURST

8

1 1 Project

slide-10
SLIDE 10

SUNBURST

8

1 2 1 Project 2 Source Folder

slide-11
SLIDE 11

SUNBURST

8

1 2 3 1 Project 2 Source Folder 3 Package

slide-12
SLIDE 12

SUNBURST

8

1 2 3 4 1 Project 2 Source Folder 3 Package 4 File

slide-13
SLIDE 13

SUNBURST

8

1 2 3 4 5 1 Project 2 Source Folder 3 Package 4 File 5 Class

slide-14
SLIDE 14

SUNBURST

8

1 2 3 4 5 6 1 Project 2 Source Folder 3 Package 4 File 5 Class 6 Method

slide-15
SLIDE 15

SUNBURST

8

1 2 3 4 5 6 7 1 Project 2 Source Folder 3 Package 4 File 5 Class 6 Method 7 Statement

slide-16
SLIDE 16

SUNBURST

9

High Suspiciousness Low Suspiciousness

slide-17
SLIDE 17

SUNBURST

10

slide-18
SLIDE 18

SUNBURST

10

Root Change

slide-19
SLIDE 19

11

slide-20
SLIDE 20

11

Check it out at www.gzoltar.com

slide-21
SLIDE 21

INFORMATION FORAGING

12

choice = max ✓information gain cost ◆

slide-22
SLIDE 22

INFORMATION FORAGING

12

choice = max ✓information gain cost ◆

color coding and the hierarchical visualization increase information scent interaction features can reduce the cost

  • f navigation
slide-23
SLIDE 23

USER STUDY

13

40 Participants

slide-24
SLIDE 24

USER STUDY

14

Students of the Master in Informatics and Computing Engineering at University of Porto

slide-25
SLIDE 25

USER STUDY

15

5+ years of Java/JUnit experience

slide-26
SLIDE 26

16

http://xstream.codehaus.org/

(De)serializes Java objects into XML 17 kLOC, 306 classes Participants were unfamiliar with the application

slide-27
SLIDE 27

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

slide-28
SLIDE 28

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

slide-29
SLIDE 29

SETUP

18

Participants were asked to locate and fix the fault. Metric: time-to-green. Timeout: 30 minutes.

slide-30
SLIDE 30

CONTROL GROUP

19

Find and fix the fault without the aid of GZoltar. 7 out of 20 participants completed the task.

slide-31
SLIDE 31

CONTROL GROUP

20

Average time: 23.4 minutes*

*Those that did not find the fault were assigned as taking the maximum time (30 minutes)

slide-32
SLIDE 32

EXPERIMENTAL GROUP

21

Find and fix the fault with the aid of GZoltar. All participants completed the task.

slide-33
SLIDE 33

EXPERIMENTAL GROUP

22

Average time: 7.9 minutes

slide-34
SLIDE 34

23

slide-35
SLIDE 35

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

slide-36
SLIDE 36

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.

slide-37
SLIDE 37

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.

slide-38
SLIDE 38

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.