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

PrimeVul Original Test Dataset

Overview

This dataset contains the original 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: Single function vulnerability detection dataset
  • Size: 25,911 test samples
  • Format: Each sample contains a single code function with binary vulnerability label
  • Fields:
    • project: Source project name
    • commit_id: Git commit hash
    • target: Binary label (0=non-vulnerable, 1=vulnerable)
    • func: Source code function
    • cwe: Common Weakness Enumeration categories
    • idx: Unique sample identifier
    • hash: Function hash
    • 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_original")

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.