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 |
|---|---|---|---|---|---|---|---|---|---|---|
27,005 | av_cold void ff_hpeldsp_vp3_init_x86(HpelDSPContext *c, int cpu_flags, int flags)
{
if (EXTERNAL_AMD3DNOW(cpu_flags)) {
if (flags & AV_CODEC_FLAG_BITEXACT) {
c->put_no_rnd_pixels_tab[1][1] = ff_put_no_rnd_pixels8_x2_exact_3dnow;
c->put_no_rnd_pixels_tab[1][2] = ff_put_no_rnd_pix... | false | FFmpeg | 0a39c9ac0bfd7345fe676b4e2707d9cec3cbb553 | av_cold void ff_hpeldsp_vp3_init_x86(HpelDSPContext *c, int cpu_flags, int flags)
{
if (EXTERNAL_AMD3DNOW(cpu_flags)) {
if (flags & AV_CODEC_FLAG_BITEXACT) {
c->put_no_rnd_pixels_tab[1][1] = ff_put_no_rnd_pixels8_x2_exact_3dnow;
c->put_no_rnd_pixels_tab[1][2] = ff_put_no_rnd_pix... | {
"code": [],
"line_no": []
} | av_cold void FUNC_0(HpelDSPContext *c, int cpu_flags, int flags)
{
if (EXTERNAL_AMD3DNOW(cpu_flags)) {
if (flags & AV_CODEC_FLAG_BITEXACT) {
c->put_no_rnd_pixels_tab[1][1] = ff_put_no_rnd_pixels8_x2_exact_3dnow;
c->put_no_rnd_pixels_tab[1][2] = ff_put_no_rnd_pixels8_y2_exact_3dn... | [
"av_cold void FUNC_0(HpelDSPContext *c, int cpu_flags, int flags)\n{",
"if (EXTERNAL_AMD3DNOW(cpu_flags)) {",
"if (flags & AV_CODEC_FLAG_BITEXACT) {",
"c->put_no_rnd_pixels_tab[1][1] = ff_put_no_rnd_pixels8_x2_exact_3dnow;",
"c->put_no_rnd_pixels_tab[1][2] = ff_put_no_rnd_pixels8_y2_exact_3dnow;",
"}",
... | [
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
]
] |
27,006 | const char *bdrv_get_device_name(const BlockDriverState *bs)
{
return bs->blk ? blk_name(bs->blk) : "";
}
| false | qemu | 61007b316cd71ee7333ff7a0a749a8949527575f | const char *bdrv_get_device_name(const BlockDriverState *bs)
{
return bs->blk ? blk_name(bs->blk) : "";
}
| {
"code": [],
"line_no": []
} | const char *FUNC_0(const BlockDriverState *VAR_0)
{
return VAR_0->blk ? blk_name(VAR_0->blk) : "";
}
| [
"const char *FUNC_0(const BlockDriverState *VAR_0)\n{",
"return VAR_0->blk ? blk_name(VAR_0->blk) : \"\";",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
27,009 | static void mmu6xx_dump_mmu(FILE *f, fprintf_function cpu_fprintf,
CPUPPCState *env)
{
ppc6xx_tlb_t *tlb;
target_ulong sr;
int type, way, entry, i;
cpu_fprintf(f, "HTAB base = 0x%"HWADDR_PRIx"\n", env->htab_base);
cpu_fprintf(f, "HTAB mask = 0x%"HWADDR_PRIx"\n", ... | false | qemu | 36778660d7fd0748a6129916e47ecedd67bdb758 | static void mmu6xx_dump_mmu(FILE *f, fprintf_function cpu_fprintf,
CPUPPCState *env)
{
ppc6xx_tlb_t *tlb;
target_ulong sr;
int type, way, entry, i;
cpu_fprintf(f, "HTAB base = 0x%"HWADDR_PRIx"\n", env->htab_base);
cpu_fprintf(f, "HTAB mask = 0x%"HWADDR_PRIx"\n", ... | {
"code": [],
"line_no": []
} | static void FUNC_0(FILE *VAR_0, fprintf_function VAR_1,
CPUPPCState *VAR_2)
{
ppc6xx_tlb_t *tlb;
target_ulong sr;
int VAR_3, VAR_4, VAR_5, VAR_6;
VAR_1(VAR_0, "HTAB base = 0x%"HWADDR_PRIx"\n", VAR_2->htab_base);
VAR_1(VAR_0, "HTAB mask = 0x%"HWADDR_PRIx"\n", VAR_... | [
"static void FUNC_0(FILE *VAR_0, fprintf_function VAR_1,\nCPUPPCState *VAR_2)\n{",
"ppc6xx_tlb_t *tlb;",
"target_ulong sr;",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"VAR_1(VAR_0, \"HTAB base = 0x%\"HWADDR_PRIx\"\\n\", VAR_2->htab_base);",
"VAR_1(VAR_0, \"HTAB mask = 0x%\"HWADDR_PRIx\"\\n\", VAR_2->htab_mask);"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31,
33,
35,
37
],
[
39
],
[
41,
43,
45,
47
],
[
49
],
[
51
],
[
55
... |
27,010 | static SocketAddress *nbd_build_socket_address(const char *sockpath,
const char *bindto,
const char *port)
{
SocketAddress *saddr;
saddr = g_new0(SocketAddress, 1);
if (sockpath) {
saddr->type = SO... | false | qemu | dfd100f242370886bb6732f70f1f7cbd8eb9fedc | static SocketAddress *nbd_build_socket_address(const char *sockpath,
const char *bindto,
const char *port)
{
SocketAddress *saddr;
saddr = g_new0(SocketAddress, 1);
if (sockpath) {
saddr->type = SO... | {
"code": [],
"line_no": []
} | static SocketAddress *FUNC_0(const char *sockpath,
const char *bindto,
const char *port)
{
SocketAddress *saddr;
saddr = g_new0(SocketAddress, 1);
if (sockpath) {
saddr->type = SOCKET_ADDRESS_KIND_... | [
"static SocketAddress *FUNC_0(const char *sockpath,\nconst char *bindto,\nconst char *port)\n{",
"SocketAddress *saddr;",
"saddr = g_new0(SocketAddress, 1);",
"if (sockpath) {",
"saddr->type = SOCKET_ADDRESS_KIND_UNIX;",
"saddr->u.q_unix.data = g_new0(UnixSocketAddress, 1);",
"saddr->u.q_unix.data->path... | [
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
],
[
47
... |
27,011 | static void select_vgahw (const char *p)
{
const char *opts;
assert(vga_interface_type == VGA_NONE);
if (strstart(p, "std", &opts)) {
if (vga_available()) {
vga_interface_type = VGA_STD;
} else {
error_report("standard VGA not available");
exit(... | false | qemu | 8c9a2b71de67742b40870da22abeccab57c81924 | static void select_vgahw (const char *p)
{
const char *opts;
assert(vga_interface_type == VGA_NONE);
if (strstart(p, "std", &opts)) {
if (vga_available()) {
vga_interface_type = VGA_STD;
} else {
error_report("standard VGA not available");
exit(... | {
"code": [],
"line_no": []
} | static void FUNC_0 (const char *VAR_0)
{
const char *VAR_1;
assert(vga_interface_type == VGA_NONE);
if (strstart(VAR_0, "std", &VAR_1)) {
if (vga_available()) {
vga_interface_type = VGA_STD;
} else {
error_report("standard VGA not available");
e... | [
"static void FUNC_0 (const char *VAR_0)\n{",
"const char *VAR_1;",
"assert(vga_interface_type == VGA_NONE);",
"if (strstart(VAR_0, \"std\", &VAR_1)) {",
"if (vga_available()) {",
"vga_interface_type = VGA_STD;",
"} else {",
"error_report(\"standard VGA not available\");",
"exit(1);",
"}",
"} els... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
27,012 | static target_ulong h_resize_hpt_commit(PowerPCCPU *cpu,
sPAPRMachineState *spapr,
target_ulong opcode,
target_ulong *args)
{
target_ulong flags = args[0];
target_ulong shift = args[1];
... | false | qemu | 1ec26c757d5996468afcc0dced4fad04139574b3 | static target_ulong h_resize_hpt_commit(PowerPCCPU *cpu,
sPAPRMachineState *spapr,
target_ulong opcode,
target_ulong *args)
{
target_ulong flags = args[0];
target_ulong shift = args[1];
... | {
"code": [],
"line_no": []
} | static target_ulong FUNC_0(PowerPCCPU *cpu,
sPAPRMachineState *spapr,
target_ulong opcode,
target_ulong *args)
{
target_ulong flags = args[0];
target_ulong shift = args[1];
sPAPRPen... | [
"static target_ulong FUNC_0(PowerPCCPU *cpu,\nsPAPRMachineState *spapr,\ntarget_ulong opcode,\ntarget_ulong *args)\n{",
"target_ulong flags = args[0];",
"target_ulong shift = args[1];",
"sPAPRPendingHPT *pending = spapr->pending_hpt;",
"int VAR_0;",
"size_t newsize;",
"if (spapr->resize_hpt == SPAPR_RES... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
],
[... |
27,013 | static inline void migration_bitmap_set_dirty(MemoryRegion *mr, int length)
{
ram_addr_t addr;
for (addr = 0; addr < length; addr += TARGET_PAGE_SIZE) {
if (!memory_region_get_dirty(mr, addr, TARGET_PAGE_SIZE,
DIRTY_MEMORY_MIGRATION)) {
memory_reg... | false | qemu | c6bf8e0e0cf04b40a8a22426e00ebbd727331d8b | static inline void migration_bitmap_set_dirty(MemoryRegion *mr, int length)
{
ram_addr_t addr;
for (addr = 0; addr < length; addr += TARGET_PAGE_SIZE) {
if (!memory_region_get_dirty(mr, addr, TARGET_PAGE_SIZE,
DIRTY_MEMORY_MIGRATION)) {
memory_reg... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(MemoryRegion *VAR_0, int VAR_1)
{
ram_addr_t addr;
for (addr = 0; addr < VAR_1; addr += TARGET_PAGE_SIZE) {
if (!memory_region_get_dirty(VAR_0, addr, TARGET_PAGE_SIZE,
DIRTY_MEMORY_MIGRATION)) {
memory_region_set_dirty(VA... | [
"static inline void FUNC_0(MemoryRegion *VAR_0, int VAR_1)\n{",
"ram_addr_t addr;",
"for (addr = 0; addr < VAR_1; addr += TARGET_PAGE_SIZE) {",
"if (!memory_region_get_dirty(VAR_0, addr, TARGET_PAGE_SIZE,\nDIRTY_MEMORY_MIGRATION)) {",
"memory_region_set_dirty(VAR_0, addr, TARGET_PAGE_SIZE);",
"}",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
27,014 | static int piix3_pre_save(void *opaque)
{
int i;
PIIX3State *piix3 = opaque;
for (i = 0; i < ARRAY_SIZE(piix3->pci_irq_levels_vmstate); i++) {
piix3->pci_irq_levels_vmstate[i] =
pci_bus_get_irq_level(piix3->dev.bus, i);
}
return 0;
}
| false | qemu | fd56e0612b6454a282fa6a953fdb09281a98c589 | static int piix3_pre_save(void *opaque)
{
int i;
PIIX3State *piix3 = opaque;
for (i = 0; i < ARRAY_SIZE(piix3->pci_irq_levels_vmstate); i++) {
piix3->pci_irq_levels_vmstate[i] =
pci_bus_get_irq_level(piix3->dev.bus, i);
}
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0)
{
int VAR_1;
PIIX3State *piix3 = VAR_0;
for (VAR_1 = 0; VAR_1 < ARRAY_SIZE(piix3->pci_irq_levels_vmstate); VAR_1++) {
piix3->pci_irq_levels_vmstate[VAR_1] =
pci_bus_get_irq_level(piix3->dev.bus, VAR_1);
}
return 0;
}
| [
"static int FUNC_0(void *VAR_0)\n{",
"int VAR_1;",
"PIIX3State *piix3 = VAR_0;",
"for (VAR_1 = 0; VAR_1 < ARRAY_SIZE(piix3->pci_irq_levels_vmstate); VAR_1++) {",
"piix3->pci_irq_levels_vmstate[VAR_1] =\npci_bus_get_irq_level(piix3->dev.bus, VAR_1);",
"}",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
21
],
[
23
]
] |
27,015 | static void send_qmp_error_event(BlockDriverState *bs,
BlockErrorAction action,
bool is_read, int error)
{
IoOperationType optype;
optype = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
qapi_event_send_block_io_error(bdr... | false | qemu | 61007b316cd71ee7333ff7a0a749a8949527575f | static void send_qmp_error_event(BlockDriverState *bs,
BlockErrorAction action,
bool is_read, int error)
{
IoOperationType optype;
optype = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
qapi_event_send_block_io_error(bdr... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0,
BlockErrorAction VAR_1,
bool VAR_2, int VAR_3)
{
IoOperationType optype;
optype = VAR_2 ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
qapi_event_send_block_io_error(bdrv_get_device_nam... | [
"static void FUNC_0(BlockDriverState *VAR_0,\nBlockErrorAction VAR_1,\nbool VAR_2, int VAR_3)\n{",
"IoOperationType optype;",
"optype = VAR_2 ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;",
"qapi_event_send_block_io_error(bdrv_get_device_name(VAR_0), optype, VAR_1,\nbdrv_iostatus_is_enabled(VAR_0),\nVAR... | [
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15,
17,
19,
21
],
[
23
]
] |
27,016 | static int expand(AVFilterContext *ctx, double *pz, int nb, double *coeffs)
{
int i;
coeffs[0] = 1.0;
coeffs[1] = 0.0;
for (i = 0; i < nb; i++) {
coeffs[2 * (i + 1) ] = 0.0;
coeffs[2 * (i + 1) + 1] = 0.0;
}
for (i = 0; i < nb; i++)
multiply(pz[2 * i], p... | false | FFmpeg | 205046420d5a4d389adb705538df3d6158be1fdb | static int expand(AVFilterContext *ctx, double *pz, int nb, double *coeffs)
{
int i;
coeffs[0] = 1.0;
coeffs[1] = 0.0;
for (i = 0; i < nb; i++) {
coeffs[2 * (i + 1) ] = 0.0;
coeffs[2 * (i + 1) + 1] = 0.0;
}
for (i = 0; i < nb; i++)
multiply(pz[2 * i], p... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFilterContext *VAR_0, double *VAR_1, int VAR_2, double *VAR_3)
{
int VAR_4;
VAR_3[0] = 1.0;
VAR_3[1] = 0.0;
for (VAR_4 = 0; VAR_4 < VAR_2; VAR_4++) {
VAR_3[2 * (VAR_4 + 1) ] = 0.0;
VAR_3[2 * (VAR_4 + 1) + 1] = 0.0;
}
for (VAR_4 = 0; VAR_4 < V... | [
"static int FUNC_0(AVFilterContext *VAR_0, double *VAR_1, int VAR_2, double *VAR_3)\n{",
"int VAR_4;",
"VAR_3[0] = 1.0;",
"VAR_3[1] = 0.0;",
"for (VAR_4 = 0; VAR_4 < VAR_2; VAR_4++) {",
"VAR_3[2 * (VAR_4 + 1) ] = 0.0;",
"VAR_3[2 * (VAR_4 + 1) + 1] = 0.0;",
"}",
"for (VAR_4 = 0; VAR_4 < VAR_2; VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
]
] |
27,017 | static int vnc_display_get_address(const char *addrstr,
bool websocket,
bool reverse,
int displaynum,
int to,
bool has_ipv4,
... | false | qemu | bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884 | static int vnc_display_get_address(const char *addrstr,
bool websocket,
bool reverse,
int displaynum,
int to,
bool has_ipv4,
... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0,
bool VAR_1,
bool VAR_2,
int VAR_3,
int VAR_4,
bool VAR_5,
bool VAR_... | [
"static int FUNC_0(const char *VAR_0,\nbool VAR_1,\nbool VAR_2,\nint VAR_3,\nint VAR_4,\nbool VAR_5,\nbool VAR_6,\nbool VAR_7,\nbool VAR_8,\nSocketAddressLegacy **VAR_9,\nError **VAR_10)\n{",
"int VAR_11 = -1;",
"SocketAddressLegacy *addr = NULL;",
"addr = g_new0(SocketAddressLegacy, 1);",
"if (strncmp(VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11,
13,
15,
17,
19,
21,
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57
],
[
59
... |
27,018 | static int64_t ffm_seek1(AVFormatContext *s, int64_t pos1)
{
FFMContext *ffm = s->priv_data;
AVIOContext *pb = s->pb;
int64_t pos;
pos = FFMIN(pos1, ffm->file_size - FFM_PACKET_SIZE);
pos = FFMAX(pos, FFM_PACKET_SIZE);
av_dlog(s, "seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos);
retu... | false | FFmpeg | 229843aa359ae0c9519977d7fa952688db63f559 | static int64_t ffm_seek1(AVFormatContext *s, int64_t pos1)
{
FFMContext *ffm = s->priv_data;
AVIOContext *pb = s->pb;
int64_t pos;
pos = FFMIN(pos1, ffm->file_size - FFM_PACKET_SIZE);
pos = FFMAX(pos, FFM_PACKET_SIZE);
av_dlog(s, "seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos);
retu... | {
"code": [],
"line_no": []
} | static int64_t FUNC_0(AVFormatContext *s, int64_t pos1)
{
FFMContext *ffm = s->priv_data;
AVIOContext *pb = s->pb;
int64_t pos;
pos = FFMIN(pos1, ffm->file_size - FFM_PACKET_SIZE);
pos = FFMAX(pos, FFM_PACKET_SIZE);
av_dlog(s, "seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos);
return ... | [
"static int64_t FUNC_0(AVFormatContext *s, int64_t pos1)\n{",
"FFMContext *ffm = s->priv_data;",
"AVIOContext *pb = s->pb;",
"int64_t pos;",
"pos = FFMIN(pos1, ffm->file_size - FFM_PACKET_SIZE);",
"pos = FFMAX(pos, FFM_PACKET_SIZE);",
"av_dlog(s, \"seek to %\"PRIx64\" -> %\"PRIx64\"\\n\", pos1, pos);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
27,019 | static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
AVStream *st;
int id;
st = av_new_stream(s, 0);
if (!st)
return AVERROR_NOMEM;
if (ap) {
id = s->iformat->value;
if (id == CODEC_ID_RAWVIDEO) {
st->codec->codec_type = CODEC_TYPE_... | false | FFmpeg | c04c3282b4334ff64cfd69d40fea010602e830fd | static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
AVStream *st;
int id;
st = av_new_stream(s, 0);
if (!st)
return AVERROR_NOMEM;
if (ap) {
id = s->iformat->value;
if (id == CODEC_ID_RAWVIDEO) {
st->codec->codec_type = CODEC_TYPE_... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1)
{
AVStream *st;
int VAR_2;
st = av_new_stream(VAR_0, 0);
if (!st)
return AVERROR_NOMEM;
if (VAR_1) {
VAR_2 = VAR_0->iformat->value;
if (VAR_2 == CODEC_ID_RAWVIDEO) {
st->codec->codec_... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1)\n{",
"AVStream *st;",
"int VAR_2;",
"st = av_new_stream(VAR_0, 0);",
"if (!st)\nreturn AVERROR_NOMEM;",
"if (VAR_1) {",
"VAR_2 = VAR_0->iformat->value;",
"if (VAR_2 == CODEC_ID_RAWVIDEO) {",
"st->codec->codec_type = CODEC_TYPE_VID... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47... |
27,020 | static size_t curl_size_cb(void *ptr, size_t size, size_t nmemb, void *opaque)
{
CURLState *s = ((CURLState*)opaque);
size_t realsize = size * nmemb;
size_t fsize;
if(sscanf(ptr, "Content-Length: %zd", &fsize) == 1) {
s->s->len = fsize;
}
return realsize;
}
| true | qemu | 3494d650273e619606c6cb2c38aa9b8b7bed98e2 | static size_t curl_size_cb(void *ptr, size_t size, size_t nmemb, void *opaque)
{
CURLState *s = ((CURLState*)opaque);
size_t realsize = size * nmemb;
size_t fsize;
if(sscanf(ptr, "Content-Length: %zd", &fsize) == 1) {
s->s->len = fsize;
}
return realsize;
}
| {
"code": [
"static size_t curl_size_cb(void *ptr, size_t size, size_t nmemb, void *opaque)",
" CURLState *s = ((CURLState*)opaque);",
" size_t fsize;",
" if(sscanf(ptr, \"Content-Length: %zd\", &fsize) == 1) {",
" s->s->len = fsize;"
],
"line_no": [
1,
5,
9,
13... | static size_t FUNC_0(void *ptr, size_t size, size_t nmemb, void *opaque)
{
CURLState *s = ((CURLState*)opaque);
size_t realsize = size * nmemb;
size_t fsize;
if(sscanf(ptr, "Content-Length: %zd", &fsize) == 1) {
s->s->len = fsize;
}
return realsize;
}
| [
"static size_t FUNC_0(void *ptr, size_t size, size_t nmemb, void *opaque)\n{",
"CURLState *s = ((CURLState*)opaque);",
"size_t realsize = size * nmemb;",
"size_t fsize;",
"if(sscanf(ptr, \"Content-Length: %zd\", &fsize) == 1) {",
"s->s->len = fsize;",
"}",
"return realsize;",
"}"
] | [
1,
1,
0,
1,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
27,022 | static av_cold int twin_decode_close(AVCodecContext *avctx)
{
TwinContext *tctx = avctx->priv_data;
int i;
for (i = 0; i < 3; i++) {
ff_mdct_end(&tctx->mdct_ctx[i]);
av_free(tctx->cos_tabs[i]);
}
av_free(tctx->curr_frame);
av_free(tctx->spectrum);
av_free(tctx... | true | FFmpeg | a8a6da4a0e059b2aab66627a96b63c3632c477c2 | static av_cold int twin_decode_close(AVCodecContext *avctx)
{
TwinContext *tctx = avctx->priv_data;
int i;
for (i = 0; i < 3; i++) {
ff_mdct_end(&tctx->mdct_ctx[i]);
av_free(tctx->cos_tabs[i]);
}
av_free(tctx->curr_frame);
av_free(tctx->spectrum);
av_free(tctx... | {
"code": [
"static av_cold int twin_decode_close(AVCodecContext *avctx)",
" TwinContext *tctx = avctx->priv_data;",
" int i;",
" for (i = 0; i < 3; i++) {",
" ff_mdct_end(&tctx->mdct_ctx[i]);",
" av_free(tctx->cos_tabs[i]);",
" av_free(tctx->curr_frame);",
" ... | static av_cold int FUNC_0(AVCodecContext *avctx)
{
TwinContext *tctx = avctx->priv_data;
int VAR_0;
for (VAR_0 = 0; VAR_0 < 3; VAR_0++) {
ff_mdct_end(&tctx->mdct_ctx[VAR_0]);
av_free(tctx->cos_tabs[VAR_0]);
}
av_free(tctx->curr_frame);
av_free(tctx->spectrum);
... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"TwinContext *tctx = avctx->priv_data;",
"int VAR_0;",
"for (VAR_0 = 0; VAR_0 < 3; VAR_0++) {",
"ff_mdct_end(&tctx->mdct_ctx[VAR_0]);",
"av_free(tctx->cos_tabs[VAR_0]);",
"}",
"av_free(tctx->curr_frame);",
"av_free(tctx->spectrum);",
"av_free(... | [
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
]
] |
27,023 | static void fw_cfg_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = fw_cfg_realize;
dc->no_user = 1;
dc->reset = fw_cfg_reset;
dc->vmsd = &vmstate_fw_cfg;
dc->props = fw_cfg_properties;
}
| true | qemu | efec3dd631d94160288392721a5f9c39e50fb2bc | static void fw_cfg_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = fw_cfg_realize;
dc->no_user = 1;
dc->reset = fw_cfg_reset;
dc->vmsd = &vmstate_fw_cfg;
dc->props = fw_cfg_properties;
}
| {
"code": [
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;"... | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
dc->realize = fw_cfg_realize;
dc->no_user = 1;
dc->reset = fw_cfg_reset;
dc->vmsd = &vmstate_fw_cfg;
dc->props = fw_cfg_properties;
}
| [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"dc->realize = fw_cfg_realize;",
"dc->no_user = 1;",
"dc->reset = fw_cfg_reset;",
"dc->vmsd = &vmstate_fw_cfg;",
"dc->props = fw_cfg_properties;",
"}"
] | [
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
27,024 | static target_ulong h_read(PowerPCCPU *cpu, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
CPUPPCState *env = &cpu->env;
target_ulong flags = args[0];
target_ulong pte_index = args[1];
uint8_t *hpte;
int i, ridx, n_entries = 1;
if ((pte_i... | true | qemu | f3c75d42adbba553eaf218a832d4fbea32c8f7b8 | static target_ulong h_read(PowerPCCPU *cpu, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
CPUPPCState *env = &cpu->env;
target_ulong flags = args[0];
target_ulong pte_index = args[1];
uint8_t *hpte;
int i, ridx, n_entries = 1;
if ((pte_i... | {
"code": [
" if ((pte_index * HASH_PTE_SIZE_64) & ~env->htab_mask) {",
" if ((pte_index * HASH_PTE_SIZE_64) & ~env->htab_mask) {",
" if ((pte_index * HASH_PTE_SIZE_64) & ~env->htab_mask) {"
],
"line_no": [
19,
19,
19
]
} | static target_ulong FUNC_0(PowerPCCPU *cpu, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
CPUPPCState *env = &cpu->env;
target_ulong flags = args[0];
target_ulong pte_index = args[1];
uint8_t *hpte;
int VAR_0, VAR_1, VAR_2 = 1;
if ((pte_... | [
"static target_ulong FUNC_0(PowerPCCPU *cpu, sPAPREnvironment *spapr,\ntarget_ulong opcode, target_ulong *args)\n{",
"CPUPPCState *env = &cpu->env;",
"target_ulong flags = args[0];",
"target_ulong pte_index = args[1];",
"uint8_t *hpte;",
"int VAR_0, VAR_1, VAR_2 = 1;",
"if ((pte_index * HASH_PTE_SIZE_64... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
27,027 | static int bdrv_co_do_ioctl(BlockDriverState *bs, int req, void *buf)
{
BlockDriver *drv = bs->drv;
BdrvTrackedRequest tracked_req;
CoroutineIOCompletion co = {
.coroutine = qemu_coroutine_self(),
};
BlockAIOCB *acb;
tracked_request_begin(&tracked_req, bs, 0, 0, BDRV_TRACKED_IO... | true | qemu | c8a9fd80719e63615dac12e3625223fb54aa8430 | static int bdrv_co_do_ioctl(BlockDriverState *bs, int req, void *buf)
{
BlockDriver *drv = bs->drv;
BdrvTrackedRequest tracked_req;
CoroutineIOCompletion co = {
.coroutine = qemu_coroutine_self(),
};
BlockAIOCB *acb;
tracked_request_begin(&tracked_req, bs, 0, 0, BDRV_TRACKED_IO... | {
"code": [
" BdrvIoctlCompletionData *data = g_new(BdrvIoctlCompletionData, 1);",
" data->bh = aio_bh_new(bdrv_get_aio_context(bs),",
" bdrv_ioctl_bh_cb, data);",
" data->co = &co;",
" qemu_bh_schedule(data->bh);"
],
"line_no": [
... | static int FUNC_0(BlockDriverState *VAR_0, int VAR_1, void *VAR_2)
{
BlockDriver *drv = VAR_0->drv;
BdrvTrackedRequest tracked_req;
CoroutineIOCompletion co = {
.coroutine = qemu_coroutine_self(),
};
BlockAIOCB *acb;
tracked_request_begin(&tracked_req, VAR_0, 0, 0, BDRV_TRACKED... | [
"static int FUNC_0(BlockDriverState *VAR_0, int VAR_1, void *VAR_2)\n{",
"BlockDriver *drv = VAR_0->drv;",
"BdrvTrackedRequest tracked_req;",
"CoroutineIOCompletion co = {",
".coroutine = qemu_coroutine_self(),\n};",
"BlockAIOCB *acb;",
"tracked_request_begin(&tracked_req, VAR_0, 0, 0, BDRV_TRACKED_IOCT... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
27,028 | static int asf_read_seek(AVFormatContext *s, int stream_index,
int64_t pts, int flags)
{
ASFContext *asf = s->priv_data;
AVStream *st = s->streams[stream_index];
int64_t pos;
int index;
if (s->packet_size <= 0)
return -1;
/* Try using the protocol... | true | FFmpeg | 0ebb523f072322972ea446616676fff32e9603c6 | static int asf_read_seek(AVFormatContext *s, int stream_index,
int64_t pts, int flags)
{
ASFContext *asf = s->priv_data;
AVStream *st = s->streams[stream_index];
int64_t pos;
int index;
if (s->packet_size <= 0)
return -1;
if (s->pb) {
... | {
"code": [
" int index;",
" asf_build_simple_index(s, stream_index);",
" if ((asf->index_read && st->index_entries)) {"
],
"line_no": [
13,
43,
47
]
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,
int64_t VAR_2, int VAR_3)
{
ASFContext *asf = VAR_0->priv_data;
AVStream *st = VAR_0->streams[VAR_1];
int64_t pos;
int VAR_4;
if (VAR_0->packet_size <= 0)
return -1;
if (VAR_0->pb) {
... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,\nint64_t VAR_2, int VAR_3)\n{",
"ASFContext *asf = VAR_0->priv_data;",
"AVStream *st = VAR_0->streams[VAR_1];",
"int64_t pos;",
"int VAR_4;",
"if (VAR_0->packet_size <= 0)\nreturn -1;",
"if (VAR_0->pb) {",
"int VAR_5 = avio_seek_time(VAR_0->pb, ... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
25
],
[
27
],
[
29,
31
],
[
33,
35
],
[
37
],
[
41,
43
],
[
47
],
[
49
],
[
51
],
[
55
],
[
61
],
[... |
27,029 | void ff_mpeg_unref_picture(MpegEncContext *s, Picture *pic)
{
int off = offsetof(Picture, mb_mean) + sizeof(pic->mb_mean);
pic->tf.f = &pic->f;
/* WM Image / Screen codecs allocate internal buffers with different
* dimensions / colorspaces; ignore user-defined callbacks for these. */
if (s-... | true | FFmpeg | f6774f905fb3cfdc319523ac640be30b14c1bc55 | void ff_mpeg_unref_picture(MpegEncContext *s, Picture *pic)
{
int off = offsetof(Picture, mb_mean) + sizeof(pic->mb_mean);
pic->tf.f = &pic->f;
if (s->codec_id != AV_CODEC_ID_WMV3IMAGE &&
s->codec_id != AV_CODEC_ID_VC1IMAGE &&
s->codec_id != AV_CODEC_ID_MSS2)
ff_thr... | {
"code": [
" pic->tf.f = &pic->f;",
" pic->tf.f = &pic->f;",
" av_frame_unref(&pic->f);"
],
"line_no": [
9,
9,
25
]
} | void FUNC_0(MpegEncContext *VAR_0, Picture *VAR_1)
{
int VAR_2 = offsetof(Picture, mb_mean) + sizeof(VAR_1->mb_mean);
VAR_1->tf.f = &VAR_1->f;
if (VAR_0->codec_id != AV_CODEC_ID_WMV3IMAGE &&
VAR_0->codec_id != AV_CODEC_ID_VC1IMAGE &&
VAR_0->codec_id != AV_CODEC_ID_MSS2)
... | [
"void FUNC_0(MpegEncContext *VAR_0, Picture *VAR_1)\n{",
"int VAR_2 = offsetof(Picture, mb_mean) + sizeof(VAR_1->mb_mean);",
"VAR_1->tf.f = &VAR_1->f;",
"if (VAR_0->codec_id != AV_CODEC_ID_WMV3IMAGE &&\nVAR_0->codec_id != AV_CODEC_ID_VC1IMAGE &&\nVAR_0->codec_id != AV_CODEC_ID_MSS2)\nff_thread_release_buffer... | [
0,
0,
1,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
15,
17,
19,
21
],
[
23,
25
],
[
29
],
[
33,
35
],
[
39
],
[
41
]
] |
27,030 | void nbd_client_new(NBDExport *exp,
QIOChannelSocket *sioc,
QCryptoTLSCreds *tlscreds,
const char *tlsaclname,
void (*close_fn)(NBDClient *))
{
NBDClient *client;
NBDClientNewData *data = g_new(NBDClientNewData, 1);
cl... | true | qemu | 0c9390d978cbf61e8f16c9f580fa96b305c43568 | void nbd_client_new(NBDExport *exp,
QIOChannelSocket *sioc,
QCryptoTLSCreds *tlscreds,
const char *tlsaclname,
void (*close_fn)(NBDClient *))
{
NBDClient *client;
NBDClientNewData *data = g_new(NBDClientNewData, 1);
cl... | {
"code": [
" void (*close_fn)(NBDClient *))",
" client->close = close_fn;"
],
"line_no": [
9,
43
]
} | VAR_5voidVAR_5 VAR_5nbd_client_newVAR_5(VAR_5NBDExportVAR_5 *VAR_5VAR_0VAR_5,
VAR_5QIOChannelSocketVAR_5 *VAR_5VAR_1VAR_5,
VAR_5QCryptoTLSCredsVAR_5 *VAR_5VAR_2VAR_5,
VAR_5constVAR_5 VAR_5charVAR_5 *VAR_5VAR_3VAR_5,
VAR_5voidVAR_5 (*VAR... | [
"VAR_5voidVAR_5 VAR_5nbd_client_newVAR_5(VAR_5NBDExportVAR_5 *VAR_5VAR_0VAR_5,\nVAR_5QIOChannelSocketVAR_5 *VAR_5VAR_1VAR_5,\nVAR_5QCryptoTLSCredsVAR_5 *VAR_5VAR_2VAR_5,\nVAR_5constVAR_5 VAR_5charVAR_5 *VAR_5VAR_3VAR_5,\nVAR_5voidVAR_5 (*VAR_5VAR_4VAR_5)(VAR_5NBDClientVAR_5 *))\n{",
"VAR_5NBDClientVAR_5 *VAR_5cli... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
... |
27,031 | void hbitmap_set(HBitmap *hb, uint64_t start, uint64_t count)
{
/* Compute range in the last layer. */
uint64_t last = start + count - 1;
trace_hbitmap_set(hb, start, count,
start >> hb->granularity, last >> hb->granularity);
start >>= hb->granularity;
last >>= hb->... | true | qemu | 0e321191224c8cd137eef41da3257e096965c3d6 | void hbitmap_set(HBitmap *hb, uint64_t start, uint64_t count)
{
uint64_t last = start + count - 1;
trace_hbitmap_set(hb, start, count,
start >> hb->granularity, last >> hb->granularity);
start >>= hb->granularity;
last >>= hb->granularity;
count = last - start ... | {
"code": [],
"line_no": []
} | void FUNC_0(HBitmap *VAR_0, uint64_t VAR_1, uint64_t VAR_2)
{
uint64_t last = VAR_1 + VAR_2 - 1;
trace_hbitmap_set(VAR_0, VAR_1, VAR_2,
VAR_1 >> VAR_0->granularity, last >> VAR_0->granularity);
VAR_1 >>= VAR_0->granularity;
last >>= VAR_0->granularity;
VAR_2 = ... | [
"void FUNC_0(HBitmap *VAR_0, uint64_t VAR_1, uint64_t VAR_2)\n{",
"uint64_t last = VAR_1 + VAR_2 - 1;",
"trace_hbitmap_set(VAR_0, VAR_1, VAR_2,\nVAR_1 >> VAR_0->granularity, last >> VAR_0->granularity);",
"VAR_1 >>= VAR_0->granularity;",
"last >>= VAR_0->granularity;",
"VAR_2 = last - VAR_1 + 1;",
"VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
21
],
[
26
],
[
28
],
[
30
]
] |
27,032 | static int shorten_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AVFrame *frame = data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
ShortenContext *s = avctx->priv_data;
int i, input_buf_size... | true | FFmpeg | ad22767cb61cdc75541b21154d65fd1ad6351025 | static int shorten_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AVFrame *frame = data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
ShortenContext *s = avctx->priv_data;
int i, input_buf_size... | {
"code": [
" if (s->bitstream_index + s->bitstream_size + buf_size >"
],
"line_no": [
57
]
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
AVFrame *frame = VAR_1;
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
ShortenContext *s = VAR_0->priv_data;
int VAR_6, VAR_7 = 0;
int VAR_8;
... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"AVFrame *frame = VAR_1;",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"ShortenContext *s = VAR_0->priv_data;",
"int VAR_6, VAR_7 = 0;",
"int VAR_8;",
"if (s->max_framesize == 0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
49
],
[
51
... |
27,033 | int64_t ff_lsb2full(StreamContext *stream, int64_t lsb){
int64_t mask = (1<<stream->msb_pts_shift)-1;
int64_t delta= stream->last_pts - mask/2;
return ((lsb - delta)&mask) + delta;
}
| true | FFmpeg | de6c150444159a26fe2555089d384ddd2d6459aa | int64_t ff_lsb2full(StreamContext *stream, int64_t lsb){
int64_t mask = (1<<stream->msb_pts_shift)-1;
int64_t delta= stream->last_pts - mask/2;
return ((lsb - delta)&mask) + delta;
}
| {
"code": [
" int64_t mask = (1<<stream->msb_pts_shift)-1;"
],
"line_no": [
3
]
} | int64_t FUNC_0(StreamContext *stream, int64_t lsb){
int64_t mask = (1<<stream->msb_pts_shift)-1;
int64_t delta= stream->last_pts - mask/2;
return ((lsb - delta)&mask) + delta;
}
| [
"int64_t FUNC_0(StreamContext *stream, int64_t lsb){",
"int64_t mask = (1<<stream->msb_pts_shift)-1;",
"int64_t delta= stream->last_pts - mask/2;",
"return ((lsb - delta)&mask) + delta;",
"}"
] | [
0,
1,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
]
] |
27,034 | long do_sigreturn(CPUAlphaState *env)
{
struct target_sigcontext *sc;
abi_ulong sc_addr = env->ir[IR_A0];
target_sigset_t target_set;
sigset_t set;
if (!lock_user_struct(VERIFY_READ, sc, sc_addr, 1)) {
goto badframe;
}
target_sigemptyset(&target_set);
if (__get_user... | true | qemu | 016d2e1dfa21b64a524d3629fdd317d4c25bc3b8 | long do_sigreturn(CPUAlphaState *env)
{
struct target_sigcontext *sc;
abi_ulong sc_addr = env->ir[IR_A0];
target_sigset_t target_set;
sigset_t set;
if (!lock_user_struct(VERIFY_READ, sc, sc_addr, 1)) {
goto badframe;
}
target_sigemptyset(&target_set);
if (__get_user... | {
"code": [
" goto badframe;",
" goto badframe;",
" goto badframe;",
" goto badframe;",
" if (restore_sigcontext(env, sc)) {",
" goto badframe;",
" goto badframe;"
],
"line_no": [
17,
17,
17,
17,
39,
17,
17
]
} | long FUNC_0(CPUAlphaState *VAR_0)
{
struct target_sigcontext *VAR_1;
abi_ulong sc_addr = VAR_0->ir[IR_A0];
target_sigset_t target_set;
sigset_t set;
if (!lock_user_struct(VERIFY_READ, VAR_1, sc_addr, 1)) {
goto badframe;
}
target_sigemptyset(&target_set);
if (__get_... | [
"long FUNC_0(CPUAlphaState *VAR_0)\n{",
"struct target_sigcontext *VAR_1;",
"abi_ulong sc_addr = VAR_0->ir[IR_A0];",
"target_sigset_t target_set;",
"sigset_t set;",
"if (!lock_user_struct(VERIFY_READ, VAR_1, sc_addr, 1)) {",
"goto badframe;",
"}",
"target_sigemptyset(&target_set);",
"if (__get_use... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51,... |
27,035 | static void coroutine_fn wait_serialising_requests(BdrvTrackedRequest *self)
{
BlockDriverState *bs = self->bs;
BdrvTrackedRequest *req;
bool retry;
if (!bs->serialising_in_flight) {
return;
}
do {
retry = false;
QLIST_FOREACH(req, &bs->tracked_requests, lis... | true | qemu | 6460440f34c709461b84375cfd8a86b27d433225 | static void coroutine_fn wait_serialising_requests(BdrvTrackedRequest *self)
{
BlockDriverState *bs = self->bs;
BdrvTrackedRequest *req;
bool retry;
if (!bs->serialising_in_flight) {
return;
}
do {
retry = false;
QLIST_FOREACH(req, &bs->tracked_requests, lis... | {
"code": [
" qemu_co_queue_wait(&req->wait_queue);",
" retry = true;",
" break;"
],
"line_no": [
51,
53,
55
]
} | static void VAR_0 wait_serialising_requests(BdrvTrackedRequest *self)
{
BlockDriverState *bs = self->bs;
BdrvTrackedRequest *req;
bool retry;
if (!bs->serialising_in_flight) {
return;
}
do {
retry = false;
QLIST_FOREACH(req, &bs->tracked_requests, list) {
... | [
"static void VAR_0 wait_serialising_requests(BdrvTrackedRequest *self)\n{",
"BlockDriverState *bs = self->bs;",
"BdrvTrackedRequest *req;",
"bool retry;",
"if (!bs->serialising_in_flight) {",
"return;",
"}",
"do {",
"retry = false;",
"QLIST_FOREACH(req, &bs->tracked_requests, list) {",
"if (req ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35,
37
],
[
47
],
[
51
],
[
53
],
[
55
],
[
57
... |
27,037 | void qemu_spice_init(void)
{
QemuOpts *opts = QTAILQ_FIRST(&qemu_spice_opts.head);
const char *password, *str, *x509_dir, *addr,
*x509_key_password = NULL,
*x509_dh_file = NULL,
*tls_ciphers = NULL;
char *x509_key_file = NULL,
*x509_cert_file = NULL,
*x509_ca... | true | qemu | 48b3ed0a68b8c1b288b4e15743ea39b7b5b318c3 | void qemu_spice_init(void)
{
QemuOpts *opts = QTAILQ_FIRST(&qemu_spice_opts.head);
const char *password, *str, *x509_dir, *addr,
*x509_key_password = NULL,
*x509_dh_file = NULL,
*tls_ciphers = NULL;
char *x509_key_file = NULL,
*x509_cert_file = NULL,
*x509_ca... | {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
QemuOpts *opts = QTAILQ_FIRST(&qemu_spice_opts.head);
const char *VAR_0, *VAR_1, *VAR_2, *VAR_3,
*VAR_4 = NULL,
*VAR_5 = NULL,
*VAR_6 = NULL;
char *VAR_7 = NULL,
*VAR_8 = NULL,
*VAR_9 = NULL;
int VAR_10, VAR_11, VAR_12, VAR_13;
s... | [
"void FUNC_0(void)\n{",
"QemuOpts *opts = QTAILQ_FIRST(&qemu_spice_opts.head);",
"const char *VAR_0, *VAR_1, *VAR_2, *VAR_3,\n*VAR_4 = NULL,\n*VAR_5 = NULL,\n*VAR_6 = NULL;",
"char *VAR_7 = NULL,\n*VAR_8 = NULL,\n*VAR_9 = NULL;",
"int VAR_10, VAR_11, VAR_12, VAR_13;",
"spice_image_compression_t compressio... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7,
9,
11,
13
],
[
15,
17,
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
34
],
[
36
],
[
38
],
[
40
],
[
43
],
[
47
],
[
49
],
[
51
],
[... |
27,038 | void do_store_601_batu (int nr)
{
do_store_ibatu(env, nr, T0);
env->DBAT[0][nr] = env->IBAT[0][nr];
env->DBAT[1][nr] = env->IBAT[1][nr];
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | void do_store_601_batu (int nr)
{
do_store_ibatu(env, nr, T0);
env->DBAT[0][nr] = env->IBAT[0][nr];
env->DBAT[1][nr] = env->IBAT[1][nr];
}
| {
"code": [
" do_store_ibatu(env, nr, T0);"
],
"line_no": [
5
]
} | void FUNC_0 (int VAR_0)
{
do_store_ibatu(env, VAR_0, T0);
env->DBAT[0][VAR_0] = env->IBAT[0][VAR_0];
env->DBAT[1][VAR_0] = env->IBAT[1][VAR_0];
}
| [
"void FUNC_0 (int VAR_0)\n{",
"do_store_ibatu(env, VAR_0, T0);",
"env->DBAT[0][VAR_0] = env->IBAT[0][VAR_0];",
"env->DBAT[1][VAR_0] = env->IBAT[1][VAR_0];",
"}"
] | [
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
27,039 | static void dp8393x_realize(DeviceState *dev, Error **errp)
{
dp8393xState *s = DP8393X(dev);
int i, checksum;
uint8_t *prom;
address_space_init(&s->as, s->dma_mr, "dp8393x");
memory_region_init_io(&s->mmio, OBJECT(dev), &dp8393x_ops, s,
"dp8393x-regs", 0x40 << s->... | true | qemu | 52579c681cb12bf64de793e85edc50d990f4d42f | static void dp8393x_realize(DeviceState *dev, Error **errp)
{
dp8393xState *s = DP8393X(dev);
int i, checksum;
uint8_t *prom;
address_space_init(&s->as, s->dma_mr, "dp8393x");
memory_region_init_io(&s->mmio, OBJECT(dev), &dp8393x_ops, s,
"dp8393x-regs", 0x40 << s->... | {
"code": [
" memory_region_init_rom_device(&s->prom, OBJECT(dev), NULL, NULL,",
" \"dp8393x-prom\", SONIC_PROM_SIZE, NULL);"
],
"line_no": [
35,
37
]
} | static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{
dp8393xState *s = DP8393X(VAR_0);
int VAR_2, VAR_3;
uint8_t *prom;
address_space_init(&s->as, s->dma_mr, "dp8393x");
memory_region_init_io(&s->mmio, OBJECT(VAR_0), &dp8393x_ops, s,
"dp8393x-regs", 0x40 << s->i... | [
"static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{",
"dp8393xState *s = DP8393X(VAR_0);",
"int VAR_2, VAR_3;",
"uint8_t *prom;",
"address_space_init(&s->as, s->dma_mr, \"dp8393x\");",
"memory_region_init_io(&s->mmio, OBJECT(VAR_0), &dp8393x_ops, s,\n\"dp8393x-regs\", 0x40 << s->it_shift);",
"s->n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
21,
23
],
[
25
],
[
29
],
[
31
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
27,040 | void bdrv_round_to_clusters(BlockDriverState *bs,
int64_t offset, unsigned int bytes,
int64_t *cluster_offset,
unsigned int *cluster_bytes)
{
BlockDriverInfo bdi;
if (bdrv_get_info(bs, &bdi) < 0 || bdi.cluster_size == 0)... | true | qemu | 7cfd527525a7d6b1c904890a6b84c1227846415e | void bdrv_round_to_clusters(BlockDriverState *bs,
int64_t offset, unsigned int bytes,
int64_t *cluster_offset,
unsigned int *cluster_bytes)
{
BlockDriverInfo bdi;
if (bdrv_get_info(bs, &bdi) < 0 || bdi.cluster_size == 0)... | {
"code": [
" int64_t offset, unsigned int bytes,",
" unsigned int *cluster_bytes)",
" int64_t offset, unsigned int bytes,"
],
"line_no": [
3,
7,
3
]
} | void FUNC_0(BlockDriverState *VAR_0,
int64_t VAR_1, unsigned int VAR_2,
int64_t *VAR_3,
unsigned int *VAR_4)
{
BlockDriverInfo bdi;
if (bdrv_get_info(VAR_0, &bdi) < 0 || bdi.cluster_size == 0) {
*VAR_3 = VAR_1;
... | [
"void FUNC_0(BlockDriverState *VAR_0,\nint64_t VAR_1, unsigned int VAR_2,\nint64_t *VAR_3,\nunsigned int *VAR_4)\n{",
"BlockDriverInfo bdi;",
"if (bdrv_get_info(VAR_0, &bdi) < 0 || bdi.cluster_size == 0) {",
"*VAR_3 = VAR_1;",
"*VAR_4 = VAR_2;",
"} else {",
"int64_t c = bdi.cluster_size;",
"*VAR_3 = Q... | [
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
],
[
31
]
] |
27,041 | int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush,
int (*get_packet)(AVFormatContext *, AVPacket *, AVPacket *, int),
int (*compare_ts)(AVFormatContext *, AVPacket *, AVPacket *))
{
int i;
if (pkt) {
AVStre... | false | FFmpeg | 324ff59444ff5470bb325ff1e2be7c4b054fc944 | int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush,
int (*get_packet)(AVFormatContext *, AVPacket *, AVPacket *, int),
int (*compare_ts)(AVFormatContext *, AVPacket *, AVPacket *))
{
int i;
if (pkt) {
AVStre... | {
"code": [],
"line_no": []
} | VAR_7intVAR_7 VAR_7ff_audio_rechunk_interleaveVAR_7(VAR_7AVFormatContextVAR_7 *VAR_7VAR_0VAR_7, VAR_7AVPacketVAR_7 *VAR_7VAR_1VAR_7, VAR_7AVPacketVAR_7 *VAR_7VAR_2VAR_7, VAR_7intVAR_7 VAR_7VAR_3VAR_7,
VAR_7intVAR_7 (*VAR_7VAR_4VAR_7)(VAR_7AVFormatContextVAR_7 *, VAR_7AVPacketVAR_7 *, VAR_7AVPac... | [
"VAR_7intVAR_7 VAR_7ff_audio_rechunk_interleaveVAR_7(VAR_7AVFormatContextVAR_7 *VAR_7VAR_0VAR_7, VAR_7AVPacketVAR_7 *VAR_7VAR_1VAR_7, VAR_7AVPacketVAR_7 *VAR_7VAR_2VAR_7, VAR_7intVAR_7 VAR_7VAR_3VAR_7,\nVAR_7intVAR_7 (*VAR_7VAR_4VAR_7)(VAR_7AVFormatContextVAR_7 *, VAR_7AVPacketVAR_7 *, VAR_7AVPacketVAR_7 *, VAR_7in... | [
0,
0,
0,
0,
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
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
27,042 | static av_cold int init_decoder(AVCodecContext *avctx)
{
avctx->pix_fmt = PIX_FMT_PAL8;
return 0;
}
| false | FFmpeg | d150a147dac67faeaf6b1f25a523ae330168ee1e | static av_cold int init_decoder(AVCodecContext *avctx)
{
avctx->pix_fmt = PIX_FMT_PAL8;
return 0;
}
| {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
avctx->pix_fmt = PIX_FMT_PAL8;
return 0;
}
| [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"avctx->pix_fmt = PIX_FMT_PAL8;",
"return 0;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
27,043 | static void opt_output_file(const char *filename)
{
AVFormatContext *oc;
int err, use_video, use_audio, use_subtitle;
int input_has_video, input_has_audio, input_has_subtitle;
AVFormatParameters params, *ap = ¶ms;
AVOutputFormat *file_oformat;
if (!strcmp(filename, "-"))
fi... | false | FFmpeg | 55815edca038997ec283569a192a3eca7f2143bc | static void opt_output_file(const char *filename)
{
AVFormatContext *oc;
int err, use_video, use_audio, use_subtitle;
int input_has_video, input_has_audio, input_has_subtitle;
AVFormatParameters params, *ap = ¶ms;
AVOutputFormat *file_oformat;
if (!strcmp(filename, "-"))
fi... | {
"code": [],
"line_no": []
} | static void FUNC_0(const char *VAR_0)
{
AVFormatContext *oc;
int VAR_8, VAR_2, VAR_3, VAR_4;
int VAR_5, VAR_6, VAR_7;
AVFormatParameters params, *ap = ¶ms;
AVOutputFormat *file_oformat;
if (!strcmp(VAR_0, "-"))
VAR_0 = "pipe:";
oc = avformat_alloc_context();
if ... | [
"static void FUNC_0(const char *VAR_0)\n{",
"AVFormatContext *oc;",
"int VAR_8, VAR_2, VAR_3, VAR_4;",
"int VAR_5, VAR_6, VAR_7;",
"AVFormatParameters params, *ap = ¶ms;",
"AVOutputFormat *file_oformat;",
"if (!strcmp(VAR_0, \"-\"))\nVAR_0 = \"pipe:\";",
"oc = avformat_alloc_context();",
"if (!o... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
27,044 | static uint32_t bonito_sbridge_pciaddr(void *opaque, hwaddr addr)
{
PCIBonitoState *s = opaque;
PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost);
uint32_t cfgaddr;
uint32_t idsel;
uint32_t devno;
uint32_t funno;
uint32_t regno;
uint32_t pciaddr;
/* support type0 pci config... | false | qemu | 786a4ea82ec9c87e3a895cf41081029b285a5fe5 | static uint32_t bonito_sbridge_pciaddr(void *opaque, hwaddr addr)
{
PCIBonitoState *s = opaque;
PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost);
uint32_t cfgaddr;
uint32_t idsel;
uint32_t devno;
uint32_t funno;
uint32_t regno;
uint32_t pciaddr;
if ((s->regs[BONITO_P... | {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(void *opaque, hwaddr addr)
{
PCIBonitoState *s = opaque;
PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost);
uint32_t cfgaddr;
uint32_t idsel;
uint32_t devno;
uint32_t funno;
uint32_t regno;
uint32_t pciaddr;
if ((s->regs[BONITO_PCIMAP_CFG] & 0x1... | [
"static uint32_t FUNC_0(void *opaque, hwaddr addr)\n{",
"PCIBonitoState *s = opaque;",
"PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost);",
"uint32_t cfgaddr;",
"uint32_t idsel;",
"uint32_t devno;",
"uint32_t funno;",
"uint32_t regno;",
"uint32_t pciaddr;",
"if ((s->regs[BONITO_PCIMAP_CFG] & 0x1000... | [
0,
0,
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
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51,... |
27,047 | const char *drive_get_serial(BlockDriverState *bdrv)
{
DriveInfo *dinfo;
TAILQ_FOREACH(dinfo, &drives, next) {
if (dinfo->bdrv == bdrv)
return dinfo->serial;
}
return "\0";
}
| false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | const char *drive_get_serial(BlockDriverState *bdrv)
{
DriveInfo *dinfo;
TAILQ_FOREACH(dinfo, &drives, next) {
if (dinfo->bdrv == bdrv)
return dinfo->serial;
}
return "\0";
}
| {
"code": [],
"line_no": []
} | const char *FUNC_0(BlockDriverState *VAR_0)
{
DriveInfo *dinfo;
TAILQ_FOREACH(dinfo, &drives, next) {
if (dinfo->VAR_0 == VAR_0)
return dinfo->serial;
}
return "\0";
}
| [
"const char *FUNC_0(BlockDriverState *VAR_0)\n{",
"DriveInfo *dinfo;",
"TAILQ_FOREACH(dinfo, &drives, next) {",
"if (dinfo->VAR_0 == VAR_0)\nreturn dinfo->serial;",
"}",
"return \"\\0\";",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
19
],
[
21
]
] |
27,049 | static void vnc_read_when(VncState *vs, VncReadEvent *func, size_t expecting)
{
vs->read_handler = func;
vs->read_handler_expect = expecting;
}
| false | qemu | 5fb6c7a8b26eab1a22207d24b4784bd2b39ab54b | static void vnc_read_when(VncState *vs, VncReadEvent *func, size_t expecting)
{
vs->read_handler = func;
vs->read_handler_expect = expecting;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(VncState *VAR_0, VncReadEvent *VAR_1, size_t VAR_2)
{
VAR_0->read_handler = VAR_1;
VAR_0->read_handler_expect = VAR_2;
}
| [
"static void FUNC_0(VncState *VAR_0, VncReadEvent *VAR_1, size_t VAR_2)\n{",
"VAR_0->read_handler = VAR_1;",
"VAR_0->read_handler_expect = VAR_2;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
27,050 | static int decode_mips16_opc (CPUState *env, DisasContext *ctx,
int *is_branch)
{
int rx, ry;
int sa;
int op, cnvt_op, op1, offset;
int funct;
int n_bytes;
op = (ctx->opcode >> 11) & 0x1f;
sa = (ctx->opcode >> 2) & 0x7;
sa = sa == 0 ? 8 : sa;
... | false | qemu | 620e48f66350991918dd78e9a686a9b159fec111 | static int decode_mips16_opc (CPUState *env, DisasContext *ctx,
int *is_branch)
{
int rx, ry;
int sa;
int op, cnvt_op, op1, offset;
int funct;
int n_bytes;
op = (ctx->opcode >> 11) & 0x1f;
sa = (ctx->opcode >> 2) & 0x7;
sa = sa == 0 ? 8 : sa;
... | {
"code": [],
"line_no": []
} | static int FUNC_0 (CPUState *VAR_0, DisasContext *VAR_1,
int *VAR_2)
{
int VAR_3, VAR_4;
int VAR_5;
int VAR_6, VAR_7, VAR_8, VAR_9;
int VAR_10;
int VAR_11;
VAR_6 = (VAR_1->opcode >> 11) & 0x1f;
VAR_5 = (VAR_1->opcode >> 2) & 0x7;
VAR_5 = VAR_5 ==... | [
"static int FUNC_0 (CPUState *VAR_0, DisasContext *VAR_1,\nint *VAR_2)\n{",
"int VAR_3, VAR_4;",
"int VAR_5;",
"int VAR_6, VAR_7, VAR_8, VAR_9;",
"int VAR_10;",
"int VAR_11;",
"VAR_6 = (VAR_1->opcode >> 11) & 0x1f;",
"VAR_5 = (VAR_1->opcode >> 2) & 0x7;",
"VAR_5 = VAR_5 == 0 ? 8 : VAR_5;",
"VAR_3 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
39
],
[
41,
43
],
[
45
],
[
49
],
[
51
... |
27,051 | static int smc_decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
SmcContext *s = avctx->priv_data;
const uint8_t *pal = av_packet_get_side_data(... | false | FFmpeg | 140f48b90fbe32a88423aad473bccc72c3bb450e | static int smc_decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
SmcContext *s = avctx->priv_data;
const uint8_t *pal = av_packet_get_side_data(... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
SmcContext *s = VAR_0->priv_data;
const uint8_t *VAR_6 = av_packet_get_side_data(VAR_3, AV_P... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"SmcContext *s = VAR_0->priv_data;",
"const uint8_t *VAR_6 = av_packet_get_side_data(VAR_3, AV_PKT_DATA_PALETTE, NULL);",
"int VAR_7;",
"bytestre... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25,
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47,
49
],
[
55
],
[
57
]
] |
27,052 | static void proxy_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
{
seekdir(fs->dir, off);
}
| false | qemu | 494a8ebe713055d3946183f4b395f85a18b43e9e | static void proxy_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
{
seekdir(fs->dir, off);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(FsContext *VAR_0, V9fsFidOpenState *VAR_1, off_t VAR_2)
{
seekdir(VAR_1->dir, VAR_2);
}
| [
"static void FUNC_0(FsContext *VAR_0, V9fsFidOpenState *VAR_1, off_t VAR_2)\n{",
"seekdir(VAR_1->dir, VAR_2);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
27,053 | void virtio_notify(VirtIODevice *vdev, VirtQueue *vq)
{
/* Always notify when queue is empty */
if ((vq->inuse || vring_avail_idx(vq) != vq->last_avail_idx) &&
(vring_avail_flags(vq) & VRING_AVAIL_F_NO_INTERRUPT))
return;
vdev->isr |= 0x01;
virtio_update_irq(vdev);
}
| false | qemu | 97b83deb557679c909465456acaa723c2ba34948 | void virtio_notify(VirtIODevice *vdev, VirtQueue *vq)
{
if ((vq->inuse || vring_avail_idx(vq) != vq->last_avail_idx) &&
(vring_avail_flags(vq) & VRING_AVAIL_F_NO_INTERRUPT))
return;
vdev->isr |= 0x01;
virtio_update_irq(vdev);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(VirtIODevice *VAR_0, VirtQueue *VAR_1)
{
if ((VAR_1->inuse || vring_avail_idx(VAR_1) != VAR_1->last_avail_idx) &&
(vring_avail_flags(VAR_1) & VRING_AVAIL_F_NO_INTERRUPT))
return;
VAR_0->isr |= 0x01;
virtio_update_irq(VAR_0);
}
| [
"void FUNC_0(VirtIODevice *VAR_0, VirtQueue *VAR_1)\n{",
"if ((VAR_1->inuse || vring_avail_idx(VAR_1) != VAR_1->last_avail_idx) &&\n(vring_avail_flags(VAR_1) & VRING_AVAIL_F_NO_INTERRUPT))\nreturn;",
"VAR_0->isr |= 0x01;",
"virtio_update_irq(VAR_0);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7,
9,
11
],
[
15
],
[
17
],
[
19
]
] |
27,054 | static int64_t allocate_cluster(BlockDriverState *bs, int64_t sector_num)
{
BDRVParallelsState *s = bs->opaque;
uint32_t idx, offset, tmp;
int64_t pos;
int ret;
idx = sector_num / s->tracks;
offset = sector_num % s->tracks;
if (idx >= s->catalog_size) {
return -EINVAL;
... | false | qemu | 369f7de9d57e4dd2f312255fc12271d5749c0a4e | static int64_t allocate_cluster(BlockDriverState *bs, int64_t sector_num)
{
BDRVParallelsState *s = bs->opaque;
uint32_t idx, offset, tmp;
int64_t pos;
int ret;
idx = sector_num / s->tracks;
offset = sector_num % s->tracks;
if (idx >= s->catalog_size) {
return -EINVAL;
... | {
"code": [],
"line_no": []
} | static int64_t FUNC_0(BlockDriverState *bs, int64_t sector_num)
{
BDRVParallelsState *s = bs->opaque;
uint32_t idx, offset, tmp;
int64_t pos;
int VAR_0;
idx = sector_num / s->tracks;
offset = sector_num % s->tracks;
if (idx >= s->catalog_size) {
return -EINVAL;
}
... | [
"static int64_t FUNC_0(BlockDriverState *bs, int64_t sector_num)\n{",
"BDRVParallelsState *s = bs->opaque;",
"uint32_t idx, offset, tmp;",
"int64_t pos;",
"int VAR_0;",
"idx = sector_num / s->tracks;",
"offset = sector_num % s->tracks;",
"if (idx >= s->catalog_size) {",
"return -EINVAL;",
"}",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
27,055 | static int vdi_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVVdiState *s = bs->opaque;
VdiHeader header;
size_t bmap_size;
int ret;
logout("\n");
ret = bdrv_read(bs->file, 0, (uint8_t *)&header, 1);
if (ret < 0) {
goto fai... | false | qemu | 76abe4071d111a9ca6dcc9b9689a831c39ffa718 | static int vdi_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVVdiState *s = bs->opaque;
VdiHeader header;
size_t bmap_size;
int ret;
logout("\n");
ret = bdrv_read(bs->file, 0, (uint8_t *)&header, 1);
if (ret < 0) {
goto fai... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2,
Error **VAR_3)
{
BDRVVdiState *s = VAR_0->opaque;
VdiHeader header;
size_t bmap_size;
int VAR_4;
logout("\n");
VAR_4 = bdrv_read(VAR_0->file, 0, (uint8_t *)&header, 1);
if (VAR_4 < 0) {
... | [
"static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2,\nError **VAR_3)\n{",
"BDRVVdiState *s = VAR_0->opaque;",
"VdiHeader header;",
"size_t bmap_size;",
"int VAR_4;",
"logout(\"\\n\");",
"VAR_4 = bdrv_read(VAR_0->file, 0, (uint8_t *)&header, 1);",
"if (VAR_4 < 0) {",
"goto fail;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
31
],
[
33,
35
],
[
37,
41
],
[
49
],
[
51
],
[
53
],
[
55
],
[
59
],
[... |
27,057 | ThreadPool *aio_get_thread_pool(AioContext *ctx)
{
if (!ctx->thread_pool) {
ctx->thread_pool = thread_pool_new(ctx);
}
return ctx->thread_pool;
}
| false | qemu | c2b38b277a7882a592f4f2ec955084b2b756daaa | ThreadPool *aio_get_thread_pool(AioContext *ctx)
{
if (!ctx->thread_pool) {
ctx->thread_pool = thread_pool_new(ctx);
}
return ctx->thread_pool;
}
| {
"code": [],
"line_no": []
} | ThreadPool *FUNC_0(AioContext *ctx)
{
if (!ctx->thread_pool) {
ctx->thread_pool = thread_pool_new(ctx);
}
return ctx->thread_pool;
}
| [
"ThreadPool *FUNC_0(AioContext *ctx)\n{",
"if (!ctx->thread_pool) {",
"ctx->thread_pool = thread_pool_new(ctx);",
"}",
"return ctx->thread_pool;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
27,059 | static void string_serialize(void *native_in, void **datap,
VisitorFunc visit, Error **errp)
{
StringSerializeData *d = g_malloc0(sizeof(*d));
d->sov = string_output_visitor_new(false);
visit(string_output_get_visitor(d->sov), &native_in, errp);
*datap = d;
}
| false | qemu | 3b098d56979d2f7fd707c5be85555d114353a28d | static void string_serialize(void *native_in, void **datap,
VisitorFunc visit, Error **errp)
{
StringSerializeData *d = g_malloc0(sizeof(*d));
d->sov = string_output_visitor_new(false);
visit(string_output_get_visitor(d->sov), &native_in, errp);
*datap = d;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, void **VAR_1,
VisitorFunc VAR_2, Error **VAR_3)
{
StringSerializeData *d = g_malloc0(sizeof(*d));
d->sov = string_output_visitor_new(false);
VAR_2(string_output_get_visitor(d->sov), &VAR_0, VAR_3);
*VAR_1 = d;
}
| [
"static void FUNC_0(void *VAR_0, void **VAR_1,\nVisitorFunc VAR_2, Error **VAR_3)\n{",
"StringSerializeData *d = g_malloc0(sizeof(*d));",
"d->sov = string_output_visitor_new(false);",
"VAR_2(string_output_get_visitor(d->sov), &VAR_0, VAR_3);",
"*VAR_1 = d;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
27,061 | void cpu_x86_update_cr3(CPUX86State *env)
{
if (env->cr[0] & CR0_PG_MASK) {
#if defined(DEBUG_MMU)
printf("CR3 update: CR3=%08x\n", env->cr[3]);
#endif
tlb_flush(env);
}
}
| false | qemu | 1ac157da77c863b62b1d2f467626a440d57cf17d | void cpu_x86_update_cr3(CPUX86State *env)
{
if (env->cr[0] & CR0_PG_MASK) {
#if defined(DEBUG_MMU)
printf("CR3 update: CR3=%08x\n", env->cr[3]);
#endif
tlb_flush(env);
}
}
| {
"code": [],
"line_no": []
} | void FUNC_0(CPUX86State *VAR_0)
{
if (VAR_0->cr[0] & CR0_PG_MASK) {
#if defined(DEBUG_MMU)
printf("CR3 update: CR3=%08x\n", VAR_0->cr[3]);
#endif
tlb_flush(VAR_0);
}
}
| [
"void FUNC_0(CPUX86State *VAR_0)\n{",
"if (VAR_0->cr[0] & CR0_PG_MASK) {",
"#if defined(DEBUG_MMU)\nprintf(\"CR3 update: CR3=%08x\\n\", VAR_0->cr[3]);",
"#endif\ntlb_flush(VAR_0);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13
],
[
15
],
[
17
]
] |
27,062 | static inline void apply_8x8(MpegEncContext *s,
uint8_t *dest_y,
uint8_t *dest_cb,
uint8_t *dest_cr,
int dir,
uint8_t **ref_picture,
qpel_mc... | false | FFmpeg | 8849c4ceac0f35e88b2dc406bf5ffc4173a38ffe | static inline void apply_8x8(MpegEncContext *s,
uint8_t *dest_y,
uint8_t *dest_cb,
uint8_t *dest_cr,
int dir,
uint8_t **ref_picture,
qpel_mc... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(MpegEncContext *VAR_0,
uint8_t *VAR_1,
uint8_t *VAR_2,
uint8_t *VAR_3,
int VAR_4,
uint8_t **VAR_5,
VAR_6 (*qpix_op... | [
"static inline void FUNC_0(MpegEncContext *VAR_0,\nuint8_t *VAR_1,\nuint8_t *VAR_2,\nuint8_t *VAR_3,\nint VAR_4,\nuint8_t **VAR_5,\nVAR_6 (*qpix_op)[16],\nVAR_7 (*pix_op)[4])\n{",
"int VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;",
"int VAR_13;",
"int VAR_14 = VAR_0->VAR_14;",
"int VAR_15 = VAR_0->VAR_15;",
"uin... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13,
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
55
],
[... |
27,063 | void mpeg_motion_internal(MpegEncContext *s,
uint8_t *dest_y,
uint8_t *dest_cb,
uint8_t *dest_cr,
int field_based,
int bottom_field,
int field_select,
... | false | FFmpeg | 0242351390643d176b10600c2eb854414f9559e6 | void mpeg_motion_internal(MpegEncContext *s,
uint8_t *dest_y,
uint8_t *dest_cb,
uint8_t *dest_cr,
int field_based,
int bottom_field,
int field_select,
... | {
"code": [],
"line_no": []
} | void FUNC_0(MpegEncContext *VAR_0,
uint8_t *VAR_1,
uint8_t *VAR_2,
uint8_t *VAR_3,
int VAR_4,
int VAR_5,
int VAR_6,
uint8_t **VAR_7... | [
"void FUNC_0(MpegEncContext *VAR_0,\nuint8_t *VAR_1,\nuint8_t *VAR_2,\nuint8_t *VAR_3,\nint VAR_4,\nint VAR_5,\nint VAR_6,\nuint8_t **VAR_7,\nVAR_8 (*pix_op)[4],\nint VAR_9,\nint VAR_10,\nint VAR_11,\nint VAR_12,\nint VAR_13)\n{",
"uint8_t *ptr_y, *ptr_cb, *ptr_cr;",
"int VAR_14, VAR_15, VAR_16, VAR_17, VAR_18,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
43
],
[
45
],
[
47
],
[
49
],
[
51,
55
],
[
57
],
[
59
],
[
63
... |
27,064 | static void parse_palette_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
PGSSubContext *ctx = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP;
int color_id;
int y, cb, cr, al... | false | FFmpeg | 253d0be6a1ecc343d29ff8e1df0ddf961ab9c772 | static void parse_palette_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
PGSSubContext *ctx = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP;
int color_id;
int y, cb, cr, al... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVCodecContext *VAR_0,
const uint8_t *VAR_1, int VAR_2)
{
PGSSubContext *ctx = VAR_0->priv_data;
const uint8_t *VAR_3 = VAR_1 + VAR_2;
const uint8_t *VAR_4 = ff_crop_tab + MAX_NEG_CROP;
int VAR_5;
int VAR_6, VAR_7, VAR_8, VAR_9;
... | [
"static void FUNC_0(AVCodecContext *VAR_0,\nconst uint8_t *VAR_1, int VAR_2)\n{",
"PGSSubContext *ctx = VAR_0->priv_data;",
"const uint8_t *VAR_3 = VAR_1 + VAR_2;",
"const uint8_t *VAR_4 = ff_crop_tab + MAX_NEG_CROP;",
"int VAR_5;",
"int VAR_6, VAR_7, VAR_8, VAR_9;",
"int VAR_10, VAR_11, VAR_12, VA... | [
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
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[
55
],
[
57
],
... |
27,065 | static int transcode(OutputFile *output_files, int nb_output_files,
InputFile *input_files, int nb_input_files)
{
int ret, i;
AVFormatContext *is, *os;
OutputStream *ost;
InputStream *ist;
uint8_t *no_packet;
int no_packet_count = 0;
int64_t timer_start;
... | false | FFmpeg | 29034e65039ef6b1854ceeb76ffe4092992d9fd5 | static int transcode(OutputFile *output_files, int nb_output_files,
InputFile *input_files, int nb_input_files)
{
int ret, i;
AVFormatContext *is, *os;
OutputStream *ost;
InputStream *ist;
uint8_t *no_packet;
int no_packet_count = 0;
int64_t timer_start;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(OutputFile *VAR_0, int VAR_1,
InputFile *VAR_2, int VAR_3)
{
int VAR_4, VAR_5;
AVFormatContext *is, *os;
OutputStream *ost;
InputStream *ist;
uint8_t *no_packet;
int VAR_6 = 0;
int64_t timer_start;
int VAR_7;
if (!(no_packet = av_... | [
"static int FUNC_0(OutputFile *VAR_0, int VAR_1,\nInputFile *VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5;",
"AVFormatContext *is, *os;",
"OutputStream *ost;",
"InputStream *ist;",
"uint8_t *no_packet;",
"int VAR_6 = 0;",
"int64_t timer_start;",
"int VAR_7;",
"if (!(no_packet = av_mallocz(VAR_3)))\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
31
],
[
33,
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
51
],
[
53
],
[... |
27,066 | void *av_realloc(void *ptr, size_t size)
{
#if CONFIG_MEMALIGN_HACK
int diff;
#endif
/* let's disallow possible ambiguous cases */
if (size > (MAX_MALLOC_SIZE-16))
return NULL;
#if CONFIG_MEMALIGN_HACK
//FIXME this isn't aligned correctly, though it probably isn't needed
if(!pt... | false | FFmpeg | fc11927890f38445a950b453d24928525da0e61a | void *av_realloc(void *ptr, size_t size)
{
#if CONFIG_MEMALIGN_HACK
int diff;
#endif
if (size > (MAX_MALLOC_SIZE-16))
return NULL;
#if CONFIG_MEMALIGN_HACK
if(!ptr) return av_malloc(size);
diff= ((char*)ptr)[-1];
return (char*)realloc((char*)ptr - diff, size + diff)... | {
"code": [],
"line_no": []
} | void *FUNC_0(void *VAR_0, size_t VAR_1)
{
#if CONFIG_MEMALIGN_HACK
int diff;
#endif
if (VAR_1 > (MAX_MALLOC_SIZE-16))
return NULL;
#if CONFIG_MEMALIGN_HACK
if(!VAR_0) return av_malloc(VAR_1);
diff= ((char*)VAR_0)[-1];
return (char*)realloc((char*)VAR_0 - diff, VAR_1... | [
"void *FUNC_0(void *VAR_0, size_t VAR_1)\n{",
"#if CONFIG_MEMALIGN_HACK\nint diff;",
"#endif\nif (VAR_1 > (MAX_MALLOC_SIZE-16))\nreturn NULL;",
"#if CONFIG_MEMALIGN_HACK\nif(!VAR_0) return av_malloc(VAR_1);",
"diff= ((char*)VAR_0)[-1];",
"return (char*)realloc((char*)VAR_0 - diff, VAR_1 + diff) + diff;",
... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
15,
17
],
[
21,
25
],
[
27
],
[
29
],
[
31,
33
],
[
35,
37
]
] |
27,068 | static av_cold int raw_close_decoder(AVCodecContext *avctx)
{
RawVideoContext *context = avctx->priv_data;
av_freep(&context->buffer);
return 0;
}
| false | FFmpeg | 6184fa2067ccf88e68a7009442cf01440e59d99c | static av_cold int raw_close_decoder(AVCodecContext *avctx)
{
RawVideoContext *context = avctx->priv_data;
av_freep(&context->buffer);
return 0;
}
| {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
RawVideoContext *context = avctx->priv_data;
av_freep(&context->buffer);
return 0;
}
| [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"RawVideoContext *context = avctx->priv_data;",
"av_freep(&context->buffer);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
]
] |
27,070 | static int mc_subpel(DiracContext *s, DiracBlock *block, const uint8_t *src[5],
int x, int y, int ref, int plane)
{
Plane *p = &s->plane[plane];
uint8_t **ref_hpel = s->ref_pics[ref]->hpel[plane];
int motion_x = block->u.mv[ref][0];
int motion_y = block->u.mv[ref][1];
int... | true | FFmpeg | b8598f6ce61ccda3f2ff0c730b009fb650e42986 | static int mc_subpel(DiracContext *s, DiracBlock *block, const uint8_t *src[5],
int x, int y, int ref, int plane)
{
Plane *p = &s->plane[plane];
uint8_t **ref_hpel = s->ref_pics[ref]->hpel[plane];
int motion_x = block->u.mv[ref][0];
int motion_y = block->u.mv[ref][1];
int... | {
"code": [
" mx = motion_x & ~(-1 << s->mv_precision);",
" my = motion_y & ~(-1 << s->mv_precision);"
],
"line_no": [
29,
31
]
} | static int FUNC_0(DiracContext *VAR_0, DiracBlock *VAR_1, const uint8_t *VAR_2[5],
int VAR_3, int VAR_4, int VAR_5, int VAR_6)
{
Plane *p = &VAR_0->VAR_6[VAR_6];
uint8_t **ref_hpel = VAR_0->ref_pics[VAR_5]->hpel[VAR_6];
int VAR_7 = VAR_1->u.mv[VAR_5][0];
int VAR_8 = VAR_1->u.m... | [
"static int FUNC_0(DiracContext *VAR_0, DiracBlock *VAR_1, const uint8_t *VAR_2[5],\nint VAR_3, int VAR_4, int VAR_5, int VAR_6)\n{",
"Plane *p = &VAR_0->VAR_6[VAR_6];",
"uint8_t **ref_hpel = VAR_0->ref_pics[VAR_5]->hpel[VAR_6];",
"int VAR_7 = VAR_1->u.mv[VAR_5][0];",
"int VAR_8 = VAR_1->u.mv[VAR_5][1];",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[... |
27,071 | int kvm_arch_init_vcpu(CPUState *cs)
{
struct {
struct kvm_cpuid2 cpuid;
struct kvm_cpuid_entry2 entries[KVM_MAX_CPUID_ENTRIES];
} QEMU_PACKED cpuid_data;
X86CPU *cpu = X86_CPU(cs);
CPUX86State *env = &cpu->env;
uint32_t limit, i, j, cpuid_i;
uint32_t unused;
struct... | true | qemu | ef4cbe14342c1f63b3c754e306218f004f4e26c4 | int kvm_arch_init_vcpu(CPUState *cs)
{
struct {
struct kvm_cpuid2 cpuid;
struct kvm_cpuid_entry2 entries[KVM_MAX_CPUID_ENTRIES];
} QEMU_PACKED cpuid_data;
X86CPU *cpu = X86_CPU(cs);
CPUX86State *env = &cpu->env;
uint32_t limit, i, j, cpuid_i;
uint32_t unused;
struct... | {
"code": [
" memset(c, 0, sizeof(*c));",
" memset(c, 0, sizeof(*c));",
" memset(c, 0, sizeof(*c));",
" memset(c, 0, sizeof(*c));",
" memset(c, 0, sizeof(*c));",
" memset(c, 0, sizeof(*c));",
" memset(c, 0, sizeof(*c));"
],
"line_no": [
37,
... | int FUNC_0(CPUState *VAR_0)
{
struct {
struct kvm_cpuid2 cpuid;
struct kvm_cpuid_entry2 entries[KVM_MAX_CPUID_ENTRIES];
} QEMU_PACKED VAR_1;
X86CPU *cpu = X86_CPU(VAR_0);
CPUX86State *env = &cpu->env;
uint32_t limit, i, j, cpuid_i;
uint32_t unused;
struct kvm_cpuid_... | [
"int FUNC_0(CPUState *VAR_0)\n{",
"struct {",
"struct kvm_cpuid2 cpuid;",
"struct kvm_cpuid_entry2 entries[KVM_MAX_CPUID_ENTRIES];",
"} QEMU_PACKED VAR_1;",
"X86CPU *cpu = X86_CPU(VAR_0);",
"CPUX86State *env = &cpu->env;",
"uint32_t limit, i, j, cpuid_i;",
"uint32_t unused;",
"struct kvm_cpuid_ent... | [
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,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
27,073 | static QObject *pci_get_dev_dict(PCIDevice *dev, PCIBus *bus, int bus_num)
{
int class;
QObject *obj;
obj = qobject_from_jsonf("{ 'bus': %d, 'slot': %d, 'function': %d," "'class_info': %p, 'id': %p, 'regions': %p,"
" 'qdev_id': %s }"... | true | qemu | b5937f297819bec5bf704dda1df9807fc7f0a766 | static QObject *pci_get_dev_dict(PCIDevice *dev, PCIBus *bus, int bus_num)
{
int class;
QObject *obj;
obj = qobject_from_jsonf("{ 'bus': %d, 'slot': %d, 'function': %d," "'class_info': %p, 'id': %p, 'regions': %p,"
" 'qdev_id': %s }"... | {
"code": [
" int class;",
" class = pci_get_word(dev->config + PCI_CLASS_DEVICE);",
" if (class == PCI_CLASS_BRIDGE_HOST || class == PCI_CLASS_BRIDGE_PCI) {"
],
"line_no": [
5,
37,
39
]
} | static QObject *FUNC_0(PCIDevice *dev, PCIBus *bus, int bus_num)
{
int VAR_0;
QObject *obj;
obj = qobject_from_jsonf("{ 'bus': %d, 'slot': %d, 'function': %d," "'class_info': %p, 'id': %p, 'regions': %p,"
" 'qdev_id': %s }",
... | [
"static QObject *FUNC_0(PCIDevice *dev, PCIBus *bus, int bus_num)\n{",
"int VAR_0;",
"QObject *obj;",
"obj = qobject_from_jsonf(\"{ 'bus': %d, 'slot': %d, 'function': %d,\" \"'class_info': %p, 'id': %p, 'regions': %p,\"",
"\" 'qdev_id': %s }\",",
"bus_num,\nPCI_SLOT(d... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15,
17,
19,
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53... |
27,074 | static int decode_block_progressive(MJpegDecodeContext *s, int16_t *block,
uint8_t *last_nnz, int ac_index,
int16_t *quant_matrix,
int ss, int se, int Al, int *EOBRUN)
{
int code, i, j, level, val, run;
... | true | FFmpeg | c9220d5b06536ac359166214b4131a1f15244617 | static int decode_block_progressive(MJpegDecodeContext *s, int16_t *block,
uint8_t *last_nnz, int ac_index,
int16_t *quant_matrix,
int ss, int se, int Al, int *EOBRUN)
{
int code, i, j, level, val, run;
... | {
"code": [
" block[j] = level * quant_matrix[j] << Al;",
" block[j] = level * quant_matrix[j] << Al;"
],
"line_no": [
73,
87
]
} | static int FUNC_0(MJpegDecodeContext *VAR_0, int16_t *VAR_1,
uint8_t *VAR_2, int VAR_3,
int16_t *VAR_4,
int VAR_5, int VAR_6, int VAR_7, int *VAR_8)
{
int VAR_9, VAR_10, VAR_11, VAR_12, VAR_13, VAR_14;
... | [
"static int FUNC_0(MJpegDecodeContext *VAR_0, int16_t *VAR_1,\nuint8_t *VAR_2, int VAR_3,\nint16_t *VAR_4,\nint VAR_5, int VAR_6, int VAR_7, int *VAR_8)\n{",
"int VAR_9, VAR_10, VAR_11, VAR_12, VAR_13, VAR_14;",
"if (*VAR_8) {",
"(*VAR_8)--;",
"return 0;",
"}",
"{",
"OPEN_READER(re, &VAR_0->gb);",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
51
],
[
53
... |
27,075 | static void *bsd_vmalloc(size_t size)
{
void *p;
mmap_lock();
/* Use map and mark the pages as used. */
p = mmap(NULL, size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANON, -1, 0);
if (h2g_valid(p)) {
/* Allocated region overlaps guest address space.
This ... | true | qemu | b7b5233ad7fdd9985bb6d05b7919f3a20723ff2c | static void *bsd_vmalloc(size_t size)
{
void *p;
mmap_lock();
p = mmap(NULL, size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANON, -1, 0);
if (h2g_valid(p)) {
abi_ulong addr = h2g(p);
page_set_flags(addr & TARGET_PAGE_MASK, TARGET_PAGE_ALIGN(addr ... | {
"code": [
"static void *bsd_vmalloc(size_t size)",
" void *p;",
" mmap_lock();",
" p = mmap(NULL, size, PROT_READ | PROT_WRITE,",
" MAP_PRIVATE | MAP_ANON, -1, 0);",
" if (h2g_valid(p)) {",
" abi_ulong addr = h2g(p);",
" page_set_flags(addr & TAR... | static void *FUNC_0(size_t VAR_0)
{
void *VAR_1;
mmap_lock();
VAR_1 = mmap(NULL, VAR_0, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANON, -1, 0);
if (h2g_valid(VAR_1)) {
abi_ulong addr = h2g(VAR_1);
page_set_flags(addr & TARGET_PAGE_MASK, TARGET_PAG... | [
"static void *FUNC_0(size_t VAR_0)\n{",
"void *VAR_1;",
"mmap_lock();",
"VAR_1 = mmap(NULL, VAR_0, PROT_READ | PROT_WRITE,\nMAP_PRIVATE | MAP_ANON, -1, 0);",
"if (h2g_valid(VAR_1)) {",
"abi_ulong addr = h2g(VAR_1);",
"page_set_flags(addr & TARGET_PAGE_MASK, TARGET_PAGE_ALIGN(addr + VAR_0),\nPAGE_RESERVE... | [
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
23
],
[
25,
27
],
[
29
],
[
33
],
[
35
],
[
37
]
] |
27,076 | void rgb32tobgr24(const uint8_t *src, uint8_t *dst, long src_size)
{
long i;
long num_pixels = src_size >> 2;
for(i=0; i<num_pixels; i++)
{
#ifdef WORDS_BIGENDIAN
/* RGB32 (= A,B,G,R) -> BGR24 (= B,G,R) */
dst[3*i + 0] = src[4*i + 1];
dst[3*i + 1] = src[4*i + 2];
dst[3*i + 2] = src[4*i + 3];... | true | FFmpeg | 6e42e6c4b410dbef8b593c2d796a5dad95f89ee4 | void rgb32tobgr24(const uint8_t *src, uint8_t *dst, long src_size)
{
long i;
long num_pixels = src_size >> 2;
for(i=0; i<num_pixels; i++)
{
#ifdef WORDS_BIGENDIAN
dst[3*i + 0] = src[4*i + 1];
dst[3*i + 1] = src[4*i + 2];
dst[3*i + 2] = src[4*i + 3];
#else
dst[3*i + 0] = src[4*i + 2];... | {
"code": [
"\tlong i;",
"\tfor(i=0; i<num_pixels; i++)",
"\tfor(i=0; i<num_pixels; i++)",
"\t\t#ifdef WORDS_BIGENDIAN",
"\t\t#else",
"\t\t#endif",
"\tlong i;",
"\tfor(i=0; i<num_pixels; i++)",
"\t\t#ifdef WORDS_BIGENDIAN",
"\t\t#else",
"\t\t#endif",
"\tlong i;",
"\... | void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, long VAR_2)
{
long VAR_3;
long VAR_4 = VAR_2 >> 2;
for(VAR_3=0; VAR_3<VAR_4; VAR_3++)
{
#ifdef WORDS_BIGENDIAN
VAR_1[3*VAR_3 + 0] = VAR_0[4*VAR_3 + 1];
VAR_1[3*VAR_3 + 1] = VAR_0[4*VAR_3 + 2];
VAR_1[3*VAR_3 + 2] = VAR_0[4*VAR_3 + 3];
#els... | [
"void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, long VAR_2)\n{",
"long VAR_3;",
"long VAR_4 = VAR_2 >> 2;",
"for(VAR_3=0; VAR_3<VAR_4; VAR_3++)",
"{",
"#ifdef WORDS_BIGENDIAN\nVAR_1[3*VAR_3 + 0] = VAR_0[4*VAR_3 + 1];",
"VAR_1[3*VAR_3 + 1] = VAR_0[4*VAR_3 + 2];",
"VAR_1[3*VAR_3 + 2] = VAR_0[4*VAR_3 ... | [
0,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13,
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
]
] |
27,077 | static int initFilter(int16_t **outFilter, int16_t **filterPos, int *outFilterSize, int xInc,
int srcW, int dstW, int filterAlign, int one, int flags, int cpu_flags,
SwsVector *srcFilter, SwsVector *dstFilter, double param[2], int is_horizontal)
{
int i;
int filt... | true | FFmpeg | dae2ce361a2b5fd9be1d43e5e8c00bdbc5f03e3d | static int initFilter(int16_t **outFilter, int16_t **filterPos, int *outFilterSize, int xInc,
int srcW, int dstW, int filterAlign, int one, int flags, int cpu_flags,
SwsVector *srcFilter, SwsVector *dstFilter, double param[2], int is_horizontal)
{
int i;
int filt... | {
"code": [
" if (filterSize > srcW-2) filterSize=srcW-2;"
],
"line_no": [
167
]
} | static int FUNC_0(int16_t **VAR_0, int16_t **VAR_1, int *VAR_2, int VAR_3,
int VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8, int VAR_9,
SwsVector *VAR_10, SwsVector *VAR_11, double VAR_12[2], int VAR_13)
{
int VAR_22;
int VAR_15;
int VAR_16;
int VA... | [
"static int FUNC_0(int16_t **VAR_0, int16_t **VAR_1, int *VAR_2, int VAR_3,\nint VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8, int VAR_9,\nSwsVector *VAR_10, SwsVector *VAR_11, double VAR_12[2], int VAR_13)\n{",
"int VAR_22;",
"int VAR_15;",
"int VAR_16;",
"int VAR_17;",
"int64_t *filter=NULL;",
"i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
... |
27,078 | static ssize_t usbnet_receive(VLANClientState *nc, const uint8_t *buf, size_t size)
{
USBNetState *s = DO_UPCAST(NICState, nc, nc)->opaque;
struct rndis_packet_msg_type *msg;
if (is_rndis(s)) {
msg = (struct rndis_packet_msg_type *) s->in_buf;
if (!s->rndis_state == RNDIS_DATA_INITIA... | true | qemu | e7852674d5013bffd0bb8e822a7521f76677a60b | static ssize_t usbnet_receive(VLANClientState *nc, const uint8_t *buf, size_t size)
{
USBNetState *s = DO_UPCAST(NICState, nc, nc)->opaque;
struct rndis_packet_msg_type *msg;
if (is_rndis(s)) {
msg = (struct rndis_packet_msg_type *) s->in_buf;
if (!s->rndis_state == RNDIS_DATA_INITIA... | {
"code": [
" if (!s->rndis_state == RNDIS_DATA_INITIALIZED)"
],
"line_no": [
15
]
} | static ssize_t FUNC_0(VLANClientState *nc, const uint8_t *buf, size_t size)
{
USBNetState *s = DO_UPCAST(NICState, nc, nc)->opaque;
struct rndis_packet_msg_type *VAR_0;
if (is_rndis(s)) {
VAR_0 = (struct rndis_packet_msg_type *) s->in_buf;
if (!s->rndis_state == RNDIS_DATA_INITIALIZE... | [
"static ssize_t FUNC_0(VLANClientState *nc, const uint8_t *buf, size_t size)\n{",
"USBNetState *s = DO_UPCAST(NICState, nc, nc)->opaque;",
"struct rndis_packet_msg_type *VAR_0;",
"if (is_rndis(s)) {",
"VAR_0 = (struct rndis_packet_msg_type *) s->in_buf;",
"if (!s->rndis_state == RNDIS_DATA_INITIALIZED)\nr... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15,
17
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
51
],
[
53
],
[
55
],
[
57,
59
],
[
61
],
[
63
],
... |
27,079 | int unix_connect(const char *path)
{
QemuOpts *opts;
int sock;
opts = qemu_opts_create(&dummy_opts, NULL, 0);
qemu_opt_set(opts, "path", path);
sock = unix_connect_opts(opts);
qemu_opts_del(opts);
return sock;
}
| true | qemu | 8be7e7e4c72c048b90e3482557954a24bba43ba7 | int unix_connect(const char *path)
{
QemuOpts *opts;
int sock;
opts = qemu_opts_create(&dummy_opts, NULL, 0);
qemu_opt_set(opts, "path", path);
sock = unix_connect_opts(opts);
qemu_opts_del(opts);
return sock;
}
| {
"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": [
11,
11,
11,
11
]
} | int FUNC_0(const char *VAR_0)
{
QemuOpts *opts;
int VAR_1;
opts = qemu_opts_create(&dummy_opts, NULL, 0);
qemu_opt_set(opts, "VAR_0", VAR_0);
VAR_1 = unix_connect_opts(opts);
qemu_opts_del(opts);
return VAR_1;
}
| [
"int FUNC_0(const char *VAR_0)\n{",
"QemuOpts *opts;",
"int VAR_1;",
"opts = qemu_opts_create(&dummy_opts, NULL, 0);",
"qemu_opt_set(opts, \"VAR_0\", VAR_0);",
"VAR_1 = unix_connect_opts(opts);",
"qemu_opts_del(opts);",
"return VAR_1;",
"}"
] | [
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
27,080 | static inline bool regime_translation_disabled(CPUARMState *env,
ARMMMUIdx mmu_idx)
{
if (arm_feature(env, ARM_FEATURE_M)) {
switch (env->v7m.mpu_ctrl[regime_is_secure(env, mmu_idx)] &
(R_V7M_MPU_CTRL_ENABLE_MASK | R_V7M_MPU_CTRL_HFNMIENA_M... | true | qemu | 62593718d77c06ad2b5e942727cead40775d2395 | static inline bool regime_translation_disabled(CPUARMState *env,
ARMMMUIdx mmu_idx)
{
if (arm_feature(env, ARM_FEATURE_M)) {
switch (env->v7m.mpu_ctrl[regime_is_secure(env, mmu_idx)] &
(R_V7M_MPU_CTRL_ENABLE_MASK | R_V7M_MPU_CTRL_HFNMIENA_M... | {
"code": [
" return mmu_idx == ARMMMUIdx_MNegPri ||",
" mmu_idx == ARMMMUIdx_MSNegPri;"
],
"line_no": [
17,
19
]
} | static inline bool FUNC_0(CPUARMState *env,
ARMMMUIdx mmu_idx)
{
if (arm_feature(env, ARM_FEATURE_M)) {
switch (env->v7m.mpu_ctrl[regime_is_secure(env, mmu_idx)] &
(R_V7M_MPU_CTRL_ENABLE_MASK | R_V7M_MPU_CTRL_HFNMIENA_MASK)) {
case... | [
"static inline bool FUNC_0(CPUARMState *env,\nARMMMUIdx mmu_idx)\n{",
"if (arm_feature(env, ARM_FEATURE_M)) {",
"switch (env->v7m.mpu_ctrl[regime_is_secure(env, mmu_idx)] &\n(R_V7M_MPU_CTRL_ENABLE_MASK | R_V7M_MPU_CTRL_HFNMIENA_MASK)) {",
"case R_V7M_MPU_CTRL_ENABLE_MASK:\nreturn mmu_idx == ARMMMUIdx_MNegPri ... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9,
11
],
[
13,
17,
19
],
[
21,
25
],
[
27,
29,
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
]
] |
27,082 | static void migration_instance_init(Object *obj)
{
MigrationState *ms = MIGRATION_OBJ(obj);
ms->state = MIGRATION_STATUS_NONE;
ms->xbzrle_cache_size = DEFAULT_MIGRATE_CACHE_SIZE;
ms->mbps = -1;
ms->parameters.tls_creds = g_strdup("");
ms->parameters.tls_hostname = g_strdup("");
}
| false | qemu | 8b0b29dcec59730e6b21b253a6b43271cb3d831b | static void migration_instance_init(Object *obj)
{
MigrationState *ms = MIGRATION_OBJ(obj);
ms->state = MIGRATION_STATUS_NONE;
ms->xbzrle_cache_size = DEFAULT_MIGRATE_CACHE_SIZE;
ms->mbps = -1;
ms->parameters.tls_creds = g_strdup("");
ms->parameters.tls_hostname = g_strdup("");
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(Object *VAR_0)
{
MigrationState *ms = MIGRATION_OBJ(VAR_0);
ms->state = MIGRATION_STATUS_NONE;
ms->xbzrle_cache_size = DEFAULT_MIGRATE_CACHE_SIZE;
ms->mbps = -1;
ms->parameters.tls_creds = g_strdup("");
ms->parameters.tls_hostname = g_strdup("");
}
| [
"static void FUNC_0(Object *VAR_0)\n{",
"MigrationState *ms = MIGRATION_OBJ(VAR_0);",
"ms->state = MIGRATION_STATUS_NONE;",
"ms->xbzrle_cache_size = DEFAULT_MIGRATE_CACHE_SIZE;",
"ms->mbps = -1;",
"ms->parameters.tls_creds = g_strdup(\"\");",
"ms->parameters.tls_hostname = g_strdup(\"\");",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
27,084 | static void do_stop_capture(Monitor *mon, const QDict *qdict)
{
int i;
int n = qdict_get_int(qdict, "n");
CaptureState *s;
for (s = capture_head.lh_first, i = 0; s; s = s->entries.le_next, ++i) {
if (i == n) {
s->ops.destroy (s->opaque);
LIST_REMOVE (s, entries)... | false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | static void do_stop_capture(Monitor *mon, const QDict *qdict)
{
int i;
int n = qdict_get_int(qdict, "n");
CaptureState *s;
for (s = capture_head.lh_first, i = 0; s; s = s->entries.le_next, ++i) {
if (i == n) {
s->ops.destroy (s->opaque);
LIST_REMOVE (s, entries)... | {
"code": [],
"line_no": []
} | static void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{
int VAR_2;
int VAR_3 = qdict_get_int(VAR_1, "VAR_3");
CaptureState *s;
for (s = capture_head.lh_first, VAR_2 = 0; s; s = s->entries.le_next, ++VAR_2) {
if (VAR_2 == VAR_3) {
s->ops.destroy (s->opaque);
LIS... | [
"static void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)\n{",
"int VAR_2;",
"int VAR_3 = qdict_get_int(VAR_1, \"VAR_3\");",
"CaptureState *s;",
"for (s = capture_head.lh_first, VAR_2 = 0; s; s = s->entries.le_next, ++VAR_2) {",
"if (VAR_2 == VAR_3) {",
"s->ops.destroy (s->opaque);",
"LIST_REMOVE (s, en... | [
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
]
] |
27,085 | static void nbd_refresh_filename(BlockDriverState *bs)
{
QDict *opts = qdict_new();
const char *path = qdict_get_try_str(bs->options, "path");
const char *host = qdict_get_try_str(bs->options, "host");
const char *port = qdict_get_try_str(bs->options, "port");
const char *export = qdict_... | false | qemu | 4cdd01d32ee6fe04f8d909bfd3708be6864873a2 | static void nbd_refresh_filename(BlockDriverState *bs)
{
QDict *opts = qdict_new();
const char *path = qdict_get_try_str(bs->options, "path");
const char *host = qdict_get_try_str(bs->options, "host");
const char *port = qdict_get_try_str(bs->options, "port");
const char *export = qdict_... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0)
{
QDict *opts = qdict_new();
const char *VAR_1 = qdict_get_try_str(VAR_0->options, "VAR_1");
const char *VAR_2 = qdict_get_try_str(VAR_0->options, "VAR_2");
const char *VAR_3 = qdict_get_try_str(VAR_0->options, "VAR_3");
const char *VAR_4 = qdi... | [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"QDict *opts = qdict_new();",
"const char *VAR_1 = qdict_get_try_str(VAR_0->options, \"VAR_1\");",
"const char *VAR_2 = qdict_get_try_str(VAR_0->options, \"VAR_2\");",
"const char *VAR_3 = qdict_get_try_str(VAR_0->options, \"VAR_3\");",
"const char *... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23,
25,
27
],
[
29,
31,
33
],
[
35,
37,
39
],
[
41,
43,
45
],
[
47,
49,
51
],
[
53,
55,
57
... |
27,086 | static int select_input_picture(MpegEncContext *s)
{
int i, ret;
for (i = 1; i < MAX_PICTURE_COUNT; i++)
s->reordered_input_picture[i - 1] = s->reordered_input_picture[i];
s->reordered_input_picture[MAX_PICTURE_COUNT - 1] = NULL;
/* set next picture type & ordering */
if (!s->reor... | false | FFmpeg | 0e6c8532215790bbe560a9eea4f3cc82bb55cf92 | static int select_input_picture(MpegEncContext *s)
{
int i, ret;
for (i = 1; i < MAX_PICTURE_COUNT; i++)
s->reordered_input_picture[i - 1] = s->reordered_input_picture[i];
s->reordered_input_picture[MAX_PICTURE_COUNT - 1] = NULL;
if (!s->reordered_input_picture[0] && s->input_pic... | {
"code": [],
"line_no": []
} | static int FUNC_0(MpegEncContext *VAR_0)
{
int VAR_5, VAR_2;
for (VAR_5 = 1; VAR_5 < MAX_PICTURE_COUNT; VAR_5++)
VAR_0->reordered_input_picture[VAR_5 - 1] = VAR_0->reordered_input_picture[VAR_5];
VAR_0->reordered_input_picture[MAX_PICTURE_COUNT - 1] = NULL;
if (!VAR_0->reordered_... | [
"static int FUNC_0(MpegEncContext *VAR_0)\n{",
"int VAR_5, VAR_2;",
"for (VAR_5 = 1; VAR_5 < MAX_PICTURE_COUNT; VAR_5++)",
"VAR_0->reordered_input_picture[VAR_5 - 1] = VAR_0->reordered_input_picture[VAR_5];",
"VAR_0->reordered_input_picture[MAX_PICTURE_COUNT - 1] = NULL;",
"if (!VAR_0->reordered_input_pic... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
39
],
[
41,
43
],
[
47
],
[
51
],
[
53
],
[
57
],
... |
27,087 | static inline void iwmmxt_store_reg(TCGv var, int reg)
{
tcg_gen_st_i64(var, cpu_env, offsetof(CPUState, iwmmxt.regs[reg]));
}
| false | qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | static inline void iwmmxt_store_reg(TCGv var, int reg)
{
tcg_gen_st_i64(var, cpu_env, offsetof(CPUState, iwmmxt.regs[reg]));
}
| {
"code": [],
"line_no": []
} | static inline void FUNC_0(TCGv VAR_0, int VAR_1)
{
tcg_gen_st_i64(VAR_0, cpu_env, offsetof(CPUState, iwmmxt.regs[VAR_1]));
}
| [
"static inline void FUNC_0(TCGv VAR_0, int VAR_1)\n{",
"tcg_gen_st_i64(VAR_0, cpu_env, offsetof(CPUState, iwmmxt.regs[VAR_1]));",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
27,089 | static int msix_is_masked(PCIDevice *dev, int vector)
{
unsigned offset = vector * MSIX_ENTRY_SIZE + MSIX_VECTOR_CTRL;
return dev->msix_table_page[offset] & MSIX_VECTOR_MASK;
}
| false | qemu | 5b5cb08683b6715a2aca5314168e68ff0665912b | static int msix_is_masked(PCIDevice *dev, int vector)
{
unsigned offset = vector * MSIX_ENTRY_SIZE + MSIX_VECTOR_CTRL;
return dev->msix_table_page[offset] & MSIX_VECTOR_MASK;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(PCIDevice *VAR_0, int VAR_1)
{
unsigned VAR_2 = VAR_1 * MSIX_ENTRY_SIZE + MSIX_VECTOR_CTRL;
return VAR_0->msix_table_page[VAR_2] & MSIX_VECTOR_MASK;
}
| [
"static int FUNC_0(PCIDevice *VAR_0, int VAR_1)\n{",
"unsigned VAR_2 = VAR_1 * MSIX_ENTRY_SIZE + MSIX_VECTOR_CTRL;",
"return VAR_0->msix_table_page[VAR_2] & MSIX_VECTOR_MASK;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
27,090 | static void qed_aio_next_io(QEDAIOCB *acb)
{
BDRVQEDState *s = acb_to_s(acb);
uint64_t offset;
size_t len;
int ret;
trace_qed_aio_next_io(s, acb, 0, acb->cur_pos + acb->cur_qiov.size);
if (acb->backing_qiov) {
qemu_iovec_destroy(acb->backing_qiov);
g_free(acb->backin... | false | qemu | 018598747c775394471ce4a341a1ce225a1738dc | static void qed_aio_next_io(QEDAIOCB *acb)
{
BDRVQEDState *s = acb_to_s(acb);
uint64_t offset;
size_t len;
int ret;
trace_qed_aio_next_io(s, acb, 0, acb->cur_pos + acb->cur_qiov.size);
if (acb->backing_qiov) {
qemu_iovec_destroy(acb->backing_qiov);
g_free(acb->backin... | {
"code": [],
"line_no": []
} | static void FUNC_0(QEDAIOCB *VAR_0)
{
BDRVQEDState *s = acb_to_s(VAR_0);
uint64_t offset;
size_t len;
int VAR_1;
trace_qed_aio_next_io(s, VAR_0, 0, VAR_0->cur_pos + VAR_0->cur_qiov.size);
if (VAR_0->backing_qiov) {
qemu_iovec_destroy(VAR_0->backing_qiov);
g_free(VAR_... | [
"static void FUNC_0(QEDAIOCB *VAR_0)\n{",
"BDRVQEDState *s = acb_to_s(VAR_0);",
"uint64_t offset;",
"size_t len;",
"int VAR_1;",
"trace_qed_aio_next_io(s, VAR_0, 0, VAR_0->cur_pos + VAR_0->cur_qiov.size);",
"if (VAR_0->backing_qiov) {",
"qemu_iovec_destroy(VAR_0->backing_qiov);",
"g_free(VAR_0->back... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
41
],
[
43
],
[
45
],
[
47
],
[
53
],
[
55
... |
27,091 | writev_f(int argc, char **argv)
{
struct timeval t1, t2;
int Cflag = 0, qflag = 0;
int c, cnt;
char *buf;
int64_t offset;
int total;
int nr_iov;
int pattern = 0xcd;
QEMUIOVector qiov;
while ((c = getopt(argc, argv, "CqP:")) != EOF) {
switch (c) {
case 'C':
Cflag = 1;
break;
case ... | false | qemu | cf070d7ec0b8fb21faa9a630ed5cc66f90844a08 | writev_f(int argc, char **argv)
{
struct timeval t1, t2;
int Cflag = 0, qflag = 0;
int c, cnt;
char *buf;
int64_t offset;
int total;
int nr_iov;
int pattern = 0xcd;
QEMUIOVector qiov;
while ((c = getopt(argc, argv, "CqP:")) != EOF) {
switch (c) {
case 'C':
Cflag = 1;
break;
case ... | {
"code": [],
"line_no": []
} | FUNC_0(int VAR_0, char **VAR_1)
{
struct timeval VAR_2, VAR_3;
int VAR_4 = 0, VAR_5 = 0;
int VAR_6, VAR_7;
char *VAR_8;
int64_t offset;
int VAR_9;
int VAR_10;
int VAR_11 = 0xcd;
QEMUIOVector qiov;
while ((VAR_6 = getopt(VAR_0, VAR_1, "CqP:")) != EOF) {
switch (VAR_6) {
case 'C':
VAR_4 =... | [
"FUNC_0(int VAR_0, char **VAR_1)\n{",
"struct timeval VAR_2, VAR_3;",
"int VAR_4 = 0, VAR_5 = 0;",
"int VAR_6, VAR_7;",
"char *VAR_8;",
"int64_t offset;",
"int VAR_9;",
"int VAR_10;",
"int VAR_11 = 0xcd;",
"QEMUIOVector qiov;",
"while ((VAR_6 = getopt(VAR_0, VAR_1, \"CqP:\")) != EOF) {",
"swit... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[... |
27,092 | static void test_qemu_strtoull_decimal(void)
{
const char *str = "0123";
char f = 'X';
const char *endptr = &f;
uint64_t res = 999;
int err;
err = qemu_strtoull(str, &endptr, 10, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, 123);
g_assert(endptr == str +... | false | qemu | bc7c08a2c375acb7ae4d433054415588b176d34c | static void test_qemu_strtoull_decimal(void)
{
const char *str = "0123";
char f = 'X';
const char *endptr = &f;
uint64_t res = 999;
int err;
err = qemu_strtoull(str, &endptr, 10, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, 123);
g_assert(endptr == str +... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
const char *VAR_0 = "0123";
char VAR_1 = 'X';
const char *VAR_2 = &VAR_1;
uint64_t res = 999;
int VAR_3;
VAR_3 = qemu_strtoull(VAR_0, &VAR_2, 10, &res);
g_assert_cmpint(VAR_3, ==, 0);
g_assert_cmpint(res, ==, 123);
g_assert(VAR_2 == VAR_0 + st... | [
"static void FUNC_0(void)\n{",
"const char *VAR_0 = \"0123\";",
"char VAR_1 = 'X';",
"const char *VAR_2 = &VAR_1;",
"uint64_t res = 999;",
"int VAR_3;",
"VAR_3 = qemu_strtoull(VAR_0, &VAR_2, 10, &res);",
"g_assert_cmpint(VAR_3, ==, 0);",
"g_assert_cmpint(res, ==, 123);",
"g_assert(VAR_2 == VAR_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
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
27,093 | static uint64_t imx_timerp_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
IMXTimerPState *s = (IMXTimerPState *)opaque;
DPRINTF("p-read(offset=%x)", offset >> 2);
switch (offset >> 2) {
case 0: /* Control Register */
DPRINTF("cr %x\n", s->... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t imx_timerp_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
IMXTimerPState *s = (IMXTimerPState *)opaque;
DPRINTF("p-read(offset=%x)", offset >> 2);
switch (offset >> 2) {
case 0:
DPRINTF("cr %x\n", s->cr);
return s... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t offset,
unsigned size)
{
IMXTimerPState *s = (IMXTimerPState *)opaque;
DPRINTF("p-read(offset=%x)", offset >> 2);
switch (offset >> 2) {
case 0:
DPRINTF("cr %x\n", s->cr);
return s->cr;
... | [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t offset,\nunsigned size)\n{",
"IMXTimerPState *s = (IMXTimerPState *)opaque;",
"DPRINTF(\"p-read(offset=%x)\", offset >> 2);",
"switch (offset >> 2) {",
"case 0:\nDPRINTF(\"cr %x\\n\", s->cr);",
"return s->cr;",
"case 1:\nDPRINTF(\"int_level %x\\n\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
23,
25
],
[
27
],
[
31,
33
],
[
35
],
[
39,
41
],
[
43
],
[
47,
49
],
[
51
],
[
53,
55
],
[
57
],
... |
27,094 | static void tcg_out_brcond2(TCGContext *s, TCGCond cond, TCGReg al, TCGReg ah,
TCGReg bl, TCGReg bh, int label_index)
{
TCGCond b_cond = TCG_COND_NE;
TCGReg tmp = TCG_TMP1;
/* With branches, we emit between 4 and 9 insns with 2 or 3 branches.
With setcond, we emit ... | false | qemu | bec1631100323fac0900aea71043d5c4e22fc2fa | static void tcg_out_brcond2(TCGContext *s, TCGCond cond, TCGReg al, TCGReg ah,
TCGReg bl, TCGReg bh, int label_index)
{
TCGCond b_cond = TCG_COND_NE;
TCGReg tmp = TCG_TMP1;
switch (cond) {
case TCG_COND_EQ:
case TCG_COND_NE:
b_cond = cond;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(TCGContext *VAR_0, TCGCond VAR_1, TCGReg VAR_2, TCGReg VAR_3,
TCGReg VAR_4, TCGReg VAR_5, int VAR_6)
{
TCGCond b_cond = TCG_COND_NE;
TCGReg tmp = TCG_TMP1;
switch (VAR_1) {
case TCG_COND_EQ:
case TCG_COND_NE:
b_cond = VAR_... | [
"static void FUNC_0(TCGContext *VAR_0, TCGCond VAR_1, TCGReg VAR_2, TCGReg VAR_3,\nTCGReg VAR_4, TCGReg VAR_5, int VAR_6)\n{",
"TCGCond b_cond = TCG_COND_NE;",
"TCGReg tmp = TCG_TMP1;",
"switch (VAR_1) {",
"case TCG_COND_EQ:\ncase TCG_COND_NE:\nb_cond = VAR_1;",
"tmp = tcg_out_reduce_eq2(VAR_0, TCG_TMP0, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
19
],
[
21,
23,
25
],
[
27
],
[
29
],
[
33,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
]
] |
27,096 | static void legacy_mouse_event(DeviceState *dev, QemuConsole *src,
InputEvent *evt)
{
static const int bmap[INPUT_BUTTON__MAX] = {
[INPUT_BUTTON_LEFT] = MOUSE_EVENT_LBUTTON,
[INPUT_BUTTON_MIDDLE] = MOUSE_EVENT_MBUTTON,
[INPUT_BUTTON_RIGHT] = MOUSE_EVEN... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | static void legacy_mouse_event(DeviceState *dev, QemuConsole *src,
InputEvent *evt)
{
static const int bmap[INPUT_BUTTON__MAX] = {
[INPUT_BUTTON_LEFT] = MOUSE_EVENT_LBUTTON,
[INPUT_BUTTON_MIDDLE] = MOUSE_EVENT_MBUTTON,
[INPUT_BUTTON_RIGHT] = MOUSE_EVEN... | {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0, QemuConsole *VAR_1,
InputEvent *VAR_2)
{
static const int VAR_3[INPUT_BUTTON__MAX] = {
[INPUT_BUTTON_LEFT] = MOUSE_EVENT_LBUTTON,
[INPUT_BUTTON_MIDDLE] = MOUSE_EVENT_MBUTTON,
[INPUT_BUTTON_RIGHT] = MOUSE_EVENT_RBU... | [
"static void FUNC_0(DeviceState *VAR_0, QemuConsole *VAR_1,\nInputEvent *VAR_2)\n{",
"static const int VAR_3[INPUT_BUTTON__MAX] = {",
"[INPUT_BUTTON_LEFT] = MOUSE_EVENT_LBUTTON,\n[INPUT_BUTTON_MIDDLE] = MOUSE_EVENT_MBUTTON,\n[INPUT_BUTTON_RIGHT] = MOUSE_EVENT_RBUTTON,\n};",
"QEMUPutMouseEntry *s = (QEMUPut... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9,
11,
13,
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45,
47,
49,
51
],
[... |
27,097 | static int h264_slice_header_init(H264Context *h)
{
int nb_slices = (HAVE_THREADS &&
h->avctx->active_thread_type & FF_THREAD_SLICE) ?
h->avctx->thread_count : 1;
int i, ret;
ff_set_sar(h->avctx, h->sps.sar);
av_pix_fmt_get_chroma_sub_sample(h->avctx->pi... | false | FFmpeg | 3176217c60ca7828712985092d9102d331ea4f3d | static int h264_slice_header_init(H264Context *h)
{
int nb_slices = (HAVE_THREADS &&
h->avctx->active_thread_type & FF_THREAD_SLICE) ?
h->avctx->thread_count : 1;
int i, ret;
ff_set_sar(h->avctx, h->sps.sar);
av_pix_fmt_get_chroma_sub_sample(h->avctx->pi... | {
"code": [],
"line_no": []
} | static int FUNC_0(H264Context *VAR_0)
{
int VAR_1 = (HAVE_THREADS &&
VAR_0->avctx->active_thread_type & FF_THREAD_SLICE) ?
VAR_0->avctx->thread_count : 1;
int VAR_2, VAR_3;
ff_set_sar(VAR_0->avctx, VAR_0->sps.sar);
av_pix_fmt_get_chroma_sub_sample(VAR_0-... | [
"static int FUNC_0(H264Context *VAR_0)\n{",
"int VAR_1 = (HAVE_THREADS &&\nVAR_0->avctx->active_thread_type & FF_THREAD_SLICE) ?\nVAR_0->avctx->thread_count : 1;",
"int VAR_2, VAR_3;",
"ff_set_sar(VAR_0->avctx, VAR_0->sps.sar);",
"av_pix_fmt_get_chroma_sub_sample(VAR_0->avctx->pix_fmt,\n&VAR_0->chroma_x_shi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7,
9
],
[
11
],
[
15
],
[
17,
19
],
[
23
],
[
25
],
[
27,
29
],
[
31,
33
],
[
35
],
[
39
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
],
[
55
],
[... |
27,098 | int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
{
int i, ret;
Picture *pic;
s->mb_skipped = 0;
/* mark & release old frames */
if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr &&
s->last_picture_ptr != s->next_picture_ptr &&
s->last_picture_ptr-... | false | FFmpeg | dcc39ee10e82833ce24aa57926c00ffeb1948198 | int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
{
int i, ret;
Picture *pic;
s->mb_skipped = 0;
if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr &&
s->last_picture_ptr != s->next_picture_ptr &&
s->last_picture_ptr->f->buf[0]) {
ff_mpeg_... | {
"code": [],
"line_no": []
} | int FUNC_0(MpegEncContext *VAR_0, AVCodecContext *VAR_1)
{
int VAR_6, VAR_3;
Picture *pic;
VAR_0->mb_skipped = 0;
if (VAR_0->pict_type != AV_PICTURE_TYPE_B && VAR_0->last_picture_ptr &&
VAR_0->last_picture_ptr != VAR_0->next_picture_ptr &&
VAR_0->last_picture_ptr->f->buf[0... | [
"int FUNC_0(MpegEncContext *VAR_0, AVCodecContext *VAR_1)\n{",
"int VAR_6, VAR_3;",
"Picture *pic;",
"VAR_0->mb_skipped = 0;",
"if (VAR_0->pict_type != AV_PICTURE_TYPE_B && VAR_0->last_picture_ptr &&\nVAR_0->last_picture_ptr != VAR_0->next_picture_ptr &&\nVAR_0->last_picture_ptr->f->buf[0]) {",
"ff_mpeg_u... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15,
17,
19
],
[
21
],
[
23
],
[
31
],
[
33,
35,
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
53
],
[
55,
57
],
[
59
],
[
63
],
[... |
27,099 | static guint io_add_watch_poll(GIOChannel *channel,
IOCanReadHandler *fd_can_read,
GIOFunc fd_read,
gpointer user_data)
{
IOWatchPoll *iwp;
iwp = (IOWatchPoll *) g_source_new(&io_watch_poll_funcs, sizeof(IOWatch... | false | qemu | 1e885b25275fb6763eb947b1e53b2d6911b967a8 | static guint io_add_watch_poll(GIOChannel *channel,
IOCanReadHandler *fd_can_read,
GIOFunc fd_read,
gpointer user_data)
{
IOWatchPoll *iwp;
iwp = (IOWatchPoll *) g_source_new(&io_watch_poll_funcs, sizeof(IOWatch... | {
"code": [],
"line_no": []
} | static guint FUNC_0(GIOChannel *channel,
IOCanReadHandler *fd_can_read,
GIOFunc fd_read,
gpointer user_data)
{
IOWatchPoll *iwp;
iwp = (IOWatchPoll *) g_source_new(&io_watch_poll_funcs, sizeof(IOWatchPoll));
... | [
"static guint FUNC_0(GIOChannel *channel,\nIOCanReadHandler *fd_can_read,\nGIOFunc fd_read,\ngpointer user_data)\n{",
"IOWatchPoll *iwp;",
"iwp = (IOWatchPoll *) g_source_new(&io_watch_poll_funcs, sizeof(IOWatchPoll));",
"iwp->fd_can_read = fd_can_read;",
"iwp->opaque = user_data;",
"iwp->src = g_io_creat... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
]
] |
27,101 | int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc,
SocketAddress *localAddr,
SocketAddress *remoteAddr,
Error **errp)
{
int fd;
trace_qio_channel_socket_dgram_sync(ioc, localAddr, remoteAddr);
... | false | qemu | dfd100f242370886bb6732f70f1f7cbd8eb9fedc | int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc,
SocketAddress *localAddr,
SocketAddress *remoteAddr,
Error **errp)
{
int fd;
trace_qio_channel_socket_dgram_sync(ioc, localAddr, remoteAddr);
... | {
"code": [],
"line_no": []
} | int FUNC_0(QIOChannelSocket *VAR_0,
SocketAddress *VAR_1,
SocketAddress *VAR_2,
Error **VAR_3)
{
int VAR_4;
trace_qio_channel_socket_dgram_sync(VAR_0, VAR_1, VAR_2);
VAR_4 = socket_dgram(VAR_2, VAR... | [
"int FUNC_0(QIOChannelSocket *VAR_0,\nSocketAddress *VAR_1,\nSocketAddress *VAR_2,\nError **VAR_3)\n{",
"int VAR_4;",
"trace_qio_channel_socket_dgram_sync(VAR_0, VAR_1, VAR_2);",
"VAR_4 = socket_dgram(VAR_2, VAR_1, VAR_3);",
"if (VAR_4 < 0) {",
"trace_qio_channel_socket_dgram_fail(VAR_0);",
"return -1;"... | [
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
],
[
41
],
[
43
]
] |
27,103 | int ff_init_me(MpegEncContext *s){
MotionEstContext * const c= &s->me;
int cache_size= FFMIN(ME_MAP_SIZE>>ME_MAP_SHIFT, 1<<ME_MAP_SHIFT);
int dia_size= FFMAX(FFABS(s->avctx->dia_size)&255, FFABS(s->avctx->pre_dia_size)&255);
if(FFMIN(s->avctx->dia_size, s->avctx->pre_dia_size) < -ME_MAP_SIZE){
... | false | FFmpeg | 3a48e38ad0e37d89065843548414d367e70593bf | int ff_init_me(MpegEncContext *s){
MotionEstContext * const c= &s->me;
int cache_size= FFMIN(ME_MAP_SIZE>>ME_MAP_SHIFT, 1<<ME_MAP_SHIFT);
int dia_size= FFMAX(FFABS(s->avctx->dia_size)&255, FFABS(s->avctx->pre_dia_size)&255);
if(FFMIN(s->avctx->dia_size, s->avctx->pre_dia_size) < -ME_MAP_SIZE){
... | {
"code": [],
"line_no": []
} | int FUNC_0(MpegEncContext *VAR_0){
MotionEstContext * const c= &VAR_0->me;
int VAR_1= FFMIN(ME_MAP_SIZE>>ME_MAP_SHIFT, 1<<ME_MAP_SHIFT);
int VAR_2= FFMAX(FFABS(VAR_0->avctx->VAR_2)&255, FFABS(VAR_0->avctx->pre_dia_size)&255);
if(FFMIN(VAR_0->avctx->VAR_2, VAR_0->avctx->pre_dia_size) < -ME_MAP_SIZE... | [
"int FUNC_0(MpegEncContext *VAR_0){",
"MotionEstContext * const c= &VAR_0->me;",
"int VAR_1= FFMIN(ME_MAP_SIZE>>ME_MAP_SHIFT, 1<<ME_MAP_SHIFT);",
"int VAR_2= FFMAX(FFABS(VAR_0->avctx->VAR_2)&255, FFABS(VAR_0->avctx->pre_dia_size)&255);",
"if(FFMIN(VAR_0->avctx->VAR_2, VAR_0->avctx->pre_dia_size) < -ME_MAP_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
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
... |
27,105 | float32 float32_scalbn( float32 a, int n STATUS_PARAM )
{
flag aSign;
int16 aExp;
uint32_t aSig;
a = float32_squash_input_denormal(a STATUS_VAR);
aSig = extractFloat32Frac( a );
aExp = extractFloat32Exp( a );
aSign = extractFloat32Sign( a );
if ( aExp == 0xFF ) {
re... | true | qemu | 326b9e98a391d542cc33c4c91782ff4ba51edfc5 | float32 float32_scalbn( float32 a, int n STATUS_PARAM )
{
flag aSign;
int16 aExp;
uint32_t aSig;
a = float32_squash_input_denormal(a STATUS_VAR);
aSig = extractFloat32Frac( a );
aExp = extractFloat32Exp( a );
aSign = extractFloat32Sign( a );
if ( aExp == 0xFF ) {
re... | {
"code": [
" int16 aExp;",
" int16 aExp;",
" int16 aExp;"
],
"line_no": [
7,
7,
7
]
} | float32 FUNC_0( float32 a, int n STATUS_PARAM )
{
flag aSign;
int16 aExp;
uint32_t aSig;
a = float32_squash_input_denormal(a STATUS_VAR);
aSig = extractFloat32Frac( a );
aExp = extractFloat32Exp( a );
aSign = extractFloat32Sign( a );
if ( aExp == 0xFF ) {
return a;
... | [
"float32 FUNC_0( float32 a, int n STATUS_PARAM )\n{",
"flag aSign;",
"int16 aExp;",
"uint32_t aSig;",
"a = float32_squash_input_denormal(a STATUS_VAR);",
"aSig = extractFloat32Frac( a );",
"aExp = extractFloat32Exp( a );",
"aSign = extractFloat32Sign( a );",
"if ( aExp == 0xFF ) {",
"return a;",
... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33,
35
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
27,106 | void net_check_clients(void)
{
VLANState *vlan;
VLANClientState *vc;
int has_nic, has_host_dev;
QTAILQ_FOREACH(vlan, &vlans, next) {
QTAILQ_FOREACH(vc, &vlan->clients, next) {
switch (vc->info->type) {
case NET_CLIENT_TYPE_NIC:
has_nic = 1;
... | true | qemu | 64e69d50a394a48de7607f178d53c192443f9066 | void net_check_clients(void)
{
VLANState *vlan;
VLANClientState *vc;
int has_nic, has_host_dev;
QTAILQ_FOREACH(vlan, &vlans, next) {
QTAILQ_FOREACH(vc, &vlan->clients, next) {
switch (vc->info->type) {
case NET_CLIENT_TYPE_NIC:
has_nic = 1;
... | {
"code": [
" int has_nic, has_host_dev;"
],
"line_no": [
9
]
} | void FUNC_0(void)
{
VLANState *vlan;
VLANClientState *vc;
int VAR_0, VAR_1;
QTAILQ_FOREACH(vlan, &vlans, next) {
QTAILQ_FOREACH(vc, &vlan->clients, next) {
switch (vc->info->type) {
case NET_CLIENT_TYPE_NIC:
VAR_0 = 1;
break;
... | [
"void FUNC_0(void)\n{",
"VLANState *vlan;",
"VLANClientState *vc;",
"int VAR_0, VAR_1;",
"QTAILQ_FOREACH(vlan, &vlans, next) {",
"QTAILQ_FOREACH(vc, &vlan->clients, next) {",
"switch (vc->info->type) {",
"case NET_CLIENT_TYPE_NIC:\nVAR_0 = 1;",
"break;",
"case NET_CLIENT_TYPE_SLIRP:\ncase NET_CLIE... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27,
29,
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47,
49,
51,... |
27,108 | static uint32_t hpet_time_after64(uint64_t a, uint64_t b)
{
return ((int64_t)(b) - (int64_t)(a) < 0);
}
| true | qemu | d17008bc2914d62fd0af6a8f313604ae9f9a102c | static uint32_t hpet_time_after64(uint64_t a, uint64_t b)
{
return ((int64_t)(b) - (int64_t)(a) < 0);
}
| {
"code": [
" return ((int64_t)(b) - (int64_t)(a) < 0);"
],
"line_no": [
5
]
} | static uint32_t FUNC_0(uint64_t a, uint64_t b)
{
return ((int64_t)(b) - (int64_t)(a) < 0);
}
| [
"static uint32_t FUNC_0(uint64_t a, uint64_t b)\n{",
"return ((int64_t)(b) - (int64_t)(a) < 0);",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
27,109 | static void kvm_arm_gicv3_realize(DeviceState *dev, Error **errp)
{
GICv3State *s = KVM_ARM_GICV3(dev);
KVMARMGICv3Class *kgc = KVM_ARM_GICV3_GET_CLASS(s);
Error *local_err = NULL;
DPRINTF("kvm_arm_gicv3_realize\n");
kgc->parent_realize(dev, &local_err);
if (local_err) {
err... | true | qemu | d19a4d4ef448e736d341df47bd1adc78c8e40814 | static void kvm_arm_gicv3_realize(DeviceState *dev, Error **errp)
{
GICv3State *s = KVM_ARM_GICV3(dev);
KVMARMGICv3Class *kgc = KVM_ARM_GICV3_GET_CLASS(s);
Error *local_err = NULL;
DPRINTF("kvm_arm_gicv3_realize\n");
kgc->parent_realize(dev, &local_err);
if (local_err) {
err... | {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{
GICv3State *s = KVM_ARM_GICV3(VAR_0);
KVMARMGICv3Class *kgc = KVM_ARM_GICV3_GET_CLASS(s);
Error *local_err = NULL;
DPRINTF("FUNC_0\n");
kgc->parent_realize(VAR_0, &local_err);
if (local_err) {
error_propagate(VAR_1, loc... | [
"static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{",
"GICv3State *s = KVM_ARM_GICV3(VAR_0);",
"KVMARMGICv3Class *kgc = KVM_ARM_GICV3_GET_CLASS(s);",
"Error *local_err = NULL;",
"DPRINTF(\"FUNC_0\\n\");",
"kgc->parent_realize(VAR_0, &local_err);",
"if (local_err) {",
"error_propagate(VAR_1, loca... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
14
],
[
18
],
[
20
],
[
22
],
[
24
],
[
26
],
[
30
],
[
32,
34
],
[
36
],
[
38
],
[
42
],
[
48
],
[
50
],
[
52
],
[
54
],
[... |
27,110 | static TypeImpl *type_register_internal(const TypeInfo *info)
{
TypeImpl *ti = g_malloc0(sizeof(*ti));
int i;
g_assert(info->name != NULL);
if (type_table_lookup(info->name) != NULL) {
fprintf(stderr, "Registering `%s' which already exists\n", info->name);
abort();
}
... | true | qemu | b061dc41f62048acd4a34c6570c0ea396cd9d0b4 | static TypeImpl *type_register_internal(const TypeInfo *info)
{
TypeImpl *ti = g_malloc0(sizeof(*ti));
int i;
g_assert(info->name != NULL);
if (type_table_lookup(info->name) != NULL) {
fprintf(stderr, "Registering `%s' which already exists\n", info->name);
abort();
}
... | {
"code": [
"static TypeImpl *type_register_internal(const TypeInfo *info)",
" type_table_add(ti);"
],
"line_no": [
1,
69
]
} | static TypeImpl *FUNC_0(const TypeInfo *info)
{
TypeImpl *ti = g_malloc0(sizeof(*ti));
int VAR_0;
g_assert(info->name != NULL);
if (type_table_lookup(info->name) != NULL) {
fprintf(stderr, "Registering `%s' which already exists\n", info->name);
abort();
}
ti->name ... | [
"static TypeImpl *FUNC_0(const TypeInfo *info)\n{",
"TypeImpl *ti = g_malloc0(sizeof(*ti));",
"int VAR_0;",
"g_assert(info->name != NULL);",
"if (type_table_lookup(info->name) != NULL) {",
"fprintf(stderr, \"Registering `%s' which already exists\\n\", info->name);",
"abort();",
"}",
"ti->name = g_st... | [
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,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
55... |
27,111 | static int disas_vfp_insn(CPUState * env, DisasContext *s, uint32_t insn)
{
uint32_t rd, rn, rm, op, i, n, offset, delta_d, delta_m, bank_mask;
int dp, veclen;
TCGv addr;
TCGv tmp;
TCGv tmp2;
if (!arm_feature(env, ARM_FEATURE_VFP))
return 1;
if (!vfp_enabled(env)) {
... | true | qemu | 71b3c3dea21a310c5df7406cdc1cffc64cf14c18 | static int disas_vfp_insn(CPUState * env, DisasContext *s, uint32_t insn)
{
uint32_t rd, rn, rm, op, i, n, offset, delta_d, delta_m, bank_mask;
int dp, veclen;
TCGv addr;
TCGv tmp;
TCGv tmp2;
if (!arm_feature(env, ARM_FEATURE_VFP))
return 1;
if (!vfp_enabled(env)) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(CPUState * VAR_0, DisasContext *VAR_1, uint32_t VAR_2)
{
uint32_t rd, rn, rm, op, i, n, offset, delta_d, delta_m, bank_mask;
int VAR_3, VAR_4;
TCGv addr;
TCGv tmp;
TCGv tmp2;
if (!arm_feature(VAR_0, ARM_FEATURE_VFP))
return 1;
if (!vfp_enabled(VAR_0)) {... | [
"static int FUNC_0(CPUState * VAR_0, DisasContext *VAR_1, uint32_t VAR_2)\n{",
"uint32_t rd, rn, rm, op, i, n, offset, delta_d, delta_m, bank_mask;",
"int VAR_3, VAR_4;",
"TCGv addr;",
"TCGv tmp;",
"TCGv tmp2;",
"if (!arm_feature(VAR_0, ARM_FEATURE_VFP))\nreturn 1;",
"if (!vfp_enabled(VAR_0)) {",
"i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27,
29
],
[
31
],
[
33,
35,
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
51
],
[
53
],
[... |
27,112 | void drive_hot_add(Monitor *mon, const QDict *qdict)
{
int dom, pci_bus;
unsigned slot;
int type, bus;
PCIDevice *dev;
DriveInfo *dinfo = NULL;
const char *pci_addr = qdict_get_str(qdict, "pci_addr");
const char *opts = qdict_get_str(qdict, "opts");
BusState *scsibus;
din... | true | qemu | 30d335d68d93705eb346387c03bb6aca0f52454a | void drive_hot_add(Monitor *mon, const QDict *qdict)
{
int dom, pci_bus;
unsigned slot;
int type, bus;
PCIDevice *dev;
DriveInfo *dinfo = NULL;
const char *pci_addr = qdict_get_str(qdict, "pci_addr");
const char *opts = qdict_get_str(qdict, "opts");
BusState *scsibus;
din... | {
"code": [
" BusState *scsibus;",
" scsibus = QLIST_FIRST(&dev->qdev.child_bus);",
" scsi_bus_legacy_add_drive(DO_UPCAST(SCSIBus, qbus, scsibus),",
" dinfo, dinfo->unit);",
" monitor_printf(mon, \"OK bus %d, unit %d\\n\",",
" ... | void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{
int VAR_2, VAR_3;
unsigned VAR_4;
int VAR_5, VAR_6;
PCIDevice *dev;
DriveInfo *dinfo = NULL;
const char *VAR_7 = qdict_get_str(VAR_1, "VAR_7");
const char *VAR_8 = qdict_get_str(VAR_1, "VAR_8");
BusState *scsibus;
dinfo = ... | [
"void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)\n{",
"int VAR_2, VAR_3;",
"unsigned VAR_4;",
"int VAR_5, VAR_6;",
"PCIDevice *dev;",
"DriveInfo *dinfo = NULL;",
"const char *VAR_7 = qdict_get_str(VAR_1, \"VAR_7\");",
"const char *VAR_8 = qdict_get_str(VAR_1, \"VAR_8\");",
"BusState *scsibus;",
"d... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45,
47
... |
27,113 | static inline int msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
int n, int coded)
{
int level, i, last, run, run_diff;
int dc_pred_dir;
RLTable *rl;
RL_VLC_ELEM *rl_vlc;
const UINT8 *scan_table;
int qmul, qadd;
if (s->mb_intra) {
... | true | FFmpeg | 55078332495d879ad4aeb23ae2bada75130431c6 | static inline int msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
int n, int coded)
{
int level, i, last, run, run_diff;
int dc_pred_dir;
RLTable *rl;
RL_VLC_ELEM *rl_vlc;
const UINT8 *scan_table;
int qmul, qadd;
if (s->mb_intra) {
... | {
"code": [
" if(s->error_resilience<0){"
],
"line_no": [
453
]
} | static inline int FUNC_0(MpegEncContext * VAR_0, DCTELEM * VAR_1,
int VAR_2, int VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
int VAR_9;
RLTable *rl;
RL_VLC_ELEM *rl_vlc;
const UINT8 *VAR_10;
int VAR_11, VAR_12;
if (VAR_0->mb_intra) {
VAR_... | [
"static inline int FUNC_0(MpegEncContext * VAR_0, DCTELEM * VAR_1,\nint VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"int VAR_9;",
"RLTable *rl;",
"RL_VLC_ELEM *rl_vlc;",
"const UINT8 *VAR_10;",
"int VAR_11, VAR_12;",
"if (VAR_0->mb_intra) {",
"VAR_11=1;",
"VAR_12=0;",
"set_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
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49,... |
27,114 | static int usb_device_post_load(void *opaque, int version_id)
{
USBDevice *dev = opaque;
if (dev->state == USB_STATE_NOTATTACHED) {
dev->attached = 0;
} else {
dev->attached = 1;
return 0;
| true | qemu | c60174e847082ab9f70720f86509a3353f816fad | static int usb_device_post_load(void *opaque, int version_id)
{
USBDevice *dev = opaque;
if (dev->state == USB_STATE_NOTATTACHED) {
dev->attached = 0;
} else {
dev->attached = 1;
return 0;
| {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0, int VAR_1)
{
USBDevice *dev = VAR_0;
if (dev->state == USB_STATE_NOTATTACHED) {
dev->attached = 0;
} else {
dev->attached = 1;
return 0;
| [
"static int FUNC_0(void *VAR_0, int VAR_1)\n{",
"USBDevice *dev = VAR_0;",
"if (dev->state == USB_STATE_NOTATTACHED) {",
"dev->attached = 0;",
"} else {",
"dev->attached = 1;",
"return 0;"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
22
]
] |
27,116 | int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp)
{
struct addrinfo ai,*res,*e;
const char *addr;
char port[33];
char uaddr[INET6_ADDRSTRLEN+1];
char uport[33];
int slisten, rc, to, port_min, port_max, p;
memset(&ai,0, sizeof(ai));
ai.ai_flags = AI_PASSIVE | ... | true | qemu | 3de3d698d942d1116152417f882c897b26b44e41 | int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp)
{
struct addrinfo ai,*res,*e;
const char *addr;
char port[33];
char uaddr[INET6_ADDRSTRLEN+1];
char uport[33];
int slisten, rc, to, port_min, port_max, p;
memset(&ai,0, sizeof(ai));
ai.ai_flags = AI_PASSIVE | ... | {
"code": [
" ai.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;"
],
"line_no": [
21
]
} | int FUNC_0(QemuOpts *VAR_0, int VAR_1, Error **VAR_2)
{
struct addrinfo VAR_3,*VAR_4,*VAR_5;
const char *VAR_6;
char VAR_7[33];
char VAR_8[INET6_ADDRSTRLEN+1];
char VAR_9[33];
int VAR_10, VAR_11, VAR_12, VAR_13, VAR_14, VAR_15;
memset(&VAR_3,0, sizeof(VAR_3));
VAR_3.ai_flags =... | [
"int FUNC_0(QemuOpts *VAR_0, int VAR_1, Error **VAR_2)\n{",
"struct addrinfo VAR_3,*VAR_4,*VAR_5;",
"const char *VAR_6;",
"char VAR_7[33];",
"char VAR_8[INET6_ADDRSTRLEN+1];",
"char VAR_9[33];",
"int VAR_10, VAR_11, VAR_12, VAR_13, VAR_14, VAR_15;",
"memset(&VAR_3,0, sizeof(VAR_3));",
"VAR_3.ai_flag... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47,
49
... |
27,117 | static int oma_read_packet(AVFormatContext *s, AVPacket *pkt)
{
OMAContext *oc = s->priv_data;
AVStream *st = s->streams[0];
int packet_size = st->codec->block_align;
int byte_rate = st->codec->bit_rate >> 3;
int64_t pos = avio_tell(s->pb);
int ret = av_get_packet(s->pb,... | true | FFmpeg | 7c2fa13df9a6130b3f258c7513933cbdca2fe23b | static int oma_read_packet(AVFormatContext *s, AVPacket *pkt)
{
OMAContext *oc = s->priv_data;
AVStream *st = s->streams[0];
int packet_size = st->codec->block_align;
int byte_rate = st->codec->bit_rate >> 3;
int64_t pos = avio_tell(s->pb);
int ret = av_get_packet(s->pb,... | {
"code": [
" if (pos > 0) {"
],
"line_no": [
39
]
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
OMAContext *oc = VAR_0->priv_data;
AVStream *st = VAR_0->streams[0];
int VAR_2 = st->codec->block_align;
int VAR_3 = st->codec->bit_rate >> 3;
int64_t pos = avio_tell(VAR_0->pb);
int VAR_4 = av_get_packet(VAR_0... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"OMAContext *oc = VAR_0->priv_data;",
"AVStream *st = VAR_0->streams[0];",
"int VAR_2 = st->codec->block_align;",
"int VAR_3 = st->codec->bit_rate >> 3;",
"int64_t pos = avio_tell(VAR_0->pb);",
"int VAR_4 = av_get_packet(... | [
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
],
[
35
],
[
39
],
[
41,
43,
45
],
[
47
],
[
51
],
[
57,
59,
61
],
[... |
27,118 | void av_opt_set_defaults2(void *s, int mask, int flags)
{
#endif
const AVOption *opt = NULL;
while ((opt = av_opt_next(s, opt)) != NULL) {
#if FF_API_OLD_AVOPTIONS
if ((opt->flags & mask) != flags)
continue;
#endif
switch (opt->type) {
case AV_OPT_TYPE_CONST:
... | false | FFmpeg | 08d0969c1402ccec4dce44bd430128fb59d7b790 | void av_opt_set_defaults2(void *s, int mask, int flags)
{
#endif
const AVOption *opt = NULL;
while ((opt = av_opt_next(s, opt)) != NULL) {
#if FF_API_OLD_AVOPTIONS
if ((opt->flags & mask) != flags)
continue;
#endif
switch (opt->type) {
case AV_OPT_TYPE_CONST:
... | {
"code": [],
"line_no": []
} | void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)
{
#endif
const AVOption *VAR_3 = NULL;
while ((VAR_3 = av_opt_next(VAR_0, VAR_3)) != NULL) {
#if FF_API_OLD_AVOPTIONS
if ((VAR_3->VAR_2 & VAR_1) != VAR_2)
continue;
#endif
switch (VAR_3->type) {
case AV_OPT_TYPE_CON... | [
"void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)\n{",
"#endif\nconst AVOption *VAR_3 = NULL;",
"while ((VAR_3 = av_opt_next(VAR_0, VAR_3)) != NULL) {",
"#if FF_API_OLD_AVOPTIONS\nif ((VAR_3->VAR_2 & VAR_1) != VAR_2)\ncontinue;",
"#endif\nswitch (VAR_3->type) {",
"case AV_OPT_TYPE_CONST:\nbreak;",
"case A... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11,
13,
15
],
[
17,
19
],
[
21,
25
],
[
27,
29,
31,
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
27,119 | static int RENAME(resample_common)(ResampleContext *c,
void *dest, const void *source,
int n, int update_ctx)
{
DELEM *dst = dest;
const DELEM *src = source;
int dst_index;
int index= c->index;
int frac= c->frac;
int ... | true | FFmpeg | 65e33d8e23277bb96809842656482e0e3fe8746f | static int RENAME(resample_common)(ResampleContext *c,
void *dest, const void *source,
int n, int update_ctx)
{
DELEM *dst = dest;
const DELEM *src = source;
int dst_index;
int index= c->index;
int frac= c->frac;
int ... | {
"code": [
" FELEM2 val= FOFFSET;",
" for (i = 0; i < c->filter_length; i++) {",
" val += src[sample_index + i] * (FELEM2)filter[i];",
" OUT(dst[dst_index], val);"
],
"line_no": [
39,
43,
45,
49
]
} | static int FUNC_0(resample_common)(ResampleContext *c,
void *dest, const void *source,
int n, int update_ctx)
{
DELEM *dst = dest;
const DELEM *VAR_0 = source;
int VAR_1;
int VAR_2= c->VAR_2;
int VAR_3= c->VAR_3;
int ... | [
"static int FUNC_0(resample_common)(ResampleContext *c,\nvoid *dest, const void *source,\nint n, int update_ctx)\n{",
"DELEM *dst = dest;",
"const DELEM *VAR_0 = source;",
"int VAR_1;",
"int VAR_2= c->VAR_2;",
"int VAR_3= c->VAR_3;",
"int VAR_4 = 0;",
"while (VAR_2 >= c->phase_count) {",
"VAR_4++;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
27,120 | BdrvNextIterator *bdrv_next(BdrvNextIterator *it, BlockDriverState **bs)
{
if (!it) {
it = g_new(BdrvNextIterator, 1);
*it = (BdrvNextIterator) {
.phase = BDRV_NEXT_BACKEND_ROOTS,
};
}
/* First, return all root nodes of BlockBackends. In order to avoid
* r... | true | qemu | 88be7b4be4aa17c88247e162bdd7577ea79db94f | BdrvNextIterator *bdrv_next(BdrvNextIterator *it, BlockDriverState **bs)
{
if (!it) {
it = g_new(BdrvNextIterator, 1);
*it = (BdrvNextIterator) {
.phase = BDRV_NEXT_BACKEND_ROOTS,
};
}
if (it->phase == BDRV_NEXT_BACKEND_ROOTS) {
do {
... | {
"code": [
"BdrvNextIterator *bdrv_next(BdrvNextIterator *it, BlockDriverState **bs)",
" if (!it) {",
" it = g_new(BdrvNextIterator, 1);",
" *it = (BdrvNextIterator) {",
" .phase = BDRV_NEXT_BACKEND_ROOTS,",
" };",
" *bs = it->blk ? blk_bs(it-... | BdrvNextIterator *FUNC_0(BdrvNextIterator *it, BlockDriverState **bs)
{
if (!it) {
it = g_new(BdrvNextIterator, 1);
*it = (BdrvNextIterator) {
.phase = BDRV_NEXT_BACKEND_ROOTS,
};
}
if (it->phase == BDRV_NEXT_BACKEND_ROOTS) {
do {
... | [
"BdrvNextIterator *FUNC_0(BdrvNextIterator *it, BlockDriverState **bs)\n{",
"if (!it) {",
"it = g_new(BdrvNextIterator, 1);",
"*it = (BdrvNextIterator) {",
".phase = BDRV_NEXT_BACKEND_ROOTS,\n};",
"}",
"if (it->phase == BDRV_NEXT_BACKEND_ROOTS) {",
"do {",
"it->blk = blk_all_next(it->blk);",
"*bs ... | [
1,
1,
1,
1,
1,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0,
0,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
55
],
[
57
],
[
59
],
[... |
27,121 | static int channelmap_filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
{
AVFilterContext *ctx = inlink->dst;
AVFilterLink *outlink = ctx->outputs[0];
const ChannelMapContext *s = ctx->priv;
const int nch_in = av_get_channel_layout_nb_channels(inlink->channel_layout);
const int nch... | true | FFmpeg | 1afd7a118fd71536971f991b823c89f1c9e87509 | static int channelmap_filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
{
AVFilterContext *ctx = inlink->dst;
AVFilterLink *outlink = ctx->outputs[0];
const ChannelMapContext *s = ctx->priv;
const int nch_in = av_get_channel_layout_nb_channels(inlink->channel_layout);
const int nch... | {
"code": [
" buf->extended_data = new_extended_data;"
],
"line_no": [
45
]
} | static int FUNC_0(AVFilterLink *VAR_0, AVFilterBufferRef *VAR_1)
{
AVFilterContext *ctx = VAR_0->dst;
AVFilterLink *outlink = ctx->outputs[0];
const ChannelMapContext *VAR_2 = ctx->priv;
const int VAR_3 = av_get_channel_layout_nb_channels(VAR_0->channel_layout);
const int VAR_4 = VAR_2->nch;
... | [
"static int FUNC_0(AVFilterLink *VAR_0, AVFilterBufferRef *VAR_1)\n{",
"AVFilterContext *ctx = VAR_0->dst;",
"AVFilterLink *outlink = ctx->outputs[0];",
"const ChannelMapContext *VAR_2 = ctx->priv;",
"const int VAR_3 = av_get_channel_layout_nb_channels(VAR_0->channel_layout);",
"const int VAR_4 = VAR_2->... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
27,122 | static int encode_thread(AVCodecContext *c, void *arg){
MpegEncContext *s= *(void**)arg;
int mb_x, mb_y, pdif = 0;
int chr_h= 16>>s->chroma_y_shift;
int i, j;
MpegEncContext best_s, backup_s;
uint8_t bit_buf[2][MAX_MB_BYTES];
uint8_t bit_buf2[2][MAX_MB_BYTES];
uint8_t bit_buf_tex... | false | FFmpeg | 0bd485300e1a8bb0ba95df53da34562816120e31 | static int encode_thread(AVCodecContext *c, void *arg){
MpegEncContext *s= *(void**)arg;
int mb_x, mb_y, pdif = 0;
int chr_h= 16>>s->chroma_y_shift;
int i, j;
MpegEncContext best_s, backup_s;
uint8_t bit_buf[2][MAX_MB_BYTES];
uint8_t bit_buf2[2][MAX_MB_BYTES];
uint8_t bit_buf_tex... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1){
MpegEncContext *s= *(void**)VAR_1;
int VAR_2, VAR_3, VAR_4 = 0;
int VAR_5= 16>>s->chroma_y_shift;
int VAR_6, VAR_7;
MpegEncContext best_s, backup_s;
uint8_t bit_buf[2][MAX_MB_BYTES];
uint8_t bit_buf2[2][MAX_MB_BYTES];
uint8_t... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1){",
"MpegEncContext *s= *(void**)VAR_1;",
"int VAR_2, VAR_3, VAR_4 = 0;",
"int VAR_5= 16>>s->chroma_y_shift;",
"int VAR_6, VAR_7;",
"MpegEncContext best_s, backup_s;",
"uint8_t bit_buf[2][MAX_MB_BYTES];",
"uint8_t bit_buf2[2][MAX_MB_BYTES];",
"ui... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
27,123 | static void new_audio_stream(AVFormatContext *oc, int file_idx)
{
AVStream *st;
OutputStream *ost;
AVCodec *codec= NULL;
AVCodecContext *audio_enc;
enum CodecID codec_id = CODEC_ID_NONE;
if(!audio_stream_copy){
if (audio_codec_name) {
codec_id = find_codec_or_die(a... | false | FFmpeg | a9eb4f0899de04a3093a04f461611c6f0664398e | static void new_audio_stream(AVFormatContext *oc, int file_idx)
{
AVStream *st;
OutputStream *ost;
AVCodec *codec= NULL;
AVCodecContext *audio_enc;
enum CodecID codec_id = CODEC_ID_NONE;
if(!audio_stream_copy){
if (audio_codec_name) {
codec_id = find_codec_or_die(a... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVFormatContext *VAR_0, int VAR_1)
{
AVStream *st;
OutputStream *ost;
AVCodec *codec= NULL;
AVCodecContext *audio_enc;
enum CodecID VAR_2 = CODEC_ID_NONE;
if(!audio_stream_copy){
if (audio_codec_name) {
VAR_2 = find_codec_or_die(audio_codec_name,... | [
"static void FUNC_0(AVFormatContext *VAR_0, int VAR_1)\n{",
"AVStream *st;",
"OutputStream *ost;",
"AVCodec *codec= NULL;",
"AVCodecContext *audio_enc;",
"enum CodecID VAR_2 = CODEC_ID_NONE;",
"if(!audio_stream_copy){",
"if (audio_codec_name) {",
"VAR_2 = find_codec_or_die(audio_codec_name, AVMEDIA_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[... |
27,124 | static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd,
VirtQueueElement *elem)
{
struct virtio_net_ctrl_mac mac_data;
if (cmd != VIRTIO_NET_CTRL_MAC_TABLE_SET || elem->out_num != 3 ||
elem->out_sg[1].iov_len < sizeof(mac_data) ||
elem->out_sg[2].iov_... | true | qemu | 8fd2a2f1a9048b9e37a898c2a5e9ef59d0c1a095 | static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd,
VirtQueueElement *elem)
{
struct virtio_net_ctrl_mac mac_data;
if (cmd != VIRTIO_NET_CTRL_MAC_TABLE_SET || elem->out_num != 3 ||
elem->out_sg[1].iov_len < sizeof(mac_data) ||
elem->out_sg[2].iov_... | {
"code": [
" n->promisc = 1;",
" return VIRTIO_NET_OK;",
" } else",
" n->allmulti = 1;"
],
"line_no": [
49,
51,
81,
83
]
} | static int FUNC_0(VirtIONet *VAR_0, uint8_t VAR_1,
VirtQueueElement *VAR_2)
{
struct virtio_net_ctrl_mac VAR_3;
if (VAR_1 != VIRTIO_NET_CTRL_MAC_TABLE_SET || VAR_2->out_num != 3 ||
VAR_2->out_sg[1].iov_len < sizeof(VAR_3) ||
VAR_2->out_sg[2].iov_len < siz... | [
"static int FUNC_0(VirtIONet *VAR_0, uint8_t VAR_1,\nVirtQueueElement *VAR_2)\n{",
"struct virtio_net_ctrl_mac VAR_3;",
"if (VAR_1 != VIRTIO_NET_CTRL_MAC_TABLE_SET || VAR_2->out_num != 3 ||\nVAR_2->out_sg[1].iov_len < sizeof(VAR_3) ||\nVAR_2->out_sg[2].iov_len < sizeof(VAR_3))\nreturn VIRTIO_NET_ERR;",
"VAR_0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11,
13,
15,
17
],
[
21
],
[
23
],
[
27
],
[
31,
33,
35
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
57
],
[
61,
63... |
27,125 | static ssize_t vnc_tls_pull(gnutls_transport_ptr_t transport,
void *data,
size_t len) {
VncState *vs = (VncState *)transport;
int ret;
retry:
ret = qemu_recv(vs->csock, data, len, 0);
if (ret < 0) {
if (errno == EINTR)
... | true | qemu | 3e305e4a4752f70c0b5c3cf5b43ec957881714f7 | static ssize_t vnc_tls_pull(gnutls_transport_ptr_t transport,
void *data,
size_t len) {
VncState *vs = (VncState *)transport;
int ret;
retry:
ret = qemu_recv(vs->csock, data, len, 0);
if (ret < 0) {
if (errno == EINTR)
... | {
"code": [
" int ret;",
" size_t len) {",
" VncState *vs = (VncState *)transport;",
" int ret;",
" retry:",
" if (ret < 0) {",
" if (errno == EINTR)",
" goto retry;",
" return -1;",
" return ret;",
"static ... | static ssize_t FUNC_0(gnutls_transport_ptr_t transport,
void *data,
size_t len) {
VncState *vs = (VncState *)transport;
int VAR_0;
retry:
VAR_0 = qemu_recv(vs->csock, data, len, 0);
if (VAR_0 < 0) {
if (errno == EINTR)
... | [
"static ssize_t FUNC_0(gnutls_transport_ptr_t transport,\nvoid *data,\nsize_t len) {",
"VncState *vs = (VncState *)transport;",
"int VAR_0;",
"retry:\nVAR_0 = qemu_recv(vs->csock, data, len, 0);",
"if (VAR_0 < 0) {",
"if (errno == EINTR)\ngoto retry;",
"return -1;",
"}",
"return VAR_0;",
"}"
] | [
1,
1,
1,
1,
1,
1,
1,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13,
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
27,126 | file_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
{
HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(backend);
if (!backend->size) {
error_setg(errp, "can't create backend with size 0");
return;
}
if (!fb->mem_path) {
error_setg(errp, "mem-path property... | true | qemu | 696b55017d90b3237ca9d656aa4904d6b5c46c7a | file_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
{
HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(backend);
if (!backend->size) {
error_setg(errp, "can't create backend with size 0");
return;
}
if (!fb->mem_path) {
error_setg(errp, "mem-path property... | {
"code": [
" object_get_canonical_path(OBJECT(backend)),"
],
"line_no": [
37
]
} | FUNC_0(HostMemoryBackend *VAR_0, Error **VAR_1)
{
HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(VAR_0);
if (!VAR_0->size) {
error_setg(VAR_1, "can't create VAR_0 with size 0");
return;
}
if (!fb->mem_path) {
error_setg(VAR_1, "mem-path property not set");
ret... | [
"FUNC_0(HostMemoryBackend *VAR_0, Error **VAR_1)\n{",
"HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(VAR_0);",
"if (!VAR_0->size) {",
"error_setg(VAR_1, \"can't create VAR_0 with size 0\");",
"return;",
"}",
"if (!fb->mem_path) {",
"error_setg(VAR_1, \"mem-path property not set\");",
"return;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29,
31
],
[
33
],
[
35,
37,
39,
41
],
[
43
],
[
45,
47
]
] |
27,127 | sorecvoob(struct socket *so)
{
struct tcpcb *tp = sototcpcb(so);
DEBUG_CALL("sorecvoob");
DEBUG_ARG("so = %p", so);
/*
* We take a guess at how much urgent data has arrived.
* In most situations, when urgent data arrives, the next
* read() should get all the urgent data. This guess will
* be w... | true | qemu | bfb1ac14029ee72b19296109fba880c0551755d5 | sorecvoob(struct socket *so)
{
struct tcpcb *tp = sototcpcb(so);
DEBUG_CALL("sorecvoob");
DEBUG_ARG("so = %p", so);
soread(so);
tp->snd_up = tp->snd_una + so->so_snd.sb_cc;
tp->t_force = 1;
tcp_output(tp);
tp->t_force = 0;
}
| {
"code": [
"\tsoread(so);",
"\ttp->snd_up = tp->snd_una + so->so_snd.sb_cc;",
"\ttp->t_force = 1;",
"\ttcp_output(tp);",
"\ttp->t_force = 0;"
],
"line_no": [
31,
33,
35,
37,
39
]
} | FUNC_0(struct socket *VAR_0)
{
struct tcpcb *VAR_1 = sototcpcb(VAR_0);
DEBUG_CALL("FUNC_0");
DEBUG_ARG("VAR_0 = %p", VAR_0);
soread(VAR_0);
VAR_1->snd_up = VAR_1->snd_una + VAR_0->so_snd.sb_cc;
VAR_1->t_force = 1;
tcp_output(VAR_1);
VAR_1->t_force = 0;
}
| [
"FUNC_0(struct socket *VAR_0)\n{",
"struct tcpcb *VAR_1 = sototcpcb(VAR_0);",
"DEBUG_CALL(\"FUNC_0\");",
"DEBUG_ARG(\"VAR_0 = %p\", VAR_0);",
"soread(VAR_0);",
"VAR_1->snd_up = VAR_1->snd_una + VAR_0->so_snd.sb_cc;",
"VAR_1->t_force = 1;",
"tcp_output(VAR_1);",
"VAR_1->t_force = 0;",
"}"
] | [
0,
0,
0,
0,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
27,128 | static uint32_t cmos_ioport_read(void *opaque, uint32_t addr)
{
RTCState *s = opaque;
int ret;
if ((addr & 1) == 0) {
return 0xff;
} else {
switch(s->cmos_index) {
case RTC_SECONDS:
case RTC_MINUTES:
case RTC_HOURS:
case RTC_DAY_OF_WEEK:
... | true | qemu | 93b665693dd4afd32c89b0d5ee2b407b26a7a3bc | static uint32_t cmos_ioport_read(void *opaque, uint32_t addr)
{
RTCState *s = opaque;
int ret;
if ((addr & 1) == 0) {
return 0xff;
} else {
switch(s->cmos_index) {
case RTC_SECONDS:
case RTC_MINUTES:
case RTC_HOURS:
case RTC_DAY_OF_WEEK:
... | {
"code": [
"#ifdef TARGET_I386",
"#endif",
"#ifdef TARGET_I386",
" if(s->irq_coalesced) {",
" apic_reset_irq_delivered();",
" qemu_irq_raise(s->irq);",
" if (apic_get_irq_delivered())",
" s->irq_coalesced--;",
... | static uint32_t FUNC_0(void *opaque, uint32_t addr)
{
RTCState *s = opaque;
int VAR_0;
if ((addr & 1) == 0) {
return 0xff;
} else {
switch(s->cmos_index) {
case RTC_SECONDS:
case RTC_MINUTES:
case RTC_HOURS:
case RTC_DAY_OF_WEEK:
case R... | [
"static uint32_t FUNC_0(void *opaque, uint32_t addr)\n{",
"RTCState *s = opaque;",
"int VAR_0;",
"if ((addr & 1) == 0) {",
"return 0xff;",
"} else {",
"switch(s->cmos_index) {",
"case RTC_SECONDS:\ncase RTC_MINUTES:\ncase RTC_HOURS:\ncase RTC_DAY_OF_WEEK:\ncase RTC_DAY_OF_MONTH:\ncase RTC_MONTH:\ncase... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17,
19,
21,
23,
25,
27,
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47,
49
],
[
51
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.