Investigating the energy impact of Android smells
- 1 February 2017
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 115-126
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 automatically correct code smells and evaluate their impact on energy consumption. Currently, HOT-PEPPER is able to automatically correct 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 at once. 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 and significantly reduces the energy consumption of apps. In particular, we observed a global reduction in energy consumption by 4,83% in 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 picture smells (bad picture format, compression, and bitmap format) in sample apps. We observed that the usage of optimised 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.Keywords
This publication has 23 references indexed in Scilit:
- Detecting Antipatterns in Android Apps2015
- Truth in Advertising: The Hidden Cost of Mobile Ads for Software Developers2015
- An investigation into energy-saving programming practices for Android smartphone app development2014
- GreenMiner: a hardware based mining software repositories software energy consumption framework2014
- Mining energy-greedy API usage patterns in Android apps: an empirical study2014
- Analyzing the Harmful Effect of God Class Refactoring on Power ConsumptionIEEE Software, 2014
- Characterizing and detecting resource leaks in Android applications2013
- Calculating source line level energy information for Android applications2013
- Dexpler2012
- Image quality assessment: from error visibility to structural similarityIEEE Transactions on Image Processing, 2004