id
int64 0
3.29k
| file_name
stringlengths 4
37
| programming_language
stringclasses 2
values | method_name
stringlengths 3
112
| code_before
stringlengths 701
809k
| code_after
stringlengths 701
809k
| func_before
stringlengths 40
60.4k
| func_after
stringlengths 43
61.2k
| diff
stringlengths 67
133k
| num_lines_added
int64 1
1.49k
| num_lines_deleted
int64 1
1.13k
| num_lines_in_file
float64 23
18.6k
| num_tokens_in_file
float64 129
172k
| num_lines_in_method
int64 1
259
| num_tokens_in_method
int64 10
1.29k
| method_complexity
int64 1
110
| repo
stringclasses 267
values | cve_id
stringlengths 13
16
| cwe_id
stringclasses 8
values |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2,815 | eval.c | C | init_evalarg | "/* vi:set ts=8 sts=4 sw=4 noet:\n *\n * VIM - Vi IMproved\tby Bram Moolenaar\n *\n * Do \":help uga(...TRUNCATED) | "/* vi:set ts=8 sts=4 sw=4 noet:\n *\n * VIM - Vi IMproved\tby Bram Moolenaar\n *\n * Do \":help uga(...TRUNCATED) | "init_evalarg(evalarg_T *evalarg)\n{\n CLEAR_POINTER(evalarg);\n ga_init2(&evalarg->eval_tofre(...TRUNCATED) | "init_evalarg(evalarg_T *evalarg)\n{\n CLEAR_POINTER(evalarg);\n ga_init2(&evalarg->eval_tofre(...TRUNCATED) | "{'added': [(356, '/*'), (357, ' * Initialize \"evalarg\" for use.'), (358, ' */'), (359, ' void'(...TRUNCATED) | 60 | 42 | 5,145 | 27,604 | 5 | 29 | 1 | https://github.com/vim/vim | CVE-2022-2889 | CWE-416 |
1,761 | proc.c | C | mrb_proc_init_copy | "/*\n** proc.c - Proc class\n**\n** See Copyright Notice in mruby.h\n*/\n\n#include <mruby.h>\n#incl(...TRUNCATED) | "/*\n** proc.c - Proc class\n**\n** See Copyright Notice in mruby.h\n*/\n\n#include <mruby.h>\n#incl(...TRUNCATED) | "mrb_proc_init_copy(mrb_state *mrb, mrb_value self)\n{\n mrb_value proc = mrb_get_arg1(mrb);\n\n i(...TRUNCATED) | "mrb_proc_init_copy(mrb_state *mrb, mrb_value self)\n{\n mrb_value proc = mrb_get_arg1(mrb);\n\n i(...TRUNCATED) | "{'added': [(204, 'mrb_proc_copy(mrb_state *mrb, struct RProc *a, struct RProc *b)'), (212, ' a->up(...TRUNCATED) | 6 | 6 | 364 | 2,483 | 9 | 54 | 2 | https://github.com/mruby/mruby | CVE-2021-4110 | CWE-476 |
923 | vf_vignette.c | C | filter_frame | "/*\n * Copyright (c) 2013 Clément Bœsch\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is fr(...TRUNCATED) | "/*\n * Copyright (c) 2013 Clément Bœsch\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is fr(...TRUNCATED) | "static int filter_frame(AVFilterLink *inlink, AVFrame *in)\n{\n unsigned x, y;\n AVFilterCont(...TRUNCATED) | "static int filter_frame(AVFilterLink *inlink, AVFrame *in)\n{\n unsigned x, y;\n AVFilterCont(...TRUNCATED) | "{'added': [(242, ' for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plan(...TRUNCATED) | 1 | 1 | 267 | 2,095 | 65 | 599 | 14 | https://github.com/FFmpeg/FFmpeg | CVE-2013-4263 | CWE-119 |
979 | segment.c | C | build_segment_manager | "/*\n * fs/f2fs/segment.c\n *\n * Copyright (c) 2012 Samsung Electronics Co., Ltd.\n * h(...TRUNCATED) | "/*\n * fs/f2fs/segment.c\n *\n * Copyright (c) 2012 Samsung Electronics Co., Ltd.\n * h(...TRUNCATED) | "int build_segment_manager(struct f2fs_sb_info *sbi)\n{\n\tstruct f2fs_super_block *raw_super = F2FS(...TRUNCATED) | "int build_segment_manager(struct f2fs_sb_info *sbi)\n{\n\tstruct f2fs_super_block *raw_super = F2FS(...TRUNCATED) | "{'added': [(569, '\\tif (!test_opt(sbi, FLUSH_MERGE))'), (570, '\\t\\treturn err;'), (571, ''), (32(...TRUNCATED) | 4 | 1 | 2,659 | 17,637 | 53 | 340 | 12 | https://github.com/torvalds/linux | CVE-2017-18241 | CWE-476 |
1,436 | i2c.c | C | get_alen | "// SPDX-License-Identifier: GPL-2.0+\n/*\n * (C) Copyright 2009\n * Sergey Kubushyn, himself, ksi@k(...TRUNCATED) | "// SPDX-License-Identifier: GPL-2.0+\n/*\n * (C) Copyright 2009\n * Sergey Kubushyn, himself, ksi@k(...TRUNCATED) | "static uint get_alen(char *arg, int default_len)\n{\n\tint\tj;\n\tint\talen;\n\n\talen = default_le(...TRUNCATED) | "static uint get_alen(char *arg, uint default_len)\n{\n\tuint\tj;\n\tuint\talen;\n\n\talen = default(...TRUNCATED) | "{'added': [(203, 'static uint get_alen(char *arg, uint default_len)'), (205, '\\tuint\\tj;'), (206,(...TRUNCATED) | 12 | 12 | 1,240 | 7,675 | 14 | 75 | 4 | https://github.com/u-boot/u-boot | CVE-2022-34835 | CWE-787 |
1,430 | i2c.c | C | do_i2c_crc | "// SPDX-License-Identifier: GPL-2.0+\n/*\n * (C) Copyright 2009\n * Sergey Kubushyn, himself, ksi@k(...TRUNCATED) | "// SPDX-License-Identifier: GPL-2.0+\n/*\n * (C) Copyright 2009\n * Sergey Kubushyn, himself, ksi@k(...TRUNCATED) | "static int do_i2c_crc(struct cmd_tbl *cmdtp, int flag, int argc,\n\t\t char *const argv[])\n{\(...TRUNCATED) | "static int do_i2c_crc(struct cmd_tbl *cmdtp, int flag, int argc,\n\t\t char *const argv[])\n{\(...TRUNCATED) | "{'added': [(203, 'static uint get_alen(char *arg, uint default_len)'), (205, '\\tuint\\tj;'), (206,(...TRUNCATED) | 12 | 12 | 1,240 | 7,675 | 42 | 266 | 12 | https://github.com/u-boot/u-boot | CVE-2022-34835 | CWE-787 |
1,511 | jp2_cod.c | C | jp2_box_create | "/*\n * Copyright (c) 1999-2000 Image Power, Inc. and the University of\n * British Columbia.\n * (...TRUNCATED) | "/*\n * Copyright (c) 1999-2000 Image Power, Inc. and the University of\n * British Columbia.\n * (...TRUNCATED) | "jp2_box_t *jp2_box_create(int type)\n{\n\tjp2_box_t *box;\n\tjp2_boxinfo_t *boxinfo;\n\n\tif (!(box(...TRUNCATED) | "jp2_box_t *jp2_box_create(int type)\n{\n\tjp2_box_t *box;\n\tjp2_boxinfo_t *boxinfo;\n\tif (!(box =(...TRUNCATED) | "{'added': [(186, 'jp2_box_t *jp2_box_create0()'), (193, '\\tbox->type = 0;'), (194, '\\tbox->len = (...TRUNCATED) | 30 | 14 | 747 | 5,052 | 17 | 94 | 3 | https://github.com/mdadams/jasper | CVE-2017-6850 | CWE-476 |
1,650 | acsequentialscan.hpp | C++ | ACSequentialScan::QMContextSet::DCContextMagnitudeSet::Init | "/*************************************************************************\n\n This project impl(...TRUNCATED) | "/*************************************************************************\n\n This project impl(...TRUNCATED) | " void Init(void)\n {\n for(int i = 0;i < 19;i++) {\n#ifdef DEBUG_QMCODER\n (...TRUNCATED) | " void Init(void)\n {\n for(int i = 0;i < MagnitudeContexts;i++) {\n#ifdef DEBUG_QM(...TRUNCATED) | "{'added': [(46, '** $Id: acsequentialscan.hpp,v 1.39 2022/05/23 05:56:51 thor Exp $'), (123, ' (...TRUNCATED) | 16 | 9 | 178 | 1,116 | 13 | 101 | 3 | https://github.com/thorfdbg/libjpeg | CVE-2022-31620 | CWE-119 |
538 | huffman.c | C | Huff_offsetReceive | "/*\n===========================================================================\nCopyright (C) 1999(...TRUNCATED) | "/*\n===========================================================================\nCopyright (C) 1999(...TRUNCATED) | "void Huff_offsetReceive (node_t *node, int *ch, byte *fin, int *offset) {\n\tbloc = *offset;\n\twhi(...TRUNCATED) | "void Huff_offsetReceive (node_t *node, int *ch, byte *fin, int *offset, int maxoffset) {\n\tbloc = (...TRUNCATED) | "{'added': [(282, 'void Huff_offsetReceive (node_t *node, int *ch, byte *fin, int *offset, int maxof(...TRUNCATED) | 18 | 9 | 350 | 2,578 | 16 | 87 | 5 | https://github.com/ioquake/ioq3 | CVE-2017-11721 | CWE-119 |
2,298 | zend-string.cpp | C++ | HPHP::string_number_format | "/*\n +----------------------------------------------------------------------+\n | HipHop for PH(...TRUNCATED) | "/*\n +----------------------------------------------------------------------+\n | HipHop for PH(...TRUNCATED) | "String string_number_format(double d, int dec,\n const String& dec_point(...TRUNCATED) | "String string_number_format(double d, int dec,\n const String& dec_point(...TRUNCATED) | "{'added': [(1621, \" // This actually means 63 bytes for characters + 1 byte for '\\\\0'\"), (1625(...TRUNCATED) | 5 | 1 | 1,941 | 16,443 | 98 | 657 | 29 | https://github.com/facebook/hhvm | CVE-2019-11929 | CWE-119 |
End of preview. Expand
in Dataset Viewer.
No dataset card yet
New: Create and edit this dataset card directly on the website!
Contribute a Dataset Card- Downloads last month
- 7