D4vidHuang's picture
Publish validated Stack v3 C++ ReFineID benchmark
5acee6c verified
|
Raw History Blame Contribute Delete
3.18 kB
---
license: other
language:
- code
pretty_name: RefineID-format C++ identifier recovery from The Stack v3
configs:
- config_name: default
data_files:
- split: test
path: test.parquet
---
# RefineID-format C++ identifier recovery from The Stack v3
This public benchmark contains **1,000** examples from **1,000**
source repositories and **3,961** masked identifier positions. Each
example is a full source file with one chosen identifier name masked at every
eligible identifier token position. The target is the original name.
## Format and use
`test.csv` has **no header** and exactly three columns in the same order as the
original RefineID benchmark: `id, code_masked, target`. IDs are `0` through
`999`. Each target position is the literal, whitespace-delimited
`[MASK]`. `test.parquet` holds the identical rows with named string columns and
is the default Hugging Face `test` split:
```python
from datasets import load_dataset
ds = load_dataset("D4vidHuang/refineid-stack-v3-cpp", split="test")
assert len(ds) == 1000
```
`provenance.jsonl` is aligned by ID and records the upstream repository, commit,
file path, content ID, detected SPDX licenses, source revision, source text hash,
and the half-open Unicode character spans used for masking. `manifest.json`
records checksums, parameters and corpus-level counts.
## Construction and interpretation
Source: [`HuggingFaceCode/stack-v3-train`](https://huggingface.co/datasets/HuggingFaceCode/stack-v3-train)
at commit `8f3f25d86e44fd691428131efd17af75d4716499`. We use the upstream PII-redacted,
quality-filtered train corpus and accept only files marked `permissive` with
detected licenses. Vendored files, short/oversized files, parse failures,
ambiguous identifier uses, and files with a few obvious remaining sensitive
patterns are excluded. Candidates whose target spelling remains visible in
comments, strings, or other code are also excluded. A seeded Parquet traversal selects at most one
example per repository for this language. This is a deterministic convenience
sample, **not a uniform random sample** of all Stack v3 files. See the manifest
for the exact seed and scan boundary.
The source is a single code snapshot. These examples evaluate **identifier
name recovery**; they are not observed before/after rename commits. Syntax-tree
filters reduce false targets, but they do not prove compiler-resolved binding,
compilation, or behavior. Original RefineID has a different source and length/
site distribution, so scores across the two datasets require separate reporting.
## License and removal
The Stack v3 collection is ODC-By. Each source file retains its original license;
this dataset does not assign one blanket license to the underlying code. Check the per-row
`detected_licenses` and upstream repository before reuse. License detection
and PII redaction are imperfect. The Stack v3 card documents its
[opt-out process](https://huggingface.co/datasets/HuggingFaceCode/stack-v3-train). We pin an
upstream release and will review new opt-outs before future republishes.
## Citation
Please cite The Stack v3 dataset card and the original RefineID paper when
using this benchmark.