论文标题
如何改善软件分析的深度学习(具有代码气味检测的案例研究)
How to Improve Deep Learning for Software Analytics (a case study with code smell detection)
论文作者
论文摘要
为了减少技术债务并使代码更可维护,重要的是能够警告程序员有关代码气味。最先进的代码小探测器使用深度学习者,而没有对该技术中的替代方案进行太多探索。 软件分析和深度学习的一种有希望的替代方法是Ghost(来自TSE'21),它依赖于饲养场神经网络的高参数优化和一种新颖的过采样技术来处理班级失衡。 TSE'21的先前研究提出了这一小说“模糊抽样”的限制,因为该方法是根据缺陷预测进行了测试的,但没有别的。像缺陷预测一样,代码气味检测数据集具有类不平衡(激励“模糊采样”)。因此,在这项工作中,我们测试模糊抽样是否对代码气味检测有用。 本文的结果表明,我们可以在模糊过采样的代码气味检测方面比最先进的结果更好。例如,对于“特征嫉妒”,我们能够在所有数据集中实现99+\%AUC,并在8/10个数据集上用于“放错了类”。尽管我们的具体结果是指代码气味检测,但它们确实建议其他类型的分析的其他课程。例如:(a)在尝试复杂的学习者之前尝试更好的预处理(b)在软件分析中将简单的学习者作为基准(c)尝试“模糊抽样”作为这样的基线。
To reduce technical debt and make code more maintainable, it is important to be able to warn programmers about code smells. State-of-the-art code small detectors use deep learners, without much exploration of alternatives within that technology. One promising alternative for software analytics and deep learning is GHOST (from TSE'21) that relies on a combination of hyper-parameter optimization of feedforward neural networks and a novel oversampling technique to deal with class imbalance. The prior study from TSE'21 proposing this novel "fuzzy sampling" was somewhat limited in that the method was tested on defect prediction, but nothing else. Like defect prediction, code smell detection datasets have a class imbalance (which motivated "fuzzy sampling"). Hence, in this work we test if fuzzy sampling is useful for code smell detection. The results of this paper show that we can achieve better than state-of-the-art results on code smell detection with fuzzy oversampling. For example, for "feature envy", we were able to achieve 99+\% AUC across all our datasets, and on 8/10 datasets for "misplaced class". While our specific results refer to code smell detection, they do suggest other lessons for other kinds of analytics. For example: (a) try better preprocessing before trying complex learners (b) include simpler learners as a baseline in software analytics (c) try "fuzzy sampling" as one such baseline.