SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
Code Change and Fault
           Prediction
             Tom Ostrand, Robert Bell, Elaine Weyuker
             AT&T Labs – Research
             Florham Park, NJ, USA


    PROMISE 2011
    Banff, Alberta, September 20-21, 2011




© 2007 AT&T Knowledge Ventures. All rights reserved. AT&T
and the AT&T logo are trademarks of AT&T Knowledge Ventures.
Overview

•Do measures of code change or churn
 provide useful input to fault prediction
 models?
•Standard model
•Base models
•Churn-augmented models
The Standard Model

• Underlying statistical model
  • Negative binomial regression
• Output (dependent) variable
  • Predicted fault count in each file of release n
• Predictor (independent) variables
  •   KLOC (n)
  •   Previous faults (n-1)
  •   Previous changes (n-1, n-2)
  •   File age (number of releases)
  •   File type (C,C++,java,sql,make,sh,perl,...)
Evaluating prediction models

• Model produces ranking of files in a release, from
  predicted most faults to fewest faults
• Choose cutoff point in ranking, X%
• Yield = percent of all faults in the release that are
  in the first X% of the ranked files
We’ve usually evaluated models at a 20% cutoff.
• Fault-percentile average (FPA) is the average yield
  over all values of X
Prediction Results, from the Standard
Model

                  Percent of faults in top 20% of files        FPA
       100
        90
                                             93 93             91 93        92
        80                              88                88           87
             83   83               81
        70                75                         76
        60
        50
        40
        30
        20
        10
         0
Measures of Code Change

•Changed/not changed
•Number of changes during a release
•Number of lines added
•Number of lines deleted
•Number of lines modified
•Relative churn (line changes/LOC)
Two Subject Systems

Large provisioning system
• 18 releases, 5 year lifespan
• 6 programming languages:
  • Java (60%), C, C++, SQL, SQL-C, SQL-C++
• 3000+ files
• 1.5Mil LOC
• Average of 395 faults/release
Two Subject Systems

Utility, data aggregation system
• 18 releases, 5 year lifespan
• >10 programming languages:
  • Java (77%), Perl, xml, sh, ...
• 800 files
• 280K LOC
• Average of 90 faults/release
Distribution of files,
       averages over all releases.


Percent of Files: Provisioning          Percent of Files: Utility


        6.8%                                 1.6%
                                                15.1%
           11.0%            New                                     New
                            Changed                                 Changed
                            Unchanged                               Unchanged
    82.2%                                84.4%
Where do faults occur?
Distribution of faults over files


Faults/file: Provisioning               Faults/file: Utility


     0.02                                      0.12
            0.24            New                                New
                            Changed                            Changed
                            Unchanged                          Unchanged
  0.80                                  0.82
Provisioning system faults per file, by
               release


                                 Faults per File, by Change Status and Release
                   2.5


                    2
  Fault-per-File




                   1.5


                    1


                   0.5


                    0
                         1   2   3    4   5    6    7   8    9    10   11   12    13   14   15   16    17   18
                                                             Release

                             New (Mean=0.24)       Unchanged (Mean=0.02)         Changed (Mean=0.80)
Utility system faults per file, by release


                                     Faults per File, by Change Status and Release
                      3


                     2.5


                      2
   Faults per file




                     1.5


                      1


                     0.5


                      0
                           1   2      3   4    5    6   7    8    9    10   11   12    13   14   15   16   17   18

                                   New (Mean=.09)       Unchanged (Mean=.002)         Changed (Mean=.92)
Potential predictor combinations

• Added lines only
• Deleted lines only
• Modified lines only
• Adds & Deletes
• Adds & Mods
• Deletes & Mods
• Adds & Deletes & Mods
• Relative values: changed lines/LOC
Distribution of change combinations,
all check-ins, all releases:
Provisioning system
                         Number of Files



                                 Mods, 683       Deletes, 296




            M & D & A, 2625                  Adds, 597
                                                         Mods & Deletes,
                                                              168



                                    Mods & Adds,
                                       1894

             Deletes &
             Adds, 126
Average lines touched for each combination of
changes


                      Average Lines touched
                                Mods, 4      Deletes, 5

                                                       Mods &
                                          Adds,       Deletes, 23
                                           21




                                              Mods & Adds,
                                                  37
               M & D & A, 210
                                                          Deletes &
                                                          Adds, 21
Faults per file, changed files only:
Provisioning system

                          Faults per File

                                               Deletes, 0.04
                                   Mods,
                                   0.19
                                            Adds, 0.3


                                                Mods &
             M & D & A, 1.38
                                              Deletes, 0.36


                                            Mods & Adds,
                                               0.55


                          Deletes & Adds,
                                0.5
Fault prediction models

•Univariate models
•Base model: log(KLOC), File age, File type
•Augmented models:
 • Previous Changes
 • Previous {Adds / Deletes / Mods}
 • Previous Adds + Deletes + Modifications
 • Previous {Adds / Deletes / Mods} / LOC
   (relative churn)
 • Previous Developers
Fault-percentile averages for univariate
predictor models: Provisioning system
(best result from raw variable, square root, fourth root)


                                          FPA, univariate models
                 Standard Model
                             Age
                       Language
              Prior Lines Deleted
                     Prior Faults
                  Prior Changed
             Prior Lines Modified
               Prior Lines Added
                Prior Developers
        Prior Adds+Deletes+Mods
                   Prior Changes
                       log(KLOC)
                                    0%   10%   20%   30%   40%   50%   60%   70%   80%   90%   100%
Base Model 1
 • KLOC
 • File age (number of releases)
 • File type (C,C++,java,sql,make,sh,perl,...)
Base Model 1, and added variables
       Mean FPA, Provisioning System                                        Mean FPA, Utility System
           Standard Model                                       Standard Model
              prev-changes                                         prev-changes
      prev-adds,dels,mods                                   prev-adds,dels,mods
(prev-adds,dels,mods)/LOC                                       prev-developers
          prev-developers
                                                                       prev-adds
                  prev-adds
                                                                  prev-changed
             prev-changed
                 prev-mods                                            prev-mods
               prev-deletes                                         prev-deletes
        prev-prev changes                                     prev-prev changes
                     Base 1                                               Base 1
                              89   90   91   92   93   94                          87   88   89   90   91   92   93




    • Base model 1
          • KLOC
          • File age (number of releases)
          • File type (C,C++,java,sql,make,sh,perl,...)
Base Model 2
 • KLOC
 • File age (number of releases)
 • File type (C,C++,java,sql,make,sh,perl,...)
 • (Previous changes)1/2
Base Model 2, and added variables

                     Mean FPA, Provisioning System
                    prev-prev changes
                  prev-adds,dels,mods
                             prev-adds
                            prev-mods
                      prev-developers
            (prev-adds,dels,mods)/LOC
                          prev-deletes
                         prev-changed
                                Base 2

                                         93.2 93.25 93.3 93.35 93.4 93.45 93.5 93.55




 • Base model 2
   • KLOC
   • File age (number of releases)
   • File type (C,C++,java,sql,make,sh,perl,...)
   • (Previous changes)1/2
Summary

• Churn can be an effective aid for improving fault prediction
• {Adds+Deletes+Mods} improves the accuracy of a model
  that doesn’t include any change information
BUT
• a simple count of prior changes slightly outperforms
  {Adds+Deletes+Mods}
• Prior changed is nearly as good as either, when added to a
  model without change info
• Lines added is the most effective single predictor
• Lines deleted is least effective single predictor
• Relative churn is no better than absolute churn for
  predicting total fault count

Weitere ähnliche Inhalte

Ähnlich wie Promise 2011: "Does Measuring Code Change Improve Fault Prediction?"

The Impact of Tangled Code Changes
The Impact of Tangled Code ChangesThe Impact of Tangled Code Changes
The Impact of Tangled Code ChangesKim Herzig
 
Continuous deployment
Continuous deploymentContinuous deployment
Continuous deploymentMshwalbe
 
Changes and Bugs: Mining and Predicting Development Activities
Changes and Bugs: Mining and Predicting Development ActivitiesChanges and Bugs: Mining and Predicting Development Activities
Changes and Bugs: Mining and Predicting Development ActivitiesThomas Zimmermann
 
Studying the impact of dependency network measures on software quality
Studying the impact of dependency network measures on software quality	Studying the impact of dependency network measures on software quality
Studying the impact of dependency network measures on software quality ICSM 2010
 
An Exploration of Challenges Limiting Pragmatic Software Defect Prediction
An Exploration of Challenges Limiting Pragmatic Software Defect PredictionAn Exploration of Challenges Limiting Pragmatic Software Defect Prediction
An Exploration of Challenges Limiting Pragmatic Software Defect PredictionSAIL_QU
 
Of Bugs and Men (and Plugins too)
Of Bugs and Men (and Plugins too)Of Bugs and Men (and Plugins too)
Of Bugs and Men (and Plugins too)Michel Wermelinger
 
Partitioning composite code changes to facilitate code review
Partitioning composite code changes to facilitate code reviewPartitioning composite code changes to facilitate code review
Partitioning composite code changes to facilitate code reviewYida Tao
 
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)Sung Kim
 
Using Developer Information as a Prediction Factor
Using Developer Information as a Prediction FactorUsing Developer Information as a Prediction Factor
Using Developer Information as a Prediction FactorTim Menzies
 
Cross-project defect prediction
Cross-project defect predictionCross-project defect prediction
Cross-project defect predictionThomas Zimmermann
 
Towards Probabilistic Assessment of Modularity
Towards Probabilistic Assessment of ModularityTowards Probabilistic Assessment of Modularity
Towards Probabilistic Assessment of ModularityKevin Hoffman
 
Model Compression
Model CompressionModel Compression
Model CompressionDarshanG13
 
(ATS3-PLAT01) Recent developments in Pipeline Pilot
(ATS3-PLAT01) Recent developments in Pipeline Pilot(ATS3-PLAT01) Recent developments in Pipeline Pilot
(ATS3-PLAT01) Recent developments in Pipeline PilotBIOVIA
 
[MSR2012] An Empirical Study of Supplementary Bug Fixes
[MSR2012] An Empirical Study of Supplementary Bug Fixes[MSR2012] An Empirical Study of Supplementary Bug Fixes
[MSR2012] An Empirical Study of Supplementary Bug Fixeshuni7595
 

Ähnlich wie Promise 2011: "Does Measuring Code Change Improve Fault Prediction?" (20)

The Impact of Tangled Code Changes
The Impact of Tangled Code ChangesThe Impact of Tangled Code Changes
The Impact of Tangled Code Changes
 
Continuous deployment
Continuous deploymentContinuous deployment
Continuous deployment
 
Changes and Bugs: Mining and Predicting Development Activities
Changes and Bugs: Mining and Predicting Development ActivitiesChanges and Bugs: Mining and Predicting Development Activities
Changes and Bugs: Mining and Predicting Development Activities
 
Studying the impact of dependency network measures on software quality
Studying the impact of dependency network measures on software quality	Studying the impact of dependency network measures on software quality
Studying the impact of dependency network measures on software quality
 
An Exploration of Challenges Limiting Pragmatic Software Defect Prediction
An Exploration of Challenges Limiting Pragmatic Software Defect PredictionAn Exploration of Challenges Limiting Pragmatic Software Defect Prediction
An Exploration of Challenges Limiting Pragmatic Software Defect Prediction
 
poster_3.0
poster_3.0poster_3.0
poster_3.0
 
Of Bugs and Men
Of Bugs and MenOf Bugs and Men
Of Bugs and Men
 
Of Bugs and Men (and Plugins too)
Of Bugs and Men (and Plugins too)Of Bugs and Men (and Plugins too)
Of Bugs and Men (and Plugins too)
 
ASE06.ppt
ASE06.pptASE06.ppt
ASE06.ppt
 
Partitioning composite code changes to facilitate code review
Partitioning composite code changes to facilitate code reviewPartitioning composite code changes to facilitate code review
Partitioning composite code changes to facilitate code review
 
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
 
DelOps vs. DevOps
DelOps vs. DevOpsDelOps vs. DevOps
DelOps vs. DevOps
 
Using Developer Information as a Prediction Factor
Using Developer Information as a Prediction FactorUsing Developer Information as a Prediction Factor
Using Developer Information as a Prediction Factor
 
Cross-project defect prediction
Cross-project defect predictionCross-project defect prediction
Cross-project defect prediction
 
Towards Probabilistic Assessment of Modularity
Towards Probabilistic Assessment of ModularityTowards Probabilistic Assessment of Modularity
Towards Probabilistic Assessment of Modularity
 
Model Compression
Model CompressionModel Compression
Model Compression
 
(ATS3-PLAT01) Recent developments in Pipeline Pilot
(ATS3-PLAT01) Recent developments in Pipeline Pilot(ATS3-PLAT01) Recent developments in Pipeline Pilot
(ATS3-PLAT01) Recent developments in Pipeline Pilot
 
[MSR2012] An Empirical Study of Supplementary Bug Fixes
[MSR2012] An Empirical Study of Supplementary Bug Fixes[MSR2012] An Empirical Study of Supplementary Bug Fixes
[MSR2012] An Empirical Study of Supplementary Bug Fixes
 
Version control
Version controlVersion control
Version control
 
FASE08.ppt
FASE08.pptFASE08.ppt
FASE08.ppt
 

Mehr von CS, NcState

Talks2015 novdec
Talks2015 novdecTalks2015 novdec
Talks2015 novdecCS, NcState
 
GALE: Geometric active learning for Search-Based Software Engineering
GALE: Geometric active learning for Search-Based Software EngineeringGALE: Geometric active learning for Search-Based Software Engineering
GALE: Geometric active learning for Search-Based Software EngineeringCS, NcState
 
Big Data: the weakest link
Big Data: the weakest linkBig Data: the weakest link
Big Data: the weakest linkCS, NcState
 
Three Laws of Trusted Data Sharing: (Building a Better Business Case for Dat...
Three Laws of Trusted Data Sharing:(Building a Better Business Case for Dat...Three Laws of Trusted Data Sharing:(Building a Better Business Case for Dat...
Three Laws of Trusted Data Sharing: (Building a Better Business Case for Dat...CS, NcState
 
Lexisnexis june9
Lexisnexis june9Lexisnexis june9
Lexisnexis june9CS, NcState
 
Welcome to ICSE NIER’15 (new ideas and emerging results).
Welcome to ICSE NIER’15 (new ideas and emerging results).Welcome to ICSE NIER’15 (new ideas and emerging results).
Welcome to ICSE NIER’15 (new ideas and emerging results).CS, NcState
 
Icse15 Tech-briefing Data Science
Icse15 Tech-briefing Data ScienceIcse15 Tech-briefing Data Science
Icse15 Tech-briefing Data ScienceCS, NcState
 
Kits to Find the Bits that Fits
Kits to Find  the Bits that Fits Kits to Find  the Bits that Fits
Kits to Find the Bits that Fits CS, NcState
 
Ai4se lab template
Ai4se lab templateAi4se lab template
Ai4se lab templateCS, NcState
 
Automated Software Enging, Fall 2015, NCSU
Automated Software Enging, Fall 2015, NCSUAutomated Software Enging, Fall 2015, NCSU
Automated Software Enging, Fall 2015, NCSUCS, NcState
 
Requirements Engineering
Requirements EngineeringRequirements Engineering
Requirements EngineeringCS, NcState
 
172529main ken and_tim_software_assurance_research_at_west_virginia
172529main ken and_tim_software_assurance_research_at_west_virginia172529main ken and_tim_software_assurance_research_at_west_virginia
172529main ken and_tim_software_assurance_research_at_west_virginiaCS, NcState
 
Automated Software Engineering
Automated Software EngineeringAutomated Software Engineering
Automated Software EngineeringCS, NcState
 
Next Generation “Treatment Learning” (finding the diamonds in the dust)
Next Generation “Treatment Learning” (finding the diamonds in the dust)Next Generation “Treatment Learning” (finding the diamonds in the dust)
Next Generation “Treatment Learning” (finding the diamonds in the dust)CS, NcState
 
Tim Menzies, directions in Data Science
Tim Menzies, directions in Data ScienceTim Menzies, directions in Data Science
Tim Menzies, directions in Data ScienceCS, NcState
 
Dagstuhl14 intro-v1
Dagstuhl14 intro-v1Dagstuhl14 intro-v1
Dagstuhl14 intro-v1CS, NcState
 
The Art and Science of Analyzing Software Data
The Art and Science of Analyzing Software DataThe Art and Science of Analyzing Software Data
The Art and Science of Analyzing Software DataCS, NcState
 

Mehr von CS, NcState (20)

Talks2015 novdec
Talks2015 novdecTalks2015 novdec
Talks2015 novdec
 
Future se oct15
Future se oct15Future se oct15
Future se oct15
 
GALE: Geometric active learning for Search-Based Software Engineering
GALE: Geometric active learning for Search-Based Software EngineeringGALE: Geometric active learning for Search-Based Software Engineering
GALE: Geometric active learning for Search-Based Software Engineering
 
Big Data: the weakest link
Big Data: the weakest linkBig Data: the weakest link
Big Data: the weakest link
 
Three Laws of Trusted Data Sharing: (Building a Better Business Case for Dat...
Three Laws of Trusted Data Sharing:(Building a Better Business Case for Dat...Three Laws of Trusted Data Sharing:(Building a Better Business Case for Dat...
Three Laws of Trusted Data Sharing: (Building a Better Business Case for Dat...
 
Lexisnexis june9
Lexisnexis june9Lexisnexis june9
Lexisnexis june9
 
Welcome to ICSE NIER’15 (new ideas and emerging results).
Welcome to ICSE NIER’15 (new ideas and emerging results).Welcome to ICSE NIER’15 (new ideas and emerging results).
Welcome to ICSE NIER’15 (new ideas and emerging results).
 
Icse15 Tech-briefing Data Science
Icse15 Tech-briefing Data ScienceIcse15 Tech-briefing Data Science
Icse15 Tech-briefing Data Science
 
Kits to Find the Bits that Fits
Kits to Find  the Bits that Fits Kits to Find  the Bits that Fits
Kits to Find the Bits that Fits
 
Ai4se lab template
Ai4se lab templateAi4se lab template
Ai4se lab template
 
Automated Software Enging, Fall 2015, NCSU
Automated Software Enging, Fall 2015, NCSUAutomated Software Enging, Fall 2015, NCSU
Automated Software Enging, Fall 2015, NCSU
 
Requirements Engineering
Requirements EngineeringRequirements Engineering
Requirements Engineering
 
172529main ken and_tim_software_assurance_research_at_west_virginia
172529main ken and_tim_software_assurance_research_at_west_virginia172529main ken and_tim_software_assurance_research_at_west_virginia
172529main ken and_tim_software_assurance_research_at_west_virginia
 
Automated Software Engineering
Automated Software EngineeringAutomated Software Engineering
Automated Software Engineering
 
Next Generation “Treatment Learning” (finding the diamonds in the dust)
Next Generation “Treatment Learning” (finding the diamonds in the dust)Next Generation “Treatment Learning” (finding the diamonds in the dust)
Next Generation “Treatment Learning” (finding the diamonds in the dust)
 
Tim Menzies, directions in Data Science
Tim Menzies, directions in Data ScienceTim Menzies, directions in Data Science
Tim Menzies, directions in Data Science
 
Goldrush
GoldrushGoldrush
Goldrush
 
Dagstuhl14 intro-v1
Dagstuhl14 intro-v1Dagstuhl14 intro-v1
Dagstuhl14 intro-v1
 
Know thy tools
Know thy toolsKnow thy tools
Know thy tools
 
The Art and Science of Analyzing Software Data
The Art and Science of Analyzing Software DataThe Art and Science of Analyzing Software Data
The Art and Science of Analyzing Software Data
 

Kürzlich hochgeladen

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Kürzlich hochgeladen (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Promise 2011: "Does Measuring Code Change Improve Fault Prediction?"

  • 1. Code Change and Fault Prediction Tom Ostrand, Robert Bell, Elaine Weyuker AT&T Labs – Research Florham Park, NJ, USA PROMISE 2011 Banff, Alberta, September 20-21, 2011 © 2007 AT&T Knowledge Ventures. All rights reserved. AT&T and the AT&T logo are trademarks of AT&T Knowledge Ventures.
  • 2. Overview •Do measures of code change or churn provide useful input to fault prediction models? •Standard model •Base models •Churn-augmented models
  • 3. The Standard Model • Underlying statistical model • Negative binomial regression • Output (dependent) variable • Predicted fault count in each file of release n • Predictor (independent) variables • KLOC (n) • Previous faults (n-1) • Previous changes (n-1, n-2) • File age (number of releases) • File type (C,C++,java,sql,make,sh,perl,...)
  • 4. Evaluating prediction models • Model produces ranking of files in a release, from predicted most faults to fewest faults • Choose cutoff point in ranking, X% • Yield = percent of all faults in the release that are in the first X% of the ranked files We’ve usually evaluated models at a 20% cutoff. • Fault-percentile average (FPA) is the average yield over all values of X
  • 5. Prediction Results, from the Standard Model Percent of faults in top 20% of files FPA 100 90 93 93 91 93 92 80 88 88 87 83 83 81 70 75 76 60 50 40 30 20 10 0
  • 6. Measures of Code Change •Changed/not changed •Number of changes during a release •Number of lines added •Number of lines deleted •Number of lines modified •Relative churn (line changes/LOC)
  • 7. Two Subject Systems Large provisioning system • 18 releases, 5 year lifespan • 6 programming languages: • Java (60%), C, C++, SQL, SQL-C, SQL-C++ • 3000+ files • 1.5Mil LOC • Average of 395 faults/release
  • 8. Two Subject Systems Utility, data aggregation system • 18 releases, 5 year lifespan • >10 programming languages: • Java (77%), Perl, xml, sh, ... • 800 files • 280K LOC • Average of 90 faults/release
  • 9. Distribution of files, averages over all releases. Percent of Files: Provisioning Percent of Files: Utility 6.8% 1.6% 15.1% 11.0% New New Changed Changed Unchanged Unchanged 82.2% 84.4%
  • 10. Where do faults occur? Distribution of faults over files Faults/file: Provisioning Faults/file: Utility 0.02 0.12 0.24 New New Changed Changed Unchanged Unchanged 0.80 0.82
  • 11. Provisioning system faults per file, by release Faults per File, by Change Status and Release 2.5 2 Fault-per-File 1.5 1 0.5 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Release New (Mean=0.24) Unchanged (Mean=0.02) Changed (Mean=0.80)
  • 12. Utility system faults per file, by release Faults per File, by Change Status and Release 3 2.5 2 Faults per file 1.5 1 0.5 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 New (Mean=.09) Unchanged (Mean=.002) Changed (Mean=.92)
  • 13. Potential predictor combinations • Added lines only • Deleted lines only • Modified lines only • Adds & Deletes • Adds & Mods • Deletes & Mods • Adds & Deletes & Mods • Relative values: changed lines/LOC
  • 14. Distribution of change combinations, all check-ins, all releases: Provisioning system Number of Files Mods, 683 Deletes, 296 M & D & A, 2625 Adds, 597 Mods & Deletes, 168 Mods & Adds, 1894 Deletes & Adds, 126
  • 15. Average lines touched for each combination of changes Average Lines touched Mods, 4 Deletes, 5 Mods & Adds, Deletes, 23 21 Mods & Adds, 37 M & D & A, 210 Deletes & Adds, 21
  • 16. Faults per file, changed files only: Provisioning system Faults per File Deletes, 0.04 Mods, 0.19 Adds, 0.3 Mods & M & D & A, 1.38 Deletes, 0.36 Mods & Adds, 0.55 Deletes & Adds, 0.5
  • 17. Fault prediction models •Univariate models •Base model: log(KLOC), File age, File type •Augmented models: • Previous Changes • Previous {Adds / Deletes / Mods} • Previous Adds + Deletes + Modifications • Previous {Adds / Deletes / Mods} / LOC (relative churn) • Previous Developers
  • 18. Fault-percentile averages for univariate predictor models: Provisioning system (best result from raw variable, square root, fourth root) FPA, univariate models Standard Model Age Language Prior Lines Deleted Prior Faults Prior Changed Prior Lines Modified Prior Lines Added Prior Developers Prior Adds+Deletes+Mods Prior Changes log(KLOC) 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
  • 19. Base Model 1 • KLOC • File age (number of releases) • File type (C,C++,java,sql,make,sh,perl,...)
  • 20. Base Model 1, and added variables Mean FPA, Provisioning System Mean FPA, Utility System Standard Model Standard Model prev-changes prev-changes prev-adds,dels,mods prev-adds,dels,mods (prev-adds,dels,mods)/LOC prev-developers prev-developers prev-adds prev-adds prev-changed prev-changed prev-mods prev-mods prev-deletes prev-deletes prev-prev changes prev-prev changes Base 1 Base 1 89 90 91 92 93 94 87 88 89 90 91 92 93 • Base model 1 • KLOC • File age (number of releases) • File type (C,C++,java,sql,make,sh,perl,...)
  • 21. Base Model 2 • KLOC • File age (number of releases) • File type (C,C++,java,sql,make,sh,perl,...) • (Previous changes)1/2
  • 22. Base Model 2, and added variables Mean FPA, Provisioning System prev-prev changes prev-adds,dels,mods prev-adds prev-mods prev-developers (prev-adds,dels,mods)/LOC prev-deletes prev-changed Base 2 93.2 93.25 93.3 93.35 93.4 93.45 93.5 93.55 • Base model 2 • KLOC • File age (number of releases) • File type (C,C++,java,sql,make,sh,perl,...) • (Previous changes)1/2
  • 23. Summary • Churn can be an effective aid for improving fault prediction • {Adds+Deletes+Mods} improves the accuracy of a model that doesn’t include any change information BUT • a simple count of prior changes slightly outperforms {Adds+Deletes+Mods} • Prior changed is nearly as good as either, when added to a model without change info • Lines added is the most effective single predictor • Lines deleted is least effective single predictor • Relative churn is no better than absolute churn for predicting total fault count