首页|基于机器学习的无低内存解析器异味检测方法

基于机器学习的无低内存解析器异味检测方法

扫码查看
代码异味是指影响代码维护过程并降低软件质量的糟糕代码设计或实现.因此,代码异味检测在软件重构中非常重要.文章使用五种传统机器学习模型,对Android特有代码异味进行检测.为了获取机器学习模型所需的大量样本数据,文章构建了一个Java代码异味数据集,该数据集包含14,000个样本,并从源代码中提取46个特征.此外,还使用开源Android应用程序进行实验验证.结果表明,随机森林是检测无低内存解析器异味中性能最好的模型,实现了最高的F1值0.928.
Machine learning-based code smell detection method for No Low Memory Resolver
Code smell refers to poor code design or implementation that affects the code mainte-nance process and lowers software quality.Therefore,code smell detection is crucial in software refactoring.In this paper,we utilize five traditional machine learning models to detect Android-specific code smells.To acquire the large dataset required for machine learning models,we con-struct a Java code smell dataset comprising 14,000 samples,with 72 features extracted from the source code.Additionally,we conduct experimental validation using open-source Android appli-cations.The results show that Random Forest is the best-performing model for detecting code smells in No Low Memory Resolver,achieving the highest F1 score of 0.928.

Android-specific code smellsmachine learningsmell detection

邢代鑫、边奕心

展开 >

哈尔滨师范大学计算机科学与信息工程学院,黑龙江哈尔滨 150025

Android代码异味 机器学习 异味检测

2024

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

长江信息通信

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