How does Technical Debt Evolve within Pull Requests? An Empirical Study with Apache Projects

  • Felipe E. de O. Calixto UFCG
  • Eliane C. Araújo UFCG
  • Everton L. G. Alves UFCG

Resumo


Technical Debt (TD) refers to the cost to rectify the quality issues affecting a software system. A pull request (PR) represents a discrete unit of work that must adhere to particular quality standards to be integrated into the main codebase. They can serve as a means to gauge how developers address TD and how codebase quality may decay over time. In this work, we present an empirical study on 12 Apache Java repositories, analyzing 2,035 PRs to examine how TD evolves within them. Using the SonarQube tool, we evaluated (i) how TD changes within PRs and (ii) which types of TD issue are most frequently overlooked and resolved. Our results suggest that TD issues are prevalent in PRs, with a tendency to follow a ratio of 1:2:1 (reduced: unchanged: increased). Furthermore, across all issues, we found that the most frequently overlooked are related to code duplication and cognitive complexity, while the most resolved ones include code duplication and obsolete code. These insights can help practitioners become more aware and might inspire the creation of new tools that make managing TD during PRs easier.

Palavras-chave: technical debt, pull request, software evolution, mining software repositories, empirical study

Referências

Areti Ampatzoglou, Nikolaos Mittas, Angeliki-Agathi Tsintzira, Apostolos Ampatzoglou, Elvira-Maria Arvanitou, Alexander Chatzigeorgiou, Paris Avgeriou, and Lefteris Angelis. 2020. Exploring the Relation between Technical Debt Principal and Interest: An Empirical Approach. Information and Software Technology 128 (2020), 106391. DOI: 10.1016/j.infsof.2020.106391

Nicolas Anquetil, Julien Delplanque, Stéphane Ducasse, Oleksandr Zaitsev, Christopher Fuhrman, and Yann-Gael Guéhéneuc. 2022. What do developers consider magic literals? A smalltalk perspective. Information and Software Technology 149 (Sept. 2022). DOI: 10.1016/j.infsof.2022.106942

Paris C. Avgeriou, Davide Taibi, Apostolos Ampatzoglou, Francesca Arcelli Fontana, Terese Besker, Alexander Chatzigeorgiou, Valentina Lenarduzzi, Antonio Martini, Athanasia Moschou, Ilaria Pigazzini, Nyyti Saarimaki, Darius Daniel Sas, Saulo Soares de Toledo, and Angeliki Agathi Tsintzira. 2021. An Overview and Comparison of Technical Debt Measurement Tools. IEEE Software 38, 3 (2021), 61–71. DOI: 10.1109/MS.2020.3024958

J. Bansiya and C.G. Davis. 2002. A hierarchical model for object-oriented design quality assessment. IEEE Transactions on Software Engineering 28, 1 (2002), 4–17. DOI: 10.1109/32.979986

Flávia Coelho, Nikolaos Tsantalis, Tiago Massoni, and Everton LG Alves. 2021. An empirical study on refactoring-inducing pull requests. In Proceedings of the 15th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM). 1–12.

Thierry Coq and Jean-Pierre Rosen. 2011. The SQALE Quality and Analysis Models for Assessing the Quality of Ada Source Code. In Reliable Software Technologies - Ada-Europe 2011, Alexander Romanovsky and Tullio Vardanega (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 61–74.

Ward Cunningham. 1992. The WyCash Portfolio Management System. In Addendum to the Proceedings on Object-Oriented Programming Systems, Languages, and Applications (Addendum) (Vancouver, British Columbia, Canada) (OOPSLA ’92). Association for Computing Machinery, New York, NY, USA, 29–30. DOI: 10.1145/157709.157715

Bill Curtis, Jay Sappidi, and Alexandra Szynkarski. 2012. Estimating the Principal of an Application’s Technical Debt. IEEE Software 29, 6 (2012), 34–42. DOI: 10.1109/MS.2012.156

Carlos Eduardo C. Dantas, Adriano M. Rocha, and Marcelo A. Maia. 2023. How do Developers Improve Code Readability? An Empirical Study of Pull Requests. In 2023 IEEE International Conference on Software Maintenance and Evolution (ICSME). 110–122. DOI: 10.1109/ICSME58846.2023.00022

Felipe E. de O. Calixto, Eliane C. Araújo, and Everton L. G. Alves. 2024. [Replication Kit] How does Technical Debt Evolve within Pull Requests? An Empirical Study with Apache Projects. DOI: 10.5281/zenodo.12761591

G. Digkas, A. Chatzigeorgiou, A. Ampatzoglou, and P. Avgeriou. 2022. Can Clean New Code Reduce Technical Debt Density? IEEE Transactions on Software Engineering 48, 05 (may 2022), 1705–1721. DOI: 10.1109/TSE.2020.3032557

Georgios Digkas, Mircea Lungu, Alexander Chatzigeorgiou, and Paris Avgeriou. 2017. The Evolution of Technical Debt in the Apache Ecosystem. In Software Architecture, Antónia Lopes and Rogério de Lemos (Eds.). Springer International Publishing, Cham, 51–66.

Robert J. Eisenberg. 2012. A threshold based approach to technical debt. 37, 2 (apr 2012), 1–6. DOI: 10.1145/2108144.2108151

Giammaria Giordano, Giusy Annunziata, Andrea De Lucia, and Fabio Palomba. 2023. Understanding Developer Practices and Code Smells Diffusion in AIEnabled Software: A Preliminary Study. In Joint Proceedings of the 32nd International Workshop on Software Measurement (IWSM) and the 17th International Conference on Software Process and Product Measurement (MENSURA), Rome, Italy, September 14-15, 2023 (CEUR Workshop Proceedings, Vol. 3543), Gabriele De Vito, Filomena Ferrucci, and Carmine Gravino (Eds.). CEUR-WS.org. [link]

Isaac Griffith and Clemente Izurieta. 2014. Design pattern decay: the case for class grime (ESEM ’14). Association for Computing Machinery, New York, NY, USA, Article 39, 4 pages. DOI: 10.1145/2652524.2652570

Makrina Viola Kosti, Apostolos Ampatzoglou, Alexander Chatzigeorgiou, Georgios Pallas, Ioannis Stamelos, and Lefteris Angelis. 2017. Technical Debt Principal Assessment Through Structural Metrics. In 2017 43rd Euromicro Conference on Software Engineering and Advanced Applications (SEAA). 329–333. DOI: 10.1109/SEAA.2017.59

Philippe Kruchten, Robert Nord, and Ipek Ozkaya. 2019. Managing Technical Debt: Reducing Friction in Software Development (1st ed.). Addison-Wesley Professional.

Guilherme Lacerda, Fabio Petrillo, Marcelo Pimenta, and Yann Gaël Guéhéneuc. 2020. Code smells and refactoring: A tertiary systematic review of challenges and observations. Journal of Systems and Software 167 (2020), 110610. DOI: 10.1016/j.jss.2020.110610

Luigi Lavazza, Davide Tosi, and Sandro Morasca. 2020. An Empirical Study on the Persistence of SpotBugs Issues in Open-Source Software Evolution. In Quality of Information and Communications Technology, Martin Shepperd, Fernando Brito e Abreu, Alberto Rodrigues da Silva, and Ricardo Pérez-Castillo (Eds.). Springer International Publishing, Cham, 144–151.

Valentina Lenarduzzi, Vili Nikkola, Nyyti Saarimäki, and Davide Taibi. 2021. Does code quality affect pull request acceptance? An empirical study. Journal of Systems and Software 171 (2021), 110806. DOI: 10.1016/j.jss.2020.110806

Valentina Lenarduzzi, Nyyti Saarimäki, and Davide Taibi. 2019. The Technical Debt Dataset. CoRR abs/1908.00827 (2019). arXiv:1908.00827 [link]

Valentina Lenarduzzi, Nyyti Saarimäki, and Davide Taibi. 2020. Some SonarQube issues have a significant but small effect on faults and changes. A large-scale empirical study. Journal of Systems and Software 170 (2020), 110750. DOI: 10.1016/j.jss.2020.110750

Jean-Louis Letouzey. 2012. The SQALE method for evaluating Technical Debt. In 2012 Third International Workshop on Managing Technical Debt (MTD). 31–36. DOI: 10.1109/MTD.2012.6225997

Zengyang Li, Paris Avgeriou, and Peng Liang. 2015. A systematic mapping study on technical debt and its management. Journal of Systems and Software 101 (2015), 193–220. DOI: 10.1016/j.jss.2014.12.027

Kui Liu, Dongsun Kim, Tegawendé F. Bissyandé, Shin Yoo, and Yves Le Traon. 2021. Mining Fix Patterns for FindBugs Violations. IEEE Transactions on Software Engineering 47, 1 (2021), 165–188. DOI: 10.1109/TSE.2018.2884955

Diego Marcilio, Rodrigo Bonifácio, Eduardo Monteiro, Edna Canedo, Welder Luz, and Gustavo Pinto. 2019. Are Static Analysis Violations Really Fixed? A Closer Look at Realistic Usage of SonarQube. In 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC). 209–219. DOI: 10.1109/ICPC.2019.00040

Arthur-Jozsef Molnar and Simona Motogna. 2020. Long-Term Evaluation of Technical Debt in Open-Source Software (ESEM ’20). Association for Computing Machinery, New York, NY, USA, Article 13, 9 pages. DOI: 10.1145/3382494.3410673

J. Yates Monteith and John D. McGregor. 2013. Exploring software supply chains from a technical debt perspective. In 2013 4th InternationalWorkshop on Managing Technical Debt (MTD). 32–38. DOI: 10.1109/MTD.2013.6608676

Nikolaos Nikolaidis, Apostolos Ampatzoglou, Alexander Chatzigeorgiou, Nikolaos Mittas, Evdokimos Konstantinidis, and Panagiotis Bamidis. 2023. Exploring the Effect of Various Maintenance Activities on the Accumulation of TD Principal. In 2023 ACM/IEEE International Conference on Technical Debt (TechDebt). 102–111. DOI: 10.1109/TechDebt59074.2023.00018

Ariadi Nugroho, Joost Visser, and Tobias Kuipers. 2011. An empirical model of technical debt and interest (MTD ’11). Association for Computing Machinery, New York, NY, USA, 1–8. DOI: 10.1145/1985362.1985364

Sebastiano Panichella, Venera Arnaoudova, Massimiliano Di Penta, and Giuliano Antoniol. 2015. Would static analysis tools help developers with code reviews?. In 2015 IEEE 22nd International Conference on Software Analysis, Evolution, and Reengineering (SANER). 161–170. DOI: 10.1109/SANER.2015.7081826

Nyyti Saarimaki, Maria Teresa Baldassarre, Valentina Lenarduzzi, and Simone Romano. 2019. On the Accuracy of SonarQube Technical Debt Remediation Time. In 2019 45th Euromicro Conference on Software Engineering and Advanced Applications (SEAA). 317–324. DOI: 10.1109/SEAA.2019.00055

SonarQube. [n. d.]. Metric definitions. [link]. Accessed: 2024-03-30.

SonarSouce. 2022. SonarSource Posts Record Growth with its Clean Code Solution. [link]. Accessed: 2023-05-04.

SonarSource. [n. d.]. Adding Code Rules. [link]. Accessed: 2024-03-31.

Jie Tan, Daniel Feitosa, Paris Avgeriou, and Mircea Lungu. 2021. Evolution of technical debt remediation in Python: A case study on the Apache Software Ecosystem. Journal of Software: Evolution and Process 33, 4 (2021), e2319. DOI: 10.1002/smr.2319 arXiv: [link].

Alexander Trautsch, Steffen Herbold, and Jens Grabowski. 2023. Are automated static analysis tools worth it? An investigation into relative warning density and external software quality on the example of Apache open source projects. Empirical Software Engineering 28, 3 (17 Apr 2023), 66. DOI: 10.1007/s10664-023-10301-2

Carmine Vassallo, Sebastiano Panichella, Fabio Palomba, Sebastian Proksch, Andy Zaidman, and Harald C. Gall. 2018. Context is king: The developer perspective on the usage of static analysis tools. In 2018 IEEE 25th International Conference on Software Analysis, Evolution and Reengineering (SANER). 38–49. DOI: 10.1109/SANER.2018.8330195.

Antonio Vetrò. 2012. Using automatic static analysis to identify technical debt. In 2012 34th International Conference on Software Engineering (ICSE). 1613–1615. DOI: 10.1109/ICSE.2012.6227226

Stefan Wagner, Klaus Lochmann, Lars Heinemann, Michael Kläs, Adam Trendowicz, Reinhold Plösch, Andreas Seidl, Andreas Goeb, and Jonathan Streit. 2012. The quamoco product quality modelling and assessment approach. In Proceedings of the 34th International Conference on Software Engineering (Zurich, Switzerland) (ICSE ’12). IEEE Press, 1133–1142.

Aiko Yamashita and Steve Counsell. 2013. Code smells as system-level indicators of maintainability: An empirical study. Journal of Systems and Software 86, 10 (2013), 2639–2653. DOI: 10.1016/j.jss.2013.05.007

Ping Yu, Yijian Wu, Jiahan Peng, Jian Zhang, and Peicheng Xie. 2023. Towards Understanding Fixes of SonarQube Static Analysis Violations: A Large-Scale Empirical Study. In 2023 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER). 569–580. DOI: 10.1109/SANER56733.2023.00059

Ehsan Zabardast, Kwabena Ebo Bennin, and Javier Gonzalez-Huerta. 2022. Further investigation of the survivability of code technical debt items. J. Softw. Evol. Process 34, 2 (feb 2022), 16 pages. DOI: 10.1002/smr.2425

Nico Zazworka, Antonio Vetro’, Clemente Izurieta, Sunny Wong, Yuanfang Cai, Carolyn Seaman, and Forrest Shull. 2014. Comparing four approaches for technical debt identification. Software Quality Journal 22, 3 (01 Sep 2014), 403–426. DOI: 10.1007/s11219-013-9200-8

Weiqin Zou, Jifeng Xuan, Xiaoyuan Xie, Zhenyu Chen, and Baowen Xu. 2019. How does code style inconsistency affect pull request integration? An exploratory study on 117 GitHub projects. Empirical Software Engineering 24, 6 (01 Dec 2019), 3871–3903. DOI: 10.1007/s10664-019-09720-x

Yusuf Özçevik. 2024. Data-oriented QMOOD model for quality assessment of multi-client software applications. Engineering Science and Technology, an International Journal 51 (2024), 101660. DOI: 10.1016/j.jestch.2024.101660
Publicado
30/09/2024
CALIXTO, Felipe E. de O.; ARAÚJO, Eliane C.; ALVES, Everton L. G.. How does Technical Debt Evolve within Pull Requests? An Empirical Study with Apache Projects. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SOFTWARE (SBES), 38. , 2024, Curitiba/PR. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2024 . p. 212-223. DOI: https://doi.org/10.5753/sbes.2024.3368.