criyle's picture
Upload BUILD.md with huggingface_hub
c280231 verified
|
Raw History Blame Contribute Delete
3.52 kB

dataset_v2 — CodeNet Java compile errors, source-name aware

Status: compiled corpus, unlabelled. Published at https://huggingface.co/datasets/criyle/codenet-compile-errors-v2 (private false). Do not mix it with dataset_v1/: v1 uses the old Main.java convention and the 65-leaf v1 taxonomy; v2 has no labels yet.

Build

Step Command / source
Source iNeil77/CodeNet, Java split
Filter status == "Compile Error" (53,023 submissions)
Sandbox http://10.0.0.162:5050, OpenJDK 21.0.12.1
Compile javac under the declared public top-level class name; Main.java fallback
Build uploader/04_build_dataset_v2.py
Publish uploader/05_publish_v2.py --repo criyle/codenet-compile-errors-v2

Result

Outcome Rows
Ingested Compile Error submissions 53,023
Compiled cleanly once named after the class (file-name artefacts) 18,465
Still failing (the corpus) 34,555
javac internal crashes (excluded) 3
Rows with no error: line 0

The source-name fix is the main difference from v1: s053550749, for example, was a Class name mismatch with file name row under Main.java; it compiles cleanly as MyClass.java and is excluded here. Of the 12,208 v1 rows labelled Class name mismatch with file name, 10,741 now compile cleanly and 944 still fail under the declared name (132 of the remaining corpus rows are multiple-public-class errors, where no single file name satisfies javac).

Corpus columns

row_id, sid, submission_id, pid, problem_id, uid, user_id, date, date_iso, source_name, code, compilemessage, compile_status, exit_code, javac_version, category, label_status, taxonomy_version, session_id, session_6h, source, original_status, code_size

  • category is empty and label_status=unlabelled; taxonomy_version=2.1.
  • session_id is a (user, problem) 2-hour session, computed over the full Java split (accepted submissions included); session_6h is the 6-hour variant.
  • 7,251 users, 1,747 problems, 20,567 sessions (mean 1.68, max 28 rows), 100% session coverage.
  • Date range 2010-01-04 → 2020-10-01.

Harness bug found and fixed during the build

The stock go_judge client asks the sandbox to copy out Main.class. When a clean submission declares only package-private classes (e.g. class q2) it produces q2.class, and go-judge returns File Error: open Main.class: no such file even though javac exited 0. The first pass therefore classified 3,583 clean submissions as compile_error. A compile-only request with no copyOutCached rechecked those rows: 3,580 were clean, 3 were real errors. The final corpus has 0 rows without an error: line. The three An exception has occurred in the compiler (21.0.12.1) rows are excluded as compiler_crash.

Files

  • corpus_v2.parquet — 34,555 still-failing submissions (the published train split)
  • compiled_all.parquet — 53,023 compile attempts, including artefacts and crashes
  • session_map_all.parquet — sessions over the full Java split
  • source_manifest.json — counts and SHA-256 hashes
  • categories.v2.yaml — active v2.1 taxonomy
  • codenet_v2.db — resumable build DB (gitignored)

Reproduce

.venv/bin/python uploader/04_build_dataset_v2.py
.venv/bin/python uploader/04_build_dataset_v2.py --recheck-no-error
.venv/bin/python uploader/04_build_dataset_v2.py --export-only
.venv/bin/python uploader/05_publish_v2.py --dry-run