File size: 4,384 Bytes
3d6a2f2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
language:
- en
license: mit
task_categories:
- text-generation
tags:
- code
- java
- unit-testing
- methods2test
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: validation
    path: data/validation-*
  - split: test
    path: data/test-*
---

# methods2test_small_cleaned

A **structurally-vacuous-filtered** copy of the `train` split of
[`andstor/methods2test_small`](https://huggingface.co/datasets/andstor/methods2test_small)
(context config `fm+fc+c+m+f+t+tc`, the one actually used to fine-tune models in
[andstor/peft-unit-test-generation-replication-package](https://github.com/andstor/peft-unit-test-generation-replication-package)).
Produced for the investigation in
[lhnam/PEFT — FINDINGS.md](https://github.com) (`FINDINGS.md` §1.2, §4 item 2),
which found that **17.8% of the real fine-tuning targets are structurally
vacuous** (no assertion, empty, or tautological) and hypothesized this is a
driver of the "convergence attractor" collapse seen when fine-tuning code LLMs
for JUnit test generation.

## What changed vs. the original

| Split | Original rows | This dataset | Vacuous rate |
|---|---|---|---|
| `train` | 7,440 | **6,124** (vacuous rows dropped) | 17.7% removed |
| `validation` | 953 | 953 (**unchanged**) | 15.2% (left in, for fair eval_loss) |
| `test` | 1,017 | 1,017 (**unchanged**) | 16.9% (left in) |

Only `train` is filtered. `validation` and `test` are byte-identical to the
source dataset's `fm+fc+c+m+f+t+tc` config — the point of this dataset is to
isolate the effect of *training on* cleaner targets while still measuring
`eval_loss` / benchmark success against the real, unfiltered data distribution.
Filtering only the split a model actually learns from, and leaving evaluation
untouched, is what makes a before/after comparison causally meaningful.

## Filtering method

Each `target` (the reference JUnit test) is classified as vacuous if it does
**not** contain a real, non-tautological `assert*`/`fail`/`verify` call:

```python
ASSERT_RE = re.compile(r"\b(assert\w*|fail|verify\w*)\s*\(", re.IGNORECASE)
TAUTOLOGY_RE = re.compile(
    r"assert(true)\s*\(\s*true\s*[,)]|assert(false)\s*\(\s*false\s*[,)]|"
    r'assertequals\s*\(\s*([A-Za-z0-9_."\']+)\s*,\s*\3\s*[,)]',
    re.IGNORECASE,
)
```

Targets under 15 characters are also treated as vacuous ("empty"). This is the
exact classifier used throughout the source investigation (see
`scripts/filter_vacuous_training_data.py` in the repo above), applied here with
`--mode drop`.

Breakdown of the original `train` split before filtering:

| Label | Count | % |
|---|---|---|
| `has_real_assert` (kept) | 6,124 | 82.3% |
| `no_assert` | 1,278 | 17.2% |
| `tautological_assert` | 25 | 0.3% |
| `empty` | 13 | 0.2% |
| **vacuous total (dropped)** | **1,316** | **17.7%** |

(Matches `FINDINGS.md`'s independently-reported 17.8% to within rounding —
recomputed directly from this dataset's own source parquet.)

## Columns

- `id` (string) — original row id from `andstor/methods2test_small`.
- `source` (string) — the prompt/context (unchanged).
- `target` (string) — the reference JUnit test (the fine-tuning label).

No `weight` column — this is the `drop` variant, not `downweight`. See the
source script if you want a down-weighted variant instead.

## Intended use

Point a fine-tuning run's `TRAIN_DATASET` at this repo (config `default`) in
place of `andstor/methods2test_small` (`fm+fc+c+m+f+t+tc`), keeping everything
else — model, LoRA config, epochs, learning rate, validation split — identical,
to test whether removing the training-time shortcut narrows or removes the
post-fine-tuning "convergence attractor" documented in the source repo's
`FINDINGS.md`. This is one experiment in an ongoing, self-correcting
investigation — see that document for the full methodology, caveats, and
history of revisions before citing any number from this dataset card in a
paper.

## Provenance

- Source dataset: [`andstor/methods2test_small`](https://huggingface.co/datasets/andstor/methods2test_small), config `fm+fc+c+m+f+t+tc`, revision confirmed via that dataset's own commit history.
- Source paper / replication package: [andstor/peft-unit-test-generation-replication-package](https://github.com/andstor/peft-unit-test-generation-replication-package).
- License inherited as MIT from the source dataset.