SlideShare a Scribd company logo
Thresholds for Size and Complexity Metrics:
A Case Study from the Perspective of
Defect Density
Kazuhiro
Yamashita
Yasutaka
Kamei
Changyun
Huang
Naoyasu
Ubayashi
Ahmed
E. Hassan
Meiyappan
Nagappan
Audris
Mockus
QRS2016 at Vienna, Austria 2016/08/01
Many defect prediction papers have been published
in the Empirical Software Engineering area
2
Over 100 papers have been
published from 2000 - 2011
Goal: provide guidelines to practitioners
on what kind of code has better quality
Purpose:
(a) which metric is the most useful
(b) what values of these metrics indicate
good code or bad code
Emad Shihab
Thesis
Previous papers claimed that extreme values of
metrics are sign of poor quality
3
Complexity > 10
Goldilocks Conjecture
Larger files have
more defects
It is unclear if metric thresholds should
be used to identify risky files
4
Previous papers have
contradictory evidence
regarding relationship between
metric and defects
Defects
Metrics Values
Norman E. Fenton
TSE
Can we really use metric thresholds
to identify risky files?
Goal and Approach
Goal
Observe if a consistent relationship between metric
thresholds and software quality
Approach
Derive thresholds using a method proposed by Alves [1]
Evaluate thresholds using defect proneness and density
(OSS and Industry projects)
5
[1] T. Alves et al., “Deriving metric thresholds from benchmark data,”
International Conference on Software Maintenance and Evolution (ICSME), pp. 1-10, 2010.
Characteristics of the method proposed by Alves
6
Data-driven:
The method is driven by measurement data from
a representative set of systems not by expert opinion
Robust:
The method respects the statistical properties of the
metric
Pragmatic:
The method is repeatable, transparent and
straightforward to carry out
Approach
7
Projec
t
Derive
Thresholds
Thresholds
Evaluate
Thresholds
Projects
for derivation
Projects
for evaluation
Projec
t
Approach
8
Projec
t
Derive
Thresholds
Thresholds
Evaluate
Thresholds
Projects
for derivation
Projects
for evaluation
Projec
t
Dataset (Java Projects)
9
Thresholds Derivation
(Metrics)
Thresholds Evaluation
(Metrics + Defects)
Industry
OSS
205 projects
1,000 projects
(from 4,575 projects)
4 projects
3 projects
3 versions
Selection of 1,000 representative
projects
10
Data-driven:
The method is driven by measurement data from
a representative set of systems not by expert opinion
Industry
OSS
Both projects for derivation and evaluation
are from Avaya labs
Variety of projects are included
Select 1,000 representative projects
from 4,575 projects for each three versions
of three projects using median LOC
Approach
11
Projec
t
Derive
Thresholds
Thresholds
Evaluate
Thresholds
Projects
for derivation
Projects
for evaluation
Projec
t
Steps of the method proposed by Alves
1. Metrics Extraction
2. Weight Ratio Calculation
3. Entity Aggregation
4. System Aggregation
5. Weight Ratio Aggregation
6. Thresholds Derivation
12
1. Metrics Extraction
13
Project A
LOC 10K
…
File 1 File 2 File 3 File N…
Cyclomatic
Complexity (CC)
5 1 5 … 8
Extract metrics in each granularity
Target metrics and granularity
14
Metric Granularity Understand Sonar
Lines of Code File CountLineCode ncloc
Module Interface
Size
File
CountDeclInstanc
eMethod
functions
Cyclomatic
Complexity
Method CyclomaticStrict
function_complexi
ty
Module Inward
Coupling
Method/File CountInput accessors
2. Weight Ratio Calculation
15
Project A
LOC 10K
…
File 1 File 2 File 3 File N…
Weight Ratio
300/10K
= 3%
100/10K
= 1%
500/10K
= 5%
… 50/10K
= 0.5%
Calculate weights of each file according to the LOC
3. Entity Aggregation
16
Project A
LOC 10K
…
File 1 File 2 File 3 File N…
Cyclomatic
Complexity (CC)
5 1 5 … 8
Weight Ratio 3% 1% 5% … 0.5%
CC 0 1 … 5 … 8 …
Aggregated Weight 0% 1% … 8% … 0.5% …
Project A: (0%, 1%, …, 8%, …, 0.5%, …)
Calculate weights of each metric value in a project
4. System Aggregation
17
Project A: (0%, 1%, …, 8%, …, 0.5%, …)
Project B: (0%, 5%, …, 0%, …, 8%, …)
…
Project XX: (0%, 9%, …, 6%, …, 3%, …)
Projects: (0%, 34000%, 15000%, 10000%, …)
Number of Projects (1,000 projects)
Normalized Projects: (0%, 34%, 15%, 10%, …)
1,000
projects
Calculate weights of each metric value in all projects
5. Weight Ratio Aggregation
18
Normalized Projects: (0%, 34%, 15%, 10%, …)
=> Cumulated Normalized Projects: (0%, 34%, 49%, 59%, …)
Plots weights of each metric value
6. Thresholds Derivation
19
Thresholds
Derive thresholds from the plot
Approach
20
Projec
t
Derive
Thresholds
Thresholds
Evaluate
Thresholds
Projects
for derivation
Projects
for evaluation
Projec
t
Thresholds (Cyclomatic Complexity)
21
Project Name Version 70% 80% 90%
Eclipse
3.0 6 9 17
3.1 6 9 18
3.2 6 9 18
Mylyn
1.0 6 9 17
2.0 6 9 16
3.0 6 9 17
Netbeans
4.0 6 10 18
5.0 6 10 19
5.5.1 6 9 17
Industrial - 4.3 5.6 10.3
Approach
22
Projec
t
Derive
Thresholds
Thresholds
Evaluate
Thresholds
Projects
for derivation
Projects
for evaluation
Projec
t
Evaluate Thresholds Using Test
Projects
23
ThresholdsFiles
Defect
Proneness
Defect
Density
Results with
Defect Proneness
Threshold of Module Interface Size seems to work
well with defect proneness (Industrial)
25
1. Low Risk: Low Defect Proneness (All Metrics)
Observation
2. Very High Risk: High Defect Proneness
(Module Interface Size)
Industrial 110 Industrial 113 Industrial 140 Industrial 208
Monotone relationship with
defect proneness (OSS)
26
Observation
Mylyn 1.0 Eclipse 3.0 Netbeans 4.0Eclipse 3.2
1. Monotone relationship between metrics and defect proneness ex
Results with
Defect Density
Similar results to defect proneness (Industrial)
28
Industrial 110 Industrial 113 Industrial 140 Industrial 208
Observation
1. Very High Risk: High Defect Density except Industrial 110
(Module Interface Size)
No consistent trends with defect density (OSS)
29
Eclipse 3.0 Mylyn 1.0 Netbeans 5.0 Netbeans 4.0
Observation
1. Monotonically decrease in Eclipse and Mylyn (Size Metrics)
2. Inversed-U shape in Eclipse and Mylyn (Complexity Metrics)
3. All over the place in Netbeans 5.0 and 5.5.1 (All Metrics)
4. Rotated-Z shape in Netbeans 4.0 (Three Metrics)
Highest risk files have lower defect density on
Poisson Model
30
Observation
1. Highest risk files have lower defect density
2. Only the results of LOC and Complexity (in OSS) are
statistically significance
Summary of our findings
31
Relationship
Size Complexity
OSS Industrial OSS Industrial
Defect
Proneness
Monotonically I
ncrease
✓ ✓ ✓
Optimum File
Lower Defect
Larger
File Lower
Defect
Defect
Density
Monotonically I
ncrease
✓
Optimum File
Lower Defect
Larger
File Lower ✓ ✓
Lessons Learned
Defect Proneness
• Thresholds can identify defect-prone files via size
metrics
Defect Density
• If practitioners use thresholds of basic size and
complexity metrics to identify files with higher defect
densities, they must proceed with caution
32
Conclusion
33
Complement
34
Thresholds (LOC)
35
Project Name Version 70% 80% 90%
Eclipse
3.0 335 498 884
3.1 346 515 908
3.2 346 515 908
Mylyn
1.0 321 480 861
2.0 313 466 847
3.0 321 480 861
Netbeans
4.0 365 545 952
5.0 369 553 975
5.5.1 346 514 911
Industrial - 324 543 1,423
Thresholds (Module Interface Size)
36
Project Name Version 70% 80% 90%
Eclipse
3.0 18 26 43
3.1 19 27 44
3.2 19 27 44
Mylyn
1.0 18 26 42
2.0 18 25 42
3.0 18 26 42
Netbeans
4.0 20 28 46
5.0 20 28 47
5.5.1 19 27 44
Industrial - 19 30 89
Thresholds (Module Inward Coupling)
37
Project Name Version 70% 80% 90%
Eclipse
3.0 6 9 14
3.1 7 9 14
3.2 7 9 14
Mylyn
1.0 6 9 13
2.0 6 9 13
3.0 6 9 13
Netbeans
4.0 7 9 15
5.0 7 9 15
5.5.1 7 9 14
Industrial - 3 7 30
Ad

More Related Content

What's hot (20)

Scalable Software Testing and Verification of Non-Functional Properties throu...
Scalable Software Testing and Verification of Non-Functional Properties throu...Scalable Software Testing and Verification of Non-Functional Properties throu...
Scalable Software Testing and Verification of Non-Functional Properties throu...
Lionel Briand
 
EmbNum: Semantic Labeling for Numerical Values with Deep Metric Learning
EmbNum: Semantic Labeling for Numerical Values with Deep Metric Learning EmbNum: Semantic Labeling for Numerical Values with Deep Metric Learning
EmbNum: Semantic Labeling for Numerical Values with Deep Metric Learning
Phuc Nguyen
 
A Tale of Experiments on Bug Prediction
A Tale of Experiments on Bug PredictionA Tale of Experiments on Bug Prediction
A Tale of Experiments on Bug Prediction
Martin Pinzger
 
Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...
Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...
Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...
Feng Zhang
 
Data collection for software defect prediction
Data collection for software defect predictionData collection for software defect prediction
Data collection for software defect prediction
AmmAr mobark
 
Model-Driven Run-Time Enforcement of Complex Role-Based Access Control Policies
Model-Driven Run-Time Enforcement of Complex Role-Based Access Control PoliciesModel-Driven Run-Time Enforcement of Complex Role-Based Access Control Policies
Model-Driven Run-Time Enforcement of Complex Role-Based Access Control Policies
Lionel Briand
 
The relationship between test and production code quality (@ SIG)
The relationship between test and production code quality (@ SIG)The relationship between test and production code quality (@ SIG)
The relationship between test and production code quality (@ SIG)
Maurício Aniche
 
A Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution TechniquesA Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution Techniques
Sung Kim
 
A shared-filesystem-memory approach for running IDA in parallel over informal...
A shared-filesystem-memory approach for running IDA in parallel over informal...A shared-filesystem-memory approach for running IDA in parallel over informal...
A shared-filesystem-memory approach for running IDA in parallel over informal...
openseesdays
 
Metamorphic Security Testing for Web Systems
Metamorphic Security Testing for Web SystemsMetamorphic Security Testing for Web Systems
Metamorphic Security Testing for Web Systems
Lionel Briand
 
Can we predict the quality of spectrum-based fault localization?
Can we predict the quality of spectrum-based fault localization?Can we predict the quality of spectrum-based fault localization?
Can we predict the quality of spectrum-based fault localization?
Lionel Briand
 
A preliminary study on using code smells to improve bug localization
A preliminary study on using code smells to improve bug localizationA preliminary study on using code smells to improve bug localization
A preliminary study on using code smells to improve bug localization
krws
 
Materials Informatics and Python
Materials Informatics and PythonMaterials Informatics and Python
Materials Informatics and Python
Shintaro Fukushima
 
Going Smart and Deep on Materials at ALCF
Going Smart and Deep on Materials at ALCFGoing Smart and Deep on Materials at ALCF
Going Smart and Deep on Materials at ALCF
Ian Foster
 
Dynamic Symbolic Database Application Testing
Dynamic Symbolic Database Application TestingDynamic Symbolic Database Application Testing
Dynamic Symbolic Database Application Testing
The Innovative Data Intelligence Research (IDIR) Laboratory, University of Texas at Arlington
 
Software Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled DatasetsSoftware Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled Datasets
Sung Kim
 
Analysis of grid log data with Affinity Propagation
Analysis of grid log data with Affinity PropagationAnalysis of grid log data with Affinity Propagation
Analysis of grid log data with Affinity Propagation
Gabriele Modena
 
AI at Scale for Materials and Chemistry
AI at Scale for Materials and ChemistryAI at Scale for Materials and Chemistry
AI at Scale for Materials and Chemistry
Ian Foster
 
DeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
DeepAM: Migrate APIs with Multi-modal Sequence to Sequence LearningDeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
DeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
Sung Kim
 
Adversarial Samples
Adversarial SamplesAdversarial Samples
Adversarial Samples
哲东 郑
 
Scalable Software Testing and Verification of Non-Functional Properties throu...
Scalable Software Testing and Verification of Non-Functional Properties throu...Scalable Software Testing and Verification of Non-Functional Properties throu...
Scalable Software Testing and Verification of Non-Functional Properties throu...
Lionel Briand
 
EmbNum: Semantic Labeling for Numerical Values with Deep Metric Learning
EmbNum: Semantic Labeling for Numerical Values with Deep Metric Learning EmbNum: Semantic Labeling for Numerical Values with Deep Metric Learning
EmbNum: Semantic Labeling for Numerical Values with Deep Metric Learning
Phuc Nguyen
 
A Tale of Experiments on Bug Prediction
A Tale of Experiments on Bug PredictionA Tale of Experiments on Bug Prediction
A Tale of Experiments on Bug Prediction
Martin Pinzger
 
Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...
Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...
Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...
Feng Zhang
 
Data collection for software defect prediction
Data collection for software defect predictionData collection for software defect prediction
Data collection for software defect prediction
AmmAr mobark
 
Model-Driven Run-Time Enforcement of Complex Role-Based Access Control Policies
Model-Driven Run-Time Enforcement of Complex Role-Based Access Control PoliciesModel-Driven Run-Time Enforcement of Complex Role-Based Access Control Policies
Model-Driven Run-Time Enforcement of Complex Role-Based Access Control Policies
Lionel Briand
 
The relationship between test and production code quality (@ SIG)
The relationship between test and production code quality (@ SIG)The relationship between test and production code quality (@ SIG)
The relationship between test and production code quality (@ SIG)
Maurício Aniche
 
A Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution TechniquesA Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution Techniques
Sung Kim
 
A shared-filesystem-memory approach for running IDA in parallel over informal...
A shared-filesystem-memory approach for running IDA in parallel over informal...A shared-filesystem-memory approach for running IDA in parallel over informal...
A shared-filesystem-memory approach for running IDA in parallel over informal...
openseesdays
 
Metamorphic Security Testing for Web Systems
Metamorphic Security Testing for Web SystemsMetamorphic Security Testing for Web Systems
Metamorphic Security Testing for Web Systems
Lionel Briand
 
Can we predict the quality of spectrum-based fault localization?
Can we predict the quality of spectrum-based fault localization?Can we predict the quality of spectrum-based fault localization?
Can we predict the quality of spectrum-based fault localization?
Lionel Briand
 
A preliminary study on using code smells to improve bug localization
A preliminary study on using code smells to improve bug localizationA preliminary study on using code smells to improve bug localization
A preliminary study on using code smells to improve bug localization
krws
 
Materials Informatics and Python
Materials Informatics and PythonMaterials Informatics and Python
Materials Informatics and Python
Shintaro Fukushima
 
Going Smart and Deep on Materials at ALCF
Going Smart and Deep on Materials at ALCFGoing Smart and Deep on Materials at ALCF
Going Smart and Deep on Materials at ALCF
Ian Foster
 
Software Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled DatasetsSoftware Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled Datasets
Sung Kim
 
Analysis of grid log data with Affinity Propagation
Analysis of grid log data with Affinity PropagationAnalysis of grid log data with Affinity Propagation
Analysis of grid log data with Affinity Propagation
Gabriele Modena
 
AI at Scale for Materials and Chemistry
AI at Scale for Materials and ChemistryAI at Scale for Materials and Chemistry
AI at Scale for Materials and Chemistry
Ian Foster
 
DeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
DeepAM: Migrate APIs with Multi-modal Sequence to Sequence LearningDeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
DeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
Sung Kim
 
Adversarial Samples
Adversarial SamplesAdversarial Samples
Adversarial Samples
哲东 郑
 

Similar to Threshold for Size and Complexity Metrics: A Case Study from the Perspective of Defect Density (20)

A Validation of Object-Oriented Design Metrics as Quality Indicators
A Validation of Object-Oriented Design Metrics as Quality IndicatorsA Validation of Object-Oriented Design Metrics as Quality Indicators
A Validation of Object-Oriented Design Metrics as Quality Indicators
vie_dels
 
A tale of bug prediction in software development
A tale of bug prediction in software developmentA tale of bug prediction in software development
A tale of bug prediction in software development
Martin Pinzger
 
Not Only Statements: The Role of Textual Analysis in Software Quality
Not Only Statements: The Role of Textual Analysis in Software QualityNot Only Statements: The Role of Textual Analysis in Software Quality
Not Only Statements: The Role of Textual Analysis in Software Quality
Rocco Oliveto
 
Accounting for uncertainty in species delineation during the analysis of envi...
Accounting for uncertainty in species delineation during the analysis of envi...Accounting for uncertainty in species delineation during the analysis of envi...
Accounting for uncertainty in species delineation during the analysis of envi...
methodsecolevol
 
OpenSees: Future Directions
OpenSees: Future DirectionsOpenSees: Future Directions
OpenSees: Future Directions
openseesdays
 
2014 01-ticosa
2014 01-ticosa2014 01-ticosa
2014 01-ticosa
Pharo
 
Speeding up information extraction programs: a holistic optimizer and a learn...
Speeding up information extraction programs: a holistic optimizer and a learn...Speeding up information extraction programs: a holistic optimizer and a learn...
Speeding up information extraction programs: a holistic optimizer and a learn...
INRIA-OAK
 
A tale of experiments on bug prediction
A tale of experiments on bug predictionA tale of experiments on bug prediction
A tale of experiments on bug prediction
Martin Pinzger
 
Evaluating Machine Learning Algorithms for Materials Science using the Matben...
Evaluating Machine Learning Algorithms for Materials Science using the Matben...Evaluating Machine Learning Algorithms for Materials Science using the Matben...
Evaluating Machine Learning Algorithms for Materials Science using the Matben...
Anubhav Jain
 
Applications of Machine Learning and Metaheuristic Search to Security Testing
Applications of Machine Learning and Metaheuristic Search to Security TestingApplications of Machine Learning and Metaheuristic Search to Security Testing
Applications of Machine Learning and Metaheuristic Search to Security Testing
Lionel Briand
 
Kaggle Gold Medal Case Study
Kaggle Gold Medal Case StudyKaggle Gold Medal Case Study
Kaggle Gold Medal Case Study
Alon Bochman, CFA
 
230208 MLOps Getting from Good to Great.pptx
230208 MLOps Getting from Good to Great.pptx230208 MLOps Getting from Good to Great.pptx
230208 MLOps Getting from Good to Great.pptx
Arthur240715
 
Introduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKennaIntroduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKenna
openseesdays
 
2. visualization in data mining
2. visualization in data mining2. visualization in data mining
2. visualization in data mining
Azad public school
 
Software Systems as Cities: a Controlled Experiment
Software Systems as Cities: a Controlled ExperimentSoftware Systems as Cities: a Controlled Experiment
Software Systems as Cities: a Controlled Experiment
Richard Wettel
 
A functional software measurement approach bridging the gap between problem a...
A functional software measurement approach bridging the gap between problem a...A functional software measurement approach bridging the gap between problem a...
A functional software measurement approach bridging the gap between problem a...
IWSM Mensura
 
Revisiting the Notion of Diversity in Software Testing
Revisiting the Notion of Diversity in Software TestingRevisiting the Notion of Diversity in Software Testing
Revisiting the Notion of Diversity in Software Testing
Lionel Briand
 
migrate-case-study
migrate-case-studymigrate-case-study
migrate-case-study
Jordi Blasco Pallares
 
Esem2010 shihab
Esem2010 shihabEsem2010 shihab
Esem2010 shihab
SAIL_QU
 
Workshop nwav 47 - LVS - Tool for Quantitative Data Analysis
Workshop nwav 47 - LVS - Tool for Quantitative Data AnalysisWorkshop nwav 47 - LVS - Tool for Quantitative Data Analysis
Workshop nwav 47 - LVS - Tool for Quantitative Data Analysis
Olga Scrivner
 
A Validation of Object-Oriented Design Metrics as Quality Indicators
A Validation of Object-Oriented Design Metrics as Quality IndicatorsA Validation of Object-Oriented Design Metrics as Quality Indicators
A Validation of Object-Oriented Design Metrics as Quality Indicators
vie_dels
 
A tale of bug prediction in software development
A tale of bug prediction in software developmentA tale of bug prediction in software development
A tale of bug prediction in software development
Martin Pinzger
 
Not Only Statements: The Role of Textual Analysis in Software Quality
Not Only Statements: The Role of Textual Analysis in Software QualityNot Only Statements: The Role of Textual Analysis in Software Quality
Not Only Statements: The Role of Textual Analysis in Software Quality
Rocco Oliveto
 
Accounting for uncertainty in species delineation during the analysis of envi...
Accounting for uncertainty in species delineation during the analysis of envi...Accounting for uncertainty in species delineation during the analysis of envi...
Accounting for uncertainty in species delineation during the analysis of envi...
methodsecolevol
 
OpenSees: Future Directions
OpenSees: Future DirectionsOpenSees: Future Directions
OpenSees: Future Directions
openseesdays
 
2014 01-ticosa
2014 01-ticosa2014 01-ticosa
2014 01-ticosa
Pharo
 
Speeding up information extraction programs: a holistic optimizer and a learn...
Speeding up information extraction programs: a holistic optimizer and a learn...Speeding up information extraction programs: a holistic optimizer and a learn...
Speeding up information extraction programs: a holistic optimizer and a learn...
INRIA-OAK
 
A tale of experiments on bug prediction
A tale of experiments on bug predictionA tale of experiments on bug prediction
A tale of experiments on bug prediction
Martin Pinzger
 
Evaluating Machine Learning Algorithms for Materials Science using the Matben...
Evaluating Machine Learning Algorithms for Materials Science using the Matben...Evaluating Machine Learning Algorithms for Materials Science using the Matben...
Evaluating Machine Learning Algorithms for Materials Science using the Matben...
Anubhav Jain
 
Applications of Machine Learning and Metaheuristic Search to Security Testing
Applications of Machine Learning and Metaheuristic Search to Security TestingApplications of Machine Learning and Metaheuristic Search to Security Testing
Applications of Machine Learning and Metaheuristic Search to Security Testing
Lionel Briand
 
Kaggle Gold Medal Case Study
Kaggle Gold Medal Case StudyKaggle Gold Medal Case Study
Kaggle Gold Medal Case Study
Alon Bochman, CFA
 
230208 MLOps Getting from Good to Great.pptx
230208 MLOps Getting from Good to Great.pptx230208 MLOps Getting from Good to Great.pptx
230208 MLOps Getting from Good to Great.pptx
Arthur240715
 
Introduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKennaIntroduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKenna
openseesdays
 
Software Systems as Cities: a Controlled Experiment
Software Systems as Cities: a Controlled ExperimentSoftware Systems as Cities: a Controlled Experiment
Software Systems as Cities: a Controlled Experiment
Richard Wettel
 
A functional software measurement approach bridging the gap between problem a...
A functional software measurement approach bridging the gap between problem a...A functional software measurement approach bridging the gap between problem a...
A functional software measurement approach bridging the gap between problem a...
IWSM Mensura
 
Revisiting the Notion of Diversity in Software Testing
Revisiting the Notion of Diversity in Software TestingRevisiting the Notion of Diversity in Software Testing
Revisiting the Notion of Diversity in Software Testing
Lionel Briand
 
Esem2010 shihab
Esem2010 shihabEsem2010 shihab
Esem2010 shihab
SAIL_QU
 
Workshop nwav 47 - LVS - Tool for Quantitative Data Analysis
Workshop nwav 47 - LVS - Tool for Quantitative Data AnalysisWorkshop nwav 47 - LVS - Tool for Quantitative Data Analysis
Workshop nwav 47 - LVS - Tool for Quantitative Data Analysis
Olga Scrivner
 
Ad

More from SAIL_QU (20)

Studying the Integration Practices and the Evolution of Ad Libraries in the G...
Studying the Integration Practices and the Evolution of Ad Libraries in the G...Studying the Integration Practices and the Evolution of Ad Libraries in the G...
Studying the Integration Practices and the Evolution of Ad Libraries in the G...
SAIL_QU
 
Studying the Dialogue Between Users and Developers of Free Apps in the Google...
Studying the Dialogue Between Users and Developers of Free Apps in the Google...Studying the Dialogue Between Users and Developers of Free Apps in the Google...
Studying the Dialogue Between Users and Developers of Free Apps in the Google...
SAIL_QU
 
Improving the testing efficiency of selenium-based load tests
Improving the testing efficiency of selenium-based load testsImproving the testing efficiency of selenium-based load tests
Improving the testing efficiency of selenium-based load tests
SAIL_QU
 
Studying User-Developer Interactions Through the Distribution and Reviewing M...
Studying User-Developer Interactions Through the Distribution and Reviewing M...Studying User-Developer Interactions Through the Distribution and Reviewing M...
Studying User-Developer Interactions Through the Distribution and Reviewing M...
SAIL_QU
 
Studying online distribution platforms for games through the mining of data f...
Studying online distribution platforms for games through the mining of data f...Studying online distribution platforms for games through the mining of data f...
Studying online distribution platforms for games through the mining of data f...
SAIL_QU
 
Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...
Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...
Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...
SAIL_QU
 
Investigating the Challenges in Selenium Usage and Improving the Testing Effi...
Investigating the Challenges in Selenium Usage and Improving the Testing Effi...Investigating the Challenges in Selenium Usage and Improving the Testing Effi...
Investigating the Challenges in Selenium Usage and Improving the Testing Effi...
SAIL_QU
 
Mining Development Knowledge to Understand and Support Software Logging Pract...
Mining Development Knowledge to Understand and Support Software Logging Pract...Mining Development Knowledge to Understand and Support Software Logging Pract...
Mining Development Knowledge to Understand and Support Software Logging Pract...
SAIL_QU
 
Which Log Level Should Developers Choose For a New Logging Statement?
Which Log Level Should Developers Choose For a New Logging Statement?Which Log Level Should Developers Choose For a New Logging Statement?
Which Log Level Should Developers Choose For a New Logging Statement?
SAIL_QU
 
Towards Just-in-Time Suggestions for Log Changes
Towards Just-in-Time Suggestions for Log ChangesTowards Just-in-Time Suggestions for Log Changes
Towards Just-in-Time Suggestions for Log Changes
SAIL_QU
 
The Impact of Task Granularity on Co-evolution Analyses
The Impact of Task Granularity on Co-evolution AnalysesThe Impact of Task Granularity on Co-evolution Analyses
The Impact of Task Granularity on Co-evolution Analyses
SAIL_QU
 
A Framework for Evaluating the Results of the SZZ Approach for Identifying Bu...
A Framework for Evaluating the Results of the SZZ Approach for Identifying Bu...A Framework for Evaluating the Results of the SZZ Approach for Identifying Bu...
A Framework for Evaluating the Results of the SZZ Approach for Identifying Bu...
SAIL_QU
 
How are Discussions Associated with Bug Reworking? An Empirical Study on Open...
How are Discussions Associated with Bug Reworking? An Empirical Study on Open...How are Discussions Associated with Bug Reworking? An Empirical Study on Open...
How are Discussions Associated with Bug Reworking? An Empirical Study on Open...
SAIL_QU
 
A Study of the Relation of Mobile Device Attributes with the User-Perceived Q...
A Study of the Relation of Mobile Device Attributes with the User-Perceived Q...A Study of the Relation of Mobile Device Attributes with the User-Perceived Q...
A Study of the Relation of Mobile Device Attributes with the User-Perceived Q...
SAIL_QU
 
A Large-Scale Study of the Impact of Feature Selection Techniques on Defect C...
A Large-Scale Study of the Impact of Feature Selection Techniques on Defect C...A Large-Scale Study of the Impact of Feature Selection Techniques on Defect C...
A Large-Scale Study of the Impact of Feature Selection Techniques on Defect C...
SAIL_QU
 
Studying the Dialogue Between Users and Developers of Free Apps in the Google...
Studying the Dialogue Between Users and Developers of Free Apps in the Google...Studying the Dialogue Between Users and Developers of Free Apps in the Google...
Studying the Dialogue Between Users and Developers of Free Apps in the Google...
SAIL_QU
 
What Do Programmers Know about Software Energy Consumption?
What Do Programmers Know about Software Energy Consumption?What Do Programmers Know about Software Energy Consumption?
What Do Programmers Know about Software Energy Consumption?
SAIL_QU
 
Revisiting the Experimental Design Choices for Approaches for the Automated R...
Revisiting the Experimental Design Choices for Approaches for the Automated R...Revisiting the Experimental Design Choices for Approaches for the Automated R...
Revisiting the Experimental Design Choices for Approaches for the Automated R...
SAIL_QU
 
Measuring Program Comprehension: A Large-Scale Field Study with Professionals
Measuring Program Comprehension: A Large-Scale Field Study with ProfessionalsMeasuring Program Comprehension: A Large-Scale Field Study with Professionals
Measuring Program Comprehension: A Large-Scale Field Study with Professionals
SAIL_QU
 
On the Unreliability of Bug Severity Data
On the Unreliability of Bug Severity DataOn the Unreliability of Bug Severity Data
On the Unreliability of Bug Severity Data
SAIL_QU
 
Studying the Integration Practices and the Evolution of Ad Libraries in the G...
Studying the Integration Practices and the Evolution of Ad Libraries in the G...Studying the Integration Practices and the Evolution of Ad Libraries in the G...
Studying the Integration Practices and the Evolution of Ad Libraries in the G...
SAIL_QU
 
Studying the Dialogue Between Users and Developers of Free Apps in the Google...
Studying the Dialogue Between Users and Developers of Free Apps in the Google...Studying the Dialogue Between Users and Developers of Free Apps in the Google...
Studying the Dialogue Between Users and Developers of Free Apps in the Google...
SAIL_QU
 
Improving the testing efficiency of selenium-based load tests
Improving the testing efficiency of selenium-based load testsImproving the testing efficiency of selenium-based load tests
Improving the testing efficiency of selenium-based load tests
SAIL_QU
 
Studying User-Developer Interactions Through the Distribution and Reviewing M...
Studying User-Developer Interactions Through the Distribution and Reviewing M...Studying User-Developer Interactions Through the Distribution and Reviewing M...
Studying User-Developer Interactions Through the Distribution and Reviewing M...
SAIL_QU
 
Studying online distribution platforms for games through the mining of data f...
Studying online distribution platforms for games through the mining of data f...Studying online distribution platforms for games through the mining of data f...
Studying online distribution platforms for games through the mining of data f...
SAIL_QU
 
Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...
Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...
Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...
SAIL_QU
 
Investigating the Challenges in Selenium Usage and Improving the Testing Effi...
Investigating the Challenges in Selenium Usage and Improving the Testing Effi...Investigating the Challenges in Selenium Usage and Improving the Testing Effi...
Investigating the Challenges in Selenium Usage and Improving the Testing Effi...
SAIL_QU
 
Mining Development Knowledge to Understand and Support Software Logging Pract...
Mining Development Knowledge to Understand and Support Software Logging Pract...Mining Development Knowledge to Understand and Support Software Logging Pract...
Mining Development Knowledge to Understand and Support Software Logging Pract...
SAIL_QU
 
Which Log Level Should Developers Choose For a New Logging Statement?
Which Log Level Should Developers Choose For a New Logging Statement?Which Log Level Should Developers Choose For a New Logging Statement?
Which Log Level Should Developers Choose For a New Logging Statement?
SAIL_QU
 
Towards Just-in-Time Suggestions for Log Changes
Towards Just-in-Time Suggestions for Log ChangesTowards Just-in-Time Suggestions for Log Changes
Towards Just-in-Time Suggestions for Log Changes
SAIL_QU
 
The Impact of Task Granularity on Co-evolution Analyses
The Impact of Task Granularity on Co-evolution AnalysesThe Impact of Task Granularity on Co-evolution Analyses
The Impact of Task Granularity on Co-evolution Analyses
SAIL_QU
 
A Framework for Evaluating the Results of the SZZ Approach for Identifying Bu...
A Framework for Evaluating the Results of the SZZ Approach for Identifying Bu...A Framework for Evaluating the Results of the SZZ Approach for Identifying Bu...
A Framework for Evaluating the Results of the SZZ Approach for Identifying Bu...
SAIL_QU
 
How are Discussions Associated with Bug Reworking? An Empirical Study on Open...
How are Discussions Associated with Bug Reworking? An Empirical Study on Open...How are Discussions Associated with Bug Reworking? An Empirical Study on Open...
How are Discussions Associated with Bug Reworking? An Empirical Study on Open...
SAIL_QU
 
A Study of the Relation of Mobile Device Attributes with the User-Perceived Q...
A Study of the Relation of Mobile Device Attributes with the User-Perceived Q...A Study of the Relation of Mobile Device Attributes with the User-Perceived Q...
A Study of the Relation of Mobile Device Attributes with the User-Perceived Q...
SAIL_QU
 
A Large-Scale Study of the Impact of Feature Selection Techniques on Defect C...
A Large-Scale Study of the Impact of Feature Selection Techniques on Defect C...A Large-Scale Study of the Impact of Feature Selection Techniques on Defect C...
A Large-Scale Study of the Impact of Feature Selection Techniques on Defect C...
SAIL_QU
 
Studying the Dialogue Between Users and Developers of Free Apps in the Google...
Studying the Dialogue Between Users and Developers of Free Apps in the Google...Studying the Dialogue Between Users and Developers of Free Apps in the Google...
Studying the Dialogue Between Users and Developers of Free Apps in the Google...
SAIL_QU
 
What Do Programmers Know about Software Energy Consumption?
What Do Programmers Know about Software Energy Consumption?What Do Programmers Know about Software Energy Consumption?
What Do Programmers Know about Software Energy Consumption?
SAIL_QU
 
Revisiting the Experimental Design Choices for Approaches for the Automated R...
Revisiting the Experimental Design Choices for Approaches for the Automated R...Revisiting the Experimental Design Choices for Approaches for the Automated R...
Revisiting the Experimental Design Choices for Approaches for the Automated R...
SAIL_QU
 
Measuring Program Comprehension: A Large-Scale Field Study with Professionals
Measuring Program Comprehension: A Large-Scale Field Study with ProfessionalsMeasuring Program Comprehension: A Large-Scale Field Study with Professionals
Measuring Program Comprehension: A Large-Scale Field Study with Professionals
SAIL_QU
 
On the Unreliability of Bug Severity Data
On the Unreliability of Bug Severity DataOn the Unreliability of Bug Severity Data
On the Unreliability of Bug Severity Data
SAIL_QU
 
Ad

Recently uploaded (20)

Let's Do Bad Things to Unsecured Containers
Let's Do Bad Things to Unsecured ContainersLet's Do Bad Things to Unsecured Containers
Let's Do Bad Things to Unsecured Containers
Gene Gotimer
 
How to Create a Crypto Wallet Like Trust.pptx
How to Create a Crypto Wallet Like Trust.pptxHow to Create a Crypto Wallet Like Trust.pptx
How to Create a Crypto Wallet Like Trust.pptx
riyageorge2024
 
How to Troubleshoot 9 Types of OutOfMemoryError
How to Troubleshoot 9 Types of OutOfMemoryErrorHow to Troubleshoot 9 Types of OutOfMemoryError
How to Troubleshoot 9 Types of OutOfMemoryError
Tier1 app
 
Serato DJ Pro Crack Latest Version 2025??
Serato DJ Pro Crack Latest Version 2025??Serato DJ Pro Crack Latest Version 2025??
Serato DJ Pro Crack Latest Version 2025??
Web Designer
 
Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025
Phil Eaton
 
Quasar Framework Introduction for C++ develpoers
Quasar Framework Introduction for C++ develpoersQuasar Framework Introduction for C++ develpoers
Quasar Framework Introduction for C++ develpoers
sadadkhah
 
A Comprehensive Guide to CRM Software Benefits for Every Business Stage
A Comprehensive Guide to CRM Software Benefits for Every Business StageA Comprehensive Guide to CRM Software Benefits for Every Business Stage
A Comprehensive Guide to CRM Software Benefits for Every Business Stage
SynapseIndia
 
Buy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training techBuy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training tech
Rustici Software
 
Do not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your causeDo not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your cause
Fexle Services Pvt. Ltd.
 
Robotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptxRobotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptx
julia smits
 
S3 + AWS Athena how to integrate s3 aws plus athena
S3 + AWS Athena how to integrate s3 aws plus athenaS3 + AWS Athena how to integrate s3 aws plus athena
S3 + AWS Athena how to integrate s3 aws plus athena
aianand98
 
User interface and User experience Modernization.pptx
User interface and User experience  Modernization.pptxUser interface and User experience  Modernization.pptx
User interface and User experience Modernization.pptx
MustafaAlshekly1
 
iTop VPN With Crack Lifetime Activation Key
iTop VPN With Crack Lifetime Activation KeyiTop VPN With Crack Lifetime Activation Key
iTop VPN With Crack Lifetime Activation Key
raheemk1122g
 
!%& IDM Crack with Internet Download Manager 6.42 Build 32 >
!%& IDM Crack with Internet Download Manager 6.42 Build 32 >!%& IDM Crack with Internet Download Manager 6.42 Build 32 >
!%& IDM Crack with Internet Download Manager 6.42 Build 32 >
Ranking Google
 
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdfLegacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
Ortus Solutions, Corp
 
How I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetryHow I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetry
Cees Bos
 
Solar-wind hybrid engery a system sustainable power
Solar-wind  hybrid engery a system sustainable powerSolar-wind  hybrid engery a system sustainable power
Solar-wind hybrid engery a system sustainable power
bhoomigowda12345
 
NYC ACE 08-May-2025-Combined Presentation.pdf
NYC ACE 08-May-2025-Combined Presentation.pdfNYC ACE 08-May-2025-Combined Presentation.pdf
NYC ACE 08-May-2025-Combined Presentation.pdf
AUGNYC
 
Applying AI in Marketo: Practical Strategies and Implementation
Applying AI in Marketo: Practical Strategies and ImplementationApplying AI in Marketo: Practical Strategies and Implementation
Applying AI in Marketo: Practical Strategies and Implementation
BradBedford3
 
cram_advancedword2007version2025final.ppt
cram_advancedword2007version2025final.pptcram_advancedword2007version2025final.ppt
cram_advancedword2007version2025final.ppt
ahmedsaadtax2025
 
Let's Do Bad Things to Unsecured Containers
Let's Do Bad Things to Unsecured ContainersLet's Do Bad Things to Unsecured Containers
Let's Do Bad Things to Unsecured Containers
Gene Gotimer
 
How to Create a Crypto Wallet Like Trust.pptx
How to Create a Crypto Wallet Like Trust.pptxHow to Create a Crypto Wallet Like Trust.pptx
How to Create a Crypto Wallet Like Trust.pptx
riyageorge2024
 
How to Troubleshoot 9 Types of OutOfMemoryError
How to Troubleshoot 9 Types of OutOfMemoryErrorHow to Troubleshoot 9 Types of OutOfMemoryError
How to Troubleshoot 9 Types of OutOfMemoryError
Tier1 app
 
Serato DJ Pro Crack Latest Version 2025??
Serato DJ Pro Crack Latest Version 2025??Serato DJ Pro Crack Latest Version 2025??
Serato DJ Pro Crack Latest Version 2025??
Web Designer
 
Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025
Phil Eaton
 
Quasar Framework Introduction for C++ develpoers
Quasar Framework Introduction for C++ develpoersQuasar Framework Introduction for C++ develpoers
Quasar Framework Introduction for C++ develpoers
sadadkhah
 
A Comprehensive Guide to CRM Software Benefits for Every Business Stage
A Comprehensive Guide to CRM Software Benefits for Every Business StageA Comprehensive Guide to CRM Software Benefits for Every Business Stage
A Comprehensive Guide to CRM Software Benefits for Every Business Stage
SynapseIndia
 
Buy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training techBuy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training tech
Rustici Software
 
Do not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your causeDo not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your cause
Fexle Services Pvt. Ltd.
 
Robotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptxRobotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptx
julia smits
 
S3 + AWS Athena how to integrate s3 aws plus athena
S3 + AWS Athena how to integrate s3 aws plus athenaS3 + AWS Athena how to integrate s3 aws plus athena
S3 + AWS Athena how to integrate s3 aws plus athena
aianand98
 
User interface and User experience Modernization.pptx
User interface and User experience  Modernization.pptxUser interface and User experience  Modernization.pptx
User interface and User experience Modernization.pptx
MustafaAlshekly1
 
iTop VPN With Crack Lifetime Activation Key
iTop VPN With Crack Lifetime Activation KeyiTop VPN With Crack Lifetime Activation Key
iTop VPN With Crack Lifetime Activation Key
raheemk1122g
 
!%& IDM Crack with Internet Download Manager 6.42 Build 32 >
!%& IDM Crack with Internet Download Manager 6.42 Build 32 >!%& IDM Crack with Internet Download Manager 6.42 Build 32 >
!%& IDM Crack with Internet Download Manager 6.42 Build 32 >
Ranking Google
 
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdfLegacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
Ortus Solutions, Corp
 
How I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetryHow I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetry
Cees Bos
 
Solar-wind hybrid engery a system sustainable power
Solar-wind  hybrid engery a system sustainable powerSolar-wind  hybrid engery a system sustainable power
Solar-wind hybrid engery a system sustainable power
bhoomigowda12345
 
NYC ACE 08-May-2025-Combined Presentation.pdf
NYC ACE 08-May-2025-Combined Presentation.pdfNYC ACE 08-May-2025-Combined Presentation.pdf
NYC ACE 08-May-2025-Combined Presentation.pdf
AUGNYC
 
Applying AI in Marketo: Practical Strategies and Implementation
Applying AI in Marketo: Practical Strategies and ImplementationApplying AI in Marketo: Practical Strategies and Implementation
Applying AI in Marketo: Practical Strategies and Implementation
BradBedford3
 
cram_advancedword2007version2025final.ppt
cram_advancedword2007version2025final.pptcram_advancedword2007version2025final.ppt
cram_advancedword2007version2025final.ppt
ahmedsaadtax2025
 

Threshold for Size and Complexity Metrics: A Case Study from the Perspective of Defect Density

  • 1. Thresholds for Size and Complexity Metrics: A Case Study from the Perspective of Defect Density Kazuhiro Yamashita Yasutaka Kamei Changyun Huang Naoyasu Ubayashi Ahmed E. Hassan Meiyappan Nagappan Audris Mockus QRS2016 at Vienna, Austria 2016/08/01
  • 2. Many defect prediction papers have been published in the Empirical Software Engineering area 2 Over 100 papers have been published from 2000 - 2011 Goal: provide guidelines to practitioners on what kind of code has better quality Purpose: (a) which metric is the most useful (b) what values of these metrics indicate good code or bad code Emad Shihab Thesis
  • 3. Previous papers claimed that extreme values of metrics are sign of poor quality 3 Complexity > 10 Goldilocks Conjecture Larger files have more defects
  • 4. It is unclear if metric thresholds should be used to identify risky files 4 Previous papers have contradictory evidence regarding relationship between metric and defects Defects Metrics Values Norman E. Fenton TSE Can we really use metric thresholds to identify risky files?
  • 5. Goal and Approach Goal Observe if a consistent relationship between metric thresholds and software quality Approach Derive thresholds using a method proposed by Alves [1] Evaluate thresholds using defect proneness and density (OSS and Industry projects) 5 [1] T. Alves et al., “Deriving metric thresholds from benchmark data,” International Conference on Software Maintenance and Evolution (ICSME), pp. 1-10, 2010.
  • 6. Characteristics of the method proposed by Alves 6 Data-driven: The method is driven by measurement data from a representative set of systems not by expert opinion Robust: The method respects the statistical properties of the metric Pragmatic: The method is repeatable, transparent and straightforward to carry out
  • 9. Dataset (Java Projects) 9 Thresholds Derivation (Metrics) Thresholds Evaluation (Metrics + Defects) Industry OSS 205 projects 1,000 projects (from 4,575 projects) 4 projects 3 projects 3 versions
  • 10. Selection of 1,000 representative projects 10 Data-driven: The method is driven by measurement data from a representative set of systems not by expert opinion Industry OSS Both projects for derivation and evaluation are from Avaya labs Variety of projects are included Select 1,000 representative projects from 4,575 projects for each three versions of three projects using median LOC
  • 12. Steps of the method proposed by Alves 1. Metrics Extraction 2. Weight Ratio Calculation 3. Entity Aggregation 4. System Aggregation 5. Weight Ratio Aggregation 6. Thresholds Derivation 12
  • 13. 1. Metrics Extraction 13 Project A LOC 10K … File 1 File 2 File 3 File N… Cyclomatic Complexity (CC) 5 1 5 … 8 Extract metrics in each granularity
  • 14. Target metrics and granularity 14 Metric Granularity Understand Sonar Lines of Code File CountLineCode ncloc Module Interface Size File CountDeclInstanc eMethod functions Cyclomatic Complexity Method CyclomaticStrict function_complexi ty Module Inward Coupling Method/File CountInput accessors
  • 15. 2. Weight Ratio Calculation 15 Project A LOC 10K … File 1 File 2 File 3 File N… Weight Ratio 300/10K = 3% 100/10K = 1% 500/10K = 5% … 50/10K = 0.5% Calculate weights of each file according to the LOC
  • 16. 3. Entity Aggregation 16 Project A LOC 10K … File 1 File 2 File 3 File N… Cyclomatic Complexity (CC) 5 1 5 … 8 Weight Ratio 3% 1% 5% … 0.5% CC 0 1 … 5 … 8 … Aggregated Weight 0% 1% … 8% … 0.5% … Project A: (0%, 1%, …, 8%, …, 0.5%, …) Calculate weights of each metric value in a project
  • 17. 4. System Aggregation 17 Project A: (0%, 1%, …, 8%, …, 0.5%, …) Project B: (0%, 5%, …, 0%, …, 8%, …) … Project XX: (0%, 9%, …, 6%, …, 3%, …) Projects: (0%, 34000%, 15000%, 10000%, …) Number of Projects (1,000 projects) Normalized Projects: (0%, 34%, 15%, 10%, …) 1,000 projects Calculate weights of each metric value in all projects
  • 18. 5. Weight Ratio Aggregation 18 Normalized Projects: (0%, 34%, 15%, 10%, …) => Cumulated Normalized Projects: (0%, 34%, 49%, 59%, …) Plots weights of each metric value
  • 21. Thresholds (Cyclomatic Complexity) 21 Project Name Version 70% 80% 90% Eclipse 3.0 6 9 17 3.1 6 9 18 3.2 6 9 18 Mylyn 1.0 6 9 17 2.0 6 9 16 3.0 6 9 17 Netbeans 4.0 6 10 18 5.0 6 10 19 5.5.1 6 9 17 Industrial - 4.3 5.6 10.3
  • 23. Evaluate Thresholds Using Test Projects 23 ThresholdsFiles Defect Proneness Defect Density
  • 25. Threshold of Module Interface Size seems to work well with defect proneness (Industrial) 25 1. Low Risk: Low Defect Proneness (All Metrics) Observation 2. Very High Risk: High Defect Proneness (Module Interface Size) Industrial 110 Industrial 113 Industrial 140 Industrial 208
  • 26. Monotone relationship with defect proneness (OSS) 26 Observation Mylyn 1.0 Eclipse 3.0 Netbeans 4.0Eclipse 3.2 1. Monotone relationship between metrics and defect proneness ex
  • 28. Similar results to defect proneness (Industrial) 28 Industrial 110 Industrial 113 Industrial 140 Industrial 208 Observation 1. Very High Risk: High Defect Density except Industrial 110 (Module Interface Size)
  • 29. No consistent trends with defect density (OSS) 29 Eclipse 3.0 Mylyn 1.0 Netbeans 5.0 Netbeans 4.0 Observation 1. Monotonically decrease in Eclipse and Mylyn (Size Metrics) 2. Inversed-U shape in Eclipse and Mylyn (Complexity Metrics) 3. All over the place in Netbeans 5.0 and 5.5.1 (All Metrics) 4. Rotated-Z shape in Netbeans 4.0 (Three Metrics)
  • 30. Highest risk files have lower defect density on Poisson Model 30 Observation 1. Highest risk files have lower defect density 2. Only the results of LOC and Complexity (in OSS) are statistically significance
  • 31. Summary of our findings 31 Relationship Size Complexity OSS Industrial OSS Industrial Defect Proneness Monotonically I ncrease ✓ ✓ ✓ Optimum File Lower Defect Larger File Lower Defect Defect Density Monotonically I ncrease ✓ Optimum File Lower Defect Larger File Lower ✓ ✓
  • 32. Lessons Learned Defect Proneness • Thresholds can identify defect-prone files via size metrics Defect Density • If practitioners use thresholds of basic size and complexity metrics to identify files with higher defect densities, they must proceed with caution 32
  • 35. Thresholds (LOC) 35 Project Name Version 70% 80% 90% Eclipse 3.0 335 498 884 3.1 346 515 908 3.2 346 515 908 Mylyn 1.0 321 480 861 2.0 313 466 847 3.0 321 480 861 Netbeans 4.0 365 545 952 5.0 369 553 975 5.5.1 346 514 911 Industrial - 324 543 1,423
  • 36. Thresholds (Module Interface Size) 36 Project Name Version 70% 80% 90% Eclipse 3.0 18 26 43 3.1 19 27 44 3.2 19 27 44 Mylyn 1.0 18 26 42 2.0 18 25 42 3.0 18 26 42 Netbeans 4.0 20 28 46 5.0 20 28 47 5.5.1 19 27 44 Industrial - 19 30 89
  • 37. Thresholds (Module Inward Coupling) 37 Project Name Version 70% 80% 90% Eclipse 3.0 6 9 14 3.1 7 9 14 3.2 7 9 14 Mylyn 1.0 6 9 13 2.0 6 9 13 3.0 6 9 13 Netbeans 4.0 7 9 15 5.0 7 9 15 5.5.1 7 9 14 Industrial - 3 7 30

Editor's Notes

  • #2: Hi everyone. I’m Kazuhiro Yamashita from Kyushu University, Japan. Today, I would like to talk about my research. The title is “Thresholds for size and complexity metrics: A case study from the perspective of defect density.”
  • #3: According to the survey by Emad Shihab, over 100 defect prediction papers have been published from 2000 to 2011. The primary goal of defect prediction is to provide guidelines to practitioners on what kind of code has better quality. More specifically, the papers want to find out: which metric is the most useful and what values of these metrics indicate good or bad code.
  • #4: Previous papers claimed that extreme values of metrics are sign of poor quality. For example, McCabe claimed that complexity value 10 is the threshold from his experience. Other papers also showed relationships between metrics and quality.
  • #5: However, Fenton found that previous papers have contradictory evidence. For instance, an early study argued that the number of defects increases with the number of code segments. Other studies showed that optimum size files have lower defect density. Also other studies confirmed larger modules have lower defect densities. So, the question is we can really use metric thresholds to identify risky files.
  • #6: To solve the question, the goal of our study is to observe if a consistent relationship between metric thresholds and software quality. As the approach, we derive thresholds using a method proposed by Alves, then evaluate the thresholds using defects information.
  • #7: In this study, we use a method proposed by Alves because that the method have following three characteristics. First, Data-driven. The method is driven by measurement data from a representative set of systems not by expert opinion Next, Robust. The method respects the statistical properties of the metric. Last, Pragmatic. The method is repeatable, transparent and straightforward to carry out.
  • #8: This figure shows the overview of our approach. As we explained, our approach has two steps. First, we derive thresholds from sets of projects. Second, we evaluate the relationships between the thresholds and defects. Now we explain each part of our approach.
  • #9: First we explain datasets.
  • #10: In this study, we prepare four types of datasets to derive and evaluate thresholds. Because we want to evaluate relationship between thresholds and defects, we have to collect defect information for evaluation. But collecting defect information takes more time. Therefore, we prepare large sets of projects for derivation including only metrics information and small sets of projects for evaluation including metrics and defects information. For each of the purposes, we prepare two types of projects. One is from industry the other one is from open source software. The industrial datasets are provided by Avaya laboratory. The OSS projects are obtained from some forges like sourceForge and GitHub. Additionally, we collect the information of three projects Eclipse, Mylyn and Netbeans for evaluation.
  • #11: One of the points of the method is using a representative set of systems. Since same company developed both sets of industrial projects for derivation and evaluation, projects for derivation would be a representative set of projects for evaluation. On the other hand, three OSS projects for evaluation are developed by different constitutions to the other OSS projects. Hence, we decide to select 1,000 representative projects from the 4,575 projects for each projects using median LOC because that we assume that representative means having a similar distribution of file sizes.
  • #12: Next, we show details of Alves’ method.
  • #13: Alves’ method consists of these 6 steps. Now we describe each step using an example.
  • #14: Project A consists of N files and the total LOC is 10K. In this step, we calculate metrics for each file. For instance, cyclomatic complexity value of file 1 is 5 and that of file 2 is 1.
  • #15: In addition to cyclomatic complexity, we also consider three metrics: Lines of Code, Module Interface size and Module Inward Coupling.
  • #16: Next, we calculate weights of each file. In this example, total LOC of project A is 10K and LOC of file 1 is 300. Hence, the weight ratio of file 1 is 3%.
  • #17: Now we obtained metric values and weight ratios of each file. In this step, we calculate weights of each metric value. In this example, only file 2 has cyclomatic complexity value 1, so the aggregated weight of cyclomatic complexity value 1 is 1%. Since file 1 and file 3 have cyclomatic complexity value 5, the aggregated weight is 8%. Like this, we calculate the aggregated weights for each metric value.
  • #18: We perform the steps not only for project A but also for the set of projects. Now we obtained weights of each metric value per projects. Next we aggregate the weights within the set of projects. Then we calculate normalized weights of the set of projects by dividing by the number of projects.
  • #19: Using the values of normalized weights, we calculate cumulative weight ratio, then plot the values.
  • #20: Finally, we extract 70%, 80% and 90% values as thresholds. In this example, 5, 8 and 10 cyclomatic complexity values are thresholds. According to the thresholds, we can classify files into four categories: low risk, medium risk, high risk and very high risk.
  • #21: Using Alves’ method, we obtained thresholds.
  • #22: This table shows thresholds of cyclomatic complexity. From the table, all OSS projects have similar threshold values, but industrial projects have smaller values than OSS ones. Like this table, we also obtained thresholds of other three metrics.
  • #23: Finally, we evaluate the thresholds using defect information.
  • #24: In evaluation, we classify files of test projects according to the derived thresholds. Then, we evaluate the relationships between metrics and quality using defect proneness and density.
  • #25: First we show the results with defect proneness.
  • #26: These graphs show the results of industrial projects. First, we explain how to read the graphs. This graph shows four risk categories and the values of defect proneness and density. In this graph, blue dotted line shows LOC, black dotted line shows Module interface size, red line shows Cyclomatic Complexity and green line shows Module Inward coupling. In these graphs, when we focus on low risk category, we observe that the files have low defect proneness on all metrics. Additionally, when we focus on very high risk, we find high defect proneness with module interface size.
  • #27: These graphs show the results with OSS projects. We observe that most of the projects have monotone relationship between metrics and defect proneness except for these two projects.
  • #28: Next we show the results with defect density.
  • #29: These graphs show the result with industrial projects. From the figures, we observe very high risk files classified by module interface size have high defect density
  • #30: These graphs show the results with OSS projects. In Eclipse and Mylyn, we observe that defect density monotonically decreases with size metrics. When we focus on complexity metrics, we observe that the lines shape inverse-U. In Netbeans 5.0, we observe the relationship between metrics and density is all over the place. In Netbeans 4.0 the lines shape rotated-z shape. So, we conclude that we do not observe consistent trends with defect density.
  • #31: To quantify if the defect density is indeed higher for the very high risk, we model a poisson model. From the model, we observe that almost coefficients are negative values. From that we assume that the highest risk files have lower defect density. However, only results of LOC and Complexity are statistically significant.
  • #32: In this slide, we summarize our findings with the patterns of relationship argued by previous papers. With regard to defect proneness, we observe monotonically increase relationship. In terms of defect density, we observe the phenomenon that larger file have lower defect density in OSS projects. On the other hand, in industrial projects, we observe that larger file have larger defect density with size metric. In addition to three types of relationships, we also observed the relationship that medium file have larger defect density with complexity metrics.
  • #33: From our study, we obtained the lessons learned. With regard to defect proneness, thresholds can identify defect prone files via size metrics. On the other hand, in defect density, since we did not find consistent trends, practitioners must proceed with caution when they use thresholds.
  • #34: Now we conclude our slide. In this study, we aim to observe if a consistent relationship between metrics thresholds and software quality. For the goal, we derived thresholds using Alves’ method then evaluate the thresholds. From the results, we observed monotone relationship between metrics and defect proneness. However, with regard to defect density, we did not observe consistent relationship. That’s all, thank you.
  • #36: This table shows thresholds of Lines of Code. From the table, all projects have similar threshold values. 70% is around 300 LOC. 80% is around 500. 90% is around 900. Especially, within same projects, they have almost same threshold if the version is different. But, only industrial projects have much larger value 1400. Like this table, we also obtained thresholds of other three metrics.
  • #40: In the following slides, we show graphs like this. This graph shows four risk categories and the value of defect proneness and density. In this graph, blue dotted line shows LOC, black dotted line with circle shows Module interface size, red line shows Cyclomatic Complexity and green line with circle shows Module Inward coupling.
  • #41: ここで,図表の読み方の説明 These graphs show the results of industrial projects. In these graphs, when we focus on low risk category, we observe that the files have low defect proneness on all metrics. Additionally, when we focus on very high risk, we observe high defect proneness with module interface size.
  翻译: