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

被引:0
|
作者
Gupta, Aakanshi [1 ]
Suri, Bharti [2 ]
Sharma, Deepanshu [3 ]
Misra, Sanjay [4 ,5 ]
Fernandez-Sanz, Luis [6 ]
机构
[1] Amity Univ Uttar Pradesh, Dept Comp Sci & Engn, Noida, India
[2] Guru Gobind Singh Indraprastha Univ, Univ Sch Informat Commun & Technol, New Delhi, India
[3] Guru Gobind Singh Indraprastha Univ, Comp Sci & Engn Dept, New Delhi, India
[4] Ostfold Univ Coll, Dept Comp Sci & Commun, Halden, Norway
[5] Inst Energy Technol, Dept Appl Data Sci, Halden, Norway
[6] Univ Alcala, Dept Comp Sci, Alcala De Henares, Spain
来源
SCIENTIFIC REPORTS | 2024年 / 14卷 / 01期
关键词
Android code smells; Software energy model; Green energy; Refactoring; Machine-learning; Robust statistics; Multi-linear regression; ENERGY-CONSUMPTION; REFACTORING TECHNIQUES; SOFTWARE; IMPACT; BAD;
D O I
10.1038/s41598-024-67660-z
中图分类号
O [数理科学和化学]; P [天文学、地球科学]; Q [生物科学]; N [自然科学总论];
学科分类号
07 ; 0710 ; 09 ;
摘要
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.
引用
收藏
页数:22
相关论文
共 50 条
  • [21] Evaluating the impact of code smell refactoring on the energy consumption of Android applications
    Anwar, Hina
    Pfahl, Dietmar
    Srirama, Satish N.
    2019 45TH EUROMICRO CONFERENCE ON SOFTWARE ENGINEERING AND ADVANCED APPLICATIONS (SEAA 2019), 2019, : 82 - 86
  • [22] Empirical Study on Code Smells in iOS Applications
    Rahkema, Kristiina
    Pfahl, Dietmar
    2020 IEEE/ACM 7TH INTERNATIONAL CONFERENCE ON MOBILE SOFTWARE ENGINEERING AND SYSTEMS, MOBILESOFT, 2020, : 61 - 65
  • [23] Lightweight Detection of Android-Specific Code Smells: The aDoctor Project
    Palomba, Fabio
    Di Nucci, Dario
    Panichella, Annibale
    Zaidman, Andy
    De Lucia, Andrea
    2017 IEEE 24TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), 2017, : 487 - 491
  • [24] Droidlens: Robust and Fine-Grained Detection for Android Code Smells
    Mao, Chenguang
    Wang, Hao
    Han, Gaojie
    Zhang, Xiaofang
    2020 INTERNATIONAL SYMPOSIUM ON THEORETICAL ASPECTS OF SOFTWARE ENGINEERING (TASE 2020), 2020, : 161 - 168
  • [25] A Developer-Oriented Framework for Assessing Power Consumption in Mobile Applications: Android Energy Smells Case Study
    Groza, Claudiu
    Dumitru-Cristian, Apostol
    Marcu, Marius
    Bogdan, Razvan
    SENSORS, 2024, 24 (19)
  • [26] Lightweight energy consumption analysis and prediction for Android applications
    Hu, Yan
    Yan, Jiwei
    Yan, Dong
    Lu, Qiong
    Yan, Jun
    SCIENCE OF COMPUTER PROGRAMMING, 2018, 162 : 132 - 147
  • [27] A Novel Tree-based Neural Network for Android Code Smells Detection
    Yu, Jing
    Mao, Chenguang
    Ye, Xiaojun
    2021 IEEE 21ST INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY (QRS 2021), 2021, : 738 - 748
  • [28] The impact of the code smells of the presentation layer on the diffuseness of aesthetic defects of Android apps
    Mabrouka Chouchane
    Makram Soui
    Khaled Ghedira
    Automated Software Engineering, 2021, 28
  • [29] Sniffing Android Code Smells: An Association Rules Mining-based Approach
    Rubin, Jehan
    Henniche, Adel Nassim
    Moha, Naouel
    Bouguessa, Mohamed
    Bousbia, Nabila
    2019 IEEE/ACM 6TH INTERNATIONAL CONFERENCE ON MOBILE SOFTWARE ENGINEERING AND SYSTEMS (MOBILESOFT 2019), 2019, : 123 - 127
  • [30] The impact of the code smells of the presentation layer on the diffuseness of aesthetic defects of Android apps
    Chouchane, Mabrouka
    Soui, Makram
    Ghedira, Khaled
    AUTOMATED SOFTWARE ENGINEERING, 2021, 28 (02)