CS Paper Radar

Smells and Refactorings for Software Environmental Sustainability: A Systematic Literature Review

Ornela Danushi, Flavio Sampirisi, Jacopo Soldani, Stefano Forti, Antonio Brogi

cs.SE ·submitted 2026-10-02 14:52 UTC · v1
survey

Abstract

Context: The environmental impact of ICT is constantly growing. Enhancing its environmental sustainability requires dealing with energy-hungry software systems, by possibly reducing their footprint. Objective: To better frame the problem and its persistent nature, software can be viewed as carrying structural inefficiencies regardless of how advanced its functionality may be. Identifying these inefficiencies as "green smells" provides a basis for refactoring code to mitigate its ecological impact. We aim at identifying well-known green smells impacting environmental sustainable software and map them to corresponding refactoring aimed at reducing the impact therein. Method: In this article, we conduct a systematic literature review on the articles that discuss green smells and their possible refactorings. We analyse and classify 66 primary studies published up to March 2026. Results: We identify 20 smells impacting environmental sustainability of software. Each smell is associated with one or more refactoring techniques known to mitigate their negative effects on the environmental sustainability of software. Conclusions: The literature witnesses the interest in resolving the green smells affecting software systems. The catalogued green smells and the corresponding refactorings can provide pragmatic value for practitioners in their daily development workflows, while also offering researchers a starting point to establish new research directions in sustainable software engineering.

Closest papers

Nearest neighbours by meaning across the whole index.

No One Left Behind: Cross-Level Analysis for Sustainable Software Engineering

cs.SE ·2026-09-03 ·Masoum Salehi, Sandro Schulze, Jacob Krüger
top venueposition similarity 0.69
Abstract · Accepted for publication at the 2026 IEEE International Conference on Software Maintenance and Evolution (ICSME)

Software engineers expect a software system to be efficient, maintainable, economically viable, and socially responsible throughout its lifecycle. Unfortunately, decisions made at the organizational, process, or product levels of software development - even when they improve one of these goals - often have unintended long-term consequences at other levels. In response, software-engineering research has explored different ways to achieve software sustainability, including energy efficiency, resource optimization, and code maintainability. However, existing research offers limited explanations for how sustainability problems emerge and reinforce one another across the socio-technical levels of software engineering. Moreover, we argue that sustainability challenges are not isolated but rather systemic: They stem from interactions among organizational priorities, development practices, and technical conditions. In this vision paper, we introduce the concept of sustainability antipatterns to capture conditions that systematically produce unsustainable outcomes. We demonstrate how this concept can help expose cross-level misalignments between socio-technical levels and sustainability dimensions that remain difficult to recognize through artifact-centric or dimension-specific analyses. To guide future research, we outline concrete directions for identifying, formalizing, detecting, and mitigating sustainability anti-patterns. We envision sustainability anti-patterns as a foundation for an integrated and actionable research agenda on sustainable software engineering.

0.40

The Green Software Landscape: A Systematic Mapping Study on Evolution, Applications, Software Lifecycle, and Best Practices

cs.SE ·2026-08-26 ·Max Hort, Maria Kechagia, Federica Sarro
similarity 0.65
Abstract · 29 pages, 6 figures

Energy consumption and climate change have made sustainability critical in Software Engineering (SE), driving the emergence of Green SE. Over the past 15 years, numerous solutions for sustainable software systems have been published by the SE community, offering a rich resource for analyzing the field's evolution. To explore this, we conducted a systematic mapping study of Green SE research published between 2010 and 2024. We collected 390 publications, categorizing them by application domain (e.g., mobile, cloud, AI) and research type (e.g., optimisation study, benchmarking, literature review Additionally, we analyzed a representative subset of 79 papers to classify the key elements-such as hardware, measurement, stability, and replicability-considered during energy measurement experiments. Our findings indicate that SE conferences host the majority of energy-related literature. Notably, Green SE studies surged in popularity starting in 2023, largely driven by AI-related publications. Optimization and benchmarking emerged as the most prevalent research types. Ultimately, we aim to inform the SE community about current approaches to energy concerns, highlight critical experimental practices, and advocate for continued action toward more sustainable software engineering.

0.18

Identifying and Repairing Energy Smells with Agent Skills

cs.SE ·2026-11-17 ·Mohammadjavad Mehditabar, Saurabhsingh Rajput, Tushar Sharma
code/data similarity 0.62
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.

0.39

Software Refactoring Research with Large Language Models: A Systematic Literature Review

cs.SE ·2026-11-10 ·Sofia Martinez, Luo Xu, Mariam Elnaggar, Eman Abdullah AlOmar
publishedsurvey similarity 0.62
Abstract

Background: Code refactoring is the improvement of code internally without changing the external functionalities of the program. Due to its exhaustive nature, developers often avoid manually refactoring code. Researchers have since looked into utilizing LLMs to automate the task of refactoring. Aim and Method: Despite the promising results, there is a lack of clear un- derstanding of LLMs' effectiveness in automated refactoring. Result: From our literature review we found that: (i) there are various tools that different studies use to enhance and study LLM-driving refactoring, with tools that were used to detect code smells, generate code bases, and compare refactoring outcomes. (ii) Various datasets were collected from multiple open- source projects in multiple programming languages for analysis. These platforms included GitHub, Apache, and F-Droid, with the most popular language collec- ted and analyzed being Java. (iii) One-Shot, Few-Shot, Context-Specific, and Chain-of-Thought prompting methods have been shown to be the most effective depending on the language used. In some instances, being capable of reducing code smell by up to 89%. (iv) The definition of "accuracy" varies significantly across the literature surveyed, as this depends on the context of the study, thus calling for a need to have a standardized measurement for Accuracy. (v) The most often mentioned code smells were Large Class and Long Method, with a lot of studies also not specifying, while the most often applied refactoring type is Extract Method, showing promising results in using LLM to perform this refactoring type. (vi) When working with LLMs, they often generate erroneous code, struggle with more complex refactoring, and often misunderstand the developers' requests and miss refactoring requests.

0.40

SmellCC: A Tool for Automated Code Smells Remediation

cs.SE ·2026-08-10 ·Xiaoting Zhang, Yujie Zhang, Zhipeng Gao, Xing Hu, Xin Xia
top venue similarity 0.58
Abstract

Code smells significantly threaten software maintainability by accumulating technical debt, yet developers often lack the resources to manually address these flaws under tight release schedules. While static analysis tools like SonarQube provide precise detection, they function largely as passive alert systems, leaving the burden of refactoring on developers. To bridge this gap, we present a novel cleaning tool, namely SmellCC, a Visual Studio Code extension that augments SonarQube with an LLM-based pipeline to automatically detect and refactor Python code smells. By employing Chain-of-Thought (CoT) and few-shot learning, SmellCC provides in-place, one-click remediation for the top-10 most frequent smells, effectively preventing the accumulation of technical debt during development. Our quantitative evaluation demonstrates that our SmellCC is promising in helping developers effectively eliminate code smells (96.8\% cleaning rate) with high accuracy (i.e., 91.3\%), ensuring that the refactored code remains syntactically correct and behavior-preserving, thereby significantly improving long-term software maintainability.

0.34

REFINE: A Multi-Agent LLM Approach for Evidence-Guided Code Refactoring

cs.SE cs.AI ·2026-08-21 ·Muhammad Waseem, Aakash Ahmad, Pekka Abrahamsson
code/data similarity 0.58
Abstract · Preprint. 450 Java files from 15 open-source systems; 1,350 model-pass outputs across three LLM configurations. The accompanying replication…

Large Language Models (LLMs) offer new opportunities for automated code refactoring. However, generated changes must reduce targeted quality problems without introducing new issues or altering behaviour-relevant code structures. We introduce REFINE (Refactoring with Evidence-aware Flow for Integrated ageNtic Execution), a tool-agnostic, evidence-aware multi-agent approach for generating Java file-level refactoring candidates. REFINE combines static-analysis-guided smell identification, smell-informed planning, LLM-based transformation, automated re-analysis, preservation checks, and structured reporting. We evaluate REFINE on 450 Java files from 15 open-source systems, producing 1,350 model-pass outputs using OpenAI GPT-5.5, Google Gemini 3.1 Pro Preview, and Anthropic Claude Opus 4.8. REFINE reduces detected code smells by 68.26%, 72.79%, and 68.49% across the three configurations, respectively, with the strongest reductions observed for major smells. A matched 150-file direct-prompt baseline shows that REFINE achieves a higher median code-smell reduction with smaller edits and fewer public-method removals. However, broader quality improvements are inconsistent, and preservation checks reveal residual risks, including assert/fail-call changes and public-method removal. Therefore, REFINE outputs should be treated as refactoring candidates requiring compilation, testing, dependency analysis, and human review before adoption in repository- or system-level settings.

0.23

GHA-SmellFix: Taking Action with Agentic LLMs for Detecting and Refactoring GitHub Actions Workflow Smells

cs.SE cs.MA ·2026-11-11 ·Anderson Uchôa, Jhefferson Souza, Emanuel Ávila, Gabriel Silva, Kevin Lira +5 more
similarity 0.58
Abstract

Continuous integration and continuous delivery workflows are key artifacts in software projects. In GitHub Actions, they encode build, test, release, deployment, and security automation in YAML. These workflows contain configuration smells affecting security, reliability, maintainability, or operational stability. Existing approaches are mostly rule-based, with rules hard to create and evolve, and typically report findings without fixes. Agentic LLM pipelines can combine contextual detection, transformation selection, and patch generation. Specialized agents can gate refactoring on positive detection verdicts, potentially avoiding unnecessary changes, but it is unclear whether decomposition improves effectiveness or mainly changes overhead. We present GHA-SmellFix, an agentic LLM pipeline for detecting and refactoring GitHub Actions workflow smells. We compare two designs: Joint, where one agent detects and refactors, and Decomposed, where separate agents detect and then refactor. We operationalize 19 smells from an existing catalog with explicit detection criteria, refactoring expectations, exclusion rules, and safety checks, and curate a ground truth of 1,710 (workflow, smell) pairs. We evaluate the designs with four LLMs (GPT-5.4-nano, Gemini 3.5 Flash, Claude Haiku 4.5, and DeepSeek V4 Flash) on 570 sampled pairs. Results show that decomposition does not universally improve patch quality; its main benefit is controlling when patch generation is attempted. It helps models prone to missing smells and can reduce overhead by gating patches. Once a smell is correctly detected, clean refactoring is generally effective, making detection the main end-to-end bottleneck. However, false positives can trigger unnecessary edits to execution-relevant constructs. Practical CI/CD agents thus need reliable abstention and construct-aware validation alongside patch generation.

0.22

Beyond FAIR: A Fitness Function Framework for Sustainable Research Software

cs.SE cs.CR ·2026-10-07 ·Irdin Pekaric, Philipp Zech
similarity 0.55
Abstract

Research software sustainability is often assessed through the FAIR principles: findability, accessibility, interoperability and reusability. While important, FAIR does not cover all relevant sustainability concerns. Research software should also be environmentally responsible and secure over time. Excessive resource consumption increases environmental cost, while insecure software creates maintenance overhead, technical debt and barriers to reuse. To this end, in this paper, we extend a previously proposed fitness function framework for sustainable research software beyond FAIR. We introduce two additional sets of fitness functions: environmental functions targeting resource efficiency and execution footprint, and security functions targeting dependency health, vulnerability exposure and secure configuration. Together, these functions broaden continuous software assessment from FAIR compliance to a more complete view of sustainability. The resulting framework treats research software sustainability as a multidimensional property that includes FAIR, environmental responsibility and long-term security.

0.18