How does Technical Debt Evolve within Pull Requests? An Empirical Study with Apache Projects - Calixto, Felipe E. de O.; Araújo, Eliane C.; Alves, Everton L. G. (Anais do Simpósio Brasileiro de Engenharia de Software (SBES), 2024)
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.