undefined

Static Code Analysis for Reducing Energy Code Smells in Different Loop Types: A Case Study in Java

Publiceringsår

2024

Upphovspersoner

Gurung Ram Prasad; Porras Jari; Koistinaho Jarkko

Abstrakt

An increase in ICT devices and services has led to a rise in carbon emissions. As a result, there is a growing demand for energy-efficient software; however, this demand remains unmet due to the lack of knowledge regarding the best practices for reducing energy consumption in software. Unnecessary iterations and faulty looping conditions in different loops can consume high energy, and loops are considered as one of the most energy consuming entities. The purpose of this study is to detect and rectify energy code smells in different Java loop types by implementing static code analysis. Using the DSR approach, a Java Maven custom SonarQube plugin, GreenForLoops, was developed. The plugin underwent in-house testing as well as evaluation by professionals from industry. The professionals had provided feedback, which were later analyzed by using a qualitative method. For internal testing, 16 different open-source Java projects were selected. The results demonstrated considerable variations in the prevalence of energy code smells across the projects. Additionally, the plugin provided sample code suggestions to address each identified energy code smell. Finally, based on professional reviews, the plugin received an overall rating of Very Good. In conclusion, the plugin had successfully detected code smells and suggested code samples to rectify the detected code smells. However, it cannot be overlooked that the plugin may also generate false positives.
Visa mer

Organisationer och upphovspersoner

Publikationstyp

Publikationsform

Artikel

Moderpublikationens typ

Konferens

Artikelstyp

Annan artikel

Målgrupp

Vetenskaplig

Kollegialt utvärderad

Kollegialt utvärderad

UKM:s publikationstyp

A4 Artikel i en konferenspublikation

Publikationskanalens uppgifter

Öppen tillgång

Öppen tillgänglighet i förläggarens tjänst

Nej

Parallellsparad

Nej

Övriga uppgifter

Vetenskapsområden

Data- och informationsvetenskap

Nyckelord

[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Förlagets internationalitet

Internationell

Internationell sampublikation

Nej

Sampublikation med ett företag

Ja

DOI

10.1109/ICT4S64576.2024.00037

Publikationen ingår i undervisnings- och kulturministeriets datainsamling

Ja