Investigating the Energy Impact of Android Smells

Abstract : Android code smells are bad implementation practices within Android applications (or apps) that may lead to poor software quality. These code smells are known to degrade the performance of apps and to have an impact on energy consumption. However, few studies have assessed the positive impact on energy consumption when correcting code smells. In this paper, we therefore propose a tooled and reproducible approach, called Hot-Pepper, to correct automatically code smells and evaluate their impact on energy consumption. Currently, Hot-Pepper is able to correct automatically three types of Android specific code smells (Internal Getter/Setter, Member Ignoring Method, and HashMap Usage). Hot-Pepper derives four versions of the apps by correcting each detected smell independently, and all of them. Hot-Pepper is able to report on the energy consumption of each app version with a single user scenario test. Our empirical study on five open-source Android apps shows that correcting the three aforementioned Android code smells effectively reduce significantly the energy consumption of apps. In particular, we observed a global reduction of the energy consumption of 4,83% on one app when the three code smells are corrected. We also take advantage of the flexibility of Hot-Pepper to investigate the impact of three pictures code smells (bad picture format, compression, and bitmap format) in sample apps. We observed that the usage of optimized JPG pictures with the Android default bitmap format is the most energy efficient combination in Android apps. We believe that developers can benefit from our approach and results to guide their refactoring, and thus improve the energy consumption of their mobile apps.
Complete list of metadatas

Cited literature [35 references]  Display  Hide  Download

https://hal.inria.fr/hal-01403485
Contributor : Romain Rouvoy <>
Submitted on : Friday, December 16, 2016 - 1:03:42 PM
Last modification on : Thursday, April 4, 2019 - 10:18:05 AM
Long-term archiving on : Tuesday, March 21, 2017 - 12:31:58 PM

File

carette-saner-17.pdf
Files produced by the author(s)

Identifiers

  • HAL Id : hal-01403485, version 1

Citation

Antonin Carette, Mehdi Adel Ait Younes, Geoffrey Hecht, Naouel Moha, Romain Rouvoy. Investigating the Energy Impact of Android Smells. 24th International IEEE Conference on Software Analysis, Evolution and Reengineering (SANER), Feb 2017, Klagenfurt, Austria. pp.10. ⟨hal-01403485⟩

Share

Metrics

Record views

654

Files downloads

1186