File size: 4,906 Bytes
6f89260
 
b5b7267
 
 
 
 
 
 
 
 
 
 
 
6f89260
b5b7267
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
---
license: mit
task_categories:
- text-classification
tags:
- code
- cybersecurity
- vulnerability-detection
- robustness
- c
- java
pretty_name: DR Evaluation Noise Pools
size_categories:
- 10K<n<100K
---

# DR Evaluation Noise Pools

This dataset contains the retained behavior-preserving code variants and
realized-distance metadata used to evaluate the robustness of LLM-based
vulnerability analyzers. The corresponding evaluation and Acc-based DR/SIR
implementation is available in the
[TOSEM artifact repository](https://github.com/Jackline97/TOSEM-artifact).

## Files

| File | Description |
|---|---|
| `noise_pools_all.zip` | Combined Juliet, PrimeVul, and MegaVul perturbation pools |

Archive properties:

- compressed size: 494,118,658 bytes (471.23 MiB);
- uncompressed size: 7,188,405,146 bytes (approximately 6.69 GiB);
- JSON pool files: 22,293;
- SHA-256: `2EFC57199F3E497D48772FB322D97EA7F1393BC8C1D24EB00D2E1D224F6ED824`.

## Evaluation Scope

The reported evaluation uses five dataset-language subsets:

| Dataset | Language | Paired base files |
|---|---:|---:|
| Juliet | Java | 244 |
| Juliet | C | 363 |
| PrimeVul | C | 196 |
| MegaVul | Java | 335 |
| MegaVul | C | 335 |

Only these dataset-language combinations are part of the reported benchmark.
The archive is preserved byte-for-byte for reproducibility; consumers should
use the combinations above when reproducing the evaluation.

## Perturbation Families

| Directory | Family | Target levels |
|---|---|---|
| `comment_noise` | Contradiction Comments (CC) | 0.2, 0.4, 0.6, 0.8 |
| `prompt_inject_noise` | Prompt-Injection Comments (PI) | 0.2, 0.4, 0.6, 0.8 |
| `variable_noise` | Variable Replacement (VR) | 0.2, 0.4, 0.6, 0.8 |
| `structure_noise_checked` | Structure Perturbation (SP) | 0.03, 0.10, 0.17, 0.24 |

After extraction, the top-level layout is:

```text
noise_pools_juliet/
noise_pools_megavul/
noise_pools_primevul/
```

Within each root, records are organized as:

```text
<edit_family>/<language>/noise_<target_level>/<base_record>.json
```

## JSON Record Structure

Each JSON pool record contains:

- `cleaned_code`: normalized base source code;
- `formatted_code`: formatted source representation;
- `cwe_id`: associated CWE identifier;
- one function-specific key containing retained `Combo_*` variants.

Each retained variant contains the edited code in `code_comment_variant`, safe
and vulnerable harnesses in `harness_command_good` and
`harness_command_bad`, and a `meta_info` object. In `meta_info`, `score` is the
realized normalized perturbation distance consumed by the DR estimator.
Comment-based families also retain `code_comment_org` where applicable.

## Download and Extract

Download with `huggingface_hub`:

```python
from huggingface_hub import hf_hub_download

archive = hf_hub_download(
    repo_id="LLMs4CodeSecurity/DR_Evaluation",
    filename="noise_pools_all.zip",
    repo_type="dataset",
)
print(archive)
```

Extract with Python:

```python
from pathlib import Path
from zipfile import ZipFile

archive = Path("noise_pools_all.zip")
with ZipFile(archive) as bundle:
    bundle.extractall(archive.parent)
```

PowerShell:

```powershell
Expand-Archive -Path .\noise_pools_all.zip -DestinationPath . -Force
```

Bash:

```bash
unzip noise_pools_all.zip
```

## Evaluation Code

Clone the companion code repository:

```bash
git clone https://github.com/Jackline97/TOSEM-artifact.git
cd TOSEM-artifact
python -m pip install -r requirements.txt
```

For example, after placing and extracting the archive in the repository root:

```bash
python evaluation_batch.py \
  --dataset juliet \
  --language java \
  --noise-base noise_pools_juliet \
  --noise-type comment_noise \
  --models deepseek-chat \
  --noise-scales 0.2,0.4,0.6,0.8 \
  --max-combo 20 \
  --num-runs 1 \
  --out-base eval_res
```

See the [artifact README](https://github.com/Jackline97/TOSEM-artifact#readme)
for model configuration, Ollama usage, output semantics, and DR/SIR commands.

## Intended Use and Limitations

The package is intended for research on vulnerability analysis, robustness,
and behavior-preserving code transformations. It contains vulnerable code and
should not be deployed as production software. The package provides retained
inputs and transformation metadata; model inference outputs are generated by
the companion evaluation code.

The source samples originate from Juliet, PrimeVul, and MegaVul. Users remain
responsible for following the applicable terms of the upstream datasets and
projects represented in those corpora.

## Citation

```bibtex
@misc{dr_evaluation_artifact_2026,
  author       = {{LLMs4CodeSecurity}},
  title        = {DR Evaluation Noise Pools},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/datasets/LLMs4CodeSecurity/DR_Evaluation}},
  note         = {Evaluation code: \url{https://github.com/Jackline97/TOSEM-artifact}}
}
```