Analysis of Code (and Design) Defect Injection and Removal in PSP. TSP Symposium 2012: Delivering agility with discipline 1

Similar documents
PSP Performance Analysis Report

Taking the Software Out of TSP

Test-Driven Development

1. Goals and philosophy

SPECIAL COUNCIL IN COMMITTEE OF THE WHOLE

Statistical Process Control for Software

Defect Removal. RIT Software Engineering

GENETIC TESTING: WHAT DOES IT REALLY TELL YOU? Lori L. Ballinger, MS, CGC Licensed Genetic Counselor University of New Mexico Cancer Center

Experimentally Investigating the Effects of Defects in UML Models

A Statistical Approach to Product Quality Assurance. Randall J. Varga 17 November 2005

Everyday Life in the Research World

1st Degree Goal Setting

Persistent Visual Tracking and Accurate Geo-Location of Moving Ground Targets by Small Air Vehicles

Defect Removal Metrics. SE 350 Software Process & Product Quality 1

The t-test: Answers the question: is the difference between the two conditions in my experiment "real" or due to chance?

Creating suicide safer communities A N X I E T Y R E C O V E R Y C E N T R E V I C T O R I A

I. INTRODUCING CROSSCULTURAL RESEARCH

Crossing boundaries between disciplines: A perspective on Basil Bernstein s legacy

Universidad Pontificia Bolivariana

CS 520 Theory and Practice of Software Engineering Fall 2017

A Survey on Code Coverage as a Stopping Criterion for Unit Testing

National Inspection of services that support looked after children and care leavers

LESSON PLAN FOR WEEK BEGINNING: May 26,2014. GENERAL OBJECTIVE: To ensure that students are able to understand why people use bullying.

PL-3 ORAL QUESTIONS CLASS : TE COMPUTER. Assignment No. 1 (Lift) 2. For the 7 segment why we pass GPIO.HIGH supply in segment_clear() Function.

2/7/2017. Avoid compassion traps. Avoid All or Nothing Traps. Some Explanatory Models of Addiction

Illogical Inductive Conversions

A supported model of decisionmaking:

Evidence-Based Medicine

CDC s 16 Critical Sexual Health Education Topics, Florida Physical Education and Health Education Benchmarks and Physical Education Courses

Using Probabilistic Methods to Optimize Data Entry in Accrual of Patients to Clinical Trials

EBW. Emotions & Moods Colours Coaching Tool. The EBW Emotional Intelligence System for Business.

Evaluation of Linguistic Labels Used in Applications

Genetic Disease, Genetic Testing and the Clinician

Supporting Dermatology Patients in the Digital Age. GlobalSkin White Paper January 2018

February Networking Event. Getting Students involved in volunteering University of Technology Sydney. 22 February, :00pm 4:00pm

FMEA AND RPN NUMBERS. Failure Mode Severity Occurrence Detection RPN A B

Factors Affecting Speed and Accuracy of Response Selection in Operational Environments

The Cochrane Library in East Asia: Background and Research to Inform Future Digital Strategies

Information Design. Information Design

Ultra-Portable Ultrasound in the Critical Care Unit

A Matrix of Material Representation

8. Reviews. Dilbert. Review objectives Formal design reviews (FDRs) Peer reviews. Comparison of peer reviews methods Expert opinions

Tip sheet. A quick guide to the dos and don ts of mental health care and inclusion. 1. Ask questions. Practical tips

Lesson 11.1: The Alpha Value

You re listening to an audio module from BMJ Learning. Hallo. I'm Anna Sayburn, Senior Editor with the BMJ Group s Consumer Health Team.

Assessing the Effectiveness of Biosurveillance via Discrete Event Simulation. DTRA Briefing 16 November 2010 LT Jason H. Dao, USN

HAND HELD ULTRASONIC SIZING OF STRESS CORROSION CRACKING

Chapter 1 Introduction

suicide Part of the Plainer Language Series

ACS 106 LANGUAGE LEADER / PRE-INTERMEDIATE

RPS Documentary Group 2018 Members Survey

USING ASSERTIVENESS TO COMMUNICATE ABOUT SEX

Controlling Anger. Presented by Military & Family Life Counselors

THE GALLAUDET DICTIONARY OF AMERICAN SIGN LANGUAGE FROM HARRIS COMMUNICATIONS

Our plan for giving better care to people with dementia Oxleas Dementia

Navigating Conflict with Families

Community Corrections Task Force Colorado Commission on Criminal and Juvenile Justice. Minutes

Causal Knowledge Modeling for Traditional Chinese Medicine using OWL 2

High blood pressure affects 1 in every 3 adults

It s Not Easy Weighing the Scales! EMS Stroke Triage and the Tools We Use

Disease Modifying Therapies in MS: Highlights from ACTRIMS 2018

June 13-15th, 2018 Grand Hotel Minerva, Florence - Italy. SISS INTENSIVE COURSE & R-LAB MODULE (optional)

An expert system (Autodoc) for diagnosing diseases and prescribing medication using visual basic.net

Conflict Management & Problem Solving

Assistive Technologies

THE ROLE OF IN-LINE INSPECTION IN THE MATERIAL VERIFICATION PROCESS. Simon Slater. IDT EXPO. Quarterly Meeting

Address : S. 27th Street, Suite 201 Franklin, Wisconsin, WebSite :

Look back at the prediction you made about what would happen in act 3. Discuss with the person next to you what you think will happen.

Ana Iglesias, Universidad Politécnica de Madrid La economía de agua de riego 24 Septiembre 2008

PR-SOCO Personality Recognition in SOurce COde 2016 Kolkata, 8-10 December

Advancing Primary Care Training in Health Care for the Homeless Nadine Chipon Schoepp, D.O Assistant Professor in Family medicine NSU-COM

Program AGMA Gear Classification and Inspection Handbook Model

Interview with Prof. Dr. Mohamed Abou-Donia, Duke University Durham, North Carolina, USA at London on

DO NOT COPY. Disasters and Pregnancy. Early Challenges. Contraception. Minimum Initial Service Package (MISP)

Sample Observation Form

Inference beyond significance testing: a gentle primer of model based inference

A PCT Primer. Fred Nickols 6/30/2011

Agenda TOWARDS HOPE AND HEALING: A MENTAL HEALTH AWARENESS EVENT 11/3/2018. Mental Health First Aid. Intro to Mental Health First Aid

Situated Coordination

Anxiety- Information and a self-help guide

Community Health. Preparing your child for their dental visit Autism & dentistry. Barnsley, Doncaster & Rotherham Community Dental Service

EBCC Data Analysis Tool (EBCC DAT) Introduction

GP Practice Patient Participation Groups Thames Valley & Milton Keynes Event 10th March 2015

Fuzzy Decision Analysis in Negotiation between the System of Systems Agent and the System Agent in an Agent-Based Model

MATRIX ANALYSIS FRAMED STRUCTURES BY WILLIAM WEAVER, JAMES M. GERE

Delivering Bad News. April 27, 2017

API. Generic Procedure. for the. Ultrasonic Examination. Ferritic Welds

AGENT-BASED SYSTEMS. What is an agent? ROBOTICS AND AUTONOMOUS SYSTEMS. Today. that environment in order to meet its delegated objectives.

Spotting Liars and Deception Detection skills - people reading skills in the risk context. Alan Hudson

IT Foundation Application Map

TOWARDS THE DEVELOPMENT OF A DEFECT DETECTION TOOL FOR COSMIC FUNCTIONAL SIZE MEASUREMENT

Using Health IT to Support Oral Health Integration: Dealing with Common Barriers. Jeff Hummel, MD, MPH Qualis Health November 5, 2015

7 Mistakes HR Professionals Make When Accommodating Employees Living on the Autism Spectrum By Sarah Taylor

Beattie Learning Disabilities Continued Part 2 - Transcript

Constructing Indices and Scales. Hsueh-Sheng Wu CFDR Workshop Series June 8, 2015

SAP Hybris Academy. Public. February March 2017

Developing Clinical Skills In Suicide Assessment, Prevention, And Treatment By Jason M.;Ph.d. Mcglothlin

Take a look at the three adult bears shown in these photographs:

Language Foundations. Gesture

The Fallacy of Taking Random Supplements

Transcription:

Analysis of Code (and Design) Defect Injection and Removal in PSP Diego Vallespir Grupo de Ingeniería de Software Universidad de la República Uruguay William Nichols Software Engineering Institute Carnegie Mellon University United States 1

Agenda The Role of Defects Our Research The Data Set Where the Defects Are Injected Analysis of Code Defects Defect types injected during Code When are the defects removed Cost to remove the defects injected in Code Using data for planning Conclusions and Future Work 2

The Role of Defects A primary goal in SPI: more efficient software development Software defects work against this goal To prevent or remove defects efficiently, we have to understand them: Where and when are defects injected and removed? Which defect type is most frequently injected? Which type is most expensive to remove? How many and which types of defects escape into unit test? Other considerations 3

Our Research Research goal: analyze PSP data to learn about the characteristics of defects injected during design (presented at TSP Symposium 2011) and code 4

The Data Set PSP 8 program course From October 2005 to January 2010 Only PSP2.1 was considered Programs 6, 7 and 8 Threat to validity: the students who generated the data were in a learning process, so the PSP techniques may not have been well applied 5

The Data Set (2) 94 engineers used the Java, C++, C# and C programming languages Reason: these languages used similar syntax, subprogram and data constructs Threat to validity: Java, C++, and C# are OO languages but C is not and we are analyzing code defects. (Thanks, reviewers, for pointing this out.) However, the C language was used only by 4 engineers. 6

The Data Set (3) 94 engineers 2 did not record any defects in the last 3 programs. 4 whose records of injected defects (injected during Code) were uncertain regarding their correctness and therefore were dismissed for this analysis. 8 did not record defects in the Code phase, so they were dismissed, as well. Finally, we use data from 80 engineers. 7

Where the Defects Are Injected DLD DLDR Code CR Comp UT Mean 46.4 0.4 52.4 0.3 0.03 0.5 Lower 40.8 0.2 46.7 0.0 0.0 0.2 Upper 52.0 0.7 58.1 0.7 0.09 0.9 Std. Dev. 27.2 1.7 27.4 1.8 0.3 1.8 As we expected, almost 99% of the defects are injected in the DLD and Code phases. 8

Where the Defects Are Injected (2) 9

Where the Defects Are Injected (3) The variability between individuals is substantial. For example, some engineers don t inject defects during design and some of them don t inject defects during code. Future work: try to understand the characteristics of individuals exhibiting different defect injection patterns 10

Analysis of Code Defects In this work, we focus on code defects. Based on our analysis, we will discuss: What types of defects are injected during code When those defects are removed The effort required to find and fix defects 11

Defects Types Injected During Code Docs. Syn. Buil Assign Inter. Chec Data Func Syst Env Mean 3.8 40.3 0.6 14.0 5.5 2.7 5.8 26.4 0 0.9 Mean D. 6.9 6.0 0.1 12.6 10.0 4.6 9.8 46.6 0.2 3.1 Lower 1.5 33.7 0.0 9.9 3.1 1.0 3.1 19.9 0 0.0 Upper 6.0 46.9 1.1 18.1 8.0 4.4 8.6 32.8 0 1.7 Std. dev. 10.1 29.5 2.5 18.4 11.1 7.4 12.4 29.1 0 3.9 To improve the detection of code defects, we first want to know which types of defects were injected during the Code phase. 12

Defects Types Injected During Code (2) Docs. Syn. Buil Assign Inter. Chec Data Func Syst Env Mean 3.8 40.3 0.6 14.0 5.5 2.7 5.8 26.4 0 0.9 Mean D. 6.9 6.0 0.1 12.6 10.0 4.6 9.8 46.6 0.2 3.1 Lower 1.5 33.7 0.0 9.9 3.1 1.0 3.1 19.9 0 0.0 Upper 6.0 46.9 1.1 18.1 8.0 4.4 8.6 32.8 0 1.7 Std. dev. 10.1 29.5 2.5 18.4 11.1 7.4 12.4 29.1 0 3.9 Build, System and Environment: almost no defects of this type were found. This may be due to the PSP course exercises: Small programs where the build/package is simple and the systems problems (configuration, timing, etc.) are unlikely to be present Threat to validity: the programs of the PSP course are small. Future work: try to find more of these defect types in TSP projects. 13

Defects Types Injected During Code (3) Docs. Syn. Buil Assign Inter. Chec Data Func Syst Env Mean 3.8 40.3 0.6 14.0 5.5 2.7 5.8 26.4 0 0.9 Mean D. 6.9 6.0 0.1 12.6 10.0 4.6 9.8 46.6 0.2 3.1 Lower 1.5 33.7 0.0 9.9 3.1 1.0 3.1 19.9 0 0.0 Upper 6.0 46.9 1.1 18.1 8.0 4.4 8.6 32.8 0 1.7 Std. dev. 10.1 29.5 2.5 18.4 11.1 7.4 12.4 29.1 0 3.9 Documentation, Interface, Checking and Data few defects of these types were found. Defects of these types were injected (from 2.7% to 5.8%). 14

Defects Types Injected During Code (4) Docs. Syn. Buil Assign Inter. Chec Data Func Syst Env Mean 3.8 40.3 0.6 14.0 5.5 2.7 5.8 26.4 0 0.9 Mean D. 6.9 6.0 0.1 12.6 10.0 4.6 9.8 46.6 0.2 3.1 Lower 1.5 33.7 0.0 9.9 3.1 1.0 3.1 19.9 0 0.0 Upper 6.0 46.9 1.1 18.1 8.0 4.4 8.6 32.8 0 1.7 Std. dev. 10.1 29.5 2.5 18.4 11.1 7.4 12.4 29.1 0 3.9 Syntax, Assignment and Function: many defects of this type were found. These type of defects account for 80% of the Code defects. 15

Defects Types Injected During Code (5) Variability between individuals and assignments This suggests that individuals have different behaviors. 16

When Are the Defects Removed For each engineer who injected Code defects, we identified the phases in which the engineers found these defects. This work used a limited sample size that did not allow further analysis of removal phases. Future work: when we get more data, examine the removal phases based on the defect types. 17

When Are the Defects Removed (2) CODE DEFECTS CR Comp UT Mean 62.0 16.6 21.4 Lower 55.0 11.7 15.4 Upper 69.0 21.6 27.3 Std. dev. 31.3 22.4 26.9 62% of the defects are found early in the CR phase. However, 21% of the defects injected during Design escapes all phases prior to UT. How can we improve this? We first need to know the types of defects that escape to UT. 18

Cost to Remove the Defects Injected in Code We analyze the differences in cost segmented by: Removal phase Defect type It would also be interesting to segment and analyze both the removal phase and the defect type jointly. Unfortunately, because of limited sample size after a two dimensional segmentation, we could not perform that analysis with statistical significance. Future work: when we get more data, examine the segmentation in two dimensions. 19

Cost to Remove Defects Segmented by Phase For each engineer, we calculated the average task time to removing a code defect in each of the different phases. Because some engineers did not remove code defects in one or more phases, our sample size varied by phase. 20

Cost to Remove Defects Segmented by Phase (2) CODE DEFECTS CR Com UT Mean 1.9 1.5 14.4 Lower 1.5 1.1 9.8 Upper 2.3 1.9 19.0 Std. dev. 1.9 1.3 16.4 The cost of removing code defects in Unit Test are 7 times higher that the ones removed in Code Review. Cost (in minutes) of find and fix defects injected during code segmented by removal phase 21

Cost to Remove Defects Segmented by Type Docs. Syn. Assign. Inter. Data Func. Mean 3.4 1.9 2.7 2.3 12.2 9.4 Lower 1.3 1.4 1.8 1.4 0.0 6.8 Upper 5.4 2.3 3.7 3.3 27.2 12.1 Std. dev. 4.2 2.0 3.1 2.2 32.9 10.7 Cost (in minutes) of find and fix defects injected during code segmented by type Not enough data to present Build/Package, System or Environment defects. Three clearly different groups 22

Using Data for Planning We will assume that UT yield is 50% We will assume that all the defects are injected in design or code (this is almost true) Suppose we developed a program in which we injected 100 defects 23

Using Data for Planning (2) Excellent yield! Consider that: Inspections are missing and that the data come from the courses (learning process) 24

Using Data for Planning (3) Unit testing is really expensive It is important to remove more defects before arriving to UT 25

Conclusions (We observe a high variability between individuals and assignments). Around 38% of the injected defects arrives to UT. Phases prior to UT have similar defect find and fix costs Defects are 5 times more expensive to find and fix in UT than in the earlier PSP phases for design defects and 7 times more expensive for code defects. The estimated yield of the PSP (during the course) is 81% 26

Future work Future work was mentioned during the presentation The most important things we are planning to do is: Repeat the analysis with more data Characterize things that are pending Moving our research to TSP We hope that this new analysis will enable us to analyze improvement opportunities to achieve better process yields 27

Questions Diego Vallespir dvallesp@fing.edu.uy Grupo de Ingeniería de Software Universidad de la República Uruguay William Nichols wrn@sei.cmu.edu Software Engineering Institute Carnegie Mellon University United States Analysis of Code (and Design) Defect Injection and Removal in PSP September 17-20, 2012 in St. Petersburg, Florida, USA 28