Carreira, Afonso Vaz dos Santos Silva2026-01-152026-01-152025http://hdl.handle.net/10400.5/116622Tese de Mestrado, Engenharia Informática, 2025, Universidade de Lisboa, Faculdade de CiênciasIn recent years, energy use and management have become global concerns, with a growing search for renewable sources to reduce the ecological footprint. However, these alternatives are not always as accessible or reliable as traditional energy sources. The information and communication technology (ICT) sector is one area where significant reductions in energy consumption are possible. In 2020, around 7% of global electricity consumption was attributed to ICT, and this number is expected to rise due to increasing technological demand. Consequently, there is a growing need for developers to adopt energy-aware programming practices. This thesis aims to raise developers’ awareness of the energy consumption of their applications by presenting a framework for generating energy prediction models. The framework follows a structured process, beginning with the automatic generation of Java benchmark programs for specific collections methods or custom methods. These benchmarks are then analyzed to obtain energy profiles, which are used to train machine learning models capable of estimating energy consumption. The final models are then integrated in a VSCode extension tool that combines static analysis and machine learning to predict the code energy consumption, this allows to obtain an estimation of how much energy the code uses, withiout the need to execute it. The results show that the tool can support energy prediction for customized programs and highlight the relationship between input size and energy usage. While the relative accuracy is promising, further work is needed to improve the precision of absolute predictions and expand the applicability of the framework.application/pdfengGreen computingStatic code analysisEnergy predictionSustainable softwareEnergy-aware programmingEnergy aware programmingmaster thesis204174813