On the Relationship between Self-Admitted Technical Debt Removals and Technical Debt Measures
Abstract
:1. Introduction
2. Related Work
2.1. Detection of SATD
2.2. Investigation of Effects on SATD and Quality Metrics
3. Study Setup
3.1. Research Questions
3.2. Data Extraction
3.3. Linking SATD to Technical Debt Values
3.4. Subject Projects
Algorithm 1: Matching commits (SATD Removals TD values) |
1. Input: C: Commits Sets, D: SATD Dataset 2. Output: Dataset (CSV format) 3. for all d Є D do 4. O: set of commits hash to be analyzed 5. r → hash of removal commit in d 6. previous → retrieve hash of previous commit of r from C 7. next → retrieve hash of next commit of r from C 8. push r, previous, next in O 9. for all o Є O do 10. clone repository at status of o 11. file → file to analyze 12. if file exists then 13. generates. properties file 14. executes sonar scanner analysis 15. recovers TD with sonar web API 16. deletes. properties file 17. run CK analysis 18. recovers CK object related to file 19. else if o is equal to r 20. write into the output file “-” for TD, delta and CK metrics 21. continue 22. end if 23. restore repository at current state 24. end for 25. if analyses of previous or next commit are equal to null then 26. write into the output file “-” for TD, delta and CK metrics 27. continue 28. end if 29. calculates the delta between the commit removal and the previous one 30. and between the next commit and the commit removal 31. write into the output file all commit attributes relating to the analyses performed 32. end for |
4. Results
4.1. RQ1: To What Extent Do Self-Admitted Technical Debt Removals Actually Lead to a Lower Technical Debt Value?
4.1.1. Change in TD Value between Commit Removal and Previous Commit
4.1.2. Change in TD Value between Commit Removal and Subsequent Commit
4.1.3. Preservation of the Trend between Negative Delta Commit Removal and Next Commit
4.1.4. Relationship between Change Type of Commit Removal and File not Found
4.2. RQ2: To What Extent Do Self-Admitted Technical Debt Removals Lead to Lower Chidamber and Kemerer Metrics Values?
5. Threats to Validity
6. Conclusions
Author Contributions
Funding
Conflicts of Interest
References
- Aldecoa, R.; Marín, I. Exploring the limits of community detection strategies in complex networks. In Proceedings of the 2004. Proceedings. 20th IEEE Metrics-based rules for detecting design flaws International Conference on in Software Maintenance, Chicago, IL, USA, 11–12 September 2004; IEEE: Piscataway, NJ, USA, 2013. [Google Scholar]
- Wong, S.; Cai, Y.; Kim, M.; Dalton, M. Detecting software modularity violations. In Proceedings of the Proceeding of the 33rd international conference, Association for Computing Machinery (ACM), Granada, Spain, May 2011. [Google Scholar]
- Li, Z.; Liang, P.; Avgeriou, P.; Guelfi, N.; Ampatzoglou, A. An empirical investigation of modularity metrics for indicating architectural technical debt. In Proceedings of the 10th international ACM Sigsoft conference on Quality of software architectures (QoSA ’14). Association for Computing Machinery, New York, NY, USA, 27 June 2014; pp. 119–128. [Google Scholar] [CrossRef] [Green Version]
- Farias, M.A.D.F.; Neto, M.G.D.M.; Da Silva, A.B.; Spinola, R.O. A Contextualized Vocabulary Model for identifying technical debt on code comments. In Proceedings of the 2015 IEEE 7th International Workshop on Managing Technical Debt MTD, Bremen Germany, 2 October 2015; pp. 25–32. [Google Scholar] [CrossRef]
- Maldonado, E.D.S.; Shihab, E.; Tsantalis, N. Using Natural Language Processing to Automatically Detect Self-Admitted Technical Debt. IEEE Trans. Softw. Eng. 2017, 43, 1044–1062. [Google Scholar] [CrossRef]
- Brondum, J.; Zhu, L. Visualising architectural dependencies. In 2012 Third International Workshop on Managing Technical Debt MTD; IEEE: Piscataway, NJ, USA, 2002; pp. 7–14. [Google Scholar] [CrossRef]
- Li, Z.; Liang, P.; Avgeriou, P. Architectural Technical Debt Identification Based on Architecture Decisions and Change Scenarios. In Proceedings of the 2015 12th Working IEEE/IFIP Conference on Software Architecture Institute of Electrical and Electronics Engineers (IEEE), Victoria, BC, Canada, 29 September 2015; pp. 65–74. [Google Scholar]
- Zampetti, F.; Serebrenik, A.; Di Penta, M. Was self-admitted technical debt removal a real removal? In Proceedings of the 15th International Conference on Computer Systems and Technologies–CompSysTech ’14 Association for Computing Machinery (ACM), Gothenburg, Sweden, 27 May 2018; pp. 526–536. [Google Scholar]
- Chidamber, S.; Kemerer, C. A metrics suite for object oriented design. IEEE Trans. Softw. Eng. 1994, 20, 476–493. [Google Scholar] [CrossRef] [Green Version]
- Aniket Potdar and Emad Shihab. An Exploratory Study on Self-Admitted Technical Debt. In Proceedings of the 2014 IEEE International Conference on Software Maintenance and Evolution(ICSME ’14). IEEE Computer Society, Washington, DC, USA, December 2014; pp. 91–100. [Google Scholar] [CrossRef]
- Liu, Z.; Huang, Q.; Xia, X.; Shihab, E.; Lo, D.; Li, S. SATD Detector: A Text-Mining-Based Self-Admitted Technical Debt Detection Tool. In Proceedings of the ICSE 2018, DEMO—Demonstrations, Gothenburg, Sweden, 30 May 2018. [Google Scholar]
- Maldonado, E.D.S.; Shihab, E. Detecting and quantifying different types of self-admitted technical Debt. In Proceedings of the 2015 IEEE 7th International Workshop on Managing Technical Debt MTD, Bremen, Germany, 2 October 2015; pp. 9–15. [Google Scholar] [CrossRef]
- Maldonado, E.D.S.; Abdalkareem, R.; Shihab, E.; Serebrenik, A. An Empirical Study on the Removal of Self-Admitted Technical Debt. In Proceedings of the 2017 IEEE International Conference on Software Maintenance and Evolution (ICSME); Institute of Electrical and Electronics Engineers (IEEE): Piscataway, NJ, USA; pp. 238–248.
- Iammarino, M.; Zampetti, F.; Aversano, L.; Di Penta, M. Self-Admitted Technical Debt Removal and Refactoring Actions: Co-Occurrence or More? In Proceedings of the 2019 IEEE International Conference on Software Maintenance and Evolution (ICSME), Cleveland, OH, USA, 30 September–4 October 2019; pp. 186–190. [Google Scholar] [CrossRef]
- Wehaibi, S.; Shihab, E.; Guerrouj, L. Examining the Impact of Self-Admitted Technical Debt on Software Quality. In Proceedings of the 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), Suita, Japan, 14 March 2016; Institute of Electrical and Electronics Engineers (IEEE): Piscataway, NJ, USA; Volume 1, pp. 179–188. [Google Scholar]
- Griffith, I.; Reimanis, D.; Izurieta, C.; Codabux, Z.; Deo, A.; Williams, B.; Deo, A.; Williams, B. The Correspondence between Software Quality Models and Technical Debt Estimation Approaches. In Proceedings of the 2014 Sixth International Workshop on Managing Technical Debt, Washington, DC, USA, 30 September 2014; pp. 19–26. [Google Scholar] [CrossRef]
- Gabriele Bavota and Barbara Russo. A large-scale empirical study on self-admitted technical debt. In Proceedings of the 13th International Conference on Mining Software Repositories (MSR ’16). Association for Computing Machinery, New York, NY, USA, 14–15 May 2016; pp. 315–326. [Google Scholar] [CrossRef]
- Zampetti, F.; Serebrenik, A.; Di Penta, M. Automatically learning patterns for self-admitted technical debt removal. In Proceedings of the 27th IEEE Inter-National Conference on Software Analysis, Evolution and Reengineering, SANER 2020, London, ON, Canada, 18–21 February 2020; pp. 355–366. [Google Scholar]
- Sierra, G.; Tahmid, A.; Shihab, E.; Tsantalis, N. Is Self-Admitted Technical Debt a Good Indicator of Architectural Divergences? In Proceedings of the 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER), Hangzhou, China, 24 February 2019; Institute of Electrical and Electronics Engineers (IEEE): Piscataway, NJ, USA; pp. 534–543. [Google Scholar]
- Letouzey, J.-L.; Ilkiewicz, M. Managing Technical Debt with the SQALE Method. IEEE Softw. 2012, 29, 44–51. [Google Scholar] [CrossRef]
- Aniche, M. Java Code Metrics Calculator (CK). Available online: https://github.com/mauricioaniche/ck. (accessed on 9 July 2020).
- Ferreira, K.; Bigonha, M.A.; Bigonha, R.S.; Mendes, L.F.; Almeida, H.C. Identifying thresholds for object-oriented software metrics. J. Syst. Softw. 2012, 85, 244–257. [Google Scholar] [CrossRef]
Metric | Description |
---|---|
CBO | Coupling between objects: a total of the number of classes that a class referenced plus the number of classes that referenced the class. If a class appeared in both the referenced and the referred classes, it was only counted once. |
DIT | The Depth of Inheritance Tree (DIT) measures inheritance levels from the hierarchy of objects above, so it is the maximum length of a path from a class to a root class in a system’s inheritance structure. Measure how many superclasses can affect a class. For a class, its minimum value is 1. |
Number of fields | Counts the number of fields. Specific numbers for the total number of fields, static, public, private, protected, default, final, and synchronized fields. |
NOSI | Number of static invocations: Counts the number of invocations to static methods. It can only count the ones that can be resolved by the Java Development Tools. |
RFC | Response for a class: Shows the interaction of the class’s methods with other methods, thus the total number of methods that can potentially be executed in response to a message received from an object of a class. |
WMC | Weight method class or McCabe’s complexity. It counts the number of branch instructions in a class. |
LOC | Lines of code: It counts the lines of code, ignoring empty lines. The number of lines here might be a bit different from the original file, as the JDT’s internal representation of the source code is used to calculate it. |
LCOM | Lack of cohesion of methods: measures the correlation within a class between local methods and instance variables. If there is a high cohesion, it means that there is a good division; on the contrary, the lack of cohesion or low cohesion follows an increase in complexity. In this case, the solution is represented by the subdivision of this class into several subclasses. |
Public Fields | Counts the total number of public fields defined in a class. Publics fields refer to an object that is directly accessible and edited by other objects. Therefore, its use can cause a strong coupling between the classes within a software system, reducing the modularity of the program. |
Public Methods | Find the total number of public methods defined in a class. This metric can be considered as an indicator of how large a class is, so it represents the number of features that the class provides. |
System Projects | Branches | Commits | SATD Removal |
---|---|---|---|
Log4j | 7 | 14.296 | 37 |
Gerrit | 15 | 318.362 | 61 |
Hadoop | 274 | 2.721.039 | 154 |
Tomcat | 4 | 22.215 | 302 |
# of Files | ||||
---|---|---|---|---|
Delta | Log4j | Gerrit | Hadoop | Tomcat |
File not found | 29 | 32 | 142 | 235 |
Unchanged | 4 | 17 | 20 | 87 |
Increased | 10 | 9 | 24 | 54 |
Decreased | 20 | 13 | 19 | 100 |
Number of Files | |||||
---|---|---|---|---|---|
Delta | Log4j | Gerrit | Hadoop | Tomcat | Delta |
File not found | 29 | 32 | 142 | 235 | File not found |
Unchanged | 27 | 34 | 54 | 222 | Unchanged |
Increased | 5 | 3 | 5 | 8 | Increased |
# of Files | ||||
---|---|---|---|---|
Delta | Log4j | Gerrit | Hadoop | Tomcat |
Preserved trend in consecutive commit | 16 | 11 | 21 | 185 |
Not preserved trend in consecutive commit | 4 | 2 | 3 | 7 |
Number of Files | ||||
---|---|---|---|---|
Change Type | Log4j | Gerrit | Hadoop | Tomcat |
Class Removal | 28 | 14 | 54 | 227 |
Method Removal | 1 | 14 | 16 | 1 |
Method Changed | 0 | 3 | 62 | 6 |
Method Unchanged | 0 | 1 | 10 | 1 |
Project | #Files TD Improved & Metrics Improved | #Files TD Improved but Metrics Got Worse | #Files Both TD and Metrics Got Worse | #Files TD Got Worse but Metrics Improved | #Files NA |
---|---|---|---|---|---|
Log4j | 13 | 6 | 12 | 1 | 36 |
Gerrit | 7 | 6 | 10 | 10 | 45 |
Hadoop | 12 | 2 | 13 | 11 | 88 |
Tomcat | 38 | 15 | 11 | 12 | 135 |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Aversano, L.; Iammarino, M.; Carapella, M.; Vecchio, A.D.; Nardi, L. On the Relationship between Self-Admitted Technical Debt Removals and Technical Debt Measures. Algorithms 2020, 13, 168. https://doi.org/10.3390/a13070168
Aversano L, Iammarino M, Carapella M, Vecchio AD, Nardi L. On the Relationship between Self-Admitted Technical Debt Removals and Technical Debt Measures. Algorithms. 2020; 13(7):168. https://doi.org/10.3390/a13070168
Chicago/Turabian StyleAversano, Lerina, Martina Iammarino, Mimmo Carapella, Andrea Del Vecchio, and Laura Nardi. 2020. "On the Relationship between Self-Admitted Technical Debt Removals and Technical Debt Measures" Algorithms 13, no. 7: 168. https://doi.org/10.3390/a13070168
APA StyleAversano, L., Iammarino, M., Carapella, M., Vecchio, A. D., & Nardi, L. (2020). On the Relationship between Self-Admitted Technical Debt Removals and Technical Debt Measures. Algorithms, 13(7), 168. https://doi.org/10.3390/a13070168