Table of Contents
Fetching ...

FixEval: Execution-based Evaluation of Program Fixes for Programming Problems

Md Mahim Anjum Haque, Wasi Uddin Ahmad, Ismini Lourentzou, Chris Brown

TL;DR

FixEval presents a large, unit-test-driven benchmark of buggy/correct program fixes drawn from CodeNet, enabling both n-gram and execution-based evaluation of repair methods. By pairing buggy submissions with accepted ones and using AtCoder test suites under time/memory constraints, it exposes functional correctness as the primary evaluation criterion. The study shows conventional n-gram metrics often misalign with execution-based correctness, highlighting the need for execution-aware benchmarks and verdict-conditioned repair. It benchmarks PLBART and CodeT5, revealing that execution-based metrics better reflect real repair quality and that verdict information can aid fixes. The open-source dataset and analysis pave the way for improved evaluation and broader, verdict-aware program repair research.

Abstract

The complexity of modern software has led to a drastic increase in the time and cost associated with detecting and rectifying software bugs. In response, researchers have explored various methods to automatically generate fixes for buggy code. However, due to the large combinatorial space of possible fixes for any given bug, few tools and datasets are available to evaluate model-generated fixes effectively. To address this issue, we introduce FixEval, a benchmark comprising of buggy code submissions to competitive programming problems and their corresponding fixes. FixEval offers an extensive collection of unit tests to evaluate the correctness of model-generated program fixes and assess further information regarding time, memory constraints, and acceptance based on a verdict. We consider two Transformer language models pretrained on programming languages as our baseline and compare them using match-based and execution-based evaluation metrics. Our experiments show that match-based metrics do not reflect model-generated program fixes accurately. At the same time, execution-based methods evaluate programs through all cases and scenarios designed explicitly for that solution. Therefore, we believe FixEval provides a step towards real-world automatic bug fixing and model-generated code evaluation. The dataset and models are open-sourced at https://github.com/mahimanzum/FixEval.

FixEval: Execution-based Evaluation of Program Fixes for Programming Problems

TL;DR

FixEval presents a large, unit-test-driven benchmark of buggy/correct program fixes drawn from CodeNet, enabling both n-gram and execution-based evaluation of repair methods. By pairing buggy submissions with accepted ones and using AtCoder test suites under time/memory constraints, it exposes functional correctness as the primary evaluation criterion. The study shows conventional n-gram metrics often misalign with execution-based correctness, highlighting the need for execution-aware benchmarks and verdict-conditioned repair. It benchmarks PLBART and CodeT5, revealing that execution-based metrics better reflect real repair quality and that verdict information can aid fixes. The open-source dataset and analysis pave the way for improved evaluation and broader, verdict-aware program repair research.

Abstract

The complexity of modern software has led to a drastic increase in the time and cost associated with detecting and rectifying software bugs. In response, researchers have explored various methods to automatically generate fixes for buggy code. However, due to the large combinatorial space of possible fixes for any given bug, few tools and datasets are available to evaluate model-generated fixes effectively. To address this issue, we introduce FixEval, a benchmark comprising of buggy code submissions to competitive programming problems and their corresponding fixes. FixEval offers an extensive collection of unit tests to evaluate the correctness of model-generated program fixes and assess further information regarding time, memory constraints, and acceptance based on a verdict. We consider two Transformer language models pretrained on programming languages as our baseline and compare them using match-based and execution-based evaluation metrics. Our experiments show that match-based metrics do not reflect model-generated program fixes accurately. At the same time, execution-based methods evaluate programs through all cases and scenarios designed explicitly for that solution. Therefore, we believe FixEval provides a step towards real-world automatic bug fixing and model-generated code evaluation. The dataset and models are open-sourced at https://github.com/mahimanzum/FixEval.
Paper Structure (26 sections, 2 equations, 7 figures, 4 tables)

This paper contains 26 sections, 2 equations, 7 figures, 4 tables.

Figures (7)

  • Figure 1: Example submissions from the FixEval dataset. Buggy and fixed statements are marked in red and green, respectively.
  • Figure 2: Distribution of task difficulty (labels A to E indicate increasing difficulty) for the AtCoder problems belong to the test split in FixEval.
  • Figure 3: TCA increases as edit similarity between buggy and reference code increases for both Java and Python.
  • Figure 4: Pass@k accuracy (in Java) at different difficulty levels. Task labels A to E indicate increasing difficulty.
  • Figure 5: Pass@k accuracy (in Java) at different verdict labels, where CE = compilation error, WA = wrong answer, TLE = time limit exceeded, and RE = runtime error.
  • ...and 2 more figures