  Technical Debt is a common issue that arises when short-term gains are
prioritized over long-term costs, leading to a degradation in the quality of
the code. Self-Admitted Technical Debt (SATD) is a specific type of Technical
Debt that involves documenting code to remind developers of its debt. Previous
research has explored various aspects of SATD, including detection methods,
distribution, and its impact on software quality. To better understand SATD,
one comprehension technique is to examine its co-occurrence with other
activities, such as refactoring and bug fixing. This study investigates the
relationship between removing and adding SATD and activities such as
refactoring, bug fixing, adding new features, and testing. To do so, we
analyzed 77 open-source Java projects using TODO/FIXME/XXX removal or addition
in inline comments as indicators of SATD. We examined the co-occurrence of SATD
with each activity in each project through chi-square and odds ratio
evaluations. Our results show that SATD removal occurs simultaneously with
refactoring in 95% of projects, while its addition occurs in 89% of projects.
Furthermore, we found that three types of refactoring - "move class", "remove
method", and "move attribute" - occur more frequently in the presence of SATD.
However, their distribution is similar in projects with and without SATD.
