Advanced search
Start date
Betweenand

Energy Impact of Code Refactoring Using LLMs

Grant number: 26/04086-7
Support Opportunities:Scholarships in Brazil - Master
Start date: April 01, 2026
End date: March 31, 2028
Field of knowledge:Physical Sciences and Mathematics - Computer Science - Computational Mathematics
Principal Investigator:Markus Endler
Grantee:Alexandre César Brandão de Andrade
Host Institution: Centro Técnico Científico (CTC). Pontifícia Universidade Católica do Rio de Janeiro (PUC-Rio)
Associated research grant:23/00811-0 - EcoSustain - Computer and Data Science for the Environment, AP.TEM

Abstract

The research project "Energy Impact of Code Refactoring Using LLMs" aims to systematically investigate the effects of using large language models (LLMs) in automated code refactoring, with emphasis on evaluating the energy consumption associated with such transformations. Linked to the FAPESP Thematic Project EcoSustain - Data Science and Computing for the Environment (Proc. 2023/00811-0), the proposal is situated at the intersection of software engineering, artificial intelligence, and computational sustainability, seeking to produce empirical evidence on the impact of emerging generative AI techniques on relevant attributes of software systems.The central objective of the study is to analyze whether code refactorings generated with the support of LLMs can contribute to reducing the energy consumption of software artifacts without compromising their functional correctness or structural quality. To this end, the research starts from artifacts previously identified by specialized tools as containing quality issues (code smells), which will then be subjected to LLM-assisted refactoring processes. By comparing original and refactored versions, the study intends to evaluate, in a controlled and reproducible manner, changes in energy consumption, execution time, quality metrics, and the consistency of the transformations performed.From a methodological perspective, the project is organized into two complementary fronts. The first comprises a literature review and technical deepening on code refactoring, software quality, energy consumption, and the use of LLMs in code transformation tasks, including the study of prompting strategies, model selection, and evaluation criteria. This stage also includes the investigation of tools for measuring energy usage and computational cost, as well as the integration of the proposal into the experimental pipeline already adopted by the research group. The second front consists of carrying out the experiments, including the selection of code artifacts, the definition of protocols for the use of LLMs in generating refactorings, the application of different approaches, and the comparative measurement of results before and after transformation.The scientific relevance of the proposal stems from the need to understand, on an empirical basis, whether the use of LLMs in code improvement activities yields effective benefits from the perspective of computational sustainability, or whether, in certain contexts, it may introduce additional energy costs. Although AI-assisted refactoring has the potential to increase productivity, readability, and maintainability, studies examining its concrete effects on energy efficiency remain scarce. In this sense, the project seeks to fill an important gap in the literature by bringing together software quality, AI-driven automation, and energy evaluation within a single experimental framework.As its main contribution, the project is expected to propose a reproducible experimental methodology for the energy assessment of LLM-assisted refactorings, while also generating scientific knowledge about the scenarios in which such transformations produce gains, losses, or neutrality from an energy standpoint. The research will also contribute to strengthening the agenda of the EcoSustain Thematic Project by expanding the discussion on the role of computing and data science in promoting more sustainable technological practices. (AU)

News published in Agência FAPESP Newsletter about the scholarship:
More itemsLess items
Articles published in other media outlets ( ):
More itemsLess items
VEICULO: TITULO (DATA)
VEICULO: TITULO (DATA)