Energy-Aware Evolutionary Multi-Objective Refactoring for Bad Code Smells Correction of Android Applications

Document Type : Original Article

Authors

1 Faculty of Computer Engineering, K. N. Toosi University of Technology, Tehran, Iran

2 Faculty of Computer Engineering, K. N. Toosi University of Technology

Abstract

In software engineering, energy efficiency is an influential factor in the software development and maintenance especially for battery-limited devices. While refactoring can improve the quality of software, recent studies suggest that some refactoring operations may lead to conflicts with energy consumption and execution time of Android applications. In this paper, we analyze the impact of code refactoring for eight Android/Java bad code smells and anti-patterns on a testbed of five real and one synthetic Android application. We measure energy consumption, execution time and quality design of application before and after refactoring. We then propose a novel refactoring recommendation approach based on evolutionary multi-objective optimization that accounts for energy consumption, execution time and refactoring effort for Android/Java anti-patterns. For this purpose, we use Nondominated Sorting Genetic Algorithm-II (NSGA-II) with three objectives: 1) energy consumption, 2) execution time, and 3) refactoring effort. The obtained results show that this approach can generate refactoring recommendations with a median precision of 65% and 76% for improving energy and execution time respectively while the median of removed antipatterns in testbed applications is 42%.

Keywords

Main Subjects



Articles in Press, Accepted Manuscript
Available Online from 04 September 2023
  • Receive Date: 12 June 2022
  • Revise Date: 23 January 2023
  • Accept Date: 24 July 2023