Towards automating self-admitted technical debt repayment

Publication Name

Information and Software Technology

Abstract

Context: Self-Admitted Technical Debt (SATD) refers to the technical debt in software that is explicitly flagged, typically by the source code comment. The SATD literature has mainly focused on comprehending, describing, detecting, and recommending SATD. Most recently, there have been efforts to study the state of the code before and after removing the SATD comment. While these efforts serve as a preliminary step towards the repayment of SATD, actual attempts towards automating SATD repayment, to the best of our knowledge, are yet to be made. Objective: In this paper, we propose the first attempt towards direct, complete, and automated SATD repayment by providing two main contributions. The first contribution is an empirical study of how the SATD comment relates to repaying the debt. The second contribution is DLRepay, our deep learning approach for SATD repayment. Method: We developed a SATD Repayment dataset, namely SATD-R, and established a taxonomy based on the relationship and helpfulness of the SATD comment to/in repaying the debt. In addition, we developed DLRepay which takes as an input a pair of SATD comment and code, and generates a new, TD-free code. Results: We found that there are five different categories in which the SATD comment relates to Technical Debt repayment. We also identify when the SATD comment has a positive and logical connection to repaying the debt, both generally and in every category. Furthermore, we illustrate the results of our SATD repayment approach across two datasets, three input types, two output types, and two neural networks. Conclusion: The resulting taxonomy of our empirical study paves the way for research to tackle further in-depth questions concerning SATD repayment comprehension, identification, and automation. In addition, the various experimental setups we conduct provide multiple insights regarding the applicability of our SATD repayment approach.

Open Access Status

This publication is not available as open access

Volume

167

Article Number

107376

Share

COinS
 

Link to publisher version (DOI)

http://dx.doi.org/10.1016/j.infsof.2023.107376