期刊文献+

基于BP神经网络的代码坏味检测 被引量:3

Detection of Bad Smell in Code Based on BP Neural Network
下载PDF
导出
摘要 程序中若出现代码坏味将严重影响其质量且难以对软件维护提供保障。针对机器学习算法在代码坏味检测中准确度较低以及数据集仅存在单一类型代码坏味的问题,提出一种基于BP神经网络的代码坏味检测方法。考虑软件实际开发过程中会存在不同类型的坏味,对数据类、上帝类、长方法和特征依恋4种代码坏味进行研究并将其合并为方法级别和类级别的2种坏味数据集,根据数据集中的标签信息进行有监督深度学习,进而构建代码坏味的真假阳性检测模型。实验结果表明,相比基于机器学习和基于度量的代码坏味检测方法,该方法的平均准确度提高15.19%,平均F1值提高58.39%。 Bad smells in code seriously affect the quality of software and its maintenance.To address the low accuracy of machine learning algorithms in bad smell detection and the single type of bad smell dataset,this paper proposes a detection method for bad smells in code based on BP Neural Network(BPNN).Considering that there are different types of bad smells in the actual development of software,four types of bad smells,Data class,God class,Long method,and Feature envy,are studied and merged into method-level and class-level code smell datasets.Based on the label information in the dataset,supervised deep learning is implemented to build a true and false positive prediction model for bad smells.The experimental results show that compared with the bad smell detection methods based on machine learning and metric,the proposed method improves the average accuracy by 15.19%and the average F1 value by 58.39%.
作者 王曙燕 张一权 孙家泽 WANG Shuyan;ZHANG Yiquan;SUN Jiaze(School of Computer Science and Technology,Xi’an University of Posts and Telecommunications,Xi’an 710000,China)
出处 《计算机工程》 CAS CSCD 北大核心 2020年第10期216-222,230,共8页 Computer Engineering
基金 陕西省科技厅工业公关项目“基于搜索的程序并行测试数据优化关键技术”(2018GY-014) 西安市科技计划项目“基于群体智能的多目标软件测试优化关键技术研究”(GXYD17.10)。
关键词 代码坏味 软件维护 BP神经网络 深度学习 检测模型 bad smell in code software maintenance BP Neural Network(BPNN) deep learning detection model
  • 相关文献

参考文献5

二级参考文献17

共引文献36

同被引文献14

引证文献3

二级引证文献4

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部