Estimating the Accuracy of Dynamic Change-impact Analysis using - - PowerPoint PPT Presentation

estimating the accuracy of dynamic change impact analysis
SMART_READER_LITE
LIVE PREVIEW

Estimating the Accuracy of Dynamic Change-impact Analysis using - - PowerPoint PPT Presentation

Estimating the Accuracy of Dynamic Change-impact Analysis using Sensitivity Analysis Haipeng Cai Raul Santelices Tianyu Xu* University of Notre Dame, USA * Fudan University, China Supported by ONR Award N000141410037 SERE 2014


slide-1
SLIDE 1

Estimating the Accuracy of Dynamic Change-impact Analysis using Sensitivity Analysis

Haipeng Cai Raul Santelices  Tianyu Xu*

 University of Notre Dame, USA

* Fudan University, China

Supported by ONR Award N000141410037 SERE 2014

slide-2
SLIDE 2

Software keeps changing

Program P

  • Change 1
  • ……

P’

  • Change 2
  • ……

P’’

  • Change 3
  • ……

2

slide-3
SLIDE 3

Software keeps changing

Program P

  • Change 1
  • ……

P’

  • Change 2
  • ……

P’’

  • Change 3
  • ……

3

What will be impacted Broken

slide-4
SLIDE 4

Program P

  • Change 1
  • ……

P’

  • Change 2
  • ……

P’’

  • Change 3
  • ……

Change impacts need be analyzed

4

Change-impact Analysis (CIA) Dynamic

CIA After change

What will be impacted

slide-5
SLIDE 5

Program P

  • Change 1
  • ……

P’

  • Change 2
  • ……

P’’

  • Change 3
  • ……

Change impacts need be analyzed

5

Change-impact Analysis (CIA) Dynamic Predictive

CIA Before change

slide-6
SLIDE 6

How accurate is it ?

6

Predictive Dynamic Change-impact Analysis (CIA)

Candidate Change Locations Predicted Impacts

 How Accurate

(relative to real impacts)

 How Safe  How Precise

Programbase

E2 E4 E1, E2, E3, E4, E5 E1, E2, E3, E5 All entities Real impacts E2

slide-7
SLIDE 7

Why study CIA accuracy ?

7

Predictive Dynamic Change-impact Analysis (CIA)

 Not Accurate

 Not Safe : threaten quality  Not Precise : waste time

 (If not accurate) Motivate

developing better techniques

Programbase Candidate Change Locations Predicted Impacts

slide-8
SLIDE 8

Which techniques to study ?

8

 PathImpact (PI)

[Law & Rothermel ICSE’03]

 CoverageImpact (CI)

[Orso & Apiwattanapong & Harrold FSE’03]

 Execute-After-Sequences (EAS)

[Apiwattanapong & Orso & Harrold ICSE’05]

 InfluenceDynamic (InfDyn)

[Breech & Tegtmeyer & Pollock ICSM’06]

PI/EAS

Predictive Dynamic Change-impact Analysis (CIA)

 Our target  Method level  The most cost-effective

Little more precise much more expensive Much less precise

slide-9
SLIDE 9

Outline

 Background – PI/EAS  Methodology

 Sensitivity Analysis  Execution Differencing

 Results  Contributions

9

slide-10
SLIDE 10

How PI/EAS works

10

… Methods called from M2 directly/transitively Methods returned into after M2 returns

After M2 returned Methods called after M2 returns

slide-11
SLIDE 11

How PI/EAS works

11

 Example code  Example execution  Suppose changes will be in method M2

 M5, M3 potentially impacted: entered after M2 entered  M1, M0 potentially impacted: returned into after M2

returned

 Impact set = {M0,M1,M2,M3,M5}

enter M0 enter M1 enter M2 enter M5 return into M2 return into M1 enter M3 return into M1 return into M0

slide-12
SLIDE 12

Outline

 Background: PI/EAS  Methodology

 Sensitivity Analysis  Execution Differencing

 Results  Contributions

12

slide-13
SLIDE 13

Study as many changes as possible

13

Predictive Dynamic Change-impact Analysis (CIA)

Candidate changes Programbase

slide-14
SLIDE 14

Bug fix is a common type of change

14

Predictive Dynamic Change-impact Analysis (CIA)

Bug fix Programbuggy Programchanged Programbuggy

Compute real impacts

Predicted Impact set Real impacts

Compare

slide-15
SLIDE 15

Efficient Sensitivity Analysis

15

Program Instrumenter Change Locations (methods) Program1 Program2 ProgramN …… (State) Changer Change Strategy (State) Changes

Runtime

Randomly

base versions Instrumented Program

Static

‘changed’ version

slide-16
SLIDE 16

Execution Differencing

16

Results (statements): 6 7 17 Line no. Value 20 False 6 True 11

  • 3

12

  • 3

7 17 False 4

  • 3

Line no. Value 20 False 6 False 11

  • 3

12

  • 3
  • 4
  • 3

Changed version Base version

Execution History

// m < 0

slide-17
SLIDE 17

Execution Differencing

17

Results (statements): 6 7 17 Line no. Value 20 False 6 True 11

  • 3

12

  • 3

7 17 False 4

  • 3

Line no. Value 20 False 6 False 11

  • 3

12

  • 3
  • 4
  • 3

Results (methods): M2 M5

Method-level Differential Execution Analysis (mDEA) Changed version Base version

Execution History

// m < 0

slide-18
SLIDE 18

Accuracy estimation

18

Potential change location (e.g., M2) Changed version Base version

Dynamic CIA

(PI/EAS)

mDEA

Real impacts Predicted Impact Set Compute Accuracy

(of PI/EAS)

Test Suite Actual change

(e.g., m>0  m<0 at statement 6 of M2)

Tool available: SensA

slide-19
SLIDE 19

Outline

 Background: PI/EAS  Methodology

 Sensitivity Analysis  Execution Differencing

 Results  Contributions

19

slide-20
SLIDE 20

Subject programs and statistics

20

Subject Description Lines of Code Methods Tests Schedule1 Priority Scheduler 290 24 2,650 NanoXML XML parser 3,521 282 214 Ant Java project build tool 18,830 1,863 112 XML-Security Encryption library 22,361 1,928 92 JMeter Performance monitor 35,547 3,054 79 ArgoUML UML Modeling tool 102,400 8,856 211

slide-21
SLIDE 21

Metrics

21

 Impact sets (predicted and real)  Number of false positives (FP) & false negatives (FN)  Accuracy (F1)

 Precision  Recall  F1 = 2x(precision x recall)/(precision + recall)

 Result classification

 All: both S and N

Shortening (base execution is over 50% shorter) Normal (otherwise)

slide-22
SLIDE 22

Precision

22

average precision 52%

0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%

All N S

slide-23
SLIDE 23

Recall

23

average recall 56%

0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%

All N S

slide-24
SLIDE 24

Recall

24

average recall 56%

0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%

All N S

average accuracy (F1) 39%

slide-25
SLIDE 25

Results for SIR changes (bug fixes)

25

0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%

Precision Recall Accuracy

slide-26
SLIDE 26

New Results for real changes

26

0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Ant XML- security PDFBox Overall

Precision Recall Accuracy

slide-27
SLIDE 27

Future work

27

 Enhance the experimentation framework to support

extended study for

 More subjects  Other dynamic impact analyses

 Develop more precise technique for dynamic impact

prediction

slide-28
SLIDE 28

Outline

 Background: PI/EAS  Methodology

 Sensitivity Analysis  Execution Differencing

 Results  Contributions

28

slide-29
SLIDE 29

Contributions

29

 A methodology for estimating the accuracy of dynamic

impact analyses

 The first empirical study of the predictive accuracy of

dynamic impact analysis

 Insights to the effectiveness of predictive dynamic

impact analysis

 Current dynamic impact analysis can be surprisingly

imprecise

 Precision 52% for random changes, 47% for SIR changes

 Moreover, existing dynamic impact analysis can be also

quite unsafe

 Recall 56% for random changes, 87% for SIR changes