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 条
  • [31] Detection of Embedded Code Smells in Dynamic Web Applications
    Hung Viet Nguyen
    Hoan Anh Nguyen
    Tung Thanh Nguyen
    Anh Tuan Nguyen
    Nguyen, Tien N.
    2012 PROCEEDINGS OF THE 27TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2012, : 282 - 285
  • [32] DWroidDump: Executable Code Extraction from Android Applications for Malware Analysis
    Kim, Dongwoo
    Kwak, Jin
    Ryou, Jaecheol
    INTERNATIONAL JOURNAL OF DISTRIBUTED SENSOR NETWORKS, 2015,
  • [33] Reducing Power Consumption in Android Applications
    Singhai, Amit
    Bose, Joy
    Yendeti, Nagaraju
    SOUVENIR OF THE 2014 IEEE INTERNATIONAL ADVANCE COMPUTING CONFERENCE (IACC), 2014, : 668 - 673
  • [34] DynAMICS: A Tool-Based Method for the Specification and Dynamic Detection of Android Behavioral Code Smells
    Prestat, Dimitri
    Moha, Naouel
    Villemaire, Roger
    Avellaneda, Florent
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2024, 50 (04) : 765 - 784
  • [35] Risk analysis of Android applications: A user-centric solution
    Dini, Gianluca
    Martinelli, Fabio
    Matteucci, Ilaria
    Petrocchi, Marinella
    Saracino, Andrea
    Sgandurra, Daniele
    FUTURE GENERATION COMPUTER SYSTEMS-THE INTERNATIONAL JOURNAL OF ESCIENCE, 2018, 80 : 505 - 518
  • [36] Performance and Energy Consumption Analysis of Embedded Applications based on Android Platform
    Vieira, Andrws
    Debastiani, Daniel
    Agostini, Luciano
    Marques, Felipe
    Mattos, Julio C. B.
    2012 BRAZILIAN SYMPOSIUM ON COMPUTING SYSTEM ENGINEERING (SBESC 2012), 2012, : 59 - 64
  • [37] JS']JSpIRIT: A Flexible Tool for the Analysis of Code Smells
    Vidal, Santiago
    Vazquez, Hernan
    Andres Diaz-Pace, J.
    Marcos, Claudia
    Garcia, Alessandro
    Oizumi, Willian
    2015 34TH INTERNATIONAL CONFERENCE OF THE CHILEAN COMPUTER SCIENCE SOCIETY (SCCC), 2015,
  • [38] NaClDroid: Native Code Isolation for Android Applications
    Athanasopoulos, Elias
    Kemerlis, Vasileios P.
    Portokalidis, Georgios
    Keromytis, Angelos D.
    COMPUTER SECURITY - ESORICS 2016, PT I, 2016, 9878 : 422 - 439
  • [39] GreenHub: a large-scale collaborative dataset to battery consumption analysis of android devices
    Rui Pereira
    Hugo Matalonga
    Marco Couto
    Fernando Castor
    Bruno Cabral
    Pedro Carvalho
    Simão Melo de Sousa
    João Paulo Fernandes
    Empirical Software Engineering, 2021, 26
  • [40] GreenHub: a large-scale collaborative dataset to battery consumption analysis of android devices
    Pereira, Rui
    Matalonga, Hugo
    Couto, Marco
    Castor, Fernando
    Cabral, Bruno
    Carvalho, Pedro
    de Sousa, Simao Melo
    Fernandes, Joao Paulo
    EMPIRICAL SOFTWARE ENGINEERING, 2021, 26 (03)