arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2103.13165cs.SE
收藏

数据平衡改善了自我承认的技术债务检测

Data Balancing Improves Self-Admitted Technical Debt Detection

Murali Sridharan, Mika Mantyla, Leevi Rantala, Maelick Claes

摘要:

技术债和非技术债源代码注释之间存在高度不平衡。这种不平衡影响了自承认技术债务(SATD)检测性能,现有文献缺乏经验证据的平衡技术的选择。在这项工作中,我们评估了多种平衡技术的影响,包括数据级,分类器级和混合,SATD检测在项目内和跨项目设置。我们的研究结果表明,数据级平衡技术SMOTE或分类器级Ensemble方法随机森林或XGBoost是合理的选择,这取决于目标是最大化精度,召回率,F1或AUC-ROC。我们将我们的最佳性能模型与之前的SATD检测基准(成本敏感卷积神经网络)进行了比较。有趣的是,具有SMOTE采样的性能最好的XGBoost将项目内F1分数提高了10%,但在跨项目设置中却下降了9%。这支持深度学习在跨项目SATD检测中的更高泛化能力,但在单个项目中工作时,经典的机器学习算法可以提供更好的性能。我们还评估和量化重复的源代码注释在SATD检测性能的影响。最后,我们采用SHAP和讨论解释的SATD功能。我们已经包括了复制包,并在这项研究中与平衡技术分享了一个基于网络的SATD预测工具。

英文摘要:

A high imbalance exists between technical debt and non-technical debt source code comments. Such imbalance affects Self-Admitted Technical Debt (SATD) detection performance, and existing literature lacks empirical evidence on the choice of balancing technique. In this work, we evaluate the impact of multiple balancing techniques, including Data level, Classifier level, and Hybrid, for SATD detection in Within-Project and Cross-Project setup. Our results show that the Data level balancing technique SMOTE or Classifier level Ensemble approaches Random Forest or XGBoost are reasonable choices depending on whether the goal is to maximize Precision, Recall, F1, or AUC-ROC. We compared our best-performing model with the previous SATD detection benchmark (cost-sensitive Convolution Neural Network). Interestingly the top-performing XGBoost with SMOTE sampling improved the Within-project F1 score by 10% but fell short in Cross-Project set up by 9%. This supports the higher generalization capability of deep learning in Cross-Project SATD detection, yet while working within individual projects, classical machine learning algorithms can deliver better performance. We also evaluate and quantify the impact of duplicate source code comments in SATD detection performance. Finally, we employ SHAP and discuss the interpreted SATD features. We have included the replication package and shared a web-based SATD prediction tool with the balancing techniques in this study.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑