# Defect Prediction

Document Sample

```					    Software Metrics and Defect
Prediction

• Sudipta Debnath
Problem 1

• How to tell if the
project is on
schedule and within
budget?
– Earned-value charts.
Problem 2

• How hard will it be for
another organization
to maintain this
software?
– McCabe Complexity
Problem 3

• How to tell when the
subsystems are
integrated
– Defect Density
Metrics.
Problem Definition

• Software development
lifecycle:
–   Requirements
–   Design
–   Development
–   Test (Takes ~50% of overall time)
• Detect and correct defects
before delivering software.
• Test strategies:
– Expert judgment
– Manual code reviews
– Oracles/ Predictors as secondary
tools
Defect Prediction

• 2-Class Classification Problem.
– Non-defective
• If error = 0
– Defective
• If error > 0
• 2 things needed:
– Raw data: Source code
– Software Metrics -> Static Code Attributes
Static Code Attributes

•   void main()
•   {
•            //This is a sample code

•            //Declare variables
•            int a, b, c;

•            // Initialize variables
•            a=2;
•            b=5;
Modul     LO   LOC   V    CC   Erro
•            //Find the sum and display c if greater than e         C    C               r
zero
•            c=sum(a,b);                             main()        16    4    5     2    2
•            if c < 0                        c>0
•                             printf(“%d\n”, a);
•            return;
•   }                                                 sum()        5     1    3     1    0
LOC: Line of Code
•   int sum(int a, int b)                  c                     LOCC: Line of commented Code
•   {
•             // Returns the sum of two numbers                  V: Number of unique operands&operators
•             return a+b;
•   }                                                            CC: Cyclometric Complexity
Research on Defect Prediction
• Defect prediction using machine learning techniques
• How effectively we can estimate defect density?
– Regression models
– First classification, then regression
• Defect prediction in multi version software
• Defect prediction in embedded software

•   B. Turhan, and A. Bener, "A Multivariate Analysis of Static Code Attributes for Defect Prediction", QSIC 2007, Portland, USA, October 11-12, 2007
•   A.D. Oral and A. Bener, "Defect Prediction for Embedded Software", ISCIS 2007, Ankara, Turkey, November 9-11, 2007.
•   Software Defect Identification Using Machine Learning Techniques”, E. Ceylan, O. Kutlubay, A. Bener, EUROMICRO SEAA, Dubrovnik, Croatia,
August 28th - September 1st, 2006
•   "Mining Software Data", B. Turhan and O. Kutlubay, Data Mining and Business Intelligence Workshop in ICDE'07 , İstanbul, April 2007
•   "A Two-Step Model for Defect Density Estimation", O. Kutlubay, B. Turhan and A. Bener, EUROMICRO SEAA, Lübeck, Germany, August 2007
•   "A Defect Prediction Method for Software Versioning", Y. Kastro and A. Bener, Software Quality Journal (in print).
•   “Software Defect Density Estimation Using Static Code Attri
```
DOCUMENT INFO
Shared By:
Categories:
Stats:
 views: 675 posted: 2/25/2010 language: English pages: 20
Description: A procedure which identified the methodology of software defect prediction and how to count on that
BUY THIS DOCUMENT NOW PRICE: \$11.95 100% MONEY BACK GUARANTEED
PARTNER