分析22万条技术债务注释,发现代码变更时的不确定性是其主要来源。
Hidden in Plain Sight: Where Developers Confess Self-Admitted Technical Debt
- 通过分析9000个Java项目注释,定位技术债务发生位置
- 超22.5万条注释与临近代码段关联,集中在定义、条件和异常处
- 揭示技术债务是开发者有意识的警示,非单纯疏忽
背景:识别自承认技术债务(SATD)对主动维护至关重要。以往研究多关注SATD的检测与优先级排序,较少关注受其影响的源代码。本文旨在将SATD注释与其周围的代码结构关联。方法:利用包含超过9000个Java开源项目代码注释的PENTACET数据集,定量分析SATD最常出现的位置及受影响的代码构造。结果与结论:大规模研究将225,000余条SATD注释与周围代码关联,表明其主要出现在定义、条件语句和异常处理附近的内联代码中,这些位置常伴随开发者的不确定性与权衡,说明技术债务是变更过程中的有意警示,而非简单忽视。
原文摘要 · Abstract (English)
Context. Detecting Self-Admitted Technical Debt (SATD) is crucial for proactive software maintenance. Previous research has primarily targeted detecting and prioritizing SATD, with little focus on the source code afflicted with SATD. Our goal in this work is to connect the SATD comments with source code constructs that surround them. Method. We leverage the extensive SATD dataset PENTACET, containing code comments from over 9000 Java Open Source Software (OSS) repositories. We quantitatively infer where SATD most commonly occurs and which code constructs/statements it most frequently affects. Results and Conclusions. Our large-scale study links over 225,000 SATD comments to their surrounding code, showing that SATD mainly arises in inline code near definitions, conditionals, and exception handling, where developers face uncertainty and trade-offs, revealing it as an intentional signal of awareness during change rather than mere neglect.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。