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 |
|---|---|---|---|---|---|---|---|---|---|---|
12,219 | static int init_file(AVFormatContext *s, OutputStream *os, int64_t start_ts)
{
int ret, i;
ret = avio_open2(&os->out, os->temp_filename, AVIO_FLAG_WRITE,
&s->interrupt_callback, NULL);
if (ret < 0)
return ret;
avio_wb32(os->out, 0);
avio_wl32(os->out, MKTAG('m','... | false | FFmpeg | 9f61abc8111c7c43f49ca012e957a108b9cc7610 | static int init_file(AVFormatContext *s, OutputStream *os, int64_t start_ts)
{
int ret, i;
ret = avio_open2(&os->out, os->temp_filename, AVIO_FLAG_WRITE,
&s->interrupt_callback, NULL);
if (ret < 0)
return ret;
avio_wb32(os->out, 0);
avio_wl32(os->out, MKTAG('m','... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, OutputStream *VAR_1, int64_t VAR_2)
{
int VAR_3, VAR_4;
VAR_3 = avio_open2(&VAR_1->out, VAR_1->temp_filename, AVIO_FLAG_WRITE,
&VAR_0->interrupt_callback, NULL);
if (VAR_3 < 0)
return VAR_3;
avio_wb32(VAR_1->out, 0);
avio... | [
"static int FUNC_0(AVFormatContext *VAR_0, OutputStream *VAR_1, int64_t VAR_2)\n{",
"int VAR_3, VAR_4;",
"VAR_3 = avio_open2(&VAR_1->out, VAR_1->temp_filename, AVIO_FLAG_WRITE,\n&VAR_0->interrupt_callback, NULL);",
"if (VAR_3 < 0)\nreturn VAR_3;",
"avio_wb32(VAR_1->out, 0);",
"avio_wl32(VAR_1->out, MKTAG(... | [
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
]
] |
12,220 | static inline void log_input_change(void *ctx, AVFilterLink *link, AVFilterBufferRef *ref)
{
char old_layout_str[16], new_layout_str[16];
av_get_channel_layout_string(old_layout_str, sizeof(old_layout_str),
-1, link->channel_layout);
av_get_channel_layout_string(new_lay... | false | FFmpeg | 4381bddc9f93da34a44e683bdc4c05c6f061244e | static inline void log_input_change(void *ctx, AVFilterLink *link, AVFilterBufferRef *ref)
{
char old_layout_str[16], new_layout_str[16];
av_get_channel_layout_string(old_layout_str, sizeof(old_layout_str),
-1, link->channel_layout);
av_get_channel_layout_string(new_lay... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(void *VAR_0, AVFilterLink *VAR_1, AVFilterBufferRef *VAR_2)
{
char VAR_3[16], VAR_4[16];
av_get_channel_layout_string(VAR_3, sizeof(VAR_3),
-1, VAR_1->channel_layout);
av_get_channel_layout_string(VAR_4, sizeof(VAR_4),
... | [
"static inline void FUNC_0(void *VAR_0, AVFilterLink *VAR_1, AVFilterBufferRef *VAR_2)\n{",
"char VAR_3[16], VAR_4[16];",
"av_get_channel_layout_string(VAR_3, sizeof(VAR_3),\n-1, VAR_1->channel_layout);",
"av_get_channel_layout_string(VAR_4, sizeof(VAR_4),\n-1, VAR_2->audio->channel_layout);",
"av_log(VAR_0... | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13
],
[
15,
17,
19,
21,
23,
25,
27
],
[
29
]
] |
12,221 | static int decode_mime_header(AMRWBContext *ctx, const uint8_t *buf)
{
/* Decode frame header (1st octet) */
ctx->fr_cur_mode = buf[0] >> 3 & 0x0F;
ctx->fr_quality = (buf[0] & 0x4) != 0x4;
return 1;
}
| true | FFmpeg | ca00a7e809a4b9c9fb146403d278964b88d16b85 | static int decode_mime_header(AMRWBContext *ctx, const uint8_t *buf)
{
ctx->fr_cur_mode = buf[0] >> 3 & 0x0F;
ctx->fr_quality = (buf[0] & 0x4) != 0x4;
return 1;
}
| {
"code": [
" ctx->fr_quality = (buf[0] & 0x4) != 0x4;"
],
"line_no": [
9
]
} | static int FUNC_0(AMRWBContext *VAR_0, const uint8_t *VAR_1)
{
VAR_0->fr_cur_mode = VAR_1[0] >> 3 & 0x0F;
VAR_0->fr_quality = (VAR_1[0] & 0x4) != 0x4;
return 1;
}
| [
"static int FUNC_0(AMRWBContext *VAR_0, const uint8_t *VAR_1)\n{",
"VAR_0->fr_cur_mode = VAR_1[0] >> 3 & 0x0F;",
"VAR_0->fr_quality = (VAR_1[0] & 0x4) != 0x4;",
"return 1;",
"}"
] | [
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
13
],
[
15
]
] |
12,222 | static void init_entropy_decoder(APEContext *ctx)
{
/* Read the CRC */
ctx->CRC = bytestream_get_be32(&ctx->ptr);
/* Read the frame flags if they exist */
ctx->frameflags = 0;
if ((ctx->fileversion > 3820) && (ctx->CRC & 0x80000000)) {
ctx->CRC &= ~0x80000000;
ctx->framef... | true | FFmpeg | a4c32c9a63142b602820800742f2d543b58cd278 | static void init_entropy_decoder(APEContext *ctx)
{
ctx->CRC = bytestream_get_be32(&ctx->ptr);
ctx->frameflags = 0;
if ((ctx->fileversion > 3820) && (ctx->CRC & 0x80000000)) {
ctx->CRC &= ~0x80000000;
ctx->frameflags = bytestream_get_be32(&ctx->ptr);
}
... | {
"code": [
"static void init_entropy_decoder(APEContext *ctx)"
],
"line_no": [
1
]
} | static void FUNC_0(APEContext *VAR_0)
{
VAR_0->CRC = bytestream_get_be32(&VAR_0->ptr);
VAR_0->frameflags = 0;
if ((VAR_0->fileversion > 3820) && (VAR_0->CRC & 0x80000000)) {
VAR_0->CRC &= ~0x80000000;
VAR_0->frameflags = bytestream_get_be32(&VAR_0->ptr);
}
... | [
"static void FUNC_0(APEContext *VAR_0)\n{",
"VAR_0->CRC = bytestream_get_be32(&VAR_0->ptr);",
"VAR_0->frameflags = 0;",
"if ((VAR_0->fileversion > 3820) && (VAR_0->CRC & 0x80000000)) {",
"VAR_0->CRC &= ~0x80000000;",
"VAR_0->frameflags = bytestream_get_be32(&VAR_0->ptr);",
"}",
"VAR_0->blocksdecoded =... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
47
],
[
51
],
[
53
]
] |
12,223 | static gboolean qio_channel_yield_enter(QIOChannel *ioc,
GIOCondition condition,
gpointer opaque)
{
QIOChannelYieldData *data = opaque;
qemu_coroutine_enter(data->co, NULL);
return FALSE;
}
| true | qemu | 0b8b8753e4d94901627b3e86431230f2319215c4 | static gboolean qio_channel_yield_enter(QIOChannel *ioc,
GIOCondition condition,
gpointer opaque)
{
QIOChannelYieldData *data = opaque;
qemu_coroutine_enter(data->co, NULL);
return FALSE;
}
| {
"code": [
" qemu_coroutine_enter(data->co, NULL);",
" qemu_coroutine_enter(data->co, NULL);"
],
"line_no": [
11,
11
]
} | static gboolean FUNC_0(QIOChannel *ioc,
GIOCondition condition,
gpointer opaque)
{
QIOChannelYieldData *data = opaque;
qemu_coroutine_enter(data->co, NULL);
return FALSE;
}
| [
"static gboolean FUNC_0(QIOChannel *ioc,\nGIOCondition condition,\ngpointer opaque)\n{",
"QIOChannelYieldData *data = opaque;",
"qemu_coroutine_enter(data->co, NULL);",
"return FALSE;",
"}"
] | [
0,
0,
1,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
12,224 | void usb_ehci_realize(EHCIState *s, DeviceState *dev, Error **errp)
{
int i;
if (s->portnr > NB_PORTS) {
error_setg(errp, "Too many ports! Max. port number is %d.",
NB_PORTS);
usb_bus_new(&s->bus, sizeof(s->bus), s->companion_enable ?
&ehci_bus_op... | true | qemu | 2a7f2630684ee556a394a354d64159a4470c0151 | void usb_ehci_realize(EHCIState *s, DeviceState *dev, Error **errp)
{
int i;
if (s->portnr > NB_PORTS) {
error_setg(errp, "Too many ports! Max. port number is %d.",
NB_PORTS);
usb_bus_new(&s->bus, sizeof(s->bus), s->companion_enable ?
&ehci_bus_op... | {
"code": [],
"line_no": []
} | void FUNC_0(EHCIState *VAR_0, DeviceState *VAR_1, Error **VAR_2)
{
int VAR_3;
if (VAR_0->portnr > NB_PORTS) {
error_setg(VAR_2, "Too many ports! Max. port number is %d.",
NB_PORTS);
usb_bus_new(&VAR_0->bus, sizeof(VAR_0->bus), VAR_0->companion_enable ?
... | [
"void FUNC_0(EHCIState *VAR_0, DeviceState *VAR_1, Error **VAR_2)\n{",
"int VAR_3;",
"if (VAR_0->portnr > NB_PORTS) {",
"error_setg(VAR_2, \"Too many ports! Max. port number is %d.\",\nNB_PORTS);",
"usb_bus_new(&VAR_0->bus, sizeof(VAR_0->bus), VAR_0->companion_enable ?\n&ehci_bus_ops_companion : &ehci_bus_o... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
24,
26
],
[
28
],
[
30,
32
],
[
34
],
[
39
],
[
41
],
[
43
],
[
47
]
] |
12,226 | void qemu_system_guest_panicked(void)
{
qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE, &error_abort);
vm_stop(RUN_STATE_GUEST_PANICKED);
| true | qemu | bac05aa9a77af1ca7972c8dc07560f4daa7c2dfc | void qemu_system_guest_panicked(void)
{
qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE, &error_abort);
vm_stop(RUN_STATE_GUEST_PANICKED);
| {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE, &error_abort);
vm_stop(RUN_STATE_GUEST_PANICKED);
| [
"void FUNC_0(void)\n{",
"qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE, &error_abort);",
"vm_stop(RUN_STATE_GUEST_PANICKED);"
] | [
0,
0,
0
] | [
[
1,
3
],
[
8
],
[
10
]
] |
12,227 | static void get_sub_picture(CinepakEncContext *s, int x, int y, AVPicture *in, AVPicture *out)
{
out->data[0] = in->data[0] + x + y * in->linesize[0];
out->linesize[0] = in->linesize[0];
if(s->pix_fmt == AV_PIX_FMT_YUV420P) {
out->data[1] = in->data[1] + (x >> 1) + (y >> 1) * in->linesize[1];... | true | FFmpeg | 7da9f4523159670d577a2808d4481e64008a8894 | static void get_sub_picture(CinepakEncContext *s, int x, int y, AVPicture *in, AVPicture *out)
{
out->data[0] = in->data[0] + x + y * in->linesize[0];
out->linesize[0] = in->linesize[0];
if(s->pix_fmt == AV_PIX_FMT_YUV420P) {
out->data[1] = in->data[1] + (x >> 1) + (y >> 1) * in->linesize[1];... | {
"code": [
" if(s->pix_fmt == AV_PIX_FMT_YUV420P) {",
" if(s->pix_fmt == AV_PIX_FMT_YUV420P) {",
" if(s->pix_fmt == AV_PIX_FMT_YUV420P) {",
" if(s->pix_fmt == AV_PIX_FMT_YUV420P) {"
],
"line_no": [
11,
11,
11,
11
]
} | static void FUNC_0(CinepakEncContext *VAR_0, int VAR_1, int VAR_2, AVPicture *VAR_3, AVPicture *VAR_4)
{
VAR_4->data[0] = VAR_3->data[0] + VAR_1 + VAR_2 * VAR_3->linesize[0];
VAR_4->linesize[0] = VAR_3->linesize[0];
if(VAR_0->pix_fmt == AV_PIX_FMT_YUV420P) {
VAR_4->data[1] = VAR_3->data[1] + ... | [
"static void FUNC_0(CinepakEncContext *VAR_0, int VAR_1, int VAR_2, AVPicture *VAR_3, AVPicture *VAR_4)\n{",
"VAR_4->data[0] = VAR_3->data[0] + VAR_1 + VAR_2 * VAR_3->linesize[0];",
"VAR_4->linesize[0] = VAR_3->linesize[0];",
"if(VAR_0->pix_fmt == AV_PIX_FMT_YUV420P) {",
"VAR_4->data[1] = VAR_3->data[1] + (... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
12,228 | int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options)
{
int ret = 0;
AVDictionary *tmp = NULL;
if (avctx->extradata_size < 0 || avctx->extradata_size >= FF_MAX_EXTRADATA_SIZE)
return AVERROR(EINVAL);
if (options)
av_dict_copy(&tmp, *options,... | true | FFmpeg | 8d95eb6702b46cd07385c5478b10924ea78e6f18 | int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options)
{
int ret = 0;
AVDictionary *tmp = NULL;
if (avctx->extradata_size < 0 || avctx->extradata_size >= FF_MAX_EXTRADATA_SIZE)
return AVERROR(EINVAL);
if (options)
av_dict_copy(&tmp, *options,... | {
"code": [],
"line_no": []
} | int VAR_0 avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options)
{
int ret = 0;
AVDictionary *tmp = NULL;
if (avctx->extradata_size < 0 || avctx->extradata_size >= FF_MAX_EXTRADATA_SIZE)
return AVERROR(EINVAL);
if (options)
av_dict_copy(&tmp, *options, 0);
... | [
"int VAR_0 avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options)\n{",
"int ret = 0;",
"AVDictionary *tmp = NULL;",
"if (avctx->extradata_size < 0 || avctx->extradata_size >= FF_MAX_EXTRADATA_SIZE)\nreturn AVERROR(EINVAL);",
"if (options)\nav_dict_copy(&tmp, *options, 0);",
"if (ff_l... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
10
],
[
11,
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
23
],
[
... |
12,229 | static void cpu_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
CPUClass *k = CPU_CLASS(klass);
k->class_by_name = cpu_common_class_by_name;
k->reset = cpu_common_reset;
k->get_arch_id = cpu_common_get_arch_id;
k->get_paging_enabled = cpu_common_get_p... | true | qemu | efec3dd631d94160288392721a5f9c39e50fb2bc | static void cpu_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
CPUClass *k = CPU_CLASS(klass);
k->class_by_name = cpu_common_class_by_name;
k->reset = cpu_common_reset;
k->get_arch_id = cpu_common_get_arch_id;
k->get_paging_enabled = cpu_common_get_p... | {
"code": [
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;"... | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
CPUClass *k = CPU_CLASS(VAR_0);
k->class_by_name = cpu_common_class_by_name;
k->reset = cpu_common_reset;
k->get_arch_id = cpu_common_get_arch_id;
k->get_paging_enabled = cpu_common_get_paging_e... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"CPUClass *k = CPU_CLASS(VAR_0);",
"k->class_by_name = cpu_common_class_by_name;",
"k->reset = cpu_common_reset;",
"k->get_arch_id = cpu_common_get_arch_id;",
"k->get_paging_enabled = cpu_common_get_pagin... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
12,230 | static int fill_note_info(struct elf_note_info *info,
long signr, const CPUArchState *env)
{
#define NUMNOTES 3
CPUState *cpu = ENV_GET_CPU((CPUArchState *)env);
TaskState *ts = (TaskState *)cpu->opaque;
int i;
info->notes = g_malloc0(NUMNOTES * sizeof (struct memelfno... | true | qemu | c78d65e8a7d87badf46eda3a0b41330f5d239132 | static int fill_note_info(struct elf_note_info *info,
long signr, const CPUArchState *env)
{
#define NUMNOTES 3
CPUState *cpu = ENV_GET_CPU((CPUArchState *)env);
TaskState *ts = (TaskState *)cpu->opaque;
int i;
info->notes = g_malloc0(NUMNOTES * sizeof (struct memelfno... | {
"code": [
" info->notes = g_malloc0(NUMNOTES * sizeof (struct memelfnote));"
],
"line_no": [
17
]
} | static int FUNC_0(struct elf_note_info *VAR_0,
long VAR_1, const CPUArchState *VAR_2)
{
#define NUMNOTES 3
CPUState *cpu = ENV_GET_CPU((CPUArchState *)VAR_2);
TaskState *ts = (TaskState *)cpu->opaque;
int VAR_3;
VAR_0->notes = g_malloc0(NUMNOTES * sizeof (struct memelf... | [
"static int FUNC_0(struct elf_note_info *VAR_0,\nlong VAR_1, const CPUArchState *VAR_2)\n{",
"#define NUMNOTES 3\nCPUState *cpu = ENV_GET_CPU((CPUArchState *)VAR_2);",
"TaskState *ts = (TaskState *)cpu->opaque;",
"int VAR_3;",
"VAR_0->notes = g_malloc0(NUMNOTES * sizeof (struct memelfnote));",
"if (VAR_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
] | [
[
1,
3,
5
],
[
7,
9
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
31,
33
],
[
45
],
[
47
],
[
49,
51
],
[
53
],
[
55,
57
],
[
59
],
[... |
12,232 | static uint16List **host_memory_append_node(uint16List **node,
unsigned long value)
{
*node = g_malloc0(sizeof(**node));
(*node)->value = value;
return &(*node)->next;
}
| true | qemu | 658ae5a7b90139a6a296cd4cd83643d843964796 | static uint16List **host_memory_append_node(uint16List **node,
unsigned long value)
{
*node = g_malloc0(sizeof(**node));
(*node)->value = value;
return &(*node)->next;
}
| {
"code": [
"static uint16List **host_memory_append_node(uint16List **node,",
" unsigned long value)",
" *node = g_malloc0(sizeof(**node));",
" (*node)->value = value;",
" return &(*node)->next;"
],
"line_no": [
1,
3,
7,
9,... | static uint16List **FUNC_0(uint16List **node,
unsigned long value)
{
*node = g_malloc0(sizeof(**node));
(*node)->value = value;
return &(*node)->next;
}
| [
"static uint16List **FUNC_0(uint16List **node,\nunsigned long value)\n{",
"*node = g_malloc0(sizeof(**node));",
"(*node)->value = value;",
"return &(*node)->next;",
"}"
] | [
1,
1,
1,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
12,233 | static int e1000_post_load(void *opaque, int version_id)
{
E1000State *s = opaque;
NetClientState *nc = qemu_get_queue(s->nic);
/* nc.link_down can't be migrated, so infer link_down according
* to link status bit in mac_reg[STATUS] */
nc->link_down = (s->mac_reg[STATUS] & E1000_STATUS_LU) =... | true | qemu | ddcb73b7782cb6104479503faea04cc224f982b5 | static int e1000_post_load(void *opaque, int version_id)
{
E1000State *s = opaque;
NetClientState *nc = qemu_get_queue(s->nic);
nc->link_down = (s->mac_reg[STATUS] & E1000_STATUS_LU) == 0;
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0, int VAR_1)
{
E1000State *s = VAR_0;
NetClientState *nc = qemu_get_queue(s->nic);
nc->link_down = (s->mac_reg[STATUS] & E1000_STATUS_LU) == 0;
return 0;
}
| [
"static int FUNC_0(void *VAR_0, int VAR_1)\n{",
"E1000State *s = VAR_0;",
"NetClientState *nc = qemu_get_queue(s->nic);",
"nc->link_down = (s->mac_reg[STATUS] & E1000_STATUS_LU) == 0;",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
15
],
[
19
],
[
21
]
] |
12,234 | bdrv_acct_start(BlockDriverState *bs, BlockAcctCookie *cookie, int64_t bytes,
enum BlockAcctType type)
{
assert(type < BDRV_MAX_IOTYPE);
cookie->bytes = bytes;
cookie->start_time_ns = get_clock();
cookie->type = type;
}
| true | qemu | 5e5a94b60518002e8ecc7afa78a9e7565b23e38f | bdrv_acct_start(BlockDriverState *bs, BlockAcctCookie *cookie, int64_t bytes,
enum BlockAcctType type)
{
assert(type < BDRV_MAX_IOTYPE);
cookie->bytes = bytes;
cookie->start_time_ns = get_clock();
cookie->type = type;
}
| {
"code": [
"bdrv_acct_start(BlockDriverState *bs, BlockAcctCookie *cookie, int64_t bytes,",
" enum BlockAcctType type)",
" assert(type < BDRV_MAX_IOTYPE);",
" cookie->bytes = bytes;",
" cookie->start_time_ns = get_clock();",
" cookie->type = type;"
],
"line_no": [
1... | FUNC_0(BlockDriverState *VAR_0, BlockAcctCookie *VAR_1, int64_t VAR_2,
enum BlockAcctType VAR_3)
{
assert(VAR_3 < BDRV_MAX_IOTYPE);
VAR_1->VAR_2 = VAR_2;
VAR_1->start_time_ns = get_clock();
VAR_1->VAR_3 = VAR_3;
}
| [
"FUNC_0(BlockDriverState *VAR_0, BlockAcctCookie *VAR_1, int64_t VAR_2,\nenum BlockAcctType VAR_3)\n{",
"assert(VAR_3 < BDRV_MAX_IOTYPE);",
"VAR_1->VAR_2 = VAR_2;",
"VAR_1->start_time_ns = get_clock();",
"VAR_1->VAR_3 = VAR_3;",
"}"
] | [
1,
1,
1,
1,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
12,235 | static int tcp_open(URLContext *h, const char *uri, int flags)
{
struct sockaddr_in dest_addr;
int port, fd = -1;
TCPContext *s = NULL;
fd_set wfds;
int fd_max, ret;
struct timeval tv;
socklen_t optlen;
char hostname[1024],proto[1024],path[1024],tmp[1024],*q;
if(!ff_netwo... | true | FFmpeg | f23a9759cee8442b02195a4539f65d041104c9cb | static int tcp_open(URLContext *h, const char *uri, int flags)
{
struct sockaddr_in dest_addr;
int port, fd = -1;
TCPContext *s = NULL;
fd_set wfds;
int fd_max, ret;
struct timeval tv;
socklen_t optlen;
char hostname[1024],proto[1024],path[1024],tmp[1024],*q;
if(!ff_netwo... | {
"code": [
" char hostname[1024],proto[1024],path[1024],tmp[1024],*q;",
" if ((q = strchr(hostname,'@'))) { strcpy(tmp,q+1); strcpy(hostname,tmp); }"
],
"line_no": [
19,
37
]
} | static int FUNC_0(URLContext *VAR_0, const char *VAR_1, int VAR_2)
{
struct sockaddr_in VAR_3;
int VAR_4, VAR_5 = -1;
TCPContext *s = NULL;
fd_set wfds;
int VAR_6, VAR_7;
struct timeval VAR_8;
socklen_t optlen;
char VAR_9[1024],VAR_10[1024],VAR_11[1024],VAR_12[1024],*VAR_13;
... | [
"static int FUNC_0(URLContext *VAR_0, const char *VAR_1, int VAR_2)\n{",
"struct sockaddr_in VAR_3;",
"int VAR_4, VAR_5 = -1;",
"TCPContext *s = NULL;",
"fd_set wfds;",
"int VAR_6, VAR_7;",
"struct timeval VAR_8;",
"socklen_t optlen;",
"char VAR_9[1024],VAR_10[1024],VAR_11[1024],VAR_12[1024],*VAR_13... | [
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,
0,
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
],
[
23,
25
],
[
29,
31
],
[
33,
35
],
[
37
],
[
41
],
[
43
],
[
45,
47
],
[
51
],
[
53,... |
12,236 | static av_always_inline int even(uint64_t layout)
{
return (!layout || (layout & (layout - 1)));
}
| true | FFmpeg | 963f76144897d3f7684d82ec21e51dd50ea1106e | static av_always_inline int even(uint64_t layout)
{
return (!layout || (layout & (layout - 1)));
}
| {
"code": [
" return (!layout || (layout & (layout - 1)));"
],
"line_no": [
5
]
} | static av_always_inline int FUNC_0(uint64_t layout)
{
return (!layout || (layout & (layout - 1)));
}
| [
"static av_always_inline int FUNC_0(uint64_t layout)\n{",
"return (!layout || (layout & (layout - 1)));",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
12,237 | static int xen_host_pci_get_value(XenHostPCIDevice *d, const char *name,
unsigned int *pvalue, int base)
{
char path[PATH_MAX];
char buf[XEN_HOST_PCI_GET_VALUE_BUFFER_SIZE];
int fd, rc;
unsigned long value;
char *endptr;
rc = xen_host_pci_sysfs_path(d,... | true | qemu | 599d0c45615b7d099d256738a586d0f63bc707e6 | static int xen_host_pci_get_value(XenHostPCIDevice *d, const char *name,
unsigned int *pvalue, int base)
{
char path[PATH_MAX];
char buf[XEN_HOST_PCI_GET_VALUE_BUFFER_SIZE];
int fd, rc;
unsigned long value;
char *endptr;
rc = xen_host_pci_sysfs_path(d,... | {
"code": [
" if (rc) {",
" return rc;",
" rc = xen_host_pci_sysfs_path(d, name, path, sizeof (path));",
" if (rc) {",
" return rc;",
" if (rc) {",
" return rc;"
],
"line_no": [
21,
23,
19,
21,
23,
21,
23
]
} | static int FUNC_0(XenHostPCIDevice *VAR_0, const char *VAR_1,
unsigned int *VAR_2, int VAR_3)
{
char VAR_4[PATH_MAX];
char VAR_5[XEN_HOST_PCI_GET_VALUE_BUFFER_SIZE];
int VAR_6, VAR_7;
unsigned long VAR_8;
char *VAR_9;
VAR_7 = xen_host_pci_sysfs_path(VA... | [
"static int FUNC_0(XenHostPCIDevice *VAR_0, const char *VAR_1,\nunsigned int *VAR_2, int VAR_3)\n{",
"char VAR_4[PATH_MAX];",
"char VAR_5[XEN_HOST_PCI_GET_VALUE_BUFFER_SIZE];",
"int VAR_6, VAR_7;",
"unsigned long VAR_8;",
"char *VAR_9;",
"VAR_7 = xen_host_pci_sysfs_path(VAR_0, VAR_1, VAR_4, sizeof (VAR_... | [
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,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
12,238 | static int64_t mkv_write_seekhead(AVIOContext *pb, mkv_seekhead *seekhead)
{
ebml_master metaseek, seekentry;
int64_t currentpos;
int i;
currentpos = avio_tell(pb);
if (seekhead->reserved_size > 0)
if (avio_seek(pb, seekhead->filepos, SEEK_SET) < 0)
return -1;
... | true | FFmpeg | 44729bc0204fd8bdc29c234fc663229e44420b09 | static int64_t mkv_write_seekhead(AVIOContext *pb, mkv_seekhead *seekhead)
{
ebml_master metaseek, seekentry;
int64_t currentpos;
int i;
currentpos = avio_tell(pb);
if (seekhead->reserved_size > 0)
if (avio_seek(pb, seekhead->filepos, SEEK_SET) < 0)
return -1;
... | {
"code": [
" if (seekhead->reserved_size > 0)",
" if (avio_seek(pb, seekhead->filepos, SEEK_SET) < 0)",
" return -1;"
],
"line_no": [
17,
19,
21
]
} | static int64_t FUNC_0(AVIOContext *pb, mkv_seekhead *seekhead)
{
ebml_master metaseek, seekentry;
int64_t currentpos;
int VAR_0;
currentpos = avio_tell(pb);
if (seekhead->reserved_size > 0)
if (avio_seek(pb, seekhead->filepos, SEEK_SET) < 0)
return -1;
metaseek... | [
"static int64_t FUNC_0(AVIOContext *pb, mkv_seekhead *seekhead)\n{",
"ebml_master metaseek, seekentry;",
"int64_t currentpos;",
"int VAR_0;",
"currentpos = avio_tell(pb);",
"if (seekhead->reserved_size > 0)\nif (avio_seek(pb, seekhead->filepos, SEEK_SET) < 0)\nreturn -1;",
"metaseek = start_ebml_master(... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17,
19,
21
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57
... |
12,239 | static int wavpack_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
WavpackContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int frame_size;
int samplecount = ... | true | FFmpeg | c2a016ad4d9c29285813ba5806189e63e063e0fb | static int wavpack_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
WavpackContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int frame_size;
int samplecount = ... | {
"code": [
" data_size, buf, frame_size)) < 0)",
" WavpackContext *s = avctx->priv_data;"
],
"line_no": [
71,
9
]
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
WavpackContext *s = VAR_0->priv_data;
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
int VAR_6;
int VAR_7 = 0;
s->block = 0;
... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"WavpackContext *s = VAR_0->priv_data;",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"int VAR_6;",
"int VAR_7 = 0;",
"s->block = 0;",
"s->samples_left = 0;",
"s->ch_offset = 0;",
"if(... | [
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,
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
... |
12,240 | static int get_bits(J2kDecoderContext *s, int n)
{
int res = 0;
if (s->buf_end - s->buf < ((n - s->bit_index) >> 8))
return AVERROR(EINVAL);
while (--n >= 0){
res <<= 1;
if (s->bit_index == 0){
s->bit_index = 7 + (*s->buf != 0xff);
s->buf++;
... | true | FFmpeg | ddfa3751c092feaf1e080f66587024689dfe603c | static int get_bits(J2kDecoderContext *s, int n)
{
int res = 0;
if (s->buf_end - s->buf < ((n - s->bit_index) >> 8))
return AVERROR(EINVAL);
while (--n >= 0){
res <<= 1;
if (s->bit_index == 0){
s->bit_index = 7 + (*s->buf != 0xff);
s->buf++;
... | {
"code": [
" if (s->buf_end - s->buf < ((n - s->bit_index) >> 8))",
" return AVERROR(EINVAL);",
" if (s->bit_index == 0){",
" s->bit_index = 7 + (*s->buf != 0xff);",
" s->buf++;",
" res |= (*s->buf >> s->bit_index) & 1;"
],
"line_no": [
7,... | static int FUNC_0(J2kDecoderContext *VAR_0, int VAR_1)
{
int VAR_2 = 0;
if (VAR_0->buf_end - VAR_0->buf < ((VAR_1 - VAR_0->bit_index) >> 8))
return AVERROR(EINVAL);
while (--VAR_1 >= 0){
VAR_2 <<= 1;
if (VAR_0->bit_index == 0){
VAR_0->bit_index = 7 + (*VAR_0->buf ... | [
"static int FUNC_0(J2kDecoderContext *VAR_0, int VAR_1)\n{",
"int VAR_2 = 0;",
"if (VAR_0->buf_end - VAR_0->buf < ((VAR_1 - VAR_0->bit_index) >> 8))\nreturn AVERROR(EINVAL);",
"while (--VAR_1 >= 0){",
"VAR_2 <<= 1;",
"if (VAR_0->bit_index == 0){",
"VAR_0->bit_index = 7 + (*VAR_0->buf != 0xff);",
"VAR_... | [
0,
0,
1,
0,
0,
1,
1,
1,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
12,241 | static uint32_t drc_set_usable(sPAPRDRConnector *drc)
{
/* if there's no resource/device associated with the DRC, there's
* no way for us to put it in an allocation state consistent with
* being 'USABLE'. PAPR 2.7, 13.5.3.4 documents that this should
* result in an RTAS return code of -3 / "no s... | true | qemu | 82a93a1d307064f35c363f79b04b0a0149ac53d9 | static uint32_t drc_set_usable(sPAPRDRConnector *drc)
{
if (!drc->dev) {
return RTAS_OUT_NO_SUCH_INDICATOR;
}
if (drc->awaiting_release && drc->awaiting_allocation) {
return RTAS_OUT_NO_SUCH_INDICATOR;
}
drc->allocation_state = SPAPR_DR_A... | {
"code": [
" if (drc->awaiting_release && drc->awaiting_allocation) {",
" drc->awaiting_allocation = false;",
" drc->awaiting_allocation = false;"
],
"line_no": [
21,
45,
45
]
} | static uint32_t FUNC_0(sPAPRDRConnector *drc)
{
if (!drc->dev) {
return RTAS_OUT_NO_SUCH_INDICATOR;
}
if (drc->awaiting_release && drc->awaiting_allocation) {
return RTAS_OUT_NO_SUCH_INDICATOR;
}
drc->allocation_state = SPAPR_DR_ALLOCATIO... | [
"static uint32_t FUNC_0(sPAPRDRConnector *drc)\n{",
"if (!drc->dev) {",
"return RTAS_OUT_NO_SUCH_INDICATOR;",
"}",
"if (drc->awaiting_release && drc->awaiting_allocation) {",
"return RTAS_OUT_NO_SUCH_INDICATOR;",
"}",
"drc->allocation_state = SPAPR_DR_ALLOCATION_STATE_USABLE;",
"drc->awaiting_alloca... | [
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
15
],
[
17
],
[
19
],
[
21
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[
51
]
] |
12,242 | static ssize_t qcow2_crypto_hdr_init_func(QCryptoBlock *block, size_t headerlen,
void *opaque, Error **errp)
{
BlockDriverState *bs = opaque;
BDRVQcow2State *s = bs->opaque;
int64_t ret;
int64_t clusterlen;
ret = qcow2_alloc_clusters(bs, headerlen);... | true | qemu | c9b83e9c23ecb094ddf987c7c37b8f454cb80615 | static ssize_t qcow2_crypto_hdr_init_func(QCryptoBlock *block, size_t headerlen,
void *opaque, Error **errp)
{
BlockDriverState *bs = opaque;
BDRVQcow2State *s = bs->opaque;
int64_t ret;
int64_t clusterlen;
ret = qcow2_alloc_clusters(bs, headerlen);... | {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(QCryptoBlock *block, size_t headerlen,
void *opaque, Error **errp)
{
BlockDriverState *bs = opaque;
BDRVQcow2State *s = bs->opaque;
int64_t ret;
int64_t clusterlen;
ret = qcow2_alloc_clusters(bs, headerlen);
if (ret < 0) {... | [
"static ssize_t FUNC_0(QCryptoBlock *block, size_t headerlen,\nvoid *opaque, Error **errp)\n{",
"BlockDriverState *bs = opaque;",
"BDRVQcow2State *s = bs->opaque;",
"int64_t ret;",
"int64_t clusterlen;",
"ret = qcow2_alloc_clusters(bs, headerlen);",
"if (ret < 0) {",
"error_setg_errno(errp, -ret,\n\"C... | [
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
],
[
29
],
[
33
],
[
35
],
[
43
],
[
46,
48,
50
],
[
52
],
[
54
],
[
56
],
[... |
12,244 | static int get_cookies(HTTPContext *s, char **cookies, const char *path,
const char *domain)
{
// cookie strings will look like Set-Cookie header field values. Multiple
// Set-Cookie fields will result in multiple values delimited by a newline
int ret = 0;
char *next, *cook... | true | FFmpeg | c8ea5ccd5db125e24d46c74339c64f9527d7a72e | static int get_cookies(HTTPContext *s, char **cookies, const char *path,
const char *domain)
{
int ret = 0;
char *next, *cookie, *set_cookies = av_strdup(s->cookies), *cset_cookies = set_cookies;
if (!set_cookies) return AVERROR(EINVAL);
*cookies = NULL;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(HTTPContext *VAR_0, char **VAR_1, const char *VAR_2,
const char *VAR_3)
{
int VAR_4 = 0;
char *VAR_5, *VAR_6, *VAR_7 = av_strdup(VAR_0->VAR_1), *VAR_8 = VAR_7;
if (!VAR_7) return AVERROR(EINVAL);
*VAR_1 = NULL;
while ((VAR_6 = av_strtok... | [
"static int FUNC_0(HTTPContext *VAR_0, char **VAR_1, const char *VAR_2,\nconst char *VAR_3)\n{",
"int VAR_4 = 0;",
"char *VAR_5, *VAR_6, *VAR_7 = av_strdup(VAR_0->VAR_1), *VAR_8 = VAR_7;",
"if (!VAR_7) return AVERROR(EINVAL);",
"*VAR_1 = NULL;",
"while ((VAR_6 = av_strtok(VAR_7, \"\\n\", &VAR_5))) {",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
40
],
[
42
],
[
45
],
[
47
],
[
49,
51,
53
],
[
57
],
... |
12,246 | static inline void xan_wc3_copy_pixel_run(XanContext *s,
int x, int y, int pixel_count, int motion_x, int motion_y)
{
int stride;
int line_inc;
int curframe_index, prevframe_index;
int curframe_x, prevframe_x;
int width = s->avctx->width;
unsigned char *palette_plane, *prev_palette_p... | true | FFmpeg | 19e95b88459e879d3e67a66350d937c32ed762ca | static inline void xan_wc3_copy_pixel_run(XanContext *s,
int x, int y, int pixel_count, int motion_x, int motion_y)
{
int stride;
int line_inc;
int curframe_index, prevframe_index;
int curframe_x, prevframe_x;
int width = s->avctx->width;
unsigned char *palette_plane, *prev_palette_p... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(XanContext *VAR_0,
int VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5)
{
int VAR_6;
int VAR_7;
int VAR_8, VAR_9;
int VAR_10, VAR_11;
int VAR_12 = VAR_0->avctx->VAR_12;
unsigned char *VAR_13, *VAR_14;
VAR_13 = VAR_0->current_frame.data[0];
VAR_... | [
"static inline void FUNC_0(XanContext *VAR_0,\nint VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5)\n{",
"int VAR_6;",
"int VAR_7;",
"int VAR_8, VAR_9;",
"int VAR_10, VAR_11;",
"int VAR_12 = VAR_0->avctx->VAR_12;",
"unsigned char *VAR_13, *VAR_14;",
"VAR_13 = VAR_0->current_frame.data[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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[... |
12,247 | pixman_format_code_t qemu_default_pixman_format(int bpp, bool native_endian)
{
if (native_endian) {
switch (bpp) {
case 15:
return PIXMAN_x1r5g5b5;
case 16:
return PIXMAN_r5g6b5;
case 24:
return PIXMAN_r8g8b8;
case 32:
... | true | qemu | aca7aaf6287b6a9f688c1b115a76fdc056565a7e | pixman_format_code_t qemu_default_pixman_format(int bpp, bool native_endian)
{
if (native_endian) {
switch (bpp) {
case 15:
return PIXMAN_x1r5g5b5;
case 16:
return PIXMAN_r5g6b5;
case 24:
return PIXMAN_r8g8b8;
case 32:
... | {
"code": [
" g_assert_not_reached();"
],
"line_no": [
45
]
} | pixman_format_code_t FUNC_0(int bpp, bool native_endian)
{
if (native_endian) {
switch (bpp) {
case 15:
return PIXMAN_x1r5g5b5;
case 16:
return PIXMAN_r5g6b5;
case 24:
return PIXMAN_r8g8b8;
case 32:
return PIXMAN_x8r8... | [
"pixman_format_code_t FUNC_0(int bpp, bool native_endian)\n{",
"if (native_endian) {",
"switch (bpp) {",
"case 15:\nreturn PIXMAN_x1r5g5b5;",
"case 16:\nreturn PIXMAN_r5g6b5;",
"case 24:\nreturn PIXMAN_r8g8b8;",
"case 32:\nreturn PIXMAN_x8r8g8b8;",
"}",
"} else {",
"switch (bpp) {",
"case 24:\nr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13,
15
],
[
17,
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
12,248 | static ssize_t handle_aiocb_rw_linear(RawPosixAIOData *aiocb, char *buf)
{
ssize_t offset = 0;
ssize_t len;
while (offset < aiocb->aio_nbytes) {
if (aiocb->aio_type & QEMU_AIO_WRITE) {
len = pwrite(aiocb->aio_fildes,
(const char *)buf + offset,
... | true | qemu | 61ed73cff427206b3a959b18a4877952f566279b | static ssize_t handle_aiocb_rw_linear(RawPosixAIOData *aiocb, char *buf)
{
ssize_t offset = 0;
ssize_t len;
while (offset < aiocb->aio_nbytes) {
if (aiocb->aio_type & QEMU_AIO_WRITE) {
len = pwrite(aiocb->aio_fildes,
(const char *)buf + offset,
... | {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(RawPosixAIOData *aiocb, char *buf)
{
ssize_t offset = 0;
ssize_t len;
while (offset < aiocb->aio_nbytes) {
if (aiocb->aio_type & QEMU_AIO_WRITE) {
len = pwrite(aiocb->aio_fildes,
(const char *)buf + offset,
... | [
"static ssize_t FUNC_0(RawPosixAIOData *aiocb, char *buf)\n{",
"ssize_t offset = 0;",
"ssize_t len;",
"while (offset < aiocb->aio_nbytes) {",
"if (aiocb->aio_type & QEMU_AIO_WRITE) {",
"len = pwrite(aiocb->aio_fildes,\n(const char *)buf + offset,\naiocb->aio_nbytes - offset,\naiocb->aio_offset + offset);"... | [
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
],
[
48
],
[
50
],
[
53
],
[
56
],
[
58
],
[
60... |
12,249 | static inline int get_block(GetBitContext *gb, DCTELEM *block, const uint8_t *scan,
const uint32_t *quant) {
int coeff, i, n;
int8_t ac;
uint8_t dc = get_bits(gb, 8);
// block not coded
if (dc == 255)
// number of non-zero coefficients
coeff = get_bits(gb, 6);
... | true | FFmpeg | 8d857c543402911f46ad38b093ab9aaf5b9a9a18 | static inline int get_block(GetBitContext *gb, DCTELEM *block, const uint8_t *scan,
const uint32_t *quant) {
int coeff, i, n;
int8_t ac;
uint8_t dc = get_bits(gb, 8);
if (dc == 255)
coeff = get_bits(gb, 6);
memset(block, 0, 64 * sizeof(DCTELEM));
... | {
"code": [],
"line_no": []
} | static inline int FUNC_0(GetBitContext *VAR_0, DCTELEM *VAR_1, const uint8_t *VAR_2,
const uint32_t *VAR_3) {
int VAR_4, VAR_5, VAR_6;
int8_t ac;
uint8_t dc = get_bits(VAR_0, 8);
if (dc == 255)
VAR_4 = get_bits(VAR_0, 6);
memset(VAR_1, 0, 64 * size... | [
"static inline int FUNC_0(GetBitContext *VAR_0, DCTELEM *VAR_1, const uint8_t *VAR_2,\nconst uint32_t *VAR_3) {",
"int VAR_4, VAR_5, VAR_6;",
"int8_t ac;",
"uint8_t dc = get_bits(VAR_0, 8);",
"if (dc == 255)\nVAR_4 = get_bits(VAR_0, 6);",
"memset(VAR_1, 0, 64 * sizeof(DCTELEM));",
"while (VAR_4) {",
"... | [
0,
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
],
[
7,
9
],
[
12
],
[
14
],
[
15
],
[
16,
17
],
[
18
],
[
19
],
[
21
],
[
22,
23
],
[
24
],
[
25,
26
],
[
27
],
[
28
],
[
30
... |
12,250 | vcard_emul_find_vreader_from_slot(PK11SlotInfo *slot)
{
VReaderList *reader_list = vreader_get_reader_list();
VReaderListEntry *current_entry = NULL;
if (reader_list == NULL) {
return NULL;
}
for (current_entry = vreader_list_get_first(reader_list); current_entry;
... | true | qemu | 124fe7fb1b7a1db8cb2ebb9edae84716ffaf37ce | vcard_emul_find_vreader_from_slot(PK11SlotInfo *slot)
{
VReaderList *reader_list = vreader_get_reader_list();
VReaderListEntry *current_entry = NULL;
if (reader_list == NULL) {
return NULL;
}
for (current_entry = vreader_list_get_first(reader_list); current_entry;
... | {
"code": [],
"line_no": []
} | FUNC_0(PK11SlotInfo *VAR_0)
{
VReaderList *reader_list = vreader_get_reader_list();
VReaderListEntry *current_entry = NULL;
if (reader_list == NULL) {
return NULL;
}
for (current_entry = vreader_list_get_first(reader_list); current_entry;
current_entry = vre... | [
"FUNC_0(PK11SlotInfo *VAR_0)\n{",
"VReaderList *reader_list = vreader_get_reader_list();",
"VReaderListEntry *current_entry = NULL;",
"if (reader_list == NULL) {",
"return NULL;",
"}",
"for (current_entry = vreader_list_get_first(reader_list); current_entry;",
"current_entry = vreader_list_get_next(cu... | [
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
],
[
28
],
[
30
],
[
32
],
[
34
],
[
39
],
[
41
]
] |
12,251 | static int can_merge_formats(AVFilterFormats *a_arg,
AVFilterFormats *b_arg,
enum AVMediaType type,
int is_sample_rate)
{
AVFilterFormats *a, *b, *ret;
if (a == b)
return 1;
a = clone_filter_formats(a_arg)... | false | FFmpeg | 6bde1e9d14ff1e0ecff74b8ff59607f545c6f2ec | static int can_merge_formats(AVFilterFormats *a_arg,
AVFilterFormats *b_arg,
enum AVMediaType type,
int is_sample_rate)
{
AVFilterFormats *a, *b, *ret;
if (a == b)
return 1;
a = clone_filter_formats(a_arg)... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFilterFormats *VAR_0,
AVFilterFormats *VAR_1,
enum AVMediaType VAR_2,
int VAR_3)
{
AVFilterFormats *a, *b, *ret;
if (a == b)
return 1;
a = clone_filter_formats(VAR_0);
b = clone_fi... | [
"static int FUNC_0(AVFilterFormats *VAR_0,\nAVFilterFormats *VAR_1,\nenum AVMediaType VAR_2,\nint VAR_3)\n{",
"AVFilterFormats *a, *b, *ret;",
"if (a == b)\nreturn 1;",
"a = clone_filter_formats(VAR_0);",
"b = clone_filter_formats(VAR_1);",
"if (VAR_3) {",
"ret = ff_merge_samplerates(a, b);",
"} else ... | [
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
],
[
45
... |
12,252 | static int mxf_write_partition(AVFormatContext *s, int bodysid,
int indexsid,
const uint8_t *key, int write_metadata)
{
MXFContext *mxf = s->priv_data;
AVIOContext *pb = s->pb;
int64_t header_byte_count_offset;
unsigned index_byte_co... | true | FFmpeg | 7df3b426bbfbd7efd9a0f56393e3cc78413b0869 | static int mxf_write_partition(AVFormatContext *s, int bodysid,
int indexsid,
const uint8_t *key, int write_metadata)
{
MXFContext *mxf = s->priv_data;
AVIOContext *pb = s->pb;
int64_t header_byte_count_offset;
unsigned index_byte_co... | {
"code": [
" klv_encode_ber_length(pb, 88 + 16 * mxf->essence_container_count);"
],
"line_no": [
69
]
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,
int VAR_2,
const uint8_t *VAR_3, int VAR_4)
{
MXFContext *mxf = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
int64_t header_byte_count_offset;
unsigned VAR_5 = 0;
uint64_t p... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,\nint VAR_2,\nconst uint8_t *VAR_3, int VAR_4)\n{",
"MXFContext *mxf = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"int64_t header_byte_count_offset;",
"unsigned VAR_5 = 0;",
"uint64_t partition_offset = avio_tell(pb);",
"int VAR_6;",
"if (!... | [
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,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25,
27
],
[
29,
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49,
51
],
[
53
],
[
55
... |
12,253 | void virtio_config_writew(VirtIODevice *vdev, uint32_t addr, uint32_t data)
{
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
uint16_t val = data;
if (addr > (vdev->config_len - sizeof(val)))
return;
stw_p(vdev->config + addr, val);
if (k->set_config) {
k->set_con... | true | qemu | 5f5a1318653c08e435cfa52f60b6a712815b659d | void virtio_config_writew(VirtIODevice *vdev, uint32_t addr, uint32_t data)
{
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
uint16_t val = data;
if (addr > (vdev->config_len - sizeof(val)))
return;
stw_p(vdev->config + addr, val);
if (k->set_config) {
k->set_con... | {
"code": [
" if (addr > (vdev->config_len - sizeof(val)))",
" if (addr > (vdev->config_len - sizeof(val)))",
" if (addr > (vdev->config_len - sizeof(val)))",
" if (addr > (vdev->config_len - sizeof(val)))",
" if (addr > (vdev->config_len - sizeof(val)))",
" if (addr > (vdev-... | void FUNC_0(VirtIODevice *VAR_0, uint32_t VAR_1, uint32_t VAR_2)
{
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(VAR_0);
uint16_t val = VAR_2;
if (VAR_1 > (VAR_0->config_len - sizeof(val)))
return;
stw_p(VAR_0->config + VAR_1, val);
if (k->set_config) {
k->set_config(V... | [
"void FUNC_0(VirtIODevice *VAR_0, uint32_t VAR_1, uint32_t VAR_2)\n{",
"VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(VAR_0);",
"uint16_t val = VAR_2;",
"if (VAR_1 > (VAR_0->config_len - sizeof(val)))\nreturn;",
"stw_p(VAR_0->config + VAR_1, val);",
"if (k->set_config) {",
"k->set_config(VAR_0, VAR_0->... | [
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
12,254 | static uint8_t get_sot(J2kDecoderContext *s)
{
if (s->buf_end - s->buf < 4)
return AVERROR(EINVAL);
s->curtileno = bytestream_get_be16(&s->buf); ///< Isot
if((unsigned)s->curtileno >= s->numXtiles * s->numYtiles){
s->curtileno=0;
return AVERROR(EINVAL);
}
s->buf ... | true | FFmpeg | ddfa3751c092feaf1e080f66587024689dfe603c | static uint8_t get_sot(J2kDecoderContext *s)
{
if (s->buf_end - s->buf < 4)
return AVERROR(EINVAL);
s->curtileno = bytestream_get_be16(&s->buf);
if((unsigned)s->curtileno >= s->numXtiles * s->numYtiles){
s->curtileno=0;
return AVERROR(EINVAL);
}
s->buf += 4;
... | {
"code": [
" return AVERROR(EINVAL);",
" if (s->buf_end - s->buf < 4)"
],
"line_no": [
7,
5
]
} | static uint8_t FUNC_0(J2kDecoderContext *s)
{
if (s->buf_end - s->buf < 4)
return AVERROR(EINVAL);
s->curtileno = bytestream_get_be16(&s->buf);
if((unsigned)s->curtileno >= s->numXtiles * s->numYtiles){
s->curtileno=0;
return AVERROR(EINVAL);
}
s->buf += 4;
... | [
"static uint8_t FUNC_0(J2kDecoderContext *s)\n{",
"if (s->buf_end - s->buf < 4)\nreturn AVERROR(EINVAL);",
"s->curtileno = bytestream_get_be16(&s->buf);",
"if((unsigned)s->curtileno >= s->numXtiles * s->numYtiles){",
"s->curtileno=0;",
"return AVERROR(EINVAL);",
"}",
"s->buf += 4;",
"if (!bytestream... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
]
] |
12,256 | static void i6300esb_pc_init(PCIBus *pci_bus)
{
I6300State *d;
uint8_t *pci_conf;
if (!pci_bus) {
fprintf(stderr, "wdt_i6300esb: no PCI bus in this machine\n");
return;
}
d = (I6300State *)
pci_register_device (pci_bus, "i6300esb_wdt", sizeof (I6300State),
... | true | qemu | 09aaa1602f9381c0e0fb539390b1793e51bdfc7b | static void i6300esb_pc_init(PCIBus *pci_bus)
{
I6300State *d;
uint8_t *pci_conf;
if (!pci_bus) {
fprintf(stderr, "wdt_i6300esb: no PCI bus in this machine\n");
return;
}
d = (I6300State *)
pci_register_device (pci_bus, "i6300esb_wdt", sizeof (I6300State),
... | {
"code": [
"static void i6300esb_pc_init(PCIBus *pci_bus)",
" I6300State *d;",
" if (!pci_bus) {",
" fprintf(stderr, \"wdt_i6300esb: no PCI bus in this machine\\n\");",
" d = (I6300State *)",
" pci_register_device (pci_bus, \"i6300esb_wdt\", sizeof (I6300State),",
"... | static void FUNC_0(PCIBus *VAR_0)
{
I6300State *d;
uint8_t *pci_conf;
if (!VAR_0) {
fprintf(stderr, "wdt_i6300esb: no PCI bus in this machine\n");
return;
}
d = (I6300State *)
pci_register_device (VAR_0, "i6300esb_wdt", sizeof (I6300State),
... | [
"static void FUNC_0(PCIBus *VAR_0)\n{",
"I6300State *d;",
"uint8_t *pci_conf;",
"if (!VAR_0) {",
"fprintf(stderr, \"wdt_i6300esb: no PCI bus in this machine\\n\");",
"return;",
"}",
"d = (I6300State *)\npci_register_device (VAR_0, \"i6300esb_wdt\", sizeof (I6300State),\n-1,\ni6300esb_config_read, i630... | [
1,
1,
0,
1,
1,
0,
0,
1,
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
],
[
21,
23,
25,
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
... |
12,258 | static inline void cpu_loop_exec_tb(CPUState *cpu, TranslationBlock *tb,
TranslationBlock **last_tb, int *tb_exit,
SyncClocks *sc)
{
uintptr_t ret;
if (unlikely(atomic_read(&cpu->exit_request))) {
return;
}
trace... | true | qemu | 43d70ddf9f96b3ad037abe4d5f9f2768196b8c92 | static inline void cpu_loop_exec_tb(CPUState *cpu, TranslationBlock *tb,
TranslationBlock **last_tb, int *tb_exit,
SyncClocks *sc)
{
uintptr_t ret;
if (unlikely(atomic_read(&cpu->exit_request))) {
return;
}
trace... | {
"code": [
" *last_tb = (TranslationBlock *)(ret & ~TB_EXIT_MASK);",
" cpu_exec_nocache(cpu, insns_left, *last_tb, false);",
" *last_tb = NULL;"
],
"line_no": [
25,
91,
99
]
} | static inline void FUNC_0(CPUState *VAR_0, TranslationBlock *VAR_1,
TranslationBlock **VAR_2, int *VAR_3,
SyncClocks *VAR_4)
{
uintptr_t ret;
if (unlikely(atomic_read(&VAR_0->exit_request))) {
return;
}
trace_exe... | [
"static inline void FUNC_0(CPUState *VAR_0, TranslationBlock *VAR_1,\nTranslationBlock **VAR_2, int *VAR_3,\nSyncClocks *VAR_4)\n{",
"uintptr_t ret;",
"if (unlikely(atomic_read(&VAR_0->exit_request))) {",
"return;",
"}",
"trace_exec_tb(VAR_1, VAR_1->pc);",
"ret = cpu_tb_exec(VAR_0, VAR_1);",
"*VAR_2 =... | [
0,
0,
0,
0,
0,
0,
0,
1,
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
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
53
],
[
55
],
[
57
],
[
59,
61
],
[
65,
67
],
[
69,
71
],
[
73
... |
12,260 | static void vnc_dpy_update(DisplayState *ds, int x, int y, int w, int h)
{
VncState *vs = ds->opaque;
int i;
h += y;
/* round x down to ensure the loop only spans one 16-pixel block per,
iteration. otherwise, if (x % 16) != 0, the last iteration may span
two 16-pixel blocks but... | true | qemu | 6cec5487990bf3f1f22b3fcb871978255e92ae0d | static void vnc_dpy_update(DisplayState *ds, int x, int y, int w, int h)
{
VncState *vs = ds->opaque;
int i;
h += y;
w += (x % 16);
x -= (x % 16);
x = MIN(x, vs->width);
y = MIN(y, vs->height);
w = MIN(x + w, vs->width) - x;
h = MIN(h, vs->height);
... | {
"code": [
" x = MIN(x, vs->width);",
" y = MIN(y, vs->height);",
" w = MIN(x + w, vs->width) - x;",
" h = MIN(h, vs->height);"
],
"line_no": [
29,
31,
33,
35
]
} | static void FUNC_0(DisplayState *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4)
{
VncState *vs = VAR_0->opaque;
int VAR_5;
VAR_4 += VAR_2;
VAR_3 += (VAR_1 % 16);
VAR_1 -= (VAR_1 % 16);
VAR_1 = MIN(VAR_1, vs->width);
VAR_2 = MIN(VAR_2, vs->height);
VAR_3 = M... | [
"static void FUNC_0(DisplayState *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4)\n{",
"VncState *vs = VAR_0->opaque;",
"int VAR_5;",
"VAR_4 += VAR_2;",
"VAR_3 += (VAR_1 % 16);",
"VAR_1 -= (VAR_1 % 16);",
"VAR_1 = MIN(VAR_1, vs->width);",
"VAR_2 = MIN(VAR_2, vs->height);",
"VAR_3 = MIN(VAR_1 + VA... | [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
12,261 | static void musb_async_cancel_device(MUSBState *s, USBDevice *dev)
{
int ep, dir;
for (ep = 0; ep < 16; ep++) {
for (dir = 0; dir < 2; dir++) {
if (s->ep[ep].packey[dir].p.owner == NULL ||
s->ep[ep].packey[dir].p.owner->dev != dev) {
continue;
... | true | qemu | f53c398aa603cea135ee58fd15249aeff7b9c7ea | static void musb_async_cancel_device(MUSBState *s, USBDevice *dev)
{
int ep, dir;
for (ep = 0; ep < 16; ep++) {
for (dir = 0; dir < 2; dir++) {
if (s->ep[ep].packey[dir].p.owner == NULL ||
s->ep[ep].packey[dir].p.owner->dev != dev) {
continue;
... | {
"code": [
" if (s->ep[ep].packey[dir].p.owner == NULL ||",
" s->ep[ep].packey[dir].p.owner->dev != dev) {"
],
"line_no": [
13,
15
]
} | static void FUNC_0(MUSBState *VAR_0, USBDevice *VAR_1)
{
int VAR_2, VAR_3;
for (VAR_2 = 0; VAR_2 < 16; VAR_2++) {
for (VAR_3 = 0; VAR_3 < 2; VAR_3++) {
if (VAR_0->VAR_2[VAR_2].packey[VAR_3].p.owner == NULL ||
VAR_0->VAR_2[VAR_2].packey[VAR_3].p.owner->VAR_1 != VAR_1) ... | [
"static void FUNC_0(MUSBState *VAR_0, USBDevice *VAR_1)\n{",
"int VAR_2, VAR_3;",
"for (VAR_2 = 0; VAR_2 < 16; VAR_2++) {",
"for (VAR_3 = 0; VAR_3 < 2; VAR_3++) {",
"if (VAR_0->VAR_2[VAR_2].packey[VAR_3].p.owner == NULL ||\nVAR_0->VAR_2[VAR_2].packey[VAR_3].p.owner->VAR_1 != VAR_1) {",
"continue;",
"}",... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
]
] |
12,262 | int qemu_reset_requested_get(void)
{
return reset_requested;
}
| true | qemu | aedbe19297907143f17b733a7ff0e0534377bed1 | int qemu_reset_requested_get(void)
{
return reset_requested;
}
| {
"code": [
"int qemu_reset_requested_get(void)"
],
"line_no": [
1
]
} | int FUNC_0(void)
{
return reset_requested;
}
| [
"int FUNC_0(void)\n{",
"return reset_requested;",
"}"
] | [
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
12,263 | static void select_input_picture(MpegEncContext *s){
int i;
for(i=1; i<MAX_PICTURE_COUNT; i++)
s->reordered_input_picture[i-1]= s->reordered_input_picture[i];
s->reordered_input_picture[MAX_PICTURE_COUNT-1]= NULL;
/* set next picture type & ordering */
if(s->reordered_input_picture... | true | FFmpeg | 075060023d978975ed5328e269d6e20163e669d2 | static void select_input_picture(MpegEncContext *s){
int i;
for(i=1; i<MAX_PICTURE_COUNT; i++)
s->reordered_input_picture[i-1]= s->reordered_input_picture[i];
s->reordered_input_picture[MAX_PICTURE_COUNT-1]= NULL;
if(s->reordered_input_picture[0]==NULL && s->input_picture[0]){
... | {
"code": [
" if(s->reordered_input_picture[0]->type == FF_BUFFER_TYPE_SHARED){",
" pic->reference = s->reordered_input_picture[0]->reference;",
" alloc_picture(s, pic, 0);"
],
"line_no": [
259,
281,
285
]
} | static void FUNC_0(MpegEncContext *VAR_0){
int VAR_4;
for(VAR_4=1; VAR_4<MAX_PICTURE_COUNT; VAR_4++)
VAR_0->reordered_input_picture[VAR_4-1]= VAR_0->reordered_input_picture[VAR_4];
VAR_0->reordered_input_picture[MAX_PICTURE_COUNT-1]= NULL;
if(VAR_0->reordered_input_picture[0]==NUL... | [
"static void FUNC_0(MpegEncContext *VAR_0){",
"int VAR_4;",
"for(VAR_4=1; VAR_4<MAX_PICTURE_COUNT; VAR_4++)",
"VAR_0->reordered_input_picture[VAR_4-1]= VAR_0->reordered_input_picture[VAR_4];",
"VAR_0->reordered_input_picture[MAX_PICTURE_COUNT-1]= NULL;",
"if(VAR_0->reordered_input_picture[0]==NULL && 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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53,
55... |
12,264 | static int local_chown(FsContext *fs_ctx, const char *path, FsCred *credp)
{
if ((credp->fc_uid == -1 && credp->fc_gid == -1) ||
(fs_ctx->fs_sm == SM_PASSTHROUGH)) {
return lchown(rpath(fs_ctx, path), credp->fc_uid, credp->fc_gid);
} else if (fs_ctx->fs_sm == SM_MAPPED) {
retur... | true | qemu | 12848bfc5d719bad536c5448205a3226be1fda47 | static int local_chown(FsContext *fs_ctx, const char *path, FsCred *credp)
{
if ((credp->fc_uid == -1 && credp->fc_gid == -1) ||
(fs_ctx->fs_sm == SM_PASSTHROUGH)) {
return lchown(rpath(fs_ctx, path), credp->fc_uid, credp->fc_gid);
} else if (fs_ctx->fs_sm == SM_MAPPED) {
retur... | {
"code": [
" } else if (fs_ctx->fs_sm == SM_PASSTHROUGH) {",
" } else if (fs_ctx->fs_sm == SM_PASSTHROUGH) {",
" } else if (fs_ctx->fs_sm == SM_PASSTHROUGH) {",
" } else if (fs_ctx->fs_sm == SM_PASSTHROUGH) {",
" } else if (fs_ctx->fs_sm == SM_PASSTHROUGH) {",
" } else if (f... | static int FUNC_0(FsContext *VAR_0, const char *VAR_1, FsCred *VAR_2)
{
if ((VAR_2->fc_uid == -1 && VAR_2->fc_gid == -1) ||
(VAR_0->fs_sm == SM_PASSTHROUGH)) {
return lchown(rpath(VAR_0, VAR_1), VAR_2->fc_uid, VAR_2->fc_gid);
} else if (VAR_0->fs_sm == SM_MAPPED) {
return local... | [
"static int FUNC_0(FsContext *VAR_0, const char *VAR_1, FsCred *VAR_2)\n{",
"if ((VAR_2->fc_uid == -1 && VAR_2->fc_gid == -1) ||\n(VAR_0->fs_sm == SM_PASSTHROUGH)) {",
"return lchown(rpath(VAR_0, VAR_1), VAR_2->fc_uid, VAR_2->fc_gid);",
"} else if (VAR_0->fs_sm == SM_MAPPED) {",
"return local_set_xattr(rpat... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
12,265 | static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
{
const int mb_x= s->mb_x;
const int mb_y= s->mb_y;
int i;
#if 0
if (s->interlaced_dct) {
dct_linesize = s->linesize * 2;
dct_offset = s->linesize;
} else {
dct_linesize = s->li... | true | FFmpeg | d7e9533aa06f4073a27812349b35ba5fede11ca1 | static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
{
const int mb_x= s->mb_x;
const int mb_y= s->mb_y;
int i;
#if 0
if (s->interlaced_dct) {
dct_linesize = s->linesize * 2;
dct_offset = s->linesize;
} else {
dct_linesize = s->li... | {
"code": [
" }else{",
" } else {",
"#endif",
"#endif",
"#endif",
" int i;",
" } else {",
" for(i=0;i<6;i++) {",
" s->block_last_index[i] = dct_quantize(s, s->block[i], i, s->qscale);",
" } else {",
" }else{",
" } else {",
"#en... | static void FUNC_0(MpegEncContext *VAR_0, int VAR_1, int VAR_2)
{
const int VAR_3= VAR_0->VAR_3;
const int VAR_4= VAR_0->VAR_4;
int VAR_5;
#if 0
if (VAR_0->interlaced_dct) {
dct_linesize = VAR_0->linesize * 2;
dct_offset = VAR_0->linesize;
} else {
... | [
"static void FUNC_0(MpegEncContext *VAR_0, int VAR_1, int VAR_2)\n{",
"const int VAR_3= VAR_0->VAR_3;",
"const int VAR_4= VAR_0->VAR_4;",
"int VAR_5;",
"#if 0\nif (VAR_0->interlaced_dct) {",
"dct_linesize = VAR_0->linesize * 2;",
"dct_offset = VAR_0->linesize;",
"} else {",
"dct_linesize = VAR_0->li... | [
0,
0,
0,
1,
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,
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
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
12,266 | static int acpi_load_old(QEMUFile *f, void *opaque, int version_id)
{
PIIX4PMState *s = opaque;
int ret, i;
uint16_t temp;
ret = pci_device_load(&s->dev, f);
if (ret < 0) {
return ret;
}
qemu_get_be16s(f, &s->ar.pm1.evt.sts);
qemu_get_be16s(f, &s->ar.pm1.evt.en);
... | true | qemu | ded67782e6d06069873adce7f9074d273ae75760 | static int acpi_load_old(QEMUFile *f, void *opaque, int version_id)
{
PIIX4PMState *s = opaque;
int ret, i;
uint16_t temp;
ret = pci_device_load(&s->dev, f);
if (ret < 0) {
return ret;
}
qemu_get_be16s(f, &s->ar.pm1.evt.sts);
qemu_get_be16s(f, &s->ar.pm1.evt.en);
... | {
"code": [
" ret = vmstate_load_state(f, &vmstate_apm, opaque, 1);",
" ret = vmstate_load_state(f, &vmstate_pci_status, opaque, 1);"
],
"line_no": [
29,
65
]
} | static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, int VAR_2)
{
PIIX4PMState *s = VAR_1;
int VAR_3, VAR_4;
uint16_t temp;
VAR_3 = pci_device_load(&s->dev, VAR_0);
if (VAR_3 < 0) {
return VAR_3;
}
qemu_get_be16s(VAR_0, &s->ar.pm1.evt.sts);
qemu_get_be16s(VAR_0, &s->ar.pm1... | [
"static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, int VAR_2)\n{",
"PIIX4PMState *s = VAR_1;",
"int VAR_3, VAR_4;",
"uint16_t temp;",
"VAR_3 = pci_device_load(&s->dev, VAR_0);",
"if (VAR_3 < 0) {",
"return VAR_3;",
"}",
"qemu_get_be16s(VAR_0, &s->ar.pm1.evt.sts);",
"qemu_get_be16s(VAR_0, &s->ar.pm1.... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
... |
12,267 | static int debugcon_parse(const char *devname)
{
QemuOpts *opts;
if (!qemu_chr_new("debugcon", devname, NULL)) {
exit(1);
}
opts = qemu_opts_create(qemu_find_opts("device"), "debugcon", 1);
if (!opts) {
fprintf(stderr, "qemu: already have a debugcon device\n");
... | true | qemu | 8be7e7e4c72c048b90e3482557954a24bba43ba7 | static int debugcon_parse(const char *devname)
{
QemuOpts *opts;
if (!qemu_chr_new("debugcon", devname, NULL)) {
exit(1);
}
opts = qemu_opts_create(qemu_find_opts("device"), "debugcon", 1);
if (!opts) {
fprintf(stderr, "qemu: already have a debugcon device\n");
... | {
"code": [
" opts = qemu_opts_create(qemu_find_opts(\"device\"), \"debugcon\", 1);"
],
"line_no": [
15
]
} | static int FUNC_0(const char *VAR_0)
{
QemuOpts *opts;
if (!qemu_chr_new("debugcon", VAR_0, NULL)) {
exit(1);
}
opts = qemu_opts_create(qemu_find_opts("device"), "debugcon", 1);
if (!opts) {
fprintf(stderr, "qemu: already have a debugcon device\n");
exit(1);
... | [
"static int FUNC_0(const char *VAR_0)\n{",
"QemuOpts *opts;",
"if (!qemu_chr_new(\"debugcon\", VAR_0, NULL)) {",
"exit(1);",
"}",
"opts = qemu_opts_create(qemu_find_opts(\"device\"), \"debugcon\", 1);",
"if (!opts) {",
"fprintf(stderr, \"qemu: already have a debugcon device\\n\");",
"exit(1);",
"}... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
12,268 | static CCIDBus *ccid_bus_new(DeviceState *dev)
{
CCIDBus *bus;
bus = FROM_QBUS(CCIDBus, qbus_create(&ccid_bus_info, dev, NULL));
bus->qbus.allow_hotplug = 1;
return bus;
}
| true | qemu | e13e973eedba0a52b4b8b079c4b85cdc68b7b4f0 | static CCIDBus *ccid_bus_new(DeviceState *dev)
{
CCIDBus *bus;
bus = FROM_QBUS(CCIDBus, qbus_create(&ccid_bus_info, dev, NULL));
bus->qbus.allow_hotplug = 1;
return bus;
}
| {
"code": [
" CCIDBus *bus;",
"static CCIDBus *ccid_bus_new(DeviceState *dev)",
" CCIDBus *bus;",
" bus = FROM_QBUS(CCIDBus, qbus_create(&ccid_bus_info, dev, NULL));",
" bus->qbus.allow_hotplug = 1;",
" return bus;"
],
"line_no": [
5,
1,
5,
9,
11,
15
... | static CCIDBus *FUNC_0(DeviceState *dev)
{
CCIDBus *bus;
bus = FROM_QBUS(CCIDBus, qbus_create(&ccid_bus_info, dev, NULL));
bus->qbus.allow_hotplug = 1;
return bus;
}
| [
"static CCIDBus *FUNC_0(DeviceState *dev)\n{",
"CCIDBus *bus;",
"bus = FROM_QBUS(CCIDBus, qbus_create(&ccid_bus_info, dev, NULL));",
"bus->qbus.allow_hotplug = 1;",
"return bus;",
"}"
] | [
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
17
]
] |
12,269 | bool bitmap_test_and_clear_atomic(unsigned long *map, long start, long nr)
{
unsigned long *p = map + BIT_WORD(start);
const long size = start + nr;
int bits_to_clear = BITS_PER_LONG - (start % BITS_PER_LONG);
unsigned long mask_to_clear = BITMAP_FIRST_WORD_MASK(start);
unsigned long dirty = 0;
... | true | qemu | e12ed72e5c00dd3375b8bd107200e4d7e950276a | bool bitmap_test_and_clear_atomic(unsigned long *map, long start, long nr)
{
unsigned long *p = map + BIT_WORD(start);
const long size = start + nr;
int bits_to_clear = BITS_PER_LONG - (start % BITS_PER_LONG);
unsigned long mask_to_clear = BITMAP_FIRST_WORD_MASK(start);
unsigned long dirty = 0;
... | {
"code": [],
"line_no": []
} | bool FUNC_0(unsigned long *map, long start, long nr)
{
unsigned long *VAR_0 = map + BIT_WORD(start);
const long VAR_1 = start + nr;
int VAR_2 = BITS_PER_LONG - (start % BITS_PER_LONG);
unsigned long VAR_3 = BITMAP_FIRST_WORD_MASK(start);
unsigned long VAR_4 = 0;
unsigned long VAR_5;
if ... | [
"bool FUNC_0(unsigned long *map, long start, long nr)\n{",
"unsigned long *VAR_0 = map + BIT_WORD(start);",
"const long VAR_1 = start + nr;",
"int VAR_2 = BITS_PER_LONG - (start % BITS_PER_LONG);",
"unsigned long VAR_3 = BITMAP_FIRST_WORD_MASK(start);",
"unsigned long VAR_4 = 0;",
"unsigned long VAR_5;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
19
],
[
20
],
[
21
],
[
22
],
[
23
]... |
12,270 | int ff_dca_lbr_parse(DCALbrDecoder *s, uint8_t *data, DCAExssAsset *asset)
{
struct {
LBRChunk lfe;
LBRChunk tonal;
LBRChunk tonal_grp[5];
LBRChunk grid1[DCA_LBR_CHANNELS / 2];
LBRChunk hr_grid[DCA_LBR_CHANNELS / 2];
LBRChunk ts1[DCA_LBR_CHAN... | true | FFmpeg | bf29794022db597f526a8575648244a7c6ee15ed | int ff_dca_lbr_parse(DCALbrDecoder *s, uint8_t *data, DCAExssAsset *asset)
{
struct {
LBRChunk lfe;
LBRChunk tonal;
LBRChunk tonal_grp[5];
LBRChunk grid1[DCA_LBR_CHANNELS / 2];
LBRChunk hr_grid[DCA_LBR_CHANNELS / 2];
LBRChunk ts1[DCA_LBR_CHAN... | {
"code": [
" } chunk = { 0 };"
],
"line_no": [
21
]
} | int FUNC_0(DCALbrDecoder *VAR_0, uint8_t *VAR_1, DCAExssAsset *VAR_2)
{
struct {
LBRChunk lfe;
LBRChunk tonal;
LBRChunk tonal_grp[5];
LBRChunk grid1[DCA_LBR_CHANNELS / 2];
LBRChunk hr_grid[DCA_LBR_CHANNELS / 2];
LBRChunk ts1[DCA_LBR_CHANNELS ... | [
"int FUNC_0(DCALbrDecoder *VAR_0, uint8_t *VAR_1, DCAExssAsset *VAR_2)\n{",
"struct {",
"LBRChunk lfe;",
"LBRChunk tonal;",
"LBRChunk tonal_grp[5];",
"LBRChunk grid1[DCA_LBR_CHANNELS / 2];",
"LBRChunk hr_grid[DCA_LBR_CHANNELS / 2];",
"LBRChunk ts1[DCA_LBR_CHANNELS / 2];",
"LBRChunk... | [
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
33
],
[
39
],
[
41
],
[
43
],
[
45
],
[
51
],
[
53,
55
],
[... |
12,271 | static int blk_mig_save_bulked_block(Monitor *mon, QEMUFile *f)
{
int64_t completed_sector_sum = 0;
BlkMigDevState *bmds;
int progress;
int ret = 0;
QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {
if (bmds->bulk_completed == 0) {
if (mig_save_device_bulk(mon... | true | qemu | 8b6b2afcf85dd5ff33075e93a2e30fbea34c5a55 | static int blk_mig_save_bulked_block(Monitor *mon, QEMUFile *f)
{
int64_t completed_sector_sum = 0;
BlkMigDevState *bmds;
int progress;
int ret = 0;
QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {
if (bmds->bulk_completed == 0) {
if (mig_save_device_bulk(mon... | {
"code": [
" progress = completed_sector_sum * 100 / block_mig_state.total_sector_sum;"
],
"line_no": [
43
]
} | static int FUNC_0(Monitor *VAR_0, QEMUFile *VAR_1)
{
int64_t completed_sector_sum = 0;
BlkMigDevState *bmds;
int VAR_2;
int VAR_3 = 0;
QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {
if (bmds->bulk_completed == 0) {
if (mig_save_device_bulk(VAR_0, VAR_1, bmd... | [
"static int FUNC_0(Monitor *VAR_0, QEMUFile *VAR_1)\n{",
"int64_t completed_sector_sum = 0;",
"BlkMigDevState *bmds;",
"int VAR_2;",
"int VAR_3 = 0;",
"QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {",
"if (bmds->bulk_completed == 0) {",
"if (mig_save_device_bulk(VAR_0, VAR_1, bmds) == 1) ... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
... |
12,272 | int net_init_tap(const NetClientOptions *opts, const char *name,
NetClientState *peer)
{
const NetdevTapOptions *tap;
int fd, vnet_hdr = 0, i = 0, queues;
/* for the no-fd, no-helper case */
const char *script = NULL; /* suppress wrong "uninit'd use" gcc warning */
const char *downs... | true | qemu | ce675a7579fea498397c5d2da3c5367671e9f02a | int net_init_tap(const NetClientOptions *opts, const char *name,
NetClientState *peer)
{
const NetdevTapOptions *tap;
int fd, vnet_hdr = 0, i = 0, queues;
const char *script = NULL;
const char *downscript = NULL;
const char *vhostfdname;
char ifname[128];
assert(opts->... | {
"code": [],
"line_no": []
} | int FUNC_0(const NetClientOptions *VAR_0, const char *VAR_1,
NetClientState *VAR_2)
{
const NetdevTapOptions *VAR_3;
int VAR_4, VAR_5 = 0, VAR_6 = 0, VAR_7;
const char *VAR_8 = NULL;
const char *VAR_9 = NULL;
const char *VAR_10;
char VAR_11[128];
assert(VAR_0->kind == ... | [
"int FUNC_0(const NetClientOptions *VAR_0, const char *VAR_1,\nNetClientState *VAR_2)\n{",
"const NetdevTapOptions *VAR_3;",
"int VAR_4, VAR_5 = 0, VAR_6 = 0, VAR_7;",
"const char *VAR_8 = NULL;",
"const char *VAR_9 = NULL;",
"const char *VAR_10;",
"char VAR_11[128];",
"assert(VAR_0->kind == NET_CLIEN... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16,
17,
18
],
[
19,
20
],
[
21
],
[
22
],
[
23
],
[
24
]... |
12,274 | static int get_qcc(Jpeg2000DecoderContext *s, int n, Jpeg2000QuantStyle *q,
uint8_t *properties)
{
int compno;
if (bytestream2_get_bytes_left(&s->g) < 1)
return AVERROR_INVALIDDATA;
compno = bytestream2_get_byteu(&s->g);
properties[compno] |= HAD_QCC;
... | true | FFmpeg | eae63e3c156f784ee0612422f0c95131ea913c14 | static int get_qcc(Jpeg2000DecoderContext *s, int n, Jpeg2000QuantStyle *q,
uint8_t *properties)
{
int compno;
if (bytestream2_get_bytes_left(&s->g) < 1)
return AVERROR_INVALIDDATA;
compno = bytestream2_get_byteu(&s->g);
properties[compno] |= HAD_QCC;
... | {
"code": [
" compno = bytestream2_get_byteu(&s->g);"
],
"line_no": [
17
]
} | static int FUNC_0(Jpeg2000DecoderContext *VAR_0, int VAR_1, Jpeg2000QuantStyle *VAR_2,
uint8_t *VAR_3)
{
int VAR_4;
if (bytestream2_get_bytes_left(&VAR_0->g) < 1)
return AVERROR_INVALIDDATA;
VAR_4 = bytestream2_get_byteu(&VAR_0->g);
VAR_3[VAR_4] |= HAD_... | [
"static int FUNC_0(Jpeg2000DecoderContext *VAR_0, int VAR_1, Jpeg2000QuantStyle *VAR_2,\nuint8_t *VAR_3)\n{",
"int VAR_4;",
"if (bytestream2_get_bytes_left(&VAR_0->g) < 1)\nreturn AVERROR_INVALIDDATA;",
"VAR_4 = bytestream2_get_byteu(&VAR_0->g);",
"VAR_3[VAR_4] |= HAD_QCC;",
"return get_qcx(V... | [
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
12,275 | static void vfio_pci_load_rom(VFIODevice *vdev)
{
struct vfio_region_info reg_info = {
.argsz = sizeof(reg_info),
.index = VFIO_PCI_ROM_REGION_INDEX
};
uint64_t size;
off_t off = 0;
size_t bytes;
if (ioctl(vdev->fd, VFIO_DEVICE_GET_REGION_INFO, ®_info)) {
e... | true | qemu | e638073c569e801ce9def2016a84f955cbbca779 | static void vfio_pci_load_rom(VFIODevice *vdev)
{
struct vfio_region_info reg_info = {
.argsz = sizeof(reg_info),
.index = VFIO_PCI_ROM_REGION_INDEX
};
uint64_t size;
off_t off = 0;
size_t bytes;
if (ioctl(vdev->fd, VFIO_DEVICE_GET_REGION_INFO, ®_info)) {
e... | {
"code": [],
"line_no": []
} | static void FUNC_0(VFIODevice *VAR_0)
{
struct vfio_region_info VAR_1 = {
.argsz = sizeof(VAR_1),
.index = VFIO_PCI_ROM_REGION_INDEX
};
uint64_t size;
off_t off = 0;
size_t bytes;
if (ioctl(VAR_0->fd, VFIO_DEVICE_GET_REGION_INFO, &VAR_1)) {
error_report("vfio:... | [
"static void FUNC_0(VFIODevice *VAR_0)\n{",
"struct vfio_region_info VAR_1 = {",
".argsz = sizeof(VAR_1),\n.index = VFIO_PCI_ROM_REGION_INDEX\n};",
"uint64_t size;",
"off_t off = 0;",
"size_t bytes;",
"if (ioctl(VAR_0->fd, VFIO_DEVICE_GET_REGION_INFO, &VAR_1)) {",
"error_report(\"vfio: Error getting R... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
31,
33
],
[
35,
37,
39
],
[
43
],
[
45
],
[
49
],
[
52,
54,
56,
58
... |
12,276 | static void tcg_out_op (TCGContext *s, TCGOpcode opc, const TCGArg *args,
const int *const_args)
{
int c;
switch (opc) {
case INDEX_op_exit_tb:
tcg_out_movi (s, TCG_TYPE_I64, TCG_REG_R3, args[0]);
tcg_out_b (s, 0, (tcg_target_long) tb_ret_addr);
brea... | true | qemu | e89720b116131938fe3d4931302f69a28249c934 | static void tcg_out_op (TCGContext *s, TCGOpcode opc, const TCGArg *args,
const int *const_args)
{
int c;
switch (opc) {
case INDEX_op_exit_tb:
tcg_out_movi (s, TCG_TYPE_I64, TCG_REG_R3, args[0]);
tcg_out_b (s, 0, (tcg_target_long) tb_ret_addr);
brea... | {
"code": [
" tcg_out_rld (s, RLDICR, args[0], args[1], 0, 32);"
],
"line_no": [
725
]
} | static void FUNC_0 (TCGContext *VAR_0, TCGOpcode VAR_1, const TCGArg *VAR_2,
const int *VAR_3)
{
int VAR_4;
switch (VAR_1) {
case INDEX_op_exit_tb:
tcg_out_movi (VAR_0, TCG_TYPE_I64, TCG_REG_R3, VAR_2[0]);
tcg_out_b (VAR_0, 0, (tcg_target_long) tb_ret_addr);
... | [
"static void FUNC_0 (TCGContext *VAR_0, TCGOpcode VAR_1, const TCGArg *VAR_2,\nconst int *VAR_3)\n{",
"int VAR_4;",
"switch (VAR_1) {",
"case INDEX_op_exit_tb:\ntcg_out_movi (VAR_0, TCG_TYPE_I64, TCG_REG_R3, VAR_2[0]);",
"tcg_out_b (VAR_0, 0, (tcg_target_long) tb_ret_addr);",
"break;",
"case INDEX_op_go... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
53... |
12,277 | static int fdctrl_init_common(FDCtrl *fdctrl)
{
int i, j;
static int command_tables_inited = 0;
/* Fill 'command_to_handler' lookup table */
if (!command_tables_inited) {
command_tables_inited = 1;
for (i = ARRAY_SIZE(handlers) - 1; i >= 0; i--) {
for (j = 0; j < si... | true | qemu | b47b35250fbfa062aedf6ab6e5faab84c4a76f4f | static int fdctrl_init_common(FDCtrl *fdctrl)
{
int i, j;
static int command_tables_inited = 0;
if (!command_tables_inited) {
command_tables_inited = 1;
for (i = ARRAY_SIZE(handlers) - 1; i >= 0; i--) {
for (j = 0; j < sizeof(command_to_handler); j++) {
... | {
"code": [
" fdctrl_connect_drives(fdctrl);",
" return 0;"
],
"line_no": [
59,
63
]
} | static int FUNC_0(FDCtrl *VAR_0)
{
int VAR_1, VAR_2;
static int VAR_3 = 0;
if (!VAR_3) {
VAR_3 = 1;
for (VAR_1 = ARRAY_SIZE(handlers) - 1; VAR_1 >= 0; VAR_1--) {
for (VAR_2 = 0; VAR_2 < sizeof(command_to_handler); VAR_2++) {
if ((VAR_2 & handlers[V... | [
"static int FUNC_0(FDCtrl *VAR_0)\n{",
"int VAR_1, VAR_2;",
"static int VAR_3 = 0;",
"if (!VAR_3) {",
"VAR_3 = 1;",
"for (VAR_1 = ARRAY_SIZE(handlers) - 1; VAR_1 >= 0; VAR_1--) {",
"for (VAR_2 = 0; VAR_2 < sizeof(command_to_handler); VAR_2++) {",
"if ((VAR_2 & handlers[VAR_1].mask) == handlers[VAR_1].... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
47
],
[
49
],
... |
12,279 | static int32_t scsi_send_command(SCSIRequest *req, uint8_t *cmd)
{
SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, req->dev);
SCSIGenericReq *r = DO_UPCAST(SCSIGenericReq, req, req);
int ret;
scsi_req_enqueue(req);
if (cmd[0] != REQUEST_SENSE &&
(req->lun != s->lun || (cmd[1... | true | qemu | a1f0cce2ac0243572ff72aa561da67fe3766a395 | static int32_t scsi_send_command(SCSIRequest *req, uint8_t *cmd)
{
SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, req->dev);
SCSIGenericReq *r = DO_UPCAST(SCSIGenericReq, req, req);
int ret;
scsi_req_enqueue(req);
if (cmd[0] != REQUEST_SENSE &&
(req->lun != s->lun || (cmd[1... | {
"code": [
" s->sensebuf[0] = 0x70;",
" s->sensebuf[1] = 0x00;",
" s->sensebuf[2] = ILLEGAL_REQUEST;",
" s->sensebuf[3] = 0x00;",
" s->sensebuf[4] = 0x00;",
" s->sensebuf[5] = 0x00;",
" s->sensebuf[6] = 0x00;",
" s->senselen = 7;... | static int32_t FUNC_0(SCSIRequest *req, uint8_t *cmd)
{
SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, req->dev);
SCSIGenericReq *r = DO_UPCAST(SCSIGenericReq, req, req);
int VAR_0;
scsi_req_enqueue(req);
if (cmd[0] != REQUEST_SENSE &&
(req->lun != s->lun || (cmd[1] >> 5) !... | [
"static int32_t FUNC_0(SCSIRequest *req, uint8_t *cmd)\n{",
"SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, req->dev);",
"SCSIGenericReq *r = DO_UPCAST(SCSIGenericReq, req, req);",
"int VAR_0;",
"scsi_req_enqueue(req);",
"if (cmd[0] != REQUEST_SENSE &&\n(req->lun != s->lun || (cmd[1] >> 5) != s->... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
1,
1,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
12,280 | static void vfio_probe_ati_bar2_quirk(VFIOPCIDevice *vdev, int nr)
{
VFIOQuirk *quirk;
VFIOConfigMirrorQuirk *mirror;
/* Only enable on newer devices where BAR2 is 64bit */
if (!vfio_pci_is(vdev, PCI_VENDOR_ID_ATI, PCI_ANY_ID) ||
!vdev->has_vga || nr != 2 || !vdev->bars[2].mem64) {
... | true | qemu | bdd81addf4033ce26e6cd180b060f63095f3ded9 | static void vfio_probe_ati_bar2_quirk(VFIOPCIDevice *vdev, int nr)
{
VFIOQuirk *quirk;
VFIOConfigMirrorQuirk *mirror;
if (!vfio_pci_is(vdev, PCI_VENDOR_ID_ATI, PCI_ANY_ID) ||
!vdev->has_vga || nr != 2 || !vdev->bars[2].mem64) {
return;
}
quirk = g_malloc0(sizeof(*qu... | {
"code": [
" mirror->mem = quirk->mem = g_malloc0(sizeof(MemoryRegion));",
" mirror->mem = quirk->mem = g_malloc0(sizeof(MemoryRegion));"
],
"line_no": [
27,
27
]
} | static void FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1)
{
VFIOQuirk *quirk;
VFIOConfigMirrorQuirk *mirror;
if (!vfio_pci_is(VAR_0, PCI_VENDOR_ID_ATI, PCI_ANY_ID) ||
!VAR_0->has_vga || VAR_1 != 2 || !VAR_0->bars[2].mem64) {
return;
}
quirk = g_malloc0(sizeof(*quirk));
... | [
"static void FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1)\n{",
"VFIOQuirk *quirk;",
"VFIOConfigMirrorQuirk *mirror;",
"if (!vfio_pci_is(VAR_0, PCI_VENDOR_ID_ATI, PCI_ANY_ID) ||\n!VAR_0->has_vga || VAR_1 != 2 || !VAR_0->bars[2].mem64) {",
"return;",
"}",
"quirk = g_malloc0(sizeof(*quirk));",
"mirror = quirk... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13,
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39,
41,
43
],
[
45,
47
],
[
51
],
[
55
],
[
57... |
12,282 | static int copy_packet_data(AVPacket *pkt, const AVPacket *src, int dup)
{
pkt->data = NULL;
pkt->side_data = NULL;
if (pkt->buf) {
AVBufferRef *ref = av_buffer_ref(src->buf);
if (!ref)
return AVERROR(ENOMEM);
pkt->buf = ref;
pkt->data = ref->data;
... | true | FFmpeg | 5e1bf9d8c0d2cdbbf17b06a5dfdf87a635b3203b | static int copy_packet_data(AVPacket *pkt, const AVPacket *src, int dup)
{
pkt->data = NULL;
pkt->side_data = NULL;
if (pkt->buf) {
AVBufferRef *ref = av_buffer_ref(src->buf);
if (!ref)
return AVERROR(ENOMEM);
pkt->buf = ref;
pkt->data = ref->data;
... | {
"code": [
" if (pkt->side_data_elems && dup)",
" if (pkt->side_data_elems && !dup) {"
],
"line_no": [
27,
31
]
} | static int FUNC_0(AVPacket *VAR_0, const AVPacket *VAR_1, int VAR_2)
{
VAR_0->data = NULL;
VAR_0->side_data = NULL;
if (VAR_0->buf) {
AVBufferRef *ref = av_buffer_ref(VAR_1->buf);
if (!ref)
return AVERROR(ENOMEM);
VAR_0->buf = ref;
VAR_0->data = ref... | [
"static int FUNC_0(AVPacket *VAR_0, const AVPacket *VAR_1, int VAR_2)\n{",
"VAR_0->data = NULL;",
"VAR_0->side_data = NULL;",
"if (VAR_0->buf) {",
"AVBufferRef *ref = av_buffer_ref(VAR_1->buf);",
"if (!ref)\nreturn AVERROR(ENOMEM);",
"VAR_0->buf = ref;",
"VAR_0->data = ref->data;",
"} else {",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
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
],
[
41,
43
],
[
45
],
[... |
12,283 | static void ffm_seek1(AVFormatContext *s, int64_t pos1)
{
FFMContext *ffm = s->priv_data;
AVIOContext *pb = s->pb;
int64_t pos;
pos = FFMIN(pos1, ffm->file_size - FFM_PACKET_SIZE);
pos = FFMAX(pos, FFM_PACKET_SIZE);
av_dlog(s, "seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos);
avio_se... | true | FFmpeg | 928cfc7e4f42aa283bb1bd9a50f0b3caa5a0f7a5 | static void ffm_seek1(AVFormatContext *s, int64_t pos1)
{
FFMContext *ffm = s->priv_data;
AVIOContext *pb = s->pb;
int64_t pos;
pos = FFMIN(pos1, ffm->file_size - FFM_PACKET_SIZE);
pos = FFMAX(pos, FFM_PACKET_SIZE);
av_dlog(s, "seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos);
avio_se... | {
"code": [
"static void ffm_seek1(AVFormatContext *s, int64_t pos1)",
" avio_seek(pb, pos, SEEK_SET);"
],
"line_no": [
1,
19
]
} | static void FUNC_0(AVFormatContext *VAR_0, int64_t VAR_1)
{
FFMContext *ffm = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
int64_t pos;
pos = FFMIN(VAR_1, ffm->file_size - FFM_PACKET_SIZE);
pos = FFMAX(pos, FFM_PACKET_SIZE);
av_dlog(VAR_0, "seek to %"PRIx64" -> %"PRIx64"\n", VAR_1, po... | [
"static void FUNC_0(AVFormatContext *VAR_0, int64_t VAR_1)\n{",
"FFMContext *ffm = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"int64_t pos;",
"pos = FFMIN(VAR_1, ffm->file_size - FFM_PACKET_SIZE);",
"pos = FFMAX(pos, FFM_PACKET_SIZE);",
"av_dlog(VAR_0, \"seek to %\"PRIx64\" -> %\"PRIx64\"\\n\",... | [
1,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
12,284 | int ff_h264_decode_ref_pic_list_reordering(H264Context *h, H264SliceContext *sl)
{
int list, index, pic_structure;
print_short_term(h);
print_long_term(h);
h264_initialise_ref_list(h, sl);
for (list = 0; list < sl->list_count; list++) {
if (get_bits1(&sl->gb)) { // ref_pic_li... | true | FFmpeg | b92b4775a0d07cacfdd2b4be6511f3cb362c977b | int ff_h264_decode_ref_pic_list_reordering(H264Context *h, H264SliceContext *sl)
{
int list, index, pic_structure;
print_short_term(h);
print_long_term(h);
h264_initialise_ref_list(h, sl);
for (list = 0; list < sl->list_count; list++) {
if (get_bits1(&sl->gb)) {
... | {
"code": [
" if (long_idx > 31) {"
],
"line_no": [
131
]
} | int FUNC_0(H264Context *VAR_0, H264SliceContext *VAR_1)
{
int VAR_2, VAR_3, VAR_4;
print_short_term(VAR_0);
print_long_term(VAR_0);
h264_initialise_ref_list(VAR_0, VAR_1);
for (VAR_2 = 0; VAR_2 < VAR_1->list_count; VAR_2++) {
if (get_bits1(&VAR_1->gb)) {
int pre... | [
"int FUNC_0(H264Context *VAR_0, H264SliceContext *VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4;",
"print_short_term(VAR_0);",
"print_long_term(VAR_0);",
"h264_initialise_ref_list(VAR_0, VAR_1);",
"for (VAR_2 = 0; VAR_2 < VAR_1->list_count; VAR_2++) {",
"if (get_bits1(&VAR_1->gb)) {",
"int pred = VAR_0->curr_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,
1,
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
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39,
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
... |
12,285 | static inline void dxt5_block_internal(uint8_t *dst, ptrdiff_t stride,
const uint8_t *block)
{
int x, y;
uint32_t colors[4];
uint8_t alpha_indices[16];
uint16_t color0 = AV_RL16(block + 8);
uint16_t color1 = AV_RL16(block + 10);
uint32_t code = AV... | true | FFmpeg | 2bd8eb05d21b582d627a93852b59cb3cfc305dae | static inline void dxt5_block_internal(uint8_t *dst, ptrdiff_t stride,
const uint8_t *block)
{
int x, y;
uint32_t colors[4];
uint8_t alpha_indices[16];
uint16_t color0 = AV_RL16(block + 8);
uint16_t color1 = AV_RL16(block + 10);
uint32_t code = AV... | {
"code": [
" pixel = colors[code & 3] | (alpha << 24);"
],
"line_no": [
83
]
} | static inline void FUNC_0(uint8_t *VAR_0, ptrdiff_t VAR_1,
const uint8_t *VAR_2)
{
int VAR_3, VAR_4;
uint32_t colors[4];
uint8_t alpha_indices[16];
uint16_t color0 = AV_RL16(VAR_2 + 8);
uint16_t color1 = AV_RL16(VAR_2 + 10);
uint32_t code = AV_RL3... | [
"static inline void FUNC_0(uint8_t *VAR_0, ptrdiff_t VAR_1,\nconst uint8_t *VAR_2)\n{",
"int VAR_3, VAR_4;",
"uint32_t colors[4];",
"uint8_t alpha_indices[16];",
"uint16_t color0 = AV_RL16(VAR_2 + 8);",
"uint16_t color1 = AV_RL16(VAR_2 + 10);",
"uint32_t code = AV_RL32(VAR_2 + 12);",
"uint8_t alpha0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[... |
12,286 | void OPPROTO op_POWER_sre (void)
{
T1 &= 0x1FUL;
env->spr[SPR_MQ] = rotl32(T0, 32 - T1);
T0 = Ts0 >> T1;
RETURN();
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | void OPPROTO op_POWER_sre (void)
{
T1 &= 0x1FUL;
env->spr[SPR_MQ] = rotl32(T0, 32 - 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_sre (void)
{
T1 &= 0x1FUL;
env->spr[SPR_MQ] = rotl32(T0, 32 - T1);
T0 = Ts0 >> T1;
RETURN();
}
| [
"void VAR_0 op_POWER_sre (void)\n{",
"T1 &= 0x1FUL;",
"env->spr[SPR_MQ] = rotl32(T0, 32 - T1);",
"T0 = Ts0 >> T1;",
"RETURN();",
"}"
] | [
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
12,287 | static int h263_decode_block(MpegEncContext * s, int16_t * block,
int n, int coded)
{
int level, i, j, run;
RLTable *rl = &ff_h263_rl_inter;
const uint8_t *scan_table;
GetBitContext gb= s->gb;
scan_table = s->intra_scantable.permutated;
if (s->h263_aic && s... | true | FFmpeg | 631f7484918a9e7260377c3cea878be708609e64 | static int h263_decode_block(MpegEncContext * s, int16_t * block,
int n, int coded)
{
int level, i, j, run;
RLTable *rl = &ff_h263_rl_inter;
const uint8_t *scan_table;
GetBitContext gb= s->gb;
scan_table = s->intra_scantable.permutated;
if (s->h263_aic && s... | {
"code": [
" level |= SHOW_SBITS(re, &s->gb, 6)<<5;"
],
"line_no": [
207
]
} | static int FUNC_0(MpegEncContext * VAR_0, int16_t * VAR_1,
int VAR_2, int VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7;
RLTable *rl = &ff_h263_rl_inter;
const uint8_t *VAR_8;
GetBitContext gb= VAR_0->gb;
VAR_8 = VAR_0->intra_scantable.permutated;
if (VAR_0->h263... | [
"static int FUNC_0(MpegEncContext * VAR_0, int16_t * VAR_1,\nint VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7;",
"RLTable *rl = &ff_h263_rl_inter;",
"const uint8_t *VAR_8;",
"GetBitContext gb= VAR_0->gb;",
"VAR_8 = VAR_0->intra_scantable.permutated;",
"if (VAR_0->h263_aic && VAR_0->mb_intra) {... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
29
],
[
31,
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
12,288 | void bdrv_op_block(BlockDriverState *bs, BlockOpType op, Error *reason)
{
BdrvOpBlocker *blocker;
assert((int) op >= 0 && op < BLOCK_OP_TYPE_MAX);
blocker = g_malloc0(sizeof(BdrvOpBlocker));
blocker->reason = reason;
QLIST_INSERT_HEAD(&bs->op_blockers[op], blocker, list);
}
| true | qemu | 5839e53bbc0fec56021d758aab7610df421ed8c8 | void bdrv_op_block(BlockDriverState *bs, BlockOpType op, Error *reason)
{
BdrvOpBlocker *blocker;
assert((int) op >= 0 && op < BLOCK_OP_TYPE_MAX);
blocker = g_malloc0(sizeof(BdrvOpBlocker));
blocker->reason = reason;
QLIST_INSERT_HEAD(&bs->op_blockers[op], blocker, list);
}
| {
"code": [
" blocker = g_malloc0(sizeof(BdrvOpBlocker));"
],
"line_no": [
11
]
} | void FUNC_0(BlockDriverState *VAR_0, BlockOpType VAR_1, Error *VAR_2)
{
BdrvOpBlocker *blocker;
assert((int) VAR_1 >= 0 && VAR_1 < BLOCK_OP_TYPE_MAX);
blocker = g_malloc0(sizeof(BdrvOpBlocker));
blocker->VAR_2 = VAR_2;
QLIST_INSERT_HEAD(&VAR_0->op_blockers[VAR_1], blocker, list);
}
| [
"void FUNC_0(BlockDriverState *VAR_0, BlockOpType VAR_1, Error *VAR_2)\n{",
"BdrvOpBlocker *blocker;",
"assert((int) VAR_1 >= 0 && VAR_1 < BLOCK_OP_TYPE_MAX);",
"blocker = g_malloc0(sizeof(BdrvOpBlocker));",
"blocker->VAR_2 = VAR_2;",
"QLIST_INSERT_HEAD(&VAR_0->op_blockers[VAR_1], blocker, list);",
"}"
... | [
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
12,289 | TraceEvent *trace_event_iter_next(TraceEventIter *iter)
{
while (iter->event < TRACE_EVENT_COUNT) {
TraceEvent *ev = &(trace_events[iter->event]);
iter->event++;
if (!iter->pattern ||
pattern_glob(iter->pattern,
trace_event_get_name(ev))) {
... | true | qemu | 79218be42b835cbc7bd1b0fbd07d115add6e7605 | TraceEvent *trace_event_iter_next(TraceEventIter *iter)
{
while (iter->event < TRACE_EVENT_COUNT) {
TraceEvent *ev = &(trace_events[iter->event]);
iter->event++;
if (!iter->pattern ||
pattern_glob(iter->pattern,
trace_event_get_name(ev))) {
... | {
"code": [
" TraceEvent *ev = &(trace_events[iter->event]);"
],
"line_no": [
7
]
} | TraceEvent *FUNC_0(TraceEventIter *iter)
{
while (iter->event < TRACE_EVENT_COUNT) {
TraceEvent *ev = &(trace_events[iter->event]);
iter->event++;
if (!iter->pattern ||
pattern_glob(iter->pattern,
trace_event_get_name(ev))) {
return ev... | [
"TraceEvent *FUNC_0(TraceEventIter *iter)\n{",
"while (iter->event < TRACE_EVENT_COUNT) {",
"TraceEvent *ev = &(trace_events[iter->event]);",
"iter->event++;",
"if (!iter->pattern ||\npattern_glob(iter->pattern,\ntrace_event_get_name(ev))) {",
"return ev;",
"}",
"}",
"return NULL;",
"}"
] | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13,
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
]
] |
12,290 | static av_cold int ape_decode_init(AVCodecContext *avctx)
{
APEContext *s = avctx->priv_data;
int i;
if (avctx->extradata_size != 6) {
av_log(avctx, AV_LOG_ERROR, "Incorrect extradata\n");
return AVERROR(EINVAL);
}
if (avctx->channels > 2) {
av_log(avctx, AV_LOG_ER... | true | FFmpeg | 8db2935db0caa8efbef009994920ef6a20289496 | static av_cold int ape_decode_init(AVCodecContext *avctx)
{
APEContext *s = avctx->priv_data;
int i;
if (avctx->extradata_size != 6) {
av_log(avctx, AV_LOG_ERROR, "Incorrect extradata\n");
return AVERROR(EINVAL);
}
if (avctx->channels > 2) {
av_log(avctx, AV_LOG_ER... | {
"code": [
" if (s->compression_level % 1000 || s->compression_level > COMPRESSION_LEVEL_INSANE) {"
],
"line_no": [
75
]
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
APEContext *s = avctx->priv_data;
int VAR_0;
if (avctx->extradata_size != 6) {
av_log(avctx, AV_LOG_ERROR, "Incorrect extradata\n");
return AVERROR(EINVAL);
}
if (avctx->channels > 2) {
av_log(avctx, AV_LOG_ERROR, ... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"APEContext *s = avctx->priv_data;",
"int VAR_0;",
"if (avctx->extradata_size != 6) {",
"av_log(avctx, AV_LOG_ERROR, \"Incorrect extradata\\n\");",
"return AVERROR(EINVAL);",
"}",
"if (avctx->channels > 2) {",
"av_log(avctx, AV_LOG_ERROR, \"Only... | [
0,
0,
0,
0,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
... |
12,291 | static double lfo_get_value(SimpleLFO *lfo)
{
double phs = FFMIN(100, lfo->phase / FFMIN(1.99, FFMAX(0.01, lfo->pwidth)) + lfo->offset);
double val;
if (phs > 1)
phs = fmod(phs, 1.);
switch (lfo->mode) {
case SINE:
val = sin(phs * 2 * M_PI);
break;
case TRIA... | true | FFmpeg | 1693336aed3988e0c13ad1ff880257d80d6ae69d | static double lfo_get_value(SimpleLFO *lfo)
{
double phs = FFMIN(100, lfo->phase / FFMIN(1.99, FFMAX(0.01, lfo->pwidth)) + lfo->offset);
double val;
if (phs > 1)
phs = fmod(phs, 1.);
switch (lfo->mode) {
case SINE:
val = sin(phs * 2 * M_PI);
break;
case TRIA... | {
"code": [],
"line_no": []
} | static double FUNC_0(SimpleLFO *VAR_0)
{
double VAR_1 = FFMIN(100, VAR_0->phase / FFMIN(1.99, FFMAX(0.01, VAR_0->pwidth)) + VAR_0->offset);
double VAR_2;
if (VAR_1 > 1)
VAR_1 = fmod(VAR_1, 1.);
switch (VAR_0->mode) {
case SINE:
VAR_2 = sin(VAR_1 * 2 * M_PI);
brea... | [
"static double FUNC_0(SimpleLFO *VAR_0)\n{",
"double VAR_1 = FFMIN(100, VAR_0->phase / FFMIN(1.99, FFMAX(0.01, VAR_0->pwidth)) + VAR_0->offset);",
"double VAR_2;",
"if (VAR_1 > 1)\nVAR_1 = fmod(VAR_1, 1.);",
"switch (VAR_0->mode) {",
"case SINE:\nVAR_2 = sin(VAR_1 * 2 * M_PI);",
"break;",
"case TRIANG... | [
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
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27,
29
],
[
31,
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47,
49
],
[
51
],
[
53... |
12,292 | static int srt_get_duration(uint8_t **buf)
{
int i, duration = 0;
for (i=0; i<2 && !duration; i++) {
int s_hour, s_min, s_sec, s_hsec, e_hour, e_min, e_sec, e_hsec;
if (sscanf(*buf, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d",
&s_hour, &s_min, &s_sec, &s_hsec,
... | true | FFmpeg | 90fc00a623de44e137fe1601b91356e8cd8bdd54 | static int srt_get_duration(uint8_t **buf)
{
int i, duration = 0;
for (i=0; i<2 && !duration; i++) {
int s_hour, s_min, s_sec, s_hsec, e_hour, e_min, e_sec, e_hsec;
if (sscanf(*buf, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d",
&s_hour, &s_min, &s_sec, &s_hsec,
... | {
"code": [
" *buf += strcspn(*buf, \"\\n\") + 1;"
],
"line_no": [
29
]
} | static int FUNC_0(uint8_t **VAR_0)
{
int VAR_1, VAR_2 = 0;
for (VAR_1=0; VAR_1<2 && !VAR_2; VAR_1++) {
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;
if (sscanf(*VAR_0, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d",
&VAR_3, &VAR_4, &VAR_5, &VAR_6,
... | [
"static int FUNC_0(uint8_t **VAR_0)\n{",
"int VAR_1, VAR_2 = 0;",
"for (VAR_1=0; VAR_1<2 && !VAR_2; VAR_1++) {",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;",
"if (sscanf(*VAR_0, \"%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d\",\n&VAR_3, &VAR_4, &VAR_5, &VAR_6,\n&VAR_7, &VAR_8, &VAR_9, &V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13,
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
12,293 | static int vaapi_encode_mjpeg_init_picture_params(AVCodecContext *avctx,
VAAPIEncodePicture *pic)
{
VAAPIEncodeContext *ctx = avctx->priv_data;
VAEncPictureParameterBufferJPEG *vpic = pic->codec_picture_params;
VAAPIEncodeMJPEGContext ... | false | FFmpeg | c8241e730f116f1c9cfc0b34110aa7f052e05332 | static int vaapi_encode_mjpeg_init_picture_params(AVCodecContext *avctx,
VAAPIEncodePicture *pic)
{
VAAPIEncodeContext *ctx = avctx->priv_data;
VAEncPictureParameterBufferJPEG *vpic = pic->codec_picture_params;
VAAPIEncodeMJPEGContext ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
VAAPIEncodePicture *VAR_1)
{
VAAPIEncodeContext *ctx = VAR_0->priv_data;
VAEncPictureParameterBufferJPEG *vpic = VAR_1->codec_picture_params;
VAAPIEncodeMJPEGContext *priv = ctx->priv_data;
... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nVAAPIEncodePicture *VAR_1)\n{",
"VAAPIEncodeContext *ctx = VAR_0->priv_data;",
"VAEncPictureParameterBufferJPEG *vpic = VAR_1->codec_picture_params;",
"VAAPIEncodeMJPEGContext *priv = ctx->priv_data;",
"vpic->reconstructed_picture = VAR_1->rec... | [
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
49
],
[
51
],
[
53
],
[... |
12,294 | static int hdcd_scan(HDCDContext *ctx, hdcd_state_t *state, const int32_t *samples, int max, int stride)
{
int cdt_active = 0;
/* code detect timer */
int result;
if (state->sustain > 0) {
cdt_active = 1;
if (state->sustain <= max) {
state->control = 0;
m... | false | FFmpeg | d574e22659bd51cdf16723a204fef65a9e783f1d | static int hdcd_scan(HDCDContext *ctx, hdcd_state_t *state, const int32_t *samples, int max, int stride)
{
int cdt_active = 0;
int result;
if (state->sustain > 0) {
cdt_active = 1;
if (state->sustain <= max) {
state->control = 0;
max = state->sustain;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(HDCDContext *VAR_0, hdcd_state_t *VAR_1, const int32_t *VAR_2, int VAR_3, int VAR_4)
{
int VAR_5 = 0;
int VAR_6;
if (VAR_1->sustain > 0) {
VAR_5 = 1;
if (VAR_1->sustain <= VAR_3) {
VAR_1->control = 0;
VAR_3 = VAR_1->sustain;
}
... | [
"static int FUNC_0(HDCDContext *VAR_0, hdcd_state_t *VAR_1, const int32_t *VAR_2, int VAR_3, int VAR_4)\n{",
"int VAR_5 = 0;",
"int VAR_6;",
"if (VAR_1->sustain > 0) {",
"VAR_5 = 1;",
"if (VAR_1->sustain <= VAR_3) {",
"VAR_1->control = 0;",
"VAR_3 = VAR_1->sustain;",
"}",
"VAR_1->sustain -= VAR_3;... | [
0,
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
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45... |
12,295 | static int swf_write_audio(AVFormatContext *s,
AVCodecContext *enc, const uint8_t *buf, int size)
{
SWFContext *swf = s->priv_data;
int c = 0;
/* Flash Player limit */
if ( swf->swf_frame_number >= 16000 ) {
return 0;
}
if (enc->codec_id == CODEC_... | false | FFmpeg | d3e18ad02795f9761b7e5a5c018dfef786046acf | static int swf_write_audio(AVFormatContext *s,
AVCodecContext *enc, const uint8_t *buf, int size)
{
SWFContext *swf = s->priv_data;
int c = 0;
if ( swf->swf_frame_number >= 16000 ) {
return 0;
}
if (enc->codec_id == CODEC_ID_MP3 ) {
for ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
AVCodecContext *VAR_1, const uint8_t *VAR_2, int VAR_3)
{
SWFContext *swf = VAR_0->priv_data;
int VAR_4 = 0;
if ( swf->swf_frame_number >= 16000 ) {
return 0;
}
if (VAR_1->codec_id == CODEC_ID_MP3 ) {
... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nAVCodecContext *VAR_1, const uint8_t *VAR_2, int VAR_3)\n{",
"SWFContext *swf = VAR_0->priv_data;",
"int VAR_4 = 0;",
"if ( swf->swf_frame_number >= 16000 ) {",
"return 0;",
"}",
"if (VAR_1->codec_id == CODEC_ID_MP3 ) {",
"for (VAR_4=0; VAR_4<VAR_3; VAR_4++)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
]
] |
12,296 | static int64_t mp3_sync(AVFormatContext *s, int64_t target_pos, int flags)
{
int dir = (flags&AVSEEK_FLAG_BACKWARD) ? -1 : 1;
int64_t best_pos;
int best_score, i, j;
int64_t ret;
avio_seek(s->pb, FFMAX(target_pos - SEEK_WINDOW, 0), SEEK_SET);
ret = avio_seek(s->pb, target_pos, SEEK_SET)... | false | FFmpeg | de1b1a7da9e6ddf42447271e519099a88b389e4a | static int64_t mp3_sync(AVFormatContext *s, int64_t target_pos, int flags)
{
int dir = (flags&AVSEEK_FLAG_BACKWARD) ? -1 : 1;
int64_t best_pos;
int best_score, i, j;
int64_t ret;
avio_seek(s->pb, FFMAX(target_pos - SEEK_WINDOW, 0), SEEK_SET);
ret = avio_seek(s->pb, target_pos, SEEK_SET)... | {
"code": [],
"line_no": []
} | static int64_t FUNC_0(AVFormatContext *s, int64_t target_pos, int flags)
{
int VAR_0 = (flags&AVSEEK_FLAG_BACKWARD) ? -1 : 1;
int64_t best_pos;
int VAR_1, VAR_2, VAR_3;
int64_t ret;
avio_seek(s->pb, FFMAX(target_pos - SEEK_WINDOW, 0), SEEK_SET);
ret = avio_seek(s->pb, target_pos, SEEK_S... | [
"static int64_t FUNC_0(AVFormatContext *s, int64_t target_pos, int flags)\n{",
"int VAR_0 = (flags&AVSEEK_FLAG_BACKWARD) ? -1 : 1;",
"int64_t best_pos;",
"int VAR_1, VAR_2, VAR_3;",
"int64_t ret;",
"avio_seek(s->pb, FFMAX(target_pos - SEEK_WINDOW, 0), SEEK_SET);",
"ret = avio_seek(s->pb, target_pos, SEE... | [
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35
],
[
37
],
[
41,
43
],
[
47
],
[
49
],
[
51,
53
... |
12,297 | void test_segs(void)
{
struct modify_ldt_ldt_s ldt;
long long ldt_table[3];
int res, res2;
char tmp;
struct {
uint32_t offset;
uint16_t seg;
} __attribute__((packed)) segoff;
ldt.entry_number = 1;
ldt.base_addr = (unsigned long)&seg_data1;
ldt.limit = (s... | false | qemu | 541dc0d47f10973c241e9955afc2aefc96adec51 | void test_segs(void)
{
struct modify_ldt_ldt_s ldt;
long long ldt_table[3];
int res, res2;
char tmp;
struct {
uint32_t offset;
uint16_t seg;
} __attribute__((packed)) segoff;
ldt.entry_number = 1;
ldt.base_addr = (unsigned long)&seg_data1;
ldt.limit = (s... | {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
struct modify_ldt_ldt_s VAR_0;
long long VAR_1[3];
int VAR_2, VAR_3;
char VAR_4;
struct {
uint32_t offset;
uint16_t seg;
} __attribute__((packed)) VAR_5;
VAR_0.entry_number = 1;
VAR_0.base_addr = (unsigned long)&seg_data1;
VAR_0.limit... | [
"void FUNC_0(void)\n{",
"struct modify_ldt_ldt_s VAR_0;",
"long long VAR_1[3];",
"int VAR_2, VAR_3;",
"char VAR_4;",
"struct {",
"uint32_t offset;",
"uint16_t seg;",
"} __attribute__((packed)) VAR_5;",
"VAR_0.entry_number = 1;",
"VAR_0.base_addr = (unsigned long)&seg_data1;",
"VAR_0.limit = (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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
... |
12,299 | static void cpu_notify_map_clients(void)
{
MapClient *client;
while (!LIST_EMPTY(&map_client_list)) {
client = LIST_FIRST(&map_client_list);
client->callback(client->opaque);
cpu_unregister_map_client(client);
}
}
| false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | static void cpu_notify_map_clients(void)
{
MapClient *client;
while (!LIST_EMPTY(&map_client_list)) {
client = LIST_FIRST(&map_client_list);
client->callback(client->opaque);
cpu_unregister_map_client(client);
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
MapClient *client;
while (!LIST_EMPTY(&map_client_list)) {
client = LIST_FIRST(&map_client_list);
client->callback(client->opaque);
cpu_unregister_map_client(client);
}
}
| [
"static void FUNC_0(void)\n{",
"MapClient *client;",
"while (!LIST_EMPTY(&map_client_list)) {",
"client = LIST_FIRST(&map_client_list);",
"client->callback(client->opaque);",
"cpu_unregister_map_client(client);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
12,300 | vcard_free(VCard *vcard)
{
VCardApplet *current_applet = NULL;
VCardApplet *next_applet = NULL;
if (vcard == NULL) {
return;
}
vcard->reference_count--;
if (vcard->reference_count != 0) {
return;
}
if (vcard->vcard_private_free) {
(*vcard->vcard_priv... | false | qemu | 1687a089f103f9b7a1b4a1555068054cb46ee9e9 | vcard_free(VCard *vcard)
{
VCardApplet *current_applet = NULL;
VCardApplet *next_applet = NULL;
if (vcard == NULL) {
return;
}
vcard->reference_count--;
if (vcard->reference_count != 0) {
return;
}
if (vcard->vcard_private_free) {
(*vcard->vcard_priv... | {
"code": [],
"line_no": []
} | FUNC_0(VCard *VAR_0)
{
VCardApplet *current_applet = NULL;
VCardApplet *next_applet = NULL;
if (VAR_0 == NULL) {
return;
}
VAR_0->reference_count--;
if (VAR_0->reference_count != 0) {
return;
}
if (VAR_0->vcard_private_free) {
(*VAR_0->vcard_private_... | [
"FUNC_0(VCard *VAR_0)\n{",
"VCardApplet *current_applet = NULL;",
"VCardApplet *next_applet = NULL;",
"if (VAR_0 == NULL) {",
"return;",
"}",
"VAR_0->reference_count--;",
"if (VAR_0->reference_count != 0) {",
"return;",
"}",
"if (VAR_0->vcard_private_free) {",
"(*VAR_0->vcard_private_free)(VAR... | [
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... |
12,301 | static inline bool valid_ptex(PowerPCCPU *cpu, target_ulong ptex)
{
/*
* hash value/pteg group index is normalized by htab_mask
*/
if (((ptex & ~7ULL) / HPTES_PER_GROUP) & ~cpu->env.htab_mask) {
return false;
}
return true;
}
| false | qemu | 36778660d7fd0748a6129916e47ecedd67bdb758 | static inline bool valid_ptex(PowerPCCPU *cpu, target_ulong ptex)
{
if (((ptex & ~7ULL) / HPTES_PER_GROUP) & ~cpu->env.htab_mask) {
return false;
}
return true;
}
| {
"code": [],
"line_no": []
} | static inline bool FUNC_0(PowerPCCPU *cpu, target_ulong ptex)
{
if (((ptex & ~7ULL) / HPTES_PER_GROUP) & ~cpu->env.htab_mask) {
return false;
}
return true;
}
| [
"static inline bool FUNC_0(PowerPCCPU *cpu, target_ulong ptex)\n{",
"if (((ptex & ~7ULL) / HPTES_PER_GROUP) & ~cpu->env.htab_mask) {",
"return false;",
"}",
"return true;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
12,302 | gen_intermediate_code_internal(SuperHCPU *cpu, TranslationBlock *tb,
bool search_pc)
{
CPUState *cs = CPU(cpu);
CPUSH4State *env = &cpu->env;
DisasContext ctx;
target_ulong pc_start;
static uint16_t *gen_opc_end;
CPUBreakpoint *bp;
int i, ii;
int ... | false | qemu | cd42d5b23691ad73edfd6dbcfc935a960a9c5a65 | gen_intermediate_code_internal(SuperHCPU *cpu, TranslationBlock *tb,
bool search_pc)
{
CPUState *cs = CPU(cpu);
CPUSH4State *env = &cpu->env;
DisasContext ctx;
target_ulong pc_start;
static uint16_t *gen_opc_end;
CPUBreakpoint *bp;
int i, ii;
int ... | {
"code": [],
"line_no": []
} | FUNC_0(SuperHCPU *VAR_0, TranslationBlock *VAR_1,
bool VAR_2)
{
CPUState *cs = CPU(VAR_0);
CPUSH4State *env = &VAR_0->env;
DisasContext ctx;
target_ulong pc_start;
static uint16_t *VAR_3;
CPUBreakpoint *bp;
int VAR_4, VAR_5;
int VAR_6;
int VA... | [
"FUNC_0(SuperHCPU *VAR_0, TranslationBlock *VAR_1,\nbool VAR_2)\n{",
"CPUState *cs = CPU(VAR_0);",
"CPUSH4State *env = &VAR_0->env;",
"DisasContext ctx;",
"target_ulong pc_start;",
"static uint16_t *VAR_3;",
"CPUBreakpoint *bp;",
"int VAR_4, VAR_5;",
"int VAR_6;",
"int VAR_7;",
"pc_start = 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,
0,
0,
0,
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
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[... |
12,303 | static uint32_t get_level1_table_address(CPUARMState *env, uint32_t address)
{
uint32_t table;
if (address & env->cp15.c2_mask)
table = env->cp15.ttbr1_el1 & 0xffffc000;
else
table = env->cp15.ttbr0_el1 & env->cp15.c2_base_mask;
table |= (address >> 18) & 0x3ffc;
return t... | false | qemu | e389be1673052b538534643165111725a79e5afd | static uint32_t get_level1_table_address(CPUARMState *env, uint32_t address)
{
uint32_t table;
if (address & env->cp15.c2_mask)
table = env->cp15.ttbr1_el1 & 0xffffc000;
else
table = env->cp15.ttbr0_el1 & env->cp15.c2_base_mask;
table |= (address >> 18) & 0x3ffc;
return t... | {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(CPUARMState *env, uint32_t address)
{
uint32_t table;
if (address & env->cp15.c2_mask)
table = env->cp15.ttbr1_el1 & 0xffffc000;
else
table = env->cp15.ttbr0_el1 & env->cp15.c2_base_mask;
table |= (address >> 18) & 0x3ffc;
return table;
}
| [
"static uint32_t FUNC_0(CPUARMState *env, uint32_t address)\n{",
"uint32_t table;",
"if (address & env->cp15.c2_mask)\ntable = env->cp15.ttbr1_el1 & 0xffffc000;",
"else\ntable = env->cp15.ttbr0_el1 & env->cp15.c2_base_mask;",
"table |= (address >> 18) & 0x3ffc;",
"return table;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13,
15
],
[
19
],
[
21
],
[
23
]
] |
12,304 | static int do_setcontext(struct target_ucontext *ucp, CPUPPCState *env, int sig)
{
struct target_mcontext *mcp;
target_ulong mcp_addr;
sigset_t blocked;
target_sigset_t set;
if (copy_from_user(&set, h2g(ucp) + offsetof(struct target_ucontext, tuc_sigmask),
sizeof (set... | false | qemu | c650c008e326f3a1e84083bc269265456057a212 | static int do_setcontext(struct target_ucontext *ucp, CPUPPCState *env, int sig)
{
struct target_mcontext *mcp;
target_ulong mcp_addr;
sigset_t blocked;
target_sigset_t set;
if (copy_from_user(&set, h2g(ucp) + offsetof(struct target_ucontext, tuc_sigmask),
sizeof (set... | {
"code": [],
"line_no": []
} | static int FUNC_0(struct target_ucontext *VAR_0, CPUPPCState *VAR_1, int VAR_2)
{
struct target_mcontext *VAR_3;
target_ulong mcp_addr;
sigset_t blocked;
target_sigset_t set;
if (copy_from_user(&set, h2g(VAR_0) + offsetof(struct target_ucontext, tuc_sigmask),
sizeof (... | [
"static int FUNC_0(struct target_ucontext *VAR_0, CPUPPCState *VAR_1, int VAR_2)\n{",
"struct target_mcontext *VAR_3;",
"target_ulong mcp_addr;",
"sigset_t blocked;",
"target_sigset_t set;",
"if (copy_from_user(&set, h2g(VAR_0) + offsetof(struct target_ucontext, tuc_sigmask),\nsizeof (set)))\nreturn 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
],
[
15,
17,
19
],
[
23,
25
],
[
27
],
[
29,
31,
33
],
[
37,
39
],
[
43
],
[
45
],
[
47,
49
],
[
53
],
[
55
],
[
59,
61
... |
12,306 | static void bdrv_co_drain_bh_cb(void *opaque)
{
BdrvCoDrainData *data = opaque;
Coroutine *co = data->co;
BlockDriverState *bs = data->bs;
bdrv_dec_in_flight(bs);
bdrv_drain_poll(bs);
data->done = true;
qemu_coroutine_enter(co);
}
| false | qemu | d42cf28837801cd1f835089fe9db2a42a1af55cd | static void bdrv_co_drain_bh_cb(void *opaque)
{
BdrvCoDrainData *data = opaque;
Coroutine *co = data->co;
BlockDriverState *bs = data->bs;
bdrv_dec_in_flight(bs);
bdrv_drain_poll(bs);
data->done = true;
qemu_coroutine_enter(co);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
BdrvCoDrainData *data = VAR_0;
Coroutine *co = data->co;
BlockDriverState *bs = data->bs;
bdrv_dec_in_flight(bs);
bdrv_drain_poll(bs);
data->done = true;
qemu_coroutine_enter(co);
}
| [
"static void FUNC_0(void *VAR_0)\n{",
"BdrvCoDrainData *data = VAR_0;",
"Coroutine *co = data->co;",
"BlockDriverState *bs = data->bs;",
"bdrv_dec_in_flight(bs);",
"bdrv_drain_poll(bs);",
"data->done = true;",
"qemu_coroutine_enter(co);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
12,309 | QEMUTimerList *timerlist_new(QEMUClockType type,
QEMUTimerListNotifyCB *cb,
void *opaque)
{
QEMUTimerList *timer_list;
QEMUClock *clock = qemu_clock_ptr(type);
timer_list = g_malloc0(sizeof(QEMUTimerList));
qemu_event_init(&timer_list->t... | false | qemu | c2b38b277a7882a592f4f2ec955084b2b756daaa | QEMUTimerList *timerlist_new(QEMUClockType type,
QEMUTimerListNotifyCB *cb,
void *opaque)
{
QEMUTimerList *timer_list;
QEMUClock *clock = qemu_clock_ptr(type);
timer_list = g_malloc0(sizeof(QEMUTimerList));
qemu_event_init(&timer_list->t... | {
"code": [],
"line_no": []
} | QEMUTimerList *FUNC_0(QEMUClockType type,
QEMUTimerListNotifyCB *cb,
void *opaque)
{
QEMUTimerList *timer_list;
QEMUClock *clock = qemu_clock_ptr(type);
timer_list = g_malloc0(sizeof(QEMUTimerList));
qemu_event_init(&timer_list->timers_d... | [
"QEMUTimerList *FUNC_0(QEMUClockType type,\nQEMUTimerListNotifyCB *cb,\nvoid *opaque)\n{",
"QEMUTimerList *timer_list;",
"QEMUClock *clock = qemu_clock_ptr(type);",
"timer_list = g_malloc0(sizeof(QEMUTimerList));",
"qemu_event_init(&timer_list->timers_done_ev, true);",
"timer_list->clock = clock;",
"tim... | [
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
]
] |
12,311 | void cpu_check_irqs(CPUSPARCState *env)
{
uint32_t pil = env->pil_in |
(env->softint & ~(SOFTINT_TIMER | SOFTINT_STIMER));
/* check if TM or SM in SOFTINT are set
setting these also causes interrupt 14 */
if (env->softint & (SOFTINT_TIMER | SOFTINT_STIMER)) {
pil |=... | false | qemu | a7be9bad33d81d4bab2a51935b5443d258e7d082 | void cpu_check_irqs(CPUSPARCState *env)
{
uint32_t pil = env->pil_in |
(env->softint & ~(SOFTINT_TIMER | SOFTINT_STIMER));
if (env->softint & (SOFTINT_TIMER | SOFTINT_STIMER)) {
pil |= 1 << 14;
}
if (pil < (2 << env->psrpil)){
if (env->interr... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUSPARCState *VAR_0)
{
uint32_t pil = VAR_0->pil_in |
(VAR_0->softint & ~(SOFTINT_TIMER | SOFTINT_STIMER));
if (VAR_0->softint & (SOFTINT_TIMER | SOFTINT_STIMER)) {
pil |= 1 << 14;
}
if (pil < (2 << VAR_0->psrpil)){
if (VAR_0->in... | [
"void FUNC_0(CPUSPARCState *VAR_0)\n{",
"uint32_t pil = VAR_0->pil_in |\n(VAR_0->softint & ~(SOFTINT_TIMER | SOFTINT_STIMER));",
"if (VAR_0->softint & (SOFTINT_TIMER | SOFTINT_STIMER)) {",
"pil |= 1 << 14;",
"}",
"if (pil < (2 << VAR_0->psrpil)){",
"if (VAR_0->interrupt_request & CPU_INTERRUPT_HARD) {",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
15
],
[
17
],
[
19
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
51
],
[
55
],
[
57
],
[
59
],
[
61... |
12,312 | static void *qemu_kvm_cpu_thread_fn(void *arg)
{
CPUState *env = arg;
int r;
qemu_mutex_lock(&qemu_global_mutex);
qemu_thread_self(env->thread);
r = kvm_init_vcpu(env);
if (r < 0) {
fprintf(stderr, "kvm_init_vcpu failed: %s\n", strerror(-r));
exit(1);
}
q... | false | qemu | 0ab07c623c629acfbc792e5a174129c19faefbb7 | static void *qemu_kvm_cpu_thread_fn(void *arg)
{
CPUState *env = arg;
int r;
qemu_mutex_lock(&qemu_global_mutex);
qemu_thread_self(env->thread);
r = kvm_init_vcpu(env);
if (r < 0) {
fprintf(stderr, "kvm_init_vcpu failed: %s\n", strerror(-r));
exit(1);
}
q... | {
"code": [],
"line_no": []
} | static void *FUNC_0(void *VAR_0)
{
CPUState *env = VAR_0;
int VAR_1;
qemu_mutex_lock(&qemu_global_mutex);
qemu_thread_self(env->thread);
VAR_1 = kvm_init_vcpu(env);
if (VAR_1 < 0) {
fprintf(stderr, "kvm_init_vcpu failed: %s\n", strerror(-VAR_1));
exit(1);
}
... | [
"static void *FUNC_0(void *VAR_0)\n{",
"CPUState *env = VAR_0;",
"int VAR_1;",
"qemu_mutex_lock(&qemu_global_mutex);",
"qemu_thread_self(env->thread);",
"VAR_1 = kvm_init_vcpu(env);",
"if (VAR_1 < 0) {",
"fprintf(stderr, \"kvm_init_vcpu failed: %s\\n\", strerror(-VAR_1));",
"exit(1);",
"}",
"qem... | [
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
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
35
],
[
37
],
[
43,
45
],
[
49
],
[
51,
53
],
[
55
],
[
57
],
[
61... |
12,313 | static long do_sigreturn_v2(CPUARMState *env)
{
abi_ulong frame_addr;
struct sigframe_v2 *frame = NULL;
/*
* Since we stacked the signal on a 64-bit boundary,
* then 'sp' should be word aligned here. If it's
* not, then the user is trying to mess with us.
*/
frame_addr = ... | false | qemu | f0267ef7115656119bf00ed77857789adc036bda | static long do_sigreturn_v2(CPUARMState *env)
{
abi_ulong frame_addr;
struct sigframe_v2 *frame = NULL;
frame_addr = env->regs[13];
trace_user_do_sigreturn(env, frame_addr);
if (frame_addr & 7) {
goto badframe;
}
if (!lock_user_struct(VERIFY_READ, frame, fr... | {
"code": [],
"line_no": []
} | static long FUNC_0(CPUARMState *VAR_0)
{
abi_ulong frame_addr;
struct sigframe_v2 *VAR_1 = NULL;
frame_addr = VAR_0->regs[13];
trace_user_do_sigreturn(VAR_0, frame_addr);
if (frame_addr & 7) {
goto badframe;
}
if (!lock_user_struct(VERIFY_READ, VAR_1, frame... | [
"static long FUNC_0(CPUARMState *VAR_0)\n{",
"abi_ulong frame_addr;",
"struct sigframe_v2 *VAR_1 = NULL;",
"frame_addr = VAR_0->regs[13];",
"trace_user_do_sigreturn(VAR_0, frame_addr);",
"if (frame_addr & 7) {",
"goto badframe;",
"}",
"if (!lock_user_struct(VERIFY_READ, VAR_1, frame_addr, 1)) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
55,
57
],
[
59
],
[
61
],
... |
12,315 | static int v9fs_synth_open(FsContext *ctx, V9fsPath *fs_path,
int flags, V9fsFidOpenState *fs)
{
V9fsSynthOpenState *synth_open;
V9fsSynthNode *node = *(V9fsSynthNode **)fs_path->data;
synth_open = g_malloc(sizeof(*synth_open));
synth_open->node = node;
node->open... | false | qemu | 364031f17932814484657e5551ba12957d993d7e | static int v9fs_synth_open(FsContext *ctx, V9fsPath *fs_path,
int flags, V9fsFidOpenState *fs)
{
V9fsSynthOpenState *synth_open;
V9fsSynthNode *node = *(V9fsSynthNode **)fs_path->data;
synth_open = g_malloc(sizeof(*synth_open));
synth_open->node = node;
node->open... | {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
int VAR_2, V9fsFidOpenState *VAR_3)
{
V9fsSynthOpenState *synth_open;
V9fsSynthNode *node = *(V9fsSynthNode **)VAR_1->data;
synth_open = g_malloc(sizeof(*synth_open));
synth_open->node = node;
node->open_count++... | [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,\nint VAR_2, V9fsFidOpenState *VAR_3)\n{",
"V9fsSynthOpenState *synth_open;",
"V9fsSynthNode *node = *(V9fsSynthNode **)VAR_1->data;",
"synth_open = g_malloc(sizeof(*synth_open));",
"synth_open->node = node;",
"node->open_count++;",
"VAR_3->private = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
12,316 | static void filter_mb_edgecv( H264Context *h, uint8_t *pix, int stride, int bS[4], int qp ) {
int i, d;
const int index_a = clip( qp + h->slice_alpha_c0_offset, 0, 51 );
const int alpha = alpha_table[index_a];
const int beta = beta_table[clip( qp + h->slice_beta_offset, 0, 51 )];
for( i = 0;... | false | FFmpeg | 3ebc7e04dea6072400d91c1c90eb3911754cee06 | static void filter_mb_edgecv( H264Context *h, uint8_t *pix, int stride, int bS[4], int qp ) {
int i, d;
const int index_a = clip( qp + h->slice_alpha_c0_offset, 0, 51 );
const int alpha = alpha_table[index_a];
const int beta = beta_table[clip( qp + h->slice_beta_offset, 0, 51 )];
for( i = 0;... | {
"code": [],
"line_no": []
} | static void FUNC_0( H264Context *VAR_0, uint8_t *VAR_1, int VAR_2, int VAR_3[4], int VAR_4 ) {
int VAR_5, VAR_6;
const int VAR_7 = clip( VAR_4 + VAR_0->slice_alpha_c0_offset, 0, 51 );
const int VAR_8 = alpha_table[VAR_7];
const int VAR_9 = beta_table[clip( VAR_4 + VAR_0->slice_beta_offset, 0, 51 )]... | [
"static void FUNC_0( H264Context *VAR_0, uint8_t *VAR_1, int VAR_2, int VAR_3[4], int VAR_4 ) {",
"int VAR_5, VAR_6;",
"const int VAR_7 = clip( VAR_4 + VAR_0->slice_alpha_c0_offset, 0, 51 );",
"const int VAR_8 = alpha_table[VAR_7];",
"const int VAR_9 = beta_table[clip( VAR_4 + VAR_0->slice_beta_offset, 0, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41,
43,
45
],
[
47
],
[
49
],
[... |
12,318 | static void rtl8139_transfer_frame(RTL8139State *s, const uint8_t *buf, int size, int do_interrupt)
{
if (!size)
{
DEBUG_PRINT(("RTL8139: +++ empty ethernet frame\n"));
return;
}
if (TxLoopBack == (s->TxConfig & TxLoopBack))
{
DEBUG_PRINT(("RTL8139: +++ transmit lo... | false | qemu | e3f5ec2b5e92706e3b807059f79b1fb5d936e567 | static void rtl8139_transfer_frame(RTL8139State *s, const uint8_t *buf, int size, int do_interrupt)
{
if (!size)
{
DEBUG_PRINT(("RTL8139: +++ empty ethernet frame\n"));
return;
}
if (TxLoopBack == (s->TxConfig & TxLoopBack))
{
DEBUG_PRINT(("RTL8139: +++ transmit lo... | {
"code": [],
"line_no": []
} | static void FUNC_0(RTL8139State *VAR_0, const uint8_t *VAR_1, int VAR_2, int VAR_3)
{
if (!VAR_2)
{
DEBUG_PRINT(("RTL8139: +++ empty ethernet frame\n"));
return;
}
if (TxLoopBack == (VAR_0->TxConfig & TxLoopBack))
{
DEBUG_PRINT(("RTL8139: +++ transmit loopback mode... | [
"static void FUNC_0(RTL8139State *VAR_0, const uint8_t *VAR_1, int VAR_2, int VAR_3)\n{",
"if (!VAR_2)\n{",
"DEBUG_PRINT((\"RTL8139: +++ empty ethernet frame\\n\"));",
"return;",
"}",
"if (TxLoopBack == (VAR_0->TxConfig & TxLoopBack))\n{",
"DEBUG_PRINT((\"RTL8139: +++ transmit loopback mode\\n\"));",
... | [
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,
29
],
[
31
],
[
33
],
[
35
]
] |
12,319 | static void sclp_execute(SCCB *sccb, uint64_t code)
{
S390SCLPDevice *sdev = get_event_facility();
switch (code & SCLP_CMD_CODE_MASK) {
case SCLP_CMDW_READ_SCP_INFO:
case SCLP_CMDW_READ_SCP_INFO_FORCED:
read_SCP_info(sccb);
break;
case SCLP_CMDW_READ_CPU_INFO:
sclp... | false | qemu | a0fa2cb8ccf0b73cfd3ac01d557401a2303c0de4 | static void sclp_execute(SCCB *sccb, uint64_t code)
{
S390SCLPDevice *sdev = get_event_facility();
switch (code & SCLP_CMD_CODE_MASK) {
case SCLP_CMDW_READ_SCP_INFO:
case SCLP_CMDW_READ_SCP_INFO_FORCED:
read_SCP_info(sccb);
break;
case SCLP_CMDW_READ_CPU_INFO:
sclp... | {
"code": [],
"line_no": []
} | static void FUNC_0(SCCB *VAR_0, uint64_t VAR_1)
{
S390SCLPDevice *sdev = get_event_facility();
switch (VAR_1 & SCLP_CMD_CODE_MASK) {
case SCLP_CMDW_READ_SCP_INFO:
case SCLP_CMDW_READ_SCP_INFO_FORCED:
read_SCP_info(VAR_0);
break;
case SCLP_CMDW_READ_CPU_INFO:
sclp_r... | [
"static void FUNC_0(SCCB *VAR_0, uint64_t VAR_1)\n{",
"S390SCLPDevice *sdev = get_event_facility();",
"switch (VAR_1 & SCLP_CMD_CODE_MASK) {",
"case SCLP_CMDW_READ_SCP_INFO:\ncase SCLP_CMDW_READ_SCP_INFO_FORCED:\nread_SCP_info(VAR_0);",
"break;",
"case SCLP_CMDW_READ_CPU_INFO:\nsclp_read_cpu_info(VAR_0);"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13,
15
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
]
] |
12,321 | static int blk_prw(BlockBackend *blk, int64_t offset, uint8_t *buf,
int64_t bytes, CoroutineEntry co_entry,
BdrvRequestFlags flags)
{
AioContext *aio_context;
QEMUIOVector qiov;
struct iovec iov;
Coroutine *co;
BlkRwCo rwco;
iov = (struct iovec) {... | false | qemu | 88b062c2036cfd05b5111147736a08ba05ea05a9 | static int blk_prw(BlockBackend *blk, int64_t offset, uint8_t *buf,
int64_t bytes, CoroutineEntry co_entry,
BdrvRequestFlags flags)
{
AioContext *aio_context;
QEMUIOVector qiov;
struct iovec iov;
Coroutine *co;
BlkRwCo rwco;
iov = (struct iovec) {... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockBackend *VAR_0, int64_t VAR_1, uint8_t *VAR_2,
int64_t VAR_3, CoroutineEntry VAR_4,
BdrvRequestFlags VAR_5)
{
AioContext *aio_context;
QEMUIOVector qiov;
struct iovec VAR_6;
Coroutine *co;
BlkRwCo rwco;
VAR_6 = (struct iovec... | [
"static int FUNC_0(BlockBackend *VAR_0, int64_t VAR_1, uint8_t *VAR_2,\nint64_t VAR_3, CoroutineEntry VAR_4,\nBdrvRequestFlags VAR_5)\n{",
"AioContext *aio_context;",
"QEMUIOVector qiov;",
"struct iovec VAR_6;",
"Coroutine *co;",
"BlkRwCo rwco;",
"VAR_6 = (struct iovec) {",
".iov_base = VAR_2,\n.iov_l... | [
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,
27
],
[
29
],
[
33
],
[
35,
37,
39,
41,
43,
45
],
[
49
],
[
51
],
[
55
],
[
57
],
[... |
12,323 | static int unix_listen_saddr(UnixSocketAddress *saddr,
bool update_addr,
Error **errp)
{
struct sockaddr_un un;
int sock, fd;
sock = qemu_socket(PF_UNIX, SOCK_STREAM, 0);
if (sock < 0) {
error_setg_errno(errp, errno, "Failed to ... | false | qemu | ad9579aaa16d5b385922d49edac2c96c79bcfb62 | static int unix_listen_saddr(UnixSocketAddress *saddr,
bool update_addr,
Error **errp)
{
struct sockaddr_un un;
int sock, fd;
sock = qemu_socket(PF_UNIX, SOCK_STREAM, 0);
if (sock < 0) {
error_setg_errno(errp, errno, "Failed to ... | {
"code": [],
"line_no": []
} | static int FUNC_0(UnixSocketAddress *VAR_0,
bool VAR_1,
Error **VAR_2)
{
struct sockaddr_un VAR_3;
int VAR_4, VAR_5;
VAR_4 = qemu_socket(PF_UNIX, SOCK_STREAM, 0);
if (VAR_4 < 0) {
error_setg_errno(VAR_2, errno, "Failed to create... | [
"static int FUNC_0(UnixSocketAddress *VAR_0,\nbool VAR_1,\nError **VAR_2)\n{",
"struct sockaddr_un VAR_3;",
"int VAR_4, VAR_5;",
"VAR_4 = qemu_socket(PF_UNIX, SOCK_STREAM, 0);",
"if (VAR_4 < 0) {",
"error_setg_errno(VAR_2, errno, \"Failed to create Unix socket\");",
"return -1;",
"}",
"memset(&VAR_3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45,
47
],
[
49
... |
12,324 | static void mirror_start_job(const char *job_id, BlockDriverState *bs,
BlockDriverState *target, const char *replaces,
int64_t speed, uint32_t granularity,
int64_t buf_size,
BlockMirrorBackingMode bac... | false | qemu | b49f7ead8d222bcb8df0388f3177002f3e33d046 | static void mirror_start_job(const char *job_id, BlockDriverState *bs,
BlockDriverState *target, const char *replaces,
int64_t speed, uint32_t granularity,
int64_t buf_size,
BlockMirrorBackingMode bac... | {
"code": [],
"line_no": []
} | static void FUNC_0(const char *VAR_0, BlockDriverState *VAR_1,
BlockDriverState *VAR_2, const char *VAR_3,
int64_t VAR_4, uint32_t VAR_5,
int64_t VAR_6,
BlockMirrorBackingMode VAR_7,
... | [
"static void FUNC_0(const char *VAR_0, BlockDriverState *VAR_1,\nBlockDriverState *VAR_2, const char *VAR_3,\nint64_t VAR_4, uint32_t VAR_5,\nint64_t VAR_6,\nBlockMirrorBackingMode VAR_7,\nBlockdevOnError VAR_8,\nBlockdevOnError VAR_9,\nbool VAR_10,\nBlockCompletionFunc *VAR_11,\nvoid *VAR_12, Error **VAR_13,\ncons... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
],
[
57
],
[
61
],
[... |
12,327 | int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int *consumed, int src_size, int dst_size, int update_ctx){
int dst_index, i;
int index= c->index;
int frac= c->frac;
int dst_incr_frac= c->dst_incr % c->src_incr;
int dst_incr= c->dst_incr / c->src_incr;
av... | false | FFmpeg | b785c62681a0a5a330b065e0754d27a313c44c8e | int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int *consumed, int src_size, int dst_size, int update_ctx){
int dst_index, i;
int index= c->index;
int frac= c->frac;
int dst_incr_frac= c->dst_incr % c->src_incr;
int dst_incr= c->dst_incr / c->src_incr;
av... | {
"code": [],
"line_no": []
} | int FUNC_0(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int *consumed, int src_size, int dst_size, int update_ctx){
int VAR_0, VAR_1;
int VAR_2= c->VAR_2;
int VAR_3= c->VAR_3;
int VAR_4= c->VAR_5 % c->src_incr;
int VAR_5= c->VAR_5 / c->src_incr;
av_assert1(c->fil... | [
"int FUNC_0(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int *consumed, int src_size, int dst_size, int update_ctx){",
"int VAR_0, VAR_1;",
"int VAR_2= c->VAR_2;",
"int VAR_3= c->VAR_3;",
"int VAR_4= c->VAR_5 % c->src_incr;",
"int VAR_5= c->VAR_5 / c->src_incr;",
"av_assert1(c->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
12,328 | static uint32_t gic_dist_readb(void *opaque, hwaddr offset)
{
GICState *s = (GICState *)opaque;
uint32_t res;
int irq;
int i;
int cpu;
int cm;
int mask;
cpu = gic_get_current_cpu(s);
cm = 1 << cpu;
if (offset < 0x100) {
if (offset == 0)
return s... | false | qemu | 8d999995e45c1002aa11f269c98f2e93e6f8c42a | static uint32_t gic_dist_readb(void *opaque, hwaddr offset)
{
GICState *s = (GICState *)opaque;
uint32_t res;
int irq;
int i;
int cpu;
int cm;
int mask;
cpu = gic_get_current_cpu(s);
cm = 1 << cpu;
if (offset < 0x100) {
if (offset == 0)
return s... | {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(void *opaque, hwaddr offset)
{
GICState *s = (GICState *)opaque;
uint32_t res;
int VAR_0;
int VAR_1;
int VAR_2;
int VAR_3;
int VAR_4;
VAR_2 = gic_get_current_cpu(s);
VAR_3 = 1 << VAR_2;
if (offset < 0x100) {
if (offset == 0)
... | [
"static uint32_t FUNC_0(void *opaque, hwaddr offset)\n{",
"GICState *s = (GICState *)opaque;",
"uint32_t res;",
"int VAR_0;",
"int VAR_1;",
"int VAR_2;",
"int VAR_3;",
"int VAR_4;",
"VAR_2 = gic_get_current_cpu(s);",
"VAR_3 = 1 << VAR_2;",
"if (offset < 0x100) {",
"if (offset == 0)\nreturn 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
],
[
27,
29
],
[
31,
33
],
[
35,
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[... |
12,330 | 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 ... | false | qemu | 856d72454f03aea26fd61c728762ef9cd1d71512 | 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": [],
"line_no": []
} | 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->parent; ) {",
"root = root->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
12,331 | static void omap_tcmi_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
struct omap_mpu_state_s *s = (struct omap_mpu_state_s *) opaque;
if (size != 4) {
return omap_badwidth_write32(opaque, addr, value);
}
switch (addr) {
c... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void omap_tcmi_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
struct omap_mpu_state_s *s = (struct omap_mpu_state_s *) opaque;
if (size != 4) {
return omap_badwidth_write32(opaque, addr, value);
}
switch (addr) {
c... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
struct omap_mpu_state_s *VAR_4 = (struct omap_mpu_state_s *) VAR_0;
if (VAR_3 != 4) {
return omap_badwidth_write32(VAR_0, VAR_1, VAR_2);
}
switch (VAR_1) {
case... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"struct omap_mpu_state_s *VAR_4 = (struct omap_mpu_state_s *) VAR_0;",
"if (VAR_3 != 4) {",
"return omap_badwidth_write32(VAR_0, VAR_1, VAR_2);",
"}",
"switch (VAR_1) {",
"case 0x00:\ncase 0x04:\ncase 0x08:\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49
],
[
51
],
[
53,
55
],
[
57
],
[
61,
63
],
... |
12,332 | static av_cold int xbm_encode_init(AVCodecContext *avctx)
{
avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)
return AVERROR(ENOMEM);
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
return 0;
}
| false | FFmpeg | d6604b29ef544793479d7fb4e05ef6622bb3e534 | static av_cold int xbm_encode_init(AVCodecContext *avctx)
{
avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)
return AVERROR(ENOMEM);
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
return 0;
}
| {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)
return AVERROR(ENOMEM);
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
return 0;
}
| [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"avctx->coded_frame = av_frame_alloc();",
"if (!avctx->coded_frame)\nreturn AVERROR(ENOMEM);",
"avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
15
],
[
17
]
] |
12,333 | static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
long width, long height,
long lumStride, long chromStride, long dstStride, long vertLumPerChroma)
{
long y... | false | FFmpeg | d1adad3cca407f493c3637e20ecd4f7124e69212 | static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
long width, long height,
long lumStride, long chromStride, long dstStride, long vertLumPerChroma)
{
long y... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
long width, long height,
long lumStride, long chromStride, long dstStride, long vertLumPerChroma)
{
long V... | [
"static inline void FUNC_0(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,\nlong width, long height,\nlong lumStride, long chromStride, long dstStride, long vertLumPerChroma)\n{",
"long VAR_0;",
"const x86_reg VAR_1= width>>1;",
"for (VAR_0=0; VAR_0<height; 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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
29,
31,
33,
35,
37,
39,
41,
45,
47,
49,
51,
53,
55,
57,
59,
63,
65,
67,
69,
73,
75,
77,
79,... |
12,334 | DECL_IMDCT_BLOCKS(sse,sse)
#endif
DECL_IMDCT_BLOCKS(sse2,sse)
DECL_IMDCT_BLOCKS(sse3,sse)
DECL_IMDCT_BLOCKS(ssse3,sse)
#endif
#if HAVE_AVX_EXTERNAL
DECL_IMDCT_BLOCKS(avx,avx)
#endif
#endif /* HAVE_YASM */
av_cold void ff_mpadsp_init_x86(MPADSPContext *s)
{
int cpu_flags = av_get_cpu_flags();
in... | false | FFmpeg | 0544c95fd6d0e3c1072554f9d13baf45af7fbf56 | DECL_IMDCT_BLOCKS(sse,sse)
#endif
DECL_IMDCT_BLOCKS(sse2,sse)
DECL_IMDCT_BLOCKS(sse3,sse)
DECL_IMDCT_BLOCKS(ssse3,sse)
#endif
#if HAVE_AVX_EXTERNAL
DECL_IMDCT_BLOCKS(avx,avx)
#endif
#endif
av_cold void ff_mpadsp_init_x86(MPADSPContext *s)
{
int cpu_flags = av_get_cpu_flags();
int i, j;
fo... | {
"code": [],
"line_no": []
} | DECL_IMDCT_BLOCKS(sse,sse)
#endif
DECL_IMDCT_BLOCKS(sse2,sse)
DECL_IMDCT_BLOCKS(sse3,sse)
DECL_IMDCT_BLOCKS(ssse3,sse)
#endif
#if HAVE_AVX_EXTERNAL
DECL_IMDCT_BLOCKS(avx,avx)
#endif
#endif
av_cold void ff_mpadsp_init_x86(MPADSPContext *s)
{
int cpu_flags = av_get_cpu_flags();
int i, j;
fo... | [
"DECL_IMDCT_BLOCKS(sse,sse)\n#endif\nDECL_IMDCT_BLOCKS(sse2,sse)\nDECL_IMDCT_BLOCKS(sse3,sse)\nDECL_IMDCT_BLOCKS(ssse3,sse)\n#endif\n#if HAVE_AVX_EXTERNAL\nDECL_IMDCT_BLOCKS(avx,avx)\n#endif\n#endif\nav_cold void ff_mpadsp_init_x86(MPADSPContext *s)\n{",
"int cpu_flags = av_get_cpu_flags();",
"int i, j;",
"fo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
23,
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
12,335 | static void dirac_unpack_block_motion_data(DiracContext *s)
{
GetBitContext *gb = &s->gb;
uint8_t *sbsplit = s->sbsplit;
int i, x, y, q, p;
DiracArith arith[8];
align_get_bits(gb);
/* [DIRAC_STD] 11.2.4 and 12.2.1 Number of blocks and superblocks */
s->sbwidth = DIVRNDUP(s->sour... | true | FFmpeg | 9729f140ae073f1df2041b6c5fd2068592eb9c48 | static void dirac_unpack_block_motion_data(DiracContext *s)
{
GetBitContext *gb = &s->gb;
uint8_t *sbsplit = s->sbsplit;
int i, x, y, q, p;
DiracArith arith[8];
align_get_bits(gb);
s->sbwidth = DIVRNDUP(s->source.width, 4*s->plane[0].xbsep);
s->sbheight = DIVRNDUP(s->sour... | {
"code": [
"static void dirac_unpack_block_motion_data(DiracContext *s)",
" int split = dirac_get_arith_uint(arith, CTX_SB_F1, CTX_SB_DATA);"
],
"line_no": [
1,
41
]
} | static void FUNC_0(DiracContext *VAR_0)
{
GetBitContext *gb = &VAR_0->gb;
uint8_t *sbsplit = VAR_0->sbsplit;
int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5;
DiracArith arith[8];
align_get_bits(gb);
VAR_0->sbwidth = DIVRNDUP(VAR_0->source.width, 4*VAR_0->plane[0].xbsep);
VAR_0->sbh... | [
"static void FUNC_0(DiracContext *VAR_0)\n{",
"GetBitContext *gb = &VAR_0->gb;",
"uint8_t *sbsplit = VAR_0->sbsplit;",
"int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5;",
"DiracArith arith[8];",
"align_get_bits(gb);",
"VAR_0->sbwidth = DIVRNDUP(VAR_0->source.width, 4*VAR_0->plane[0].xbsep);",
"VAR_0->sbheight... | [
1,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
21
],
[
23
],
[
25
],
[
27
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
55
],
[
57
... |
12,336 | static void add_bytes_c(uint8_t *dst, uint8_t *src, int w){
long i;
for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
long a = *(long*)(src+i);
long b = *(long*)(dst+i);
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
}
for(; i<w; i++)
dst[i+0] += src[i+0];... | true | FFmpeg | d1916d13e28b87f4b1b214231149e12e1d536b4b | static void add_bytes_c(uint8_t *dst, uint8_t *src, int w){
long i;
for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
long a = *(long*)(src+i);
long b = *(long*)(dst+i);
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
}
for(; i<w; i++)
dst[i+0] += src[i+0];... | {
"code": [
" for(i=0; i<=w-sizeof(long); i+=sizeof(long)){",
" for(i=0; i<=w-sizeof(long); i+=sizeof(long)){"
],
"line_no": [
5,
5
]
} | static void FUNC_0(uint8_t *VAR_0, uint8_t *VAR_1, int VAR_2){
long VAR_3;
for(VAR_3=0; VAR_3<=VAR_2-sizeof(long); VAR_3+=sizeof(long)){
long VAR_4 = *(long*)(VAR_1+VAR_3);
long VAR_5 = *(long*)(VAR_0+VAR_3);
*(long*)(VAR_0+VAR_3) = ((VAR_4&pb_7f) + (VAR_5&pb_7f)) ^ ((VAR_4^VAR_5)&p... | [
"static void FUNC_0(uint8_t *VAR_0, uint8_t *VAR_1, int VAR_2){",
"long VAR_3;",
"for(VAR_3=0; VAR_3<=VAR_2-sizeof(long); VAR_3+=sizeof(long)){",
"long VAR_4 = *(long*)(VAR_1+VAR_3);",
"long VAR_5 = *(long*)(VAR_0+VAR_3);",
"*(long*)(VAR_0+VAR_3) = ((VAR_4&pb_7f) + (VAR_5&pb_7f)) ^ ((VAR_4^VAR_5)&pb_80);"... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
12,337 | static int write_f(BlockBackend *blk, int argc, char **argv)
{
struct timeval t1, t2;
bool Cflag = false, qflag = false, bflag = false;
bool Pflag = false, zflag = false, cflag = false;
int flags = 0;
int c, cnt;
char *buf = NULL;
int64_t offset;
int64_t count;
/* Some comp... | true | qemu | 3026c4688ca80d9c5cc1606368c4a1009a6f507d | static int write_f(BlockBackend *blk, int argc, char **argv)
{
struct timeval t1, t2;
bool Cflag = false, qflag = false, bflag = false;
bool Pflag = false, zflag = false, cflag = false;
int flags = 0;
int c, cnt;
char *buf = NULL;
int64_t offset;
int64_t count;
int64_... | {
"code": [
" } else if (count > SIZE_MAX) {",
" (uint64_t) SIZE_MAX, argv[optind]);",
" } else if (count > SIZE_MAX) {",
" (uint64_t) SIZE_MAX, argv[optind]);"
],
"line_no": [
175,
179,
175,
179
]
} | static int FUNC_0(BlockBackend *VAR_0, int VAR_1, char **VAR_2)
{
struct timeval VAR_3, VAR_4;
bool Cflag = false, qflag = false, bflag = false;
bool Pflag = false, zflag = false, cflag = false;
int VAR_5 = 0;
int VAR_6, VAR_7;
char *VAR_8 = NULL;
int64_t offset;
int64_t count;
... | [
"static int FUNC_0(BlockBackend *VAR_0, int VAR_1, char **VAR_2)\n{",
"struct timeval VAR_3, VAR_4;",
"bool Cflag = false, qflag = false, bflag = false;",
"bool Pflag = false, zflag = false, cflag = false;",
"int VAR_5 = 0;",
"int VAR_6, VAR_7;",
"char *VAR_8 = NULL;",
"int64_t offset;",
"int64_t co... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39,
41
],
[
43
],
[
45,
47
],
[... |
12,338 | static int parse_audio(DBEContext *s, int start, int end, int seg_id)
{
int ch, ret, key = parse_key(s);
for (ch = start; ch < end; ch++) {
if (!s->ch_size[ch]) {
s->channels[seg_id][ch].nb_groups = 0;
continue;
}
if ((ret = convert_input(s, s->ch_size[c... | true | FFmpeg | 5e715b583dab85735660b15a8d217a69164675fe | static int parse_audio(DBEContext *s, int start, int end, int seg_id)
{
int ch, ret, key = parse_key(s);
for (ch = start; ch < end; ch++) {
if (!s->ch_size[ch]) {
s->channels[seg_id][ch].nb_groups = 0;
continue;
}
if ((ret = convert_input(s, s->ch_size[c... | {
"code": [
" return 0;",
" int ch, ret, key = parse_key(s);",
" skip_input(s, s->ch_size[ch]);",
" skip_input(s, 1);",
" return 0;"
],
"line_no": [
41,
5,
33,
39,
41
]
} | static int FUNC_0(DBEContext *VAR_0, int VAR_1, int VAR_2, int VAR_3)
{
int VAR_4, VAR_5, VAR_6 = parse_key(VAR_0);
for (VAR_4 = VAR_1; VAR_4 < VAR_2; VAR_4++) {
if (!VAR_0->ch_size[VAR_4]) {
VAR_0->channels[VAR_3][VAR_4].nb_groups = 0;
continue;
}
if ((... | [
"static int FUNC_0(DBEContext *VAR_0, int VAR_1, int VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6 = parse_key(VAR_0);",
"for (VAR_4 = VAR_1; VAR_4 < VAR_2; VAR_4++) {",
"if (!VAR_0->ch_size[VAR_4]) {",
"VAR_0->channels[VAR_3][VAR_4].nb_groups = 0;",
"continue;",
"}",
"if ((VAR_5 = convert_input(VAR... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
]
] |
12,339 | static void qemu_input_queue_process(void *opaque)
{
struct QemuInputEventQueueHead *queue = opaque;
QemuInputEventQueue *item;
g_assert(!QTAILQ_EMPTY(queue));
item = QTAILQ_FIRST(queue);
g_assert(item->type == QEMU_INPUT_QUEUE_DELAY);
QTAILQ_REMOVE(queue, item, node);
g_free(item... | true | qemu | 77b0359bf414ad666d1714dc9888f1017c08e283 | static void qemu_input_queue_process(void *opaque)
{
struct QemuInputEventQueueHead *queue = opaque;
QemuInputEventQueue *item;
g_assert(!QTAILQ_EMPTY(queue));
item = QTAILQ_FIRST(queue);
g_assert(item->type == QEMU_INPUT_QUEUE_DELAY);
QTAILQ_REMOVE(queue, item, node);
g_free(item... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
struct QemuInputEventQueueHead *VAR_1 = VAR_0;
QemuInputEventQueue *item;
g_assert(!QTAILQ_EMPTY(VAR_1));
item = QTAILQ_FIRST(VAR_1);
g_assert(item->type == QEMU_INPUT_QUEUE_DELAY);
QTAILQ_REMOVE(VAR_1, item, node);
g_free(item);
while (!QT... | [
"static void FUNC_0(void *VAR_0)\n{",
"struct QemuInputEventQueueHead *VAR_1 = VAR_0;",
"QemuInputEventQueue *item;",
"g_assert(!QTAILQ_EMPTY(VAR_1));",
"item = QTAILQ_FIRST(VAR_1);",
"g_assert(item->type == QEMU_INPUT_QUEUE_DELAY);",
"QTAILQ_REMOVE(VAR_1, item, node);",
"g_free(item);",
"while (!QT... | [
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
],
[
20
],
[
24
],
[
26
],
[
28
],
[
30,
32,
34
],
[
36
],
[
38,
40
],
[
42
],
[
44
],
[
46,
48
],
[
50... |
12,340 | static void vhost_scsi_unrealize(DeviceState *dev, Error **errp)
{
VirtIODevice *vdev = VIRTIO_DEVICE(dev);
VHostSCSI *s = VHOST_SCSI(dev);
migrate_del_blocker(s->migration_blocker);
error_free(s->migration_blocker);
/* This will stop vhost backend. */
vhost_scsi_set_status(vdev, 0);
... | true | qemu | af103c9310b7ab56a2552965d9d1274b0024f27b | static void vhost_scsi_unrealize(DeviceState *dev, Error **errp)
{
VirtIODevice *vdev = VIRTIO_DEVICE(dev);
VHostSCSI *s = VHOST_SCSI(dev);
migrate_del_blocker(s->migration_blocker);
error_free(s->migration_blocker);
vhost_scsi_set_status(vdev, 0);
g_free(s->dev.vqs);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{
VirtIODevice *vdev = VIRTIO_DEVICE(VAR_0);
VHostSCSI *s = VHOST_SCSI(VAR_0);
migrate_del_blocker(s->migration_blocker);
error_free(s->migration_blocker);
vhost_scsi_set_status(vdev, 0);
g_free(s->VAR_0.vqs);
virti... | [
"static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{",
"VirtIODevice *vdev = VIRTIO_DEVICE(VAR_0);",
"VHostSCSI *s = VHOST_SCSI(VAR_0);",
"migrate_del_blocker(s->migration_blocker);",
"error_free(s->migration_blocker);",
"vhost_scsi_set_status(vdev, 0);",
"g_free(s->VAR_0.vqs);",
"virtio_scsi_com... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
19
],
[
24
],
[
28
],
[
30
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.