On the Impact of Code Smells on the Energy Consumption of Mobile Applications

Journal Article (2019)
Author(s)

Fabio Palomba (Universitat Zurich)

D. Di Nucci (Vrije Universiteit Brussel)

A. Panichella (TU Delft - Software Engineering)

A.E. Zaidman (TU Delft - Software Engineering)

Andrea De Lucia (University of Salerno)

Research Group
Software Engineering
Copyright
© 2019 F. Palomba, D. Di Nucci, A. Panichella, A.E. Zaidman, Andrea De Lucia
DOI related publication
https://doi.org/10.1016/j.infsof.2018.08.004
More Info
expand_more
Publication Year
2019
Language
English
Copyright
© 2019 F. Palomba, D. Di Nucci, A. Panichella, A.E. Zaidman, Andrea De Lucia
Research Group
Software Engineering
Volume number
105
Pages (from-to)
43-55
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

Context. The demand for green software design is steadily growing higher especially in the context of mobile devices, where the computation is often limited by battery life. Previous studies found how wrong programming solutions have a strong impact on the energy consumption. Objective. Despite the efforts spent so far, only a little knowledge on the influence of code smells, i.e.,symptoms of poor design or implementation choices, on the energy consumption of mobile applications is available. Method. To provide a wider overview on the relationship between smells and energy efficiency, in this paper we conducted a large-scale empirical study on the influence of 9 Android-specific code smells on the energy consumption of 60 Android apps. In particular, we focus our attention on the design flaws that are theoretically supposed to be related to non-functional attributes of source code, such as performance and energy consumption. Results. The results of the study highlight that methods affected by four code smell types, i.e.,Internal Setter, Leaking Thread, Member Ignoring Method, and Slow Loop, consume up to 87 times more than methods affected by other code smells. Moreover, we found that refactoring these code smells reduces energy consumption in all of the situations. Conclusions. Based on our findings, we argue that more research aimed at
designing automatic refactoring approaches and tools for mobile apps is needed.

Files

1_s2.0_S0950584918301678_main.... (pdf)
(pdf | 1.19 Mb)
- Embargo expired in 01-07-2022
License info not available