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 |
|---|---|---|---|---|---|---|---|---|---|---|
619 | static void do_dcbz(CPUPPCState *env, target_ulong addr, int dcache_line_size,
uintptr_t raddr)
{
int i;
addr &= ~(dcache_line_size - 1);
for (i = 0; i < dcache_line_size; i += 4) {
cpu_stl_data_ra(env, addr + i, 0, raddr);
}
if (env->reserve_addr == addr) {
... | true | qemu | c9f82d013be0d8d9c5d9f51bb76e337a0a5a5cac | static void do_dcbz(CPUPPCState *env, target_ulong addr, int dcache_line_size,
uintptr_t raddr)
{
int i;
addr &= ~(dcache_line_size - 1);
for (i = 0; i < dcache_line_size; i += 4) {
cpu_stl_data_ra(env, addr + i, 0, raddr);
}
if (env->reserve_addr == addr) {
... | {
"code": [
"static void do_dcbz(CPUPPCState *env, target_ulong addr, int dcache_line_size,",
" uintptr_t raddr)",
" int i;",
" addr &= ~(dcache_line_size - 1);",
" for (i = 0; i < dcache_line_size; i += 4) {",
" cpu_stl_data_ra(env, addr + i, 0, raddr);",
... | static void FUNC_0(CPUPPCState *VAR_0, target_ulong VAR_1, int VAR_2,
uintptr_t VAR_3)
{
int VAR_4;
VAR_1 &= ~(VAR_2 - 1);
for (VAR_4 = 0; VAR_4 < VAR_2; VAR_4 += 4) {
cpu_stl_data_ra(VAR_0, VAR_1 + VAR_4, 0, VAR_3);
}
if (VAR_0->reserve_addr == VAR_1) {
... | [
"static void FUNC_0(CPUPPCState *VAR_0, target_ulong VAR_1, int VAR_2,\nuintptr_t VAR_3)\n{",
"int VAR_4;",
"VAR_1 &= ~(VAR_2 - 1);",
"for (VAR_4 = 0; VAR_4 < VAR_2; VAR_4 += 4) {",
"cpu_stl_data_ra(VAR_0, VAR_1 + VAR_4, 0, VAR_3);",
"}",
"if (VAR_0->reserve_addr == VAR_1) {",
"VAR_0->reserve_addr = (... | [
1,
1,
1,
1,
1,
0,
1,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
620 | static int32_t ide_nop_int32(IDEDMA *dma, int x)
{
return 0;
}
| true | qemu | a718978ed58abc1ad92567a9c17525136be02a71 | static int32_t ide_nop_int32(IDEDMA *dma, int x)
{
return 0;
}
| {
"code": [
"static int32_t ide_nop_int32(IDEDMA *dma, int x)",
"static int32_t ide_nop_int32(IDEDMA *dma, int x)"
],
"line_no": [
1,
1
]
} | static int32_t FUNC_0(IDEDMA *dma, int x)
{
return 0;
}
| [
"static int32_t FUNC_0(IDEDMA *dma, int x)\n{",
"return 0;",
"}"
] | [
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
621 | static int read_password(char *buf, int buf_size)
{
int c, i;
printf("Password: ");
fflush(stdout);
i = 0;
for(;;) {
c = getchar();
if (c == '\n')
break;
if (i < (buf_size - 1))
buf[i++] = c;
}
buf[i] = '\0';
return 0;
}
| true | qemu | fdcf6e65bce1f8972030fed7af5e8aa5f6ae92c6 | static int read_password(char *buf, int buf_size)
{
int c, i;
printf("Password: ");
fflush(stdout);
i = 0;
for(;;) {
c = getchar();
if (c == '\n')
break;
if (i < (buf_size - 1))
buf[i++] = c;
}
buf[i] = '\0';
return 0;
}
| {
"code": [
" if (c == '\\n')",
" if (i < (buf_size - 1))"
],
"line_no": [
17,
21
]
} | static int FUNC_0(char *VAR_0, int VAR_1)
{
int VAR_2, VAR_3;
printf("Password: ");
fflush(stdout);
VAR_3 = 0;
for(;;) {
VAR_2 = getchar();
if (VAR_2 == '\n')
break;
if (VAR_3 < (VAR_1 - 1))
VAR_0[VAR_3++] = VAR_2;
}
VAR_0[VAR_3] =... | [
"static int FUNC_0(char *VAR_0, int VAR_1)\n{",
"int VAR_2, VAR_3;",
"printf(\"Password: \");",
"fflush(stdout);",
"VAR_3 = 0;",
"for(;;) {",
"VAR_2 = getchar();",
"if (VAR_2 == '\\n')\nbreak;",
"if (VAR_3 < (VAR_1 - 1))\nVAR_0[VAR_3++] = VAR_2;",
"}",
"VAR_0[VAR_3] = '\\0';",
"return 0;",
"... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
622 | long do_rt_sigreturn(CPUARMState *env)
{
struct target_rt_sigframe *frame;
abi_ulong frame_addr = env->xregs[31];
if (frame_addr & 15) {
goto badframe;
}
if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1)) {
goto badframe;
}
if (target_restore_sigframe(... | true | qemu | 7f72cd235fa33f2fc7a8d1cc4d621bf7db61e9eb | long do_rt_sigreturn(CPUARMState *env)
{
struct target_rt_sigframe *frame;
abi_ulong frame_addr = env->xregs[31];
if (frame_addr & 15) {
goto badframe;
}
if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1)) {
goto badframe;
}
if (target_restore_sigframe(... | {
"code": [
" struct target_rt_sigframe *frame;"
],
"line_no": [
5
]
} | long FUNC_0(CPUARMState *VAR_0)
{
struct target_rt_sigframe *VAR_1;
abi_ulong frame_addr = VAR_0->xregs[31];
if (frame_addr & 15) {
goto badframe;
}
if (!lock_user_struct(VERIFY_READ, VAR_1, frame_addr, 1)) {
goto badframe;
}
if (target_restore_sigframe(VAR_0... | [
"long FUNC_0(CPUARMState *VAR_0)\n{",
"struct target_rt_sigframe *VAR_1;",
"abi_ulong frame_addr = VAR_0->xregs[31];",
"if (frame_addr & 15) {",
"goto badframe;",
"}",
"if (!lock_user_struct(VERIFY_READ, VAR_1, frame_addr, 1)) {",
"goto badframe;",
"}",
"if (target_restore_sigframe(VAR_0, VAR_1))... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35,
37,
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
53,
55
],
... |
623 | tcp_sockclosed(struct tcpcb *tp)
{
DEBUG_CALL("tcp_sockclosed");
DEBUG_ARG("tp = %p", tp);
switch (tp->t_state) {
case TCPS_CLOSED:
case TCPS_LISTEN:
case TCPS_SYN_SENT:
tp->t_state = TCPS_CLOSED;
tp = tcp_close(tp);
break;
case TCPS_SYN_RECEIVED:
case TCPS_ESTABLISHED:
tp->t_state ... | true | qemu | b5ab677189b93efa4eaa921f42b21dc008247184 | tcp_sockclosed(struct tcpcb *tp)
{
DEBUG_CALL("tcp_sockclosed");
DEBUG_ARG("tp = %p", tp);
switch (tp->t_state) {
case TCPS_CLOSED:
case TCPS_LISTEN:
case TCPS_SYN_SENT:
tp->t_state = TCPS_CLOSED;
tp = tcp_close(tp);
break;
case TCPS_SYN_RECEIVED:
case TCPS_ESTABLISHED:
tp->t_state ... | {
"code": [
"\tif (tp)",
"\t\ttcp_output(tp);"
],
"line_no": [
49,
51
]
} | FUNC_0(struct tcpcb *VAR_0)
{
DEBUG_CALL("FUNC_0");
DEBUG_ARG("VAR_0 = %p", VAR_0);
switch (VAR_0->t_state) {
case TCPS_CLOSED:
case TCPS_LISTEN:
case TCPS_SYN_SENT:
VAR_0->t_state = TCPS_CLOSED;
VAR_0 = tcp_close(VAR_0);
break;
case TCPS_SYN_RECEIVED:
case TCPS_ESTABLISHED:
VAR_0->... | [
"FUNC_0(struct tcpcb *VAR_0)\n{",
"DEBUG_CALL(\"FUNC_0\");",
"DEBUG_ARG(\"VAR_0 = %p\", VAR_0);",
"switch (VAR_0->t_state) {",
"case TCPS_CLOSED:\ncase TCPS_LISTEN:\ncase TCPS_SYN_SENT:\nVAR_0->t_state = TCPS_CLOSED;",
"VAR_0 = tcp_close(VAR_0);",
"break;",
"case TCPS_SYN_RECEIVED:\ncase TCPS_ESTABLIS... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
13
],
[
17,
19,
21,
23
],
[
25
],
[
27
],
[
31,
33,
35
],
[
37
],
[
41,
43
],
[
45
],
[
47
],
[
49,
51
],
[
53
]
] |
624 | static void icp_pit_write(void *opaque, target_phys_addr_t offset,
uint64_t value, unsigned size)
{
icp_pit_state *s = (icp_pit_state *)opaque;
int n;
n = offset >> 8;
if (n > 3) {
hw_error("sp804_write: Bad timer %d\n", n);
}
arm_timer_write(s->tim... | true | qemu | ee71c984342408a357a74f65915bf66484ba445a | static void icp_pit_write(void *opaque, target_phys_addr_t offset,
uint64_t value, unsigned size)
{
icp_pit_state *s = (icp_pit_state *)opaque;
int n;
n = offset >> 8;
if (n > 3) {
hw_error("sp804_write: Bad timer %d\n", n);
}
arm_timer_write(s->tim... | {
"code": [
" if (n > 3) {",
" if (n > 3) {"
],
"line_no": [
15,
15
]
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
icp_pit_state *s = (icp_pit_state *)VAR_0;
int VAR_4;
VAR_4 = VAR_1 >> 8;
if (VAR_4 > 3) {
hw_error("sp804_write: Bad timer %d\VAR_4", VAR_4);
}
arm_timer_wr... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"icp_pit_state *s = (icp_pit_state *)VAR_0;",
"int VAR_4;",
"VAR_4 = VAR_1 >> 8;",
"if (VAR_4 > 3) {",
"hw_error(\"sp804_write: Bad timer %d\\VAR_4\", VAR_4);",
"}",
"arm_timer_write(s->timer[VAR_4], VAR_1... | [
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
]
] |
625 | static int exynos4210_combiner_init(SysBusDevice *sbd)
{
DeviceState *dev = DEVICE(sbd);
Exynos4210CombinerState *s = EXYNOS4210_COMBINER(dev);
unsigned int i;
/* Allocate general purpose input signals and connect a handler to each of
* them */
qdev_init_gpio_in(dev, exynos4210_combine... | true | qemu | fce0a826083e0416981e2ea9518ce5faa75b81a3 | static int exynos4210_combiner_init(SysBusDevice *sbd)
{
DeviceState *dev = DEVICE(sbd);
Exynos4210CombinerState *s = EXYNOS4210_COMBINER(dev);
unsigned int i;
qdev_init_gpio_in(dev, exynos4210_combiner_handler, IIC_NIRQ);
for (i = 0; i < IIC_NIRQ; i++) {
sysbus_init... | {
"code": [
" for (i = 0; i < IIC_NIRQ; i++) {"
],
"line_no": [
23
]
} | static int FUNC_0(SysBusDevice *VAR_0)
{
DeviceState *dev = DEVICE(VAR_0);
Exynos4210CombinerState *s = EXYNOS4210_COMBINER(dev);
unsigned int VAR_1;
qdev_init_gpio_in(dev, exynos4210_combiner_handler, IIC_NIRQ);
for (VAR_1 = 0; VAR_1 < IIC_NIRQ; VAR_1++) {
sysbus_in... | [
"static int FUNC_0(SysBusDevice *VAR_0)\n{",
"DeviceState *dev = DEVICE(VAR_0);",
"Exynos4210CombinerState *s = EXYNOS4210_COMBINER(dev);",
"unsigned int VAR_1;",
"qdev_init_gpio_in(dev, exynos4210_combiner_handler, IIC_NIRQ);",
"for (VAR_1 = 0; VAR_1 < IIC_NIRQ; VAR_1++) {",
"sysbus_init_irq(VAR_0, &s-... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
17
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
35
],
[
39
],
[
41
]
] |
626 | static uint32_t calc_optimal_rice_params(RiceContext *rc, int porder,
uint32_t *sums, int n, int pred_order)
{
int i;
int k, cnt, part;
uint32_t all_bits;
part = (1 << porder);
all_bits = 0;
cnt = (n >> porder) - pred_order;
for(i=0; i<pa... | false | FFmpeg | 90f03441654f85a1402a65c3dcaa3f634a24c27e | static uint32_t calc_optimal_rice_params(RiceContext *rc, int porder,
uint32_t *sums, int n, int pred_order)
{
int i;
int k, cnt, part;
uint32_t all_bits;
part = (1 << porder);
all_bits = 0;
cnt = (n >> porder) - pred_order;
for(i=0; i<pa... | {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(RiceContext *rc, int porder,
uint32_t *sums, int n, int pred_order)
{
int VAR_0;
int VAR_1, VAR_2, VAR_3;
uint32_t all_bits;
VAR_3 = (1 << porder);
all_bits = 0;
VAR_2 = (n >> porder) - pred_order;
for(VAR_0=0; VAR_... | [
"static uint32_t FUNC_0(RiceContext *rc, int porder,\nuint32_t *sums, int n, int pred_order)\n{",
"int VAR_0;",
"int VAR_1, VAR_2, VAR_3;",
"uint32_t all_bits;",
"VAR_3 = (1 << porder);",
"all_bits = 0;",
"VAR_2 = (n >> porder) - pred_order;",
"for(VAR_0=0; VAR_0<VAR_3; VAR_0++) {",
"if(VAR_0 == 1) ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
43
],
[
45
]
] |
627 | static void raw_decode(uint8_t *dst, const int8_t *src, int src_size)
{
while (src_size--)
*dst++ = *src++ + 128;
}
| false | FFmpeg | da8242e2d6f85d95239082efd0e5e2345e685a2c | static void raw_decode(uint8_t *dst, const int8_t *src, int src_size)
{
while (src_size--)
*dst++ = *src++ + 128;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, const int8_t *VAR_1, int VAR_2)
{
while (VAR_2--)
*VAR_0++ = *VAR_1++ + 128;
}
| [
"static void FUNC_0(uint8_t *VAR_0, const int8_t *VAR_1, int VAR_2)\n{",
"while (VAR_2--)\n*VAR_0++ = *VAR_1++ + 128;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
]
] |
628 | static int dxtory_decode_v1_410(AVCodecContext *avctx, AVFrame *pic,
const uint8_t *src, int src_size)
{
int h, w;
uint8_t *Y1, *Y2, *Y3, *Y4, *U, *V;
int ret;
if (src_size < avctx->width * avctx->height * 9LL / 8) {
av_log(avctx, AV_LOG_ERROR, "packet to... | false | FFmpeg | 76b6f4b7d91901929177cc61d9810dcca0bb40c1 | static int dxtory_decode_v1_410(AVCodecContext *avctx, AVFrame *pic,
const uint8_t *src, int src_size)
{
int h, w;
uint8_t *Y1, *Y2, *Y3, *Y4, *U, *V;
int ret;
if (src_size < avctx->width * avctx->height * 9LL / 8) {
av_log(avctx, AV_LOG_ERROR, "packet to... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1,
const uint8_t *VAR_2, int VAR_3)
{
int VAR_4, VAR_5;
uint8_t *Y1, *Y2, *Y3, *Y4, *U, *V;
int VAR_6;
if (VAR_3 < VAR_0->width * VAR_0->height * 9LL / 8) {
av_log(VAR_0, AV_LOG_ERROR, "packet too smal... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5;",
"uint8_t *Y1, *Y2, *Y3, *Y4, *U, *V;",
"int VAR_6;",
"if (VAR_3 < VAR_0->width * VAR_0->height * 9LL / 8) {",
"av_log(VAR_0, AV_LOG_ERROR, \"packet too small\\n\");",
"return AVERROR_INV... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27,
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
629 | static int ff_filter_frame_framed(AVFilterLink *link, AVFilterBufferRef *frame)
{
int (*filter_frame)(AVFilterLink *, AVFilterBufferRef *);
AVFilterPad *src = link->srcpad;
AVFilterPad *dst = link->dstpad;
AVFilterBufferRef *out;
int perms, ret;
AVFilterCommand *cmd= link->dst->command_qu... | true | FFmpeg | ff6b34009d4571ae0a4d130c0f8d27706a4c4026 | static int ff_filter_frame_framed(AVFilterLink *link, AVFilterBufferRef *frame)
{
int (*filter_frame)(AVFilterLink *, AVFilterBufferRef *);
AVFilterPad *src = link->srcpad;
AVFilterPad *dst = link->dstpad;
AVFilterBufferRef *out;
int perms, ret;
AVFilterCommand *cmd= link->dst->command_qu... | {
"code": [
" while(cmd && cmd->time <= frame->pts * av_q2d(link->time_base)){"
],
"line_no": [
137
]
} | VAR_4staticVAR_4 VAR_4intVAR_4 VAR_4ff_filter_frame_framedVAR_4(VAR_4AVFilterLinkVAR_4 *VAR_4VAR_0VAR_4, VAR_4AVFilterBufferRefVAR_4 *VAR_4VAR_1VAR_4)
{
VAR_4intVAR_4 (*VAR_4VAR_2VAR_4)(VAR_4AVFilterLinkVAR_4 *, VAR_4AVFilterBufferRefVAR_4 *);
VAR_4AVFilterPadVAR_4 *VAR_4srcVAR_4 = VAR_4VAR_0VAR_4->VAR_4srcp... | [
"VAR_4staticVAR_4 VAR_4intVAR_4 VAR_4ff_filter_frame_framedVAR_4(VAR_4AVFilterLinkVAR_4 *VAR_4VAR_0VAR_4, VAR_4AVFilterBufferRefVAR_4 *VAR_4VAR_1VAR_4)\n{",
"VAR_4intVAR_4 (*VAR_4VAR_2VAR_4)(VAR_4AVFilterLinkVAR_4 *, VAR_4AVFilterBufferRefVAR_4 *);",
"VAR_4AVFilterPadVAR_4 *VAR_4srcVAR_4 = VAR_4VAR_0VAR_4->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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
45,
47
],
[
53,
55
],
[... |
630 | void bdrv_get_backing_filename(BlockDriverState *bs,
char *filename, int filename_size)
{
if (!bs->backing_hd) {
pstrcpy(filename, filename_size, "");
} else {
pstrcpy(filename, filename_size, bs->backing_file);
}
}
| true | qemu | b783e409bf17b92f4af8dc5d6bd040d0092f33e0 | void bdrv_get_backing_filename(BlockDriverState *bs,
char *filename, int filename_size)
{
if (!bs->backing_hd) {
pstrcpy(filename, filename_size, "");
} else {
pstrcpy(filename, filename_size, bs->backing_file);
}
}
| {
"code": [
" if (!bs->backing_hd) {"
],
"line_no": [
7
]
} | void FUNC_0(BlockDriverState *VAR_0,
char *VAR_1, int VAR_2)
{
if (!VAR_0->backing_hd) {
pstrcpy(VAR_1, VAR_2, "");
} else {
pstrcpy(VAR_1, VAR_2, VAR_0->backing_file);
}
}
| [
"void FUNC_0(BlockDriverState *VAR_0,\nchar *VAR_1, int VAR_2)\n{",
"if (!VAR_0->backing_hd) {",
"pstrcpy(VAR_1, VAR_2, \"\");",
"} else {",
"pstrcpy(VAR_1, VAR_2, VAR_0->backing_file);",
"}",
"}"
] | [
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
631 | static uint32_t e1000e_macreg_read(e1000e_device *d, uint32_t reg)
{
return qpci_io_readl(d->pci_dev, d->mac_regs + reg);
}
| true | qemu | b4ba67d9a702507793c2724e56f98e9b0f7be02b | static uint32_t e1000e_macreg_read(e1000e_device *d, uint32_t reg)
{
return qpci_io_readl(d->pci_dev, d->mac_regs + reg);
}
| {
"code": [
" return qpci_io_readl(d->pci_dev, d->mac_regs + reg);"
],
"line_no": [
5
]
} | static uint32_t FUNC_0(e1000e_device *d, uint32_t reg)
{
return qpci_io_readl(d->pci_dev, d->mac_regs + reg);
}
| [
"static uint32_t FUNC_0(e1000e_device *d, uint32_t reg)\n{",
"return qpci_io_readl(d->pci_dev, d->mac_regs + reg);",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
632 | static inline void direct_ref_list_init(H264Context * const h){
MpegEncContext * const s = &h->s;
Picture * const ref1 = &h->ref_list[1][0];
Picture * const cur = s->current_picture_ptr;
int list, i, j;
if(cur->pict_type == I_TYPE)
cur->ref_count[0] = 0;
if(cur->pict_type != B_TYP... | true | FFmpeg | 171c407621b7ff52a0cf128b31651ca927c2dd49 | static inline void direct_ref_list_init(H264Context * const h){
MpegEncContext * const s = &h->s;
Picture * const ref1 = &h->ref_list[1][0];
Picture * const cur = s->current_picture_ptr;
int list, i, j;
if(cur->pict_type == I_TYPE)
cur->ref_count[0] = 0;
if(cur->pict_type != B_TYP... | {
"code": [
" h->map_col_to_list0[list][i] = PART_NOT_AVAILABLE;"
],
"line_no": [
39
]
} | static inline void FUNC_0(H264Context * const VAR_0){
MpegEncContext * const s = &VAR_0->s;
Picture * const ref1 = &VAR_0->ref_list[1][0];
Picture * const cur = s->current_picture_ptr;
int VAR_1, VAR_2, VAR_3;
if(cur->pict_type == I_TYPE)
cur->ref_count[0] = 0;
if(cur->pict_type !... | [
"static inline void FUNC_0(H264Context * const VAR_0){",
"MpegEncContext * const s = &VAR_0->s;",
"Picture * const ref1 = &VAR_0->ref_list[1][0];",
"Picture * const cur = s->current_picture_ptr;",
"int VAR_1, VAR_2, VAR_3;",
"if(cur->pict_type == I_TYPE)\ncur->ref_count[0] = 0;",
"if(cur->pict_type != B... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
633 | static void encode_rgb48_10bit(AVCodecContext *avctx, const AVPicture *pic, uint8_t *dst)
{
DPXContext *s = avctx->priv_data;
const uint8_t *src = pic->data[0];
int x, y;
for (y = 0; y < avctx->height; y++) {
for (x = 0; x < avctx->width; x++) {
int value;
if (s... | true | FFmpeg | 2217a2249dd78c3719f865569b661b8adcda4962 | static void encode_rgb48_10bit(AVCodecContext *avctx, const AVPicture *pic, uint8_t *dst)
{
DPXContext *s = avctx->priv_data;
const uint8_t *src = pic->data[0];
int x, y;
for (y = 0; y < avctx->height; y++) {
for (x = 0; x < avctx->width; x++) {
int value;
if (s... | {
"code": [
" value = ((AV_RB16(src + 6*x + 4) & 0xFFC0) >> 4)",
" | ((AV_RB16(src + 6*x + 2) & 0xFFC0) << 6)",
" | ((AV_RB16(src + 6*x + 0) & 0xFFC0) << 16);",
" value = ((AV_RL16(src + 6*x + 4) & 0xFFC0) >> 4)",
" ... | static void FUNC_0(AVCodecContext *VAR_0, const AVPicture *VAR_1, uint8_t *VAR_2)
{
DPXContext *s = VAR_0->priv_data;
const uint8_t *VAR_3 = VAR_1->data[0];
int VAR_4, VAR_5;
for (VAR_5 = 0; VAR_5 < VAR_0->height; VAR_5++) {
for (VAR_4 = 0; VAR_4 < VAR_0->width; VAR_4++) {
i... | [
"static void FUNC_0(AVCodecContext *VAR_0, const AVPicture *VAR_1, uint8_t *VAR_2)\n{",
"DPXContext *s = VAR_0->priv_data;",
"const uint8_t *VAR_3 = VAR_1->data[0];",
"int VAR_4, VAR_5;",
"for (VAR_5 = 0; VAR_5 < VAR_0->height; VAR_5++) {",
"for (VAR_4 = 0; VAR_4 < VAR_0->width; VAR_4++) {",
"int value;... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23,
25
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
634 | static int tgv_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
TgvContext *s = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
i... | true | FFmpeg | b12d92efd6c0d48665383a9baecc13e7ebbd8a22 | static int tgv_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
TgvContext *s = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
i... | {
"code": [
" s->palette[i] = 0xFF << 24 | AV_RB24(buf);"
],
"line_no": [
69
]
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
TgvContext *s = VAR_0->priv_data;
const uint8_t *VAR_6 = VAR_4 + VAR_5;
int VAR_7;
... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"TgvContext *s = VAR_0->priv_data;",
"const uint8_t *VAR_6 = VAR_4 + VAR_5;",
"int VAR_7;",
"if (VAR_6 - VAR_4 < EA_PREAMBLE_SIZE)\nreturn AVERRO... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[... |
635 | static void adjust_frame_information(ChannelElement *cpe, int chans)
{
int i, w, w2, g, ch;
int start, maxsfb, cmaxsfb;
for (ch = 0; ch < chans; ch++) {
IndividualChannelStream *ics = &cpe->ch[ch].ics;
start = 0;
maxsfb = 0;
cpe->ch[ch].pulse.num_pulse = 0;
... | true | FFmpeg | 6394acaf36da3106f4793bda32730f8ff6b0ddb1 | static void adjust_frame_information(ChannelElement *cpe, int chans)
{
int i, w, w2, g, ch;
int start, maxsfb, cmaxsfb;
for (ch = 0; ch < chans; ch++) {
IndividualChannelStream *ics = &cpe->ch[ch].ics;
start = 0;
maxsfb = 0;
cpe->ch[ch].pulse.num_pulse = 0;
... | {
"code": [
" for (w = 0; w < ics->num_windows*16; w += 16) {",
" for (g = 0; g < ics->num_swb; g++) {",
" if (cpe->common_window && !ch && cpe->ms_mask[w + g]) {",
" for (i = 0; i < ics->swb_sizes[g]; i++) {",
" cpe->ch[0]... | static void FUNC_0(ChannelElement *VAR_0, int VAR_1)
{
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;
int VAR_7, VAR_8, VAR_9;
for (VAR_6 = 0; VAR_6 < VAR_1; VAR_6++) {
IndividualChannelStream *ics = &VAR_0->VAR_6[VAR_6].ics;
VAR_7 = 0;
VAR_8 = 0;
VAR_0->VAR_6[VAR_6].pulse.... | [
"static void FUNC_0(ChannelElement *VAR_0, int VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;",
"int VAR_7, VAR_8, VAR_9;",
"for (VAR_6 = 0; VAR_6 < VAR_1; VAR_6++) {",
"IndividualChannelStream *ics = &VAR_0->VAR_6[VAR_6].ics;",
"VAR_7 = 0;",
"VAR_8 = 0;",
"VAR_0->VAR_6[VAR_6].pulse.num_pulse = 0... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
0,
1,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45... |
636 | int ff_img_read_header(AVFormatContext *s1)
{
VideoDemuxData *s = s1->priv_data;
int first_index, last_index;
AVStream *st;
enum AVPixelFormat pix_fmt = AV_PIX_FMT_NONE;
s1->ctx_flags |= AVFMTCTX_NOHEADER;
st = avformat_new_stream(s1, NULL);
if (!st) {
return AVERROR(ENO... | true | FFmpeg | e6e8cc8ce9c2a398fbb51254a5067f4bd3c4fa8a | int ff_img_read_header(AVFormatContext *s1)
{
VideoDemuxData *s = s1->priv_data;
int first_index, last_index;
AVStream *st;
enum AVPixelFormat pix_fmt = AV_PIX_FMT_NONE;
s1->ctx_flags |= AVFMTCTX_NOHEADER;
st = avformat_new_stream(s1, NULL);
if (!st) {
return AVERROR(ENO... | {
"code": [
" ffio_rewind_with_probe_data(s1->pb, &probe_buffer, probe_buffer_size);"
],
"line_no": [
335
]
} | int FUNC_0(AVFormatContext *VAR_0)
{
VideoDemuxData *s = VAR_0->priv_data;
int VAR_1, VAR_2;
AVStream *st;
enum AVPixelFormat VAR_3 = AV_PIX_FMT_NONE;
VAR_0->ctx_flags |= AVFMTCTX_NOHEADER;
st = avformat_new_stream(VAR_0, NULL);
if (!st) {
return AVERROR(ENOMEM);
}
... | [
"int FUNC_0(AVFormatContext *VAR_0)\n{",
"VideoDemuxData *s = VAR_0->priv_data;",
"int VAR_1, VAR_2;",
"AVStream *st;",
"enum AVPixelFormat VAR_3 = AV_PIX_FMT_NONE;",
"VAR_0->ctx_flags |= AVFMTCTX_NOHEADER;",
"st = avformat_new_stream(VAR_0, NULL);",
"if (!st) {",
"return AVERROR(ENOMEM);",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
33,
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
53,
55
],
[... |
637 | static void hpet_ram_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
int i;
HPETState *s = opaque;
uint64_t old_val, new_val, val, index;
DPRINTF("qemu: Enter hpet_ram_writel at %" PRIx64 " = %#x\n", addr, value);
index = addr;
old_val = hpe... | true | qemu | c36ad13fe9ece9a21a8c1dd082473a2b182298ee | static void hpet_ram_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
int i;
HPETState *s = opaque;
uint64_t old_val, new_val, val, index;
DPRINTF("qemu: Enter hpet_ram_writel at %" PRIx64 " = %#x\n", addr, value);
index = addr;
old_val = hpe... | {
"code": [
" if (activating_bit(old_val, new_val, HPET_TN_ENABLE)) {"
],
"line_no": [
69
]
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
int VAR_4;
HPETState *s = VAR_0;
uint64_t old_val, new_val, val, index;
DPRINTF("qemu: Enter hpet_ram_writel at %" PRIx64 " = %#x\n", VAR_1, VAR_2);
index = VAR_1;
old_val = hpet_... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"int VAR_4;",
"HPETState *s = VAR_0;",
"uint64_t old_val, new_val, val, index;",
"DPRINTF(\"qemu: Enter hpet_ram_writel at %\" PRIx64 \" = %#x\\n\", VAR_1, VAR_2);",
"index = VAR_1;",
"old_val = hpet_ram_read(VAR_0, 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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51
... |
638 | static abi_ulong copy_elf_strings(int argc,char ** argv, void **page,
abi_ulong p)
{
char *tmp, *tmp1, *pag = NULL;
int len, offset = 0;
if (!p) {
return 0; /* bullet-proofing */
}
while (argc-- > 0) {
tmp = argv[argc];
if (... | true | qemu | 7dd47667b9b0b23807fc1a550644fc2427462f41 | static abi_ulong copy_elf_strings(int argc,char ** argv, void **page,
abi_ulong p)
{
char *tmp, *tmp1, *pag = NULL;
int len, offset = 0;
if (!p) {
return 0;
}
while (argc-- > 0) {
tmp = argv[argc];
if (!tmp) {
... | {
"code": [
" pag = (char *)malloc(TARGET_PAGE_SIZE);",
" memset(pag, 0, TARGET_PAGE_SIZE);"
],
"line_no": [
55,
57
]
} | static abi_ulong FUNC_0(int argc,char ** argv, void **page,
abi_ulong p)
{
char *VAR_0, *VAR_1, *VAR_2 = NULL;
int VAR_3, VAR_4 = 0;
if (!p) {
return 0;
}
while (argc-- > 0) {
VAR_0 = argv[argc];
if (!VAR_0) {
... | [
"static abi_ulong FUNC_0(int argc,char ** argv, void **page,\nabi_ulong p)\n{",
"char *VAR_0, *VAR_1, *VAR_2 = NULL;",
"int VAR_3, VAR_4 = 0;",
"if (!p) {",
"return 0;",
"}",
"while (argc-- > 0) {",
"VAR_0 = argv[argc];",
"if (!VAR_0) {",
"fprintf(stderr, \"VFS: argc is wrong\");",
"exit(-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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
639 | static int mov_text_decode_close(AVCodecContext *avctx)
{
MovTextContext *m = avctx->priv_data;
mov_text_cleanup_ftab(m);
return 0;
} | true | FFmpeg | a9f9b7f5c70e80245983e67b8ed23212d9637645 | static int mov_text_decode_close(AVCodecContext *avctx)
{
MovTextContext *m = avctx->priv_data;
mov_text_cleanup_ftab(m);
return 0;
} | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0)
{
MovTextContext *m = VAR_0->priv_data;
mov_text_cleanup_ftab(m);
return 0;
} | [
"static int FUNC_0(AVCodecContext *VAR_0)\n{",
"MovTextContext *m = VAR_0->priv_data;",
"mov_text_cleanup_ftab(m);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
10
],
[
12
]
] |
640 | static void xhci_intr_raise(XHCIState *xhci, int v)
{
PCIDevice *pci_dev = PCI_DEVICE(xhci);
xhci->intr[v].erdp_low |= ERDP_EHB;
xhci->intr[v].iman |= IMAN_IP;
xhci->usbsts |= USBSTS_EINT;
if (!(xhci->intr[v].iman & IMAN_IE)) {
if (!(xhci->usbcmd & USBCMD_INTE)) {
if ... | true | qemu | 7da76e12cc5cc902dda4c168d8d608fd4e61cbc5 | static void xhci_intr_raise(XHCIState *xhci, int v)
{
PCIDevice *pci_dev = PCI_DEVICE(xhci);
xhci->intr[v].erdp_low |= ERDP_EHB;
xhci->intr[v].iman |= IMAN_IP;
xhci->usbsts |= USBSTS_EINT;
if (!(xhci->intr[v].iman & IMAN_IE)) {
if (!(xhci->usbcmd & USBCMD_INTE)) {
if ... | {
"code": [],
"line_no": []
} | static void FUNC_0(XHCIState *VAR_0, int VAR_1)
{
PCIDevice *pci_dev = PCI_DEVICE(VAR_0);
VAR_0->intr[VAR_1].erdp_low |= ERDP_EHB;
VAR_0->intr[VAR_1].iman |= IMAN_IP;
VAR_0->usbsts |= USBSTS_EINT;
if (!(VAR_0->intr[VAR_1].iman & IMAN_IE)) {
if (!(VAR_0->usbcmd & USBCMD_INTE)) ... | [
"static void FUNC_0(XHCIState *VAR_0, int VAR_1)\n{",
"PCIDevice *pci_dev = PCI_DEVICE(VAR_0);",
"VAR_0->intr[VAR_1].erdp_low |= ERDP_EHB;",
"VAR_0->intr[VAR_1].iman |= IMAN_IP;",
"VAR_0->usbsts |= USBSTS_EINT;",
"if (!(VAR_0->intr[VAR_1].iman & IMAN_IE)) {",
"if (!(VAR_0->usbcmd & USBCMD_INTE)) {",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
10
],
[
12
],
[
14
],
[
21
],
[
27
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
53
],
[
55
],
[
57
]
] |
641 | int qemu_chr_fe_get_msgfd(CharDriverState *s)
{
int fd;
return (qemu_chr_fe_get_msgfds(s, &fd, 1) >= 0) ? fd : -1;
}
| true | qemu | 4f8586144161d5e680fdef3e09b7e8e9111c2929 | int qemu_chr_fe_get_msgfd(CharDriverState *s)
{
int fd;
return (qemu_chr_fe_get_msgfds(s, &fd, 1) >= 0) ? fd : -1;
}
| {
"code": [
" return (qemu_chr_fe_get_msgfds(s, &fd, 1) >= 0) ? fd : -1;"
],
"line_no": [
7
]
} | int FUNC_0(CharDriverState *VAR_0)
{
int VAR_1;
return (qemu_chr_fe_get_msgfds(VAR_0, &VAR_1, 1) >= 0) ? VAR_1 : -1;
}
| [
"int FUNC_0(CharDriverState *VAR_0)\n{",
"int VAR_1;",
"return (qemu_chr_fe_get_msgfds(VAR_0, &VAR_1, 1) >= 0) ? VAR_1 : -1;",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
642 | void qemu_set_dfilter_ranges(const char *filter_spec)
{
gchar **ranges = g_strsplit(filter_spec, ",", 0);
if (ranges) {
gchar **next = ranges;
gchar *r = *next++;
debug_regions = g_array_sized_new(FALSE, FALSE,
sizeof(Range), g_strv_length(ranges... | true | qemu | 2ec62faea274aabb2feaad2b8f85961161b5e1e4 | void qemu_set_dfilter_ranges(const char *filter_spec)
{
gchar **ranges = g_strsplit(filter_spec, ",", 0);
if (ranges) {
gchar **next = ranges;
gchar *r = *next++;
debug_regions = g_array_sized_new(FALSE, FALSE,
sizeof(Range), g_strv_length(ranges... | {
"code": [],
"line_no": []
} | void FUNC_0(const char *VAR_0)
{
gchar **ranges = g_strsplit(VAR_0, ",", 0);
if (ranges) {
gchar **next = ranges;
gchar *r = *next++;
debug_regions = g_array_sized_new(FALSE, FALSE,
sizeof(Range), g_strv_length(ranges));
while (r) {
... | [
"void FUNC_0(const char *VAR_0)\n{",
"gchar **ranges = g_strsplit(VAR_0, \",\", 0);",
"if (ranges) {",
"gchar **next = ranges;",
"gchar *r = *next++;",
"debug_regions = g_array_sized_new(FALSE, FALSE,\nsizeof(Range), g_strv_length(ranges));",
"while (r) {",
"char *VAR_1 = strstr(r, \"-\");",
"char *... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7,
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21,
22,
... |
643 | static void flush(AVCodecContext *avctx)
{
WmallDecodeCtx *s = avctx->priv_data;
s->packet_loss = 1;
s->packet_done = 0;
s->num_saved_bits = 0;
s->frame_offset = 0;
s->next_packet_start = 0;
s->cdlms[0][0].order = 0;
s->frame.nb_samples = 0;
init_put... | true | FFmpeg | 3ca5df36a50e3ffd3b24734725bf545617a627a8 | static void flush(AVCodecContext *avctx)
{
WmallDecodeCtx *s = avctx->priv_data;
s->packet_loss = 1;
s->packet_done = 0;
s->num_saved_bits = 0;
s->frame_offset = 0;
s->next_packet_start = 0;
s->cdlms[0][0].order = 0;
s->frame.nb_samples = 0;
init_put... | {
"code": [
" s->frame.nb_samples = 0;"
],
"line_no": [
19
]
} | static void FUNC_0(AVCodecContext *VAR_0)
{
WmallDecodeCtx *s = VAR_0->priv_data;
s->packet_loss = 1;
s->packet_done = 0;
s->num_saved_bits = 0;
s->frame_offset = 0;
s->next_packet_start = 0;
s->cdlms[0][0].order = 0;
s->frame.nb_samples = 0;
init_pu... | [
"static void FUNC_0(AVCodecContext *VAR_0)\n{",
"WmallDecodeCtx *s = VAR_0->priv_data;",
"s->packet_loss = 1;",
"s->packet_done = 0;",
"s->num_saved_bits = 0;",
"s->frame_offset = 0;",
"s->next_packet_start = 0;",
"s->cdlms[0][0].order = 0;",
"s->frame.nb_samples = 0;",
"in... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
644 | avs_decode_frame(AVCodecContext * avctx,
void *data, int *data_size, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
const uint8_t *buf_end = avpkt->data + avpkt->size;
int buf_size = avpkt->size;
AvsContext *const avs = avctx->priv_data;
AVFrame *picture = data;
AV... | true | FFmpeg | b12d92efd6c0d48665383a9baecc13e7ebbd8a22 | avs_decode_frame(AVCodecContext * avctx,
void *data, int *data_size, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
const uint8_t *buf_end = avpkt->data + avpkt->size;
int buf_size = avpkt->size;
AvsContext *const avs = avctx->priv_data;
AVFrame *picture = data;
AV... | {
"code": [
" pal[i] |= 0xFF << 24 | (pal[i] >> 6) & 0x30303;"
],
"line_no": [
89
]
} | FUNC_0(AVCodecContext * VAR_0,
void *VAR_1, int *VAR_2, AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
const uint8_t *VAR_5 = VAR_3->VAR_1 + VAR_3->size;
int VAR_6 = VAR_3->size;
AvsContext *const avs = VAR_0->priv_data;
AVFrame *picture = VAR_1;
AVFrame *const ... | [
"FUNC_0(AVCodecContext * VAR_0,\nvoid *VAR_1, int *VAR_2, AVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"const uint8_t *VAR_5 = VAR_3->VAR_1 + VAR_3->size;",
"int VAR_6 = VAR_3->size;",
"AvsContext *const avs = VAR_0->priv_data;",
"AVFrame *picture = VAR_1;",
"AVFrame *const p = &avs->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,
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
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
645 | static void uc32_cpu_realizefn(DeviceState *dev, Error **errp)
{
UniCore32CPUClass *ucc = UNICORE32_CPU_GET_CLASS(dev);
ucc->parent_realize(dev, errp);
} | true | qemu | 14a10fc39923b3af07c8c46d22cb20843bee3a72 | static void uc32_cpu_realizefn(DeviceState *dev, Error **errp)
{
UniCore32CPUClass *ucc = UNICORE32_CPU_GET_CLASS(dev);
ucc->parent_realize(dev, errp);
} | {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{
UniCore32CPUClass *ucc = UNICORE32_CPU_GET_CLASS(VAR_0);
ucc->parent_realize(VAR_0, VAR_1);
} | [
"static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{",
"UniCore32CPUClass *ucc = UNICORE32_CPU_GET_CLASS(VAR_0);",
"ucc->parent_realize(VAR_0, VAR_1);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
]
] |
647 | void parse_option_size(const char *name, const char *value,
uint64_t *ret, Error **errp)
{
char *postfix;
double sizef;
sizef = strtod(value, &postfix);
if (sizef < 0 || sizef > UINT64_MAX) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name,
... | true | qemu | 75cdcd1553e74b5edc58aed23e3b2da8dabb1876 | void parse_option_size(const char *name, const char *value,
uint64_t *ret, Error **errp)
{
char *postfix;
double sizef;
sizef = strtod(value, &postfix);
if (sizef < 0 || sizef > UINT64_MAX) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name,
... | {
"code": [
" char *postfix;",
" double sizef;",
" sizef = strtod(value, &postfix);",
" if (sizef < 0 || sizef > UINT64_MAX) {",
" error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name,",
" \"a non-negative number below 2^64\");",
" switch (*postfix) {... | void FUNC_0(const char *VAR_0, const char *VAR_1,
uint64_t *VAR_2, Error **VAR_3)
{
char *VAR_4;
double VAR_5;
VAR_5 = strtod(VAR_1, &VAR_4);
if (VAR_5 < 0 || VAR_5 > UINT64_MAX) {
error_setg(VAR_3, QERR_INVALID_PARAMETER_VALUE, VAR_0,
"a non-n... | [
"void FUNC_0(const char *VAR_0, const char *VAR_1,\nuint64_t *VAR_2, Error **VAR_3)\n{",
"char *VAR_4;",
"double VAR_5;",
"VAR_5 = strtod(VAR_1, &VAR_4);",
"if (VAR_5 < 0 || VAR_5 > UINT64_MAX) {",
"error_setg(VAR_3, QERR_INVALID_PARAMETER_VALUE, VAR_0,\n\"a non-negative number below 2^64\");",
"return;... | [
0,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
33,
35
],
[
39,
41
],
[
45,
47,
49
],
[
53,
55,
57
],
[
59
],
[... |
648 | static void gen_ove_cy(DisasContext *dc, TCGv cy)
{
if (dc->tb_flags & SR_OVE) {
gen_helper_ove(cpu_env, cy);
}
}
| true | qemu | 9745807191a81c45970f780166f44a7f93b18653 | static void gen_ove_cy(DisasContext *dc, TCGv cy)
{
if (dc->tb_flags & SR_OVE) {
gen_helper_ove(cpu_env, cy);
}
}
| {
"code": [
"static void gen_ove_cy(DisasContext *dc, TCGv cy)",
" gen_helper_ove(cpu_env, cy);"
],
"line_no": [
1,
7
]
} | static void FUNC_0(DisasContext *VAR_0, TCGv VAR_1)
{
if (VAR_0->tb_flags & SR_OVE) {
gen_helper_ove(cpu_env, VAR_1);
}
}
| [
"static void FUNC_0(DisasContext *VAR_0, TCGv VAR_1)\n{",
"if (VAR_0->tb_flags & SR_OVE) {",
"gen_helper_ove(cpu_env, VAR_1);",
"}",
"}"
] | [
1,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
649 | static void limits_nesting(void)
{
enum { max_nesting = 1024 }; /* see qobject/json-streamer.c */
char buf[2 * (max_nesting + 1) + 1];
QObject *obj;
obj = qobject_from_json(make_nest(buf, max_nesting), NULL);
g_assert(obj != NULL);
qobject_decref(obj);
obj = qobject_from_json(mak... | true | qemu | aec4b054ea36c53c8b887da99f20010133b84378 | static void limits_nesting(void)
{
enum { max_nesting = 1024 };
char buf[2 * (max_nesting + 1) + 1];
QObject *obj;
obj = qobject_from_json(make_nest(buf, max_nesting), NULL);
g_assert(obj != NULL);
qobject_decref(obj);
obj = qobject_from_json(make_nest(buf, max_nesting + 1), NUL... | {
"code": [
" obj = qobject_from_json(make_nest(buf, max_nesting), NULL);",
" obj = qobject_from_json(make_nest(buf, max_nesting + 1), NULL);"
],
"line_no": [
13,
21
]
} | static void FUNC_0(void)
{
enum { max_nesting = 1024 };
char VAR_0[2 * (max_nesting + 1) + 1];
QObject *obj;
obj = qobject_from_json(make_nest(VAR_0, max_nesting), NULL);
g_assert(obj != NULL);
qobject_decref(obj);
obj = qobject_from_json(make_nest(VAR_0, max_nesting + 1), NULL)... | [
"static void FUNC_0(void)\n{",
"enum { max_nesting = 1024 };",
"char VAR_0[2 * (max_nesting + 1) + 1];",
"QObject *obj;",
"obj = qobject_from_json(make_nest(VAR_0, max_nesting), NULL);",
"g_assert(obj != NULL);",
"qobject_decref(obj);",
"obj = qobject_from_json(make_nest(VAR_0, max_nesting + 1), NULL)... | [
0,
0,
0,
0,
1,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
]
] |
650 | static int decode_end(AVCodecContext *avctx)
{
H264Context *h = avctx->priv_data;
MpegEncContext *s = &h->s;
free_tables(h); //FIXME cleanup init stuff perhaps
MPV_common_end(s);
// memset(h, 0, sizeof(H264Context));
return 0;
} | true | FFmpeg | dc9f52602f6493b33d1ac0d729ffb188e6a676fa | static int decode_end(AVCodecContext *avctx)
{
H264Context *h = avctx->priv_data;
MpegEncContext *s = &h->s;
free_tables(h);
MPV_common_end(s);
return 0;
} | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0)
{
H264Context *h = VAR_0->priv_data;
MpegEncContext *s = &h->s;
free_tables(h);
MPV_common_end(s);
return 0;
} | [
"static int FUNC_0(AVCodecContext *VAR_0)\n{",
"H264Context *h = VAR_0->priv_data;",
"MpegEncContext *s = &h->s;",
"free_tables(h);",
"MPV_common_end(s);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
12
],
[
14
],
[
22
],
[
24
]
] |
651 | static av_cold int validate_options(AVCodecContext *avctx, AC3EncodeContext *s)
{
int i, j;
if (!avctx->channel_layout) {
av_log(avctx, AV_LOG_WARNING, "No channel layout specified. The "
"encoder will guess the layout, but it "
... | false | FFmpeg | 99ca4f73f0a2085d8b3c7636f4734825894c42dc | static av_cold int validate_options(AVCodecContext *avctx, AC3EncodeContext *s)
{
int i, j;
if (!avctx->channel_layout) {
av_log(avctx, AV_LOG_WARNING, "No channel layout specified. The "
"encoder will guess the layout, but it "
... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx, AC3EncodeContext *s)
{
int VAR_0, VAR_1;
if (!avctx->channel_layout) {
av_log(avctx, AV_LOG_WARNING, "No channel layout specified. The "
"encoder will guess the layout, but it "
... | [
"static av_cold int FUNC_0(AVCodecContext *avctx, AC3EncodeContext *s)\n{",
"int VAR_0, VAR_1;",
"if (!avctx->channel_layout) {",
"av_log(avctx, AV_LOG_WARNING, \"No channel layout specified. The \"\n\"encoder will guess the layout, but it \"\n\"might be incorrect.\\n\");",
"}",
"if (set_channel_info(s, a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
51... |
652 | static NvencSurface *get_free_frame(NvencContext *ctx)
{
int i;
for (i = 0; i < ctx->nb_surfaces; i++) {
if (!ctx->surfaces[i].lockCount) {
ctx->surfaces[i].lockCount = 1;
return &ctx->surfaces[i];
}
}
return NULL;
}
| false | FFmpeg | 8de3458a07376b0a96772e586b6dba5e93432f52 | static NvencSurface *get_free_frame(NvencContext *ctx)
{
int i;
for (i = 0; i < ctx->nb_surfaces; i++) {
if (!ctx->surfaces[i].lockCount) {
ctx->surfaces[i].lockCount = 1;
return &ctx->surfaces[i];
}
}
return NULL;
}
| {
"code": [],
"line_no": []
} | static NvencSurface *FUNC_0(NvencContext *ctx)
{
int VAR_0;
for (VAR_0 = 0; VAR_0 < ctx->nb_surfaces; VAR_0++) {
if (!ctx->surfaces[VAR_0].lockCount) {
ctx->surfaces[VAR_0].lockCount = 1;
return &ctx->surfaces[VAR_0];
}
}
return NULL;
}
| [
"static NvencSurface *FUNC_0(NvencContext *ctx)\n{",
"int VAR_0;",
"for (VAR_0 = 0; VAR_0 < ctx->nb_surfaces; VAR_0++) {",
"if (!ctx->surfaces[VAR_0].lockCount) {",
"ctx->surfaces[VAR_0].lockCount = 1;",
"return &ctx->surfaces[VAR_0];",
"}",
"}",
"return NULL;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
]
] |
654 | int ff_ccitt_unpack(AVCodecContext *avctx,
const uint8_t *src, int srcsize,
uint8_t *dst, int height, int stride,
enum TiffCompr compr, int opts)
{
int j;
GetBitContext gb;
int *runs, *ref, *runend;
int ret;
int runsize= avctx->wid... | false | FFmpeg | 99a335299ff3541f89e6e3be4b9ae84257288fcc | int ff_ccitt_unpack(AVCodecContext *avctx,
const uint8_t *src, int srcsize,
uint8_t *dst, int height, int stride,
enum TiffCompr compr, int opts)
{
int j;
GetBitContext gb;
int *runs, *ref, *runend;
int ret;
int runsize= avctx->wid... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0,
const uint8_t *VAR_1, int VAR_2,
uint8_t *VAR_3, int VAR_4, int VAR_5,
enum TiffCompr VAR_6, int VAR_7)
{
int VAR_8;
GetBitContext gb;
int *VAR_9, *VAR_10, *VAR_11;
int VAR_12;
int VAR_13= VAR_0->w... | [
"int FUNC_0(AVCodecContext *VAR_0,\nconst uint8_t *VAR_1, int VAR_2,\nuint8_t *VAR_3, int VAR_4, int VAR_5,\nenum TiffCompr VAR_6, int VAR_7)\n{",
"int VAR_8;",
"GetBitContext gb;",
"int *VAR_9, *VAR_10, *VAR_11;",
"int VAR_12;",
"int VAR_13= VAR_0->width + 2;",
"VAR_9 = av_malloc(VAR_13 * sizeof(VAR_9[... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
655 | static int exif_decode_tag(void *logctx, GetByteContext *gbytes, int le,
int depth, AVDictionary **metadata)
{
int ret, cur_pos;
unsigned id, count;
enum TiffTypes type;
if (depth > 2) {
return 0;
}
ff_tread_tag(gbytes, le, &id, &type, &count, &cur... | false | FFmpeg | ae100046ca32b0b83031a60d0c3cdfc5ceb9f874 | static int exif_decode_tag(void *logctx, GetByteContext *gbytes, int le,
int depth, AVDictionary **metadata)
{
int ret, cur_pos;
unsigned id, count;
enum TiffTypes type;
if (depth > 2) {
return 0;
}
ff_tread_tag(gbytes, le, &id, &type, &count, &cur... | {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0, GetByteContext *VAR_1, int VAR_2,
int VAR_3, AVDictionary **VAR_4)
{
int VAR_5, VAR_6;
unsigned VAR_7, VAR_8;
enum TiffTypes VAR_9;
if (VAR_3 > 2) {
return 0;
}
ff_tread_tag(VAR_1, VAR_2, &VAR_7, &VAR_9, &VAR_8, &VAR_... | [
"static int FUNC_0(void *VAR_0, GetByteContext *VAR_1, int VAR_2,\nint VAR_3, AVDictionary **VAR_4)\n{",
"int VAR_5, VAR_6;",
"unsigned VAR_7, VAR_8;",
"enum TiffTypes VAR_9;",
"if (VAR_3 > 2) {",
"return 0;",
"}",
"ff_tread_tag(VAR_1, VAR_2, &VAR_7, &VAR_9, &VAR_8, &VAR_6);",
"if (!bytestream2_tell... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29
],
[
31
],
[
33
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[... |
656 | static int pci_bridge_dev_initfn(PCIDevice *dev)
{
PCIBridge *br = DO_UPCAST(PCIBridge, dev, dev);
PCIBridgeDev *bridge_dev = DO_UPCAST(PCIBridgeDev, bridge, br);
int err;
pci_bridge_map_irq(br, NULL, pci_bridge_dev_map_irq_fn);
err = pci_bridge_initfn(dev);
if (err) {
goto bridg... | true | qemu | 80aa796bf38b7ef21daa42673b4711510c450d8a | static int pci_bridge_dev_initfn(PCIDevice *dev)
{
PCIBridge *br = DO_UPCAST(PCIBridge, dev, dev);
PCIBridgeDev *bridge_dev = DO_UPCAST(PCIBridgeDev, bridge, br);
int err;
pci_bridge_map_irq(br, NULL, pci_bridge_dev_map_irq_fn);
err = pci_bridge_initfn(dev);
if (err) {
goto bridg... | {
"code": [
" int err;"
],
"line_no": [
9
]
} | static int FUNC_0(PCIDevice *VAR_0)
{
PCIBridge *br = DO_UPCAST(PCIBridge, VAR_0, VAR_0);
PCIBridgeDev *bridge_dev = DO_UPCAST(PCIBridgeDev, bridge, br);
int VAR_1;
pci_bridge_map_irq(br, NULL, pci_bridge_dev_map_irq_fn);
VAR_1 = pci_bridge_initfn(VAR_0);
if (VAR_1) {
goto bridge... | [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"PCIBridge *br = DO_UPCAST(PCIBridge, VAR_0, VAR_0);",
"PCIBridgeDev *bridge_dev = DO_UPCAST(PCIBridgeDev, bridge, br);",
"int VAR_1;",
"pci_bridge_map_irq(br, NULL, pci_bridge_dev_map_irq_fn);",
"VAR_1 = pci_bridge_initfn(VAR_0);",
"if (VAR_1) {",
"goto bridg... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[... |
658 | static const AVClass *urlcontext_child_class_next(const AVClass *prev)
{
URLProtocol *p = NULL;
/* find the protocol that corresponds to prev */
while (prev && (p = ffurl_protocol_next(p)))
if (p->priv_data_class == prev)
break;
/* find next protocol with priv options */
... | false | FFmpeg | 2758cdedfb7ac61f8b5e4861f99218b6fd43491d | static const AVClass *urlcontext_child_class_next(const AVClass *prev)
{
URLProtocol *p = NULL;
while (prev && (p = ffurl_protocol_next(p)))
if (p->priv_data_class == prev)
break;
while (p = ffurl_protocol_next(p))
if (p->priv_data_class)
retur... | {
"code": [],
"line_no": []
} | static const AVClass *FUNC_0(const AVClass *prev)
{
URLProtocol *p = NULL;
while (prev && (p = ffurl_protocol_next(p)))
if (p->priv_data_class == prev)
break;
while (p = ffurl_protocol_next(p))
if (p->priv_data_class)
return p->priv_data_class;... | [
"static const AVClass *FUNC_0(const AVClass *prev)\n{",
"URLProtocol *p = NULL;",
"while (prev && (p = ffurl_protocol_next(p)))\nif (p->priv_data_class == prev)\nbreak;",
"while (p = ffurl_protocol_next(p))\nif (p->priv_data_class)\nreturn p->priv_data_class;",
"return NULL;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11,
13,
15
],
[
21,
23,
25
],
[
27
],
[
29
]
] |
659 | static void do_change_vnc(const char *target)
{
if (strcmp(target, "passwd") == 0 ||
strcmp(target, "password") == 0) {
char password[9];
monitor_readline("Password: ", 1, password, sizeof(password)-1);
password[sizeof(password)-1] = '\0';
if (vnc_display_password(NULL, password) < 0)
term_printf(... | true | qemu | 2a7e8dda090af586f3d0b3d157054a9e18776a52 | static void do_change_vnc(const char *target)
{
if (strcmp(target, "passwd") == 0 ||
strcmp(target, "password") == 0) {
char password[9];
monitor_readline("Password: ", 1, password, sizeof(password)-1);
password[sizeof(password)-1] = '\0';
if (vnc_display_password(NULL, password) < 0)
term_printf(... | {
"code": [
"\tmonitor_readline(\"Password: \", 1, password, sizeof(password)-1);",
"\tpassword[sizeof(password)-1] = '\\0';"
],
"line_no": [
11,
13
]
} | static void FUNC_0(const char *VAR_0)
{
if (strcmp(VAR_0, "passwd") == 0 ||
strcmp(VAR_0, "VAR_1") == 0) {
char VAR_1[9];
monitor_readline("Password: ", 1, VAR_1, sizeof(VAR_1)-1);
VAR_1[sizeof(VAR_1)-1] = '\0';
if (vnc_display_password(NULL, VAR_1) < 0)
term_printf("could not set VNC server VAR_1... | [
"static void FUNC_0(const char *VAR_0)\n{",
"if (strcmp(VAR_0, \"passwd\") == 0 ||\nstrcmp(VAR_0, \"VAR_1\") == 0) {",
"char VAR_1[9];",
"monitor_readline(\"Password: \", 1, VAR_1, sizeof(VAR_1)-1);",
"VAR_1[sizeof(VAR_1)-1] = '\\0';",
"if (vnc_display_password(NULL, VAR_1) < 0)\nterm_printf(\"could not s... | [
0,
0,
0,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
]
] |
660 | int ff_get_cpu_flags_x86(void)
{
int rval = 0;
int eax, ebx, ecx, edx;
int max_std_level, max_ext_level, std_caps=0, ext_caps=0;
int family=0, model=0;
union { int i[3]; char c[12]; } vendor;
#if ARCH_X86_32
x86_reg a, c;
__asm__ volatile (
/* See if CPUID instruction is ... | true | FFmpeg | 5938e02185430ca711106aaec9b5622dbf588af3 | int ff_get_cpu_flags_x86(void)
{
int rval = 0;
int eax, ebx, ecx, edx;
int max_std_level, max_ext_level, std_caps=0, ext_caps=0;
int family=0, model=0;
union { int i[3]; char c[12]; } vendor;
#if ARCH_X86_32
x86_reg a, c;
__asm__ volatile (
"pushfl\n\t... | {
"code": [
" if (ext_caps & (1<<31))"
],
"line_no": [
149
]
} | int FUNC_0(void)
{
int VAR_0 = 0;
int VAR_1, VAR_2, VAR_3, VAR_4;
int VAR_5, VAR_6, VAR_7=0, VAR_8=0;
int VAR_9=0, VAR_10=0;
union { int i[3]; char c[12]; } VAR_11;
#if ARCH_X86_32
x86_reg a, c;
__asm__ volatile (
"pushfl\n\t"
"pop %0\n\t"
... | [
"int FUNC_0(void)\n{",
"int VAR_0 = 0;",
"int VAR_1, VAR_2, VAR_3, VAR_4;",
"int VAR_5, VAR_6, VAR_7=0, VAR_8=0;",
"int VAR_9=0, VAR_10=0;",
"union { int i[3]; char c[12]; } VAR_11;",
"#if ARCH_X86_32\nx86_reg a, c;",
"__asm__ volatile (\n\"pushfl\\n\\t\"\n\"pop %0\\n\\t\"\n\"mov %0, %1\\n\\t\"\n\"xor... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
21,
27,
29,
31,
39,
41,
43,
49,
51,
53,
55,
57,
59
],
[
63,
65
],
[
67,
71
],
[
75
],
[
77
],
[... |
661 | static inline void cvtyuvtoRGB (SwsContext *c,
vector signed short Y, vector signed short U, vector signed short V,
vector signed short *R, vector signed short *G, vector signed short *B)
{
vector signed short vx,ux,uvx;
Y = vec_mradds (Y, c->CY, c->OY);
U = vec_sub (U,(vector signed short)... | true | FFmpeg | 428098165de4c3edfe42c1b7f00627d287015863 | static inline void cvtyuvtoRGB (SwsContext *c,
vector signed short Y, vector signed short U, vector signed short V,
vector signed short *R, vector signed short *G, vector signed short *B)
{
vector signed short vx,ux,uvx;
Y = vec_mradds (Y, c->CY, c->OY);
U = vec_sub (U,(vector signed short)... | {
"code": [
"\t\t\t vector signed short Y, vector signed short U, vector signed short V,",
"\t\t\t vector signed short *R, vector signed short *G, vector signed short *B)",
" vector signed short vx,ux,uvx;",
" Y = vec_mradds (Y, c->CY, c->OY);",
" U = vec_sub (U,(vector signed short)",
... | static inline void FUNC_0 (SwsContext *VAR_0,
vector signed short VAR_1, vector signed short VAR_2, vector signed short VAR_3,
vector signed short *VAR_4, vector signed short *VAR_5, vector signed short *VAR_6)
{
vector signed short vx,ux,uvx;
VAR_1 = vec_mradds (VAR_1, VAR_0->CY, VAR_0->OY);
... | [
"static inline void FUNC_0 (SwsContext *VAR_0,\nvector signed short VAR_1, vector signed short VAR_2, vector signed short VAR_3,\nvector signed short *VAR_4, vector signed short *VAR_5, vector signed short *VAR_6)\n{",
"vector signed short vx,ux,uvx;",
"VAR_1 = vec_mradds (VAR_1, VAR_0->CY, VAR_0->OY);",
"V... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15,
17
],
[
19,
21
],
[
27
],
[
29
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
]
] |
662 | void usb_generic_async_ctrl_complete(USBDevice *s, USBPacket *p)
{
if (p->len < 0) {
s->setup_state = SETUP_STATE_IDLE;
}
switch (s->setup_state) {
case SETUP_STATE_SETUP:
if (p->len < s->setup_len) {
s->setup_len = p->len;
}
s->setup_state = SETUP... | true | qemu | 4f4321c11ff6e98583846bfd6f0e81954924b003 | void usb_generic_async_ctrl_complete(USBDevice *s, USBPacket *p)
{
if (p->len < 0) {
s->setup_state = SETUP_STATE_IDLE;
}
switch (s->setup_state) {
case SETUP_STATE_SETUP:
if (p->len < s->setup_len) {
s->setup_len = p->len;
}
s->setup_state = SETUP... | {
"code": [
" if (p->len < 0) {",
" if (p->len < s->setup_len) {",
" s->setup_len = p->len;",
" p->len = 8;",
" p->len = 0;"
],
"line_no": [
5,
17,
19,
25,
35
]
} | void FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)
{
if (VAR_1->len < 0) {
VAR_0->setup_state = SETUP_STATE_IDLE;
}
switch (VAR_0->setup_state) {
case SETUP_STATE_SETUP:
if (VAR_1->len < VAR_0->setup_len) {
VAR_0->setup_len = VAR_1->len;
}
VAR_0->setu... | [
"void FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)\n{",
"if (VAR_1->len < 0) {",
"VAR_0->setup_state = SETUP_STATE_IDLE;",
"}",
"switch (VAR_0->setup_state) {",
"case SETUP_STATE_SETUP:\nif (VAR_1->len < VAR_0->setup_len) {",
"VAR_0->setup_len = VAR_1->len;",
"}",
"VAR_0->setup_state = SETUP_STATE_DAT... | [
0,
1,
0,
0,
0,
1,
1,
0,
0,
1,
0,
0,
1,
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
],
[
47
],
[
49
]
] |
663 | static int encode_audio_frame(AVFormatContext *s, OutputStream *ost,
const uint8_t *buf, int buf_size)
{
AVCodecContext *enc = ost->st->codec;
AVFrame *frame = NULL;
AVPacket pkt;
int ret, got_packet;
av_init_packet(&pkt);
pkt.data = NULL;
pkt.size = ... | true | FFmpeg | fc49f22c3b735db5aaac5f98e40b7124a2be13b8 | static int encode_audio_frame(AVFormatContext *s, OutputStream *ost,
const uint8_t *buf, int buf_size)
{
AVCodecContext *enc = ost->st->codec;
AVFrame *frame = NULL;
AVPacket pkt;
int ret, got_packet;
av_init_packet(&pkt);
pkt.data = NULL;
pkt.size = ... | {
"code": [
" AVCodecContext *enc = ost->st->codec;",
" exit_program(1);",
" exit_program(1);",
"static int encode_audio_frame(AVFormatContext *s, OutputStream *ost,",
" const uint8_t *buf, int buf_size)",
" AVFrame *frame = NULL;",
... | static int FUNC_0(AVFormatContext *VAR_0, OutputStream *VAR_1,
const uint8_t *VAR_2, int VAR_3)
{
AVCodecContext *enc = VAR_1->st->codec;
AVFrame *frame = NULL;
AVPacket pkt;
int VAR_4, VAR_5;
av_init_packet(&pkt);
pkt.data = NULL;
pkt.size = 0;
... | [
"static int FUNC_0(AVFormatContext *VAR_0, OutputStream *VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{",
"AVCodecContext *enc = VAR_1->st->codec;",
"AVFrame *frame = NULL;",
"AVPacket pkt;",
"int VAR_4, VAR_5;",
"av_init_packet(&pkt);",
"pkt.data = NULL;",
"pkt.size = 0;",
"if (VAR_2 && VAR_3) {",
"... | [
1,
1,
1,
0,
1,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
0,
1,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
... |
664 | static void rng_egd_opened(RngBackend *b, Error **errp)
{
RngEgd *s = RNG_EGD(b);
if (s->chr_name == NULL) {
error_set(errp, QERR_INVALID_PARAMETER_VALUE,
"chardev", "a valid character device");
s->chr = qemu_chr_find(s->chr_name);
if (s->chr == NULL) {
error_set(errp, ... | true | qemu | 456d60692310e7ac25cf822cc1e98192ad636ece | static void rng_egd_opened(RngBackend *b, Error **errp)
{
RngEgd *s = RNG_EGD(b);
if (s->chr_name == NULL) {
error_set(errp, QERR_INVALID_PARAMETER_VALUE,
"chardev", "a valid character device");
s->chr = qemu_chr_find(s->chr_name);
if (s->chr == NULL) {
error_set(errp, ... | {
"code": [],
"line_no": []
} | static void FUNC_0(RngBackend *VAR_0, Error **VAR_1)
{
RngEgd *s = RNG_EGD(VAR_0);
if (s->chr_name == NULL) {
error_set(VAR_1, QERR_INVALID_PARAMETER_VALUE,
"chardev", "a valid character device");
s->chr = qemu_chr_find(s->chr_name);
if (s->chr == NULL) {
error_set(VAR_... | [
"static void FUNC_0(RngBackend *VAR_0, Error **VAR_1)\n{",
"RngEgd *s = RNG_EGD(VAR_0);",
"if (s->chr_name == NULL) {",
"error_set(VAR_1, QERR_INVALID_PARAMETER_VALUE,\n\"chardev\", \"a valid character device\");",
"s->chr = qemu_chr_find(s->chr_name);",
"if (s->chr == NULL) {",
"error_set(VAR_1, QERR_D... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5,
6
],
[
7
],
[
8
],
[
9
],
[
11,
12
]
] |
665 | static int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
int64_t *ppos, int64_t pos_limit)
{
MpegTSContext *ts = s->priv_data;
int64_t pos, timestamp;
uint8_t buf[TS_PACKET_SIZE];
int pcr_l, pcr_pid = ((PESContext*)s->streams[stream_index]->priv_data)->pcr_... | false | FFmpeg | 0a90b6a43e76aec8031b6c8a46bba2bf6cd25fa7 | static int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
int64_t *ppos, int64_t pos_limit)
{
MpegTSContext *ts = s->priv_data;
int64_t pos, timestamp;
uint8_t buf[TS_PACKET_SIZE];
int pcr_l, pcr_pid = ((PESContext*)s->streams[stream_index]->priv_data)->pcr_... | {
"code": [],
"line_no": []
} | static int64_t FUNC_0(AVFormatContext *s, int stream_index,
int64_t *ppos, int64_t pos_limit)
{
MpegTSContext *ts = s->priv_data;
int64_t pos, timestamp;
uint8_t buf[TS_PACKET_SIZE];
int VAR_0, VAR_1 = ((PESContext*)s->streams[stream_index]->priv_data)->VAR_1;
po... | [
"static int64_t FUNC_0(AVFormatContext *s, int stream_index,\nint64_t *ppos, int64_t pos_limit)\n{",
"MpegTSContext *ts = s->priv_data;",
"int64_t pos, timestamp;",
"uint8_t buf[TS_PACKET_SIZE];",
"int VAR_0, VAR_1 = ((PESContext*)s->streams[stream_index]->priv_data)->VAR_1;",
"pos = ((*ppos + ts->raw_pa... | [
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
],
[
41
],
[
43
]
] |
667 | static enum AVPixelFormat get_pixel_format(H264Context *h)
{
#define HWACCEL_MAX (CONFIG_H264_DXVA2_HWACCEL + \
CONFIG_H264_D3D11VA_HWACCEL + \
CONFIG_H264_VAAPI_HWACCEL + \
(CONFIG_H264_VDA_HWACCEL * 2) + \
CONFIG_H264_VDPAU_HWAC... | false | FFmpeg | 3176217c60ca7828712985092d9102d331ea4f3d | static enum AVPixelFormat get_pixel_format(H264Context *h)
{
#define HWACCEL_MAX (CONFIG_H264_DXVA2_HWACCEL + \
CONFIG_H264_D3D11VA_HWACCEL + \
CONFIG_H264_VAAPI_HWACCEL + \
(CONFIG_H264_VDA_HWACCEL * 2) + \
CONFIG_H264_VDPAU_HWAC... | {
"code": [],
"line_no": []
} | static enum AVPixelFormat FUNC_0(H264Context *VAR_0)
{
#define HWACCEL_MAX (CONFIG_H264_DXVA2_HWACCEL + \
CONFIG_H264_D3D11VA_HWACCEL + \
CONFIG_H264_VAAPI_HWACCEL + \
(CONFIG_H264_VDA_HWACCEL * 2) + \
CONFIG_H264_VDPAU_HWACCEL)
... | [
"static enum AVPixelFormat FUNC_0(H264Context *VAR_0)\n{",
"#define HWACCEL_MAX (CONFIG_H264_DXVA2_HWACCEL + \\\nCONFIG_H264_D3D11VA_HWACCEL + \\\nCONFIG_H264_VAAPI_HWACCEL + \\\n(CONFIG_H264_VDA_HWACCEL * 2) + \\\nCONFIG_H264_VDPAU_HWACCEL)\nenum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts;",
"con... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
47
],
[
49
],
[
51
... |
671 | static void mv88w8618_eth_init(NICInfo *nd, uint32_t base, qemu_irq irq)
{
mv88w8618_eth_state *s;
int iomemtype;
qemu_check_nic_model(nd, "mv88w8618");
s = qemu_mallocz(sizeof(mv88w8618_eth_state));
s->irq = irq;
s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
... | true | qemu | b946a1533209f61a93e34898aebb5b43154b99c3 | static void mv88w8618_eth_init(NICInfo *nd, uint32_t base, qemu_irq irq)
{
mv88w8618_eth_state *s;
int iomemtype;
qemu_check_nic_model(nd, "mv88w8618");
s = qemu_mallocz(sizeof(mv88w8618_eth_state));
s->irq = irq;
s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
... | {
"code": [
" int iomemtype;",
" int iomemtype;",
" eth_receive, eth_can_receive, s);",
" iomemtype = cpu_register_io_memory(0, mv88w8618_eth_readfn,",
" mv88w8618_eth_writefn, s);",
" cpu_register_physical_memor... | static void FUNC_0(NICInfo *VAR_0, uint32_t VAR_1, qemu_irq VAR_2)
{
mv88w8618_eth_state *s;
int VAR_3;
qemu_check_nic_model(VAR_0, "mv88w8618");
s = qemu_mallocz(sizeof(mv88w8618_eth_state));
s->VAR_2 = VAR_2;
s->vc = qemu_new_vlan_client(VAR_0->vlan, VAR_0->model, VAR_0->name,
... | [
"static void FUNC_0(NICInfo *VAR_0, uint32_t VAR_1, qemu_irq VAR_2)\n{",
"mv88w8618_eth_state *s;",
"int VAR_3;",
"qemu_check_nic_model(VAR_0, \"mv88w8618\");",
"s = qemu_mallocz(sizeof(mv88w8618_eth_state));",
"s->VAR_2 = VAR_2;",
"s->vc = qemu_new_vlan_client(VAR_0->vlan, VAR_0->model, VAR_0->name,\ne... | [
0,
0,
1,
0,
0,
0,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
23,
25
],
[
27
],
[
29
]
] |
672 | static int vnc_update_client_sync(VncState *vs, int has_dirty)
{
int ret = vnc_update_client(vs, has_dirty);
vnc_jobs_join(vs);
return ret;
}
| true | qemu | 38ee14f4f33f8836fc0e209ca59c6ae8c6edf380 | static int vnc_update_client_sync(VncState *vs, int has_dirty)
{
int ret = vnc_update_client(vs, has_dirty);
vnc_jobs_join(vs);
return ret;
}
| {
"code": [
"static int vnc_update_client_sync(VncState *vs, int has_dirty)",
" int ret = vnc_update_client(vs, has_dirty);",
" vnc_jobs_join(vs);",
" return ret;"
],
"line_no": [
1,
5,
7,
9
]
} | static int FUNC_0(VncState *VAR_0, int VAR_1)
{
int VAR_2 = vnc_update_client(VAR_0, VAR_1);
vnc_jobs_join(VAR_0);
return VAR_2;
}
| [
"static int FUNC_0(VncState *VAR_0, int VAR_1)\n{",
"int VAR_2 = vnc_update_client(VAR_0, VAR_1);",
"vnc_jobs_join(VAR_0);",
"return VAR_2;",
"}"
] | [
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
673 | static struct omap_tipb_bridge_s *omap_tipb_bridge_init(
MemoryRegion *memory, hwaddr base,
qemu_irq abort_irq, omap_clk clk)
{
struct omap_tipb_bridge_s *s = (struct omap_tipb_bridge_s *)
g_malloc0(sizeof(struct omap_tipb_bridge_s));
s->abort = abort_irq;
omap_tipb_bridge_reset... | true | qemu | b45c03f585ea9bb1af76c73e82195418c294919d | static struct omap_tipb_bridge_s *omap_tipb_bridge_init(
MemoryRegion *memory, hwaddr base,
qemu_irq abort_irq, omap_clk clk)
{
struct omap_tipb_bridge_s *s = (struct omap_tipb_bridge_s *)
g_malloc0(sizeof(struct omap_tipb_bridge_s));
s->abort = abort_irq;
omap_tipb_bridge_reset... | {
"code": [
" struct omap_tipb_bridge_s *s = (struct omap_tipb_bridge_s *)",
" g_malloc0(sizeof(struct omap_tipb_bridge_s));"
],
"line_no": [
9,
11
]
} | static struct omap_tipb_bridge_s *FUNC_0(
MemoryRegion *VAR_0, hwaddr VAR_1,
qemu_irq VAR_2, omap_clk VAR_3)
{
struct omap_tipb_bridge_s *VAR_4 = (struct omap_tipb_bridge_s *)
g_malloc0(sizeof(struct omap_tipb_bridge_s));
VAR_4->abort = VAR_2;
omap_tipb_bridge_reset(VAR_4);
... | [
"static struct omap_tipb_bridge_s *FUNC_0(\nMemoryRegion *VAR_0, hwaddr VAR_1,\nqemu_irq VAR_2, omap_clk VAR_3)\n{",
"struct omap_tipb_bridge_s *VAR_4 = (struct omap_tipb_bridge_s *)\ng_malloc0(sizeof(struct omap_tipb_bridge_s));",
"VAR_4->abort = VAR_2;",
"omap_tipb_bridge_reset(VAR_4);",
"memory_region_in... | [
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9,
11
],
[
15
],
[
17
],
[
21,
23
],
[
25
],
[
29
],
[
31
]
] |
675 | static void seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int data_size)
{
GetBitContext gb;
int flags, i, j, x, y, op;
unsigned char c[3];
unsigned char *dst;
uint32_t *palette;
flags = *data++;
if (flags & 1) {
palette = (uint32_t *)seq->frame.data[1... | true | FFmpeg | 5d7e3d71673d64a16b58430a0027afadb6b3a54e | static void seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int data_size)
{
GetBitContext gb;
int flags, i, j, x, y, op;
unsigned char c[3];
unsigned char *dst;
uint32_t *palette;
flags = *data++;
if (flags & 1) {
palette = (uint32_t *)seq->frame.data[1... | {
"code": [
"static void seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int data_size)",
" data = seq_decode_op1(seq, data, dst);",
" data = seq_decode_op2(seq, data, dst);",
" data = seq_decode_op3(seq, data, dst);"
],
"li... | static void FUNC_0(SeqVideoContext *VAR_0, const unsigned char *VAR_1, int VAR_2)
{
GetBitContext gb;
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
unsigned char VAR_9[3];
unsigned char *VAR_10;
uint32_t *palette;
VAR_3 = *VAR_1++;
if (VAR_3 & 1) {
palette = (uint32_t *)... | [
"static void FUNC_0(SeqVideoContext *VAR_0, const unsigned char *VAR_1, int VAR_2)\n{",
"GetBitContext gb;",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"unsigned char VAR_9[3];",
"unsigned char *VAR_10;",
"uint32_t *palette;",
"VAR_3 = *VAR_1++;",
"if (VAR_3 & 1) {",
"palette = (uint32_t *)VAR... | [
1,
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,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
... |
676 | static int get_video_buffer(AVFrame *frame, int align)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
int ret, i;
if (!desc)
return AVERROR(EINVAL);
if ((ret = av_image_check_size(frame->width, frame->height, 0, NULL)) < 0)
return ret;
if (!frame... | true | FFmpeg | 1ad542f11f4717a9dee19d46f4da5ce3f6beb449 | static int get_video_buffer(AVFrame *frame, int align)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
int ret, i;
if (!desc)
return AVERROR(EINVAL);
if ((ret = av_image_check_size(frame->width, frame->height, 0, NULL)) < 0)
return ret;
if (!frame... | {
"code": [
" int h = frame->height;"
],
"line_no": [
45
]
} | static int FUNC_0(AVFrame *VAR_0, int VAR_1)
{
const AVPixFmtDescriptor *VAR_2 = av_pix_fmt_desc_get(VAR_0->format);
int VAR_3, VAR_4;
if (!VAR_2)
return AVERROR(EINVAL);
if ((VAR_3 = av_image_check_size(VAR_0->width, VAR_0->height, 0, NULL)) < 0)
return VAR_3;
if (!VAR... | [
"static int FUNC_0(AVFrame *VAR_0, int VAR_1)\n{",
"const AVPixFmtDescriptor *VAR_2 = av_pix_fmt_desc_get(VAR_0->format);",
"int VAR_3, VAR_4;",
"if (!VAR_2)\nreturn AVERROR(EINVAL);",
"if ((VAR_3 = av_image_check_size(VAR_0->width, VAR_0->height, 0, NULL)) < 0)\nreturn VAR_3;",
"if (!VAR_0->linesize[0]) ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17,
19
],
[
23
],
[
25,
27
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47,
49
],
[
53
],
[
55,
57
],
[
61... |
678 | static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
VLCcode *codes, int flags)
{
int table_size, table_index, index, code_prefix, symbol, subtable_bits;
int i, j, k, n, nb, inc;
uint32_t code;
VLC_TYPE (*table)[2];
table_size = 1 << table_nb_bits;
i... | false | FFmpeg | f7f96cf4bcc369730bb945e993bec53881e212f5 | static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
VLCcode *codes, int flags)
{
int table_size, table_index, index, code_prefix, symbol, subtable_bits;
int i, j, k, n, nb, inc;
uint32_t code;
VLC_TYPE (*table)[2];
table_size = 1 << table_nb_bits;
i... | {
"code": [],
"line_no": []
} | static int FUNC_0(VLC *VAR_0, int VAR_1, int VAR_2,
VLCcode *VAR_3, int VAR_4)
{
int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;
int VAR_11, VAR_12, VAR_13, VAR_14, VAR_15, VAR_16;
uint32_t code;
VLC_TYPE (*table)[2];
VAR_5 = 1 << VAR_1;
if (VAR_1 > 30)
re... | [
"static int FUNC_0(VLC *VAR_0, int VAR_1, int VAR_2,\nVLCcode *VAR_3, int VAR_4)\n{",
"int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;",
"int VAR_11, VAR_12, VAR_13, VAR_14, VAR_15, VAR_16;",
"uint32_t code;",
"VLC_TYPE (*table)[2];",
"VAR_5 = 1 << VAR_1;",
"if (VAR_1 > 30)\nreturn -1;",
"VAR_6 = alloc... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
47
],
[
49
],
[
51
],
[... |
679 | static void h264_h_loop_filter_luma_intra_c(uint8_t *pix, int stride, int alpha, int beta)
{
h264_loop_filter_luma_intra_c(pix, 1, stride, alpha, beta);
}
| false | FFmpeg | dd561441b1e849df7d8681c6f32af82d4088dafd | static void h264_h_loop_filter_luma_intra_c(uint8_t *pix, int stride, int alpha, int beta)
{
h264_loop_filter_luma_intra_c(pix, 1, stride, alpha, beta);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, int VAR_1, int VAR_2, int VAR_3)
{
h264_loop_filter_luma_intra_c(VAR_0, 1, VAR_1, VAR_2, VAR_3);
}
| [
"static void FUNC_0(uint8_t *VAR_0, int VAR_1, int VAR_2, int VAR_3)\n{",
"h264_loop_filter_luma_intra_c(VAR_0, 1, VAR_1, VAR_2, VAR_3);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
680 | static inline void do_imdct(AC3DecodeContext *s, int channels)
{
int ch;
for (ch=1; ch<=channels; ch++) {
if (s->block_switch[ch]) {
int i;
float *x = s->tmp_output+128;
for(i=0; i<128; i++)
x[i] = s->transform_coeffs[ch][2*i];
f... | false | FFmpeg | 3b6516f7e7bb33b7aef9fa25adbf45f3de6c0560 | static inline void do_imdct(AC3DecodeContext *s, int channels)
{
int ch;
for (ch=1; ch<=channels; ch++) {
if (s->block_switch[ch]) {
int i;
float *x = s->tmp_output+128;
for(i=0; i<128; i++)
x[i] = s->transform_coeffs[ch][2*i];
f... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(AC3DecodeContext *VAR_0, int VAR_1)
{
int VAR_2;
for (VAR_2=1; VAR_2<=VAR_1; VAR_2++) {
if (VAR_0->block_switch[VAR_2]) {
int VAR_3;
float *VAR_4 = VAR_0->tmp_output+128;
for(VAR_3=0; VAR_3<128; VAR_3++)
VAR_4[VAR_3]... | [
"static inline void FUNC_0(AC3DecodeContext *VAR_0, int VAR_1)\n{",
"int VAR_2;",
"for (VAR_2=1; VAR_2<=VAR_1; VAR_2++) {",
"if (VAR_0->block_switch[VAR_2]) {",
"int VAR_3;",
"float *VAR_4 = VAR_0->tmp_output+128;",
"for(VAR_3=0; VAR_3<128; VAR_3++)",
"VAR_4[VAR_3] = VAR_0->transform_coeffs[VAR_2][2*V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
681 | static void parse_header_digest(struct iscsi_context *iscsi, const char *target)
{
QemuOptsList *list;
QemuOpts *opts;
const char *digest = NULL;
list = qemu_find_opts("iscsi");
if (!list) {
return;
}
opts = qemu_opts_find(list, target);
if (opts == NULL) {
... | true | qemu | f2917853f715b0ef55df29eb2ffea29dc69ce814 | static void parse_header_digest(struct iscsi_context *iscsi, const char *target)
{
QemuOptsList *list;
QemuOpts *opts;
const char *digest = NULL;
list = qemu_find_opts("iscsi");
if (!list) {
return;
}
opts = qemu_opts_find(list, target);
if (opts == NULL) {
... | {
"code": [
"static void parse_header_digest(struct iscsi_context *iscsi, const char *target)",
" error_report(\"Invalid header-digest setting : %s\", digest);"
],
"line_no": [
1,
67
]
} | static void FUNC_0(struct iscsi_context *VAR_0, const char *VAR_1)
{
QemuOptsList *list;
QemuOpts *opts;
const char *VAR_2 = NULL;
list = qemu_find_opts("VAR_0");
if (!list) {
return;
}
opts = qemu_opts_find(list, VAR_1);
if (opts == NULL) {
opts = QTAILQ_F... | [
"static void FUNC_0(struct iscsi_context *VAR_0, const char *VAR_1)\n{",
"QemuOptsList *list;",
"QemuOpts *opts;",
"const char *VAR_2 = NULL;",
"list = qemu_find_opts(\"VAR_0\");",
"if (!list) {",
"return;",
"}",
"opts = qemu_opts_find(list, VAR_1);",
"if (opts == NULL) {",
"opts = QTAILQ_FIRST(... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
... |
684 | void visit_type_str(Visitor *v, char **obj, const char *name, Error **errp)
{
if (!error_is_set(errp)) {
v->type_str(v, obj, name, errp);
}
}
| true | qemu | 297a3646c2947ee64a6d42ca264039732c6218e0 | void visit_type_str(Visitor *v, char **obj, const char *name, Error **errp)
{
if (!error_is_set(errp)) {
v->type_str(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, char **VAR_1, const char *VAR_2, Error **VAR_3)
{
if (!error_is_set(VAR_3)) {
VAR_0->type_str(VAR_0, VAR_1, VAR_2, VAR_3);
}
}
| [
"void FUNC_0(Visitor *VAR_0, char **VAR_1, const char *VAR_2, Error **VAR_3)\n{",
"if (!error_is_set(VAR_3)) {",
"VAR_0->type_str(VAR_0, VAR_1, VAR_2, VAR_3);",
"}",
"}"
] | [
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
685 | static int http_send_data(HTTPContext *c)
{
int len, ret;
while (c->buffer_ptr >= c->buffer_end) {
ret = http_prepare_data(c);
if (ret < 0)
return -1;
else if (ret == 0) {
break;
} else {
/* state change requested */
re... | true | FFmpeg | a6e14edde01bafbbe54f6f451efa718a48975b47 | static int http_send_data(HTTPContext *c)
{
int len, ret;
while (c->buffer_ptr >= c->buffer_end) {
ret = http_prepare_data(c);
if (ret < 0)
return -1;
else if (ret == 0) {
break;
} else {
return 0;
}
}
... | {
"code": [
" break;",
" break;",
" break;"
],
"line_no": [
19,
19,
19
]
} | static int FUNC_0(HTTPContext *VAR_0)
{
int VAR_1, VAR_2;
while (VAR_0->buffer_ptr >= VAR_0->buffer_end) {
VAR_2 = http_prepare_data(VAR_0);
if (VAR_2 < 0)
return -1;
else if (VAR_2 == 0) {
break;
} else {
return 0;
... | [
"static int FUNC_0(HTTPContext *VAR_0)\n{",
"int VAR_1, VAR_2;",
"while (VAR_0->buffer_ptr >= VAR_0->buffer_end) {",
"VAR_2 = http_prepare_data(VAR_0);",
"if (VAR_2 < 0)\nreturn -1;",
"else if (VAR_2 == 0) {",
"break;",
"} else {",
"return 0;",
"}",
"}",
"if (VAR_0->buffer_end > VAR_0->buffer_... | [
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,
3
],
[
5
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
... |
687 | static void m68060_cpu_initfn(Object *obj)
{
M68kCPU *cpu = M68K_CPU(obj);
CPUM68KState *env = &cpu->env;
m68k_set_feature(env, M68K_FEATURE_M68000);
m68k_set_feature(env, M68K_FEATURE_USP);
m68k_set_feature(env, M68K_FEATURE_WORD_INDEX);
m68k_set_feature(env, M68K_FEATURE_BRAL);
m... | true | qemu | 8bf6cbaf396a8b54b138bb8a7c3377f2868ed16e | static void m68060_cpu_initfn(Object *obj)
{
M68kCPU *cpu = M68K_CPU(obj);
CPUM68KState *env = &cpu->env;
m68k_set_feature(env, M68K_FEATURE_M68000);
m68k_set_feature(env, M68K_FEATURE_USP);
m68k_set_feature(env, M68K_FEATURE_WORD_INDEX);
m68k_set_feature(env, M68K_FEATURE_BRAL);
m... | {
"code": [],
"line_no": []
} | static void FUNC_0(Object *VAR_0)
{
M68kCPU *cpu = M68K_CPU(VAR_0);
CPUM68KState *env = &cpu->env;
m68k_set_feature(env, M68K_FEATURE_M68000);
m68k_set_feature(env, M68K_FEATURE_USP);
m68k_set_feature(env, M68K_FEATURE_WORD_INDEX);
m68k_set_feature(env, M68K_FEATURE_BRAL);
m68k_set... | [
"static void FUNC_0(Object *VAR_0)\n{",
"M68kCPU *cpu = M68K_CPU(VAR_0);",
"CPUM68KState *env = &cpu->env;",
"m68k_set_feature(env, M68K_FEATURE_M68000);",
"m68k_set_feature(env, M68K_FEATURE_USP);",
"m68k_set_feature(env, M68K_FEATURE_WORD_INDEX);",
"m68k_set_feature(env, M68K_FEATURE_BRAL);",
"m68k_... | [
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
],
[
38
]
] |
688 | void mips_r4k_init (ram_addr_t ram_size, int vga_ram_size,
const char *boot_device,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
char buf[1024];
unsigned long bios_offset;
int... | true | qemu | 0ccff151b42a5b684ce22473b68972a94bc708fb | void mips_r4k_init (ram_addr_t ram_size, int vga_ram_size,
const char *boot_device,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
char buf[1024];
unsigned long bios_offset;
int... | {
"code": [],
"line_no": []
} | void FUNC_0 (ram_addr_t VAR_0, int VAR_1,
const char *VAR_2,
const char *VAR_3, const char *VAR_4,
const char *VAR_5, const char *VAR_6)
{
char VAR_7[1024];
unsigned long VAR_8;
int VAR_9;
CPUState *env;
RTCState *rtc_state;
i... | [
"void FUNC_0 (ram_addr_t VAR_0, int VAR_1,\nconst char *VAR_2,\nconst char *VAR_3, const char *VAR_4,\nconst char *VAR_5, const char *VAR_6)\n{",
"char VAR_7[1024];",
"unsigned long VAR_8;",
"int VAR_9;",
"CPUState *env;",
"RTCState *rtc_state;",
"int VAR_10;",
"qemu_irq *i8259;",
"int VAR_11;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35,
37
],
[
39,
41
],
[
43,
46
],
[
48
],
[
50
],
[
54
... |
689 | static void windowing_and_mdct_ltp(AACContext *ac, float *out,
float *in, IndividualChannelStream *ics)
{
const float *lwindow = ics->use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_sine_1024;
const float *swindow = ics->use_kb_window[0] ? ff_aac_kbd_short_128 : ff_... | true | FFmpeg | a6c49f18abacb9bf52d4d808a2a56561a5b5445c | static void windowing_and_mdct_ltp(AACContext *ac, float *out,
float *in, IndividualChannelStream *ics)
{
const float *lwindow = ics->use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_sine_1024;
const float *swindow = ics->use_kb_window[0] ? ff_aac_kbd_short_128 : ff_... | {
"code": [
" memcpy(in + 576, in + 576, 448 * sizeof(float));",
" memcpy(in + 1024, in + 1024, 448 * sizeof(float));"
],
"line_no": [
27,
37
]
} | static void FUNC_0(AACContext *VAR_0, float *VAR_1,
float *VAR_2, IndividualChannelStream *VAR_3)
{
const float *VAR_4 = VAR_3->use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_sine_1024;
const float *VAR_5 = VAR_3->use_kb_window[0] ? ff_aac_kbd_short_128 : ff_sine_1... | [
"static void FUNC_0(AACContext *VAR_0, float *VAR_1,\nfloat *VAR_2, IndividualChannelStream *VAR_3)\n{",
"const float *VAR_4 = VAR_3->use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_sine_1024;",
"const float *VAR_5 = VAR_3->use_kb_window[0] ? ff_aac_kbd_short_128 : ff_sine_128;",
"const float *VAR_6 = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
690 | static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
MOVStreamContext *sc;
int ret;
st = avformat_new_stream(c->fc, NULL);
if (!st) return AVERROR(ENOMEM);
st->id = c->fc->nb_streams;
sc = av_mallocz(sizeof(MOVStreamContext));
if (!sc) return ... | false | FFmpeg | 712d962a6a29b1099cd872cfb07867175a93ac4c | static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
MOVStreamContext *sc;
int ret;
st = avformat_new_stream(c->fc, NULL);
if (!st) return AVERROR(ENOMEM);
st->id = c->fc->nb_streams;
sc = av_mallocz(sizeof(MOVStreamContext));
if (!sc) return ... | {
"code": [],
"line_no": []
} | static int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1, MOVAtom VAR_2)
{
AVStream *st;
MOVStreamContext *sc;
int VAR_3;
st = avformat_new_stream(VAR_0->fc, NULL);
if (!st) return AVERROR(ENOMEM);
st->id = VAR_0->fc->nb_streams;
sc = av_mallocz(sizeof(MOVStreamContext));
if (!... | [
"static int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1, MOVAtom VAR_2)\n{",
"AVStream *st;",
"MOVStreamContext *sc;",
"int VAR_3;",
"st = avformat_new_stream(VAR_0->fc, NULL);",
"if (!st) return AVERROR(ENOMEM);",
"st->id = VAR_0->fc->nb_streams;",
"sc = av_mallocz(sizeof(MOVStreamContext));",
"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,
0,
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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
41
],
[
47,
49
],
[
51,
53
],
[
55
],
[... |
692 | static int mxg_read_packet(AVFormatContext *s, AVPacket *pkt)
{
int ret;
unsigned int size;
uint8_t *startmarker_ptr, *end, *search_end, marker;
MXGContext *mxg = s->priv_data;
while (!avio_feof(s->pb) && !s->pb->error){
if (mxg->cache_size <= OVERREAD_SIZE) {
/* update... | true | FFmpeg | c7c207aecde0773afc974ce4b7e25dca659bc5b5 | static int mxg_read_packet(AVFormatContext *s, AVPacket *pkt)
{
int ret;
unsigned int size;
uint8_t *startmarker_ptr, *end, *search_end, marker;
MXGContext *mxg = s->priv_data;
while (!avio_feof(s->pb) && !s->pb->error){
if (mxg->cache_size <= OVERREAD_SIZE) {
... | {
"code": [
" memcpy(mxg->buffer, mxg->buffer_ptr, mxg->cache_size);"
],
"line_no": [
107
]
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
int VAR_2;
unsigned int VAR_3;
uint8_t *startmarker_ptr, *end, *search_end, marker;
MXGContext *mxg = VAR_0->priv_data;
while (!avio_feof(VAR_0->pb) && !VAR_0->pb->error){
if (mxg->cache_size <= OVERREAD_SIZE) {
... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"int VAR_2;",
"unsigned int VAR_3;",
"uint8_t *startmarker_ptr, *end, *search_end, marker;",
"MXGContext *mxg = VAR_0->priv_data;",
"while (!avio_feof(VAR_0->pb) && !VAR_0->pb->error){",
"if (mxg->cache_size <= OVERREAD_SIZE) {",
"VAR_2 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51
... |
693 | static uint32_t pci_unin_config_readl (void *opaque,
target_phys_addr_t addr)
{
UNINState *s = opaque;
return s->config_reg;
}
| true | qemu | 2e29bd04786003561303dcad940b38afe790fb9b | static uint32_t pci_unin_config_readl (void *opaque,
target_phys_addr_t addr)
{
UNINState *s = opaque;
return s->config_reg;
}
| {
"code": [
" return s->config_reg;"
],
"line_no": [
11
]
} | static uint32_t FUNC_0 (void *opaque,
target_phys_addr_t addr)
{
UNINState *s = opaque;
return s->config_reg;
}
| [
"static uint32_t FUNC_0 (void *opaque,\ntarget_phys_addr_t addr)\n{",
"UNINState *s = opaque;",
"return s->config_reg;",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
]
] |
694 | static int amf_parse_object(AVFormatContext *s, AVStream *astream,
AVStream *vstream, const char *key,
int64_t max_pos, int depth)
{
AVCodecContext *acodec, *vcodec;
FLVContext *flv = s->priv_data;
AVIOContext *ioc;
AMFDataType amf_type;
... | true | FFmpeg | 0fadbd3623cf9132832f48810c0edb93aa63f51b | static int amf_parse_object(AVFormatContext *s, AVStream *astream,
AVStream *vstream, const char *key,
int64_t max_pos, int depth)
{
AVCodecContext *acodec, *vcodec;
FLVContext *flv = s->priv_data;
AVIOContext *ioc;
AMFDataType amf_type;
... | {
"code": [
" acodec = astream ? astream->codec : NULL;",
" vcodec = vstream ? vstream->codec : NULL;"
],
"line_no": [
159,
161
]
} | static int FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1,
AVStream *VAR_2, const char *VAR_3,
int64_t VAR_4, int VAR_5)
{
AVCodecContext *acodec, *vcodec;
FLVContext *flv = VAR_0->priv_data;
AVIOContext *ioc;
AMFDataType amf_type;
char... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1,\nAVStream *VAR_2, const char *VAR_3,\nint64_t VAR_4, int VAR_5)\n{",
"AVCodecContext *acodec, *vcodec;",
"FLVContext *flv = VAR_0->priv_data;",
"AVIOContext *ioc;",
"AMFDataType amf_type;",
"char VAR_6[256];",
"double VAR_7;",
"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,
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... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33,
35
],
[
37
],
[
39,
41
],
[
43
],
[
45,
47,
49
],
[
51
... |
695 | static TCGv_i64 gen_subq_msw(TCGv_i64 a, TCGv b)
{
TCGv_i64 tmp64 = tcg_temp_new_i64();
tcg_gen_extu_i32_i64(tmp64, b);
dead_tmp(b);
tcg_gen_shli_i64(tmp64, tmp64, 32);
tcg_gen_sub_i64(a, tmp64, a);
tcg_temp_free_i64(tmp64);
return a;
}
| true | qemu | 7d1b0095bff7157e856d1d0e6c4295641ced2752 | static TCGv_i64 gen_subq_msw(TCGv_i64 a, TCGv b)
{
TCGv_i64 tmp64 = tcg_temp_new_i64();
tcg_gen_extu_i32_i64(tmp64, b);
dead_tmp(b);
tcg_gen_shli_i64(tmp64, tmp64, 32);
tcg_gen_sub_i64(a, tmp64, a);
tcg_temp_free_i64(tmp64);
return a;
}
| {
"code": [
" dead_tmp(b);",
" dead_tmp(b);",
" dead_tmp(b);",
" dead_tmp(b);"
],
"line_no": [
11,
11,
11,
11
]
} | static TCGv_i64 FUNC_0(TCGv_i64 a, TCGv b)
{
TCGv_i64 tmp64 = tcg_temp_new_i64();
tcg_gen_extu_i32_i64(tmp64, b);
dead_tmp(b);
tcg_gen_shli_i64(tmp64, tmp64, 32);
tcg_gen_sub_i64(a, tmp64, a);
tcg_temp_free_i64(tmp64);
return a;
}
| [
"static TCGv_i64 FUNC_0(TCGv_i64 a, TCGv b)\n{",
"TCGv_i64 tmp64 = tcg_temp_new_i64();",
"tcg_gen_extu_i32_i64(tmp64, b);",
"dead_tmp(b);",
"tcg_gen_shli_i64(tmp64, tmp64, 32);",
"tcg_gen_sub_i64(a, tmp64, a);",
"tcg_temp_free_i64(tmp64);",
"return a;",
"}"
] | [
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
]
] |
697 | static void decode_component(DiracContext *s, int comp)
{
AVCodecContext *avctx = s->avctx;
SubBand *bands[3*MAX_DWT_LEVELS+1];
enum dirac_subband orientation;
int level, num_bands = 0;
/* Unpack all subbands at all levels. */
for (level = 0; level < s->wavelet_depth; level++) {
... | true | FFmpeg | 0f13cc732b3752828890b8dff507615cfd454336 | static void decode_component(DiracContext *s, int comp)
{
AVCodecContext *avctx = s->avctx;
SubBand *bands[3*MAX_DWT_LEVELS+1];
enum dirac_subband orientation;
int level, num_bands = 0;
for (level = 0; level < s->wavelet_depth; level++) {
for (orientation = !!level; orientatio... | {
"code": [
" b->length = FFMIN(b->length, get_bits_left(&s->gb)/8);"
],
"line_no": [
41
]
} | static void FUNC_0(DiracContext *VAR_0, int VAR_1)
{
AVCodecContext *avctx = VAR_0->avctx;
SubBand *bands[3*MAX_DWT_LEVELS+1];
enum dirac_subband VAR_2;
int VAR_3, VAR_4 = 0;
for (VAR_3 = 0; VAR_3 < VAR_0->wavelet_depth; VAR_3++) {
for (VAR_2 = !!VAR_3; VAR_2 < 4; VAR_2++) {
... | [
"static void FUNC_0(DiracContext *VAR_0, int VAR_1)\n{",
"AVCodecContext *avctx = VAR_0->avctx;",
"SubBand *bands[3*MAX_DWT_LEVELS+1];",
"enum dirac_subband VAR_2;",
"int VAR_3, VAR_4 = 0;",
"for (VAR_3 = 0; VAR_3 < VAR_0->wavelet_depth; VAR_3++) {",
"for (VAR_2 = !!VAR_3; VAR_2 < 4; VAR_2++) {",
"Sub... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51,... |
698 | static void ppc_heathrow_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->initr... | true | qemu | b981289c493c7ddabc1cdf7de99daa24642c7739 | static void ppc_heathrow_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->initr... | {
"code": [],
"line_no": []
} | static void FUNC_0(MachineState *VAR_0)
{
ram_addr_t ram_size = VAR_0->ram_size;
const char *VAR_1 = VAR_0->VAR_1;
const char *VAR_2 = VAR_0->VAR_2;
const char *VAR_3 = VAR_0->VAR_3;
const char *VAR_4 = VAR_0->VAR_4;
const char *VAR_5 = VAR_0->boot_order;
MemoryRegion *sysmem = get_s... | [
"static void FUNC_0(MachineState *VAR_0)\n{",
"ram_addr_t ram_size = VAR_0->ram_size;",
"const char *VAR_1 = VAR_0->VAR_1;",
"const char *VAR_2 = VAR_0->VAR_2;",
"const char *VAR_3 = VAR_0->VAR_3;",
"const char *VAR_4 = VAR_0->VAR_4;",
"const char *VAR_5 = VAR_0->boot_order;",
"MemoryRegion *sysmem = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
... |
699 | static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
{
int i;
int dc_y_table;
int dc_c_table;
int ac_y_table;
int ac_c_table;
int residual_eob_run = 0;
VLC *y_tables[64];
VLC *c_tables[64];
s->dct_tokens[0][0] = s->dct_tokens_base;
if (get_bits_left... | true | FFmpeg | 2f00300b779e7b247c85db0d7daef448225105ff | static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
{
int i;
int dc_y_table;
int dc_c_table;
int ac_y_table;
int ac_c_table;
int residual_eob_run = 0;
VLC *y_tables[64];
VLC *c_tables[64];
s->dct_tokens[0][0] = s->dct_tokens_base;
if (get_bits_left... | {
"code": [],
"line_no": []
} | static int FUNC_0(Vp3DecodeContext *VAR_0, GetBitContext *VAR_1)
{
int VAR_2;
int VAR_3;
int VAR_4;
int VAR_5;
int VAR_6;
int VAR_7 = 0;
VLC *y_tables[64];
VLC *c_tables[64];
VAR_0->dct_tokens[0][0] = VAR_0->dct_tokens_base;
if (get_bits_left(VAR_1) < 16)
... | [
"static int FUNC_0(Vp3DecodeContext *VAR_0, GetBitContext *VAR_1)\n{",
"int VAR_2;",
"int VAR_3;",
"int VAR_4;",
"int VAR_5;",
"int VAR_6;",
"int VAR_7 = 0;",
"VLC *y_tables[64];",
"VLC *c_tables[64];",
"VAR_0->dct_tokens[0][0] = VAR_0->dct_tokens_base;",
"if (get_bits_left(VAR_1) < 16)\nVAR_3 =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27,
34
],
[
36
],
[
42,
44
],
[
46,
48
],
[
56
],
[
62,
64
],
[
66,
68
],
[... |
700 | static void free_device_list(AVOpenCLDeviceList *device_list)
{
int i, j;
if (!device_list)
return;
for (i = 0; i < device_list->platform_num; i++) {
if (!device_list->platform_node[i])
continue;
for (j = 0; j < device_list->platform_node[i]->device_num; j++) {
... | true | FFmpeg | ef0c6d9b01de773e5a1177de5fcbb981aac44d65 | static void free_device_list(AVOpenCLDeviceList *device_list)
{
int i, j;
if (!device_list)
return;
for (i = 0; i < device_list->platform_num; i++) {
if (!device_list->platform_node[i])
continue;
for (j = 0; j < device_list->platform_node[i]->device_num; j++) {
... | {
"code": [
" if (!device_list)"
],
"line_no": [
7
]
} | static void FUNC_0(AVOpenCLDeviceList *VAR_0)
{
int VAR_1, VAR_2;
if (!VAR_0)
return;
for (VAR_1 = 0; VAR_1 < VAR_0->platform_num; VAR_1++) {
if (!VAR_0->platform_node[VAR_1])
continue;
for (VAR_2 = 0; VAR_2 < VAR_0->platform_node[VAR_1]->device_num; VAR_2++) {
... | [
"static void FUNC_0(AVOpenCLDeviceList *VAR_0)\n{",
"int VAR_1, VAR_2;",
"if (!VAR_0)\nreturn;",
"for (VAR_1 = 0; VAR_1 < VAR_0->platform_num; VAR_1++) {",
"if (!VAR_0->platform_node[VAR_1])\ncontinue;",
"for (VAR_2 = 0; VAR_2 < VAR_0->platform_node[VAR_1]->device_num; VAR_2++) {",
"av_freep(&(VAR_0->pl... | [
0,
0,
1,
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
]
] |
701 | void qemu_cond_init(QemuCond *cond)
{
memset(cond, 0, sizeof(*cond));
cond->sema = CreateSemaphore(NULL, 0, LONG_MAX, NULL);
if (!cond->sema) {
error_exit(GetLastError(), __func__);
}
cond->continue_event = CreateEvent(NULL, /* security */
... | true | qemu | 12f8def0e02232d7c6416ad9b66640f973c531d1 | void qemu_cond_init(QemuCond *cond)
{
memset(cond, 0, sizeof(*cond));
cond->sema = CreateSemaphore(NULL, 0, LONG_MAX, NULL);
if (!cond->sema) {
error_exit(GetLastError(), __func__);
}
cond->continue_event = CreateEvent(NULL,
FALSE,
... | {
"code": [
" cond->sema = CreateSemaphore(NULL, 0, LONG_MAX, NULL);",
" if (!cond->sema) {",
" error_exit(GetLastError(), __func__);",
" if (!cond->continue_event) {",
" error_exit(GetLastError(), __func__);",
" error_exit(GetLastError(), __func__);",
" ... | void FUNC_0(QemuCond *VAR_0)
{
memset(VAR_0, 0, sizeof(*VAR_0));
VAR_0->sema = CreateSemaphore(NULL, 0, LONG_MAX, NULL);
if (!VAR_0->sema) {
error_exit(GetLastError(), __func__);
}
VAR_0->continue_event = CreateEvent(NULL,
FALSE,
... | [
"void FUNC_0(QemuCond *VAR_0)\n{",
"memset(VAR_0, 0, sizeof(*VAR_0));",
"VAR_0->sema = CreateSemaphore(NULL, 0, LONG_MAX, NULL);",
"if (!VAR_0->sema) {",
"error_exit(GetLastError(), __func__);",
"}",
"VAR_0->continue_event = CreateEvent(NULL,\nFALSE,\nFALSE,\nNULL);",
"if (!VAR_0->continue_event) {",
... | [
0,
0,
1,
1,
1,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17,
19,
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
702 | void helper_rfdi(CPUPPCState *env)
{
do_rfi(env, env->spr[SPR_BOOKE_DSRR0], SPR_BOOKE_DSRR1,
~((target_ulong)0x3FFF0000), 0);
}
| true | qemu | a1bb73849fbd7d992b6ac2cf30c034244fb2299d | void helper_rfdi(CPUPPCState *env)
{
do_rfi(env, env->spr[SPR_BOOKE_DSRR0], SPR_BOOKE_DSRR1,
~((target_ulong)0x3FFF0000), 0);
}
| {
"code": [
" ~((target_ulong)0x3FFF0000), 0);",
" do_rfi(env, env->spr[SPR_BOOKE_DSRR0], SPR_BOOKE_DSRR1,",
" ~((target_ulong)0x3FFF0000), 0);",
" ~((target_ulong)0x3FFF0000), 0);"
],
"line_no": [
7,
5,
7,
7
]
} | void FUNC_0(CPUPPCState *VAR_0)
{
do_rfi(VAR_0, VAR_0->spr[SPR_BOOKE_DSRR0], SPR_BOOKE_DSRR1,
~((target_ulong)0x3FFF0000), 0);
}
| [
"void FUNC_0(CPUPPCState *VAR_0)\n{",
"do_rfi(VAR_0, VAR_0->spr[SPR_BOOKE_DSRR0], SPR_BOOKE_DSRR1,\n~((target_ulong)0x3FFF0000), 0);",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
]
] |
703 | static void choose_sample_rate(AVStream *st, AVCodec *codec)
{
if(codec && codec->supported_samplerates){
const int *p= codec->supported_samplerates;
int best;
int best_dist=INT_MAX;
for(; *p; p++){
int dist= abs(st->codec->sample_rate - *p);
if(dist <... | true | FFmpeg | 947cbeca16c7a30322e02feea440e1e67801ab9a | static void choose_sample_rate(AVStream *st, AVCodec *codec)
{
if(codec && codec->supported_samplerates){
const int *p= codec->supported_samplerates;
int best;
int best_dist=INT_MAX;
for(; *p; p++){
int dist= abs(st->codec->sample_rate - *p);
if(dist <... | {
"code": [
" int best;"
],
"line_no": [
9
]
} | static void FUNC_0(AVStream *VAR_0, AVCodec *VAR_1)
{
if(VAR_1 && VAR_1->supported_samplerates){
const int *VAR_2= VAR_1->supported_samplerates;
int VAR_3;
int VAR_4=INT_MAX;
for(; *VAR_2; VAR_2++){
int VAR_5= abs(VAR_0->VAR_1->sample_rate - *VAR_2);
i... | [
"static void FUNC_0(AVStream *VAR_0, AVCodec *VAR_1)\n{",
"if(VAR_1 && VAR_1->supported_samplerates){",
"const int *VAR_2= VAR_1->supported_samplerates;",
"int VAR_3;",
"int VAR_4=INT_MAX;",
"for(; *VAR_2; VAR_2++){",
"int VAR_5= abs(VAR_0->VAR_1->sample_rate - *VAR_2);",
"if(VAR_5 < VAR_4){",
"VAR_... | [
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
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
704 | unsigned iov_copy(struct iovec *dst_iov, unsigned int dst_iov_cnt,
const struct iovec *iov, unsigned int iov_cnt,
size_t offset, size_t bytes)
{
size_t len;
unsigned int i, j;
for (i = 0, j = 0; i < iov_cnt && j < dst_iov_cnt && bytes; i++) {
if (offset >= io... | true | qemu | e911765cbb9e9ddf5d952c88bb52180a62c6cea0 | unsigned iov_copy(struct iovec *dst_iov, unsigned int dst_iov_cnt,
const struct iovec *iov, unsigned int iov_cnt,
size_t offset, size_t bytes)
{
size_t len;
unsigned int i, j;
for (i = 0, j = 0; i < iov_cnt && j < dst_iov_cnt && bytes; i++) {
if (offset >= io... | {
"code": [
" for (i = 0, j = 0; i < iov_cnt && j < dst_iov_cnt && bytes; i++) {"
],
"line_no": [
13
]
} | unsigned FUNC_0(struct iovec *VAR_0, unsigned int VAR_1,
const struct iovec *VAR_2, unsigned int VAR_3,
size_t VAR_4, size_t VAR_5)
{
size_t len;
unsigned int VAR_6, VAR_7;
for (VAR_6 = 0, VAR_7 = 0; VAR_6 < VAR_3 && VAR_7 < VAR_1 && VAR_5; VAR_6++) {
if (VAR... | [
"unsigned FUNC_0(struct iovec *VAR_0, unsigned int VAR_1,\nconst struct iovec *VAR_2, unsigned int VAR_3,\nsize_t VAR_4, size_t VAR_5)\n{",
"size_t len;",
"unsigned int VAR_6, VAR_7;",
"for (VAR_6 = 0, VAR_7 = 0; VAR_6 < VAR_3 && VAR_7 < VAR_1 && VAR_5; VAR_6++) {",
"if (VAR_4 >= VAR_2[VAR_6].iov_len) {",
... | [
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
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
706 | static int tty_serial_ioctl(CharDriverState *chr, int cmd, void *arg)
FDCharDriver *s = chr->opaque;
switch(cmd) {
case CHR_IOCTL_SERIAL_SET_PARAMS:
QEMUSerialSetParams *ssp = arg;
tty_serial_init(s->fd_in, ssp->speed, ssp->parity,
ssp->data_bits... | true | qemu | 81174dae3f9189519cd60c7b79e91c291b021bbe | static int tty_serial_ioctl(CharDriverState *chr, int cmd, void *arg)
FDCharDriver *s = chr->opaque;
switch(cmd) {
case CHR_IOCTL_SERIAL_SET_PARAMS:
QEMUSerialSetParams *ssp = arg;
tty_serial_init(s->fd_in, ssp->speed, ssp->parity,
ssp->data_bits... | {
"code": [],
"line_no": []
} | static int tty_serial_ioctl(CharDriverState *chr, int cmd, void *arg)
FDCharDriver *s = chr->opaque;
switch(cmd) {
case CHR_IOCTL_SERIAL_SET_PARAMS:
QEMUSerialSetParams *ssp = arg;
tty_serial_init(s->fd_in, ssp->speed, ssp->parity,
ssp->data_bits... | [
"static int tty_serial_ioctl(CharDriverState *chr, int cmd, void *arg)\nFDCharDriver *s = chr->opaque;",
"switch(cmd) {",
"case CHR_IOCTL_SERIAL_SET_PARAMS:\nQEMUSerialSetParams *ssp = arg;",
"tty_serial_init(s->fd_in, ssp->speed, ssp->parity,\nssp->data_bits, ssp->stop_bits);",
"case CHR_IOCTL_SERIAL_SET_B... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
4
],
[
8
],
[
10,
13
],
[
15,
17
],
[
21,
24
],
[
26,
28
],
[
63,
65
],
[
68
]
] |
708 | static int spapr_populate_drconf_memory(sPAPRMachineState *spapr, void *fdt)
{
MachineState *machine = MACHINE(spapr);
int ret, i, offset;
uint64_t lmb_size = SPAPR_MEMORY_BLOCK_SIZE;
uint32_t prop_lmb_size[] = {0, cpu_to_be32(lmb_size)};
uint32_t nr_lmbs = (machine->maxram_size - machine->ram... | true | qemu | ef001f069e0f175a036929782c5c63053df9569a | static int spapr_populate_drconf_memory(sPAPRMachineState *spapr, void *fdt)
{
MachineState *machine = MACHINE(spapr);
int ret, i, offset;
uint64_t lmb_size = SPAPR_MEMORY_BLOCK_SIZE;
uint32_t prop_lmb_size[] = {0, cpu_to_be32(lmb_size)};
uint32_t nr_lmbs = (machine->maxram_size - machine->ram... | {
"code": [
" buf_len = nr_lmbs * SPAPR_DR_LMB_LIST_ENTRY_SIZE * sizeof(uint32_t) +",
" sizeof(uint32_t);"
],
"line_no": [
23,
25
]
} | static int FUNC_0(sPAPRMachineState *VAR_0, void *VAR_1)
{
MachineState *machine = MACHINE(VAR_0);
int VAR_2, VAR_3, VAR_4;
uint64_t lmb_size = SPAPR_MEMORY_BLOCK_SIZE;
uint32_t prop_lmb_size[] = {0, cpu_to_be32(lmb_size)};
uint32_t nr_lmbs = (machine->maxram_size - machine->ram_size)/lmb_size... | [
"static int FUNC_0(sPAPRMachineState *VAR_0, void *VAR_1)\n{",
"MachineState *machine = MACHINE(VAR_0);",
"int VAR_2, VAR_3, VAR_4;",
"uint64_t lmb_size = SPAPR_MEMORY_BLOCK_SIZE;",
"uint32_t prop_lmb_size[] = {0, cpu_to_be32(lmb_size)};",
"uint32_t nr_lmbs = (machine->maxram_size - machine->ram_size)/lmb... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23,
25
],
[
27
],
[
31
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
... |
709 | static int http_server(struct sockaddr_in my_addr)
{
int server_fd, tmp, ret;
struct sockaddr_in from_addr;
struct pollfd poll_table[HTTP_MAX_CONNECTIONS + 1], *poll_entry;
HTTPContext *c, **cp;
long cur_time;
server_fd = socket(AF_INET,SOCK_STREAM,0);
if (server_fd < 0) {
... | true | FFmpeg | 5eb765ef341c3ec1bea31914c897750f88476ede | static int http_server(struct sockaddr_in my_addr)
{
int server_fd, tmp, ret;
struct sockaddr_in from_addr;
struct pollfd poll_table[HTTP_MAX_CONNECTIONS + 1], *poll_entry;
HTTPContext *c, **cp;
long cur_time;
server_fd = socket(AF_INET,SOCK_STREAM,0);
if (server_fd < 0) {
... | {
"code": [
" long cur_time;",
" if (handle_http (c, cur_time) < 0) {"
],
"line_no": [
13,
195
]
} | static int FUNC_0(struct sockaddr_in VAR_0)
{
int VAR_1, VAR_2, VAR_3;
struct sockaddr_in VAR_4;
struct pollfd VAR_5[HTTP_MAX_CONNECTIONS + 1], *poll_entry;
HTTPContext *c, **cp;
long VAR_6;
VAR_1 = socket(AF_INET,SOCK_STREAM,0);
if (VAR_1 < 0) {
perror ("socket");
... | [
"static int FUNC_0(struct sockaddr_in VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3;",
"struct sockaddr_in VAR_4;",
"struct pollfd VAR_5[HTTP_MAX_CONNECTIONS + 1], *poll_entry;",
"HTTPContext *c, **cp;",
"long VAR_6;",
"VAR_1 = socket(AF_INET,SOCK_STREAM,0);",
"if (VAR_1 < 0) {",
"perror (\"socket\");",
"r... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
... |
711 | int kvm_arch_remove_sw_breakpoint(CPUState *cs, struct kvm_sw_breakpoint *bp)
{
uint8_t t[sizeof(diag_501)];
if (cpu_memory_rw_debug(cs, bp->pc, t, sizeof(diag_501), 0)) {
return -EINVAL;
} else if (memcmp(t, diag_501, sizeof(diag_501))) {
return -EINVAL;
} else if (cpu_memory_r... | true | qemu | b60fae32ff33cbaab76d14cc5f55b979cf58516d | int kvm_arch_remove_sw_breakpoint(CPUState *cs, struct kvm_sw_breakpoint *bp)
{
uint8_t t[sizeof(diag_501)];
if (cpu_memory_rw_debug(cs, bp->pc, t, sizeof(diag_501), 0)) {
return -EINVAL;
} else if (memcmp(t, diag_501, sizeof(diag_501))) {
return -EINVAL;
} else if (cpu_memory_r... | {
"code": [
" uint8_t t[sizeof(diag_501)];",
" if (cpu_memory_rw_debug(cs, bp->pc, t, sizeof(diag_501), 0)) {",
" } else if (memcmp(t, diag_501, sizeof(diag_501))) {",
" sizeof(diag_501), 1)) {"
],
"line_no": [
5,
9,
13,
19
]
} | int FUNC_0(CPUState *VAR_0, struct kvm_sw_breakpoint *VAR_1)
{
uint8_t t[sizeof(diag_501)];
if (cpu_memory_rw_debug(VAR_0, VAR_1->pc, t, sizeof(diag_501), 0)) {
return -EINVAL;
} else if (memcmp(t, diag_501, sizeof(diag_501))) {
return -EINVAL;
} else if (cpu_memory_rw_debug(VAR... | [
"int FUNC_0(CPUState *VAR_0, struct kvm_sw_breakpoint *VAR_1)\n{",
"uint8_t t[sizeof(diag_501)];",
"if (cpu_memory_rw_debug(VAR_0, VAR_1->pc, t, sizeof(diag_501), 0)) {",
"return -EINVAL;",
"} else if (memcmp(t, diag_501, sizeof(diag_501))) {",
"return -EINVAL;",
"} else if (cpu_memory_rw_debug(VAR_0, V... | [
0,
1,
1,
0,
1,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
]
] |
714 | static int kvm_get_dirty_pages_log_range(MemoryRegionSection *section,
unsigned long *bitmap)
{
unsigned int i, j;
unsigned long page_number, addr, addr1, c;
unsigned int len = ((section->size / TARGET_PAGE_SIZE) + HOST_LONG_BITS - 1) / HOST_LONG_BITS;
/*... | true | qemu | aa90fec7ad128039617d31a5fd5ced8b0488f71b | static int kvm_get_dirty_pages_log_range(MemoryRegionSection *section,
unsigned long *bitmap)
{
unsigned int i, j;
unsigned long page_number, addr, addr1, c;
unsigned int len = ((section->size / TARGET_PAGE_SIZE) + HOST_LONG_BITS - 1) / HOST_LONG_BITS;
... | {
"code": [
" unsigned long page_number, addr, addr1, c;"
],
"line_no": [
9
]
} | static int FUNC_0(MemoryRegionSection *VAR_0,
unsigned long *VAR_1)
{
unsigned int VAR_2, VAR_3;
unsigned long VAR_4, VAR_5, VAR_6, VAR_7;
unsigned int VAR_8 = ((VAR_0->size / TARGET_PAGE_SIZE) + HOST_LONG_BITS - 1) / HOST_LONG_BITS;
for (VAR_... | [
"static int FUNC_0(MemoryRegionSection *VAR_0,\nunsigned long *VAR_1)\n{",
"unsigned int VAR_2, VAR_3;",
"unsigned long VAR_4, VAR_5, VAR_6, VAR_7;",
"unsigned int VAR_8 = ((VAR_0->size / TARGET_PAGE_SIZE) + HOST_LONG_BITS - 1) / HOST_LONG_BITS;",
"for (VAR_2 = 0; VAR_2 < VAR_8; VAR_2++) {",
"if (VAR_1[VA... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
]
] |
715 | static int ppc_hash64_pte_prot(PowerPCCPU *cpu,
ppc_slb_t *slb, ppc_hash_pte64_t pte)
{
CPUPPCState *env = &cpu->env;
unsigned pp, key;
/* Some pp bit combinations have undefined behaviour, so default
* to no access in those cases */
int prot = 0;
key = ... | true | qemu | 07a68f990785a8574c78a36b21cf5165e46f1113 | static int ppc_hash64_pte_prot(PowerPCCPU *cpu,
ppc_slb_t *slb, ppc_hash_pte64_t pte)
{
CPUPPCState *env = &cpu->env;
unsigned pp, key;
int prot = 0;
key = !!(msr_pr ? (slb->vsid & SLB_VSID_KP)
: (slb->vsid & SLB_VSID_KS));
pp = (pte.pte1... | {
"code": [
" if (!(pte.pte1 & HPTE64_R_N) || (pte.pte1 & HPTE64_R_G)",
" || (slb->vsid & SLB_VSID_N)) {",
" prot |= PAGE_EXEC;"
],
"line_no": [
89,
91,
93
]
} | static int FUNC_0(PowerPCCPU *VAR_0,
ppc_slb_t *VAR_1, ppc_hash_pte64_t VAR_2)
{
CPUPPCState *env = &VAR_0->env;
unsigned VAR_3, VAR_4;
int VAR_5 = 0;
VAR_4 = !!(msr_pr ? (VAR_1->vsid & SLB_VSID_KP)
: (VAR_1->vsid & SLB_VSID_KS));
VAR_3 =... | [
"static int FUNC_0(PowerPCCPU *VAR_0,\nppc_slb_t *VAR_1, ppc_hash_pte64_t VAR_2)\n{",
"CPUPPCState *env = &VAR_0->env;",
"unsigned VAR_3, VAR_4;",
"int VAR_5 = 0;",
"VAR_4 = !!(msr_pr ? (VAR_1->vsid & SLB_VSID_KP)\n: (VAR_1->vsid & SLB_VSID_KS));",
"VAR_3 = (VAR_2.pte1 & HPTE64_R_PP) | ((VAR_2.pte1 & HPTE... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
15
],
[
19,
21
],
[
23
],
[
27
],
[
29
],
[
31,
33,
35,
37
],
[
39
],
[
43,
45,
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57,
59,... |
716 | static int rd_frame(CinepakEncContext *s, AVFrame *frame, unsigned char *buf, int buf_size)
{
int num_strips, strip, h, i, y, size, temp_size, best_size;
AVPicture last_pict, pict, scratch_pict;
int64_t best_score = 0, score, score_temp;
//TODO: support encoding zero strips (meaning skip the whol... | true | FFmpeg | 7da9f4523159670d577a2808d4481e64008a8894 | static int rd_frame(CinepakEncContext *s, AVFrame *frame, unsigned char *buf, int buf_size)
{
int num_strips, strip, h, i, y, size, temp_size, best_size;
AVPicture last_pict, pict, scratch_pict;
int64_t best_score = 0, score, score_temp;
for(num_strips = MIN_STRIPS; num_strips <= MAX_STRIPS... | {
"code": [
"static int rd_frame(CinepakEncContext *s, AVFrame *frame, unsigned char *buf, int buf_size)",
" int num_strips, strip, h, i, y, size, temp_size, best_size;",
" for(num_strips = MIN_STRIPS; num_strips <= MAX_STRIPS && num_strips <= s->h / MB_SIZE; num_strips++) {",
" h = s->h ... | static int FUNC_0(CinepakEncContext *VAR_0, AVFrame *VAR_1, unsigned char *VAR_2, int VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;
AVPicture last_pict, pict, scratch_pict;
int64_t best_score = 0, score, score_temp;
for(VAR_4 = MIN_STRIPS; VAR_4 <= MAX_STRIPS && VAR... | [
"static int FUNC_0(CinepakEncContext *VAR_0, AVFrame *VAR_1, unsigned char *VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;",
"AVPicture last_pict, pict, scratch_pict;",
"int64_t best_score = 0, score, score_temp;",
"for(VAR_4 = MIN_STRIPS; VAR_4 <= MAX_STRIPS && VAR_4 ... | [
1,
1,
0,
0,
1,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43,
45
],
[
49
],
[
51
],
[
53
],
[
57
],
[... |
717 | void ff_hevc_set_qPy(HEVCContext *s, int xC, int yC,
int xBase, int yBase, int log2_cb_size)
{
int qp_y = get_qPy_pred(s, xC, yC, xBase, yBase, log2_cb_size);
if (s->HEVClc->tu.cu_qp_delta != 0) {
int off = s->sps->qp_bd_offset;
s->HEVClc->qp_y = ((qp_y + s->HEVClc->... | true | FFmpeg | 4ced5d7780fea2ea49444d6686d26f26b3a2160f | void ff_hevc_set_qPy(HEVCContext *s, int xC, int yC,
int xBase, int yBase, int log2_cb_size)
{
int qp_y = get_qPy_pred(s, xC, yC, xBase, yBase, log2_cb_size);
if (s->HEVClc->tu.cu_qp_delta != 0) {
int off = s->sps->qp_bd_offset;
s->HEVClc->qp_y = ((qp_y + s->HEVClc->... | {
"code": [
" s->HEVClc->qp_y = ((qp_y + s->HEVClc->tu.cu_qp_delta + 52 + 2 * off) %",
" (52 + off)) - off;"
],
"line_no": [
15,
17
]
} | void FUNC_0(HEVCContext *VAR_0, int VAR_1, int VAR_2,
int VAR_3, int VAR_4, int VAR_5)
{
int VAR_6 = get_qPy_pred(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);
if (VAR_0->HEVClc->tu.cu_qp_delta != 0) {
int VAR_7 = VAR_0->sps->qp_bd_offset;
VAR_0->HEVClc->VAR_6 = ((VAR_6... | [
"void FUNC_0(HEVCContext *VAR_0, int VAR_1, int VAR_2,\nint VAR_3, int VAR_4, int VAR_5)\n{",
"int VAR_6 = get_qPy_pred(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);",
"if (VAR_0->HEVClc->tu.cu_qp_delta != 0) {",
"int VAR_7 = VAR_0->sps->qp_bd_offset;",
"VAR_0->HEVClc->VAR_6 = ((VAR_6 + VAR_0->HEVClc->tu.cu_qp... | [
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
]
] |
718 | static void sdhci_sysbus_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->vmsd = &sdhci_vmstate;
dc->props = sdhci_sysbus_properties;
dc->realize = sdhci_sysbus_realize;
dc->reset = sdhci_poweron_reset;
} | true | qemu | e4f4fb1eca795e36f363b4647724221e774523c1 | static void sdhci_sysbus_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->vmsd = &sdhci_vmstate;
dc->props = sdhci_sysbus_properties;
dc->realize = sdhci_sysbus_realize;
dc->reset = sdhci_poweron_reset;
} | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
dc->vmsd = &sdhci_vmstate;
dc->props = sdhci_sysbus_properties;
dc->realize = sdhci_sysbus_realize;
dc->reset = sdhci_poweron_reset;
} | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"dc->vmsd = &sdhci_vmstate;",
"dc->props = sdhci_sysbus_properties;",
"dc->realize = sdhci_sysbus_realize;",
"dc->reset = sdhci_poweron_reset;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
22
]
] |
719 | grlib_gptimer_writel(void *opaque, target_phys_addr_t addr, uint32_t value)
{
GPTimerUnit *unit = opaque;
target_phys_addr_t timer_addr;
int id;
addr &= 0xff;
/* Unit registers */
switch (addr) {
case SCALER_OFFSET:
value &= 0xFFFF; /* clean up th... | true | qemu | b4548fcc0314f5e118ed45b5774e9cd99f9a97d3 | grlib_gptimer_writel(void *opaque, target_phys_addr_t addr, uint32_t value)
{
GPTimerUnit *unit = opaque;
target_phys_addr_t timer_addr;
int id;
addr &= 0xff;
switch (addr) {
case SCALER_OFFSET:
value &= 0xFFFF;
unit->scaler = value;
... | {
"code": [
" trace_grlib_gptimer_writel(-1, \"scaler:\", unit->scaler);",
" trace_grlib_gptimer_writel(-1, \"reload:\", unit->reload);",
" trace_grlib_gptimer_writel(-1, \"config (Read Only):\", 0);",
" trace_grlib_gptimer_writel(id, \"counter:\", value);",
" ... | FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2)
{
GPTimerUnit *unit = VAR_0;
target_phys_addr_t timer_addr;
int VAR_3;
VAR_1 &= 0xff;
switch (VAR_1) {
case SCALER_OFFSET:
VAR_2 &= 0xFFFF;
unit->scaler = VAR_2;
tra... | [
"FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2)\n{",
"GPTimerUnit *unit = VAR_0;",
"target_phys_addr_t timer_addr;",
"int VAR_3;",
"VAR_1 &= 0xff;",
"switch (VAR_1) {",
"case SCALER_OFFSET:\nVAR_2 &= 0xFFFF;",
"unit->scaler = VAR_2;",
"trace_grlib_gptimer_write... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
1,
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,
23
],
[
25
],
[
27
],
[
29
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47,
51
],
[
53
],
[
57,
59
... |
720 | static void check_watchpoint(int offset, int len, MemTxAttrs attrs, int flags)
{
CPUState *cpu = current_cpu;
CPUClass *cc = CPU_GET_CLASS(cpu);
CPUArchState *env = cpu->env_ptr;
target_ulong pc, cs_base;
target_ulong vaddr;
CPUWatchpoint *wp;
uint32_t cpu_flags;
if (cpu->watc... | true | qemu | 8d04fb55dec381bc5105cb47f29d918e579e8cbd | static void check_watchpoint(int offset, int len, MemTxAttrs attrs, int flags)
{
CPUState *cpu = current_cpu;
CPUClass *cc = CPU_GET_CLASS(cpu);
CPUArchState *env = cpu->env_ptr;
target_ulong pc, cs_base;
target_ulong vaddr;
CPUWatchpoint *wp;
uint32_t cpu_flags;
if (cpu->watc... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0, int VAR_1, MemTxAttrs VAR_2, int VAR_3)
{
CPUState *cpu = current_cpu;
CPUClass *cc = CPU_GET_CLASS(cpu);
CPUArchState *env = cpu->env_ptr;
target_ulong pc, cs_base;
target_ulong vaddr;
CPUWatchpoint *wp;
uint32_t cpu_flags;
if (cpu->watchpoint_hi... | [
"static void FUNC_0(int VAR_0, int VAR_1, MemTxAttrs VAR_2, int VAR_3)\n{",
"CPUState *cpu = current_cpu;",
"CPUClass *cc = CPU_GET_CLASS(cpu);",
"CPUArchState *env = cpu->env_ptr;",
"target_ulong pc, cs_base;",
"target_ulong vaddr;",
"CPUWatchpoint *wp;",
"uint32_t cpu_flags;",
"if (cpu->watchpoint... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[... |
721 | DISAS_INSN(shift_im)
{
TCGv reg;
int tmp;
TCGv shift;
set_cc_op(s, CC_OP_FLAGS);
reg = DREG(insn, 0);
tmp = (insn >> 9) & 7;
if (tmp == 0)
tmp = 8;
shift = tcg_const_i32(tmp);
/* No need to flush flags becuse we know we will set C flag. */
if (insn & 0x10... | true | qemu | 367790cce8e14131426f5190dfd7d1bdbf656e4d | DISAS_INSN(shift_im)
{
TCGv reg;
int tmp;
TCGv shift;
set_cc_op(s, CC_OP_FLAGS);
reg = DREG(insn, 0);
tmp = (insn >> 9) & 7;
if (tmp == 0)
tmp = 8;
shift = tcg_const_i32(tmp);
if (insn & 0x100) {
gen_helper_shl_cc(reg, cpu_env, reg, shift);
... | {
"code": [
"DISAS_INSN(shift_im)",
" TCGv reg;",
" int tmp;",
" TCGv shift;",
" reg = DREG(insn, 0);",
" tmp = (insn >> 9) & 7;",
" if (tmp == 0)",
" tmp = 8;",
" shift = tcg_const_i32(tmp);",
" if (insn & 0x100) {",
" gen_helper_shl_c... | FUNC_0(VAR_0)
{
TCGv reg;
int VAR_1;
TCGv shift;
set_cc_op(s, CC_OP_FLAGS);
reg = DREG(insn, 0);
VAR_1 = (insn >> 9) & 7;
if (VAR_1 == 0)
VAR_1 = 8;
shift = tcg_const_i32(VAR_1);
if (insn & 0x100) {
gen_helper_shl_cc(reg, cpu_env, reg, shift);
... | [
"FUNC_0(VAR_0)\n{",
"TCGv reg;",
"int VAR_1;",
"TCGv shift;",
"set_cc_op(s, CC_OP_FLAGS);",
"reg = DREG(insn, 0);",
"VAR_1 = (insn >> 9) & 7;",
"if (VAR_1 == 0)\nVAR_1 = 8;",
"shift = tcg_const_i32(VAR_1);",
"if (insn & 0x100) {",
"gen_helper_shl_cc(reg, cpu_env, reg, shift);",
"} else {",
"... | [
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
0,
1,
1,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
]
] |
722 | static target_ulong h_protect(PowerPCCPU *cpu, sPAPRMachineState *spapr,
target_ulong opcode, target_ulong *args)
{
CPUPPCState *env = &cpu->env;
target_ulong flags = args[0];
target_ulong pte_index = args[1];
target_ulong avpn = args[2];
uint64_t token;
tar... | true | qemu | 61a36c9b5a12889994e6c45f4a175efcd63936db | static target_ulong h_protect(PowerPCCPU *cpu, sPAPRMachineState *spapr,
target_ulong opcode, target_ulong *args)
{
CPUPPCState *env = &cpu->env;
target_ulong flags = args[0];
target_ulong pte_index = args[1];
target_ulong avpn = args[2];
uint64_t token;
tar... | {
"code": [
" target_ulong v, r, rb;",
" ppc_tlb_invalidate_one(env, rb);",
" target_ulong v, r, rb;",
" rb = compute_tlbie_rb(v, r, pte_index);",
" ppc_tlb_invalidate_one(env, rb);"
],
"line_no": [
17,
65,
17,
59,
65
]
} | static target_ulong FUNC_0(PowerPCCPU *cpu, sPAPRMachineState *spapr,
target_ulong opcode, target_ulong *args)
{
CPUPPCState *env = &cpu->env;
target_ulong flags = args[0];
target_ulong pte_index = args[1];
target_ulong avpn = args[2];
uint64_t token;
target... | [
"static target_ulong FUNC_0(PowerPCCPU *cpu, sPAPRMachineState *spapr,\ntarget_ulong opcode, target_ulong *args)\n{",
"CPUPPCState *env = &cpu->env;",
"target_ulong flags = args[0];",
"target_ulong pte_index = args[1];",
"target_ulong avpn = args[2];",
"uint64_t token;",
"target_ulong v, r, rb;",
"if ... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39,
41
],
[
43
],
[
45
],
[
49,
51
],
[... |
723 | static int kvm_get_msrs(X86CPU *cpu)
{
CPUX86State *env = &cpu->env;
struct kvm_msr_entry *msrs = cpu->kvm_msr_buf->entries;
int ret, i;
uint64_t mtrr_top_bits;
kvm_msr_buf_reset(cpu);
kvm_msr_entry_add(cpu, MSR_IA32_SYSENTER_CS, 0);
kvm_msr_entry_add(cpu, MSR_IA32_SYSENTER_ESP, ... | true | qemu | 0b368a10c71af96f6cf93b0ba5c2ee3bdbd50e96 | static int kvm_get_msrs(X86CPU *cpu)
{
CPUX86State *env = &cpu->env;
struct kvm_msr_entry *msrs = cpu->kvm_msr_buf->entries;
int ret, i;
uint64_t mtrr_top_bits;
kvm_msr_buf_reset(cpu);
kvm_msr_entry_add(cpu, MSR_IA32_SYSENTER_CS, 0);
kvm_msr_entry_add(cpu, MSR_IA32_SYSENTER_ESP, ... | {
"code": [
" if (has_msr_architectural_pmu) {",
" kvm_msr_entry_add(cpu, MSR_CORE_PERF_FIXED_CTR_CTRL, 0);",
" kvm_msr_entry_add(cpu, MSR_CORE_PERF_GLOBAL_CTRL, 0);",
" kvm_msr_entry_add(cpu, MSR_CORE_PERF_GLOBAL_STATUS, 0);",
" kvm_msr_entry_add(cpu, MSR_CORE_PERF_... | static int FUNC_0(X86CPU *VAR_0)
{
CPUX86State *env = &VAR_0->env;
struct kvm_msr_entry *VAR_1 = VAR_0->kvm_msr_buf->entries;
int VAR_2, VAR_3;
uint64_t mtrr_top_bits;
kvm_msr_buf_reset(VAR_0);
kvm_msr_entry_add(VAR_0, MSR_IA32_SYSENTER_CS, 0);
kvm_msr_entry_add(VAR_0, MSR_IA32_S... | [
"static int FUNC_0(X86CPU *VAR_0)\n{",
"CPUX86State *env = &VAR_0->env;",
"struct kvm_msr_entry *VAR_1 = VAR_0->kvm_msr_buf->entries;",
"int VAR_2, VAR_3;",
"uint64_t mtrr_top_bits;",
"kvm_msr_buf_reset(VAR_0);",
"kvm_msr_entry_add(VAR_0, MSR_IA32_SYSENTER_CS, 0);",
"kvm_msr_entry_add(VAR_0, MSR_IA32_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
724 | static void blk_mig_unlock(void)
{
qemu_mutex_unlock(&block_mig_state.lock);
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static void blk_mig_unlock(void)
{
qemu_mutex_unlock(&block_mig_state.lock);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
qemu_mutex_unlock(&block_mig_state.lock);
}
| [
"static void FUNC_0(void)\n{",
"qemu_mutex_unlock(&block_mig_state.lock);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
725 | static void do_tb_flush(CPUState *cpu, void *data)
{
unsigned tb_flush_req = (unsigned) (uintptr_t) data;
tb_lock();
/* If it's already been done on request of another CPU,
* just retry.
*/
if (tcg_ctx.tb_ctx.tb_flush_count != tb_flush_req) {
goto done;
}
#if define... | true | qemu | 955939a2b51f72bea1c200b559ea39985df5a633 | static void do_tb_flush(CPUState *cpu, void *data)
{
unsigned tb_flush_req = (unsigned) (uintptr_t) data;
tb_lock();
if (tcg_ctx.tb_ctx.tb_flush_count != tb_flush_req) {
goto done;
}
#if defined(DEBUG_FLUSH)
printf("qemu: flush code_size=%ld nb_tbs=%d avg_tb_size=%ld\... | {
"code": [
"#if defined(DEBUG_FLUSH)"
],
"line_no": [
27
]
} | static void FUNC_0(CPUState *VAR_0, void *VAR_1)
{
unsigned VAR_2 = (unsigned) (uintptr_t) VAR_1;
tb_lock();
if (tcg_ctx.tb_ctx.tb_flush_count != VAR_2) {
goto done;
}
#if defined(DEBUG_FLUSH)
printf("qemu: flush code_size=%ld nb_tbs=%d avg_tb_size=%ld\n",
... | [
"static void FUNC_0(CPUState *VAR_0, void *VAR_1)\n{",
"unsigned VAR_2 = (unsigned) (uintptr_t) VAR_1;",
"tb_lock();",
"if (tcg_ctx.tb_ctx.tb_flush_count != VAR_2) {",
"goto done;",
"}",
"#if defined(DEBUG_FLUSH)\nprintf(\"qemu: flush code_size=%ld nb_tbs=%d avg_tb_size=%ld\\n\",\n(unsigned long)(tcg_ct... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
19
],
[
21
],
[
23
],
[
27,
29,
31,
33,
35,
37
],
[
39,
41,
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
57
],
[
59
],
[
61
],
[
63
],
... |
726 | static int decode_gusa(DisasContext *ctx, CPUSH4State *env, int *pmax_insns)
{
uint16_t insns[5];
int ld_adr, ld_dst, ld_mop;
int op_dst, op_src, op_opc;
int mv_src, mt_dst, st_src, st_mop;
TCGv op_arg;
uint32_t pc = ctx->pc;
uint32_t pc_end = ctx->tb->cs_base;
int backup = se... | true | qemu | 6d56fc6cc372284a4571f09b361a9ccd99318103 | static int decode_gusa(DisasContext *ctx, CPUSH4State *env, int *pmax_insns)
{
uint16_t insns[5];
int ld_adr, ld_dst, ld_mop;
int op_dst, op_src, op_opc;
int mv_src, mt_dst, st_src, st_mop;
TCGv op_arg;
uint32_t pc = ctx->pc;
uint32_t pc_end = ctx->tb->cs_base;
int backup = se... | {
"code": [
" if (op_src < 0) {"
],
"line_no": [
667
]
} | static int FUNC_0(DisasContext *VAR_0, CPUSH4State *VAR_1, int *VAR_2)
{
uint16_t insns[5];
int VAR_3, VAR_4, VAR_5;
int VAR_6, VAR_7, VAR_8;
int VAR_9, VAR_10, VAR_11, VAR_12;
TCGv op_arg;
uint32_t pc = VAR_0->pc;
uint32_t pc_end = VAR_0->tb->cs_base;
int VAR_13 = sextract32(... | [
"static int FUNC_0(DisasContext *VAR_0, CPUSH4State *VAR_1, int *VAR_2)\n{",
"uint16_t insns[5];",
"int VAR_3, VAR_4, VAR_5;",
"int VAR_6, VAR_7, VAR_8;",
"int VAR_9, VAR_10, VAR_11, VAR_12;",
"TCGv op_arg;",
"uint32_t pc = VAR_0->pc;",
"uint32_t pc_end = VAR_0->tb->cs_base;",
"int VAR_13 = sextract... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
35
],
[
37
],
[
39
],
[
43
],
[
51
],
[
53
],
[
55
],
[
63
... |
727 | static int yop_read_header(AVFormatContext *s)
{
YopDecContext *yop = s->priv_data;
AVIOContext *pb = s->pb;
AVCodecContext *audio_dec, *video_dec;
AVStream *audio_stream, *video_stream;
int frame_rate, ret;
audio_stream = avformat_new_stream(s, NULL);
video_stream = avformat_... | true | FFmpeg | 3d179edf6d2a987e7eb134eea541954338a19add | static int yop_read_header(AVFormatContext *s)
{
YopDecContext *yop = s->priv_data;
AVIOContext *pb = s->pb;
AVCodecContext *audio_dec, *video_dec;
AVStream *audio_stream, *video_stream;
int frame_rate, ret;
audio_stream = avformat_new_stream(s, NULL);
video_stream = avformat_... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
YopDecContext *yop = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
AVCodecContext *audio_dec, *video_dec;
AVStream *audio_stream, *video_stream;
int VAR_1, VAR_2;
audio_stream = avformat_new_stream(VAR_0, NULL);
video_stream = avfor... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"YopDecContext *yop = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"AVCodecContext *audio_dec, *video_dec;",
"AVStream *audio_stream, *video_stream;",
"int VAR_1, VAR_2;",
"audio_stream = avformat_new_stream(VAR_0, NULL);",
"video_stream = avform... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
23
],
[
31
],
[
35,
37
],
[
41,
48
],
[
50
],
[
52
],
[
54
],
[
56
],
[
62
],
[
64
],
[
66
],
[
70... |
728 | int64_t bdrv_get_block_status_above(BlockDriverState *bs,
BlockDriverState *base,
int64_t sector_num,
int nb_sectors, int *pnum,
BlockDriverState **file)
{
Coroutine ... | true | qemu | 0b8b8753e4d94901627b3e86431230f2319215c4 | int64_t bdrv_get_block_status_above(BlockDriverState *bs,
BlockDriverState *base,
int64_t sector_num,
int nb_sectors, int *pnum,
BlockDriverState **file)
{
Coroutine ... | {
"code": [
" co = qemu_coroutine_create(bdrv_get_block_status_above_co_entry);",
" qemu_coroutine_enter(co, &data);",
" qemu_coroutine_enter(co, &data);",
" qemu_coroutine_enter(co, &data);",
" qemu_coroutine_enter(co, &data);"
],
"line_no": [
47,
49... | int64_t FUNC_0(BlockDriverState *bs,
BlockDriverState *base,
int64_t sector_num,
int nb_sectors, int *pnum,
BlockDriverState **file)
{
Coroutine *co;
BdrvCoGetBl... | [
"int64_t FUNC_0(BlockDriverState *bs,\nBlockDriverState *base,\nint64_t sector_num,\nint nb_sectors, int *pnum,\nBlockDriverState **file)\n{",
"Coroutine *co;",
"BdrvCoGetBlockStatusData data = {",
".bs = bs,\n.base = base,\n.file = file,\n.sector_num = sector_num,\n.nb_sectors = nb_sectors,\n.pnum = pnum,\n.... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17,
19,
21,
23,
25,
27,
29,
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[... |
730 | static int add_string_metadata(int count, const char *name,
TiffContext *s)
{
char *value;
if (bytestream2_get_bytes_left(&s->gb) < count || count < 0)
return AVERROR_INVALIDDATA;
value = av_malloc(count + 1);
if (!value)
return AVERROR(ENOMEM);... | true | FFmpeg | edcc51fb8e15b704955d742559215697598927bb | static int add_string_metadata(int count, const char *name,
TiffContext *s)
{
char *value;
if (bytestream2_get_bytes_left(&s->gb) < count || count < 0)
return AVERROR_INVALIDDATA;
value = av_malloc(count + 1);
if (!value)
return AVERROR(ENOMEM);... | {
"code": [
" TiffContext *s)",
" av_dict_set(avpriv_frame_get_metadatap(&s->picture), name, value, AV_DICT_DONT_STRDUP_VAL);"
],
"line_no": [
3,
31
]
} | static int FUNC_0(int VAR_0, const char *VAR_1,
TiffContext *VAR_2)
{
char *VAR_3;
if (bytestream2_get_bytes_left(&VAR_2->gb) < VAR_0 || VAR_0 < 0)
return AVERROR_INVALIDDATA;
VAR_3 = av_malloc(VAR_0 + 1);
if (!VAR_3)
return AVERROR(ENOMEM);
... | [
"static int FUNC_0(int VAR_0, const char *VAR_1,\nTiffContext *VAR_2)\n{",
"char *VAR_3;",
"if (bytestream2_get_bytes_left(&VAR_2->gb) < VAR_0 || VAR_0 < 0)\nreturn AVERROR_INVALIDDATA;",
"VAR_3 = av_malloc(VAR_0 + 1);",
"if (!VAR_3)\nreturn AVERROR(ENOMEM);",
"bytestream2_get_bufferu(&VAR_2->gb, VAR_3, V... | [
1,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11,
13
],
[
17
],
[
19,
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
]
] |
731 | static void pc_q35_init_1_6(QEMUMachineInitArgs *args)
{
has_pci_info = false;
pc_q35_init(args);
} | true | qemu | 04920fc0faa4760f9c4fc0e73b992b768099be70 | static void pc_q35_init_1_6(QEMUMachineInitArgs *args)
{
has_pci_info = false;
pc_q35_init(args);
} | {
"code": [],
"line_no": []
} | static void FUNC_0(QEMUMachineInitArgs *VAR_0)
{
has_pci_info = false;
pc_q35_init(VAR_0);
} | [
"static void FUNC_0(QEMUMachineInitArgs *VAR_0)\n{",
"has_pci_info = false;",
"pc_q35_init(VAR_0);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
8
],
[
10
]
] |
732 | static void dvbsub_parse_clut_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
DVBSubContext *ctx = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
int i, clut_id;
DVBSubCLUT *clut;
int entry_id, depth , full_range;
i... | false | FFmpeg | 607ad990d31e6be52980970e5ce8cd25ab3de812 | static void dvbsub_parse_clut_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
DVBSubContext *ctx = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
int i, clut_id;
DVBSubCLUT *clut;
int entry_id, depth , full_range;
i... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVCodecContext *VAR_0,
const uint8_t *VAR_1, int VAR_2)
{
DVBSubContext *ctx = VAR_0->priv_data;
const uint8_t *VAR_3 = VAR_1 + VAR_2;
int VAR_4, VAR_5;
DVBSubCLUT *clut;
int VAR_6, VAR_7 , VAR_8;
int VAR_9, VAR_10, VAR_11, VAR... | [
"static void FUNC_0(AVCodecContext *VAR_0,\nconst uint8_t *VAR_1, int VAR_2)\n{",
"DVBSubContext *ctx = VAR_0->priv_data;",
"const uint8_t *VAR_3 = VAR_1 + VAR_2;",
"int VAR_4, VAR_5;",
"DVBSubCLUT *clut;",
"int VAR_6, VAR_7 , VAR_8;",
"int VAR_9, VAR_10, VAR_11, VAR_12;",
"int VAR_13, VAR_14, VAR_15,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
41,
43
],
[
47
],
[
49
],
[
53
],
[
57
],
... |
733 | static void intra_predict_mad_cow_dc_l0t_8x8_msa(uint8_t *src, int32_t stride)
{
uint8_t lp_cnt;
uint32_t src0, src1, src2 = 0;
uint32_t out0, out1, out2;
v16u8 src_top;
v8u16 add;
v4u32 sum;
src_top = LD_UB(src - stride);
add = __msa_hadd_u_h(src_top, src_top);
sum = __m... | false | FFmpeg | d6737539e77e78fca9a04914d51996cfd1ccc55c | static void intra_predict_mad_cow_dc_l0t_8x8_msa(uint8_t *src, int32_t stride)
{
uint8_t lp_cnt;
uint32_t src0, src1, src2 = 0;
uint32_t out0, out1, out2;
v16u8 src_top;
v8u16 add;
v4u32 sum;
src_top = LD_UB(src - stride);
add = __msa_hadd_u_h(src_top, src_top);
sum = __m... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, int32_t VAR_1)
{
uint8_t lp_cnt;
uint32_t src0, src1, src2 = 0;
uint32_t out0, out1, out2;
v16u8 src_top;
v8u16 add;
v4u32 sum;
src_top = LD_UB(VAR_0 - VAR_1);
add = __msa_hadd_u_h(src_top, src_top);
sum = __msa_hadd_u_w(add, add);
... | [
"static void FUNC_0(uint8_t *VAR_0, int32_t VAR_1)\n{",
"uint8_t lp_cnt;",
"uint32_t src0, src1, src2 = 0;",
"uint32_t out0, out1, out2;",
"v16u8 src_top;",
"v8u16 add;",
"v4u32 sum;",
"src_top = LD_UB(VAR_0 - VAR_1);",
"add = __msa_hadd_u_h(src_top, src_top);",
"sum = __msa_hadd_u_w(add, add);",
... | [
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
735 | static int write_streamheader(AVFormatContext *avctx, AVIOContext *bc, AVStream *st, int i){
NUTContext *nut = avctx->priv_data;
AVCodecContext *codec = st->codec;
unsigned codec_tag = av_codec_get_tag(ff_nut_codec_tags, codec->codec_id);
ff_put_v(bc, i);
switch(codec->codec_type){
case ... | false | FFmpeg | 21de6ba5c12fbdd2ad86e5faf8aa12be8f5f6408 | static int write_streamheader(AVFormatContext *avctx, AVIOContext *bc, AVStream *st, int i){
NUTContext *nut = avctx->priv_data;
AVCodecContext *codec = st->codec;
unsigned codec_tag = av_codec_get_tag(ff_nut_codec_tags, codec->codec_id);
ff_put_v(bc, i);
switch(codec->codec_type){
case ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVIOContext *VAR_1, AVStream *VAR_2, int VAR_3){
NUTContext *nut = VAR_0->priv_data;
AVCodecContext *codec = VAR_2->codec;
unsigned VAR_4 = av_codec_get_tag(ff_nut_codec_tags, codec->codec_id);
ff_put_v(VAR_1, VAR_3);
switch(codec->codec_type){
c... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVIOContext *VAR_1, AVStream *VAR_2, int VAR_3){",
"NUTContext *nut = VAR_0->priv_data;",
"AVCodecContext *codec = VAR_2->codec;",
"unsigned VAR_4 = av_codec_get_tag(ff_nut_codec_tags, codec->codec_id);",
"ff_put_v(VAR_1, VAR_3);",
"switch(codec->codec_type){",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49... |
736 | SYNTH_FILTER_FUNC(sse2)
SYNTH_FILTER_FUNC(avx)
SYNTH_FILTER_FUNC(fma3)
#endif /* HAVE_YASM */
av_cold void ff_synth_filter_init_x86(SynthFilterContext *s)
{
#if HAVE_YASM
int cpu_flags = av_get_cpu_flags();
#if ARCH_X86_32
if (EXTERNAL_SSE(cpu_flags)) {
s->synth_filter_float = synth_filter... | false | FFmpeg | d68c05380cebf563915412182643a8be04ef890b | SYNTH_FILTER_FUNC(sse2)
SYNTH_FILTER_FUNC(avx)
SYNTH_FILTER_FUNC(fma3)
#endif
av_cold void ff_synth_filter_init_x86(SynthFilterContext *s)
{
#if HAVE_YASM
int cpu_flags = av_get_cpu_flags();
#if ARCH_X86_32
if (EXTERNAL_SSE(cpu_flags)) {
s->synth_filter_float = synth_filter_sse;
}
#... | {
"code": [],
"line_no": []
} | SYNTH_FILTER_FUNC(sse2)
SYNTH_FILTER_FUNC(avx)
SYNTH_FILTER_FUNC(fma3)
#endif
av_cold void ff_synth_filter_init_x86(SynthFilterContext *s)
{
#if HAVE_YASM
int cpu_flags = av_get_cpu_flags();
#if ARCH_X86_32
if (EXTERNAL_SSE(cpu_flags)) {
s->synth_filter_float = synth_filter_sse;
}
#... | [
"SYNTH_FILTER_FUNC(sse2)\nSYNTH_FILTER_FUNC(avx)\nSYNTH_FILTER_FUNC(fma3)\n#endif\nav_cold void ff_synth_filter_init_x86(SynthFilterContext *s)\n{",
"#if HAVE_YASM\nint cpu_flags = av_get_cpu_flags();",
"#if ARCH_X86_32\nif (EXTERNAL_SSE(cpu_flags)) {",
"s->synth_filter_float = synth_filter_sse;",
"}",
"#... | [
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
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49,
51
]
] |
737 | static BlockDriverAIOCB *iscsi_aio_ioctl(BlockDriverState *bs,
unsigned long int req, void *buf,
BlockDriverCompletionFunc *cb, void *opaque)
{
IscsiLun *iscsilun = bs->opaque;
struct iscsi_context *iscsi = iscsilun->iscsi;
struct iscsi_data data;
IscsiAIOCB *acb;
assert(re... | true | qemu | e49ab19fcaa617ad6cdfe1ac401327326b6a2552 | static BlockDriverAIOCB *iscsi_aio_ioctl(BlockDriverState *bs,
unsigned long int req, void *buf,
BlockDriverCompletionFunc *cb, void *opaque)
{
IscsiLun *iscsilun = bs->opaque;
struct iscsi_context *iscsi = iscsilun->iscsi;
struct iscsi_data data;
IscsiAIOCB *acb;
assert(re... | {
"code": [
"#endif",
"#if defined(LIBISCSI_FEATURE_IOVECTOR)",
"#endif",
"#if defined(LIBISCSI_FEATURE_IOVECTOR)",
"#endif",
"#if defined(LIBISCSI_FEATURE_IOVECTOR)",
"#endif",
"#endif",
"#if defined(LIBISCSI_FEATURE_IOVECTOR)",
"#else",
"#endif",
"#if defined(LIBISCSI... | static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs,
unsigned long int req, void *buf,
BlockDriverCompletionFunc *cb, void *opaque)
{
IscsiLun *iscsilun = bs->opaque;
struct iscsi_context *VAR_0 = iscsilun->VAR_0;
struct iscsi_data VAR_1;
IscsiAIOCB *acb;
assert(req == SG_... | [
"static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs,\nunsigned long int req, void *buf,\nBlockDriverCompletionFunc *cb, void *opaque)\n{",
"IscsiLun *iscsilun = bs->opaque;",
"struct iscsi_context *VAR_0 = iscsilun->VAR_0;",
"struct iscsi_data VAR_1;",
"IscsiAIOCB *acb;",
"assert(req == SG_IO);",
"acb... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[... |
738 | static void esp_pci_dma_memory_rw(PCIESPState *pci, uint8_t *buf, int len,
DMADirection dir)
{
dma_addr_t addr;
DMADirection expected_dir;
if (pci->dma_regs[DMA_CMD] & DMA_CMD_DIR) {
expected_dir = DMA_DIRECTION_FROM_DEVICE;
} else {
expected_d... | true | qemu | c3543fb5fe4520f03dd4fef04fab7745eeca1c96 | static void esp_pci_dma_memory_rw(PCIESPState *pci, uint8_t *buf, int len,
DMADirection dir)
{
dma_addr_t addr;
DMADirection expected_dir;
if (pci->dma_regs[DMA_CMD] & DMA_CMD_DIR) {
expected_dir = DMA_DIRECTION_FROM_DEVICE;
} else {
expected_d... | {
"code": [],
"line_no": []
} | static void FUNC_0(PCIESPState *VAR_0, uint8_t *VAR_1, int VAR_2,
DMADirection VAR_3)
{
dma_addr_t addr;
DMADirection expected_dir;
if (VAR_0->dma_regs[DMA_CMD] & DMA_CMD_DIR) {
expected_dir = DMA_DIRECTION_FROM_DEVICE;
} else {
expected_dir = ... | [
"static void FUNC_0(PCIESPState *VAR_0, uint8_t *VAR_1, int VAR_2,\nDMADirection VAR_3)\n{",
"dma_addr_t addr;",
"DMADirection expected_dir;",
"if (VAR_0->dma_regs[DMA_CMD] & DMA_CMD_DIR) {",
"expected_dir = DMA_DIRECTION_FROM_DEVICE;",
"} else {",
"expected_dir = DMA_DIRECTION_TO_DEVICE;",
"}",
"if... | [
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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
739 | void qemu_fflush(QEMUFile *f)
{
ssize_t ret = 0;
if (!qemu_file_is_writable(f)) {
return;
}
if (f->ops->writev_buffer) {
if (f->iovcnt > 0) {
ret = f->ops->writev_buffer(f->opaque, f->iov, f->iovcnt, f->pos);
}
} else {
if (f->buf_index > 0)... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | void qemu_fflush(QEMUFile *f)
{
ssize_t ret = 0;
if (!qemu_file_is_writable(f)) {
return;
}
if (f->ops->writev_buffer) {
if (f->iovcnt > 0) {
ret = f->ops->writev_buffer(f->opaque, f->iov, f->iovcnt, f->pos);
}
} else {
if (f->buf_index > 0)... | {
"code": [],
"line_no": []
} | void FUNC_0(QEMUFile *VAR_0)
{
ssize_t ret = 0;
if (!qemu_file_is_writable(VAR_0)) {
return;
}
if (VAR_0->ops->writev_buffer) {
if (VAR_0->iovcnt > 0) {
ret = VAR_0->ops->writev_buffer(VAR_0->opaque, VAR_0->iov, VAR_0->iovcnt, VAR_0->pos);
}
} else {... | [
"void FUNC_0(QEMUFile *VAR_0)\n{",
"ssize_t ret = 0;",
"if (!qemu_file_is_writable(VAR_0)) {",
"return;",
"}",
"if (VAR_0->ops->writev_buffer) {",
"if (VAR_0->iovcnt > 0) {",
"ret = VAR_0->ops->writev_buffer(VAR_0->opaque, VAR_0->iov, VAR_0->iovcnt, VAR_0->pos);",
"}",
"} else {",
"if (VAR_0->bu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.