• 文献检索
  • 文档翻译
  • 深度研究
  • 学术资讯
  • Suppr Zotero 插件Zotero 插件
  • 邀请有礼
  • 套餐&价格
  • 历史记录
应用&插件
Suppr Zotero 插件Zotero 插件浏览器插件Mac 客户端Windows 客户端微信小程序
定价
高级版会员购买积分包购买API积分包
服务
文献检索文档翻译深度研究API 文档MCP 服务
关于我们
关于 Suppr公司介绍联系我们用户协议隐私条款
关注我们

Suppr 超能文献

核心技术专利:CN118964589B侵权必究
粤ICP备2023148730 号-1Suppr @ 2026

文献检索

告别复杂PubMed语法,用中文像聊天一样搜索,搜遍4000万医学文献。AI智能推荐,让科研检索更轻松。

立即免费搜索

文件翻译

保留排版,准确专业,支持PDF/Word/PPT等文件格式,支持 12+语言互译。

免费翻译文档

深度研究

AI帮你快速写综述,25分钟生成高质量综述,智能提取关键信息,辅助科研写作。

立即免费体验

安卓应用的代码异味分析及降低电池消耗的解决方案。

Code smells analysis for android applications and a solution for less battery consumption.

作者信息

Gupta Aakanshi, Suri Bharti, Sharma Deepanshu, Misra Sanjay, Fernandez-Sanz Luis

机构信息

Department of Computer Science and Engineering, Amity University Uttar Pradesh, Noida, India.

University School of Information, Communication, and Technology, Guru Gobind Singh Indraprastha University, New Delhi, India.

出版信息

Sci Rep. 2024 Jul 26;14(1):17683. doi: 10.1038/s41598-024-67660-z.

DOI:10.1038/s41598-024-67660-z
PMID:39085249
原文链接:https://pmc.ncbi.nlm.nih.gov/articles/PMC11291680/
Abstract

In the digitization era, the battery consumption factor plays a vital role for the devices that operate Android software, expecting them to deliver high performance and good maintainability.The study aims to analyze the Android-specific code smells, their impact on battery consumption, and the formulation of a mathematical model concerning static code metrics hampered by the code smells. We studied the impact on battery consumption by three Android-specific code smells, namely: No Low Memory Resolver (NLMR), Slow Loop (SL) and Unclosed Closable, considering 4,165 classes of 16 Android applications. We used a rule-based classification method that aids the refactoring ideology. Subsequently, multi-linear regression (MLR) modeling is used to evaluate battery usage against the software metrics of smelly code instances. Moreover, it was possible to devise a correlation for the software metric influenced by battery consumption and rule-based classifiers. The outcome confirms that the refactoring of the considered code smells minimizes the battery consumption levels. The refactoring method accounts for an accuracy of 87.47% cumulatively. The applied MLR model has an R-square value of 0.76 for NLMR and 0.668 for SL, respectively. This study can guide the developers towards a complete package for the focused development life cycle of Android code, helping them minimize smartphone battery consumption and use the saved battery lives for other operations, contributing to the green energy revolution in mobile devices.

摘要

在数字化时代,电池消耗因素对于运行安卓软件的设备至关重要,这些设备需要具备高性能和良好的可维护性。本研究旨在分析安卓特有的代码异味、它们对电池消耗的影响,以及构建一个关于受代码异味影响的静态代码指标的数学模型。我们研究了三种安卓特有的代码异味对电池消耗的影响,即:无低内存解析器(NLMR)、慢循环(SL)和未关闭可关闭对象,研究对象为16个安卓应用程序中的4165个类。我们使用了一种基于规则的分类方法,该方法有助于重构思想。随后,使用多元线性回归(MLR)建模来根据有异味代码实例的软件指标评估电池使用情况。此外,还可以为受电池消耗和基于规则的分类器影响的软件指标设计一种相关性。结果证实,对所考虑的代码异味进行重构可将电池消耗水平降至最低。重构方法的累积准确率为87.47%。应用的MLR模型对于NLMR的R平方值分别为0.76,对于SL为0.668。本研究可以指导开发者在安卓代码的专注开发生命周期中获得一个完整的方案,帮助他们最大限度地减少智能手机的电池消耗,并将节省的电池寿命用于其他操作,为移动设备的绿色能源革命做出贡献。

https://cdn.ncbi.nlm.nih.gov/pmc/blobs/9164/11291680/32a18ef2c059/41598_2024_67660_Fig7_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/9164/11291680/213e24444b43/41598_2024_67660_Fig1_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/9164/11291680/8639f4b12a64/41598_2024_67660_Fig2_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/9164/11291680/69f9e585d31a/41598_2024_67660_Fig3_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/9164/11291680/8d7f5a9ec80d/41598_2024_67660_Fig4_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/9164/11291680/69ea2beb4e12/41598_2024_67660_Fig5_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/9164/11291680/5109949e6e36/41598_2024_67660_Fig6_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/9164/11291680/32a18ef2c059/41598_2024_67660_Fig7_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/9164/11291680/213e24444b43/41598_2024_67660_Fig1_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/9164/11291680/8639f4b12a64/41598_2024_67660_Fig2_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/9164/11291680/69f9e585d31a/41598_2024_67660_Fig3_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/9164/11291680/8d7f5a9ec80d/41598_2024_67660_Fig4_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/9164/11291680/69ea2beb4e12/41598_2024_67660_Fig5_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/9164/11291680/5109949e6e36/41598_2024_67660_Fig6_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/9164/11291680/32a18ef2c059/41598_2024_67660_Fig7_HTML.jpg

相似文献

1
Code smells analysis for android applications and a solution for less battery consumption.安卓应用的代码异味分析及降低电池消耗的解决方案。
Sci Rep. 2024 Jul 26;14(1):17683. doi: 10.1038/s41598-024-67660-z.
2
A Developer-Oriented Framework for Assessing Power Consumption in Mobile Applications: Android Energy Smells Case Study.一种面向开发者的移动应用功耗评估框架:安卓能量嗅探案例研究
Sensors (Basel). 2024 Oct 7;24(19):6469. doi: 10.3390/s24196469.
3
A study of dealing class imbalance problem with machine learning methods for code smell severity detection using PCA-based feature selection technique.一项使用基于主成分分析(PCA)的特征选择技术,运用机器学习方法处理代码异味严重程度检测中的类别不平衡问题的研究。
Sci Rep. 2023 Sep 27;13(1):16245. doi: 10.1038/s41598-023-43380-8.
4
On the adequacy of static analysis warnings with respect to code smell prediction.关于静态分析警告在代码异味预测方面的充分性。
Empir Softw Eng. 2022;27(3):64. doi: 10.1007/s10664-022-10126-5. Epub 2022 Mar 17.
5
Visualizing software refactoring using radar charts.使用雷达图可视化软件重构。
Sci Rep. 2023 Nov 9;13(1):19530. doi: 10.1038/s41598-023-44281-6.
6
Artificial Intelligence Algorithms for Malware Detection in Android-Operated Mobile Devices.人工智能算法在安卓操作系统移动设备中的恶意软件检测。
Sensors (Basel). 2022 Mar 15;22(6):2268. doi: 10.3390/s22062268.
7
Software Code Smell Prediction Model Using Shannon, Rényi and Tsallis Entropies.使用香农熵、雷尼熵和Tsallis熵的软件代码异味预测模型
Entropy (Basel). 2018 May 17;20(5):372. doi: 10.3390/e20050372.
8
Python code smells detection using conventional machine learning models.使用传统机器学习模型检测Python代码异味。
PeerJ Comput Sci. 2023 May 29;9:e1370. doi: 10.7717/peerj-cs.1370. eCollection 2023.
9
Empirical study of the relationship between design patterns and code smells.设计模式与代码异味关系的实证研究。
PLoS One. 2020 Apr 16;15(4):e0231731. doi: 10.1371/journal.pone.0231731. eCollection 2020.
10
Dynamic stacking ensemble for cross-language code smell detection.用于跨语言代码异味检测的动态堆叠集成方法。
PeerJ Comput Sci. 2024 Aug 15;10:e2254. doi: 10.7717/peerj-cs.2254. eCollection 2024.

本文引用的文献

1
Software Code Smell Prediction Model Using Shannon, Rényi and Tsallis Entropies.使用香农熵、雷尼熵和Tsallis熵的软件代码异味预测模型
Entropy (Basel). 2018 May 17;20(5):372. doi: 10.3390/e20050372.