estimating the accuracy of dynamic change impact analysis
play

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


  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

  2. Software keeps changing 2 Program P P’ P’’ • Change 1 • Change 2 • Change 3 • …… • …… • ……

  3. Software keeps changing 3 What will be impacted Broken Program P P’ P’’ • Change 1 • Change 2 • Change 3 • …… • …… • ……

  4. Change impacts need be analyzed 4 What will be impacted Program P P’ P’’ • Change 1 • Change 2 • Change 3 • …… • …… • …… After change CIA Change-impact Analysis (CIA) Dynamic

  5. Change impacts need be analyzed 5 Program P P’ P’’ • Change 1 • Change 2 • Change 3 • …… • …… • …… Before change CIA Change-impact Analysis (CIA) Predictive Dynamic

  6. How accurate is it ? 6 E2 All entities E1, E2, E3, E4, E5 Candidate Change Locations Program base Predictive Dynamic Change-impact Analysis (CIA) Predicted Impacts E2  How Accurate E4 (relative to real impacts)  How Safe E1, E2, E3, E5  How Precise Real impacts

  7. Why study CIA accuracy ? 7 Candidate Change Locations Program base Predictive Dynamic Change-impact Analysis (CIA) Predicted Impacts  Not Accurate  Not Safe : threaten quality  Not Precise : waste time  (If not accurate) Motivate developing better techniques

  8. Which techniques to study ? 8  Our target  Method level  The most cost-effective Predictive Dynamic Change-impact Analysis (CIA)  PathImpact (PI) [Law & Rothermel ICSE’03 ] Much less precise PI/EAS  CoverageImpact (CI) [Orso & Apiwattanapong & Harrold FSE ’ 03 ]  Execute-After-Sequences (EAS) [Apiwattanapong & Orso & Harrold ICSE’05 ]  InfluenceDynamic (InfDyn) [Breech & Tegtmeyer & Pollock ICSM ’ 06 ] Little more precise much more expensive

  9. Outline 9  Background – PI/EAS  Methodology  Sensitivity Analysis  Execution Differencing  Results  Contributions

  10. How PI/EAS works 10 Methods called from M2 directly/transitively After M2 returned … Methods returned into Methods called after M2 returns after M2 returns …

  11. How PI/EAS works 11  Example code  Example execution enter enter enter enter return return enter return return M0 M1 M2 M5 into M2 into M1 M3 into M1 into M0  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}

  12. Outline 12  Background: PI/EAS  Methodology  Sensitivity Analysis  Execution Differencing  Results  Contributions

  13. Study as many changes as possible 13 Candidate changes Program base Predictive Dynamic Change-impact Analysis (CIA)

  14. Bug fix is a common type of change 14 Bug fix Program buggy Predictive Dynamic Change-impact Analysis (CIA) Predicted Impact set Compare Real impacts Compute real impacts Program buggy Program changed

  15. Efficient Sensitivity Analysis 15 Change Change Locations (methods) Static Strategy Randomly Instrumenter Program (State) ‘changed’ Changer Instrumented version Program (State) Changes Runtime Program 1 Program 2 …… Program N base versions

  16. Execution Differencing 16 // m < 0 Base version Changed version Results Execution Line no. Value (statements): Line no. Value 6 20 False History 20 False 7 6 False 17 6 True 11 -3 11 -3 12 -3 12 -3 - 7 - 17 False 4 -3 4 -3

  17. Execution Differencing 17 // m < 0 Base version Changed version Results Execution Line no. Value (statements): Line no. Value 6 20 False History 20 False 7 6 False 17 6 True 11 -3 11 -3 12 -3 Results 12 -3 (methods): - 7 M2 - M5 17 False Method-level Differential Execution Analysis ( mDEA ) 4 -3 4 -3

  18. Accuracy estimation 18 Test Suite Base version Changed version Dynamic CIA mDEA (PI/EAS) Potential change location (e.g., M2) Predicted Real Actual change Impact Set impacts (e.g., m>0  m<0 at statement 6 of M2) Compute Accuracy (of PI/EAS) Tool available: SensA

  19. Outline 19  Background: PI/EAS  Methodology  Sensitivity Analysis  Execution Differencing  Results  Contributions

  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

  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  S hortening (base execution is over 50% shorter)  N ormal (otherwise)

  22. Precision 22 average precision 52% 100% 90% 80% 70% 60% 50% All 40% N 30% S 20% 10% 0%

  23. Recall 23 average recall 56% 100% 90% 80% 70% 60% 50% All 40% N 30% S 20% 10% 0%

  24. Recall 24 average recall 56% 100% average accuracy (F1) 39% 90% 80% 70% 60% 50% All 40% N 30% S 20% 10% 0%

  25. Results for SIR changes (bug fixes) 25 100% 90% 80% 70% 60% 50% Precision 40% Recall 30% Accuracy 20% 10% 0%

  26. New Results for real changes 26 100% 90% 80% 70% 60% Precision 50% Recall 40% Accuracy 30% 20% 10% 0% Ant XML- PDFBox Overall security

  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

  28. Outline 28  Background: PI/EAS  Methodology  Sensitivity Analysis  Execution Differencing  Results  Contributions

  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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend