Manuscript Offprint
arXiv:2611.23203Identifying and Repairing Energy Smells with Agent Skills
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Energy smells are inefficient implementations that waste energy. Once code reaches production, these smells become costlier and riskier to fix, so energy efficiency checks should shift left, i.e., move earlier in the development lifecycle, to where code is written. Existing energy smell tools rely on fixed static rules and do not measure energy savings, whereas LLM-based optimizers mostly target execution time and rarely ground their changes in concrete smell definitions. To address both limitations, we present Dr. Greens, an agent skill that detects and repairs energy smells in Python code within the developer’s coding environment. The skill grounds the coding agent in our taxonomy of 12 energy smells and 65 root causes, augmented with repair guidance drawn from 230 measured cases. The skill also encapsulates a static analyzer and an independent verifier to confirm behavior preservation and energy saving for each attempted repair. We evaluated Dr. Greens in 18 sessions on three open-source repositories, with two models and three skill configurations. Of the 258 measured repairs, 68.6% saved energy, with a median saving of 24.9%. Compared with a baseline skill that lacks the taxonomy, the full skill found more energy smells with verified savings in all three repositories with both models. Dr. Greens helps developers detect energy hotspots and fix them reliably without altering program behavior, which makes energy-efficient development more feasible.
I Introduction
Software runs on computational resources that consume electricity and the consumption is steadily increasing. Data centers’ electricity demand grew by 17% in 2025 and is projected to double by 2030 [1]. Inefficient code patterns waste energy that may seem to cost little in a single run, but scale up to a significant waste across millions of executions [2]. Such wasteful code patterns are energy smells [3, 2].
However, unlike traditional code smells energy smells cannot be detected and resolved reliably statically alone. Whether a pattern wastes energy depends on several factors including hardware, input workload [2, 4], the measurement methods [5, 6]. Detecting and repairing energy smells therefore requires measurements under realistic inputs.
Despite the importance of energy-efficient software, only 18% of 122 surveyed programmers reported considering energy-efficiency during implementation [7]. As a result, inefficiencies accumulate unchecked [8], and AI-generated code makes this even worse [9]. Once code reaches production, similar to bugs in software systems, energy smells are costlier and riskier to fix, however, often de-prioritized over more prominent bugs and issues [8, 7, 10]. In this paper, we emphasize that energy-efficiency checks should therefore shift left, i.e., move earlier in the development lifecycle, so that inefficiencies are detected and corrected earlier before they become part of the production. Given developers’ increasing use of LLM-based coding agents [11], implementing energy-efficiency checks for coding agents is desirable and rational.
Existing approaches leave four key gaps. First, static analysis tools rely on pre-defined, hand-written rules [12, 13, 14, 15]. Due to that, they cannot reason about runtime context or verify energy savings. Agentic refactoring approaches that rely on static analyzers inherits these weaknesses and can even degrade energy efficiency [16]. Second, LLM-based optimizers mainly target execution time [17, 18, 19, 20, 21], which does not consistently predict energy [2]. Third, most approaches, such as EffiSkill [20] and ECO [21], lack an iterative optimization mechanism guided by measured energy consumption. LASSI-EE [22] measures energy, but through a fixed workflow for GPU-related code. Finally, most approaches target code optimization at a small scope. EffiSkill and EnergAgent [23] target competitive programming problems, refactor single scripts or functions. Therefore, these approaches cannot directly spot and refactor inefficiencies in real-world code.
We present Dr. Greens, an agent skill [24] for Claude. A skill is a reusable unit of documented expertise that gives a coding agent domain knowledge, a working procedure, and executable tools [24]. It runs inside the developer’s coding agent and activates in response to a developer prompt, even when the developer does not explicitly ask for it. Our skill grounds the agent in our published taxonomy of 12 energy smells and 65 root causes [2]. The agent flags suspected smells, confirms each against the repair reference for its root cause, and repairs the confirmed ones, running and measuring code at every step. It submits each repair to a verifier that checks behavior against the original and measures both versions, on inputs from a separate generator [25, 26] so that the agent cannot tailor them to its repairs. After the session, we re-measure every repair and recommend only those that preserve behavior and save energy. On three open-source Python repositories with two models, 68.6% of the measured repairs save energy, with a median saving of 24.9%, a promising result given how context and hardware-dependent energy is. Our results also show that adding the taxonomy and the static analyzer to the skill leads the agent to find more energy smells.
In summary, this paper main contribution is Dr. Greens, to the best of our knowledge the first agent skill that detects and repairs energy smells in Python code, grounded in our published energy smell taxonomy. It equips the agent with our detailed knowledge cards, a detection and repair guide for each of the 65 root causes, built on 230 measured before-and-after cases, and with a static analyzer of 40 new rules and 31 Ruff rules that covers 49 root causes. We make the skill, the analyzer, and the measurement data accessible publicly in a replication package [27].
II-A Overview
Dr. Greens finds energy smells in a given repository and repairs them so that the repaired code uses less energy and preserves the original behavior. We target repositories mainly written in Python because it is among the most used programming languages [28], yet among the least energy-efficient [29]. The skill grounds the agent in our taxonomy [2], which defines energy smells, i.e., categories of inefficient code, and root causes, i.e., the specific code choices that cause the waste. Dr. Greens treats functions as the unit of analysis, and each repair replaces one function and addresses one root cause. Figure 1 shows a session and the steps the agent follows. We measure energy with CodeGreen [6], a profiler for fine-grained, low-noise energy measurement.
Fig. 1: Overview of a Dr. Greens session.
II-B Design Rationale
Four observations shape the design. First, the energy savings of a change depends on the hardware, the runtime, and the workload, so only running the code can establish it. We therefore build Dr. Greens for a coding agent, which can execute code during its analysis, and give it an energy probe that measures any function on inputs of its choice. Second, models without guidance struggle to recognize energy-inefficient code [9, 30, 31], while fixed workflows restrict what an agent can explore [22]. An agent skill [24] balances the two: it prescribes the steps and supplies the taxonomy, and the agent decides how to read, run, and test the code within each step. The agent loads reference files only when a step needs them, so the detailed cards do not fill its context unnecessarily. Third, an agent that reads thousands of functions can overlook a pattern, while a static rule checks every function but cannot judge context. We therefore add a static analyzer whose findings the agent reviews. Fourth, an agent that measures its own repairs could choose inputs that favor them. We therefore keep the evidence outside the agent’s control. The agent never edits the repository; a separate input generator creates its measurement inputs, a verifier checks and measures every repair, and we measure every repair again after the session. The developer can then apply the recommended repairs to their codebase.
II-C Reference Knowledge and Static Analyzer
Following the progressive disclosure design of agent skills [24], the reference knowledge has three levels of increasing detail. A taxonomy index gives a one-line description of what to look for under each root cause. Twelve category cards, one per energy smell, give a one-line repair for each of its root causes. Sixty-five root cause cards give the detail needed to confirm or reject a suspicion. Each holds the definition and example of its root cause, taken verbatim from the taxonomy, a description of how the waste appears in code, measured repair cases, and near-misses, i.e., code that resembles the root cause but where the repair would be wrong.
The taxonomy comes from studies across languages and whether a repair pays off depends on context. Two authors with more than five years of software engineering experience wrote repair cases that cover all root causes, with two to seven cases per root cause. Each case consists of a function with the waste (before), an equivalent function with the repair (after), and inputs. We measure each case with a paired protocol. Both versions first run on every input, and only versions with identical outputs proceed to measurement. Each version then runs the same number of calls, about three seconds of work, so that their energy readings are large enough to measure and directly comparable. We report the mean over nine pairs per input. An input counts as saving or costing energy only if the 95% confidence interval of the paired difference (Student’s over the nine pairs) excludes zero and the difference exceeds the noise floor, which we obtain by measuring a version against an identical copy of itself. Of the cases, save energy on some input and cost more on none. For of the root causes, at least one case saves energy without costing more on any input. A case that costs more does not refute its root cause, because our cases cover only a few forms of it. The cards therefore report each case with its per-input result and leave the judgment to the agent. Our static analyzer combines rules over Python’s syntax tree with Ruff rules [32] whose meaning implies a specific root cause. Each rule maps to one or more root causes, and together the rules cover of the . Whether a pattern wastes energy depends on context, so the analyzer reports observed patterns without judging them, e.g., “a string is grown with += inside a loop at line 45”, each tagged with the related root causes. To validate the rules, two authors wrote test cases, of which the analyzer must not report, i.e., false positive cases.
II-D Workflow
II-D1 Step 1 (Find)
Step 1 favors recall. The agent reads every function and records each suspicion with the root cause it resembles, the lines involved, and its reason. On a large repository, the agent may hand over groups of files to subagents, which keeps each context small. In this step, the agent sees only the taxonomy index and the category cards. When the analyzer is present, Step 1 ends by comparing its findings with the agent’s list. For each function or root cause that the analyzer flags and the agent missed, the agent reads the code and decides whether to add it.
II-D2 Step 2 (Decide)
Step 2 favors precision. The root cause cards become available at this step, and the agent examines every listed function in depth. It opens the card of each suspicion. It accepts the suspicion only if the card’s definition matches the code and the repair would preserve behavior on every input it considers, including edge cases. The near-misses on the cards help it reject code that resembles a root cause but where the repair would be wrong.
II-D3 Step 3 (Repair and Measure)
Finishing Step 2 gives the agent access to the input generator and the verifier. Since each measurement takes time, the skill limits how many repairs a session can measure. The agent repairs the accepted suspicions it expects to save the most and records the rest as deferred. Inputs. The agent requests inputs for the functions it plans to repair, and the input generator creates them with the DeepSeek V4.1 Flash model. For each function, it produces a few small edge inputs to check behavior, and four high-load measured inputs, which make the function run long enough for its energy to exceed the noise. Following GSO [25], we keep an input only if it runs on the original code and gives the same output twice, because a nondeterministic output cannot confirm equivalence. Following COFFE [26], the LLM writes eight candidate measured inputs, and we keep the four that use the most energy on the original code and together cover at least of the function’s statements. Verification. The agent submits each repair as the full new source of the function, with its root cause. The verifier runs every edge and measured input through both versions and compares the return value, the state of the arguments, the printed output, and the files written. Any difference makes the repair not equivalent. Otherwise, the verifier measures both versions on the measured inputs with the paired protocol (Section II-C). Verdicts. A repair is confirmed when it saves energy on all four inputs, and partial when it saves on some and changes nothing on the rest. It is mixed when it saves on some and costs more on others, regressed when every input that changes costs more, and negligible when no input changes beyond a noise floor of at most . When the noise floor exceeds , a repair is inconclusive, unless all four inputs save energy or at least one costs more. Only the five measured verdicts count toward the session’s limit, and a measured verdict is final. If a repair is not equivalent or fails to run, the agent may fix and resubmit it. Re-measurement. After the session, we measure every attempted repair again with the verifier, so that the reported results do not depend on the agent’s own measurements. Only one repair per function can be applied, so among the confirmed repairs of a function we recommend the one with the highest mean saving. The agent then ends the session with a summary that lists each repair with its root cause and verdict (Step 4, Finish).
III Evaluation
Setup. We compare three skills of Dr. Greens to understand the contribution of each knowledge layer. The Core skill includes the energy probe, the input generator, and the verifier, but omits the taxonomy, so the agent judges waste from its own knowledge. The Core+Tax skill adds the taxonomy index, the category cards, and the root cause cards, and the Full skill further adds the static analyzer. We run the skills in Claude Code with permission to run any command. We use two models of different capability and cost, Claude Sonnet 5.5 and Claude Haiku 5.5, both at high reasoning effort. We sample Python repositories with SEART GitHub Search [33], requiring at least stars, commits, and a push after Sept 12, 2026. We screen the first ten repositories and retain those for which package installation succeed and the code runs successfully. Three repositories meet with all criteria: vespa-engine/sample-apps ( functions), dnanexus/dx-toolkit ( functions), and open-telemetry/community ( functions). We run one session per repository, skill, and model, i.e., sessions. Each session runs independently on a dedicated server with two Intel Xeon E5-2650 processors. The verifier serves as the oracle: a repair is correct when it preserves behavior and saves energy.
Results. Table I reports each session. A smelly function is a function with at least one accepted smell. A repair saves energy when its verdict is confirmed or partial.
TABLE I: Results per session. C = Core, T = Core+Tax, F = Full. Bold marks the best skill per repo. and model.
| Sonnet | Haiku | ||||||
|---|---|---|---|---|---|---|---|
| Smelly | Saving/ | Median | Smelly | Saving/ | Median | ||
| Repo | Skill | (%) | meas. | (%) | (%) | meas. | (%) |
| sample-apps | C | 39 (8.8) | 12/20 | 33.2 | 41 (9.3) | 11/15 | 23.3 |
| T | 83 (18.7) | 16/20 | 19.8 | 81 (18.3) | 16/20 | 26.3 | |
| F | 102 (23.0) | 13/20 | 15.1 | 56 (12.6) | 15/20 | 24.5 | |
| dx-toolkit | C | 46 (1.8) | 13/20 | 56.7 | 57 (2.2) | 1/5 | 99.7 |
| T | 83 (3.3) | 14/20 | 40.8 | 70 (2.8) | 6/9 | 48.3 | |
| F | 178 (7.0) | 10/20 | 29.6 | 94 (3.7) | 10/12 | 39.5 | |
| community | C | 9 (9.5) | 7/8 | 23.1 | 11 (11.6) | 4/6 | 21.6 |
| T | 16 (16.8) | 10/14 | 10.8 | 15 (15.8) | 4/7 | 10.3 | |
| F | 21 (22.1) | 12/17 | 5.1 | 13 (13.7) | 3/5 | 18.3 |
Most repairs save energy
The agents submitted repairs, of which received a measured verdict. Our re-measurement shows that of these save energy (95% CI to ), with a median saving of (95% CI to ). Both intervals come from a percentile bootstrap that resamples the sessions times. Sonnet and Haiku save energy at similar rates, and of their measured repairs, so the share of verified repairs holds across models of different capability.
The taxonomy widens what the agent finds
Both taxonomy skills find more smelly functions than Core on every repository and with both models. The static analyzer raises the count in four of the six combinations, including all three with Sonnet, adding to functions per session. With either taxonomy skill, Sonnet finds more smelly functions than Haiku on every repository, while with Core Haiku finds more. To test whether this gap reflects model capability, we also ran the three skills with Claude Opus 5.5 on sample-apps. Opus finds the most smelly functions with every skill, and the taxonomy roughly doubles its count ( with Core+Tax and with Full, against with Core), while producing at least as many saving repairs as Sonnet and Haiku.
Wider search adds smaller savings
Core has the highest median savings in five of the six combinations of repository and model, but it produces fewer saving repairs (, against for Core+Tax and for Full). On functions that two skills repair with the same model, their best savings are about the same (median difference ). With Haiku, the three medians are close ( to ). With Sonnet, the taxonomy skills also repair functions that Core misses, mostly with small savings (median ). The static analyzer shows the same pattern. Because several sessions often write the same edit, we count each distinct edit once, which leaves edits, of which save energy. However, the analyzer flags only of all functions; of these edits change a flagged function. Edits to flagged functions save energy more often than other edits ( vs ), but their median saving is percentage points lower (95% CI to , bootstrap over edits). The knowledge layers therefore let the agent catch smaller savings that it would otherwise miss.
Takeaway. Of measured repairs, Dr. Greens optimizes cases, with a median saving of .
IV Implications
Dr. Greens has implications for practice and research. Developers can use it within their agentic workflows to keep their code energy-efficient. Reviewing measured repairs replaces searching for waste manually, and the repairs show which coding habits waste energy. Organizations can treat energy as a quality attribute during development, not after release. The static analyzer can run on every commit, and the full skill can run before each release. Tool builders can extend the approach to other languages or adapt it to other quality attributes, such as performance or memory use. Model developers can use the verified repairs as training data for code models that generate efficient code from the start, and as a benchmark for energy-aware agents. Researchers can use the skill to study what models know about energy without guidance and how agents decide what to repair. Runs on more repositories can show which energy smells are most common in which domains.
V Related Work
Energy smells. Early work measured the effect of energy smells on an embedded system [3] and proposed removing them with reengineering services [34]. Later catalogs targeted mobile apps [35] and the web [36], each covering one domain or platform. Our prior work [2] addresses this with a language-agnostic taxonomy of 65 root causes under 12 energy smells.
Performance inefficiencies. Earlier work catalogs performance antipatterns [37] and finds them with rule-based checkers [38] and linters such as Perflint and Ruff [39, 32], and learned models [40, 41]. LLM-based optimizers guide generation with mined antipatterns or optimization rules [21, 17], package slow-to-fast transformations as agent skills [20], or give a coding agent profiler feedback and a verifier across a repository, as PerfAgent does [19]. All of them target performance, although faster is not always more energy-efficient [2].
Energy inefficiency tools. Most energy smell detectors target Android, either by running the app [42] or by static analysis [43], and some also refactor the smells they find [12, 13]. ecoCode [14], now creedengo [15], brings such rules to SonarQube for several languages. Among LLM-based approaches, Di Fiore et al. [16] let a team of LLM agents fix the smells that SonarQube plugins report in Java classes. LASSI-EE [22] and EnergAgent [23] use energy measurements feedback to refine parallel and LLM-generated C++ code.
Energy efficiency of LLM-generated code. Studies comparing code generated by different LLMs and configurations [44, 45] find that asking for energy-efficient code does not reliably save energy [30]. Rajput et al. [9] instead train a code model on simulated energy feedback.
VI Threats to Validity
For construct validity, the four inputs on which a repair is measured may not represent the data a unit receives in practice. We mitigate this by generating most high-load test cases that impact energy, keeping only inputs that cover at least 40% of its statements. For internal validity, energy readings may be distorted by noise. We mitigate this by running one session at a time on a dedicated machine, alternating both versions in one process inside their own repository, and counting only differences above a measured noise floor. External validity threats the generalizability of the results. We mitigate this by sampling repositories across domains and sizes and keeping the skill to plain instructions and scripts any model can follow.
VII Conclusions
Dr. Greens detects energy smells and repairs them with measured savings, by packaging an energy smell taxonomy, a static analyzer, and an independent verifier as an agent skill that runs inside the developer’s coding environment. In an evaluation across distinct combinations of repositories, models, and skills, Dr. Greens generated measureable repairs; % successfully yielded energy savings, with a median energy saving of %. By bringing energy checks to where code is written, Dr. Greens gives developers practical support to measure how green their software is and to fix energy smells through automated refactoring across domains.
References
[1] International Energy Agency (2026) Key questions on energy and AI. Technical report IEA. Note: Licence: CC BY 4.0 External Links: Link Cited by: §I.
[2] M. Mehditabar, S. Rajput, and T. Sharma (2026) Watts this smell: a comprehensive taxonomy of software energy smells. In 2026 IEEE International Conference on Software Maintenance and Evolution (ICSME), Cited by: §I, §I, §I, §I, §II-A, §V, §V.
[3] A. Vetro, L. Ardito, G. Procaccianti, M. Morisio, et al. (2013) Definition, implementation and validation of energy code smells: an exploratory study on an embedded system. In Proceedings of ENERGY 2013: The Third International Conference on Smart Grids, Green Communications and IT Energy-aware Technologies, Cited by: §I, §V.
[4] S. Rajput and T. Sharma (2026) Energy flow graph: modeling software energy consumption. In Proceedings of the 34th ACM International Conference on the Foundations of Software Engineering, Cited by: §I.
[5] S. Rajput, T. Widmayer, Z. Shang, M. Kechagia, F. Sarro, and T. Sharma (2024) Enhancing energy-awareness in deep learning through fine-grained energy measurement. ACM Transactions on Software Engineering and Methodology. Cited by: §I.
[6] S. Rajput and T. Sharma (2026) CodeGreen: towards improving precision and portability in software energy measurement. In Proceedings of the 34th ACM International Conference on the Foundations of Software Engineering, Cited by: §I, §II-A.
[7] C. Pang, A. Hindle, B. Adams, and A. E. Hassan (2015) What do programmers know about software energy consumption?. IEEE Software. Cited by: §I.
[8] D. Maia, M. Couto, J. Saraiva, and R. Pereira (2020) E-debitum: managing software energy debt. In Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering, Cited by: §I.
[9] S. Rajput and T. Sharma (2026) Beyond the need for speed: energy-aware code generation via simulation-guided reinforcement learning. arXiv preprint arXiv:2607.04577. Cited by: §I, §II-B, §V.
[10] X. Li, J. Chen, Y. Liu, K. Wu, and J. P. Gallagher (2023) Combatting energy issues for mobile applications. ACM Transactions on Software Engineering and Methodology. Cited by: §I.
[11] H. Li, H. Zhang, and A. E. Hassan (2026) Aidev: studying ai coding agents on github. In Proceedings of the 23rd International Conference on Mining Software Repositories, Cited by: §I.
[12] L. Cruz, R. Abreu, and J. Rouvignac (2017) Leafactor: improving energy efficiency of android apps via automatic refactoring. In 2017 IEEE/ACM 4th International Conference on Mobile Software Engineering and Systems (MOBILESoft), Cited by: §I, §V.
[13] A. Ribeiro, J. F. Ferreira, and A. Mendes (2021) Ecoandroid: an android studio plugin for developing energy-efficient java mobile applications. In 2021 IEEE 21st international conference on software quality, reliability and security (QRS), Cited by: §I, §V.
[14] O. Le Goaer and J. Hertout (2022) Ecocode: a sonarqube plugin to remove energy smells from android projects. In Proceedings of the 37th IEEE/ACM International conference on automated software engineering, Cited by: §I, §V.
[15] Green Code Initiative Creedengo: rules specifications for energy-efficient code. Note: https://github.com/green-code-initiative/creedengo-rules-specificationsAccessed: November 2026 Cited by: §I, §V.
[16] G. M. Di Fiore, J. Di Rocco, and H. Muccini (2026) Automated energy smell refactoring of Java code: an LLM agents-based approach. In Proceedings of the International Conference on the Quality of Information and Communications Technology (QUATIC), Cited by: §I, §V.
[17] Y. Zhao, Y. Xiao, Q. Xiao, Z. Zhang, and Y. Xiong (2026) SemOpt: llm-driven code optimization via rule-based analysis. ACM Transactions on Software Engineering and Methodology. Cited by: §I, §V.
[18] J. Bai, R. Xu, S. Wu, D. Yang, J. Zhao, and G. Chen (2025) POLO: an llm-powered project-level code performance optimization framework.. In IJCAI, Cited by: §I.
[19] R. Deng, Y. Liu, B. Lipka, Y. Ma, X. Chen, T. Kaler, and J. Ganhotra (2026) PerfAgent: profiler-guided iterative refinement for repository-level code optimization. arXiv preprint arXiv:2607.19653. Cited by: §I, §V.
[20] Z. Wang, Y. Shi, M. Li, Z. Liu, J. M. Zhang, C. Wan, and X. Gu (2026) Effiskill: agent skill based automated code efficiency optimization. arXiv preprint arXiv:2603.27850. Cited by: §I, §V.
[21] H. Lin, M. Maas, M. Roquemore, A. Hasanzadeh, F. Lewis, Y. Simonson, et al. (2026) ECO: an AI-driven code efficiency optimizer for warehouse scale computers. In 20th USENIX Symposium on Operating Systems Design and Implementation (OSDI), Cited by: §I, §V.
[22] M. T. Dearing, Y. Tao, X. Wu, Z. Lan, and V. Taylor (2025) Leveraging llms to automate energy-aware refactoring of parallel scientific codes. arXiv preprint arXiv:2505.02184. Cited by: §I, §II-B, §V.
[23] J. Scheffler and M. Westing (2025) EnergAgent: energy-aware code refinement with llm-based agents. In EnviroInfo 2025, Cited by: §I, §V.
[24] Anthropic (2025) Agent Skills Overview. Note: https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview Cited by: §I, §II-B, §II-C.
[25] M. Shetty, N. Jain, J. Liu, V. Kethanaboyina, K. Sen, and I. Stoica (2026) Gso: challenging software optimization tasks for evaluating swe-agents. Advances in Neural Information Processing Systems 38. Cited by: §I, §II-D3.
[26] Y. Peng, J. Wan, Y. Li, and X. Ren (2025) Coffe: a code efficiency benchmark for code generation. Proceedings of the ACM on Software Engineering (FSE). Cited by: §I, §II-D3.
[27] Ctrl+Shift+Left: Detecting and Refactoring Energy Smells using Agent Skills External Links: Link Cited by: §I.
[28] GitHub (2024) Octoverse: AI leads Python to top language as the number of global developers surges. Note: https://github.blog/news-insights/octoverse/octoverse-2024/Accessed: November 2026 Cited by: §II-A.
[29] R. Pereira, M. Couto, F. Ribeiro, R. Rua, J. Cunha, J. P. Fernandes, and J. Saraiva (2021) Ranking programming languages by energy efficiency. Science of Computer Programming. Cited by: §II-A.
[30] R. Apsan, V. Stoico, M. Albonico, R. Dhar, K. Vaidhyanathan, and I. Malavolta (2026) Generating energy-efficient code via large-language models-where are we now?. In Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering, Cited by: §II-B, §V.
[31] F. Gulu-zada and H. Anwar (2026) Balancing green and clean code: prompting for llm-based refactoring. In 20th International Symposium on Empirical Software Engineering and Measurement (ESEM 2026), Cited by: §II-B.
[32] Astral Software (2023) Ruff: rules reference. Note: https://docs.astral.sh/ruff/rules/ Cited by: §II-C, §V.
[33] O. Dabic, E. Aghajani, and G. Bavota (2021) Sampling projects in github for MSR studies. In 18th IEEE/ACM International Conference on Mining Software Repositories, MSR 2021, Cited by: §III.
[34] M. Gottschalk, M. Josefiok, J. Jelschen, and A. Winter (2012) Removing energy code smells with reengineering services. In INFORMATIK 2012, Cited by: §V.
[35] L. Cruz and R. Abreu (2019) Catalog of energy patterns for mobile applications. Empirical software engineering. Cited by: §V.
[36] P. Rani, J. Zellweger, V. Kousadianos, L. Cruz, T. Kehrer, and A. Bacchelli (2024) Energy patterns for web: an exploratory study. In Proceedings of the 46th International Conference on Software Engineering: Software Engineering in Society, Cited by: §V.
[37] C. U. Smith and L. G. Williams (2000) Software performance antipatterns. In Proceedings of the 2nd international workshop on Software and performance, Cited by: §V.
[38] G. Jin, L. Song, X. Shi, J. Scherpelz, and S. Lu (2012) Understanding and detecting real-world performance bugs. ACM SIGPLAN Notices. Cited by: §V.
[39] A. Shaw (2022) Perflint: a Python linter for performance anti-patterns. Note: https://github.com/tonybaloney/perflint Cited by: §V.
[40] G. Zhao, S. Georgiou, S. Hassan, Y. Zou, D. Truong, and T. Corbin (2024) Enhancing performance bug prediction using performance code metrics. In Proceedings of the 21st International Conference on Mining Software Repositories, Cited by: §V.
[41] S. Garg, R. Z. Moghaddam, C. B. Clement, N. Sundaresan, and C. Wu (2022) Deepdev-perf: a deep learning-based approach for improving software performance. In ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, Cited by: §V.
[42] Y. Liu, C. Xu, S. C. Cheung, and J. Lü (2014) GreenDroid: automated diagnosis of energy inefficiency for smartphone applications. IEEE Transactions on Software Engineering. External Links: Document Cited by: §V.
[43] G. Hecht, R. Rouvoy, N. Moha, and L. Duchien (2015) Detecting antipatterns in android apps. Ph.D. Thesis, INRIA Lille; INRIA. Cited by: §V.
[44] L. Solovyeva, S. Weidmann, and F. Castor (2025) Ai-powered, but power-hungry? energy efficiency of llm-generated code. In IEEE/ACM Second International Conference on AI Foundation Models and Software Engineering (Forge), Cited by: §V.
[45] H. Ashraf, S. M. Danish, A. Leivadeas, Y. Otoum, and Z. Sattar (2025) Energy-aware code generation with llms: benchmarking small vs. large language models for sustainable ai programming. In 2025 3rd International Conference on Foundation and Large Language Models (FLLM), Cited by: §V.