SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David...
-
Upload
leona-woods -
Category
Documents
-
view
229 -
download
1
description
Transcript of SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David...
![Page 1: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/1.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
Evaluating Key Statements AnalysisEvaluating Key Statements Analysis
David Binkley - Loyola College, USA
Nicolas Gold, Mark Harman, Zheng Li, Kiarash Mahdavi
CREST, King’s College London, UK
![Page 2: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/2.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
Overview
• KSA• Two metrics
– Impact– Cohesion
• Research Questions• Empirical study• Results
![Page 3: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/3.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
Key Statement Analysis (KSA)
• Identify key statements
• The statements that capture most impact with highest cohesion
![Page 4: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/4.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
Why KSA
Many analyses produce far too much e.g. slicing, chopping
![Page 5: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/5.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
Framework
Modules
Functions ClassesConcept bindings
Principal Variables Key Statements
![Page 6: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/6.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
Principal Variables (PV)
Bieman and Ott’s Principal Variables
• PVG – a global variable assigned in F• PVO – a variable used in an output
statement in F• PVG U PVO
![Page 7: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/7.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
void cylinder(int r, h){
D=2*r;perimeter=PI*D;undersurface=PI*r*r;sidesurface=perimeter*h;area=2*undersurface+sidesurface;volume=undersurface*h;printf(“\nThe Area is %d\n", );printf(“\nThe Volume is %d\n", );
}
r
h
areavolume
![Page 8: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/8.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
Metrics for KSA
• Impact: outward influence of the key statements
• Cohesion: inward connectedness of the key statements
![Page 9: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/9.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
Cohesion
![Page 10: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/10.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
Dependence Cluster
![Page 11: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/11.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
The worst case for KSA
If all statements in a module are in a dependence cluster…
![Page 12: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/12.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
Research Questions
• Size• Impact • Cohesion• Large dependence cluster
![Page 13: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/13.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
Analysis Subjects
![Page 14: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/14.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
Tools
• CodeSurfer
• SPSS
![Page 15: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/15.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
Impact
![Page 16: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/16.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
Cohesion
![Page 17: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/17.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
Results
• Size– 25% of the function size
• Impact– 70% of impact of the function.
• Cohesion– More than 80% of cohesion
• Large Dependence Cluster– a clear and largely negative impact
![Page 18: SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,](https://reader036.fdocuments.in/reader036/viewer/2022062412/5a4d1af07f8b9ab05997d91b/html5/thumbnails/18.jpg)
SCAM’08 -- Evaluating Key Statements Analysis Zheng Li
less is more less is more