mahdin70 commited on
Commit
04ed029
·
verified ·
1 Parent(s): 5e69895

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -9
README.md CHANGED
@@ -68,8 +68,8 @@ The dataset contains the following columns:
68
  - **`commit_id`**: String - Unique identifier of the commit associated with the function.
69
  - **`func`**: String - The source code of the function before fixing (from `func_before` in BigVul).
70
  - **`vul`**: Int8 - Vulnerability label (1 = vulnerable, 0 = not vulnerable).
71
- - **`CVE ID`**: String - Common Vulnerabilities and Exposures identifier (e.g., `CVE-2007-1320`), or `NOT_VULNERABLE` if `vul = 0`.
72
- - **`CWE ID`**: String - Common Weakness Enumeration identifier (e.g., `CWE-20`), or `NOT_VULNERABLE` if `vul = 0`.
73
 
74
  ### Splits
75
  - **Train**: Combined training data from BigVul and PrimeVul.
@@ -96,14 +96,13 @@ The dataset was preprocessed to ensure consistency and quality:
96
  - Renamed `cve` to `CVE ID`, `cwe` to `CWE ID`, `target` to `vul`.
97
  - Standardized `CWE ID` by removing brackets from list format (e.g., `["CWE-XXX"]` → `CWE-XXX`), taking the first element if multiple CWEs exist.
98
  - Converted `vul` from `int64` to `int8`.
99
- - Handled edge cases: `None` or empty lists in `CWE ID` set to `"UNKNOWN_CWE"` temporarily.
100
 
101
  ### Merging and Final Preprocessing
102
  - **Merging**: Concatenated preprocessed BigVul and PrimeVul data for each split (`train`, `test`, `validation`).
103
  - **Final Steps**:
104
  - Removed rows with any null values.
105
  - Removed duplicates based on the `func` column.
106
- - For rows where `vul = 0`, replaced `CVE ID` and `CWE ID` with `"NOT_VULNERABLE"`.
107
 
108
 
109
  ## Dataset Statistics
@@ -112,20 +111,20 @@ Below are the analysis results for the final merged dataset:
112
 
113
  ### Train Split
114
  - **Number of rows**: 239,822
115
- - **Unique CWE IDs (excluding `NOT_VULNERABLE`)**: 127
116
  - **Unique commit IDs**: 7,559
117
  - **Vulnerable functions (`vul = 1`)**: 9,037
118
 
119
  ### Test Split
120
  - **Number of rows**: 51,390
121
- - **Unique CWE IDs (excluding `NOT_VULNERABLE`)**: 87
122
  - **Unique commit IDs**: 6,032
123
  - **Vulnerable functions (`vul = 1`)**: 1,911
124
 
125
 
126
  ### Validation Split
127
  - **Number of rows**: 51,392
128
- - **Unique CWE IDs (excluding `NOT_VULNERABLE`)**: 91
129
  - **Unique commit IDs**: 6,059
130
  - **Vulnerable functions (`vul = 1`)**: 1,933
131
 
@@ -136,5 +135,4 @@ Below are the analysis results for the final merged dataset:
136
  ```python
137
  from datasets import load_dataset
138
 
139
- dataset = load_dataset("mahdin70/merged_bigvul_primevul")
140
- # Access splits: dataset['train'], dataset['test'], dataset['validation']
 
68
  - **`commit_id`**: String - Unique identifier of the commit associated with the function.
69
  - **`func`**: String - The source code of the function before fixing (from `func_before` in BigVul).
70
  - **`vul`**: Int8 - Vulnerability label (1 = vulnerable, 0 = not vulnerable).
71
+ - **`CVE ID`**: String - Common Vulnerabilities and Exposures identifier (e.g., `CVE-2007-1320`), or `NOT_APPLICABLE` if `vul = 0`.
72
+ - **`CWE ID`**: String - Common Weakness Enumeration identifier (e.g., `CWE-20`), or `NOT_APPLICABLE` if `vul = 0`.
73
 
74
  ### Splits
75
  - **Train**: Combined training data from BigVul and PrimeVul.
 
96
  - Renamed `cve` to `CVE ID`, `cwe` to `CWE ID`, `target` to `vul`.
97
  - Standardized `CWE ID` by removing brackets from list format (e.g., `["CWE-XXX"]` → `CWE-XXX`), taking the first element if multiple CWEs exist.
98
  - Converted `vul` from `int64` to `int8`.
 
99
 
100
  ### Merging and Final Preprocessing
101
  - **Merging**: Concatenated preprocessed BigVul and PrimeVul data for each split (`train`, `test`, `validation`).
102
  - **Final Steps**:
103
  - Removed rows with any null values.
104
  - Removed duplicates based on the `func` column.
105
+ - For rows where `vul = 0`, replaced `CVE ID` and `CWE ID` with `"NOT_APPLICABLE`.
106
 
107
 
108
  ## Dataset Statistics
 
111
 
112
  ### Train Split
113
  - **Number of rows**: 239,822
114
+ - **Unique CWE IDs (excluding `NOT_APPLICABLE`)**: 127
115
  - **Unique commit IDs**: 7,559
116
  - **Vulnerable functions (`vul = 1`)**: 9,037
117
 
118
  ### Test Split
119
  - **Number of rows**: 51,390
120
+ - **Unique CWE IDs (excluding `NOT_APPLICABLE`)**: 87
121
  - **Unique commit IDs**: 6,032
122
  - **Vulnerable functions (`vul = 1`)**: 1,911
123
 
124
 
125
  ### Validation Split
126
  - **Number of rows**: 51,392
127
+ - **Unique CWE IDs (excluding `NOT_APPLICABLE`)**: 91
128
  - **Unique commit IDs**: 6,059
129
  - **Vulnerable functions (`vul = 1`)**: 1,933
130
 
 
135
  ```python
136
  from datasets import load_dataset
137
 
138
+ dataset = load_dataset("mahdin70/merged_bigvul_primevul")