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 |
|---|---|---|---|---|---|---|---|---|---|---|
1,717 | void av_get_channel_layout_string(char *buf, int buf_size,
int nb_channels, int64_t channel_layout)
{
int i;
if (nb_channels <= 0)
nb_channels = av_get_channel_layout_nb_channels(channel_layout);
for (i = 0; channel_layout_map[i].name; i++)
if (nb... | false | FFmpeg | cc276c85d15272df6e44fb3252657a43cbd49555 | void av_get_channel_layout_string(char *buf, int buf_size,
int nb_channels, int64_t channel_layout)
{
int i;
if (nb_channels <= 0)
nb_channels = av_get_channel_layout_nb_channels(channel_layout);
for (i = 0; channel_layout_map[i].name; i++)
if (nb... | {
"code": [],
"line_no": []
} | void FUNC_0(char *VAR_0, int VAR_1,
int VAR_2, int64_t VAR_3)
{
int VAR_5;
if (VAR_2 <= 0)
VAR_2 = av_get_channel_layout_nb_channels(VAR_3);
for (VAR_5 = 0; channel_layout_map[VAR_5].VAR_6; VAR_5++)
if (VAR_2 == channel_layout_map[VAR_5].VAR_2 ... | [
"void FUNC_0(char *VAR_0, int VAR_1,\nint VAR_2, int64_t VAR_3)\n{",
"int VAR_5;",
"if (VAR_2 <= 0)\nVAR_2 = av_get_channel_layout_nb_channels(VAR_3);",
"for (VAR_5 = 0; channel_layout_map[VAR_5].VAR_6; VAR_5++)",
"if (VAR_2 == channel_layout_map[VAR_5].VAR_2 &&\nVAR_3 == channel_layout_map[VAR_5].layout... | [
0,
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
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51... |
1,718 | void qemu_co_queue_run_restart(Coroutine *co)
{
Coroutine *next;
trace_qemu_co_queue_run_restart(co);
while ((next = QSIMPLEQ_FIRST(&co->co_queue_wakeup))) {
QSIMPLEQ_REMOVE_HEAD(&co->co_queue_wakeup, co_queue_next);
qemu_coroutine_enter(next, NULL);
}
}
| true | qemu | 0b8b8753e4d94901627b3e86431230f2319215c4 | void qemu_co_queue_run_restart(Coroutine *co)
{
Coroutine *next;
trace_qemu_co_queue_run_restart(co);
while ((next = QSIMPLEQ_FIRST(&co->co_queue_wakeup))) {
QSIMPLEQ_REMOVE_HEAD(&co->co_queue_wakeup, co_queue_next);
qemu_coroutine_enter(next, NULL);
}
}
| {
"code": [
" qemu_coroutine_enter(next, NULL);"
],
"line_no": [
15
]
} | void FUNC_0(Coroutine *VAR_0)
{
Coroutine *next;
trace_qemu_co_queue_run_restart(VAR_0);
while ((next = QSIMPLEQ_FIRST(&VAR_0->co_queue_wakeup))) {
QSIMPLEQ_REMOVE_HEAD(&VAR_0->co_queue_wakeup, co_queue_next);
qemu_coroutine_enter(next, NULL);
}
}
| [
"void FUNC_0(Coroutine *VAR_0)\n{",
"Coroutine *next;",
"trace_qemu_co_queue_run_restart(VAR_0);",
"while ((next = QSIMPLEQ_FIRST(&VAR_0->co_queue_wakeup))) {",
"QSIMPLEQ_REMOVE_HEAD(&VAR_0->co_queue_wakeup, co_queue_next);",
"qemu_coroutine_enter(next, NULL);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
1,719 | static inline void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width)
{
#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
asm volatile(
"movq "MANGLE(bm01010101)", %%mm4\n\t"
"mov %0, %%"REG_a" \n\t"
"1: \n\t"
"movq (%1, %%"REG_a",4), %%mm0 \n\t"
"movq 8(%1, %%"... | true | FFmpeg | 7f526efd17973ec6d2204f7a47b6923e2be31363 | static inline void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width)
{
#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
asm volatile(
"movq "MANGLE(bm01010101)", %%mm4\n\t"
"mov %0, %%"REG_a" \n\t"
"1: \n\t"
"movq (%1, %%"REG_a",4), %%mm0 \n\t"
"movq 8(%1, %%"... | {
"code": [
"\t\t: : \"g\" ((long)-width), \"r\" (src1+width*4), \"r\" (src2+width*4), \"r\" (dstU+width), \"r\" (dstV+width)",
"static inline void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width)",
"\t\t: : \"g\" ((long)-width), \"r\" (src1+width*4), \"r\" (src2+wid... | static inline void FUNC_0(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width)
{
#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
asm volatile(
"movq "MANGLE(bm01010101)", %%mm4\n\t"
"mov %0, %%"REG_a" \n\t"
"1: \n\t"
"movq (%1, %%"REG_a",4), %%mm0 \n\t"
"movq 8(%1, %%"... | [
"static inline void FUNC_0(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width)\n{",
"#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)\nasm volatile(\n\"movq \"MANGLE(bm01010101)\", %%mm4\\n\\t\"\n\"mov %0, %%\"REG_a\"\t\t\\n\\t\"\n\"1:\t\t\t\t\\n\\t\"\n\"movq (%1, %%\"REG_a\",4), %%mm0... | [
1,
1,
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,
47,
49,
51,
53,
55
],
[
57,
59
],
[
61
],
[
63
],
[
65
],
[
67
... |
1,720 | static void default_show_tags(WriterContext *wctx, AVDictionary *dict)
{
AVDictionaryEntry *tag = NULL;
while ((tag = av_dict_get(dict, "", tag, AV_DICT_IGNORE_SUFFIX))) {
printf("TAG:");
writer_print_string(wctx, tag->key, tag->value);
}
}
| false | FFmpeg | 0491a2a07a44f6e5e6f34081835e402c07025fd2 | static void default_show_tags(WriterContext *wctx, AVDictionary *dict)
{
AVDictionaryEntry *tag = NULL;
while ((tag = av_dict_get(dict, "", tag, AV_DICT_IGNORE_SUFFIX))) {
printf("TAG:");
writer_print_string(wctx, tag->key, tag->value);
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(WriterContext *VAR_0, AVDictionary *VAR_1)
{
AVDictionaryEntry *tag = NULL;
while ((tag = av_dict_get(VAR_1, "", tag, AV_DICT_IGNORE_SUFFIX))) {
printf("TAG:");
writer_print_string(VAR_0, tag->key, tag->value);
}
}
| [
"static void FUNC_0(WriterContext *VAR_0, AVDictionary *VAR_1)\n{",
"AVDictionaryEntry *tag = NULL;",
"while ((tag = av_dict_get(VAR_1, \"\", tag, AV_DICT_IGNORE_SUFFIX))) {",
"printf(\"TAG:\");",
"writer_print_string(VAR_0, tag->key, tag->value);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
1,722 | static int decode_block(ALSDecContext *ctx, ALSBlockData *bd)
{
unsigned int smp;
// read block type flag and read the samples accordingly
if (*bd->const_block)
decode_const_block_data(ctx, bd);
else if (decode_var_block_data(ctx, bd))
return -1;
// TODO: read RLSLMS exte... | true | FFmpeg | ca488ad480360dfafcb5766f7bfbb567a0638979 | static int decode_block(ALSDecContext *ctx, ALSBlockData *bd)
{
unsigned int smp;
if (*bd->const_block)
decode_const_block_data(ctx, bd);
else if (decode_var_block_data(ctx, bd))
return -1;
if (*bd->shift_lsbs)
for (smp = 0; smp < bd->block_length; smp++... | {
"code": [
" return -1;",
" return -1;",
" return -1;",
" return -1;",
" return -1;",
" return -1;",
" return -1;",
" return 0;",
" else if (decode_var_block_data(ctx, bd))",
" return -1;",
" return -1;",... | static int FUNC_0(ALSDecContext *VAR_0, ALSBlockData *VAR_1)
{
unsigned int VAR_2;
if (*VAR_1->const_block)
decode_const_block_data(VAR_0, VAR_1);
else if (decode_var_block_data(VAR_0, VAR_1))
return -1;
if (*VAR_1->shift_lsbs)
for (VAR_2 = 0; VAR_2 < VA... | [
"static int FUNC_0(ALSDecContext *VAR_0, ALSBlockData *VAR_1)\n{",
"unsigned int VAR_2;",
"if (*VAR_1->const_block)\ndecode_const_block_data(VAR_0, VAR_1);",
"else if (decode_var_block_data(VAR_0, VAR_1))\nreturn -1;",
"if (*VAR_1->shift_lsbs)\nfor (VAR_2 = 0; VAR_2 < VAR_1->block_length; VAR_2++)",
"VAR_... | [
0,
0,
0,
1,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
11,
13
],
[
15,
17
],
[
25,
27
],
[
29
],
[
33
],
[
35
]
] |
1,723 | static void hdcd_reset(hdcd_state *state, unsigned rate, unsigned cdt_ms)
{
int i;
state->window = 0;
state->readahead = 32;
state->arg = 0;
state->control = 0;
state->running_gain = 0;
state->sustain = 0;
state->sustain_reset = cdt_ms*rate/1000;
state->code_counter... | true | FFmpeg | 91be2ad756d658acc24fec5bc46c1775158d28b0 | static void hdcd_reset(hdcd_state *state, unsigned rate, unsigned cdt_ms)
{
int i;
state->window = 0;
state->readahead = 32;
state->arg = 0;
state->control = 0;
state->running_gain = 0;
state->sustain = 0;
state->sustain_reset = cdt_ms*rate/1000;
state->code_counter... | {
"code": [
" state->sustain_reset = cdt_ms*rate/1000;"
],
"line_no": [
25
]
} | static void FUNC_0(hdcd_state *VAR_0, unsigned VAR_1, unsigned VAR_2)
{
int VAR_3;
VAR_0->window = 0;
VAR_0->readahead = 32;
VAR_0->arg = 0;
VAR_0->control = 0;
VAR_0->running_gain = 0;
VAR_0->sustain = 0;
VAR_0->sustain_reset = VAR_2*VAR_1/1000;
VAR_0->code_counter... | [
"static void FUNC_0(hdcd_state *VAR_0, unsigned VAR_1, unsigned VAR_2)\n{",
"int VAR_3;",
"VAR_0->window = 0;",
"VAR_0->readahead = 32;",
"VAR_0->arg = 0;",
"VAR_0->control = 0;",
"VAR_0->running_gain = 0;",
"VAR_0->sustain = 0;",
"VAR_0->sustain_reset = VAR_2*VAR_1/1000;",
"VAR_0->code_counterA =... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49... |
1,724 | static int ehci_register_companion(USBBus *bus, USBPort *ports[],
uint32_t portcount, uint32_t firstport)
{
EHCIState *s = container_of(bus, EHCIState, bus);
uint32_t i;
if (firstport + portcount > NB_PORTS) {
qerror_report(QERR_INVALID_PARAMETER_VALUE, "fi... | true | qemu | 3e4f910c8d490a1490409a7e381dbbb229f9d272 | static int ehci_register_companion(USBBus *bus, USBPort *ports[],
uint32_t portcount, uint32_t firstport)
{
EHCIState *s = container_of(bus, EHCIState, bus);
uint32_t i;
if (firstport + portcount > NB_PORTS) {
qerror_report(QERR_INVALID_PARAMETER_VALUE, "fi... | {
"code": [
" s->mmio[0x05] = (s->companion_count << 4) | portcount;"
],
"line_no": [
73
]
} | static int FUNC_0(USBBus *VAR_0, USBPort *VAR_1[],
uint32_t VAR_2, uint32_t VAR_3)
{
EHCIState *s = container_of(VAR_0, EHCIState, VAR_0);
uint32_t i;
if (VAR_3 + VAR_2 > NB_PORTS) {
qerror_report(QERR_INVALID_PARAMETER_VALUE, "VAR_3",
... | [
"static int FUNC_0(USBBus *VAR_0, USBPort *VAR_1[],\nuint32_t VAR_2, uint32_t VAR_3)\n{",
"EHCIState *s = container_of(VAR_0, EHCIState, VAR_0);",
"uint32_t i;",
"if (VAR_3 + VAR_2 > NB_PORTS) {",
"qerror_report(QERR_INVALID_PARAMETER_VALUE, \"VAR_3\",\n\"VAR_3 on masterbus\");",
"error_printf_unless_qmp(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19,
21,
23,
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37,
39
],
[
41,
43,
45
],
[
47
],
[
49
],
[
51
],
[
55
... |
1,725 | static int ehci_execute(EHCIPacket *p, const char *action)
{
USBEndpoint *ep;
int ret;
int endp;
if (!(p->qtd.token & QTD_TOKEN_ACTIVE)) {
fprintf(stderr, "Attempting to execute inactive qtd\n");
return USB_RET_PROCERR;
}
p->tbytes = (p->qtd.token & QTD_TOKEN_TBYTES_... | true | qemu | ef5b234477df80700b128f561f5877a0688a70c8 | static int ehci_execute(EHCIPacket *p, const char *action)
{
USBEndpoint *ep;
int ret;
int endp;
if (!(p->qtd.token & QTD_TOKEN_ACTIVE)) {
fprintf(stderr, "Attempting to execute inactive qtd\n");
return USB_RET_PROCERR;
}
p->tbytes = (p->qtd.token & QTD_TOKEN_TBYTES_... | {
"code": [
" if (ehci_init_transfer(p) != 0) {",
" return USB_RET_PROCERR;",
" usb_packet_setup(&p->packet, p->pid, ep, p->qtdaddr);",
" usb_packet_map(&p->packet, &p->sgl);"
],
"line_no": [
69,
17,
83,
85
]
} | static int FUNC_0(EHCIPacket *VAR_0, const char *VAR_1)
{
USBEndpoint *ep;
int VAR_2;
int VAR_3;
if (!(VAR_0->qtd.token & QTD_TOKEN_ACTIVE)) {
fprintf(stderr, "Attempting to execute inactive qtd\n");
return USB_RET_PROCERR;
}
VAR_0->tbytes = (VAR_0->qtd.token & QTD_T... | [
"static int FUNC_0(EHCIPacket *VAR_0, const char *VAR_1)\n{",
"USBEndpoint *ep;",
"int VAR_2;",
"int VAR_3;",
"if (!(VAR_0->qtd.token & QTD_TOKEN_ACTIVE)) {",
"fprintf(stderr, \"Attempting to execute inactive qtd\\n\");",
"return USB_RET_PROCERR;",
"}",
"VAR_0->tbytes = (VAR_0->qtd.token & QTD_TOKEN... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47,
49
],
[... |
1,727 | int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVPacket *avpkt)
{
IVI45DecContext *ctx = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int result, p, b;
init_get_bits(&ctx->gb, bu... | true | FFmpeg | b146d74730ab9ec5abede9066f770ad851e45fbc | int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVPacket *avpkt)
{
IVI45DecContext *ctx = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int result, p, b;
init_get_bits(&ctx->gb, bu... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
IVI45DecContext *ctx = VAR_0->priv_data;
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
int VAR_6, VAR_7, VAR_8;
init_get_bits(&ctx->gb, VAR_4, VAR_... | [
"int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"IVI45DecContext *ctx = VAR_0->priv_data;",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"int VAR_6, VAR_7, VAR_8;",
"init_get_bits(&ctx->gb, VAR_4, VAR_5 * 8);",
"ctx->fra... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37,
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
1,728 | static int avcodec_find_best_pix_fmt1(int64_t pix_fmt_mask,
int src_pix_fmt,
int has_alpha,
int loss_mask)
{
int dist, i, loss, min_dist, dst_pix_fmt;
/* find exact color match with smallest... | true | FFmpeg | 31c3a4dc7e15f993b0076c7231f80249a55ea146 | static int avcodec_find_best_pix_fmt1(int64_t pix_fmt_mask,
int src_pix_fmt,
int has_alpha,
int loss_mask)
{
int dist, i, loss, min_dist, dst_pix_fmt;
dst_pix_fmt = -1;
min_dist =... | {
"code": [
" if (pix_fmt_mask & (1 << i)) {"
],
"line_no": [
23
]
} | static int FUNC_0(int64_t VAR_0,
int VAR_1,
int VAR_2,
int VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
VAR_8 = -1;
VAR_7 = 0x7fffffff;
for(VAR_5 = 0;VAR_5 < PIX_FMT_NB; V... | [
"static int FUNC_0(int64_t VAR_0,\nint VAR_1,\nint VAR_2,\nint VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"VAR_8 = -1;",
"VAR_7 = 0x7fffffff;",
"for(VAR_5 = 0;VAR_5 < PIX_FMT_NB; VAR_5++) {",
"if (VAR_0 & (1 << VAR_5)) {",
"VAR_6 = avcodec_get_pix_fmt_loss(VAR_5, VAR_1, VAR_2) & VAR_3;",
"i... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
]
] |
1,729 | static int vorbis_parse_audio_packet(vorbis_context *vc)
{
GetBitContext *gb = &vc->gb;
FFTContext *mdct;
unsigned previous_window = vc->previous_window;
unsigned mode_number, blockflag, blocksize;
int i, j;
uint8_t no_residue[255];
uint8_t do_not_decode[255];
vorbis_mapping *ma... | true | FFmpeg | f74ce3a60d6ef49080df85c44b54280357109f56 | static int vorbis_parse_audio_packet(vorbis_context *vc)
{
GetBitContext *gb = &vc->gb;
FFTContext *mdct;
unsigned previous_window = vc->previous_window;
unsigned mode_number, blockflag, blocksize;
int i, j;
uint8_t no_residue[255];
uint8_t do_not_decode[255];
vorbis_mapping *ma... | {
"code": [
" int ch_left = vc->audio_channels;",
" ch_floor_ptr += blocksize / 2;",
" vorbis_residue_decode(vc, residue, ch, do_not_decode, ch_res_ptr, blocksize/2);",
" ch_res_ptr += ch * blocksize / 2;"
],
"line_no": [
31,
119,
189,
193
]
} | static int FUNC_0(vorbis_context *VAR_0)
{
GetBitContext *gb = &VAR_0->gb;
FFTContext *mdct;
unsigned VAR_1 = VAR_0->VAR_1;
unsigned VAR_2, VAR_3, VAR_4;
int VAR_5, VAR_6;
uint8_t no_residue[255];
uint8_t do_not_decode[255];
vorbis_mapping *mapping;
float *VAR_7 = VAR_0->... | [
"static int FUNC_0(vorbis_context *VAR_0)\n{",
"GetBitContext *gb = &VAR_0->gb;",
"FFTContext *mdct;",
"unsigned VAR_1 = VAR_0->VAR_1;",
"unsigned VAR_2, VAR_3, VAR_4;",
"int VAR_5, VAR_6;",
"uint8_t no_residue[255];",
"uint8_t do_not_decode[255];",
"vorbis_mapping *mapping;",
"float *VAR_7 = VA... | [
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
... |
1,730 | static int mpc8_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
{
AVStream *st = s->streams[stream_index];
MPCContext *c = s->priv_data;
int index = av_index_search_timestamp(st, timestamp, flags);
if(index < 0) return -1;
avio_seek(s->pb, st->index_entries[inde... | true | FFmpeg | 88ad79415c3821e5c4f3cb4d5b289d772fcac621 | static int mpc8_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
{
AVStream *st = s->streams[stream_index];
MPCContext *c = s->priv_data;
int index = av_index_search_timestamp(st, timestamp, flags);
if(index < 0) return -1;
avio_seek(s->pb, st->index_entries[inde... | {
"code": [
" avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET);"
],
"line_no": [
15
]
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2, int VAR_3)
{
AVStream *st = VAR_0->streams[VAR_1];
MPCContext *c = VAR_0->priv_data;
int VAR_4 = av_index_search_timestamp(st, VAR_2, VAR_3);
if(VAR_4 < 0) return -1;
avio_seek(VAR_0->pb, st->index_entries[VAR_4].pos, SEEK_S... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2, int VAR_3)\n{",
"AVStream *st = VAR_0->streams[VAR_1];",
"MPCContext *c = VAR_0->priv_data;",
"int VAR_4 = av_index_search_timestamp(st, VAR_2, VAR_3);",
"if(VAR_4 < 0) return -1;",
"avio_seek(VAR_0->pb, st->index_entries[VAR_4].pos, SEE... | [
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
1,731 | static void pred8x8_left_dc_rv40_c(uint8_t *src, int stride){
int i;
int dc0;
dc0=0;
for(i=0;i<8; i++)
dc0+= src[-1+i*stride];
dc0= 0x01010101*((dc0 + 4)>>3);
for(i=0; i<8; i++){
((uint32_t*)(src+i*stride))[0]=
((uint32_t*)(src+i*stride))[1]= dc0;
}
}
| true | FFmpeg | 60f10e0ad37418cc697765d85b0bc22db70f726a | static void pred8x8_left_dc_rv40_c(uint8_t *src, int stride){
int i;
int dc0;
dc0=0;
for(i=0;i<8; i++)
dc0+= src[-1+i*stride];
dc0= 0x01010101*((dc0 + 4)>>3);
for(i=0; i<8; i++){
((uint32_t*)(src+i*stride))[0]=
((uint32_t*)(src+i*stride))[1]= dc0;
}
}
| {
"code": [
" int dc0;",
" int dc0;"
],
"line_no": [
5,
5
]
} | static void FUNC_0(uint8_t *VAR_0, int VAR_1){
int VAR_2;
int VAR_3;
VAR_3=0;
for(VAR_2=0;VAR_2<8; VAR_2++)
VAR_3+= VAR_0[-1+VAR_2*VAR_1];
VAR_3= 0x01010101*((VAR_3 + 4)>>3);
for(VAR_2=0; VAR_2<8; VAR_2++){
((uint32_t*)(VAR_0+VAR_2*VAR_1))[0]=
((uint32_t*)(VA... | [
"static void FUNC_0(uint8_t *VAR_0, int VAR_1){",
"int VAR_2;",
"int VAR_3;",
"VAR_3=0;",
"for(VAR_2=0;VAR_2<8; VAR_2++)",
"VAR_3+= VAR_0[-1+VAR_2*VAR_1];",
"VAR_3= 0x01010101*((VAR_3 + 4)>>3);",
"for(VAR_2=0; VAR_2<8; VAR_2++){",
"((uint32_t*)(VAR_0+VAR_2*VAR_1))[0]=\n((uint32_t*)(VAR_0+VAR_2*VAR_1... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
25
],
[
27
]
] |
1,732 | static void usb_msd_command_complete(SCSIBus *bus, int reason, uint32_t tag,
uint32_t arg)
{
MSDState *s = DO_UPCAST(MSDState, dev.qdev, bus->qbus.parent);
USBPacket *p = s->packet;
if (tag != s->tag) {
fprintf(stderr, "usb-msd: Unexpected SCSI Tag 0x%x\n... | true | qemu | 5c6c0e513600ba57c3e73b7151d3c0664438f7b5 | static void usb_msd_command_complete(SCSIBus *bus, int reason, uint32_t tag,
uint32_t arg)
{
MSDState *s = DO_UPCAST(MSDState, dev.qdev, bus->qbus.parent);
USBPacket *p = s->packet;
if (tag != s->tag) {
fprintf(stderr, "usb-msd: Unexpected SCSI Tag 0x%x\n... | {
"code": [
"static void usb_msd_command_complete(SCSIBus *bus, int reason, uint32_t tag,",
" uint32_t arg)",
" MSDState *s = DO_UPCAST(MSDState, dev.qdev, bus->qbus.parent);",
" if (tag != s->tag) {",
" fprintf(stderr, \"usb-msd: Unexpected SCSI Ta... | static void FUNC_0(SCSIBus *VAR_0, int VAR_1, uint32_t VAR_2,
uint32_t VAR_3)
{
MSDState *s = DO_UPCAST(MSDState, dev.qdev, VAR_0->qbus.parent);
USBPacket *p = s->packet;
if (VAR_2 != s->VAR_2) {
fprintf(stderr, "usb-msd: Unexpected SCSI Tag 0x%x\n", VAR_... | [
"static void FUNC_0(SCSIBus *VAR_0, int VAR_1, uint32_t VAR_2,\nuint32_t VAR_3)\n{",
"MSDState *s = DO_UPCAST(MSDState, dev.qdev, VAR_0->qbus.parent);",
"USBPacket *p = s->packet;",
"if (VAR_2 != s->VAR_2) {",
"fprintf(stderr, \"usb-msd: Unexpected SCSI Tag 0x%x\\n\", VAR_2);",
"}",
"if (VAR_1 == SCSI_R... | [
1,
1,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
... |
1,733 | static int latm_decode_frame(AVCodecContext *avctx, void *out, int *out_size,
AVPacket *avpkt)
{
struct LATMContext *latmctx = avctx->priv_data;
int muxlength, err;
GetBitContext gb;
if (avpkt->size == 0)
return 0;
init_get_bits(... | true | FFmpeg | 42da8ea8e848e65611f0c606cd2c96d3a70c041d | static int latm_decode_frame(AVCodecContext *avctx, void *out, int *out_size,
AVPacket *avpkt)
{
struct LATMContext *latmctx = avctx->priv_data;
int muxlength, err;
GetBitContext gb;
if (avpkt->size == 0)
return 0;
init_get_bits(... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
struct LATMContext *VAR_4 = VAR_0->priv_data;
int VAR_5, VAR_6;
GetBitContext gb;
if (VAR_3->size == 0)
return 0;
init_get_bits(&gb, VAR_3->data... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"struct LATMContext *VAR_4 = VAR_0->priv_data;",
"int VAR_5, VAR_6;",
"GetBitContext gb;",
"if (VAR_3->size == 0)\nreturn 0;",
"init_get_bits(&gb, VAR_3->data, VAR_3->size * 8);",
"if (get_bit... | [
0,
0,
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
],
[
27,
29
],
[
33
],
[
37,
39
],
[
43,
45
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[
60,
62
],
[
64
... |
1,734 | static void quantize_and_encode_band_mips(struct AACEncContext *s, PutBitContext *pb,
const float *in, float *out, int size, int scale_idx,
int cb, const float lambda, int rtz)
{
quantize_and_encode_band_cost(s, pb, in, out, NUL... | true | FFmpeg | 01ecb7172b684f1c4b3e748f95c5a9a494ca36ec | static void quantize_and_encode_band_mips(struct AACEncContext *s, PutBitContext *pb,
const float *in, float *out, int size, int scale_idx,
int cb, const float lambda, int rtz)
{
quantize_and_encode_band_cost(s, pb, in, out, NUL... | {
"code": [
" INFINITY, NULL, (rtz) ? ROUND_TO_ZERO : ROUND_STANDARD);"
],
"line_no": [
11
]
} | static void FUNC_0(struct AACEncContext *VAR_0, PutBitContext *VAR_1,
const float *VAR_2, float *VAR_3, int VAR_4, int VAR_5,
int VAR_6, const float VAR_7, int VAR_8)
{
quantize_and_encode_band_cost(VAR_0, VAR_1, VAR_2, VAR_3, N... | [
"static void FUNC_0(struct AACEncContext *VAR_0, PutBitContext *VAR_1,\nconst float *VAR_2, float *VAR_3, int VAR_4, int VAR_5,\nint VAR_6, const float VAR_7, int VAR_8)\n{",
"quantize_and_encode_band_cost(VAR_0, VAR_1, VAR_2, VAR_3, NULL, VAR_4, VAR_5, VAR_6, VAR_7,\nINFINITY, NULL, (VAR_8) ? ROUND_TO_ZERO : ROU... | [
0,
1,
0
] | [
[
1,
3,
5,
7
],
[
9,
11
],
[
13
]
] |
1,735 | void visit_type_number(Visitor *v, double *obj, const char *name, Error **errp)
{
if (!error_is_set(errp)) {
v->type_number(v, obj, name, errp);
}
}
| true | qemu | 297a3646c2947ee64a6d42ca264039732c6218e0 | void visit_type_number(Visitor *v, double *obj, const char *name, Error **errp)
{
if (!error_is_set(errp)) {
v->type_number(v, obj, name, errp);
}
}
| {
"code": [
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
... | void FUNC_0(Visitor *VAR_0, double *VAR_1, const char *VAR_2, Error **VAR_3)
{
if (!error_is_set(VAR_3)) {
VAR_0->type_number(VAR_0, VAR_1, VAR_2, VAR_3);
}
}
| [
"void FUNC_0(Visitor *VAR_0, double *VAR_1, const char *VAR_2, Error **VAR_3)\n{",
"if (!error_is_set(VAR_3)) {",
"VAR_0->type_number(VAR_0, VAR_1, VAR_2, VAR_3);",
"}",
"}"
] | [
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
1,737 | static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)
{
int32_t offset;
int rs, rt, rd, sa;
uint32_t op, op1, op2;
int16_t imm;
/* make sure instructions are on a word boundary */
if (ctx->pc & 0x3) {
env->CP0_BadVAddr = ctx->pc;
generate_except... | true | qemu | 240ce26a0533a6e5ee472789fbfbd9f7f939197e | static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)
{
int32_t offset;
int rs, rt, rd, sa;
uint32_t op, op1, op2;
int16_t imm;
if (ctx->pc & 0x3) {
env->CP0_BadVAddr = ctx->pc;
generate_exception(ctx, EXCP_AdEL);
return;
}
... | {
"code": [
" *is_branch = 1;",
" *is_branch = 1;",
" *is_branch = 1;",
" *is_branch = 1;",
" *is_branch = 1;",
" *is_branch = 1;",
" *is_branch = 1;",
" *is_branch = 1;",
" *is_branch = 1;",
" ... | static void FUNC_0 (CPUMIPSState *VAR_0, DisasContext *VAR_1, int *VAR_2)
{
int32_t offset;
int VAR_3, VAR_4, VAR_5, VAR_6;
uint32_t op, op1, op2;
int16_t imm;
if (VAR_1->pc & 0x3) {
VAR_0->CP0_BadVAddr = VAR_1->pc;
generate_exception(VAR_1, EXCP_AdEL);
retur... | [
"static void FUNC_0 (CPUMIPSState *VAR_0, DisasContext *VAR_1, int *VAR_2)\n{",
"int32_t offset;",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"uint32_t op, op1, op2;",
"int16_t imm;",
"if (VAR_1->pc & 0x3) {",
"VAR_0->CP0_BadVAddr = VAR_1->pc;",
"generate_exception(VAR_1, EXCP_AdEL);",
"return;",
"}",
"... | [
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
... |
1,738 | static int lzw_get_code(struct LZWState * s)
{
int c;
if(s->mode == FF_LZW_GIF) {
while (s->bbits < s->cursize) {
if (!s->bs) {
s->bs = *s->pbuf++;
if(!s->bs) {
s->eob_reached = 1;
break;
}
... | true | FFmpeg | 5f01beb54846de8764c15206aa63086238dde493 | static int lzw_get_code(struct LZWState * s)
{
int c;
if(s->mode == FF_LZW_GIF) {
while (s->bbits < s->cursize) {
if (!s->bs) {
s->bs = *s->pbuf++;
if(!s->bs) {
s->eob_reached = 1;
break;
}
... | {
"code": [
" if(!s->bs) {",
" s->eob_reached = 1;",
" break;",
" if (s->pbuf >= s->ebuf) {",
" s->eob_reached = 1;"
],
"line_no": [
17,
19,
21,
43,
45
]
} | static int FUNC_0(struct LZWState * VAR_0)
{
int VAR_1;
if(VAR_0->mode == FF_LZW_GIF) {
while (VAR_0->bbits < VAR_0->cursize) {
if (!VAR_0->bs) {
VAR_0->bs = *VAR_0->pbuf++;
if(!VAR_0->bs) {
VAR_0->eob_reached = 1;
... | [
"static int FUNC_0(struct LZWState * VAR_0)\n{",
"int VAR_1;",
"if(VAR_0->mode == FF_LZW_GIF) {",
"while (VAR_0->bbits < VAR_0->cursize) {",
"if (!VAR_0->bs) {",
"VAR_0->bs = *VAR_0->pbuf++;",
"if(!VAR_0->bs) {",
"VAR_0->eob_reached = 1;",
"break;",
"}",
"}",
"VAR_0->bbuf |= (*VAR_0->pbuf++) <... | [
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
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
],
[
39
],
[
41
],
[
43... |
1,739 | static av_cold int yop_decode_init(AVCodecContext *avctx)
{
YopDecContext *s = avctx->priv_data;
s->avctx = avctx;
if (avctx->width & 1 || avctx->height & 1 ||
av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0) {
av_log(avctx, AV_LOG_ERROR, "YOP has invalid dimensions\n");
... | true | FFmpeg | 77a4c8b959fa9bc6bcaa42b40a0b046cdf3fec38 | static av_cold int yop_decode_init(AVCodecContext *avctx)
{
YopDecContext *s = avctx->priv_data;
s->avctx = avctx;
if (avctx->width & 1 || avctx->height & 1 ||
av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0) {
av_log(avctx, AV_LOG_ERROR, "YOP has invalid dimensions\n");
... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
YopDecContext *s = avctx->priv_data;
s->avctx = avctx;
if (avctx->width & 1 || avctx->height & 1 ||
av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0) {
av_log(avctx, AV_LOG_ERROR, "YOP has invalid dimensions\n");
return... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"YopDecContext *s = avctx->priv_data;",
"s->avctx = avctx;",
"if (avctx->width & 1 || avctx->height & 1 ||\nav_image_check_size(avctx->width, avctx->height, 0, avctx) < 0) {",
"av_log(avctx, AV_LOG_ERROR, \"YOP has invalid dimensions\\n\");",
"return ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5,
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14,
15
],
[
16,
17
],
[
18
]
] |
1,740 | static int local_open(FsContext *ctx, V9fsPath *fs_path,
int flags, V9fsFidOpenState *fs)
{
char *buffer;
char *path = fs_path->data;
int fd;
buffer = rpath(ctx, path);
fd = open(buffer, flags | O_NOFOLLOW);
g_free(buffer);
if (fd == -1) {
return -1;... | true | qemu | 996a0d76d7e756e4023ef79bc37bfe629b9eaca7 | static int local_open(FsContext *ctx, V9fsPath *fs_path,
int flags, V9fsFidOpenState *fs)
{
char *buffer;
char *path = fs_path->data;
int fd;
buffer = rpath(ctx, path);
fd = open(buffer, flags | O_NOFOLLOW);
g_free(buffer);
if (fd == -1) {
return -1;... | {
"code": [
" char *buffer;",
" char *path = fs_path->data;",
" buffer = rpath(ctx, path);",
" fd = open(buffer, flags | O_NOFOLLOW);",
" g_free(buffer);",
" char *buffer;",
" char *path = fs_path->data;",
" buffer = rpath(ctx, path);",
" g_free(buffer);"... | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
int VAR_2, V9fsFidOpenState *VAR_3)
{
char *VAR_4;
char *VAR_5 = VAR_1->data;
int VAR_6;
VAR_4 = rpath(VAR_0, VAR_5);
VAR_6 = open(VAR_4, VAR_2 | O_NOFOLLOW);
g_free(VAR_4);
if (VAR_6 == -1) {
retu... | [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,\nint VAR_2, V9fsFidOpenState *VAR_3)\n{",
"char *VAR_4;",
"char *VAR_5 = VAR_1->data;",
"int VAR_6;",
"VAR_4 = rpath(VAR_0, VAR_5);",
"VAR_6 = open(VAR_4, VAR_2 | O_NOFOLLOW);",
"g_free(VAR_4);",
"if (VAR_6 == -1) {",
"return -1;",
"}",
"VAR_... | [
0,
1,
1,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
1,741 | static int local_lstat(FsContext *fs_ctx, V9fsPath *fs_path, struct stat *stbuf)
{
int err;
char *buffer;
char *path = fs_path->data;
buffer = rpath(fs_ctx, path);
err = lstat(buffer, stbuf);
if (err) {
goto err_out;
}
if (fs_ctx->export_flags & V9FS_SM_MAPPED) {
... | true | qemu | f9aef99b3e6df88036436b0d3dc3d504b9346c8c | static int local_lstat(FsContext *fs_ctx, V9fsPath *fs_path, struct stat *stbuf)
{
int err;
char *buffer;
char *path = fs_path->data;
buffer = rpath(fs_ctx, path);
err = lstat(buffer, stbuf);
if (err) {
goto err_out;
}
if (fs_ctx->export_flags & V9FS_SM_MAPPED) {
... | {
"code": [
" int err;",
" char *buffer;",
" char *path = fs_path->data;",
" buffer = rpath(fs_ctx, path);",
" err = lstat(buffer, stbuf);",
" if (getxattr(buffer, \"user.virtfs.uid\", &tmp_uid, sizeof(uid_t)) > 0) {",
" if (getxattr(buffer, \"user.virtfs.gid\... | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1, struct stat *VAR_2)
{
int VAR_3;
char *VAR_4;
char *VAR_5 = VAR_1->data;
VAR_4 = rpath(VAR_0, VAR_5);
VAR_3 = lstat(VAR_4, VAR_2);
if (VAR_3) {
goto err_out;
}
if (VAR_0->export_flags & V9FS_SM_MAPPED) {
... | [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1, struct stat *VAR_2)\n{",
"int VAR_3;",
"char *VAR_4;",
"char *VAR_5 = VAR_1->data;",
"VAR_4 = rpath(VAR_0, VAR_5);",
"VAR_3 = lstat(VAR_4, VAR_2);",
"if (VAR_3) {",
"goto err_out;",
"}",
"if (VAR_0->export_flags & V9FS_SM_MAPPED) {",
"uid_t ... | [
0,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
1,
0,
0,
1,
0,
0,
0,
1,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
1,742 | int vnc_tls_set_x509_creds_dir(VncDisplay *vd,
const char *certdir)
{
if (vnc_set_x509_credential(vd, certdir, X509_CA_CERT_FILE, &vd->tls.x509cacert, 0) < 0)
goto cleanup;
if (vnc_set_x509_credential(vd, certdir, X509_CA_CRL_FILE, &vd->tls.x509cacrl, 1) < 0)
... | true | qemu | 3e305e4a4752f70c0b5c3cf5b43ec957881714f7 | int vnc_tls_set_x509_creds_dir(VncDisplay *vd,
const char *certdir)
{
if (vnc_set_x509_credential(vd, certdir, X509_CA_CERT_FILE, &vd->tls.x509cacert, 0) < 0)
goto cleanup;
if (vnc_set_x509_credential(vd, certdir, X509_CA_CRL_FILE, &vd->tls.x509cacrl, 1) < 0)
... | {
"code": [
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
"int vnc_tls_set_x509_creds_dir(VncDisplay *vd,",
" const char *certdir)",
" if (vnc_set_x509_credential(vd, certdir, X509_CA_CERT_FILE, &vd->tls.x509cacert... | int FUNC_0(VncDisplay *VAR_0,
const char *VAR_1)
{
if (vnc_set_x509_credential(VAR_0, VAR_1, X509_CA_CERT_FILE, &VAR_0->tls.x509cacert, 0) < 0)
goto cleanup;
if (vnc_set_x509_credential(VAR_0, VAR_1, X509_CA_CRL_FILE, &VAR_0->tls.x509cacrl, 1) < 0)
goto clean... | [
"int FUNC_0(VncDisplay *VAR_0,\nconst char *VAR_1)\n{",
"if (vnc_set_x509_credential(VAR_0, VAR_1, X509_CA_CERT_FILE, &VAR_0->tls.x509cacert, 0) < 0)\ngoto cleanup;",
"if (vnc_set_x509_credential(VAR_0, VAR_1, X509_CA_CRL_FILE, &VAR_0->tls.x509cacrl, 1) < 0)\ngoto cleanup;",
"if (vnc_set_x509_credential(VAR_0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
11,
13
],
[
15,
17
],
[
19,
21
],
[
25
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
1,743 | int mm_support(void)
{
int rval;
int eax, ebx, ecx, edx;
__asm__ __volatile__ (
/* See if CPUID instruction is supported ... */
/* ... Get copies of EFLAGS into eax and ecx */
"pushf\n\t"
"p... | false | FFmpeg | 8b4d077fc9de4d57ee874ca9007ed1553f224853 | int mm_support(void)
{
int rval;
int eax, ebx, ecx, edx;
__asm__ __volatile__ (
"pushf\n\t"
"pop %0\n\t"
"movl %0, %1\n\t"
... | {
"code": [],
"line_no": []
} | int FUNC_0(void)
{
int VAR_0;
int VAR_1, VAR_2, VAR_3, VAR_4;
__asm__ __volatile__ (
"pushf\n\t"
"pop %0\n\t"
"movl %0, %1\n\t"
... | [
"int FUNC_0(void)\n{",
"int VAR_0;",
"int VAR_1, VAR_2, VAR_3, VAR_4;",
"__asm__ __volatile__ (\n\"pushf\\n\\t\"\n\"pop %0\\n\\t\"\n\"movl %0, %1\\n\\t\"\n\"xorl $0x200000, %0\\n\\t\"\n\"push %0\\n\\t\"\n\"popf\\n\\t\"\n\"pushf\\n\\t\"\n\"pop %0\\n\\t\"\n: \"=a\" (VAR_1), \"=c\" (VAR_3)\n:\n: \"cc\"\n);",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
17,
19,
21,
29,
31,
33,
39,
41,
43,
45,
47,
49
],
[
53,
55
],
[
59
],
[
63,
65,
67
],
[
73,
75
],
[
77,
79
],
[
81
],
[
83,
85... |
1,744 | static uint64_t xscom_read(void *opaque, hwaddr addr, unsigned width)
{
PnvChip *chip = opaque;
uint32_t pcba = pnv_xscom_pcba(chip, addr);
uint64_t val = 0;
MemTxResult result;
/* Handle some SCOMs here before dispatch */
val = xscom_read_default(chip, pcba);
if (val != -1) {
... | true | qemu | f81e551229070f01bf747eda3f05960182db9d2a | static uint64_t xscom_read(void *opaque, hwaddr addr, unsigned width)
{
PnvChip *chip = opaque;
uint32_t pcba = pnv_xscom_pcba(chip, addr);
uint64_t val = 0;
MemTxResult result;
val = xscom_read_default(chip, pcba);
if (val != -1) {
goto complete;
}
val = addr... | {
"code": [
" val = address_space_ldq(&chip->xscom_as, pcba << 3, MEMTXATTRS_UNSPECIFIED,",
" &result);"
],
"line_no": [
27,
29
]
} | static uint64_t FUNC_0(void *opaque, hwaddr addr, unsigned width)
{
PnvChip *chip = opaque;
uint32_t pcba = pnv_xscom_pcba(chip, addr);
uint64_t val = 0;
MemTxResult result;
val = xscom_read_default(chip, pcba);
if (val != -1) {
goto complete;
}
val = address_... | [
"static uint64_t FUNC_0(void *opaque, hwaddr addr, unsigned width)\n{",
"PnvChip *chip = opaque;",
"uint32_t pcba = pnv_xscom_pcba(chip, addr);",
"uint64_t val = 0;",
"MemTxResult result;",
"val = xscom_read_default(chip, pcba);",
"if (val != -1) {",
"goto complete;",
"}",
"val = address_space_ldq... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
45,
47
],
[
49
],
[
51
]
] |
1,745 | static int remove_mapping(BDRVVVFATState* s, int mapping_index)
{
mapping_t* mapping = array_get(&(s->mapping), mapping_index);
mapping_t* first_mapping = array_get(&(s->mapping), 0);
/* free mapping */
if (mapping->first_mapping_index < 0)
free(mapping->path);
/* remove from s->mapping ... | true | qemu | ce137829e7e58fcdc5ba63b5e256f972e80be438 | static int remove_mapping(BDRVVVFATState* s, int mapping_index)
{
mapping_t* mapping = array_get(&(s->mapping), mapping_index);
mapping_t* first_mapping = array_get(&(s->mapping), 0);
if (mapping->first_mapping_index < 0)
free(mapping->path);
array_remove(&(s->mapping), mapping_in... | {
"code": [
" if (mapping->first_mapping_index < 0)",
"\tfree(mapping->path);"
],
"line_no": [
13,
15
]
} | static int FUNC_0(BDRVVVFATState* VAR_0, int VAR_1)
{
mapping_t* mapping = array_get(&(VAR_0->mapping), VAR_1);
mapping_t* first_mapping = array_get(&(VAR_0->mapping), 0);
if (mapping->first_mapping_index < 0)
free(mapping->path);
array_remove(&(VAR_0->mapping), VAR_1);
... | [
"static int FUNC_0(BDRVVVFATState* VAR_0, int VAR_1)\n{",
"mapping_t* mapping = array_get(&(VAR_0->mapping), VAR_1);",
"mapping_t* first_mapping = array_get(&(VAR_0->mapping), 0);",
"if (mapping->first_mapping_index < 0)\nfree(mapping->path);",
"array_remove(&(VAR_0->mapping), VAR_1);",
"adjust_mapping_in... | [
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13,
15
],
[
21
],
[
27
],
[
31,
33,
35
],
[
39
],
[
41
]
] |
1,746 | static void test_redirector_tx(void)
{
#ifndef _WIN32
/* socketpair(PF_UNIX) which does not exist on windows */
int backend_sock[2], recv_sock;
char *cmdline;
uint32_t ret = 0, len = 0;
char send_buf[] = "Hello!!";
char sock_path0[] = "filter-redirector0.XXXXXX";
char sock_path1[] = "... | true | qemu | dc491fead04a92a612df93b85b0ebf9dcc3f6684 | static void test_redirector_tx(void)
{
#ifndef _WIN32
int backend_sock[2], recv_sock;
char *cmdline;
uint32_t ret = 0, len = 0;
char send_buf[] = "Hello!!";
char sock_path0[] = "filter-redirector0.XXXXXX";
char sock_path1[] = "filter-redirector1.XXXXXX";
char *recv_buf;
uin... | {
"code": [
" qmp(\"{ 'execute' : 'query-status'}\");",
" qmp(\"{ 'execute' : 'query-status'}\");",
" qmp(\"{ 'execute' : 'query-status'}\");"
],
"line_no": [
85,
85,
85
]
} | static void FUNC_0(void)
{
#ifndef _WIN32
int VAR_0[2], VAR_1;
char *VAR_2;
uint32_t ret = 0, len = 0;
char VAR_3[] = "Hello!!";
char VAR_4[] = "filter-redirector0.XXXXXX";
char VAR_5[] = "filter-redirector1.XXXXXX";
char *VAR_6;
uint32_t size = sizeof(VAR_3);
size = h... | [
"static void FUNC_0(void)\n{",
"#ifndef _WIN32\nint VAR_0[2], VAR_1;",
"char *VAR_2;",
"uint32_t ret = 0, len = 0;",
"char VAR_3[] = \"Hello!!\";",
"char VAR_4[] = \"filter-redirector0.XXXXXX\";",
"char VAR_5[] = \"filter-redirector1.XXXXXX\";",
"char *VAR_6;",
"uint32_t size = sizeof(VAR_3);",
"s... | [
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
] | [
[
1,
3
],
[
5,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47,
49,
51,
53,
55,
5... |
1,747 | void do_divduo (void)
{
if (likely((uint64_t)T1 != 0)) {
xer_ov = 0;
T0 = (uint64_t)T0 / (uint64_t)T1;
} else {
xer_so = 1;
xer_ov = 1;
T0 = 0;
}
}
| true | qemu | 966439a67830239a6c520c5df6c55627b8153c8b | void do_divduo (void)
{
if (likely((uint64_t)T1 != 0)) {
xer_ov = 0;
T0 = (uint64_t)T0 / (uint64_t)T1;
} else {
xer_so = 1;
xer_ov = 1;
T0 = 0;
}
}
| {
"code": [
" xer_so = 1;",
" xer_so = 1;",
" xer_so = 1;",
" xer_so = 1;",
" xer_so = 1;",
" xer_so = 1;",
" xer_so = 1;",
" xer_so = 1;",
" xer_so = 1;",
" xer_so = 1;",
" xer_so = 1;",
" ... | void FUNC_0 (void)
{
if (likely((uint64_t)T1 != 0)) {
xer_ov = 0;
T0 = (uint64_t)T0 / (uint64_t)T1;
} else {
xer_so = 1;
xer_ov = 1;
T0 = 0;
}
}
| [
"void FUNC_0 (void)\n{",
"if (likely((uint64_t)T1 != 0)) {",
"xer_ov = 0;",
"T0 = (uint64_t)T0 / (uint64_t)T1;",
"} else {",
"xer_so = 1;",
"xer_ov = 1;",
"T0 = 0;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
1,748 | static int megasas_dcmd_cfg_read(MegasasState *s, MegasasCmd *cmd)
{
uint8_t data[4096];
struct mfi_config_data *info;
int num_pd_disks = 0, array_offset, ld_offset;
BusChild *kid;
if (cmd->iov_size > 4096) {
return MFI_STAT_INVALID_PARAMETER;
}
QTAILQ_FOREACH(kid, &s->b... | true | qemu | d37af740730dbbb93960cd318e040372d04d6dcf | static int megasas_dcmd_cfg_read(MegasasState *s, MegasasCmd *cmd)
{
uint8_t data[4096];
struct mfi_config_data *info;
int num_pd_disks = 0, array_offset, ld_offset;
BusChild *kid;
if (cmd->iov_size > 4096) {
return MFI_STAT_INVALID_PARAMETER;
}
QTAILQ_FOREACH(kid, &s->b... | {
"code": [
" uint8_t data[4096];"
],
"line_no": [
5
]
} | static int FUNC_0(MegasasState *VAR_0, MegasasCmd *VAR_1)
{
uint8_t data[4096];
struct mfi_config_data *VAR_2;
int VAR_3 = 0, VAR_4, VAR_5;
BusChild *kid;
if (VAR_1->iov_size > 4096) {
return MFI_STAT_INVALID_PARAMETER;
}
QTAILQ_FOREACH(kid, &VAR_0->bus.qbus.children, si... | [
"static int FUNC_0(MegasasState *VAR_0, MegasasCmd *VAR_1)\n{",
"uint8_t data[4096];",
"struct mfi_config_data *VAR_2;",
"int VAR_3 = 0, VAR_4, VAR_5;",
"BusChild *kid;",
"if (VAR_1->iov_size > 4096) {",
"return MFI_STAT_INVALID_PARAMETER;",
"}",
"QTAILQ_FOREACH(kid, &VAR_0->bus.qbus.children, sibli... | [
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55,
57
],
[... |
1,749 | static void lsi_do_msgout(LSIState *s)
{
uint8_t msg;
int len;
uint32_t current_tag;
SCSIDevice *current_dev;
lsi_request *p, *p_next;
int id;
if (s->current) {
current_tag = s->current->tag;
} else {
current_tag = s->select_tag;
}
id = (current_tag... | true | qemu | 5c6c0e513600ba57c3e73b7151d3c0664438f7b5 | static void lsi_do_msgout(LSIState *s)
{
uint8_t msg;
int len;
uint32_t current_tag;
SCSIDevice *current_dev;
lsi_request *p, *p_next;
int id;
if (s->current) {
current_tag = s->current->tag;
} else {
current_tag = s->select_tag;
}
id = (current_tag... | {
"code": [
" lsi_request *p, *p_next;",
" current_dev->info->cancel_io(current_dev, current_tag);",
" current_dev->info->cancel_io(current_dev, current_tag);",
" current_dev->info->cancel_io(current_dev, p->tag);"
],
"line_no": [
13,
129,
12... | static void FUNC_0(LSIState *VAR_0)
{
uint8_t msg;
int VAR_1;
uint32_t current_tag;
SCSIDevice *current_dev;
lsi_request *p, *p_next;
int VAR_2;
if (VAR_0->current) {
current_tag = VAR_0->current->tag;
} else {
current_tag = VAR_0->select_tag;
}
VAR... | [
"static void FUNC_0(LSIState *VAR_0)\n{",
"uint8_t msg;",
"int VAR_1;",
"uint32_t current_tag;",
"SCSIDevice *current_dev;",
"lsi_request *p, *p_next;",
"int VAR_2;",
"if (VAR_0->current) {",
"current_tag = VAR_0->current->tag;",
"} else {",
"current_tag = VAR_0->select_tag;",
"}",
"VAR_2 = ... | [
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,
1,
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
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47,... |
1,751 | static void local_mapped_file_attr(FsContext *ctx, const char *path,
struct stat *stbuf)
{
FILE *fp;
char buf[ATTR_MAX];
char attr_path[PATH_MAX];
local_mapped_attr_path(ctx, path, attr_path);
fp = local_fopen(attr_path, "r");
if (!fp) {
retu... | false | qemu | 4fa4ce7107c6ec432f185307158c5df91ce54308 | static void local_mapped_file_attr(FsContext *ctx, const char *path,
struct stat *stbuf)
{
FILE *fp;
char buf[ATTR_MAX];
char attr_path[PATH_MAX];
local_mapped_attr_path(ctx, path, attr_path);
fp = local_fopen(attr_path, "r");
if (!fp) {
retu... | {
"code": [],
"line_no": []
} | static void FUNC_0(FsContext *VAR_0, const char *VAR_1,
struct stat *VAR_2)
{
FILE *fp;
char VAR_3[ATTR_MAX];
char VAR_4[PATH_MAX];
local_mapped_attr_path(VAR_0, VAR_1, VAR_4);
fp = local_fopen(VAR_4, "r");
if (!fp) {
return;
}
mems... | [
"static void FUNC_0(FsContext *VAR_0, const char *VAR_1,\nstruct stat *VAR_2)\n{",
"FILE *fp;",
"char VAR_3[ATTR_MAX];",
"char VAR_4[PATH_MAX];",
"local_mapped_attr_path(VAR_0, VAR_1, VAR_4);",
"fp = local_fopen(VAR_4, \"r\");",
"if (!fp) {",
"return;",
"}",
"memset(VAR_3, 0, ATTR_MAX);",
"while... | [
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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
1,752 | static int qemu_rbd_parsename(const char *filename,
char *pool, int pool_len,
char *snap, int snap_len,
char *name, int name_len,
char *conf, int conf_len,
Error **e... | false | qemu | c7cacb3e7a2e9fdf929c993b98268e4179147cbb | static int qemu_rbd_parsename(const char *filename,
char *pool, int pool_len,
char *snap, int snap_len,
char *name, int name_len,
char *conf, int conf_len,
Error **e... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0,
char *VAR_1, int VAR_2,
char *VAR_3, int VAR_4,
char *VAR_5, int VAR_6,
char *VAR_7, int VAR_8,
Error **VAR_9)
{
const cha... | [
"static int FUNC_0(const char *VAR_0,\nchar *VAR_1, int VAR_2,\nchar *VAR_3, int VAR_4,\nchar *VAR_5, int VAR_6,\nchar *VAR_7, int VAR_8,\nError **VAR_9)\n{",
"const char *VAR_10;",
"char *VAR_11, *VAR_12;",
"int VAR_13 = 0;",
"char *VAR_14;",
"Error *local_err = NULL;",
"if (!strstart(VAR_0, \"rbd:\", ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47,
49
],
[
51
],
[
53
... |
1,753 | static void vtd_realize(DeviceState *dev, Error **errp)
{
MachineState *ms = MACHINE(qdev_get_machine());
MachineClass *mc = MACHINE_GET_CLASS(ms);
PCMachineState *pcms =
PC_MACHINE(object_dynamic_cast(OBJECT(ms), TYPE_PC_MACHINE));
PCIBus *bus;
IntelIOMMUState *s = INTEL_IOMMU_DEVICE... | false | qemu | 29396ed9acfaee9936377ddece4b05452b417861 | static void vtd_realize(DeviceState *dev, Error **errp)
{
MachineState *ms = MACHINE(qdev_get_machine());
MachineClass *mc = MACHINE_GET_CLASS(ms);
PCMachineState *pcms =
PC_MACHINE(object_dynamic_cast(OBJECT(ms), TYPE_PC_MACHINE));
PCIBus *bus;
IntelIOMMUState *s = INTEL_IOMMU_DEVICE... | {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{
MachineState *ms = MACHINE(qdev_get_machine());
MachineClass *mc = MACHINE_GET_CLASS(ms);
PCMachineState *pcms =
PC_MACHINE(object_dynamic_cast(OBJECT(ms), TYPE_PC_MACHINE));
PCIBus *bus;
IntelIOMMUState *s = INTEL_IOMMU_DEVICE(V... | [
"static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{",
"MachineState *ms = MACHINE(qdev_get_machine());",
"MachineClass *mc = MACHINE_GET_CLASS(ms);",
"PCMachineState *pcms =\nPC_MACHINE(object_dynamic_cast(OBJECT(ms), TYPE_PC_MACHINE));",
"PCIBus *bus;",
"IntelIOMMUState *s = INTEL_IOMMU_DEVICE(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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51,... |
1,754 | void s390x_cpu_timer(void *opaque)
{
S390CPU *cpu = opaque;
CPUS390XState *env = &cpu->env;
env->pending_int |= INTERRUPT_CPUTIMER;
cpu_interrupt(CPU(cpu), CPU_INTERRUPT_HARD);
}
| false | qemu | 6482b0ffd12ce83810c10b1a3884a75eba2ade1a | void s390x_cpu_timer(void *opaque)
{
S390CPU *cpu = opaque;
CPUS390XState *env = &cpu->env;
env->pending_int |= INTERRUPT_CPUTIMER;
cpu_interrupt(CPU(cpu), CPU_INTERRUPT_HARD);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(void *VAR_0)
{
S390CPU *cpu = VAR_0;
CPUS390XState *env = &cpu->env;
env->pending_int |= INTERRUPT_CPUTIMER;
cpu_interrupt(CPU(cpu), CPU_INTERRUPT_HARD);
}
| [
"void FUNC_0(void *VAR_0)\n{",
"S390CPU *cpu = VAR_0;",
"CPUS390XState *env = &cpu->env;",
"env->pending_int |= INTERRUPT_CPUTIMER;",
"cpu_interrupt(CPU(cpu), CPU_INTERRUPT_HARD);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
]
] |
1,755 | static int ahci_dma_prepare_buf(IDEDMA *dma, int is_write)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
IDEState *s = &ad->port.ifs[0];
ahci_populate_sglist(ad, &s->sg, 0);
s->io_buffer_size = s->sg.size;
DPRINTF(ad->port_no, "len=%#x\n", s->io_buffer_size);
return s->io_buffer... | false | qemu | bef1301acb74d177b42890116e4eeaf26047b9e3 | static int ahci_dma_prepare_buf(IDEDMA *dma, int is_write)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
IDEState *s = &ad->port.ifs[0];
ahci_populate_sglist(ad, &s->sg, 0);
s->io_buffer_size = s->sg.size;
DPRINTF(ad->port_no, "len=%#x\n", s->io_buffer_size);
return s->io_buffer... | {
"code": [],
"line_no": []
} | static int FUNC_0(IDEDMA *VAR_0, int VAR_1)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, VAR_0, VAR_0);
IDEState *s = &ad->port.ifs[0];
ahci_populate_sglist(ad, &s->sg, 0);
s->io_buffer_size = s->sg.size;
DPRINTF(ad->port_no, "len=%#x\n", s->io_buffer_size);
return s->io_buffer_size != 0;... | [
"static int FUNC_0(IDEDMA *VAR_0, int VAR_1)\n{",
"AHCIDevice *ad = DO_UPCAST(AHCIDevice, VAR_0, VAR_0);",
"IDEState *s = &ad->port.ifs[0];",
"ahci_populate_sglist(ad, &s->sg, 0);",
"s->io_buffer_size = s->sg.size;",
"DPRINTF(ad->port_no, \"len=%#x\\n\", s->io_buffer_size);",
"return s->io_buffer_size !... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
]
] |
1,756 | void tcp_start_incoming_migration(const char *host_port, Error **errp)
{
Error *err = NULL;
SocketAddressLegacy *saddr = tcp_build_address(host_port, &err);
if (!err) {
socket_start_incoming_migration(saddr, &err);
}
error_propagate(errp, err);
}
| false | qemu | bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884 | void tcp_start_incoming_migration(const char *host_port, Error **errp)
{
Error *err = NULL;
SocketAddressLegacy *saddr = tcp_build_address(host_port, &err);
if (!err) {
socket_start_incoming_migration(saddr, &err);
}
error_propagate(errp, err);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(const char *VAR_0, Error **VAR_1)
{
Error *err = NULL;
SocketAddressLegacy *saddr = tcp_build_address(VAR_0, &err);
if (!err) {
socket_start_incoming_migration(saddr, &err);
}
error_propagate(VAR_1, err);
}
| [
"void FUNC_0(const char *VAR_0, Error **VAR_1)\n{",
"Error *err = NULL;",
"SocketAddressLegacy *saddr = tcp_build_address(VAR_0, &err);",
"if (!err) {",
"socket_start_incoming_migration(saddr, &err);",
"}",
"error_propagate(VAR_1, err);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
1,757 | static void init_quantization(Jpeg2000EncoderContext *s)
{
int compno, reslevelno, bandno;
Jpeg2000QuantStyle *qntsty = &s->qntsty;
Jpeg2000CodingStyle *codsty = &s->codsty;
for (compno = 0; compno < s->ncomponents; compno++){
int gbandno = 0;
for (reslevelno = 0; reslevelno < ... | false | FFmpeg | 83fd377c94d8fbffdb3e69fb3efe1976ff897a88 | static void init_quantization(Jpeg2000EncoderContext *s)
{
int compno, reslevelno, bandno;
Jpeg2000QuantStyle *qntsty = &s->qntsty;
Jpeg2000CodingStyle *codsty = &s->codsty;
for (compno = 0; compno < s->ncomponents; compno++){
int gbandno = 0;
for (reslevelno = 0; reslevelno < ... | {
"code": [],
"line_no": []
} | static void FUNC_0(Jpeg2000EncoderContext *VAR_0)
{
int VAR_1, VAR_2, VAR_3;
Jpeg2000QuantStyle *qntsty = &VAR_0->qntsty;
Jpeg2000CodingStyle *codsty = &VAR_0->codsty;
for (VAR_1 = 0; VAR_1 < VAR_0->ncomponents; VAR_1++){
int gbandno = 0;
for (VAR_2 = 0; VAR_2 < codsty->nreslev... | [
"static void FUNC_0(Jpeg2000EncoderContext *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3;",
"Jpeg2000QuantStyle *qntsty = &VAR_0->qntsty;",
"Jpeg2000CodingStyle *codsty = &VAR_0->codsty;",
"for (VAR_1 = 0; VAR_1 < VAR_0->ncomponents; VAR_1++){",
"int gbandno = 0;",
"for (VAR_2 = 0; VAR_2 < codsty->nreslevels; ... | [
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
],
[
23
],
[
25
],
[
29
],
[
31,
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
... |
1,758 | static BlockDriverState *bdrv_open_inherit(const char *filename,
const char *reference,
QDict *options, int flags,
BlockDriverState *parent,
con... | false | qemu | 7ad2757feffd13b8000826ae3df2a3bc929d688d | static BlockDriverState *bdrv_open_inherit(const char *filename,
const char *reference,
QDict *options, int flags,
BlockDriverState *parent,
con... | {
"code": [],
"line_no": []
} | static BlockDriverState *FUNC_0(const char *filename,
const char *reference,
QDict *options, int flags,
BlockDriverState *parent,
const BdrvChil... | [
"static BlockDriverState *FUNC_0(const char *filename,\nconst char *reference,\nQDict *options, int flags,\nBlockDriverState *parent,\nconst BdrvChildRole *child_role,\nError **errp)\n{",
"int VAR_0;",
"BdrvChild *file = NULL;",
"BlockDriverState *bs;",
"BlockDriver *drv = NULL;",
"const char *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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51,
53
... |
1,759 | AlphaCPU *cpu_alpha_init(const char *cpu_model)
{
AlphaCPU *cpu;
ObjectClass *cpu_class;
cpu_class = alpha_cpu_class_by_name(cpu_model);
if (cpu_class == NULL) {
/* Default to ev67; no reason not to emulate insns by default. */
cpu_class = object_class_by_name(TYPE("ev67"));
... | false | qemu | 82a3d1f81f8e401c6c34cba541970197aba2bb9a | AlphaCPU *cpu_alpha_init(const char *cpu_model)
{
AlphaCPU *cpu;
ObjectClass *cpu_class;
cpu_class = alpha_cpu_class_by_name(cpu_model);
if (cpu_class == NULL) {
cpu_class = object_class_by_name(TYPE("ev67"));
}
cpu = ALPHA_CPU(object_new(object_class_get_name(cpu_cla... | {
"code": [],
"line_no": []
} | AlphaCPU *FUNC_0(const char *cpu_model)
{
AlphaCPU *cpu;
ObjectClass *cpu_class;
cpu_class = alpha_cpu_class_by_name(cpu_model);
if (cpu_class == NULL) {
cpu_class = object_class_by_name(TYPE("ev67"));
}
cpu = ALPHA_CPU(object_new(object_class_get_name(cpu_class)));
... | [
"AlphaCPU *FUNC_0(const char *cpu_model)\n{",
"AlphaCPU *cpu;",
"ObjectClass *cpu_class;",
"cpu_class = alpha_cpu_class_by_name(cpu_model);",
"if (cpu_class == NULL) {",
"cpu_class = object_class_by_name(TYPE(\"ev67\"));",
"}",
"cpu = ALPHA_CPU(object_new(object_class_get_name(cpu_class)));",
"objec... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
]
] |
1,761 | static void xen_pt_pci_write_config(PCIDevice *d, uint32_t addr,
uint32_t val, int len)
{
XenPCIPassthroughState *s = DO_UPCAST(XenPCIPassthroughState, dev, d);
int index = 0;
XenPTRegGroup *reg_grp_entry = NULL;
int rc = 0;
uint32_t read_val = 0, wb_mask;
... | false | qemu | c25bbf1545a53ac051f9e51d4140e397660c10ae | static void xen_pt_pci_write_config(PCIDevice *d, uint32_t addr,
uint32_t val, int len)
{
XenPCIPassthroughState *s = DO_UPCAST(XenPCIPassthroughState, dev, d);
int index = 0;
XenPTRegGroup *reg_grp_entry = NULL;
int rc = 0;
uint32_t read_val = 0, wb_mask;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(PCIDevice *VAR_0, uint32_t VAR_1,
uint32_t VAR_2, int VAR_3)
{
XenPCIPassthroughState *s = DO_UPCAST(XenPCIPassthroughState, dev, VAR_0);
int VAR_4 = 0;
XenPTRegGroup *reg_grp_entry = NULL;
int VAR_5 = 0;
uint32_t read_val = 0, wb_mask;
... | [
"static void FUNC_0(PCIDevice *VAR_0, uint32_t VAR_1,\nuint32_t VAR_2, int VAR_3)\n{",
"XenPCIPassthroughState *s = DO_UPCAST(XenPCIPassthroughState, dev, VAR_0);",
"int VAR_4 = 0;",
"XenPTRegGroup *reg_grp_entry = NULL;",
"int VAR_5 = 0;",
"uint32_t read_val = 0, wb_mask;",
"int VAR_6 = 0;",
"XenPTRe... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
41
],
[
43,
45
],
[
47,
49
],
[
51
],
[... |
1,762 | static void test_hash_base64(void)
{
size_t i;
g_assert(qcrypto_init(NULL) == 0);
for (i = 0; i < G_N_ELEMENTS(expected_outputs) ; i++) {
int ret;
char *digest;
ret = qcrypto_hash_base64(i,
INPUT_TEXT,
... | false | qemu | 0c16c056a4f9dec18fdd56feec82a5db9ff3c15e | static void test_hash_base64(void)
{
size_t i;
g_assert(qcrypto_init(NULL) == 0);
for (i = 0; i < G_N_ELEMENTS(expected_outputs) ; i++) {
int ret;
char *digest;
ret = qcrypto_hash_base64(i,
INPUT_TEXT,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
size_t i;
g_assert(qcrypto_init(NULL) == 0);
for (i = 0; i < G_N_ELEMENTS(expected_outputs) ; i++) {
int ret;
char *digest;
ret = qcrypto_hash_base64(i,
INPUT_TEXT,
strlen(IN... | [
"static void FUNC_0(void)\n{",
"size_t i;",
"g_assert(qcrypto_init(NULL) == 0);",
"for (i = 0; i < G_N_ELEMENTS(expected_outputs) ; i++) {",
"int ret;",
"char *digest;",
"ret = qcrypto_hash_base64(i,\nINPUT_TEXT,\nstrlen(INPUT_TEXT),\n&digest,\nNULL);",
"g_assert(ret == 0);",
"g_assert(g_str_equal(d... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21,
23,
25,
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
1,763 | static void virtio_ccw_serial_realize(VirtioCcwDevice *ccw_dev, Error **errp)
{
VirtioSerialCcw *dev = VIRTIO_SERIAL_CCW(ccw_dev);
DeviceState *vdev = DEVICE(&dev->vdev);
DeviceState *proxy = DEVICE(ccw_dev);
Error *err = NULL;
char *bus_name;
/*
* For command line compatibility, ... | false | qemu | 621ff94d5074d88253a5818c6b9c4db718fbfc65 | static void virtio_ccw_serial_realize(VirtioCcwDevice *ccw_dev, Error **errp)
{
VirtioSerialCcw *dev = VIRTIO_SERIAL_CCW(ccw_dev);
DeviceState *vdev = DEVICE(&dev->vdev);
DeviceState *proxy = DEVICE(ccw_dev);
Error *err = NULL;
char *bus_name;
if (proxy->id) {
bus_n... | {
"code": [],
"line_no": []
} | static void FUNC_0(VirtioCcwDevice *VAR_0, Error **VAR_1)
{
VirtioSerialCcw *dev = VIRTIO_SERIAL_CCW(VAR_0);
DeviceState *vdev = DEVICE(&dev->vdev);
DeviceState *proxy = DEVICE(VAR_0);
Error *err = NULL;
char *VAR_2;
if (proxy->id) {
VAR_2 = g_strdup_printf("%s.0", ... | [
"static void FUNC_0(VirtioCcwDevice *VAR_0, Error **VAR_1)\n{",
"VirtioSerialCcw *dev = VIRTIO_SERIAL_CCW(VAR_0);",
"DeviceState *vdev = DEVICE(&dev->vdev);",
"DeviceState *proxy = DEVICE(VAR_0);",
"Error *err = NULL;",
"char *VAR_2;",
"if (proxy->id) {",
"VAR_2 = g_strdup_printf(\"%s.0\", proxy->id);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
]
] |
1,764 | uint32_t kvmppc_get_vmx(void)
{
return kvmppc_read_int_cpu_dt("ibm,vmx");
}
| false | qemu | 3f2ca480eb872b4946baf77f756236b637a5b15a | uint32_t kvmppc_get_vmx(void)
{
return kvmppc_read_int_cpu_dt("ibm,vmx");
}
| {
"code": [],
"line_no": []
} | uint32_t FUNC_0(void)
{
return kvmppc_read_int_cpu_dt("ibm,vmx");
}
| [
"uint32_t FUNC_0(void)\n{",
"return kvmppc_read_int_cpu_dt(\"ibm,vmx\");",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
1,765 | static void check_reserved_space (target_phys_addr_t *start,
target_phys_addr_t *length)
{
target_phys_addr_t begin = *start;
target_phys_addr_t end = *start + *length;
if (end >= 0x1e000000LL && end < 0x1f100000LL)
end = 0x1e000000LL;
if (begin >= 0x1e... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void check_reserved_space (target_phys_addr_t *start,
target_phys_addr_t *length)
{
target_phys_addr_t begin = *start;
target_phys_addr_t end = *start + *length;
if (end >= 0x1e000000LL && end < 0x1f100000LL)
end = 0x1e000000LL;
if (begin >= 0x1e... | {
"code": [],
"line_no": []
} | static void FUNC_0 (target_phys_addr_t *VAR_0,
target_phys_addr_t *VAR_1)
{
target_phys_addr_t begin = *VAR_0;
target_phys_addr_t end = *VAR_0 + *VAR_1;
if (end >= 0x1e000000LL && end < 0x1f100000LL)
end = 0x1e000000LL;
if (begin >= 0x1e000000LL && begi... | [
"static void FUNC_0 (target_phys_addr_t *VAR_0,\ntarget_phys_addr_t *VAR_1)\n{",
"target_phys_addr_t begin = *VAR_0;",
"target_phys_addr_t end = *VAR_0 + *VAR_1;",
"if (end >= 0x1e000000LL && end < 0x1f100000LL)\nend = 0x1e000000LL;",
"if (begin >= 0x1e000000LL && begin < 0x1f100000LL)\nbegin = 0x1f100000LL... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13,
15
],
[
17,
19
],
[
21,
23
],
[
25,
27
],
[
31,
33
],
[
35,
37
],
[
41
],
[
43
],
[
45
]
] |
1,766 | CharDriverState *qemu_chr_open_msmouse(void)
{
CharDriverState *chr;
chr = g_malloc0(sizeof(CharDriverState));
chr->chr_write = msmouse_chr_write;
chr->chr_close = msmouse_chr_close;
chr->explicit_be_open = true;
qemu_add_mouse_event_handler(msmouse_event, chr, 0, "QEMU Microsoft Mous... | false | qemu | db39fcf1f690b02d612e2bfc00980700887abe03 | CharDriverState *qemu_chr_open_msmouse(void)
{
CharDriverState *chr;
chr = g_malloc0(sizeof(CharDriverState));
chr->chr_write = msmouse_chr_write;
chr->chr_close = msmouse_chr_close;
chr->explicit_be_open = true;
qemu_add_mouse_event_handler(msmouse_event, chr, 0, "QEMU Microsoft Mous... | {
"code": [],
"line_no": []
} | CharDriverState *FUNC_0(void)
{
CharDriverState *chr;
chr = g_malloc0(sizeof(CharDriverState));
chr->chr_write = msmouse_chr_write;
chr->chr_close = msmouse_chr_close;
chr->explicit_be_open = true;
qemu_add_mouse_event_handler(msmouse_event, chr, 0, "QEMU Microsoft Mouse");
ret... | [
"CharDriverState *FUNC_0(void)\n{",
"CharDriverState *chr;",
"chr = g_malloc0(sizeof(CharDriverState));",
"chr->chr_write = msmouse_chr_write;",
"chr->chr_close = msmouse_chr_close;",
"chr->explicit_be_open = true;",
"qemu_add_mouse_event_handler(msmouse_event, chr, 0, \"QEMU Microsoft Mouse\");",
"re... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
]
] |
1,767 | void vfio_pci_write_config(PCIDevice *pdev,
uint32_t addr, uint32_t val, int len)
{
VFIOPCIDevice *vdev = DO_UPCAST(VFIOPCIDevice, pdev, pdev);
uint32_t val_le = cpu_to_le32(val);
trace_vfio_pci_write_config(vdev->vbasedev.name, addr, val, len);
/* Write everything t... | false | qemu | 7df9381b7aa56c897e344f3bfe43bf5848bbd3e0 | void vfio_pci_write_config(PCIDevice *pdev,
uint32_t addr, uint32_t val, int len)
{
VFIOPCIDevice *vdev = DO_UPCAST(VFIOPCIDevice, pdev, pdev);
uint32_t val_le = cpu_to_le32(val);
trace_vfio_pci_write_config(vdev->vbasedev.name, addr, val, len);
if (pwrite(vdev... | {
"code": [],
"line_no": []
} | void FUNC_0(PCIDevice *VAR_0,
uint32_t VAR_1, uint32_t VAR_2, int VAR_3)
{
VFIOPCIDevice *vdev = DO_UPCAST(VFIOPCIDevice, VAR_0, VAR_0);
uint32_t val_le = cpu_to_le32(VAR_2);
trace_vfio_pci_write_config(vdev->vbasedev.name, VAR_1, VAR_2, VAR_3);
if (pwrite(vdev... | [
"void FUNC_0(PCIDevice *VAR_0,\nuint32_t VAR_1, uint32_t VAR_2, int VAR_3)\n{",
"VFIOPCIDevice *vdev = DO_UPCAST(VFIOPCIDevice, VAR_0, VAR_0);",
"uint32_t val_le = cpu_to_le32(VAR_2);",
"trace_vfio_pci_write_config(vdev->vbasedev.name, VAR_1, VAR_2, VAR_3);",
"if (pwrite(vdev->vbasedev.fd, &val_le, VAR_3, v... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
19,
21
],
[
23,
25,
27
],
[
29
],
[
35,
37
],
[
39
],
[
43
],
[
47
],
[
51
],
[
53
],
[
55
],
[
57
],
[
59
],
[
61
],
[... |
1,768 | static int sap_fetch_packet(AVFormatContext *s, AVPacket *pkt)
{
struct SAPState *sap = s->priv_data;
int fd = url_get_file_handle(sap->ann_fd);
int n, ret;
fd_set rfds;
struct timeval tv;
uint8_t recvbuf[1500];
if (sap->eof)
return AVERROR_EOF;
while (1) {
... | false | FFmpeg | a8475bbdb64e638bd8161df9647876fd23f8a29a | static int sap_fetch_packet(AVFormatContext *s, AVPacket *pkt)
{
struct SAPState *sap = s->priv_data;
int fd = url_get_file_handle(sap->ann_fd);
int n, ret;
fd_set rfds;
struct timeval tv;
uint8_t recvbuf[1500];
if (sap->eof)
return AVERROR_EOF;
while (1) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
struct SAPState *VAR_2 = VAR_0->priv_data;
int VAR_3 = url_get_file_handle(VAR_2->ann_fd);
int VAR_4, VAR_5;
fd_set rfds;
struct timeval VAR_6;
uint8_t recvbuf[1500];
if (VAR_2->eof)
return AVERROR_EOF;
wh... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"struct SAPState *VAR_2 = VAR_0->priv_data;",
"int VAR_3 = url_get_file_handle(VAR_2->ann_fd);",
"int VAR_4, VAR_5;",
"fd_set rfds;",
"struct timeval VAR_6;",
"uint8_t recvbuf[1500];",
"if (VAR_2->eof)\nreturn AVERROR_EOF;",
"while (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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
51
... |
1,769 | static void run_dependent_requests(BDRVQcowState *s, QCowL2Meta *m)
{
/* Take the request off the list of running requests */
if (m->nb_clusters != 0) {
QLIST_REMOVE(m, next_in_flight);
}
/* Restart all dependent requests */
if (!qemu_co_queue_empty(&m->dependent_requests)) {
... | false | qemu | e8ee5e4c476d5b0654d8f1271a2b7c065acc486e | static void run_dependent_requests(BDRVQcowState *s, QCowL2Meta *m)
{
if (m->nb_clusters != 0) {
QLIST_REMOVE(m, next_in_flight);
}
if (!qemu_co_queue_empty(&m->dependent_requests)) {
qemu_co_mutex_unlock(&s->lock);
while(qemu_co_queue_next(&m->dependent_requests... | {
"code": [],
"line_no": []
} | static void FUNC_0(BDRVQcowState *VAR_0, QCowL2Meta *VAR_1)
{
if (VAR_1->nb_clusters != 0) {
QLIST_REMOVE(VAR_1, next_in_flight);
}
if (!qemu_co_queue_empty(&VAR_1->dependent_requests)) {
qemu_co_mutex_unlock(&VAR_0->lock);
while(qemu_co_queue_next(&VAR_1->depend... | [
"static void FUNC_0(BDRVQcowState *VAR_0, QCowL2Meta *VAR_1)\n{",
"if (VAR_1->nb_clusters != 0) {",
"QLIST_REMOVE(VAR_1, next_in_flight);",
"}",
"if (!qemu_co_queue_empty(&VAR_1->dependent_requests)) {",
"qemu_co_mutex_unlock(&VAR_0->lock);",
"while(qemu_co_queue_next(&VAR_1->dependent_requests));",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
1,771 | uint32_t kvm_arch_get_supported_cpuid(KVMState *s, uint32_t function,
uint32_t index, int reg)
{
struct kvm_cpuid2 *cpuid;
int max;
uint32_t ret = 0;
uint32_t cpuid_1_edx;
bool found = false;
max = 1;
while ((cpuid = try_get_cpuid(s, max)) == ... | false | qemu | dd87f8a690330777363f9a8680fce8f2ec544414 | uint32_t kvm_arch_get_supported_cpuid(KVMState *s, uint32_t function,
uint32_t index, int reg)
{
struct kvm_cpuid2 *cpuid;
int max;
uint32_t ret = 0;
uint32_t cpuid_1_edx;
bool found = false;
max = 1;
while ((cpuid = try_get_cpuid(s, max)) == ... | {
"code": [],
"line_no": []
} | uint32_t FUNC_0(KVMState *s, uint32_t function,
uint32_t index, int reg)
{
struct kvm_cpuid2 *VAR_0;
int VAR_1;
uint32_t ret = 0;
uint32_t cpuid_1_edx;
bool found = false;
VAR_1 = 1;
while ((VAR_0 = try_get_cpuid(s, VAR_1)) == NULL) {
... | [
"uint32_t FUNC_0(KVMState *s, uint32_t function,\nuint32_t index, int reg)\n{",
"struct kvm_cpuid2 *VAR_0;",
"int VAR_1;",
"uint32_t ret = 0;",
"uint32_t cpuid_1_edx;",
"bool found = false;",
"VAR_1 = 1;",
"while ((VAR_0 = try_get_cpuid(s, VAR_1)) == NULL) {",
"VAR_1 *= 2;",
"}",
"struct kvm_cpu... | [
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
45
],
[
47
],
[
49,
53
],
[
55
... |
1,772 | static abi_long do_socketcall(int num, abi_ulong vptr)
{
abi_long ret;
const int n = sizeof(abi_ulong);
switch(num) {
case SOCKOP_socket:
{
abi_ulong domain, type, protocol;
if (get_user_ual(domain, vptr)
|| get_user_ual(type, vptr + n)
... | false | qemu | 62dc90c668fc4e17639f594b70a1001780f59a9b | static abi_long do_socketcall(int num, abi_ulong vptr)
{
abi_long ret;
const int n = sizeof(abi_ulong);
switch(num) {
case SOCKOP_socket:
{
abi_ulong domain, type, protocol;
if (get_user_ual(domain, vptr)
|| get_user_ual(type, vptr + n)
... | {
"code": [],
"line_no": []
} | static abi_long FUNC_0(int num, abi_ulong vptr)
{
abi_long ret;
const int VAR_0 = sizeof(abi_ulong);
switch(num) {
case SOCKOP_socket:
{
abi_ulong domain, type, protocol;
if (get_user_ual(domain, vptr)
|| get_user_ual(type, vptr + VAR_0)
... | [
"static abi_long FUNC_0(int num, abi_ulong vptr)\n{",
"abi_long ret;",
"const int VAR_0 = sizeof(abi_ulong);",
"switch(num) {",
"case SOCKOP_socket:\n{",
"abi_ulong domain, type, protocol;",
"if (get_user_ual(domain, vptr)\n|| get_user_ual(type, vptr + VAR_0)\n|| get_user_ual(protocol, vptr + 2 * 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
],
[
11
],
[
13,
15
],
[
17
],
[
21,
23,
25,
27
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
49,
51,
53,
55
],
[
59... |
1,773 | static int nbd_send_rep_list(int csock, NBDExport *exp)
{
uint64_t magic, name_len;
uint32_t opt, type, len;
name_len = strlen(exp->name);
magic = cpu_to_be64(NBD_REP_MAGIC);
if (write_sync(csock, &magic, sizeof(magic)) != sizeof(magic)) {
LOG("write failed (magic)");
retur... | false | qemu | 1a6245a5b0b4e8d822c739b403fc67c8a7bc8d12 | static int nbd_send_rep_list(int csock, NBDExport *exp)
{
uint64_t magic, name_len;
uint32_t opt, type, len;
name_len = strlen(exp->name);
magic = cpu_to_be64(NBD_REP_MAGIC);
if (write_sync(csock, &magic, sizeof(magic)) != sizeof(magic)) {
LOG("write failed (magic)");
retur... | {
"code": [],
"line_no": []
} | static int FUNC_0(int VAR_0, NBDExport *VAR_1)
{
uint64_t magic, name_len;
uint32_t opt, type, len;
name_len = strlen(VAR_1->name);
magic = cpu_to_be64(NBD_REP_MAGIC);
if (write_sync(VAR_0, &magic, sizeof(magic)) != sizeof(magic)) {
LOG("write failed (magic)");
return -EINV... | [
"static int FUNC_0(int VAR_0, NBDExport *VAR_1)\n{",
"uint64_t magic, name_len;",
"uint32_t opt, type, len;",
"name_len = strlen(VAR_1->name);",
"magic = cpu_to_be64(NBD_REP_MAGIC);",
"if (write_sync(VAR_0, &magic, sizeof(magic)) != sizeof(magic)) {",
"LOG(\"write failed (magic)\");",
"return -EINVAL;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
1,774 | static int nic_init(PCIDevice *pci_dev, uint32_t device)
{
PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, pci_dev);
EEPRO100State *s;
logout("\n");
d->dev.unregister = pci_nic_uninit;
s = &d->eepro100;
s->device = device;
s->pci_dev = &d->dev;
pci_reset(s);
... | false | qemu | 273a2142176098fe2c27f263d86ad66b133b43cb | static int nic_init(PCIDevice *pci_dev, uint32_t device)
{
PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, pci_dev);
EEPRO100State *s;
logout("\n");
d->dev.unregister = pci_nic_uninit;
s = &d->eepro100;
s->device = device;
s->pci_dev = &d->dev;
pci_reset(s);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(PCIDevice *VAR_0, uint32_t VAR_1)
{
PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, VAR_0);
EEPRO100State *s;
logout("\n");
d->dev.unregister = pci_nic_uninit;
s = &d->eepro100;
s->VAR_1 = VAR_1;
s->VAR_0 = &d->dev;
pci_reset(s);
s... | [
"static int FUNC_0(PCIDevice *VAR_0, uint32_t VAR_1)\n{",
"PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, VAR_0);",
"EEPRO100State *s;",
"logout(\"\\n\");",
"d->dev.unregister = pci_nic_uninit;",
"s = &d->eepro100;",
"s->VAR_1 = VAR_1;",
"s->VAR_0 = &d->dev;",
"pci_reset(s);",
"s->eeprom =... | [
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
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
35
],
[
41,
43
],
[
47,
49,
51
],
[
53,
55
],
[
57,
59
],
[
63
],
[
65
],
[
67
],
... |
1,775 | static uint64_t pchip_read(void *opaque, target_phys_addr_t addr, unsigned size)
{
TyphoonState *s = opaque;
uint64_t ret = 0;
if (addr & 4) {
return s->latch_tmp;
}
switch (addr) {
case 0x0000:
/* WSBA0: Window Space Base Address Register. */
ret = s->pchi... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t pchip_read(void *opaque, target_phys_addr_t addr, unsigned size)
{
TyphoonState *s = opaque;
uint64_t ret = 0;
if (addr & 4) {
return s->latch_tmp;
}
switch (addr) {
case 0x0000:
ret = s->pchip.win[0].base_addr;
break;
case 0x0... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr, unsigned size)
{
TyphoonState *s = opaque;
uint64_t ret = 0;
if (addr & 4) {
return s->latch_tmp;
}
switch (addr) {
case 0x0000:
ret = s->pchip.win[0].base_addr;
break;
case 0x0040:... | [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr, unsigned size)\n{",
"TyphoonState *s = opaque;",
"uint64_t ret = 0;",
"if (addr & 4) {",
"return s->latch_tmp;",
"}",
"switch (addr) {",
"case 0x0000:\nret = s->pchip.win[0].base_addr;",
"break;",
"case 0x0040:\nret = s->pchip.win[1].b... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
25
],
[
27
],
[
29,
33
],
[
35
],
[
37,
41
],
[
43
],
[
45,
49
],
[
51
],
[
55,
59
],
[
61
],
... |
1,777 | static void curl_close(BlockDriverState *bs)
{
BDRVCURLState *s = bs->opaque;
DPRINTF("CURL: Close\n");
curl_detach_aio_context(bs);
qemu_mutex_destroy(&s->mutex);
g_free(s->cookie);
g_free(s->url);
} | true | qemu | 996922de45299878cdc4c15b72b19edf2bc618a4 | static void curl_close(BlockDriverState *bs)
{
BDRVCURLState *s = bs->opaque;
DPRINTF("CURL: Close\n");
curl_detach_aio_context(bs);
qemu_mutex_destroy(&s->mutex);
g_free(s->cookie);
g_free(s->url);
} | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0)
{
BDRVCURLState *s = VAR_0->opaque;
DPRINTF("CURL: Close\n");
curl_detach_aio_context(VAR_0);
qemu_mutex_destroy(&s->mutex);
g_free(s->cookie);
g_free(s->url);
} | [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVCURLState *s = VAR_0->opaque;",
"DPRINTF(\"CURL: Close\\n\");",
"curl_detach_aio_context(VAR_0);",
"qemu_mutex_destroy(&s->mutex);",
"g_free(s->cookie);",
"g_free(s->url);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
24
]
] |
1,778 | int get_partial_buffer(ByteIOContext *s, unsigned char *buf, int size)
{
int len;
len = s->buf_end - s->buf_ptr;
if (len == 0) {
fill_buffer(s);
len = s->buf_end - s->buf_ptr;
}
if (len > size)
len = size;
memcpy(buf, s->buf_ptr, len);
s->buf_ptr += len;
return le... | true | FFmpeg | 0ecca7a49f8e254c12a3a1de048d738bfbb614c6 | int get_partial_buffer(ByteIOContext *s, unsigned char *buf, int size)
{
int len;
len = s->buf_end - s->buf_ptr;
if (len == 0) {
fill_buffer(s);
len = s->buf_end - s->buf_ptr;
}
if (len > size)
len = size;
memcpy(buf, s->buf_ptr, len);
s->buf_ptr += len;
return le... | {
"code": [],
"line_no": []
} | int FUNC_0(ByteIOContext *VAR_0, unsigned char *VAR_1, int VAR_2)
{
int VAR_3;
VAR_3 = VAR_0->buf_end - VAR_0->buf_ptr;
if (VAR_3 == 0) {
fill_buffer(VAR_0);
VAR_3 = VAR_0->buf_end - VAR_0->buf_ptr;
}
if (VAR_3 > VAR_2)
VAR_3 = VAR_2;
memcpy(VAR_1, VAR_0->buf_ptr, VAR_3);... | [
"int FUNC_0(ByteIOContext *VAR_0, unsigned char *VAR_1, int VAR_2)\n{",
"int VAR_3;",
"VAR_3 = VAR_0->buf_end - VAR_0->buf_ptr;",
"if (VAR_3 == 0) {",
"fill_buffer(VAR_0);",
"VAR_3 = VAR_0->buf_end - VAR_0->buf_ptr;",
"}",
"if (VAR_3 > VAR_2)\nVAR_3 = VAR_2;",
"memcpy(VAR_1, VAR_0->buf_ptr, VAR_3);"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9,
10
],
[
11
],
[
12
],
[
13
],
[
14
]
] |
1,779 | static int decode_cce(AACContext *ac, GetBitContext *gb, ChannelElement *che)
{
int num_gain = 0;
int c, g, sfb, ret;
int sign;
INTFLOAT scale;
SingleChannelElement *sce = &che->ch[0];
ChannelCoupling *coup = &che->coup;
coup->coupling_point = 2 * get_bits1(gb);
coup->num_... | true | FFmpeg | 53a502206a9ea698926694d7252526fe00d1ea44 | static int decode_cce(AACContext *ac, GetBitContext *gb, ChannelElement *che)
{
int num_gain = 0;
int c, g, sfb, ret;
int sign;
INTFLOAT scale;
SingleChannelElement *sce = &che->ch[0];
ChannelCoupling *coup = &che->coup;
coup->coupling_point = 2 * get_bits1(gb);
coup->num_... | {
"code": [
" scale = AAC_RENAME(cce_scale)[get_bits(gb, 2)];"
],
"line_no": [
51
]
} | static int FUNC_0(AACContext *VAR_0, GetBitContext *VAR_1, ChannelElement *VAR_2)
{
int VAR_3 = 0;
int VAR_4, VAR_5, VAR_6, VAR_7;
int VAR_8;
INTFLOAT scale;
SingleChannelElement *sce = &VAR_2->ch[0];
ChannelCoupling *coup = &VAR_2->coup;
coup->coupling_point = 2 * get_bits1(VA... | [
"static int FUNC_0(AACContext *VAR_0, GetBitContext *VAR_1, ChannelElement *VAR_2)\n{",
"int VAR_3 = 0;",
"int VAR_4, VAR_5, VAR_6, VAR_7;",
"int VAR_8;",
"INTFLOAT scale;",
"SingleChannelElement *sce = &VAR_2->ch[0];",
"ChannelCoupling *coup = &VAR_2->coup;",
"coup->coupling_point = 2 * get_bits1... | [
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,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[... |
1,780 | static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque)
{
VirtualConsole *vc = opaque;
GtkDisplayState *s = vc->s;
int gdk_keycode = key->hardware_keycode;
int qemu_keycode;
int i;
if (key->keyval == GDK_KEY_Pause) {
qemu_input_event_send_key_qcode(vc->gfx.dcl.con... | true | qemu | 1a01716a307387e5cf1336f61a96f772dddadc90 | static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque)
{
VirtualConsole *vc = opaque;
GtkDisplayState *s = vc->s;
int gdk_keycode = key->hardware_keycode;
int qemu_keycode;
int i;
if (key->keyval == GDK_KEY_Pause) {
qemu_input_event_send_key_qcode(vc->gfx.dcl.con... | {
"code": [],
"line_no": []
} | static gboolean FUNC_0(GtkWidget *widget, GdkEventKey *key, void *opaque)
{
VirtualConsole *vc = opaque;
GtkDisplayState *s = vc->s;
int VAR_0 = key->hardware_keycode;
int VAR_1;
int VAR_2;
if (key->keyval == GDK_KEY_Pause) {
qemu_input_event_send_key_qcode(vc->gfx.dcl.con, Q_KEY_CODE_PA... | [
"static gboolean FUNC_0(GtkWidget *widget, GdkEventKey *key, void *opaque)\n{",
"VirtualConsole *vc = opaque;",
"GtkDisplayState *s = vc->s;",
"int VAR_0 = key->hardware_keycode;",
"int VAR_1;",
"int VAR_2;",
"if (key->keyval == GDK_KEY_Pause) {",
"qemu_input_event_send_key_qcode(vc->gfx.dcl.con, Q_KE... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9,
10
],
[
11,
12
],
[
13,
14
],
[
15
],
[
16
],
[
17
],
[
18,
19
]
] |
1,781 | void *pl110_init(DisplayState *ds, uint32_t base, qemu_irq irq,
int versatile)
{
pl110_state *s;
int iomemtype;
s = (pl110_state *)qemu_mallocz(sizeof(pl110_state));
iomemtype = cpu_register_io_memory(0, pl110_readfn,
pl110_writefn, s);
... | true | qemu | 187337f8b0ec0813dd3876d1efe37d415fb81c2e | void *pl110_init(DisplayState *ds, uint32_t base, qemu_irq irq,
int versatile)
{
pl110_state *s;
int iomemtype;
s = (pl110_state *)qemu_mallocz(sizeof(pl110_state));
iomemtype = cpu_register_io_memory(0, pl110_readfn,
pl110_writefn, s);
... | {
"code": [
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_phys... | void *FUNC_0(DisplayState *VAR_0, uint32_t VAR_1, qemu_irq VAR_2,
int VAR_3)
{
pl110_state *s;
int VAR_4;
s = (pl110_state *)qemu_mallocz(sizeof(pl110_state));
VAR_4 = cpu_register_io_memory(0, pl110_readfn,
pl110_writefn, s);
cpu_reg... | [
"void *FUNC_0(DisplayState *VAR_0, uint32_t VAR_1, qemu_irq VAR_2,\nint VAR_3)\n{",
"pl110_state *s;",
"int VAR_4;",
"s = (pl110_state *)qemu_mallocz(sizeof(pl110_state));",
"VAR_4 = cpu_register_io_memory(0, pl110_readfn,\npl110_writefn, s);",
"cpu_register_physical_memory(VAR_1, 0x00000fff, VAR_4);",
... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
35
],
[
37
]
] |
1,782 | void rgb16tobgr15(const uint8_t *src, uint8_t *dst, long src_size)
{
long i;
long num_pixels = src_size >> 1;
for(i=0; i<num_pixels; i++)
{
unsigned b,g,r;
register uint16_t rgb;
rgb = src[2*i];
r = rgb&0x1F;
g = (rgb&0x7E0)>>5;
b = (rgb&0xF800)>>11;
dst[2*i] = (b&0x... | true | FFmpeg | 6e42e6c4b410dbef8b593c2d796a5dad95f89ee4 | void rgb16tobgr15(const uint8_t *src, uint8_t *dst, long src_size)
{
long i;
long num_pixels = src_size >> 1;
for(i=0; i<num_pixels; i++)
{
unsigned b,g,r;
register uint16_t rgb;
rgb = src[2*i];
r = rgb&0x1F;
g = (rgb&0x7E0)>>5;
b = (rgb&0xF800)>>11;
dst[2*i] = (b&0x... | {
"code": [
"\tlong i;",
"\tfor(i=0; i<num_pixels; i++)",
"\tfor(i=0; i<num_pixels; i++)",
"\tlong i;",
"\tfor(i=0; i<num_pixels; i++)",
"\tlong i;",
"\tfor(i=0; i<num_pixels; i++)",
"\tfor(i=0; i<num_pixels; i++)",
"\tlong i;",
"\tfor(i=0; i<num_pixels; i++)",
"\tfor(i=0; ... | void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, long VAR_2)
{
long VAR_3;
long VAR_4 = VAR_2 >> 1;
for(VAR_3=0; VAR_3<VAR_4; VAR_3++)
{
unsigned VAR_5,VAR_6,VAR_7;
register uint16_t VAR_8;
VAR_8 = VAR_0[2*VAR_3];
VAR_7 = VAR_8&0x1F;
VAR_6 = (VAR_8&0x7E0)>>5;
VAR_5 = (VAR... | [
"void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, long VAR_2)\n{",
"long VAR_3;",
"long VAR_4 = VAR_2 >> 1;",
"for(VAR_3=0; VAR_3<VAR_4; VAR_3++)",
"{",
"unsigned VAR_5,VAR_6,VAR_7;",
"register uint16_t VAR_8;",
"VAR_8 = VAR_0[2*VAR_3];",
"VAR_7 = VAR_8&0x1F;",
"VAR_6 = (VAR_8&0x7E0)>>5;",
"VAR... | [
0,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
1,784 | static void replication_start(ReplicationState *rs, ReplicationMode mode,
Error **errp)
{
BlockDriverState *bs = rs->opaque;
BDRVReplicationState *s;
BlockDriverState *top_bs;
int64_t active_length, hidden_length, disk_length;
AioContext *aio_context;
Error ... | true | qemu | 111049a4ecefc9cf1ac75c773f4c5c165f27fe63 | static void replication_start(ReplicationState *rs, ReplicationMode mode,
Error **errp)
{
BlockDriverState *bs = rs->opaque;
BDRVReplicationState *s;
BlockDriverState *top_bs;
int64_t active_length, hidden_length, disk_length;
AioContext *aio_context;
Error ... | {
"code": [
" backup_start(NULL, s->secondary_disk->bs, s->hidden_disk->bs, 0,",
" MIRROR_SYNC_MODE_NONE, NULL, false,",
" BLOCKDEV_ON_ERROR_REPORT, BLOCKDEV_ON_ERROR_REPORT,",
" BLOCK_JOB_INTERNAL, backup_job_completed, bs,",
" ... | static void FUNC_0(ReplicationState *VAR_0, ReplicationMode VAR_1,
Error **VAR_2)
{
BlockDriverState *bs = VAR_0->opaque;
BDRVReplicationState *s;
BlockDriverState *top_bs;
int64_t active_length, hidden_length, disk_length;
AioContext *aio_context;
Error *lo... | [
"static void FUNC_0(ReplicationState *VAR_0, ReplicationMode VAR_1,\nError **VAR_2)\n{",
"BlockDriverState *bs = VAR_0->opaque;",
"BDRVReplicationState *s;",
"BlockDriverState *top_bs;",
"int64_t active_length, hidden_length, disk_length;",
"AioContext *aio_context;",
"Error *local_err = NULL;",
"aio_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43,
45
],
[
47
],
[
49
... |
1,785 | static inline void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
{
#if COMPILE_TEMPLATE_MMX
__asm__ volatile(
"movq "MANGLE(bm01010101)", %%mm4 \n\t"
"mov %0, %%"REG_a" \n\t"
"1: ... | true | FFmpeg | c3ab0004ae4dffc32494ae84dd15cfaa909a7884 | static inline void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
{
#if COMPILE_TEMPLATE_MMX
__asm__ volatile(
"movq "MANGLE(bm01010101)", %%mm4 \n\t"
"mov %0, %%"REG_a" \n\t"
"1: ... | {
"code": [
"static inline void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)"
],
"line_no": [
1
]
} | static inline void FUNC_0(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
{
#if COMPILE_TEMPLATE_MMX
__asm__ volatile(
"movq "MANGLE(bm01010101)", %%mm4 \n\t"
"mov %0, %%"REG_a" \n\t"
"1: ... | [
"static inline void FUNC_0(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)\n{",
"#if COMPILE_TEMPLATE_MMX\n__asm__ volatile(\n\"movq \"MANGLE(bm01010101)\", %%mm4 \\n\\t\"\n\"mov %0, %%\"REG_a\" \\n\\t\"\n\"1: ... | [
1,
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,
47
],
[
49,
51
],
[
53
],
[
55
],
[
57
],
[
59
],
[
61,
63
],
[... |
1,786 | uint32_t vga_mem_readb(VGACommonState *s, hwaddr addr)
{
int memory_map_mode, plane;
uint32_t ret;
/* convert to VGA memory offset */
memory_map_mode = (s->gr[VGA_GFX_MISC] >> 2) & 3;
addr &= 0x1ffff;
switch(memory_map_mode) {
case 0:
break;
case 1:
if (addr ... | true | qemu | 3bf1817079bb0d80c0d8a86a7c7dd0bfe90eb82e | uint32_t vga_mem_readb(VGACommonState *s, hwaddr addr)
{
int memory_map_mode, plane;
uint32_t ret;
memory_map_mode = (s->gr[VGA_GFX_MISC] >> 2) & 3;
addr &= 0x1ffff;
switch(memory_map_mode) {
case 0:
break;
case 1:
if (addr >= 0x10000)
return 0x... | {
"code": [
" ret = s->vram_ptr[((addr & ~1) << 1) | plane];"
],
"line_no": [
71
]
} | uint32_t FUNC_0(VGACommonState *s, hwaddr addr)
{
int VAR_0, VAR_1;
uint32_t ret;
VAR_0 = (s->gr[VGA_GFX_MISC] >> 2) & 3;
addr &= 0x1ffff;
switch(VAR_0) {
case 0:
break;
case 1:
if (addr >= 0x10000)
return 0xff;
addr += s->bank_offset;
... | [
"uint32_t FUNC_0(VGACommonState *s, hwaddr addr)\n{",
"int VAR_0, VAR_1;",
"uint32_t ret;",
"VAR_0 = (s->gr[VGA_GFX_MISC] >> 2) & 3;",
"addr &= 0x1ffff;",
"switch(VAR_0) {",
"case 0:\nbreak;",
"case 1:\nif (addr >= 0x10000)\nreturn 0xff;",
"addr += s->bank_offset;",
"break;",
"case 2:\naddr -= 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
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23,
25,
27
],
[
29
],
[
31
],
[
33,
35
],
[
37,
39
],
[
41
],
[
43,
45,
47
],
[
49,
51
],
[
53... |
1,788 | static av_cold int libx265_encode_close(AVCodecContext *avctx)
{
libx265Context *ctx = avctx->priv_data;
av_frame_free(&avctx->coded_frame);
ctx->api->param_free(ctx->params);
if (ctx->encoder)
ctx->api->encoder_close(ctx->encoder);
return 0;
}
| false | FFmpeg | d6604b29ef544793479d7fb4e05ef6622bb3e534 | static av_cold int libx265_encode_close(AVCodecContext *avctx)
{
libx265Context *ctx = avctx->priv_data;
av_frame_free(&avctx->coded_frame);
ctx->api->param_free(ctx->params);
if (ctx->encoder)
ctx->api->encoder_close(ctx->encoder);
return 0;
}
| {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
libx265Context *ctx = avctx->priv_data;
av_frame_free(&avctx->coded_frame);
ctx->api->param_free(ctx->params);
if (ctx->encoder)
ctx->api->encoder_close(ctx->encoder);
return 0;
}
| [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"libx265Context *ctx = avctx->priv_data;",
"av_frame_free(&avctx->coded_frame);",
"ctx->api->param_free(ctx->params);",
"if (ctx->encoder)\nctx->api->encoder_close(ctx->encoder);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
17,
19
],
[
23
],
[
25
]
] |
1,789 | static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDisplay *display,
const uint8_t *buf, int buf_size, int top_bottom, int non_mod)
{
DVBSubContext *ctx = avctx->priv_data;
DVBSubRegion *region = get_region(ctx, display->region_id);
... | false | FFmpeg | 55f17d3175e5d0e6541ef432a88154e0210a9c10 | static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDisplay *display,
const uint8_t *buf, int buf_size, int top_bottom, int non_mod)
{
DVBSubContext *ctx = avctx->priv_data;
DVBSubRegion *region = get_region(ctx, display->region_id);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVCodecContext *VAR_0, DVBSubObjectDisplay *VAR_1,
const uint8_t *VAR_2, int VAR_3, int VAR_4, int VAR_5)
{
DVBSubContext *ctx = VAR_0->priv_data;
DVBSubRegion *region = get_region(ctx, VAR_1->region_id);
const uint8_t *VAR_6 = VAR_2 + VAR_... | [
"static void FUNC_0(AVCodecContext *VAR_0, DVBSubObjectDisplay *VAR_1,\nconst uint8_t *VAR_2, int VAR_3, int VAR_4, int VAR_5)\n{",
"DVBSubContext *ctx = VAR_0->priv_data;",
"DVBSubRegion *region = get_region(ctx, VAR_1->region_id);",
"const uint8_t *VAR_6 = VAR_2 + VAR_3;",
"uint8_t *pbuf;",
"int VAR_7, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35,
37,
39
],
[
43
],
[
45,
47
],
[
51
],
[
53,
55
],
... |
1,790 | static void assert_file_overwrite(const char *filename)
{
if (file_overwrite && file_skip) {
fprintf(stderr, "Error, both -y and -n supplied. Exiting.\n");
exit_program(1);
}
if (!file_overwrite &&
(strchr(filename, ':') == NULL || filename[1] == ':' ||
av_strstart... | false | FFmpeg | f929ab0569ff31ed5a59b0b0adb7ce09df3fca39 | static void assert_file_overwrite(const char *filename)
{
if (file_overwrite && file_skip) {
fprintf(stderr, "Error, both -y and -n supplied. Exiting.\n");
exit_program(1);
}
if (!file_overwrite &&
(strchr(filename, ':') == NULL || filename[1] == ':' ||
av_strstart... | {
"code": [],
"line_no": []
} | static void FUNC_0(const char *VAR_0)
{
if (file_overwrite && file_skip) {
fprintf(stderr, "Error, both -y and -n supplied. Exiting.\n");
exit_program(1);
}
if (!file_overwrite &&
(strchr(VAR_0, ':') == NULL || VAR_0[1] == ':' ||
av_strstart(VAR_0, "file:", NULL)))... | [
"static void FUNC_0(const char *VAR_0)\n{",
"if (file_overwrite && file_skip) {",
"fprintf(stderr, \"Error, both -y and -n supplied. Exiting.\\n\");",
"exit_program(1);",
"}",
"if (!file_overwrite &&\n(strchr(VAR_0, ':') == NULL || VAR_0[1] == ':' ||\nav_strstart(VAR_0, \"file:\", NULL))) {",
"if (avio_... | [
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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
1,792 | static void tlb_info(Monitor *mon)
{
CPUState *env;
int l1, l2;
uint32_t pgd, pde, pte;
env = mon_get_cpu();
if (!(env->cr[0] & CR0_PG_MASK)) {
monitor_printf(mon, "PG disabled\n");
return;
}
pgd = env->cr[3] & ~0xfff;
for(l1 = 0; l1 < 1024; l1++) {
... | true | qemu | d65aaf3773e4be7ae97df9d867cbe9b36e2fb8a1 | static void tlb_info(Monitor *mon)
{
CPUState *env;
int l1, l2;
uint32_t pgd, pde, pte;
env = mon_get_cpu();
if (!(env->cr[0] & CR0_PG_MASK)) {
monitor_printf(mon, "PG disabled\n");
return;
}
pgd = env->cr[3] & ~0xfff;
for(l1 = 0; l1 < 1024; l1++) {
... | {
"code": [
"static void tlb_info(Monitor *mon)",
" CPUState *env;",
" env = mon_get_cpu();",
" if (!(env->cr[0] & CR0_PG_MASK)) {",
" monitor_printf(mon, \"PG disabled\\n\");",
" print_pte(mon, (l1 << 22), pde, ~((1 << 20) - 1));"
],
"line_no": [
1,
... | static void FUNC_0(Monitor *VAR_0)
{
CPUState *env;
int VAR_1, VAR_2;
uint32_t pgd, pde, pte;
env = mon_get_cpu();
if (!(env->cr[0] & CR0_PG_MASK)) {
monitor_printf(VAR_0, "PG disabled\n");
return;
}
pgd = env->cr[3] & ~0xfff;
for(VAR_1 = 0; VAR_1 < 1024; V... | [
"static void FUNC_0(Monitor *VAR_0)\n{",
"CPUState *env;",
"int VAR_1, VAR_2;",
"uint32_t pgd, pde, pte;",
"env = mon_get_cpu();",
"if (!(env->cr[0] & CR0_PG_MASK)) {",
"monitor_printf(VAR_0, \"PG disabled\\n\");",
"return;",
"}",
"pgd = env->cr[3] & ~0xfff;",
"for(VAR_1 = 0; VAR_1 < 1024; VAR_1... | [
1,
1,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[... |
1,793 | static void parse_option_number(const char *name, const char *value,
uint64_t *ret, Error **errp)
{
char *postfix;
uint64_t number;
number = strtoull(value, &postfix, 0);
if (*postfix != '\0') {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name, "a numb... | true | qemu | 3403e5eb884f3a74c40fe7cccc103f848c040215 | static void parse_option_number(const char *name, const char *value,
uint64_t *ret, Error **errp)
{
char *postfix;
uint64_t number;
number = strtoull(value, &postfix, 0);
if (*postfix != '\0') {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name, "a numb... | {
"code": [
" char *postfix;",
" number = strtoull(value, &postfix, 0);",
" if (*postfix != '\\0') {"
],
"line_no": [
7,
13,
15
]
} | static void FUNC_0(const char *VAR_0, const char *VAR_1,
uint64_t *VAR_2, Error **VAR_3)
{
char *VAR_4;
uint64_t number;
number = strtoull(VAR_1, &VAR_4, 0);
if (*VAR_4 != '\0') {
error_setg(VAR_3, QERR_INVALID_PARAMETER_VALUE, VAR_0, "a number");
... | [
"static void FUNC_0(const char *VAR_0, const char *VAR_1,\nuint64_t *VAR_2, Error **VAR_3)\n{",
"char *VAR_4;",
"uint64_t number;",
"number = strtoull(VAR_1, &VAR_4, 0);",
"if (*VAR_4 != '\\0') {",
"error_setg(VAR_3, QERR_INVALID_PARAMETER_VALUE, VAR_0, \"a number\");",
"return;",
"}",
"*VAR_2 = num... | [
0,
1,
0,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
1,794 | static int decode_vol_header(MpegEncContext *s, GetBitContext *gb){
int width, height, vo_ver_id;
/* vol header */
skip_bits(gb, 1); /* random access */
s->vo_type= get_bits(gb, 8);
if (get_bits1(gb) != 0) { /* is_ol_id */
vo_ver_id = get_bits(gb, 4); /* vo_ver_id */
skip_bi... | true | FFmpeg | beac8235b92cdd322266e1709fbfe6f9e945e031 | static int decode_vol_header(MpegEncContext *s, GetBitContext *gb){
int width, height, vo_ver_id;
skip_bits(gb, 1);
s->vo_type= get_bits(gb, 8);
if (get_bits1(gb) != 0) {
vo_ver_id = get_bits(gb, 4);
skip_bits(gb, 3);
} else {
vo_ver_id = 1;
s->asp... | {
"code": [],
"line_no": []
} | static int FUNC_0(MpegEncContext *VAR_0, GetBitContext *VAR_1){
int VAR_2, VAR_3, VAR_4;
skip_bits(VAR_1, 1);
VAR_0->vo_type= get_bits(VAR_1, 8);
if (get_bits1(VAR_1) != 0) {
VAR_4 = get_bits(VAR_1, 4);
skip_bits(VAR_1, 3);
} else {
VAR_4 = 1;
VAR_... | [
"static int FUNC_0(MpegEncContext *VAR_0, GetBitContext *VAR_1){",
"int VAR_2, VAR_3, VAR_4;",
"skip_bits(VAR_1, 1);",
"VAR_0->vo_type= get_bits(VAR_1, 8);",
"if (get_bits1(VAR_1) != 0) {",
"VAR_4 = get_bits(VAR_1, 4);",
"skip_bits(VAR_1, 3);",
"} else {",
"VAR_4 = 1;",
"VAR_0->aspect_ratio_info= ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
26
],
[
28
],
[
30
],
[
32
],
[
34
],
[
36
],
[
41
],
[
43
],
[
45
],
[
47
],
[
50
],
... |
1,795 | static int scsi_disk_initfn(SCSIDevice *dev)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, dev);
int is_cd;
DriveInfo *dinfo;
if (!s->qdev.conf.bs) {
error_report("scsi-disk: drive property not set");
s->bs = s->qdev.conf.bs;
is_cd = bdrv_get_type_hint(s->bs) == BDRV_TYPE_CDROM;
... | true | qemu | 98f28ad7a7d26e5e77c5cb37b262d76d6ccd963d | static int scsi_disk_initfn(SCSIDevice *dev)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, dev);
int is_cd;
DriveInfo *dinfo;
if (!s->qdev.conf.bs) {
error_report("scsi-disk: drive property not set");
s->bs = s->qdev.conf.bs;
is_cd = bdrv_get_type_hint(s->bs) == BDRV_TYPE_CDROM;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(SCSIDevice *VAR_0)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0);
int VAR_1;
DriveInfo *dinfo;
if (!s->qdev.conf.bs) {
error_report("scsi-disk: drive property not set");
s->bs = s->qdev.conf.bs;
VAR_1 = bdrv_get_type_hint(s->bs) == BDRV_TYPE_CDROM;
if (... | [
"static int FUNC_0(SCSIDevice *VAR_0)\n{",
"SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0);",
"int VAR_1;",
"DriveInfo *dinfo;",
"if (!s->qdev.conf.bs) {",
"error_report(\"scsi-disk: drive property not set\");",
"s->bs = s->qdev.conf.bs;",
"VAR_1 = bdrv_get_type_hint(s->bs) == BDRV_TYPE_CDRO... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],... |
1,796 | static av_cold int dvdsub_init(AVCodecContext *avctx)
{
DVDSubContext *ctx = avctx->priv_data;
char *data, *cur;
if (!avctx->extradata || !avctx->extradata_size)
return 0;
data = av_malloc(avctx->extradata_size + 1);
if (!data)
return AVERROR(ENOMEM);
memcpy(data, av... | true | FFmpeg | d466d82faaf6e0e57a3a4be5e38e3902ef251ac3 | static av_cold int dvdsub_init(AVCodecContext *avctx)
{
DVDSubContext *ctx = avctx->priv_data;
char *data, *cur;
if (!avctx->extradata || !avctx->extradata_size)
return 0;
data = av_malloc(avctx->extradata_size + 1);
if (!data)
return AVERROR(ENOMEM);
memcpy(data, av... | {
"code": [
" int ret = ff_set_dimensions(avctx, w, h);",
" return ret;",
" return 0;"
],
"line_no": [
57,
61,
75
]
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
DVDSubContext *ctx = avctx->priv_data;
char *VAR_0, *VAR_1;
if (!avctx->extradata || !avctx->extradata_size)
return 0;
VAR_0 = av_malloc(avctx->extradata_size + 1);
if (!VAR_0)
return AVERROR(ENOMEM);
memcpy(VAR_0, a... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"DVDSubContext *ctx = avctx->priv_data;",
"char *VAR_0, *VAR_1;",
"if (!avctx->extradata || !avctx->extradata_size)\nreturn 0;",
"VAR_0 = av_malloc(avctx->extradata_size + 1);",
"if (!VAR_0)\nreturn AVERROR(ENOMEM);",
"memcpy(VAR_0, avctx->extradata... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
... |
1,797 | static void mxf_write_random_index_pack(AVFormatContext *s)
{
MXFContext *mxf = s->priv_data;
AVIOContext *pb = s->pb;
uint64_t pos = avio_tell(pb);
int i;
avio_write(pb, random_index_pack_key, 16);
klv_encode_ber_length(pb, 28 + 12*mxf->body_partitions_count);
if (mxf->edit_unit... | true | FFmpeg | 7df3b426bbfbd7efd9a0f56393e3cc78413b0869 | static void mxf_write_random_index_pack(AVFormatContext *s)
{
MXFContext *mxf = s->priv_data;
AVIOContext *pb = s->pb;
uint64_t pos = avio_tell(pb);
int i;
avio_write(pb, random_index_pack_key, 16);
klv_encode_ber_length(pb, 28 + 12*mxf->body_partitions_count);
if (mxf->edit_unit... | {
"code": [
" klv_encode_ber_length(pb, 28 + 12*mxf->body_partitions_count);"
],
"line_no": [
17
]
} | static void FUNC_0(AVFormatContext *VAR_0)
{
MXFContext *mxf = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
uint64_t pos = avio_tell(pb);
int VAR_1;
avio_write(pb, random_index_pack_key, 16);
klv_encode_ber_length(pb, 28 + 12*mxf->body_partitions_count);
if (mxf->edit_unit_byte... | [
"static void FUNC_0(AVFormatContext *VAR_0)\n{",
"MXFContext *mxf = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"uint64_t pos = avio_tell(pb);",
"int VAR_1;",
"avio_write(pb, random_index_pack_key, 16);",
"klv_encode_ber_length(pb, 28 + 12*mxf->body_partitions_count);",
"if (mxf->edit_unit_byt... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21,
23
],
[
25,
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[
51
]
] |
1,799 | static int qcow2_mark_clean(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
if (s->incompatible_features & QCOW2_INCOMPAT_DIRTY) {
int ret = bdrv_flush(bs);
if (ret < 0) {
return ret;
}
s->incompatible_features &= ~QCOW2_INCOMPAT_DIRTY;
ret... | true | qemu | 4c2e5f8f46a17966dc45b5a3e07b97434c0eabdf | static int qcow2_mark_clean(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
if (s->incompatible_features & QCOW2_INCOMPAT_DIRTY) {
int ret = bdrv_flush(bs);
if (ret < 0) {
return ret;
}
s->incompatible_features &= ~QCOW2_INCOMPAT_DIRTY;
ret... | {
"code": [
" int ret = bdrv_flush(bs);",
" s->incompatible_features &= ~QCOW2_INCOMPAT_DIRTY;"
],
"line_no": [
11,
21
]
} | static int FUNC_0(BlockDriverState *VAR_0)
{
BDRVQcowState *s = VAR_0->opaque;
if (s->incompatible_features & QCOW2_INCOMPAT_DIRTY) {
int VAR_1 = bdrv_flush(VAR_0);
if (VAR_1 < 0) {
return VAR_1;
}
s->incompatible_features &= ~QCOW2_INCOMPAT_DIRTY;
... | [
"static int FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"if (s->incompatible_features & QCOW2_INCOMPAT_DIRTY) {",
"int VAR_1 = bdrv_flush(VAR_0);",
"if (VAR_1 < 0) {",
"return VAR_1;",
"}",
"s->incompatible_features &= ~QCOW2_INCOMPAT_DIRTY;",
"return qcow2_update_heade... | [
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
1,801 | static int config_props(AVFilterLink *link)
{
YADIFContext *yadif = link->src->priv;
link->time_base.num = link->src->inputs[0]->time_base.num;
link->time_base.den = link->src->inputs[0]->time_base.den * 2;
link->w = link->src->inputs[0]->w;
link->h = link->src->input... | true | FFmpeg | 4ea7c179325f61736040f2ff22c2f27c702727d4 | static int config_props(AVFilterLink *link)
{
YADIFContext *yadif = link->src->priv;
link->time_base.num = link->src->inputs[0]->time_base.num;
link->time_base.den = link->src->inputs[0]->time_base.den * 2;
link->w = link->src->inputs[0]->w;
link->h = link->src->input... | {
"code": [
" YADIFContext *yadif = link->src->priv;"
],
"line_no": [
5
]
} | static int FUNC_0(AVFilterLink *VAR_0)
{
YADIFContext *yadif = VAR_0->src->priv;
VAR_0->time_base.num = VAR_0->src->inputs[0]->time_base.num;
VAR_0->time_base.den = VAR_0->src->inputs[0]->time_base.den * 2;
VAR_0->w = VAR_0->src->inputs[0]->w;
VAR_0->h = VAR_0->src->i... | [
"static int FUNC_0(AVFilterLink *VAR_0)\n{",
"YADIFContext *yadif = VAR_0->src->priv;",
"VAR_0->time_base.num = VAR_0->src->inputs[0]->time_base.num;",
"VAR_0->time_base.den = VAR_0->src->inputs[0]->time_base.den * 2;",
"VAR_0->w = VAR_0->src->inputs[0]->w;",
"VAR_0->h = VAR_0->src... | [
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
27
]
] |
1,803 | void qemu_system_powerdown(void)
{
if(pm_state->pmen & PWRBTN_EN) {
pm_state->pmsts |= PWRBTN_EN;
pm_update_sci(pm_state);
}
}
| true | qemu | 9669d3c570c7a2129c6d6d4e32b856a2d155eb54 | void qemu_system_powerdown(void)
{
if(pm_state->pmen & PWRBTN_EN) {
pm_state->pmsts |= PWRBTN_EN;
pm_update_sci(pm_state);
}
}
| {
"code": [
" if(pm_state->pmen & PWRBTN_EN) {"
],
"line_no": [
5
]
} | void FUNC_0(void)
{
if(pm_state->pmen & PWRBTN_EN) {
pm_state->pmsts |= PWRBTN_EN;
pm_update_sci(pm_state);
}
}
| [
"void FUNC_0(void)\n{",
"if(pm_state->pmen & PWRBTN_EN) {",
"pm_state->pmsts |= PWRBTN_EN;",
"pm_update_sci(pm_state);",
"}",
"}"
] | [
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
1,805 | static int alloc_table(VLC *vlc, int size)
{
int index;
index = vlc->table_size;
vlc->table_size += size;
if (vlc->table_size > vlc->table_allocated) {
vlc->table_allocated += (1 << vlc->bits);
vlc->table = av_realloc(vlc->table,
sizeof(VLC_TYPE) *... | true | FFmpeg | 073c2593c9f0aa4445a6fc1b9b24e6e52a8cc2c1 | static int alloc_table(VLC *vlc, int size)
{
int index;
index = vlc->table_size;
vlc->table_size += size;
if (vlc->table_size > vlc->table_allocated) {
vlc->table_allocated += (1 << vlc->bits);
vlc->table = av_realloc(vlc->table,
sizeof(VLC_TYPE) *... | {
"code": [
"static int alloc_table(VLC *vlc, int size)",
" vlc->table = av_realloc(vlc->table,",
" sizeof(VLC_TYPE) * 2 * vlc->table_allocated);"
],
"line_no": [
1,
15,
17
]
} | static int FUNC_0(VLC *VAR_0, int VAR_1)
{
int VAR_2;
VAR_2 = VAR_0->table_size;
VAR_0->table_size += VAR_1;
if (VAR_0->table_size > VAR_0->table_allocated) {
VAR_0->table_allocated += (1 << VAR_0->bits);
VAR_0->table = av_realloc(VAR_0->table,
siz... | [
"static int FUNC_0(VLC *VAR_0, int VAR_1)\n{",
"int VAR_2;",
"VAR_2 = VAR_0->table_size;",
"VAR_0->table_size += VAR_1;",
"if (VAR_0->table_size > VAR_0->table_allocated) {",
"VAR_0->table_allocated += (1 << VAR_0->bits);",
"VAR_0->table = av_realloc(VAR_0->table,\nsizeof(VLC_TYPE) * 2 * VAR_0->table_al... | [
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15,
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
]
] |
1,806 | int net_slirp_smb(const char *exported_dir)
{
struct in_addr vserver_addr = { .s_addr = 0 };
if (legacy_smb_export) {
fprintf(stderr, "-smb given twice\n");
return -1;
}
legacy_smb_export = exported_dir;
if (!QTAILQ_EMPTY(&slirp_stacks)) {
return slirp_smb(QTAILQ_F... | true | qemu | 5c843af22604edecda10d4bb89d4eede9e1bd3d0 | int net_slirp_smb(const char *exported_dir)
{
struct in_addr vserver_addr = { .s_addr = 0 };
if (legacy_smb_export) {
fprintf(stderr, "-smb given twice\n");
return -1;
}
legacy_smb_export = exported_dir;
if (!QTAILQ_EMPTY(&slirp_stacks)) {
return slirp_smb(QTAILQ_F... | {
"code": [
" return slirp_smb(QTAILQ_FIRST(&slirp_stacks), exported_dir,",
" vserver_addr);"
],
"line_no": [
21,
23
]
} | int FUNC_0(const char *VAR_0)
{
struct in_addr VAR_1 = { .s_addr = 0 };
if (legacy_smb_export) {
fprintf(stderr, "-smb given twice\n");
return -1;
}
legacy_smb_export = VAR_0;
if (!QTAILQ_EMPTY(&slirp_stacks)) {
return slirp_smb(QTAILQ_FIRST(&slirp_stacks), VAR_0,
... | [
"int FUNC_0(const char *VAR_0)\n{",
"struct in_addr VAR_1 = { .s_addr = 0 };",
"if (legacy_smb_export) {",
"fprintf(stderr, \"-smb given twice\\n\");",
"return -1;",
"}",
"legacy_smb_export = VAR_0;",
"if (!QTAILQ_EMPTY(&slirp_stacks)) {",
"return slirp_smb(QTAILQ_FIRST(&slirp_stacks), VAR_0,\nVAR_1... | [
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
]
] |
1,807 | static void set_int32(Object *obj, Visitor *v, void *opaque,
const char *name, Error **errp)
{
DeviceState *dev = DEVICE(obj);
Property *prop = opaque;
int32_t *ptr = qdev_get_prop_ptr(dev, prop);
Error *local_err = NULL;
int64_t value;
if (dev->state != DEV_STATE... | true | qemu | 6350b0904615cc0531cc3059ea34db5c009c88aa | static void set_int32(Object *obj, Visitor *v, void *opaque,
const char *name, Error **errp)
{
DeviceState *dev = DEVICE(obj);
Property *prop = opaque;
int32_t *ptr = qdev_get_prop_ptr(dev, prop);
Error *local_err = NULL;
int64_t value;
if (dev->state != DEV_STATE... | {
"code": [
" if (value > prop->info->min && value <= prop->info->max) {",
" if (value > prop->info->min && value <= prop->info->max) {",
" if (value > prop->info->min && value <= prop->info->max) {"
],
"line_no": [
39,
39,
39
]
} | static void FUNC_0(Object *VAR_0, Visitor *VAR_1, void *VAR_2,
const char *VAR_3, Error **VAR_4)
{
DeviceState *dev = DEVICE(VAR_0);
Property *prop = VAR_2;
int32_t *ptr = qdev_get_prop_ptr(dev, prop);
Error *local_err = NULL;
int64_t value;
if (dev->state != DEV_... | [
"static void FUNC_0(Object *VAR_0, Visitor *VAR_1, void *VAR_2,\nconst char *VAR_3, Error **VAR_4)\n{",
"DeviceState *dev = DEVICE(VAR_0);",
"Property *prop = VAR_2;",
"int32_t *ptr = qdev_get_prop_ptr(dev, prop);",
"Error *local_err = NULL;",
"int64_t value;",
"if (dev->state != DEV_STATE_CREATED) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47,... |
1,808 | static av_cold int smvjpeg_decode_init(AVCodecContext *avctx)
{
SMVJpegDecodeContext *s = avctx->priv_data;
AVCodec *codec;
AVDictionary *thread_opt = NULL;
int ret = 0;
s->frames_per_jpeg = 0;
s->picture[0] = av_frame_alloc();
if (!s->picture[0])
return AVERROR(ENOMEM);... | true | FFmpeg | 02cb7d4c9c3adfae84ef0d5646c2de944176f849 | static av_cold int smvjpeg_decode_init(AVCodecContext *avctx)
{
SMVJpegDecodeContext *s = avctx->priv_data;
AVCodec *codec;
AVDictionary *thread_opt = NULL;
int ret = 0;
s->frames_per_jpeg = 0;
s->picture[0] = av_frame_alloc();
if (!s->picture[0])
return AVERROR(ENOMEM);... | {
"code": [
" if (!s->picture[1])",
" SMVJpegDecodeContext *s = avctx->priv_data;",
" return ret;"
],
"line_no": [
29,
5,
91
]
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
SMVJpegDecodeContext *s = avctx->priv_data;
AVCodec *codec;
AVDictionary *thread_opt = NULL;
int VAR_0 = 0;
s->frames_per_jpeg = 0;
s->picture[0] = av_frame_alloc();
if (!s->picture[0])
return AVERROR(ENOMEM);
s->... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"SMVJpegDecodeContext *s = avctx->priv_data;",
"AVCodec *codec;",
"AVDictionary *thread_opt = NULL;",
"int VAR_0 = 0;",
"s->frames_per_jpeg = 0;",
"s->picture[0] = av_frame_alloc();",
"if (!s->picture[0])\nreturn AVERROR(ENOMEM);",
"s->picture[1... | [
0,
1,
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,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21,
23
],
[
27
],
[
29,
31
],
[
35
],
[
39,
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57
],
[... |
1,809 | static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const char *vfilters)
{
static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE };
char sws_flags_str[128];
char buffersrc_args[256];
int ret;
AVBufferSinkParams *buffersink_params = av_buffersi... | true | FFmpeg | a63d7213b3eb96a35fdf34b05f45e5675107d8f9 | static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const char *vfilters)
{
static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE };
char sws_flags_str[128];
char buffersrc_args[256];
int ret;
AVBufferSinkParams *buffersink_params = av_buffersi... | {
"code": [
" codec->sample_aspect_ratio.num, codec->sample_aspect_ratio.den);"
],
"line_no": [
35
]
} | static int FUNC_0(AVFilterGraph *VAR_0, VideoState *VAR_1, const char *VAR_2)
{
static const enum AVPixelFormat VAR_3[] = { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE };
char VAR_4[128];
char VAR_5[256];
int VAR_6;
AVBufferSinkParams *buffersink_params = av_buffersink_params_alloc();
AVFilterCon... | [
"static int FUNC_0(AVFilterGraph *VAR_0, VideoState *VAR_1, const char *VAR_2)\n{",
"static const enum AVPixelFormat VAR_3[] = { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE };",
"char VAR_4[128];",
"char VAR_5[256];",
"int VAR_6;",
"AVBufferSinkParams *buffersink_params = av_buffersink_params_alloc();",
"AVFilt... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27,
29,
31,
33,
35
],
[
39,
41,
43,
45,
47
],
[
51
],
[
53,
55,
57
],
[
59
... |
1,810 | static void pxa2xx_pcmcia_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
dc->realize = pxa2xx_pcmcia_realize;
}
| true | qemu | 7797a73947d5c0e63dd5552b348cf66c384b4555 | static void pxa2xx_pcmcia_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
dc->realize = pxa2xx_pcmcia_realize;
}
| {
"code": [
"static void pxa2xx_pcmcia_class_init(ObjectClass *oc, void *data)",
" DeviceClass *dc = DEVICE_CLASS(oc);",
" dc->realize = pxa2xx_pcmcia_realize;"
],
"line_no": [
1,
5,
9
]
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
dc->realize = pxa2xx_pcmcia_realize;
}
| [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"dc->realize = pxa2xx_pcmcia_realize;",
"}"
] | [
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
1,811 | static void cuvid_flush(AVCodecContext *avctx)
{
CuvidContext *ctx = avctx->priv_data;
AVHWDeviceContext *device_ctx = (AVHWDeviceContext*)ctx->hwdevice->data;
AVCUDADeviceContext *device_hwctx = device_ctx->hwctx;
CUcontext dummy, cuda_ctx = device_hwctx->cuda_ctx;
CUVIDSOURCEDATAPACKET seq_p... | false | FFmpeg | 49511501aa06ac98e41f0aa30c75ec2868a7dbd2 | static void cuvid_flush(AVCodecContext *avctx)
{
CuvidContext *ctx = avctx->priv_data;
AVHWDeviceContext *device_ctx = (AVHWDeviceContext*)ctx->hwdevice->data;
AVCUDADeviceContext *device_hwctx = device_ctx->hwctx;
CUcontext dummy, cuda_ctx = device_hwctx->cuda_ctx;
CUVIDSOURCEDATAPACKET seq_p... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVCodecContext *VAR_0)
{
CuvidContext *ctx = VAR_0->priv_data;
AVHWDeviceContext *device_ctx = (AVHWDeviceContext*)ctx->hwdevice->data;
AVCUDADeviceContext *device_hwctx = device_ctx->hwctx;
CUcontext dummy, cuda_ctx = device_hwctx->cuda_ctx;
CUVIDSOURCEDATAPACKET seq_pkt = ... | [
"static void FUNC_0(AVCodecContext *VAR_0)\n{",
"CuvidContext *ctx = VAR_0->priv_data;",
"AVHWDeviceContext *device_ctx = (AVHWDeviceContext*)ctx->hwdevice->data;",
"AVCUDADeviceContext *device_hwctx = device_ctx->hwctx;",
"CUcontext dummy, cuda_ctx = device_hwctx->cuda_ctx;",
"CUVIDSOURCEDATAPACKET seq_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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25,
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[... |
1,812 | void ff_avg_h264_qpel8_mc00_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride)
{
avg_width8_msa(src, stride, dst, stride, 8);
}
| false | FFmpeg | 0105ed551cb9610c62b6920a301125781e1161a0 | void ff_avg_h264_qpel8_mc00_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride)
{
avg_width8_msa(src, stride, dst, stride, 8);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1,
ptrdiff_t VAR_2)
{
avg_width8_msa(VAR_1, VAR_2, VAR_0, VAR_2, 8);
}
| [
"void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1,\nptrdiff_t VAR_2)\n{",
"avg_width8_msa(VAR_1, VAR_2, VAR_0, VAR_2, 8);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
1,813 | static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pict, int *got_packet)
{
TiffEncoderContext *s = avctx->priv_data;
const AVFrame *const p = pict;
int i;
uint8_t *ptr;
uint8_t *offset;
uint32_t strips;
uint32_t *strip_sizes = NUL... | false | FFmpeg | 0562887a984388fdc7a9b71c9374ff9c756fb4f1 | static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pict, int *got_packet)
{
TiffEncoderContext *s = avctx->priv_data;
const AVFrame *const p = pict;
int i;
uint8_t *ptr;
uint8_t *offset;
uint32_t strips;
uint32_t *strip_sizes = NUL... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,
const AVFrame *VAR_2, int *VAR_3)
{
TiffEncoderContext *s = VAR_0->priv_data;
const AVFrame *const VAR_4 = VAR_2;
int VAR_5;
uint8_t *ptr;
uint8_t *offset;
uint32_t strips;
uint32_t *strip_sizes = NU... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{",
"TiffEncoderContext *s = VAR_0->priv_data;",
"const AVFrame *const VAR_4 = VAR_2;",
"int VAR_5;",
"uint8_t *ptr;",
"uint8_t *offset;",
"uint32_t strips;",
"uint32_t *strip_sizes = NULL;",
"uint32_t *... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[... |
1,814 | static int parse_key(DBEContext *s)
{
int key = 0;
if (s->key_present && s->input_size > 0)
key = AV_RB24(s->input) >> 24 - s->word_bits;
skip_input(s, s->key_present);
return key;
}
| true | FFmpeg | 5e715b583dab85735660b15a8d217a69164675fe | static int parse_key(DBEContext *s)
{
int key = 0;
if (s->key_present && s->input_size > 0)
key = AV_RB24(s->input) >> 24 - s->word_bits;
skip_input(s, s->key_present);
return key;
}
| {
"code": [
" int key = 0;",
" if (s->key_present && s->input_size > 0)",
" key = AV_RB24(s->input) >> 24 - s->word_bits;",
" skip_input(s, s->key_present);",
" return key;"
],
"line_no": [
5,
9,
11,
15,
17
]
} | static int FUNC_0(DBEContext *VAR_0)
{
int VAR_1 = 0;
if (VAR_0->key_present && VAR_0->input_size > 0)
VAR_1 = AV_RB24(VAR_0->input) >> 24 - VAR_0->word_bits;
skip_input(VAR_0, VAR_0->key_present);
return VAR_1;
}
| [
"static int FUNC_0(DBEContext *VAR_0)\n{",
"int VAR_1 = 0;",
"if (VAR_0->key_present && VAR_0->input_size > 0)\nVAR_1 = AV_RB24(VAR_0->input) >> 24 - VAR_0->word_bits;",
"skip_input(VAR_0, VAR_0->key_present);",
"return VAR_1;",
"}"
] | [
0,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
17
],
[
19
]
] |
1,815 | static int vaapi_encode_issue(AVCodecContext *avctx,
VAAPIEncodePicture *pic)
{
VAAPIEncodeContext *ctx = avctx->priv_data;
VAAPIEncodeSlice *slice;
VAStatus vas;
int err, i;
char data[MAX_PARAM_BUFFER_SIZE];
size_t bit_len;
av_log(avctx, AV_LOG_DEBUG... | true | FFmpeg | 17aeee5832b9188b570c3d3de4197e4cdc54c634 | static int vaapi_encode_issue(AVCodecContext *avctx,
VAAPIEncodePicture *pic)
{
VAAPIEncodeContext *ctx = avctx->priv_data;
VAAPIEncodeSlice *slice;
VAStatus vas;
int err, i;
char data[MAX_PARAM_BUFFER_SIZE];
size_t bit_len;
av_log(avctx, AV_LOG_DEBUG... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
VAAPIEncodePicture *VAR_1)
{
VAAPIEncodeContext *ctx = VAR_0->priv_data;
VAAPIEncodeSlice *slice;
VAStatus vas;
int VAR_2, VAR_3;
char VAR_4[MAX_PARAM_BUFFER_SIZE];
size_t bit_len;
av_log(VAR_0, AV_LOG_DEBUG, "... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nVAAPIEncodePicture *VAR_1)\n{",
"VAAPIEncodeContext *ctx = VAR_0->priv_data;",
"VAAPIEncodeSlice *slice;",
"VAStatus vas;",
"int VAR_2, VAR_3;",
"char VAR_4[MAX_PARAM_BUFFER_SIZE];",
"size_t bit_len;",
"av_log(VAR_0, AV_LOG_DEBUG, \"Issuing encode for 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
],
[
21,
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
49
... |
1,816 | static void pc_q35_machine_options(MachineClass *m)
{
m->family = "pc_q35";
m->desc = "Standard PC (Q35 + ICH9, 2009)";
m->hot_add_cpu = pc_hot_add_cpu;
m->units_per_default_bus = 1;
m->default_machine_opts = "firmware=bios-256k.bin";
m->default_display = "std";
m->no_floppy = 1;
} | true | qemu | bf8d492405feaee2c1685b3b9d5e03228ed3e47f | static void pc_q35_machine_options(MachineClass *m)
{
m->family = "pc_q35";
m->desc = "Standard PC (Q35 + ICH9, 2009)";
m->hot_add_cpu = pc_hot_add_cpu;
m->units_per_default_bus = 1;
m->default_machine_opts = "firmware=bios-256k.bin";
m->default_display = "std";
m->no_floppy = 1;
} | {
"code": [],
"line_no": []
} | static void FUNC_0(MachineClass *VAR_0)
{
VAR_0->family = "pc_q35";
VAR_0->desc = "Standard PC (Q35 + ICH9, 2009)";
VAR_0->hot_add_cpu = pc_hot_add_cpu;
VAR_0->units_per_default_bus = 1;
VAR_0->default_machine_opts = "firmware=bios-256k.bin";
VAR_0->default_display = "std";
VAR_0->no... | [
"static void FUNC_0(MachineClass *VAR_0)\n{",
"VAR_0->family = \"pc_q35\";",
"VAR_0->desc = \"Standard PC (Q35 + ICH9, 2009)\";",
"VAR_0->hot_add_cpu = pc_hot_add_cpu;",
"VAR_0->units_per_default_bus = 1;",
"VAR_0->default_machine_opts = \"firmware=bios-256k.bin\";",
"VAR_0->default_display = \"std\";",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
20
]
] |
1,818 | static int check_protocol_support(bool *has_ipv4, bool *has_ipv6)
{
struct sockaddr_in sin = {
.sin_family = AF_INET,
.sin_addr = { .s_addr = htonl(INADDR_LOOPBACK) },
};
struct sockaddr_in6 sin6 = {
.sin6_family = AF_INET6,
.sin6_addr = IN6ADDR_LOOPBACK_INIT,
};... | true | qemu | cfd47a71df51047833d182e9e97244e7816b57da | static int check_protocol_support(bool *has_ipv4, bool *has_ipv6)
{
struct sockaddr_in sin = {
.sin_family = AF_INET,
.sin_addr = { .s_addr = htonl(INADDR_LOOPBACK) },
};
struct sockaddr_in6 sin6 = {
.sin6_family = AF_INET6,
.sin6_addr = IN6ADDR_LOOPBACK_INIT,
};... | {
"code": [
" return -1;",
" return -1;",
" return 0;",
" struct sockaddr_in sin = {",
" .sin_family = AF_INET,",
" .sin_addr = { .s_addr = htonl(INADDR_LOOPBACK) },",
" };",
" struct sockaddr_in6 sin6 = {",
" .sin6_family = AF_INET6,"... | static int FUNC_0(bool *VAR_0, bool *VAR_1)
{
struct sockaddr_in VAR_2 = {
.sin_family = AF_INET,
.sin_addr = { .s_addr = htonl(INADDR_LOOPBACK) },
};
struct sockaddr_in6 VAR_3 = {
.sin6_family = AF_INET6,
.sin6_addr = IN6ADDR_LOOPBACK_INIT,
};
if (check_b... | [
"static int FUNC_0(bool *VAR_0, bool *VAR_1)\n{",
"struct sockaddr_in VAR_2 = {",
".sin_family = AF_INET,\n.sin_addr = { .s_addr = htonl(INADDR_LOOPBACK) },",
"};",
"struct sockaddr_in6 VAR_3 = {",
".sin6_family = AF_INET6,\n.sin6_addr = IN6ADDR_LOOPBACK_INIT,\n};",
"if (check_bind((struct sockaddr *)&V... | [
0,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
15,
17,
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
]
] |
1,819 | static inline void RENAME(rgb24to32)(const uint8_t *src,uint8_t *dst,unsigned src_size)
{
uint8_t *dest = dst;
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
end = s + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*s):"memory");
mm_end ... | true | FFmpeg | 7f526efd17973ec6d2204f7a47b6923e2be31363 | static inline void RENAME(rgb24to32)(const uint8_t *src,uint8_t *dst,unsigned src_size)
{
uint8_t *dest = dst;
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
end = s + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*s):"memory");
mm_end ... | {
"code": [
"static inline void RENAME(rgb24to32)(const uint8_t *src,uint8_t *dst,unsigned src_size)"
],
"line_no": [
1
]
} | static inline void FUNC_0(rgb24to32)(const uint8_t *src,uint8_t *dst,unsigned src_size)
{
uint8_t *dest = dst;
const uint8_t *VAR_0 = src;
const uint8_t *VAR_1;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
VAR_1 = VAR_0 + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*VAR_0):"memo... | [
"static inline void FUNC_0(rgb24to32)(const uint8_t *src,uint8_t *dst,unsigned src_size)\n{",
"uint8_t *dest = dst;",
"const uint8_t *VAR_0 = src;",
"const uint8_t *VAR_1;",
"#ifdef HAVE_MMX\nconst uint8_t *mm_end;",
"#endif\nVAR_1 = VAR_0 + src_size;",
"#ifdef HAVE_MMX\n__asm __volatile(PREFETCH\"\t%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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15,
17
],
[
19,
21
],
[
23
],
[
25
],
[
27,
29
],
[
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,... |
1,820 | static int encode_picture(MpegEncContext *s, int picture_number)
{
int i, ret;
int bits;
int context_count = s->slice_context_count;
s->picture_number = picture_number;
/* Reset the average MB variance */
s->me.mb_var_sum_temp =
s->me.mc_mb_var_sum_temp = 0;
/* we need ... | true | FFmpeg | e92a78a4095d69d876bef189225608a35166dc4a | static int encode_picture(MpegEncContext *s, int picture_number)
{
int i, ret;
int bits;
int context_count = s->slice_context_count;
s->picture_number = picture_number;
s->me.mb_var_sum_temp =
s->me.mc_mb_var_sum_temp = 0;
if (s->codec_id == AV_CODEC_ID_MPE... | {
"code": [
" av_dlog(s, \"Scene change detected, encoding as I Frame %d %d\\n\","
],
"line_no": [
189
]
} | static int FUNC_0(MpegEncContext *VAR_0, int VAR_1)
{
int VAR_2, VAR_3;
int VAR_4;
int VAR_5 = VAR_0->slice_context_count;
VAR_0->VAR_1 = VAR_1;
VAR_0->me.mb_var_sum_temp =
VAR_0->me.mc_mb_var_sum_temp = 0;
if (VAR_0->codec_id == AV_CODEC_ID_MPEG1VIDEO || V... | [
"static int FUNC_0(MpegEncContext *VAR_0, int VAR_1)\n{",
"int VAR_2, VAR_3;",
"int VAR_4;",
"int VAR_5 = VAR_0->slice_context_count;",
"VAR_0->VAR_1 = VAR_1;",
"VAR_0->me.mb_var_sum_temp =\nVAR_0->me.mc_mb_var_sum_temp = 0;",
"if (VAR_0->codec_id == AV_CODEC_ID_MPEG1VIDEO || VAR_0->codec_id == AV_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,
1,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
19,
21
],
[
29,
31
],
[
33,
35
],
[
39
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55,
57
],
[
59
],
[
63
],
[
65,
67
],
[... |
1,821 | static inline int compare_masked(uint64_t x, uint64_t y, uint64_t mask)
{
return (x & mask) == (y & mask);
}
| true | qemu | 299b520cd4092be3c53f8380b81315c33927d9d3 | static inline int compare_masked(uint64_t x, uint64_t y, uint64_t mask)
{
return (x & mask) == (y & mask);
}
| {
"code": [
"static inline int compare_masked(uint64_t x, uint64_t y, uint64_t mask)",
" return (x & mask) == (y & mask);"
],
"line_no": [
1,
5
]
} | static inline int FUNC_0(uint64_t VAR_0, uint64_t VAR_1, uint64_t VAR_2)
{
return (VAR_0 & VAR_2) == (VAR_1 & VAR_2);
}
| [
"static inline int FUNC_0(uint64_t VAR_0, uint64_t VAR_1, uint64_t VAR_2)\n{",
"return (VAR_0 & VAR_2) == (VAR_1 & VAR_2);",
"}"
] | [
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
1,823 | static int asf_build_simple_index(AVFormatContext *s, int stream_index)
{
ff_asf_guid g;
ASFContext *asf = s->priv_data;
int64_t current_pos = avio_tell(s->pb);
int64_t ret;
if((ret = avio_seek(s->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET)) < 0) {
return ret;
if (... | true | FFmpeg | afc9c683ed9db01edb357bc8c19edad4282b3a97 | static int asf_build_simple_index(AVFormatContext *s, int stream_index)
{
ff_asf_guid g;
ASFContext *asf = s->priv_data;
int64_t current_pos = avio_tell(s->pb);
int64_t ret;
if((ret = avio_seek(s->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET)) < 0) {
return ret;
if (... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)
{
ff_asf_guid g;
ASFContext *asf = VAR_0->priv_data;
int64_t current_pos = avio_tell(VAR_0->pb);
int64_t ret;
if((ret = avio_seek(VAR_0->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET)) < 0) {
return ret;
if ((ret = ... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)\n{",
"ff_asf_guid g;",
"ASFContext *asf = VAR_0->priv_data;",
"int64_t current_pos = avio_tell(VAR_0->pb);",
"int64_t ret;",
"if((ret = avio_seek(VAR_0->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET)) < 0) {",
"return ret;",
"if... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9,
12
],
[
13
],
[
14
],
[
15
],
[
16,
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22,
23
],
[
24
],
[
... |
1,824 | static void ppc_cpu_initfn(Object *obj)
{
CPUState *cs = CPU(obj);
PowerPCCPU *cpu = POWERPC_CPU(obj);
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
CPUPPCState *env = &cpu->env;
cs->env_ptr = env;
cpu_exec_init(env, &error_abort);
cpu->cpu_dt_id = cs->cpu_index;
env->m... | true | qemu | 6dd0f8342ddfbd8db3e3de1a17686cedbc14e9f1 | static void ppc_cpu_initfn(Object *obj)
{
CPUState *cs = CPU(obj);
PowerPCCPU *cpu = POWERPC_CPU(obj);
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
CPUPPCState *env = &cpu->env;
cs->env_ptr = env;
cpu_exec_init(env, &error_abort);
cpu->cpu_dt_id = cs->cpu_index;
env->m... | {
"code": [
" cpu_exec_init(env, &error_abort);",
" cpu->cpu_dt_id = cs->cpu_index;"
],
"line_no": [
17,
19
]
} | static void FUNC_0(Object *VAR_0)
{
CPUState *cs = CPU(VAR_0);
PowerPCCPU *cpu = POWERPC_CPU(VAR_0);
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
CPUPPCState *env = &cpu->env;
cs->env_ptr = env;
cpu_exec_init(env, &error_abort);
cpu->cpu_dt_id = cs->cpu_index;
env->msr... | [
"static void FUNC_0(Object *VAR_0)\n{",
"CPUState *cs = CPU(VAR_0);",
"PowerPCCPU *cpu = POWERPC_CPU(VAR_0);",
"PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);",
"CPUPPCState *env = &cpu->env;",
"cs->env_ptr = env;",
"cpu_exec_init(env, &error_abort);",
"cpu->cpu_dt_id = cs->cpu_index;",
"env->ms... | [
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43,
45
],
[
47
],
[... |
1,825 | static void vhost_user_cleanup(NetClientState *nc)
{
VhostUserState *s = DO_UPCAST(VhostUserState, nc, nc);
if (s->vhost_net) {
vhost_net_cleanup(s->vhost_net);
g_free(s->vhost_net);
s->vhost_net = NULL;
if (nc->queue_index == 0) {
qemu_chr_fe_deinit(&s->chr, t... | true | qemu | 41d4e5ec9f77acaca706d00ee4baaf5324274da5 | static void vhost_user_cleanup(NetClientState *nc)
{
VhostUserState *s = DO_UPCAST(VhostUserState, nc, nc);
if (s->vhost_net) {
vhost_net_cleanup(s->vhost_net);
g_free(s->vhost_net);
s->vhost_net = NULL;
if (nc->queue_index == 0) {
qemu_chr_fe_deinit(&s->chr, t... | {
"code": [],
"line_no": []
} | static void FUNC_0(NetClientState *VAR_0)
{
VhostUserState *s = DO_UPCAST(VhostUserState, VAR_0, VAR_0);
if (s->vhost_net) {
vhost_net_cleanup(s->vhost_net);
g_free(s->vhost_net);
s->vhost_net = NULL;
if (VAR_0->queue_index == 0) {
qemu_chr_fe_deinit(&s->chr, t... | [
"static void FUNC_0(NetClientState *VAR_0)\n{",
"VhostUserState *s = DO_UPCAST(VhostUserState, VAR_0, VAR_0);",
"if (s->vhost_net) {",
"vhost_net_cleanup(s->vhost_net);",
"g_free(s->vhost_net);",
"s->vhost_net = NULL;",
"if (VAR_0->queue_index == 0) {",
"qemu_chr_fe_deinit(&s->chr, true);",
"qemu_pu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
18
],
[
24
],
[
29
]
] |
1,827 | int av_base64_decode(uint8_t *out, const char *in, int out_size)
{
int i, v;
uint8_t *dst = out;
v = 0;
for (i = 0; in[i] && in[i] != '='; i++) {
unsigned int index= in[i]-43;
if (index>=FF_ARRAY_ELEMS(map2) || map2[index] == 0xff)
return -1;
v = (v << 6) +... | true | FFmpeg | dd3b73f3905c61c99f1d3fb58bc7ee380eb8aa2e | int av_base64_decode(uint8_t *out, const char *in, int out_size)
{
int i, v;
uint8_t *dst = out;
v = 0;
for (i = 0; in[i] && in[i] != '='; i++) {
unsigned int index= in[i]-43;
if (index>=FF_ARRAY_ELEMS(map2) || map2[index] == 0xff)
return -1;
v = (v << 6) +... | {
"code": [
" int i, v;",
" v = 0;"
],
"line_no": [
5,
11
]
} | int FUNC_0(uint8_t *VAR_0, const char *VAR_1, int VAR_2)
{
int VAR_3, VAR_4;
uint8_t *dst = VAR_0;
VAR_4 = 0;
for (VAR_3 = 0; VAR_1[VAR_3] && VAR_1[VAR_3] != '='; VAR_3++) {
unsigned int VAR_5= VAR_1[VAR_3]-43;
if (VAR_5>=FF_ARRAY_ELEMS(map2) || map2[VAR_5] == 0xff)
... | [
"int FUNC_0(uint8_t *VAR_0, const char *VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4;",
"uint8_t *dst = VAR_0;",
"VAR_4 = 0;",
"for (VAR_3 = 0; VAR_1[VAR_3] && VAR_1[VAR_3] != '='; VAR_3++) {",
"unsigned int VAR_5= VAR_1[VAR_3]-43;",
"if (VAR_5>=FF_ARRAY_ELEMS(map2) || map2[VAR_5] == 0xff)\nreturn -1;",
"... | [
0,
1,
0,
1,
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
],
[
37
],
[
39
]
] |
1,828 | static int process_input(int file_index)
{
InputFile *ifile = input_files[file_index];
AVFormatContext *is;
InputStream *ist;
AVPacket pkt;
int ret, i, j;
is = ifile->ctx;
ret = get_input_packet(ifile, &pkt);
if (ret == AVERROR(EAGAIN)) {
ifile->eagain = 1;
... | true | FFmpeg | 91c18beb9d670a2f64f3ffbc1d60d443eb2ef858 | static int process_input(int file_index)
{
InputFile *ifile = input_files[file_index];
AVFormatContext *is;
InputStream *ist;
AVPacket pkt;
int ret, i, j;
is = ifile->ctx;
ret = get_input_packet(ifile, &pkt);
if (ret == AVERROR(EAGAIN)) {
ifile->eagain = 1;
... | {
"code": [
" uint64_t stime = av_rescale_q(input_files[file_index]->ctx->start_time, AV_TIME_BASE_Q, ist->st->time_base);",
" uint64_t stime2= stime + (1LL<<ist->st->pts_wrap_bits);",
" if(pkt.dts != AV_NOPTS_VALUE && pkt.dts > stime && pkt.dts - stime > stime2 - pkt.dts) {",
" ... | static int FUNC_0(int VAR_0)
{
InputFile *ifile = input_files[VAR_0];
AVFormatContext *is;
InputStream *ist;
AVPacket pkt;
int VAR_1, VAR_2, VAR_3;
is = ifile->ctx;
VAR_1 = get_input_packet(ifile, &pkt);
if (VAR_1 == AVERROR(EAGAIN)) {
ifile->eagain = 1;
r... | [
"static int FUNC_0(int VAR_0)\n{",
"InputFile *ifile = input_files[VAR_0];",
"AVFormatContext *is;",
"InputStream *ist;",
"AVPacket pkt;",
"int VAR_1, VAR_2, VAR_3;",
"is = ifile->ctx;",
"VAR_1 = get_input_packet(ifile, &pkt);",
"if (VAR_1 == AVERROR(EAGAIN)) {",
"ifile->eagain = 1;",
"return V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
1,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
47
],
[... |
1,829 | void visit_type_int8(Visitor *v, int8_t *obj, const char *name, Error **errp)
{
int64_t value;
if (!error_is_set(errp)) {
if (v->type_int8) {
v->type_int8(v, obj, name, errp);
} else {
value = *obj;
v->type_int(v, &value, name, errp);
if (... | true | qemu | 297a3646c2947ee64a6d42ca264039732c6218e0 | void visit_type_int8(Visitor *v, int8_t *obj, const char *name, Error **errp)
{
int64_t value;
if (!error_is_set(errp)) {
if (v->type_int8) {
v->type_int8(v, obj, name, errp);
} else {
value = *obj;
v->type_int(v, &value, name, errp);
if (... | {
"code": [
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" } else {",
" value = *obj;",
" v->t... | void FUNC_0(Visitor *VAR_0, int8_t *VAR_1, const char *VAR_2, Error **VAR_3)
{
int64_t value;
if (!error_is_set(VAR_3)) {
if (VAR_0->type_int8) {
VAR_0->type_int8(VAR_0, VAR_1, VAR_2, VAR_3);
} else {
value = *VAR_1;
VAR_0->type_int(VAR_0, &value, VAR_... | [
"void FUNC_0(Visitor *VAR_0, int8_t *VAR_1, const char *VAR_2, Error **VAR_3)\n{",
"int64_t value;",
"if (!error_is_set(VAR_3)) {",
"if (VAR_0->type_int8) {",
"VAR_0->type_int8(VAR_0, VAR_1, VAR_2, VAR_3);",
"} else {",
"value = *VAR_1;",
"VAR_0->type_int(VAR_0, &value, VAR_2, VAR_3);",
"if (value <... | [
0,
0,
1,
1,
1,
0,
1,
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
],
[
33
],
[
35
]
] |
1,831 | static void roq_encode_video(RoqContext *enc)
{
RoqTempdata *tempData = enc->tmpData;
int i;
memset(tempData, 0, sizeof(*tempData));
create_cel_evals(enc, tempData);
generate_new_codebooks(enc, tempData);
if (enc->framesSinceKeyframe >= 1) {
motion_search(enc, 8);
... | false | FFmpeg | ee26abf2a4884bb56959bac8215758195776c553 | static void roq_encode_video(RoqContext *enc)
{
RoqTempdata *tempData = enc->tmpData;
int i;
memset(tempData, 0, sizeof(*tempData));
create_cel_evals(enc, tempData);
generate_new_codebooks(enc, tempData);
if (enc->framesSinceKeyframe >= 1) {
motion_search(enc, 8);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(RoqContext *VAR_0)
{
RoqTempdata *tempData = VAR_0->tmpData;
int VAR_1;
memset(tempData, 0, sizeof(*tempData));
create_cel_evals(VAR_0, tempData);
generate_new_codebooks(VAR_0, tempData);
if (VAR_0->framesSinceKeyframe >= 1) {
motion_search(VAR_0, 8);
... | [
"static void FUNC_0(RoqContext *VAR_0)\n{",
"RoqTempdata *tempData = VAR_0->tmpData;",
"int VAR_1;",
"memset(tempData, 0, sizeof(*tempData));",
"create_cel_evals(VAR_0, tempData);",
"generate_new_codebooks(VAR_0, tempData);",
"if (VAR_0->framesSinceKeyframe >= 1) {",
"motion_search(VAR_0, 8);",
"mot... | [
0,
0,
0,
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
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33,
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
57
],
[
61,
63... |
1,832 | static int packet_alloc(AVBufferRef **buf, int size)
{
int ret;
if ((unsigned)size >= (unsigned)size + AV_INPUT_BUFFER_PADDING_SIZE)
return AVERROR(EINVAL);
ret = av_buffer_realloc(buf, size + AV_INPUT_BUFFER_PADDING_SIZE);
if (ret < 0)
return ret;
memset((*buf)->data + s... | true | FFmpeg | da3c3c446cb434be9d0025f519e00c2385135c85 | static int packet_alloc(AVBufferRef **buf, int size)
{
int ret;
if ((unsigned)size >= (unsigned)size + AV_INPUT_BUFFER_PADDING_SIZE)
return AVERROR(EINVAL);
ret = av_buffer_realloc(buf, size + AV_INPUT_BUFFER_PADDING_SIZE);
if (ret < 0)
return ret;
memset((*buf)->data + s... | {
"code": [
" if ((unsigned)size >= (unsigned)size + AV_INPUT_BUFFER_PADDING_SIZE)"
],
"line_no": [
7
]
} | static int FUNC_0(AVBufferRef **VAR_0, int VAR_1)
{
int VAR_2;
if ((unsigned)VAR_1 >= (unsigned)VAR_1 + AV_INPUT_BUFFER_PADDING_SIZE)
return AVERROR(EINVAL);
VAR_2 = av_buffer_realloc(VAR_0, VAR_1 + AV_INPUT_BUFFER_PADDING_SIZE);
if (VAR_2 < 0)
return VAR_2;
memset((*VAR_... | [
"static int FUNC_0(AVBufferRef **VAR_0, int VAR_1)\n{",
"int VAR_2;",
"if ((unsigned)VAR_1 >= (unsigned)VAR_1 + AV_INPUT_BUFFER_PADDING_SIZE)\nreturn AVERROR(EINVAL);",
"VAR_2 = av_buffer_realloc(VAR_0, VAR_1 + AV_INPUT_BUFFER_PADDING_SIZE);",
"if (VAR_2 < 0)\nreturn VAR_2;",
"memset((*VAR_0)->data + VAR_... | [
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
13
],
[
15,
17
],
[
21
],
[
25
],
[
27
]
] |
1,833 | static void m4sl_cb(MpegTSFilter *filter, const uint8_t *section,
int section_len)
{
MpegTSContext *ts = filter->u.section_filter.opaque;
MpegTSSectionFilter *tssf = &filter->u.section_filter;
SectionHeader h;
const uint8_t *p, *p_end;
AVIOContext pb;
int mp4_descr_co... | false | FFmpeg | 4e8d01f20ce82b49f47c704a461c5d30866affaf | static void m4sl_cb(MpegTSFilter *filter, const uint8_t *section,
int section_len)
{
MpegTSContext *ts = filter->u.section_filter.opaque;
MpegTSSectionFilter *tssf = &filter->u.section_filter;
SectionHeader h;
const uint8_t *p, *p_end;
AVIOContext pb;
int mp4_descr_co... | {
"code": [],
"line_no": []
} | static void FUNC_0(MpegTSFilter *VAR_0, const uint8_t *VAR_1,
int VAR_2)
{
MpegTSContext *ts = VAR_0->u.section_filter.opaque;
MpegTSSectionFilter *tssf = &VAR_0->u.section_filter;
SectionHeader h;
const uint8_t *VAR_3, *p_end;
AVIOContext pb;
int VAR_4 = 0;
Mp4D... | [
"static void FUNC_0(MpegTSFilter *VAR_0, const uint8_t *VAR_1,\nint VAR_2)\n{",
"MpegTSContext *ts = VAR_0->u.section_filter.opaque;",
"MpegTSSectionFilter *tssf = &VAR_0->u.section_filter;",
"SectionHeader h;",
"const uint8_t *VAR_3, *p_end;",
"AVIOContext pb;",
"int VAR_4 = 0;",
"Mp4Descr mp4_descr[... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
39,
41
],
[
43
],
[
47,
49
],
[... |
1,834 | static int ffat_encode(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
{
ATDecodeContext *at = avctx->priv_data;
OSStatus ret;
AudioBufferList out_buffers = {
.mNumberBuffers = 1,
.mBuffers = {
{
... | false | FFmpeg | 143685a42bbc8861b626457ce4cb8b1ce4b0c436 | static int ffat_encode(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
{
ATDecodeContext *at = avctx->priv_data;
OSStatus ret;
AudioBufferList out_buffers = {
.mNumberBuffers = 1,
.mBuffers = {
{
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,
const AVFrame *VAR_2, int *VAR_3)
{
ATDecodeContext *at = VAR_0->priv_data;
OSStatus ret;
AudioBufferList out_buffers = {
.mNumberBuffers = 1,
.mBuffers = {
{
.mNumberChann... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{",
"ATDecodeContext *at = VAR_0->priv_data;",
"OSStatus ret;",
"AudioBufferList out_buffers = {",
".mNumberBuffers = 1,\n.mBuffers = {",
"{",
".mNumberChannels = VAR_0->channels,\n.mDataByteSize = at->pkt_siz... | [
0,
0,
0,
0,
0,
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,
23,
25
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
41
],
[
45
],
[
47,
49
],
[
51,
53
],
[
55
],
[... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.