SEAILGJul 7

Static Metrics Are Insufficient: Predicting Java Method Energy Usage with Execution Time

arXiv:2607.061244.1
Predicted impact top 83% in SE · last 90 daysOriginality Synthesis-oriented
AI Analysis

For Java developers, this work demonstrates that static metrics are insufficient for energy prediction and that execution time is a key predictor, enabling early energy-aware design decisions.

The study investigates whether static source code metrics combined with execution time can predict Java method energy consumption. Results show static metrics alone yield near-zero R², but adding execution time improves R² to 0.46.

The increasing energy demand of software systems is raising concerns about their environmental impact and associated costs. Reasoning on energy usage early in the development flow has the potential to significantly reduce the overall energy usage of a software system, as it allows developers to make informed design and refactoring decisions before inefficiencies propagate. However, assessing energy usage without repeated profiling and direct measurement is difficult, which limits early reasoning in practice. This study investigates the limits of method-level energy prediction in Java, examining whether static source code metrics complemented with method-level execution time can estimate the energy consumption of Java methods. We profile 2,786 Java methods to extract 33 static features and measure execution time and energy, then train and compare eleven regression models. Our findings show that static source code metrics alone yield poor predictive performance, with average R2 values close to zero. Incorporating execution time as a lightweight dynamic input significantly improves accuracy, raising R2 to as high as 0.46. Execution time, internal method calls, and cyclomatic complexity consistently emerge as the strongest predictors of energy consumption.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes