Download PDFOpen PDF in browserEmpirical Evaluation of the Energy Impact of Refactoring Code Smells19 pages•Published: May 10, 2018AbstractSoftware 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.
|