id int32 0 27.3k | func stringlengths 26 142k | target bool 2
classes | project stringclasses 2
values | commit_id stringlengths 40 40 | func_clean stringlengths 26 131k | vul_lines dict | normalized_func stringlengths 24 132k | lines listlengths 1 2.8k | label listlengths 1 2.8k | line_no listlengths 1 2.8k |
|---|---|---|---|---|---|---|---|---|---|---|
12,475 | yuv2mono_2_c_template(SwsContext *c, const uint16_t *buf0,
const uint16_t *buf1, const uint16_t *ubuf0,
const uint16_t *ubuf1, const uint16_t *vbuf0,
const uint16_t *vbuf1, const uint16_t *abuf0,
const uint16_t *abuf1, uint8_t *... | false | FFmpeg | 13a099799e89a76eb921ca452e1b04a7a28a9855 | yuv2mono_2_c_template(SwsContext *c, const uint16_t *buf0,
const uint16_t *buf1, const uint16_t *ubuf0,
const uint16_t *ubuf1, const uint16_t *vbuf0,
const uint16_t *vbuf1, const uint16_t *abuf0,
const uint16_t *abuf1, uint8_t *... | {
"code": [],
"line_no": []
} | FUNC_0(SwsContext *VAR_0, const uint16_t *VAR_1,
const uint16_t *VAR_2, const uint16_t *VAR_3,
const uint16_t *VAR_4, const uint16_t *VAR_5,
const uint16_t *VAR_6, const uint16_t *VAR_7,
const uint16_t *VAR_8, uint8_t *VAR_9, in... | [
"FUNC_0(SwsContext *VAR_0, const uint16_t *VAR_1,\nconst uint16_t *VAR_2, const uint16_t *VAR_3,\nconst uint16_t *VAR_4, const uint16_t *VAR_5,\nconst uint16_t *VAR_6, const uint16_t *VAR_7,\nconst uint16_t *VAR_8, uint8_t *VAR_9, int VAR_10,\nint VAR_11, int VAR_12, int VAR_13,\nenum PixelFormat VAR_14)\n{",
"co... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
12,476 | static void acpi_set_cpu_present_bit(AcpiCpuHotplug *g, CPUState *cpu,
Error **errp)
{
CPUClass *k = CPU_GET_CLASS(cpu);
int64_t cpu_id;
cpu_id = k->get_arch_id(cpu);
if ((cpu_id / 8) >= ACPI_GPE_PROC_LEN) {
error_setg(errp, "acpi: invalid cpu id: %"... | false | qemu | f9dc175d84802e9a00161bc8d4356b90d6c52125 | static void acpi_set_cpu_present_bit(AcpiCpuHotplug *g, CPUState *cpu,
Error **errp)
{
CPUClass *k = CPU_GET_CLASS(cpu);
int64_t cpu_id;
cpu_id = k->get_arch_id(cpu);
if ((cpu_id / 8) >= ACPI_GPE_PROC_LEN) {
error_setg(errp, "acpi: invalid cpu id: %"... | {
"code": [],
"line_no": []
} | static void FUNC_0(AcpiCpuHotplug *VAR_0, CPUState *VAR_1,
Error **VAR_2)
{
CPUClass *k = CPU_GET_CLASS(VAR_1);
int64_t cpu_id;
cpu_id = k->get_arch_id(VAR_1);
if ((cpu_id / 8) >= ACPI_GPE_PROC_LEN) {
error_setg(VAR_2, "acpi: invalid VAR_1 id: %" PRI... | [
"static void FUNC_0(AcpiCpuHotplug *VAR_0, CPUState *VAR_1,\nError **VAR_2)\n{",
"CPUClass *k = CPU_GET_CLASS(VAR_1);",
"int64_t cpu_id;",
"cpu_id = k->get_arch_id(VAR_1);",
"if ((cpu_id / 8) >= ACPI_GPE_PROC_LEN) {",
"error_setg(VAR_2, \"acpi: invalid VAR_1 id: %\" PRIi64, cpu_id);",
"return;",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
]
] |
12,478 | uint32_t HELPER(get_cp15)(CPUARMState *env, uint32_t insn)
{
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. */
switch (op1) {
case 0:
switch (crm) {
... | false | qemu | 81bdde9dcdba5bbc358b2c6b8f776a05a751cc72 | uint32_t HELPER(get_cp15)(CPUARMState *env, uint32_t insn)
{
int op1;
int op2;
int crm;
op1 = (insn >> 21) & 7;
op2 = (insn >> 5) & 7;
crm = insn & 0xf;
switch ((insn >> 16) & 0xf) {
case 0:
switch (op1) {
case 0:
switch (crm) {
cas... | {
"code": [],
"line_no": []
} | uint32_t FUNC_0(get_cp15)(CPUARMState *env, uint32_t insn)
{
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:
switch (VAR_0) {
case 0:
switch (VAR_2) {
... | [
"uint32_t FUNC_0(get_cp15)(CPUARMState *env, uint32_t insn)\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:\nswitch (VAR_0) {",
"case 0:\nswitch (VAR_2) {",
"case 0:\nswitch (... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
59,... |
12,479 | static void hpet_ram_writel(void *opaque, target_phys_addr_t addr,
uint32_t value)
{
int i;
HPETState *s = opaque;
uint64_t old_val, new_val, val, index;
DPRINTF("qemu: Enter hpet_ram_writel at %" PRIx64 " = %#x\n", addr, value);
index = addr;
old_val = hpet... | false | qemu | b2bedb214469af55179d907a60cd67fed6b0779e | static void hpet_ram_writel(void *opaque, target_phys_addr_t addr,
uint32_t value)
{
int i;
HPETState *s = opaque;
uint64_t old_val, new_val, val, index;
DPRINTF("qemu: Enter hpet_ram_writel at %" PRIx64 " = %#x\n", addr, value);
index = addr;
old_val = hpet... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint32_t VAR_2)
{
int VAR_3;
HPETState *s = VAR_0;
uint64_t old_val, new_val, val, index;
DPRINTF("qemu: Enter FUNC_0 at %" PRIx64 " = %#x\n", VAR_1, VAR_2);
index = VAR_1;
old_val = hpet_ram_readl(VA... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint32_t VAR_2)\n{",
"int VAR_3;",
"HPETState *s = VAR_0;",
"uint64_t old_val, new_val, val, index;",
"DPRINTF(\"qemu: Enter FUNC_0 at %\" PRIx64 \" = %#x\\n\", VAR_1, VAR_2);",
"index = VAR_1;",
"old_val = hpet_ram_readl(VAR_0, VAR_1);",
"ne... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51
... |
12,480 | static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic,
bool use_highmem)
{
hwaddr base_mmio = vbi->memmap[VIRT_PCIE_MMIO].base;
hwaddr size_mmio = vbi->memmap[VIRT_PCIE_MMIO].size;
hwaddr base_mmio_high = vbi->memmap[VIRT_PCIE_MMIO_HIGH].base;
hwaddr size_mmio_hig... | false | qemu | b92ad3949bc9cacd1652b4e07e7f6003b9e512af | static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic,
bool use_highmem)
{
hwaddr base_mmio = vbi->memmap[VIRT_PCIE_MMIO].base;
hwaddr size_mmio = vbi->memmap[VIRT_PCIE_MMIO].size;
hwaddr base_mmio_high = vbi->memmap[VIRT_PCIE_MMIO_HIGH].base;
hwaddr size_mmio_hig... | {
"code": [],
"line_no": []
} | static void FUNC_0(const VirtBoardInfo *VAR_0, qemu_irq *VAR_1,
bool VAR_2)
{
hwaddr base_mmio = VAR_0->memmap[VIRT_PCIE_MMIO].base;
hwaddr size_mmio = VAR_0->memmap[VIRT_PCIE_MMIO].size;
hwaddr base_mmio_high = VAR_0->memmap[VIRT_PCIE_MMIO_HIGH].base;
hwaddr size_mmio_high... | [
"static void FUNC_0(const VirtBoardInfo *VAR_0, qemu_irq *VAR_1,\nbool VAR_2)\n{",
"hwaddr base_mmio = VAR_0->memmap[VIRT_PCIE_MMIO].base;",
"hwaddr size_mmio = VAR_0->memmap[VIRT_PCIE_MMIO].size;",
"hwaddr base_mmio_high = VAR_0->memmap[VIRT_PCIE_MMIO_HIGH].base;",
"hwaddr size_mmio_high = VAR_0->memmap[VI... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[... |
12,481 | int omap_validate_emifs_addr(struct omap_mpu_state_s *s,
target_phys_addr_t addr)
{
return addr >= OMAP_EMIFS_BASE && addr < OMAP_EMIFF_BASE;
}
| false | qemu | b854bc196f5c4b4e3299c0b0ee63cf828ece9e77 | int omap_validate_emifs_addr(struct omap_mpu_state_s *s,
target_phys_addr_t addr)
{
return addr >= OMAP_EMIFS_BASE && addr < OMAP_EMIFF_BASE;
}
| {
"code": [],
"line_no": []
} | int FUNC_0(struct omap_mpu_state_s *VAR_0,
target_phys_addr_t VAR_1)
{
return VAR_1 >= OMAP_EMIFS_BASE && VAR_1 < OMAP_EMIFF_BASE;
}
| [
"int FUNC_0(struct omap_mpu_state_s *VAR_0,\ntarget_phys_addr_t VAR_1)\n{",
"return VAR_1 >= OMAP_EMIFS_BASE && VAR_1 < OMAP_EMIFF_BASE;",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
12,482 | static int ppc_hash64_get_physical_address(CPUPPCState *env,
struct mmu_ctx_hash64 *ctx,
target_ulong eaddr, int rw,
int access_type)
{
bool real_mode = (access_type == ACCESS_CODE &... | false | qemu | 91cda45b69e45a089f9989979a65db3f710c9925 | static int ppc_hash64_get_physical_address(CPUPPCState *env,
struct mmu_ctx_hash64 *ctx,
target_ulong eaddr, int rw,
int access_type)
{
bool real_mode = (access_type == ACCESS_CODE &... | {
"code": [],
"line_no": []
} | static int FUNC_0(CPUPPCState *VAR_0,
struct mmu_ctx_hash64 *VAR_1,
target_ulong VAR_2, int VAR_3,
int VAR_4)
{
bool real_mode = (VAR_4 == ACCESS_CODE && msr_ir == 0)
|| (VA... | [
"static int FUNC_0(CPUPPCState *VAR_0,\nstruct mmu_ctx_hash64 *VAR_1,\ntarget_ulong VAR_2, int VAR_3,\nint VAR_4)\n{",
"bool real_mode = (VAR_4 == ACCESS_CODE && msr_ir == 0)\n|| (VAR_4 != ACCESS_CODE && msr_dr == 0);",
"if (real_mode) {",
"VAR_1->raddr = VAR_2 & 0x0FFFFFFFFFFFFFFFULL;",
"VAR_1->prot = PAGE... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11,
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
12,483 | void cpu_resume_from_signal(CPUState *env1, void *puc)
{
env = env1;
/* XXX: restore cpu registers saved in host registers */
env->exception_index = -1;
longjmp(env->jmp_env, 1);
}
| false | qemu | cea5f9a28faa528b6b1b117c9ab2d8828f473fef | void cpu_resume_from_signal(CPUState *env1, void *puc)
{
env = env1;
env->exception_index = -1;
longjmp(env->jmp_env, 1);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(CPUState *VAR_0, void *VAR_1)
{
env = VAR_0;
env->exception_index = -1;
longjmp(env->jmp_env, 1);
}
| [
"void FUNC_0(CPUState *VAR_0, void *VAR_1)\n{",
"env = VAR_0;",
"env->exception_index = -1;",
"longjmp(env->jmp_env, 1);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
13
],
[
15
],
[
17
]
] |
12,484 | static void minimac2_cleanup(NetClientState *nc)
{
MilkymistMinimac2State *s = qemu_get_nic_opaque(nc);
s->nic = NULL;
}
| false | qemu | 57407ea44cc0a3d630b9b89a2be011f1955ce5c1 | static void minimac2_cleanup(NetClientState *nc)
{
MilkymistMinimac2State *s = qemu_get_nic_opaque(nc);
s->nic = NULL;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(NetClientState *VAR_0)
{
MilkymistMinimac2State *s = qemu_get_nic_opaque(VAR_0);
s->nic = NULL;
}
| [
"static void FUNC_0(NetClientState *VAR_0)\n{",
"MilkymistMinimac2State *s = qemu_get_nic_opaque(VAR_0);",
"s->nic = NULL;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
12,486 | static int webp_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
AVFrame * const p = data;
WebPContext *s = avctx->priv_data;
GetByteContext gb;
int ret;
uint32_t chunk_type, chunk_size;
int vp8x_flags = 0;
s->avctx ... | false | FFmpeg | 76d4c62734fbb8a9f497712812f30ff5c27e787f | static int webp_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
AVFrame * const p = data;
WebPContext *s = avctx->priv_data;
GetByteContext gb;
int ret;
uint32_t chunk_type, chunk_size;
int vp8x_flags = 0;
s->avctx ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
AVFrame * const p = VAR_1;
WebPContext *s = VAR_0->priv_data;
GetByteContext gb;
int VAR_4;
uint32_t chunk_type, chunk_size;
int VAR_5 = 0;
s->VAR_0 = VAR_0;
... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"AVFrame * const p = VAR_1;",
"WebPContext *s = VAR_0->priv_data;",
"GetByteContext gb;",
"int VAR_4;",
"uint32_t chunk_type, chunk_size;",
"int VAR_5 = 0;",
"s->VAR_0 = VAR_0;",
"s->width = 0;",
"s->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
... |
12,487 | static int find_hw_breakpoint(target_ulong addr, int len, int type)
{
int n;
for (n = 0; n < nb_hw_breakpoint; n++)
if (hw_breakpoint[n].addr == addr && hw_breakpoint[n].type == type &&
(hw_breakpoint[n].len == len || len == -1))
return n;
return -1;
}
| false | qemu | b9bec74bcb16519a876ec21cd5277c526a9b512d | static int find_hw_breakpoint(target_ulong addr, int len, int type)
{
int n;
for (n = 0; n < nb_hw_breakpoint; n++)
if (hw_breakpoint[n].addr == addr && hw_breakpoint[n].type == type &&
(hw_breakpoint[n].len == len || len == -1))
return n;
return -1;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(target_ulong VAR_0, int VAR_1, int VAR_2)
{
int VAR_3;
for (VAR_3 = 0; VAR_3 < nb_hw_breakpoint; VAR_3++)
if (hw_breakpoint[VAR_3].VAR_0 == VAR_0 && hw_breakpoint[VAR_3].VAR_2 == VAR_2 &&
(hw_breakpoint[VAR_3].VAR_1 == VAR_1 || VAR_1 == -1))
return VAR_3... | [
"static int FUNC_0(target_ulong VAR_0, int VAR_1, int VAR_2)\n{",
"int VAR_3;",
"for (VAR_3 = 0; VAR_3 < nb_hw_breakpoint; VAR_3++)",
"if (hw_breakpoint[VAR_3].VAR_0 == VAR_0 && hw_breakpoint[VAR_3].VAR_2 == VAR_2 &&\n(hw_breakpoint[VAR_3].VAR_1 == VAR_1 || VAR_1 == -1))\nreturn VAR_3;",
"return -1;",
"}"... | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13,
15
],
[
17
],
[
19
]
] |
12,488 | static void qobject_input_start_struct(Visitor *v, const char *name, void **obj,
size_t size, Error **errp)
{
QObjectInputVisitor *qiv = to_qiv(v);
QObject *qobj = qobject_input_get_object(qiv, name, true, errp);
if (obj) {
*obj = NULL;
}
if (... | true | qemu | a9fc37f6bc3f2ab90585cb16493da9f6dcfbfbcf | static void qobject_input_start_struct(Visitor *v, const char *name, void **obj,
size_t size, Error **errp)
{
QObjectInputVisitor *qiv = to_qiv(v);
QObject *qobj = qobject_input_get_object(qiv, name, true, errp);
if (obj) {
*obj = NULL;
}
if (... | {
"code": [
" error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : \"null\",",
" \"QDict\");",
" qobject_input_push(qiv, qobj, obj);",
" error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : \"null\",",
" error_setg(errp, QERR_INVALID_PARAMETE... | static void FUNC_0(Visitor *VAR_0, const char *VAR_1, void **VAR_2,
size_t VAR_3, Error **VAR_4)
{
QObjectInputVisitor *qiv = to_qiv(VAR_0);
QObject *qobj = qobject_input_get_object(qiv, VAR_1, true, VAR_4);
if (VAR_2) {
*VAR_2 = NULL;
}
if (!... | [
"static void FUNC_0(Visitor *VAR_0, const char *VAR_1, void **VAR_2,\nsize_t VAR_3, Error **VAR_4)\n{",
"QObjectInputVisitor *qiv = to_qiv(VAR_0);",
"QObject *qobj = qobject_input_get_object(qiv, VAR_1, true, VAR_4);",
"if (VAR_2) {",
"*VAR_2 = NULL;",
"}",
"if (!qobj) {",
"return;",
"}",
"if (qob... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
]
] |
12,489 | static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length)
{
int i, consumed, ret = 0;
s->ref = NULL;
s->last_eos = s->eos;
s->eos = 0;
/* split the input packet into NAL units, so we know the upper bound on the
* number of slices in the frame */
s->nb_nals = 0;... | true | FFmpeg | 2b215b7f5af0ef9be79c697d8990e6958a134f98 | static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length)
{
int i, consumed, ret = 0;
s->ref = NULL;
s->last_eos = s->eos;
s->eos = 0;
s->nb_nals = 0;
while (length >= 4) {
HEVCNAL *nal;
int extract_length = 0;
if (s->is_nalff) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(HEVCContext *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
int VAR_7, VAR_4, VAR_5 = 0;
VAR_0->ref = NULL;
VAR_0->last_eos = VAR_0->eos;
VAR_0->eos = 0;
VAR_0->nb_nals = 0;
while (VAR_2 >= 4) {
HEVCNAL *nal;
int VAR_6 = 0;
if (VAR_0->... | [
"static int FUNC_0(HEVCContext *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"int VAR_7, VAR_4, VAR_5 = 0;",
"VAR_0->ref = NULL;",
"VAR_0->last_eos = VAR_0->eos;",
"VAR_0->eos = 0;",
"VAR_0->nb_nals = 0;",
"while (VAR_2 >= 4) {",
"HEVCNAL *nal;",
"int VAR_6 = 0;",
"if (VAR_0->is_nalff) {",
"int ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
52
],
[
54... |
12,490 | static uint64_t vfio_rom_read(void *opaque, hwaddr addr, unsigned size)
{
VFIODevice *vdev = opaque;
uint64_t val = ((uint64_t)1 << (size * 8)) - 1;
/* Load the ROM lazily when the guest tries to read it */
if (unlikely(!vdev->rom)) {
memcpy(&val, vdev->rom + addr,
(addr <... | true | qemu | e638073c569e801ce9def2016a84f955cbbca779 | static uint64_t vfio_rom_read(void *opaque, hwaddr addr, unsigned size)
{
VFIODevice *vdev = opaque;
uint64_t val = ((uint64_t)1 << (size * 8)) - 1;
if (unlikely(!vdev->rom)) {
memcpy(&val, vdev->rom + addr,
(addr < vdev->rom_size) ? MIN(size, vdev->rom_size - addr) : 0);... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, hwaddr addr, unsigned size)
{
VFIODevice *vdev = opaque;
uint64_t val = ((uint64_t)1 << (size * 8)) - 1;
if (unlikely(!vdev->rom)) {
memcpy(&val, vdev->rom + addr,
(addr < vdev->rom_size) ? MIN(size, vdev->rom_size - addr) : 0);
... | [
"static uint64_t FUNC_0(void *opaque, hwaddr addr, unsigned size)\n{",
"VFIODevice *vdev = opaque;",
"uint64_t val = ((uint64_t)1 << (size * 8)) - 1;",
"if (unlikely(!vdev->rom)) {",
"memcpy(&val, vdev->rom + addr,\n(addr < vdev->rom_size) ? MIN(size, vdev->rom_size - addr) : 0);",
"DPRINTF(\"%s(%04x:%02x... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
22,
24
],
[
28,
30,
32
],
[
36
]
] |
12,491 | static void vtd_handle_gcmd_qie(IntelIOMMUState *s, bool en)
{
uint64_t iqa_val = vtd_get_quad_raw(s, DMAR_IQA_REG);
trace_vtd_inv_qi_enable(en);
if (en) {
if (vtd_queued_inv_enable_check(s)) {
s->iq = iqa_val & VTD_IQA_IQA_MASK;
/* 2^(x+8) entries */
... | true | qemu | 8991c460be5a0811194fd4d2b49ba7146a23526b | static void vtd_handle_gcmd_qie(IntelIOMMUState *s, bool en)
{
uint64_t iqa_val = vtd_get_quad_raw(s, DMAR_IQA_REG);
trace_vtd_inv_qi_enable(en);
if (en) {
if (vtd_queued_inv_enable_check(s)) {
s->iq = iqa_val & VTD_IQA_IQA_MASK;
s->iq_size = 1UL << (... | {
"code": [
" if (vtd_queued_inv_enable_check(s)) {",
" s->iq = iqa_val & VTD_IQA_IQA_MASK;",
" s->iq_size = 1UL << ((iqa_val & VTD_IQA_QS) + 8);",
" s->qi_enabled = true;",
" trace_vtd_inv_qi_setup(s->iq, s->iq_size);",
" vtd_set_c... | static void FUNC_0(IntelIOMMUState *VAR_0, bool VAR_1)
{
uint64_t iqa_val = vtd_get_quad_raw(VAR_0, DMAR_IQA_REG);
trace_vtd_inv_qi_enable(VAR_1);
if (VAR_1) {
if (vtd_queued_inv_enable_check(VAR_0)) {
VAR_0->iq = iqa_val & VTD_IQA_IQA_MASK;
VAR_0->iq... | [
"static void FUNC_0(IntelIOMMUState *VAR_0, bool VAR_1)\n{",
"uint64_t iqa_val = vtd_get_quad_raw(VAR_0, DMAR_IQA_REG);",
"trace_vtd_inv_qi_enable(VAR_1);",
"if (VAR_1) {",
"if (vtd_queued_inv_enable_check(VAR_0)) {",
"VAR_0->iq = iqa_val & VTD_IQA_IQA_MASK;",
"VAR_0->iq_size = 1UL << ((iqa_val & VTD_IQ... | [
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53... |
12,492 | static int get_qPy_pred(HEVCContext *s, int xC, int yC,
int xBase, int yBase, int log2_cb_size)
{
HEVCLocalContext *lc = s->HEVClc;
int ctb_size_mask = (1 << s->sps->log2_ctb_size) - 1;
int MinCuQpDeltaSizeMask = (1 << (s->sps->log2_ctb_size -
... | true | FFmpeg | 64278039e55ffc88d231a8d760ecc257a120760a | static int get_qPy_pred(HEVCContext *s, int xC, int yC,
int xBase, int yBase, int log2_cb_size)
{
HEVCLocalContext *lc = s->HEVClc;
int ctb_size_mask = (1 << s->sps->log2_ctb_size) - 1;
int MinCuQpDeltaSizeMask = (1 << (s->sps->log2_ctb_size -
... | {
"code": [
" qPy_pred = lc->qp_y;",
" if (log2_cb_size < s->sps->log2_ctb_size -",
" s->pps->diff_cu_qp_delta_depth) {",
" static const int offsetX[8][8] = {",
" { -1, 1, 3, 1, 7, 1, 3, 1 },",
" { 0, 0, 0, 0, 0,... | static int FUNC_0(HEVCContext *VAR_0, int VAR_1, int VAR_2,
int VAR_3, int VAR_4, int VAR_5)
{
HEVCLocalContext *lc = VAR_0->HEVClc;
int VAR_6 = (1 << VAR_0->sps->log2_ctb_size) - 1;
int VAR_7 = (1 << (VAR_0->sps->log2_ctb_size -
... | [
"static int FUNC_0(HEVCContext *VAR_0, int VAR_1, int VAR_2,\nint VAR_3, int VAR_4, int VAR_5)\n{",
"HEVCLocalContext *lc = VAR_0->HEVClc;",
"int VAR_6 = (1 << VAR_0->sps->log2_ctb_size) - 1;",
"int VAR_7 = (1 << (VAR_0->sps->log2_ctb_size -\nVAR_0->pps->diff_cu_qp_delta_depth)) - 1;",
"int VAR_8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
0,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
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
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
12,494 | static void framebuffer_update_request(VncState *vs, int incremental,
int x_position, int y_position,
int w, int h)
{
if (x_position > ds_get_width(vs->ds))
x_position = ds_get_width(vs->ds);
if (y_position > ds_get_height(vs->ds))
y_position = ds_get_height(vs->ds);... | true | qemu | 6cec5487990bf3f1f22b3fcb871978255e92ae0d | static void framebuffer_update_request(VncState *vs, int incremental,
int x_position, int y_position,
int w, int h)
{
if (x_position > ds_get_width(vs->ds))
x_position = ds_get_width(vs->ds);
if (y_position > ds_get_height(vs->ds))
y_position = ds_get_height(vs->ds);... | {
"code": [
"\t memset(old_row, 42, ds_get_width(vs->ds) * vs->depth);"
],
"line_no": [
43
]
} | static void FUNC_0(VncState *VAR_0, int VAR_1,
int VAR_2, int VAR_3,
int VAR_4, int VAR_5)
{
if (VAR_2 > ds_get_width(VAR_0->ds))
VAR_2 = ds_get_width(VAR_0->ds);
if (VAR_3 > ds_get_height(VAR_0->ds))
VAR_3 = ds_get_height(VAR_0->ds);
if (VAR_2 + VAR_4 >= ds_get... | [
"static void FUNC_0(VncState *VAR_0, int VAR_1,\nint VAR_2, int VAR_3,\nint VAR_4, int VAR_5)\n{",
"if (VAR_2 > ds_get_width(VAR_0->ds))\nVAR_2 = ds_get_width(VAR_0->ds);",
"if (VAR_3 > ds_get_height(VAR_0->ds))\nVAR_3 = ds_get_height(VAR_0->ds);",
"if (VAR_2 + VAR_4 >= ds_get_width(VAR_0->ds))\nVAR_4 = ds_ge... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9,
11
],
[
13,
15
],
[
17,
19
],
[
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
]
] |
12,495 | static void vnc_connect(VncDisplay *vd, int csock)
{
VncState *vs = qemu_mallocz(sizeof(VncState));
vs->csock = csock;
VNC_DEBUG("New client on socket %d\n", csock);
dcl->idle = 0;
socket_set_nonblock(vs->csock);
qemu_set_fd_handler2(vs->csock, NULL, vnc_client_read, NULL, vs);
v... | true | qemu | 6baebed7698a37a0ac5168faf26023426b0ac940 | static void vnc_connect(VncDisplay *vd, int csock)
{
VncState *vs = qemu_mallocz(sizeof(VncState));
vs->csock = csock;
VNC_DEBUG("New client on socket %d\n", csock);
dcl->idle = 0;
socket_set_nonblock(vs->csock);
qemu_set_fd_handler2(vs->csock, NULL, vnc_client_read, NULL, vs);
v... | {
"code": [
" memset(vs->dirty_row, 0xFF, sizeof(vs->dirty_row));",
" memset(vs->old_data, 0, ds_get_linesize(vs->ds) * ds_get_height(vs->ds));",
" memset(vs->dirty_row, 0xFF, sizeof(vs->dirty_row));"
],
"line_no": [
53,
51,
53
]
} | static void FUNC_0(VncDisplay *VAR_0, int VAR_1)
{
VncState *vs = qemu_mallocz(sizeof(VncState));
vs->VAR_1 = VAR_1;
VNC_DEBUG("New client on socket %d\n", VAR_1);
dcl->idle = 0;
socket_set_nonblock(vs->VAR_1);
qemu_set_fd_handler2(vs->VAR_1, NULL, vnc_client_read, NULL, vs);
vs-... | [
"static void FUNC_0(VncDisplay *VAR_0, int VAR_1)\n{",
"VncState *vs = qemu_mallocz(sizeof(VncState));",
"vs->VAR_1 = VAR_1;",
"VNC_DEBUG(\"New client on socket %d\\n\", VAR_1);",
"dcl->idle = 0;",
"socket_set_nonblock(vs->VAR_1);",
"qemu_set_fd_handler2(vs->VAR_1, NULL, vnc_client_read, NULL, vs);",
... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49... |
12,496 | static uint32_t get_elf_hwcap(void)
{
CPUState *e = thread_env;
uint32_t features = 0;
/* We don't have to be terribly complete here; the high points are
Altivec/FP/SPE support. Anything else is just a bonus. */
#define GET_FEATURE(flag, feature) \
do {if (e->insns_flags &... | true | qemu | 3efa9a672e4a5f7b2d35cf457ea277e997a0f8c6 | static uint32_t get_elf_hwcap(void)
{
CPUState *e = thread_env;
uint32_t features = 0;
#define GET_FEATURE(flag, feature) \
do {if (e->insns_flags & flag) features |= feature; } while(0)
GET_FEATURE(PPC_64B, PPC_FEATURE_64);
GET_FEATURE(PPC_FLOAT, PPC_FEATURE_HAS_FPU);
... | {
"code": [
" GET_FEATURE(PPC_64B, PPC_FEATURE_64);",
" GET_FEATURE(PPC_FLOAT, PPC_FEATURE_HAS_FPU);",
" GET_FEATURE(PPC_ALTIVEC, PPC_FEATURE_HAS_ALTIVEC);",
" GET_FEATURE(PPC_SPE, PPC_FEATURE_HAS_SPE);",
" GET_FEATURE(PPC_SPE_SINGLE, PPC_FEATURE_HAS_EFP_SINGLE);",
" GET_FEAT... | static uint32_t FUNC_0(void)
{
CPUState *e = thread_env;
uint32_t features = 0;
#define GET_FEATURE(flag, feature) \
do {if (e->insns_flags & flag) features |= feature; } while(0)
GET_FEATURE(PPC_64B, PPC_FEATURE_64);
GET_FEATURE(PPC_FLOAT, PPC_FEATURE_HAS_FPU);
GE... | [
"static uint32_t FUNC_0(void)\n{",
"CPUState *e = thread_env;",
"uint32_t features = 0;",
"#define GET_FEATURE(flag, feature) \\\ndo {if (e->insns_flags & flag) features |= feature; } while(0)",
"GET_FEATURE(PPC_64B, PPC_FEATURE_64);",
"GET_FEATURE(PPC_FLOAT, PPC_FEATURE_HAS_FPU);",
"GET_FE... | [
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
39
],
[
41
]
] |
12,497 | static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, unsigned int src_size)
{
unsigned i;
#ifdef HAVE_MMX
long mmx_size= 23 - src_size;
asm volatile (
"movq "MANGLE(mask24r)", %%mm5 \n\t"
"movq "MANGLE(mask24g)", %%mm6 \n\t"
"movq "MANGLE(mask24b)", %%mm7 \n\t"
".balign 16 \n\... | true | FFmpeg | 7f526efd17973ec6d2204f7a47b6923e2be31363 | static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, unsigned int src_size)
{
unsigned i;
#ifdef HAVE_MMX
long mmx_size= 23 - src_size;
asm volatile (
"movq "MANGLE(mask24r)", %%mm5 \n\t"
"movq "MANGLE(mask24g)", %%mm6 \n\t"
"movq "MANGLE(mask24b)", %%mm7 \n\t"
".balign 16 \n\... | {
"code": [
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsig... | static inline void FUNC_0(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, unsigned int src_size)
{
unsigned VAR_0;
#ifdef HAVE_MMX
long mmx_size= 23 - src_size;
asm volatile (
"movq "MANGLE(mask24r)", %%mm5 \n\t"
"movq "MANGLE(mask24g)", %%mm6 \n\t"
"movq "MANGLE(mask24b)", %%mm7 \n\t"
".balign 16 ... | [
"static inline void FUNC_0(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, unsigned int src_size)\n{",
"unsigned VAR_0;",
"#ifdef HAVE_MMX\nlong mmx_size= 23 - src_size;",
"asm volatile (\n\"movq \"MANGLE(mask24r)\", %%mm5\t\\n\\t\"\n\"movq \"MANGLE(mask24g)\", %%mm6\t\\n\\t\"\n\"movq \"MANGLE(mask24b)\", %%m... | [
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
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,
69,
71,
73,... |
12,498 | static void ff_amf_tag_contents(void *ctx, const uint8_t *data, const uint8_t *data_end)
{
int size;
char buf[1024];
if (data >= data_end)
return;
switch (*data++) {
case AMF_DATA_TYPE_NUMBER:
av_log(ctx, AV_LOG_DEBUG, " number %g\n", av_int2double(AV_RB64(data)));
... | true | FFmpeg | ecb918e5f0a4395468862b5fbd11a51de9be3d4f | static void ff_amf_tag_contents(void *ctx, const uint8_t *data, const uint8_t *data_end)
{
int size;
char buf[1024];
if (data >= data_end)
return;
switch (*data++) {
case AMF_DATA_TYPE_NUMBER:
av_log(ctx, AV_LOG_DEBUG, " number %g\n", av_int2double(AV_RB64(data)));
... | {
"code": [
" int size;",
" size = FFMIN(size, 1023);",
" int size = bytestream_get_be16(&data);",
" memcpy(buf, data, size);",
" buf[size] = 0;",
" if (size < 0 || size >= data_end - data)"
],
"line_no": [
5,
43,
69,
73... | static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, const uint8_t *VAR_2)
{
int VAR_5;
char VAR_4[1024];
if (VAR_1 >= VAR_2)
return;
switch (*VAR_1++) {
case AMF_DATA_TYPE_NUMBER:
av_log(VAR_0, AV_LOG_DEBUG, " number %g\n", av_int2double(AV_RB64(VAR_1)));
return;... | [
"static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, const uint8_t *VAR_2)\n{",
"int VAR_5;",
"char VAR_4[1024];",
"if (VAR_1 >= VAR_2)\nreturn;",
"switch (*VAR_1++) {",
"case AMF_DATA_TYPE_NUMBER:\nav_log(VAR_0, AV_LOG_DEBUG, \" number %g\\n\", av_int2double(AV_RB64(VAR_1)));",
"return;",
"case AMF... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
... |
12,500 | static int mov_read_extradata(MOVContext *c, AVIOContext *pb, MOVAtom atom,
enum AVCodecID codec_id)
{
AVStream *st;
uint64_t size;
uint8_t *buf;
int err;
if (c->fc->nb_streams < 1) // will happen with jp2 files
return 0;
st= c->fc->streams[c->fc-... | true | FFmpeg | a5cbf1991c3d04b0be3c23ee0a7096b5a365cc85 | static int mov_read_extradata(MOVContext *c, AVIOContext *pb, MOVAtom atom,
enum AVCodecID codec_id)
{
AVStream *st;
uint64_t size;
uint8_t *buf;
int err;
if (c->fc->nb_streams < 1)
return 0;
st= c->fc->streams[c->fc->nb_streams-1];
if (st... | {
"code": [
" if ((err = av_reallocp(&st->codec->extradata, size)) < 0)"
],
"line_no": [
37
]
} | static int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1, MOVAtom VAR_2,
enum AVCodecID VAR_3)
{
AVStream *st;
uint64_t size;
uint8_t *buf;
int VAR_4;
if (VAR_0->fc->nb_streams < 1)
return 0;
st= VAR_0->fc->streams[VAR_0->fc->nb_streams-1];
... | [
"static int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1, MOVAtom VAR_2,\nenum AVCodecID VAR_3)\n{",
"AVStream *st;",
"uint64_t size;",
"uint8_t *buf;",
"int VAR_4;",
"if (VAR_0->fc->nb_streams < 1)\nreturn 0;",
"st= VAR_0->fc->streams[VAR_0->fc->nb_streams-1];",
"if (st->codec->VAR_3 != VAR_3)\nretur... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
21
],
[
25,
27
],
[
31
],
[
33,
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
12,501 | int ff_h263_decode_picture_header(MpegEncContext *s)
{
int format, width, height, i;
uint32_t startcode;
align_get_bits(&s->gb);
startcode= get_bits(&s->gb, 22-8);
for(i= get_bits_left(&s->gb); i>24; i-=8) {
startcode = ((startcode << 8) | get_bits(&s->gb, 8)) & 0x003FFFFF;
... | true | FFmpeg | e93d911e483ffcf3da3dd2cbac2895fa061d2f58 | int ff_h263_decode_picture_header(MpegEncContext *s)
{
int format, width, height, i;
uint32_t startcode;
align_get_bits(&s->gb);
startcode= get_bits(&s->gb, 22-8);
for(i= get_bits_left(&s->gb); i>24; i-=8) {
startcode = ((startcode << 8) | get_bits(&s->gb, 8)) & 0x003FFFFF;
... | {
"code": [
" if (s->pict_type == AV_PICTURE_TYPE_I && s->codec_tag == AV_RL32(\"ZYGO\")){"
],
"line_no": [
497
]
} | int FUNC_0(MpegEncContext *VAR_0)
{
int VAR_1, VAR_2, VAR_3, VAR_7;
uint32_t startcode;
align_get_bits(&VAR_0->gb);
startcode= get_bits(&VAR_0->gb, 22-8);
for(VAR_7= get_bits_left(&VAR_0->gb); VAR_7>24; VAR_7-=8) {
startcode = ((startcode << 8) | get_bits(&VAR_0->gb, 8)) & 0x003... | [
"int FUNC_0(MpegEncContext *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3, VAR_7;",
"uint32_t startcode;",
"align_get_bits(&VAR_0->gb);",
"startcode= get_bits(&VAR_0->gb, 22-8);",
"for(VAR_7= get_bits_left(&VAR_0->gb); VAR_7>24; VAR_7-=8) {",
"startcode = ((startcode << 8) | get_bits(&VAR_0->gb, 8)) & 0x003FFFFF... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
19
],
[
21
],
[
25,
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45,
47
],
[
49,
51
],
[
57
],
[
61
],
... |
12,502 | static uint64_t get_cluster_offset(BlockDriverState *bs,
uint64_t offset, int allocate,
int compressed_size,
int n_start, int n_end)
{
BDRVQcowState *s = bs->opaque;
int min_index, i, j, l1_index, l2_i... | true | qemu | 5e5557d97026d1d3325e0e7b0ba593366da2f3dc | static uint64_t get_cluster_offset(BlockDriverState *bs,
uint64_t offset, int allocate,
int compressed_size,
int n_start, int n_end)
{
BDRVQcowState *s = bs->opaque;
int min_index, i, j, l1_index, l2_i... | {
"code": [
" if (bdrv_pwrite(bs->file, s->l1_table_offset + l1_index * sizeof(tmp),",
" &tmp, sizeof(tmp)) != sizeof(tmp))",
" if (bdrv_pwrite(bs->file, l2_offset, l2_table, s->l2_size * sizeof(uint64_t)) !=",
" s->l2_size * sizeof(uint64_t))",
" ... | static uint64_t FUNC_0(BlockDriverState *bs,
uint64_t offset, int allocate,
int compressed_size,
int n_start, int n_end)
{
BDRVQcowState *s = bs->opaque;
int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4;
uin... | [
"static uint64_t FUNC_0(BlockDriverState *bs,\nuint64_t offset, int allocate,\nint compressed_size,\nint n_start, int n_end)\n{",
"BDRVQcowState *s = bs->opaque;",
"int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4;",
"uint64_t l2_offset, *l2_table, cluster_offset, tmp;",
"uint32_t min_count;",
"int VAR_5;",
"VAR_3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49,
51,
53
],
[
55
... |
12,503 | static BlockAIOCB *blkverify_aio_flush(BlockDriverState *bs,
BlockCompletionFunc *cb,
void *opaque)
{
BDRVBlkverifyState *s = bs->opaque;
/* Only flush test file, the raw file is not important */
return bdrv_aio_flush(s->t... | true | qemu | 44b6789299a8acca3f25331bc411055cafc7bb06 | static BlockAIOCB *blkverify_aio_flush(BlockDriverState *bs,
BlockCompletionFunc *cb,
void *opaque)
{
BDRVBlkverifyState *s = bs->opaque;
return bdrv_aio_flush(s->test_file->bs, cb, opaque);
}
| {
"code": [
" BDRVBlkverifyState *s = bs->opaque;",
" BDRVBlkverifyState *s = bs->opaque;",
"static BlockAIOCB *blkverify_aio_flush(BlockDriverState *bs,",
" BlockCompletionFunc *cb,",
" void *opaque)",
" retu... | static BlockAIOCB *FUNC_0(BlockDriverState *bs,
BlockCompletionFunc *cb,
void *opaque)
{
BDRVBlkverifyState *s = bs->opaque;
return bdrv_aio_flush(s->test_file->bs, cb, opaque);
}
| [
"static BlockAIOCB *FUNC_0(BlockDriverState *bs,\nBlockCompletionFunc *cb,\nvoid *opaque)\n{",
"BDRVBlkverifyState *s = bs->opaque;",
"return bdrv_aio_flush(s->test_file->bs, cb, opaque);",
"}"
] | [
1,
1,
1,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
15
],
[
17
]
] |
12,504 | static int del_existing_snapshots(Monitor *mon, const char *name)
{
BlockDriverState *bs;
QEMUSnapshotInfo sn1, *snapshot = &sn1;
int ret;
bs = NULL;
while ((bs = bdrv_next(bs))) {
if (bdrv_can_snapshot(bs) &&
bdrv_snapshot_find(bs, snapshot, name) >= 0)
{
... | true | qemu | a89d89d3e65800fa4a8e00de7af0ea8272bef779 | static int del_existing_snapshots(Monitor *mon, const char *name)
{
BlockDriverState *bs;
QEMUSnapshotInfo sn1, *snapshot = &sn1;
int ret;
bs = NULL;
while ((bs = bdrv_next(bs))) {
if (bdrv_can_snapshot(bs) &&
bdrv_snapshot_find(bs, snapshot, name) >= 0)
{
... | {
"code": [
" int ret;",
" ret = bdrv_snapshot_delete(bs, name);",
" if (ret < 0) {",
" \"Error while deleting snapshot on '%s'\\n\",",
" bdrv_get_device_name(bs));",
" int ret;",
" if (ret <... | static int FUNC_0(Monitor *VAR_0, const char *VAR_1)
{
BlockDriverState *bs;
QEMUSnapshotInfo sn1, *snapshot = &sn1;
int VAR_2;
bs = NULL;
while ((bs = bdrv_next(bs))) {
if (bdrv_can_snapshot(bs) &&
bdrv_snapshot_find(bs, snapshot, VAR_1) >= 0)
{
V... | [
"static int FUNC_0(Monitor *VAR_0, const char *VAR_1)\n{",
"BlockDriverState *bs;",
"QEMUSnapshotInfo sn1, *snapshot = &sn1;",
"int VAR_2;",
"bs = NULL;",
"while ((bs = bdrv_next(bs))) {",
"if (bdrv_can_snapshot(bs) &&\nbdrv_snapshot_find(bs, snapshot, VAR_1) >= 0)\n{",
"VAR_2 = bdrv_snapshot_delete(b... | [
0,
0,
0,
1,
0,
0,
0,
1,
1,
1,
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
],
[
43
],
[
45
]
] |
12,505 | static void wavpack_decode_flush(AVCodecContext *avctx)
{
WavpackContext *s = avctx->priv_data;
int i;
for (i = 0; i < s->fdec_num; i++)
wv_reset_saved_context(s->fdec[i]);
}
| true | FFmpeg | 2c6cf1394096d08396faadc6e7c0b404fd6df006 | static void wavpack_decode_flush(AVCodecContext *avctx)
{
WavpackContext *s = avctx->priv_data;
int i;
for (i = 0; i < s->fdec_num; i++)
wv_reset_saved_context(s->fdec[i]);
}
| {
"code": [
"static void wavpack_decode_flush(AVCodecContext *avctx)",
" WavpackContext *s = avctx->priv_data;",
" int i;",
" for (i = 0; i < s->fdec_num; i++)",
" wv_reset_saved_context(s->fdec[i]);"
],
"line_no": [
1,
5,
7,
11,
13
]
} | static void FUNC_0(AVCodecContext *VAR_0)
{
WavpackContext *s = VAR_0->priv_data;
int VAR_1;
for (VAR_1 = 0; VAR_1 < s->fdec_num; VAR_1++)
wv_reset_saved_context(s->fdec[VAR_1]);
}
| [
"static void FUNC_0(AVCodecContext *VAR_0)\n{",
"WavpackContext *s = VAR_0->priv_data;",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < s->fdec_num; VAR_1++)",
"wv_reset_saved_context(s->fdec[VAR_1]);",
"}"
] | [
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
]
] |
12,506 | inline static void RENAME(hcscale)(SwsContext *c, uint16_t *dst, long dstWidth, uint8_t *src1, uint8_t *src2,
int srcW, int xInc, int flags, int canMMX2BeUsed, int16_t *hChrFilter,
int16_t *hChrFilterPos, int hChrFilterSize, void *funnyUVCode,
... | true | FFmpeg | aa13b0fc55f5aec58fce24d1a047271b3e5727f1 | inline static void RENAME(hcscale)(SwsContext *c, uint16_t *dst, long dstWidth, uint8_t *src1, uint8_t *src2,
int srcW, int xInc, int flags, int canMMX2BeUsed, int16_t *hChrFilter,
int16_t *hChrFilterPos, int hChrFilterSize, void *funnyUVCode,
... | {
"code": [],
"line_no": []
} | inline static void FUNC_0(hcscale)(SwsContext *c, uint16_t *dst, long dstWidth, uint8_t *src1, uint8_t *src2,
int srcW, int xInc, int flags, int canMMX2BeUsed, int16_t *hChrFilter,
int16_t *hChrFilterPos, int hChrFilterSize, void *funnyUVCode,
... | [
"inline static void FUNC_0(hcscale)(SwsContext *c, uint16_t *dst, long dstWidth, uint8_t *src1, uint8_t *src2,\nint srcW, int xInc, int flags, int canMMX2BeUsed, int16_t *hChrFilter,\nint16_t *hChrFilterPos, int hChrFilterSize, void *funnyUVCode,\nint srcFormat, uint8_t *formatConvBuffer, int16_t *mmx2Filter,\nint3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
12,507 | static int qcow2_check(BlockDriverState *bs, BdrvCheckResult *result,
BdrvCheckMode fix)
{
int ret = qcow2_check_refcounts(bs, result, fix);
if (ret < 0) {
return ret;
}
if (fix && result->check_errors == 0 && result->corruptions == 0) {
return qcow2_mark... | true | qemu | 24530f3e060c71b6c57c7a70336f08a13a8b0a3d | static int qcow2_check(BlockDriverState *bs, BdrvCheckResult *result,
BdrvCheckMode fix)
{
int ret = qcow2_check_refcounts(bs, result, fix);
if (ret < 0) {
return ret;
}
if (fix && result->check_errors == 0 && result->corruptions == 0) {
return qcow2_mark... | {
"code": [
" return qcow2_mark_clean(bs);"
],
"line_no": [
19
]
} | static int FUNC_0(BlockDriverState *VAR_0, BdrvCheckResult *VAR_1,
BdrvCheckMode VAR_2)
{
int VAR_3 = qcow2_check_refcounts(VAR_0, VAR_1, VAR_2);
if (VAR_3 < 0) {
return VAR_3;
}
if (VAR_2 && VAR_1->check_errors == 0 && VAR_1->corruptions == 0) {
return q... | [
"static int FUNC_0(BlockDriverState *VAR_0, BdrvCheckResult *VAR_1,\nBdrvCheckMode VAR_2)\n{",
"int VAR_3 = qcow2_check_refcounts(VAR_0, VAR_1, VAR_2);",
"if (VAR_3 < 0) {",
"return VAR_3;",
"}",
"if (VAR_2 && VAR_1->check_errors == 0 && VAR_1->corruptions == 0) {",
"return qcow2_mark_clean(VAR_0);",
... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
12,508 | static inline void gen_sync_flags(DisasContext *dc)
{
/* Sync the tb dependent flag between translate and runtime. */
if (dc->tb_flags != dc->synced_flags) {
tcg_gen_movi_tl(env_flags, dc->tb_flags);
dc->synced_flags = dc->tb_flags;
}
}
| true | qemu | 0c53d7342b4e8412f3b81eed67f053304813dc5d | static inline void gen_sync_flags(DisasContext *dc)
{
if (dc->tb_flags != dc->synced_flags) {
tcg_gen_movi_tl(env_flags, dc->tb_flags);
dc->synced_flags = dc->tb_flags;
}
}
| {
"code": [
" if (dc->tb_flags != dc->synced_flags) {",
" tcg_gen_movi_tl(env_flags, dc->tb_flags);"
],
"line_no": [
7,
9
]
} | static inline void FUNC_0(DisasContext *VAR_0)
{
if (VAR_0->tb_flags != VAR_0->synced_flags) {
tcg_gen_movi_tl(env_flags, VAR_0->tb_flags);
VAR_0->synced_flags = VAR_0->tb_flags;
}
}
| [
"static inline void FUNC_0(DisasContext *VAR_0)\n{",
"if (VAR_0->tb_flags != VAR_0->synced_flags) {",
"tcg_gen_movi_tl(env_flags, VAR_0->tb_flags);",
"VAR_0->synced_flags = VAR_0->tb_flags;",
"}",
"}"
] | [
0,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
12,509 | void avcodec_flush_buffers(AVCodecContext *avctx)
{
if(HAVE_PTHREADS && avctx->active_thread_type&FF_THREAD_FRAME)
ff_thread_flush(avctx);
if(avctx->codec->flush)
avctx->codec->flush(avctx);
}
| true | FFmpeg | d1cf45911935cc4fed9afd3a37d99616d31eb9da | void avcodec_flush_buffers(AVCodecContext *avctx)
{
if(HAVE_PTHREADS && avctx->active_thread_type&FF_THREAD_FRAME)
ff_thread_flush(avctx);
if(avctx->codec->flush)
avctx->codec->flush(avctx);
}
| {
"code": [
" if(avctx->codec->flush)"
],
"line_no": [
9
]
} | void FUNC_0(AVCodecContext *VAR_0)
{
if(HAVE_PTHREADS && VAR_0->active_thread_type&FF_THREAD_FRAME)
ff_thread_flush(VAR_0);
if(VAR_0->codec->flush)
VAR_0->codec->flush(VAR_0);
}
| [
"void FUNC_0(AVCodecContext *VAR_0)\n{",
"if(HAVE_PTHREADS && VAR_0->active_thread_type&FF_THREAD_FRAME)\nff_thread_flush(VAR_0);",
"if(VAR_0->codec->flush)\nVAR_0->codec->flush(VAR_0);",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
]
] |
12,510 | static int ipvideo_decode_block_opcode_0x5(IpvideoContext *s)
{
signed char x, y;
/* copy a block from the previous frame using an expanded range;
* need 2 more bytes */
CHECK_STREAM_PTR(2);
x = *s->stream_ptr++;
y = *s->stream_ptr++;
debug_interplay (" motion bytes = %d, %... | false | FFmpeg | 80ca19f766aea8f4724aac1b3faa772d25163c8a | static int ipvideo_decode_block_opcode_0x5(IpvideoContext *s)
{
signed char x, y;
CHECK_STREAM_PTR(2);
x = *s->stream_ptr++;
y = *s->stream_ptr++;
debug_interplay (" motion bytes = %d, %d\n", x, y);
return copy_from(s, &s->last_frame, x, y);
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(IpvideoContext *VAR_0)
{
signed char VAR_1, VAR_2;
CHECK_STREAM_PTR(2);
VAR_1 = *VAR_0->stream_ptr++;
VAR_2 = *VAR_0->stream_ptr++;
debug_interplay (" motion bytes = %d, %d\n", VAR_1, VAR_2);
return copy_from(VAR_0, &VAR_0->last_frame, VAR_1, VAR_2);
}
| [
"static int FUNC_0(IpvideoContext *VAR_0)\n{",
"signed char VAR_1, VAR_2;",
"CHECK_STREAM_PTR(2);",
"VAR_1 = *VAR_0->stream_ptr++;",
"VAR_2 = *VAR_0->stream_ptr++;",
"debug_interplay (\" motion bytes = %d, %d\\n\", VAR_1, VAR_2);",
"return copy_from(VAR_0, &VAR_0->last_frame, VAR_1, VAR_2);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
]
] |
12,511 | void smc91c111_init(NICInfo *nd, uint32_t base, qemu_irq irq)
{
smc91c111_state *s;
int iomemtype;
qemu_check_nic_model(nd, "smc91c111");
s = (smc91c111_state *)qemu_mallocz(sizeof(smc91c111_state));
iomemtype = cpu_register_io_memory(0, smc91c111_readfn,
... | true | qemu | b946a1533209f61a93e34898aebb5b43154b99c3 | void smc91c111_init(NICInfo *nd, uint32_t base, qemu_irq irq)
{
smc91c111_state *s;
int iomemtype;
qemu_check_nic_model(nd, "smc91c111");
s = (smc91c111_state *)qemu_mallocz(sizeof(smc91c111_state));
iomemtype = cpu_register_io_memory(0, smc91c111_readfn,
... | {
"code": [
" int iomemtype;",
" int iomemtype;",
" int iomemtype;",
" iomemtype = cpu_register_io_memory(0, smc91c111_readfn,",
" smc91c111_writefn, s);",
" cpu_register_physical_memory(base, 16, iomemtype);",
" ... | void FUNC_0(NICInfo *VAR_0, uint32_t VAR_1, qemu_irq VAR_2)
{
smc91c111_state *s;
int VAR_3;
qemu_check_nic_model(VAR_0, "smc91c111");
s = (smc91c111_state *)qemu_mallocz(sizeof(smc91c111_state));
VAR_3 = cpu_register_io_memory(0, smc91c111_readfn,
s... | [
"void FUNC_0(NICInfo *VAR_0, uint32_t VAR_1, qemu_irq VAR_2)\n{",
"smc91c111_state *s;",
"int VAR_3;",
"qemu_check_nic_model(VAR_0, \"smc91c111\");",
"s = (smc91c111_state *)qemu_mallocz(sizeof(smc91c111_state));",
"VAR_3 = cpu_register_io_memory(0, smc91c111_readfn,\nsmc91c111_writefn, s);",
"cpu_regis... | [
0,
0,
1,
0,
0,
1,
1,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33,
35
],
[
37
],
[
41
]
] |
12,512 | static av_cold int vc2_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
{
int ret;
int max_frame_bytes, sig_size = 256;
VC2EncContext *s = avctx->priv_data;
const char aux_data[] = "FFmpeg version "FFMPEG_VERSION;... | false | FFmpeg | dc0481f2fbae4d5942ccabf2061900da3ee85f30 | static av_cold int vc2_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
{
int ret;
int max_frame_bytes, sig_size = 256;
VC2EncContext *s = avctx->priv_data;
const char aux_data[] = "FFmpeg version "FFMPEG_VERSION;... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
{
int VAR_0;
int VAR_1, VAR_2 = 256;
VC2EncContext *s = avctx->priv_data;
const char VAR_3[] = "FFmpeg version "FFMPEG_VERSION;
const int VAR_4 = ... | [
"static av_cold int FUNC_0(AVCodecContext *avctx, AVPacket *avpkt,\nconst AVFrame *frame, int *got_packet_ptr)\n{",
"int VAR_0;",
"int VAR_1, VAR_2 = 256;",
"VC2EncContext *s = avctx->priv_data;",
"const char VAR_3[] = \"FFmpeg version \"FFMPEG_VERSION;",
"const int VAR_4 = sizeof(VAR_3);",
"const int V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
37,
39
],
[
45
],
[
47,
49
],
[
51
],
[
53
],
[... |
12,513 | static int estimate_best_b_count(MpegEncContext *s)
{
AVCodec *codec = avcodec_find_encoder(s->avctx->codec_id);
AVCodecContext *c = avcodec_alloc_context3(NULL);
AVFrame input[FF_MAX_B_FRAMES + 2];
const int scale = s->avctx->brd_scale;
int i, j, out_size, p_lambda, b_lambda, lambda2;
... | false | FFmpeg | aa241229891173b0357eee04e6ca78f806cc9c0c | static int estimate_best_b_count(MpegEncContext *s)
{
AVCodec *codec = avcodec_find_encoder(s->avctx->codec_id);
AVCodecContext *c = avcodec_alloc_context3(NULL);
AVFrame input[FF_MAX_B_FRAMES + 2];
const int scale = s->avctx->brd_scale;
int i, j, out_size, p_lambda, b_lambda, lambda2;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(MpegEncContext *VAR_0)
{
AVCodec *codec = avcodec_find_encoder(VAR_0->avctx->codec_id);
AVCodecContext *c = avcodec_alloc_context3(NULL);
AVFrame input[FF_MAX_B_FRAMES + 2];
const int VAR_1 = VAR_0->avctx->brd_scale;
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;
int64... | [
"static int FUNC_0(MpegEncContext *VAR_0)\n{",
"AVCodec *codec = avcodec_find_encoder(VAR_0->avctx->codec_id);",
"AVCodecContext *c = avcodec_alloc_context3(NULL);",
"AVFrame input[FF_MAX_B_FRAMES + 2];",
"const int VAR_1 = VAR_0->avctx->brd_scale;",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
29
],
[
33
],
[
35,
37
],
[
39,
41
],
[
45
],
[
47
],
[
49,
51
],
[
53
],
[
55
],
[... |
12,514 | static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_idx)
{
AVStream *stream = fmt_ctx->streams[stream_idx];
AVCodecContext *dec_ctx;
AVCodec *dec;
char val_str[128];
AVRational display_aspect_ratio;
struct print_buf pbuf = {.s = NULL};
print_section_heade... | false | FFmpeg | 0491a2a07a44f6e5e6f34081835e402c07025fd2 | static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_idx)
{
AVStream *stream = fmt_ctx->streams[stream_idx];
AVCodecContext *dec_ctx;
AVCodec *dec;
char val_str[128];
AVRational display_aspect_ratio;
struct print_buf pbuf = {.s = NULL};
print_section_heade... | {
"code": [],
"line_no": []
} | static void FUNC_0(WriterContext *VAR_0, AVFormatContext *VAR_1, int VAR_2)
{
AVStream *stream = VAR_1->streams[VAR_2];
AVCodecContext *dec_ctx;
AVCodec *dec;
char VAR_3[128];
AVRational display_aspect_ratio;
struct print_buf VAR_4 = {.s = NULL};
print_section_header("stream");
... | [
"static void FUNC_0(WriterContext *VAR_0, AVFormatContext *VAR_1, int VAR_2)\n{",
"AVStream *stream = VAR_1->streams[VAR_2];",
"AVCodecContext *dec_ctx;",
"AVCodec *dec;",
"char VAR_3[128];",
"AVRational display_aspect_ratio;",
"struct print_buf VAR_4 = {.s = NULL};",
"print_section_header(\"stream\")... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
51
],
[
53
... |
12,515 | static void spapr_cpu_reset(void *opaque)
{
PowerPCCPU *cpu = opaque;
CPUState *cs = CPU(cpu);
CPUPPCState *env = &cpu->env;
cpu_reset(cs);
/* All CPUs start halted. CPU0 is unhalted from the machine level
* reset code and the rest are explicitly started up by the guest
* usin... | true | qemu | f3c75d42adbba553eaf218a832d4fbea32c8f7b8 | static void spapr_cpu_reset(void *opaque)
{
PowerPCCPU *cpu = opaque;
CPUState *cs = CPU(cpu);
CPUPPCState *env = &cpu->env;
cpu_reset(cs);
cs->halted = 1;
env->spr[SPR_HIOR] = 0;
env->external_htab = (uint8_t *)spapr->htab;
if (kvm_enabled() && !env->external_... | {
"code": [
" env->htab_mask = HTAB_SIZE(spapr) - 1;"
],
"line_no": [
49
]
} | static void FUNC_0(void *VAR_0)
{
PowerPCCPU *cpu = VAR_0;
CPUState *cs = CPU(cpu);
CPUPPCState *env = &cpu->env;
cpu_reset(cs);
cs->halted = 1;
env->spr[SPR_HIOR] = 0;
env->external_htab = (uint8_t *)spapr->htab;
if (kvm_enabled() && !env->external_htab) {
... | [
"static void FUNC_0(void *VAR_0)\n{",
"PowerPCCPU *cpu = VAR_0;",
"CPUState *cs = CPU(cpu);",
"CPUPPCState *env = &cpu->env;",
"cpu_reset(cs);",
"cs->halted = 1;",
"env->spr[SPR_HIOR] = 0;",
"env->external_htab = (uint8_t *)spapr->htab;",
"if (kvm_enabled() && !env->external_htab) {",
"env->extern... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
23
],
[
27
],
[
31
],
[
33
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51,
53
],
[
55
]
] |
12,516 | static void exynos4210_fimd_update(void *opaque)
{
Exynos4210fimdState *s = (Exynos4210fimdState *)opaque;
DisplaySurface *surface = qemu_console_surface(s->console);
Exynos4210fimdWindow *w;
int i, line;
hwaddr fb_line_addr, inc_size;
int scrn_height;
int first_line = -1, last_line ... | true | qemu | 522fccbe71e35efc96f66cb475f778c2ce02e9fc | static void exynos4210_fimd_update(void *opaque)
{
Exynos4210fimdState *s = (Exynos4210fimdState *)opaque;
DisplaySurface *surface = qemu_console_surface(s->console);
Exynos4210fimdWindow *w;
int i, line;
hwaddr fb_line_addr, inc_size;
int scrn_height;
int first_line = -1, last_line ... | {
"code": [
" DisplaySurface *surface = qemu_console_surface(s->console);",
" if (!s || !s->console || !surface_bits_per_pixel(surface) ||",
" !s->enabled) {"
],
"line_no": [
7,
33,
35
]
} | static void FUNC_0(void *VAR_0)
{
Exynos4210fimdState *s = (Exynos4210fimdState *)VAR_0;
DisplaySurface *surface = qemu_console_surface(s->console);
Exynos4210fimdWindow *w;
int VAR_1, VAR_2;
hwaddr fb_line_addr, inc_size;
int VAR_3;
int VAR_4 = -1, VAR_5 = -1, VAR_6;
bool blend... | [
"static void FUNC_0(void *VAR_0)\n{",
"Exynos4210fimdState *s = (Exynos4210fimdState *)VAR_0;",
"DisplaySurface *surface = qemu_console_surface(s->console);",
"Exynos4210fimdWindow *w;",
"int VAR_1, VAR_2;",
"hwaddr fb_line_addr, inc_size;",
"int VAR_3;",
"int VAR_4 = -1, VAR_5 = -1, VAR_6;",
"bool ... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
... |
12,517 | static void gen_waiti(DisasContext *dc, uint32_t imm4)
{
TCGv_i32 pc = tcg_const_i32(dc->next_pc);
TCGv_i32 intlevel = tcg_const_i32(imm4);
if (dc->tb->cflags & CF_USE_ICOUNT) {
gen_io_start();
}
gen_helper_waiti(cpu_env, pc, intlevel);
if (dc->tb->cflags & CF_USE_ICOUNT) {
... | true | qemu | c5a49c63fa26e8825ad101dfe86339ae4c216539 | static void gen_waiti(DisasContext *dc, uint32_t imm4)
{
TCGv_i32 pc = tcg_const_i32(dc->next_pc);
TCGv_i32 intlevel = tcg_const_i32(imm4);
if (dc->tb->cflags & CF_USE_ICOUNT) {
gen_io_start();
}
gen_helper_waiti(cpu_env, pc, intlevel);
if (dc->tb->cflags & CF_USE_ICOUNT) {
... | {
"code": [
" if (dc->tb->cflags & CF_USE_ICOUNT) {",
" if (dc->tb->cflags & CF_USE_ICOUNT) {",
" if (dc->tb->cflags & CF_USE_ICOUNT) {",
" if (dc->tb->cflags & CF_USE_ICOUNT) {",
" if (dc->tb->cflags & CF_USE_ICOUNT) {",
" if (dc->tb->cflags & CF_USE_ICOUNT) {",
" if ... | static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1)
{
TCGv_i32 pc = tcg_const_i32(VAR_0->next_pc);
TCGv_i32 intlevel = tcg_const_i32(VAR_1);
if (VAR_0->tb->cflags & CF_USE_ICOUNT) {
gen_io_start();
}
gen_helper_waiti(cpu_env, pc, intlevel);
if (VAR_0->tb->cflags & CF_USE_IC... | [
"static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1)\n{",
"TCGv_i32 pc = tcg_const_i32(VAR_0->next_pc);",
"TCGv_i32 intlevel = tcg_const_i32(VAR_1);",
"if (VAR_0->tb->cflags & CF_USE_ICOUNT) {",
"gen_io_start();",
"}",
"gen_helper_waiti(cpu_env, pc, intlevel);",
"if (VAR_0->tb->cflags & CF_USE_ICO... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
12,519 | static void spr_read_hdecr(DisasContext *ctx, int gprn, int sprn)
{
if (ctx->tb->cflags & CF_USE_ICOUNT) {
gen_io_start();
}
gen_helper_load_hdecr(cpu_gpr[gprn], cpu_env);
if (ctx->tb->cflags & CF_USE_ICOUNT) {
gen_io_end();
gen_stop_exception(ctx);
}
}
| true | qemu | c5a49c63fa26e8825ad101dfe86339ae4c216539 | static void spr_read_hdecr(DisasContext *ctx, int gprn, int sprn)
{
if (ctx->tb->cflags & CF_USE_ICOUNT) {
gen_io_start();
}
gen_helper_load_hdecr(cpu_gpr[gprn], cpu_env);
if (ctx->tb->cflags & CF_USE_ICOUNT) {
gen_io_end();
gen_stop_exception(ctx);
}
}
| {
"code": [
" if (ctx->tb->cflags & CF_USE_ICOUNT) {",
" if (ctx->tb->cflags & CF_USE_ICOUNT) {",
" if (ctx->tb->cflags & CF_USE_ICOUNT) {",
" if (ctx->tb->cflags & CF_USE_ICOUNT) {",
" if (ctx->tb->cflags & CF_USE_ICOUNT) {",
" if (ctx->tb->cflags & CF_USE_ICOUNT) {",
" ... | static void FUNC_0(DisasContext *VAR_0, int VAR_1, int VAR_2)
{
if (VAR_0->tb->cflags & CF_USE_ICOUNT) {
gen_io_start();
}
gen_helper_load_hdecr(cpu_gpr[VAR_1], cpu_env);
if (VAR_0->tb->cflags & CF_USE_ICOUNT) {
gen_io_end();
gen_stop_exception(VAR_0);
}
}
| [
"static void FUNC_0(DisasContext *VAR_0, int VAR_1, int VAR_2)\n{",
"if (VAR_0->tb->cflags & CF_USE_ICOUNT) {",
"gen_io_start();",
"}",
"gen_helper_load_hdecr(cpu_gpr[VAR_1], cpu_env);",
"if (VAR_0->tb->cflags & CF_USE_ICOUNT) {",
"gen_io_end();",
"gen_stop_exception(VAR_0);",
"}",
"}"
] | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
12,521 | static int get_physical_address (CPUState *env, target_ulong *physical,
int *prot, target_ulong address,
int rw, int access_type)
{
/* User mode can only access useg/xuseg */
int user_mode = (env->hflags & MIPS_HFLAG_MODE) == MIPS_HFLAG_UM;
... | true | qemu | 67d6abff605064317d1922745b2e99ffc57b4a77 | static int get_physical_address (CPUState *env, target_ulong *physical,
int *prot, target_ulong address,
int rw, int access_type)
{
int user_mode = (env->hflags & MIPS_HFLAG_MODE) == MIPS_HFLAG_UM;
int supervisor_mode = (env->hflags & MI... | {
"code": [
"\tif (UX && address < (0x3FFFFFFFFFFFFFFFULL & env->SEGMask)) {",
"\t SX && address < (0x7FFFFFFFFFFFFFFFULL & env->SEGMask)) {",
" (address & 0x07FFFFFFFFFFFFFFULL) < 0x0000000FFFFFFFFFULL) {",
"\t address < (0xFFFFFFFF7FFFFFFFULL & env->SEGMask)) {"
],
"line_no": [
... | static int FUNC_0 (CPUState *VAR_0, target_ulong *VAR_1,
int *VAR_2, target_ulong VAR_3,
int VAR_4, int VAR_5)
{
int VAR_6 = (VAR_0->hflags & MIPS_HFLAG_MODE) == MIPS_HFLAG_UM;
int VAR_7 = (VAR_0->hflags & MIPS_HFLAG_MODE) == MIPS_HFLAG_... | [
"static int FUNC_0 (CPUState *VAR_0, target_ulong *VAR_1,\nint *VAR_2, target_ulong VAR_3,\nint VAR_4, int VAR_5)\n{",
"int VAR_6 = (VAR_0->hflags & MIPS_HFLAG_MODE) == MIPS_HFLAG_UM;",
"int VAR_7 = (VAR_0->hflags & MIPS_HFLAG_MODE) == MIPS_HFLAG_SM;",
"int VAR_8 = !VAR_6 && !VAR_7;",
"#if defined(TARGET_MI... | [
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,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25,
27
],
[
31,
33
],
[
35,
37
],
[
39
],
[
41,
45
],
[
49
],
[
51
],
[
53
],
[
55
],
... |
12,523 | void palette8tobgr32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)
{
unsigned i;
for(i=0; i<num_pixels; i++)
{
#ifdef WORDS_BIGENDIAN
dst[3]= palette[ src[i]*4+0 ];
dst[2]= palette[ src[i]*4+1 ];
dst[1]= palette[ src[i]*4+2 ];
#else
//FIXME slow?
dst[0]= pale... | true | FFmpeg | 7f526efd17973ec6d2204f7a47b6923e2be31363 | void palette8tobgr32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)
{
unsigned i;
for(i=0; i<num_pixels; i++)
{
#ifdef WORDS_BIGENDIAN
dst[3]= palette[ src[i]*4+0 ];
dst[2]= palette[ src[i]*4+1 ];
dst[1]= palette[ src[i]*4+2 ];
#else
dst[0]= palette[ src[i]*4... | {
"code": [
"\tunsigned i;",
"void palette8tobgr32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tuns... | void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, unsigned VAR_2, const uint8_t *VAR_3)
{
unsigned VAR_4;
for(VAR_4=0; VAR_4<VAR_2; VAR_4++)
{
#ifdef WORDS_BIGENDIAN
VAR_1[3]= VAR_3[ VAR_0[VAR_4]*4+0 ];
VAR_1[2]= VAR_3[ VAR_0[VAR_4]*4+1 ];
VAR_1[1]= VAR_3[ VAR_0[VAR_4]*4+2 ];
#else
VAR_1[0]... | [
"void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, unsigned VAR_2, const uint8_t *VAR_3)\n{",
"unsigned VAR_4;",
"for(VAR_4=0; VAR_4<VAR_2; VAR_4++)",
"{",
"#ifdef WORDS_BIGENDIAN\nVAR_1[3]= VAR_3[ VAR_0[VAR_4]*4+0 ];",
"VAR_1[2]= VAR_3[ VAR_0[VAR_4]*4+1 ];",
"VAR_1[1]= VAR_3[ VAR_0[VAR_4]*4+2 ];",
"#... | [
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19,
23
],
[
25
],
[
27
],
[
31,
35
],
[
37
],
[
39
]
] |
12,524 | int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts, int flags){
AVInputFormat *avif= s->iformat;
int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit;
int64_t ts_min, ts_max, ts;
int index;
AVStream *st;
if (stream_index < 0)
return -1;
... | true | FFmpeg | b593f7fdef3448ea0fadfccc0bd7e4fde3df84aa | int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts, int flags){
AVInputFormat *avif= s->iformat;
int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit;
int64_t ts_min, ts_max, ts;
int index;
AVStream *st;
if (stream_index < 0)
return -1;
... | {
"code": [
" url_fseek(s->pb, pos, SEEK_SET);"
],
"line_no": [
115
]
} | int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2, int VAR_3){
AVInputFormat *avif= VAR_0->iformat;
int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit;
int64_t ts_min, ts_max, ts;
int VAR_4;
AVStream *st;
if (VAR_1 < 0)
return -1;
#ifdef DEBUG_SEEK
... | [
"int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2, int VAR_3){",
"AVInputFormat *avif= VAR_0->iformat;",
"int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit;",
"int64_t ts_min, ts_max, ts;",
"int VAR_4;",
"AVStream *st;",
"if (VAR_1 < 0)\nreturn -1;",
"#ifdef DEBUG_SEEK\nav_log(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
11
],
[
15,
17
],
[
21,
23
],
[
25,
29,
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
],
[... |
12,525 | static abi_long do_ipc(unsigned int call, abi_long first,
abi_long second, abi_long third,
abi_long ptr, abi_long fifth)
{
int version;
abi_long ret = 0;
version = call >> 16;
call &= 0xffff;
switch (call) {
case IPCOP_semop:
re... | true | qemu | ee8e76141b4dd00f8e97fda274876a17f9a46bbe | static abi_long do_ipc(unsigned int call, abi_long first,
abi_long second, abi_long third,
abi_long ptr, abi_long fifth)
{
int version;
abi_long ret = 0;
version = call >> 16;
call &= 0xffff;
switch (call) {
case IPCOP_semop:
re... | {
"code": [
"static abi_long do_ipc(unsigned int call, abi_long first,",
" raddr = do_shmat(first, ptr, second);",
"\tbreak;"
],
"line_no": [
1,
139,
161
]
} | static abi_long FUNC_0(unsigned int call, abi_long first,
abi_long second, abi_long third,
abi_long ptr, abi_long fifth)
{
int VAR_0;
abi_long ret = 0;
VAR_0 = call >> 16;
call &= 0xffff;
switch (call) {
case IPCOP_semop:
ret = ... | [
"static abi_long FUNC_0(unsigned int call, abi_long first,\nabi_long second, abi_long third,\nabi_long ptr, abi_long fifth)\n{",
"int VAR_0;",
"abi_long ret = 0;",
"VAR_0 = call >> 16;",
"call &= 0xffff;",
"switch (call) {",
"case IPCOP_semop:\nret = do_semop(first, ptr, second);",
"break;",
"case I... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
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
],
[
15
],
[
17
],
[
21
],
[
23,
25
],
[
27
],
[
31,
33
],
[
35
],
[
39
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
57,
59
],
[... |
12,526 | static int virtcon_parse(const char *devname)
{
QemuOptsList *device = qemu_find_opts("device");
static int index = 0;
char label[32];
QemuOpts *bus_opts, *dev_opts;
if (strcmp(devname, "none") == 0)
return 0;
if (index == MAX_VIRTIO_CONSOLES) {
fprintf(stderr, "qemu: ... | false | qemu | f61eddcb2bb5cbbdd1d911b7e937db9affc29028 | static int virtcon_parse(const char *devname)
{
QemuOptsList *device = qemu_find_opts("device");
static int index = 0;
char label[32];
QemuOpts *bus_opts, *dev_opts;
if (strcmp(devname, "none") == 0)
return 0;
if (index == MAX_VIRTIO_CONSOLES) {
fprintf(stderr, "qemu: ... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0)
{
QemuOptsList *device = qemu_find_opts("device");
static int VAR_1 = 0;
char VAR_2[32];
QemuOpts *bus_opts, *dev_opts;
if (strcmp(VAR_0, "none") == 0)
return 0;
if (VAR_1 == MAX_VIRTIO_CONSOLES) {
fprintf(stderr, "qemu: too many vi... | [
"static int FUNC_0(const char *VAR_0)\n{",
"QemuOptsList *device = qemu_find_opts(\"device\");",
"static int VAR_1 = 0;",
"char VAR_2[32];",
"QemuOpts *bus_opts, *dev_opts;",
"if (strcmp(VAR_0, \"none\") == 0)\nreturn 0;",
"if (VAR_1 == MAX_VIRTIO_CONSOLES) {",
"fprintf(stderr, \"qemu: too many virtio... | [
0,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[... |
12,527 | void helper_lcall_protected(int new_cs, target_ulong new_eip,
int shift, int next_eip_addend)
{
int new_stack, i;
uint32_t e1, e2, cpl, dpl, rpl, selector, offset, param_count;
uint32_t ss = 0, ss_e1 = 0, ss_e2 = 0, sp, type, ss_dpl, sp_mask;
uint32_t val, limit, old_s... | false | qemu | 4a1418e07bdcfaa3177739e04707ecaec75d89e1 | void helper_lcall_protected(int new_cs, target_ulong new_eip,
int shift, int next_eip_addend)
{
int new_stack, i;
uint32_t e1, e2, cpl, dpl, rpl, selector, offset, param_count;
uint32_t ss = 0, ss_e1 = 0, ss_e2 = 0, sp, type, ss_dpl, sp_mask;
uint32_t val, limit, old_s... | {
"code": [],
"line_no": []
} | void FUNC_0(int VAR_0, target_ulong VAR_1,
int VAR_2, int VAR_3)
{
int VAR_4, VAR_5;
uint32_t e1, e2, cpl, dpl, rpl, selector, offset, param_count;
uint32_t ss = 0, ss_e1 = 0, ss_e2 = 0, sp, type, ss_dpl, sp_mask;
uint32_t val, limit, old_sp_mask;
target_ulong ssp... | [
"void FUNC_0(int VAR_0, target_ulong VAR_1,\nint VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5;",
"uint32_t e1, e2, cpl, dpl, rpl, selector, offset, param_count;",
"uint32_t ss = 0, ss_e1 = 0, ss_e2 = 0, sp, type, ss_dpl, sp_mask;",
"uint32_t val, limit, old_sp_mask;",
"target_ulong ssp, old_ssp, next_eip;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
45
],
[
49,... |
12,528 | static void raw_reopen_abort(BDRVReopenState *state)
{
g_free(state->opaque);
state->opaque = NULL;
}
| false | qemu | 2e6fc7eb1a4af1b127df5f07b8bb28af891946fa | static void raw_reopen_abort(BDRVReopenState *state)
{
g_free(state->opaque);
state->opaque = NULL;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(BDRVReopenState *VAR_0)
{
g_free(VAR_0->opaque);
VAR_0->opaque = NULL;
}
| [
"static void FUNC_0(BDRVReopenState *VAR_0)\n{",
"g_free(VAR_0->opaque);",
"VAR_0->opaque = NULL;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
12,529 | void err (const char *s)
{
perror (s);
abort ();
}
| false | qemu | 85b3ed1db5e50b66016ef59ca2afce10e753cbc6 | void err (const char *s)
{
perror (s);
abort ();
}
| {
"code": [],
"line_no": []
} | void FUNC_0 (const char *VAR_0)
{
perror (VAR_0);
abort ();
}
| [
"void FUNC_0 (const char *VAR_0)\n{",
"perror (VAR_0);",
"abort ();",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
12,530 | static void hda_audio_command(HDACodecDevice *hda, uint32_t nid, uint32_t data)
{
HDAAudioState *a = HDA_AUDIO(hda);
HDAAudioStream *st;
const desc_node *node = NULL;
const desc_param *param;
uint32_t verb, payload, response, count, shift;
if ((data & 0x70000) == 0x70000) {
/* ... | false | qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | static void hda_audio_command(HDACodecDevice *hda, uint32_t nid, uint32_t data)
{
HDAAudioState *a = HDA_AUDIO(hda);
HDAAudioStream *st;
const desc_node *node = NULL;
const desc_param *param;
uint32_t verb, payload, response, count, shift;
if ((data & 0x70000) == 0x70000) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(HDACodecDevice *VAR_0, uint32_t VAR_1, uint32_t VAR_2)
{
HDAAudioState *a = HDA_AUDIO(VAR_0);
HDAAudioStream *st;
const desc_node *VAR_3 = NULL;
const desc_param *VAR_4;
uint32_t verb, payload, response, count, shift;
if ((VAR_2 & 0x70000) == 0x70000) {
... | [
"static void FUNC_0(HDACodecDevice *VAR_0, uint32_t VAR_1, uint32_t VAR_2)\n{",
"HDAAudioState *a = HDA_AUDIO(VAR_0);",
"HDAAudioStream *st;",
"const desc_node *VAR_3 = NULL;",
"const desc_param *VAR_4;",
"uint32_t verb, payload, response, count, shift;",
"if ((VAR_2 & 0x70000) == 0x70000) {",
"verb =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
51
],
[... |
12,531 | static void sdp_parse_fmtp_config(AVCodecContext * codec, void *ctx,
char *attr, char *value)
{
switch (codec->codec_id) {
case CODEC_ID_MPEG4:
case CODEC_ID_AAC:
if (!strcmp(attr, "config")) {
/* decode the hexa encoded parameter ... | false | FFmpeg | c89658008705d949c319df3fa6f400c481ad73e1 | static void sdp_parse_fmtp_config(AVCodecContext * codec, void *ctx,
char *attr, char *value)
{
switch (codec->codec_id) {
case CODEC_ID_MPEG4:
case CODEC_ID_AAC:
if (!strcmp(attr, "config")) {
int len = hex_to_da... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVCodecContext * VAR_0, void *VAR_1,
char *VAR_2, char *VAR_3)
{
switch (VAR_0->codec_id) {
case CODEC_ID_MPEG4:
case CODEC_ID_AAC:
if (!strcmp(VAR_2, "config")) {
int VAR_4 = hex_to_data(NULL, ... | [
"static void FUNC_0(AVCodecContext * VAR_0, void *VAR_1,\nchar *VAR_2, char *VAR_3)\n{",
"switch (VAR_0->codec_id) {",
"case CODEC_ID_MPEG4:\ncase CODEC_ID_AAC:\nif (!strcmp(VAR_2, \"config\")) {",
"int VAR_4 = hex_to_data(NULL, VAR_3);",
"if (VAR_0->extradata)\nav_free(VAR_0->extradata);",
"VAR_0->extrad... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9,
11,
13
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[... |
12,532 | static void mux_print_help(CharDriverState *chr)
{
int i, j;
char ebuf[15] = "Escape-Char";
char cbuf[50] = "\n\r";
if (term_escape_char > 0 && term_escape_char < 26) {
snprintf(cbuf, sizeof(cbuf), "\n\r");
snprintf(ebuf, sizeof(ebuf), "C-%c", term_escape_char - 1 + 'a');
}... | false | qemu | 90f998f5f4267a0c22e983f533d19b9de1849283 | static void mux_print_help(CharDriverState *chr)
{
int i, j;
char ebuf[15] = "Escape-Char";
char cbuf[50] = "\n\r";
if (term_escape_char > 0 && term_escape_char < 26) {
snprintf(cbuf, sizeof(cbuf), "\n\r");
snprintf(ebuf, sizeof(ebuf), "C-%c", term_escape_char - 1 + 'a');
}... | {
"code": [],
"line_no": []
} | static void FUNC_0(CharDriverState *VAR_0)
{
int VAR_1, VAR_2;
char VAR_3[15] = "Escape-Char";
char VAR_4[50] = "\n\r";
if (term_escape_char > 0 && term_escape_char < 26) {
snprintf(VAR_4, sizeof(VAR_4), "\n\r");
snprintf(VAR_3, sizeof(VAR_3), "C-%c", term_escape_char - 1 + 'a')... | [
"static void FUNC_0(CharDriverState *VAR_0)\n{",
"int VAR_1, VAR_2;",
"char VAR_3[15] = \"Escape-Char\";",
"char VAR_4[50] = \"\\n\\r\";",
"if (term_escape_char > 0 && term_escape_char < 26) {",
"snprintf(VAR_4, sizeof(VAR_4), \"\\n\\r\");",
"snprintf(VAR_3, sizeof(VAR_3), \"C-%c\", term_escape_char - 1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
... |
12,533 | void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict)
{
struct in_addr host_addr = { .s_addr = INADDR_ANY };
int host_port;
char buf[256] = "";
const char *src_str, *p;
SlirpState *s;
int is_udp = 0;
int err;
const char *arg1 = qdict_get_str(qdict, "arg1");
const ... | false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict)
{
struct in_addr host_addr = { .s_addr = INADDR_ANY };
int host_port;
char buf[256] = "";
const char *src_str, *p;
SlirpState *s;
int is_udp = 0;
int err;
const char *arg1 = qdict_get_str(qdict, "arg1");
const ... | {
"code": [],
"line_no": []
} | void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{
struct in_addr VAR_2 = { .s_addr = INADDR_ANY };
int VAR_3;
char VAR_4[256] = "";
const char *VAR_5, *VAR_6;
SlirpState *s;
int VAR_7 = 0;
int VAR_8;
const char *VAR_9 = qdict_get_str(VAR_1, "VAR_9");
const char *VAR_10 = qd... | [
"void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)\n{",
"struct in_addr VAR_2 = { .s_addr = INADDR_ANY };",
"int VAR_3;",
"char VAR_4[256] = \"\";",
"const char *VAR_5, *VAR_6;",
"SlirpState *s;",
"int VAR_7 = 0;",
"int VAR_8;",
"const char *VAR_9 = qdict_get_str(VAR_1, \"VAR_9\");",
"const char *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
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
12,534 | static QObject *parse_object(JSONParserContext *ctxt, va_list *ap)
{
QDict *dict = NULL;
QObject *token, *peek;
JSONParserContext saved_ctxt = parser_context_save(ctxt);
token = parser_context_pop_token(ctxt);
if (token == NULL) {
goto out;
}
if (!token_is_operator(token... | false | qemu | c54616608af442edf4cfb7397a1909c2653efba0 | static QObject *parse_object(JSONParserContext *ctxt, va_list *ap)
{
QDict *dict = NULL;
QObject *token, *peek;
JSONParserContext saved_ctxt = parser_context_save(ctxt);
token = parser_context_pop_token(ctxt);
if (token == NULL) {
goto out;
}
if (!token_is_operator(token... | {
"code": [],
"line_no": []
} | static QObject *FUNC_0(JSONParserContext *ctxt, va_list *ap)
{
QDict *dict = NULL;
QObject *token, *peek;
JSONParserContext saved_ctxt = parser_context_save(ctxt);
token = parser_context_pop_token(ctxt);
if (token == NULL) {
goto out;
}
if (!token_is_operator(token, '{')... | [
"static QObject *FUNC_0(JSONParserContext *ctxt, va_list *ap)\n{",
"QDict *dict = NULL;",
"QObject *token, *peek;",
"JSONParserContext saved_ctxt = parser_context_save(ctxt);",
"token = parser_context_pop_token(ctxt);",
"if (token == NULL) {",
"goto out;",
"}",
"if (!token_is_operator(token, '{')) {... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
... |
12,535 | static void qemu_chr_parse_mux(QemuOpts *opts, ChardevBackend *backend,
Error **errp)
{
const char *chardev = qemu_opt_get(opts, "chardev");
ChardevMux *mux;
if (chardev == NULL) {
error_setg(errp, "chardev: mux: no chardev given");
return;
}
... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | static void qemu_chr_parse_mux(QemuOpts *opts, ChardevBackend *backend,
Error **errp)
{
const char *chardev = qemu_opt_get(opts, "chardev");
ChardevMux *mux;
if (chardev == NULL) {
error_setg(errp, "chardev: mux: no chardev given");
return;
}
... | {
"code": [],
"line_no": []
} | static void FUNC_0(QemuOpts *VAR_0, ChardevBackend *VAR_1,
Error **VAR_2)
{
const char *VAR_3 = qemu_opt_get(VAR_0, "VAR_3");
ChardevMux *mux;
if (VAR_3 == NULL) {
error_setg(VAR_2, "VAR_3: mux: no VAR_3 given");
return;
}
mux = VAR_1->u.mux ... | [
"static void FUNC_0(QemuOpts *VAR_0, ChardevBackend *VAR_1,\nError **VAR_2)\n{",
"const char *VAR_3 = qemu_opt_get(VAR_0, \"VAR_3\");",
"ChardevMux *mux;",
"if (VAR_3 == NULL) {",
"error_setg(VAR_2, \"VAR_3: mux: no VAR_3 given\");",
"return;",
"}",
"mux = VAR_1->u.mux = g_new0(ChardevMux, 1);",
"qe... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
12,536 | static void do_flush_queued_data(VirtIOSerialPort *port, VirtQueue *vq,
VirtIODevice *vdev)
{
VirtIOSerialPortClass *vsc;
assert(port);
assert(virtio_queue_ready(vq));
vsc = VIRTIO_SERIAL_PORT_GET_CLASS(port);
while (!port->throttled) {
unsigned... | false | qemu | 51b19ebe4320f3dcd93cea71235c1219318ddfd2 | static void do_flush_queued_data(VirtIOSerialPort *port, VirtQueue *vq,
VirtIODevice *vdev)
{
VirtIOSerialPortClass *vsc;
assert(port);
assert(virtio_queue_ready(vq));
vsc = VIRTIO_SERIAL_PORT_GET_CLASS(port);
while (!port->throttled) {
unsigned... | {
"code": [],
"line_no": []
} | static void FUNC_0(VirtIOSerialPort *VAR_0, VirtQueue *VAR_1,
VirtIODevice *VAR_2)
{
VirtIOSerialPortClass *vsc;
assert(VAR_0);
assert(virtio_queue_ready(VAR_1));
vsc = VIRTIO_SERIAL_PORT_GET_CLASS(VAR_0);
while (!VAR_0->throttled) {
unsigned in... | [
"static void FUNC_0(VirtIOSerialPort *VAR_0, VirtQueue *VAR_1,\nVirtIODevice *VAR_2)\n{",
"VirtIOSerialPortClass *vsc;",
"assert(VAR_0);",
"assert(virtio_queue_ready(VAR_1));",
"vsc = VIRTIO_SERIAL_PORT_GET_CLASS(VAR_0);",
"while (!VAR_0->throttled) {",
"unsigned int VAR_3;",
"if (!VAR_0->elem.out_num... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55,
57... |
12,537 | static void l2cap_command(struct l2cap_instance_s *l2cap, int code, int id,
const uint8_t *params, int len)
{
int err;
#if 0
/* TODO: do the IDs really have to be in sequence? */
if (!id || (id != l2cap->last_id && id != l2cap->next_id)) {
fprintf(stderr, "%s: out of sequen... | false | qemu | bf937a7965c1d1a6dce4f615d0ead2e2ab505004 | static void l2cap_command(struct l2cap_instance_s *l2cap, int code, int id,
const uint8_t *params, int len)
{
int err;
#if 0
if (!id || (id != l2cap->last_id && id != l2cap->next_id)) {
fprintf(stderr, "%s: out of sequence command packet ignored.\n",
... | {
"code": [],
"line_no": []
} | static void FUNC_0(struct l2cap_instance_s *VAR_0, int VAR_1, int VAR_2,
const uint8_t *VAR_3, int VAR_4)
{
int VAR_5;
#if 0
if (!VAR_2 || (VAR_2 != VAR_0->last_id && VAR_2 != VAR_0->next_id)) {
fprintf(stderr, "%s: out of sequence command packet ignored.\n",
... | [
"static void FUNC_0(struct l2cap_instance_s *VAR_0, int VAR_1, int VAR_2,\nconst uint8_t *VAR_3, int VAR_4)\n{",
"int VAR_5;",
"#if 0\nif (!VAR_2 || (VAR_2 != VAR_0->last_id && VAR_2 != VAR_0->next_id)) {",
"fprintf(stderr, \"%s: out of sequence command packet ignored.\\n\",\n__func__);",
"return;",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
11,
15
],
[
17,
19
],
[
21
],
[
23
],
[
25,
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
47
],
[
49,
51
],
[
53
],
[
55
],
[
57... |
12,538 | static int curl_aio_flush(void *opaque)
{
BDRVCURLState *s = opaque;
int i, j;
for (i=0; i < CURL_NUM_STATES; i++) {
for(j=0; j < CURL_NUM_ACB; j++) {
if (s->states[i].acb[j]) {
return 1;
}
}
}
return 0;
}
| false | qemu | 0d1460226fb05c92fa3ad869ca39090ff13cf6bc | static int curl_aio_flush(void *opaque)
{
BDRVCURLState *s = opaque;
int i, j;
for (i=0; i < CURL_NUM_STATES; i++) {
for(j=0; j < CURL_NUM_ACB; j++) {
if (s->states[i].acb[j]) {
return 1;
}
}
}
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0)
{
BDRVCURLState *s = VAR_0;
int VAR_1, VAR_2;
for (VAR_1=0; VAR_1 < CURL_NUM_STATES; VAR_1++) {
for(VAR_2=0; VAR_2 < CURL_NUM_ACB; VAR_2++) {
if (s->states[VAR_1].acb[VAR_2]) {
return 1;
}
}
}
return ... | [
"static int FUNC_0(void *VAR_0)\n{",
"BDRVCURLState *s = VAR_0;",
"int VAR_1, VAR_2;",
"for (VAR_1=0; VAR_1 < CURL_NUM_STATES; VAR_1++) {",
"for(VAR_2=0; VAR_2 < CURL_NUM_ACB; VAR_2++) {",
"if (s->states[VAR_1].acb[VAR_2]) {",
"return 1;",
"}",
"}",
"}",
"return 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
]
] |
12,539 | static void test_dynamic_globalprop_subprocess(void)
{
MyType *mt;
static GlobalProperty props[] = {
{ TYPE_DYNAMIC_PROPS, "prop1", "101", true },
{ TYPE_DYNAMIC_PROPS, "prop2", "102", true },
{ TYPE_DYNAMIC_PROPS"-bad", "prop3", "103", true },
/* .not_used=false to emulat... | false | qemu | b3ce84fea466f3bca2ff85d158744f00c0f429bd | static void test_dynamic_globalprop_subprocess(void)
{
MyType *mt;
static GlobalProperty props[] = {
{ TYPE_DYNAMIC_PROPS, "prop1", "101", true },
{ TYPE_DYNAMIC_PROPS, "prop2", "102", true },
{ TYPE_DYNAMIC_PROPS"-bad", "prop3", "103", true },
{ TYPE_UNUSED_HOTP... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
MyType *mt;
static GlobalProperty VAR_0[] = {
{ TYPE_DYNAMIC_PROPS, "prop1", "101", true },
{ TYPE_DYNAMIC_PROPS, "prop2", "102", true },
{ TYPE_DYNAMIC_PROPS"-bad", "prop3", "103", true },
{ TYPE_UNUSED_HOTPLUG, "prop4", "104", false }... | [
"static void FUNC_0(void)\n{",
"MyType *mt;",
"static GlobalProperty VAR_0[] = {",
"{ TYPE_DYNAMIC_PROPS, \"prop1\", \"101\", true },",
"{ TYPE_DYNAMIC_PROPS, \"prop2\", \"102\", true },",
"{ TYPE_DYNAMIC_PROPS\"-bad\", \"prop3\", \"103\", true },",
"{ TYPE_UNUSED_HOTPLUG, \"prop4\", \"104\", false },",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
12,540 | void bdrv_aio_cancel(BlockDriverAIOCB *acb)
{
if (acb->cb == bdrv_aio_rw_vector_cb) {
VectorTranslationState *s = acb->opaque;
acb = s->aiocb;
}
acb->pool->cancel(acb);
}
| false | qemu | c07a9008ac6985cd5a15909c2b9977d982defc12 | void bdrv_aio_cancel(BlockDriverAIOCB *acb)
{
if (acb->cb == bdrv_aio_rw_vector_cb) {
VectorTranslationState *s = acb->opaque;
acb = s->aiocb;
}
acb->pool->cancel(acb);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(BlockDriverAIOCB *VAR_0)
{
if (VAR_0->cb == bdrv_aio_rw_vector_cb) {
VectorTranslationState *s = VAR_0->opaque;
VAR_0 = s->aiocb;
}
VAR_0->pool->cancel(VAR_0);
}
| [
"void FUNC_0(BlockDriverAIOCB *VAR_0)\n{",
"if (VAR_0->cb == bdrv_aio_rw_vector_cb) {",
"VectorTranslationState *s = VAR_0->opaque;",
"VAR_0 = s->aiocb;",
"}",
"VAR_0->pool->cancel(VAR_0);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
]
] |
12,541 | static void omap_mcbsp_writeh(void *opaque, hwaddr addr,
uint32_t value)
{
struct omap_mcbsp_s *s = (struct omap_mcbsp_s *) opaque;
int offset = addr & OMAP_MPUI_REG_MASK;
switch (offset) {
case 0x00: /* DRR2 */
case 0x02: /* DRR1 */
OMAP_RO_REG(addr);
retu... | false | qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | static void omap_mcbsp_writeh(void *opaque, hwaddr addr,
uint32_t value)
{
struct omap_mcbsp_s *s = (struct omap_mcbsp_s *) opaque;
int offset = addr & OMAP_MPUI_REG_MASK;
switch (offset) {
case 0x00:
case 0x02:
OMAP_RO_REG(addr);
return;
case 0x04... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint32_t VAR_2)
{
struct omap_mcbsp_s *VAR_3 = (struct omap_mcbsp_s *) VAR_0;
int VAR_4 = VAR_1 & OMAP_MPUI_REG_MASK;
switch (VAR_4) {
case 0x00:
case 0x02:
OMAP_RO_REG(VAR_1);
return;
case 0x04:
... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint32_t VAR_2)\n{",
"struct omap_mcbsp_s *VAR_3 = (struct omap_mcbsp_s *) VAR_0;",
"int VAR_4 = VAR_1 & OMAP_MPUI_REG_MASK;",
"switch (VAR_4) {",
"case 0x00:\ncase 0x02:\nOMAP_RO_REG(VAR_1);",
"return;",
"case 0x04:\nif (((VAR_3->xcr[0] >> 5) & 7) < 3)\nr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51
],
[
53
],
[... |
12,543 | BlockDriverAIOCB *paio_ioctl(BlockDriverState *bs, int fd,
unsigned long int req, void *buf,
BlockDriverCompletionFunc *cb, void *opaque)
{
struct qemu_paiocb *acb;
acb = qemu_aio_get(&raw_aio_pool, bs, cb, opaque);
if (!acb)
return NULL;
acb->aio_type = QEMU_AIO_IOCTL;... | false | qemu | 384acbf46b70edf0d2c1648aa1a92a90bcf7057d | BlockDriverAIOCB *paio_ioctl(BlockDriverState *bs, int fd,
unsigned long int req, void *buf,
BlockDriverCompletionFunc *cb, void *opaque)
{
struct qemu_paiocb *acb;
acb = qemu_aio_get(&raw_aio_pool, bs, cb, opaque);
if (!acb)
return NULL;
acb->aio_type = QEMU_AIO_IOCTL;... | {
"code": [],
"line_no": []
} | BlockDriverAIOCB *FUNC_0(BlockDriverState *bs, int fd,
unsigned long int req, void *buf,
BlockDriverCompletionFunc *cb, void *opaque)
{
struct qemu_paiocb *VAR_0;
VAR_0 = qemu_aio_get(&raw_aio_pool, bs, cb, opaque);
if (!VAR_0)
return NULL;
VAR_0->aio_type = QEMU_AIO_IO... | [
"BlockDriverAIOCB *FUNC_0(BlockDriverState *bs, int fd,\nunsigned long int req, void *buf,\nBlockDriverCompletionFunc *cb, void *opaque)\n{",
"struct qemu_paiocb *VAR_0;",
"VAR_0 = qemu_aio_get(&raw_aio_pool, bs, cb, opaque);",
"if (!VAR_0)\nreturn NULL;",
"VAR_0->aio_type = QEMU_AIO_IOCTL;",
"VAR_0->aio_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
]
] |
12,546 | static void object_get_link_property(Object *obj, Visitor *v, void *opaque,
const char *name, Error **errp)
{
Object **child = opaque;
gchar *path;
if (*child) {
path = object_get_canonical_path(*child);
visit_type_str(v, &path, name, errp);
... | true | qemu | 9561fda8d90e176bef598ba87c42a1bd6ad03ef7 | static void object_get_link_property(Object *obj, Visitor *v, void *opaque,
const char *name, Error **errp)
{
Object **child = opaque;
gchar *path;
if (*child) {
path = object_get_canonical_path(*child);
visit_type_str(v, &path, name, errp);
... | {
"code": [
" Object **child = opaque;",
" Object **child = opaque;"
],
"line_no": [
7,
7
]
} | static void FUNC_0(Object *VAR_0, Visitor *VAR_1, void *VAR_2,
const char *VAR_3, Error **VAR_4)
{
Object **child = VAR_2;
gchar *path;
if (*child) {
path = object_get_canonical_path(*child);
visit_type_str(VAR_1, &path, VAR_3, VAR_4);
g... | [
"static void FUNC_0(Object *VAR_0, Visitor *VAR_1, void *VAR_2,\nconst char *VAR_3, Error **VAR_4)\n{",
"Object **child = VAR_2;",
"gchar *path;",
"if (*child) {",
"path = object_get_canonical_path(*child);",
"visit_type_str(VAR_1, &path, VAR_3, VAR_4);",
"g_free(path);",
"} else {",
"path = (gchar ... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
12,547 | void FUNCC(ff_h264_idct_dc_add)(uint8_t *_dst, DCTELEM *block, int stride){
int i, j;
int dc = (((dctcoef*)block)[0] + 32) >> 6;
INIT_CLIP
pixel *dst = (pixel*)_dst;
stride /= sizeof(pixel);
for( j = 0; j < 4; j++ )
{
for( i = 0; i < 4; i++ )
dst[i] = CLIP( dst[i... | true | FFmpeg | c23acbaed40101c677dfcfbbfe0d2c230a8e8f44 | void FUNCC(ff_h264_idct_dc_add)(uint8_t *_dst, DCTELEM *block, int stride){
int i, j;
int dc = (((dctcoef*)block)[0] + 32) >> 6;
INIT_CLIP
pixel *dst = (pixel*)_dst;
stride /= sizeof(pixel);
for( j = 0; j < 4; j++ )
{
for( i = 0; i < 4; i++ )
dst[i] = CLIP( dst[i... | {
"code": [
" INIT_CLIP",
" INIT_CLIP",
" INIT_CLIP",
" dst[i] = CLIP( dst[i] + dc );",
" INIT_CLIP",
" dst[i] = CLIP( dst[i] + dc );"
],
"line_no": [
7,
7,
7,
19,
7,
19
]
} | void FUNC_0(ff_h264_idct_dc_add)(uint8_t *_dst, DCTELEM *block, int stride){
int VAR_0, VAR_1;
int VAR_2 = (((dctcoef*)block)[0] + 32) >> 6;
INIT_CLIP
pixel *dst = (pixel*)_dst;
stride /= sizeof(pixel);
for( VAR_1 = 0; VAR_1 < 4; VAR_1++ )
{
for( VAR_0 = 0; VAR_0 < 4; VAR_0++... | [
"void FUNC_0(ff_h264_idct_dc_add)(uint8_t *_dst, DCTELEM *block, int stride){",
"int VAR_0, VAR_1;",
"int VAR_2 = (((dctcoef*)block)[0] + 32) >> 6;",
"INIT_CLIP\npixel *dst = (pixel*)_dst;",
"stride /= sizeof(pixel);",
"for( VAR_1 = 0; VAR_1 < 4; VAR_1++ )",
"{",
"for( VAR_0 = 0; VAR_0 < 4; VAR_0++ )"... | [
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
12,549 | int av_read_frame(AVFormatContext *s, AVPacket *pkt)
{
const int genpts = s->flags & AVFMT_FLAG_GENPTS;
int eof = 0;
int ret;
AVStream *st;
if (!genpts) {
ret = s->packet_buffer ?
read_from_packet_buffer(&s->packet_buffer, &s->packet_buffer_end, pkt) :
... | true | FFmpeg | 88d4ff4b5f4c28fe38fa257b1d19b8fede4c35cc | int av_read_frame(AVFormatContext *s, AVPacket *pkt)
{
const int genpts = s->flags & AVFMT_FLAG_GENPTS;
int eof = 0;
int ret;
AVStream *st;
if (!genpts) {
ret = s->packet_buffer ?
read_from_packet_buffer(&s->packet_buffer, &s->packet_buffer_end, pkt) :
... | {
"code": [
" AV_WL32(p, st->skip_samples);",
" av_log(s, AV_LOG_DEBUG, \"demuxer injecting skip %d\\n\", st->skip_samples);"
],
"line_no": [
159,
161
]
} | int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
const int VAR_2 = VAR_0->flags & AVFMT_FLAG_GENPTS;
int VAR_3 = 0;
int VAR_4;
AVStream *st;
if (!VAR_2) {
VAR_4 = VAR_0->packet_buffer ?
read_from_packet_buffer(&VAR_0->packet_buffer, &VAR_0->packet_buffer_e... | [
"int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"const int VAR_2 = VAR_0->flags & AVFMT_FLAG_GENPTS;",
"int VAR_3 = 0;",
"int VAR_4;",
"AVStream *st;",
"if (!VAR_2) {",
"VAR_4 = VAR_0->packet_buffer ?\nread_from_packet_buffer(&VAR_0->packet_buffer, &VAR_0->packet_buffer_end, VAR_1) :\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19,
21
],
[
23,
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
53
],
[
55
],
[... |
12,550 | static int buf_get_buffer(void *opaque, uint8_t *buf, int64_t pos, int size)
{
QEMUBuffer *s = opaque;
ssize_t len = qsb_get_length(s->qsb) - pos;
if (len <= 0) {
return 0;
}
if (len > size) {
len = size;
}
return qsb_get_buffer(s->qsb, pos, len, buf);
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static int buf_get_buffer(void *opaque, uint8_t *buf, int64_t pos, int size)
{
QEMUBuffer *s = opaque;
ssize_t len = qsb_get_length(s->qsb) - pos;
if (len <= 0) {
return 0;
}
if (len > size) {
len = size;
}
return qsb_get_buffer(s->qsb, pos, len, buf);
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0, uint8_t *VAR_1, int64_t VAR_2, int VAR_3)
{
QEMUBuffer *s = VAR_0;
ssize_t len = qsb_get_length(s->qsb) - VAR_2;
if (len <= 0) {
return 0;
}
if (len > VAR_3) {
len = VAR_3;
}
return qsb_get_buffer(s->qsb, VAR_2, len, VAR_1);
}
| [
"static int FUNC_0(void *VAR_0, uint8_t *VAR_1, int64_t VAR_2, int VAR_3)\n{",
"QEMUBuffer *s = VAR_0;",
"ssize_t len = qsb_get_length(s->qsb) - VAR_2;",
"if (len <= 0) {",
"return 0;",
"}",
"if (len > VAR_3) {",
"len = VAR_3;",
"}",
"return qsb_get_buffer(s->qsb, VAR_2, len, VAR_1);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
12,551 | int unix_listen(const char *str, char *ostr, int olen)
{
QemuOpts *opts;
char *path, *optstr;
int sock, len;
opts = qemu_opts_create(&dummy_opts, NULL, 0);
optstr = strchr(str, ',');
if (optstr) {
len = optstr - str;
if (len) {
path = g_malloc(len+1);
... | true | qemu | 8be7e7e4c72c048b90e3482557954a24bba43ba7 | int unix_listen(const char *str, char *ostr, int olen)
{
QemuOpts *opts;
char *path, *optstr;
int sock, len;
opts = qemu_opts_create(&dummy_opts, NULL, 0);
optstr = strchr(str, ',');
if (optstr) {
len = optstr - str;
if (len) {
path = g_malloc(len+1);
... | {
"code": [
" opts = qemu_opts_create(&dummy_opts, NULL, 0);",
" opts = qemu_opts_create(&dummy_opts, NULL, 0);",
" opts = qemu_opts_create(&dummy_opts, NULL, 0);",
" opts = qemu_opts_create(&dummy_opts, NULL, 0);"
],
"line_no": [
13,
13,
13,
13
]
} | int FUNC_0(const char *VAR_0, char *VAR_1, int VAR_2)
{
QemuOpts *opts;
char *VAR_3, *VAR_4;
int VAR_5, VAR_6;
opts = qemu_opts_create(&dummy_opts, NULL, 0);
VAR_4 = strchr(VAR_0, ',');
if (VAR_4) {
VAR_6 = VAR_4 - VAR_0;
if (VAR_6) {
VAR_3 = g_malloc(VA... | [
"int FUNC_0(const char *VAR_0, char *VAR_1, int VAR_2)\n{",
"QemuOpts *opts;",
"char *VAR_3, *VAR_4;",
"int VAR_5, VAR_6;",
"opts = qemu_opts_create(&dummy_opts, NULL, 0);",
"VAR_4 = strchr(VAR_0, ',');",
"if (VAR_4) {",
"VAR_6 = VAR_4 - VAR_0;",
"if (VAR_6) {",
"VAR_3 = g_malloc(VAR_6+1);",
"sn... | [
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
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
47,
49
],
[... |
12,552 | static void render_fragments(Vp3DecodeContext *s,
int first_fragment,
int width,
int height,
int plane /* 0 = Y, 1 = U, 2 = V */)
{
int x, y;
int m, n;
int i = first_fragment;
in... | false | FFmpeg | a466e345e41253aa2c8cf9d62ff32be8d2cde0fa | static void render_fragments(Vp3DecodeContext *s,
int first_fragment,
int width,
int height,
int plane )
{
int x, y;
int m, n;
int i = first_fragment;
int j;
int16_t *dequan... | {
"code": [],
"line_no": []
} | static void FUNC_0(Vp3DecodeContext *VAR_0,
int VAR_1,
int VAR_2,
int VAR_3,
int VAR_4 )
{
int VAR_5, VAR_6;
int VAR_7, VAR_8;
int VAR_9 = VAR_1;
int VAR_10;
int16_t *dequan... | [
"static void FUNC_0(Vp3DecodeContext *VAR_0,\nint VAR_1,\nint VAR_2,\nint VAR_3,\nint VAR_4 )\n{",
"int VAR_5, VAR_6;",
"int VAR_7, VAR_8;",
"int VAR_9 = VAR_1;",
"int VAR_10;",
"int16_t *dequantizer;",
"DCTELEM dequant_block[64];",
"unsigned char *VAR_11;",
"unsigned char *VAR_12;",
"unsigned cha... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
51
],
[... |
12,553 | static av_cold int color_init(AVFilterContext *ctx, const char *args, void *opaque)
{
ColorContext *color = ctx->priv;
char color_string[128] = "black";
char frame_size [128] = "320x240";
char frame_rate [128] = "25";
AVRational frame_rate_q;
char *colon = 0, *equal = 0;
int ret = ... | false | FFmpeg | de0587739011b7636743251a86d48bcd10ab7c22 | static av_cold int color_init(AVFilterContext *ctx, const char *args, void *opaque)
{
ColorContext *color = ctx->priv;
char color_string[128] = "black";
char frame_size [128] = "320x240";
char frame_rate [128] = "25";
AVRational frame_rate_q;
char *colon = 0, *equal = 0;
int ret = ... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVFilterContext *ctx, const char *args, void *opaque)
{
ColorContext *color = ctx->priv;
char VAR_0[128] = "black";
char VAR_1 [128] = "320x240";
char VAR_2 [128] = "25";
AVRational frame_rate_q;
char *VAR_3 = 0, *VAR_4 = 0;
int VAR_5 = 0;
color->cl... | [
"static av_cold int FUNC_0(AVFilterContext *ctx, const char *args, void *opaque)\n{",
"ColorContext *color = ctx->priv;",
"char VAR_0[128] = \"black\";",
"char VAR_1 [128] = \"320x240\";",
"char VAR_2 [128] = \"25\";",
"AVRational frame_rate_q;",
"char *VAR_3 = 0, *VAR_4 = 0;",
"int VAR_5 = 0;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,... |
12,554 | static int parse_ffconfig(const char *filename)
{
FILE *f;
char line[1024];
char cmd[64];
char arg[1024];
const char *p;
int val, errors, line_num;
FFStream **last_stream, *stream, *redirect;
FFStream **last_feed, *feed, *s;
AVCodecContext audio_enc, video_enc;
enum Co... | false | FFmpeg | 1642ee4337988523207ee8f30be9281e6919d95a | static int parse_ffconfig(const char *filename)
{
FILE *f;
char line[1024];
char cmd[64];
char arg[1024];
const char *p;
int val, errors, line_num;
FFStream **last_stream, *stream, *redirect;
FFStream **last_feed, *feed, *s;
AVCodecContext audio_enc, video_enc;
enum Co... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0)
{
FILE *f;
char VAR_1[1024];
char VAR_2[64];
char VAR_3[1024];
const char *VAR_4;
int VAR_5, VAR_6, VAR_7;
FFStream **last_stream, *stream, *redirect;
FFStream **last_feed, *feed, *s;
AVCodecContext audio_enc, video_enc;
enum CodecI... | [
"static int FUNC_0(const char *VAR_0)\n{",
"FILE *f;",
"char VAR_1[1024];",
"char VAR_2[64];",
"char VAR_3[1024];",
"const char *VAR_4;",
"int VAR_5, VAR_6, VAR_7;",
"FFStream **last_stream, *stream, *redirect;",
"FFStream **last_feed, *feed, *s;",
"AVCodecContext audio_enc, video_enc;",
"enum C... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
... |
12,555 | void ff_put_h264_qpel16_mc03_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride)
{
avc_luma_vt_qrt_16w_msa(src - (stride * 2), stride, dst, stride, 16, 1);
}
| false | FFmpeg | 6796a1dd8c14843b77925cb83a3ef88706ae1dd0 | void ff_put_h264_qpel16_mc03_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride)
{
avc_luma_vt_qrt_16w_msa(src - (stride * 2), stride, dst, stride, 16, 1);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1,
ptrdiff_t VAR_2)
{
avc_luma_vt_qrt_16w_msa(VAR_1 - (VAR_2 * 2), VAR_2, VAR_0, VAR_2, 16, 1);
}
| [
"void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1,\nptrdiff_t VAR_2)\n{",
"avc_luma_vt_qrt_16w_msa(VAR_1 - (VAR_2 * 2), VAR_2, VAR_0, VAR_2, 16, 1);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
12,557 | static int ccw_dstream_rw_noflags(CcwDataStream *cds, void *buff, int len,
CcwDataStreamOp op)
{
int ret;
ret = cds_check_len(cds, len);
if (ret <= 0) {
return ret;
if (op == CDS_OP_A) {
goto incr;
ret = address_space_rw(&address_spac... | true | qemu | 62a2554ec2630896d1299e1a282a64c7f3b00da0 | static int ccw_dstream_rw_noflags(CcwDataStream *cds, void *buff, int len,
CcwDataStreamOp op)
{
int ret;
ret = cds_check_len(cds, len);
if (ret <= 0) {
return ret;
if (op == CDS_OP_A) {
goto incr;
ret = address_space_rw(&address_spac... | {
"code": [],
"line_no": []
} | static int FUNC_0(CcwDataStream *VAR_0, void *VAR_1, int VAR_2,
CcwDataStreamOp VAR_3)
{
int VAR_4;
VAR_4 = cds_check_len(VAR_0, VAR_2);
if (VAR_4 <= 0) {
return VAR_4;
if (VAR_3 == CDS_OP_A) {
goto incr;
VAR_4 = address_space_rw(&add... | [
"static int FUNC_0(CcwDataStream *VAR_0, void *VAR_1, int VAR_2,\nCcwDataStreamOp VAR_3)\n{",
"int VAR_4;",
"VAR_4 = cds_check_len(VAR_0, VAR_2);",
"if (VAR_4 <= 0) {",
"return VAR_4;",
"if (VAR_3 == CDS_OP_A) {",
"goto incr;",
"VAR_4 = address_space_rw(&address_space_memory, VAR_0->cda,\nMEMTXATTRS_U... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
26,
28
],
[
30
],
[
32
],
[
34
],
[
37,
39
],
[
41
],
[
43
]
] |
12,559 | static void grlib_apbuart_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
UART *uart = opaque;
unsigned char c = 0;
addr &= 0xff;
/* Unit registers */
switch (addr) {
case DATA_OFFSET:
case DATA_OFFSET + 3: /* ... | true | qemu | 6ab3fc32ea640026726bc5f9f4db622d0954fb8a | static void grlib_apbuart_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
UART *uart = opaque;
unsigned char c = 0;
addr &= 0xff;
switch (addr) {
case DATA_OFFSET:
case DATA_OFFSET + 3:
if ... | {
"code": [
" qemu_chr_fe_write(uart->chr, &c, 1);"
],
"line_no": [
31
]
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
UART *uart = VAR_0;
unsigned char VAR_4 = 0;
VAR_1 &= 0xff;
switch (VAR_1) {
case DATA_OFFSET:
case DATA_OFFSET + 3:
if ((uart-... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"UART *uart = VAR_0;",
"unsigned char VAR_4 = 0;",
"VAR_1 &= 0xff;",
"switch (VAR_1) {",
"case DATA_OFFSET:\ncase DATA_OFFSET + 3:\nif ((uart->chr) && (uart->control & UART_TRANSMIT_ENABLE)) {",
"VAR_4 = VA... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
19
],
[
21,
23,
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47,
51
],
[
55,
57
],
[
59
],
[
63,
67
... |
12,560 | static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
const uint8_t **buf, int buf_size)
{
MpegEncContext *s = &s1->mpeg_enc_ctx;
AVCodecContext *avctx= s->avctx;
int ret;
const int field_pic= s->picture_structure != PICT_FRAME;
s->resync_mb_x=
s->resync... | true | FFmpeg | 25ef43bb289a3a3a717a684902c0a310e292beba | static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
const uint8_t **buf, int buf_size)
{
MpegEncContext *s = &s1->mpeg_enc_ctx;
AVCodecContext *avctx= s->avctx;
int ret;
const int field_pic= s->picture_structure != PICT_FRAME;
s->resync_mb_x=
s->resync... | {
"code": [
" if (mb_y >= s->mb_height){",
" av_log(s->avctx, AV_LOG_ERROR, \"slice below image (%d >= %d)\\n\", s->mb_y, s->mb_height);"
],
"line_no": [
23,
25
]
} | static int FUNC_0(Mpeg1Context *VAR_0, int VAR_1,
const uint8_t **VAR_2, int VAR_3)
{
MpegEncContext *s = &VAR_0->mpeg_enc_ctx;
AVCodecContext *avctx= s->avctx;
int VAR_4;
const int VAR_5= s->picture_structure != PICT_FRAME;
s->resync_mb_x=
s->resync_mb_y= ... | [
"static int FUNC_0(Mpeg1Context *VAR_0, int VAR_1,\nconst uint8_t **VAR_2, int VAR_3)\n{",
"MpegEncContext *s = &VAR_0->mpeg_enc_ctx;",
"AVCodecContext *avctx= s->avctx;",
"int VAR_4;",
"const int VAR_5= s->picture_structure != PICT_FRAME;",
"s->resync_mb_x=\ns->resync_mb_y= -1;",
"if (VAR_1 >= s->mb_he... | [
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
59
... |
12,561 | av_cold void ff_schro_queue_init(FFSchroQueue *queue)
{
queue->p_head = queue->p_tail = NULL;
queue->size = 0;
}
| true | FFmpeg | 220b24c7c97dc033ceab1510549f66d0e7b52ef1 | av_cold void ff_schro_queue_init(FFSchroQueue *queue)
{
queue->p_head = queue->p_tail = NULL;
queue->size = 0;
}
| {
"code": [
"av_cold void ff_schro_queue_init(FFSchroQueue *queue)",
" queue->p_head = queue->p_tail = NULL;",
" queue->size = 0;"
],
"line_no": [
1,
5,
7
]
} | av_cold void FUNC_0(FFSchroQueue *queue)
{
queue->p_head = queue->p_tail = NULL;
queue->size = 0;
}
| [
"av_cold void FUNC_0(FFSchroQueue *queue)\n{",
"queue->p_head = queue->p_tail = NULL;",
"queue->size = 0;",
"}"
] | [
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
12,562 | static int ffm_write_header(AVFormatContext *s)
{
FFMContext *ffm = s->priv_data;
AVStream *st;
ByteIOContext *pb = s->pb;
AVCodecContext *codec;
int bit_rate, i;
ffm->packet_size = FFM_PACKET_SIZE;
/* header */
put_le32(pb, MKTAG('F', 'F', 'M', '1'));
put_be32(pb, ffm-... | true | FFmpeg | 3cffbe090a5168dcfe580de8d662a32e7ad1d911 | static int ffm_write_header(AVFormatContext *s)
{
FFMContext *ffm = s->priv_data;
AVStream *st;
ByteIOContext *pb = s->pb;
AVCodecContext *codec;
int bit_rate, i;
ffm->packet_size = FFM_PACKET_SIZE;
put_le32(pb, MKTAG('F', 'F', 'M', '1'));
put_be32(pb, ffm->packet_size... | {
"code": [
" put_strz(pb, codec->rc_eq);"
],
"line_no": [
107
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
FFMContext *ffm = VAR_0->priv_data;
AVStream *st;
ByteIOContext *pb = VAR_0->pb;
AVCodecContext *codec;
int VAR_1, VAR_2;
ffm->packet_size = FFM_PACKET_SIZE;
put_le32(pb, MKTAG('F', 'F', 'M', '1'));
put_be32(pb, ffm->packet_s... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"FFMContext *ffm = VAR_0->priv_data;",
"AVStream *st;",
"ByteIOContext *pb = VAR_0->pb;",
"AVCodecContext *codec;",
"int VAR_1, VAR_2;",
"ffm->packet_size = FFM_PACKET_SIZE;",
"put_le32(pb, MKTAG('F', 'F', 'M', '1'));",
"put_be32(pb, ffm->packet_size);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
23
],
[
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
51
],
[
53
],
[
55
... |
12,563 | static int assigned_device_pci_cap_init(PCIDevice *pci_dev, Error **errp)
{
AssignedDevice *dev = DO_UPCAST(AssignedDevice, dev, pci_dev);
PCIRegion *pci_region = dev->real_device.regions;
int ret, pos;
Error *local_err = NULL;
/* Clear initial capabilities pointer and status copied from hw ... | true | qemu | 639973a4740f38789057744b550df3a175bc49ad | static int assigned_device_pci_cap_init(PCIDevice *pci_dev, Error **errp)
{
AssignedDevice *dev = DO_UPCAST(AssignedDevice, dev, pci_dev);
PCIRegion *pci_region = dev->real_device.regions;
int ret, pos;
Error *local_err = NULL;
pci_set_byte(pci_dev->config + PCI_CAPABILITY_LIST, 0);
... | {
"code": [
" pci_set_word(pci_dev->config + pos + PCI_MSIX_FLAGS,",
" pci_get_word(pci_dev->config + pos + PCI_MSIX_FLAGS) &",
" PCI_MSIX_FLAGS_QSIZE);",
" dev->msix_max = pci_get_word(pci_dev->config + pos + PCI_MSIX_FLAGS);",
" dev->m... | static int FUNC_0(PCIDevice *VAR_0, Error **VAR_1)
{
AssignedDevice *dev = DO_UPCAST(AssignedDevice, dev, VAR_0);
PCIRegion *pci_region = dev->real_device.regions;
int VAR_2, VAR_3;
Error *local_err = NULL;
pci_set_byte(VAR_0->config + PCI_CAPABILITY_LIST, 0);
pci_set_word(VAR_0->... | [
"static int FUNC_0(PCIDevice *VAR_0, Error **VAR_1)\n{",
"AssignedDevice *dev = DO_UPCAST(AssignedDevice, dev, VAR_0);",
"PCIRegion *pci_region = dev->real_device.regions;",
"int VAR_2, VAR_3;",
"Error *local_err = NULL;",
"pci_set_byte(VAR_0->config + PCI_CAPABILITY_LIST, 0);",
"pci_set_word(VAR_0->con... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19,
21,
23
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49,
51
],
[
53
],
[
55
],
[... |
12,564 | int avfilter_graph_send_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, char *res, int res_len, int flags)
{
int i, r = AVERROR(ENOSYS);
if(!graph)
return r;
if((flags & AVFILTER_CMD_FLAG_ONE) && !(flags & AVFILTER_CMD_FLAG_FAST)) {
r=avfilter_gr... | true | FFmpeg | c0323b9c9bcebe029df0b19a19a6f81deef94b3a | int avfilter_graph_send_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, char *res, int res_len, int flags)
{
int i, r = AVERROR(ENOSYS);
if(!graph)
return r;
if((flags & AVFILTER_CMD_FLAG_ONE) && !(flags & AVFILTER_CMD_FLAG_FAST)) {
r=avfilter_gr... | {
"code": [
" if(!strcmp(target, \"all\") || !strcmp(target, filter->name) || !strcmp(target, filter->filter->name)){"
],
"line_no": [
37
]
} | int FUNC_0(AVFilterGraph *VAR_0, const char *VAR_1, const char *VAR_2, const char *VAR_3, char *VAR_4, int VAR_5, int VAR_6)
{
int VAR_7, VAR_8 = AVERROR(ENOSYS);
if(!VAR_0)
return VAR_8;
if((VAR_6 & AVFILTER_CMD_FLAG_ONE) && !(VAR_6 & AVFILTER_CMD_FLAG_FAST)) {
VAR_8=FUNC_0(VAR_0,... | [
"int FUNC_0(AVFilterGraph *VAR_0, const char *VAR_1, const char *VAR_2, const char *VAR_3, char *VAR_4, int VAR_5, int VAR_6)\n{",
"int VAR_7, VAR_8 = AVERROR(ENOSYS);",
"if(!VAR_0)\nreturn VAR_8;",
"if((VAR_6 & AVFILTER_CMD_FLAG_ONE) && !(VAR_6 & AVFILTER_CMD_FLAG_FAST)) {",
"VAR_8=FUNC_0(VAR_0, VAR_1, VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
27,
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
51
],
[
55... |
12,565 | static void dct_unquantize_mpeg2_c(MpegEncContext *s,
DCTELEM *block, int n, int qscale)
{
int i, level, nCoeffs;
const UINT16 *quant_matrix;
if(s->alternate_scan) nCoeffs= 64;
else nCoeffs= s->block_last_index[n]+1;
if (s->mb_intra) {
if (... | true | FFmpeg | d7e9533aa06f4073a27812349b35ba5fede11ca1 | static void dct_unquantize_mpeg2_c(MpegEncContext *s,
DCTELEM *block, int n, int qscale)
{
int i, level, nCoeffs;
const UINT16 *quant_matrix;
if(s->alternate_scan) nCoeffs= 64;
else nCoeffs= s->block_last_index[n]+1;
if (s->mb_intra) {
if (... | {
"code": [
" quant_matrix = s->non_intra_matrix;",
" quant_matrix = s->non_intra_matrix;",
" i = 0;",
"#endif",
"#endif",
"#endif",
" } else {",
" } else {",
"#ifdef PARANOID",
"#endif",
" quant_matrix = s->non_intra_matrix;",
" ... | static void FUNC_0(MpegEncContext *VAR_0,
DCTELEM *VAR_1, int VAR_2, int VAR_3)
{
int VAR_4, VAR_5, VAR_6;
const UINT16 *VAR_7;
if(VAR_0->alternate_scan) VAR_6= 64;
else VAR_6= VAR_0->block_last_index[VAR_2]+1;
if (VAR_0->mb_intra) {
if (VA... | [
"static void FUNC_0(MpegEncContext *VAR_0,\nDCTELEM *VAR_1, int VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6;",
"const UINT16 *VAR_7;",
"if(VAR_0->alternate_scan) VAR_6= 64;",
"else VAR_6= VAR_0->block_last_index[VAR_2]+1;",
"if (VAR_0->mb_intra) {",
"if (VAR_2 < 4)\nVAR_1[0] = VAR_1[0] * VAR_0->y_dc... | [
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
12,566 | static void destroy_l2_mapping(PhysPageEntry *lp, unsigned level)
{
unsigned i;
PhysPageEntry *p;
if (lp->ptr == PHYS_MAP_NODE_NIL) {
return;
}
p = phys_map_nodes[lp->ptr];
for (i = 0; i < L2_SIZE; ++i) {
if (!p[i].is_leaf) {
destroy_l2_mapping(&p[i], le... | true | qemu | 058bc4b57f9d6b39d9a6748b4049e1be3fde3dac | static void destroy_l2_mapping(PhysPageEntry *lp, unsigned level)
{
unsigned i;
PhysPageEntry *p;
if (lp->ptr == PHYS_MAP_NODE_NIL) {
return;
}
p = phys_map_nodes[lp->ptr];
for (i = 0; i < L2_SIZE; ++i) {
if (!p[i].is_leaf) {
destroy_l2_mapping(&p[i], le... | {
"code": [
" } else {",
" destroy_page_desc(p[i].ptr);"
],
"line_no": [
27,
29
]
} | static void FUNC_0(PhysPageEntry *VAR_0, unsigned VAR_1)
{
unsigned VAR_2;
PhysPageEntry *p;
if (VAR_0->ptr == PHYS_MAP_NODE_NIL) {
return;
}
p = phys_map_nodes[VAR_0->ptr];
for (VAR_2 = 0; VAR_2 < L2_SIZE; ++VAR_2) {
if (!p[VAR_2].is_leaf) {
FUNC_0(&p[V... | [
"static void FUNC_0(PhysPageEntry *VAR_0, unsigned VAR_1)\n{",
"unsigned VAR_2;",
"PhysPageEntry *p;",
"if (VAR_0->ptr == PHYS_MAP_NODE_NIL) {",
"return;",
"}",
"p = phys_map_nodes[VAR_0->ptr];",
"for (VAR_2 = 0; VAR_2 < L2_SIZE; ++VAR_2) {",
"if (!p[VAR_2].is_leaf) {",
"FUNC_0(&p[VAR_2], VAR_1 - ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
12,568 | static int apply_window_and_mdct(vorbis_enc_context *venc,
float **audio, int samples)
{
int channel;
const float * win = venc->win[0];
int window_len = 1 << (venc->log2_blocksize[0] - 1);
float n = (float)(1 << venc->log2_blocksize[0]) / 4.0;
AVFloatDSPContex... | true | FFmpeg | 34c52005605d68f7cd1957b169b6732c7d2447d9 | static int apply_window_and_mdct(vorbis_enc_context *venc,
float **audio, int samples)
{
int channel;
const float * win = venc->win[0];
int window_len = 1 << (venc->log2_blocksize[0] - 1);
float n = (float)(1 << venc->log2_blocksize[0]) / 4.0;
AVFloatDSPContex... | {
"code": [
" float **audio, int samples)",
" fdsp->vector_fmul_reverse(offset, audio[channel], win, samples);",
" fdsp->vector_fmul(offset, audio[channel], win, samples);"
],
"line_no": [
3,
53,
87
]
} | static int FUNC_0(vorbis_enc_context *VAR_0,
float **VAR_1, int VAR_2)
{
int VAR_3;
const float * VAR_4 = VAR_0->VAR_4[0];
int VAR_5 = 1 << (VAR_0->log2_blocksize[0] - 1);
float VAR_6 = (float)(1 << VAR_0->log2_blocksize[0]) / 4.0;
AVFloatDSPContext *fdsp = VA... | [
"static int FUNC_0(vorbis_enc_context *VAR_0,\nfloat **VAR_1, int VAR_2)\n{",
"int VAR_3;",
"const float * VAR_4 = VAR_0->VAR_4[0];",
"int VAR_5 = 1 << (VAR_0->log2_blocksize[0] - 1);",
"float VAR_6 = (float)(1 << VAR_0->log2_blocksize[0]) / 4.0;",
"AVFloatDSPContext *fdsp = VAR_0->fdsp;",
"if (!VAR_0->... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
... |
12,569 | static int transcode(void)
{
int ret, i;
AVFormatContext *is, *os;
OutputStream *ost;
InputStream *ist;
uint8_t *no_packet;
int no_packet_count = 0;
int64_t timer_start;
int key;
if (!(no_packet = av_mallocz(nb_input_files)))
exit_program(1);
ret = transco... | false | FFmpeg | 25e87fc5f61bd9b85ecf52c6082a18d7e7c8506b | static int transcode(void)
{
int ret, i;
AVFormatContext *is, *os;
OutputStream *ost;
InputStream *ist;
uint8_t *no_packet;
int no_packet_count = 0;
int64_t timer_start;
int key;
if (!(no_packet = av_mallocz(nb_input_files)))
exit_program(1);
ret = transco... | {
"code": [],
"line_no": []
} | static int FUNC_0(void)
{
int VAR_0, VAR_1;
AVFormatContext *is, *os;
OutputStream *ost;
InputStream *ist;
uint8_t *no_packet;
int VAR_2 = 0;
int64_t timer_start;
int VAR_3;
if (!(no_packet = av_mallocz(nb_input_files)))
exit_program(1);
VAR_0 = transcode_... | [
"static int FUNC_0(void)\n{",
"int VAR_0, VAR_1;",
"AVFormatContext *is, *os;",
"OutputStream *ost;",
"InputStream *ist;",
"uint8_t *no_packet;",
"int VAR_2 = 0;",
"int64_t timer_start;",
"int VAR_3;",
"if (!(no_packet = av_mallocz(nb_input_files)))\nexit_program(1);",
"VAR_0 = transcode_init();... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
29
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
49
],
[
51
],
[
53
... |
12,570 | static int rtsp_write_packet(AVFormatContext *s, AVPacket *pkt)
{
RTSPState *rt = s->priv_data;
RTSPStream *rtsp_st;
fd_set rfds;
int n, tcp_fd;
struct timeval tv;
AVFormatContext *rtpctx;
int ret;
tcp_fd = url_get_file_handle(rt->rtsp_hd);
while (1) {
FD_ZERO(... | false | FFmpeg | a8475bbdb64e638bd8161df9647876fd23f8a29a | static int rtsp_write_packet(AVFormatContext *s, AVPacket *pkt)
{
RTSPState *rt = s->priv_data;
RTSPStream *rtsp_st;
fd_set rfds;
int n, tcp_fd;
struct timeval tv;
AVFormatContext *rtpctx;
int ret;
tcp_fd = url_get_file_handle(rt->rtsp_hd);
while (1) {
FD_ZERO(... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
RTSPState *rt = VAR_0->priv_data;
RTSPStream *rtsp_st;
fd_set rfds;
int VAR_2, VAR_3;
struct timeval VAR_4;
AVFormatContext *rtpctx;
int VAR_5;
VAR_3 = url_get_file_handle(rt->rtsp_hd);
while (1) {
FD... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"RTSPState *rt = VAR_0->priv_data;",
"RTSPStream *rtsp_st;",
"fd_set rfds;",
"int VAR_2, VAR_3;",
"struct timeval VAR_4;",
"AVFormatContext *rtpctx;",
"int VAR_5;",
"VAR_3 = url_get_file_handle(rt->rtsp_hd);",
"while (1) {",
"FD_ZE... | [
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
55
],
[... |
12,571 | static inline TCGv load_reg(DisasContext *s, int reg)
{
TCGv tmp = new_tmp();
load_reg_var(s, tmp, reg);
return tmp;
}
| true | qemu | 7d1b0095bff7157e856d1d0e6c4295641ced2752 | static inline TCGv load_reg(DisasContext *s, int reg)
{
TCGv tmp = new_tmp();
load_reg_var(s, tmp, reg);
return tmp;
}
| {
"code": [
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" ... | static inline TCGv FUNC_0(DisasContext *s, int reg)
{
TCGv tmp = new_tmp();
load_reg_var(s, tmp, reg);
return tmp;
}
| [
"static inline TCGv FUNC_0(DisasContext *s, int reg)\n{",
"TCGv tmp = new_tmp();",
"load_reg_var(s, tmp, reg);",
"return tmp;",
"}"
] | [
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
12,572 | static void ppc_spapr_init(QEMUMachineInitArgs *args)
{
ram_addr_t ram_size = args->ram_size;
const char *cpu_model = args->cpu_model;
const char *kernel_filename = args->kernel_filename;
const char *kernel_cmdline = args->kernel_cmdline;
const char *initrd_filename = args->initrd_filename;
... | true | qemu | caae58cba07efec5f0616f568531c9dfaf1e9179 | static void ppc_spapr_init(QEMUMachineInitArgs *args)
{
ram_addr_t ram_size = args->ram_size;
const char *cpu_model = args->cpu_model;
const char *kernel_filename = args->kernel_filename;
const char *kernel_cmdline = args->kernel_cmdline;
const char *initrd_filename = args->initrd_filename;
... | {
"code": [
" spapr_create_phb(spapr, \"pci\", SPAPR_PCI_BUID,",
" SPAPR_PCI_MEM_WIN_ADDR,",
" SPAPR_PCI_MEM_WIN_SIZE,",
" SPAPR_PCI_IO_WIN_ADDR,",
" SPAPR_PCI_MSI_WIN_ADDR);",
" phb = PCI_HOST_BRIDGE(QLIST_F... | static void FUNC_0(QEMUMachineInitArgs *VAR_0)
{
ram_addr_t ram_size = VAR_0->ram_size;
const char *VAR_1 = VAR_0->VAR_1;
const char *VAR_2 = VAR_0->VAR_2;
const char *VAR_3 = VAR_0->VAR_3;
const char *VAR_4 = VAR_0->VAR_4;
const char *VAR_5 = VAR_0->VAR_5;
PowerPCCPU *cpu;
CPUP... | [
"static void FUNC_0(QEMUMachineInitArgs *VAR_0)\n{",
"ram_addr_t ram_size = VAR_0->ram_size;",
"const char *VAR_1 = VAR_0->VAR_1;",
"const char *VAR_2 = VAR_0->VAR_2;",
"const char *VAR_3 = VAR_0->VAR_3;",
"const char *VAR_4 = VAR_0->VAR_4;",
"const char *VAR_5 = VAR_0->VAR_5;",
"PowerPCCPU *cpu;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
41
],
[
45
... |
12,573 | static void hmp_info_cpustats(Monitor *mon, const QDict *qdict)
{
cpu_dump_statistics(mon_get_cpu(), (FILE *)mon, &monitor_fprintf, 0);
}
| true | qemu | 854e67fea6a6f181163a5467fc9ba04de8d181bb | static void hmp_info_cpustats(Monitor *mon, const QDict *qdict)
{
cpu_dump_statistics(mon_get_cpu(), (FILE *)mon, &monitor_fprintf, 0);
}
| {
"code": [
" cpu_dump_statistics(mon_get_cpu(), (FILE *)mon, &monitor_fprintf, 0);"
],
"line_no": [
5
]
} | static void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{
cpu_dump_statistics(mon_get_cpu(), (FILE *)VAR_0, &monitor_fprintf, 0);
}
| [
"static void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)\n{",
"cpu_dump_statistics(mon_get_cpu(), (FILE *)VAR_0, &monitor_fprintf, 0);",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
12,574 | static int read_decode_block(ALSDecContext *ctx, ALSBlockData *bd)
{
int ret;
ret = read_block(ctx, bd);
if (ret)
return ret;
ret = decode_block(ctx, bd);
return ret;
}
| true | FFmpeg | ca488ad480360dfafcb5766f7bfbb567a0638979 | static int read_decode_block(ALSDecContext *ctx, ALSBlockData *bd)
{
int ret;
ret = read_block(ctx, bd);
if (ret)
return ret;
ret = decode_block(ctx, bd);
return ret;
}
| {
"code": [
" ret = read_block(ctx, bd);",
" if (ret)",
" ret = decode_block(ctx, bd);",
" return ret;"
],
"line_no": [
9,
13,
19,
23
]
} | static int FUNC_0(ALSDecContext *VAR_0, ALSBlockData *VAR_1)
{
int VAR_2;
VAR_2 = read_block(VAR_0, VAR_1);
if (VAR_2)
return VAR_2;
VAR_2 = decode_block(VAR_0, VAR_1);
return VAR_2;
}
| [
"static int FUNC_0(ALSDecContext *VAR_0, ALSBlockData *VAR_1)\n{",
"int VAR_2;",
"VAR_2 = read_block(VAR_0, VAR_1);",
"if (VAR_2)\nreturn VAR_2;",
"VAR_2 = decode_block(VAR_0, VAR_1);",
"return VAR_2;",
"}"
] | [
0,
0,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13,
15
],
[
19
],
[
23
],
[
25
]
] |
12,575 | DeviceState *aux_create_slave(AUXBus *bus, const char *type, uint32_t addr)
{
DeviceState *dev;
dev = DEVICE(object_new(type));
assert(dev);
qdev_set_parent_bus(dev, &bus->qbus);
qdev_init_nofail(dev);
aux_bus_map_device(AUX_BUS(qdev_get_parent_bus(dev)), AUX_SLAVE(dev), addr);
ret... | true | qemu | e0dadc1e9ef1f35208e5d2af9c7740c18a0b769f | DeviceState *aux_create_slave(AUXBus *bus, const char *type, uint32_t addr)
{
DeviceState *dev;
dev = DEVICE(object_new(type));
assert(dev);
qdev_set_parent_bus(dev, &bus->qbus);
qdev_init_nofail(dev);
aux_bus_map_device(AUX_BUS(qdev_get_parent_bus(dev)), AUX_SLAVE(dev), addr);
ret... | {
"code": [],
"line_no": []
} | DeviceState *FUNC_0(AUXBus *bus, const char *type, uint32_t addr)
{
DeviceState *dev;
dev = DEVICE(object_new(type));
assert(dev);
qdev_set_parent_bus(dev, &bus->qbus);
qdev_init_nofail(dev);
aux_bus_map_device(AUX_BUS(qdev_get_parent_bus(dev)), AUX_SLAVE(dev), addr);
return dev;
... | [
"DeviceState *FUNC_0(AUXBus *bus, const char *type, uint32_t addr)\n{",
"DeviceState *dev;",
"dev = DEVICE(object_new(type));",
"assert(dev);",
"qdev_set_parent_bus(dev, &bus->qbus);",
"qdev_init_nofail(dev);",
"aux_bus_map_device(AUX_BUS(qdev_get_parent_bus(dev)), AUX_SLAVE(dev), addr);",
"return dev... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
12,576 | static int get_uint64_equal(QEMUFile *f, void *pv, size_t size,
VMStateField *field)
{
uint64_t *v = pv;
uint64_t v2;
qemu_get_be64s(f, &v2);
if (*v == v2) {
return 0;
error_report("%" PRIx64 " != %" PRIx64, *v, v2);
return -EINVAL;
| true | qemu | d2164ad35c411d97abd2aa5c6f160283d215e214 | static int get_uint64_equal(QEMUFile *f, void *pv, size_t size,
VMStateField *field)
{
uint64_t *v = pv;
uint64_t v2;
qemu_get_be64s(f, &v2);
if (*v == v2) {
return 0;
error_report("%" PRIx64 " != %" PRIx64, *v, v2);
return -EINVAL;
| {
"code": [],
"line_no": []
} | static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2,
VMStateField *VAR_3)
{
uint64_t *v = VAR_1;
uint64_t v2;
qemu_get_be64s(VAR_0, &v2);
if (*v == v2) {
return 0;
error_report("%" PRIx64 " != %" PRIx64, *v, v2);
return -EINVAL;
| [
"static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2,\nVMStateField *VAR_3)\n{",
"uint64_t *v = VAR_1;",
"uint64_t v2;",
"qemu_get_be64s(VAR_0, &v2);",
"if (*v == v2) {",
"return 0;",
"error_report(\"%\" PRIx64 \" != %\" PRIx64, *v, v2);",
"return -EINVAL;"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
20
],
[
25
]
] |
12,577 | static void vhost_net_stop_one(struct vhost_net *net,
VirtIODevice *dev)
{
struct vhost_vring_file file = { .fd = -1 };
if (net->nc->info->type == NET_CLIENT_DRIVER_TAP) {
for (file.index = 0; file.index < net->dev.nvqs; ++file.index) {
const VhostOps *... | true | qemu | 950d94ba0671e7f154a9e87a277f8efbddcee28f | static void vhost_net_stop_one(struct vhost_net *net,
VirtIODevice *dev)
{
struct vhost_vring_file file = { .fd = -1 };
if (net->nc->info->type == NET_CLIENT_DRIVER_TAP) {
for (file.index = 0; file.index < net->dev.nvqs; ++file.index) {
const VhostOps *... | {
"code": [
" const VhostOps *vhost_ops = net->dev.vhost_ops;",
" const VhostOps *vhost_ops = net->dev.vhost_ops;",
" int r = vhost_ops->vhost_net_set_backend(&net->dev, &file);",
" const VhostOps *vhost_ops = net->dev.vhost_ops;",
" int r = v... | static void FUNC_0(struct vhost_net *VAR_0,
VirtIODevice *VAR_1)
{
struct vhost_vring_file VAR_2 = { .fd = -1 };
if (VAR_0->nc->info->type == NET_CLIENT_DRIVER_TAP) {
for (VAR_2.index = 0; VAR_2.index < VAR_0->VAR_1.nvqs; ++VAR_2.index) {
const VhostOps... | [
"static void FUNC_0(struct vhost_net *VAR_0,\nVirtIODevice *VAR_1)\n{",
"struct vhost_vring_file VAR_2 = { .fd = -1 };",
"if (VAR_0->nc->info->type == NET_CLIENT_DRIVER_TAP) {",
"for (VAR_2.index = 0; VAR_2.index < VAR_0->VAR_1.nvqs; ++VAR_2.index) {",
"const VhostOps *vhost_ops = VAR_0->VAR_1.vhost_ops;",
... | [
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
12,578 | static int pci_init_multifunction(PCIBus *bus, PCIDevice *dev)
{
uint8_t slot = PCI_SLOT(dev->devfn);
uint8_t func;
if (dev->cap_present & QEMU_PCI_CAP_MULTIFUNCTION) {
dev->config[PCI_HEADER_TYPE] |= PCI_HEADER_TYPE_MULTI_FUNCTION;
}
/*
* multifunction bit is interpreted in... | true | qemu | 133e9b228df16d11de01529c217417e78d1d9370 | static int pci_init_multifunction(PCIBus *bus, PCIDevice *dev)
{
uint8_t slot = PCI_SLOT(dev->devfn);
uint8_t func;
if (dev->cap_present & QEMU_PCI_CAP_MULTIFUNCTION) {
dev->config[PCI_HEADER_TYPE] |= PCI_HEADER_TYPE_MULTI_FUNCTION;
}
if (PCI_FUNC(dev... | {
"code": [
"static int pci_init_multifunction(PCIBus *bus, PCIDevice *dev)",
" error_report(\"PCI: single function device can't be populated \"",
" \"in function %x.%x\", slot, PCI_FUNC(dev->devfn));",
" return -1;",
" return 0;",
" ... | static int FUNC_0(PCIBus *VAR_0, PCIDevice *VAR_1)
{
uint8_t slot = PCI_SLOT(VAR_1->devfn);
uint8_t func;
if (VAR_1->cap_present & QEMU_PCI_CAP_MULTIFUNCTION) {
VAR_1->config[PCI_HEADER_TYPE] |= PCI_HEADER_TYPE_MULTI_FUNCTION;
}
if (PCI_FUNC(VAR_1->de... | [
"static int FUNC_0(PCIBus *VAR_0, PCIDevice *VAR_1)\n{",
"uint8_t slot = PCI_SLOT(VAR_1->devfn);",
"uint8_t func;",
"if (VAR_1->cap_present & QEMU_PCI_CAP_MULTIFUNCTION) {",
"VAR_1->config[PCI_HEADER_TYPE] |= PCI_HEADER_TYPE_MULTI_FUNCTION;",
"}",
"if (PCI_FUNC(VAR_1->devfn)) {",
"PCIDevice *f0 = VAR_... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
45
],
[
47
],
[
49
],
[
53,
55
],
[
57
],
[
59
],
[
61
],
[
63
],
[
67
],
[
69
],
[
71
],
[
75
],
[
77
],
... |
12,580 | static int mpeg_mux_init(AVFormatContext *ctx)
{
MpegMuxContext *s = ctx->priv_data;
int bitrate, i, mpa_id, mpv_id, mps_id, ac3_id, dts_id, lpcm_id, j;
AVStream *st;
StreamInfo *stream;
int audio_bitrate;
int video_bitrate;
s->packet_number = 0;
s->is_vcd = (CONFIG_MPEG1VC... | false | FFmpeg | 24dc7776ff4452764d0365b12d0728153f879cf8 | static int mpeg_mux_init(AVFormatContext *ctx)
{
MpegMuxContext *s = ctx->priv_data;
int bitrate, i, mpa_id, mpv_id, mps_id, ac3_id, dts_id, lpcm_id, j;
AVStream *st;
StreamInfo *stream;
int audio_bitrate;
int video_bitrate;
s->packet_number = 0;
s->is_vcd = (CONFIG_MPEG1VC... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
MpegMuxContext *s = VAR_0->priv_data;
int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;
AVStream *st;
StreamInfo *stream;
int VAR_10;
int VAR_11;
s->packet_number = 0;
s->is_vcd = (CONFIG_MPEG1VCD_MUXER && VAR_0-... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"MpegMuxContext *s = VAR_0->priv_data;",
"int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;",
"AVStream *st;",
"StreamInfo *stream;",
"int VAR_10;",
"int VAR_11;",
"s->packet_number = 0;",
"s->is_vcd = (CONFIG_MPEG1VCD_MUXER && 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
],
[
19
],
[
21
],
[
23
],
[
25,
27,
29
],
[
31
],
[
35,
37
],
[
39,
41
],
[
45
],
[
47
],
[
51
],
[
53
... |
12,581 | static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos,
int *outFilterSize, int xInc, int srcW,
int dstW, int filterAlign, int one,
int flags, int cpu_flags,
SwsVector *srcFilter, ... | false | FFmpeg | 1895d414aaacece3b57d7bf19502305e9a064fae | static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos,
int *outFilterSize, int xInc, int srcW,
int dstW, int filterAlign, int one,
int flags, int cpu_flags,
SwsVector *srcFilter, ... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(int16_t **outFilter, int32_t **filterPos,
int *outFilterSize, int xInc, int srcW,
int dstW, int filterAlign, int one,
int flags, int cpu_flags,
SwsVector *srcFilter, SwsV... | [
"static av_cold int FUNC_0(int16_t **outFilter, int32_t **filterPos,\nint *outFilterSize, int xInc, int srcW,\nint dstW, int filterAlign, int one,\nint flags, int cpu_flags,\nSwsVector *srcFilter, SwsVector *dstFilter,\ndouble param[2], int srcPos, int dstPos)\n{",
"int VAR_7;",
"int VAR_1;",
"int VAR_2;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49,
51
],
[
55
],
[
57
... |
12,582 | static av_cold int vorbis_encode_init(AVCodecContext *avccontext)
{
vorbis_enc_context *venc = avccontext->priv_data;
if (avccontext->channels != 2) {
av_log(avccontext, AV_LOG_ERROR, "Current Libav Vorbis encoder only supports 2 channels.\n");
return -1;
}
create_vorbis_conte... | true | FFmpeg | be8d812c9635f31f69c30dff9ebf565a07a7dab7 | static av_cold int vorbis_encode_init(AVCodecContext *avccontext)
{
vorbis_enc_context *venc = avccontext->priv_data;
if (avccontext->channels != 2) {
av_log(avccontext, AV_LOG_ERROR, "Current Libav Vorbis encoder only supports 2 channels.\n");
return -1;
}
create_vorbis_conte... | {
"code": [
"static av_cold int vorbis_encode_init(AVCodecContext *avccontext)",
" vorbis_enc_context *venc = avccontext->priv_data;",
" if (avccontext->channels != 2) {",
" av_log(avccontext, AV_LOG_ERROR, \"Current Libav Vorbis encoder only supports 2 channels.\\n\");",
" ret... | static av_cold int FUNC_0(AVCodecContext *avccontext)
{
vorbis_enc_context *venc = avccontext->priv_data;
if (avccontext->channels != 2) {
av_log(avccontext, AV_LOG_ERROR, "Current Libav Vorbis encoder only supports 2 channels.\n");
return -1;
}
create_vorbis_context(venc, avc... | [
"static av_cold int FUNC_0(AVCodecContext *avccontext)\n{",
"vorbis_enc_context *venc = avccontext->priv_data;",
"if (avccontext->channels != 2) {",
"av_log(avccontext, AV_LOG_ERROR, \"Current Libav Vorbis encoder only supports 2 channels.\\n\");",
"return -1;",
"}",
"create_vorbis_context(venc, avccont... | [
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23,
25
],
[
27,
29
],
[
31
],
[
35
],
[
39
],
[
43
],
[
45
],
[
49
],
[
51
]
] |
12,583 | struct omap_gp_timer_s *omap_gp_timer_init(struct omap_target_agent_s *ta,
qemu_irq irq, omap_clk fclk, omap_clk iclk)
{
struct omap_gp_timer_s *s = (struct omap_gp_timer_s *)
g_malloc0(sizeof(struct omap_gp_timer_s));
s->ta = ta;
s->irq = irq;
s->clk = fclk;
s-... | true | qemu | b45c03f585ea9bb1af76c73e82195418c294919d | struct omap_gp_timer_s *omap_gp_timer_init(struct omap_target_agent_s *ta,
qemu_irq irq, omap_clk fclk, omap_clk iclk)
{
struct omap_gp_timer_s *s = (struct omap_gp_timer_s *)
g_malloc0(sizeof(struct omap_gp_timer_s));
s->ta = ta;
s->irq = irq;
s->clk = fclk;
s-... | {
"code": [
" struct omap_gp_timer_s *s = (struct omap_gp_timer_s *)",
" g_malloc0(sizeof(struct omap_gp_timer_s));"
],
"line_no": [
7,
9
]
} | struct omap_gp_timer_s *FUNC_0(struct omap_target_agent_s *VAR_0,
qemu_irq VAR_1, omap_clk VAR_2, omap_clk VAR_3)
{
struct omap_gp_timer_s *VAR_4 = (struct omap_gp_timer_s *)
g_malloc0(sizeof(struct omap_gp_timer_s));
VAR_4->VAR_0 = VAR_0;
VAR_4->VAR_1 = VAR_1;
VAR_4... | [
"struct omap_gp_timer_s *FUNC_0(struct omap_target_agent_s *VAR_0,\nqemu_irq VAR_1, omap_clk VAR_2, omap_clk VAR_3)\n{",
"struct omap_gp_timer_s *VAR_4 = (struct omap_gp_timer_s *)\ng_malloc0(sizeof(struct omap_gp_timer_s));",
"VAR_4->VAR_0 = VAR_0;",
"VAR_4->VAR_1 = VAR_1;",
"VAR_4->clk = VAR_2;",
"VAR_4... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
35
],
[
39
],
[
41
]
] |
12,584 | ISADevice *isa_try_create(ISABus *bus, const char *name)
{
DeviceState *dev;
if (!bus) {
hw_error("Tried to create isa device %s with no isa bus present.",
name);
}
dev = qdev_try_create(BUS(bus), name);
return ISA_DEVICE(dev);
}
| true | qemu | 675463d9b6b2c2b65a713a6d906aeebe9e6750ae | ISADevice *isa_try_create(ISABus *bus, const char *name)
{
DeviceState *dev;
if (!bus) {
hw_error("Tried to create isa device %s with no isa bus present.",
name);
}
dev = qdev_try_create(BUS(bus), name);
return ISA_DEVICE(dev);
}
| {
"code": [
" if (!bus) {",
" if (!bus) {",
" hw_error(\"Tried to create isa device %s with no isa bus present.\",",
" name);",
" if (!bus) {",
" hw_error(\"Tried to create isa device %s with no isa bus present.\",",
" name);"
],
"... | ISADevice *FUNC_0(ISABus *bus, const char *name)
{
DeviceState *dev;
if (!bus) {
hw_error("Tried to create isa device %s with no isa bus present.",
name);
}
dev = qdev_try_create(BUS(bus), name);
return ISA_DEVICE(dev);
}
| [
"ISADevice *FUNC_0(ISABus *bus, const char *name)\n{",
"DeviceState *dev;",
"if (!bus) {",
"hw_error(\"Tried to create isa device %s with no isa bus present.\",\nname);",
"}",
"dev = qdev_try_create(BUS(bus), name);",
"return ISA_DEVICE(dev);",
"}"
] | [
0,
0,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
12,586 | static int spapr_tce_table_realize(DeviceState *dev)
{
sPAPRTCETable *tcet = SPAPR_TCE_TABLE(dev);
if (kvm_enabled()) {
tcet->table = kvmppc_create_spapr_tce(tcet->liobn,
tcet->nb_table <<
tcet->page_shif... | true | qemu | 12fd28535891572be7aaf862a03019257dafa425 | static int spapr_tce_table_realize(DeviceState *dev)
{
sPAPRTCETable *tcet = SPAPR_TCE_TABLE(dev);
if (kvm_enabled()) {
tcet->table = kvmppc_create_spapr_tce(tcet->liobn,
tcet->nb_table <<
tcet->page_shif... | {
"code": [
" if (kvm_enabled()) {",
" tcet->nb_table <<",
" tcet->page_shift,"
],
"line_no": [
9,
13,
15
]
} | static int FUNC_0(DeviceState *VAR_0)
{
sPAPRTCETable *tcet = SPAPR_TCE_TABLE(VAR_0);
if (kvm_enabled()) {
tcet->table = kvmppc_create_spapr_tce(tcet->liobn,
tcet->nb_table <<
tcet->page_shift,
... | [
"static int FUNC_0(DeviceState *VAR_0)\n{",
"sPAPRTCETable *tcet = SPAPR_TCE_TABLE(VAR_0);",
"if (kvm_enabled()) {",
"tcet->table = kvmppc_create_spapr_tce(tcet->liobn,\ntcet->nb_table <<\ntcet->page_shift,\n&tcet->fd,\ntcet->vfio_accel);",
"}",
"if (!tcet->table) {",
"size_t table_size = tcet->nb_table... | [
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13,
15,
17,
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39,
41,
43
],
[
47
],
[
51,
53
],
[
57
],
[
59
]
] |
12,587 | static bool get_phys_addr_pmsav7(CPUARMState *env, uint32_t address,
MMUAccessType access_type, ARMMMUIdx mmu_idx,
hwaddr *phys_ptr, int *prot,
ARMMMUFaultInfo *fi)
{
ARMCPU *cpu = arm_env_get_cpu(env);
int ... | true | qemu | 8638f1ad7403b63db880dadce38e6690b5d82b64 | static bool get_phys_addr_pmsav7(CPUARMState *env, uint32_t address,
MMUAccessType access_type, ARMMMUIdx mmu_idx,
hwaddr *phys_ptr, int *prot,
ARMMMUFaultInfo *fi)
{
ARMCPU *cpu = arm_env_get_cpu(env);
int ... | {
"code": [],
"line_no": []
} | static bool FUNC_0(CPUARMState *env, uint32_t address,
MMUAccessType access_type, ARMMMUIdx mmu_idx,
hwaddr *phys_ptr, int *prot,
ARMMMUFaultInfo *fi)
{
ARMCPU *cpu = arm_env_get_cpu(env);
int VAR_0;
bo... | [
"static bool FUNC_0(CPUARMState *env, uint32_t address,\nMMUAccessType access_type, ARMMMUIdx mmu_idx,\nhwaddr *phys_ptr, int *prot,\nARMMMUFaultInfo *fi)\n{",
"ARMCPU *cpu = arm_env_get_cpu(env);",
"int VAR_0;",
"bool is_user = regime_is_user(env, mmu_idx);",
"*phys_ptr = address;",
"*prot = 0;",
"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
],
[
19
],
[
21
],
[
25,
27
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
],
[
57
],
[
61
],
[
63
],
[
68
],
[
70,... |
12,588 | bool address_space_access_valid(AddressSpace *as, hwaddr addr, int len, bool is_write)
{
MemoryRegion *mr;
hwaddr l, xlat;
rcu_read_lock();
while (len > 0) {
l = len;
mr = address_space_translate(as, addr, &xlat, &l, is_write);
if (!memory_access_is_direct(mr, is_write)... | true | qemu | 5ad4a2b75f85dd854a781a6e03b90320cb3441d3 | bool address_space_access_valid(AddressSpace *as, hwaddr addr, int len, bool is_write)
{
MemoryRegion *mr;
hwaddr l, xlat;
rcu_read_lock();
while (len > 0) {
l = len;
mr = address_space_translate(as, addr, &xlat, &l, is_write);
if (!memory_access_is_direct(mr, is_write)... | {
"code": [],
"line_no": []
} | bool FUNC_0(AddressSpace *as, hwaddr addr, int len, bool is_write)
{
MemoryRegion *mr;
hwaddr l, xlat;
rcu_read_lock();
while (len > 0) {
l = len;
mr = address_space_translate(as, addr, &xlat, &l, is_write);
if (!memory_access_is_direct(mr, is_write)) {
l =... | [
"bool FUNC_0(AddressSpace *as, hwaddr addr, int len, bool is_write)\n{",
"MemoryRegion *mr;",
"hwaddr l, xlat;",
"rcu_read_lock();",
"while (len > 0) {",
"l = len;",
"mr = address_space_translate(as, addr, &xlat, &l, is_write);",
"if (!memory_access_is_direct(mr, is_write)) {",
"l = memory_access_si... | [
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
],
[
26
],
[
28
],
[
30
],
[
34
],
[
36
],
[
38
],
[
41
],
[
43
]
] |
12,589 | static int restore_sigcontext(CPUAlphaState *env,
struct target_sigcontext *sc)
{
uint64_t fpcr;
int i, err = 0;
__get_user(env->pc, &sc->sc_pc);
for (i = 0; i < 31; ++i) {
__get_user(env->ir[i], &sc->sc_regs[i]);
}
for (i = 0; i < 31; ++i) {
... | true | qemu | 016d2e1dfa21b64a524d3629fdd317d4c25bc3b8 | static int restore_sigcontext(CPUAlphaState *env,
struct target_sigcontext *sc)
{
uint64_t fpcr;
int i, err = 0;
__get_user(env->pc, &sc->sc_pc);
for (i = 0; i < 31; ++i) {
__get_user(env->ir[i], &sc->sc_regs[i]);
}
for (i = 0; i < 31; ++i) {
... | {
"code": [
" return err;",
" return err;",
" return err;",
"static int restore_sigcontext(CPUAlphaState *env,",
" int i, err = 0;",
" return err;"
],
"line_no": [
37,
37,
37,
1,
9,
37
]
} | static int FUNC_0(CPUAlphaState *VAR_0,
struct target_sigcontext *VAR_1)
{
uint64_t fpcr;
int VAR_2, VAR_3 = 0;
__get_user(VAR_0->pc, &VAR_1->sc_pc);
for (VAR_2 = 0; VAR_2 < 31; ++VAR_2) {
__get_user(VAR_0->ir[VAR_2], &VAR_1->sc_regs[VAR_2]);
}
... | [
"static int FUNC_0(CPUAlphaState *VAR_0,\nstruct target_sigcontext *VAR_1)\n{",
"uint64_t fpcr;",
"int VAR_2, VAR_3 = 0;",
"__get_user(VAR_0->pc, &VAR_1->sc_pc);",
"for (VAR_2 = 0; VAR_2 < 31; ++VAR_2) {",
"__get_user(VAR_0->ir[VAR_2], &VAR_1->sc_regs[VAR_2]);",
"}",
"for (VAR_2 = 0; VAR_2 < 31; ++VAR... | [
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
]
] |
12,590 | static void qxl_realize_secondary(PCIDevice *dev, Error **errp)
{
static int device_id = 1;
PCIQXLDevice *qxl = PCI_QXL(dev);
qxl->id = device_id++;
qxl_init_ramsize(qxl);
memory_region_init_ram(&qxl->vga.vram, OBJECT(dev), "qxl.vgavram",
qxl->vga.vram_size, &erro... | true | qemu | f8ed85ac992c48814d916d5df4d44f9a971c5de4 | static void qxl_realize_secondary(PCIDevice *dev, Error **errp)
{
static int device_id = 1;
PCIQXLDevice *qxl = PCI_QXL(dev);
qxl->id = device_id++;
qxl_init_ramsize(qxl);
memory_region_init_ram(&qxl->vga.vram, OBJECT(dev), "qxl.vgavram",
qxl->vga.vram_size, &erro... | {
"code": [
" qxl->vga.vram_size, &error_abort);"
],
"line_no": [
17
]
} | static void FUNC_0(PCIDevice *VAR_0, Error **VAR_1)
{
static int VAR_2 = 1;
PCIQXLDevice *qxl = PCI_QXL(VAR_0);
qxl->id = VAR_2++;
qxl_init_ramsize(qxl);
memory_region_init_ram(&qxl->vga.vram, OBJECT(VAR_0), "qxl.vgavram",
qxl->vga.vram_size, &error_abort);
v... | [
"static void FUNC_0(PCIDevice *VAR_0, Error **VAR_1)\n{",
"static int VAR_2 = 1;",
"PCIQXLDevice *qxl = PCI_QXL(VAR_0);",
"qxl->id = VAR_2++;",
"qxl_init_ramsize(qxl);",
"memory_region_init_ram(&qxl->vga.vram, OBJECT(VAR_0), \"qxl.vgavram\",\nqxl->vga.vram_size, &error_abort);",
"vmstate_register_ram(&q... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.