Mining Metrics to Predict Component Failures

Similar documents
Mining Metrics to Predict Component Failures

Predicting Defects using Network Analysis on Dependency Graphs

THE INFLUENCE OF ORGANIZATIONAL STRUCTURE ON SOFTWARE QUALITY: AN EMPIRICAL CASE STUDY

Software Defect Prediction Modeling

Early Estimation of Defect Density Using an In-Process Haskell Metrics Model

Chap 4. Using Metrics To Manage Software Risks

How To Predict A Program Defect

Lund, November 16, Tihana Galinac Grbac University of Rijeka

Formal Software Testing. Terri Grenda, CSTE IV&V Testing Solutions, LLC

Software Metrics: Roadmap

Software Metrics in Static Program Analysis

Empirical study of software quality evolution in open source projects using agile practices

EVALUATING METRICS AT CLASS AND METHOD LEVEL FOR JAVA PROGRAMS USING KNOWLEDGE BASED SYSTEMS

Java vs. PHP: Security Implications of Language Choice for Web Applications

Quality Analysis with Metrics

Unit 11: Software Metrics

Definitions. Software Metrics. Why Measure Software? Example Metrics. Software Engineering. Determine quality of the current product or process

Measuring Software Complexity to Target Risky Modules in Autonomous Vehicle Systems

Call Graph Based Metrics To Evaluate Software Design Quality

Processing and data collection of program structures in open source repositories

Mining Repositories to Assist in Project Planning and Resource Allocation

Keywords Class level metrics, Complexity, SDLC, Hybrid Model, Testability

II. TYPES OF LEVEL A.

EXTENDED ANGEL: KNOWLEDGE-BASED APPROACH FOR LOC AND EFFORT ESTIMATION FOR MULTIMEDIA PROJECTS IN MEDICAL DOMAIN

Got Issues? Do New Features and Code Improvements Affect Defects?

Quantitative Evaluation of Software Quality Metrics in Open-Source Projects

Software Testing & Analysis (F22ST3): Static Analysis Techniques 2. Andrew Ireland

Medical Device Software Verification, Validation, and Compliance

ASSURING SOFTWARE QUALITY USING VISUAL STUDIO 2010

Synopsis: Title: Software Quality. Theme: Information Systems. Project Term: 9th semester, fall Project Group: sw907e13

Software Metrics. Alex Boughton

Early Software Reliability

Karunya University Dept. of Information Technology

Module 10. Coding and Testing. Version 2 CSE IIT, Kharagpur

Does the Act of Refactoring Really Make Code Simpler? A Preliminary Study

Baseline Code Analysis Using McCabe IQ

Comparing four approaches for technical debt identification

Analysis Of Source Lines Of Code(SLOC) Metric

Making Software. What Really Works, and Why We Believe It. O'REILLY 8 Beijing Cambridge Farnham Koln Sebastopol Tokyo

Software Metrics. Lord Kelvin, a physicist. George Miller, a psychologist

Regression Testing Based on Comparing Fault Detection by multi criteria before prioritization and after prioritization

Software Defect Prediction for Quality Improvement Using Hybrid Approach

An Introduction to. Metrics. used during. Software Development

Quality Assurance Plan

Chapter 24 - Quality Management. Lecture 1. Chapter 24 Quality management

Research Article Predicting Software Projects Cost Estimation Based on Mining Historical Data


Curriculum Map Statistics and Probability Honors (348) Saugus High School Saugus Public Schools

Percerons: A web-service suite that enhance software development process

Design and Code Complexity Metrics for OO Classes. Letha Etzkorn, Jagdish Bansiya, and Carl Davis. The University of Alabama in Huntsville

The Software Product Quality Model

Defect Prediction Leads to High Quality Product

A Framework for Dynamic Software Analysis & Application Performance Monitoring

Module 5: Statistical Analysis

Open Source Software: How Can Design Metrics Facilitate Architecture Recovery?

Quality prediction model for object oriented software using UML metrics

CSTE Mock Test - Part I - Questions Along with Answers

Silvermine House Steenberg Office Park, Tokai 7945 Cape Town, South Africa Telephone:

Introduction to Computers and Programming. Testing

Software Engineering/Courses Description Introduction to Software Engineering Credit Hours: 3 Prerequisite: (Computer Programming 2).

The «SQALE» Analysis Model An analysis model compliant with the representation condition for assessing the Quality of Software Source Code

PREDICTIVE TECHNIQUES IN SOFTWARE ENGINEERING : APPLICATION IN SOFTWARE TESTING

A metrics suite for JUnit test code: a multiple case study on open source software

COMPARING MATRIX-BASED AND GRAPH-BASED REPRESENTATIONS FOR PRODUCT DESIGN

Good Software. Lecture 6 GSL Peru 2014


Software Defect Prediction Tool based on Neural Network

A Forrester Total Economic Impact Study Prepared For Codenomicon The Total Economic Impact Of Codenomicon s Defensics Security Testing Suite

International Journal of Advanced Research in Computer Science and Software Engineering

Measurement Information Model

How to report the percentage of explained common variance in exploratory factor analysis

SOFTWARE TESTING TRAINING COURSES CONTENTS

Fundamentals of Measurements

Transcription:

Mining Metrics to Predict Component Failures Nachiappan Nagappan, Microsoft Research Thomas Ball, Microsoft Research Andreas Zeller, Saarland University

Overview Introduction Hypothesis and high level description Background work and contributions Case study results Conclusions and future work

Introduction Software quality assurance in large organizations requires considerable effort Helping focus such activities based on early estimates of software quality is very useful Such estimations can be based on a variety of factors, Previous failures Evolution metrics Static code complexity metrics In this talk we focus on static code complexity measures

Hypothesis Hypothesis H 1 H 2 H 3 H 4 Increase in complexity metrics of an entity E correlates with the number of post-release defects of E. There is a common subset of metrics for which H 1 applies in all projects. There is a combination of metrics which significantly predicts the post-release defects of new entities within a project. Predictors obtained using H 3 from one project also predict failure-prone entities in other projects.

High level description 1. Collect input data Bug Database Version Database Code Code Code 2. Map post-release failures to defects in entities Entity Entity Entity 3. Predict failure probability for new entities Entity Predictor Failure probability

Background work Defects and failures defect refers to an error in the source code, and failure refers to an observable error in the program behavior every failure can be traced back to some defect, but a defect need not result in a failure For the user, only post-release failures matter. Our approach is exclusively concerned with post-release defects, each of them uncovered by at least one failure in the field. Complexity metrics Basili et al. Eight student projects LCOM not correlated with defects.

Background work Subramanyam and Krishnan survey eight empirical studies, all showing that OO metrics are significantly associated with defects. Historical Data Hudepohl et al. successfully predicted whether a module would be defect-prone or not by combining metrics and historical data. They used software design metrics as well as reuse information, under the assumption that new or changed modules would have a higher defect density.

Contributions It reports on how to systematically build predictors for postrelease defects from failure history found in the field by customers. It investigates whether object-oriented metrics can predict postrelease defects from the field. It analyzes whether predictors obtained from one project history are applicable to other projects. It is one of the largest studies of commercial software in terms of code size, team sizes, and software users.

Projects researched Internet Explorer 6 IIS Server Windows Process Messaging DirectX NetMeeting >1,000,000 Lines of Code

Projects researched A B C D E We randomize the projects as A, B, C, D, E

Research questions Do metrics correlate with failures? Is there a set of metrics that fits all projects? Can we predict failure-prone modules? Are predictors applicable across projects?

Metrics and their Correlation with Post-Release Defects Spearman rank correlation (bold: significant at 0.05)

Metrics and their Correlation with Post-Release Defects

Do metrics correlate with failures? Project A B C D E Metrics correlated w/ failure #Classes and 5 derived almost all all except MaxInheritanceDepth only #Lines (software was refactored if metrics indicated a problem) #Functions, #Arcs, Complexity

Do metrics correlate with failures? Project A B C D E Metrics correlated w/ failure #Classes and 5 derived almost all all except MaxInheritanceDepth only #Lines #Functions, #Arcs, Complexity

Is there a set of metrics that fits all projects? Project A B C D E Metrics correlated w/ failure #Classes and 5 derived almost all all except MaxInheritanceDepth only #Lines #Functions, #Arcs, Complexity

Is there a set of metrics that fits all projects? Project A B C D E Metrics correlated w/ failure #Classes and 5 derived almost all all except MaxInheritanceDepth only #Lines #Functions, #Arcs, Complexity

Can we predict failure-prone modules? Basic idea: Combine metrics Problem: Metrics are intercorrelated Solution: Principal Component Analysis (PCA)

Principal Components Component %Variance Cumul % 1 76.6 76.6 2 9.2 85.8 3 6.2 92.0 4 2.8 94.7 5 1.6 96.3 Project E

Predictive Power From the principal components, we can build regression models These can be fed with metrics to predict the defect likelihood Modules can be ranked according to likelihood

6 A Ranking 4 8 1 5 7 1/3 of the modules ranked according to predictor built from 2/3 of the modules can be evaluated against actual ranking 3 9

6 4 8 1 5 7 3 predicted 9 4 8 3 5 1 7 10 actual 2

6 4 8 1 5 7 3 predicted 9 4 8 3 5 1 7 10 actual 2

6 4 8 1 5 7 3 predicted 9 4 8 3 5 1 7 10 actual 2

6 4 8 1 5 7 3 predicted 9 4 8 3 5 1 7 10 actual 2

6 4 8 1 5 7 3 predicted 9 4 8 3 5 1 7 10 actual 2

6 4 8 1 5 7 3 predicted 9 4 8 3 5 1 7 10 actual 2

Predictive Power Project #Components R 2 value A 9 0.741 B 6 0.779 C 7 0.579 D 7 0.684 E 5 0.919

Can we predict failure-prone modules? Project #Components R 2 value A 9 0.741 B 6 0.779 C 7 0.579 D 7 0.684 E 5 0.919

Are predictors applicable across projects? Project A B C D E A no no no no B no yes no no C no yes no (yes) D no no no no E no no (yes) no

defect density Are predictors applicable across projects? Project Y modules Project U Project V

defect density Are predictors applicable across projects? DEPENDS modules

Summary Metrics correlate with failures There is no set of metrics that fits all projects We can predict failure-prone modules Predictors are applicable across similar projects Discussed results with teams to drive future work

Future work More metrics More projects More automation More data

Process similarity

Appendix: Cyclomatic Complexity Given a program's control flow graph, McCabe's Cyclomatic Complexity M is defined as M = E N + 2P where E = the number of edges of the graph N = the number of nodes of the graph P = the number of connected components. M is equivalently defined to be one larger than the number of decision points (if/case-statements, whilestatements, etc). Separate functions or methods are treated as being independent, disconnected components of the program's control flow graph.