Security‐based code smell definition, detection, and impact quantification in Android

Yi Zhong, Mengyu Shi, Jiawei He, Chunrong Fang, Zhenyu Chen
{"title":"Security‐based code smell definition, detection, and impact quantification in Android","authors":"Yi Zhong, Mengyu Shi, Jiawei He, Chunrong Fang, Zhenyu Chen","doi":"10.1002/spe.3257","DOIUrl":null,"url":null,"abstract":"Abstract Android's high market share and extensive functionality make its security a significant concern. Research reveals that many security issues are caused by insecure coding practices. As a poor design indicator, code smell threatens the safety and quality assurance of Android applications (apps). Although previous works revealed specific problems associated with code smells, the field still lacks research reflecting Android features. Moreover, the cost and time limit developers to repairing numerous smells timely. We conducted a study, including Def inition, D etection, and I mpact Q uantification for Android code smell (DefDIQ): (1) define 15 novel code smells in Android from a security programming perspective and provide suggestions on how to eliminate or mitigate them; (2) implement DACS (Detect Android Code Smell) to automatically detect the custom code smells based on ASTs; (3) investigate the correlation between individual smells with DACS detection results, select suitable code smells to construct fault counting models, then quantify their impact on quality, and thereby generating code smell repair priorities. We conducted experiments on 4575 open‐source apps, and the findings are: (i) Lin's CCC between DACS and manual detection results reaches 0.9994, verifying the validity; (ii) the fault counting model constructed by zero‐inflated negative binomial is superior to negative binomial (AIC = 517.32, BIC = 522.12); some smells do indicate fault‐proneness, and we identify such avoidable poor designs; (iii) different code smells have different levels of importance and the repair priorities constructed provide a practical guideline for researchers and inexperienced developers.","PeriodicalId":21899,"journal":{"name":"Software: Practice and Experience","volume":"40 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Software: Practice and Experience","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1002/spe.3257","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Abstract Android's high market share and extensive functionality make its security a significant concern. Research reveals that many security issues are caused by insecure coding practices. As a poor design indicator, code smell threatens the safety and quality assurance of Android applications (apps). Although previous works revealed specific problems associated with code smells, the field still lacks research reflecting Android features. Moreover, the cost and time limit developers to repairing numerous smells timely. We conducted a study, including Def inition, D etection, and I mpact Q uantification for Android code smell (DefDIQ): (1) define 15 novel code smells in Android from a security programming perspective and provide suggestions on how to eliminate or mitigate them; (2) implement DACS (Detect Android Code Smell) to automatically detect the custom code smells based on ASTs; (3) investigate the correlation between individual smells with DACS detection results, select suitable code smells to construct fault counting models, then quantify their impact on quality, and thereby generating code smell repair priorities. We conducted experiments on 4575 open‐source apps, and the findings are: (i) Lin's CCC between DACS and manual detection results reaches 0.9994, verifying the validity; (ii) the fault counting model constructed by zero‐inflated negative binomial is superior to negative binomial (AIC = 517.32, BIC = 522.12); some smells do indicate fault‐proneness, and we identify such avoidable poor designs; (iii) different code smells have different levels of importance and the repair priorities constructed provide a practical guideline for researchers and inexperienced developers.
Android中基于安全的代码气味定义、检测和影响量化
Android的高市场份额和广泛的功能使其安全性成为一个值得关注的问题。研究表明,许多安全问题是由不安全的编码实践引起的。作为一个糟糕的设计指标,代码气味威胁着Android应用程序的安全性和质量保证。尽管之前的工作揭示了与代码气味相关的具体问题,但该领域仍然缺乏反映Android功能的研究。此外,成本和时间限制了开发人员及时修复大量气味。我们进行了一项研究,包括Android代码气味(DefDIQ)的定义、D检测和I影响Q量化:(1)从安全编程的角度定义了Android中的15种新代码气味,并提供了如何消除或减轻它们的建议;(2)实现DACS (Detect Android Code Smell),基于ast自动检测自定义代码气味;(3)研究单个气味与DACS检测结果之间的相关性,选择合适的代码气味构建故障计数模型,量化其对质量的影响,从而生成代码气味修复优先级。我们对4575个开源app进行了实验,发现:(i) Lin的DACS与人工检测结果之间的CCC达到0.9994,验证了有效性;(ii)零膨胀负二项构造的故障计数模型优于负二项(AIC = 517.32, BIC = 522.12);有些气味确实表明有故障倾向,我们可以识别这些可避免的不良设计;(iii)不同的代码气味具有不同的重要性,构建的修复优先级为研究人员和没有经验的开发人员提供了实用的指导。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信