Systematic Detection of Energy Regression and Corresponding Code Patterns in Java Projects
François Bechet, Jérôme Maquoi, Luís Cruz, Benoît Vanderose, Xavier Devroey
TLDR
EnergyTrackr automatically detects energy regressions and associated code anti-patterns in Java projects, helping developers optimize software for lower energy consumption.
Key contributions
- Introduces EnergyTrackr for automated detection of energy regressions across commits in Java projects.
- Identifies code anti-patterns contributing to increased energy consumption (e.g., missing early exits).
- Empirically validated on 3,232 commits from three Java projects, showing significant energy change detection.
- Assists developers in monitoring energy, identifying anti-patterns, and optimizing code for efficiency.
Why it matters
Green software engineering is crucial, but automated tools for energy regression detection are lacking. EnergyTrackr fills this gap by providing a systematic way to identify energy-inefficient code changes. This helps developers create more sustainable software and reduce IT's environmental impact.
Original Abstract
Green software engineering is emerging as a crucial response to information technology's rising energy impact, especially in continuous development. However, there remain challenges in devising automated methods for identifying energy regressions across commits and their associated code change patterns. In particular, little effort has been put into automatically detecting regressions at the commit level by identifying statistically significant changes in energy consumption. In this paper, we introduce EnergyTrackr, an approach designed to detect energy regressions across multiple commits that can then be used to identify code anti-patterns potentially contributing to the increase of software energy consumption over time. We describe our empirical evaluation, including repository mining and source code analysis, made on 3,232 commits from three Java projects, and show the approach's ability to identify significant energy changes. We also highlight recurring anti-patterns such as missing early exits or costly dependency upgrades. We expect EnergyTrackr to assist developers in accurately monitoring energy regressions and improvements within their projects, identifying code anti-patterns, and helping them optimize their source code to reduce software energy consumption.
📬 Weekly AI Paper Digest
Get the top 10 AI/ML arXiv papers from the week — summarized, scored, and delivered to your inbox every Monday.