Code Smell, similar to a bad smell, is a surface indication of something tainted but in terms of software writing practices. This metric is an indication of a deeper problem lies within the code and is associated with an issue which is prominent to experienced software developers with acceptable coding practices. Recent studies have often observed that codes having code smells are often prone to a higher probability of change in the software development cycle. In this paper, we developed code smell prediction models with the help of features extracted from source code to predict eight types of code smell. Our work also presents the application of data sampling techniques to handle class imbalance problem and feature selection techniques to find relevant feature sets. Previous studies had made use of techniques such as Naive - Bayes and Random forest but had not explored deep learning methods to predict code smell. A total of 576 distinct Deep Learning models were trained using the features and datasets mentioned above. The study concluded that the deep learning models which used data from Synthetic Minority Oversampling Technique gave better results in terms of accuracy, AUC with the accuracy of some models improving from 88.47 to 96.84.
翻译:代码的嗅觉类似于一种臭味,它代表着一种被污染的事物的表面,但从软件写作做法的角度来看,它表明代码中存在一个更深的问题,它与一个对有经验的软件开发者具有可接受编码做法的突出问题有关。最近的研究经常发现,代码的嗅觉往往容易在软件开发周期中发生更大的变化。在这份文件中,我们在从源代码提取的特征的帮助下开发了代码的嗅觉预测模型,以预测8种代码的嗅觉。我们的工作还介绍了数据取样技术的应用,以处理阶级不平衡问题和特征选择技术,以找到相关的特征组。以前的研究利用了Naive-Bayes和随机森林等技术,但没有探索过预测代码嗅觉的深度学习方法。共有576个不同的深学习模型利用上述特征和数据集接受了培训。研究的结论是,使用合成少数群体过量抽样技术的数据的深学习模型在准确性方面产生了更好的结果。AUC在一些模型的精确性改进了88.47至96.84。