File size: 5,234 Bytes
ccac5b9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
---
pretty_name: Defects4C SWE-bench-style export
language:
- code
tags:
- code
- program-repair
- defects4c
- swe-bench-style
configs:
- config_name: all
  default: true
  data_files:
  - split: test
    path: data/all.jsonl
- config_name: projects
  data_files:
  - split: test
    path: data/projects.jsonl
---

# Defects4C SWE-bench-style export

One instance per repository and fixing commit, joined from the local Defects4C
export. `all` includes projects, legacy projects_v1, and additional cached
commits. `projects` restricts to projects/. Duplicate metadata is retained in
bug_metadata_json. Cached-only instances use the first parent as base_commit.
The single test split is an organizational choice, not a validated benchmark
split. No repository-disjoint training partition is claimed.

## Load

```python
from datasets import load_dataset
ds = load_dataset("json", data_files="data/all.jsonl", split="train")
# Once this folder is uploaded to a Hugging Face dataset repository:
# ds = load_dataset("YOUR_NAME/DATASET_NAME", "projects", split="test")
```

## Fields and limitations

Core fields follow the [SWE-bench dataset structure](https://www.swebench.com/SWE-bench/guides/datasets/).
`base_commit` is the buggy revision; `head_commit` is the fixed revision.
`patch` contains changes outside the recorded test-file list; `test_patch`
contains changes to that list; `full_patch` contains both. The test-file list
is metadata, not an independently validated exhaustive classification.
Cached-only rows have no classification: their patch contains all changes.

`patch_source=local_git` and `patch_is_exact=true` mean a binary-capable diff
was generated directly between the two Git commits. API patches are reconstructed
text hunks and are **not guaranteed complete or applyable**: mode changes,
binary data, truncated hunks, or API file pagination may be absent. Known
missing file hunks are recorded in omitted_patch_files and flagged
cached_api_partial; other cached patches are cached_api_unverified. Missing
patches or base mismatches remain explicit. Empty patches do not imply no fix.

`problem_statement` uses a neutral repair request and the original diagnostic;
it does not insert the fixing commit message or gold code. The original errors
may be runtime/test output rather than compiler errors. No upstream issue text
is invented. `original_errors` preserves distinct messages; `commit_message`
and cached repair records are reference material that can leak the solution.

`FAIL_TO_PASS` and `PASS_TO_PASS` are JSON-encoded empty lists because test
transitions were not measured. `test_outcomes_verified` is false, and `version`
is empty because package versions were not established. This dataset needs
repository-specific environments, test runners, and result parsers before it
can be scored by the SWE-bench harness. Build success is not test validation.

`build_command` is provided for projects/ rows supported by checkout_build.py.
Legacy and cached-only rows retain available templates/configuration but have
no claimed runnable build command. `build_artifacts_json` includes existing
pre/post build scripts, logs, and summaries; no new builds are performed during
export. `build_templates_json` retains project and shared Jinja templates.

Fields ending in `_json`, plus original_errors, source_files, test_files,
omitted_patch_files and the test-transition fields, are JSON strings; decode
them with json.loads. This preserves heterogeneous source schemas in Arrow.
Other availability fields are booleans and all remaining columns are strings.

`source_data.tar.gz` preserves the complete original data/, projects/, and
projects_v1/ inputs and reproduction/export scripts, including unjoined records.
Cached source snapshots retain their original provenance; no revision identity
is asserted beyond the source record. checksums.json contains file SHA-256 sums.

## Coverage

```json
{
  "instances": 365,
  "repositories": 44,
  "collections": {
    "projects": 119,
    "projects_v1": 241,
    "cached_only": 5
  },
  "patch_sources": {
    "cached_api_unverified": 295,
    "cached_api_partial": 67,
    "local_git": 2,
    "missing": 1
  },
  "with_original_error": 362,
  "with_build_artifacts": 2,
  "verified_test_outcomes": 0
}
```

## Reproduce

From the original export (or after extracting source_data.tar.gz):

```sh
python3 export_hf_dataset.py --output /path/to/new/dataset
```

The exporter uses the Python standard library and performs no downloads. Put
existing builds under build/PROJECT/COMMIT/ before exporting to include their
artifacts and derive exact patches from their Git objects. Use a new destination
for each export. The archive does not include cloned repositories or binaries.

The JSONL files and this card use the [Hugging Face repository layout](https://huggingface.co/docs/datasets/repository_structure).
Upload this directory as a dataset repository to publish it. No upload is
performed by the exporter.

## Licensing

This export does not assign a new license to upstream code or cached content.
Each project's original license and attribution requirements continue to apply.
The source export does not establish a single dataset-wide redistribution license.