Journal of King Saud University: Computer and Information Sciences (Jul 2022)

Green software: Refactoring approach

  • Rajni Sehgal,
  • Deepti Mehrotra,
  • Renuka Nagpal,
  • Ramanuj Sharma

Journal volume & issue
Vol. 34, no. 7
pp. 4635 – 4643

Abstract

Read online

An energy efficient information and communication system is a need of the day. Information technology related industries are making efforts to reduce power consumption by improvising both the hardware infrastructure and software systems. The hardware is driven by software; hence, design and development of software may have a significant impact energy need of the overall system. Many times it is observed that complex software performs useless tasks leading to power consumption, referred to as energy leak. The solution of energy leaks for mobile applications has attracted the interest of researchers, but still handling energy leaks issues for applications developed using Java-based technology need to be explored. While designing software during maintenance phase, code smells are introduced which not only reduce performance of the software also may lead to execution of useless code thus enhancing the energy leak. The common practice of the software industry to remove the code smells is use of refactoring strategy. The basic idea of this study is to understand the impact of refactoring on total energy consumption. To explore this hypothesis a set of Java based applications are selected, code smell present in these applications are discovered and a suitable refactoring strategy is applied to reduce the code smell. Power consumption is estimated using an open source tool Microsoft Joulemeter, it monitors energy usage by machine resources and estimates power consumption. The energy consumption before and after refactoring is recorded and statistical t-test is performed to validate the proposed concept.

Keywords