# Using Automatic Refactoring to Improve Energy Efficiency of Android Apps

**Authors:** Luis Cruz, Rui Abreu

arXiv: 1803.05889 · 2018-03-16

## TL;DR

This paper investigates the use of automatic refactoring, via the Leafactor tool, to identify and fix energy-related code smells in Android apps, aiming to enhance energy efficiency and assist developers.

## Contribution

It introduces Leafactor, a tool for automatic detection and fixing of energy code smells, and evaluates its effectiveness on real-world Android applications.

## Key findings

- Detected and fixed energy code smells in 45 apps
- 40% of the fixed code was merged into official repositories
- Automatic refactoring can aid in improving energy efficiency

## Abstract

The ever-growing popularity of mobile phones has brought additional challenges to the software development lifecycle. Mobile applications (apps, for short) ought to provide the same set of features as conventional software, with limited resources: such as, limited processing capabilities, storage, screen and, not less important, power source. Although energy efficiency is a valuable requirement, developers often lack knowledge of best practices. In this paper, we study whether or not automatic refactoring can aid developers ship energy efficient apps. We leverage a tool, Leafactor, with five energy code smells that tend to go unnoticed. We use Leafactor to analyze code smells in 140 free and open source apps. As a result, we detected and fixed code smells in 45 apps, from which 40% have successfully merged our changes into the official repository.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1803.05889/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/1803.05889/full.md

## References

26 references — full list in the complete paper: https://tomesphere.com/paper/1803.05889/full.md

---
Source: https://tomesphere.com/paper/1803.05889