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 |
+
- code-review
|
| 12 |
+
- software-engineering
|
| 13 |
+
- docker
|
| 14 |
---
|
| 15 |
+
|
| 16 |
+
# Active-SWE
|
| 17 |
+
|
| 18 |
+
Active-SWE is a proactive bug-fixing benchmark for evaluating whether a coding
|
| 19 |
+
model can find and repair functional bugs from a set of files selected for
|
| 20 |
+
review. It is designed for local Docker-based evaluation and is different from
|
| 21 |
+
issue-based benchmarks that provide a complete issue description as the main
|
| 22 |
+
input.
|
| 23 |
+
|
| 24 |
+
The benchmark evaluates two kinds of instances:
|
| 25 |
+
|
| 26 |
+
- **simple**: an instance centered on one source bug.
|
| 27 |
+
- **hard**: an instance that combines multiple source bugs and supports
|
| 28 |
+
multi-bug validation.
|
| 29 |
+
|
| 30 |
+
The `set` column identifies the instance type. The same `instance_id` can occur
|
| 31 |
+
once in each set, so use `(set, instance_id)` as the stable key when combining
|
| 32 |
+
the two sets.
|
| 33 |
+
|
| 34 |
+
## Files
|
| 35 |
+
|
| 36 |
+
This dataset repository contains Parquet files only:
|
| 37 |
+
|
| 38 |
+
| File | Rows | simple | hard | Use |
|
| 39 |
+
| --- | ---: | ---: | ---: | --- |
|
| 40 |
+
| `Active-SWE.parquet` | 400 | 300 | 100 | Main evaluation set |
|
| 41 |
+
| `Active-SWE-Extend.parquet` | 1663 | 1411 | 252 | Extended evaluation set |
|
| 42 |
+
|
| 43 |
+
The extended set contains the larger evaluation pool. The main set is intended
|
| 44 |
+
for a smaller, faster evaluation run.
|
| 45 |
+
|
| 46 |
+
## Data fields
|
| 47 |
+
|
| 48 |
+
| Field | Description |
|
| 49 |
+
| --- | --- |
|
| 50 |
+
| `instance_id` | Public instance identifier |
|
| 51 |
+
| `repo` | Source repository in `owner/name` form |
|
| 52 |
+
| `base_commit` | Repository commit used as the evaluation base |
|
| 53 |
+
| `patch` | Ground-truth patch for oracle and evaluation use |
|
| 54 |
+
| `set` | `simple` or `hard` |
|
| 55 |
+
| `language` | Main programming language |
|
| 56 |
+
| `merged_at` | Source change timestamp, when available |
|
| 57 |
+
| `image` | Docker image used by the evaluation harness |
|
| 58 |
+
| `files_pending_review` | Files provided to the proactive review stage |
|
| 59 |
+
| `major_category` | Bug taxonomy labels |
|
| 60 |
+
| `test_framework` | Test framework used by the instance |
|
| 61 |
+
| `log_parser` | Harness log parser for the test output |
|
| 62 |
+
| `template` | Template used to render the evaluation command |
|
| 63 |
+
| `eval_script` | Instance-specific evaluation script |
|
| 64 |
+
| `FAIL_TO_PASS` | Tests expected to pass after the ground-truth fix |
|
| 65 |
+
| `PASS_TO_PASS` | Tests expected to remain passing |
|
| 66 |
+
| `source_f2p` | Source-level F2P mapping, mainly used for hard instances |
|
| 67 |
+
| `source_p2p` | Source-level P2P mapping, mainly used for hard instances |
|
| 68 |
+
| `edit_hunks` | Changed-file and hunk metadata |
|
| 69 |
+
|
| 70 |
+
The Parquet files include oracle and evaluation fields because they are needed
|
| 71 |
+
by the harness to calculate the benchmark metrics. They should not be exposed
|
| 72 |
+
as model input during generation. In particular, `patch`, `eval_script`,
|
| 73 |
+
`FAIL_TO_PASS`, `PASS_TO_PASS`, and source-level oracle fields are evaluation
|
| 74 |
+
inputs, not prompt fields for the proactive review model.
|
| 75 |
+
|
| 76 |
+
## Images
|
| 77 |
+
|
| 78 |
+
The `image` column contains the exact Docker image reference used by the
|
| 79 |
+
release harness. Images are hosted in the public Docker Hub repository
|
| 80 |
+
`docker.io/biningbin/active-swe` and are tagged with the `simple-` or `hard-`
|
| 81 |
+
prefix. The dataset does not contain image layers; pull the referenced image
|
| 82 |
+
before running an evaluation.
|
| 83 |
+
|
| 84 |
+
For example:
|
| 85 |
+
|
| 86 |
+
```bash
|
| 87 |
+
docker pull docker.io/biningbin/active-swe:simple-pylint-dev__pylint-5417
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
## Loading the dataset
|
| 91 |
+
|
| 92 |
+
```python
|
| 93 |
+
from datasets import load_dataset
|
| 94 |
+
|
| 95 |
+
dataset = load_dataset(
|
| 96 |
+
"parquet",
|
| 97 |
+
data_files={
|
| 98 |
+
"main": "https://huggingface.co/datasets/XLearning-SCU/Active-SWE/resolve/main/Active-SWE.parquet",
|
| 99 |
+
"extend": "https://huggingface.co/datasets/XLearning-SCU/Active-SWE/resolve/main/Active-SWE-Extend.parquet",
|
| 100 |
+
},
|
| 101 |
+
)
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
Or download one file with the Hugging Face CLI:
|
| 105 |
+
|
| 106 |
+
```bash
|
| 107 |
+
hf download XLearning-SCU/Active-SWE Active-SWE.parquet \
|
| 108 |
+
--repo-type dataset --local-dir ./active_swe_data
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
## Evaluation protocol
|
| 112 |
+
|
| 113 |
+
The release harness runs the benchmark stages locally with Docker. The model
|
| 114 |
+
first receives the files pending review and generates a code patch. Later
|
| 115 |
+
stages can generate and validate tests, and the harness runs the rendered
|
| 116 |
+
evaluation scripts inside the referenced image.
|
| 117 |
+
|
| 118 |
+
The primary paper-facing metrics are:
|
| 119 |
+
|
| 120 |
+
```text
|
| 121 |
+
LR | LP | Resolved | Count | TV | Revealed
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
The denominator is the number of rows supplied to the corresponding run. The
|
| 125 |
+
release harness preserves one output row per input instance, including rows
|
| 126 |
+
that fail during generation or evaluation.
|
| 127 |
+
|
| 128 |
+
## Citation and source licenses
|
| 129 |
+
|
| 130 |
+
Please cite the Active-SWE paper when using this dataset. The source
|
| 131 |
+
repositories represented in the benchmark retain their respective licenses;
|
| 132 |
+
users are responsible for complying with those licenses when inspecting or
|
| 133 |
+
redistributing source code and patches.
|