criyle's picture
Create README.md
cb28713 verified
metadata
license: apache-2.0
task_categories:
  - text-generation
  - text-classification
language:
  - en
tags:
  - code
  - compiler-error
  - program-repair
  - codenet
  - debugging
size_categories:
  - 10K<n<100K

CodeNet Compiler Errors (Re-compiled 2026)

Dataset Summary

This dataset contains source code submissions from Project CodeNet that fail to compile. Unlike the original dataset metadata (which reflects compiler versions from 2011–2020), this dataset was re-executed in a modern Debian environment (2026) to generate up-to-date compiler error messages.

It is designed for research in:

  • Automated Program Repair (APR): Fixing compile-time errors.
  • Compiler Error Explanation: Training LLMs to explain why code fails.
  • Compiler Fuzzing/Robustness: Analyzing how modern compilers handle legacy broken code.

Supported Languages

  • C (GCC 14)
  • C++ (G++ 14, C++17 default)
  • Java (OpenJDK 21)

Dataset Structure

Data Instances

Each row represents a single submission that failed compilation.

{
  "submission_id": "s000017057",
  "problem_id": "p03070",
  "language": "C++",
  "code": "#include <iostream>\n...",
  "compiler_output": "a.cc: In function 'int main()':\na.cc:57:28: error: 'p1' was not declared in this scope..."
}

Data Fields

  • submission_id: The original ID from Project CodeNet.
  • problem_id: The problem identifier (e.g., p02389).
  • language: The programming language (C, C++, or Java).
  • code: The full source code of the submission.
  • compiler_output: The stderr (or stdout) captured from the compiler.

Creation Methodology

This dataset was derived by filtering Project CodeNet for submissions originally marked as Compile Error. These submissions were then fed into a clean sandbox environment using go-judge to verify the error and capture the modern compiler output.

Environment Details:

  • OS: Debian 13 (Trixie)
  • C/C++ Compiler: GCC 14.2.0
  • Java Compiler: OpenJDK 21.0.9
  • Sandboxing: Process isolation via Linux Namespaces (cgroups, unshare).

Filtering Criteria:

  1. Original CodeNet status was Compile Error.
  2. Re-compilation in the modern environment resulted in a non-zero exit code (exit_code != 0).
  3. Submissions that "accidentally" compiled successfully due to compiler drift (e.g., newer C++ standards being more permissive) were excluded to ensure high quality.

Citations

If you use this dataset, please cite the original Project CodeNet paper:

@inproceedings{puri2021codenet,
  title = {CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Tasks},
  author = {Puri, Ruchir and Kung, David and Janssen, Geert and Zhang, Wei and Domeniconi, Giacomo and Zolotov, Vladimir and Dolby, Julian T and Chen, Jie and Choudhury, Mihir and Decker, Lindsey and Thost, Veronika and Thost, Veronika and Buratti, Luca and Pujar, Saurabh and Ramji, Shyam and Finkler, Ulrich and Malaika, Susan and Reiss, Frederick},
  booktitle = {Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks},
  editor = {J. Vanschoren and S. Yeung},
  pages = {},
  url = {https://datasets-benchmarks-proceedings.neurips.cc/paper_files/paper/2021/file/a5bfc9e07964f8dddeb95fc584cd965d-Paper-round2.pdf},
  volume = {1},
  year = {2021}
}