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 条
  • [41] StaDART: Addressing the problem of dynamic code updates in the security analysis of android applications
    Ahmad, Maqsood
    Costamagna, Valerio
    Crispo, Bruno
    Bergadano, Francesco
    Zhauniarovich, Yury
    JOURNAL OF SYSTEMS AND SOFTWARE, 2020, 159
  • [42] Equivalent Version Sets Testing Method for Android Applications based on Code Analysis
    Huang S.
    Yang S.
    Yao Y.
    Chen L.
    International Journal of Performability Engineering, 2019, 15 (07) : 2008 - 2018
  • [43] A longitudinal exploratory study on code smells in server side web applications
    Narjes Bessghaier
    Ali Ouni
    Mohamed Wiem Mkaouer
    Software Quality Journal, 2021, 29 : 901 - 941
  • [44] A longitudinal exploratory study on code smells in server side web applications
    Bessghaier, Narjes
    Ouni, Ali
    Mkaouer, Mohamed Wiem
    SOFTWARE QUALITY JOURNAL, 2021, 29 (04) : 901 - 941
  • [45] Dynamic Code Whitelist for Efficient Analysis of Android Code
    Choi, Jeongwoo
    Kim, Yongmin
    Lee, Jinwoo
    Hong, Jiman
    PROCEEDINGS OF THE 2018 CONFERENCE ON RESEARCH IN ADAPTIVE AND CONVERGENT SYSTEMS (RACS 2018), 2018, : 165 - 166
  • [46] An Empirical Study of the Energy Consumption of Android Applications
    Li, Ding
    Hao, Shuai
    Gui, Jiaping
    Halfond, William G. J.
    2014 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME), 2014, : 121 - 130
  • [47] Detecting Anomalous Energy Consumption in Android Applications
    Couto, Marco
    Carcao, Tiago
    Cunha, Jacome
    Fernandes, Joao Paulo
    Saraiva, Joao
    PROGRAMMING LANGUAGES, SBLP 2014, 2014, 8771 : 77 - 91
  • [48] "Less Give More": Evaluate and zoning Android applications
    Ab Razak, Mohd Faizal
    Anuar, Nor Badrul
    Salleh, Rosli
    Firdaus, Ahmad
    Faiz, Muhammad
    Alamri, Hammoudeh S.
    MEASUREMENT, 2019, 133 : 396 - 411
  • [49] Estimating the Energy Consumption of Software Components from Size, Complexity and Code Smells Metrics*
    Guaman, Daniel
    Perez, Jennifer
    Valdiviezo-Diaz, Priscila
    Canas, Norberto
    37TH ANNUAL ACM SYMPOSIUM ON APPLIED COMPUTING, 2022, : 1456 - 1459
  • [50] Code Reuse between Java']Java and Android Applications
    Cheon, Yoonsik
    Chavez, Carlos, V
    Castro, Ubaldo
    ICSOFT: PROCEEDINGS OF THE 14TH INTERNATIONAL CONFERENCE ON SOFTWARE TECHNOLOGIES, 2019, : 246 - 253