首页|机器学习在Android代码异味检测中的应用

机器学习在Android代码异味检测中的应用

扫码查看
由于现有代码异味检测方法存在多方面的限制,无法准确高效的检测An-droid 代码异味共存,提出基于机器学习的Android代码异味共存检测方法.首先提出并实现工具ASSD得到分离好的正负样本集,提取源代码中的文本信息作为机器学习分类器的输入,从而实现机器学习检测Android代码异味共存.设计对比实验,实验结果表明机器学习可以检测Android代码异味共存,并且检测效果较现有基于静态程序分析的检测方法有较大提升,其中随机森林模型效果最好,其F1值提升了22%.
The Application of Machine Learning in Android Code Smell Detection
Due to the limitations of existing code smell detection methods,it is difficult to accu-rately and efficiently detect the coexistence of code smells in Android code.In this regard,a ma-chine learning-based approach for detecting the coexistence of code smells in Android code is proposed.Firstly,a tool called ASSD is proposed and implemented to obtain well-separated posi-tive and negative sample sets.The textual information extracted from the source code is used as the input for the machine learning classifier,thus achieving the detection of code smell coexis-tence using machine learning.Comparative experiments are designed,and the results show that machine learning can effectively detect the coexistence of code smells in Android code,with sig-nificantly improved detection performance compared to existing static program analysis-based methods.Among them,the random forest model performs the best,with an F1 score improve-ment of 22%.

Machine Learningco-occurrences of code smellsAndroid code smells

孙梦琪、边奕心

展开 >

哈尔滨师范大学,黑龙江哈尔滨 150025

机器学习 代码异味共存 An-droid代码异味

2024

长江信息通信
湖北通信服务公司

长江信息通信

影响因子:0.338
ISSN:2096-9759
年,卷(期):2024.37(2)
  • 14