ChatPaper.aiChatPaper

通过丰富数据集来提高对Java源代码中技术债务的检测

Improving the detection of technical debt in Java source code with an enriched dataset

November 8, 2024
作者: Nam Le Hai, Anh M. T. Bui, Phuong T. Nguyen, Davide Di Ruscio, Rick Kazman
cs.AI

摘要

技术债务(TD)是一个术语,用来描述当开发人员选择快速简便的解决方案而不是更有效、设计更完善但耗时的方法时,出现的额外工作和成本。自我承认的技术债务(SATDs)是一种特定类型的技术债务,开发人员有意记录和承认,通常通过文本注释。虽然这些自我承认的注释是识别技术债务的有用工具,但大多数现有方法侧重于捕获与各类TD相关的关键标记,忽视了源代码本身蕴含的丰富信息。最近的研究集中在通过分析源代码中嵌入的注释来检测SATDs,对于包含在源代码中的技术债务却鲜有研究。为填补这一空白,本研究通过分析来自Stack语料库中974个Java项目的注释及其相关源代码,策划了首个由代码注释识别的TD数据集,同时附带其相关源代码。通过实证评估,我们发现所得数据集的注释有助于提升最先进的SATD检测模型的预测性能。更重要的是,包括分类的源代码显著提高了预测各类技术债务的准确性。在这方面,我们的工作具有双重意义:(i)我们相信我们的数据集将推动该领域未来的研究,激发与技术债务识别相关的各种研究问题;(ii)所提出的分类器可以作为其他利用策划数据集进行TD检测研究的基准。
English
Technical debt (TD) is a term used to describe the additional work and costs that emerge when developers have opted for a quick and easy solution to a problem, rather than a more effective and well-designed, but time-consuming approach. Self-Admitted Technical Debts (SATDs) are a specific type of technical debts that developers intentionally document and acknowledge, typically via textual comments. While these self-admitted comments are a useful tool for identifying technical debts, most of the existing approaches focus on capturing crucial tokens associated with various categories of TD, neglecting the rich information embedded within the source code itself. Recent research has focused on detecting SATDs by analyzing comments embedded in source code, and there has been little work dealing with technical debts contained in the source code. To fill such a gap, in this study, through the analysis of comments and their associated source code from 974 Java projects hosted in the Stack corpus, we curated the first ever dataset of TD identified by code comments, coupled with its associated source code. Through an empirical evaluation, we found out that the comments of the resulting dataset help enhance the prediction performance of state-of-the-art SATD detection models. More importantly, including the classified source code significantly improves the accuracy in predicting various types of technical debt. In this respect, our work is two-fold: (i) We believe that our dataset will catalyze future work in the domain, inspiring various research issues related to the recognition of technical debt; (ii) The proposed classifiers may serve as baselines for other studies on the detection of TD by means of the curated dataset.

Summary

AI-Generated Summary

PDF23November 14, 2024