深度学习策略下缓慢循环异味检测方法  被引量:1

Slow Loop Smell Detection Method by Deep Learning Strategy

在线阅读下载全文

作  者:边奕心[1] 李禹齐 张子恒 赵松[1] 尹启天 李文渊 BIAN Yixin;LI Yuqi;ZHANG Ziheng;ZHAO Song;YIN Qitian;LI Wenyuan(College of Computer Science and Information Engineering,Harbin Normal University,Harbin 150025,China)

机构地区:[1]哈尔滨师范大学计算机科学与信息工程学院,哈尔滨150025

出  处:《小型微型计算机系统》2024年第2期490-497,共8页Journal of Chinese Computer Systems

基  金:哈尔滨师范大学博士科研启动基金项目(XKB201801)资助;哈尔滨师范大学计算机科学与信息工程学院科研项目(JKYKYY202004;JKYKYZ202104)资助;哈尔滨师范大学计算机科学与信息工程学院教改项目(JKYJGY202203,JKYJGY202202)资助;哈尔滨师范大学高等教育教学改革研究项目(XJGYFW2022024)资助。

摘  要:缓慢循环是一种Android特有代码异味,对Android应用程序的可维护性产生负面影响.针对传统基于静态程序分析方法误检率较高的问题,本文提出基于深度学习的检测方法.首先,使用代码文本信息作为模型输入的特征集.然后,使用两种深度学习模型进行异味检测.此外,为了快速、准确获得模型所需的大量样本数据,提出了一种基于开源Android项目构造正负样本的方法并实现工具ASSD.最后,使用开源Android数据集对提出的方法进行实验验证.实验结果表明,本文方法优于现有基于程序静态分析的检测方法,其中检测效果最好的是CNN模型,其F1值平均提高了28.7%.此外,本文方法优于基于机器学习的检测方法,相对于检测效果最好的随机森林模型,CNN模型的F1值平均提高了9.43%.Slow loop is a type of Android-specific code smell.It is harmful to Android applications,especially its energy maintainability.There are many false positives and false negatives in code smell detection method based on program static analysis.To mitigate this problem,a detection strategy based on deep learning is proposed.First,the code text information is used as a feature set for the model input.Then,the smell detection was performed using two deep learning models.In addition,in order to solve the massive labeled data required for supervised deep learning,an approach is proposed to construct the positive and negative samples on Android open-source code and implement the tool ASSD.Finally,the proposed approach is evaluated on an Android open-source data set.The evaluation result shows that this method outperforms the existing detection methods based on program static analysis,where the best detection effect is the CNN model,with an average F1 value improvement of 28.7%.In addition,the performance of proposed approach is better than the detection methods based on machine learning.Compared with the random forest model whose performance is better than other machchine learning models adopted in this paper,the F1 value of the CNN model is improved by 9.43% on average.

关 键 词:Android特有代码异味 缓慢循环 深度学习 机器学习 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象