Skip to main content
QUICK REVIEW

[Paper Review] Anti-patterns and the energy efficiency of Android applications

Rodrigo Morales, Rubén Saborido|arXiv (Cornell University)|Oct 18, 2016
Green IT and SustainabilityEngineering32 references19 citations
TL;DR

This paper investigates the impact of eight object-oriented and Android-specific anti-patterns on energy efficiency in mobile applications. Using a controlled testbed of 59 open-source Android apps, the authors measure energy consumption before and after refactoring, finding that anti-patterns significantly increase energy use—though refactoring can either improve or worsen efficiency depending on the pattern, highlighting the need for energy-aware refactoring in mobile development.

ABSTRACT

The boom in mobile apps has changed the traditional landscape of software development by introducing new challenges due to the limited resources of mobile devices, e.g., memory, CPU, network bandwidth and battery. The energy consumption of mobile apps is nowadays a hot topic and researchers are actively investigating the role of coding practices on energy efficiency. Recent studies suggest that design quality can conflict with energy efficiency. Therefore, it is important to take into account energy efficiency when evolving the design of a mobile app. The research community has proposed approaches to detect and remove anti-patterns (i.e., poor solutions to design and implementation problems) in software systems but, to the best of our knowledge, none of these approaches have included anti-patterns that are specific to mobile apps and--or considered the energy efficiency of apps. In this paper, we fill this gap in the literature by analyzing the impact of eight type of anti-patterns on a testbed of 59 android apps extracted from F-Droid. First, we (1) analyze the impact of anti-patterns in mobile apps with respect to energy efficiency; then (2) we study the impact of different types of anti-patterns on energy efficiency. We found that then energy consumption of apps containing anti-patterns and not (refactored apps) is statistically different. Moreover, we find that the impact of refactoring anti-patterns can be positive (7 type of anti-patterns) or negative (2 type of anti-patterns). Therefore, developers should consider the impact on energy efficiency of refactoring when applying maintenance activities.

Motivation & Objective

  • To investigate the impact of anti-patterns on energy efficiency in Android applications, a critical but underexplored area in mobile software engineering.
  • To develop and validate a reliable methodology for measuring energy consumption in mobile apps under controlled conditions.
  • To assess whether refactoring anti-patterns leads to measurable improvements or regressions in energy efficiency.
  • To identify which anti-patterns have the most significant impact on energy consumption, enabling targeted refactoring strategies.
  • To inform the design of energy-aware refactoring tools and practices for mobile app development.

Proposed method

  • The study uses a testbed of 59 open-source Android apps from F-Droid to evaluate energy consumption.
  • Energy consumption is measured using the Green Miner hardware profiler, which records voltage and current at 50 Hz via an INA219 sensor and a Raspberry Pi.
  • The authors compare energy usage between original (anti-patterns present) and refactored (anti-patterns removed) versions of the apps.
  • A standardized test scenario is executed for each app to ensure consistent runtime conditions and measurable energy differences.
  • The methodology is compared against a state-of-the-art energy measurement approach to validate reliability and accuracy.
  • Statistical analysis is applied to determine whether differences in energy consumption are significant between refactored and non-refactored versions.

Experimental results

Research questions

  • RQ1Does the presence of anti-patterns in Android apps lead to statistically significant differences in energy consumption?
  • RQ2How does refactoring specific anti-patterns affect the energy efficiency of Android applications?
  • RQ3Are there anti-patterns whose refactoring results in increased energy consumption, and if so, which ones?
  • RQ4Can a reliable and repeatable energy measurement methodology be established for empirical evaluation of anti-pattern impacts?
  • RQ5To what extent do different types of anti-patterns contribute to energy inefficiency in mobile apps?

Key findings

  • Apps containing anti-patterns consume significantly more energy than their refactored counterparts, indicating a strong correlation between poor design and energy inefficiency.
  • Refactoring anti-patterns leads to energy savings in seven out of eight cases, demonstrating that most refactorings improve energy efficiency.
  • Two anti-patterns—Binding resources too early and private getters/setters—result in increased energy consumption after refactoring, indicating context-dependent impacts.
  • The study confirms that design choices, particularly those related to resource management and method access patterns, directly influence energy consumption.
  • The proposed energy measurement methodology provides reliable and repeatable results, outperforming existing approaches in consistency and accuracy.
  • The findings underscore the importance of integrating energy efficiency into refactoring tools and IDEs to avoid unintended performance regressions.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.