Scream9371 commited on
Commit
11b0604
·
verified ·
1 Parent(s): 2b4ffe0

Update README for four-dataset releases

Browse files
Files changed (1) hide show
  1. README.md +4 -12
README.md CHANGED
@@ -62,8 +62,8 @@ through the Hugging Face revision or Git tag:
62
  | Version | Revision | Description |
63
  |---|---|---|
64
  | v1 | `v1.0.0` | Original published datasets, including the original source text and AST graphs. |
65
- | v2.0.0 | `v2.0.0` | Reconstructed PROMISE, Defactors, BugsInPy, and Big-Vul from normalized source. Comments/docstrings and non-literal blank lines are removed; Python docstring-only suites are replaced with synthetic `pass` so every v1 bag/function remains. Labels are frozen and AST graphs are regenerated. Devign is not included. |
66
- | v2.0.1 | `v2.0.1` | Reconstructed the same four datasets without synthetic code. Python docstring-only functions/classes are deleted; bags that become empty, or positive bags with no remaining positive function, are deleted. Remaining bag/function labels are frozen and AST graphs are regenerated. Devign is not included. |
67
 
68
  For example:
69
 
@@ -83,13 +83,12 @@ level from the released HAM-Net representation.
83
 
84
  | Dataset | Original source | Original annotations / content | HAM-Net representation |
85
  |---|---|---|---|
86
- | `devign_c` (v1 only) | [Devign repository](https://github.com/microsoft/Devign) | Function-level vulnerability annotations from FFmpeg and QEMU C/C++ projects | Each C/C++ function is released as an individual sample with an AST graph and a binary label. |
87
  | `promise_java` | [PROMISE repository](https://openscience.us/repo/defect) | Classic Java class-level defect metric datasets with a `bug` count/label | Each Java class forms one MIL bag. The bag is positive when `bug > 0`. |
88
  | `bigvul_c` | [MSR 2020 Big-Vul dataset](https://github.com/ZeoVan/MSR_20_Code_vulnerability_CSV_Dataset) | Large-scale C/C++ vulnerability records containing code changes and CVE-related metadata | Each C/C++ file forms one MIL bag. Functions overlapping buggy-side changed lines are marked as positive. |
89
  | `defactors_python` | [Defactors](https://zenodo.org/records/7708984) | Line-level defect annotations from multiple Python projects | Each Python file forms one MIL bag. Functions overlapping annotated defect lines receive `func_label=1`. |
90
  | `bugsinpy_python` | [BugsInPy](https://github.com/soarsmu/BugsInPy) | Reproducible defects, buggy/fixed commits, and patch information from Python projects | Each Python file forms one MIL bag. Bags are constructed from buggy files and same-project negative files. |
91
 
92
- Devign remains in its original function-level format, whereas PROMISE, Big-Vul, Defactors, and BugsInPy are converted into class-level or file-level bags for multiple-instance learning. The dataset sources provide the original labels or patch/line annotations; the exact sampling, parsing, AST normalization, and bag construction rules are described below.
93
 
94
  ## Dataset summary
95
 
@@ -101,9 +100,8 @@ Percentages are computed from the final JSONL files. `P50/P90/P99` are the numbe
101
  | `defactors_python` | Python file-level MIL bag | 1,700 bags | 873 / 827 (51.35% / 48.65%) | 18 / 86 / 227.06 | 808 / 873 (92.55%) | 3,190 / 58,028 (5.50%) |
102
  | `bugsinpy_python` | Python file-level MIL bag | 2,205 bags | 520 / 1,685 (23.58% / 76.42%) | 11 / 84 / 206.96 | 507 / 520 (97.50%) | 1,075 / 63,726 (1.69%) |
103
  | `bigvul_c` | C/C++ file-level MIL bag | 1,700 bags | 733 / 967 (43.12% / 56.88%) | 16 / 64 / 279.01 | 733 / 733 (100.00%) | 1,270 / 51,668 (2.46%) |
104
- | `devign_c` (v1 only) | C/C++ function-level sample | 27,318 samples | 12,460 / 14,858 (45.61% / 54.39%) | N/A: function-level schema | N/A | N/A |
105
 
106
- `promise_java` uses `bug > 0` as its class/bag label and therefore does not claim function-level defect localization ground truth. `devign_c` is retained in its original function-level schema and does not contain a `functions` bag list.
107
 
108
  ## How the MIL bags are constructed
109
 
@@ -176,11 +174,6 @@ The following rules define the published MIL samples.
176
  - Function sampling: discard files with fewer than three parseable functions and
177
  retain all remaining functions in the full-function version.
178
 
179
- ### Devign (v1 only)
180
-
181
- - Unit of sampling: one function is one labeled sample rather than a MIL bag.
182
- - Projects: `qemu` and `FFmpeg`.
183
-
184
  ### AST and version rules
185
 
186
  - To make ASTs from Java, Python, C, and C++ comparable, language-specific node
@@ -205,4 +198,3 @@ The following rules define the published MIL samples.
205
 
206
  - Both versions: `promise_java.jsonl`, `defactors_python.jsonl`,
207
  `bugsinpy_python.jsonl`, and `bigvul_c.jsonl`.
208
- - v1 only: `devign_c.jsonl`.
 
62
  | Version | Revision | Description |
63
  |---|---|---|
64
  | v1 | `v1.0.0` | Original published datasets, including the original source text and AST graphs. |
65
+ | v2.0.0 | `v2.0.0` | Reconstructed PROMISE, Defactors, BugsInPy, and Big-Vul from normalized source. Comments/docstrings and non-literal blank lines are removed; Python docstring-only suites are replaced with synthetic `pass` so every v1 bag/function remains. Labels are frozen and AST graphs are regenerated. |
66
+ | v2.0.1 | `v2.0.1` | Reconstructed the same four datasets without synthetic code. Python docstring-only functions/classes are deleted; bags that become empty, or positive bags with no remaining positive function, are deleted. Remaining bag/function labels are frozen and AST graphs are regenerated. |
67
 
68
  For example:
69
 
 
83
 
84
  | Dataset | Original source | Original annotations / content | HAM-Net representation |
85
  |---|---|---|---|
 
86
  | `promise_java` | [PROMISE repository](https://openscience.us/repo/defect) | Classic Java class-level defect metric datasets with a `bug` count/label | Each Java class forms one MIL bag. The bag is positive when `bug > 0`. |
87
  | `bigvul_c` | [MSR 2020 Big-Vul dataset](https://github.com/ZeoVan/MSR_20_Code_vulnerability_CSV_Dataset) | Large-scale C/C++ vulnerability records containing code changes and CVE-related metadata | Each C/C++ file forms one MIL bag. Functions overlapping buggy-side changed lines are marked as positive. |
88
  | `defactors_python` | [Defactors](https://zenodo.org/records/7708984) | Line-level defect annotations from multiple Python projects | Each Python file forms one MIL bag. Functions overlapping annotated defect lines receive `func_label=1`. |
89
  | `bugsinpy_python` | [BugsInPy](https://github.com/soarsmu/BugsInPy) | Reproducible defects, buggy/fixed commits, and patch information from Python projects | Each Python file forms one MIL bag. Bags are constructed from buggy files and same-project negative files. |
90
 
91
+ PROMISE, Big-Vul, Defactors, and BugsInPy are converted into class-level or file-level bags for multiple-instance learning. The dataset sources provide the original labels or patch/line annotations; the exact sampling, parsing, AST normalization, and bag construction rules are described below.
92
 
93
  ## Dataset summary
94
 
 
100
  | `defactors_python` | Python file-level MIL bag | 1,700 bags | 873 / 827 (51.35% / 48.65%) | 18 / 86 / 227.06 | 808 / 873 (92.55%) | 3,190 / 58,028 (5.50%) |
101
  | `bugsinpy_python` | Python file-level MIL bag | 2,205 bags | 520 / 1,685 (23.58% / 76.42%) | 11 / 84 / 206.96 | 507 / 520 (97.50%) | 1,075 / 63,726 (1.69%) |
102
  | `bigvul_c` | C/C++ file-level MIL bag | 1,700 bags | 733 / 967 (43.12% / 56.88%) | 16 / 64 / 279.01 | 733 / 733 (100.00%) | 1,270 / 51,668 (2.46%) |
 
103
 
104
+ `promise_java` uses `bug > 0` as its class/bag label and therefore does not claim function-level defect localization ground truth.
105
 
106
  ## How the MIL bags are constructed
107
 
 
174
  - Function sampling: discard files with fewer than three parseable functions and
175
  retain all remaining functions in the full-function version.
176
 
 
 
 
 
 
177
  ### AST and version rules
178
 
179
  - To make ASTs from Java, Python, C, and C++ comparable, language-specific node
 
198
 
199
  - Both versions: `promise_java.jsonl`, `defactors_python.jsonl`,
200
  `bugsinpy_python.jsonl`, and `bigvul_c.jsonl`.