SlideShare ist ein Scribd-Unternehmen logo
Refactoring Debt: Myth or Reality?
An Exploratory Study on the Relationship
Between Technical Debt and Refactoring
Anthony Peruma, Eman A. AlOmar, Christian D. Newman,
Mohamed W. Mkaouer & Ali Ouni
The 19th International Conference on Mining Software Repositories
Mining Challenge Track
Intentionally documenting improvements
to the source code
Self-Admitted Technical Debt
Non-optimal code shipped to production
Technical Debt
GOAL
IMPACT
RESEARCH
QUESTIONS
CONTRIBUTION
Explore the repayment of technical debt
through refactoring operations
Provide developers and tool vendors with
insight to improve code quality
Extent of the removal of technical debt through refactoring
Types of debt addressed through refactoring
Dataset and discussion of the impact of
refactoring and debt repayment
Source Dataset
SmartSHARK
MongoDB Release 2.1
(full version)
Extracted Data
▪ SATD Removed Commits
▪ Refactoring Commits
▪ Refactoring Operations
▪ Hunks (Code Diffs)
Quantitative
Analysis
▪ Descriptive
Statistics
▪ Odds Ratio
Qualitative
Analysis
▪ Manual
Analysis of
Code
Custom Python Scripts
Experiment Design
Data Overview
▪ # of projects: 77
▪ # of project with SATD removed: 76
▪ # of commits with SATD removed: 13,259
▪ # of refactoring commits with SATD removed: 7,341
Research Questions
RQ1 – To what extent do developers refactor
code when removing technical debt?
Greater likelihood of debt repayment through refactoring activities:
• 76 of 77 systems have debt removal via refactoring
• 76 systems have an Odds Ratio > 1
• Statistically significant difference in the number of refactoring
operations applied to files
Developers apply a variety of refactoring operations:
• Extract Attribute is frequently applied multiple times followed by
Change Variable Type
Research Questions
RQ2 – What motivates a developer to refactor
their source code to remove technical debt?
Technical debt categories resolved via refactoring:
▪ Error Handling
▪ Code & Structural Improvements
▪ Feature Updates
Code & Structural Improvements
Clean-up Activities
Design Improvements
Includes removing temporary code or
renaming identifiers
Prior studies show that code clean-up is
an activity associated with refactoring
Includes moving code (such as moving
methods, method extraction, etc.) and
data type changes
Frequent bigrams & (stemmed) terms:
“get rid”, “mov”, “remov” & “chang”
Rename attribute
refactoring operation
Change data type
refactoring operation
Feature Updates
Refactoring operations developers
perform to incorporate feature changes
into the system
Frequent terms:
▪ “implement” – “FIXME: our
implementation is flawed….”
▪ “add” – “TODO: Add method to
extract...”
Extract method
refactoring operation
Error Handling
Developers knowingly write code prone
to errors or utilize generic (or auto-
generated) error handling code
(try/catch blocks)
Common bigrams: “catch block”, “error
handling”, “exception handling”, and
“throw exception”
▪ “TODO: We could use a better
strategy for error handling”
▪ “TODO: Fix exception handling”.
Potential Code Quality Tools:
• Support for robust error handling – automatic detection of
shortcomings in the code; customization of auto-generated try-
catch blocks
• Improving the accuracy of refactoring recommendations –
considering the occurrence of SATD in the code
• Aligns with existing studies showing a co-occurrence between debt
repayment and refactoring actions
• Opens the door for potential future work
A more formal and exhaustive set of causes for repayment categories
Conclusion & Takeaways
Thank You!
Anthony Peruma
h t t p s ://pe ru ma. me

Weitere ähnliche Inhalte

Ähnlich wie Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship Between Technical Debt and Refactoring

Verification Engineer - Opportunities and Career Path
Verification Engineer - Opportunities and Career PathVerification Engineer - Opportunities and Career Path
Verification Engineer - Opportunities and Career Path
Ramdas Mozhikunnath
 
Evolutionary Design Patterns for Software Development
Evolutionary Design Patterns for Software Development Evolutionary Design Patterns for Software Development
Evolutionary Design Patterns for Software Development
Stefan Ianta
 
When Architecture Meets Data
When Architecture Meets DataWhen Architecture Meets Data
When Architecture Meets Data
Eoin Woods
 
The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...
Ali Ouni
 
Technical debt management strategies
Technical debt management strategiesTechnical debt management strategies
Technical debt management strategies
Raquel Pau
 
Continuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentContinuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile Development
Dynatrace
 
Industrializing Machine learning pipelines
Industrializing Machine learning pipelinesIndustrializing Machine learning pipelines
Industrializing Machine learning pipelines
Germain Tanguy
 
Lights-Out Testing for Lights-On Business
Lights-Out Testing for Lights-On BusinessLights-Out Testing for Lights-On Business
Lights-Out Testing for Lights-On Business
Worksoft
 
Technical Debt and Requirements
Technical Debt and RequirementsTechnical Debt and Requirements
Technical Debt and Requirements
Neil Ernst
 
Demantra Case Study Doug
Demantra Case Study DougDemantra Case Study Doug
Demantra Case Study Doug
sichie
 
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Amine Barrak
 
Code quality
Code qualityCode quality
Code quality
Provectus
 
Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...
Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...
Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...
Lucas Jellema
 
SRS.pdf
SRS.pdfSRS.pdf
SRS.pdf
Lucifer272025
 
Back to the Basics: Principles for Constructing Quality Software
Back to the Basics: Principles for Constructing Quality SoftwareBack to the Basics: Principles for Constructing Quality Software
Back to the Basics: Principles for Constructing Quality Software
TechWell
 
Slides4lucid
Slides4lucidSlides4lucid
Slides4lucid
roysolay
 
Slides4lucid
Slides4lucidSlides4lucid
Slides4lucid
roysolay
 
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Amine Barrak
 
TejaSoft Code Audit Case Studies
TejaSoft Code Audit Case StudiesTejaSoft Code Audit Case Studies
TejaSoft Code Audit Case Studies
Raja Nagendra Kumar
 
Machine programming
Machine programmingMachine programming
Machine programming
DESMOND YUEN
 

Ähnlich wie Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship Between Technical Debt and Refactoring (20)

Verification Engineer - Opportunities and Career Path
Verification Engineer - Opportunities and Career PathVerification Engineer - Opportunities and Career Path
Verification Engineer - Opportunities and Career Path
 
Evolutionary Design Patterns for Software Development
Evolutionary Design Patterns for Software Development Evolutionary Design Patterns for Software Development
Evolutionary Design Patterns for Software Development
 
When Architecture Meets Data
When Architecture Meets DataWhen Architecture Meets Data
When Architecture Meets Data
 
The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...
 
Technical debt management strategies
Technical debt management strategiesTechnical debt management strategies
Technical debt management strategies
 
Continuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentContinuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile Development
 
Industrializing Machine learning pipelines
Industrializing Machine learning pipelinesIndustrializing Machine learning pipelines
Industrializing Machine learning pipelines
 
Lights-Out Testing for Lights-On Business
Lights-Out Testing for Lights-On BusinessLights-Out Testing for Lights-On Business
Lights-Out Testing for Lights-On Business
 
Technical Debt and Requirements
Technical Debt and RequirementsTechnical Debt and Requirements
Technical Debt and Requirements
 
Demantra Case Study Doug
Demantra Case Study DougDemantra Case Study Doug
Demantra Case Study Doug
 
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
 
Code quality
Code qualityCode quality
Code quality
 
Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...
Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...
Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...
 
SRS.pdf
SRS.pdfSRS.pdf
SRS.pdf
 
Back to the Basics: Principles for Constructing Quality Software
Back to the Basics: Principles for Constructing Quality SoftwareBack to the Basics: Principles for Constructing Quality Software
Back to the Basics: Principles for Constructing Quality Software
 
Slides4lucid
Slides4lucidSlides4lucid
Slides4lucid
 
Slides4lucid
Slides4lucidSlides4lucid
Slides4lucid
 
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
 
TejaSoft Code Audit Case Studies
TejaSoft Code Audit Case StudiesTejaSoft Code Audit Case Studies
TejaSoft Code Audit Case Studies
 
Machine programming
Machine programmingMachine programming
Machine programming
 

Mehr von University of Hawai‘i at Mānoa

Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
University of Hawai‘i at Mānoa
 
A Primer on High-Quality Identifier Naming [ASE 2022]
A Primer on High-Quality Identifier Naming [ASE 2022]A Primer on High-Quality Identifier Naming [ASE 2022]
A Primer on High-Quality Identifier Naming [ASE 2022]
University of Hawai‘i at Mānoa
 
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
University of Hawai‘i at Mānoa
 
Preparing for the Academic Job Market: Experience and Tips from a Recent F...
Preparing for the  Academic Job Market:  Experience and Tips from  a Recent F...Preparing for the  Academic Job Market:  Experience and Tips from  a Recent F...
Preparing for the Academic Job Market: Experience and Tips from a Recent F...
University of Hawai‘i at Mānoa
 
A Primer on High-Quality Identifier Naming
A Primer on High-Quality Identifier NamingA Primer on High-Quality Identifier Naming
A Primer on High-Quality Identifier Naming
University of Hawai‘i at Mānoa
 
Test Anti-Patterns: From Definition to Detection
Test Anti-Patterns: From Definition to DetectionTest Anti-Patterns: From Definition to Detection
Test Anti-Patterns: From Definition to Detection
University of Hawai‘i at Mānoa
 
Understanding Digits in Identifier Names: An Exploratory Study
Understanding Digits in Identifier Names: An Exploratory StudyUnderstanding Digits in Identifier Names: An Exploratory Study
Understanding Digits in Identifier Names: An Exploratory Study
University of Hawai‘i at Mānoa
 
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
University of Hawai‘i at Mānoa
 
IDEAL: An Open-Source Identifier Name Appraisal Tool
IDEAL: An Open-Source Identifier Name Appraisal ToolIDEAL: An Open-Source Identifier Name Appraisal Tool
IDEAL: An Open-Source Identifier Name Appraisal Tool
University of Hawai‘i at Mānoa
 
Using Grammar Patterns to Interpret Test Method Name Evolution
Using Grammar Patterns to Interpret Test Method Name EvolutionUsing Grammar Patterns to Interpret Test Method Name Evolution
Using Grammar Patterns to Interpret Test Method Name Evolution
University of Hawai‘i at Mānoa
 
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
University of Hawai‘i at Mānoa
 
Contextualizing Rename Decisions using Refactorings and Commit Messages
Contextualizing Rename Decisions using Refactorings and Commit MessagesContextualizing Rename Decisions using Refactorings and Commit Messages
Contextualizing Rename Decisions using Refactorings and Commit Messages
University of Hawai‘i at Mānoa
 
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
University of Hawai‘i at Mānoa
 
On the Distribution of Test Smells in Open Source Android Applications: An Ex...
On the Distribution of Test Smells in Open Source Android Applications: An Ex...On the Distribution of Test Smells in Open Source Android Applications: An Ex...
On the Distribution of Test Smells in Open Source Android Applications: An Ex...
University of Hawai‘i at Mānoa
 
A Preliminary Study of Android Refactorings
A Preliminary Study of Android RefactoringsA Preliminary Study of Android Refactorings
A Preliminary Study of Android Refactorings
University of Hawai‘i at Mānoa
 
Permission Issues in Open-Source Android Apps: An Exploratory Study
Permission Issues in Open-Source Android Apps: An Exploratory StudyPermission Issues in Open-Source Android Apps: An Exploratory Study
Permission Issues in Open-Source Android Apps: An Exploratory Study
University of Hawai‘i at Mānoa
 
A Career In IT
A Career In ITA Career In IT
Web Content Management - Introduction
Web Content Management - IntroductionWeb Content Management - Introduction
Web Content Management - Introduction
University of Hawai‘i at Mānoa
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
University of Hawai‘i at Mānoa
 
SharePoint 2013 - Search Driven Publishing
SharePoint 2013 - Search Driven PublishingSharePoint 2013 - Search Driven Publishing
SharePoint 2013 - Search Driven Publishing
University of Hawai‘i at Mānoa
 

Mehr von University of Hawai‘i at Mānoa (20)

Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
 
A Primer on High-Quality Identifier Naming [ASE 2022]
A Primer on High-Quality Identifier Naming [ASE 2022]A Primer on High-Quality Identifier Naming [ASE 2022]
A Primer on High-Quality Identifier Naming [ASE 2022]
 
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
 
Preparing for the Academic Job Market: Experience and Tips from a Recent F...
Preparing for the  Academic Job Market:  Experience and Tips from  a Recent F...Preparing for the  Academic Job Market:  Experience and Tips from  a Recent F...
Preparing for the Academic Job Market: Experience and Tips from a Recent F...
 
A Primer on High-Quality Identifier Naming
A Primer on High-Quality Identifier NamingA Primer on High-Quality Identifier Naming
A Primer on High-Quality Identifier Naming
 
Test Anti-Patterns: From Definition to Detection
Test Anti-Patterns: From Definition to DetectionTest Anti-Patterns: From Definition to Detection
Test Anti-Patterns: From Definition to Detection
 
Understanding Digits in Identifier Names: An Exploratory Study
Understanding Digits in Identifier Names: An Exploratory StudyUnderstanding Digits in Identifier Names: An Exploratory Study
Understanding Digits in Identifier Names: An Exploratory Study
 
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
 
IDEAL: An Open-Source Identifier Name Appraisal Tool
IDEAL: An Open-Source Identifier Name Appraisal ToolIDEAL: An Open-Source Identifier Name Appraisal Tool
IDEAL: An Open-Source Identifier Name Appraisal Tool
 
Using Grammar Patterns to Interpret Test Method Name Evolution
Using Grammar Patterns to Interpret Test Method Name EvolutionUsing Grammar Patterns to Interpret Test Method Name Evolution
Using Grammar Patterns to Interpret Test Method Name Evolution
 
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
 
Contextualizing Rename Decisions using Refactorings and Commit Messages
Contextualizing Rename Decisions using Refactorings and Commit MessagesContextualizing Rename Decisions using Refactorings and Commit Messages
Contextualizing Rename Decisions using Refactorings and Commit Messages
 
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
 
On the Distribution of Test Smells in Open Source Android Applications: An Ex...
On the Distribution of Test Smells in Open Source Android Applications: An Ex...On the Distribution of Test Smells in Open Source Android Applications: An Ex...
On the Distribution of Test Smells in Open Source Android Applications: An Ex...
 
A Preliminary Study of Android Refactorings
A Preliminary Study of Android RefactoringsA Preliminary Study of Android Refactorings
A Preliminary Study of Android Refactorings
 
Permission Issues in Open-Source Android Apps: An Exploratory Study
Permission Issues in Open-Source Android Apps: An Exploratory StudyPermission Issues in Open-Source Android Apps: An Exploratory Study
Permission Issues in Open-Source Android Apps: An Exploratory Study
 
A Career In IT
A Career In ITA Career In IT
A Career In IT
 
Web Content Management - Introduction
Web Content Management - IntroductionWeb Content Management - Introduction
Web Content Management - Introduction
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
 
SharePoint 2013 - Search Driven Publishing
SharePoint 2013 - Search Driven PublishingSharePoint 2013 - Search Driven Publishing
SharePoint 2013 - Search Driven Publishing
 

Kürzlich hochgeladen

8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
ssuserad3af4
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
YousufSait3
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
GohKiangHock
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 

Kürzlich hochgeladen (20)

8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 

Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship Between Technical Debt and Refactoring

  • 1. Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship Between Technical Debt and Refactoring Anthony Peruma, Eman A. AlOmar, Christian D. Newman, Mohamed W. Mkaouer & Ali Ouni The 19th International Conference on Mining Software Repositories Mining Challenge Track
  • 2. Intentionally documenting improvements to the source code Self-Admitted Technical Debt Non-optimal code shipped to production Technical Debt
  • 3. GOAL IMPACT RESEARCH QUESTIONS CONTRIBUTION Explore the repayment of technical debt through refactoring operations Provide developers and tool vendors with insight to improve code quality Extent of the removal of technical debt through refactoring Types of debt addressed through refactoring Dataset and discussion of the impact of refactoring and debt repayment
  • 4. Source Dataset SmartSHARK MongoDB Release 2.1 (full version) Extracted Data ▪ SATD Removed Commits ▪ Refactoring Commits ▪ Refactoring Operations ▪ Hunks (Code Diffs) Quantitative Analysis ▪ Descriptive Statistics ▪ Odds Ratio Qualitative Analysis ▪ Manual Analysis of Code Custom Python Scripts Experiment Design Data Overview ▪ # of projects: 77 ▪ # of project with SATD removed: 76 ▪ # of commits with SATD removed: 13,259 ▪ # of refactoring commits with SATD removed: 7,341
  • 5. Research Questions RQ1 – To what extent do developers refactor code when removing technical debt? Greater likelihood of debt repayment through refactoring activities: • 76 of 77 systems have debt removal via refactoring • 76 systems have an Odds Ratio > 1 • Statistically significant difference in the number of refactoring operations applied to files Developers apply a variety of refactoring operations: • Extract Attribute is frequently applied multiple times followed by Change Variable Type
  • 6. Research Questions RQ2 – What motivates a developer to refactor their source code to remove technical debt? Technical debt categories resolved via refactoring: ▪ Error Handling ▪ Code & Structural Improvements ▪ Feature Updates
  • 7. Code & Structural Improvements Clean-up Activities Design Improvements Includes removing temporary code or renaming identifiers Prior studies show that code clean-up is an activity associated with refactoring Includes moving code (such as moving methods, method extraction, etc.) and data type changes Frequent bigrams & (stemmed) terms: “get rid”, “mov”, “remov” & “chang” Rename attribute refactoring operation Change data type refactoring operation
  • 8. Feature Updates Refactoring operations developers perform to incorporate feature changes into the system Frequent terms: ▪ “implement” – “FIXME: our implementation is flawed….” ▪ “add” – “TODO: Add method to extract...” Extract method refactoring operation
  • 9. Error Handling Developers knowingly write code prone to errors or utilize generic (or auto- generated) error handling code (try/catch blocks) Common bigrams: “catch block”, “error handling”, “exception handling”, and “throw exception” ▪ “TODO: We could use a better strategy for error handling” ▪ “TODO: Fix exception handling”.
  • 10. Potential Code Quality Tools: • Support for robust error handling – automatic detection of shortcomings in the code; customization of auto-generated try- catch blocks • Improving the accuracy of refactoring recommendations – considering the occurrence of SATD in the code • Aligns with existing studies showing a co-occurrence between debt repayment and refactoring actions • Opens the door for potential future work A more formal and exhaustive set of causes for repayment categories Conclusion & Takeaways
  • 11. Thank You! Anthony Peruma h t t p s ://pe ru ma. me