Download PDFOpen PDF in browser

Empirical Evaluation of the Energy Impact of Refactoring Code Smells

19 pagesPublished: May 10, 2018

Abstract

Software energy efficiency has gained increasing attention of the research community. How to improve it, however, still lacks evidence. Specifically, the impact of code smell refactoring on energy efficiency has been scarcely investigated. In the pilot study here reported, we investigate the impact on performance and energy consumption of refactoring well-known code smells on Java software applications. In order to understand if software metrics can be used as indicators of the energy impact of refactoring, we also measured the variation caused by refactoring on a set of well-established software metrics. We conducted a controlled experiment using state-of-the-art power measurement equipment. Statistical hypothesis testing and effect size estimation were performed on the experimental results. Results show that in one out of three applications, refactoring each smell significantly impacted power- and energy consumption. Specifically, refactoring Feature Envy and Long Method smells led to a 49% energy efficiency improvement. No software metrics significantly correlated with execution time, power or energy consumption. In conclusion, refactoring code smells can significantly improve software energy efficiency. The magnitude of the impact may depend on application properties, e.g. size or age. Further research is needed to understand the relationship between software metrics and energy efficiency.

Keyphrases: code smells, empirical experiment, energy efficiency, refactoring

In: Birgit Penzenstadler, Steve Easterbrook, Colin Venters and Syed Ishtiaque Ahmed (editors). ICT4S2018. 5th International Conference on Information and Communication Technology for Sustainability, vol 52, pages 365-383.

BibTeX entry
@inproceedings{ICT4S2018:Empirical_Evaluation_Energy_Impact,
  author    = {Roberto Verdecchia and René Aparicio Saez and Giuseppe Procaccianti and Patricia Lago},
  title     = {Empirical Evaluation of the Energy Impact of Refactoring Code Smells},
  booktitle = {ICT4S2018. 5th International Conference on Information and Communication Technology for Sustainability},
  editor    = {Birgit Penzenstadler and Steve Easterbrook and Colin Venters and Syed Ishtiaque Ahmed},
  series    = {EPiC Series in Computing},
  volume    = {52},
  publisher = {EasyChair},
  bibsource = {EasyChair, https://easychair.org},
  issn      = {2398-7340},
  url       = {/publications/paper/MxpT},
  doi       = {10.29007/dz83},
  pages     = {365-383},
  year      = {2018}}
Download PDFOpen PDF in browser