Abstract

Code refactoring is a time-consuming and effort-intensive process that is applied for making improvements to source codes. There exist several refactoring techniques to improve software quality. Some of them aim to reduce the energy consumption of the software. However, the combination of applied refactoring techniques is crucial to the success rate. In addition, to provide sustainable services on portable devices such as mobile phones and laptops, which rely on batteries, improving and optimizing the energy efficiency is important. This study focuses on examining the effect of code refactoring techniques on energy consumption. A total of 25 different source codes of applications programmed in the C# and Java languages are selected for the study, and combinations obtained from refactoring techniques are applied to these source codes. The combinations applied are analyzed using the maintainability index. Power consumption estimation tools are used to measure the energy consumption of the original and refactored codes. The results show that the combinations significantly improve the software’s energy efficiency. The results will provide a better understanding of the relationship between the energy efficiency of software and refactoring techniques. Moreover, they will help developers to improve their object-oriented code in terms of both energy efficiency and sustainability.

Highlights

  • Today, energy consumption and dependence on energy are issues that concern all countries worldwide [1]

  • The Wilcoxon signed-rank statistical test [51], which is a type of non-parametric test, was used to determine whether the difference between the amount of energy consumed by the original code and refactored code of each applications was statistically significant

  • The proposed approach has effectively been implemented on 2048 mobile and 2048 desktop application datasets, showing superiority in predicting the combination of refactoring techniques over previous studies in terms of how the refactoring techniques should be combined

Read more

Summary

Introduction

Energy consumption and dependence on energy are issues that concern all countries worldwide [1]. Alongside the increase in the global population, the use of information and communication technologies is increasing. In order to maintain the continuity of these technologies, both hardware and software infrastructures are used and energy consumption increases greatly as a result of increased use [2]. Every action made to develop software has a cost and it results in an increase in the carbon emission. The approach that its practitioners call green software engineering [3] is an emerging paradigm that aims to develop green-enabled software to reduce negative impacts on the environment. The software solutions developed are based on observing innovations in the software development process followed and the refactoring technique used without disturbing the code’s function

Objectives
Methods
Results
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call