Is Self-Admitted Technical Debt Tested? An Empirical Study of Coverage, Co-change, and Impact
Suzuka Yoshimoto, Kosei Horikawa, Daniel Feitosa, Yutaro Kashiwa, Hajimu Iida
Abstract
When developers write a TODO or FIXME comment, they are explicitly admitting that the code is suboptimal: a built-in warning that this logic deserves extra scrutiny. Yet it is an open question whether Self-Admitted Technical Debt (SATD) actually receives that scrutiny in the form of software testing. We aim to characterize the relationship between SATD and testing across three dimensions: the extent to which SATD-affected code is covered by existing tests, whether developers synchronize test additions with debt resolution, and whether such testing affects the long-term observability of resulting defects. For that, we conducted an empirical study on eight open-source Java projects, analyzing test coverage of 784 SATD instances identified in the latest releases and performing a longitudinal examination of 5,175 SATD removal events. Our results show that while 60.7% of SATD-affected code is covered by existing test suites, developers rarely synchronize test modifications with debt resolution; manual inspection confirms that only 3.4% of SATD removal commits include new tests specifically targeting the resolved debt (vs. 12.5% that co-add tests in the same commit). Longitudinal analysis further suggests that SATD resolutions exhibit nearly identical localized bug induction rates within short-to-medium-term windows regardless of test modifications. However, over a longer, unrestricted observation window, a slight divergence emerges where the test-added group reaches a higher cumulative defect alignment probability (6.32% vs. 4.37%), a counterintuitive trend potentially driven by the selective testing of inherently complex components. Developers treat SATD repayment as an ordinary code change rather than as a high-risk maintenance activity: most debt removals proceed without targeted verification, despite the developer's own prior flag that the code is suboptimal.
Create a lesson
Related papers
An Empirical Study on the Impact of Change Granularity in Refactoring Detection
Shared title terminologycs.SELei Chen, Shinpei Hayashi
An Empirical Study on the Impact of String Interpolation on Program Readability and Comprehension
Shared title terminologycs.SEDaniel Ogenrwot, John Businge, Andreas Stefik
Do Vibe-Coded Projects Contain Tests? An Empirical Study
Shared title terminologycs.SEAndre Hora, João Eduardo Montandon, Fabio Petrillo
From Code Changes to Slowdowns: An Empirical Study of Performance Regressions in Open-Source Database Kernels
Shared title terminologycs.SEXueli Sun, Shuangxiang Kan
Spec-Test Coverage Gap: Detecting Overspecified Tests in SWE-Bench-Style Benchmarks
Shared title terminologycs.SEAvi Aggarwal, Yiran Hu
Towards the Generalizability of Leveraging ChatGPT in APR via Self-enhancing: An Empirical Study
Shared title terminologycs.SEQingyuan Li, Chuanyi Li, Yaopeng Yang et al.