--- arxiv: 1801.01681 dataset_info: features: - name: functionSource dtype: string - name: fName dtype: string - name: oriFile dtype: string - name: startEndLine dtype: string - name: label dtype: int64 - name: vulLine dtype: int64 - name: cwe dtype: string splits: - name: train num_bytes: 114905147 num_examples: 128118 - name: validation num_bytes: 14289221 num_examples: 16015 - name: test num_bytes: 14618528 num_examples: 16015 download_size: 52698659 dataset_size: 143812896 configs: - config_name: default data_files: - split: train path: data/train-* - split: validation path: data/validation-* - split: test path: data/test-* task_categories: - text-classification tags: - code --- This is an unofficial HuggingFace version of "[VulDeePecker: A Deep Learning-Based System for Vulnerability Detection ](https://arxiv.org/abs/1801.01681)" dataset. *** Database of "VulDeePecker: A Deep Learning-Based System for Vulnerability Detection" (NDSS'18) *** Code Gadget Database (CGD) focuses on two types of vulnerabilities in C/C++ programs, buffer error vulnerability (CWE-119) and resource management error vulnerability (CWE-399). Each code gadget is composed of a number of program statements (i.e., lines of code), which are related to each other according to the data flow associated to the arguments of some library/API function calls. Based on the National Vulnerability Database (NVD) and the NIST Software Assurance Reference Dataset (SARD) project, we collect 520 open source software program files with corresponding diff files and 8,122 test cases for the buffer error vulnerability, and 320 open source software program files with corresponding diff files and 1,729 test cases for the resource management error vulnerability. In total, the CGD database contains 61,638 code gadgets, including 17,725 code gadgets that are vulnerable and 43,913 code gadgets that are not vulnerable. Among the 17,725 code gadgets that vulnerable, 10,440 corresponds to buffer error vulnerabilities and the rest 7,285 corresponds to resource management error vulnerabilities.