Code-TREAT's picture
Update README.md
894b187 verified
metadata
viewer: true
configs:
  - config_name: default
    default: true
    data_files:
      - split: test
        path:
          - test.parquet
license: mit

PrimeVul-Paired Original Test Dataset (Lite for reproducing Code-TREAT results)

Overview

This dataset contains the original paired test split from the PrimeVul dataset, provided for reproducibility purposes. The data is sourced from the paper "PrimeVul: Vulnerability Detection with Code Language Models: How Far Are We?" and includes both the default (single functions) and paired (vulnerable/non-vulnerable pairs) configurations.

Citation

If you use this dataset, please cite the original PrimeVul paper:

@article{primevul2024,
  title={PrimeVul: Vulnerability Detection with Code Language Models: How Far Are We?},
  author={[Authors from the original paper]},
  journal={arXiv preprint arXiv:2403.18624},
  year={2024},
  url={https://arxiv.org/abs/2403.18624}
}

Dataset Configurations

  • Description: Paired vulnerability detection dataset with before/after patch pairs
  • Size: 870 test samples
  • Format: Each sample represents either the vulnerable or patched version of a function
  • Fields:
    • idx: Unique sample identifier
    • project: Source project name
    • commit_id: Git commit hash
    • target: Binary label (0=non-vulnerable, 1=vulnerable)
    • func: Source code function
    • func_hash: Function hash
    • cwe: Common Weakness Enumeration categories
    • cve: CVE identifier (if applicable)
    • project_url: Source project repository URL
    • commit_url: Direct link to the commit
    • Additional metadata fields

Data Source

The original JSONL files are available from the PrimeVul authors at:

Data Format

This dataset provides the test splits in Parquet format for easy loading with HuggingFace datasets. The original data was in JSONL format and has been converted while preserving all original fields and values.

Usage

from datasets import load_dataset

# Login using e.g. `huggingface-cli login` to access this dataset
ds = load_dataset("Code-TREAT/PrimeVul-Paired_original_lite")

Purpose

This dataset is provided by the Code-TREAT project to ensure reproducibility and consistency in vulnerability detection research. By providing the exact test splits used in evaluations, researchers can:

  1. Reproduce results from papers using this dataset
  2. Compare methods fairly using identical test data
  3. Validate new approaches against established benchmarks

License

Please refer to the original PrimeVul repository for licensing information: https://github.com/DLVulDet/PrimeVul

Acknowledgments

We thank the authors of PrimeVul for making their dataset publicly available and for their contributions to vulnerability detection research.

Contact

For questions about this dataset distribution, please refer to the original PrimeVul repository or the Code-TREAT project.