Table of Contents
Fetching ...

Energy Consumption of Automated Program Repair

Matias Martinez, Silverio Martínez-Fernández, Xavier Franch

TL;DR

The paper addresses the neglected environmental impact of automated program repair by introducing a methodology to measure energy consumption of APR tools. It compares ten traditional APRs and ten LLM-based APRs on the Defects4J benchmark, using a wattmeter to compute the energy spent to find the first plausible patch, denoted $E_{fp}$. The findings reveal a trade-off between energy use and repair accuracy: some tools achieve higher accuracy with moderate energy, while others (notably certain traditional templates) consume substantial energy to reach plausible patches; among LLM-based approaches, CodeGen350M shows high efficiency and accuracy. This work lays the groundwork for greener APR, with future work targeting energy to first correct patches, total repair energy, bug-type breakdowns, and integration with efficiency metrics for practical deployment.

Abstract

Automated program repair (APR) aims to automatize the process of repairing software bugs in order to reduce the cost of maintaining software programs. Moreover, the success (given by the accuracy metric) of APR approaches has increased in recent years. However, no previous work has considered the energy impact of repairing bugs automatically using APR. The field of green software research aims to measure the energy consumption required to develop, maintain, and use software products. This paper combines, for the first time, the APR and Green software research fields. We have as main goal to define the foundation for measuring the energy consumption of the APR activity. We measure the energy consumption of ten traditional program repair tools for Java and ten fine-tuned Large-Language Models (LLM) on source code trying to repair real bugs from Defects4J, a set of real buggy programs. The initial results from this experiment show the existing trade-off between energy consumption and the ability to correctly repair bugs: Some APR tools are capable of achieving higher accuracy by spending less energy than other tools.

Energy Consumption of Automated Program Repair

TL;DR

The paper addresses the neglected environmental impact of automated program repair by introducing a methodology to measure energy consumption of APR tools. It compares ten traditional APRs and ten LLM-based APRs on the Defects4J benchmark, using a wattmeter to compute the energy spent to find the first plausible patch, denoted . The findings reveal a trade-off between energy use and repair accuracy: some tools achieve higher accuracy with moderate energy, while others (notably certain traditional templates) consume substantial energy to reach plausible patches; among LLM-based approaches, CodeGen350M shows high efficiency and accuracy. This work lays the groundwork for greener APR, with future work targeting energy to first correct patches, total repair energy, bug-type breakdowns, and integration with efficiency metrics for practical deployment.

Abstract

Automated program repair (APR) aims to automatize the process of repairing software bugs in order to reduce the cost of maintaining software programs. Moreover, the success (given by the accuracy metric) of APR approaches has increased in recent years. However, no previous work has considered the energy impact of repairing bugs automatically using APR. The field of green software research aims to measure the energy consumption required to develop, maintain, and use software products. This paper combines, for the first time, the APR and Green software research fields. We have as main goal to define the foundation for measuring the energy consumption of the APR activity. We measure the energy consumption of ten traditional program repair tools for Java and ten fine-tuned Large-Language Models (LLM) on source code trying to repair real bugs from Defects4J, a set of real buggy programs. The initial results from this experiment show the existing trade-off between energy consumption and the ability to correctly repair bugs: Some APR tools are capable of achieving higher accuracy by spending less energy than other tools.
Paper Structure (7 sections, 1 equation, 1 table)