--- license: - c-uda pretty_name: google/code_x_glue_cc_defect_detection (mirror) source_datasets: - google/code_x_glue_cc_defect_detection tags: - laya - laya-finetune - mirror - domain-code - use-unclear - genre-source-code - label-binary - annot-natural - lang-other language: - code task_categories: - text-classification task_ids: - multi-class-classification size_categories: - 10Koutdev);\n if (chr == NULL) {\n error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,\n \"Device '%s' not found\", s->outdev);\n qemu_chr_fe_init(&s->chr_out, chr, errp);", "id": 8, "project": "qemu", "target": true } ``` ### データのフィールド 以下では、各設定(config)のフィールドを順に説明する。データのフィールドはすべての分割で共通である。 #### default |フィールド名 | 型 | 説明 | |----------|------|------------------------------------------| |id |int32 | サンプルのインデックス | |func |string| ソースコード | |target |bool | 0 か 1(脆弱性があるかどうか) | |project |string| このコードを含む元のプロジェクト | |commit_id |string| 元のプロジェクトのコミット識別子 | ### データの分割 | 名前 |train|validation|test| |-------|----:|---------:|---:| |default|21854| 2732|2732| ## データセットの作成 ### 収集の理由 [More Information Needed] ### 元データ #### 初期のデータ収集と正規化 [More Information Needed] #### 元の言語の作成者は誰か? [More Information Needed] ### アノテーション #### アノテーションの手順 [More Information Needed] #### アノテーターは誰か? [More Information Needed] ### 個人情報と機微な情報 [More Information Needed] ## データの利用上の注意 ### データセットの社会的影響 [More Information Needed] ### 偏りについての議論 [More Information Needed] ### その他の既知の制限 [More Information Needed] ## 追加情報 ### データセットの作成者 https://github.com/microsoft, https://github.com/madlag ### ライセンス情報 Computational Use of Data Agreement (C-UDA) License. ### 引用情報 ``` @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} ``` ### 貢献者 このデータセットを追加してくれた @madlag(および一部 @ncoop57)に感謝する。
原文(英語) # Dataset Card for "code_x_glue_cc_defect_detection" ## Table of Contents - [Dataset Description](#dataset-description) - [Dataset Summary](#dataset-summary) - [Supported Tasks and Leaderboards](#supported-tasks) - [Languages](#languages) - [Dataset Structure](#dataset-structure) - [Data Instances](#data-instances) - [Data Fields](#data-fields) - [Data Splits](#data-splits-sample-size) - [Dataset Creation](#dataset-creation) - [Curation Rationale](#curation-rationale) - [Source Data](#source-data) - [Annotations](#annotations) - [Personal and Sensitive Information](#personal-and-sensitive-information) - [Considerations for Using the Data](#considerations-for-using-the-data) - [Social Impact of Dataset](#social-impact-of-dataset) - [Discussion of Biases](#discussion-of-biases) - [Other Known Limitations](#other-known-limitations) - [Additional Information](#additional-information) - [Dataset Curators](#dataset-curators) - [Licensing Information](#licensing-information) - [Citation Information](#citation-information) - [Contributions](#contributions) ## Dataset Description - **Homepage:** https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/Defect-detection ### Dataset Summary CodeXGLUE Defect-detection dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/Defect-detection 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. 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. ### Supported Tasks and Leaderboards - `multi-class-classification`: The dataset can be used to train a model for detecting if code has a defect in it. ### Languages - C **programming** language ## Dataset Structure ### Data Instances An example of 'validation' looks as follows. ``` { "commit_id": "aa1530dec499f7525d2ccaa0e3a876dc8089ed1e", "func": "static void filter_mirror_setup(NetFilterState *nf, Error **errp)\n{\n MirrorState *s = FILTER_MIRROR(nf);\n Chardev *chr;\n chr = qemu_chr_find(s->outdev);\n if (chr == NULL) {\n error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,\n \"Device '%s' not found\", s->outdev);\n qemu_chr_fe_init(&s->chr_out, chr, errp);", "id": 8, "project": "qemu", "target": true } ``` ### Data Fields In the following each data field in go is explained for each config. The data fields are the same among all splits. #### default |field name| type | description | |----------|------|------------------------------------------| |id |int32 | Index of the sample | |func |string| The source code | |target |bool | 0 or 1 (vulnerability or not) | |project |string| Original project that contains this code | |commit_id |string| Commit identifier in the original project| ### Data Splits | name |train|validation|test| |-------|----:|---------:|---:| |default|21854| 2732|2732| ## Dataset Creation ### Curation Rationale [More Information Needed] ### Source Data #### Initial Data Collection and Normalization [More Information Needed] #### Who are the source language producers? [More Information Needed] ### Annotations #### Annotation process [More Information Needed] #### Who are the annotators? [More Information Needed] ### Personal and Sensitive Information [More Information Needed] ## Considerations for Using the Data ### Social Impact of Dataset [More Information Needed] ### Discussion of Biases [More Information Needed] ### Other Known Limitations [More Information Needed] ## Additional Information ### Dataset Curators https://github.com/microsoft, https://github.com/madlag ### Licensing Information Computational Use of Data Agreement (C-UDA) License. ### Citation Information ``` @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} ``` ### Contributions Thanks to @madlag (and partly also @ncoop57) for adding this dataset.