id int32 0 27.3k | func stringlengths 26 142k | target bool 2
classes | project stringclasses 2
values | commit_id stringlengths 40 40 | func_clean stringlengths 26 131k | vul_lines dict | normalized_func stringlengths 24 132k | lines listlengths 1 2.8k | label listlengths 1 2.8k | line_no listlengths 1 2.8k |
|---|---|---|---|---|---|---|---|---|---|---|
6,333 | MemoryRegionSection memory_region_find(MemoryRegion *mr,
hwaddr addr, uint64_t size)
{
MemoryRegionSection ret = { .mr = NULL };
MemoryRegion *root;
AddressSpace *as;
AddrRange range;
FlatView *view;
FlatRange *fr;
addr += mr->addr;
for ... | true | qemu | c6742b14fe7352059cd4954a356a8105757af31b | MemoryRegionSection memory_region_find(MemoryRegion *mr,
hwaddr addr, uint64_t size)
{
MemoryRegionSection ret = { .mr = NULL };
MemoryRegion *root;
AddressSpace *as;
AddrRange range;
FlatView *view;
FlatRange *fr;
addr += mr->addr;
for ... | {
"code": [
"MemoryRegionSection memory_region_find(MemoryRegion *mr,",
" hwaddr addr, uint64_t size)",
" rcu_read_lock();",
" goto out;",
" memory_region_ref(ret.mr);",
"out:"
],
"line_no": [
1,
3,
45,
53,
85,
87
... | MemoryRegionSection FUNC_0(MemoryRegion *mr,
hwaddr addr, uint64_t size)
{
MemoryRegionSection ret = { .mr = NULL };
MemoryRegion *root;
AddressSpace *as;
AddrRange range;
FlatView *view;
FlatRange *fr;
addr += mr->addr;
for (root = mr; ... | [
"MemoryRegionSection FUNC_0(MemoryRegion *mr,\nhwaddr addr, uint64_t size)\n{",
"MemoryRegionSection ret = { .mr = NULL };",
"MemoryRegion *root;",
"AddressSpace *as;",
"AddrRange range;",
"FlatView *view;",
"FlatRange *fr;",
"addr += mr->addr;",
"for (root = mr; root->container; ) {",
"root = roo... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[... |
6,334 | static void vnc_colordepth(DisplayState *ds)
{
int host_big_endian_flag;
struct VncState *vs = ds->opaque;
#ifdef WORDS_BIGENDIAN
host_big_endian_flag = 1;
#else
host_big_endian_flag = 0;
#endif
switch (ds_get_bits_per_pixel(ds)) {
case 8:
vs->depth = 1;
... | true | qemu | 6cec5487990bf3f1f22b3fcb871978255e92ae0d | static void vnc_colordepth(DisplayState *ds)
{
int host_big_endian_flag;
struct VncState *vs = ds->opaque;
#ifdef WORDS_BIGENDIAN
host_big_endian_flag = 1;
#else
host_big_endian_flag = 0;
#endif
switch (ds_get_bits_per_pixel(ds)) {
case 8:
vs->depth = 1;
... | {
"code": [
" int host_big_endian_flag;",
"#ifdef WORDS_BIGENDIAN",
" host_big_endian_flag = 1;",
"#else",
" host_big_endian_flag = 0;",
" } else {",
" int host_big_endian_flag;",
"#ifdef WORDS_BIGENDIAN",
" host_big_endian_flag = 1;",
"#else",
" ho... | static void FUNC_0(DisplayState *VAR_0)
{
int VAR_1;
struct VncState *VAR_2 = VAR_0->opaque;
#ifdef WORDS_BIGENDIAN
VAR_1 = 1;
#else
VAR_1 = 0;
#endif
switch (ds_get_bits_per_pixel(VAR_0)) {
case 8:
VAR_2->depth = 1;
VAR_2->server_red_max = 7;
... | [
"static void FUNC_0(DisplayState *VAR_0)\n{",
"int VAR_1;",
"struct VncState *VAR_2 = VAR_0->opaque;",
"#ifdef WORDS_BIGENDIAN\nVAR_1 = 1;",
"#else\nVAR_1 = 0;",
"#endif\nswitch (ds_get_bits_per_pixel(VAR_0)) {",
"case 8:\nVAR_2->depth = 1;",
"VAR_2->server_red_max = 7;",
"VAR_2->server_green_max = ... | [
0,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
0,
1,
1,
1,
0,
1,
0,
1,
1,
1,
1,
0,
1,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15,
17
],
[
19,
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
... |
6,336 | int ff_rv34_decode_update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
{
RV34DecContext *r = dst->priv_data, *r1 = src->priv_data;
MpegEncContext * const s = &r->s, * const s1 = &r1->s;
int err;
if (dst == src || !s1->context_initialized)
return 0;
if (s->height ... | true | FFmpeg | 73ad4471a48bd02b2c2a55de116161b87e061023 | int ff_rv34_decode_update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
{
RV34DecContext *r = dst->priv_data, *r1 = src->priv_data;
MpegEncContext * const s = &r->s, * const s1 = &r1->s;
int err;
if (dst == src || !s1->context_initialized)
return 0;
if (s->height ... | {
"code": [
" s->current_picture_ptr = NULL;"
],
"line_no": [
61
]
} | int FUNC_0(AVCodecContext *VAR_0, const AVCodecContext *VAR_1)
{
RV34DecContext *r = VAR_0->priv_data, *r1 = VAR_1->priv_data;
MpegEncContext * const s = &r->s, * const s1 = &r1->s;
int VAR_2;
if (VAR_0 == VAR_1 || !s1->context_initialized)
return 0;
if (s->height != s1->height ||... | [
"int FUNC_0(AVCodecContext *VAR_0, const AVCodecContext *VAR_1)\n{",
"RV34DecContext *r = VAR_0->priv_data, *r1 = VAR_1->priv_data;",
"MpegEncContext * const s = &r->s, * const s1 = &r1->s;",
"int VAR_2;",
"if (VAR_0 == VAR_1 || !s1->context_initialized)\nreturn 0;",
"if (s->height != s1->height || s->wid... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31,
33
],
[
35
],
[
39,
41
],
[
45
],
[
47
],
[
49
],
[
53
],
[
61
... |
6,337 | static av_cold int flac_encode_init(AVCodecContext *avctx)
{
int freq = avctx->sample_rate;
int channels = avctx->channels;
FlacEncodeContext *s = avctx->priv_data;
int i, level;
uint8_t *streaminfo;
s->avctx = avctx;
dsputil_init(&s->dsp, avctx);
if (avctx->sample_fmt != ... | true | FFmpeg | e08ec714801a8f8e72eeee57c2df48b8fbaf2e12 | static av_cold int flac_encode_init(AVCodecContext *avctx)
{
int freq = avctx->sample_rate;
int channels = avctx->channels;
FlacEncodeContext *s = avctx->priv_data;
int i, level;
uint8_t *streaminfo;
s->avctx = avctx;
dsputil_init(&s->dsp, avctx);
if (avctx->sample_fmt != ... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
int VAR_0 = avctx->sample_rate;
int VAR_1 = avctx->VAR_1;
FlacEncodeContext *s = avctx->priv_data;
int VAR_2, VAR_3;
uint8_t *streaminfo;
s->avctx = avctx;
dsputil_init(&s->dsp, avctx);
if (avctx->sample_fmt != SAMPLE_FMT_... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"int VAR_0 = avctx->sample_rate;",
"int VAR_1 = avctx->VAR_1;",
"FlacEncodeContext *s = avctx->priv_data;",
"int VAR_2, VAR_3;",
"uint8_t *streaminfo;",
"s->avctx = avctx;",
"dsputil_init(&s->dsp, avctx);",
"if (avctx->sample_fmt != SAMPLE_FMT_S... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
25,
27
],
[
31,
33
],
[
35
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[... |
6,338 | static void init_mbr(BDRVVVFATState* s)
{
/* TODO: if the files mbr.img and bootsect.img exist, use them */
mbr_t* real_mbr=(mbr_t*)s->first_sectors;
partition_t* partition = &(real_mbr->partition[0]);
int lba;
memset(s->first_sectors,0,512);
/* Win NT Disk Signature */
real_mbr-... | true | qemu | f91cbefe2d0eb3f7b5071bcb1fd3a02970f1a776 | static void init_mbr(BDRVVVFATState* s)
{
mbr_t* real_mbr=(mbr_t*)s->first_sectors;
partition_t* partition = &(real_mbr->partition[0]);
int lba;
memset(s->first_sectors,0,512);
real_mbr->nt_id= cpu_to_le32(0xbe1afdfa);
partition->attributes=0x80;
lba = sect... | {
"code": [
" lba|= sector2CHS(s->bs, &partition->end_CHS, s->sector_count);",
" partition->start_sector_long =cpu_to_le32(s->first_sectors_number-1);",
" partition->length_sector_long=cpu_to_le32(s->sector_count - s->first_sectors_number+1);"
],
"line_no": [
33,
39,
41
]
} | static void FUNC_0(BDRVVVFATState* VAR_0)
{
mbr_t* real_mbr=(mbr_t*)VAR_0->first_sectors;
partition_t* partition = &(real_mbr->partition[0]);
int VAR_1;
memset(VAR_0->first_sectors,0,512);
real_mbr->nt_id= cpu_to_le32(0xbe1afdfa);
partition->attributes=0x80;
... | [
"static void FUNC_0(BDRVVVFATState* VAR_0)\n{",
"mbr_t* real_mbr=(mbr_t*)VAR_0->first_sectors;",
"partition_t* partition = &(real_mbr->partition[0]);",
"int VAR_1;",
"memset(VAR_0->first_sectors,0,512);",
"real_mbr->nt_id= cpu_to_le32(0xbe1afdfa);",
"partition->attributes=0x80;",
"VAR_1 = sector2CHS(V... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
15
],
[
21
],
[
25
],
[
31
],
[
33
],
[
39
],
[
41
],
[
51,
53,
55
],
[
59
],
[
61
]
] |
6,340 | static void set_year_20xx(void)
{
/* Set BCD mode */
cmos_write(RTC_REG_B, cmos_read(RTC_REG_B) & ~REG_B_DM);
cmos_write(RTC_REG_A, 0x76);
cmos_write(RTC_YEAR, 0x11);
cmos_write(RTC_CENTURY, 0x20);
cmos_write(RTC_MONTH, 0x02);
cmos_write(RTC_DAY_OF_MONTH, 0x02);
cmos_write(RTC_HOURS, 0x0... | true | qemu | 4e45deedf57c6cc7113b588282d0c16f89298aff | static void set_year_20xx(void)
{
cmos_write(RTC_REG_B, cmos_read(RTC_REG_B) & ~REG_B_DM);
cmos_write(RTC_REG_A, 0x76);
cmos_write(RTC_YEAR, 0x11);
cmos_write(RTC_CENTURY, 0x20);
cmos_write(RTC_MONTH, 0x02);
cmos_write(RTC_DAY_OF_MONTH, 0x02);
cmos_write(RTC_HOURS, 0x02);
cmos_write... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
cmos_write(RTC_REG_B, cmos_read(RTC_REG_B) & ~REG_B_DM);
cmos_write(RTC_REG_A, 0x76);
cmos_write(RTC_YEAR, 0x11);
cmos_write(RTC_CENTURY, 0x20);
cmos_write(RTC_MONTH, 0x02);
cmos_write(RTC_DAY_OF_MONTH, 0x02);
cmos_write(RTC_HOURS, 0x02);
cmos_write(RTC_MI... | [
"static void FUNC_0(void)\n{",
"cmos_write(RTC_REG_B, cmos_read(RTC_REG_B) & ~REG_B_DM);",
"cmos_write(RTC_REG_A, 0x76);",
"cmos_write(RTC_YEAR, 0x11);",
"cmos_write(RTC_CENTURY, 0x20);",
"cmos_write(RTC_MONTH, 0x02);",
"cmos_write(RTC_DAY_OF_MONTH, 0x02);",
"cmos_write(RTC_HOURS, 0x02);",
"cmos_wri... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
22
],
[
23
]... |
6,341 | void avfilter_destroy(AVFilterContext *filter)
{
int i;
if(filter->filter->uninit)
filter->filter->uninit(filter);
for(i = 0; i < filter->input_count; i ++) {
if(filter->inputs[i]) {
filter->inputs[i]->src->outputs[filter->inputs[i]->srcpad] = NULL;
avfil... | true | FFmpeg | 0bb7408e557f5d5ee3f8c1d001012e5c204c20b4 | void avfilter_destroy(AVFilterContext *filter)
{
int i;
if(filter->filter->uninit)
filter->filter->uninit(filter);
for(i = 0; i < filter->input_count; i ++) {
if(filter->inputs[i]) {
filter->inputs[i]->src->outputs[filter->inputs[i]->srcpad] = NULL;
avfil... | {
"code": [],
"line_no": []
} | void FUNC_0(AVFilterContext *VAR_0)
{
int VAR_1;
if(VAR_0->VAR_0->uninit)
VAR_0->VAR_0->uninit(VAR_0);
for(VAR_1 = 0; VAR_1 < VAR_0->input_count; VAR_1 ++) {
if(VAR_0->inputs[VAR_1]) {
VAR_0->inputs[VAR_1]->src->outputs[VAR_0->inputs[VAR_1]->srcpad] = NULL;
... | [
"void FUNC_0(AVFilterContext *VAR_0)\n{",
"int VAR_1;",
"if(VAR_0->VAR_0->uninit)\nVAR_0->VAR_0->uninit(VAR_0);",
"for(VAR_1 = 0; VAR_1 < VAR_0->input_count; VAR_1 ++) {",
"if(VAR_0->inputs[VAR_1]) {",
"VAR_0->inputs[VAR_1]->src->outputs[VAR_0->inputs[VAR_1]->srcpad] = NULL;",
"avfilter_formats_unref(&V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
17
],
[
20
],
[
22
],
[
24
],
[
26
],
[
28
],
[
30
],
[
32
],
[
34
],
[
36,
38
],
[
40
],
[
42
],
[
44
],
[
46
],
[
48... |
6,342 | void usb_desc_create_serial(USBDevice *dev)
{
DeviceState *hcd = dev->qdev.parent_bus->parent;
const USBDesc *desc = usb_device_get_usb_desc(dev);
int index = desc->id.iSerialNumber;
char serial[64];
char *path;
int dst;
if (dev->serial) {
/* 'serial' usb bus property has ... | true | qemu | 9ef617246b629109e2779835b9a3a8400029484d | void usb_desc_create_serial(USBDevice *dev)
{
DeviceState *hcd = dev->qdev.parent_bus->parent;
const USBDesc *desc = usb_device_get_usb_desc(dev);
int index = desc->id.iSerialNumber;
char serial[64];
char *path;
int dst;
if (dev->serial) {
usb_desc_set_string(dev... | {
"code": [],
"line_no": []
} | void FUNC_0(USBDevice *VAR_0)
{
DeviceState *hcd = VAR_0->qdev.parent_bus->parent;
const USBDesc *VAR_1 = usb_device_get_usb_desc(VAR_0);
int VAR_2 = VAR_1->id.iSerialNumber;
char VAR_3[64];
char *VAR_4;
int VAR_5;
if (VAR_0->VAR_3) {
usb_desc_set_string(VAR_0, V... | [
"void FUNC_0(USBDevice *VAR_0)\n{",
"DeviceState *hcd = VAR_0->qdev.parent_bus->parent;",
"const USBDesc *VAR_1 = usb_device_get_usb_desc(VAR_0);",
"int VAR_2 = VAR_1->id.iSerialNumber;",
"char VAR_3[64];",
"char *VAR_4;",
"int VAR_5;",
"if (VAR_0->VAR_3) {",
"usb_desc_set_string(VAR_0, VAR_2, VAR_0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
48
... |
6,343 | const char *qdict_get_str(const QDict *qdict, const char *key)
{
QObject *obj = qdict_get_obj(qdict, key, QTYPE_QSTRING);
return qstring_get_str(qobject_to_qstring(obj));
}
| true | qemu | 7f0278435df1fa845b3bd9556942f89296d4246b | const char *qdict_get_str(const QDict *qdict, const char *key)
{
QObject *obj = qdict_get_obj(qdict, key, QTYPE_QSTRING);
return qstring_get_str(qobject_to_qstring(obj));
}
| {
"code": [
" QObject *obj = qdict_get_obj(qdict, key, QTYPE_QSTRING);",
" return qstring_get_str(qobject_to_qstring(obj));",
" return qstring_get_str(qobject_to_qstring(obj));"
],
"line_no": [
5,
7,
7
]
} | const char *FUNC_0(const QDict *VAR_0, const char *VAR_1)
{
QObject *obj = qdict_get_obj(VAR_0, VAR_1, QTYPE_QSTRING);
return qstring_get_str(qobject_to_qstring(obj));
}
| [
"const char *FUNC_0(const QDict *VAR_0, const char *VAR_1)\n{",
"QObject *obj = qdict_get_obj(VAR_0, VAR_1, QTYPE_QSTRING);",
"return qstring_get_str(qobject_to_qstring(obj));",
"}"
] | [
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
6,344 | static int get_coc(J2kDecoderContext *s, J2kCodingStyle *c, uint8_t *properties)
{
int compno;
if (s->buf_end - s->buf < 2)
return AVERROR(EINVAL);
compno = bytestream_get_byte(&s->buf);
c += compno;
c->csty = bytestream_get_byte(&s->buf);
get_cox(s, c);
properties[c... | true | FFmpeg | ddfa3751c092feaf1e080f66587024689dfe603c | static int get_coc(J2kDecoderContext *s, J2kCodingStyle *c, uint8_t *properties)
{
int compno;
if (s->buf_end - s->buf < 2)
return AVERROR(EINVAL);
compno = bytestream_get_byte(&s->buf);
c += compno;
c->csty = bytestream_get_byte(&s->buf);
get_cox(s, c);
properties[c... | {
"code": [
" return AVERROR(EINVAL);",
" if (s->buf_end - s->buf < 2)",
" compno = bytestream_get_byte(&s->buf);",
" c->csty = bytestream_get_byte(&s->buf);",
" compno = bytestream_get_byte(&s->buf);"
],
"line_no": [
11,
9,
15,
21,
15
]
} | static int FUNC_0(J2kDecoderContext *VAR_0, J2kCodingStyle *VAR_1, uint8_t *VAR_2)
{
int VAR_3;
if (VAR_0->buf_end - VAR_0->buf < 2)
return AVERROR(EINVAL);
VAR_3 = bytestream_get_byte(&VAR_0->buf);
VAR_1 += VAR_3;
VAR_1->csty = bytestream_get_byte(&VAR_0->buf);
get_cox(VAR... | [
"static int FUNC_0(J2kDecoderContext *VAR_0, J2kCodingStyle *VAR_1, uint8_t *VAR_2)\n{",
"int VAR_3;",
"if (VAR_0->buf_end - VAR_0->buf < 2)\nreturn AVERROR(EINVAL);",
"VAR_3 = bytestream_get_byte(&VAR_0->buf);",
"VAR_1 += VAR_3;",
"VAR_1->csty = bytestream_get_byte(&VAR_0->buf);",
"get_cox(VAR_0, VAR_1... | [
0,
0,
1,
1,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
]
] |
6,345 | static void FUNC(put_hevc_qpel_bi_w_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,
int16_t *src2,
int height, int denom, int wx0, int wx1,
int ox0, int ox1, intptr_t ... | true | FFmpeg | 439fbb9c8b2a90e97c44c7c57245e01ca84c865d | static void FUNC(put_hevc_qpel_bi_w_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,
int16_t *src2,
int height, int denom, int wx0, int wx1,
int ox0, int ox1, intptr_t ... | {
"code": [
" ((ox0 + ox1 + 1) << log2Wd)) >> (log2Wd + 1));"
],
"line_no": [
67
]
} | static void FUNC_0(put_hevc_qpel_bi_w_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,
int16_t *src2,
int height, int denom, int wx0, int wx1,
int ox0, int ox1, intptr_... | [
"static void FUNC_0(put_hevc_qpel_bi_w_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\nint16_t *src2,\nint height, int denom, int wx0, int wx1,\nint ox0, int ox1, intptr_t mx, intptr_t my, int width)\n{",
"int VAR_0, VAR_1;",
"const int8_t *VAR_2;",
"pixel *src = (pixel*)_src;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
6,347 | int bdrv_flush(BlockDriverState *bs)
{
Coroutine *co;
FlushCo flush_co = {
.bs = bs,
.ret = NOT_DONE,
};
if (qemu_in_coroutine()) {
/* Fast-path if already in coroutine context */
bdrv_flush_co_entry(&flush_co);
} else {
co = qemu_coroutine_create... | true | qemu | e92f0e1910f0655a0edd8d87c5a7262d36517a89 | int bdrv_flush(BlockDriverState *bs)
{
Coroutine *co;
FlushCo flush_co = {
.bs = bs,
.ret = NOT_DONE,
};
if (qemu_in_coroutine()) {
bdrv_flush_co_entry(&flush_co);
} else {
co = qemu_coroutine_create(bdrv_flush_co_entry, &flush_co);
qemu... | {
"code": [
" qemu_coroutine_enter(co);",
" qemu_coroutine_enter(co);",
" qemu_coroutine_enter(co);",
" qemu_coroutine_enter(co);",
" qemu_coroutine_enter(co);",
" qemu_coroutine_enter(co);"
],
"line_no": [
27,
27,
27,
27,
27,
... | int FUNC_0(BlockDriverState *VAR_0)
{
Coroutine *co;
FlushCo flush_co = {
.VAR_0 = VAR_0,
.ret = NOT_DONE,
};
if (qemu_in_coroutine()) {
bdrv_flush_co_entry(&flush_co);
} else {
co = qemu_coroutine_create(bdrv_flush_co_entry, &flush_co);
... | [
"int FUNC_0(BlockDriverState *VAR_0)\n{",
"Coroutine *co;",
"FlushCo flush_co = {",
".VAR_0 = VAR_0,\n.ret = NOT_DONE,\n};",
"if (qemu_in_coroutine()) {",
"bdrv_flush_co_entry(&flush_co);",
"} else {",
"co = qemu_coroutine_create(bdrv_flush_co_entry, &flush_co);",
"qemu_coroutine_enter(co);",
"BDR... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11,
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
]
] |
6,348 | void scsi_req_complete(SCSIRequest *req)
{
assert(req->status != -1);
scsi_req_ref(req);
scsi_req_dequeue(req);
req->bus->ops->complete(req->bus, SCSI_REASON_DONE,
req->tag,
req->status);
scsi_req_unref(req);
}
| true | qemu | 5c6c0e513600ba57c3e73b7151d3c0664438f7b5 | void scsi_req_complete(SCSIRequest *req)
{
assert(req->status != -1);
scsi_req_ref(req);
scsi_req_dequeue(req);
req->bus->ops->complete(req->bus, SCSI_REASON_DONE,
req->tag,
req->status);
scsi_req_unref(req);
}
| {
"code": [
" req->bus->ops->complete(req->bus, SCSI_REASON_DONE,",
" req->tag,",
" req->status);"
],
"line_no": [
11,
13,
15
]
} | void FUNC_0(SCSIRequest *VAR_0)
{
assert(VAR_0->status != -1);
scsi_req_ref(VAR_0);
scsi_req_dequeue(VAR_0);
VAR_0->bus->ops->complete(VAR_0->bus, SCSI_REASON_DONE,
VAR_0->tag,
VAR_0->status);
scsi_req_unref(VAR_0);
}
| [
"void FUNC_0(SCSIRequest *VAR_0)\n{",
"assert(VAR_0->status != -1);",
"scsi_req_ref(VAR_0);",
"scsi_req_dequeue(VAR_0);",
"VAR_0->bus->ops->complete(VAR_0->bus, SCSI_REASON_DONE,\nVAR_0->tag,\nVAR_0->status);",
"scsi_req_unref(VAR_0);",
"}"
] | [
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13,
15
],
[
17
],
[
19
]
] |
6,349 | static void iv_Decode_Chunk(Indeo3DecodeContext *s,
uint8_t *cur, uint8_t *ref, int width, int height,
const uint8_t *buf1, long cb_offset, const uint8_t *hdr,
const uint8_t *buf2, int min_width_160)
{
uint8_t bit_buf;
unsigned long bit_pos, lv, lv1, lv2;
long *width_tbl, widt... | true | FFmpeg | a44cb89b0f53d55dd1814138ba6526ecaf985f12 | static void iv_Decode_Chunk(Indeo3DecodeContext *s,
uint8_t *cur, uint8_t *ref, int width, int height,
const uint8_t *buf1, long cb_offset, const uint8_t *hdr,
const uint8_t *buf2, int min_width_160)
{
uint8_t bit_buf;
unsigned long bit_pos, lv, lv1, lv2;
long *width_tbl, widt... | {
"code": [],
"line_no": []
} | static void FUNC_0(Indeo3DecodeContext *VAR_0,
uint8_t *VAR_1, uint8_t *VAR_2, int VAR_3, int VAR_4,
const uint8_t *VAR_5, long VAR_6, const uint8_t *VAR_7,
const uint8_t *VAR_8, int VAR_9)
{
uint8_t bit_buf;
unsigned long VAR_10, VAR_11, VAR_12, VAR_13;
long *VAR_14, VAR_15[1... | [
"static void FUNC_0(Indeo3DecodeContext *VAR_0,\nuint8_t *VAR_1, uint8_t *VAR_2, int VAR_3, int VAR_4,\nconst uint8_t *VAR_5, long VAR_6, const uint8_t *VAR_7,\nconst uint8_t *VAR_8, int VAR_9)\n{",
"uint8_t bit_buf;",
"unsigned long VAR_10, VAR_11, VAR_12, VAR_13;",
"long *VAR_14, VAR_15[10];",
"const sign... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
... |
6,350 | static av_always_inline void get_mvdata_interlaced(VC1Context *v, int *dmv_x,
int *dmv_y, int *pred_flag)
{
int index, index1;
int extend_x = 0, extend_y = 0;
GetBitContext *gb = &v->s.gb;
int bits, esc;
int val, sign;
const int* offs_ta... | true | FFmpeg | 7b8c5b263bc680eff5710bee5994de39d47fc15e | static av_always_inline void get_mvdata_interlaced(VC1Context *v, int *dmv_x,
int *dmv_y, int *pred_flag)
{
int index, index1;
int extend_x = 0, extend_y = 0;
GetBitContext *gb = &v->s.gb;
int bits, esc;
int val, sign;
const int* offs_ta... | {
"code": [
" *pred_flag = *dmv_y & 1;",
" *dmv_y = (*dmv_y + *pred_flag) >> 1;",
" if (v->numref)"
],
"line_no": [
67,
69,
121
]
} | static av_always_inline void FUNC_0(VC1Context *v, int *dmv_x,
int *dmv_y, int *pred_flag)
{
int VAR_0, VAR_1;
int VAR_2 = 0, VAR_3 = 0;
GetBitContext *gb = &v->s.gb;
int VAR_4, VAR_5;
int VAR_6, VAR_7;
const int* VAR_8;
if (v->nu... | [
"static av_always_inline void FUNC_0(VC1Context *v, int *dmv_x,\nint *dmv_y, int *pred_flag)\n{",
"int VAR_0, VAR_1;",
"int VAR_2 = 0, VAR_3 = 0;",
"GetBitContext *gb = &v->s.gb;",
"int VAR_4, VAR_5;",
"int VAR_6, VAR_7;",
"const int* VAR_8;",
"if (v->numref) {",
"VAR_4 = VC1_2REF_MVDATA_VLC_BITS;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[... |
6,351 | static int alloc_buffers(AVCodecContext *avctx)
{
CFHDContext *s = avctx->priv_data;
int i, j, k, ret, planes;
if ((ret = ff_set_dimensions(avctx, s->coded_width, s->coded_height)) < 0)
return ret;
avctx->pix_fmt = s->coded_format;
avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s-... | true | FFmpeg | 5fb6e39dd1c3add4dc5bd7c7f0d8100d5aadad46 | static int alloc_buffers(AVCodecContext *avctx)
{
CFHDContext *s = avctx->priv_data;
int i, j, k, ret, planes;
if ((ret = ff_set_dimensions(avctx, s->coded_width, s->coded_height)) < 0)
return ret;
avctx->pix_fmt = s->coded_format;
avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s-... | {
"code": [
" s->plane[i].idwt_buf = av_malloc_array(height * stride, sizeof(*s->plane[i].idwt_buf));"
],
"line_no": [
59
]
} | static int FUNC_0(AVCodecContext *VAR_0)
{
CFHDContext *s = VAR_0->priv_data;
int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5;
if ((VAR_4 = ff_set_dimensions(VAR_0, s->coded_width, s->coded_height)) < 0)
return VAR_4;
VAR_0->pix_fmt = s->coded_format;
avcodec_get_chroma_sub_sample(VAR_0->pi... | [
"static int FUNC_0(AVCodecContext *VAR_0)\n{",
"CFHDContext *s = VAR_0->priv_data;",
"int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5;",
"if ((VAR_4 = ff_set_dimensions(VAR_0, s->coded_width, s->coded_height)) < 0)\nreturn VAR_4;",
"VAR_0->pix_fmt = s->coded_format;",
"avcodec_get_chroma_sub_sample(VAR_0->pix_fmt, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
... |
6,353 | static int frame_start(MpegEncContext *s)
{
int ret;
/* mark & release old frames */
if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr &&
s->last_picture_ptr != s->next_picture_ptr &&
s->last_picture_ptr->f.buf[0]) {
ff_mpeg_unref_picture(s, s->last_picture_ptr);
... | true | FFmpeg | f6774f905fb3cfdc319523ac640be30b14c1bc55 | static int frame_start(MpegEncContext *s)
{
int ret;
if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr &&
s->last_picture_ptr != s->next_picture_ptr &&
s->last_picture_ptr->f.buf[0]) {
ff_mpeg_unref_picture(s, s->last_picture_ptr);
}
s->current_pictur... | {
"code": [
" s->current_picture.f.data[i] +=",
" s->last_picture_ptr->f.buf[0]) {",
" s->current_picture_ptr->f.pict_type = s->pict_type;",
" s->current_picture_ptr->f.key_frame = s->pict_type == AV_PICTURE_TYPE_I;",
" if (s->last_picture_ptr->f.buf[0] &&",
... | static int FUNC_0(MpegEncContext *VAR_0)
{
int VAR_1;
if (VAR_0->pict_type != AV_PICTURE_TYPE_B && VAR_0->last_picture_ptr &&
VAR_0->last_picture_ptr != VAR_0->next_picture_ptr &&
VAR_0->last_picture_ptr->f.buf[0]) {
ff_mpeg_unref_picture(VAR_0, VAR_0->last_picture_ptr);
... | [
"static int FUNC_0(MpegEncContext *VAR_0)\n{",
"int VAR_1;",
"if (VAR_0->pict_type != AV_PICTURE_TYPE_B && VAR_0->last_picture_ptr &&\nVAR_0->last_picture_ptr != VAR_0->next_picture_ptr &&\nVAR_0->last_picture_ptr->f.buf[0]) {",
"ff_mpeg_unref_picture(VAR_0, VAR_0->last_picture_ptr);",
"}",
"VAR_0->curren... | [
0,
0,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11,
13,
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
29
],
[
31,
33,
35
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
51
],
[
53
],
[
55,
57,
59,
6... |
6,354 | static always_inline void mpeg_motion(MpegEncContext *s,
uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
int field_based, int bottom_field, int field_select,
uint8_t **ref_picture, op_pixels_func (*pix_op)[4],
... | true | FFmpeg | 5f6c92d40c2003471b005cc05430ec8488000867 | static always_inline void mpeg_motion(MpegEncContext *s,
uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
int field_based, int bottom_field, int field_select,
uint8_t **ref_picture, op_pixels_func (*pix_op)[4],
... | {
"code": [],
"line_no": []
} | static always_inline void FUNC_0(MpegEncContext *s,
uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
int field_based, int bottom_field, int field_select,
uint8_t **ref_picture, op_pixels_func (*pix_op)[4],
... | [
"static always_inline void FUNC_0(MpegEncContext *s,\nuint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,\nint field_based, int bottom_field, int field_select,\nuint8_t **ref_picture, op_pixels_func (*pix_op)[4],\nint motion_x, int motion_y, int h)\n{",
"uint8_t *ptr_y, *ptr_cb, *ptr_cr;",
"int VAR_0, VAR_1, V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
19,
21,
23
],
[
25
],
[
27
],
[
30,
34
],
[
36
],
[
38
],
[
42
],
[
44
],
[
46
],
[
50
],
[
52
],
[
54
],
[
56
],
[... |
6,355 | static int decode_user_data(MpegEncContext *s, GetBitContext *gb){
char buf[256];
int i;
int e;
int ver, build, ver2, ver3;
char last;
for(i=0; i<255; i++){
if(show_bits(gb, 23) == 0) break;
buf[i]= get_bits(gb, 8);
}
buf[i]=0;
/* divx detection */
... | true | FFmpeg | 63d33cf4390a9280b1ba42ee722f3140cf1cad3e | static int decode_user_data(MpegEncContext *s, GetBitContext *gb){
char buf[256];
int i;
int e;
int ver, build, ver2, ver3;
char last;
for(i=0; i<255; i++){
if(show_bits(gb, 23) == 0) break;
buf[i]= get_bits(gb, 8);
}
buf[i]=0;
e=sscanf(buf, "DivX... | {
"code": [
" int ver, build, ver2, ver3;",
" for(i=0; i<255; i++){",
" build= (ver<<16) + (ver2<<8) + ver3;"
],
"line_no": [
9,
15,
59
]
} | static int FUNC_0(MpegEncContext *VAR_0, GetBitContext *VAR_1){
char VAR_2[256];
int VAR_3;
int VAR_4;
int VAR_5, VAR_6, VAR_7, VAR_8;
char VAR_9;
for(VAR_3=0; VAR_3<255; VAR_3++){
if(show_bits(VAR_1, 23) == 0) break;
VAR_2[VAR_3]= get_bits(VAR_1, 8);
}
VAR_2[... | [
"static int FUNC_0(MpegEncContext *VAR_0, GetBitContext *VAR_1){",
"char VAR_2[256];",
"int VAR_3;",
"int VAR_4;",
"int VAR_5, VAR_6, VAR_7, VAR_8;",
"char VAR_9;",
"for(VAR_3=0; VAR_3<255; VAR_3++){",
"if(show_bits(VAR_1, 23) == 0) break;",
"VAR_2[VAR_3]= get_bits(VAR_1, 8);",
"}",
"VAR_2[VAR_3... | [
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
49
],
[
51,... |
6,356 | static void do_adaptive_prediction(struct G722Band *band, const int cur_diff)
{
int sg[2], limit, cur_qtzd_reconst;
const int cur_part_reconst = band->s_zero + cur_diff < 0;
sg[0] = sign_lookup[cur_part_reconst != band->part_reconst_mem[0]];
sg[1] = sign_lookup[cur_part_reconst == band->part_re... | true | FFmpeg | f55df62998681c7702f008ce7c12a00b15e33f53 | static void do_adaptive_prediction(struct G722Band *band, const int cur_diff)
{
int sg[2], limit, cur_qtzd_reconst;
const int cur_part_reconst = band->s_zero + cur_diff < 0;
sg[0] = sign_lookup[cur_part_reconst != band->part_reconst_mem[0]];
sg[1] = sign_lookup[cur_part_reconst == band->part_re... | {
"code": [
" (sg[1] << 7) + (band->pole_mem[1] * 127 >> 7), -12288, 12288);",
" cur_qtzd_reconst = av_clip_int16((band->s_predictor + cur_diff) << 1);"
],
"line_no": [
25,
39
]
} | static void FUNC_0(struct G722Band *VAR_0, const int VAR_1)
{
int VAR_2[2], VAR_3, VAR_4;
const int VAR_5 = VAR_0->s_zero + VAR_1 < 0;
VAR_2[0] = sign_lookup[VAR_5 != VAR_0->part_reconst_mem[0]];
VAR_2[1] = sign_lookup[VAR_5 == VAR_0->part_reconst_mem[1]];
VAR_0->part_reconst_mem[1] = VAR_... | [
"static void FUNC_0(struct G722Band *VAR_0, const int VAR_1)\n{",
"int VAR_2[2], VAR_3, VAR_4;",
"const int VAR_5 = VAR_0->s_zero + VAR_1 < 0;",
"VAR_2[0] = sign_lookup[VAR_5 != VAR_0->part_reconst_mem[0]];",
"VAR_2[1] = sign_lookup[VAR_5 == VAR_0->part_reconst_mem[1]];",
"VAR_0->part_reconst_mem[1] = VAR... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41,
43,
45
],
[
47
],
[
49
]
] |
6,357 | void helper_done(void)
{
env->pc = env->tsptr->tpc;
env->npc = env->tsptr->tnpc + 4;
PUT_CCR(env, env->tsptr->tstate >> 32);
env->asi = (env->tsptr->tstate >> 24) & 0xff;
change_pstate((env->tsptr->tstate >> 8) & 0xf3f);
PUT_CWP64(env, env->tsptr->tstate & 0xff);
env->tl--;
env-... | true | qemu | 8194f35a0c71a3bf169459bf715bea53b7bbc904 | void helper_done(void)
{
env->pc = env->tsptr->tpc;
env->npc = env->tsptr->tnpc + 4;
PUT_CCR(env, env->tsptr->tstate >> 32);
env->asi = (env->tsptr->tstate >> 24) & 0xff;
change_pstate((env->tsptr->tstate >> 8) & 0xf3f);
PUT_CWP64(env, env->tsptr->tstate & 0xff);
env->tl--;
env-... | {
"code": [
" env->tsptr = &env->ts[env->tl & MAXTL_MASK];",
" env->tsptr = &env->ts[env->tl & MAXTL_MASK];",
" env->pc = env->tsptr->tpc;",
" env->npc = env->tsptr->tnpc + 4;",
" PUT_CCR(env, env->tsptr->tstate >> 32);",
" env->asi = (env->tsptr->tstate >> 24) & 0xff;",
... | void FUNC_0(void)
{
env->pc = env->tsptr->tpc;
env->npc = env->tsptr->tnpc + 4;
PUT_CCR(env, env->tsptr->tstate >> 32);
env->asi = (env->tsptr->tstate >> 24) & 0xff;
change_pstate((env->tsptr->tstate >> 8) & 0xf3f);
PUT_CWP64(env, env->tsptr->tstate & 0xff);
env->tl--;
env->tspt... | [
"void FUNC_0(void)\n{",
"env->pc = env->tsptr->tpc;",
"env->npc = env->tsptr->tnpc + 4;",
"PUT_CCR(env, env->tsptr->tstate >> 32);",
"env->asi = (env->tsptr->tstate >> 24) & 0xff;",
"change_pstate((env->tsptr->tstate >> 8) & 0xf3f);",
"PUT_CWP64(env, env->tsptr->tstate & 0xff);",
"env->tl--;",
"env-... | [
0,
1,
1,
1,
1,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
6,358 | static const AVClass *ff_avio_child_class_next(const AVClass *prev)
{
return prev ? NULL : &ffurl_context_class;
}
| true | FFmpeg | ec4c48397641dbaf4ae8df36c32aaa5a311a11bf | static const AVClass *ff_avio_child_class_next(const AVClass *prev)
{
return prev ? NULL : &ffurl_context_class;
}
| {
"code": [
" return prev ? NULL : &ffurl_context_class;"
],
"line_no": [
5
]
} | static const AVClass *FUNC_0(const AVClass *prev)
{
return prev ? NULL : &ffurl_context_class;
}
| [
"static const AVClass *FUNC_0(const AVClass *prev)\n{",
"return prev ? NULL : &ffurl_context_class;",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
6,359 | static int decode_band(IVI5DecContext *ctx, int plane_num,
IVIBandDesc *band, AVCodecContext *avctx)
{
int result, i, t, idx1, idx2;
IVITile *tile;
uint16_t chksum;
band->buf = band->bufs[ctx->dst_buf];
band->ref_buf = band->bufs[ctx->ref_buf];
... | true | FFmpeg | f7d649185b62a83ab58514207151f2a8059090fb | static int decode_band(IVI5DecContext *ctx, int plane_num,
IVIBandDesc *band, AVCodecContext *avctx)
{
int result, i, t, idx1, idx2;
IVITile *tile;
uint16_t chksum;
band->buf = band->bufs[ctx->dst_buf];
band->ref_buf = band->bufs[ctx->ref_buf];
... | {
"code": [
" if (IVI_DEBUG && band->checksum_present) {"
],
"line_no": [
153
]
} | static int FUNC_0(IVI5DecContext *VAR_0, int VAR_1,
IVIBandDesc *VAR_2, AVCodecContext *VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
IVITile *tile;
uint16_t chksum;
VAR_2->buf = VAR_2->bufs[VAR_0->dst_buf];
VAR_2->ref_buf = VAR_2->bufs[VAR_0->ref... | [
"static int FUNC_0(IVI5DecContext *VAR_0, int VAR_1,\nIVIBandDesc *VAR_2, AVCodecContext *VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"IVITile *tile;",
"uint16_t chksum;",
"VAR_2->buf = VAR_2->bufs[VAR_0->dst_buf];",
"VAR_2->ref_buf = VAR_2->bufs[VAR_0->ref_buf];",
"VAR_2->d... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
53
],
[
55
... |
6,360 | static void test_interface_impl(const char *type)
{
Object *obj = object_new(type);
TestIf *iobj = TEST_IF(obj);
TestIfClass *ioc = TEST_IF_GET_CLASS(iobj);
g_assert(iobj);
g_assert(ioc->test == PATTERN);
} | true | qemu | 265804b5d755502438b4d42a3682f54e03ea4d32 | static void test_interface_impl(const char *type)
{
Object *obj = object_new(type);
TestIf *iobj = TEST_IF(obj);
TestIfClass *ioc = TEST_IF_GET_CLASS(iobj);
g_assert(iobj);
g_assert(ioc->test == PATTERN);
} | {
"code": [],
"line_no": []
} | static void FUNC_0(const char *VAR_0)
{
Object *obj = object_new(VAR_0);
TestIf *iobj = TEST_IF(obj);
TestIfClass *ioc = TEST_IF_GET_CLASS(iobj);
g_assert(iobj);
g_assert(ioc->test == PATTERN);
} | [
"static void FUNC_0(const char *VAR_0)\n{",
"Object *obj = object_new(VAR_0);",
"TestIf *iobj = TEST_IF(obj);",
"TestIfClass *ioc = TEST_IF_GET_CLASS(iobj);",
"g_assert(iobj);",
"g_assert(ioc->test == PATTERN);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
18
]
] |
6,362 | uint32_t HELPER(shl_cc)(CPUM68KState *env, uint32_t val, uint32_t shift)
{
uint64_t result;
shift &= 63;
result = (uint64_t)val << shift;
env->cc_c = (result >> 32) & 1;
env->cc_n = result;
env->cc_z = result;
env->cc_v = 0;
env->cc_x = shift ? env->cc_c : env->cc_x;
... | true | qemu | 367790cce8e14131426f5190dfd7d1bdbf656e4d | uint32_t HELPER(shl_cc)(CPUM68KState *env, uint32_t val, uint32_t shift)
{
uint64_t result;
shift &= 63;
result = (uint64_t)val << shift;
env->cc_c = (result >> 32) & 1;
env->cc_n = result;
env->cc_z = result;
env->cc_v = 0;
env->cc_x = shift ? env->cc_c : env->cc_x;
... | {
"code": [
"uint32_t HELPER(shl_cc)(CPUM68KState *env, uint32_t val, uint32_t shift)",
" uint64_t result;",
" shift &= 63;",
" result = (uint64_t)val << shift;",
" env->cc_c = (result >> 32) & 1;",
" env->cc_n = result;",
" env->cc_z = result;",
" env->cc_v = 0;",... | uint32_t FUNC_0(shl_cc)(CPUM68KState *env, uint32_t val, uint32_t shift)
{
uint64_t result;
shift &= 63;
result = (uint64_t)val << shift;
env->cc_c = (result >> 32) & 1;
env->cc_n = result;
env->cc_z = result;
env->cc_v = 0;
env->cc_x = shift ? env->cc_c : env->cc_x;
... | [
"uint32_t FUNC_0(shl_cc)(CPUM68KState *env, uint32_t val, uint32_t shift)\n{",
"uint64_t result;",
"shift &= 63;",
"result = (uint64_t)val << shift;",
"env->cc_c = (result >> 32) & 1;",
"env->cc_n = result;",
"env->cc_z = result;",
"env->cc_v = 0;",
"env->cc_x = shift ? env->cc_c : env->cc_x;",
"r... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
]
] |
6,363 | static int inc_refcounts(BlockDriverState *bs,
BdrvCheckResult *res,
uint16_t **refcount_table,
int64_t *refcount_table_size,
int64_t offset, int64_t size)
{
BDRVQcowState *s = bs->opaque;
uint64_t start, ... | true | qemu | 7453c96b78c2b09aa72924f933bb9616e5474194 | static int inc_refcounts(BlockDriverState *bs,
BdrvCheckResult *res,
uint16_t **refcount_table,
int64_t *refcount_table_size,
int64_t offset, int64_t size)
{
BDRVQcowState *s = bs->opaque;
uint64_t start, ... | {
"code": [
" uint16_t **refcount_table,",
" uint64_t start, last, cluster_offset, k;",
" if (++(*refcount_table)[k] == 0) {"
],
"line_no": [
5,
15,
57
]
} | static int FUNC_0(BlockDriverState *VAR_0,
BdrvCheckResult *VAR_1,
uint16_t **VAR_2,
int64_t *VAR_3,
int64_t VAR_4, int64_t VAR_5)
{
BDRVQcowState *s = VAR_0->opaque;
uint64_t start, last, cluster_offset, ... | [
"static int FUNC_0(BlockDriverState *VAR_0,\nBdrvCheckResult *VAR_1,\nuint16_t **VAR_2,\nint64_t *VAR_3,\nint64_t VAR_4, int64_t VAR_5)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"uint64_t start, last, cluster_offset, k;",
"int VAR_6;",
"if (VAR_5 <= 0) {",
"return 0;",
"}",
"start = start_of_cluster(s... | [
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[... |
6,364 | static void test_server_free(TestServer *server)
{
int i;
qemu_chr_delete(server->chr);
for (i = 0; i < server->fds_num; i++) {
close(server->fds[i]);
}
if (server->log_fd != -1) {
close(server->log_fd);
}
unlink(server->socket_path);
g_free(server->soc... | true | qemu | 9732baf67850dac57dfc7dc8980bf408889a8973 | static void test_server_free(TestServer *server)
{
int i;
qemu_chr_delete(server->chr);
for (i = 0; i < server->fds_num; i++) {
close(server->fds[i]);
}
if (server->log_fd != -1) {
close(server->log_fd);
}
unlink(server->socket_path);
g_free(server->soc... | {
"code": [
"static void test_server_free(TestServer *server)"
],
"line_no": [
1
]
} | static void FUNC_0(TestServer *VAR_0)
{
int VAR_1;
qemu_chr_delete(VAR_0->chr);
for (VAR_1 = 0; VAR_1 < VAR_0->fds_num; VAR_1++) {
close(VAR_0->fds[VAR_1]);
}
if (VAR_0->log_fd != -1) {
close(VAR_0->log_fd);
}
unlink(VAR_0->socket_path);
g_free(VAR_0->s... | [
"static void FUNC_0(TestServer *VAR_0)\n{",
"int VAR_1;",
"qemu_chr_delete(VAR_0->chr);",
"for (VAR_1 = 0; VAR_1 < VAR_0->fds_num; VAR_1++) {",
"close(VAR_0->fds[VAR_1]);",
"}",
"if (VAR_0->log_fd != -1) {",
"close(VAR_0->log_fd);",
"}",
"unlink(VAR_0->socket_path);",
"g_free(VAR_0->socket_path)... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
37
],
[
39
],
[
41
]
] |
6,365 | int qcow2_discard_clusters(BlockDriverState *bs, uint64_t offset,
int nb_sectors, enum qcow2_discard_type type, bool full_discard)
{
BDRVQcow2State *s = bs->opaque;
uint64_t end_offset;
uint64_t nb_clusters;
int ret;
end_offset = offset + (nb_sectors << BDRV_SECTOR_BITS);
/* Roun... | true | qemu | 0c1bd4692f9a19fb4d4bb3afe45439a09c37ab4c | int qcow2_discard_clusters(BlockDriverState *bs, uint64_t offset,
int nb_sectors, enum qcow2_discard_type type, bool full_discard)
{
BDRVQcow2State *s = bs->opaque;
uint64_t end_offset;
uint64_t nb_clusters;
int ret;
end_offset = offset + (nb_sectors << BDRV_SECTOR_BITS);
o... | {
"code": [
" offset = align_offset(offset, s->cluster_size);",
" end_offset = start_of_cluster(s, end_offset);",
" if (offset > end_offset) {",
" return 0;"
],
"line_no": [
23,
25,
29,
31
]
} | int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,
int VAR_2, enum qcow2_discard_type VAR_3, bool VAR_4)
{
BDRVQcow2State *s = VAR_0->opaque;
uint64_t end_offset;
uint64_t nb_clusters;
int VAR_5;
end_offset = VAR_1 + (VAR_2 << BDRV_SECTOR_BITS);
VAR_1 = align_offset(VAR_1,... | [
"int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,\nint VAR_2, enum qcow2_discard_type VAR_3, bool VAR_4)\n{",
"BDRVQcow2State *s = VAR_0->opaque;",
"uint64_t end_offset;",
"uint64_t nb_clusters;",
"int VAR_5;",
"end_offset = VAR_1 + (VAR_2 << BDRV_SECTOR_BITS);",
"VAR_1 = align_offset(VAR_1, s->clust... | [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
41
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
59
],
[... |
6,366 | static void audio_init(qemu_irq *pic)
{
struct soundhw *c;
int audio_enabled = 0;
for (c = soundhw; !audio_enabled && c->name; ++c) {
audio_enabled = c->enabled;
}
if (audio_enabled) {
AudioState *s;
s = AUD_init();
if (s) {
for (c = sound... | true | qemu | 0d9acba8fddbf970c7353083e6a60b47017ce3e4 | static void audio_init(qemu_irq *pic)
{
struct soundhw *c;
int audio_enabled = 0;
for (c = soundhw; !audio_enabled && c->name; ++c) {
audio_enabled = c->enabled;
}
if (audio_enabled) {
AudioState *s;
s = AUD_init();
if (s) {
for (c = sound... | {
"code": [
" if (s) {",
" for (c = soundhw; c->name; ++c) {",
" if (c->enabled) {",
" if (c->isa) {",
" c->init.init_isa(s, pic);",
" if (s) {",
" for (c = soundhw; c->name; ++c) {",
" ... | static void FUNC_0(qemu_irq *VAR_0)
{
struct soundhw *VAR_1;
int VAR_2 = 0;
for (VAR_1 = soundhw; !VAR_2 && VAR_1->name; ++VAR_1) {
VAR_2 = VAR_1->enabled;
}
if (VAR_2) {
AudioState *s;
s = AUD_init();
if (s) {
for (VAR_1 = soundhw; VAR_1-... | [
"static void FUNC_0(qemu_irq *VAR_0)\n{",
"struct soundhw *VAR_1;",
"int VAR_2 = 0;",
"for (VAR_1 = soundhw; !VAR_2 && VAR_1->name; ++VAR_1) {",
"VAR_2 = VAR_1->enabled;",
"}",
"if (VAR_2) {",
"AudioState *s;",
"s = AUD_init();",
"if (s) {",
"for (VAR_1 = soundhw; VAR_1->name; ++VAR_1) {",
"if... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
6,367 | static int gif_image_write_image(ByteIOContext *pb,
int x1, int y1, int width, int height,
const uint8_t *buf, int linesize, int pix_fmt)
{
PutBitContext p;
uint8_t buffer[200]; /* 100 * 9 / 8 = 113 */
int i, left, w, v;
const uin... | true | FFmpeg | f5fc28d23c46d334c809c11d62651d0080f1c325 | static int gif_image_write_image(ByteIOContext *pb,
int x1, int y1, int width, int height,
const uint8_t *buf, int linesize, int pix_fmt)
{
PutBitContext p;
uint8_t buffer[200];
int i, left, w, v;
const uint8_t *ptr;
... | {
"code": [
" for(i=0;i<GIF_CHUNKS;i++) {",
" if(left<=GIF_CHUNKS) {"
],
"line_no": [
69,
99
]
} | static int FUNC_0(ByteIOContext *VAR_0,
int VAR_1, int VAR_2, int VAR_3, int VAR_4,
const uint8_t *VAR_5, int VAR_6, int VAR_7)
{
PutBitContext p;
uint8_t buffer[200];
int VAR_8, VAR_9, VAR_10, VAR_11;
const uint8_t *VAR_12;
... | [
"static int FUNC_0(ByteIOContext *VAR_0,\nint VAR_1, int VAR_2, int VAR_3, int VAR_4,\nconst uint8_t *VAR_5, int VAR_6, int VAR_7)\n{",
"PutBitContext p;",
"uint8_t buffer[200];",
"int VAR_8, VAR_9, VAR_10, VAR_11;",
"const uint8_t *VAR_12;",
"put_byte(VAR_0, 0x2c);",
"put_le16(VAR_0, VAR_1);",
"put_l... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
37
],
[
41
],
[
45
],
[
57
],
[
59
],
[
61
],
[
65
],
[
69
... |
6,368 | int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **err)
{
FILE *fh;
int fd;
int64_t ret = -1, handle;
if (!has_mode) {
mode = "r";
}
slog("guest-file-open called, filepath: %s, mode: %s", path, mode);
fh = fopen(path, mode);
if (!fh... | true | qemu | c689b4f1bac352dcfd6ecb9a1d45337de0f1de67 | int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **err)
{
FILE *fh;
int fd;
int64_t ret = -1, handle;
if (!has_mode) {
mode = "r";
}
slog("guest-file-open called, filepath: %s, mode: %s", path, mode);
fh = fopen(path, mode);
if (!fh... | {
"code": [
" fh = fopen(path, mode);",
" if (!fh) {",
" error_setg_errno(err, errno, \"failed to open file '%s' (mode: '%s')\",",
" path, mode);"
],
"line_no": [
21,
23,
25,
27
]
} | int64_t FUNC_0(const char *path, bool has_mode, const char *mode, Error **err)
{
FILE *fh;
int VAR_0;
int64_t ret = -1, handle;
if (!has_mode) {
mode = "r";
}
slog("guest-file-open called, filepath: %s, mode: %s", path, mode);
fh = fopen(path, mode);
if (!fh) {
... | [
"int64_t FUNC_0(const char *path, bool has_mode, const char *mode, Error **err)\n{",
"FILE *fh;",
"int VAR_0;",
"int64_t ret = -1, handle;",
"if (!has_mode) {",
"mode = \"r\";",
"}",
"slog(\"guest-file-open called, filepath: %s, mode: %s\", path, mode);",
"fh = fopen(path, mode);",
"if (!fh) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49,
51
],
[
53
... |
6,369 | static void vp5_parse_coeff_models(VP56Context *s)
{
VP56RangeCoder *c = &s->c;
VP56Model *model = s->modelp;
uint8_t def_prob[11];
int node, cg, ctx;
int ct; /* code type */
int pt; /* plane type (0 for Y, 1 for U or V) */
memset(def_prob, 0x80, sizeof(def_prob));
for... | false | FFmpeg | 7c249d4fbaf4431b20a90a3c942f3370c0039d9e | static void vp5_parse_coeff_models(VP56Context *s)
{
VP56RangeCoder *c = &s->c;
VP56Model *model = s->modelp;
uint8_t def_prob[11];
int node, cg, ctx;
int ct;
int pt;
memset(def_prob, 0x80, sizeof(def_prob));
for (pt=0; pt<2; pt++)
for (node=0; node<11; node... | {
"code": [],
"line_no": []
} | static void FUNC_0(VP56Context *VAR_0)
{
VP56RangeCoder *c = &VAR_0->c;
VP56Model *model = VAR_0->modelp;
uint8_t def_prob[11];
int VAR_1, VAR_2, VAR_3;
int VAR_4;
int VAR_5;
memset(def_prob, 0x80, sizeof(def_prob));
for (VAR_5=0; VAR_5<2; VAR_5++)
for (VAR_... | [
"static void FUNC_0(VP56Context *VAR_0)\n{",
"VP56RangeCoder *c = &VAR_0->c;",
"VP56Model *model = VAR_0->modelp;",
"uint8_t def_prob[11];",
"int VAR_1, VAR_2, VAR_3;",
"int VAR_4;",
"int VAR_5;",
"memset(def_prob, 0x80, sizeof(def_prob));",
"for (VAR_5=0; VAR_5<2; VAR_5++)",
"for (VAR_1=0; VAR_1<... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
... |
6,370 | static void qmp_input_get_next_type(Visitor *v, int *kind, const int *qobjects,
const char *name, Error **errp)
{
QmpInputVisitor *qiv = to_qiv(v);
QObject *qobj = qmp_input_get_object(qiv, name, false);
if (!qobj) {
error_setg(errp, QERR_MISSING_PARAMETER... | true | qemu | 0426d53c6530606bf7641b83f2b755fe61c280ee | static void qmp_input_get_next_type(Visitor *v, int *kind, const int *qobjects,
const char *name, Error **errp)
{
QmpInputVisitor *qiv = to_qiv(v);
QObject *qobj = qmp_input_get_object(qiv, name, false);
if (!qobj) {
error_setg(errp, QERR_MISSING_PARAMETER... | {
"code": [
"static void qmp_input_get_next_type(Visitor *v, int *kind, const int *qobjects,",
" *kind = qobjects[qobject_type(qobj)];"
],
"line_no": [
1,
21
]
} | static void FUNC_0(Visitor *VAR_0, int *VAR_1, const int *VAR_2,
const char *VAR_3, Error **VAR_4)
{
QmpInputVisitor *qiv = to_qiv(VAR_0);
QObject *qobj = qmp_input_get_object(qiv, VAR_3, false);
if (!qobj) {
error_setg(VAR_4, QERR_MISSING_PARAMETER, VAR_3... | [
"static void FUNC_0(Visitor *VAR_0, int *VAR_1, const int *VAR_2,\nconst char *VAR_3, Error **VAR_4)\n{",
"QmpInputVisitor *qiv = to_qiv(VAR_0);",
"QObject *qobj = qmp_input_get_object(qiv, VAR_3, false);",
"if (!qobj) {",
"error_setg(VAR_4, QERR_MISSING_PARAMETER, VAR_3 ? VAR_3 : \"null\");",
"return;",
... | [
1,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
6,371 | static void breakpoint_invalidate(CPUArchState *env, target_ulong pc)
{
tb_invalidate_phys_addr(cpu_get_phys_page_debug(env, pc));
}
| true | qemu | 9d70c4b7b8a580959cc4f739e7c9a04964d00d46 | static void breakpoint_invalidate(CPUArchState *env, target_ulong pc)
{
tb_invalidate_phys_addr(cpu_get_phys_page_debug(env, pc));
}
| {
"code": [
" tb_invalidate_phys_addr(cpu_get_phys_page_debug(env, pc));"
],
"line_no": [
5
]
} | static void FUNC_0(CPUArchState *VAR_0, target_ulong VAR_1)
{
tb_invalidate_phys_addr(cpu_get_phys_page_debug(VAR_0, VAR_1));
}
| [
"static void FUNC_0(CPUArchState *VAR_0, target_ulong VAR_1)\n{",
"tb_invalidate_phys_addr(cpu_get_phys_page_debug(VAR_0, VAR_1));",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
6,372 | static void dump_data(const uint8_t *data, int len) {}
| true | qemu | 4f4321c11ff6e98583846bfd6f0e81954924b003 | static void dump_data(const uint8_t *data, int len) {}
| {
"code": [
"static void dump_data(const uint8_t *data, int len) {}"
],
"line_no": [
1
]
} | static void FUNC_0(const uint8_t *VAR_0, int VAR_1) {}
| [
"static void FUNC_0(const uint8_t *VAR_0, int VAR_1) {}"
] | [
1
] | [
[
1
]
] |
6,373 | static void vc1_inv_trans_8x4_c(uint8_t *dest, int linesize, DCTELEM *block)
{
int i;
register int t1,t2,t3,t4,t5,t6,t7,t8;
DCTELEM *src, *dst;
const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
src = block;
dst = block;
for(i = 0; i < 4; i++){
t1 = 12 * (src[0] + src[4]) + 4;... | true | FFmpeg | c23acbaed40101c677dfcfbbfe0d2c230a8e8f44 | static void vc1_inv_trans_8x4_c(uint8_t *dest, int linesize, DCTELEM *block)
{
int i;
register int t1,t2,t3,t4,t5,t6,t7,t8;
DCTELEM *src, *dst;
const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
src = block;
dst = block;
for(i = 0; i < 4; i++){
t1 = 12 * (src[0] + src[4]) + 4;... | {
"code": [
" const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;",
" const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;",
" const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;",
" const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;",
" dest[0*linesize] = cm[dest[0*linesize] + ((t1 + t3) >> 7)];",... | static void FUNC_0(uint8_t *VAR_0, int VAR_1, DCTELEM *VAR_2)
{
int VAR_3;
register int VAR_4,VAR_5,VAR_6,VAR_7,VAR_8,VAR_9,VAR_10,VAR_11;
DCTELEM *src, *dst;
const uint8_t *VAR_12 = ff_cropTbl + MAX_NEG_CROP;
src = VAR_2;
dst = VAR_2;
for(VAR_3 = 0; VAR_3 < 4; VAR_3++){
V... | [
"static void FUNC_0(uint8_t *VAR_0, int VAR_1, DCTELEM *VAR_2)\n{",
"int VAR_3;",
"register int VAR_4,VAR_5,VAR_6,VAR_7,VAR_8,VAR_9,VAR_10,VAR_11;",
"DCTELEM *src, *dst;",
"const uint8_t *VAR_12 = ff_cropTbl + MAX_NEG_CROP;",
"src = VAR_2;",
"dst = VAR_2;",
"for(VAR_3 = 0; VAR_3 < 4; VAR_3++){",
"VA... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
... |
6,375 | void kvm_arch_update_guest_debug(CPUState *env, struct kvm_guest_debug *dbg)
{
const uint8_t type_code[] = {
[GDB_BREAKPOINT_HW] = 0x0,
[GDB_WATCHPOINT_WRITE] = 0x1,
[GDB_WATCHPOINT_ACCESS] = 0x3
};
const uint8_t len_code[] = {
[1] = 0x0, [2] = 0x1, [4] = 0x3, [8] = 0... | true | qemu | 95c077c91900c1420cd4f0be996ffeea6fb6cec8 | void kvm_arch_update_guest_debug(CPUState *env, struct kvm_guest_debug *dbg)
{
const uint8_t type_code[] = {
[GDB_BREAKPOINT_HW] = 0x0,
[GDB_WATCHPOINT_WRITE] = 0x1,
[GDB_WATCHPOINT_ACCESS] = 0x3
};
const uint8_t len_code[] = {
[1] = 0x0, [2] = 0x1, [4] = 0x3, [8] = 0... | {
"code": [
" (len_code[hw_breakpoint[n].len] << (18 + n*4));"
],
"line_no": [
45
]
} | void FUNC_0(CPUState *VAR_0, struct kvm_guest_debug *VAR_1)
{
const uint8_t VAR_2[] = {
[GDB_BREAKPOINT_HW] = 0x0,
[GDB_WATCHPOINT_WRITE] = 0x1,
[GDB_WATCHPOINT_ACCESS] = 0x3
};
const uint8_t VAR_3[] = {
[1] = 0x0, [2] = 0x1, [4] = 0x3, [8] = 0x2
};
int VAR_... | [
"void FUNC_0(CPUState *VAR_0, struct kvm_guest_debug *VAR_1)\n{",
"const uint8_t VAR_2[] = {",
"[GDB_BREAKPOINT_HW] = 0x0,\n[GDB_WATCHPOINT_WRITE] = 0x1,\n[GDB_WATCHPOINT_ACCESS] = 0x3\n};",
"const uint8_t VAR_3[] = {",
"[1] = 0x0, [2] = 0x1, [4] = 0x3, [8] = 0x2\n};",
"int VAR_4;",
"if (kvm_sw_breakpoi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9,
11,
13
],
[
15
],
[
17,
19
],
[
21
],
[
25,
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43,
45
],
[
47
],
[
49
],
[
53
],
[... |
6,376 | static inline int cris_swap(const int mode, int x)
{
switch (mode)
{
case N: asm ("swapn\t%0\n" : "+r" (x) : "0" (x)); break;
case W: asm ("swapw\t%0\n" : "+r" (x) : "0" (x)); break;
case B: asm ("swapb\t%0\n" : "+r" (x) : "0" (x)); break;
case R: asm ("swapr\t%0\n" : "+r" (x) : "0" (x)); break;
cas... | true | qemu | 21ce148c7ec71ee32834061355a5ecfd1a11f90f | static inline int cris_swap(const int mode, int x)
{
switch (mode)
{
case N: asm ("swapn\t%0\n" : "+r" (x) : "0" (x)); break;
case W: asm ("swapw\t%0\n" : "+r" (x) : "0" (x)); break;
case B: asm ("swapb\t%0\n" : "+r" (x) : "0" (x)); break;
case R: asm ("swapr\t%0\n" : "+r" (x) : "0" (x)); break;
cas... | {
"code": [
"static inline int cris_swap(const int mode, int x)"
],
"line_no": [
1
]
} | static inline int FUNC_0(const int VAR_0, int VAR_1)
{
switch (VAR_0)
{
case N: asm ("swapn\t%0\n" : "+r" (VAR_1) : "0" (VAR_1)); break;
case W: asm ("swapw\t%0\n" : "+r" (VAR_1) : "0" (VAR_1)); break;
case B: asm ("swapb\t%0\n" : "+r" (VAR_1) : "0" (VAR_1)); break;
case R: asm ("swapr\t%0\n" : "+r" (V... | [
"static inline int FUNC_0(const int VAR_0, int VAR_1)\n{",
"switch (VAR_0)\n{",
"case N: asm (\"swapn\\t%0\\n\" : \"+r\" (VAR_1) : \"0\" (VAR_1)); break;",
"case W: asm (\"swapw\\t%0\\n\" : \"+r\" (VAR_1) : \"0\" (VAR_1)); break;",
"case B: asm (\"swapb\\t%0\\n\" : \"+r\" (VAR_1) : \"0\" (VAR_1)); break;",
... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
6,378 | static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos,
int *outFilterSize, int xInc, int srcW,
int dstW, int filterAlign, int one,
int flags, int cpu_flags,
SwsVector *srcFilter, ... | true | FFmpeg | 2e2a2d8801b045b3dd58a4e49e8e040b559bc84a | static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos,
int *outFilterSize, int xInc, int srcW,
int dstW, int filterAlign, int one,
int flags, int cpu_flags,
SwsVector *srcFilter, ... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(int16_t **outFilter, int32_t **filterPos,
int *outFilterSize, int xInc, int srcW,
int dstW, int filterAlign, int one,
int flags, int cpu_flags,
SwsVector *srcFilter, SwsV... | [
"static av_cold int FUNC_0(int16_t **outFilter, int32_t **filterPos,\nint *outFilterSize, int xInc, int srcW,\nint dstW, int filterAlign, int one,\nint flags, int cpu_flags,\nSwsVector *srcFilter, SwsVector *dstFilter,\ndouble param[2], int srcPos, int dstPos)\n{",
"int VAR_6;",
"int VAR_1;",
"int VAR_2;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49,
51
],
[
55
],
[
57
... |
6,379 | static uint64_t hb_count_between(HBitmap *hb, uint64_t start, uint64_t last)
{
HBitmapIter hbi;
uint64_t count = 0;
uint64_t end = last + 1;
unsigned long cur;
size_t pos;
hbitmap_iter_init(&hbi, hb, start << hb->granularity);
for (;;) {
pos = hbitmap_iter_next_word(&hbi, ... | true | qemu | 591b320ad046b2780c1b2841b836b50ba8192f02 | static uint64_t hb_count_between(HBitmap *hb, uint64_t start, uint64_t last)
{
HBitmapIter hbi;
uint64_t count = 0;
uint64_t end = last + 1;
unsigned long cur;
size_t pos;
hbitmap_iter_init(&hbi, hb, start << hb->granularity);
for (;;) {
pos = hbitmap_iter_next_word(&hbi, ... | {
"code": [
" count += popcountl(cur);",
" count += popcountl(cur);"
],
"line_no": [
29,
29
]
} | static uint64_t FUNC_0(HBitmap *hb, uint64_t start, uint64_t last)
{
HBitmapIter hbi;
uint64_t count = 0;
uint64_t end = last + 1;
unsigned long VAR_0;
size_t pos;
hbitmap_iter_init(&hbi, hb, start << hb->granularity);
for (;;) {
pos = hbitmap_iter_next_word(&hbi, &VAR_0);... | [
"static uint64_t FUNC_0(HBitmap *hb, uint64_t start, uint64_t last)\n{",
"HBitmapIter hbi;",
"uint64_t count = 0;",
"uint64_t end = last + 1;",
"unsigned long VAR_0;",
"size_t pos;",
"hbitmap_iter_init(&hbi, hb, start << hb->granularity);",
"for (;;) {",
"pos = hbitmap_iter_next_word(&hbi, &VAR_0);"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
... |
6,380 | static int img_convert(int argc, char **argv)
{
int c, ret = 0, n, n1, bs_n, bs_i, compress, cluster_size, cluster_sectors;
int progress = 0, flags;
const char *fmt, *out_fmt, *cache, *out_baseimg, *out_filename;
BlockDriver *drv, *proto_drv;
BlockDriverState **bs = NULL, *out_bs = NULL;
... | true | qemu | c8057f951d64de93bfd01569c0a725baa9f94372 | static int img_convert(int argc, char **argv)
{
int c, ret = 0, n, n1, bs_n, bs_i, compress, cluster_size, cluster_sectors;
int progress = 0, flags;
const char *fmt, *out_fmt, *cache, *out_baseimg, *out_filename;
BlockDriver *drv, *proto_drv;
BlockDriverState **bs = NULL, *out_bs = NULL;
... | {
"code": [
" if (options && !strcmp(options, \"?\")) {",
" if (options && !strcmp(options, \"?\")) {"
],
"line_no": [
185,
185
]
} | static int FUNC_0(int VAR_0, char **VAR_1)
{
int VAR_2, VAR_3 = 0, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;
int VAR_11 = 0, VAR_12;
const char *VAR_13, *VAR_14, *VAR_15, *VAR_16, *VAR_17;
BlockDriver *drv, *proto_drv;
BlockDriverState **bs = NULL, *out_bs = NULL;
int64_t total_se... | [
"static int FUNC_0(int VAR_0, char **VAR_1)\n{",
"int VAR_2, VAR_3 = 0, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;",
"int VAR_11 = 0, VAR_12;",
"const char *VAR_13, *VAR_14, *VAR_15, *VAR_16, *VAR_17;",
"BlockDriver *drv, *proto_drv;",
"BlockDriverState **bs = NULL, *out_bs = NULL;",
"int64_t tot... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
... |
6,381 | static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
AVIContext *avi = s->priv_data;
ByteIOContext *pb = &s->pb;
uint32_t tag, tag1, handler;
int codec_type, stream_index, frame_period, bit_rate, scale, rate;
unsigned int size, nb_frames;
int i, n;
AVStream *st;
... | true | FFmpeg | 8d65750ef1089561f0257fa1719b3094f341d16f | static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
AVIContext *avi = s->priv_data;
ByteIOContext *pb = &s->pb;
uint32_t tag, tag1, handler;
int codec_type, stream_index, frame_period, bit_rate, scale, rate;
unsigned int size, nb_frames;
int i, n;
AVStream *st;
... | {
"code": [
" st->codec.frame_rate_base * AV_TIME_BASE,"
],
"line_no": [
285
]
} | static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1)
{
AVIContext *avi = VAR_0->priv_data;
ByteIOContext *pb = &VAR_0->pb;
uint32_t tag, tag1, handler;
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;
unsigned int VAR_8, VAR_9;
int VAR_10, VAR_11;
AVStream *st;
AVIS... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1)\n{",
"AVIContext *avi = VAR_0->priv_data;",
"ByteIOContext *pb = &VAR_0->pb;",
"uint32_t tag, tag1, handler;",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;",
"unsigned int VAR_8, VAR_9;",
"int VAR_10, VAR_11;",
"AVStream *st;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49,... |
6,382 | static void test_io(void)
{
#ifndef _WIN32
/* socketpair(PF_UNIX) which does not exist on windows */
int sv[2];
int r;
unsigned i, j, k, s, t;
fd_set fds;
unsigned niov;
struct iovec *iov, *siov;
unsigned char *buf;
size_t sz;
iov_random(&iov, &niov);
sz = iov_si... | true | qemu | d55f295b2b5477528da601dba57880b0d5f24cb1 | static void test_io(void)
{
#ifndef _WIN32
int sv[2];
int r;
unsigned i, j, k, s, t;
fd_set fds;
unsigned niov;
struct iovec *iov, *siov;
unsigned char *buf;
size_t sz;
iov_random(&iov, &niov);
sz = iov_size(iov, niov);
buf = g_malloc(sz);
for (i = 0; ... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
#ifndef _WIN32
int VAR_0[2];
int VAR_1;
unsigned VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;
fd_set fds;
unsigned VAR_7;
struct iovec *VAR_8, *VAR_9;
unsigned char *VAR_10;
size_t sz;
iov_random(&VAR_8, &VAR_7);
sz = iov_size(VAR_8, VAR_7);
... | [
"static void FUNC_0(void)\n{",
"#ifndef _WIN32\nint VAR_0[2];",
"int VAR_1;",
"unsigned VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;",
"fd_set fds;",
"unsigned VAR_7;",
"struct iovec *VAR_8, *VAR_9;",
"unsigned char *VAR_10;",
"size_t sz;",
"iov_random(&VAR_8, &VAR_7);",
"sz = iov_size(VAR_8, VAR_7);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
51
],
... |
6,383 | static int jpeg2000_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt)
{
Jpeg2000DecoderContext *s = avctx->priv_data;
ThreadFrame frame = { .f = data };
AVFrame *picture = data;
int tileno, ret;
s->avctx = avctx;
s->bu... | true | FFmpeg | 1a3598aae768465a8efc8475b6df5a8261bc62fc | static int jpeg2000_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt)
{
Jpeg2000DecoderContext *s = avctx->priv_data;
ThreadFrame frame = { .f = data };
AVFrame *picture = data;
int tileno, ret;
s->avctx = avctx;
s->bu... | {
"code": [
" return AVERROR_INVALIDDATA;",
" if (s->buf_end - s->buf < 2)",
" s->buf = s->buf_start = avpkt->data;",
" s->buf_end = s->buf_start + avpkt->size;",
" if (s->buf_end - s->buf < 2)",
" if ((AV_RB32(s->buf) == 12) &&",
" (AV_RB32(s->buf + 4)... | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
Jpeg2000DecoderContext *s = VAR_0->priv_data;
ThreadFrame frame = { .f = VAR_1 };
AVFrame *picture = VAR_1;
int VAR_4, VAR_5;
s->VAR_0 = VAR_0;
s->buf = s->bu... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"Jpeg2000DecoderContext *s = VAR_0->priv_data;",
"ThreadFrame frame = { .f = VAR_1 };",
"AVFrame *picture = VAR_1;",
"int VAR_4, VAR_5;",
"s->VAR_0 = VAR_0;",
"s->buf = s->buf_start = VAR_3->VAR_1;",
"s... | [
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29
],
[
33,
35
],
[
41,
43,
45
],
[
47
],
[
49,
51
],
[
53
],
[
55
],
[
57
],
[... |
6,384 | static HotpluggableCPUList *spapr_query_hotpluggable_cpus(MachineState *machine)
{
int i;
HotpluggableCPUList *head = NULL;
sPAPRMachineState *spapr = SPAPR_MACHINE(machine);
sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(machine);
int spapr_max_cores = max_cpus / smp_threads;
g_asser... | true | qemu | 3c0c47e3464f3c54bd3f1cc6d4da2cbf7465e295 | static HotpluggableCPUList *spapr_query_hotpluggable_cpus(MachineState *machine)
{
int i;
HotpluggableCPUList *head = NULL;
sPAPRMachineState *spapr = SPAPR_MACHINE(machine);
sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(machine);
int spapr_max_cores = max_cpus / smp_threads;
g_asser... | {
"code": [
" sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(machine);",
" g_assert(smc->dr_cpu_enabled);",
" g_assert(smc->dr_cpu_enabled);"
],
"line_no": [
11,
17,
17
]
} | static HotpluggableCPUList *FUNC_0(MachineState *machine)
{
int VAR_0;
HotpluggableCPUList *head = NULL;
sPAPRMachineState *spapr = SPAPR_MACHINE(machine);
sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(machine);
int VAR_1 = max_cpus / smp_threads;
g_assert(smc->dr_cpu_enabled);
... | [
"static HotpluggableCPUList *FUNC_0(MachineState *machine)\n{",
"int VAR_0;",
"HotpluggableCPUList *head = NULL;",
"sPAPRMachineState *spapr = SPAPR_MACHINE(machine);",
"sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(machine);",
"int VAR_1 = max_cpus / smp_threads;",
"g_assert(smc->dr_cpu_enabled);",
... | [
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
... |
6,386 | static int matroska_ebmlnum_uint(MatroskaDemuxContext *matroska,
uint8_t *data, uint32_t size, uint64_t *num)
{
ByteIOContext pb;
init_put_byte(&pb, data, size, 0, NULL, NULL, NULL, NULL);
return ebml_read_num(matroska, &pb, 8, num);
}
| true | FFmpeg | 465c28b6b43be2563e0b644ec22cf641fe374d8d | static int matroska_ebmlnum_uint(MatroskaDemuxContext *matroska,
uint8_t *data, uint32_t size, uint64_t *num)
{
ByteIOContext pb;
init_put_byte(&pb, data, size, 0, NULL, NULL, NULL, NULL);
return ebml_read_num(matroska, &pb, 8, num);
}
| {
"code": [
" return ebml_read_num(matroska, &pb, 8, num);"
],
"line_no": [
11
]
} | static int FUNC_0(MatroskaDemuxContext *VAR_0,
uint8_t *VAR_1, uint32_t VAR_2, uint64_t *VAR_3)
{
ByteIOContext pb;
init_put_byte(&pb, VAR_1, VAR_2, 0, NULL, NULL, NULL, NULL);
return ebml_read_num(VAR_0, &pb, 8, VAR_3);
}
| [
"static int FUNC_0(MatroskaDemuxContext *VAR_0,\nuint8_t *VAR_1, uint32_t VAR_2, uint64_t *VAR_3)\n{",
"ByteIOContext pb;",
"init_put_byte(&pb, VAR_1, VAR_2, 0, NULL, NULL, NULL, NULL);",
"return ebml_read_num(VAR_0, &pb, 8, VAR_3);",
"}"
] | [
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
6,387 | static int check(AVIOContext *pb, int64_t pos)
{
int64_t ret = avio_seek(pb, pos, SEEK_SET);
unsigned header;
MPADecodeHeader sd;
if (ret < 0)
return ret;
header = avio_rb32(pb);
if (ff_mpa_check_header(header) < 0)
return -1;
if (avpriv_mpegaudio_decode_header(&s... | false | FFmpeg | de1b1a7da9e6ddf42447271e519099a88b389e4a | static int check(AVIOContext *pb, int64_t pos)
{
int64_t ret = avio_seek(pb, pos, SEEK_SET);
unsigned header;
MPADecodeHeader sd;
if (ret < 0)
return ret;
header = avio_rb32(pb);
if (ff_mpa_check_header(header) < 0)
return -1;
if (avpriv_mpegaudio_decode_header(&s... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVIOContext *VAR_0, int64_t VAR_1)
{
int64_t ret = avio_seek(VAR_0, VAR_1, SEEK_SET);
unsigned VAR_2;
MPADecodeHeader sd;
if (ret < 0)
return ret;
VAR_2 = avio_rb32(VAR_0);
if (ff_mpa_check_header(VAR_2) < 0)
return -1;
if (avpriv_mpegaudio_decod... | [
"static int FUNC_0(AVIOContext *VAR_0, int64_t VAR_1)\n{",
"int64_t ret = avio_seek(VAR_0, VAR_1, SEEK_SET);",
"unsigned VAR_2;",
"MPADecodeHeader sd;",
"if (ret < 0)\nreturn ret;",
"VAR_2 = avio_rb32(VAR_0);",
"if (ff_mpa_check_header(VAR_2) < 0)\nreturn -1;",
"if (avpriv_mpegaudio_decode_header(&sd,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
17
],
[
19,
21
],
[
23,
25
],
[
29
],
[
31
]
] |
6,388 | static void slavio_timer_get_out(SLAVIO_TIMERState *s)
{
uint64_t count;
count = s->limit - PERIODS_TO_LIMIT(ptimer_get_count(s->timer));
DPRINTF("get_out: limit %" PRIx64 " count %x%08x\n", s->limit,
s->counthigh, s->count);
s->count = count & TIMER_COUNT_MASK32;
s->counthigh =... | false | qemu | bd7e2875fe99ca9621c02666e11389602b512f4b | static void slavio_timer_get_out(SLAVIO_TIMERState *s)
{
uint64_t count;
count = s->limit - PERIODS_TO_LIMIT(ptimer_get_count(s->timer));
DPRINTF("get_out: limit %" PRIx64 " count %x%08x\n", s->limit,
s->counthigh, s->count);
s->count = count & TIMER_COUNT_MASK32;
s->counthigh =... | {
"code": [],
"line_no": []
} | static void FUNC_0(SLAVIO_TIMERState *VAR_0)
{
uint64_t count;
count = VAR_0->limit - PERIODS_TO_LIMIT(ptimer_get_count(VAR_0->timer));
DPRINTF("get_out: limit %" PRIx64 " count %x%08x\n", VAR_0->limit,
VAR_0->counthigh, VAR_0->count);
VAR_0->count = count & TIMER_COUNT_MASK32;
... | [
"static void FUNC_0(SLAVIO_TIMERState *VAR_0)\n{",
"uint64_t count;",
"count = VAR_0->limit - PERIODS_TO_LIMIT(ptimer_get_count(VAR_0->timer));",
"DPRINTF(\"get_out: limit %\" PRIx64 \" count %x%08x\\n\", VAR_0->limit,\nVAR_0->counthigh, VAR_0->count);",
"VAR_0->count = count & TIMER_COUNT_MASK32;",
"VAR_... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
]
] |
6,389 | void acpi_pm1_cnt_reset(ACPIREGS *ar)
{
ar->pm1.cnt.cnt = 0;
if (ar->pm1.cnt.cmos_s3) {
qemu_irq_lower(ar->pm1.cnt.cmos_s3);
}
}
| false | qemu | da98c8eb4c35225049cad8cf767647eb39788b5d | void acpi_pm1_cnt_reset(ACPIREGS *ar)
{
ar->pm1.cnt.cnt = 0;
if (ar->pm1.cnt.cmos_s3) {
qemu_irq_lower(ar->pm1.cnt.cmos_s3);
}
}
| {
"code": [],
"line_no": []
} | void FUNC_0(ACPIREGS *VAR_0)
{
VAR_0->pm1.cnt.cnt = 0;
if (VAR_0->pm1.cnt.cmos_s3) {
qemu_irq_lower(VAR_0->pm1.cnt.cmos_s3);
}
}
| [
"void FUNC_0(ACPIREGS *VAR_0)\n{",
"VAR_0->pm1.cnt.cnt = 0;",
"if (VAR_0->pm1.cnt.cmos_s3) {",
"qemu_irq_lower(VAR_0->pm1.cnt.cmos_s3);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
6,390 | static uint16_t pci_req_id_cache_extract(PCIReqIDCache *cache)
{
uint8_t bus_n;
uint16_t result;
switch (cache->type) {
case PCI_REQ_ID_BDF:
result = pci_get_bdf(cache->dev);
break;
case PCI_REQ_ID_SECONDARY_BUS:
bus_n = pci_bus_num(cache->dev->bus);
resul... | false | qemu | fd56e0612b6454a282fa6a953fdb09281a98c589 | static uint16_t pci_req_id_cache_extract(PCIReqIDCache *cache)
{
uint8_t bus_n;
uint16_t result;
switch (cache->type) {
case PCI_REQ_ID_BDF:
result = pci_get_bdf(cache->dev);
break;
case PCI_REQ_ID_SECONDARY_BUS:
bus_n = pci_bus_num(cache->dev->bus);
resul... | {
"code": [],
"line_no": []
} | static uint16_t FUNC_0(PCIReqIDCache *cache)
{
uint8_t bus_n;
uint16_t result;
switch (cache->type) {
case PCI_REQ_ID_BDF:
result = pci_get_bdf(cache->dev);
break;
case PCI_REQ_ID_SECONDARY_BUS:
bus_n = pci_bus_num(cache->dev->bus);
result = PCI_BUILD_BDF(... | [
"static uint16_t FUNC_0(PCIReqIDCache *cache)\n{",
"uint8_t bus_n;",
"uint16_t result;",
"switch (cache->type) {",
"case PCI_REQ_ID_BDF:\nresult = pci_get_bdf(cache->dev);",
"break;",
"case PCI_REQ_ID_SECONDARY_BUS:\nbus_n = pci_bus_num(cache->dev->bus);",
"result = PCI_BUILD_BDF(bus_n, 0);",
"break... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27,
29,
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
]
] |
6,391 | int qio_channel_readv_all(QIOChannel *ioc,
const struct iovec *iov,
size_t niov,
Error **errp)
{
int ret = -1;
struct iovec *local_iov = g_new(struct iovec, niov);
struct iovec *local_iov_head = local_iov;
unsigned int... | false | qemu | 9ffb8270205a274a18ee4f8a735e2fccaf957246 | int qio_channel_readv_all(QIOChannel *ioc,
const struct iovec *iov,
size_t niov,
Error **errp)
{
int ret = -1;
struct iovec *local_iov = g_new(struct iovec, niov);
struct iovec *local_iov_head = local_iov;
unsigned int... | {
"code": [],
"line_no": []
} | int FUNC_0(QIOChannel *VAR_0,
const struct iovec *VAR_1,
size_t VAR_2,
Error **VAR_3)
{
int VAR_4 = -1;
struct iovec *VAR_5 = g_new(struct iovec, VAR_2);
struct iovec *VAR_6 = VAR_5;
unsigned int VAR_7 = VAR_2;
... | [
"int FUNC_0(QIOChannel *VAR_0,\nconst struct iovec *VAR_1,\nsize_t VAR_2,\nError **VAR_3)\n{",
"int VAR_4 = -1;",
"struct iovec *VAR_5 = g_new(struct iovec, VAR_2);",
"struct iovec *VAR_6 = VAR_5;",
"unsigned int VAR_7 = VAR_2;",
"VAR_7 = iov_copy(VAR_5, VAR_7,\nVAR_1, VAR_2,\n0, iov_size(VAR_1, VAR_2));"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23,
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51
... |
6,392 | static void ioreq_unmap(struct ioreq *ioreq)
{
int gnt = ioreq->blkdev->xendev.gnttabdev;
int i;
if (ioreq->v.niov == 0) {
return;
}
if (batch_maps) {
if (!ioreq->pages) {
return;
}
if (xc_gnttab_munmap(gnt, ioreq->pages, ioreq->v.niov) != 0) ... | false | qemu | d5b93ddfefe63d5869a8eb97ea3474867d3b105b | static void ioreq_unmap(struct ioreq *ioreq)
{
int gnt = ioreq->blkdev->xendev.gnttabdev;
int i;
if (ioreq->v.niov == 0) {
return;
}
if (batch_maps) {
if (!ioreq->pages) {
return;
}
if (xc_gnttab_munmap(gnt, ioreq->pages, ioreq->v.niov) != 0) ... | {
"code": [],
"line_no": []
} | static void FUNC_0(struct VAR_0 *VAR_0)
{
int VAR_1 = VAR_0->blkdev->xendev.gnttabdev;
int VAR_2;
if (VAR_0->v.niov == 0) {
return;
}
if (batch_maps) {
if (!VAR_0->pages) {
return;
}
if (xc_gnttab_munmap(VAR_1, VAR_0->pages, VAR_0->v.niov) != ... | [
"static void FUNC_0(struct VAR_0 *VAR_0)\n{",
"int VAR_1 = VAR_0->blkdev->xendev.gnttabdev;",
"int VAR_2;",
"if (VAR_0->v.niov == 0) {",
"return;",
"}",
"if (batch_maps) {",
"if (!VAR_0->pages) {",
"return;",
"}",
"if (xc_gnttab_munmap(VAR_1, VAR_0->pages, VAR_0->v.niov) != 0) {",
"xen_be_prin... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
... |
6,393 | static struct omap_mpuio_s *omap_mpuio_init(MemoryRegion *memory,
target_phys_addr_t base,
qemu_irq kbd_int, qemu_irq gpio_int, qemu_irq wakeup,
omap_clk clk)
{
struct omap_mpuio_s *s = (struct omap_mpuio_s *)
g_malloc0(sizeof(struct omap_mpuio_s));
... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static struct omap_mpuio_s *omap_mpuio_init(MemoryRegion *memory,
target_phys_addr_t base,
qemu_irq kbd_int, qemu_irq gpio_int, qemu_irq wakeup,
omap_clk clk)
{
struct omap_mpuio_s *s = (struct omap_mpuio_s *)
g_malloc0(sizeof(struct omap_mpuio_s));
... | {
"code": [],
"line_no": []
} | static struct omap_mpuio_s *FUNC_0(MemoryRegion *VAR_0,
target_phys_addr_t VAR_1,
qemu_irq VAR_2, qemu_irq VAR_3, qemu_irq VAR_4,
omap_clk VAR_5)
{
struct omap_mpuio_s *VAR_6 = (struct omap_mpuio_s *)
g_malloc0(sizeof(struct omap_mpuio_s));
VA... | [
"static struct omap_mpuio_s *FUNC_0(MemoryRegion *VAR_0,\ntarget_phys_addr_t VAR_1,\nqemu_irq VAR_2, qemu_irq VAR_3, qemu_irq VAR_4,\nomap_clk VAR_5)\n{",
"struct omap_mpuio_s *VAR_6 = (struct omap_mpuio_s *)\ng_malloc0(sizeof(struct omap_mpuio_s));",
"VAR_6->irq = VAR_3;",
"VAR_6->kbd_irq = VAR_2;",
"VAR_6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11,
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
33
],
[
37
],
[
41
],
[
43
]
] |
6,394 | static target_ulong h_read(PowerPCCPU *cpu, sPAPRMachineState *spapr,
target_ulong opcode, target_ulong *args)
{
CPUPPCState *env = &cpu->env;
target_ulong flags = args[0];
target_ulong ptex = args[1];
uint8_t *hpte;
int i, ridx, n_entries = 1;
if (!valid_pte... | false | qemu | e57ca75ce3b2bd33102573a8c0555d62e1bcfceb | static target_ulong h_read(PowerPCCPU *cpu, sPAPRMachineState *spapr,
target_ulong opcode, target_ulong *args)
{
CPUPPCState *env = &cpu->env;
target_ulong flags = args[0];
target_ulong ptex = args[1];
uint8_t *hpte;
int i, ridx, n_entries = 1;
if (!valid_pte... | {
"code": [],
"line_no": []
} | static target_ulong FUNC_0(PowerPCCPU *cpu, sPAPRMachineState *spapr,
target_ulong opcode, target_ulong *args)
{
CPUPPCState *env = &cpu->env;
target_ulong flags = args[0];
target_ulong ptex = args[1];
uint8_t *hpte;
int VAR_0, VAR_1, VAR_2 = 1;
if (!valid_pt... | [
"static target_ulong FUNC_0(PowerPCCPU *cpu, sPAPRMachineState *spapr,\ntarget_ulong opcode, target_ulong *args)\n{",
"CPUPPCState *env = &cpu->env;",
"target_ulong flags = args[0];",
"target_ulong ptex = args[1];",
"uint8_t *hpte;",
"int VAR_0, VAR_1, VAR_2 = 1;",
"if (!valid_ptex(cpu, ptex)) {",
"re... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
6,395 | static void dec_pattern(DisasContext *dc)
{
unsigned int mode;
int l1;
if ((dc->tb_flags & MSR_EE_FLAG)
&& !(dc->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK)
&& !((dc->env->pvr.regs[2] & PVR2_USE_PCMP_INSTR))) {
tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP);
... | false | qemu | 97f90cbfe810bb153fc44bde732d9639610783bb | static void dec_pattern(DisasContext *dc)
{
unsigned int mode;
int l1;
if ((dc->tb_flags & MSR_EE_FLAG)
&& !(dc->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK)
&& !((dc->env->pvr.regs[2] & PVR2_USE_PCMP_INSTR))) {
tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0)
{
unsigned int VAR_1;
int VAR_2;
if ((VAR_0->tb_flags & MSR_EE_FLAG)
&& !(VAR_0->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK)
&& !((VAR_0->env->pvr.regs[2] & PVR2_USE_PCMP_INSTR))) {
tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_O... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"unsigned int VAR_1;",
"int VAR_2;",
"if ((VAR_0->tb_flags & MSR_EE_FLAG)\n&& !(VAR_0->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK)\n&& !((VAR_0->env->pvr.regs[2] & PVR2_USE_PCMP_INSTR))) {",
"tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP);",
"t_gen_raise_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13,
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29,
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
],
... |
6,396 | static MemoryRegionSection phys_page_find(target_phys_addr_t index)
{
uint16_t *p = phys_page_find_alloc(index, 0);
uint16_t s_index = phys_section_unassigned;
MemoryRegionSection section;
target_phys_addr_t delta;
if (p) {
s_index = *p;
}
section = phys_sections[s_index];... | false | qemu | 31ab2b4a46eb9761feae9457387eb5ee523f5afd | static MemoryRegionSection phys_page_find(target_phys_addr_t index)
{
uint16_t *p = phys_page_find_alloc(index, 0);
uint16_t s_index = phys_section_unassigned;
MemoryRegionSection section;
target_phys_addr_t delta;
if (p) {
s_index = *p;
}
section = phys_sections[s_index];... | {
"code": [],
"line_no": []
} | static MemoryRegionSection FUNC_0(target_phys_addr_t index)
{
uint16_t *p = phys_page_find_alloc(index, 0);
uint16_t s_index = phys_section_unassigned;
MemoryRegionSection section;
target_phys_addr_t delta;
if (p) {
s_index = *p;
}
section = phys_sections[s_index];
in... | [
"static MemoryRegionSection FUNC_0(target_phys_addr_t index)\n{",
"uint16_t *p = phys_page_find_alloc(index, 0);",
"uint16_t s_index = phys_section_unassigned;",
"MemoryRegionSection section;",
"target_phys_addr_t delta;",
"if (p) {",
"s_index = *p;",
"}",
"section = phys_sections[s_index];",
"ind... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
6,397 | static void qmp_output_end_struct(Visitor *v, Error **errp)
{
QmpOutputVisitor *qov = to_qov(v);
qmp_output_pop(qov);
}
| false | qemu | 56a6f02b8ce1fe41a2a9077593e46eca7d98267d | static void qmp_output_end_struct(Visitor *v, Error **errp)
{
QmpOutputVisitor *qov = to_qov(v);
qmp_output_pop(qov);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(Visitor *VAR_0, Error **VAR_1)
{
QmpOutputVisitor *qov = to_qov(VAR_0);
qmp_output_pop(qov);
}
| [
"static void FUNC_0(Visitor *VAR_0, Error **VAR_1)\n{",
"QmpOutputVisitor *qov = to_qov(VAR_0);",
"qmp_output_pop(qov);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
6,398 | static av_cold int MP3lame_encode_init(AVCodecContext *avctx)
{
Mp3AudioContext *s = avctx->priv_data;
if (avctx->channels > 2)
return -1;
s->stereo = avctx->channels > 1 ? 1 : 0;
if ((s->gfp = lame_init()) == NULL)
goto err;
lame_set_in_samplerate(s->gfp, avctx->sample... | false | FFmpeg | 5b1a06b1c9c596b3c406ea632a252dcccbee25ed | static av_cold int MP3lame_encode_init(AVCodecContext *avctx)
{
Mp3AudioContext *s = avctx->priv_data;
if (avctx->channels > 2)
return -1;
s->stereo = avctx->channels > 1 ? 1 : 0;
if ((s->gfp = lame_init()) == NULL)
goto err;
lame_set_in_samplerate(s->gfp, avctx->sample... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
Mp3AudioContext *s = avctx->priv_data;
if (avctx->channels > 2)
return -1;
s->stereo = avctx->channels > 1 ? 1 : 0;
if ((s->gfp = lame_init()) == NULL)
goto err;
lame_set_in_samplerate(s->gfp, avctx->sample_rate);
... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"Mp3AudioContext *s = avctx->priv_data;",
"if (avctx->channels > 2)\nreturn -1;",
"s->stereo = avctx->channels > 1 ? 1 : 0;",
"if ((s->gfp = lame_init()) == NULL)\ngoto err;",
"lame_set_in_samplerate(s->gfp, avctx->sample_rate);",
"lame_set_out_samp... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49... |
6,399 | static void string_cleanup(void *datap)
{
StringSerializeData *d = datap;
visit_free(string_output_get_visitor(d->sov));
visit_free(d->siv);
g_free(d->string);
g_free(d);
}
| false | qemu | 3b098d56979d2f7fd707c5be85555d114353a28d | static void string_cleanup(void *datap)
{
StringSerializeData *d = datap;
visit_free(string_output_get_visitor(d->sov));
visit_free(d->siv);
g_free(d->string);
g_free(d);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
StringSerializeData *d = VAR_0;
visit_free(string_output_get_visitor(d->sov));
visit_free(d->siv);
g_free(d->string);
g_free(d);
}
| [
"static void FUNC_0(void *VAR_0)\n{",
"StringSerializeData *d = VAR_0;",
"visit_free(string_output_get_visitor(d->sov));",
"visit_free(d->siv);",
"g_free(d->string);",
"g_free(d);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
6,400 | static int n8x0_atag_setup(void *p, int model)
{
uint8_t *b;
uint16_t *w;
uint32_t *l;
struct omap_gpiosw_info_s *gpiosw;
struct omap_partition_info_s *partition;
const char *tag;
w = p;
stw_p(w++, OMAP_TAG_UART); /* u16 tag */
stw_p(w++, 4); /* u16 len */
stw... | false | qemu | 35c2c8dc8c0899882a8e0d349d93bd657772f1e7 | static int n8x0_atag_setup(void *p, int model)
{
uint8_t *b;
uint16_t *w;
uint32_t *l;
struct omap_gpiosw_info_s *gpiosw;
struct omap_partition_info_s *partition;
const char *tag;
w = p;
stw_p(w++, OMAP_TAG_UART);
stw_p(w++, 4);
stw_p(w++, (1 << 2) | (1 << 1... | {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0, int VAR_1)
{
uint8_t *b;
uint16_t *w;
uint32_t *l;
struct omap_gpiosw_info_s *VAR_2;
struct omap_partition_info_s *VAR_3;
const char *VAR_4;
w = VAR_0;
stw_p(w++, OMAP_TAG_UART);
stw_p(w++, 4);
stw_p(w++, (1 << 2) | (1 << 1) | ... | [
"static int FUNC_0(void *VAR_0, int VAR_1)\n{",
"uint8_t *b;",
"uint16_t *w;",
"uint32_t *l;",
"struct omap_gpiosw_info_s *VAR_2;",
"struct omap_partition_info_s *VAR_3;",
"const char *VAR_4;",
"w = VAR_0;",
"stw_p(w++, OMAP_TAG_UART);",
"stw_p(w++, 4);",
"stw_p(w++, (1 << 2) | (1 << 1) | (1 << ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43,
47
],
[
49
],
[
51
... |
6,402 | vdi_co_preadv(BlockDriverState *bs, uint64_t offset, uint64_t bytes,
QEMUIOVector *qiov, int flags)
{
BDRVVdiState *s = bs->opaque;
QEMUIOVector local_qiov;
uint32_t bmap_entry;
uint32_t block_index;
uint32_t offset_in_block;
uint32_t n_bytes;
uint64_t bytes_done = 0;
... | false | qemu | a03ef88f77af045a2eb9629b5ce774a3fb973c5e | vdi_co_preadv(BlockDriverState *bs, uint64_t offset, uint64_t bytes,
QEMUIOVector *qiov, int flags)
{
BDRVVdiState *s = bs->opaque;
QEMUIOVector local_qiov;
uint32_t bmap_entry;
uint32_t block_index;
uint32_t offset_in_block;
uint32_t n_bytes;
uint64_t bytes_done = 0;
... | {
"code": [],
"line_no": []
} | FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1, uint64_t VAR_2,
QEMUIOVector *VAR_3, int VAR_4)
{
BDRVVdiState *s = VAR_0->opaque;
QEMUIOVector local_qiov;
uint32_t bmap_entry;
uint32_t block_index;
uint32_t offset_in_block;
uint32_t n_bytes;
uint64_t bytes_done = 0;
... | [
"FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1, uint64_t VAR_2,\nQEMUIOVector *VAR_3, int VAR_4)\n{",
"BDRVVdiState *s = VAR_0->opaque;",
"QEMUIOVector local_qiov;",
"uint32_t bmap_entry;",
"uint32_t block_index;",
"uint32_t offset_in_block;",
"uint32_t n_bytes;",
"uint64_t bytes_done = 0;",
"int V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43,
45
],
[
51
],
[
53
],
[
57
... |
6,403 | static void spapr_core_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
Error **errp)
{
sPAPRMachineState *spapr = SPAPR_MACHINE(OBJECT(hotplug_dev));
MachineClass *mc = MACHINE_GET_CLASS(spapr);
sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
sPAPRCPUCore *core = ... | false | qemu | 4f9242fc931ab5e5b1b753c8e5a76c50c0b0612e | static void spapr_core_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
Error **errp)
{
sPAPRMachineState *spapr = SPAPR_MACHINE(OBJECT(hotplug_dev));
MachineClass *mc = MACHINE_GET_CLASS(spapr);
sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
sPAPRCPUCore *core = ... | {
"code": [],
"line_no": []
} | static void FUNC_0(HotplugHandler *VAR_0, DeviceState *VAR_1,
Error **VAR_2)
{
sPAPRMachineState *spapr = SPAPR_MACHINE(OBJECT(VAR_0));
MachineClass *mc = MACHINE_GET_CLASS(spapr);
sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
sPAPRCPUCore *core = SPAPR_CPU_CORE(OBJ... | [
"static void FUNC_0(HotplugHandler *VAR_0, DeviceState *VAR_1,\nError **VAR_2)\n{",
"sPAPRMachineState *spapr = SPAPR_MACHINE(OBJECT(VAR_0));",
"MachineClass *mc = MACHINE_GET_CLASS(spapr);",
"sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(mc);",
"sPAPRCPUCore *core = SPAPR_CPU_CORE(OBJECT(VAR_1));",
"CPUCo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
... |
6,405 | static void bt_dummy_lmp_acl_resp(struct bt_link_s *link,
const uint8_t *data, int start, int len)
{
fprintf(stderr, "%s: stray ACL response PDU, fixme\n", __FUNCTION__);
exit(-1);
}
| false | qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | static void bt_dummy_lmp_acl_resp(struct bt_link_s *link,
const uint8_t *data, int start, int len)
{
fprintf(stderr, "%s: stray ACL response PDU, fixme\n", __FUNCTION__);
exit(-1);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(struct bt_link_s *VAR_0,
const uint8_t *VAR_1, int VAR_2, int VAR_3)
{
fprintf(stderr, "%s: stray ACL response PDU, fixme\n", __FUNCTION__);
exit(-1);
}
| [
"static void FUNC_0(struct bt_link_s *VAR_0,\nconst uint8_t *VAR_1, int VAR_2, int VAR_3)\n{",
"fprintf(stderr, \"%s: stray ACL response PDU, fixme\\n\", __FUNCTION__);",
"exit(-1);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
]
] |
6,406 | static bool msix_vector_masked(PCIDevice *dev, int vector, bool fmask)
{
unsigned offset = vector * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_VECTOR_CTRL;
return fmask || dev->msix_table[offset] & PCI_MSIX_ENTRY_CTRL_MASKBIT;
}
| false | qemu | 70f8ee395afda6d96b15cb9a5b311af7720dded0 | static bool msix_vector_masked(PCIDevice *dev, int vector, bool fmask)
{
unsigned offset = vector * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_VECTOR_CTRL;
return fmask || dev->msix_table[offset] & PCI_MSIX_ENTRY_CTRL_MASKBIT;
}
| {
"code": [],
"line_no": []
} | static bool FUNC_0(PCIDevice *dev, int vector, bool fmask)
{
unsigned VAR_0 = vector * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_VECTOR_CTRL;
return fmask || dev->msix_table[VAR_0] & PCI_MSIX_ENTRY_CTRL_MASKBIT;
}
| [
"static bool FUNC_0(PCIDevice *dev, int vector, bool fmask)\n{",
"unsigned VAR_0 = vector * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_VECTOR_CTRL;",
"return fmask || dev->msix_table[VAR_0] & PCI_MSIX_ENTRY_CTRL_MASKBIT;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
6,407 | static void virtio_blk_dma_restart_bh(void *opaque)
{
VirtIOBlock *s = opaque;
VirtIOBlockReq *req = s->rq;
MultiReqBuffer mrb = {
.num_writes = 0,
};
qemu_bh_delete(s->bh);
s->bh = NULL;
s->rq = NULL;
while (req) {
virtio_blk_handle_request(req, &mrb);
... | false | qemu | c20fd872257fb9abd2ce99741937c0f65aa162b7 | static void virtio_blk_dma_restart_bh(void *opaque)
{
VirtIOBlock *s = opaque;
VirtIOBlockReq *req = s->rq;
MultiReqBuffer mrb = {
.num_writes = 0,
};
qemu_bh_delete(s->bh);
s->bh = NULL;
s->rq = NULL;
while (req) {
virtio_blk_handle_request(req, &mrb);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
VirtIOBlock *s = VAR_0;
VirtIOBlockReq *req = s->rq;
MultiReqBuffer mrb = {
.num_writes = 0,
};
qemu_bh_delete(s->bh);
s->bh = NULL;
s->rq = NULL;
while (req) {
virtio_blk_handle_request(req, &mrb);
req = req->ne... | [
"static void FUNC_0(void *VAR_0)\n{",
"VirtIOBlock *s = VAR_0;",
"VirtIOBlockReq *req = s->rq;",
"MultiReqBuffer mrb = {",
".num_writes = 0,\n};",
"qemu_bh_delete(s->bh);",
"s->bh = NULL;",
"s->rq = NULL;",
"while (req) {",
"virtio_blk_handle_request(req, &mrb);",
"req = req->next;",
"}",
"i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
6,410 | iscsi_aio_readv(BlockDriverState *bs, int64_t sector_num,
QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb,
void *opaque)
{
IscsiLun *iscsilun = bs->opaque;
struct iscsi_context *iscsi = iscsilun->iscsi;
IscsiAIOCB *acb;
size_t qem... | true | qemu | e829b0bb054ed3389e5b22dad61875e51674e629 | iscsi_aio_readv(BlockDriverState *bs, int64_t sector_num,
QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb,
void *opaque)
{
IscsiLun *iscsilun = bs->opaque;
struct iscsi_context *iscsi = iscsilun->iscsi;
IscsiAIOCB *acb;
size_t qem... | {
"code": [
" case TYPE_DISK:",
" break;",
" break;",
" default:"
],
"line_no": [
113,
125,
125,
127
]
} | FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,
QEMUIOVector *VAR_2, int VAR_3,
BlockDriverCompletionFunc *VAR_4,
void *VAR_5)
{
IscsiLun *iscsilun = VAR_0->VAR_5;
struct iscsi_context *VAR_6 = iscsilun->VAR_6;
IscsiAIOCB *acb;
size_t qemu_read_size... | [
"FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,\nQEMUIOVector *VAR_2, int VAR_3,\nBlockDriverCompletionFunc *VAR_4,\nvoid *VAR_5)\n{",
"IscsiLun *iscsilun = VAR_0->VAR_5;",
"struct iscsi_context *VAR_6 = iscsilun->VAR_6;",
"IscsiAIOCB *acb;",
"size_t qemu_read_size;",
"int VAR_7;",
"uint64_t lba;",
"u... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
6,411 | static void vmsvga_reset(struct vmsvga_state_s *s)
{
s->index = 0;
s->enable = 0;
s->config = 0;
s->width = -1;
s->height = -1;
s->svgaid = SVGA_ID;
s->depth = 24;
s->bypp = (s->depth + 7) >> 3;
s->cursor.on = 0;
s->redraw_fifo_first = 0;
s->redraw_fifo_last = 0;
... | true | qemu | a6109ff1b5d7184a9d490c4ff94f175940232ebd | static void vmsvga_reset(struct vmsvga_state_s *s)
{
s->index = 0;
s->enable = 0;
s->config = 0;
s->width = -1;
s->height = -1;
s->svgaid = SVGA_ID;
s->depth = 24;
s->bypp = (s->depth + 7) >> 3;
s->cursor.on = 0;
s->redraw_fifo_first = 0;
s->redraw_fifo_last = 0;
... | {
"code": [
" s->depth = 24;",
" s->bypp = (s->depth + 7) >> 3;"
],
"line_no": [
17,
19
]
} | static void FUNC_0(struct vmsvga_state_s *VAR_0)
{
VAR_0->index = 0;
VAR_0->enable = 0;
VAR_0->config = 0;
VAR_0->width = -1;
VAR_0->height = -1;
VAR_0->svgaid = SVGA_ID;
VAR_0->depth = 24;
VAR_0->bypp = (VAR_0->depth + 7) >> 3;
VAR_0->cursor.on = 0;
VAR_0->redraw_fifo... | [
"static void FUNC_0(struct vmsvga_state_s *VAR_0)\n{",
"VAR_0->index = 0;",
"VAR_0->enable = 0;",
"VAR_0->config = 0;",
"VAR_0->width = -1;",
"VAR_0->height = -1;",
"VAR_0->svgaid = SVGA_ID;",
"VAR_0->depth = 24;",
"VAR_0->bypp = (VAR_0->depth + 7) >> 3;",
"VAR_0->cursor.on = 0;",
"VAR_0->redraw... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
... |
6,412 | static MpegTSService *mpegts_add_service(MpegTSWrite *ts, int sid,
const char *provider_name,
const char *name)
{
MpegTSService *service;
service = av_mallocz(sizeof(MpegTSService));
if (!service)
return NULL;... | true | FFmpeg | 5b220e1e19c17b202d83d9be0868d152109ae8f0 | static MpegTSService *mpegts_add_service(MpegTSWrite *ts, int sid,
const char *provider_name,
const char *name)
{
MpegTSService *service;
service = av_mallocz(sizeof(MpegTSService));
if (!service)
return NULL;... | {
"code": [
" service->pcr_pid = 0x1fff;"
],
"line_no": [
27
]
} | static MpegTSService *FUNC_0(MpegTSWrite *ts, int sid,
const char *provider_name,
const char *name)
{
MpegTSService *service;
service = av_mallocz(sizeof(MpegTSService));
if (!service)
return NULL;
servic... | [
"static MpegTSService *FUNC_0(MpegTSWrite *ts, int sid,\nconst char *provider_name,\nconst char *name)\n{",
"MpegTSService *service;",
"service = av_mallocz(sizeof(MpegTSService));",
"if (!service)\nreturn NULL;",
"service->pmt.pid = ts->pmt_start_pid + ts->nb_services;",
"service->sid = s... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
6,413 | static const uint8_t *read_huffman_tables(FourXContext *f,
const uint8_t * const buf, int buf_size)
{
int frequency[512] = { 0 };
uint8_t flag[512];
int up[512];
uint8_t len_tab[257];
int bits_tab[257];
int start, end;
const uint8_t *ptr = b... | true | FFmpeg | 53a3fdbfc56da54b2c0a44eb1f956ec9d67d1425 | static const uint8_t *read_huffman_tables(FourXContext *f,
const uint8_t * const buf, int buf_size)
{
int frequency[512] = { 0 };
uint8_t flag[512];
int up[512];
uint8_t len_tab[257];
int bits_tab[257];
int start, end;
const uint8_t *ptr = b... | {
"code": [
" if (start <= end && ptr_end - ptr < end - start + 1 + 1)"
],
"line_no": [
41
]
} | static const uint8_t *FUNC_0(FourXContext *f,
const uint8_t * const buf, int buf_size)
{
int VAR_0[512] = { 0 };
uint8_t flag[512];
int VAR_1[512];
uint8_t len_tab[257];
int VAR_2[257];
int VAR_3, VAR_4;
const uint8_t *VAR_5 = buf;
cons... | [
"static const uint8_t *FUNC_0(FourXContext *f,\nconst uint8_t * const buf, int buf_size)\n{",
"int VAR_0[512] = { 0 };",
"uint8_t flag[512];",
"int VAR_1[512];",
"uint8_t len_tab[257];",
"int VAR_2[257];",
"int VAR_3, VAR_4;",
"const uint8_t *VAR_5 = buf;",
"const uint8_t *VAR_6 = buf + buf_size;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41,
43
],
[
45
],
[
47
],
[
49
... |
6,414 | static const uint8_t *parse_opus_ts_header(const uint8_t *start, int *payload_len, int buf_len)
{
const uint8_t *buf = start + 1;
int start_trim_flag, end_trim_flag, control_extension_flag, control_extension_length;
uint8_t flags;
GetByteContext gb;
bytestream2_init(&gb, buf, buf_len);
... | true | FFmpeg | 1bcd7fefcb3c1ec47978fdc64a9e8dfb9512ae62 | static const uint8_t *parse_opus_ts_header(const uint8_t *start, int *payload_len, int buf_len)
{
const uint8_t *buf = start + 1;
int start_trim_flag, end_trim_flag, control_extension_flag, control_extension_length;
uint8_t flags;
GetByteContext gb;
bytestream2_init(&gb, buf, buf_len);
... | {
"code": [
" *payload_len = 0;",
" *payload_len += bytestream2_get_byte(&gb);",
" *payload_len += bytestream2_get_byte(&gb);"
],
"line_no": [
29,
33,
37
]
} | static const uint8_t *FUNC_0(const uint8_t *start, int *payload_len, int buf_len)
{
const uint8_t *VAR_0 = start + 1;
int VAR_1, VAR_2, VAR_3, VAR_4;
uint8_t flags;
GetByteContext gb;
bytestream2_init(&gb, VAR_0, buf_len);
flags = bytestream2_get_byte(&gb);
VAR_1 = (flags ... | [
"static const uint8_t *FUNC_0(const uint8_t *start, int *payload_len, int buf_len)\n{",
"const uint8_t *VAR_0 = start + 1;",
"int VAR_1, VAR_2, VAR_3, VAR_4;",
"uint8_t flags;",
"GetByteContext gb;",
"bytestream2_init(&gb, VAR_0, buf_len);",
"flags = bytestream2_get_byte(&gb);",
"VAR_1 = (flags... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31,
33
],
[
37
],
[
41,
43
],
[
45,
47
],
[
49
],
[
51
],
[
53
],
[... |
6,415 | void qemu_cpu_kick(void *env)
{
}
| true | qemu | 12d4536f7d911b6d87a766ad7300482ea663cea2 | void qemu_cpu_kick(void *env)
{
}
| {
"code": [
"void qemu_cpu_kick(void *env)"
],
"line_no": [
1
]
} | void FUNC_0(void *VAR_0)
{
}
| [
"void FUNC_0(void *VAR_0)\n{",
"}"
] | [
1,
0
] | [
[
1,
3
],
[
5
]
] |
6,416 | int qemu_file_rate_limit(QEMUFile *f)
{
if (qemu_file_get_error(f)) {
return 1;
}
if (f->xfer_limit > 0 && f->bytes_xfer > f->xfer_limit) {
return 1;
}
return 0;
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | int qemu_file_rate_limit(QEMUFile *f)
{
if (qemu_file_get_error(f)) {
return 1;
}
if (f->xfer_limit > 0 && f->bytes_xfer > f->xfer_limit) {
return 1;
}
return 0;
}
| {
"code": [],
"line_no": []
} | int FUNC_0(QEMUFile *VAR_0)
{
if (qemu_file_get_error(VAR_0)) {
return 1;
}
if (VAR_0->xfer_limit > 0 && VAR_0->bytes_xfer > VAR_0->xfer_limit) {
return 1;
}
return 0;
}
| [
"int FUNC_0(QEMUFile *VAR_0)\n{",
"if (qemu_file_get_error(VAR_0)) {",
"return 1;",
"}",
"if (VAR_0->xfer_limit > 0 && VAR_0->bytes_xfer > VAR_0->xfer_limit) {",
"return 1;",
"}",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
6,417 | GenericList *visit_next_list(Visitor *v, GenericList **list, Error **errp)
{
if (!error_is_set(errp)) {
return v->next_list(v, list, errp);
}
return 0;
}
| true | qemu | 297a3646c2947ee64a6d42ca264039732c6218e0 | GenericList *visit_next_list(Visitor *v, GenericList **list, Error **errp)
{
if (!error_is_set(errp)) {
return v->next_list(v, list, errp);
}
return 0;
}
| {
"code": [
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" return v->next_list(v, list, errp);",
" return 0;",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" ... | GenericList *FUNC_0(Visitor *v, GenericList **list, Error **errp)
{
if (!error_is_set(errp)) {
return v->next_list(v, list, errp);
}
return 0;
}
| [
"GenericList *FUNC_0(Visitor *v, GenericList **list, Error **errp)\n{",
"if (!error_is_set(errp)) {",
"return v->next_list(v, list, errp);",
"}",
"return 0;",
"}"
] | [
0,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
]
] |
6,418 | static int handle_ping(URLContext *s, RTMPPacket *pkt)
{
RTMPContext *rt = s->priv_data;
int t, ret;
if (pkt->data_size < 2) {
av_log(s, AV_LOG_ERROR, "Too short ping packet (%d)\n",
pkt->data_size);
return AVERROR_INVALIDDATA;
t = AV_RB16(pkt->data);
if ... | true | FFmpeg | 635ac8e1be91e941908f85642e4bbb609e48193f | static int handle_ping(URLContext *s, RTMPPacket *pkt)
{
RTMPContext *rt = s->priv_data;
int t, ret;
if (pkt->data_size < 2) {
av_log(s, AV_LOG_ERROR, "Too short ping packet (%d)\n",
pkt->data_size);
return AVERROR_INVALIDDATA;
t = AV_RB16(pkt->data);
if ... | {
"code": [],
"line_no": []
} | static int FUNC_0(URLContext *VAR_0, RTMPPacket *VAR_1)
{
RTMPContext *rt = VAR_0->priv_data;
int VAR_2, VAR_3;
if (VAR_1->data_size < 2) {
av_log(VAR_0, AV_LOG_ERROR, "Too short ping packet (%d)\n",
VAR_1->data_size);
return AVERROR_INVALIDDATA;
VAR_2 = AV_RB... | [
"static int FUNC_0(URLContext *VAR_0, RTMPPacket *VAR_1)\n{",
"RTMPContext *rt = VAR_0->priv_data;",
"int VAR_2, VAR_3;",
"if (VAR_1->data_size < 2) {",
"av_log(VAR_0, AV_LOG_ERROR, \"Too short ping packet (%d)\\n\",\nVAR_1->data_size);",
"return AVERROR_INVALIDDATA;",
"VAR_2 = AV_RB16(VAR_1->data);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
22
],
[
24
],
[
26,
39
]
] |
6,419 | static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
{
AVFilterContext *ctx = inlink->dst;
AVFilterLink *outlink = ctx->outputs[0];
AVFilterBufferRef *outpicref = outlink->out_buf;
OverlayContext *over = ctx->priv;
if (over->overpicref &&
!(over->x >= outpicref-... | true | FFmpeg | 06bf6d3bc04979bd39ecdc7311d0daf8aee7e10f | static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
{
AVFilterContext *ctx = inlink->dst;
AVFilterLink *outlink = ctx->outputs[0];
AVFilterBufferRef *outpicref = outlink->out_buf;
OverlayContext *over = ctx->priv;
if (over->overpicref &&
!(over->x >= outpicref-... | {
"code": [
" AVFilterContext *ctx = inlink->dst;",
" OverlayContext *over = ctx->priv;",
" AVFilterContext *ctx = inlink->dst;",
" OverlayContext *over = ctx->priv;",
"static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)",
" AVFilterContext *ctx = inlink->d... | static void FUNC_0(AVFilterLink *VAR_0, int VAR_1, int VAR_2, int VAR_3)
{
AVFilterContext *ctx = VAR_0->dst;
AVFilterLink *outlink = ctx->outputs[0];
AVFilterBufferRef *outpicref = outlink->out_buf;
OverlayContext *over = ctx->priv;
if (over->overpicref &&
!(over->x >= outpicref->v... | [
"static void FUNC_0(AVFilterLink *VAR_0, int VAR_1, int VAR_2, int VAR_3)\n{",
"AVFilterContext *ctx = VAR_0->dst;",
"AVFilterLink *outlink = ctx->outputs[0];",
"AVFilterBufferRef *outpicref = outlink->out_buf;",
"OverlayContext *over = ctx->priv;",
"if (over->overpicref &&\n!(over->x >= outpicref->video-... | [
1,
1,
0,
0,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17,
19
],
[
21,
23,
25
],
[
27
],
[
29
],
[
31
]
] |
6,420 | static void handle_sys(DisasContext *s, uint32_t insn, bool isread,
unsigned int op0, unsigned int op1, unsigned int op2,
unsigned int crn, unsigned int crm, unsigned int rt)
{
const ARMCPRegInfo *ri;
TCGv_i64 tcg_rt;
ri = get_arm_cp_reginfo(s->cp_regs,
... | true | qemu | f59df3f2354982ee0381b87d1ce561f1eb0ed505 | static void handle_sys(DisasContext *s, uint32_t insn, bool isread,
unsigned int op0, unsigned int op1, unsigned int op2,
unsigned int crn, unsigned int crm, unsigned int rt)
{
const ARMCPRegInfo *ri;
TCGv_i64 tcg_rt;
ri = get_arm_cp_reginfo(s->cp_regs,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1, bool VAR_2,
unsigned int VAR_3, unsigned int VAR_4, unsigned int VAR_5,
unsigned int VAR_6, unsigned int VAR_7, unsigned int VAR_8)
{
const ARMCPRegInfo *VAR_9;
TCGv_i64 tcg_rt;
VAR_9 = get_arm_cp_reginfo(V... | [
"static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1, bool VAR_2,\nunsigned int VAR_3, unsigned int VAR_4, unsigned int VAR_5,\nunsigned int VAR_6, unsigned int VAR_7, unsigned int VAR_8)\n{",
"const ARMCPRegInfo *VAR_9;",
"TCGv_i64 tcg_rt;",
"VAR_9 = get_arm_cp_reginfo(VAR_0->cp_regs,\nENCODE_AA64_CP_REG(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3,
4
],
[
5
],
[
6
],
[
7,
8,
9
],
[
10
],
[
19
],
[
20
],
[
21
],
[
23
],
[
24,
25
],
[
26,
27
],
[
28
],
[
29
],
[
30
],
[
31
],
[
32
],
[
33,
... |
6,421 | static void gic_cpu_write(gic_state *s, int cpu, int offset, uint32_t value)
{
switch (offset) {
case 0x00: /* Control */
s->cpu_enabled[cpu] = (value & 1);
DPRINTF("CPU %d %sabled\n", cpu, s->cpu_enabled ? "En" : "Dis");
break;
case 0x04: /* Priority mask */
s->prior... | true | qemu | 9ab1b6053f03d58ba8e7accc8f19c882fbffb66f | static void gic_cpu_write(gic_state *s, int cpu, int offset, uint32_t value)
{
switch (offset) {
case 0x00:
s->cpu_enabled[cpu] = (value & 1);
DPRINTF("CPU %d %sabled\n", cpu, s->cpu_enabled ? "En" : "Dis");
break;
case 0x04:
s->priority_mask[cpu] = (value & 0xff);
... | {
"code": [
" DPRINTF(\"CPU %d %sabled\\n\", cpu, s->cpu_enabled ? \"En\" : \"Dis\");"
],
"line_no": [
11
]
} | static void FUNC_0(gic_state *VAR_0, int VAR_1, int VAR_2, uint32_t VAR_3)
{
switch (VAR_2) {
case 0x00:
VAR_0->cpu_enabled[VAR_1] = (VAR_3 & 1);
DPRINTF("CPU %d %sabled\n", VAR_1, VAR_0->cpu_enabled ? "En" : "Dis");
break;
case 0x04:
VAR_0->priority_mask[VAR_1] = (... | [
"static void FUNC_0(gic_state *VAR_0, int VAR_1, int VAR_2, uint32_t VAR_3)\n{",
"switch (VAR_2) {",
"case 0x00:\nVAR_0->cpu_enabled[VAR_1] = (VAR_3 & 1);",
"DPRINTF(\"CPU %d %sabled\\n\", VAR_1, VAR_0->cpu_enabled ? \"En\" : \"Dis\");",
"break;",
"case 0x04:\nVAR_0->priority_mask[VAR_1] = (VAR_3 & 0xff);... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21,
25
],
[
27,
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
6,422 | int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height)
{
AVPicture dummy_pict;
if(av_image_check_size(width, height, 0, NULL))
return -1;
switch (pix_fmt) {
case PIX_FMT_RGB8:
case PIX_FMT_BGR8:
case PIX_FMT_RGB4_BYTE:
case PIX_FMT_BGR4_BYTE:
case PIX_F... | true | FFmpeg | 38d553322891c8e47182f05199d19888422167dc | int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height)
{
AVPicture dummy_pict;
if(av_image_check_size(width, height, 0, NULL))
return -1;
switch (pix_fmt) {
case PIX_FMT_RGB8:
case PIX_FMT_BGR8:
case PIX_FMT_RGB4_BYTE:
case PIX_FMT_BGR4_BYTE:
case PIX_F... | {
"code": [
" switch (pix_fmt) {",
" case PIX_FMT_RGB8:",
" case PIX_FMT_BGR8:",
" case PIX_FMT_RGB4_BYTE:",
" case PIX_FMT_BGR4_BYTE:",
" case PIX_FMT_GRAY8:"
],
"line_no": [
11,
13,
15,
17,
19,
21
]
} | int FUNC_0(enum PixelFormat VAR_0, int VAR_1, int VAR_2)
{
AVPicture dummy_pict;
if(av_image_check_size(VAR_1, VAR_2, 0, NULL))
return -1;
switch (VAR_0) {
case PIX_FMT_RGB8:
case PIX_FMT_BGR8:
case PIX_FMT_RGB4_BYTE:
case PIX_FMT_BGR4_BYTE:
case PIX_FMT_GRAY8:
... | [
"int FUNC_0(enum PixelFormat VAR_0, int VAR_1, int VAR_2)\n{",
"AVPicture dummy_pict;",
"if(av_image_check_size(VAR_1, VAR_2, 0, NULL))\nreturn -1;",
"switch (VAR_0) {",
"case PIX_FMT_RGB8:\ncase PIX_FMT_BGR8:\ncase PIX_FMT_RGB4_BYTE:\ncase PIX_FMT_BGR4_BYTE:\ncase PIX_FMT_GRAY8:\nreturn VAR_1 * VAR_2;",
... | [
0,
0,
0,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13,
15,
17,
19,
21,
25
],
[
27
],
[
29
],
[
31
]
] |
6,423 | static void qemu_rdma_cleanup(RDMAContext *rdma)
{
struct rdma_cm_event *cm_event;
int ret, idx;
if (rdma->cm_id && rdma->connected) {
if (rdma->error_state) {
RDMAControlHeader head = { .len = 0,
.type = RDMA_CONTROL_ERROR,
... | true | qemu | 80b262e1439a22708e1c535b75363d4b90c3b41d | static void qemu_rdma_cleanup(RDMAContext *rdma)
{
struct rdma_cm_event *cm_event;
int ret, idx;
if (rdma->cm_id && rdma->connected) {
if (rdma->error_state) {
RDMAControlHeader head = { .len = 0,
.type = RDMA_CONTROL_ERROR,
... | {
"code": [
" if (rdma->listen_id) {",
" rdma_destroy_id(rdma->listen_id);",
" rdma->listen_id = NULL;",
" if (rdma->qp) {",
" rdma_destroy_qp(rdma->cm_id);",
" rdma->qp = NULL;",
" rdma_destroy_id(rdma->cm_id);",
" rdma->cm_i... | static void FUNC_0(RDMAContext *VAR_0)
{
struct rdma_cm_event *VAR_1;
int VAR_2, VAR_3;
if (VAR_0->cm_id && VAR_0->connected) {
if (VAR_0->error_state) {
RDMAControlHeader head = { .len = 0,
.type = RDMA_CONTROL_ERROR,
... | [
"static void FUNC_0(RDMAContext *VAR_0)\n{",
"struct rdma_cm_event *VAR_1;",
"int VAR_2, VAR_3;",
"if (VAR_0->cm_id && VAR_0->connected) {",
"if (VAR_0->error_state) {",
"RDMAControlHeader head = { .len = 0,",
".type = RDMA_CONTROL_ERROR,\n.repeat = 1,\n};",
"error_report(\"Early error. Sending error.... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
1,
1,
1,
0,
1,
1,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17,
19,
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
6,424 | static void write_picture(AVFormatContext *s, int index, AVPicture *picture,
int pix_fmt, int w, int h)
{
UINT8 *buf, *src, *dest;
int size, j, i;
size = avpicture_get_size(pix_fmt, w, h);
buf = malloc(size);
if (!buf)
return;
/* XXX: not efficient... | true | FFmpeg | 5b0ad91b996506632708dcefc22d2835d04a4dba | static void write_picture(AVFormatContext *s, int index, AVPicture *picture,
int pix_fmt, int w, int h)
{
UINT8 *buf, *src, *dest;
int size, j, i;
size = avpicture_get_size(pix_fmt, w, h);
buf = malloc(size);
if (!buf)
return;
switch(pix_fm... | {
"code": [
" size = avpicture_get_size(pix_fmt, w, h);",
" buf = malloc(size);",
" if (!buf)"
],
"line_no": [
13,
15,
17
]
} | static void FUNC_0(AVFormatContext *VAR_0, int VAR_1, AVPicture *VAR_2,
int VAR_3, int VAR_4, int VAR_5)
{
UINT8 *buf, *src, *dest;
int VAR_6, VAR_7, VAR_8;
VAR_6 = avpicture_get_size(VAR_3, VAR_4, VAR_5);
buf = malloc(VAR_6);
if (!buf)
return;
... | [
"static void FUNC_0(AVFormatContext *VAR_0, int VAR_1, AVPicture *VAR_2,\nint VAR_3, int VAR_4, int VAR_5)\n{",
"UINT8 *buf, *src, *dest;",
"int VAR_6, VAR_7, VAR_8;",
"VAR_6 = avpicture_get_size(VAR_3, VAR_4, VAR_5);",
"buf = malloc(VAR_6);",
"if (!buf)\nreturn;",
"switch(VAR_3) {",
"case PIX_FMT_YUV... | [
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17,
19
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
6,426 | static int drawgrid_filter_frame(AVFilterLink *inlink, AVFrame *frame)
{
DrawBoxContext *drawgrid = inlink->dst->priv;
int plane, x, y;
uint8_t *row[4];
if (drawgrid->have_alpha) {
for (y = 0; y < frame->height; y++) {
row[0] = frame->data[0] + y * frame->linesize[0];
... | true | FFmpeg | 1c76134fe37ac20695627e3f5ce1f2bbf1245fcc | static int drawgrid_filter_frame(AVFilterLink *inlink, AVFrame *frame)
{
DrawBoxContext *drawgrid = inlink->dst->priv;
int plane, x, y;
uint8_t *row[4];
if (drawgrid->have_alpha) {
for (y = 0; y < frame->height; y++) {
row[0] = frame->data[0] + y * frame->linesize[0];
... | {
"code": [
" if (drawgrid->have_alpha) {"
],
"line_no": [
13
]
} | static int FUNC_0(AVFilterLink *VAR_0, AVFrame *VAR_1)
{
DrawBoxContext *drawgrid = VAR_0->dst->priv;
int VAR_2, VAR_3, VAR_4;
uint8_t *row[4];
if (drawgrid->have_alpha) {
for (VAR_4 = 0; VAR_4 < VAR_1->height; VAR_4++) {
row[0] = VAR_1->data[0] + VAR_4 * VAR_1->linesize[0];... | [
"static int FUNC_0(AVFilterLink *VAR_0, AVFrame *VAR_1)\n{",
"DrawBoxContext *drawgrid = VAR_0->dst->priv;",
"int VAR_2, VAR_3, VAR_4;",
"uint8_t *row[4];",
"if (drawgrid->have_alpha) {",
"for (VAR_4 = 0; VAR_4 < VAR_1->height; VAR_4++) {",
"row[0] = VAR_1->data[0] + VAR_4 * VAR_1->linesize[0];",
"row... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
6,427 | void backup_start(const char *job_id, BlockDriverState *bs,
BlockDriverState *target, int64_t speed,
MirrorSyncMode sync_mode, BdrvDirtyBitmap *sync_bitmap,
BlockdevOnError on_source_error,
BlockdevOnError on_target_error,
Bl... | true | qemu | 0b8b8753e4d94901627b3e86431230f2319215c4 | void backup_start(const char *job_id, BlockDriverState *bs,
BlockDriverState *target, int64_t speed,
MirrorSyncMode sync_mode, BdrvDirtyBitmap *sync_bitmap,
BlockdevOnError on_source_error,
BlockdevOnError on_target_error,
Bl... | {
"code": [
" job->common.co = qemu_coroutine_create(backup_run);",
" qemu_coroutine_enter(job->common.co, job);"
],
"line_no": [
205,
209
]
} | void FUNC_0(const char *VAR_0, BlockDriverState *VAR_1,
BlockDriverState *VAR_2, int64_t VAR_3,
MirrorSyncMode VAR_4, BdrvDirtyBitmap *VAR_5,
BlockdevOnError VAR_6,
BlockdevOnError VAR_7,
BlockCompletionFunc *VAR_8, void *VAR... | [
"void FUNC_0(const char *VAR_0, BlockDriverState *VAR_1,\nBlockDriverState *VAR_2, int64_t VAR_3,\nMirrorSyncMode VAR_4, BdrvDirtyBitmap *VAR_5,\nBlockdevOnError VAR_6,\nBlockdevOnError VAR_7,\nBlockCompletionFunc *VAR_8, void *VAR_9,\nBlockJobTxn *VAR_10, Error **VAR_11)\n{",
"int64_t len;",
"BlockDriverInfo b... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11,
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[
55
],
[... |
6,428 | void OPPROTO op_POWER_srea (void)
{
T1 &= 0x1FUL;
env->spr[SPR_MQ] = T0 >> T1;
T0 = Ts0 >> T1;
RETURN();
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | void OPPROTO op_POWER_srea (void)
{
T1 &= 0x1FUL;
env->spr[SPR_MQ] = T0 >> T1;
T0 = Ts0 >> T1;
RETURN();
}
| {
"code": [
" RETURN();",
" T0 = Ts0 >> T1;",
" T0 = Ts0 >> T1;",
" RETURN();"
],
"line_no": [
11,
9,
9,
11
]
} | void VAR_0 op_POWER_srea (void)
{
T1 &= 0x1FUL;
env->spr[SPR_MQ] = T0 >> T1;
T0 = Ts0 >> T1;
RETURN();
}
| [
"void VAR_0 op_POWER_srea (void)\n{",
"T1 &= 0x1FUL;",
"env->spr[SPR_MQ] = T0 >> T1;",
"T0 = Ts0 >> T1;",
"RETURN();",
"}"
] | [
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
6,429 | void qmp_memchar_write(const char *device, const char *data,
bool has_format, enum DataFormat format,
Error **errp)
{
CharDriverState *chr;
const uint8_t *write_data;
int ret;
size_t write_count;
chr = qemu_chr_find(device);
if (!chr) {
error... | true | qemu | 13289fb5a716e06fb06febb880e5e116d485f82b | void qmp_memchar_write(const char *device, const char *data,
bool has_format, enum DataFormat format,
Error **errp)
{
CharDriverState *chr;
const uint8_t *write_data;
int ret;
size_t write_count;
chr = qemu_chr_find(device);
if (!chr) {
error... | {
"code": [],
"line_no": []
} | void FUNC_0(const char *VAR_0, const char *VAR_1,
bool VAR_2, enum DataFormat VAR_3,
Error **VAR_4)
{
CharDriverState *chr;
const uint8_t *VAR_5;
int VAR_6;
size_t write_count;
chr = qemu_chr_find(VAR_0);
if (!chr) {
error_setg(VAR_4, "Device... | [
"void FUNC_0(const char *VAR_0, const char *VAR_1,\nbool VAR_2, enum DataFormat VAR_3,\nError **VAR_4)\n{",
"CharDriverState *chr;",
"const uint8_t *VAR_5;",
"int VAR_6;",
"size_t write_count;",
"chr = qemu_chr_find(VAR_0);",
"if (!chr) {",
"error_setg(VAR_4, \"Device '%s' not found\", VAR_0);",
"re... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3,
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],... |
6,430 | static void avc_biwgt_16width_msa(uint8_t *src, int32_t src_stride,
uint8_t *dst, int32_t dst_stride,
int32_t height, int32_t log2_denom,
int32_t src_weight, int32_t dst_weight,
in... | false | FFmpeg | bcd7bf7eeb09a395cc01698842d1b8be9af483fc | static void avc_biwgt_16width_msa(uint8_t *src, int32_t src_stride,
uint8_t *dst, int32_t dst_stride,
int32_t height, int32_t log2_denom,
int32_t src_weight, int32_t dst_weight,
in... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, int32_t VAR_1,
uint8_t *VAR_2, int32_t VAR_3,
int32_t VAR_4, int32_t VAR_5,
int32_t VAR_6, int32_t VAR_7,
int32_t VAR_8)
{
uint8_t cnt;
... | [
"static void FUNC_0(uint8_t *VAR_0, int32_t VAR_1,\nuint8_t *VAR_2, int32_t VAR_3,\nint32_t VAR_4, int32_t VAR_5,\nint32_t VAR_6, int32_t VAR_7,\nint32_t VAR_8)\n{",
"uint8_t cnt;",
"v16i8 src_wgt, dst_wgt, wgt;",
"v16i8 src0, src1, src2, src3;",
"v16i8 dst0, dst1, dst2, dst3;",
"v16i8 vec0, vec1, vec2, v... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
53
... |
6,433 | int net_init_dump(const NetClientOptions *opts, const char *name,
NetClientState *peer, Error **errp)
{
/* FIXME error_setg(errp, ...) on failure */
int len;
const char *file;
char def_file[128];
const NetdevDumpOptions *dump;
assert(opts->kind == NET_CLIENT_OPTIONS_K... | true | qemu | 3791f83ca999edc2d11eb2006ccc1091cd712c15 | int net_init_dump(const NetClientOptions *opts, const char *name,
NetClientState *peer, Error **errp)
{
int len;
const char *file;
char def_file[128];
const NetdevDumpOptions *dump;
assert(opts->kind == NET_CLIENT_OPTIONS_KIND_DUMP);
dump = opts->dump;
as... | {
"code": [
" error_report(\"invalid length: %\"PRIu64, dump->len);",
" return net_dump_init(peer, \"dump\", name, file, len);"
],
"line_no": [
59,
75
]
} | int FUNC_0(const NetClientOptions *VAR_0, const char *VAR_1,
NetClientState *VAR_2, Error **VAR_3)
{
int VAR_4;
const char *VAR_5;
char VAR_6[128];
const NetdevDumpOptions *VAR_7;
assert(VAR_0->kind == NET_CLIENT_OPTIONS_KIND_DUMP);
VAR_7 = VAR_0->VAR_7;
... | [
"int FUNC_0(const NetClientOptions *VAR_0, const char *VAR_1,\nNetClientState *VAR_2, Error **VAR_3)\n{",
"int VAR_4;",
"const char *VAR_5;",
"char VAR_6[128];",
"const NetdevDumpOptions *VAR_7;",
"assert(VAR_0->kind == NET_CLIENT_OPTIONS_KIND_DUMP);",
"VAR_7 = VAR_0->VAR_7;",
"assert(VAR_2);",
"if ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
55
],
... |
6,434 | int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
{
if (*spec <= '9' && *spec >= '0') /* opt:index */
return strtol(spec, NULL, 0) == st->index;
else if (*spec == 'v' || *spec == 'a' || *spec == 's' || *spec == 'd' ||
*spec == 't') { /* opt:[vasdt] */
... | true | FFmpeg | 7cf78b3476d77888caa059398078640fb821170e | int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
{
if (*spec <= '9' && *spec >= '0')
return strtol(spec, NULL, 0) == st->index;
else if (*spec == 'v' || *spec == 'a' || *spec == 's' || *spec == 'd' ||
*spec == 't') {
enum AVMediaType type;
... | {
"code": [],
"line_no": []
} | int FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1, const char *VAR_2)
{
if (*VAR_2 <= '9' && *VAR_2 >= '0')
return strtol(VAR_2, NULL, 0) == VAR_1->VAR_5;
else if (*VAR_2 == 'v' || *VAR_2 == 'a' || *VAR_2 == 'VAR_0' || *VAR_2 == 'd' ||
*VAR_2 == 't') {
enum AVMediaType VAR_... | [
"int FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1, const char *VAR_2)\n{",
"if (*VAR_2 <= '9' && *VAR_2 >= '0')\nreturn strtol(VAR_2, NULL, 0) == VAR_1->VAR_5;",
"else if (*VAR_2 == 'v' || *VAR_2 == 'a' || *VAR_2 == 'VAR_0' || *VAR_2 == 'd' ||\n*VAR_2 == 't') {",
"enum AVMediaType VAR_3;",
"switch (*VAR_2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
30
],
[
32,
34
],
[
36
],
[
38
],
[
40
],
[
42,
44
],
[
46
],
[
48
... |
6,435 | static void rm_read_metadata(AVFormatContext *s, int wide)
{
char buf[1024];
int i;
for (i=0; i<FF_ARRAY_ELEMS(ff_rm_metadata); i++) {
int len = wide ? avio_rb16(s->pb) : avio_r8(s->pb);
get_strl(s->pb, buf, sizeof(buf), len);
av_dict_set(&s->metadata, ff_rm_metadata[i], buf, ... | true | FFmpeg | bf87908cd8da31e8f8fe75c06577170928ea70a8 | static void rm_read_metadata(AVFormatContext *s, int wide)
{
char buf[1024];
int i;
for (i=0; i<FF_ARRAY_ELEMS(ff_rm_metadata); i++) {
int len = wide ? avio_rb16(s->pb) : avio_r8(s->pb);
get_strl(s->pb, buf, sizeof(buf), len);
av_dict_set(&s->metadata, ff_rm_metadata[i], buf, ... | {
"code": [
"static void rm_read_metadata(AVFormatContext *s, int wide)",
" int len = wide ? avio_rb16(s->pb) : avio_r8(s->pb);",
" get_strl(s->pb, buf, sizeof(buf), len);"
],
"line_no": [
1,
11,
13
]
} | static void FUNC_0(AVFormatContext *VAR_0, int VAR_1)
{
char VAR_2[1024];
int VAR_3;
for (VAR_3=0; VAR_3<FF_ARRAY_ELEMS(ff_rm_metadata); VAR_3++) {
int len = VAR_1 ? avio_rb16(VAR_0->pb) : avio_r8(VAR_0->pb);
get_strl(VAR_0->pb, VAR_2, sizeof(VAR_2), len);
av_dict_set(&VAR_0->... | [
"static void FUNC_0(AVFormatContext *VAR_0, int VAR_1)\n{",
"char VAR_2[1024];",
"int VAR_3;",
"for (VAR_3=0; VAR_3<FF_ARRAY_ELEMS(ff_rm_metadata); VAR_3++) {",
"int len = VAR_1 ? avio_rb16(VAR_0->pb) : avio_r8(VAR_0->pb);",
"get_strl(VAR_0->pb, VAR_2, sizeof(VAR_2), len);",
"av_dict_set(&VAR_0->metadat... | [
1,
0,
0,
0,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
6,436 | void qmp_migrate(const char *uri, bool has_blk, bool blk,
bool has_inc, bool inc, bool has_detach, bool detach,
Error **errp)
{
Error *local_err = NULL;
MigrationState *s = migrate_get_current();
MigrationParams params;
const char *p;
params.blk = has_blk && blk;
... | true | qemu | ca99993adc9205c905dba5dc1bb819959ada7200 | void qmp_migrate(const char *uri, bool has_blk, bool blk,
bool has_inc, bool inc, bool has_detach, bool detach,
Error **errp)
{
Error *local_err = NULL;
MigrationState *s = migrate_get_current();
MigrationParams params;
const char *p;
params.blk = has_blk && blk;
... | {
"code": [],
"line_no": []
} | void FUNC_0(const char *VAR_0, bool VAR_1, bool VAR_2,
bool VAR_3, bool VAR_4, bool VAR_5, bool VAR_6,
Error **VAR_7)
{
Error *local_err = NULL;
MigrationState *s = migrate_get_current();
MigrationParams params;
const char *VAR_8;
params.VAR_2 = VAR_1 && VAR_2;
... | [
"void FUNC_0(const char *VAR_0, bool VAR_1, bool VAR_2,\nbool VAR_3, bool VAR_4, bool VAR_5, bool VAR_6,\nError **VAR_7)\n{",
"Error *local_err = NULL;",
"MigrationState *s = migrate_get_current();",
"MigrationParams params;",
"const char *VAR_8;",
"params.VAR_2 = VAR_1 && VAR_2;",
"params.shared = VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3,
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11,
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20,
21
],
[
22
],
[
23,
... |
6,437 | static void stm32f2xx_timer_write(void *opaque, hwaddr offset,
uint64_t val64, unsigned size)
{
STM32F2XXTimerState *s = opaque;
uint32_t value = val64;
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
uint32_t timer_val = 0;
DB_PRINT("Write 0x%x, 0x%"HWADDR_PRIx... | true | qemu | 84da15169b45f7080e4b1b32f70e68e726e02740 | static void stm32f2xx_timer_write(void *opaque, hwaddr offset,
uint64_t val64, unsigned size)
{
STM32F2XXTimerState *s = opaque;
uint32_t value = val64;
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
uint32_t timer_val = 0;
DB_PRINT("Write 0x%x, 0x%"HWADDR_PRIx... | {
"code": [
" s->tim_psc = value;"
],
"line_no": [
91
]
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
STM32F2XXTimerState *s = VAR_0;
uint32_t value = VAR_2;
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
uint32_t timer_val = 0;
DB_PRINT("Write 0x%x, 0x%"HWADDR_PRIx"\n", value, VAR_... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"STM32F2XXTimerState *s = VAR_0;",
"uint32_t value = VAR_2;",
"int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);",
"uint32_t timer_val = 0;",
"DB_PRINT(\"Write 0x%x, 0x%\"HWADDR_PRIx\"\\n\", value, VAR_1);",
"switch ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47,
51
],
[
53
... |
6,438 | av_cold void ff_vp8dsp_init(VP8DSPContext *dsp)
{
dsp->vp8_luma_dc_wht = vp8_luma_dc_wht_c;
dsp->vp8_luma_dc_wht_dc = vp8_luma_dc_wht_dc_c;
dsp->vp8_idct_add = vp8_idct_add_c;
dsp->vp8_idct_dc_add = vp8_idct_dc_add_c;
dsp->vp8_idct_dc_add4y = vp8_idct_dc_add4y_c;
dsp->vp8_idc... | true | FFmpeg | ac4b32df71bd932838043a4838b86d11e169707f | av_cold void ff_vp8dsp_init(VP8DSPContext *dsp)
{
dsp->vp8_luma_dc_wht = vp8_luma_dc_wht_c;
dsp->vp8_luma_dc_wht_dc = vp8_luma_dc_wht_dc_c;
dsp->vp8_idct_add = vp8_idct_add_c;
dsp->vp8_idct_dc_add = vp8_idct_dc_add_c;
dsp->vp8_idct_dc_add4y = vp8_idct_dc_add4y_c;
dsp->vp8_idc... | {
"code": [
" VP8_MC_FUNC(0, 16);",
" VP8_MC_FUNC(1, 8);",
" VP8_MC_FUNC(2, 4);",
" VP8_BILINEAR_MC_FUNC(0, 16);",
" VP8_BILINEAR_MC_FUNC(1, 8);",
" VP8_BILINEAR_MC_FUNC(2, 4);",
" if (ARCH_PPC)",
" ff_vp8dsp_init_ppc(dsp);"
],
"line_no": [
45,
4... | av_cold void FUNC_0(VP8DSPContext *dsp)
{
dsp->vp8_luma_dc_wht = vp8_luma_dc_wht_c;
dsp->vp8_luma_dc_wht_dc = vp8_luma_dc_wht_dc_c;
dsp->vp8_idct_add = vp8_idct_add_c;
dsp->vp8_idct_dc_add = vp8_idct_dc_add_c;
dsp->vp8_idct_dc_add4y = vp8_idct_dc_add4y_c;
dsp->vp8_idct_dc_add... | [
"av_cold void FUNC_0(VP8DSPContext *dsp)\n{",
"dsp->vp8_luma_dc_wht = vp8_luma_dc_wht_c;",
"dsp->vp8_luma_dc_wht_dc = vp8_luma_dc_wht_dc_c;",
"dsp->vp8_idct_add = vp8_idct_add_c;",
"dsp->vp8_idct_dc_add = vp8_idct_dc_add_c;",
"dsp->vp8_idct_dc_add4y = vp8_idct_dc_add4y_c;",
"dsp->vp8_idct_d... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
... |
6,439 | static void test_qga_file_ops(gconstpointer fix)
{
const TestFixture *fixture = fix;
const unsigned char helloworld[] = "Hello World!\n";
const char *b64;
gchar *cmd, *path, *enc;
unsigned char *dec;
QDict *ret, *val;
int64_t id, eof;
gsize count;
FILE *f;
char tmp[100... | true | qemu | 1e2713384c58037ad44f716c31c08daca18862c5 | static void test_qga_file_ops(gconstpointer fix)
{
const TestFixture *fixture = fix;
const unsigned char helloworld[] = "Hello World!\n";
const char *b64;
gchar *cmd, *path, *enc;
unsigned char *dec;
QDict *ret, *val;
int64_t id, eof;
gsize count;
FILE *f;
char tmp[100... | {
"code": [],
"line_no": []
} | static void FUNC_0(gconstpointer VAR_0)
{
const TestFixture *VAR_1 = VAR_0;
const unsigned char VAR_2[] = "Hello World!\n";
const char *VAR_3;
gchar *cmd, *path, *enc;
unsigned char *VAR_4;
QDict *ret, *val;
int64_t id, eof;
gsize count;
FILE *f;
char VAR_5[100];
... | [
"static void FUNC_0(gconstpointer VAR_0)\n{",
"const TestFixture *VAR_1 = VAR_0;",
"const unsigned char VAR_2[] = \"Hello World!\\n\";",
"const char *VAR_3;",
"gchar *cmd, *path, *enc;",
"unsigned char *VAR_4;",
"QDict *ret, *val;",
"int64_t id, eof;",
"gsize count;",
"FILE *f;",
"char VAR_5[100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
... |
6,441 | static bool vexpress_cfgctrl_write(arm_sysctl_state *s, unsigned int dcc,
unsigned int function, unsigned int site,
unsigned int position, unsigned int device,
uint32_t val)
{
/* We don't support anything o... | true | qemu | ec1efab95767312ff4afb816d0d4b548e093b031 | static bool vexpress_cfgctrl_write(arm_sysctl_state *s, unsigned int dcc,
unsigned int function, unsigned int site,
unsigned int position, unsigned int device,
uint32_t val)
{
if (dcc != 0 || posi... | {
"code": [
" if (site == SYS_CFG_SITE_MB && device < sizeof(s->mb_clock)) {",
" if (site == SYS_CFG_SITE_MB && device < sizeof(s->mb_clock)) {"
],
"line_no": [
31,
31
]
} | static bool FUNC_0(arm_sysctl_state *s, unsigned int dcc,
unsigned int function, unsigned int site,
unsigned int position, unsigned int device,
uint32_t val)
{
if (dcc != 0 || position != 0 ||
... | [
"static bool FUNC_0(arm_sysctl_state *s, unsigned int dcc,\nunsigned int function, unsigned int site,\nunsigned int position, unsigned int device,\nuint32_t val)\n{",
"if (dcc != 0 || position != 0 ||\n(site != SYS_CFG_SITE_MB && site != SYS_CFG_SITE_DB1)) {",
"goto cfgctrl_unimp;",
"}",
"switch (function) ... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
17,
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53,
55
],
[
65,
67
],
[... |
6,442 | pci_ebus_init1(PCIDevice *s)
{
isa_bus_new(&s->qdev);
s->config[0x04] = 0x06; // command = bus master, pci mem
s->config[0x05] = 0x00;
s->config[0x06] = 0xa0; // status = fast back-to-back, 66MHz, no error
s->config[0x07] = 0x03; // status = medium devsel
s->config[0x09] = 0x00; // prog... | true | qemu | c5e6fb7e4ac6e7083682e7f45d27d1e73b3a1a97 | pci_ebus_init1(PCIDevice *s)
{
isa_bus_new(&s->qdev);
s->config[0x04] = 0x06;
s->config[0x05] = 0x00;
s->config[0x06] = 0xa0;
s->config[0x07] = 0x03;
s->config[0x09] = 0x00;
s->config[0x0D] = 0x0a;
pci_register_bar(s, 0, 0x1000000, PCI_BASE_ADDRESS_SPACE_MEMORY,
... | {
"code": [
"pci_ebus_init1(PCIDevice *s)",
" isa_bus_new(&s->qdev);",
" s->config[0x05] = 0x00;",
" pci_register_bar(s, 0, 0x1000000, PCI_BASE_ADDRESS_SPACE_MEMORY,",
" ebus_mmio_mapfunc);",
" pci_register_bar(s, 1, 0x800000, PCI_BASE_ADDRESS_SPACE_MEMOR... | FUNC_0(PCIDevice *VAR_0)
{
isa_bus_new(&VAR_0->qdev);
VAR_0->config[0x04] = 0x06;
VAR_0->config[0x05] = 0x00;
VAR_0->config[0x06] = 0xa0;
VAR_0->config[0x07] = 0x03;
VAR_0->config[0x09] = 0x00;
VAR_0->config[0x0D] = 0x0a;
pci_register_bar(VAR_0, 0, 0x1000000, PCI_BASE_A... | [
"FUNC_0(PCIDevice *VAR_0)\n{",
"isa_bus_new(&VAR_0->qdev);",
"VAR_0->config[0x04] = 0x06;",
"VAR_0->config[0x05] = 0x00;",
"VAR_0->config[0x06] = 0xa0;",
"VAR_0->config[0x07] = 0x03;",
"VAR_0->config[0x09] = 0x00;",
"VAR_0->config[0x0D] = 0x0a;",
"pci_register_bar(VAR_0, 0, 0x1000000, PCI_BASE_ADDRE... | [
1,
1,
0,
1,
0,
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
]
] |
6,443 | void ff_jpeg2000_set_significance(Jpeg2000T1Context *t1, int x, int y,
int negative)
{
x++;
y++;
t1->flags[y][x] |= JPEG2000_T1_SIG;
if (negative) {
t1->flags[y][x + 1] |= JPEG2000_T1_SIG_W | JPEG2000_T1_SGN_W;
t1->flags[y][x - 1] |= JPEG2000_T1_... | false | FFmpeg | f1e173049ecc9de03817385ba8962d14cba779db | void ff_jpeg2000_set_significance(Jpeg2000T1Context *t1, int x, int y,
int negative)
{
x++;
y++;
t1->flags[y][x] |= JPEG2000_T1_SIG;
if (negative) {
t1->flags[y][x + 1] |= JPEG2000_T1_SIG_W | JPEG2000_T1_SGN_W;
t1->flags[y][x - 1] |= JPEG2000_T1_... | {
"code": [],
"line_no": []
} | void FUNC_0(Jpeg2000T1Context *VAR_0, int VAR_1, int VAR_2,
int VAR_3)
{
VAR_1++;
VAR_2++;
VAR_0->flags[VAR_2][VAR_1] |= JPEG2000_T1_SIG;
if (VAR_3) {
VAR_0->flags[VAR_2][VAR_1 + 1] |= JPEG2000_T1_SIG_W | JPEG2000_T1_SGN_W;
VAR_0->flags[VAR_2][VA... | [
"void FUNC_0(Jpeg2000T1Context *VAR_0, int VAR_1, int VAR_2,\nint VAR_3)\n{",
"VAR_1++;",
"VAR_2++;",
"VAR_0->flags[VAR_2][VAR_1] |= JPEG2000_T1_SIG;",
"if (VAR_3) {",
"VAR_0->flags[VAR_2][VAR_1 + 1] |= JPEG2000_T1_SIG_W | JPEG2000_T1_SGN_W;",
"VAR_0->flags[VAR_2][VAR_1 - 1] |= JPEG2000_T1_SIG_E | JPEG2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
6,444 | static int print_uint32(DeviceState *dev, Property *prop, char *dest, size_t len)
{
uint32_t *ptr = qdev_get_prop_ptr(dev, prop);
return snprintf(dest, len, "%" PRIu32, *ptr);
}
| true | qemu | 5cb9b56acfc0b50acf7ccd2d044ab4991c47fdde | static int print_uint32(DeviceState *dev, Property *prop, char *dest, size_t len)
{
uint32_t *ptr = qdev_get_prop_ptr(dev, prop);
return snprintf(dest, len, "%" PRIu32, *ptr);
}
| {
"code": [
" uint32_t *ptr = qdev_get_prop_ptr(dev, prop);",
"static int print_uint32(DeviceState *dev, Property *prop, char *dest, size_t len)",
" uint32_t *ptr = qdev_get_prop_ptr(dev, prop);",
" return snprintf(dest, len, \"%\" PRIu32, *ptr);"
],
"line_no": [
5,
1,
5,
... | static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, char *VAR_2, size_t VAR_3)
{
uint32_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1);
return snprintf(VAR_2, VAR_3, "%" PRIu32, *ptr);
}
| [
"static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, char *VAR_2, size_t VAR_3)\n{",
"uint32_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1);",
"return snprintf(VAR_2, VAR_3, \"%\" PRIu32, *ptr);",
"}"
] | [
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
6,446 | static inline int pic_is_unused(H264Context *h, Picture *pic)
{
if (pic->f.data[0] == NULL)
return 1;
if (pic->needs_realloc && !(pic->reference & DELAYED_PIC_REF))
return 1;
return 0;
}
| false | FFmpeg | a553c6a347d3d28d7ee44c3df3d5c4ee780dba23 | static inline int pic_is_unused(H264Context *h, Picture *pic)
{
if (pic->f.data[0] == NULL)
return 1;
if (pic->needs_realloc && !(pic->reference & DELAYED_PIC_REF))
return 1;
return 0;
}
| {
"code": [],
"line_no": []
} | static inline int FUNC_0(H264Context *VAR_0, Picture *VAR_1)
{
if (VAR_1->f.data[0] == NULL)
return 1;
if (VAR_1->needs_realloc && !(VAR_1->reference & DELAYED_PIC_REF))
return 1;
return 0;
}
| [
"static inline int FUNC_0(H264Context *VAR_0, Picture *VAR_1)\n{",
"if (VAR_1->f.data[0] == NULL)\nreturn 1;",
"if (VAR_1->needs_realloc && !(VAR_1->reference & DELAYED_PIC_REF))\nreturn 1;",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
],
[
15
]
] |
6,447 | static int vdpau_alloc(AVCodecContext *s)
{
InputStream *ist = s->opaque;
int loglevel = (ist->hwaccel_id == HWACCEL_AUTO) ? AV_LOG_VERBOSE : AV_LOG_ERROR;
AVVDPAUContext *vdpau_ctx;
VDPAUContext *ctx;
const char *display, *vendor;
VdpStatus err;
int i;
ctx = av_mallocz(sizeo... | false | FFmpeg | d3eb317b862c3f5653f0ae8dfcb22edf1713ab5b | static int vdpau_alloc(AVCodecContext *s)
{
InputStream *ist = s->opaque;
int loglevel = (ist->hwaccel_id == HWACCEL_AUTO) ? AV_LOG_VERBOSE : AV_LOG_ERROR;
AVVDPAUContext *vdpau_ctx;
VDPAUContext *ctx;
const char *display, *vendor;
VdpStatus err;
int i;
ctx = av_mallocz(sizeo... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0)
{
InputStream *ist = VAR_0->opaque;
int VAR_1 = (ist->hwaccel_id == HWACCEL_AUTO) ? AV_LOG_VERBOSE : AV_LOG_ERROR;
AVVDPAUContext *vdpau_ctx;
VDPAUContext *ctx;
const char *VAR_2, *VAR_3;
VdpStatus err;
int VAR_4;
ctx = av_mallocz(size... | [
"static int FUNC_0(AVCodecContext *VAR_0)\n{",
"InputStream *ist = VAR_0->opaque;",
"int VAR_1 = (ist->hwaccel_id == HWACCEL_AUTO) ? AV_LOG_VERBOSE : AV_LOG_ERROR;",
"AVVDPAUContext *vdpau_ctx;",
"VDPAUContext *ctx;",
"const char *VAR_2, *VAR_3;",
"VdpStatus err;",
"int VAR_4;",
"ctx = av_mallocz(s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41,
43
],
[
47
],
[
49
],
[
51,... |
6,448 | void ff_h263_encode_mb(MpegEncContext * s,
int16_t block[6][64],
int motion_x, int motion_y)
{
int cbpc, cbpy, i, cbp, pred_x, pred_y;
int16_t pred_dc;
int16_t rec_intradc[6];
int16_t *dc_ptr[6];
const int interleaved_stats= (s->flags&CODEC_FLAG_... | false | FFmpeg | cd62c04d009b3baf7582556866a7029291b54573 | void ff_h263_encode_mb(MpegEncContext * s,
int16_t block[6][64],
int motion_x, int motion_y)
{
int cbpc, cbpy, i, cbp, pred_x, pred_y;
int16_t pred_dc;
int16_t rec_intradc[6];
int16_t *dc_ptr[6];
const int interleaved_stats= (s->flags&CODEC_FLAG_... | {
"code": [],
"line_no": []
} | void FUNC_0(MpegEncContext * VAR_0,
int16_t VAR_1[6][64],
int VAR_2, int VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;
int16_t pred_dc;
int16_t rec_intradc[6];
int16_t *dc_ptr[6];
const int VAR_10= (VAR_0->flags&CODEC_FLAG_PASS1);
... | [
"void FUNC_0(MpegEncContext * VAR_0,\nint16_t VAR_1[6][64],\nint VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;",
"int16_t pred_dc;",
"int16_t rec_intradc[6];",
"int16_t *dc_ptr[6];",
"const int VAR_10= (VAR_0->flags&CODEC_FLAG_PASS1);",
"if (!VAR_0->mb_intra) {",
"VAR_7= get_p_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
55
... |
6,449 | static int hls_mux_init(AVFormatContext *s)
{
HLSContext *hls = s->priv_data;
AVFormatContext *oc;
AVFormatContext *vtt_oc;
int i, ret;
ret = avformat_alloc_output_context2(&hls->avf, hls->oformat, NULL, NULL);
if (ret < 0)
return ret;
oc = hls->avf;
oc->oformat ... | false | FFmpeg | e3d8504fd043bdc2535525128b158fbc1fb18c67 | static int hls_mux_init(AVFormatContext *s)
{
HLSContext *hls = s->priv_data;
AVFormatContext *oc;
AVFormatContext *vtt_oc;
int i, ret;
ret = avformat_alloc_output_context2(&hls->avf, hls->oformat, NULL, NULL);
if (ret < 0)
return ret;
oc = hls->avf;
oc->oformat ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
HLSContext *hls = VAR_0->priv_data;
AVFormatContext *oc;
AVFormatContext *vtt_oc;
int VAR_1, VAR_2;
VAR_2 = avformat_alloc_output_context2(&hls->avf, hls->oformat, NULL, NULL);
if (VAR_2 < 0)
return VAR_2;
oc = hls->avf;
o... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"HLSContext *hls = VAR_0->priv_data;",
"AVFormatContext *oc;",
"AVFormatContext *vtt_oc;",
"int VAR_1, VAR_2;",
"VAR_2 = avformat_alloc_output_context2(&hls->avf, hls->oformat, NULL, NULL);",
"if (VAR_2 < 0)\nreturn VAR_2;",
"oc = hls->avf;",
"oc->ofor... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.