semeru/code-code-DefectDetection
收藏资源简介:
--- license: mit Programminglanguage: "C" version: "N/A" Date: "Devign(Jun 2019 - paper release date)" Contaminated: "Very Likely" Size: "Standard Tokenizer" --- ### 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 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](http://papers.nips.cc/paper/9209-devign-effective-vulnerability-identification-by-learning-comprehensive-program-semantics-via-graph-neural-networks.pdf). 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 | | ----- | :-------: | | Train | 21,854 | | Dev | 2,732 | | Test | 2,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>
许可证:MIT许可证 编程语言:C语言 版本:无可用 日期:Devign论文发布日期(2019年6月) 数据污染情况:极有可能存在污染 数据集处理:采用标准分词器 本数据集源自CodeXGLUE,并采用其官方脚本完成预处理。 # 在Semeru中的存储位置 该数据集在Semeru中的存储路径为:/nfs/semeru/semeru_datasets/code_xglue/code-to-code/Defect-detection # CodeXGLUE——缺陷检测任务 ## 任务定义 给定一段源代码,本任务旨在识别其是否为可能攻击软件系统的不安全代码,例如资源泄漏、使用后释放(use-after-free)漏洞以及拒绝服务(Denial of Service, DoS)攻击。本任务被视为二分类任务(0/1),其中1代表不安全代码,0代表安全代码。 ### 数据集 本数据集源自论文《Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networks》,链接为:http://papers.nips.cc/paper/9209-devign-effective-vulnerability-identification-by-learning-comprehensive-program-semantics-via-graph-neural-networks.pdf。我们将所有项目的样本整合,并按照80%/10%/10%的比例划分为训练集、开发集与测试集。 ### 数据格式 数据集包含三个预处理后的.jsonl文件,即train.jsonl、valid.jsonl与test.jsonl。 对于每个文件,解压后每一行对应一个函数。以下展示一行示例的结构: - **func**:源代码内容 - **target**:0或1(分别代表存在漏洞或不存在漏洞) - **idx**:样本索引 ### 数据统计 数据集的统计信息如下表所示: | 数据集划分 | 样本数量 | | :-------: | :-------: | | 训练集 | 21,854 | | 开发集 | 2,732 | | 测试集 | 2,732 | ## 参考文献 <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>
CodeXGLUE -- Defect Detection 数据集
任务定义
给定一个源代码,任务是识别它是否是不安全的代码,可能攻击软件系统,如资源泄漏、使用后释放漏洞和拒绝服务攻击。任务被视为二元分类(0/1),其中1表示不安全代码,0表示安全代码。
数据集
数据集来自论文 Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networks。我们将所有项目合并,并按80%/10%/10%的比例分为训练集、开发集和测试集。
数据格式
包含三个预处理的.jsonl文件,即train.jsonl、valid.jsonl和test.jsonl。
每个文件中,每一行代表一个函数。每行包含以下字段:
- func: 源代码
- target: 0或1(是否存在漏洞)
- idx: 示例的索引
数据统计
数据集的统计信息如下表所示:
| #Examples | |
|---|---|
| Train | 21,854 |
| Dev | 2,732 |
| Test | 2,732 |
参考文献
@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} }




