融合静态程序分析与集成学习的Android代码异味共存检测  

Detecting Android-specific smell co-occurrences based on program static analysis and ensemble learning

在线阅读下载全文

作  者:王祯启 边奕心[1] 马偌楠 毕博宇 王金鑫 Wang Zhenqi;Bian Yixin;Ma Ruonan;Bi Boyu;Wang Jinxin(College of Computer Science&Information Engineering,Harbin Normal University,Harbin 150025,China)

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

出  处:《计算机应用研究》2025年第4期1167-1176,共10页Application Research of Computers

基  金:黑龙江省高等教育教学改革研究项目(SJGYB2024407)。

摘  要:相对于单一种类的代码异味,异味共存对程序更具危害性。针对Android特有代码异味,现有研究主要关注单一种类异味的检测,忽略异味共存对Android应用程序的负面影响。为识别共存的Android特有代码异味,提出融合静态程序分析与集成学习的Android代码异味共存检测方法。作为初步研究,识别忽略类成员变量的方法异味与缺少低内存处理程序异味的共存。首先,提出基于静态程序分析的Android代码异味共存检测方法和正负样本自动生成方法并实现工具ASSD。该工具的输出为后续集成学习模型提供丰富的训练样本。然后,针对单一机器学习模型泛化能力有限的问题,提出一种软投票集成学习模型,识别共存的Android代码异味。该模型不仅可以集成传统机器学习模型,还可以集成改进的深度学习模型。实验结果表明,所提方法优于已有基于静态程序分析的检测方法,F_(1)值提升了26.1百分点。此外,基于传统机器学习的软投票集成学习模型优于基于深度学习的软投票集成学习模型,F_(1)值提升了6.1百分点。所提方法可以实现Android代码异味共存的检测。Compared to individual types of code smells,the co-occurrence of code smells causes greater harm to programs.Existing research on Android-specific code smells primarily detects single types of smells,neglecting the negative impact of co-occurring smells on Android applications.To address this gap,this paper proposed a co-occurrence detection method for Android smells,which integrated static program analysis and ensemble learning.This initial study identified the co-occurrence of the no low memory resolver smell and member ignoring method smell.Firstly,this paper developed a co-occurrence detection method for Android smells based on static program analysis,along with an automatic generation method for positive and negative samples,and implemented an ASSD tool based on these methods.The tool provided rich training samples for the subsequent ensemble learning model.Then,this paper introduced a soft-voting ensemble learning model to detect Android smell co-occurrence,addressing the limited generalization capability of individual machine learning models.This model not only integrated traditional machine learning models but also improved deep learning models.Experimental results show that this method outperforms the existing detection methods based on static analysis,with a 26.1 percentage point increase in the F_(1)-score.Additionally,the soft-voting ensemble model based on traditional machine learning outperforms the deep learning-based model,achieving a 6.1 percentage point improvement in the F_(1)-score.This method enables effective detection of Android smell co-occurrence.

关 键 词:Android代码异味共存 软投票 集成学习 静态程序分析 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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