Technical Debt occurs when development teams favour short-term operability over long-term stability. Since this places software maintainability at risk, technical debt requires early attention to avoid paying for accumulated interest. Most of the existing work focuses on detecting technical debt using code comments, known as Self-Admitted Technical Debt (SATD). However, there are many cases where technical debt instances are not explicitly acknowledged but deeply hidden in the code. In this paper, we propose a framework that caters for the absence of SATD comments in code. Our Self-Admitted Technical Debt Identification and Description (SATDID) framework determines if technical debt should be self-admitted for an input code fragment. If that is the case, SATDID will automatically generate the appropriate descriptive SATD comment that can be attached with the code. While our approach is applicable in principle to any type of code fragments, we focus in this study on technical debt hidden in conditional statements, one of the most TD-carrying parts of code. We explore and evaluate different implementations of SATDID. The evaluation results demonstrate the applicability and effectiveness of our framework over multiple benchmarks. Comparing with the results from the benchmarks, our approach provides at least 21.35%, 59.36%, 31.78%, and 583.33% improvements in terms of Precision, Recall, F-1, and Bleu-4 scores, respectively. In addition, we conduct human evaluation to the SATD comments generated by SATDID. In 1-5 and 0-5 scales for Acceptability and Understandability, the total means achieved by our approach are 3.128 and 3.172, respectively.
翻译:技术债务发生时,开发团队偏好短期可操作性,而不是长期稳定。由于这使得软件的可操作性处于危险之中,技术债务需要及早关注,以避免支付累积利息。大部分现有工作的重点是利用代码评论(称为自发技术债务(SATD))来探测技术债务。然而,在许多情况下,技术债务情况没有被明确承认,而是在代码中隐藏得更深。在本文件中,我们提出了一个框架,以满足在代码中没有SATD评论的需要。我们自发的技术债务识别和描述框架(SATDID)决定了技术债务是否应该自动接受投入代码的碎片。如果是这样的话,SATDID将自动产生适当的描述性SATD评论,这些评论可以附在代码中。虽然我们的方法原则上适用于任何类型的代码碎片,但我们在有条件声明中的隐藏了技术债务,这是代码中最带有TD-载力的部分之一。我们探索和评价了SATDID的不同实施情况。 在评估结果中表明,我们框架的适用性和有效性高于总基准。 与BDETD-5-5 标准分别参照了我们的行为标准的结果。