Detecting and Quantifying Different Types of Self-Admitted ... · Types(of(Self8Admi;ed(TD(8 Ant...
Transcript of Detecting and Quantifying Different Types of Self-Admitted ... · Types(of(Self8Admi;ed(TD(8 Ant...
Detec%ng and Quan%fying Different Types of Self-‐Admi;ed Technical Debt
Everton da S. Maldonado and Emad Shihab
Self-‐Admi;ed Technical Debt Iden%fica%on
Code Comments can be used to detect TD
2
Comment Pa2erns
“probably a bug” “hack”
“fix this crap”
Self-‐Admi;ed Technical Debt
“duct-‐tape”
Examples of Self-admitted Technical Debt
3
Different Types of Technical Debt
Technical debt is a broad concept:
What types of TD are Self-‐Admi;ed?
4
Requirement debt …
Design debt , DocumentaBon debt,
Case Study
5
5 open source Java projects (Ant, ArgoUML, Columba, JFreeChart and Jmeter)
606K + SLOC 39K + Extracted comments 8k + Classes
Manual Classifica%on of Comments
Can a comment have more than one classifica%on?
6
There is a possibility.
The manual classifica%on took about 95 hours
Quan%fying Self-‐Admi;ed TD Comments
7
Project # of analyzed comments
# of self-‐admi;ed
TD comments
% of self-‐admi;ed TD per project
Ant 4,140 134 3.2 ArgoUML 9,788 1,653 16.8 Columba 6,569 295 4.4 JFreeChart 4,433 219 4.9 Jmeter 8,163 375 4.6 TOTAL 33,093 2,676 -‐
Types of Self-‐Admi;ed TD
8
Ant Jmeter ArgoUml JFreeChart Columba
Perc
enta
ge
020
4060
8010
0
Design debtRequirement debtDefect debtTest debtDocumentation debt
Ant Jmeter ArgoUml JFreeChart Columba
Perc
enta
ge
020
4060
8010
0
Design debtRequirement debtDefect debtTest debtDocumentation debt
Ant Jmeter ArgoUml JFreeChart Columba
Perc
enta
ge
020
4060
8010
0
Design debtRequirement debtDefect debtTest debtDocumentation debt
Ant Jmeter ArgoUml JFreeChart Columba
Perc
enta
ge
020
4060
8010
0Design debtRequirement debtDefect debtTest debtDocumentation debt
Ant Jmeter ArgoUml JFreeChart Columba
Perc
enta
ge
020
4060
8010
0
Design debtRequirement debtDefect debtTest debtDocumentation debt
Ant Jmeter ArgoUml JFreeChart Columba
Perc
enta
ge
020
4060
8010
0
Design debtRequirement debtDefect debtTest debtDocumentation debt
Ant Jmeter ArgoUml JFreeChart Columba
Perc
enta
ge
020
4060
8010
0
Design debtRequirement debtDefect debtTest debtDocumentation debt
Ant Jmeter ArgoUml JFreeChart Columba
Perc
enta
ge
020
4060
8010
0
Design debtRequirement debtDefect debtTest debtDocumentation debt
Examples of Self-‐Admi;ed TD
9
Design Debt: “quick & dirty, to make nested mapped p-‐sets work:” [from Ant]
Requirement Debt:
Defect Debt: “Bug in above method” -‐ [from Jmeter]
“TODO: no methods yet for getClassname” [from Ant]
Take Home Messages
1. We found 5 types of self-‐admi2ed TD.
2. 3.2% -‐ 16.8% of the comments contains some type of technical debt.
3. Design and Requirement debt are the most common types of self-‐admi2ed TD.
10