Predicting Code Smells and Analysis of Predictions: Using Machine Learning Techniques and Software M

来源 :计算机科学技术学报(英文版) | 被引量 : 0次 | 上传用户:jimmy7346
下载到本地 , 更方便阅读
声明 : 本文档内容版权归属内容提供方 , 如果您对本文有版权争议 , 可与客服联系进行内容授权或下架
论文部分内容阅读
Code smell detection is essential to improve software quality, enhancing software maintainability, and decrease the risk of faults and failures in the software system. In this paper, we proposed a code smell prediction approach based on machine learning techniques and software metrics. The local interpretable model-agnostic explanations (LIME) algorithm was further used to explain the machine learning model's predictions and interpretability. The datasets obtained from Fontana et al. were reformed and used to build binary-label and multi-label datasets. The results of 10-fold cross-validation show that the performance of tree-based algorithms (mainly Random Forest) is higher compared with kernel-based and network-based algorithms. The genetic algorithm based feature selection methods enhance the accuracy of these machine learning algorithms by selecting the most relevant features in each dataset. Moreover, the parameter optimization techniques based on the grid search algorithm significantly enhance the accuracy of all these algorithms. Finally, machine learning techniques have high potential in predicting the code smells, which contribute to detect these smells and enhance the software's quality.
其他文献
根据《中国制造 2025》的重要部署,工业和信息化部坚持创新驱动发展战略,积极推动国家制造业创新中心建设,致力于完善制造业创新体系,解决制约行业发展的共性关键技术,打通科
期刊
Static buffer overflow detection techniques tend to report too many false positives fundamentally due to the lack of software execution information. It is very