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 |
|---|---|---|---|---|---|---|---|---|---|---|
13,954 | void parse_options(int argc, char **argv, const OptionDef *options,
void (* parse_arg_function)(const char*))
{
const char *opt, *arg;
int optindex, handleoptions=1;
const OptionDef *po;
/* parse options */
optindex = 1;
while (optindex < argc) {
opt = argv[... | false | FFmpeg | 9e5381a21b2106a012b92c1878886c5af4e1a932 | void parse_options(int argc, char **argv, const OptionDef *options,
void (* parse_arg_function)(const char*))
{
const char *opt, *arg;
int optindex, handleoptions=1;
const OptionDef *po;
optindex = 1;
while (optindex < argc) {
opt = argv[optindex++];
... | {
"code": [],
"line_no": []
} | VAR_4voidVAR_4 VAR_4parse_optionsVAR_4(VAR_4intVAR_4 VAR_4VAR_0VAR_4, VAR_4charVAR_4 **VAR_4VAR_1VAR_4, VAR_4constVAR_4 VAR_4OptionDefVAR_4 *VAR_4VAR_2VAR_4,
VAR_4voidVAR_4 (* VAR_4VAR_3VAR_4)(VAR_4constVAR_4 VAR_4charVAR_4*))
{
VAR_4constVAR_4 VAR_4charVAR_4 *VAR_4optVAR_4, *VAR_4argVAR_4;
... | [
"VAR_4voidVAR_4 VAR_4parse_optionsVAR_4(VAR_4intVAR_4 VAR_4VAR_0VAR_4, VAR_4charVAR_4 **VAR_4VAR_1VAR_4, VAR_4constVAR_4 VAR_4OptionDefVAR_4 *VAR_4VAR_2VAR_4,\nVAR_4voidVAR_4 (* VAR_4VAR_3VAR_4)(VAR_4constVAR_4 VAR_4charVAR_4*))\n{",
"VAR_4constVAR_4 VAR_4charVAR_4 *VAR_4optVAR_4, *VAR_4argVAR_4;",
"VAR_4intVAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47,
49
],
[
51
... |
13,955 | static int dma_buf_rw(BMDMAState *bm, int is_write)
{
IDEState *s = bmdma_active_if(bm);
struct {
uint32_t addr;
uint32_t size;
} prd;
int l, len;
for(;;) {
l = s->io_buffer_size - s->io_buffer_index;
if (l <= 0)
break;
if (bm->cur_pr... | false | qemu | f7736b91c40a617e93505e32dcbd2cb56aad8a23 | static int dma_buf_rw(BMDMAState *bm, int is_write)
{
IDEState *s = bmdma_active_if(bm);
struct {
uint32_t addr;
uint32_t size;
} prd;
int l, len;
for(;;) {
l = s->io_buffer_size - s->io_buffer_index;
if (l <= 0)
break;
if (bm->cur_pr... | {
"code": [],
"line_no": []
} | static int FUNC_0(BMDMAState *VAR_0, int VAR_1)
{
IDEState *s = bmdma_active_if(VAR_0);
struct {
uint32_t addr;
uint32_t size;
} VAR_2;
int VAR_3, VAR_4;
for(;;) {
VAR_3 = s->io_buffer_size - s->io_buffer_index;
if (VAR_3 <= 0)
break;
... | [
"static int FUNC_0(BMDMAState *VAR_0, int VAR_1)\n{",
"IDEState *s = bmdma_active_if(VAR_0);",
"struct {",
"uint32_t addr;",
"uint32_t size;",
"} VAR_2;",
"int VAR_3, VAR_4;",
"for(;;) {",
"VAR_3 = s->io_buffer_size - s->io_buffer_index;",
"if (VAR_3 <= 0)\nbreak;",
"if (VAR_0->cur_prd_len == 0)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
47,
49
... |
13,956 | static void eepro100_cu_command(EEPRO100State * s, uint8_t val)
{
eepro100_tx_t tx;
uint32_t cb_address;
switch (val) {
case CU_NOP:
/* No operation. */
break;
case CU_START:
if (get_cu_state(s) != cu_idle) {
/* Intel documentation says that CU must be i... | false | qemu | 5fa9a0ae49a01536a403f38e39222c3e8cc964c5 | static void eepro100_cu_command(EEPRO100State * s, uint8_t val)
{
eepro100_tx_t tx;
uint32_t cb_address;
switch (val) {
case CU_NOP:
break;
case CU_START:
if (get_cu_state(s) != cu_idle) {
logout("CU state is %u, should be %u\n", get_c... | {
"code": [],
"line_no": []
} | static void FUNC_0(EEPRO100State * VAR_0, uint8_t VAR_1)
{
eepro100_tx_t tx;
uint32_t cb_address;
switch (VAR_1) {
case CU_NOP:
break;
case CU_START:
if (get_cu_state(VAR_0) != cu_idle) {
logout("CU state is %u, should be %u\n", get_cu... | [
"static void FUNC_0(EEPRO100State * VAR_0, uint8_t VAR_1)\n{",
"eepro100_tx_t tx;",
"uint32_t cb_address;",
"switch (VAR_1) {",
"case CU_NOP:\nbreak;",
"case CU_START:\nif (get_cu_state(VAR_0) != cu_idle) {",
"logout(\"CU state is %u, should be %u\\n\", get_cu_state(VAR_0), cu_idle);",
"}",
"set_cu_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47,
49,
51
],
[
53
],
[
55
],
[... |
13,957 | void HELPER(set_cp15)(CPUState *env, uint32_t insn, uint32_t val)
{
int op1;
int op2;
int crm;
op1 = (insn >> 21) & 7;
op2 = (insn >> 5) & 7;
crm = insn & 0xf;
switch ((insn >> 16) & 0xf) {
case 0:
/* ID codes. */
if (arm_feature(env, ARM_FEATURE_XSCALE))
... | false | qemu | f101cd885ec148761738638ae42f7c5162b6d445 | void HELPER(set_cp15)(CPUState *env, uint32_t insn, uint32_t val)
{
int op1;
int op2;
int crm;
op1 = (insn >> 21) & 7;
op2 = (insn >> 5) & 7;
crm = insn & 0xf;
switch ((insn >> 16) & 0xf) {
case 0:
if (arm_feature(env, ARM_FEATURE_XSCALE))
break... | {
"code": [],
"line_no": []
} | void FUNC_0(set_cp15)(CPUState *env, uint32_t insn, uint32_t val)
{
int VAR_0;
int VAR_1;
int VAR_2;
VAR_0 = (insn >> 21) & 7;
VAR_1 = (insn >> 5) & 7;
VAR_2 = insn & 0xf;
switch ((insn >> 16) & 0xf) {
case 0:
if (arm_feature(env, ARM_FEATURE_XSCALE))
... | [
"void FUNC_0(set_cp15)(CPUState *env, uint32_t insn, uint32_t val)\n{",
"int VAR_0;",
"int VAR_1;",
"int VAR_2;",
"VAR_0 = (insn >> 21) & 7;",
"VAR_1 = (insn >> 5) & 7;",
"VAR_2 = insn & 0xf;",
"switch ((insn >> 16) & 0xf) {",
"case 0:\nif (arm_feature(env, ARM_FEATURE_XSCALE))\nbreak;",
"if (arm_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47,
49
],
[
51
... |
13,958 | static void pci_pcnet_cleanup(NetClientState *nc)
{
PCNetState *d = qemu_get_nic_opaque(nc);
pcnet_common_cleanup(d);
}
| false | qemu | 57407ea44cc0a3d630b9b89a2be011f1955ce5c1 | static void pci_pcnet_cleanup(NetClientState *nc)
{
PCNetState *d = qemu_get_nic_opaque(nc);
pcnet_common_cleanup(d);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(NetClientState *VAR_0)
{
PCNetState *d = qemu_get_nic_opaque(VAR_0);
pcnet_common_cleanup(d);
}
| [
"static void FUNC_0(NetClientState *VAR_0)\n{",
"PCNetState *d = qemu_get_nic_opaque(VAR_0);",
"pcnet_common_cleanup(d);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
13,959 | static void gen_mulo(DisasContext *ctx)
{
int l1 = gen_new_label();
TCGv_i64 t0 = tcg_temp_new_i64();
TCGv_i64 t1 = tcg_temp_new_i64();
TCGv t2 = tcg_temp_new();
/* Start with XER OV disabled, the most likely case */
tcg_gen_movi_tl(cpu_ov, 0);
tcg_gen_extu_tl_i64(t0, cpu_gpr[rA(ctx-... | false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static void gen_mulo(DisasContext *ctx)
{
int l1 = gen_new_label();
TCGv_i64 t0 = tcg_temp_new_i64();
TCGv_i64 t1 = tcg_temp_new_i64();
TCGv t2 = tcg_temp_new();
tcg_gen_movi_tl(cpu_ov, 0);
tcg_gen_extu_tl_i64(t0, cpu_gpr[rA(ctx->opcode)]);
tcg_gen_extu_tl_i64(t1, cpu_gpr[rB(ct... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0)
{
int VAR_1 = gen_new_label();
TCGv_i64 t0 = tcg_temp_new_i64();
TCGv_i64 t1 = tcg_temp_new_i64();
TCGv t2 = tcg_temp_new();
tcg_gen_movi_tl(cpu_ov, 0);
tcg_gen_extu_tl_i64(t0, cpu_gpr[rA(VAR_0->opcode)]);
tcg_gen_extu_tl_i64(t1, cpu_gpr[... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"int VAR_1 = gen_new_label();",
"TCGv_i64 t0 = tcg_temp_new_i64();",
"TCGv_i64 t1 = tcg_temp_new_i64();",
"TCGv t2 = tcg_temp_new();",
"tcg_gen_movi_tl(cpu_ov, 0);",
"tcg_gen_extu_tl_i64(t0, cpu_gpr[rA(VAR_0->opcode)]);",
"tcg_gen_extu_tl_i64(t1, cpu_gpr[r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
13,960 | static void test_source_flush_event_notifier(void)
{
EventNotifierTestData data = { .n = 0, .active = 10, .auto_set = true };
event_notifier_init(&data.e, false);
aio_set_event_notifier(ctx, &data.e, event_ready_cb);
g_assert(g_main_context_iteration(NULL, false));
g_assert_cmpint(data.n, ==, ... | false | qemu | 12d69ac03b45156356b240424623719f15d8143e | static void test_source_flush_event_notifier(void)
{
EventNotifierTestData data = { .n = 0, .active = 10, .auto_set = true };
event_notifier_init(&data.e, false);
aio_set_event_notifier(ctx, &data.e, event_ready_cb);
g_assert(g_main_context_iteration(NULL, false));
g_assert_cmpint(data.n, ==, ... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
EventNotifierTestData data = { .n = 0, .active = 10, .auto_set = true };
event_notifier_init(&data.e, false);
aio_set_event_notifier(ctx, &data.e, event_ready_cb);
g_assert(g_main_context_iteration(NULL, false));
g_assert_cmpint(data.n, ==, 0);
g_assert_cmpint(d... | [
"static void FUNC_0(void)\n{",
"EventNotifierTestData data = { .n = 0, .active = 10, .auto_set = true };",
"event_notifier_init(&data.e, false);",
"aio_set_event_notifier(ctx, &data.e, event_ready_cb);",
"g_assert(g_main_context_iteration(NULL, false));",
"g_assert_cmpint(data.n, ==, 0);",
"g_assert_cmp... | [
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
],
[
41
],
[
43
],
[
45
],
[
47
... |
13,961 | uint32_t HELPER(v7m_mrs)(CPUARMState *env, uint32_t reg)
{
uint32_t mask;
unsigned el = arm_current_el(env);
/* First handle registers which unprivileged can read */
switch (reg) {
case 0 ... 7: /* xPSR sub-fields */
mask = 0;
if ((reg & 1) && el) {
mask |= X... | false | qemu | 8bfc26ea302ec03585d7258a7cf8938f76512730 | uint32_t HELPER(v7m_mrs)(CPUARMState *env, uint32_t reg)
{
uint32_t mask;
unsigned el = arm_current_el(env);
switch (reg) {
case 0 ... 7:
mask = 0;
if ((reg & 1) && el) {
mask |= XPSR_EXCP;
}
if (!(reg & 4)) {
mask |= XPSR_NZ... | {
"code": [],
"line_no": []
} | uint32_t FUNC_0(v7m_mrs)(CPUARMState *env, uint32_t reg)
{
uint32_t mask;
unsigned VAR_0 = arm_current_el(env);
switch (reg) {
case 0 ... 7:
mask = 0;
if ((reg & 1) && VAR_0) {
mask |= XPSR_EXCP;
}
if (!(reg & 4)) {
mask |= X... | [
"uint32_t FUNC_0(v7m_mrs)(CPUARMState *env, uint32_t reg)\n{",
"uint32_t mask;",
"unsigned VAR_0 = arm_current_el(env);",
"switch (reg) {",
"case 0 ... 7:\nmask = 0;",
"if ((reg & 1) && VAR_0) {",
"mask |= XPSR_EXCP;",
"}",
"if (!(reg & 4)) {",
"mask |= XPSR_NZCV | XPSR_Q;",
"}",
"return xpsr_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
55... |
13,962 | static void usbredir_control_packet(void *priv, uint32_t id,
struct usb_redir_control_packet_header *control_packet,
uint8_t *data, int data_len)
{
USBRedirDevice *dev = priv;
int len = control_packet->length;
AsyncURB *aurb;
DPRINTF("ctrl-in status %d len %d id %u\n", control_packet->s... | false | qemu | 104981d52b63dc3d68f39d4442881c667f44bbb9 | static void usbredir_control_packet(void *priv, uint32_t id,
struct usb_redir_control_packet_header *control_packet,
uint8_t *data, int data_len)
{
USBRedirDevice *dev = priv;
int len = control_packet->length;
AsyncURB *aurb;
DPRINTF("ctrl-in status %d len %d id %u\n", control_packet->s... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, uint32_t VAR_1,
struct usb_redir_control_packet_header *VAR_2,
uint8_t *VAR_3, int VAR_4)
{
USBRedirDevice *dev = VAR_0;
int VAR_5 = VAR_2->length;
AsyncURB *aurb;
DPRINTF("ctrl-in status %d VAR_5 %d VAR_1 %u\n", VAR_2->status,
VAR_5, VAR_1);... | [
"static void FUNC_0(void *VAR_0, uint32_t VAR_1,\nstruct usb_redir_control_packet_header *VAR_2,\nuint8_t *VAR_3, int VAR_4)\n{",
"USBRedirDevice *dev = VAR_0;",
"int VAR_5 = VAR_2->length;",
"AsyncURB *aurb;",
"DPRINTF(\"ctrl-in status %d VAR_5 %d VAR_1 %u\\n\", VAR_2->status,\nVAR_5, VAR_1);",
"aurb = 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,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
... |
13,963 | static int qemu_paio_submit(struct qemu_paiocb *aiocb, int is_write)
{
aiocb->is_write = is_write;
aiocb->ret = -EINPROGRESS;
aiocb->active = 0;
mutex_lock(&lock);
if (idle_threads == 0 && cur_threads < max_threads)
spawn_thread();
TAILQ_INSERT_TAIL(&request_list, aiocb, node);
... | false | qemu | 5d47e3728bbd589701f74bb494c9c9825ba23c88 | static int qemu_paio_submit(struct qemu_paiocb *aiocb, int is_write)
{
aiocb->is_write = is_write;
aiocb->ret = -EINPROGRESS;
aiocb->active = 0;
mutex_lock(&lock);
if (idle_threads == 0 && cur_threads < max_threads)
spawn_thread();
TAILQ_INSERT_TAIL(&request_list, aiocb, node);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(struct qemu_paiocb *VAR_0, int VAR_1)
{
VAR_0->VAR_1 = VAR_1;
VAR_0->ret = -EINPROGRESS;
VAR_0->active = 0;
mutex_lock(&lock);
if (idle_threads == 0 && cur_threads < max_threads)
spawn_thread();
TAILQ_INSERT_TAIL(&request_list, VAR_0, node);
mutex_unlock(&l... | [
"static int FUNC_0(struct qemu_paiocb *VAR_0, int VAR_1)\n{",
"VAR_0->VAR_1 = VAR_1;",
"VAR_0->ret = -EINPROGRESS;",
"VAR_0->active = 0;",
"mutex_lock(&lock);",
"if (idle_threads == 0 && cur_threads < max_threads)\nspawn_thread();",
"TAILQ_INSERT_TAIL(&request_list, VAR_0, node);",
"mutex_unlock(&lock... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
]
] |
13,964 | static void input_linux_event_keyboard(void *opaque)
{
InputLinux *il = opaque;
struct input_event event;
int rc;
for (;;) {
rc = read(il->fd, &event, sizeof(event));
if (rc != sizeof(event)) {
if (rc < 0 && errno != EAGAIN) {
fprintf(stderr, "%s: r... | false | qemu | 2e6a64cb8d7506ad27d3b6c8000bc8d773936932 | static void input_linux_event_keyboard(void *opaque)
{
InputLinux *il = opaque;
struct input_event event;
int rc;
for (;;) {
rc = read(il->fd, &event, sizeof(event));
if (rc != sizeof(event)) {
if (rc < 0 && errno != EAGAIN) {
fprintf(stderr, "%s: r... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
InputLinux *il = VAR_0;
struct input_event VAR_1;
int VAR_2;
for (;;) {
VAR_2 = read(il->fd, &VAR_1, sizeof(VAR_1));
if (VAR_2 != sizeof(VAR_1)) {
if (VAR_2 < 0 && errno != EAGAIN) {
fprintf(stderr, "%s: read: %s\n"... | [
"static void FUNC_0(void *VAR_0)\n{",
"InputLinux *il = VAR_0;",
"struct input_event VAR_1;",
"int VAR_2;",
"for (;;) {",
"VAR_2 = read(il->fd, &VAR_1, sizeof(VAR_1));",
"if (VAR_2 != sizeof(VAR_1)) {",
"if (VAR_2 < 0 && errno != EAGAIN) {",
"fprintf(stderr, \"%s: read: %s\\n\", __func__, strerror(e... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
]
] |
13,965 | static void v9fs_create(void *opaque)
{
int32_t fid;
int err = 0;
size_t offset = 7;
V9fsFidState *fidp;
V9fsQID qid;
int32_t perm;
int8_t mode;
V9fsPath path;
struct stat stbuf;
V9fsString name;
V9fsString extension;
int iounit;
V9fsPDU *pdu = opaque;
... | true | qemu | c572f23a3e7180dbeab5e86583e43ea2afed6271 | static void v9fs_create(void *opaque)
{
int32_t fid;
int err = 0;
size_t offset = 7;
V9fsFidState *fidp;
V9fsQID qid;
int32_t perm;
int8_t mode;
V9fsPath path;
struct stat stbuf;
V9fsString name;
V9fsString extension;
int iounit;
V9fsPDU *pdu = opaque;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
int32_t fid;
int VAR_1 = 0;
size_t offset = 7;
V9fsFidState *fidp;
V9fsQID qid;
int32_t perm;
int8_t mode;
V9fsPath path;
struct stat VAR_2;
V9fsString name;
V9fsString extension;
int VAR_3;
V9fsPDU *pdu = VAR_0;
... | [
"static void FUNC_0(void *VAR_0)\n{",
"int32_t fid;",
"int VAR_1 = 0;",
"size_t offset = 7;",
"V9fsFidState *fidp;",
"V9fsQID qid;",
"int32_t perm;",
"int8_t mode;",
"V9fsPath path;",
"struct stat VAR_2;",
"V9fsString name;",
"V9fsString extension;",
"int VAR_3;",
"V9fsPDU *pdu = VAR_0;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37,
39
],
[
43
],
[
47
],
[
49
],
[... |
13,966 | static int gen_neon_unzip(int rd, int rm, int size, int q)
{
TCGv tmp, tmp2;
if (size == 3 || (!q && size == 2)) {
return 1;
}
tmp = tcg_const_i32(rd);
tmp2 = tcg_const_i32(rm);
if (q) {
switch (size) {
case 0:
gen_helper_neon_qunzip8(tmp, tmp2);
... | true | qemu | 600b828c448f108b89e1f864f0420a49ccb70d43 | static int gen_neon_unzip(int rd, int rm, int size, int q)
{
TCGv tmp, tmp2;
if (size == 3 || (!q && size == 2)) {
return 1;
}
tmp = tcg_const_i32(rd);
tmp2 = tcg_const_i32(rm);
if (q) {
switch (size) {
case 0:
gen_helper_neon_qunzip8(tmp, tmp2);
... | {
"code": [
" if (size == 3 || (!q && size == 2)) {",
" if (size == 3 || (!q && size == 2)) {"
],
"line_no": [
7,
7
]
} | static int FUNC_0(int VAR_0, int VAR_1, int VAR_2, int VAR_3)
{
TCGv tmp, tmp2;
if (VAR_2 == 3 || (!VAR_3 && VAR_2 == 2)) {
return 1;
}
tmp = tcg_const_i32(VAR_0);
tmp2 = tcg_const_i32(VAR_1);
if (VAR_3) {
switch (VAR_2) {
case 0:
gen_helper_neon_qu... | [
"static int FUNC_0(int VAR_0, int VAR_1, int VAR_2, int VAR_3)\n{",
"TCGv tmp, tmp2;",
"if (VAR_2 == 3 || (!VAR_3 && VAR_2 == 2)) {",
"return 1;",
"}",
"tmp = tcg_const_i32(VAR_0);",
"tmp2 = tcg_const_i32(VAR_1);",
"if (VAR_3) {",
"switch (VAR_2) {",
"case 0:\ngen_helper_neon_qunzip8(tmp, tmp2);",... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27,
29
],
[
31
],
[
33,
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
... |
13,967 | static void gen_wait(DisasContext *ctx)
{
TCGv_i32 t0 = tcg_temp_new_i32();
tcg_gen_st_i32(t0, cpu_env,
-offsetof(PowerPCCPU, env) + offsetof(CPUState, halted));
tcg_temp_free_i32(t0);
/* Stop translation, as the CPU is supposed to sleep from now */
gen_exception_err(ctx, E... | true | qemu | 35b5066ea7c2c3051fbc5a24b3d463b9800063e2 | static void gen_wait(DisasContext *ctx)
{
TCGv_i32 t0 = tcg_temp_new_i32();
tcg_gen_st_i32(t0, cpu_env,
-offsetof(PowerPCCPU, env) + offsetof(CPUState, halted));
tcg_temp_free_i32(t0);
gen_exception_err(ctx, EXCP_HLT, 1);
}
| {
"code": [
" TCGv_i32 t0 = tcg_temp_new_i32();"
],
"line_no": [
5
]
} | static void FUNC_0(DisasContext *VAR_0)
{
TCGv_i32 t0 = tcg_temp_new_i32();
tcg_gen_st_i32(t0, cpu_env,
-offsetof(PowerPCCPU, env) + offsetof(CPUState, halted));
tcg_temp_free_i32(t0);
gen_exception_err(VAR_0, EXCP_HLT, 1);
}
| [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"TCGv_i32 t0 = tcg_temp_new_i32();",
"tcg_gen_st_i32(t0, cpu_env,\n-offsetof(PowerPCCPU, env) + offsetof(CPUState, halted));",
"tcg_temp_free_i32(t0);",
"gen_exception_err(VAR_0, EXCP_HLT, 1);",
"}"
] | [
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
15
],
[
17
]
] |
13,968 | GuestExec *qmp_guest_exec(const char *path,
bool has_arg, strList *arg,
bool has_env, strList *env,
bool has_input_data, const char *input_data,
bool has_capture_output, bool capture_output,
Error **e... | true | qemu | 3005c2c2fa2875a3413af97e9db368856d3330fd | GuestExec *qmp_guest_exec(const char *path,
bool has_arg, strList *arg,
bool has_env, strList *env,
bool has_input_data, const char *input_data,
bool has_capture_output, bool capture_output,
Error **e... | {
"code": [],
"line_no": []
} | GuestExec *FUNC_0(const char *path,
bool has_arg, strList *arg,
bool has_env, strList *env,
bool has_input_data, const char *input_data,
bool has_capture_output, bool capture_output,
Error **err)
{
... | [
"GuestExec *FUNC_0(const char *path,\nbool has_arg, strList *arg,\nbool has_env, strList *env,\nbool has_input_data, const char *input_data,\nbool has_capture_output, bool capture_output,\nError **err)\n{",
"GPid pid;",
"GuestExec *ge = NULL;",
"GuestExecInfo *gei;",
"char **VAR_0, **VAR_1;",
"strList arg... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[... |
13,970 | static inline void RENAME(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, long width, enum PixelFormat srcFormat)
{
__asm__ volatile(
"movq 24(%4), %%mm6 \n\t"
"mov %3, %%"REG_a" \n\t"
"pxor %%mm7, %%mm... | false | FFmpeg | d1adad3cca407f493c3637e20ecd4f7124e69212 | static inline void RENAME(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, long width, enum PixelFormat srcFormat)
{
__asm__ volatile(
"movq 24(%4), %%mm6 \n\t"
"mov %3, %%"REG_a" \n\t"
"pxor %%mm7, %%mm... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, long width, enum PixelFormat srcFormat)
{
__asm__ volatile(
"movq 24(%4), %%mm6 \n\t"
"mov %3, %%"REG_a" \n\t"
"pxor %%mm7, %%mm... | [
"static inline void FUNC_0(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, long width, enum PixelFormat srcFormat)\n{",
"__asm__ volatile(\n\"movq 24(%4), %%mm6 \\n\\t\"\n\"mov %3, %%\"REG_a\" \\n\\t\"\n\"pxor %%mm7, %%mm7 ... | [
0,
0,
0
] | [
[
1,
3
],
[
5,
7,
9,
11,
13,
15,
17,
19,
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,
63,
65,
67,
71,
73,
75,
77,
79,
81,... |
13,971 | void intra_predict(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3],
VP8Macroblock *mb, int mb_x, int mb_y)
{
int x, y, mode, nnz;
uint32_t tr;
/* for the first row, we need to run xchg_mb_border to init the top edge
* to 127 otherwise, skip it if we aren't going to deblock ... | true | FFmpeg | ac4b32df71bd932838043a4838b86d11e169707f | void intra_predict(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3],
VP8Macroblock *mb, int mb_x, int mb_y)
{
int x, y, mode, nnz;
uint32_t tr;
if (mb_y && (s->deblock_filter || !mb_y) && td->thread_nr == 0)
xchg_mb_border(s->top_border[mb_x + 1], dst[0], dst[1], ... | {
"code": [
" VP8Macroblock *mb, int mb_x, int mb_y)",
" mode = check_intra_pred8x8_mode_emuedge(mb->mode, mb_x, mb_y);",
" uint8_t tr_top[4] = { 127, 127, 127, 127 };",
" mode = check_intra_pred4x4_mode_emuedge(intra4x4[x],",
" ... | void FUNC_0(VP8Context *VAR_0, VP8ThreadData *VAR_1, uint8_t *VAR_2[3],
VP8Macroblock *VAR_3, int VAR_4, int VAR_5)
{
int VAR_6, VAR_7, VAR_8, VAR_9;
uint32_t tr;
if (VAR_5 && (VAR_0->deblock_filter || !VAR_5) && VAR_1->thread_nr == 0)
xchg_mb_border(VAR_0->top_bor... | [
"void FUNC_0(VP8Context *VAR_0, VP8ThreadData *VAR_1, uint8_t *VAR_2[3],\nVP8Macroblock *VAR_3, int VAR_4, int VAR_5)\n{",
"int VAR_6, VAR_7, VAR_8, VAR_9;",
"uint32_t tr;",
"if (VAR_5 && (VAR_0->deblock_filter || !VAR_5) && VAR_1->thread_nr == 0)\nxchg_mb_border(VAR_0->top_border[VAR_4 + 1], VAR_2[0], VAR_2[... | [
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
17,
19,
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
47
],
[
55
],
[
57
],
[
59
],
[
61
],
[
65,
67
],
[... |
13,972 | static av_always_inline void decode_subband_internal(DiracContext *s, SubBand *b, int is_arith)
{
int cb_x, cb_y, left, right, top, bottom;
DiracArith c;
GetBitContext gb;
int cb_width = s->codeblock[b->level + (b->orientation != subband_ll)].width;
int cb_height = s->codeblock[b->level + (b-... | true | FFmpeg | 526886e6069636a918c8c04db17e864e3d8151c1 | static av_always_inline void decode_subband_internal(DiracContext *s, SubBand *b, int is_arith)
{
int cb_x, cb_y, left, right, top, bottom;
DiracArith c;
GetBitContext gb;
int cb_width = s->codeblock[b->level + (b->orientation != subband_ll)].width;
int cb_height = s->codeblock[b->level + (b-... | {
"code": [
" bottom = (b->height * (cb_y+1)) / cb_height;",
" right = (b->width * (cb_x+1)) / cb_width;"
],
"line_no": [
39,
45
]
} | static av_always_inline void FUNC_0(DiracContext *s, SubBand *b, int is_arith)
{
int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5;
DiracArith c;
GetBitContext gb;
int VAR_6 = s->codeblock[b->level + (b->orientation != subband_ll)].width;
int VAR_7 = s->codeblock[b->level + (b->orientation != subb... | [
"static av_always_inline void FUNC_0(DiracContext *s, SubBand *b, int is_arith)\n{",
"int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5;",
"DiracArith c;",
"GetBitContext gb;",
"int VAR_6 = s->codeblock[b->level + (b->orientation != subband_ll)].width;",
"int VAR_7 = s->codeblock[b->level + (b->orientation !=... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
13,973 | static inline void RENAME(yuv2rgb2)(uint16_t *buf0, uint16_t *buf1, uint16_t *uvbuf0, uint16_t *uvbuf1,
uint8_t *dest, int dstW, int yalpha, int uvalpha, int dstbpp)
{
int yalpha1=yalpha^4095;
int uvalpha1=uvalpha^4095;
if(fullUVIpol)
{
#ifdef HAVE_MMX
if(dstbpp == 32)
{
asm volatile(
... | true | FFmpeg | 28bf81c90d36a55cf76e2be913c5215ebebf61f2 | static inline void RENAME(yuv2rgb2)(uint16_t *buf0, uint16_t *buf1, uint16_t *uvbuf0, uint16_t *uvbuf1,
uint8_t *dest, int dstW, int yalpha, int uvalpha, int dstbpp)
{
int yalpha1=yalpha^4095;
int uvalpha1=uvalpha^4095;
if(fullUVIpol)
{
#ifdef HAVE_MMX
if(dstbpp == 32)
{
asm volatile(
... | {
"code": [
"#else",
"#endif",
"#else",
"#endif",
"#ifdef HAVE_MMX2",
"#else",
"\tif(fullUVIpol)",
"\t\telse if(dstbpp==15)",
"\t\telse if(dstbpp==16)",
"\t\t\t uint8_t *dest, int dstW, int yalpha, int uvalpha, int dstbpp)",
"\tif(fullUVIpol)",
"\t\tif(dstbpp == 32)"... | static inline void FUNC_0(yuv2rgb2)(uint16_t *buf0, uint16_t *buf1, uint16_t *uvbuf0, uint16_t *uvbuf1,
uint8_t *dest, int dstW, int yalpha, int uvalpha, int dstbpp)
{
int VAR_0=yalpha^4095;
int VAR_1=uvalpha^4095;
if(fullUVIpol)
{
#ifdef HAVE_MMX
if(dstbpp == 32)
{
asm volatile(
FU... | [
"static inline void FUNC_0(yuv2rgb2)(uint16_t *buf0, uint16_t *buf1, uint16_t *uvbuf0, uint16_t *uvbuf1,\nuint8_t *dest, int dstW, int yalpha, int uvalpha, int dstbpp)\n{",
"int VAR_0=yalpha^4095;",
"int VAR_1=uvalpha^4095;",
"if(fullUVIpol)\n{",
"#ifdef HAVE_MMX\nif(dstbpp == 32)\n{",
"asm volatile(\nFUL... | [
1,
0,
0,
1,
1,
0,
0,
1,
1,
0,
1,
0,
0,
1,
0,
0,
1,
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,
1,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13,
15
],
[
19,
21,
23
],
[
25,
31,
33,
35,
39,
41,
43,
47,
49,
53,
55,
57,
63,
65,
67,
69
],
[
71
],
[
73,
75
],
[
77,
81,
87,... |
13,974 | static int wavpack_encode_block(WavPackEncodeContext *s,
int32_t *samples_l, int32_t *samples_r,
uint8_t *out, int out_size)
{
int block_size, start, end, data_size, tcount, temp, m = 0;
int i, j, ret, got_extra = 0, nb_samples = s->block_samp... | true | FFmpeg | 2e9b79fc003f19c65f4fd6ef30748c1916ed4fa7 | static int wavpack_encode_block(WavPackEncodeContext *s,
int32_t *samples_l, int32_t *samples_r,
uint8_t *out, int out_size)
{
int block_size, start, end, data_size, tcount, temp, m = 0;
int i, j, ret, got_extra = 0, nb_samples = s->block_samp... | {
"code": [
" int i, j, ret, got_extra = 0, nb_samples = s->block_samples;"
],
"line_no": [
11
]
} | static int FUNC_0(WavPackEncodeContext *VAR_0,
int32_t *VAR_1, int32_t *VAR_2,
uint8_t *VAR_3, int VAR_4)
{
int VAR_5, VAR_20, VAR_7, VAR_8, VAR_20, VAR_10, VAR_11 = 0;
int VAR_12, VAR_13, VAR_14, VAR_15 = 0, VAR_16 = VAR_0->block_samples;
... | [
"static int FUNC_0(WavPackEncodeContext *VAR_0,\nint32_t *VAR_1, int32_t *VAR_2,\nuint8_t *VAR_3, int VAR_4)\n{",
"int VAR_5, VAR_20, VAR_7, VAR_8, VAR_20, VAR_10, VAR_11 = 0;",
"int VAR_12, VAR_13, VAR_14, VAR_15 = 0, VAR_16 = VAR_0->block_samples;",
"uint32_t crc = 0xffffffffu;",
"struct Decorr *VAR_17;",... | [
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,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[... |
13,975 | static void qemu_laio_process_completion(struct qemu_laio_state *s,
struct qemu_laiocb *laiocb)
{
int ret;
s->count--;
ret = laiocb->ret;
if (ret != -ECANCELED) {
if (ret == laiocb->nbytes)
ret = 0;
else if (ret >= 0)
ret = -EINVAL;
la... | true | qemu | b161e2e4b32ac8fb9e6a891eba3da0b825b5d046 | static void qemu_laio_process_completion(struct qemu_laio_state *s,
struct qemu_laiocb *laiocb)
{
int ret;
s->count--;
ret = laiocb->ret;
if (ret != -ECANCELED) {
if (ret == laiocb->nbytes)
ret = 0;
else if (ret >= 0)
ret = -EINVAL;
la... | {
"code": [
" if (ret == laiocb->nbytes)",
" else if (ret >= 0)",
" ret = -EINVAL;"
],
"line_no": [
19,
23,
25
]
} | static void FUNC_0(struct qemu_laio_state *VAR_0,
struct qemu_laiocb *VAR_1)
{
int VAR_2;
VAR_0->count--;
VAR_2 = VAR_1->VAR_2;
if (VAR_2 != -ECANCELED) {
if (VAR_2 == VAR_1->nbytes)
VAR_2 = 0;
else if (VAR_2 >= 0)
VAR_2 = -EINVAL;
VAR... | [
"static void FUNC_0(struct qemu_laio_state *VAR_0,\nstruct qemu_laiocb *VAR_1)\n{",
"int VAR_2;",
"VAR_0->count--;",
"VAR_2 = VAR_1->VAR_2;",
"if (VAR_2 != -ECANCELED) {",
"if (VAR_2 == VAR_1->nbytes)\nVAR_2 = 0;",
"else if (VAR_2 >= 0)\nVAR_2 = -EINVAL;",
"VAR_1->common.cb(VAR_1->common.opaque, VAR_2... | [
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
23,
25
],
[
29
],
[
31
],
[
35
],
[
37
]
] |
13,976 | void throttle_get_config(ThrottleState *ts, ThrottleConfig *cfg)
{
*cfg = ts->cfg; | true | qemu | d72915c60bff51495529449750e051d01b03c62f | void throttle_get_config(ThrottleState *ts, ThrottleConfig *cfg)
{
*cfg = ts->cfg; | {
"code": [],
"line_no": []
} | void FUNC_0(ThrottleState *VAR_0, ThrottleConfig *VAR_1)
{
*VAR_1 = VAR_0->VAR_1; | [
"void FUNC_0(ThrottleState *VAR_0, ThrottleConfig *VAR_1)\n{",
"*VAR_1 = VAR_0->VAR_1;"
] | [
0,
0
] | [
[
1,
2
],
[
3
]
] |
13,977 | vreader_xfr_bytes(VReader *reader,
unsigned char *send_buf, int send_buf_len,
unsigned char *receive_buf, int *receive_buf_len)
{
VCardAPDU *apdu;
VCardResponse *response = NULL;
VCardStatus card_status;
unsigned short status;
VCard *card = vreader_get_car... | true | qemu | fa5912a17b51b807c4ec78a4aa914891c7770781 | vreader_xfr_bytes(VReader *reader,
unsigned char *send_buf, int send_buf_len,
unsigned char *receive_buf, int *receive_buf_len)
{
VCardAPDU *apdu;
VCardResponse *response = NULL;
VCardStatus card_status;
unsigned short status;
VCard *card = vreader_get_car... | {
"code": [
" if (card_status == VCARD_DONE) {",
" int size = MIN(*receive_buf_len, response->b_total_len);",
" memcpy(receive_buf, response->b_data, size);",
" *receive_buf_len = size;"
],
"line_no": [
61,
63,
65,
67
]
} | FUNC_0(VReader *VAR_0,
unsigned char *VAR_1, int VAR_2,
unsigned char *VAR_3, int *VAR_4)
{
VCardAPDU *apdu;
VCardResponse *response = NULL;
VCardStatus card_status;
unsigned short VAR_5;
VCard *card = vreader_get_card(VAR_0);
if (card == NULL) {
... | [
"FUNC_0(VReader *VAR_0,\nunsigned char *VAR_1, int VAR_2,\nunsigned char *VAR_3, int *VAR_4)\n{",
"VCardAPDU *apdu;",
"VCardResponse *response = NULL;",
"VCardStatus card_status;",
"unsigned short VAR_5;",
"VCard *card = vreader_get_card(VAR_0);",
"if (card == NULL) {",
"return VREADER_NO_CARD;",
"}... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41,
43
],
[
45
],
[
47
],
[
49,... |
13,978 | static int tsc210x_load(QEMUFile *f, void *opaque, int version_id)
{
TSC210xState *s = (TSC210xState *) opaque;
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
int i;
s->x = qemu_get_be16(f);
s->y = qemu_get_be16(f);
s->pressure = qemu_get_byte(f);
s->state = qemu_get_byte(f... | true | qemu | 5193be3be35f29a35bc465036cd64ad60d43385f | static int tsc210x_load(QEMUFile *f, void *opaque, int version_id)
{
TSC210xState *s = (TSC210xState *) opaque;
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
int i;
s->x = qemu_get_be16(f);
s->y = qemu_get_be16(f);
s->pressure = qemu_get_byte(f);
s->state = qemu_get_byte(f... | {
"code": [],
"line_no": []
} | static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, int VAR_2)
{
TSC210xState *s = (TSC210xState *) VAR_1;
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
int VAR_3;
s->x = qemu_get_be16(VAR_0);
s->y = qemu_get_be16(VAR_0);
s->pressure = qemu_get_byte(VAR_0);
s->state = qemu_get... | [
"static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, int VAR_2)\n{",
"TSC210xState *s = (TSC210xState *) VAR_1;",
"int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);",
"int VAR_3;",
"s->x = qemu_get_be16(VAR_0);",
"s->y = qemu_get_be16(VAR_0);",
"s->pressure = qemu_get_byte(VAR_0);",
"s->state = qemu_ge... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
48
],
[
53
],
[
58
... |
13,979 | static uint16_t eepro100_read2(EEPRO100State * s, uint32_t addr)
{
uint16_t val;
if (addr <= sizeof(s->mem) - sizeof(val)) {
memcpy(&val, &s->mem[addr], sizeof(val));
}
switch (addr) {
case SCBStatus:
case SCBCmd:
TRACE(OTHER, logout("addr=%s val=0x%04x\n", regname(add... | true | qemu | ef4760626e88bc3e7a1b46c7370378cbd12d379f | static uint16_t eepro100_read2(EEPRO100State * s, uint32_t addr)
{
uint16_t val;
if (addr <= sizeof(s->mem) - sizeof(val)) {
memcpy(&val, &s->mem[addr], sizeof(val));
}
switch (addr) {
case SCBStatus:
case SCBCmd:
TRACE(OTHER, logout("addr=%s val=0x%04x\n", regname(add... | {
"code": [
" uint16_t val;"
],
"line_no": [
5
]
} | static uint16_t FUNC_0(EEPRO100State * s, uint32_t addr)
{
uint16_t val;
if (addr <= sizeof(s->mem) - sizeof(val)) {
memcpy(&val, &s->mem[addr], sizeof(val));
}
switch (addr) {
case SCBStatus:
case SCBCmd:
TRACE(OTHER, logout("addr=%s val=0x%04x\n", regname(addr), val)... | [
"static uint16_t FUNC_0(EEPRO100State * s, uint32_t addr)\n{",
"uint16_t val;",
"if (addr <= sizeof(s->mem) - sizeof(val)) {",
"memcpy(&val, &s->mem[addr], sizeof(val));",
"}",
"switch (addr) {",
"case SCBStatus:\ncase SCBCmd:\nTRACE(OTHER, logout(\"addr=%s val=0x%04x\\n\", regname(addr), val));",
"br... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
13,980 | static int disas_cp15_insn(CPUState *env, DisasContext *s, uint32_t insn)
{
uint32_t rd;
TCGv tmp, tmp2;
/* M profile cores use memory mapped registers instead of cp15. */
if (arm_feature(env, ARM_FEATURE_M))
return 1;
if ((insn & (1 << 25)) == 0) {
if (insn & (1 << 20)) {
... | true | qemu | 7d1b0095bff7157e856d1d0e6c4295641ced2752 | static int disas_cp15_insn(CPUState *env, DisasContext *s, uint32_t insn)
{
uint32_t rd;
TCGv tmp, tmp2;
if (arm_feature(env, ARM_FEATURE_M))
return 1;
if ((insn & (1 << 25)) == 0) {
if (insn & (1 << 20)) {
return 1;
}
retu... | {
"code": [
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" tmp = new_tmp();",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" tmp = new_tmp();",
" dead_tmp(tm... | static int FUNC_0(CPUState *VAR_0, DisasContext *VAR_1, uint32_t VAR_2)
{
uint32_t rd;
TCGv tmp, tmp2;
if (arm_feature(VAR_0, ARM_FEATURE_M))
return 1;
if ((VAR_2 & (1 << 25)) == 0) {
if (VAR_2 & (1 << 20)) {
return 1;
}
re... | [
"static int FUNC_0(CPUState *VAR_0, DisasContext *VAR_1, uint32_t VAR_2)\n{",
"uint32_t rd;",
"TCGv tmp, tmp2;",
"if (arm_feature(VAR_0, ARM_FEATURE_M))\nreturn 1;",
"if ((VAR_2 & (1 << 25)) == 0) {",
"if (VAR_2 & (1 << 20)) {",
"return 1;",
"}",
"return 0;",
"}",
"if ((VAR_2 & (1 << 4)) == 0) {... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13,
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
57
],
[
65
],
[
69
],
... |
13,981 | static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
{
ASFContext *asf = s->priv_data;
AVIOContext *pb = s->pb;
ASFStream *stream;
AVCodecContext *codec;
uint32_t packet_number;
int64_t pts;
int start_sec;
int flags = pkt->flags;
int ret;
uint64_t offset = av... | true | FFmpeg | 7c0b84d89911b2035161f5ef51aafbfcc84aa9e2 | static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
{
ASFContext *asf = s->priv_data;
AVIOContext *pb = s->pb;
ASFStream *stream;
AVCodecContext *codec;
uint32_t packet_number;
int64_t pts;
int start_sec;
int flags = pkt->flags;
int ret;
uint64_t offset = av... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
ASFContext *asf = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
ASFStream *stream;
AVCodecContext *codec;
uint32_t packet_number;
int64_t pts;
int VAR_2;
int VAR_3 = VAR_1->VAR_3;
int VAR_4;
uint64_t offset ... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"ASFContext *asf = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"ASFStream *stream;",
"AVCodecContext *codec;",
"uint32_t packet_number;",
"int64_t pts;",
"int VAR_2;",
"int VAR_3 = VAR_1->VAR_3;",
"int VAR_4;",
"uint64_t of... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33,
35
],
[
39
],
[
41
],
[
48
],
[
50
],
[
54
],
[... |
13,982 | static void pl181_class_init(ObjectClass *klass, void *data)
{
SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
DeviceClass *k = DEVICE_CLASS(klass);
sdc->init = pl181_init;
k->vmsd = &vmstate_pl181;
k->reset = pl181_reset;
k->no_user = 1;
}
| true | qemu | efec3dd631d94160288392721a5f9c39e50fb2bc | static void pl181_class_init(ObjectClass *klass, void *data)
{
SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
DeviceClass *k = DEVICE_CLASS(klass);
sdc->init = pl181_init;
k->vmsd = &vmstate_pl181;
k->reset = pl181_reset;
k->no_user = 1;
}
| {
"code": [
" k->no_user = 1;"
],
"line_no": [
17
]
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(VAR_0);
DeviceClass *k = DEVICE_CLASS(VAR_0);
sdc->init = pl181_init;
k->vmsd = &vmstate_pl181;
k->reset = pl181_reset;
k->no_user = 1;
}
| [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(VAR_0);",
"DeviceClass *k = DEVICE_CLASS(VAR_0);",
"sdc->init = pl181_init;",
"k->vmsd = &vmstate_pl181;",
"k->reset = pl181_reset;",
"k->no_user = 1;",
"}"
] | [
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
13,983 | static void ahci_start_transfer(IDEDMA *dma)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
IDEState *s = &ad->port.ifs[0];
uint32_t size = (uint32_t)(s->data_end - s->data_ptr);
/* write == ram -> device */
uint16_t opts = le16_to_cpu(ad->cur_cmd->opts);
int is_write = opts & AHCI_C... | true | qemu | a718978ed58abc1ad92567a9c17525136be02a71 | static void ahci_start_transfer(IDEDMA *dma)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
IDEState *s = &ad->port.ifs[0];
uint32_t size = (uint32_t)(s->data_end - s->data_ptr);
uint16_t opts = le16_to_cpu(ad->cur_cmd->opts);
int is_write = opts & AHCI_CMD_WRITE;
int is_atapi ... | {
"code": [
" if (ahci_dma_prepare_buf(dma, is_write)) {"
],
"line_no": [
37
]
} | static void FUNC_0(IDEDMA *VAR_0)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, VAR_0, VAR_0);
IDEState *s = &ad->port.ifs[0];
uint32_t size = (uint32_t)(s->data_end - s->data_ptr);
uint16_t opts = le16_to_cpu(ad->cur_cmd->opts);
int VAR_1 = opts & AHCI_CMD_WRITE;
int VAR_2 = opts & AHCI... | [
"static void FUNC_0(IDEDMA *VAR_0)\n{",
"AHCIDevice *ad = DO_UPCAST(AHCIDevice, VAR_0, VAR_0);",
"IDEState *s = &ad->port.ifs[0];",
"uint32_t size = (uint32_t)(s->data_end - s->data_ptr);",
"uint16_t opts = le16_to_cpu(ad->cur_cmd->opts);",
"int VAR_1 = opts & AHCI_CMD_WRITE;",
"int VAR_2 = opts & AHCI_... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45,
47,
49
],
[
53
],
[
55
... |
13,984 | void bmdma_init(IDEBus *bus, BMDMAState *bm, PCIIDEState *d)
{
qemu_irq *irq;
if (bus->dma == &bm->dma) {
return;
}
bm->dma.ops = &bmdma_ops;
bus->dma = &bm->dma;
bm->irq = bus->irq;
irq = qemu_allocate_irqs(bmdma_irq, bm, 1);
bus->irq = *irq;
bm->pci_dev = d;
... | true | qemu | 6e38a4ba7889083b65729db2144cdbcefbaa303a | void bmdma_init(IDEBus *bus, BMDMAState *bm, PCIIDEState *d)
{
qemu_irq *irq;
if (bus->dma == &bm->dma) {
return;
}
bm->dma.ops = &bmdma_ops;
bus->dma = &bm->dma;
bm->irq = bus->irq;
irq = qemu_allocate_irqs(bmdma_irq, bm, 1);
bus->irq = *irq;
bm->pci_dev = d;
... | {
"code": [
" qemu_irq *irq;",
" irq = qemu_allocate_irqs(bmdma_irq, bm, 1);",
" bus->irq = *irq;"
],
"line_no": [
5,
23,
25
]
} | void FUNC_0(IDEBus *VAR_0, BMDMAState *VAR_1, PCIIDEState *VAR_2)
{
qemu_irq *irq;
if (VAR_0->dma == &VAR_1->dma) {
return;
}
VAR_1->dma.ops = &bmdma_ops;
VAR_0->dma = &VAR_1->dma;
VAR_1->irq = VAR_0->irq;
irq = qemu_allocate_irqs(bmdma_irq, VAR_1, 1);
VAR_0->irq = ... | [
"void FUNC_0(IDEBus *VAR_0, BMDMAState *VAR_1, PCIIDEState *VAR_2)\n{",
"qemu_irq *irq;",
"if (VAR_0->dma == &VAR_1->dma) {",
"return;",
"}",
"VAR_1->dma.ops = &bmdma_ops;",
"VAR_0->dma = &VAR_1->dma;",
"VAR_1->irq = VAR_0->irq;",
"irq = qemu_allocate_irqs(bmdma_irq, VAR_1, 1);",
"VAR_0->irq = *ir... | [
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
13,985 | static void qemu_tcg_wait_io_event(void)
{
CPUState *env;
while (all_cpu_threads_idle()) {
/* Start accounting real time to the virtual clock if the CPUs
are idle. */
qemu_clock_warp(vm_clock);
qemu_cond_wait(tcg_halt_cond, &qemu_global_mutex);
}
qemu_mutex... | true | qemu | 46daff13c854769bfa8c51e77719325ea0f47b1b | static void qemu_tcg_wait_io_event(void)
{
CPUState *env;
while (all_cpu_threads_idle()) {
qemu_clock_warp(vm_clock);
qemu_cond_wait(tcg_halt_cond, &qemu_global_mutex);
}
qemu_mutex_unlock(&qemu_global_mutex);
qemu_mutex_lock(&qemu_fair_mutex);
... | {
"code": [
" qemu_mutex_unlock(&qemu_global_mutex);",
" qemu_mutex_lock(&qemu_fair_mutex);",
" qemu_mutex_unlock(&qemu_fair_mutex);",
" qemu_mutex_lock(&qemu_global_mutex);"
],
"line_no": [
23,
37,
39,
43
]
} | static void FUNC_0(void)
{
CPUState *env;
while (all_cpu_threads_idle()) {
qemu_clock_warp(vm_clock);
qemu_cond_wait(tcg_halt_cond, &qemu_global_mutex);
}
qemu_mutex_unlock(&qemu_global_mutex);
qemu_mutex_lock(&qemu_fair_mutex);
qemu_mutex_... | [
"static void FUNC_0(void)\n{",
"CPUState *env;",
"while (all_cpu_threads_idle()) {",
"qemu_clock_warp(vm_clock);",
"qemu_cond_wait(tcg_halt_cond, &qemu_global_mutex);",
"}",
"qemu_mutex_unlock(&qemu_global_mutex);",
"qemu_mutex_lock(&qemu_fair_mutex);",
"qemu_mutex_unlock(&qemu_fair_mutex);",
"qem... | [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
15
],
[
17
],
[
19
],
[
23
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
]
] |
13,986 | void ff_mdct_calc_c(FFTContext *s, FFTSample *out, const FFTSample *input)
{
int i, j, n, n8, n4, n2, n3;
FFTDouble re, im;
const uint16_t *revtab = s->revtab;
const FFTSample *tcos = s->tcos;
const FFTSample *tsin = s->tsin;
FFTComplex *x = (FFTComplex *)out;
n = 1 << s->mdct_bits... | true | FFmpeg | 770c934fa1635f4fadf5db4fc5cc5ad15d82455a | void ff_mdct_calc_c(FFTContext *s, FFTSample *out, const FFTSample *input)
{
int i, j, n, n8, n4, n2, n3;
FFTDouble re, im;
const uint16_t *revtab = s->revtab;
const FFTSample *tcos = s->tcos;
const FFTSample *tsin = s->tsin;
FFTComplex *x = (FFTComplex *)out;
n = 1 << s->mdct_bits... | {
"code": [
" re = RSCALE(-input[2*i+n3] - input[n3-1-2*i]);",
" im = RSCALE(-input[n4+2*i] + input[n4-1-2*i]);",
" re = RSCALE( input[2*i] - input[n2-1-2*i]);",
" im = RSCALE(-input[n2+2*i] - input[ n-1-2*i]);",
" re = RSCALE(-input[2*i+n3] - input[n3-1-2*i])... | void FUNC_0(FFTContext *VAR_0, FFTSample *VAR_1, const FFTSample *VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;
FFTDouble re, im;
const uint16_t *VAR_10 = VAR_0->VAR_10;
const FFTSample *VAR_11 = VAR_0->VAR_11;
const FFTSample *VAR_12 = VAR_0->VAR_12;
FFTComplex *x = (FFTC... | [
"void FUNC_0(FFTContext *VAR_0, FFTSample *VAR_1, const FFTSample *VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;",
"FFTDouble re, im;",
"const uint16_t *VAR_10 = VAR_0->VAR_10;",
"const FFTSample *VAR_11 = VAR_0->VAR_11;",
"const FFTSample *VAR_12 = VAR_0->VAR_12;",
"FFTComplex *x = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
... |
13,987 | int bdrv_file_open(BlockDriverState **pbs, const char *filename, int flags)
{
BlockDriverState *bs;
int ret;
bs = bdrv_new("");
if (!bs)
return -ENOMEM;
ret = bdrv_open2(bs, filename, flags | BDRV_O_FILE, NULL);
if (ret < 0) {
bdrv_delete(bs);
return ret;
... | true | qemu | 71d0770c4cec9f1dc04f4dadcbf7fd6c335030a9 | int bdrv_file_open(BlockDriverState **pbs, const char *filename, int flags)
{
BlockDriverState *bs;
int ret;
bs = bdrv_new("");
if (!bs)
return -ENOMEM;
ret = bdrv_open2(bs, filename, flags | BDRV_O_FILE, NULL);
if (ret < 0) {
bdrv_delete(bs);
return ret;
... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState **VAR_0, const char *VAR_1, int VAR_2)
{
BlockDriverState *bs;
int VAR_3;
bs = bdrv_new("");
if (!bs)
return -ENOMEM;
VAR_3 = bdrv_open2(bs, VAR_1, VAR_2 | BDRV_O_FILE, NULL);
if (VAR_3 < 0) {
bdrv_delete(bs);
return VAR_3;
}
... | [
"int FUNC_0(BlockDriverState **VAR_0, const char *VAR_1, int VAR_2)\n{",
"BlockDriverState *bs;",
"int VAR_3;",
"bs = bdrv_new(\"\");",
"if (!bs)\nreturn -ENOMEM;",
"VAR_3 = bdrv_open2(bs, VAR_1, VAR_2 | BDRV_O_FILE, NULL);",
"if (VAR_3 < 0) {",
"bdrv_delete(bs);",
"return VAR_3;",
"}",
"*VAR_0 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
28
],
[
30
],
[
32
]
] |
13,989 | static int sdp_parse_fmtp_config_h264(AVStream * stream,
PayloadContext * h264_data,
char *attr, char *value)
{
AVCodecContext *codec = stream->codec;
assert(codec->codec_id == CODEC_ID_H264);
assert(h264_data != NULL);
... | true | FFmpeg | dc6cf61e331557eb275a44d7a31df8e781bbb22b | static int sdp_parse_fmtp_config_h264(AVStream * stream,
PayloadContext * h264_data,
char *attr, char *value)
{
AVCodecContext *codec = stream->codec;
assert(codec->codec_id == CODEC_ID_H264);
assert(h264_data != NULL);
... | {
"code": [
" uint32_t packet_size;",
" if (packet_size) {"
],
"line_no": [
103,
129
]
} | static int FUNC_0(AVStream * VAR_0,
PayloadContext * VAR_1,
char *VAR_2, char *VAR_3)
{
AVCodecContext *codec = VAR_0->codec;
assert(codec->codec_id == CODEC_ID_H264);
assert(VAR_1 != NULL);
if (!strcmp(VAR_2, "packetiz... | [
"static int FUNC_0(AVStream * VAR_0,\nPayloadContext * VAR_1,\nchar *VAR_2, char *VAR_3)\n{",
"AVCodecContext *codec = VAR_0->codec;",
"assert(codec->codec_id == CODEC_ID_H264);",
"assert(VAR_1 != NULL);",
"if (!strcmp(VAR_2, \"packetization-mode\")) {",
"av_log(codec, AV_LOG_DEBUG, \"RTP Packetization Mo... | [
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
35,
37,
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
],
[
57
],
[
59
],
[
61
],
[
63
... |
13,990 | void qpci_io_writeq(QPCIDevice *dev, void *data, uint64_t value)
{
uintptr_t addr = (uintptr_t)data;
if (addr < QPCI_PIO_LIMIT) {
dev->bus->pio_writeq(dev->bus, addr, value);
} else {
value = cpu_to_le64(value);
dev->bus->memwrite(dev->bus, addr, &value, sizeof(value));
... | true | qemu | b4ba67d9a702507793c2724e56f98e9b0f7be02b | void qpci_io_writeq(QPCIDevice *dev, void *data, uint64_t value)
{
uintptr_t addr = (uintptr_t)data;
if (addr < QPCI_PIO_LIMIT) {
dev->bus->pio_writeq(dev->bus, addr, value);
} else {
value = cpu_to_le64(value);
dev->bus->memwrite(dev->bus, addr, &value, sizeof(value));
... | {
"code": [
" uintptr_t addr = (uintptr_t)data;",
" if (addr < QPCI_PIO_LIMIT) {",
" uintptr_t addr = (uintptr_t)data;",
" if (addr < QPCI_PIO_LIMIT) {",
" uintptr_t addr = (uintptr_t)data;",
" if (addr < QPCI_PIO_LIMIT) {",
" uintptr_t addr = (uintptr_t)data;",
" ... | void FUNC_0(QPCIDevice *VAR_0, void *VAR_1, uint64_t VAR_2)
{
uintptr_t addr = (uintptr_t)VAR_1;
if (addr < QPCI_PIO_LIMIT) {
VAR_0->bus->pio_writeq(VAR_0->bus, addr, VAR_2);
} else {
VAR_2 = cpu_to_le64(VAR_2);
VAR_0->bus->memwrite(VAR_0->bus, addr, &VAR_2, sizeof(VAR_2));
... | [
"void FUNC_0(QPCIDevice *VAR_0, void *VAR_1, uint64_t VAR_2)\n{",
"uintptr_t addr = (uintptr_t)VAR_1;",
"if (addr < QPCI_PIO_LIMIT) {",
"VAR_0->bus->pio_writeq(VAR_0->bus, addr, VAR_2);",
"} else {",
"VAR_2 = cpu_to_le64(VAR_2);",
"VAR_0->bus->memwrite(VAR_0->bus, addr, &VAR_2, sizeof(VAR_2));",
"}",
... | [
1,
1,
1,
1,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
13,991 | static abi_long do_sendto(int fd, abi_ulong msg, size_t len, int flags,
abi_ulong target_addr, socklen_t addrlen)
{
void *addr;
void *host_msg;
abi_long ret;
if ((int)addrlen < 0) {
return -TARGET_EINVAL;
}
host_msg = lock_user(VERIFY_READ, msg, len... | true | qemu | 7d61d892327d803ae43d14500601e48031b4632c | static abi_long do_sendto(int fd, abi_ulong msg, size_t len, int flags,
abi_ulong target_addr, socklen_t addrlen)
{
void *addr;
void *host_msg;
abi_long ret;
if ((int)addrlen < 0) {
return -TARGET_EINVAL;
}
host_msg = lock_user(VERIFY_READ, msg, len... | {
"code": [
" unlock_user(host_msg, msg, 0);",
" return ret;",
" unlock_user(host_msg, msg, 0);",
" return ret;"
],
"line_no": [
35,
37,
35,
37
]
} | static abi_long FUNC_0(int fd, abi_ulong msg, size_t len, int flags,
abi_ulong target_addr, socklen_t addrlen)
{
void *VAR_0;
void *VAR_1;
abi_long ret;
if ((int)addrlen < 0) {
return -TARGET_EINVAL;
}
VAR_1 = lock_user(VERIFY_READ, msg, len, 1);
... | [
"static abi_long FUNC_0(int fd, abi_ulong msg, size_t len, int flags,\nabi_ulong target_addr, socklen_t addrlen)\n{",
"void *VAR_0;",
"void *VAR_1;",
"abi_long ret;",
"if ((int)addrlen < 0) {",
"return -TARGET_EINVAL;",
"}",
"VAR_1 = lock_user(VERIFY_READ, msg, len, 1);",
"if (!VAR_1)\nreturn -TARGE... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
13,992 | static int vscsi_srp_direct_data(VSCSIState *s, vscsi_req *req,
uint8_t *buf, uint32_t len)
{
struct srp_direct_buf *md = req->cur_desc;
uint32_t llen;
int rc;
dprintf("VSCSI: direct segment 0x%x bytes, va=0x%llx desc len=0x%x\n",
len, (unsigned long... | true | qemu | 8804f57b531e4887ad9521c9abb9e0bbbcb1dd4e | static int vscsi_srp_direct_data(VSCSIState *s, vscsi_req *req,
uint8_t *buf, uint32_t len)
{
struct srp_direct_buf *md = req->cur_desc;
uint32_t llen;
int rc;
dprintf("VSCSI: direct segment 0x%x bytes, va=0x%llx desc len=0x%x\n",
len, (unsigned long... | {
"code": [
" int rc;"
],
"line_no": [
11
]
} | static int FUNC_0(VSCSIState *VAR_0, vscsi_req *VAR_1,
uint8_t *VAR_2, uint32_t VAR_3)
{
struct srp_direct_buf *VAR_4 = VAR_1->cur_desc;
uint32_t llen;
int VAR_5;
dprintf("VSCSI: direct segment 0x%x bytes, va=0x%llx desc VAR_3=0x%x\n",
VAR_3, (unsign... | [
"static int FUNC_0(VSCSIState *VAR_0, vscsi_req *VAR_1,\nuint8_t *VAR_2, uint32_t VAR_3)\n{",
"struct srp_direct_buf *VAR_4 = VAR_1->cur_desc;",
"uint32_t llen;",
"int VAR_5;",
"dprintf(\"VSCSI: direct segment 0x%x bytes, va=0x%llx desc VAR_3=0x%x\\n\",\nVAR_3, (unsigned long long)VAR_4->va, VAR_4->VAR_3);"... | [
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
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
... |
13,993 | static inline void flash_sync_area(Flash *s, int64_t off, int64_t len)
{
QEMUIOVector *iov = g_new(QEMUIOVector, 1);
if (!s->blk || blk_is_read_only(s->blk)) {
return;
}
assert(!(len % BDRV_SECTOR_SIZE));
qemu_iovec_init(iov, 1);
qemu_iovec_add(iov, s->storage + off, len);
... | true | qemu | eef9f19eea26cd8b4553459118f87d7150b53c5a | static inline void flash_sync_area(Flash *s, int64_t off, int64_t len)
{
QEMUIOVector *iov = g_new(QEMUIOVector, 1);
if (!s->blk || blk_is_read_only(s->blk)) {
return;
}
assert(!(len % BDRV_SECTOR_SIZE));
qemu_iovec_init(iov, 1);
qemu_iovec_add(iov, s->storage + off, len);
... | {
"code": [
" QEMUIOVector *iov = g_new(QEMUIOVector, 1);",
" QEMUIOVector *iov = g_new(QEMUIOVector, 1);"
],
"line_no": [
5,
5
]
} | static inline void FUNC_0(Flash *VAR_0, int64_t VAR_1, int64_t VAR_2)
{
QEMUIOVector *iov = g_new(QEMUIOVector, 1);
if (!VAR_0->blk || blk_is_read_only(VAR_0->blk)) {
return;
}
assert(!(VAR_2 % BDRV_SECTOR_SIZE));
qemu_iovec_init(iov, 1);
qemu_iovec_add(iov, VAR_0->storage + ... | [
"static inline void FUNC_0(Flash *VAR_0, int64_t VAR_1, int64_t VAR_2)\n{",
"QEMUIOVector *iov = g_new(QEMUIOVector, 1);",
"if (!VAR_0->blk || blk_is_read_only(VAR_0->blk)) {",
"return;",
"}",
"assert(!(VAR_2 % BDRV_SECTOR_SIZE));",
"qemu_iovec_init(iov, 1);",
"qemu_iovec_add(iov, VAR_0->storage + VAR... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
13,994 | static void gdb_vm_stopped(void *opaque, int reason)
{
GDBState *s = opaque;
char buf[256];
int ret;
if (s->state == RS_SYSCALL)
/* disable single step if it was enable */
cpu_single_step(s->env, 0);
if (reason == EXCP_DEBUG) {
tb_flush(s->env);
ret = SIGTRAP... | true | qemu | 6658ffb81ee56a510d7d77025872a508a9adce3a | static void gdb_vm_stopped(void *opaque, int reason)
{
GDBState *s = opaque;
char buf[256];
int ret;
if (s->state == RS_SYSCALL)
cpu_single_step(s->env, 0);
if (reason == EXCP_DEBUG) {
tb_flush(s->env);
ret = SIGTRAP;
} else if (reason == EXCP_INTERRUPT... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1)
{
GDBState *s = VAR_0;
char VAR_2[256];
int VAR_3;
if (s->state == RS_SYSCALL)
cpu_single_step(s->env, 0);
if (VAR_1 == EXCP_DEBUG) {
tb_flush(s->env);
VAR_3 = SIGTRAP;
} else if (VAR_1 == EXCP_INTERRUPT) {
... | [
"static void FUNC_0(void *VAR_0, int VAR_1)\n{",
"GDBState *s = VAR_0;",
"char VAR_2[256];",
"int VAR_3;",
"if (s->state == RS_SYSCALL)\ncpu_single_step(s->env, 0);",
"if (VAR_1 == EXCP_DEBUG) {",
"tb_flush(s->env);",
"VAR_3 = SIGTRAP;",
"} else if (VAR_1 == EXCP_INTERRUPT) {",
"VAR_3 = SIGINT;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
20
],
[
24
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
46
]
] |
13,995 | void main_loop_wait(int timeout)
{
IOHandlerRecord *ioh;
fd_set rfds, wfds, xfds;
int ret, nfds;
#ifdef _WIN32
int ret2, i;
#endif
struct timeval tv;
PollingEntry *pe;
/* XXX: need to suppress polling by better using win32 events */
ret = 0;
for(pe = first_polling_ent... | true | qemu | baf35cb90204d75404892aa4e52628ae7a00669b | void main_loop_wait(int timeout)
{
IOHandlerRecord *ioh;
fd_set rfds, wfds, xfds;
int ret, nfds;
#ifdef _WIN32
int ret2, i;
#endif
struct timeval tv;
PollingEntry *pe;
ret = 0;
for(pe = first_polling_entry; pe != NULL; pe = pe->next) {
ret |= pe->func(pe->op... | {
"code": [
"#endif",
"#endif",
"#endif",
" qemu_aio_poll();",
" qemu_aio_poll();",
" qemu_aio_poll();"
],
"line_no": [
15,
15,
15,
233,
233,
233
]
} | void FUNC_0(int VAR_0)
{
IOHandlerRecord *ioh;
fd_set rfds, wfds, xfds;
int VAR_1, VAR_2;
#ifdef _WIN32
int ret2, i;
#endif
struct timeval VAR_3;
PollingEntry *pe;
VAR_1 = 0;
for(pe = first_polling_entry; pe != NULL; pe = pe->next) {
VAR_1 |= pe->func(pe->op... | [
"void FUNC_0(int VAR_0)\n{",
"IOHandlerRecord *ioh;",
"fd_set rfds, wfds, xfds;",
"int VAR_1, VAR_2;",
"#ifdef _WIN32\nint ret2, i;",
"#endif\nstruct timeval VAR_3;",
"PollingEntry *pe;",
"VAR_1 = 0;",
"for(pe = first_polling_entry; pe != NULL; pe = pe->next) {",
"VAR_1 |= pe->func(pe->opaque);",
... | [
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
],
[
15,
17
],
[
19
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49,
51
],
[
57
... |
13,996 | static int buf_put_buffer(void *opaque, const uint8_t *buf,
int64_t pos, int size)
{
QEMUBuffer *s = opaque;
return qsb_write_at(s->qsb, buf, pos, size);
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static int buf_put_buffer(void *opaque, const uint8_t *buf,
int64_t pos, int size)
{
QEMUBuffer *s = opaque;
return qsb_write_at(s->qsb, buf, pos, size);
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0, const uint8_t *VAR_1,
int64_t VAR_2, int VAR_3)
{
QEMUBuffer *s = VAR_0;
return qsb_write_at(s->qsb, VAR_1, VAR_2, VAR_3);
}
| [
"static int FUNC_0(void *VAR_0, const uint8_t *VAR_1,\nint64_t VAR_2, int VAR_3)\n{",
"QEMUBuffer *s = VAR_0;",
"return qsb_write_at(s->qsb, VAR_1, VAR_2, VAR_3);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
]
] |
13,997 | static void mv88w8618_eth_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
mv88w8618_eth_state *s = opaque;
switch (offset) {
case MP_ETH_SMIR:
s->smir = value;
break;
case MP_ETH_PCXR:
s->vlan_header = ((value >> MP... | true | qemu | cf143ad35018c5fc1da6365b45acda2b34aba90a | static void mv88w8618_eth_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
mv88w8618_eth_state *s = opaque;
switch (offset) {
case MP_ETH_SMIR:
s->smir = value;
break;
case MP_ETH_PCXR:
s->vlan_header = ((value >> MP... | {
"code": [
" case MP_ETH_CTDP0 ... MP_ETH_CTDP3:",
" case MP_ETH_CTDP0 ... MP_ETH_CTDP3:"
],
"line_no": [
93,
93
]
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
mv88w8618_eth_state *s = VAR_0;
switch (VAR_1) {
case MP_ETH_SMIR:
s->smir = VAR_2;
break;
case MP_ETH_PCXR:
s->vlan_header = ((VAR_2 >> MP_ETH_PCXR_2BSM_B... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"mv88w8618_eth_state *s = VAR_0;",
"switch (VAR_1) {",
"case MP_ETH_SMIR:\ns->smir = VAR_2;",
"break;",
"case MP_ETH_PCXR:\ns->vlan_header = ((VAR_2 >> MP_ETH_PCXR_2BSM_BIT) & 1) * 2;",
"break;",
"case MP_ETH_SDCMR:\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
21,
23
],
[
25
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53... |
13,998 | static int config_props(AVFilterLink *inlink)
{
FadeContext *s = inlink->dst->priv;
const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(inlink->format);
s->hsub = pixdesc->log2_chroma_w;
s->vsub = pixdesc->log2_chroma_h;
s->bpp = av_get_bits_per_pixel(pixdesc) >> 3;
s->alpha &= !!... | true | FFmpeg | ab3ff19f08b7a83e320c39ab066f289c242b8030 | static int config_props(AVFilterLink *inlink)
{
FadeContext *s = inlink->dst->priv;
const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(inlink->format);
s->hsub = pixdesc->log2_chroma_w;
s->vsub = pixdesc->log2_chroma_h;
s->bpp = av_get_bits_per_pixel(pixdesc) >> 3;
s->alpha &= !!... | {
"code": [
" s->bpp = av_get_bits_per_pixel(pixdesc) >> 3;"
],
"line_no": [
17
]
} | static int FUNC_0(AVFilterLink *VAR_0)
{
FadeContext *s = VAR_0->dst->priv;
const AVPixFmtDescriptor *VAR_1 = av_pix_fmt_desc_get(VAR_0->format);
s->hsub = VAR_1->log2_chroma_w;
s->vsub = VAR_1->log2_chroma_h;
s->bpp = av_get_bits_per_pixel(VAR_1) >> 3;
s->alpha &= !!(VAR_1->flags & A... | [
"static int FUNC_0(AVFilterLink *VAR_0)\n{",
"FadeContext *s = VAR_0->dst->priv;",
"const AVPixFmtDescriptor *VAR_1 = av_pix_fmt_desc_get(VAR_0->format);",
"s->hsub = VAR_1->log2_chroma_w;",
"s->vsub = VAR_1->log2_chroma_h;",
"s->bpp = av_get_bits_per_pixel(VAR_1) >> 3;",
"s->alpha &= !!(VAR_1->flags & ... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
27,
29
],
[
35
],
[
37
],
[
39
]
] |
13,999 | static void gen_msa(CPUMIPSState *env, DisasContext *ctx)
{
uint32_t opcode = ctx->opcode;
check_insn(ctx, ASE_MSA);
check_msa_access(ctx);
switch (MASK_MSA_MINOR(opcode)) {
case OPC_MSA_I8_00:
case OPC_MSA_I8_01:
case OPC_MSA_I8_02:
gen_msa_i8(env, ctx);
break;
... | true | qemu | 0af7a37054310384e00209e0a43efe95b7c19ef0 | static void gen_msa(CPUMIPSState *env, DisasContext *ctx)
{
uint32_t opcode = ctx->opcode;
check_insn(ctx, ASE_MSA);
check_msa_access(ctx);
switch (MASK_MSA_MINOR(opcode)) {
case OPC_MSA_I8_00:
case OPC_MSA_I8_01:
case OPC_MSA_I8_02:
gen_msa_i8(env, ctx);
break;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(CPUMIPSState *VAR_0, DisasContext *VAR_1)
{
uint32_t opcode = VAR_1->opcode;
check_insn(VAR_1, ASE_MSA);
check_msa_access(VAR_1);
switch (MASK_MSA_MINOR(opcode)) {
case OPC_MSA_I8_00:
case OPC_MSA_I8_01:
case OPC_MSA_I8_02:
gen_msa_i8(VAR_0, VAR_1);
... | [
"static void FUNC_0(CPUMIPSState *VAR_0, DisasContext *VAR_1)\n{",
"uint32_t opcode = VAR_1->opcode;",
"check_insn(VAR_1, ASE_MSA);",
"check_msa_access(VAR_1);",
"switch (MASK_MSA_MINOR(opcode)) {",
"case OPC_MSA_I8_00:\ncase OPC_MSA_I8_01:\ncase OPC_MSA_I8_02:\ngen_msa_i8(VAR_0, VAR_1);",
"break;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17,
19,
21
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33,
35,
37
],
[
39
],
[
41,
43,
45,
47,
49,
51,
53,
55,
57,
59
... |
14,000 | static BlockAIOCB *read_fifo_child(QuorumAIOCB *acb)
{
BDRVQuorumState *s = acb->common.bs->opaque;
acb->qcrs[acb->child_iter].buf =
qemu_blockalign(s->children[acb->child_iter]->bs, acb->qiov->size);
qemu_iovec_init(&acb->qcrs[acb->child_iter].qiov, acb->qiov->niov);
qemu_iovec_clone(&a... | true | qemu | b9c600d20716b3d942cb07188ff998fb236a8365 | static BlockAIOCB *read_fifo_child(QuorumAIOCB *acb)
{
BDRVQuorumState *s = acb->common.bs->opaque;
acb->qcrs[acb->child_iter].buf =
qemu_blockalign(s->children[acb->child_iter]->bs, acb->qiov->size);
qemu_iovec_init(&acb->qcrs[acb->child_iter].qiov, acb->qiov->niov);
qemu_iovec_clone(&a... | {
"code": [
" bdrv_aio_readv(s->children[acb->child_iter]->bs, acb->sector_num,",
" &acb->qcrs[acb->child_iter].qiov, acb->nb_sectors,",
" quorum_aio_cb, &acb->qcrs[acb->child_iter]);"
],
"line_no": [
19,
21,
23
]
} | static BlockAIOCB *FUNC_0(QuorumAIOCB *acb)
{
BDRVQuorumState *s = acb->common.bs->opaque;
acb->qcrs[acb->child_iter].buf =
qemu_blockalign(s->children[acb->child_iter]->bs, acb->qiov->size);
qemu_iovec_init(&acb->qcrs[acb->child_iter].qiov, acb->qiov->niov);
qemu_iovec_clone(&acb->qcrs[... | [
"static BlockAIOCB *FUNC_0(QuorumAIOCB *acb)\n{",
"BDRVQuorumState *s = acb->common.bs->opaque;",
"acb->qcrs[acb->child_iter].buf =\nqemu_blockalign(s->children[acb->child_iter]->bs, acb->qiov->size);",
"qemu_iovec_init(&acb->qcrs[acb->child_iter].qiov, acb->qiov->niov);",
"qemu_iovec_clone(&acb->qcrs[acb->... | [
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15,
17
],
[
19,
21,
23
],
[
27
],
[
29
]
] |
14,002 | static void qmp_monitor_complete(void *opaque, QObject *ret_data)
{
monitor_protocol_emitter(opaque, ret_data);
}
| true | qemu | 65207c59d99f2260c5f1d3b9c491146616a522aa | static void qmp_monitor_complete(void *opaque, QObject *ret_data)
{
monitor_protocol_emitter(opaque, ret_data);
}
| {
"code": [
"static void qmp_monitor_complete(void *opaque, QObject *ret_data)",
" monitor_protocol_emitter(opaque, ret_data);"
],
"line_no": [
1,
5
]
} | static void FUNC_0(void *VAR_0, QObject *VAR_1)
{
monitor_protocol_emitter(VAR_0, VAR_1);
}
| [
"static void FUNC_0(void *VAR_0, QObject *VAR_1)\n{",
"monitor_protocol_emitter(VAR_0, VAR_1);",
"}"
] | [
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
14,003 | static int old_codec37(SANMVideoContext *ctx, int top,
int left, int width, int height)
{
int stride = ctx->pitch;
int i, j, k, t;
int skip_run = 0;
int compr, mvoff, seq, flags;
uint32_t decoded_size;
uint8_t *dst, *prev;
compr = bytestream2_get_byte... | true | FFmpeg | 5260edee7e5bd975837696c8c8c1a80eb2fbd7c1 | static int old_codec37(SANMVideoContext *ctx, int top,
int left, int width, int height)
{
int stride = ctx->pitch;
int i, j, k, t;
int skip_run = 0;
int compr, mvoff, seq, flags;
uint32_t decoded_size;
uint8_t *dst, *prev;
compr = bytestream2_get_byte... | {
"code": [
" if (decoded_size > height * stride - left - top * stride) {",
" decoded_size = height * stride - left - top * stride;",
" if (decoded_size > height * stride - left - top * stride) {",
" decoded_size = height * stride - left - top * stride;"
],
"line_no": [
37,... | static int FUNC_0(SANMVideoContext *VAR_0, int VAR_1,
int VAR_2, int VAR_3, int VAR_4)
{
int VAR_5 = VAR_0->pitch;
int VAR_6, VAR_7, VAR_8, VAR_9;
int VAR_10 = 0;
int VAR_11, VAR_12, VAR_13, VAR_14;
uint32_t decoded_size;
uint8_t *dst, *prev;
VAR_11 =... | [
"static int FUNC_0(SANMVideoContext *VAR_0, int VAR_1,\nint VAR_2, int VAR_3, int VAR_4)\n{",
"int VAR_5 = VAR_0->pitch;",
"int VAR_6, VAR_7, VAR_8, VAR_9;",
"int VAR_10 = 0;",
"int VAR_11, VAR_12, VAR_13, VAR_14;",
"uint32_t decoded_size;",
"uint8_t *dst, *prev;",
"VAR_11 = bytestream2_get_byt... | [
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,
0,
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
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[... |
14,004 | static int calculate_refcounts(BlockDriverState *bs, BdrvCheckResult *res,
BdrvCheckMode fix, bool *rebuild,
void **refcount_table, int64_t *nb_clusters)
{
BDRVQcow2State *s = bs->opaque;
int64_t i;
QCowSnapshot *sn;
int ret;
if (!*refcou... | true | qemu | 4652b8f3e1ec91bb9d6f00e40df7f96d1f1aafee | static int calculate_refcounts(BlockDriverState *bs, BdrvCheckResult *res,
BdrvCheckMode fix, bool *rebuild,
void **refcount_table, int64_t *nb_clusters)
{
BDRVQcow2State *s = bs->opaque;
int64_t i;
QCowSnapshot *sn;
int ret;
if (!*refcou... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, BdrvCheckResult *VAR_1,
BdrvCheckMode VAR_2, bool *VAR_3,
void **VAR_4, int64_t *VAR_5)
{
BDRVQcow2State *s = VAR_0->opaque;
int64_t i;
QCowSnapshot *sn;
int VAR_6;
if (!*VAR_4) {
int64_t... | [
"static int FUNC_0(BlockDriverState *VAR_0, BdrvCheckResult *VAR_1,\nBdrvCheckMode VAR_2, bool *VAR_3,\nvoid **VAR_4, int64_t *VAR_5)\n{",
"BDRVQcow2State *s = VAR_0->opaque;",
"int64_t i;",
"QCowSnapshot *sn;",
"int VAR_6;",
"if (!*VAR_4) {",
"int64_t old_size = 0;",
"VAR_6 = realloc_refcount_array(s... | [
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
],
[
15
],
[
17,
18
],
[
20
],
[
21
],
[
22,
23
],
[
24
],
[
26,
27
],
[
28
]
... |
14,005 | static uint64_t calc_rice_params(RiceContext *rc,
uint32_t udata[FLAC_MAX_BLOCKSIZE],
uint64_t sums[32][MAX_PARTITIONS],
int pmin, int pmax,
const int32_t *data, int n, int pred_order,... | true | FFmpeg | 2469ed32c81ebf2347e6883091c566724b286167 | static uint64_t calc_rice_params(RiceContext *rc,
uint32_t udata[FLAC_MAX_BLOCKSIZE],
uint64_t sums[32][MAX_PARTITIONS],
int pmin, int pmax,
const int32_t *data, int n, int pred_order,... | {
"code": [
" if (bits[i] < bits[opt_porder]) {"
],
"line_no": [
55
]
} | static uint64_t FUNC_0(RiceContext *rc,
uint32_t udata[FLAC_MAX_BLOCKSIZE],
uint64_t sums[32][MAX_PARTITIONS],
int pmin, int pmax,
const int32_t *data, int n, int pred_order, int exact... | [
"static uint64_t FUNC_0(RiceContext *rc,\nuint32_t udata[FLAC_MAX_BLOCKSIZE],\nuint64_t sums[32][MAX_PARTITIONS],\nint pmin, int pmax,\nconst int32_t *data, int n, int pred_order, int exact)\n{",
"int VAR_0;",
"uint64_t bits[MAX_PARTITION_ORDER+1];",
"int VAR_1;",
"RiceContext tmp_rc;",
"int VAR_2 = (1 <<... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
14,006 | static void nvdimm_realize(PCDIMMDevice *dimm, Error **errp)
{
MemoryRegion *mr = host_memory_backend_get_memory(dimm->hostmem, errp);
NVDIMMDevice *nvdimm = NVDIMM(dimm);
uint64_t align, pmem_size, size = memory_region_size(mr);
align = memory_region_get_alignment(mr);
pmem_size = size - ... | true | qemu | cdcab9d94101a6dd9ac8136c6f2cd15b6a997896 | static void nvdimm_realize(PCDIMMDevice *dimm, Error **errp)
{
MemoryRegion *mr = host_memory_backend_get_memory(dimm->hostmem, errp);
NVDIMMDevice *nvdimm = NVDIMM(dimm);
uint64_t align, pmem_size, size = memory_region_size(mr);
align = memory_region_get_alignment(mr);
pmem_size = size - ... | {
"code": [],
"line_no": []
} | static void FUNC_0(PCDIMMDevice *VAR_0, Error **VAR_1)
{
MemoryRegion *mr = host_memory_backend_get_memory(VAR_0->hostmem, VAR_1);
NVDIMMDevice *nvdimm = NVDIMM(VAR_0);
uint64_t align, pmem_size, size = memory_region_size(mr);
align = memory_region_get_alignment(mr);
pmem_size = size - nvd... | [
"static void FUNC_0(PCDIMMDevice *VAR_0, Error **VAR_1)\n{",
"MemoryRegion *mr = host_memory_backend_get_memory(VAR_0->hostmem, VAR_1);",
"NVDIMMDevice *nvdimm = NVDIMM(VAR_0);",
"uint64_t align, pmem_size, size = memory_region_size(mr);",
"align = memory_region_get_alignment(mr);",
"pmem_size = size - nv... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33,
35,
37,
39
],
[
42
],
[
44
],
[
48,
50
],
[
52
],
[
54
]
] |
14,007 | ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
int output_rate, int input_rate,
enum AVSampleFormat sample_fmt_out,
enum AVSampleFormat sample_fmt_in,
... | true | FFmpeg | e8876902a9021ec185ca785653067dd34f24c5ce | ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
int output_rate, int input_rate,
enum AVSampleFormat sample_fmt_out,
enum AVSampleFormat sample_fmt_in,
... | {
"code": [
" if (output_channels > 2 &&",
" !(output_channels == 6 && input_channels == 2) &&",
" output_channels != input_channels) {",
" av_log(NULL, AV_LOG_ERROR,",
" \"Resampling output channel count must be 1 or 2 for mono input; 1, 2 or 6 for stereo inp... | ReSampleContext *FUNC_0(int output_channels, int input_channels,
int output_rate, int input_rate,
enum AVSampleFormat sample_fmt_out,
enum AVSampleFormat sample_fmt_in,
... | [
"ReSampleContext *FUNC_0(int output_channels, int input_channels,\nint output_rate, int input_rate,\nenum AVSampleFormat sample_fmt_out,\nenum AVSampleFormat sample_fmt_in,\nint filter_length, int log2_phase_count,\nint linear, double cutoff)\n{",
"ReSampleContext *s;",
"if (input_channels > MAX_CHANNELS) {",
... | [
0,
0,
0,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
19
],
[
21,
23,
25
],
[
27
],
[
29
],
[
31,
33,
35
],
[
37,
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
14,008 | static void gen_sync(DisasContext *ctx)
{
uint32_t l = (ctx->opcode >> 21) & 3;
/*
* We may need to check for a pending TLB flush.
*
* We do this on ptesync (l == 2) on ppc64 and any sync pn ppc32.
*
* Additionally, this can only happen in kernel mode however so
* check ... | true | qemu | e3cffe6fad29e07d401eabb913a6d88501d5c143 | static void gen_sync(DisasContext *ctx)
{
uint32_t l = (ctx->opcode >> 21) & 3;
if (((l == 2) || !(ctx->insns_flags & PPC_64B)) && !ctx->pr) {
gen_check_tlb_flush(ctx);
}
}
| {
"code": [
" gen_check_tlb_flush(ctx);",
" gen_check_tlb_flush(ctx);"
],
"line_no": [
27,
27
]
} | static void FUNC_0(DisasContext *VAR_0)
{
uint32_t l = (VAR_0->opcode >> 21) & 3;
if (((l == 2) || !(VAR_0->insns_flags & PPC_64B)) && !VAR_0->pr) {
gen_check_tlb_flush(VAR_0);
}
}
| [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"uint32_t l = (VAR_0->opcode >> 21) & 3;",
"if (((l == 2) || !(VAR_0->insns_flags & PPC_64B)) && !VAR_0->pr) {",
"gen_check_tlb_flush(VAR_0);",
"}",
"}"
] | [
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
14,009 | static int qcrypto_ivgen_essiv_calculate(QCryptoIVGen *ivgen,
uint64_t sector,
uint8_t *iv, size_t niv,
Error **errp)
{
QCryptoIVGenESSIV *essiv = ivgen->private;
size_t ndata = qcryp... | true | qemu | 83e33300a2342c5d0bf48474fdf8da22c22b4973 | static int qcrypto_ivgen_essiv_calculate(QCryptoIVGen *ivgen,
uint64_t sector,
uint8_t *iv, size_t niv,
Error **errp)
{
QCryptoIVGenESSIV *essiv = ivgen->private;
size_t ndata = qcryp... | {
"code": [
" memcpy(data, (uint8_t *)§or, ndata);"
],
"line_no": [
21
]
} | static int FUNC_0(QCryptoIVGen *VAR_0,
uint64_t VAR_1,
uint8_t *VAR_2, size_t VAR_3,
Error **VAR_4)
{
QCryptoIVGenESSIV *essiv = VAR_0->private;
size_t ndata = qcrypto_cipher_get_bloc... | [
"static int FUNC_0(QCryptoIVGen *VAR_0,\nuint64_t VAR_1,\nuint8_t *VAR_2, size_t VAR_3,\nError **VAR_4)\n{",
"QCryptoIVGenESSIV *essiv = VAR_0->private;",
"size_t ndata = qcrypto_cipher_get_block_len(VAR_0->cipher);",
"uint8_t *data = g_new(uint8_t, ndata);",
"VAR_1 = cpu_to_le64(VAR_1);",
"memcpy(data, (... | [
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,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33,
35,
37,
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
],
[... |
14,010 | void ff_nut_free_sp(NUTContext *nut)
{
av_tree_enumerate(nut->syncpoints, NULL, NULL, enu_free);
av_tree_destroy(nut->syncpoints);
}
| true | FFmpeg | 56c182c4d716b8b72156ff57a0c8d72087db8549 | void ff_nut_free_sp(NUTContext *nut)
{
av_tree_enumerate(nut->syncpoints, NULL, NULL, enu_free);
av_tree_destroy(nut->syncpoints);
}
| {
"code": [
" av_tree_enumerate(nut->syncpoints, NULL, NULL, enu_free);",
" av_tree_destroy(nut->syncpoints);"
],
"line_no": [
5,
7
]
} | void FUNC_0(NUTContext *VAR_0)
{
av_tree_enumerate(VAR_0->syncpoints, NULL, NULL, enu_free);
av_tree_destroy(VAR_0->syncpoints);
}
| [
"void FUNC_0(NUTContext *VAR_0)\n{",
"av_tree_enumerate(VAR_0->syncpoints, NULL, NULL, enu_free);",
"av_tree_destroy(VAR_0->syncpoints);",
"}"
] | [
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
14,011 | static void memory_region_oldmmio_write_accessor(MemoryRegion *mr,
hwaddr addr,
uint64_t *value,
unsigned size,
unsigned... | true | qemu | cc05c43ad942165ecc6ffd39e41991bee43af044 | static void memory_region_oldmmio_write_accessor(MemoryRegion *mr,
hwaddr addr,
uint64_t *value,
unsigned size,
unsigned... | {
"code": [
" uint64_t tmp;",
"static void memory_region_oldmmio_write_accessor(MemoryRegion *mr,",
" hwaddr addr,",
" uint64_t *value,",
" unsigned si... | static void FUNC_0(MemoryRegion *VAR_0,
hwaddr VAR_1,
uint64_t *VAR_2,
unsigned VAR_3,
unsigned VAR_4,
... | [
"static void FUNC_0(MemoryRegion *VAR_0,\nhwaddr VAR_1,\nuint64_t *VAR_2,\nunsigned VAR_3,\nunsigned VAR_4,\nuint64_t VAR_5)\n{",
"uint64_t tmp;",
"tmp = (*VAR_2 >> VAR_4) & VAR_5;",
"trace_memory_region_ops_write(VAR_0, VAR_1, tmp, VAR_3);",
"VAR_0->ops->old_mmio.write[ctz32(VAR_3)](VAR_0->opaque, VAR_1, t... | [
1,
1,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
14,012 | static void scsi_cmd_xfer_mode(SCSICommand *cmd)
{
if (!cmd->xfer) {
cmd->mode = SCSI_XFER_NONE;
return;
}
switch (cmd->buf[0]) {
case WRITE_6:
case WRITE_10:
case WRITE_VERIFY_10:
case WRITE_12:
case WRITE_VERIFY_12:
case WRITE_16:
case WRITE_VERIFY_... | true | qemu | 381b634c275ca1a2806e97392527bbfc01bcb333 | static void scsi_cmd_xfer_mode(SCSICommand *cmd)
{
if (!cmd->xfer) {
cmd->mode = SCSI_XFER_NONE;
return;
}
switch (cmd->buf[0]) {
case WRITE_6:
case WRITE_10:
case WRITE_VERIFY_10:
case WRITE_12:
case WRITE_VERIFY_12:
case WRITE_16:
case WRITE_VERIFY_... | {
"code": [],
"line_no": []
} | static void FUNC_0(SCSICommand *VAR_0)
{
if (!VAR_0->xfer) {
VAR_0->mode = SCSI_XFER_NONE;
return;
}
switch (VAR_0->buf[0]) {
case WRITE_6:
case WRITE_10:
case WRITE_VERIFY_10:
case WRITE_12:
case WRITE_VERIFY_12:
case WRITE_16:
case WRITE_VERIFY_16:
... | [
"static void FUNC_0(SCSICommand *VAR_0)\n{",
"if (!VAR_0->xfer) {",
"VAR_0->mode = SCSI_XFER_NONE;",
"return;",
"}",
"switch (VAR_0->buf[0]) {",
"case WRITE_6:\ncase WRITE_10:\ncase WRITE_VERIFY_10:\ncase WRITE_12:\ncase WRITE_VERIFY_12:\ncase WRITE_16:\ncase WRITE_VERIFY_16:\ncase COPY:\ncase COPY_VERI... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15,
17,
19,
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,
63,
65,
67,... |
14,013 | static void test_visitor_in_union_flat(TestInputVisitorData *data,
const void *unused)
{
Visitor *v;
UserDefFlatUnion *tmp;
UserDefUnionBase *base;
v = visitor_input_test_init(data,
"{ 'enum1': 'value1', "
... | true | qemu | 544a3731591f5d53e15f22de00ce5ac758d490b3 | static void test_visitor_in_union_flat(TestInputVisitorData *data,
const void *unused)
{
Visitor *v;
UserDefFlatUnion *tmp;
UserDefUnionBase *base;
v = visitor_input_test_init(data,
"{ 'enum1': 'value1', "
... | {
"code": [
" g_assert_cmpint(tmp->u.value1->boolean, ==, true);"
],
"line_no": [
35
]
} | static void FUNC_0(TestInputVisitorData *VAR_0,
const void *VAR_1)
{
Visitor *v;
UserDefFlatUnion *tmp;
UserDefUnionBase *base;
v = visitor_input_test_init(VAR_0,
"{ 'enum1': 'value1', "
"'in... | [
"static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"Visitor *v;",
"UserDefFlatUnion *tmp;",
"UserDefUnionBase *base;",
"v = visitor_input_test_init(VAR_0,\n\"{ 'enum1': 'value1', \"",
"\"'integer': 41, \"\n\"'string': 'str', \"\n\"'boolean': true }\");",
"visit_type_UserDefFlatUni... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
19,
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
]
] |
14,015 | static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
{
AVIOContext *pb = s->pb;
APEContext *ape = s->priv_data;
AVStream *st;
uint32_t tag;
int i;
int total_blocks;
int64_t pts;
/* TODO: Skip any leading junk such as id3v2 tags */
ape->junklength = 0;
... | true | FFmpeg | 1c31b26bdf66879a46a7a3e340da815c1b2125a8 | static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
{
AVIOContext *pb = s->pb;
APEContext *ape = s->priv_data;
AVStream *st;
uint32_t tag;
int i;
int total_blocks;
int64_t pts;
ape->junklength = 0;
tag = avio_rl32(pb);
if (tag != MKTAG('M... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext * VAR_0, AVFormatParameters * VAR_1)
{
AVIOContext *pb = VAR_0->pb;
APEContext *ape = VAR_0->priv_data;
AVStream *st;
uint32_t tag;
int VAR_2;
int VAR_3;
int64_t pts;
ape->junklength = 0;
tag = avio_rl32(pb);
if (tag != MKTAG... | [
"static int FUNC_0(AVFormatContext * VAR_0, AVFormatParameters * VAR_1)\n{",
"AVIOContext *pb = VAR_0->pb;",
"APEContext *ape = VAR_0->priv_data;",
"AVStream *st;",
"uint32_t tag;",
"int VAR_2;",
"int VAR_3;",
"int64_t pts;",
"ape->junklength = 0;",
"tag = avio_rl32(pb);",
"if (tag != MKTAG('M',... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29,
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
48
],
[
50
],
[
52
],
[
54
],
[... |
14,016 | static int buf_close(void *opaque)
{
QEMUBuffer *s = opaque;
qsb_free(s->qsb);
g_free(s);
return 0;
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static int buf_close(void *opaque)
{
QEMUBuffer *s = opaque;
qsb_free(s->qsb);
g_free(s);
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0)
{
QEMUBuffer *s = VAR_0;
qsb_free(s->qsb);
g_free(s);
return 0;
}
| [
"static int FUNC_0(void *VAR_0)\n{",
"QEMUBuffer *s = VAR_0;",
"qsb_free(s->qsb);",
"g_free(s);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
17
],
[
19
]
] |
14,017 | static const struct URLProtocol *url_find_protocol(const char *filename)
{
const URLProtocol **protocols;
char proto_str[128], proto_nested[128], *ptr;
size_t proto_len = strspn(filename, URL_SCHEME_CHARS);
int i;
if (filename[proto_len] != ':' &&
(strncmp(filename, "subfile,", 8) |... | true | FFmpeg | 936751b6527cff789ef077a4e43a04ae9e658232 | static const struct URLProtocol *url_find_protocol(const char *filename)
{
const URLProtocol **protocols;
char proto_str[128], proto_nested[128], *ptr;
size_t proto_len = strspn(filename, URL_SCHEME_CHARS);
int i;
if (filename[proto_len] != ':' &&
(strncmp(filename, "subfile,", 8) |... | {
"code": [],
"line_no": []
} | static const struct URLProtocol *FUNC_0(const char *VAR_0)
{
const URLProtocol **VAR_1;
char VAR_2[128], VAR_3[128], *VAR_4;
size_t proto_len = strspn(VAR_0, URL_SCHEME_CHARS);
int VAR_5;
if (VAR_0[proto_len] != ':' &&
(strncmp(VAR_0, "subfile,", 8) || !strchr(VAR_0 + proto_len + 1,... | [
"static const struct URLProtocol *FUNC_0(const char *VAR_0)\n{",
"const URLProtocol **VAR_1;",
"char VAR_2[128], VAR_3[128], *VAR_4;",
"size_t proto_len = strspn(VAR_0, URL_SCHEME_CHARS);",
"int VAR_5;",
"if (VAR_0[proto_len] != ':' &&\n(strncmp(VAR_0, \"subfile,\", 8) || !strchr(VAR_0 + proto_len + 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,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17,
19,
21
],
[
23,
25,
27
],
[
31,
33
],
[
35
],
[
37,
39
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[... |
14,018 | void qmp_nbd_server_stop(Error **errp)
{
while (!QTAILQ_EMPTY(&close_notifiers)) {
NBDCloseNotifier *cn = QTAILQ_FIRST(&close_notifiers);
nbd_close_notifier(&cn->n, nbd_export_get_blockdev(cn->exp));
}
qemu_set_fd_handler2(server_fd, NULL, NULL, NULL, NULL);
close(server_fd);
... | true | qemu | fc6467eaf22f974620b5dd046afca04e619f9be9 | void qmp_nbd_server_stop(Error **errp)
{
while (!QTAILQ_EMPTY(&close_notifiers)) {
NBDCloseNotifier *cn = QTAILQ_FIRST(&close_notifiers);
nbd_close_notifier(&cn->n, nbd_export_get_blockdev(cn->exp));
}
qemu_set_fd_handler2(server_fd, NULL, NULL, NULL, NULL);
close(server_fd);
... | {
"code": [
" qemu_set_fd_handler2(server_fd, NULL, NULL, NULL, NULL);",
" close(server_fd);",
" server_fd = -1;"
],
"line_no": [
15,
17,
19
]
} | void FUNC_0(Error **VAR_0)
{
while (!QTAILQ_EMPTY(&close_notifiers)) {
NBDCloseNotifier *cn = QTAILQ_FIRST(&close_notifiers);
nbd_close_notifier(&cn->n, nbd_export_get_blockdev(cn->exp));
}
qemu_set_fd_handler2(server_fd, NULL, NULL, NULL, NULL);
close(server_fd);
server_fd... | [
"void FUNC_0(Error **VAR_0)\n{",
"while (!QTAILQ_EMPTY(&close_notifiers)) {",
"NBDCloseNotifier *cn = QTAILQ_FIRST(&close_notifiers);",
"nbd_close_notifier(&cn->n, nbd_export_get_blockdev(cn->exp));",
"}",
"qemu_set_fd_handler2(server_fd, NULL, NULL, NULL, NULL);",
"close(server_fd);",
"server_fd = -1... | [
0,
0,
0,
0,
0,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
14,019 | int arm_reset_cpu(uint64_t cpuid)
{
CPUState *target_cpu_state;
ARMCPU *target_cpu;
DPRINTF("cpu %" PRId64 "\n", cpuid);
/* change to the cpu we are resetting */
target_cpu_state = arm_get_cpu_by_id(cpuid);
if (!target_cpu_state) {
return QEMU_ARM_POWERCTL_INVALID_PARAM;
... | true | qemu | 062ba099e01ff1474be98c0a4f3da351efab5d9d | int arm_reset_cpu(uint64_t cpuid)
{
CPUState *target_cpu_state;
ARMCPU *target_cpu;
DPRINTF("cpu %" PRId64 "\n", cpuid);
target_cpu_state = arm_get_cpu_by_id(cpuid);
if (!target_cpu_state) {
return QEMU_ARM_POWERCTL_INVALID_PARAM;
}
target_cpu = ARM_CPU(target_cpu_... | {
"code": [
" cpu_reset(target_cpu_state);",
" if (target_cpu->powered_off) {",
" if (target_cpu->powered_off) {",
" cpu_reset(target_cpu_state);"
],
"line_no": [
43,
27,
27,
43
]
} | int FUNC_0(uint64_t VAR_0)
{
CPUState *target_cpu_state;
ARMCPU *target_cpu;
DPRINTF("cpu %" PRId64 "\n", VAR_0);
target_cpu_state = arm_get_cpu_by_id(VAR_0);
if (!target_cpu_state) {
return QEMU_ARM_POWERCTL_INVALID_PARAM;
}
target_cpu = ARM_CPU(target_cpu_state);... | [
"int FUNC_0(uint64_t VAR_0)\n{",
"CPUState *target_cpu_state;",
"ARMCPU *target_cpu;",
"DPRINTF(\"cpu %\" PRId64 \"\\n\", VAR_0);",
"target_cpu_state = arm_get_cpu_by_id(VAR_0);",
"if (!target_cpu_state) {",
"return QEMU_ARM_POWERCTL_INVALID_PARAM;",
"}",
"target_cpu = ARM_CPU(target_cpu_state);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37
],
[
43
],
[
47
],
[
49
]
] |
14,020 | static void postprocess_chroma(AVFrame *frame, int w, int h, int depth)
{
uint16_t *dstu = (uint16_t *)frame->data[1];
uint16_t *dstv = (uint16_t *)frame->data[2];
int16_t *srcu = (int16_t *)frame->data[1];
int16_t *srcv = (int16_t *)frame->data[2];
ptrdiff_t strideu = frame->linesize[1] / 2... | true | FFmpeg | 43cd33be16b21b9a217025e208f4ffbf0bf81da4 | static void postprocess_chroma(AVFrame *frame, int w, int h, int depth)
{
uint16_t *dstu = (uint16_t *)frame->data[1];
uint16_t *dstv = (uint16_t *)frame->data[2];
int16_t *srcu = (int16_t *)frame->data[1];
int16_t *srcv = (int16_t *)frame->data[2];
ptrdiff_t strideu = frame->linesize[1] / 2... | {
"code": [
" const int add = 1 << (depth - 1);",
" const int shift = 16 - depth;"
],
"line_no": [
17,
19
]
} | static void FUNC_0(AVFrame *VAR_0, int VAR_1, int VAR_2, int VAR_3)
{
uint16_t *dstu = (uint16_t *)VAR_0->data[1];
uint16_t *dstv = (uint16_t *)VAR_0->data[2];
int16_t *srcu = (int16_t *)VAR_0->data[1];
int16_t *srcv = (int16_t *)VAR_0->data[2];
ptrdiff_t strideu = VAR_0->linesize[1] / 2;
... | [
"static void FUNC_0(AVFrame *VAR_0, int VAR_1, int VAR_2, int VAR_3)\n{",
"uint16_t *dstu = (uint16_t *)VAR_0->data[1];",
"uint16_t *dstv = (uint16_t *)VAR_0->data[2];",
"int16_t *srcu = (int16_t *)VAR_0->data[1];",
"int16_t *srcv = (int16_t *)VAR_0->data[2];",
"ptrdiff_t strideu = VAR_0->linesize[1] / ... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
14,021 | static void id3v2_parse(AVFormatContext *s, int len, uint8_t version,
uint8_t flags, ID3v2ExtraMeta **extra_meta)
{
int isv34, tlen, unsync;
char tag[5];
int64_t next, end = avio_tell(s->pb) + len;
int taghdrlen;
const char *reason = NULL;
AVIOContext pb;
AVI... | false | FFmpeg | af4cc2605c7a56ecfd84c264aa2b325020418472 | static void id3v2_parse(AVFormatContext *s, int len, uint8_t version,
uint8_t flags, ID3v2ExtraMeta **extra_meta)
{
int isv34, tlen, unsync;
char tag[5];
int64_t next, end = avio_tell(s->pb) + len;
int taghdrlen;
const char *reason = NULL;
AVIOContext pb;
AVI... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVFormatContext *VAR_0, int VAR_1, uint8_t VAR_2,
uint8_t VAR_3, ID3v2ExtraMeta **VAR_4)
{
int VAR_5, VAR_6, VAR_7;
char VAR_8[5];
int64_t next, end = avio_tell(VAR_0->pb) + VAR_1;
int VAR_9;
const char *VAR_10 = NULL;
AVIOContext pb;
AVIOC... | [
"static void FUNC_0(AVFormatContext *VAR_0, int VAR_1, uint8_t VAR_2,\nuint8_t VAR_3, ID3v2ExtraMeta **VAR_4)\n{",
"int VAR_5, VAR_6, VAR_7;",
"char VAR_8[5];",
"int64_t next, end = avio_tell(VAR_0->pb) + VAR_1;",
"int VAR_9;",
"const char *VAR_10 = NULL;",
"AVIOContext pb;",
"AVIOContext *pbx;",
"u... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
14,026 | static int ehci_state_fetchqtd(EHCIQueue *q)
{
EHCIqtd qtd;
EHCIPacket *p;
int again = 0;
get_dwords(q->ehci, NLPTR_GET(q->qtdaddr), (uint32_t *) &qtd,
sizeof(EHCIqtd) >> 2);
ehci_trace_qtd(q, NLPTR_GET(q->qtdaddr), &qtd);
p = QTAILQ_FIRST(&q->packets);
if (p != N... | true | qemu | ef5b234477df80700b128f561f5877a0688a70c8 | static int ehci_state_fetchqtd(EHCIQueue *q)
{
EHCIqtd qtd;
EHCIPacket *p;
int again = 0;
get_dwords(q->ehci, NLPTR_GET(q->qtdaddr), (uint32_t *) &qtd,
sizeof(EHCIqtd) >> 2);
ehci_trace_qtd(q, NLPTR_GET(q->qtdaddr), &qtd);
p = QTAILQ_FIRST(&q->packets);
if (p != N... | {
"code": [
" ehci_set_state(q->ehci, q->async, EST_EXECUTE);",
" break;"
],
"line_no": [
75,
77
]
} | static int FUNC_0(EHCIQueue *VAR_0)
{
EHCIqtd qtd;
EHCIPacket *p;
int VAR_1 = 0;
get_dwords(VAR_0->ehci, NLPTR_GET(VAR_0->qtdaddr), (uint32_t *) &qtd,
sizeof(EHCIqtd) >> 2);
ehci_trace_qtd(VAR_0, NLPTR_GET(VAR_0->qtdaddr), &qtd);
p = QTAILQ_FIRST(&VAR_0->packets);
... | [
"static int FUNC_0(EHCIQueue *VAR_0)\n{",
"EHCIqtd qtd;",
"EHCIPacket *p;",
"int VAR_1 = 0;",
"get_dwords(VAR_0->ehci, NLPTR_GET(VAR_0->qtdaddr), (uint32_t *) &qtd,\nsizeof(EHCIqtd) >> 2);",
"ehci_trace_qtd(VAR_0, NLPTR_GET(VAR_0->qtdaddr), &qtd);",
"p = QTAILQ_FIRST(&VAR_0->packets);",
"if (p != NULL... | [
0,
0,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
17
],
[
21
],
[
23
],
[
25,
27,
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
... |
14,028 | static av_always_inline int encode_line(FFV1Context *s, int w,
int16_t *sample[3],
int plane_index, int bits)
{
PlaneContext *const p = &s->plane[plane_index];
RangeCoder *const c = &s->c;
int x;
int run_index = s->... | false | FFmpeg | 3728603f1854b5c79d1a64dd3b41b80640ef1e7f | static av_always_inline int encode_line(FFV1Context *s, int w,
int16_t *sample[3],
int plane_index, int bits)
{
PlaneContext *const p = &s->plane[plane_index];
RangeCoder *const c = &s->c;
int x;
int run_index = s->... | {
"code": [],
"line_no": []
} | static av_always_inline int FUNC_0(FFV1Context *s, int w,
int16_t *sample[3],
int plane_index, int bits)
{
PlaneContext *const p = &s->plane[plane_index];
RangeCoder *const c = &s->c;
int VAR_0;
int VAR_1 = s->VAR_1... | [
"static av_always_inline int FUNC_0(FFV1Context *s, int w,\nint16_t *sample[3],\nint plane_index, int bits)\n{",
"PlaneContext *const p = &s->plane[plane_index];",
"RangeCoder *const c = &s->c;",
"int VAR_0;",
"int VAR_1 = s->VAR_1;",
"int VAR_2 = 0;",
"int VAR_3 = 0;",
"if (s->ac) {",
"if (c->by... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
47
... |
14,029 | static int mpeg4_decode_header(AVCodecParserContext *s1, AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
struct Mp4vParseContext *pc = s1->priv_data;
Mpeg4DecContext *dec_ctx = &pc->dec_ctx;
MpegEncContext *s = &dec_ctx->m;
GetBitContext gb1, *gb = &gb1;
... | true | FFmpeg | 37ec7d291eacedfacdce21332f4c719f2be79d12 | static int mpeg4_decode_header(AVCodecParserContext *s1, AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
struct Mp4vParseContext *pc = s1->priv_data;
Mpeg4DecContext *dec_ctx = &pc->dec_ctx;
MpegEncContext *s = &dec_ctx->m;
GetBitContext gb1, *gb = &gb1;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecParserContext *VAR_0, AVCodecContext *VAR_1,
const uint8_t *VAR_2, int VAR_3)
{
struct Mp4vParseContext *VAR_4 = VAR_0->priv_data;
Mpeg4DecContext *dec_ctx = &VAR_4->dec_ctx;
MpegEncContext *s = &dec_ctx->m;
GetBitContext gb1, *gb = &gb1;
... | [
"static int FUNC_0(AVCodecParserContext *VAR_0, AVCodecContext *VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{",
"struct Mp4vParseContext *VAR_4 = VAR_0->priv_data;",
"Mpeg4DecContext *dec_ctx = &VAR_4->dec_ctx;",
"MpegEncContext *s = &dec_ctx->m;",
"GetBitContext gb1, *gb = &gb1;",
"int VAR_5;",
"s->VAR_1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
48
],
[
50
],
[
52
... |
14,032 | void vnc_tls_client_cleanup(VncState *vs)
{
if (vs->tls.session) {
gnutls_deinit(vs->tls.session);
vs->tls.session = NULL;
}
g_free(vs->tls.dname);
}
| true | qemu | 3e305e4a4752f70c0b5c3cf5b43ec957881714f7 | void vnc_tls_client_cleanup(VncState *vs)
{
if (vs->tls.session) {
gnutls_deinit(vs->tls.session);
vs->tls.session = NULL;
}
g_free(vs->tls.dname);
}
| {
"code": [
"void vnc_tls_client_cleanup(VncState *vs)",
" if (vs->tls.session) {",
" gnutls_deinit(vs->tls.session);",
" vs->tls.session = NULL;",
" g_free(vs->tls.dname);",
" if (vs->tls.session) {",
" if (vs->tls.session) {"
],
"line_no": [
1,
5,
... | void FUNC_0(VncState *VAR_0)
{
if (VAR_0->tls.session) {
gnutls_deinit(VAR_0->tls.session);
VAR_0->tls.session = NULL;
}
g_free(VAR_0->tls.dname);
}
| [
"void FUNC_0(VncState *VAR_0)\n{",
"if (VAR_0->tls.session) {",
"gnutls_deinit(VAR_0->tls.session);",
"VAR_0->tls.session = NULL;",
"}",
"g_free(VAR_0->tls.dname);",
"}"
] | [
1,
1,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
14,033 | void colo_do_failover(MigrationState *s)
{
/* Make sure VM stopped while failover happened. */
if (!colo_runstate_is_stopped()) {
vm_stop_force_state(RUN_STATE_COLO);
}
if (get_colo_mode() == COLO_MODE_PRIMARY) {
primary_vm_do_failover();
}
} | true | qemu | 9d2db3760be9e32414e22889e3e2bffdf4898f32 | void colo_do_failover(MigrationState *s)
{
if (!colo_runstate_is_stopped()) {
vm_stop_force_state(RUN_STATE_COLO);
}
if (get_colo_mode() == COLO_MODE_PRIMARY) {
primary_vm_do_failover();
}
} | {
"code": [],
"line_no": []
} | void FUNC_0(MigrationState *VAR_0)
{
if (!colo_runstate_is_stopped()) {
vm_stop_force_state(RUN_STATE_COLO);
}
if (get_colo_mode() == COLO_MODE_PRIMARY) {
primary_vm_do_failover();
}
} | [
"void FUNC_0(MigrationState *VAR_0)\n{",
"if (!colo_runstate_is_stopped()) {",
"vm_stop_force_state(RUN_STATE_COLO);",
"}",
"if (get_colo_mode() == COLO_MODE_PRIMARY) {",
"primary_vm_do_failover();",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
14,035 | static void test_validate_union_flat(TestInputVisitorData *data,
const void *unused)
{
UserDefFlatUnion *tmp = NULL;
Visitor *v;
Error *err = NULL;
v = validate_test_init(data,
"{ 'enum1': 'value1', "
"'... | true | qemu | 441cbac0c7e641780decbc674a9a68c6a5200f71 | static void test_validate_union_flat(TestInputVisitorData *data,
const void *unused)
{
UserDefFlatUnion *tmp = NULL;
Visitor *v;
Error *err = NULL;
v = validate_test_init(data,
"{ 'enum1': 'value1', "
"'... | {
"code": [],
"line_no": []
} | static void FUNC_0(TestInputVisitorData *VAR_0,
const void *VAR_1)
{
UserDefFlatUnion *tmp = NULL;
Visitor *v;
Error *err = NULL;
v = validate_test_init(VAR_0,
"{ 'enum1': 'value1', "
"'string': 'str', "... | [
"static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"UserDefFlatUnion *tmp = NULL;",
"Visitor *v;",
"Error *err = NULL;",
"v = validate_test_init(VAR_0,\n\"{ 'enum1': 'value1', \"",
"\"'string': 'str', \"\n\"'boolean': true }\");",
"visit_type_UserDefFlatUnion(v, &tmp, NULL, &err);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
19,
21
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
14,036 | static inline void RENAME(yuvPlanartouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
long width, long height,
long lumStride, long chromStride, long dstStride, long vertLumPerChroma)
{
long y;
const long chromWidth= width>>1;
for(y=0; y<height; y++)
{
#ifdef HAVE_MMX
//... | true | FFmpeg | 6e42e6c4b410dbef8b593c2d796a5dad95f89ee4 | static inline void RENAME(yuvPlanartouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
long width, long height,
long lumStride, long chromStride, long dstStride, long vertLumPerChroma)
{
long y;
const long chromWidth= width>>1;
for(y=0; y<height; y++)
{
#ifdef HAVE_MMX
... | {
"code": [
"\tlong width, long height,",
"\tlong width, long height,",
"\tlong width, long height,",
"\tlong width, long height,",
"\tlong width, long height,",
"\tlong width, long height,",
"\tlong width, long height,",
"\tlong width, long height,",
"\tlong width, long height,",
... | static inline void FUNC_0(yuvPlanartouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
long width, long height,
long lumStride, long chromStride, long dstStride, long vertLumPerChroma)
{
long VAR_0;
const long VAR_1= width>>1;
for(VAR_0=0; VAR_0<height; VAR_0++)
{
#ifdef H... | [
"static inline void FUNC_0(yuvPlanartouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,\nlong width, long height,\nlong lumStride, long chromStride, long dstStride, long vertLumPerChroma)\n{",
"long VAR_0;",
"const long VAR_1= width>>1;",
"for(VAR_0=0; VAR_0<height; VAR_0++)",... | [
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
0,
1,
1,
0,
1,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17,
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
47,
49,
51,
53,
55,
57,
59,
61,
65,
67,
69,
71,
75,
77,... |
14,037 | int target_munmap(target_ulong start, target_ulong len)
{
target_ulong end, real_start, real_end, addr;
int prot, ret;
#ifdef DEBUG_MMAP
printf("munmap: start=0x%lx len=0x%lx\n", start, len);
#endif
if (start & ~TARGET_PAGE_MASK)
return -EINVAL;
len = TARGET_PAGE_ALIGN(len);
... | true | qemu | 4118a97030aa9bd1d520d1d06bbe0655d829df04 | int target_munmap(target_ulong start, target_ulong len)
{
target_ulong end, real_start, real_end, addr;
int prot, ret;
#ifdef DEBUG_MMAP
printf("munmap: start=0x%lx len=0x%lx\n", start, len);
#endif
if (start & ~TARGET_PAGE_MASK)
return -EINVAL;
len = TARGET_PAGE_ALIGN(len);
... | {
"code": [
" ret = munmap((void *)real_start, real_end - real_start);"
],
"line_no": [
87
]
} | int FUNC_0(target_ulong VAR_0, target_ulong VAR_1)
{
target_ulong end, real_start, real_end, addr;
int VAR_2, VAR_3;
#ifdef DEBUG_MMAP
printf("munmap: VAR_0=0x%lx VAR_1=0x%lx\n", VAR_0, VAR_1);
#endif
if (VAR_0 & ~TARGET_PAGE_MASK)
return -EINVAL;
VAR_1 = TARGET_PAGE_ALIGN(VAR_1);... | [
"int FUNC_0(target_ulong VAR_0, target_ulong VAR_1)\n{",
"target_ulong end, real_start, real_end, addr;",
"int VAR_2, VAR_3;",
"#ifdef DEBUG_MMAP\nprintf(\"munmap: VAR_0=0x%lx VAR_1=0x%lx\\n\", VAR_0, VAR_1);",
"#endif\nif (VAR_0 & ~TARGET_PAGE_MASK)\nreturn -EINVAL;",
"VAR_1 = TARGET_PAGE_ALIGN(VAR_1);",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15,
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51... |
14,038 | int cpu_exec(CPUState *env)
{
int ret, interrupt_request;
TranslationBlock *tb;
uint8_t *tc_ptr;
unsigned long next_tb;
if (env->halted) {
if (!cpu_has_work(env)) {
return EXCP_HALTED;
}
env->halted = 0;
}
cpu_single_env = env;
if ... | true | qemu | 0d10193870b5a81c3bce13a602a5403c3a55cf6c | int cpu_exec(CPUState *env)
{
int ret, interrupt_request;
TranslationBlock *tb;
uint8_t *tc_ptr;
unsigned long next_tb;
if (env->halted) {
if (!cpu_has_work(env)) {
return EXCP_HALTED;
}
env->halted = 0;
}
cpu_single_env = env;
if ... | {
"code": [],
"line_no": []
} | int FUNC_0(CPUState *VAR_0)
{
int VAR_1, VAR_2;
TranslationBlock *tb;
uint8_t *tc_ptr;
unsigned long VAR_3;
if (VAR_0->halted) {
if (!cpu_has_work(VAR_0)) {
return EXCP_HALTED;
}
VAR_0->halted = 0;
}
cpu_single_env = VAR_0;
if (unl... | [
"int FUNC_0(CPUState *VAR_0)\n{",
"int VAR_1, VAR_2;",
"TranslationBlock *tb;",
"uint8_t *tc_ptr;",
"unsigned long VAR_3;",
"if (VAR_0->halted) {",
"if (!cpu_has_work(VAR_0)) {",
"return EXCP_HALTED;",
"}",
"VAR_0->halted = 0;",
"}",
"cpu_single_env = VAR_0;",
"if (unlikely(exit_request)) {"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43,
47
],
[
49
],
[
51
],
[
53
],
[... |
14,039 | callback(void *priv_data, int index, uint8_t *buf, int buf_size, int64_t time)
{
AVFormatContext *s = priv_data;
struct dshow_ctx *ctx = s->priv_data;
AVPacketList **ppktl, *pktl_next;
// dump_videohdr(s, vdhdr);
WaitForSingleObject(ctx->mutex, INFINITE);
if(shall_we_drop(s))
... | false | FFmpeg | 190f6135b48a97dadd7586f154640bec6468df1b | callback(void *priv_data, int index, uint8_t *buf, int buf_size, int64_t time)
{
AVFormatContext *s = priv_data;
struct dshow_ctx *ctx = s->priv_data;
AVPacketList **ppktl, *pktl_next;
WaitForSingleObject(ctx->mutex, INFINITE);
if(shall_we_drop(s))
goto fail;
pktl_next ... | {
"code": [],
"line_no": []
} | FUNC_0(void *VAR_0, int VAR_1, uint8_t *VAR_2, int VAR_3, int64_t VAR_4)
{
AVFormatContext *s = VAR_0;
struct dshow_ctx *VAR_5 = s->VAR_0;
AVPacketList **ppktl, *pktl_next;
WaitForSingleObject(VAR_5->mutex, INFINITE);
if(shall_we_drop(s))
goto fail;
pktl_next = av_mallo... | [
"FUNC_0(void *VAR_0, int VAR_1, uint8_t *VAR_2, int VAR_3, int64_t VAR_4)\n{",
"AVFormatContext *s = VAR_0;",
"struct dshow_ctx *VAR_5 = s->VAR_0;",
"AVPacketList **ppktl, *pktl_next;",
"WaitForSingleObject(VAR_5->mutex, INFINITE);",
"if(shall_we_drop(s))\ngoto fail;",
"pktl_next = av_mallocz(sizeof(AVP... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
17
],
[
21,
23
],
[
27
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
],
[
59
],
[
63
... |
14,040 | static inline void RENAME(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
uint8_t *dst,
unsigned width, unsigned height,
int srcStride1, int srcStride2,
int srcStride3, int dstStride)
{
unsigned long y,x,w,h;
w=width/2; h=height;
for(y=0;y<h;y++){
const uin... | true | FFmpeg | 7f526efd17973ec6d2204f7a47b6923e2be31363 | static inline void RENAME(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
uint8_t *dst,
unsigned width, unsigned height,
int srcStride1, int srcStride2,
int srcStride3, int dstStride)
{
unsigned long y,x,w,h;
w=width/2; h=height;
for(y=0;y<h;y++){
const uin... | {
"code": [
"\t\t\tunsigned width, unsigned height,",
"\t\t\tint srcStride1, int srcStride2,",
"\t\t\tunsigned width, unsigned height,",
"\t\t\tint srcStride1, int srcStride2,",
"\t\t\tunsigned width, unsigned height,",
"\t\t\tint srcStride1, int srcStride2,",
"\t\t\tunsigned width, unsign... | static inline void FUNC_0(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
uint8_t *dst,
unsigned width, unsigned height,
int srcStride1, int srcStride2,
int srcStride3, int dstStride)
{
unsigned long VAR_0,VAR_1,VAR_2,VAR_3;
VAR_2=width/2; VAR_3=height;
for(V... | [
"static inline void FUNC_0(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,\nuint8_t *dst,\nunsigned width, unsigned height,\nint srcStride1, int srcStride2,\nint srcStride3, int dstStride)\n{",
"unsigned long VAR_0,VAR_1,VAR_2,VAR_3;",
"VAR_2=width/2; VAR_3=height;",
"for(VAR_0=0;... | [
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,... |
14,041 | static int qio_channel_websock_handshake_process(QIOChannelWebsock *ioc,
const char *line,
size_t size,
Error **errp)
{
int ret = -1;
char *protocols = qio_cha... | true | qemu | 07e95cd529af345fdeea230913f68eff5b925bb6 | static int qio_channel_websock_handshake_process(QIOChannelWebsock *ioc,
const char *line,
size_t size,
Error **errp)
{
int ret = -1;
char *protocols = qio_cha... | {
"code": [
" return ret;",
" const char *line,",
" size_t size,",
" int ret = -1;",
" char *protocols = qio_channel_websock_handshake_entry(",
" line, size, QIO_CHANNEL_WEBSOCK_HEAD... | static int FUNC_0(QIOChannelWebsock *VAR_0,
const char *VAR_1,
size_t VAR_2,
Error **VAR_3)
{
int VAR_4 = -1;
char *VAR_5 = qio_channel_websock_handshake_entry... | [
"static int FUNC_0(QIOChannelWebsock *VAR_0,\nconst char *VAR_1,\nsize_t VAR_2,\nError **VAR_3)\n{",
"int VAR_4 = -1;",
"char *VAR_5 = qio_channel_websock_handshake_entry(\nVAR_1, VAR_2, QIO_CHANNEL_WEBSOCK_HEADER_PROTOCOL);",
"char *VAR_6 = qio_channel_websock_handshake_entry(\nVAR_1, VAR_2, QIO_CHANNEL_WEBS... | [
1,
1,
1,
1,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13,
15
],
[
17,
19
],
[
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
... |
14,042 | static void *av_mallocz_static(unsigned int size)
{
void *ptr = av_mallocz(size);
if(ptr){
array_static =av_fast_realloc(array_static, &allocated_static, sizeof(void*)*(last_static+1));
if(!array_static)
return NULL;
array_static[last_static++] = ptr;
}
r... | true | FFmpeg | b9c8388710a06544812739eedc0a40d3451491dc | static void *av_mallocz_static(unsigned int size)
{
void *ptr = av_mallocz(size);
if(ptr){
array_static =av_fast_realloc(array_static, &allocated_static, sizeof(void*)*(last_static+1));
if(!array_static)
return NULL;
array_static[last_static++] = ptr;
}
r... | {
"code": [
" void *ptr = av_mallocz(size);",
" if(ptr){",
" array_static =av_fast_realloc(array_static, &allocated_static, sizeof(void*)*(last_static+1));",
" if(!array_static)",
" return NULL;",
" array_static[last_static++] = ptr;",
" return ptr;... | static void *FUNC_0(unsigned int VAR_0)
{
void *VAR_1 = av_mallocz(VAR_0);
if(VAR_1){
array_static =av_fast_realloc(array_static, &allocated_static, sizeof(void*)*(last_static+1));
if(!array_static)
return NULL;
array_static[last_static++] = VAR_1;
}
retu... | [
"static void *FUNC_0(unsigned int VAR_0)\n{",
"void *VAR_1 = av_mallocz(VAR_0);",
"if(VAR_1){",
"array_static =av_fast_realloc(array_static, &allocated_static, sizeof(void*)*(last_static+1));",
"if(!array_static)\nreturn NULL;",
"array_static[last_static++] = VAR_1;",
"}",
"return VAR_1;",
"}"
] | [
0,
1,
1,
1,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
23
],
[
25
]
] |
14,043 | int index_from_key(const char *key)
{
int i;
for (i = 0; QKeyCode_lookup[i] != NULL; i++) {
if (!strcmp(key, QKeyCode_lookup[i])) {
break;
}
}
/* Return Q_KEY_CODE__MAX if the key is invalid */
return i;
}
| true | qemu | 64ffbe04eaafebf4045a3ace52a360c14959d196 | int index_from_key(const char *key)
{
int i;
for (i = 0; QKeyCode_lookup[i] != NULL; i++) {
if (!strcmp(key, QKeyCode_lookup[i])) {
break;
}
}
return i;
}
| {
"code": [
"int index_from_key(const char *key)",
" if (!strcmp(key, QKeyCode_lookup[i])) {"
],
"line_no": [
1,
11
]
} | int FUNC_0(const char *VAR_0)
{
int VAR_1;
for (VAR_1 = 0; QKeyCode_lookup[VAR_1] != NULL; VAR_1++) {
if (!strcmp(VAR_0, QKeyCode_lookup[VAR_1])) {
break;
}
}
return VAR_1;
}
| [
"int FUNC_0(const char *VAR_0)\n{",
"int VAR_1;",
"for (VAR_1 = 0; QKeyCode_lookup[VAR_1] != NULL; VAR_1++) {",
"if (!strcmp(VAR_0, QKeyCode_lookup[VAR_1])) {",
"break;",
"}",
"}",
"return VAR_1;",
"}"
] | [
1,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
]
] |
14,045 | static int mxf_read_primer_pack(MXFContext *mxf)
{
ByteIOContext *pb = mxf->fc->pb;
int item_num = get_be32(pb);
int item_len = get_be32(pb);
if (item_len != 18) {
av_log(mxf->fc, AV_LOG_ERROR, "unsupported primer pack item length\n");
return -1;
}
if (item_num > UINT_... | true | FFmpeg | 39bb30f6640fe1faf4bbc779a79786028febc95d | static int mxf_read_primer_pack(MXFContext *mxf)
{
ByteIOContext *pb = mxf->fc->pb;
int item_num = get_be32(pb);
int item_len = get_be32(pb);
if (item_len != 18) {
av_log(mxf->fc, AV_LOG_ERROR, "unsupported primer pack item length\n");
return -1;
}
if (item_num > UINT_... | {
"code": [
"static int mxf_read_primer_pack(MXFContext *mxf)",
" ByteIOContext *pb = mxf->fc->pb;"
],
"line_no": [
1,
5
]
} | static int FUNC_0(MXFContext *VAR_0)
{
ByteIOContext *pb = VAR_0->fc->pb;
int VAR_1 = get_be32(pb);
int VAR_2 = get_be32(pb);
if (VAR_2 != 18) {
av_log(VAR_0->fc, AV_LOG_ERROR, "unsupported primer pack item length\n");
return -1;
}
if (VAR_1 > UINT_MAX / VAR_2)
... | [
"static int FUNC_0(MXFContext *VAR_0)\n{",
"ByteIOContext *pb = VAR_0->fc->pb;",
"int VAR_1 = get_be32(pb);",
"int VAR_2 = get_be32(pb);",
"if (VAR_2 != 18) {",
"av_log(VAR_0->fc, AV_LOG_ERROR, \"unsupported primer pack item length\\n\");",
"return -1;",
"}",
"if (VAR_1 > UINT_MAX / VAR_2)\nreturn -... | [
1,
1,
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
]
] |
14,047 | static void rtas_ibm_query_interrupt_source_number(PowerPCCPU *cpu,
sPAPREnvironment *spapr,
uint32_t token,
uint32_t nargs,
... | true | qemu | 9a321e92343891e30f6fe8bfaad40454ae358bfb | static void rtas_ibm_query_interrupt_source_number(PowerPCCPU *cpu,
sPAPREnvironment *spapr,
uint32_t token,
uint32_t nargs,
... | {
"code": [
" rtas_st(rets, 0, RTAS_OUT_HW_ERROR);",
" int ndev;",
" if (!phb) {",
" ndev = spapr_msicfg_find(phb, config_addr, false);",
" if (ndev < 0) {",
" trace_spapr_pci_msi(\"MSI has not been enabled\", -1, config_addr);",
" intr_src_num = phb->msi_table... | static void FUNC_0(PowerPCCPU *VAR_0,
sPAPREnvironment *VAR_1,
uint32_t VAR_2,
uint32_t VAR_3,
target_ulong VAR_... | [
"static void FUNC_0(PowerPCCPU *VAR_0,\nsPAPREnvironment *VAR_1,\nuint32_t VAR_2,\nuint32_t VAR_3,\ntarget_ulong VAR_4,\nuint32_t VAR_5,\ntarget_ulong VAR_6)\n{",
"uint32_t config_addr = rtas_ld(VAR_4, 0);",
"uint64_t buid = ((uint64_t)rtas_ld(VAR_4, 1) << 32) | rtas_ld(VAR_4, 2);",
"unsigned int VAR_7 = -1, ... | [
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
1,
1,
1,
1,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
14,048 | static int convert_bitstream(const uint8_t *src, int src_size, uint8_t *dst, int max_size)
{
switch (AV_RB32(src)) {
case DCA_SYNCWORD_CORE_BE:
case DCA_SYNCWORD_SUBSTREAM:
memcpy(dst, src, src_size);
return src_size;
case DCA_SYNCWORD_CORE_LE:
case DCA_SYNCWORD_CORE_14B_BE:
... | false | FFmpeg | d1f558b3628d3ab99fd93a98b5758ef1be45a5da | static int convert_bitstream(const uint8_t *src, int src_size, uint8_t *dst, int max_size)
{
switch (AV_RB32(src)) {
case DCA_SYNCWORD_CORE_BE:
case DCA_SYNCWORD_SUBSTREAM:
memcpy(dst, src, src_size);
return src_size;
case DCA_SYNCWORD_CORE_LE:
case DCA_SYNCWORD_CORE_14B_BE:
... | {
"code": [],
"line_no": []
} | static int FUNC_0(const uint8_t *VAR_0, int VAR_1, uint8_t *VAR_2, int VAR_3)
{
switch (AV_RB32(VAR_0)) {
case DCA_SYNCWORD_CORE_BE:
case DCA_SYNCWORD_SUBSTREAM:
memcpy(VAR_2, VAR_0, VAR_1);
return VAR_1;
case DCA_SYNCWORD_CORE_LE:
case DCA_SYNCWORD_CORE_14B_BE:
case DCA... | [
"static int FUNC_0(const uint8_t *VAR_0, int VAR_1, uint8_t *VAR_2, int VAR_3)\n{",
"switch (AV_RB32(VAR_0)) {",
"case DCA_SYNCWORD_CORE_BE:\ncase DCA_SYNCWORD_SUBSTREAM:\nmemcpy(VAR_2, VAR_0, VAR_1);",
"return VAR_1;",
"case DCA_SYNCWORD_CORE_LE:\ncase DCA_SYNCWORD_CORE_14B_BE:\ncase DCA_SYNCWORD_CORE_14B_... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9,
11
],
[
13
],
[
15,
17,
19,
21
],
[
23,
25
],
[
27
],
[
29
]
] |
14,049 | int ff_scale_image(uint8_t *dst_data[4], int dst_linesize[4],
int dst_w, int dst_h, enum AVPixelFormat dst_pix_fmt,
uint8_t * const src_data[4], int src_linesize[4],
int src_w, int src_h, enum AVPixelFormat src_pix_fmt,
void *log_ctx)
{
... | false | FFmpeg | b8866783c6a855643a3869020ac5241b12f7d97a | int ff_scale_image(uint8_t *dst_data[4], int dst_linesize[4],
int dst_w, int dst_h, enum AVPixelFormat dst_pix_fmt,
uint8_t * const src_data[4], int src_linesize[4],
int src_w, int src_h, enum AVPixelFormat src_pix_fmt,
void *log_ctx)
{
... | {
"code": [],
"line_no": []
} | int FUNC_0(uint8_t *VAR_0[4], int VAR_1[4],
int VAR_2, int VAR_3, enum AVPixelFormat VAR_4,
uint8_t * const VAR_5[4], int VAR_6[4],
int VAR_7, int VAR_8, enum AVPixelFormat VAR_9,
void *VAR_10)
{
int VAR_11;
struct SwsContext *VA... | [
"int FUNC_0(uint8_t *VAR_0[4], int VAR_1[4],\nint VAR_2, int VAR_3, enum AVPixelFormat VAR_4,\nuint8_t * const VAR_5[4], int VAR_6[4],\nint VAR_7, int VAR_8, enum AVPixelFormat VAR_9,\nvoid *VAR_10)\n{",
"int VAR_11;",
"struct SwsContext *VAR_12 = sws_getContext(VAR_7, VAR_8, VAR_9,\nVAR_2, VAR_3, VAR_4,\nSWS_B... | [
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
],
[
45
],
[
47
],
[
51,
53
],
[
55
],
[
57
... |
14,050 | static int ftp_read(URLContext *h, unsigned char *buf, int size)
{
FTPContext *s = h->priv_data;
int read, err, retry_done = 0;
av_dlog(h, "ftp protocol read %d bytes\n", size);
retry:
if (s->state == DISCONNECTED) {
/* optimization */
if (s->position >= s->filesize)
... | false | FFmpeg | 229843aa359ae0c9519977d7fa952688db63f559 | static int ftp_read(URLContext *h, unsigned char *buf, int size)
{
FTPContext *s = h->priv_data;
int read, err, retry_done = 0;
av_dlog(h, "ftp protocol read %d bytes\n", size);
retry:
if (s->state == DISCONNECTED) {
if (s->position >= s->filesize)
return 0;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(URLContext *VAR_0, unsigned char *VAR_1, int VAR_2)
{
FTPContext *s = VAR_0->priv_data;
int VAR_3, VAR_4, VAR_5 = 0;
av_dlog(VAR_0, "ftp protocol VAR_3 %d bytes\n", VAR_2);
retry:
if (s->state == DISCONNECTED) {
if (s->position >= s->filesize)
... | [
"static int FUNC_0(URLContext *VAR_0, unsigned char *VAR_1, int VAR_2)\n{",
"FTPContext *s = VAR_0->priv_data;",
"int VAR_3, VAR_4, VAR_5 = 0;",
"av_dlog(VAR_0, \"ftp protocol VAR_3 %d bytes\\n\", VAR_2);",
"retry:\nif (s->state == DISCONNECTED) {",
"if (s->position >= s->filesize)\nreturn 0;",
"if ((VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
19,
21
],
[
23,
25
],
[
27
],
[
29
],
[
31,
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
... |
14,051 | sPAPROptionVector *spapr_ovec_new(void)
{
sPAPROptionVector *ov;
ov = g_new0(sPAPROptionVector, 1);
ov->bitmap = bitmap_new(OV_MAXBITS);
return ov;
} | true | qemu | 62ef3760d4e400849fc663474227bb4668244455 | sPAPROptionVector *spapr_ovec_new(void)
{
sPAPROptionVector *ov;
ov = g_new0(sPAPROptionVector, 1);
ov->bitmap = bitmap_new(OV_MAXBITS);
return ov;
} | {
"code": [],
"line_no": []
} | sPAPROptionVector *FUNC_0(void)
{
sPAPROptionVector *ov;
ov = g_new0(sPAPROptionVector, 1);
ov->bitmap = bitmap_new(OV_MAXBITS);
return ov;
} | [
"sPAPROptionVector *FUNC_0(void)\n{",
"sPAPROptionVector *ov;",
"ov = g_new0(sPAPROptionVector, 1);",
"ov->bitmap = bitmap_new(OV_MAXBITS);",
"return ov;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
16
],
[
18
]
] |
14,052 | static uint32_t vmdk_read_cid(BlockDriverState *bs, int parent)
{
char desc[DESC_SIZE];
uint32_t cid;
const char *p_name, *cid_str;
size_t cid_str_size;
BDRVVmdkState *s = bs->opaque;
if (bdrv_pread(bs->file, s->desc_offset, desc, DESC_SIZE) != DESC_SIZE) {
return 0;
}
... | true | qemu | bac8d7b45dd855759204117e5a05452ede01bbab | static uint32_t vmdk_read_cid(BlockDriverState *bs, int parent)
{
char desc[DESC_SIZE];
uint32_t cid;
const char *p_name, *cid_str;
size_t cid_str_size;
BDRVVmdkState *s = bs->opaque;
if (bdrv_pread(bs->file, s->desc_offset, desc, DESC_SIZE) != DESC_SIZE) {
return 0;
}
... | {
"code": [
" uint32_t cid;"
],
"line_no": [
7
]
} | static uint32_t FUNC_0(BlockDriverState *bs, int parent)
{
char VAR_0[DESC_SIZE];
uint32_t cid;
const char *VAR_1, *VAR_2;
size_t cid_str_size;
BDRVVmdkState *s = bs->opaque;
if (bdrv_pread(bs->file, s->desc_offset, VAR_0, DESC_SIZE) != DESC_SIZE) {
return 0;
}
if (... | [
"static uint32_t FUNC_0(BlockDriverState *bs, int parent)\n{",
"char VAR_0[DESC_SIZE];",
"uint32_t cid;",
"const char *VAR_1, *VAR_2;",
"size_t cid_str_size;",
"BDRVVmdkState *s = bs->opaque;",
"if (bdrv_pread(bs->file, s->desc_offset, VAR_0, DESC_SIZE) != DESC_SIZE) {",
"return 0;",
"}",
"if (par... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
... |
14,053 | QemuOpts *qemu_opts_find(QemuOptsList *list, const char *id)
{
QemuOpts *opts;
QTAILQ_FOREACH(opts, &list->head, next) {
if (!opts->id) {
if (!id) {
return opts;
}
continue;
}
if (strcmp(opts->id, id) != 0) {
co... | true | qemu | 96bc97ebf350ec480b69082819cedb8850f46a0f | QemuOpts *qemu_opts_find(QemuOptsList *list, const char *id)
{
QemuOpts *opts;
QTAILQ_FOREACH(opts, &list->head, next) {
if (!opts->id) {
if (!id) {
return opts;
}
continue;
}
if (strcmp(opts->id, id) != 0) {
co... | {
"code": [
" if (!opts->id) {",
" if (!id) {",
" return opts;",
" continue;",
" if (strcmp(opts->id, id) != 0) {",
" continue;",
" return opts;"
],
"line_no": [
11,
13,
15,
19,
23,
19,
29
... | QemuOpts *FUNC_0(QemuOptsList *list, const char *id)
{
QemuOpts *opts;
QTAILQ_FOREACH(opts, &list->head, next) {
if (!opts->id) {
if (!id) {
return opts;
}
continue;
}
if (strcmp(opts->id, id) != 0) {
continue;
... | [
"QemuOpts *FUNC_0(QemuOptsList *list, const char *id)\n{",
"QemuOpts *opts;",
"QTAILQ_FOREACH(opts, &list->head, next) {",
"if (!opts->id) {",
"if (!id) {",
"return opts;",
"}",
"continue;",
"}",
"if (strcmp(opts->id, id) != 0) {",
"continue;",
"}",
"return opts;",
"}",
"return NULL;",
... | [
0,
0,
0,
1,
1,
1,
0,
1,
0,
1,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
14,054 | static void do_video_out(AVFormatContext *s,
OutputStream *ost,
AVFrame *in_picture,
float quality)
{
int ret, format_video_sync;
AVPacket pkt;
AVCodecContext *enc = ost->st->codec;
int nb_frames;
double sync_ipts, d... | true | FFmpeg | df3a96c497c0db51c917e51e5e4a60986979db91 | static void do_video_out(AVFormatContext *s,
OutputStream *ost,
AVFrame *in_picture,
float quality)
{
int ret, format_video_sync;
AVPacket pkt;
AVCodecContext *enc = ost->st->codec;
int nb_frames;
double sync_ipts, d... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVFormatContext *VAR_0,
OutputStream *VAR_1,
AVFrame *VAR_2,
float VAR_3)
{
int VAR_4, VAR_5;
AVPacket pkt;
AVCodecContext *enc = VAR_1->st->codec;
int VAR_6;
double VAR_7, VAR_8;
double VAR_9... | [
"static void FUNC_0(AVFormatContext *VAR_0,\nOutputStream *VAR_1,\nAVFrame *VAR_2,\nfloat VAR_3)\n{",
"int VAR_4, VAR_5;",
"AVPacket pkt;",
"AVCodecContext *enc = VAR_1->st->codec;",
"int VAR_6;",
"double VAR_7, VAR_8;",
"double VAR_9 = 0;",
"int VAR_10 = 0;",
"InputStream *ist = NULL;",
"if (VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
35,
37
],
[
41
],
[
43
],
[
49
],
[
53
],
[
55,
57
],
[
61
... |
14,055 | static av_cold int read_specific_config(ALSDecContext *ctx)
{
GetBitContext gb;
uint64_t ht_size;
int i, config_offset;
MPEG4AudioConfig m4ac;
ALSSpecificConfig *sconf = &ctx->sconf;
AVCodecContext *avctx = ctx->avctx;
uint32_t als_id, header_size, trailer_size;
init_get_bi... | true | FFmpeg | 4484c722f68e6a54b8bd701d391897bc092b4404 | static av_cold int read_specific_config(ALSDecContext *ctx)
{
GetBitContext gb;
uint64_t ht_size;
int i, config_offset;
MPEG4AudioConfig m4ac;
ALSSpecificConfig *sconf = &ctx->sconf;
AVCodecContext *avctx = ctx->avctx;
uint32_t als_id, header_size, trailer_size;
init_get_bi... | {
"code": [
" init_get_bits(&gb, avctx->extradata, avctx->extradata_size * 8);"
],
"line_no": [
21
]
} | static av_cold int FUNC_0(ALSDecContext *ctx)
{
GetBitContext gb;
uint64_t ht_size;
int VAR_0, VAR_1;
MPEG4AudioConfig m4ac;
ALSSpecificConfig *sconf = &ctx->sconf;
AVCodecContext *avctx = ctx->avctx;
uint32_t als_id, header_size, trailer_size;
init_get_bits(&gb, avctx->ext... | [
"static av_cold int FUNC_0(ALSDecContext *ctx)\n{",
"GetBitContext gb;",
"uint64_t ht_size;",
"int VAR_0, VAR_1;",
"MPEG4AudioConfig m4ac;",
"ALSSpecificConfig *sconf = &ctx->sconf;",
"AVCodecContext *avctx = ctx->avctx;",
"uint32_t als_id, header_size, trailer_size;",
"init_get_bits(&gb, avctx->... | [
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,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25,
27
],
[
31,
33
],
[
37
],
[
41,
43
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[... |
14,057 | static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame)
{
V4L2m2mContext *s = avctx->priv_data;
V4L2Context *const capture = &s->capture;
V4L2Context *const output = &s->output;
AVPacket avpkt = {0};
int ret;
ret = ff_decode_get_packet(avctx, &avpkt);
if (ret < 0 && re... | true | FFmpeg | a0c624e299730c8c5800375c2f5f3c6c200053ff | static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame)
{
V4L2m2mContext *s = avctx->priv_data;
V4L2Context *const capture = &s->capture;
V4L2Context *const output = &s->output;
AVPacket avpkt = {0};
int ret;
ret = ff_decode_get_packet(avctx, &avpkt);
if (ret < 0 && re... | {
"code": [
" V4L2m2mContext *s = avctx->priv_data;",
" V4L2m2mContext *s = avctx->priv_data;",
" V4L2m2mContext *s = avctx->priv_data;",
" V4L2m2mContext *s = avctx->priv_data;",
" V4L2m2mContext *s = avctx->priv_data;",
" V4L2m2mContext *s = avctx->priv_data;",
" V4L... | static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1)
{
V4L2m2mContext *s = VAR_0->priv_data;
V4L2Context *const capture = &s->capture;
V4L2Context *const output = &s->output;
AVPacket avpkt = {0};
int VAR_2;
VAR_2 = ff_decode_get_packet(VAR_0, &avpkt);
if (VAR_2 < 0 && VAR_2 !=... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1)\n{",
"V4L2m2mContext *s = VAR_0->priv_data;",
"V4L2Context *const capture = &s->capture;",
"V4L2Context *const output = &s->output;",
"AVPacket avpkt = {0};",
"int VAR_2;",
"VAR_2 = ff_decode_get_packet(VAR_0, &avpkt);",
"if (VAR_2 < 0 && VAR_2... | [
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
],
[
13
],
[
17
],
[
19,
21
],
[
25,
27
],
[
31
],
[
33
],
[
35,
37
],
[
41
],
[
45
],
[
47
],
[
49,
51
],
[
53
],
[
57,... |
14,058 | static int jpeg2000_decode_tile(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
AVFrame *picture)
{
int compno, reslevelno, bandno;
int x, y;
uint8_t *line;
Jpeg2000T1Context t1;
/* Loop on tile components */
for (compno = 0; compno < s->ncomponents; co... | true | FFmpeg | 95a57d26d8653d21f0dab1aff3558ee944853dbf | static int jpeg2000_decode_tile(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
AVFrame *picture)
{
int compno, reslevelno, bandno;
int x, y;
uint8_t *line;
Jpeg2000T1Context t1;
for (compno = 0; compno < s->ncomponents; compno++) {
Jpeg2000Co... | {
"code": [
" if (tile->codsty->transform == FF_DWT97) {",
" if (tile->codsty->transform == FF_DWT97) {"
],
"line_no": [
155,
155
]
} | static int FUNC_0(Jpeg2000DecoderContext *VAR_0, Jpeg2000Tile *VAR_1,
AVFrame *VAR_2)
{
int VAR_3, VAR_4, VAR_5;
int VAR_6, VAR_7;
uint8_t *line;
Jpeg2000T1Context t1;
for (VAR_3 = 0; VAR_3 < VAR_0->ncomponents; VAR_3++) {
Jpeg2000Component *... | [
"static int FUNC_0(Jpeg2000DecoderContext *VAR_0, Jpeg2000Tile *VAR_1,\nAVFrame *VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5;",
"int VAR_6, VAR_7;",
"uint8_t *line;",
"Jpeg2000T1Context t1;",
"for (VAR_3 = 0; VAR_3 < VAR_0->ncomponents; VAR_3++) {",
"Jpeg2000Component *comp = VAR_1->comp + VAR_3;",
"Jpeg... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
13
],
[
15
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47,
49,
51
],
[
55
],
[
59
],
[... |
14,059 | static int rtmp_open(URLContext *s, const char *uri, int flags)
{
RTMPContext *rt = s->priv_data;
char proto[8], hostname[256], path[1024], auth[100], *fname;
char *old_app, *qmark, fname_buffer[1024];
uint8_t buf[2048];
int port;
AVDictionary *opts = NULL;
int ret;
if (rt->li... | true | FFmpeg | 08ccc474b73a3acef5e56060c8174d4e82ace20d | static int rtmp_open(URLContext *s, const char *uri, int flags)
{
RTMPContext *rt = s->priv_data;
char proto[8], hostname[256], path[1024], auth[100], *fname;
char *old_app, *qmark, fname_buffer[1024];
uint8_t buf[2048];
int port;
AVDictionary *opts = NULL;
int ret;
if (rt->li... | {
"code": [
" return ret;"
],
"line_no": [
497
]
} | static int FUNC_0(URLContext *VAR_0, const char *VAR_1, int VAR_2)
{
RTMPContext *rt = VAR_0->priv_data;
char VAR_3[8], VAR_4[256], VAR_5[1024], VAR_6[100], *VAR_7;
char *VAR_8, *VAR_9, VAR_10[1024];
uint8_t buf[2048];
int VAR_11;
AVDictionary *opts = NULL;
int VAR_12;
if (rt-... | [
"static int FUNC_0(URLContext *VAR_0, const char *VAR_1, int VAR_2)\n{",
"RTMPContext *rt = VAR_0->priv_data;",
"char VAR_3[8], VAR_4[256], VAR_5[1024], VAR_6[100], *VAR_7;",
"char *VAR_8, *VAR_9, VAR_10[1024];",
"uint8_t buf[2048];",
"int VAR_11;",
"AVDictionary *opts = NULL;",
"int VAR_12;",
"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,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
27
],
[
31,
33,
35
],
[
39
],
[
41,
43,
45,
47
],
[
49
],
[
53
],
[
55
],
[
57
... |
14,060 | static int read_random(uint32_t *dst, const char *file)
{
int fd = open(file, O_RDONLY);
int err = -1;
if (fd == -1)
return -1;
#if HAVE_FCNTL && defined(O_NONBLOCK)
if (fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK) != -1)
#endif
err = read(fd, dst, sizeof(*dst));
c... | true | FFmpeg | b7fa5c5abb39f819fbb42253711bc13e5cac0e81 | static int read_random(uint32_t *dst, const char *file)
{
int fd = open(file, O_RDONLY);
int err = -1;
if (fd == -1)
return -1;
#if HAVE_FCNTL && defined(O_NONBLOCK)
if (fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK) != -1)
#endif
err = read(fd, dst, sizeof(*dst));
c... | {
"code": [
"#if HAVE_FCNTL && defined(O_NONBLOCK)",
" if (fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK) != -1)",
"#endif"
],
"line_no": [
15,
17,
19
]
} | static int FUNC_0(uint32_t *VAR_0, const char *VAR_1)
{
int VAR_2 = open(VAR_1, O_RDONLY);
int VAR_3 = -1;
if (VAR_2 == -1)
return -1;
#if HAVE_FCNTL && defined(O_NONBLOCK)
if (fcntl(VAR_2, F_SETFL, fcntl(VAR_2, F_GETFL) | O_NONBLOCK) != -1)
#endif
VAR_3 = read(VAR_2, VAR_0, s... | [
"static int FUNC_0(uint32_t *VAR_0, const char *VAR_1)\n{",
"int VAR_2 = open(VAR_1, O_RDONLY);",
"int VAR_3 = -1;",
"if (VAR_2 == -1)\nreturn -1;",
"#if HAVE_FCNTL && defined(O_NONBLOCK)\nif (fcntl(VAR_2, F_SETFL, fcntl(VAR_2, F_GETFL) | O_NONBLOCK) != -1)\n#endif\nVAR_3 = read(VAR_2, VAR_0, sizeof(*VAR_0)... | [
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15,
17,
19,
21
],
[
23
],
[
27
],
[
29
]
] |
14,061 | static void enable_device(PIIX4PMState *s, int slot)
{
s->ar.gpe.sts[0] |= PIIX4_PCI_HOTPLUG_STATUS;
s->pci0_status.up |= (1 << slot);
}
| true | qemu | 7faa8075d898ae56d2c533c530569bb25ab86eaf | static void enable_device(PIIX4PMState *s, int slot)
{
s->ar.gpe.sts[0] |= PIIX4_PCI_HOTPLUG_STATUS;
s->pci0_status.up |= (1 << slot);
}
| {
"code": [
" s->pci0_status.up |= (1 << slot);"
],
"line_no": [
7
]
} | static void FUNC_0(PIIX4PMState *VAR_0, int VAR_1)
{
VAR_0->ar.gpe.sts[0] |= PIIX4_PCI_HOTPLUG_STATUS;
VAR_0->pci0_status.up |= (1 << VAR_1);
}
| [
"static void FUNC_0(PIIX4PMState *VAR_0, int VAR_1)\n{",
"VAR_0->ar.gpe.sts[0] |= PIIX4_PCI_HOTPLUG_STATUS;",
"VAR_0->pci0_status.up |= (1 << VAR_1);",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
14,062 | static QObject *parse_literal(JSONParserContext *ctxt)
{
QObject *token, *obj;
JSONParserContext saved_ctxt = parser_context_save(ctxt);
token = parser_context_pop_token(ctxt);
if (token == NULL) {
goto out;
}
switch (token_get_type(token)) {
case JSON_STRING:
o... | true | qemu | 3d5b3ec6d460a92245215aaf7b349b0b9e5ffa25 | static QObject *parse_literal(JSONParserContext *ctxt)
{
QObject *token, *obj;
JSONParserContext saved_ctxt = parser_context_save(ctxt);
token = parser_context_pop_token(ctxt);
if (token == NULL) {
goto out;
}
switch (token_get_type(token)) {
case JSON_STRING:
o... | {
"code": [
" case JSON_INTEGER:",
" obj = QOBJECT(qint_from_int(strtoll(token_get_value(token), NULL, 10)));",
" break;"
],
"line_no": [
29,
31,
27
]
} | static QObject *FUNC_0(JSONParserContext *ctxt)
{
QObject *token, *obj;
JSONParserContext saved_ctxt = parser_context_save(ctxt);
token = parser_context_pop_token(ctxt);
if (token == NULL) {
goto out;
}
switch (token_get_type(token)) {
case JSON_STRING:
obj = QO... | [
"static QObject *FUNC_0(JSONParserContext *ctxt)\n{",
"QObject *token, *obj;",
"JSONParserContext saved_ctxt = parser_context_save(ctxt);",
"token = parser_context_pop_token(ctxt);",
"if (token == NULL) {",
"goto out;",
"}",
"switch (token_get_type(token)) {",
"case JSON_STRING:\nobj = QOBJECT(qstri... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
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,
39
],
[
41
],
[
43,
45
],
[
47
],
[
51
],
[
55... |
14,064 | void cpu_loop(CPUM68KState *env)
{
CPUState *cs = CPU(m68k_env_get_cpu(env));
int trapnr;
unsigned int n;
target_siginfo_t info;
TaskState *ts = cs->opaque;
for(;;) {
cpu_exec_start(cs);
trapnr = cpu_exec(cs);
cpu_exec_end(cs);
process_queued_cpu_work... | true | qemu | 0ccb9c1d8128a020720d5c6abf99a470742a1b94 | void cpu_loop(CPUM68KState *env)
{
CPUState *cs = CPU(m68k_env_get_cpu(env));
int trapnr;
unsigned int n;
target_siginfo_t info;
TaskState *ts = cs->opaque;
for(;;) {
cpu_exec_start(cs);
trapnr = cpu_exec(cs);
cpu_exec_end(cs);
process_queued_cpu_work... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUM68KState *VAR_0)
{
CPUState *cs = CPU(m68k_env_get_cpu(VAR_0));
int VAR_1;
unsigned int VAR_2;
target_siginfo_t info;
TaskState *ts = cs->opaque;
for(;;) {
cpu_exec_start(cs);
VAR_1 = cpu_exec(cs);
cpu_exec_end(cs);
process_queued_cpu_... | [
"void FUNC_0(CPUM68KState *VAR_0)\n{",
"CPUState *cs = CPU(m68k_env_get_cpu(VAR_0));",
"int VAR_1;",
"unsigned int VAR_2;",
"target_siginfo_t info;",
"TaskState *ts = cs->opaque;",
"for(;;) {",
"cpu_exec_start(cs);",
"VAR_1 = cpu_exec(cs);",
"cpu_exec_end(cs);",
"process_queued_cpu_work(cs);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
14,065 | void do_savevm(Monitor *mon, const QDict *qdict)
{
DriveInfo *dinfo;
BlockDriverState *bs, *bs1;
QEMUSnapshotInfo sn1, *sn = &sn1, old_sn1, *old_sn = &old_sn1;
int ret;
QEMUFile *f;
int saved_vm_running;
uint32_t vm_state_size;
#ifdef _WIN32
struct _timeb tb;
#else
struct... | true | qemu | feeee5aca765606818e00f5a19d19f141f4ae365 | void do_savevm(Monitor *mon, const QDict *qdict)
{
DriveInfo *dinfo;
BlockDriverState *bs, *bs1;
QEMUSnapshotInfo sn1, *sn = &sn1, old_sn1, *old_sn = &old_sn1;
int ret;
QEMUFile *f;
int saved_vm_running;
uint32_t vm_state_size;
#ifdef _WIN32
struct _timeb tb;
#else
struct... | {
"code": [
" if (bdrv_has_snapshot(bs1)) {",
" if (bdrv_has_snapshot(bs1)) {",
" if (bdrv_has_snapshot(bs1)) {",
" if (bdrv_has_snapshot(bs1)) {"
],
"line_no": [
149,
149,
149,
149
]
} | void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{
DriveInfo *dinfo;
BlockDriverState *bs, *bs1;
QEMUSnapshotInfo sn1, *sn = &sn1, old_sn1, *old_sn = &old_sn1;
int VAR_2;
QEMUFile *f;
int VAR_3;
uint32_t vm_state_size;
#ifdef _WIN32
struct _timeb tb;
#else
struct timeval V... | [
"void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)\n{",
"DriveInfo *dinfo;",
"BlockDriverState *bs, *bs1;",
"QEMUSnapshotInfo sn1, *sn = &sn1, old_sn1, *old_sn = &old_sn1;",
"int VAR_2;",
"QEMUFile *f;",
"int VAR_3;",
"uint32_t vm_state_size;",
"#ifdef _WIN32\nstruct _timeb tb;",
"#else\nstruct time... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23,
25
],
[
27,
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
47
],
[
51
],
[... |
14,066 | int paio_init(void)
{
struct sigaction act;
PosixAioState *s;
int fds[2];
int ret;
if (posix_aio_state)
return 0;
s = qemu_malloc(sizeof(PosixAioState));
sigfillset(&act.sa_mask);
act.sa_flags = 0; /* do not restart syscalls to interrupt select() */
act.sa_ha... | true | qemu | 40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4 | int paio_init(void)
{
struct sigaction act;
PosixAioState *s;
int fds[2];
int ret;
if (posix_aio_state)
return 0;
s = qemu_malloc(sizeof(PosixAioState));
sigfillset(&act.sa_mask);
act.sa_flags = 0;
act.sa_handler = aio_signal_handler;
sigaction(SIGUSR2,... | {
"code": [
" if (pipe(fds) == -1) {"
],
"line_no": [
37
]
} | int FUNC_0(void)
{
struct sigaction VAR_0;
PosixAioState *s;
int VAR_1[2];
int VAR_2;
if (posix_aio_state)
return 0;
s = qemu_malloc(sizeof(PosixAioState));
sigfillset(&VAR_0.sa_mask);
VAR_0.sa_flags = 0;
VAR_0.sa_handler = aio_signal_handler;
sigaction... | [
"int FUNC_0(void)\n{",
"struct sigaction VAR_0;",
"PosixAioState *s;",
"int VAR_1[2];",
"int VAR_2;",
"if (posix_aio_state)\nreturn 0;",
"s = qemu_malloc(sizeof(PosixAioState));",
"sigfillset(&VAR_0.sa_mask);",
"VAR_0.sa_flags = 0;",
"VAR_0.sa_handler = aio_signal_handler;",
"sigaction(SIGUSR2, ... | [
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
],
[
15,
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
53
],
[... |
14,067 | static int set_dirty_tracking(void)
{
BlkMigDevState *bmds;
int ret;
QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {
bmds->dirty_bitmap = bdrv_create_dirty_bitmap(bmds->bs, BLOCK_SIZE,
NULL);
if (!bmds->dirty_bitmap) ... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static int set_dirty_tracking(void)
{
BlkMigDevState *bmds;
int ret;
QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {
bmds->dirty_bitmap = bdrv_create_dirty_bitmap(bmds->bs, BLOCK_SIZE,
NULL);
if (!bmds->dirty_bitmap) ... | {
"code": [],
"line_no": []
} | static int FUNC_0(void)
{
BlkMigDevState *bmds;
int VAR_0;
QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {
bmds->dirty_bitmap = bdrv_create_dirty_bitmap(bmds->bs, BLOCK_SIZE,
NULL);
if (!bmds->dirty_bitmap) {
... | [
"static int FUNC_0(void)\n{",
"BlkMigDevState *bmds;",
"int VAR_0;",
"QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {",
"bmds->dirty_bitmap = bdrv_create_dirty_bitmap(bmds->bs, BLOCK_SIZE,\nNULL);",
"if (!bmds->dirty_bitmap) {",
"VAR_0 = -errno;",
"goto fail;",
"}",
"}",
"return 0;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
14,068 | static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
{
SliceContext *slice = link->dst->priv;
int y2, ret = 0;
if (slice_dir == 1) {
for (y2 = y; y2 + slice->h <= y + h; y2 += slice->h) {
ret = ff_draw_slice(link->dst->outputs[0], y2, slice->h, slice_dir);
... | true | FFmpeg | bb6c67bb36b136de10256f0999128df4a42f9ffc | static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
{
SliceContext *slice = link->dst->priv;
int y2, ret = 0;
if (slice_dir == 1) {
for (y2 = y; y2 + slice->h <= y + h; y2 += slice->h) {
ret = ff_draw_slice(link->dst->outputs[0], y2, slice->h, slice_dir);
... | {
"code": [
" return 0;",
" SliceContext *slice = link->dst->priv;",
" return 0;",
" SliceContext *slice = link->dst->priv;",
"static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir)",
" SliceContext *slice = link->dst->priv;",
" int y2, ret = 0;",
" ... | static int FUNC_0(AVFilterLink *VAR_0, int VAR_1, int VAR_2, int VAR_3)
{
SliceContext *slice = VAR_0->dst->priv;
int VAR_4, VAR_5 = 0;
if (VAR_3 == 1) {
for (VAR_4 = VAR_1; VAR_4 + slice->VAR_2 <= VAR_1 + VAR_2; VAR_4 += slice->VAR_2) {
VAR_5 = ff_draw_slice(VAR_0->dst->outputs[... | [
"static int FUNC_0(AVFilterLink *VAR_0, int VAR_1, int VAR_2, int VAR_3)\n{",
"SliceContext *slice = VAR_0->dst->priv;",
"int VAR_4, VAR_5 = 0;",
"if (VAR_3 == 1) {",
"for (VAR_4 = VAR_1; VAR_4 + slice->VAR_2 <= VAR_1 + VAR_2; VAR_4 += slice->VAR_2) {",
"VAR_5 = ff_draw_slice(VAR_0->dst->outputs[0], VAR_4... | [
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
0,
0,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
43,
45
],
[
47
],
[
49
],
[
51... |
14,069 | void cpu_check_irqs(CPUSPARCState *env)
{
CPUState *cs;
if (env->pil_in && (env->interrupt_index == 0 ||
(env->interrupt_index & ~15) == TT_EXTINT)) {
unsigned int i;
for (i = 15; i > 0; i--) {
if (env->pil_in & (1 << i)) {
int old_interrupt = ... | true | qemu | 5ee5993001cf32addb86a92e2ae8cb090fbc1462 | void cpu_check_irqs(CPUSPARCState *env)
{
CPUState *cs;
if (env->pil_in && (env->interrupt_index == 0 ||
(env->interrupt_index & ~15) == TT_EXTINT)) {
unsigned int i;
for (i = 15; i > 0; i--) {
if (env->pil_in & (1 << i)) {
int old_interrupt = ... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUSPARCState *VAR_0)
{
CPUState *cs;
if (VAR_0->pil_in && (VAR_0->interrupt_index == 0 ||
(VAR_0->interrupt_index & ~15) == TT_EXTINT)) {
unsigned int VAR_1;
for (VAR_1 = 15; VAR_1 > 0; VAR_1--) {
if (VAR_0->pil_in & (1 << VAR_1)) {
... | [
"void FUNC_0(CPUSPARCState *VAR_0)\n{",
"CPUState *cs;",
"if (VAR_0->pil_in && (VAR_0->interrupt_index == 0 ||\n(VAR_0->interrupt_index & ~15) == TT_EXTINT)) {",
"unsigned int VAR_1;",
"for (VAR_1 = 15; VAR_1 > 0; VAR_1--) {",
"if (VAR_0->pil_in & (1 << VAR_1)) {",
"int VAR_2 = VAR_0->interrupt_index;",... | [
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
],
[
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.