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
相关论文
共 83 条
  • [1] Software Security Estimation Using the Hybrid Fuzzy ANP-TOPSIS Approach: Design Tactics Perspective
    Agrawal, Alka
    Seh, Adil Hussain
    Baz, Abdullah
    Alhakami, Hosam
    Alhakami, Wajdi
    Baz, Mohammed
    Kumar, Rajeev
    Khan, Raees Ahmad
    [J]. SYMMETRY-BASEL, 2020, 12 (04):
  • [2] Ahmed I, 2015, INT SYMP EMP SOFTWAR, P31, DOI 10.1109/ESEM.2015.7321186
  • [3] [Anonymous], 2020, INF SCI LETT, V9, P33, DOI [10.18576/isl/090105, DOI 10.18576/ISL/090105]
  • [4] Evaluating the impact of code smell refactoring on the energy consumption of Android applications
    Anwar, Hina
    Pfahl, Dietmar
    Srirama, Satish N.
    [J]. 2019 45TH EUROMICRO CONFERENCE ON SOFTWARE ENGINEERING AND ADVANCED APPLICATIONS (SEAA 2019), 2019, : 82 - 86
  • [5] Methodbook: Recommending Move Method Refactorings via Relational Topic Models
    Bavota, Gabriele
    Oliveto, Rocco
    Gethers, Malcom
    Poshyvanyk, Denys
    De Lucia, Andrea
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2014, 40 (07) : 671 - 694
  • [6] Carette A, 2017, 2017 IEEE 24TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), P115, DOI 10.1109/SANER.2017.7884614
  • [7] Cruz Luis, 2017, 2017 IEEE/ACM 4th International Conference on Mobile Software Engineering and Systems (MOBILESoft). Proceedings, P46, DOI 10.1109/MOBILESoft.2017.19
  • [8] D'Ambros Marco, 2010, Proceedings of the Tenth International Conference on Quality Software (QSIC 2010), P23, DOI 10.1109/QSIC.2010.58
  • [9] Developers Android, 2020, Analyze power use with battery historian.
  • [10] Dhaka G, 2016, ASIA PAC SOFWR ENG, P349, DOI [10.1109/APSEC.2016.23, 10.1109/APSEC.2016.057]