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.
翻译:自动化程序修复(APR)旨在自动化修复软件缺陷的过程,以降低维护软件程序的成本。近年来,APR方法的成功率(通过准确率指标衡量)不断提高。然而,以往的研究尚未考虑使用APR自动修复缺陷的能源影响。绿色软件研究领域致力于测量开发、维护和使用软件产品所需的能耗。本文首次将APR与绿色软件研究领域相结合。我们的主要目标是奠定测量APR活动能耗的基础。我们测量了十种用于Java的传统程序修复工具以及十个针对源代码微调的大型语言模型(LLM)在尝试修复来自Defects4J(一组真实缺陷程序)的实际缺陷时的能耗。该实验的初步结果表明,在能耗与正确修复缺陷的能力之间存在权衡:部分APR工具能够以低于其他工具的能耗实现更高的准确率。