CoolFace
Datasetpublic

semeru/code-code-DefectDetection

Dataset is imported from CodeXGLUE and pre-processed using their script. Where to find in Semeru: The dataset can be found at /nfs/semeru/semeru_datasets/code_xglue/code-to-code/Defect-detection in Semeru CodeXGLUE -- Defect Detection Task Definition Given a source code, the task is to identify whether it is an insecure code that may attack software systems, such as resource leaks, use-after-free vulnerabilities and DoS attack. We… See the full description on the dataset page: https://huggingface.co/datasets/semeru/code-code-DefectDetection.

sourceHugging Facemitupdated 3y agoView on Hugging Face
2likes82downloads
Dataset Card

Dataset is imported from CodeXGLUE and pre-processed using their script.

Where to find in Semeru:

The dataset can be found at /nfs/semeru/semerudatasets/codexglue/code-to-code/Defect-detection in Semeru

CodeXGLUE -- Defect Detection

Task Definition

Given a source code, the task is to identify whether it is an insecure code that may attack software systems, such as resource leaks, use-after-free vulnerabilities and DoS attack. We treat the task as binary classification (0/1), where 1 stands for insecure code and 0 for secure code.

Dataset

The dataset we use comes from the paper *Devign*: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networks. We combine all projects and split 80%/10%/10% for training/dev/test.

Data Format

Three pre-processed .jsonl files, i.e. train.jsonl, valid.jsonl, test.jsonl are present

For each file, each line in the uncompressed file represents one function. One row is illustrated below.

  • func: the source code
  • target: 0 or 1 (vulnerability or not)
  • idx: the index of example

Data Statistics

Data statistics of the dataset are shown in the below table:

#Examples
Train21,854
Dev2,732
Test2,732

Reference

<pre><code>@inproceedings{zhou2019devign, title={Devign: Effective vulnerability identification by learning comprehensive program semantics via graph neural networks}, author={Zhou, Yaqin and Liu, Shangqing and Siow, Jingkai and Du, Xiaoning and Liu, Yang}, booktitle={Advances in Neural Information Processing Systems}, pages={10197--10207}, year={2019} }</code></pre>