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 |
|---|---|---|---|---|---|---|---|---|---|---|
9,838 | static void initMMX2HScaler(int dstW, int xInc, uint8_t *funnyCode)
{
uint8_t *fragment;
int imm8OfPShufW1;
int imm8OfPShufW2;
int fragmentLength;
int xpos, i;
// create an optimized horizontal scaling routine
//code fragment
asm volatile(
"jmp 9f \n\t"
// Begin
"0: \n\t"
"movq... | true | FFmpeg | b7dc6f662868fbdad779c61c233b1d19d8b89d3c | static void initMMX2HScaler(int dstW, int xInc, uint8_t *funnyCode)
{
uint8_t *fragment;
int imm8OfPShufW1;
int imm8OfPShufW2;
int fragmentLength;
int xpos, i;
asm volatile(
"jmp 9f \n\t"
"0: \n\t"
"movq (%%esi), %%mm0 \n\t"
"movq %%mm0, %%mm1 \n\t"
"psrlq $8, %%mm0... | {
"code": [
"static void initMMX2HScaler(int dstW, int xInc, uint8_t *funnyCode)",
"\tuint8_t *fragment;",
"\tint imm8OfPShufW1;",
"\tint imm8OfPShufW2;",
"\tint fragmentLength;",
"\t\t\"movq %%mm0, %%mm1\t\t\\n\\t\"",
"\t\t\"psrlq $8, %%mm0\t\t\\n\\t\"",
"\t\t\"punpcklbw %%mm7, %%mm1\... | static void FUNC_0(int VAR_0, int VAR_1, uint8_t *VAR_2)
{
uint8_t *fragment;
int VAR_3;
int VAR_4;
int VAR_5;
int VAR_6, VAR_7;
asm volatile(
"jmp 9f \n\t"
"0: \n\t"
"movq (%%esi), %%mm0 \n\t"
"movq %%mm0, %%mm1 \n\t"
"psrlq $8, %%mm0 \n\t"
"punpcklbw %%mm7, %%... | [
"static void FUNC_0(int VAR_0, int VAR_1, uint8_t *VAR_2)\n{",
"uint8_t *fragment;",
"int VAR_3;",
"int VAR_4;",
"int VAR_5;",
"int VAR_6, VAR_7;",
"asm volatile(\n\"jmp 9f\t\t\t\t\\n\\t\"\n\"0:\t\t\t\t\\n\\t\"\n\"movq (%%esi), %%mm0\t\t\\n\\t\"\n\"movq %%mm0, %%mm1\t\t\\n\\t\"\n\"psrlq $8, %%mm0\t\t\\n... | [
1,
1,
1,
1,
1,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
27,
29,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,
63,
65,
67,
69,
73,
77,
81,
85,
87,
89,... |
9,839 | static void *acpi_add_rom_blob(AcpiBuildState *build_state, GArray *blob,
const char *name)
{
return rom_add_blob(name, blob->data, acpi_data_len(blob), -1, name,
acpi_build_update, build_state);
}
| true | qemu | ad5b88b1f198182642b6cbf3dacb4cade0c80fb9 | static void *acpi_add_rom_blob(AcpiBuildState *build_state, GArray *blob,
const char *name)
{
return rom_add_blob(name, blob->data, acpi_data_len(blob), -1, name,
acpi_build_update, build_state);
}
| {
"code": [
"static void *acpi_add_rom_blob(AcpiBuildState *build_state, GArray *blob,"
],
"line_no": [
1
]
} | static void *FUNC_0(AcpiBuildState *VAR_0, GArray *VAR_1,
const char *VAR_2)
{
return rom_add_blob(VAR_2, VAR_1->data, acpi_data_len(VAR_1), -1, VAR_2,
acpi_build_update, VAR_0);
}
| [
"static void *FUNC_0(AcpiBuildState *VAR_0, GArray *VAR_1,\nconst char *VAR_2)\n{",
"return rom_add_blob(VAR_2, VAR_1->data, acpi_data_len(VAR_1), -1, VAR_2,\nacpi_build_update, VAR_0);",
"}"
] | [
1,
0,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
11
]
] |
9,840 | static void reclaim_ramblock(RAMBlock *block)
{
if (block->flags & RAM_PREALLOC) {
;
} else if (xen_enabled()) {
xen_invalidate_map_cache_entry(block->host);
#ifndef _WIN32
} else if (block->fd >= 0) {
munmap(block->host, block->max_length);
close(block->fd);
#endif... | true | qemu | 8561c9244ddf1122dfe7ccac9b23f506062f1499 | static void reclaim_ramblock(RAMBlock *block)
{
if (block->flags & RAM_PREALLOC) {
;
} else if (xen_enabled()) {
xen_invalidate_map_cache_entry(block->host);
#ifndef _WIN32
} else if (block->fd >= 0) {
munmap(block->host, block->max_length);
close(block->fd);
#endif... | {
"code": [
" munmap(block->host, block->max_length);"
],
"line_no": [
17
]
} | static void FUNC_0(RAMBlock *VAR_0)
{
if (VAR_0->flags & RAM_PREALLOC) {
;
} else if (xen_enabled()) {
xen_invalidate_map_cache_entry(VAR_0->host);
#ifndef _WIN32
} else if (VAR_0->fd >= 0) {
munmap(VAR_0->host, VAR_0->max_length);
close(VAR_0->fd);
#endif
} el... | [
"static void FUNC_0(RAMBlock *VAR_0)\n{",
"if (VAR_0->flags & RAM_PREALLOC) {",
";",
"} else if (xen_enabled()) {",
"xen_invalidate_map_cache_entry(VAR_0->host);",
"#ifndef _WIN32\n} else if (VAR_0->fd >= 0) {",
"munmap(VAR_0->host, VAR_0->max_length);",
"close(VAR_0->fd);",
"#endif\n} else {",
"q... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
9,841 | static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pict, int *got_packet)
{
const AVFrame *const p = pict;
const int near = avctx->prediction_method;
PutBitContext pb, pb2;
GetBitContext gb;
uint8_t *buf2, *zero, *cur, *last;... | true | FFmpeg | 3919a4572690894d0a7ad4170d699c52b4748194 | static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pict, int *got_packet)
{
const AVFrame *const p = pict;
const int near = avctx->prediction_method;
PutBitContext pb, pb2;
GetBitContext gb;
uint8_t *buf2, *zero, *cur, *last;... | {
"code": [
" uint8_t *buf2, *zero, *cur, *last;",
" zero = av_mallocz(p->linesize[0]);",
" last = zero;",
" av_free(zero);",
" av_free(state);",
" av_free(buf2);"
],
"line_no": [
15,
127,
129,
229,
231,
273
]
} | static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,
const AVFrame *VAR_2, int *VAR_3)
{
const AVFrame *const VAR_4 = VAR_2;
const int VAR_5 = VAR_0->prediction_method;
PutBitContext pb, pb2;
GetBitContext gb;
uint8_t *buf2, *zero, *cur, *last;
J... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{",
"const AVFrame *const VAR_4 = VAR_2;",
"const int VAR_5 = VAR_0->prediction_method;",
"PutBitContext pb, pb2;",
"GetBitContext gb;",
"uint8_t *buf2, *zero, *cur, *last;",
"JLSState *state;",
"int... | [
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27,
29
],
[
31,
33
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
53
],
[... |
9,843 | static int bmp_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
BMPContext *s = avctx->priv_data;
AVFrame *picture = data;
AVFrame *p = &s->... | true | FFmpeg | 2fed05f53a881b64a02de7a324d67d8c029c6cf1 | static int bmp_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
BMPContext *s = avctx->priv_data;
AVFrame *picture = data;
AVFrame *p = &s->... | {
"code": [
" ((uint32_t*)p->data[1])[i] = (0xff<<24) | bytestream_get_le24(&buf);"
],
"line_no": [
449
]
} | 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;
BMPContext *s = VAR_0->priv_data;
AVFrame *picture = VAR_1;
AVFrame *p = &s->picture;
... | [
"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;",
"BMPContext *s = VAR_0->priv_data;",
"AVFrame *picture = VAR_1;",
"AVFrame *p = &s->picture;",
"unsigned int VAR_6, VAR_7;",
"int VAR_8, VAR_9;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
... |
9,844 | static void raven_realize(PCIDevice *d, Error **errp)
{
RavenPCIState *s = RAVEN_PCI_DEVICE(d);
char *filename;
int bios_size = -1;
d->config[0x0C] = 0x08; // cache_line_size
d->config[0x0D] = 0x10; // latency_timer
d->config[0x34] = 0x00; // capabilities_pointer
memory_region_in... | true | qemu | f8ed85ac992c48814d916d5df4d44f9a971c5de4 | static void raven_realize(PCIDevice *d, Error **errp)
{
RavenPCIState *s = RAVEN_PCI_DEVICE(d);
char *filename;
int bios_size = -1;
d->config[0x0C] = 0x08;
d->config[0x0D] = 0x10;
d->config[0x34] = 0x00;
memory_region_init_ram(&s->bios, OBJECT(s), "bios", BIOS_SIZE,
... | {
"code": [
" &error_abort);",
" &error_abort);",
" &error_abort);",
" &error_abort);",
" &error_abort);",
" &error_abort);",
" ... | static void FUNC_0(PCIDevice *VAR_0, Error **VAR_1)
{
RavenPCIState *s = RAVEN_PCI_DEVICE(VAR_0);
char *VAR_2;
int VAR_3 = -1;
VAR_0->config[0x0C] = 0x08;
VAR_0->config[0x0D] = 0x10;
VAR_0->config[0x34] = 0x00;
memory_region_init_ram(&s->bios, OBJECT(s), "bios", BIOS_SIZE,
... | [
"static void FUNC_0(PCIDevice *VAR_0, Error **VAR_1)\n{",
"RavenPCIState *s = RAVEN_PCI_DEVICE(VAR_0);",
"char *VAR_2;",
"int VAR_3 = -1;",
"VAR_0->config[0x0C] = 0x08;",
"VAR_0->config[0x0D] = 0x10;",
"VAR_0->config[0x34] = 0x00;",
"memory_region_init_ram(&s->bios, OBJECT(s), \"bios\", BIOS_SIZE,\n&e... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[... |
9,847 | minimac2_write(void *opaque, target_phys_addr_t addr, uint64_t value,
unsigned size)
{
MilkymistMinimac2State *s = opaque;
trace_milkymist_minimac2_memory_read(addr, value);
addr >>= 2;
switch (addr) {
case R_MDIO:
{
/* MDIO_DI is read only */
int mdi... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | minimac2_write(void *opaque, target_phys_addr_t addr, uint64_t value,
unsigned size)
{
MilkymistMinimac2State *s = opaque;
trace_milkymist_minimac2_memory_read(addr, value);
addr >>= 2;
switch (addr) {
case R_MDIO:
{
int mdio_di = (s->regs[R_MDIO] & ... | {
"code": [],
"line_no": []
} | FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint64_t VAR_2,
unsigned VAR_3)
{
MilkymistMinimac2State *s = VAR_0;
trace_milkymist_minimac2_memory_read(VAR_1, VAR_2);
VAR_1 >>= 2;
switch (VAR_1) {
case R_MDIO:
{
int VAR_4 = (s->regs[R_MDIO] & MDIO_DI... | [
"FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint64_t VAR_2,\nunsigned VAR_3)\n{",
"MilkymistMinimac2State *s = VAR_0;",
"trace_milkymist_minimac2_memory_read(VAR_1, VAR_2);",
"VAR_1 >>= 2;",
"switch (VAR_1) {",
"case R_MDIO:\n{",
"int VAR_4 = (s->regs[R_MDIO] & MDIO_DI);",
"s->regs[R_MDIO] = VAR_2;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
... |
9,848 | int bdrv_in_use(BlockDriverState *bs)
{
return bs->in_use;
}
| false | qemu | 3718d8ab65f68de2acccbe6a315907805f54e3cc | int bdrv_in_use(BlockDriverState *bs)
{
return bs->in_use;
}
| {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0)
{
return VAR_0->in_use;
}
| [
"int FUNC_0(BlockDriverState *VAR_0)\n{",
"return VAR_0->in_use;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
9,849 | static void vhost_log_start(MemoryListener *listener,
MemoryRegionSection *section)
{
/* FIXME: implement */
}
| false | qemu | b2dfd71c4843a762f2befe702adb249cf55baf66 | static void vhost_log_start(MemoryListener *listener,
MemoryRegionSection *section)
{
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(MemoryListener *VAR_0,
MemoryRegionSection *VAR_1)
{
}
| [
"static void FUNC_0(MemoryListener *VAR_0,\nMemoryRegionSection *VAR_1)\n{",
"}"
] | [
0,
0
] | [
[
1,
3,
5
],
[
9
]
] |
9,850 | static inline void tcg_out_addi(TCGContext *s, int reg, tcg_target_long val)
{
if (val != 0) {
if (val == (val & 0xfff))
tcg_out_arithi(s, reg, reg, val, ARITH_ADD);
else
fprintf(stderr, "unimplemented addi %ld\n", (long)val);
}
}
| false | qemu | f02ca5cbeaf86038834c1953247a1579d7921927 | static inline void tcg_out_addi(TCGContext *s, int reg, tcg_target_long val)
{
if (val != 0) {
if (val == (val & 0xfff))
tcg_out_arithi(s, reg, reg, val, ARITH_ADD);
else
fprintf(stderr, "unimplemented addi %ld\n", (long)val);
}
}
| {
"code": [],
"line_no": []
} | static inline void FUNC_0(TCGContext *VAR_0, int VAR_1, tcg_target_long VAR_2)
{
if (VAR_2 != 0) {
if (VAR_2 == (VAR_2 & 0xfff))
tcg_out_arithi(VAR_0, VAR_1, VAR_1, VAR_2, ARITH_ADD);
else
fprintf(stderr, "unimplemented addi %ld\n", (long)VAR_2);
}
}
| [
"static inline void FUNC_0(TCGContext *VAR_0, int VAR_1, tcg_target_long VAR_2)\n{",
"if (VAR_2 != 0) {",
"if (VAR_2 == (VAR_2 & 0xfff))\ntcg_out_arithi(VAR_0, VAR_1, VAR_1, VAR_2, ARITH_ADD);",
"else\nfprintf(stderr, \"unimplemented addi %ld\\n\", (long)VAR_2);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13
],
[
15
],
[
17
]
] |
9,851 | static void pl110_update_display(void *opaque)
{
PL110State *s = (PL110State *)opaque;
SysBusDevice *sbd;
DisplaySurface *surface = qemu_console_surface(s->con);
drawfn* fntable;
drawfn fn;
int dest_width;
int src_width;
int bpp_offset;
int first;
int last;
if (... | false | qemu | c1076c3e13a86140cc2ba29866512df8460cc7c2 | static void pl110_update_display(void *opaque)
{
PL110State *s = (PL110State *)opaque;
SysBusDevice *sbd;
DisplaySurface *surface = qemu_console_surface(s->con);
drawfn* fntable;
drawfn fn;
int dest_width;
int src_width;
int bpp_offset;
int first;
int last;
if (... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
PL110State *s = (PL110State *)VAR_0;
SysBusDevice *sbd;
DisplaySurface *surface = qemu_console_surface(s->con);
drawfn* fntable;
drawfn fn;
int VAR_1;
int VAR_2;
int VAR_3;
int VAR_4;
int VAR_5;
if (!pl110_enabled(s)) {
... | [
"static void FUNC_0(void *VAR_0)\n{",
"PL110State *s = (PL110State *)VAR_0;",
"SysBusDevice *sbd;",
"DisplaySurface *surface = qemu_console_surface(s->con);",
"drawfn* fntable;",
"drawfn fn;",
"int VAR_1;",
"int VAR_2;",
"int VAR_3;",
"int VAR_4;",
"int VAR_5;",
"if (!pl110_enabled(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
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41,
43
],
[
45,
47
],
[
49
... |
9,852 | static void nvdimm_build_nvdimm_devices(GSList *device_list, Aml *root_dev)
{
for (; device_list; device_list = device_list->next) {
DeviceState *dev = device_list->data;
int slot = object_property_get_int(OBJECT(dev), PC_DIMM_SLOT_PROP,
NULL);
... | false | qemu | 732b530c1bd064bdcc29975c0b78fc6de8c47e7f | static void nvdimm_build_nvdimm_devices(GSList *device_list, Aml *root_dev)
{
for (; device_list; device_list = device_list->next) {
DeviceState *dev = device_list->data;
int slot = object_property_get_int(OBJECT(dev), PC_DIMM_SLOT_PROP,
NULL);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(GSList *VAR_0, Aml *VAR_1)
{
for (; VAR_0; VAR_0 = VAR_0->next) {
DeviceState *dev = VAR_0->data;
int slot = object_property_get_int(OBJECT(dev), PC_DIMM_SLOT_PROP,
NULL);
uint32_t handle = nvdimm_slot_to_handle(slot);
... | [
"static void FUNC_0(GSList *VAR_0, Aml *VAR_1)\n{",
"for (; VAR_0; VAR_0 = VAR_0->next) {",
"DeviceState *dev = VAR_0->data;",
"int slot = object_property_get_int(OBJECT(dev), PC_DIMM_SLOT_PROP,\nNULL);",
"uint32_t handle = nvdimm_slot_to_handle(slot);",
"Aml *nvdimm_dev;",
"nvdimm_dev = aml_device(\"NV... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13
],
[
15
],
[
19
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
]
] |
9,853 | int coroutine_fn bdrv_co_readv(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
trace_bdrv_co_readv(bs, sector_num, nb_sectors);
return bdrv_co_do_readv(bs, sector_num, nb_sectors, qiov, 0);
}
| false | qemu | 61007b316cd71ee7333ff7a0a749a8949527575f | int coroutine_fn bdrv_co_readv(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
trace_bdrv_co_readv(bs, sector_num, nb_sectors);
return bdrv_co_do_readv(bs, sector_num, nb_sectors, qiov, 0);
}
| {
"code": [],
"line_no": []
} | int VAR_0 bdrv_co_readv(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
trace_bdrv_co_readv(bs, sector_num, nb_sectors);
return bdrv_co_do_readv(bs, sector_num, nb_sectors, qiov, 0);
}
| [
"int VAR_0 bdrv_co_readv(BlockDriverState *bs, int64_t sector_num,\nint nb_sectors, QEMUIOVector *qiov)\n{",
"trace_bdrv_co_readv(bs, sector_num, nb_sectors);",
"return bdrv_co_do_readv(bs, sector_num, nb_sectors, qiov, 0);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
]
] |
9,854 | static void test_qemu_strtosz_float(void)
{
const char *str = "12.345M";
char *endptr = NULL;
int64_t res;
res = qemu_strtosz(str, &endptr);
g_assert_cmpint(res, ==, 12.345 * M_BYTE);
g_assert(endptr == str + 7);
}
| false | qemu | f17fd4fdf0df3d2f3444399d04c38d22b9a3e1b7 | static void test_qemu_strtosz_float(void)
{
const char *str = "12.345M";
char *endptr = NULL;
int64_t res;
res = qemu_strtosz(str, &endptr);
g_assert_cmpint(res, ==, 12.345 * M_BYTE);
g_assert(endptr == str + 7);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
const char *VAR_0 = "12.345M";
char *VAR_1 = NULL;
int64_t res;
res = qemu_strtosz(VAR_0, &VAR_1);
g_assert_cmpint(res, ==, 12.345 * M_BYTE);
g_assert(VAR_1 == VAR_0 + 7);
}
| [
"static void FUNC_0(void)\n{",
"const char *VAR_0 = \"12.345M\";",
"char *VAR_1 = NULL;",
"int64_t res;",
"res = qemu_strtosz(VAR_0, &VAR_1);",
"g_assert_cmpint(res, ==, 12.345 * M_BYTE);",
"g_assert(VAR_1 == VAR_0 + 7);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
9,855 | int i2c_start_transfer(I2CBus *bus, uint8_t address, int recv)
{
BusChild *kid;
I2CSlaveClass *sc;
I2CNode *node;
if (address == I2C_BROADCAST) {
/*
* This is a broadcast, the current_devs will be all the devices of the
* bus.
*/
bus->broadcast = tr... | false | qemu | 0fa758c3a069bc59a0d903d69028971c46d1a119 | int i2c_start_transfer(I2CBus *bus, uint8_t address, int recv)
{
BusChild *kid;
I2CSlaveClass *sc;
I2CNode *node;
if (address == I2C_BROADCAST) {
bus->broadcast = true;
}
QTAILQ_FOREACH(kid, &bus->qbus.children, sibling) {
DeviceState *qdev = kid->chi... | {
"code": [],
"line_no": []
} | int FUNC_0(I2CBus *VAR_0, uint8_t VAR_1, int VAR_2)
{
BusChild *kid;
I2CSlaveClass *sc;
I2CNode *node;
if (VAR_1 == I2C_BROADCAST) {
VAR_0->broadcast = true;
}
QTAILQ_FOREACH(kid, &VAR_0->qbus.children, sibling) {
DeviceState *qdev = kid->child;
... | [
"int FUNC_0(I2CBus *VAR_0, uint8_t VAR_1, int VAR_2)\n{",
"BusChild *kid;",
"I2CSlaveClass *sc;",
"I2CNode *node;",
"if (VAR_1 == I2C_BROADCAST) {",
"VAR_0->broadcast = true;",
"}",
"QTAILQ_FOREACH(kid, &VAR_0->qbus.children, sibling) {",
"DeviceState *qdev = kid->child;",
"I2CSlave *candidate = 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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
... |
9,856 | static BlockAIOCB *raw_aio_submit(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque, int type)
{
BDRVRawState *s = bs->opaque;
if (fd_open(bs) < 0)
return NULL;
/*
* Check if the underlying device requ... | false | qemu | 2174f12bdeb3974141784e14bbb7ad8c53178cd9 | static BlockAIOCB *raw_aio_submit(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque, int type)
{
BDRVRawState *s = bs->opaque;
if (fd_open(bs) < 0)
return NULL;
if (s->needs_alignment) {
... | {
"code": [],
"line_no": []
} | static BlockAIOCB *FUNC_0(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque, int type)
{
BDRVRawState *s = bs->opaque;
if (fd_open(bs) < 0)
return NULL;
if (s->needs_alignment) {
if ... | [
"static BlockAIOCB *FUNC_0(BlockDriverState *bs,\nint64_t sector_num, QEMUIOVector *qiov, int nb_sectors,\nBlockCompletionFunc *cb, void *opaque, int type)\n{",
"BDRVRawState *s = bs->opaque;",
"if (fd_open(bs) < 0)\nreturn NULL;",
"if (s->needs_alignment) {",
"if (!bdrv_qiov_is_aligned(bs, qiov)) {",
"ty... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13,
15
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41,
43
],
[
45,
47
],
[
49
],
[
53,
55
],
[
57
]
] |
9,857 | static int v4l2_set_parameters(AVFormatContext *s1)
{
struct video_data *s = s1->priv_data;
struct v4l2_standard standard = { 0 };
struct v4l2_streamparm streamparm = { 0 };
struct v4l2_fract *tpf = &streamparm.parm.capture.timeperframe;
AVRational framerate_q = { 0 };
int i, ret;
... | false | FFmpeg | 514216d8a928cf80980ca8dc5daea46e9d41cad9 | static int v4l2_set_parameters(AVFormatContext *s1)
{
struct video_data *s = s1->priv_data;
struct v4l2_standard standard = { 0 };
struct v4l2_streamparm streamparm = { 0 };
struct v4l2_fract *tpf = &streamparm.parm.capture.timeperframe;
AVRational framerate_q = { 0 };
int i, ret;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
struct video_data *VAR_1 = VAR_0->priv_data;
struct v4l2_standard VAR_2 = { 0 };
struct v4l2_streamparm VAR_3 = { 0 };
struct v4l2_fract *VAR_4 = &VAR_3.parm.capture.timeperframe;
AVRational framerate_q = { 0 };
int VAR_5, VAR_6;
VAR_3.ty... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"struct video_data *VAR_1 = VAR_0->priv_data;",
"struct v4l2_standard VAR_2 = { 0 };",
"struct v4l2_streamparm VAR_3 = { 0 };",
"struct v4l2_fract *VAR_4 = &VAR_3.parm.capture.timeperframe;",
"AVRational framerate_q = { 0 };",
"int VAR_5, VAR_6;",
"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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
],
[
37
],
[
39,
41
],
[
45
],
[
47
],
[
49
],
[
51,
53
... |
9,858 | static int vpc_create(const char *filename, QEMUOptionParameter *options)
{
uint8_t buf[1024];
struct vhd_footer *footer = (struct vhd_footer *) buf;
QEMUOptionParameter *disk_type_param;
int fd, i;
uint16_t cyls = 0;
uint8_t heads = 0;
uint8_t secs_per_cyl = 0;
int64_t total_se... | false | qemu | 1fe1fa510aa3d4eb1fb4246d4951ef48e4c949c2 | static int vpc_create(const char *filename, QEMUOptionParameter *options)
{
uint8_t buf[1024];
struct vhd_footer *footer = (struct vhd_footer *) buf;
QEMUOptionParameter *disk_type_param;
int fd, i;
uint16_t cyls = 0;
uint8_t heads = 0;
uint8_t secs_per_cyl = 0;
int64_t total_se... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, QEMUOptionParameter *VAR_1)
{
uint8_t buf[1024];
struct vhd_footer *VAR_2 = (struct vhd_footer *) buf;
QEMUOptionParameter *disk_type_param;
int VAR_3, VAR_4;
uint16_t cyls = 0;
uint8_t heads = 0;
uint8_t secs_per_cyl = 0;
int64_t total_secto... | [
"static int FUNC_0(const char *VAR_0, QEMUOptionParameter *VAR_1)\n{",
"uint8_t buf[1024];",
"struct vhd_footer *VAR_2 = (struct vhd_footer *) buf;",
"QEMUOptionParameter *disk_type_param;",
"int VAR_3, VAR_4;",
"uint16_t cyls = 0;",
"uint8_t heads = 0;",
"uint8_t secs_per_cyl = 0;",
"int64_t total_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
9,859 | void kvm_s390_interrupt_internal(S390CPU *cpu, int type, uint32_t parm,
uint64_t parm64, int vm)
{
CPUState *cs = CPU(cpu);
struct kvm_s390_interrupt kvmint;
int r;
if (!cs->kvm_state) {
return;
}
kvmint.type = type;
kvmint.parm = parm;
... | false | qemu | de13d2161473d02ae97ec0f8e4503147554892dd | void kvm_s390_interrupt_internal(S390CPU *cpu, int type, uint32_t parm,
uint64_t parm64, int vm)
{
CPUState *cs = CPU(cpu);
struct kvm_s390_interrupt kvmint;
int r;
if (!cs->kvm_state) {
return;
}
kvmint.type = type;
kvmint.parm = parm;
... | {
"code": [],
"line_no": []
} | void FUNC_0(S390CPU *VAR_0, int VAR_1, uint32_t VAR_2,
uint64_t VAR_3, int VAR_4)
{
CPUState *cs = CPU(VAR_0);
struct kvm_s390_interrupt VAR_5;
int VAR_6;
if (!cs->kvm_state) {
return;
}
VAR_5.VAR_1 = VAR_1;
VAR_5.VAR_2 = VAR_2;
VAR... | [
"void FUNC_0(S390CPU *VAR_0, int VAR_1, uint32_t VAR_2,\nuint64_t VAR_3, int VAR_4)\n{",
"CPUState *cs = CPU(VAR_0);",
"struct kvm_s390_interrupt VAR_5;",
"int VAR_6;",
"if (!cs->kvm_state) {",
"return;",
"}",
"VAR_5.VAR_1 = VAR_1;",
"VAR_5.VAR_2 = VAR_2;",
"VAR_5.VAR_3 = VAR_3;",
"if (VAR_4) {"... | [
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
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
9,862 | static void *build_pci_bus_begin(PCIBus *bus, void *parent_state)
{
AcpiBuildPciBusHotplugState *parent = parent_state;
AcpiBuildPciBusHotplugState *child = g_malloc(sizeof *child);
build_pci_bus_state_init(child, parent, parent->pcihp_bridge_en);
return child;
}
| false | qemu | b23046abe78f48498a423b802d6d86ba0172d57f | static void *build_pci_bus_begin(PCIBus *bus, void *parent_state)
{
AcpiBuildPciBusHotplugState *parent = parent_state;
AcpiBuildPciBusHotplugState *child = g_malloc(sizeof *child);
build_pci_bus_state_init(child, parent, parent->pcihp_bridge_en);
return child;
}
| {
"code": [],
"line_no": []
} | static void *FUNC_0(PCIBus *VAR_0, void *VAR_1)
{
AcpiBuildPciBusHotplugState *parent = VAR_1;
AcpiBuildPciBusHotplugState *child = g_malloc(sizeof *child);
build_pci_bus_state_init(child, parent, parent->pcihp_bridge_en);
return child;
}
| [
"static void *FUNC_0(PCIBus *VAR_0, void *VAR_1)\n{",
"AcpiBuildPciBusHotplugState *parent = VAR_1;",
"AcpiBuildPciBusHotplugState *child = g_malloc(sizeof *child);",
"build_pci_bus_state_init(child, parent, parent->pcihp_bridge_en);",
"return child;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
]
] |
9,863 | static unsigned long copy_strings(int argc,char ** argv,unsigned long *page,
unsigned long p)
{
char *tmp, *tmp1, *pag = NULL;
int len, offset = 0;
if (!p) {
return 0; /* bullet-proofing */
}
while (argc-- > 0) {
if (!(tmp1 = tmp = get_user(argv+argc))) {
fpr... | false | qemu | edf779ffccc836661a7b654d320571a6c220caea | static unsigned long copy_strings(int argc,char ** argv,unsigned long *page,
unsigned long p)
{
char *tmp, *tmp1, *pag = NULL;
int len, offset = 0;
if (!p) {
return 0;
}
while (argc-- > 0) {
if (!(tmp1 = tmp = get_user(argv+argc))) {
fprintf(stderr, "VFS: ar... | {
"code": [],
"line_no": []
} | static unsigned long FUNC_0(int VAR_0,char ** VAR_1,unsigned long *VAR_2,
unsigned long VAR_3)
{
char *VAR_4, *VAR_5, *VAR_6 = NULL;
int VAR_7, VAR_8 = 0;
if (!VAR_3) {
return 0;
}
while (VAR_0-- > 0) {
if (!(VAR_5 = VAR_4 = get_user(VAR_1+VAR_0))) {
fprintf... | [
"static unsigned long FUNC_0(int VAR_0,char ** VAR_1,unsigned long *VAR_2,\nunsigned long VAR_3)\n{",
"char *VAR_4, *VAR_5, *VAR_6 = NULL;",
"int VAR_7, VAR_8 = 0;",
"if (!VAR_3) {",
"return 0;",
"}",
"while (VAR_0-- > 0) {",
"if (!(VAR_5 = VAR_4 = get_user(VAR_1+VAR_0))) {",
"fprintf(stderr, \"VFS:... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
9,865 | void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr)
{
uint32_t *ptr = (uint32_t *)jmp_addr;
uintptr_t disp = addr - jmp_addr;
/* We can reach the entire address space for 32-bit. For 64-bit
the code_gen_buffer can't be larger than 2GB. */
assert(disp == (int32_t)disp);
*p... | false | qemu | eabb7b91b36b202b4dac2df2d59d698e3aff197a | void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr)
{
uint32_t *ptr = (uint32_t *)jmp_addr;
uintptr_t disp = addr - jmp_addr;
assert(disp == (int32_t)disp);
*ptr = CALL | (uint32_t)disp >> 2;
flush_icache_range(jmp_addr, jmp_addr + 4);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(uintptr_t VAR_0, uintptr_t VAR_1)
{
uint32_t *ptr = (uint32_t *)VAR_0;
uintptr_t disp = VAR_1 - VAR_0;
assert(disp == (int32_t)disp);
*ptr = CALL | (uint32_t)disp >> 2;
flush_icache_range(VAR_0, VAR_0 + 4);
}
| [
"void FUNC_0(uintptr_t VAR_0, uintptr_t VAR_1)\n{",
"uint32_t *ptr = (uint32_t *)VAR_0;",
"uintptr_t disp = VAR_1 - VAR_0;",
"assert(disp == (int32_t)disp);",
"*ptr = CALL | (uint32_t)disp >> 2;",
"flush_icache_range(VAR_0, VAR_0 + 4);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
15
],
[
19
],
[
21
],
[
23
]
] |
9,867 | void mmio_ide_init (target_phys_addr_t membase, target_phys_addr_t membase2,
MemoryRegion *address_space,
qemu_irq irq, int shift,
DriveInfo *hd0, DriveInfo *hd1)
{
MMIOState *s = g_malloc0(sizeof(MMIOState));
ide_init2_with_non_qdev_drives(&s-... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | void mmio_ide_init (target_phys_addr_t membase, target_phys_addr_t membase2,
MemoryRegion *address_space,
qemu_irq irq, int shift,
DriveInfo *hd0, DriveInfo *hd1)
{
MMIOState *s = g_malloc0(sizeof(MMIOState));
ide_init2_with_non_qdev_drives(&s-... | {
"code": [],
"line_no": []
} | void FUNC_0 (target_phys_addr_t VAR_0, target_phys_addr_t VAR_1,
MemoryRegion *VAR_2,
qemu_irq VAR_3, int VAR_4,
DriveInfo *VAR_5, DriveInfo *VAR_6)
{
MMIOState *s = g_malloc0(sizeof(MMIOState));
ide_init2_with_non_qdev_drives(&s->bus, VAR_5, V... | [
"void FUNC_0 (target_phys_addr_t VAR_0, target_phys_addr_t VAR_1,\nMemoryRegion *VAR_2,\nqemu_irq VAR_3, int VAR_4,\nDriveInfo *VAR_5, DriveInfo *VAR_6)\n{",
"MMIOState *s = g_malloc0(sizeof(MMIOState));",
"ide_init2_with_non_qdev_drives(&s->bus, VAR_5, VAR_6, VAR_3);",
"s->VAR_4 = VAR_4;",
"memory_region_i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
15
],
[
19
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
9,868 | void ff_mpc_dequantize_and_synth(MPCContext * c, int maxband, void *data, int channels)
{
int i, j, ch;
Band *bands = c->bands;
int off;
float mul;
/* dequantize */
memset(c->sb_samples, 0, sizeof(c->sb_samples));
off = 0;
for(i = 0; i <= maxband; i++, off += SAMPLES_PER_BAND)... | false | FFmpeg | b2a7c017336b19afc045e8a7385999c1896d4b45 | void ff_mpc_dequantize_and_synth(MPCContext * c, int maxband, void *data, int channels)
{
int i, j, ch;
Band *bands = c->bands;
int off;
float mul;
memset(c->sb_samples, 0, sizeof(c->sb_samples));
off = 0;
for(i = 0; i <= maxband; i++, off += SAMPLES_PER_BAND){
for(c... | {
"code": [],
"line_no": []
} | void FUNC_0(MPCContext * VAR_0, int VAR_1, void *VAR_2, int VAR_3)
{
int VAR_4, VAR_5, VAR_6;
Band *bands = VAR_0->bands;
int VAR_7;
float VAR_8;
memset(VAR_0->sb_samples, 0, sizeof(VAR_0->sb_samples));
VAR_7 = 0;
for(VAR_4 = 0; VAR_4 <= VAR_1; VAR_4++, VAR_7 += SAMPLES_PER_B... | [
"void FUNC_0(MPCContext * VAR_0, int VAR_1, void *VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6;",
"Band *bands = VAR_0->bands;",
"int VAR_7;",
"float VAR_8;",
"memset(VAR_0->sb_samples, 0, sizeof(VAR_0->sb_samples));",
"VAR_7 = 0;",
"for(VAR_4 = 0; VAR_4 <= VAR_1; VAR_4++, VAR_7 += SAMPLES_PER_BAND... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
9,869 | static int raw_probe_blocksizes(BlockDriverState *bs, BlockSizes *bsz)
{
BDRVRawState *s = bs->opaque;
int ret;
ret = bdrv_probe_blocksizes(bs->file->bs, bsz);
if (ret < 0) {
return ret;
}
if (!QEMU_IS_ALIGNED(s->offset, MAX(bsz->log, bsz->phys))) {
return -ENOTSUP;
... | false | qemu | 2e6fc7eb1a4af1b127df5f07b8bb28af891946fa | static int raw_probe_blocksizes(BlockDriverState *bs, BlockSizes *bsz)
{
BDRVRawState *s = bs->opaque;
int ret;
ret = bdrv_probe_blocksizes(bs->file->bs, bsz);
if (ret < 0) {
return ret;
}
if (!QEMU_IS_ALIGNED(s->offset, MAX(bsz->log, bsz->phys))) {
return -ENOTSUP;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, BlockSizes *VAR_1)
{
BDRVRawState *s = VAR_0->opaque;
int VAR_2;
VAR_2 = bdrv_probe_blocksizes(VAR_0->file->VAR_0, VAR_1);
if (VAR_2 < 0) {
return VAR_2;
}
if (!QEMU_IS_ALIGNED(s->offset, MAX(VAR_1->log, VAR_1->phys))) {
ret... | [
"static int FUNC_0(BlockDriverState *VAR_0, BlockSizes *VAR_1)\n{",
"BDRVRawState *s = VAR_0->opaque;",
"int VAR_2;",
"VAR_2 = bdrv_probe_blocksizes(VAR_0->file->VAR_0, VAR_1);",
"if (VAR_2 < 0) {",
"return VAR_2;",
"}",
"if (!QEMU_IS_ALIGNED(s->offset, MAX(VAR_1->log, VAR_1->phys))) {",
"return -EN... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
]
] |
9,871 | BlockJobInfo *block_job_query(BlockJob *job)
{
BlockJobInfo *info = g_new0(BlockJobInfo, 1);
info->type = g_strdup(BlockJobType_lookup[job->driver->job_type]);
info->device = g_strdup(bdrv_get_device_name(job->bs));
info->len = job->len;
info->busy = job->busy;
info->pa... | false | qemu | 751ebd76e654bd1e65da08ecf694325282b4cfcc | BlockJobInfo *block_job_query(BlockJob *job)
{
BlockJobInfo *info = g_new0(BlockJobInfo, 1);
info->type = g_strdup(BlockJobType_lookup[job->driver->job_type]);
info->device = g_strdup(bdrv_get_device_name(job->bs));
info->len = job->len;
info->busy = job->busy;
info->pa... | {
"code": [],
"line_no": []
} | BlockJobInfo *FUNC_0(BlockJob *job)
{
BlockJobInfo *info = g_new0(BlockJobInfo, 1);
info->type = g_strdup(BlockJobType_lookup[job->driver->job_type]);
info->device = g_strdup(bdrv_get_device_name(job->bs));
info->len = job->len;
info->busy = job->busy;
info->paused =... | [
"BlockJobInfo *FUNC_0(BlockJob *job)\n{",
"BlockJobInfo *info = g_new0(BlockJobInfo, 1);",
"info->type = g_strdup(BlockJobType_lookup[job->driver->job_type]);",
"info->device = g_strdup(bdrv_get_device_name(job->bs));",
"info->len = job->len;",
"info->busy = job->busy;",
"info->paused... | [
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
]
] |
9,873 | vcard_emul_options(const char *args)
{
int reader_count = 0;
VCardEmulOptions *opts;
/* Allow the future use of allocating the options structure on the fly */
memcpy(&options, &default_options, sizeof(options));
opts = &options;
do {
args = strip(args); /* strip off the leadi... | true | qemu | d09b8fa161ed6a61339d4d0870f76f13c033b2a3 | vcard_emul_options(const char *args)
{
int reader_count = 0;
VCardEmulOptions *opts;
memcpy(&options, &default_options, sizeof(options));
opts = &options;
do {
args = strip(args);
if (*args == ',') {
continue;
}
if (strncm... | {
"code": [
" VirtualReaderOptions *vreaderOpt = NULL;",
" vreaderOpt = g_renew(VirtualReaderOptions, opts->vreader,",
" reader_count);",
" opts->vreader = vreaderOpt;",
" vreaderOpt = &vreaderOpt[opts->vreader_cou... | FUNC_0(const char *VAR_0)
{
int VAR_1 = 0;
VCardEmulOptions *opts;
memcpy(&options, &default_options, sizeof(options));
opts = &options;
do {
VAR_0 = strip(VAR_0);
if (*VAR_0 == ',') {
continue;
}
if (strncmp(VAR_0, "soft=... | [
"FUNC_0(const char *VAR_0)\n{",
"int VAR_1 = 0;",
"VCardEmulOptions *opts;",
"memcpy(&options, &default_options, sizeof(options));",
"opts = &options;",
"do {",
"VAR_0 = strip(VAR_0);",
"if (*VAR_0 == ',') {",
"continue;",
"}",
"if (strncmp(VAR_0, \"soft=\", 5) == 0) {",
"const char *VAR_2;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51... |
9,874 | static int pci_qdev_init(DeviceState *qdev)
{
PCIDevice *pci_dev = (PCIDevice *)qdev;
PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(pci_dev);
PCIBus *bus;
int rc;
bool is_default_rom;
/* initialize cap_present for pci_is_express() and pci_config_size() */
if (pc->is_express) {
... | true | qemu | 178e785fb4507ec3462dc772bbe08303416ece47 | static int pci_qdev_init(DeviceState *qdev)
{
PCIDevice *pci_dev = (PCIDevice *)qdev;
PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(pci_dev);
PCIBus *bus;
int rc;
bool is_default_rom;
if (pc->is_express) {
pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS;
}
bus = PCI_... | {
"code": [
" pci_add_option_rom(pci_dev, is_default_rom);"
],
"line_no": [
69
]
} | static int FUNC_0(DeviceState *VAR_0)
{
PCIDevice *pci_dev = (PCIDevice *)VAR_0;
PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(pci_dev);
PCIBus *bus;
int VAR_1;
bool is_default_rom;
if (pc->is_express) {
pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS;
}
bus = PCI_BU... | [
"static int FUNC_0(DeviceState *VAR_0)\n{",
"PCIDevice *pci_dev = (PCIDevice *)VAR_0;",
"PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(pci_dev);",
"PCIBus *bus;",
"int VAR_1;",
"bool is_default_rom;",
"if (pc->is_express) {",
"pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS;",
"}",
"bus = PCI_BUS(qdev_ge... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
31,
33
],
[
35,
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
9,875 | static void report_unavailable_features(FeatureWord w, uint32_t mask)
{
FeatureWordInfo *f = &feature_word_info[w];
int i;
for (i = 0; i < 32; ++i) {
if (1 << i & mask) {
const char *reg = get_register_name_32(f->cpuid_reg);
assert(reg);
fprintf(stderr, ... | true | qemu | 72370dc1149d7c90d2c2218e0d0658bee23a5bf7 | static void report_unavailable_features(FeatureWord w, uint32_t mask)
{
FeatureWordInfo *f = &feature_word_info[w];
int i;
for (i = 0; i < 32; ++i) {
if (1 << i & mask) {
const char *reg = get_register_name_32(f->cpuid_reg);
assert(reg);
fprintf(stderr, ... | {
"code": [
" if (1 << i & mask) {"
],
"line_no": [
13
]
} | static void FUNC_0(FeatureWord VAR_0, uint32_t VAR_1)
{
FeatureWordInfo *f = &feature_word_info[VAR_0];
int VAR_2;
for (VAR_2 = 0; VAR_2 < 32; ++VAR_2) {
if (1 << VAR_2 & VAR_1) {
const char *VAR_3 = get_register_name_32(f->cpuid_reg);
assert(VAR_3);
fpr... | [
"static void FUNC_0(FeatureWord VAR_0, uint32_t VAR_1)\n{",
"FeatureWordInfo *f = &feature_word_info[VAR_0];",
"int VAR_2;",
"for (VAR_2 = 0; VAR_2 < 32; ++VAR_2) {",
"if (1 << VAR_2 & VAR_1) {",
"const char *VAR_3 = get_register_name_32(f->cpuid_reg);",
"assert(VAR_3);",
"fprintf(stderr, \"warning: %... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21,
23,
25,
27,
29
],
[
31
],
[
33
],
[
35
]
] |
9,876 | ISADevice *isa_create(ISABus *bus, const char *name)
{
DeviceState *dev;
if (!bus) {
hw_error("Tried to create isa device %s with no isa bus present.",
name);
}
dev = qdev_create(BUS(bus), name);
return ISA_DEVICE(dev);
}
| true | qemu | 675463d9b6b2c2b65a713a6d906aeebe9e6750ae | ISADevice *isa_create(ISABus *bus, const char *name)
{
DeviceState *dev;
if (!bus) {
hw_error("Tried to create isa device %s with no isa bus present.",
name);
}
dev = qdev_create(BUS(bus), name);
return ISA_DEVICE(dev);
}
| {
"code": [
" if (!bus) {",
" if (!bus) {",
" hw_error(\"Tried to create isa device %s with no isa bus present.\",",
" name);",
" if (!bus) {",
" hw_error(\"Tried to create isa device %s with no isa bus present.\",",
" name);"
],
"... | ISADevice *FUNC_0(ISABus *bus, const char *name)
{
DeviceState *dev;
if (!bus) {
hw_error("Tried to create isa device %s with no isa bus present.",
name);
}
dev = qdev_create(BUS(bus), name);
return ISA_DEVICE(dev);
}
| [
"ISADevice *FUNC_0(ISABus *bus, const char *name)\n{",
"DeviceState *dev;",
"if (!bus) {",
"hw_error(\"Tried to create isa device %s with no isa bus present.\",\nname);",
"}",
"dev = qdev_create(BUS(bus), name);",
"return ISA_DEVICE(dev);",
"}"
] | [
0,
0,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
9,877 | static int decode_slice_luma(AVCodecContext *avctx, SliceContext *slice,
uint16_t *dst, int dst_stride,
const uint8_t *buf, unsigned buf_size,
const int16_t *qmat)
{
ProresContext *ctx = avctx->priv_data;
LOCAL_ALIGNED_... | true | FFmpeg | 4f5eaf0b5956e492ee5023929669b1d09aaf6299 | static int decode_slice_luma(AVCodecContext *avctx, SliceContext *slice,
uint16_t *dst, int dst_stride,
const uint8_t *buf, unsigned buf_size,
const int16_t *qmat)
{
ProresContext *ctx = avctx->priv_data;
LOCAL_ALIGNED_... | {
"code": [
" decode_dc_coeffs(&gb, blocks, blocks_per_slice);",
" decode_dc_coeffs(&gb, blocks, blocks_per_slice);"
],
"line_no": [
35,
35
]
} | static int FUNC_0(AVCodecContext *VAR_0, SliceContext *VAR_1,
uint16_t *VAR_2, int VAR_3,
const uint8_t *VAR_4, unsigned VAR_5,
const int16_t *VAR_6)
{
ProresContext *ctx = VAR_0->priv_data;
LOCAL_ALIGNED_16(int16_t, bl... | [
"static int FUNC_0(AVCodecContext *VAR_0, SliceContext *VAR_1,\nuint16_t *VAR_2, int VAR_3,\nconst uint8_t *VAR_4, unsigned VAR_5,\nconst int16_t *VAR_6)\n{",
"ProresContext *ctx = VAR_0->priv_data;",
"LOCAL_ALIGNED_16(int16_t, blocks, [8*4*64]);",
"int16_t *block;",
"GetBitContext gb;",
"int VAR_7, VAR_8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37,
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
... |
9,878 | static int read_uncompressed_sgi(const SGIInfo *si,
AVPicture *pict, ByteIOContext *f)
{
int x, y, z, chan_offset, ret = 0;
uint8_t *dest_row, *tmp_row = NULL;
tmp_row = av_malloc(si->xsize);
/* skip header */
url_fseek(f, SGI_HEADER_SIZE, SEEK_SET);
pict->linesize[0] = s... | true | FFmpeg | 44f110f509d0ab4fc73b9f2363a97c6577d3850f | static int read_uncompressed_sgi(const SGIInfo *si,
AVPicture *pict, ByteIOContext *f)
{
int x, y, z, chan_offset, ret = 0;
uint8_t *dest_row, *tmp_row = NULL;
tmp_row = av_malloc(si->xsize);
url_fseek(f, SGI_HEADER_SIZE, SEEK_SET);
pict->linesize[0] = si->xsize;
... | {
"code": [
" uint8_t *dest_row, *tmp_row = NULL;",
" tmp_row = av_malloc(si->xsize);",
" if (!get_buffer(f, tmp_row, si->xsize)) {",
" ret = -1;",
" goto cleanup;",
" dest_row[chan_offset] = tmp_row[x]; ",
"cleanup:",
" ... | static int FUNC_0(const SGIInfo *VAR_0,
AVPicture *VAR_1, ByteIOContext *VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7 = 0;
uint8_t *dest_row, *tmp_row = NULL;
tmp_row = av_malloc(VAR_0->xsize);
url_fseek(VAR_2, SGI_HEADER_SIZE, SEEK_SET);
VAR_1->linesize[0] = VAR_0->xs... | [
"static int FUNC_0(const SGIInfo *VAR_0,\nAVPicture *VAR_1, ByteIOContext *VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7 = 0;",
"uint8_t *dest_row, *tmp_row = NULL;",
"tmp_row = av_malloc(VAR_0->xsize);",
"url_fseek(VAR_2, SGI_HEADER_SIZE, SEEK_SET);",
"VAR_1->linesize[0] = VAR_0->xsize;",
"for (VA... | [
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
19
],
[
23
],
[
27
],
[
31,
35,
37
],
[
39,
41,
43
],
[
47
],
[
49
],
[
53
],
[
55
],
[
57
],
[
59
],
[
61
],
[
63
],
[... |
9,879 | static int coroutine_fn bdrv_driver_pwritev(BlockDriverState *bs,
uint64_t offset, uint64_t bytes,
QEMUIOVector *qiov, int flags)
{
BlockDriver *drv = bs->drv;
int64_t sector_num;
unsigned int nb_sectors;
int ret;
... | true | qemu | fa166538743d4e28de7374c41332c3e448826f4b | static int coroutine_fn bdrv_driver_pwritev(BlockDriverState *bs,
uint64_t offset, uint64_t bytes,
QEMUIOVector *qiov, int flags)
{
BlockDriver *drv = bs->drv;
int64_t sector_num;
unsigned int nb_sectors;
int ret;
... | {
"code": [],
"line_no": []
} | static int VAR_0 bdrv_driver_pwritev(BlockDriverState *bs,
uint64_t offset, uint64_t bytes,
QEMUIOVector *qiov, int flags)
{
BlockDriver *drv = bs->drv;
int64_t sector_num;
unsigned int nb_sectors;
int ret;
if (d... | [
"static int VAR_0 bdrv_driver_pwritev(BlockDriverState *bs,\nuint64_t offset, uint64_t bytes,\nQEMUIOVector *qiov, int flags)\n{",
"BlockDriver *drv = bs->drv;",
"int64_t sector_num;",
"unsigned int nb_sectors;",
"int ret;",
"if (drv->bdrv_co_pwritev) {",
"ret = drv->bdrv_co_pwritev(bs, offset, bytes, q... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3,
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10,
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21,
22
],
[
23
],... |
9,881 | static void host_signal_handler(int host_signum, siginfo_t *info,
void *puc)
{
CPUArchState *env = thread_cpu->env_ptr;
CPUState *cpu = ENV_GET_CPU(env);
TaskState *ts = cpu->opaque;
int sig;
target_siginfo_t tinfo;
ucontext_t *uc = puc;
struct emul... | true | qemu | 1d48fdd9d84aab1bd32c1f70947932f5d90f92aa | static void host_signal_handler(int host_signum, siginfo_t *info,
void *puc)
{
CPUArchState *env = thread_cpu->env_ptr;
CPUState *cpu = ENV_GET_CPU(env);
TaskState *ts = cpu->opaque;
int sig;
target_siginfo_t tinfo;
ucontext_t *uc = puc;
struct emul... | {
"code": [
" sigfillset(&uc->uc_sigmask);"
],
"line_no": [
81
]
} | static void FUNC_0(int VAR_0, siginfo_t *VAR_1,
void *VAR_2)
{
CPUArchState *env = thread_cpu->env_ptr;
CPUState *cpu = ENV_GET_CPU(env);
TaskState *ts = cpu->opaque;
int VAR_3;
target_siginfo_t tinfo;
ucontext_t *uc = VAR_2;
struct emulated_sigtabl... | [
"static void FUNC_0(int VAR_0, siginfo_t *VAR_1,\nvoid *VAR_2)\n{",
"CPUArchState *env = thread_cpu->env_ptr;",
"CPUState *cpu = ENV_GET_CPU(env);",
"TaskState *ts = cpu->opaque;",
"int VAR_3;",
"target_siginfo_t tinfo;",
"ucontext_t *uc = VAR_2;",
"struct emulated_sigtable *VAR_4;",
"if ((VAR_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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
29,
31
],
[
33,
35
],
[
37
],
[
43
],
[
45,
47
],
[
49
],
[
53
],
[
57
],
[
59
],
[
61
... |
9,882 | static int nbd_co_send_request(BlockDriverState *bs,
struct nbd_request *request,
QEMUIOVector *qiov, int offset)
{
NbdClientSession *s = nbd_get_client_session(bs);
AioContext *aio_context;
int rc, ret;
qemu_co_mutex_lock(&s->send_m... | true | qemu | 141cabe6f144a1acb128186caf686f8fbde0a7e4 | static int nbd_co_send_request(BlockDriverState *bs,
struct nbd_request *request,
QEMUIOVector *qiov, int offset)
{
NbdClientSession *s = nbd_get_client_session(bs);
AioContext *aio_context;
int rc, ret;
qemu_co_mutex_lock(&s->send_m... | {
"code": [
" int rc, ret;"
],
"line_no": [
13
]
} | static int FUNC_0(BlockDriverState *VAR_0,
struct nbd_request *VAR_1,
QEMUIOVector *VAR_2, int VAR_3)
{
NbdClientSession *s = nbd_get_client_session(VAR_0);
AioContext *aio_context;
int VAR_4, VAR_5;
qemu_co_mutex_lock(&s->send_mutex... | [
"static int FUNC_0(BlockDriverState *VAR_0,\nstruct nbd_request *VAR_1,\nQEMUIOVector *VAR_2, int VAR_3)\n{",
"NbdClientSession *s = nbd_get_client_session(VAR_0);",
"AioContext *aio_context;",
"int VAR_4, VAR_5;",
"qemu_co_mutex_lock(&s->send_mutex);",
"s->send_coroutine = qemu_coroutine_self();",
"aio... | [
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
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
... |
9,883 | qio_channel_socket_accept(QIOChannelSocket *ioc,
Error **errp)
{
QIOChannelSocket *cioc;
cioc = qio_channel_socket_new();
cioc->remoteAddrLen = sizeof(ioc->remoteAddr);
cioc->localAddrLen = sizeof(ioc->localAddr);
retry:
trace_qio_channel_socket_accept(ioc);
... | true | qemu | 8bd9c4e6c565c566a6cba3470cb2d4ea63994143 | qio_channel_socket_accept(QIOChannelSocket *ioc,
Error **errp)
{
QIOChannelSocket *cioc;
cioc = qio_channel_socket_new();
cioc->remoteAddrLen = sizeof(ioc->remoteAddr);
cioc->localAddrLen = sizeof(ioc->localAddr);
retry:
trace_qio_channel_socket_accept(ioc);
... | {
"code": [
" trace_qio_channel_socket_accept_fail(ioc);"
],
"line_no": [
29
]
} | FUNC_0(QIOChannelSocket *VAR_0,
Error **VAR_1)
{
QIOChannelSocket *cioc;
cioc = qio_channel_socket_new();
cioc->remoteAddrLen = sizeof(VAR_0->remoteAddr);
cioc->localAddrLen = sizeof(VAR_0->localAddr);
retry:
trace_qio_channel_socket_accept(VAR_0);
cioc->f... | [
"FUNC_0(QIOChannelSocket *VAR_0,\nError **VAR_1)\n{",
"QIOChannelSocket *cioc;",
"cioc = qio_channel_socket_new();",
"cioc->remoteAddrLen = sizeof(VAR_0->remoteAddr);",
"cioc->localAddrLen = sizeof(VAR_0->localAddr);",
"retry:\ntrace_qio_channel_socket_accept(VAR_0);",
"cioc->fd = qemu_accept(VAR_0->fd,... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43,
45
],
[
47,
49
],
[
51
],
... |
9,884 | static void io_write(IPackDevice *ip, uint8_t addr, uint16_t val)
{
IPOctalState *dev = IPOCTAL(ip);
unsigned reg = val & 0xFF;
/* addr[7:6]: block (A-D)
addr[7:5]: channel (a-h)
addr[5:0]: register */
unsigned block = addr >> 5;
unsigned channel = addr >> 4;
/* Big endi... | true | qemu | 6ab3fc32ea640026726bc5f9f4db622d0954fb8a | static void io_write(IPackDevice *ip, uint8_t addr, uint16_t val)
{
IPOctalState *dev = IPOCTAL(ip);
unsigned reg = val & 0xFF;
unsigned block = addr >> 5;
unsigned channel = addr >> 4;
unsigned offset = (addr & 0x1F) ^ 1;
SCC2698Channel *ch = &dev->ch[channel];
SCC26... | {
"code": [
" qemu_chr_fe_write(ch->dev, &thr, 1);"
],
"line_no": [
85
]
} | static void FUNC_0(IPackDevice *VAR_0, uint8_t VAR_1, uint16_t VAR_2)
{
IPOctalState *dev = IPOCTAL(VAR_0);
unsigned VAR_3 = VAR_2 & 0xFF;
unsigned VAR_4 = VAR_1 >> 5;
unsigned VAR_5 = VAR_1 >> 4;
unsigned VAR_6 = (VAR_1 & 0x1F) ^ 1;
SCC2698Channel *ch = &dev->ch[VAR_5];
... | [
"static void FUNC_0(IPackDevice *VAR_0, uint8_t VAR_1, uint16_t VAR_2)\n{",
"IPOctalState *dev = IPOCTAL(VAR_0);",
"unsigned VAR_3 = VAR_2 & 0xFF;",
"unsigned VAR_4 = VAR_1 >> 5;",
"unsigned VAR_5 = VAR_1 >> 4;",
"unsigned VAR_6 = (VAR_1 & 0x1F) ^ 1;",
"SCC2698Channel *ch = &dev->ch[VAR_5];",
"SCC2698... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37,
39,
41
],
[
43
],
[
45
],
[
47
],
[
53,
55,
57
],
[
59
],
[
63... |
9,885 | int av_dict_set(AVDictionary **pm, const char *key, const char *value,
int flags)
{
AVDictionary *m = *pm;
AVDictionaryEntry *tag = av_dict_get(m, key, NULL, flags);
char *oldval = NULL, *copy_key = NULL, *copy_value = NULL;
if (flags & AV_DICT_DONT_STRDUP_KEY)
copy_key ... | false | FFmpeg | a740263d7e7be5bb909ae83a44b21cc8cf8c9274 | int av_dict_set(AVDictionary **pm, const char *key, const char *value,
int flags)
{
AVDictionary *m = *pm;
AVDictionaryEntry *tag = av_dict_get(m, key, NULL, flags);
char *oldval = NULL, *copy_key = NULL, *copy_value = NULL;
if (flags & AV_DICT_DONT_STRDUP_KEY)
copy_key ... | {
"code": [],
"line_no": []
} | int FUNC_0(AVDictionary **VAR_0, const char *VAR_1, const char *VAR_2,
int VAR_3)
{
AVDictionary *m = *VAR_0;
AVDictionaryEntry *tag = av_dict_get(m, VAR_1, NULL, VAR_3);
char *VAR_4 = NULL, *VAR_5 = NULL, *VAR_6 = NULL;
if (VAR_3 & AV_DICT_DONT_STRDUP_KEY)
VAR_5 = (void... | [
"int FUNC_0(AVDictionary **VAR_0, const char *VAR_1, const char *VAR_2,\nint VAR_3)\n{",
"AVDictionary *m = *VAR_0;",
"AVDictionaryEntry *tag = av_dict_get(m, VAR_1, NULL, VAR_3);",
"char *VAR_4 = NULL, *VAR_5 = NULL, *VAR_6 = NULL;",
"if (VAR_3 & AV_DICT_DONT_STRDUP_KEY)\nVAR_5 = (void *)VAR_1;",
"else\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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
19,
21
],
[
23,
25
],
[
27,
29
],
[
31,
33
],
[
35,
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
9,886 | static av_cold int dfa_decode_init(AVCodecContext *avctx)
{
DfaContext *s = avctx->priv_data;
avctx->pix_fmt = PIX_FMT_PAL8;
s->frame_buf = av_mallocz(avctx->width * avctx->height + AV_LZO_OUTPUT_PADDING);
if (!s->frame_buf)
return AVERROR(ENOMEM);
return 0;
} | true | FFmpeg | ee715f49a06bf3898246d01b056284a9bb1bcbb9 | static av_cold int dfa_decode_init(AVCodecContext *avctx)
{
DfaContext *s = avctx->priv_data;
avctx->pix_fmt = PIX_FMT_PAL8;
s->frame_buf = av_mallocz(avctx->width * avctx->height + AV_LZO_OUTPUT_PADDING);
if (!s->frame_buf)
return AVERROR(ENOMEM);
return 0;
} | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
DfaContext *s = avctx->priv_data;
avctx->pix_fmt = PIX_FMT_PAL8;
s->frame_buf = av_mallocz(avctx->width * avctx->height + AV_LZO_OUTPUT_PADDING);
if (!s->frame_buf)
return AVERROR(ENOMEM);
return 0;
} | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"DfaContext *s = avctx->priv_data;",
"avctx->pix_fmt = PIX_FMT_PAL8;",
"s->frame_buf = av_mallocz(avctx->width * avctx->height + AV_LZO_OUTPUT_PADDING);",
"if (!s->frame_buf)\nreturn AVERROR(ENOMEM);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6,
7
],
[
8
],
[
9
]
] |
9,887 | static int vnc_tls_initialize(void)
{
static int tlsinitialized = 0;
if (tlsinitialized)
return 1;
if (gnutls_global_init () < 0)
return 0;
/* XXX ought to re-generate diffie-hellman params periodically */
if (gnutls_dh_params_init (&dh_params) < 0)
return 0;
... | true | qemu | 3e305e4a4752f70c0b5c3cf5b43ec957881714f7 | static int vnc_tls_initialize(void)
{
static int tlsinitialized = 0;
if (tlsinitialized)
return 1;
if (gnutls_global_init () < 0)
return 0;
if (gnutls_dh_params_init (&dh_params) < 0)
return 0;
if (gnutls_dh_params_generate2 (dh_params, DH_BITS) < 0)
... | {
"code": [
"#if defined(_VNC_DEBUG) && _VNC_DEBUG >= 2",
"static int vnc_tls_initialize(void)",
" static int tlsinitialized = 0;",
" if (tlsinitialized)",
" return 1;",
" if (gnutls_global_init () < 0)",
" return 0;",
" if (gnutls_dh_params_init (&dh_params) ... | static int FUNC_0(void)
{
static int VAR_0 = 0;
if (VAR_0)
return 1;
if (gnutls_global_init () < 0)
return 0;
if (gnutls_dh_params_init (&dh_params) < 0)
return 0;
if (gnutls_dh_params_generate2 (dh_params, DH_BITS) < 0)
return 0;
#if defined(... | [
"static int FUNC_0(void)\n{",
"static int VAR_0 = 0;",
"if (VAR_0)\nreturn 1;",
"if (gnutls_global_init () < 0)\nreturn 0;",
"if (gnutls_dh_params_init (&dh_params) < 0)\nreturn 0;",
"if (gnutls_dh_params_generate2 (dh_params, DH_BITS) < 0)\nreturn 0;",
"#if defined(_VNC_DEBUG) && _VNC_DEBUG >= 2\ngnutl... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15,
17
],
[
23,
25
],
[
27,
29
],
[
33,
35
],
[
37
],
[
39,
43
],
[
47
],
[
49
]
] |
9,888 | char *socket_address_to_string(struct SocketAddress *addr, Error **errp)
{
char *buf;
InetSocketAddress *inet;
char host_port[INET6_ADDRSTRLEN + 5 + 4];
switch (addr->type) {
case SOCKET_ADDRESS_KIND_INET:
inet = addr->u.inet.data;
if (strchr(inet->host, ':') == NULL) {
... | true | qemu | 44fdc764550e048a2810955da7cabbfaf636231a | char *socket_address_to_string(struct SocketAddress *addr, Error **errp)
{
char *buf;
InetSocketAddress *inet;
char host_port[INET6_ADDRSTRLEN + 5 + 4];
switch (addr->type) {
case SOCKET_ADDRESS_KIND_INET:
inet = addr->u.inet.data;
if (strchr(inet->host, ':') == NULL) {
... | {
"code": [
" char host_port[INET6_ADDRSTRLEN + 5 + 4];",
" snprintf(host_port, sizeof(host_port), \"%s:%s\", inet->host,",
" inet->port);",
" buf = g_strdup(host_port);",
" snprintf(host_port, sizeof(host_port), \"[%s]:%s\", inet->host,",
... | char *FUNC_0(struct SocketAddress *VAR_0, Error **VAR_1)
{
char *VAR_2;
InetSocketAddress *inet;
char VAR_3[INET6_ADDRSTRLEN + 5 + 4];
switch (VAR_0->type) {
case SOCKET_ADDRESS_KIND_INET:
inet = VAR_0->u.inet.data;
if (strchr(inet->host, ':') == NULL) {
snprin... | [
"char *FUNC_0(struct SocketAddress *VAR_0, Error **VAR_1)\n{",
"char *VAR_2;",
"InetSocketAddress *inet;",
"char VAR_3[INET6_ADDRSTRLEN + 5 + 4];",
"switch (VAR_0->type) {",
"case SOCKET_ADDRESS_KIND_INET:\ninet = VAR_0->u.inet.data;",
"if (strchr(inet->host, ':') == NULL) {",
"snprintf(VAR_3, sizeof(... | [
0,
0,
0,
1,
0,
0,
0,
1,
1,
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
],
[
21,
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
41,
43
],
[
45
],
[
49,
51
],
[... |
9,891 | aio_write_done(void *opaque, int ret)
{
struct aio_ctx *ctx = opaque;
struct timeval t2;
gettimeofday(&t2, NULL);
if (ret < 0) {
printf("aio_write failed: %s\n", strerror(-ret));
return;
}
if (ctx->qflag) {
return;
}
/* Finally, report back -- -C gives a parsable format */
t2 = tsu... | true | qemu | 7d8abfcb50a33aed369bbd267852cf04009c49e9 | aio_write_done(void *opaque, int ret)
{
struct aio_ctx *ctx = opaque;
struct timeval t2;
gettimeofday(&t2, NULL);
if (ret < 0) {
printf("aio_write failed: %s\n", strerror(-ret));
return;
}
if (ctx->qflag) {
return;
}
t2 = tsub(t2, ctx->t1);
print_report("wrote", &t2, ctx->offset... | {
"code": [],
"line_no": []
} | FUNC_0(void *VAR_0, int VAR_1)
{
struct aio_ctx *VAR_2 = VAR_0;
struct timeval VAR_3;
gettimeofday(&VAR_3, NULL);
if (VAR_1 < 0) {
printf("aio_write failed: %s\n", strerror(-VAR_1));
return;
}
if (VAR_2->qflag) {
return;
}
VAR_3 = tsub(VAR_3, VAR_2->t1);
print_report("wrote", &V... | [
"FUNC_0(void *VAR_0, int VAR_1)\n{",
"struct aio_ctx *VAR_2 = VAR_0;",
"struct timeval VAR_3;",
"gettimeofday(&VAR_3, NULL);",
"if (VAR_1 < 0) {",
"printf(\"aio_write failed: %s\\n\", strerror(-VAR_1));",
"return;",
"}",
"if (VAR_2->qflag) {",
"return;",
"}",
"VAR_3 = tsub(VAR_3, VAR_2->t1);",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
37
],
[
39,
41
],
[
45
],
[
47
],
[
49
]
] |
9,892 | static void usb_msd_realize_storage(USBDevice *dev, Error **errp)
{
MSDState *s = DO_UPCAST(MSDState, dev, dev);
BlockDriverState *bs = s->conf.bs;
SCSIDevice *scsi_dev;
Error *err = NULL;
if (!bs) {
error_setg(errp, "drive property not set");
return;
}
blkconf_... | true | qemu | 77de4a09c6d3d1e4fabcc0eb6cfdb9ea5a1616d5 | static void usb_msd_realize_storage(USBDevice *dev, Error **errp)
{
MSDState *s = DO_UPCAST(MSDState, dev, dev);
BlockDriverState *bs = s->conf.bs;
SCSIDevice *scsi_dev;
Error *err = NULL;
if (!bs) {
error_setg(errp, "drive property not set");
return;
}
blkconf_... | {
"code": [
" s->bus.qbus.allow_hotplug = 0;"
],
"line_no": [
75
]
} | static void FUNC_0(USBDevice *VAR_0, Error **VAR_1)
{
MSDState *s = DO_UPCAST(MSDState, VAR_0, VAR_0);
BlockDriverState *bs = s->conf.bs;
SCSIDevice *scsi_dev;
Error *err = NULL;
if (!bs) {
error_setg(VAR_1, "drive property not set");
return;
}
blkconf_serial(&s... | [
"static void FUNC_0(USBDevice *VAR_0, Error **VAR_1)\n{",
"MSDState *s = DO_UPCAST(MSDState, VAR_0, VAR_0);",
"BlockDriverState *bs = s->conf.bs;",
"SCSIDevice *scsi_dev;",
"Error *err = NULL;",
"if (!bs) {",
"error_setg(VAR_1, \"drive property not set\");",
"return;",
"}",
"blkconf_serial(&s->con... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
47
],
[
49
],
[
53
],
[
55
],
[
57,
59
],
[
61,
63,
65
],
[
67
],
[
69
],
[... |
9,895 | static int local_chown(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *credp)
{
char *buffer;
int ret = -1;
char *path = fs_path->data;
if ((credp->fc_uid == -1 && credp->fc_gid == -1) ||
(fs_ctx->export_flags & V9FS_SM_PASSTHROUGH) ||
(fs_ctx->export_flags & V9FS_SM_NONE)) {
... | true | qemu | d369f20763a857eac544a5289a046d0285a91df8 | static int local_chown(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *credp)
{
char *buffer;
int ret = -1;
char *path = fs_path->data;
if ((credp->fc_uid == -1 && credp->fc_gid == -1) ||
(fs_ctx->export_flags & V9FS_SM_PASSTHROUGH) ||
(fs_ctx->export_flags & V9FS_SM_NONE)) {
... | {
"code": [
" char *buffer;",
" char *path = fs_path->data;",
" buffer = rpath(fs_ctx, path);",
" ret = lchown(buffer, credp->fc_uid, credp->fc_gid);",
" g_free(buffer);",
" buffer = rpath(fs_ctx, path);",
" ret = local_set_xattr(buffer, credp);",
... | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1, FsCred *VAR_2)
{
char *VAR_3;
int VAR_4 = -1;
char *VAR_5 = VAR_1->data;
if ((VAR_2->fc_uid == -1 && VAR_2->fc_gid == -1) ||
(VAR_0->export_flags & V9FS_SM_PASSTHROUGH) ||
(VAR_0->export_flags & V9FS_SM_NONE)) {
VAR_3... | [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1, FsCred *VAR_2)\n{",
"char *VAR_3;",
"int VAR_4 = -1;",
"char *VAR_5 = VAR_1->data;",
"if ((VAR_2->fc_uid == -1 && VAR_2->fc_gid == -1) ||\n(VAR_0->export_flags & V9FS_SM_PASSTHROUGH) ||\n(VAR_0->export_flags & V9FS_SM_NONE)) {",
"VAR_3 = rpath(VAR_0, V... | [
0,
1,
0,
1,
0,
1,
1,
1,
0,
0,
1,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
9,897 | static void gen_mtsrin_64b(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG);
#else
TCGv t0;
if (unlikely(ctx->pr)) {
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG);
return;
}
t0 = tcg_temp_new();
tcg_gen_shri_tl(t0, cp... | true | qemu | 9b2fadda3e0196ffd485adde4fe9cdd6fae35300 | static void gen_mtsrin_64b(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG);
#else
TCGv t0;
if (unlikely(ctx->pr)) {
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG);
return;
}
t0 = tcg_temp_new();
tcg_gen_shri_tl(t0, cp... | {
"code": [
" if (unlikely(ctx->pr)) {",
" if (unlikely(ctx->pr)) {",
"#if defined(CONFIG_USER_ONLY)",
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG);",
"#else",
" if (unlikely(ctx->pr)) {",
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG);",
"#endif",
"#if d... | static void FUNC_0(DisasContext *VAR_0)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_REG);
#else
TCGv t0;
if (unlikely(VAR_0->pr)) {
gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_REG);
return;
}
t0 = tcg_temp_new();
tcg_gen_shri_tl(t0, cp... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"#if defined(CONFIG_USER_ONLY)\ngen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_REG);",
"#else\nTCGv t0;",
"if (unlikely(VAR_0->pr)) {",
"gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_REG);",
"return;",
"}",
"t0 = tcg_temp_new();",
"tcg_gen_shri_tl(t0, cpu_g... | [
0,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
1
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
]
] |
9,898 | static pid_t qtest_qemu_pid(QTestState *s)
{
FILE *f;
char buffer[1024];
pid_t pid = -1;
f = fopen(s->pid_file, "r");
if (f) {
if (fgets(buffer, sizeof(buffer), f)) {
pid = atoi(buffer);
}
fclose(f);
}
return pid;
}
| true | qemu | 1ad3c6abc0d67e00b84abaa5527bc64b70ca2205 | static pid_t qtest_qemu_pid(QTestState *s)
{
FILE *f;
char buffer[1024];
pid_t pid = -1;
f = fopen(s->pid_file, "r");
if (f) {
if (fgets(buffer, sizeof(buffer), f)) {
pid = atoi(buffer);
}
fclose(f);
}
return pid;
}
| {
"code": [
"static pid_t qtest_qemu_pid(QTestState *s)",
" f = fopen(s->pid_file, \"r\");"
],
"line_no": [
1,
13
]
} | static pid_t FUNC_0(QTestState *s)
{
FILE *f;
char VAR_0[1024];
pid_t pid = -1;
f = fopen(s->pid_file, "r");
if (f) {
if (fgets(VAR_0, sizeof(VAR_0), f)) {
pid = atoi(VAR_0);
}
fclose(f);
}
return pid;
}
| [
"static pid_t FUNC_0(QTestState *s)\n{",
"FILE *f;",
"char VAR_0[1024];",
"pid_t pid = -1;",
"f = fopen(s->pid_file, \"r\");",
"if (f) {",
"if (fgets(VAR_0, sizeof(VAR_0), f)) {",
"pid = atoi(VAR_0);",
"}",
"fclose(f);",
"}",
"return pid;",
"}"
] | [
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
9,899 | ssize_t pt_getxattr(FsContext *ctx, const char *path, const char *name,
void *value, size_t size)
{
char *buffer;
ssize_t ret;
buffer = rpath(ctx, path);
ret = lgetxattr(buffer, name, value, size);
g_free(buffer);
return ret;
}
| true | qemu | 56ad3e54dad6cdcee8668d170df161d89581846f | ssize_t pt_getxattr(FsContext *ctx, const char *path, const char *name,
void *value, size_t size)
{
char *buffer;
ssize_t ret;
buffer = rpath(ctx, path);
ret = lgetxattr(buffer, name, value, size);
g_free(buffer);
return ret;
}
| {
"code": [
" char *buffer;",
" ssize_t ret;",
" buffer = rpath(ctx, path);",
" g_free(buffer);",
" return ret;",
" char *buffer;",
" ssize_t ret;",
" buffer = rpath(ctx, path);",
" g_free(buffer);",
" return ret;",
" char *buffer;",
" ... | ssize_t FUNC_0(FsContext *ctx, const char *path, const char *name,
void *value, size_t size)
{
char *VAR_0;
ssize_t ret;
VAR_0 = rpath(ctx, path);
ret = lgetxattr(VAR_0, name, value, size);
g_free(VAR_0);
return ret;
}
| [
"ssize_t FUNC_0(FsContext *ctx, const char *path, const char *name,\nvoid *value, size_t size)\n{",
"char *VAR_0;",
"ssize_t ret;",
"VAR_0 = rpath(ctx, path);",
"ret = lgetxattr(VAR_0, name, value, size);",
"g_free(VAR_0);",
"return ret;",
"}"
] | [
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
9,902 | int qdev_device_help(QemuOpts *opts)
{
Error *local_err = NULL;
const char *driver;
DevicePropertyInfoList *prop_list;
DevicePropertyInfoList *prop;
driver = qemu_opt_get(opts, "driver");
if (driver && is_help_option(driver)) {
qdev_print_devinfos(false);
return 1;
... | true | qemu | 33fe96833015cf15f4c0aa5bf8d34f60526e0732 | int qdev_device_help(QemuOpts *opts)
{
Error *local_err = NULL;
const char *driver;
DevicePropertyInfoList *prop_list;
DevicePropertyInfoList *prop;
driver = qemu_opt_get(opts, "driver");
if (driver && is_help_option(driver)) {
qdev_print_devinfos(false);
return 1;
... | {
"code": [
" qdev_get_device_class(&driver, &local_err);",
" if (local_err) {",
" goto error;"
],
"line_no": [
35,
37,
39
]
} | int FUNC_0(QemuOpts *VAR_0)
{
Error *local_err = NULL;
const char *VAR_1;
DevicePropertyInfoList *prop_list;
DevicePropertyInfoList *prop;
VAR_1 = qemu_opt_get(VAR_0, "VAR_1");
if (VAR_1 && is_help_option(VAR_1)) {
qdev_print_devinfos(false);
return 1;
}
if... | [
"int FUNC_0(QemuOpts *VAR_0)\n{",
"Error *local_err = NULL;",
"const char *VAR_1;",
"DevicePropertyInfoList *prop_list;",
"DevicePropertyInfoList *prop;",
"VAR_1 = qemu_opt_get(VAR_0, \"VAR_1\");",
"if (VAR_1 && is_help_option(VAR_1)) {",
"qdev_print_devinfos(false);",
"return 1;",
"}",
"if (!VA... | [
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,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
... |
9,903 | static void free_stream(AVStream **pst)
{
AVStream *st = *pst;
int i;
if (!st)
return;
for (i = 0; i < st->nb_side_data; i++)
av_freep(&st->side_data[i].data);
av_freep(&st->side_data);
if (st->parser)
av_parser_close(st->parser);
if (st->attached_p... | true | FFmpeg | b9d2005ea5d6837917a69bc2b8e98f5695f54e39 | static void free_stream(AVStream **pst)
{
AVStream *st = *pst;
int i;
if (!st)
return;
for (i = 0; i < st->nb_side_data; i++)
av_freep(&st->side_data[i].data);
av_freep(&st->side_data);
if (st->parser)
av_parser_close(st->parser);
if (st->attached_p... | {
"code": [
" av_freep(&st->codec->extradata);",
" av_freep(&st->codec->subtitle_header);",
" av_freep(&st->codec);"
],
"line_no": [
71,
73,
75
]
} | static void FUNC_0(AVStream **VAR_0)
{
AVStream *st = *VAR_0;
int VAR_1;
if (!st)
return;
for (VAR_1 = 0; VAR_1 < st->nb_side_data; VAR_1++)
av_freep(&st->side_data[VAR_1].data);
av_freep(&st->side_data);
if (st->parser)
av_parser_close(st->parser);
... | [
"static void FUNC_0(AVStream **VAR_0)\n{",
"AVStream *st = *VAR_0;",
"int VAR_1;",
"if (!st)\nreturn;",
"for (VAR_1 = 0; VAR_1 < st->nb_side_data; VAR_1++)",
"av_freep(&st->side_data[VAR_1].data);",
"av_freep(&st->side_data);",
"if (st->parser)\nav_parser_close(st->parser);",
"if (st->attached_pic.d... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
... |
9,905 | static void FUNCC(pred16x16_horizontal)(uint8_t *_src, int stride){
int i;
pixel *src = (pixel*)_src;
stride /= sizeof(pixel);
for(i=0; i<16; i++){
((pixel4*)(src+i*stride))[0] =
((pixel4*)(src+i*stride))[1] =
((pixel4*)(src+i*stride))[2] =
((pixel4*)(src+i*stri... | true | FFmpeg | 2caf19e90f270abe1e80a3e85acaf0eb5c9d0aac | static void FUNCC(pred16x16_horizontal)(uint8_t *_src, int stride){
int i;
pixel *src = (pixel*)_src;
stride /= sizeof(pixel);
for(i=0; i<16; i++){
((pixel4*)(src+i*stride))[0] =
((pixel4*)(src+i*stride))[1] =
((pixel4*)(src+i*stride))[2] =
((pixel4*)(src+i*stri... | {
"code": [
" ((pixel4*)(src+i*stride))[0] =",
" ((pixel4*)(src+i*stride))[1] =",
" ((pixel4*)(src+i*stride))[2] =",
" ((pixel4*)(src+i*stride))[3] = PIXEL_SPLAT_X4(src[-1+i*stride]);"
],
"line_no": [
13,
15,
17,
19
]
} | static void FUNC_0(pred16x16_horizontal)(uint8_t *_src, int stride){
int VAR_0;
pixel *src = (pixel*)_src;
stride /= sizeof(pixel);
for(VAR_0=0; VAR_0<16; VAR_0++){
((pixel4*)(src+VAR_0*stride))[0] =
((pixel4*)(src+VAR_0*stride))[1] =
((pixel4*)(src+VAR_0*stride))[2] =
... | [
"static void FUNC_0(pred16x16_horizontal)(uint8_t *_src, int stride){",
"int VAR_0;",
"pixel *src = (pixel*)_src;",
"stride /= sizeof(pixel);",
"for(VAR_0=0; VAR_0<16; VAR_0++){",
"((pixel4*)(src+VAR_0*stride))[0] =\n((pixel4*)(src+VAR_0*stride))[1] =\n((pixel4*)(src+VAR_0*stride))[2] =\n((pixel4*)(src+VA... | [
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
11
],
[
13,
15,
17,
19
],
[
21
],
[
23
]
] |
9,906 | static void virtio_queue_host_notifier_read(EventNotifier *n)
{
VirtQueue *vq = container_of(n, VirtQueue, host_notifier);
if (event_notifier_test_and_clear(n)) {
virtio_queue_notify_vq(vq);
}
}
| true | qemu | 344dc16fae0cb6a011aa5befffc8e7d520b11d5d | static void virtio_queue_host_notifier_read(EventNotifier *n)
{
VirtQueue *vq = container_of(n, VirtQueue, host_notifier);
if (event_notifier_test_and_clear(n)) {
virtio_queue_notify_vq(vq);
}
}
| {
"code": [
"static void virtio_queue_host_notifier_read(EventNotifier *n)",
" virtio_queue_notify_vq(vq);"
],
"line_no": [
1,
9
]
} | static void FUNC_0(EventNotifier *VAR_0)
{
VirtQueue *vq = container_of(VAR_0, VirtQueue, host_notifier);
if (event_notifier_test_and_clear(VAR_0)) {
virtio_queue_notify_vq(vq);
}
}
| [
"static void FUNC_0(EventNotifier *VAR_0)\n{",
"VirtQueue *vq = container_of(VAR_0, VirtQueue, host_notifier);",
"if (event_notifier_test_and_clear(VAR_0)) {",
"virtio_queue_notify_vq(vq);",
"}",
"}"
] | [
1,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
9,907 | static int get_uint16_equal(QEMUFile *f, void *pv, size_t size,
VMStateField *field)
{
uint16_t *v = pv;
uint16_t v2;
qemu_get_be16s(f, &v2);
if (*v == v2) {
return 0;
error_report("%x != %x", *v, v2);
return -EINVAL;
| true | qemu | d2164ad35c411d97abd2aa5c6f160283d215e214 | static int get_uint16_equal(QEMUFile *f, void *pv, size_t size,
VMStateField *field)
{
uint16_t *v = pv;
uint16_t v2;
qemu_get_be16s(f, &v2);
if (*v == v2) {
return 0;
error_report("%x != %x", *v, v2);
return -EINVAL;
| {
"code": [],
"line_no": []
} | static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2,
VMStateField *VAR_3)
{
uint16_t *v = VAR_1;
uint16_t v2;
qemu_get_be16s(VAR_0, &v2);
if (*v == v2) {
return 0;
error_report("%x != %x", *v, v2);
return -EINVAL;
| [
"static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2,\nVMStateField *VAR_3)\n{",
"uint16_t *v = VAR_1;",
"uint16_t v2;",
"qemu_get_be16s(VAR_0, &v2);",
"if (*v == v2) {",
"return 0;",
"error_report(\"%x != %x\", *v, v2);",
"return -EINVAL;"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
20
],
[
25
]
] |
9,908 | static struct scoop_info_s *spitz_scoop_init(struct pxa2xx_state_s *cpu,
int count) {
int iomemtype;
struct scoop_info_s *s;
s = (struct scoop_info_s *)
qemu_mallocz(sizeof(struct scoop_info_s) * 2);
memset(s, 0, sizeof(struct scoop_info_s) * count);
s[0].target_... | true | qemu | 187337f8b0ec0813dd3876d1efe37d415fb81c2e | static struct scoop_info_s *spitz_scoop_init(struct pxa2xx_state_s *cpu,
int count) {
int iomemtype;
struct scoop_info_s *s;
s = (struct scoop_info_s *)
qemu_mallocz(sizeof(struct scoop_info_s) * 2);
memset(s, 0, sizeof(struct scoop_info_s) * count);
s[0].target_... | {
"code": [
" cpu_register_physical_memory(s[0].target_base, 0xfff, iomemtype);",
" cpu_register_physical_memory(s[1].target_base, 0xfff, iomemtype);"
],
"line_no": [
35,
51
]
} | static struct scoop_info_s *FUNC_0(struct pxa2xx_state_s *VAR_0,
int VAR_1) {
int VAR_2;
struct scoop_info_s *VAR_3;
VAR_3 = (struct scoop_info_s *)
qemu_mallocz(sizeof(struct scoop_info_s) * 2);
memset(VAR_3, 0, sizeof(struct scoop_info_s) * VAR_1);
VAR_3[0].tar... | [
"static struct scoop_info_s *FUNC_0(struct pxa2xx_state_s *VAR_0,\nint VAR_1) {",
"int VAR_2;",
"struct scoop_info_s *VAR_3;",
"VAR_3 = (struct scoop_info_s *)\nqemu_mallocz(sizeof(struct scoop_info_s) * 2);",
"memset(VAR_3, 0, sizeof(struct scoop_info_s) * VAR_1);",
"VAR_3[0].target_base = 0x10800000;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
25
],
[
27
],
[
31,
33
],
[
35
],
[
37
],
[
41,
43
],
[
47,
49
],
[
51
],
[
53
],
[
57
],
[
59... |
9,909 | static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
{
AVFilterContext *ctx = inlink->dst;
AVFilterLink *outlink = ctx->outputs[0];
ShowCQTContext *s = ctx->priv;
int remaining, step, ret, x, i, j, m;
float *audio_data;
AVFrame *out = NULL;
if (!insamples) {
w... | true | FFmpeg | 3408f4669427f5e950774d135c007f77d0d08d61 | static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
{
AVFilterContext *ctx = inlink->dst;
AVFilterLink *outlink = ctx->outputs[0];
ShowCQTContext *s = ctx->priv;
int remaining, step, ret, x, i, j, m;
float *audio_data;
AVFrame *out = NULL;
if (!insamples) {
w... | {
"code": [
" while (s->remaining_fill < s->fft_len / 2) {",
" memset(&s->fft_data[s->fft_len - s->remaining_fill], 0, sizeof(*s->fft_data) * s->remaining_fill);",
" for (x = 0; x < (s->fft_len-step); x++)",
" j = s->fft_len - s->remaining_fill;",
" ... | static int FUNC_0(AVFilterLink *VAR_0, AVFrame *VAR_1)
{
AVFilterContext *ctx = VAR_0->dst;
AVFilterLink *outlink = ctx->outputs[0];
ShowCQTContext *s = ctx->priv;
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
float *VAR_9;
AVFrame *out = NULL;
if (!VAR_1) {
while (... | [
"static int FUNC_0(AVFilterLink *VAR_0, AVFrame *VAR_1)\n{",
"AVFilterContext *ctx = VAR_0->dst;",
"AVFilterLink *outlink = ctx->outputs[0];",
"ShowCQTContext *s = ctx->priv;",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"float *VAR_9;",
"AVFrame *out = NULL;",
"if (!VAR_1) {",
"while (s... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45,
47
],
[
49
... |
9,910 | static void rearm_sensor_evts(IPMIBmcSim *ibs,
uint8_t *cmd, unsigned int cmd_len,
uint8_t *rsp, unsigned int *rsp_len,
unsigned int max_rsp_len)
{
IPMISensor *sens;
IPMI_CHECK_CMD_LEN(4);
if ((cmd[2] >= MAX_S... | true | qemu | 4f298a4b2957b7833bc607c951ca27c458d98d88 | static void rearm_sensor_evts(IPMIBmcSim *ibs,
uint8_t *cmd, unsigned int cmd_len,
uint8_t *rsp, unsigned int *rsp_len,
unsigned int max_rsp_len)
{
IPMISensor *sens;
IPMI_CHECK_CMD_LEN(4);
if ((cmd[2] >= MAX_S... | {
"code": [
" IPMI_CHECK_CMD_LEN(4);",
" IPMI_CHECK_CMD_LEN(4);",
" IPMI_CHECK_CMD_LEN(4);"
],
"line_no": [
15,
15,
15
]
} | static void FUNC_0(IPMIBmcSim *VAR_0,
uint8_t *VAR_1, unsigned int VAR_2,
uint8_t *VAR_3, unsigned int *VAR_4,
unsigned int VAR_5)
{
IPMISensor *sens;
IPMI_CHECK_CMD_LEN(4);
if ((VAR_1[2] >= MAX_SENSORS) ||
... | [
"static void FUNC_0(IPMIBmcSim *VAR_0,\nuint8_t *VAR_1, unsigned int VAR_2,\nuint8_t *VAR_3, unsigned int *VAR_4,\nunsigned int VAR_5)\n{",
"IPMISensor *sens;",
"IPMI_CHECK_CMD_LEN(4);",
"if ((VAR_1[2] >= MAX_SENSORS) ||\n!IPMI_SENSOR_GET_PRESENT(VAR_0->sensors + VAR_1[2])) {",
"VAR_3[2] = IPMI_CC_REQ_ENTRY... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
9,912 | CharDriverState *qemu_chr_open_opts(QemuOpts *opts,
void (*init)(struct CharDriverState *s))
{
CharDriverState *chr;
int i;
if (qemu_opts_id(opts) == NULL) {
fprintf(stderr, "chardev: no id specified\n");
for (i = 0; i < ARRAY_SIZE(backend_ta... | true | qemu | 1bbd185fa826a2da7c6089b968f9f7d08438c2c8 | CharDriverState *qemu_chr_open_opts(QemuOpts *opts,
void (*init)(struct CharDriverState *s))
{
CharDriverState *chr;
int i;
if (qemu_opts_id(opts) == NULL) {
fprintf(stderr, "chardev: no id specified\n");
for (i = 0; i < ARRAY_SIZE(backend_ta... | {
"code": [],
"line_no": []
} | CharDriverState *FUNC_0(QemuOpts *opts,
void (*init)(struct CharDriverState *s))
{
CharDriverState *chr;
int VAR_0;
if (qemu_opts_id(opts) == NULL) {
fprintf(stderr, "chardev: no id specified\n");
for (VAR_0 = 0; VAR_0 < ARRAY_SIZE(backend_ta... | [
"CharDriverState *FUNC_0(QemuOpts *opts,\nvoid (*init)(struct CharDriverState *s))\n{",
"CharDriverState *chr;",
"int VAR_0;",
"if (qemu_opts_id(opts) == NULL) {",
"fprintf(stderr, \"chardev: no id specified\\n\");",
"for (VAR_0 = 0; VAR_0 < ARRAY_SIZE(backend_table); VAR_0++) {",
"if (strcmp(backend_ta... | [
0,
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
],
[
26
],
[
28,
30
],
[
33
],
[
35,
37
],
[
43
],
[
45
],
[
47,
49
],
[
55,
57
],
[
59
],
[
61
],
[
65
],
[
67
],
[... |
9,914 | QVirtioPCIDevice *qvirtio_pci_device_find(QPCIBus *bus, uint16_t device_type)
{
QVirtioPCIDevice *dev = NULL;
qvirtio_pci_foreach(bus, device_type, qvirtio_pci_assign_device, &dev);
dev->vdev.bus = &qvirtio_pci;
return dev;
}
| true | qemu | c4523aae0664aecaa366d45e3d0f3d810ca33062 | QVirtioPCIDevice *qvirtio_pci_device_find(QPCIBus *bus, uint16_t device_type)
{
QVirtioPCIDevice *dev = NULL;
qvirtio_pci_foreach(bus, device_type, qvirtio_pci_assign_device, &dev);
dev->vdev.bus = &qvirtio_pci;
return dev;
}
| {
"code": [
" qvirtio_pci_foreach(bus, device_type, qvirtio_pci_assign_device, &dev);"
],
"line_no": [
7
]
} | QVirtioPCIDevice *FUNC_0(QPCIBus *bus, uint16_t device_type)
{
QVirtioPCIDevice *dev = NULL;
qvirtio_pci_foreach(bus, device_type, qvirtio_pci_assign_device, &dev);
dev->vdev.bus = &qvirtio_pci;
return dev;
}
| [
"QVirtioPCIDevice *FUNC_0(QPCIBus *bus, uint16_t device_type)\n{",
"QVirtioPCIDevice *dev = NULL;",
"qvirtio_pci_foreach(bus, device_type, qvirtio_pci_assign_device, &dev);",
"dev->vdev.bus = &qvirtio_pci;",
"return dev;",
"}"
] | [
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
]
] |
9,915 | static int get_dimension(GetBitContext *gb, const int *dim)
{
int t = get_bits(gb, 3);
int val = dim[t];
if(val < 0)
val = dim[get_bits1(gb) - val];
if(!val){
do{
t = get_bits(gb, 8);
val += t << 2;
}while(t == 0xFF);
}
return val;
... | true | FFmpeg | 1546d487cf12da37d90a080813f8d57ac33036bf | static int get_dimension(GetBitContext *gb, const int *dim)
{
int t = get_bits(gb, 3);
int val = dim[t];
if(val < 0)
val = dim[get_bits1(gb) - val];
if(!val){
do{
t = get_bits(gb, 8);
val += t << 2;
}while(t == 0xFF);
}
return val;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(GetBitContext *VAR_0, const int *VAR_1)
{
int VAR_2 = get_bits(VAR_0, 3);
int VAR_3 = VAR_1[VAR_2];
if(VAR_3 < 0)
VAR_3 = VAR_1[get_bits1(VAR_0) - VAR_3];
if(!VAR_3){
do{
VAR_2 = get_bits(VAR_0, 8);
VAR_3 += VAR_2 << 2;
}whi... | [
"static int FUNC_0(GetBitContext *VAR_0, const int *VAR_1)\n{",
"int VAR_2 = get_bits(VAR_0, 3);",
"int VAR_3 = VAR_1[VAR_2];",
"if(VAR_3 < 0)\nVAR_3 = VAR_1[get_bits1(VAR_0) - VAR_3];",
"if(!VAR_3){",
"do{",
"VAR_2 = get_bits(VAR_0, 8);",
"VAR_3 += VAR_2 << 2;",
"}while(VAR_2 == 0xFF);",
"}",
... | [
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
]
] |
9,916 | static int slirp_smb(SlirpState* s, const char *exported_dir,
struct in_addr vserver_addr)
{
static int instance;
char smb_conf[128];
char smb_cmdline[128];
struct passwd *passwd;
FILE *f;
passwd = getpwuid(geteuid());
if (!passwd) {
error_report("failed to retri... | true | qemu | 927d811b282ffdf5386bd63f435c1507634ba49a | static int slirp_smb(SlirpState* s, const char *exported_dir,
struct in_addr vserver_addr)
{
static int instance;
char smb_conf[128];
char smb_cmdline[128];
struct passwd *passwd;
FILE *f;
passwd = getpwuid(geteuid());
if (!passwd) {
error_report("failed to retri... | {
"code": [],
"line_no": []
} | static int FUNC_0(SlirpState* VAR_0, const char *VAR_1,
struct in_addr VAR_2)
{
static int VAR_3;
char VAR_4[128];
char VAR_5[128];
struct VAR_6 *VAR_6;
FILE *f;
VAR_6 = getpwuid(geteuid());
if (!VAR_6) {
error_report("failed to retrieve user name");
snprintf... | [
"static int FUNC_0(SlirpState* VAR_0, const char *VAR_1,\nstruct in_addr VAR_2)\n{",
"static int VAR_3;",
"char VAR_4[128];",
"char VAR_5[128];",
"struct VAR_6 *VAR_6;",
"FILE *f;",
"VAR_6 = getpwuid(geteuid());",
"if (!VAR_6) {",
"error_report(\"failed to retrieve user name\");",
"snprintf(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
] | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12,
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20,
21
],
[
22,
23,
... |
9,917 | static always_inline void gen_op_arith_compute_ca(DisasContext *ctx, TCGv arg1, TCGv arg2, int sub)
{
int l1 = gen_new_label();
#if defined(TARGET_PPC64)
if (!(ctx->sf_mode)) {
TCGv t0, t1;
t0 = tcg_temp_new(TCG_TYPE_TL);
t1 = tcg_temp_new(TCG_TYPE_TL);
tcg_gen_ext32u... | true | qemu | a973001797221b0fd7be55cb6513c72a01f4b639 | static always_inline void gen_op_arith_compute_ca(DisasContext *ctx, TCGv arg1, TCGv arg2, int sub)
{
int l1 = gen_new_label();
#if defined(TARGET_PPC64)
if (!(ctx->sf_mode)) {
TCGv t0, t1;
t0 = tcg_temp_new(TCG_TYPE_TL);
t1 = tcg_temp_new(TCG_TYPE_TL);
tcg_gen_ext32u... | {
"code": [
" if (sub) {",
" tcg_gen_brcond_tl(TCG_COND_GTU, arg1, arg2, l1);",
" } else {",
" tcg_gen_brcond_tl(TCG_COND_GEU, arg1, arg2, l1);",
" tcg_gen_ori_tl(cpu_xer, cpu_xer, 1 << XER_CA);",
" gen_set_label(l1);",
" t0 = tcg_temp_new(TCG_TYPE_TL);"
... | static always_inline void FUNC_0(DisasContext *ctx, TCGv arg1, TCGv arg2, int sub)
{
int VAR_0 = gen_new_label();
#if defined(TARGET_PPC64)
if (!(ctx->sf_mode)) {
TCGv t0, t1;
t0 = tcg_temp_new(TCG_TYPE_TL);
t1 = tcg_temp_new(TCG_TYPE_TL);
tcg_gen_ext32u_tl(t0, arg1);... | [
"static always_inline void FUNC_0(DisasContext *ctx, TCGv arg1, TCGv arg2, int sub)\n{",
"int VAR_0 = gen_new_label();",
"#if defined(TARGET_PPC64)\nif (!(ctx->sf_mode)) {",
"TCGv t0, t1;",
"t0 = tcg_temp_new(TCG_TYPE_TL);",
"t1 = tcg_temp_new(TCG_TYPE_TL);",
"tcg_gen_ext32u_tl(t0, arg1);",
"tcg_gen_e... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
1,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47... |
9,918 | const char *avformat_configuration(void)
{
return FFMPEG_CONFIGURATION;
}
| false | FFmpeg | 29ba091136a5e04574f7bfc1b17536c923958f6f | const char *avformat_configuration(void)
{
return FFMPEG_CONFIGURATION;
}
| {
"code": [],
"line_no": []
} | const char *FUNC_0(void)
{
return FFMPEG_CONFIGURATION;
}
| [
"const char *FUNC_0(void)\n{",
"return FFMPEG_CONFIGURATION;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
9,920 | int ff_framesync_dualinput_get_writable(FFFrameSync *fs, AVFrame **f0, AVFrame **f1)
{
int ret;
ret = ff_framesync_dualinput_get(fs, f0, f1);
if (ret < 0)
return ret;
ret = ff_inlink_make_frame_writable(fs->parent->inputs[0], f0);
if (ret < 0) {
av_frame_free(f0);
... | false | FFmpeg | 29b5f3115d9f217758bebd1d00e541aa3e739d2a | int ff_framesync_dualinput_get_writable(FFFrameSync *fs, AVFrame **f0, AVFrame **f1)
{
int ret;
ret = ff_framesync_dualinput_get(fs, f0, f1);
if (ret < 0)
return ret;
ret = ff_inlink_make_frame_writable(fs->parent->inputs[0], f0);
if (ret < 0) {
av_frame_free(f0);
... | {
"code": [],
"line_no": []
} | int FUNC_0(FFFrameSync *VAR_0, AVFrame **VAR_1, AVFrame **VAR_2)
{
int VAR_3;
VAR_3 = ff_framesync_dualinput_get(VAR_0, VAR_1, VAR_2);
if (VAR_3 < 0)
return VAR_3;
VAR_3 = ff_inlink_make_frame_writable(VAR_0->parent->inputs[0], VAR_1);
if (VAR_3 < 0) {
av_frame_free(VAR_1);... | [
"int FUNC_0(FFFrameSync *VAR_0, AVFrame **VAR_1, AVFrame **VAR_2)\n{",
"int VAR_3;",
"VAR_3 = ff_framesync_dualinput_get(VAR_0, VAR_1, VAR_2);",
"if (VAR_3 < 0)\nreturn VAR_3;",
"VAR_3 = ff_inlink_make_frame_writable(VAR_0->parent->inputs[0], VAR_1);",
"if (VAR_3 < 0) {",
"av_frame_free(VAR_1);",
"av_... | [
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
]
] |
9,921 | static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
int size, int64_t pos, uint64_t cluster_time,
uint64_t duration, int is_keyframe,
int64_t cluster_pos)
{
uint64_t timecode = AV_NOPTS_VALUE;
... | true | FFmpeg | e48f7ff3cb73fbaba0f5b8d442dc5909f705c863 | static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
int size, int64_t pos, uint64_t cluster_time,
uint64_t duration, int is_keyframe,
int64_t cluster_pos)
{
uint64_t timecode = AV_NOPTS_VALUE;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(MatroskaDemuxContext *VAR_0, uint8_t *VAR_1,
int VAR_2, int64_t VAR_3, uint64_t VAR_4,
uint64_t VAR_5, int VAR_6,
int64_t VAR_7)
{
uint64_t timecode = AV_NOPTS_VALUE;
MatroskaTrack *track;
int V... | [
"static int FUNC_0(MatroskaDemuxContext *VAR_0, uint8_t *VAR_1,\nint VAR_2, int64_t VAR_3, uint64_t VAR_4,\nuint64_t VAR_5, int VAR_6,\nint64_t VAR_7)\n{",
"uint64_t timecode = AV_NOPTS_VALUE;",
"MatroskaTrack *track;",
"int VAR_8 = 0;",
"AVStream *st;",
"AVPacket *pkt;",
"int16_t block_time;",
"uint3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
2,
3,
4,
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22,
23
],... |
9,923 | void tcg_optimize(TCGContext *s)
{
int oi, oi_next, nb_temps, nb_globals;
TCGOp *prev_mb = NULL;
struct tcg_temp_info *infos;
TCGTempSet temps_used;
/* Array VALS has an element for each temp.
If this temp holds a constant then its value is kept in VALS' element.
If this temp... | true | qemu | 15fa08f8451babc88d733bd411d4c94976f9d0f8 | void tcg_optimize(TCGContext *s)
{
int oi, oi_next, nb_temps, nb_globals;
TCGOp *prev_mb = NULL;
struct tcg_temp_info *infos;
TCGTempSet temps_used;
nb_temps = s->nb_temps;
nb_globals = s->nb_globals;
bitmap_zero(temps_used.l, nb_temps);
infos = tcg_malloc(sizeof... | {
"code": [
" int oi, oi_next, nb_temps, nb_globals;",
" TCGOp *prev_mb = NULL;",
" for (oi = s->gen_op_buf[0].next; oi != 0; oi = oi_next) {",
" TCGOp * const op = &s->gen_op_buf[oi];",
" oi_next = op->next;",
" oi_next = op2->next;",
" ... | void FUNC_0(TCGContext *VAR_0)
{
int VAR_1, VAR_2, VAR_3, VAR_4;
TCGOp *prev_mb = NULL;
struct tcg_temp_info *VAR_5;
TCGTempSet temps_used;
VAR_3 = VAR_0->VAR_3;
VAR_4 = VAR_0->VAR_4;
bitmap_zero(temps_used.l, VAR_3);
VAR_5 = tcg_malloc(sizeof(struct tcg_temp_inf... | [
"void FUNC_0(TCGContext *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3, VAR_4;",
"TCGOp *prev_mb = NULL;",
"struct tcg_temp_info *VAR_5;",
"TCGTempSet temps_used;",
"VAR_3 = VAR_0->VAR_3;",
"VAR_4 = VAR_0->VAR_4;",
"bitmap_zero(temps_used.l, VAR_3);",
"VAR_5 = tcg_malloc(sizeof(struct tcg_temp_info) * VAR_3)... | [
0,
1,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
],
[
61
],
[
63
],
[
65
... |
9,924 | void ff_mpeg_set_erpic(ERPicture *dst, Picture *src)
{
int i;
if (!src)
return;
dst->f = &src->f;
dst->tf = &src->tf;
for (i = 0; i < 2; i++) {
dst->motion_val[i] = src->motion_val[i];
dst->ref_index[i] = src->ref_index[i];
}
dst->mb_type = src->mb... | true | FFmpeg | 8ef9dcf1d74aea55bf39f1e479fe67e98d973954 | void ff_mpeg_set_erpic(ERPicture *dst, Picture *src)
{
int i;
if (!src)
return;
dst->f = &src->f;
dst->tf = &src->tf;
for (i = 0; i < 2; i++) {
dst->motion_val[i] = src->motion_val[i];
dst->ref_index[i] = src->ref_index[i];
}
dst->mb_type = src->mb... | {
"code": [],
"line_no": []
} | void FUNC_0(ERPicture *VAR_0, Picture *VAR_1)
{
int VAR_2;
if (!VAR_1)
return;
VAR_0->f = &VAR_1->f;
VAR_0->tf = &VAR_1->tf;
for (VAR_2 = 0; VAR_2 < 2; VAR_2++) {
VAR_0->motion_val[VAR_2] = VAR_1->motion_val[VAR_2];
VAR_0->ref_index[VAR_2] = VAR_1->ref_index[V... | [
"void FUNC_0(ERPicture *VAR_0, Picture *VAR_1)\n{",
"int VAR_2;",
"if (!VAR_1)\nreturn;",
"VAR_0->f = &VAR_1->f;",
"VAR_0->tf = &VAR_1->tf;",
"for (VAR_2 = 0; VAR_2 < 2; VAR_2++) {",
"VAR_0->motion_val[VAR_2] = VAR_1->motion_val[VAR_2];",
"VAR_0->ref_index[VAR_2] = VAR_1->ref_index[VAR_2];",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
10,
12
],
[
16
],
[
18
],
[
22
],
[
24
],
[
26
],
[
28
],
[
32
],
[
34
],
[
36
]
] |
9,925 | static uint8_t qvirtio_pci_get_status(QVirtioDevice *d)
{
QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;
return qpci_io_readb(dev->pdev, dev->addr + VIRTIO_PCI_STATUS);
}
| true | qemu | b4ba67d9a702507793c2724e56f98e9b0f7be02b | static uint8_t qvirtio_pci_get_status(QVirtioDevice *d)
{
QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;
return qpci_io_readb(dev->pdev, dev->addr + VIRTIO_PCI_STATUS);
}
| {
"code": [
" return qpci_io_readb(dev->pdev, dev->addr + VIRTIO_PCI_STATUS);"
],
"line_no": [
7
]
} | static uint8_t FUNC_0(QVirtioDevice *d)
{
QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;
return qpci_io_readb(dev->pdev, dev->addr + VIRTIO_PCI_STATUS);
}
| [
"static uint8_t FUNC_0(QVirtioDevice *d)\n{",
"QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;",
"return qpci_io_readb(dev->pdev, dev->addr + VIRTIO_PCI_STATUS);",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
9,926 | static void synthfilt_build_sb_samples (QDM2Context *q, GetBitContext *gb, int length, int sb_min, int sb_max)
{
int sb, j, k, n, ch, run, channels;
int joined_stereo, zero_encoding, chs;
int type34_first;
float type34_div = 0;
float type34_predictor;
float samples[10], sign_bits[16];
... | true | FFmpeg | 64953f67f98da2e787aeb45cc7f504390fa32a69 | static void synthfilt_build_sb_samples (QDM2Context *q, GetBitContext *gb, int length, int sb_min, int sb_max)
{
int sb, j, k, n, ch, run, channels;
int joined_stereo, zero_encoding, chs;
int type34_first;
float type34_div = 0;
float type34_predictor;
float samples[10], sign_bits[16];
... | {
"code": [
" if (get_bits_left(gb) >= 4)",
" samples[0] = type30_dequant[qdm2_get_vlc(gb, &vlc_tab_type30, 0, 1)];",
" samples[0] = type34_delta[qdm2_get_vlc(gb, &vlc_tab_type34, 0, 1)] / type34_div + type34_predictor;",
... | static void FUNC_0 (QDM2Context *VAR_0, GetBitContext *VAR_1, int VAR_2, int VAR_3, int VAR_4)
{
int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;
int VAR_12, VAR_13, VAR_14;
int VAR_15;
float VAR_16 = 0;
float VAR_17;
float VAR_18[10], VAR_19[16];
if (VAR_2 == 0) {
... | [
"static void FUNC_0 (QDM2Context *VAR_0, GetBitContext *VAR_1, int VAR_2, int VAR_3, int VAR_4)\n{",
"int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;",
"int VAR_12, VAR_13, VAR_14;",
"int VAR_15;",
"float VAR_16 = 0;",
"float VAR_17;",
"float VAR_18[10], VAR_19[16];",
"if (VAR_2 == 0) {",
"fo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
41
],
[
45,
47
],
[
49,
51
],
[
53,
55
],
[... |
9,927 | static void test_keyval_visit_alternate(void)
{
Error *err = NULL;
Visitor *v;
QDict *qdict;
AltNumStr *ans;
AltNumInt *ani;
/*
* Can't do scalar alternate variants other than string. You get
* the string variant if there is one, else an error.
*/
qdict = keyval_... | true | qemu | c0644771ebedbd8f47f3c24816445e30111d226b | static void test_keyval_visit_alternate(void)
{
Error *err = NULL;
Visitor *v;
QDict *qdict;
AltNumStr *ans;
AltNumInt *ani;
qdict = keyval_parse("a=1,b=2", NULL, &error_abort);
v = qobject_input_visitor_new_keyval(QOBJECT(qdict));
QDECREF(qdict);
visit_start_... | {
"code": [
" AltNumStr *ans;",
" qdict = keyval_parse(\"a=1,b=2\", NULL, &error_abort);",
" visit_type_AltNumStr(v, \"a\", &ans, &error_abort);",
" g_assert_cmpint(ans->type, ==, QTYPE_QSTRING);",
" g_assert_cmpstr(ans->u.s, ==, \"1\");",
" qapi_free_AltNumStr(ans);",
" ... | static void FUNC_0(void)
{
Error *err = NULL;
Visitor *v;
QDict *qdict;
AltNumStr *ans;
AltNumInt *ani;
qdict = keyval_parse("a=1,b=2", NULL, &error_abort);
v = qobject_input_visitor_new_keyval(QOBJECT(qdict));
QDECREF(qdict);
visit_start_struct(v, NULL, NULL,... | [
"static void FUNC_0(void)\n{",
"Error *err = NULL;",
"Visitor *v;",
"QDict *qdict;",
"AltNumStr *ans;",
"AltNumInt *ani;",
"qdict = keyval_parse(\"a=1,b=2\", NULL, &error_abort);",
"v = qobject_input_visitor_new_keyval(QOBJECT(qdict));",
"QDECREF(qdict);",
"visit_start_struct(v, NULL, NULL, 0, &er... | [
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
1,
1,
1,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
]
] |
9,928 | static int svq3_decode_slice_header(AVCodecContext *avctx)
{
SVQ3Context *svq3 = avctx->priv_data;
H264Context *h = &svq3->h;
MpegEncContext *s = &h->s;
const int mb_xy = h->mb_xy;
int i, header;
header = get_bits(&s->gb, 8);
if (((header & 0x9F) != 1 && (header & 0x9F) != 2) || ... | false | FFmpeg | 979bea13003ef489d95d2538ac2fb1c26c6f103b | static int svq3_decode_slice_header(AVCodecContext *avctx)
{
SVQ3Context *svq3 = avctx->priv_data;
H264Context *h = &svq3->h;
MpegEncContext *s = &h->s;
const int mb_xy = h->mb_xy;
int i, header;
header = get_bits(&s->gb, 8);
if (((header & 0x9F) != 1 && (header & 0x9F) != 2) || ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0)
{
SVQ3Context *svq3 = VAR_0->priv_data;
H264Context *h = &svq3->h;
MpegEncContext *s = &h->s;
const int VAR_1 = h->VAR_1;
int VAR_2, VAR_3;
VAR_3 = get_bits(&s->gb, 8);
if (((VAR_3 & 0x9F) != 1 && (VAR_3 & 0x9F) != 2) || (VAR_3 & 0x60) == ... | [
"static int FUNC_0(AVCodecContext *VAR_0)\n{",
"SVQ3Context *svq3 = VAR_0->priv_data;",
"H264Context *h = &svq3->h;",
"MpegEncContext *s = &h->s;",
"const int VAR_1 = h->VAR_1;",
"int VAR_2, VAR_3;",
"VAR_3 = get_bits(&s->gb, 8);",
"if (((VAR_3 & 0x9F) != 1 && (VAR_3 & 0x9F) != 2) || (VAR_3 & 0x60) ==... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
55
... |
9,930 | void avfilter_default_start_frame(AVFilterLink *link, AVFilterPicRef *picref)
{
AVFilterLink *out = NULL;
if(link->dst->output_count)
out = link->dst->outputs[0];
if(out) {
out->outpic = avfilter_get_video_buffer(out, AV_PERM_WRITE, link->w, link->h);
out->outpic->pts... | true | FFmpeg | b5eab66e9fe6c93056e414b0b4a70a34948843e1 | void avfilter_default_start_frame(AVFilterLink *link, AVFilterPicRef *picref)
{
AVFilterLink *out = NULL;
if(link->dst->output_count)
out = link->dst->outputs[0];
if(out) {
out->outpic = avfilter_get_video_buffer(out, AV_PERM_WRITE, link->w, link->h);
out->outpic->pts... | {
"code": [
" out->outpic = avfilter_get_video_buffer(out, AV_PERM_WRITE, link->w, link->h);"
],
"line_no": [
17
]
} | void FUNC_0(AVFilterLink *VAR_0, AVFilterPicRef *VAR_1)
{
AVFilterLink *out = NULL;
if(VAR_0->dst->output_count)
out = VAR_0->dst->outputs[0];
if(out) {
out->outpic = avfilter_get_video_buffer(out, AV_PERM_WRITE, VAR_0->w, VAR_0->h);
out->outpic->pts = VAR_1->pts;
... | [
"void FUNC_0(AVFilterLink *VAR_0, AVFilterPicRef *VAR_1)\n{",
"AVFilterLink *out = NULL;",
"if(VAR_0->dst->output_count)\nout = VAR_0->dst->outputs[0];",
"if(out) {",
"out->outpic = avfilter_get_video_buffer(out, AV_PERM_WRITE, VAR_0->w, VAR_0->h);",
"out->outpic->pts = VAR_1->pts;",
"avfilter_star... | [
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
9,931 | int load_aout(const char *filename, target_phys_addr_t addr, int max_sz,
int bswap_needed, target_phys_addr_t target_page_size)
{
int fd, size, ret;
struct exec e;
uint32_t magic;
fd = open(filename, O_RDONLY | O_BINARY);
if (fd < 0)
return -1;
size = read(fd, ... | true | qemu | 725e14e91f80b6b2c07b75b66b7b042a9fa9340c | int load_aout(const char *filename, target_phys_addr_t addr, int max_sz,
int bswap_needed, target_phys_addr_t target_page_size)
{
int fd, size, ret;
struct exec e;
uint32_t magic;
fd = open(filename, O_RDONLY | O_BINARY);
if (fd < 0)
return -1;
size = read(fd, ... | {
"code": [
" int fd, size, ret;"
],
"line_no": [
7
]
} | int FUNC_0(const char *VAR_0, target_phys_addr_t VAR_1, int VAR_2,
int VAR_3, target_phys_addr_t VAR_4)
{
int VAR_5, VAR_6, VAR_7;
struct exec VAR_8;
uint32_t magic;
VAR_5 = open(VAR_0, O_RDONLY | O_BINARY);
if (VAR_5 < 0)
return -1;
VAR_6 = read(VAR_5, &VAR_8,... | [
"int FUNC_0(const char *VAR_0, target_phys_addr_t VAR_1, int VAR_2,\nint VAR_3, target_phys_addr_t VAR_4)\n{",
"int VAR_5, VAR_6, VAR_7;",
"struct exec VAR_8;",
"uint32_t magic;",
"VAR_5 = open(VAR_0, O_RDONLY | O_BINARY);",
"if (VAR_5 < 0)\nreturn -1;",
"VAR_6 = read(VAR_5, &VAR_8, sizeof(VAR_8));",
... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
23
],
[
25,
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43,
45,
47,
49,
51
],
[
53
],
[
55
],
[... |
9,932 | int64_t cache_resize(PageCache *cache, int64_t new_num_pages)
{
PageCache *new_cache;
int64_t i;
CacheItem *old_it, *new_it;
g_assert(cache);
/* cache was not inited */
if (cache->page_cache == NULL) {
return -1;
}
/* same size */
if (pow2floor(new_num_page... | true | qemu | 0db65d624e0211a43c011579d6607a50d8f06082 | int64_t cache_resize(PageCache *cache, int64_t new_num_pages)
{
PageCache *new_cache;
int64_t i;
CacheItem *old_it, *new_it;
g_assert(cache);
if (cache->page_cache == NULL) {
return -1;
}
if (pow2floor(new_num_pages) == cache->max_num_items) {
re... | {
"code": [],
"line_no": []
} | int64_t FUNC_0(PageCache *cache, int64_t new_num_pages)
{
PageCache *new_cache;
int64_t i;
CacheItem *old_it, *new_it;
g_assert(cache);
if (cache->page_cache == NULL) {
return -1;
}
if (pow2floor(new_num_pages) == cache->max_num_items) {
return c... | [
"int64_t FUNC_0(PageCache *cache, int64_t new_num_pages)\n{",
"PageCache *new_cache;",
"int64_t i;",
"CacheItem *old_it, *new_it;",
"g_assert(cache);",
"if (cache->page_cache == NULL) {",
"return -1;",
"}",
"if (pow2floor(new_num_pages) == cache->max_num_items) {",
"return cache->max_num_items;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
21
],
[
23
],
[
25
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
53
],
[
55
],
[
57
],
[
61... |
9,933 | static void choose_sample_fmt(AVStream *st, AVCodec *codec)
{
if (codec && codec->sample_fmts) {
const enum AVSampleFormat *p = codec->sample_fmts;
for (; *p != -1; p++) {
if (*p == st->codec->sample_fmt)
break;
}
if (*p == -1) {
av_lo... | true | FFmpeg | 369cb092ecbbaff20bb0a2a1d60536c3bc04a8f0 | static void choose_sample_fmt(AVStream *st, AVCodec *codec)
{
if (codec && codec->sample_fmts) {
const enum AVSampleFormat *p = codec->sample_fmts;
for (; *p != -1; p++) {
if (*p == st->codec->sample_fmt)
break;
}
if (*p == -1) {
av_lo... | {
"code": [
"static void choose_sample_fmt(AVStream *st, AVCodec *codec)",
" if (codec && codec->sample_fmts) {",
" const enum AVSampleFormat *p = codec->sample_fmts;",
" for (; *p != -1; p++) {",
" if (*p == st->codec->sample_fmt)",
" break;",
" ... | static void FUNC_0(AVStream *VAR_0, AVCodec *VAR_1)
{
if (VAR_1 && VAR_1->sample_fmts) {
const enum AVSampleFormat *VAR_2 = VAR_1->sample_fmts;
for (; *VAR_2 != -1; VAR_2++) {
if (*VAR_2 == VAR_0->VAR_1->sample_fmt)
break;
}
if (*VAR_2 == -1) {
... | [
"static void FUNC_0(AVStream *VAR_0, AVCodec *VAR_1)\n{",
"if (VAR_1 && VAR_1->sample_fmts) {",
"const enum AVSampleFormat *VAR_2 = VAR_1->sample_fmts;",
"for (; *VAR_2 != -1; VAR_2++) {",
"if (*VAR_2 == VAR_0->VAR_1->sample_fmt)\nbreak;",
"}",
"if (*VAR_2 == -1) {",
"av_log(NULL, AV_LOG_WARNING,\n\"I... | [
1,
1,
1,
1,
1,
0,
1,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19,
21,
23,
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
9,935 | static void unin_data_write(void *opaque, hwaddr addr,
uint64_t val, unsigned len)
{
UNINState *s = opaque;
PCIHostState *phb = PCI_HOST_BRIDGE(s);
UNIN_DPRINTF("write addr %" TARGET_FMT_plx " len %d val %"PRIx64"\n",
addr, len, val);
pci_data_write(ph... | true | qemu | 2f448e415f364d0ec4c5556993e44ca183e31c5c | static void unin_data_write(void *opaque, hwaddr addr,
uint64_t val, unsigned len)
{
UNINState *s = opaque;
PCIHostState *phb = PCI_HOST_BRIDGE(s);
UNIN_DPRINTF("write addr %" TARGET_FMT_plx " len %d val %"PRIx64"\n",
addr, len, val);
pci_data_write(ph... | {
"code": [
" UNIN_DPRINTF(\"write addr %\" TARGET_FMT_plx \" len %d val %\"PRIx64\"\\n\","
],
"line_no": [
11
]
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
UNINState *s = VAR_0;
PCIHostState *phb = PCI_HOST_BRIDGE(s);
UNIN_DPRINTF("write VAR_1 %" TARGET_FMT_plx " VAR_3 %d VAR_2 %"PRIx64"\n",
VAR_1, VAR_3, VAR_2);
pci_data_writ... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"UNINState *s = VAR_0;",
"PCIHostState *phb = PCI_HOST_BRIDGE(s);",
"UNIN_DPRINTF(\"write VAR_1 %\" TARGET_FMT_plx \" VAR_3 %d VAR_2 %\"PRIx64\"\\n\",\nVAR_1, VAR_3, VAR_2);",
"pci_data_write(phb->bus,\nunin_get_config_reg(... | [
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11,
13
],
[
15,
17,
19
],
[
21
]
] |
9,936 | static bool vhost_section(MemoryRegionSection *section)
{
return memory_region_is_ram(section->mr);
}
| true | qemu | af60314291af3cabda18d27f928b0e0ff899cc76 | static bool vhost_section(MemoryRegionSection *section)
{
return memory_region_is_ram(section->mr);
}
| {
"code": [
"static bool vhost_section(MemoryRegionSection *section)",
" return memory_region_is_ram(section->mr);"
],
"line_no": [
1,
5
]
} | static bool FUNC_0(MemoryRegionSection *section)
{
return memory_region_is_ram(section->mr);
}
| [
"static bool FUNC_0(MemoryRegionSection *section)\n{",
"return memory_region_is_ram(section->mr);",
"}"
] | [
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
9,937 | void do_subfzeo (void)
{
T1 = T0;
T0 = ~T0 + xer_ca;
if (likely(!((~T1 ^ (-1)) & ((~T1) ^ T0) & (1 << 31)))) {
xer_ov = 0;
} else {
xer_ov = 1;
xer_so = 1;
}
if (likely(T0 >= ~T1)) {
xer_ca = 0;
} else {
xer_ca = 1;
}
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | void do_subfzeo (void)
{
T1 = T0;
T0 = ~T0 + xer_ca;
if (likely(!((~T1 ^ (-1)) & ((~T1) ^ T0) & (1 << 31)))) {
xer_ov = 0;
} else {
xer_ov = 1;
xer_so = 1;
}
if (likely(T0 >= ~T1)) {
xer_ca = 0;
} else {
xer_ca = 1;
}
}
| {
"code": [
" xer_ca = 1;",
" T1 = T0;",
" } else {",
" xer_ca = 0;",
" T1 = T0;",
" T1 = T0;",
" xer_ca = 1;",
" } else {",
" xer_ca = 0;",
" xer_ca = 1;",
" } else {",
" T1 = T0;",
" xer_ov = 0;",
... | void FUNC_0 (void)
{
T1 = T0;
T0 = ~T0 + xer_ca;
if (likely(!((~T1 ^ (-1)) & ((~T1) ^ T0) & (1 << 31)))) {
xer_ov = 0;
} else {
xer_ov = 1;
xer_so = 1;
}
if (likely(T0 >= ~T1)) {
xer_ca = 0;
} else {
xer_ca = 1;
}
}
| [
"void FUNC_0 (void)\n{",
"T1 = T0;",
"T0 = ~T0 + xer_ca;",
"if (likely(!((~T1 ^ (-1)) & ((~T1) ^ T0) & (1 << 31)))) {",
"xer_ov = 0;",
"} else {",
"xer_ov = 1;",
"xer_so = 1;",
"}",
"if (likely(T0 >= ~T1)) {",
"xer_ca = 0;",
"} else {",
"xer_ca = 1;",
"}",
"}"
] | [
0,
1,
0,
1,
1,
0,
1,
1,
0,
1,
1,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
9,938 | static void test_visitor_out_native_list_int(TestOutputVisitorData *data,
const void *unused)
{
test_native_list(data, unused, USER_DEF_NATIVE_LIST_UNION_KIND_INTEGER);
}
| false | qemu | b3db211f3c80bb996a704d665fe275619f728bd4 | static void test_visitor_out_native_list_int(TestOutputVisitorData *data,
const void *unused)
{
test_native_list(data, unused, USER_DEF_NATIVE_LIST_UNION_KIND_INTEGER);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(TestOutputVisitorData *VAR_0,
const void *VAR_1)
{
test_native_list(VAR_0, VAR_1, USER_DEF_NATIVE_LIST_UNION_KIND_INTEGER);
}
| [
"static void FUNC_0(TestOutputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"test_native_list(VAR_0, VAR_1, USER_DEF_NATIVE_LIST_UNION_KIND_INTEGER);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
9,939 | QList *qlist_new(void)
{
QList *qlist;
qlist = g_malloc(sizeof(*qlist));
QTAILQ_INIT(&qlist->head);
QOBJECT_INIT(qlist, &qlist_type);
return qlist;
}
| false | qemu | 55e1819c509b3d9c10a54678b9c585bbda13889e | QList *qlist_new(void)
{
QList *qlist;
qlist = g_malloc(sizeof(*qlist));
QTAILQ_INIT(&qlist->head);
QOBJECT_INIT(qlist, &qlist_type);
return qlist;
}
| {
"code": [],
"line_no": []
} | QList *FUNC_0(void)
{
QList *qlist;
qlist = g_malloc(sizeof(*qlist));
QTAILQ_INIT(&qlist->head);
QOBJECT_INIT(qlist, &qlist_type);
return qlist;
}
| [
"QList *FUNC_0(void)\n{",
"QList *qlist;",
"qlist = g_malloc(sizeof(*qlist));",
"QTAILQ_INIT(&qlist->head);",
"QOBJECT_INIT(qlist, &qlist_type);",
"return qlist;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
]
] |
9,940 | static int decode_wdlt(GetByteContext *gb, uint8_t *frame, int width, int height)
{
const uint8_t *frame_end = frame + width * height;
uint8_t *line_ptr;
int count, i, v, lines, segments;
lines = bytestream2_get_le16(gb);
if (lines > height)
return -1;
while (lines--) {
... | false | FFmpeg | 8099187e897ddc90cb3902332c76fb2542dac308 | static int decode_wdlt(GetByteContext *gb, uint8_t *frame, int width, int height)
{
const uint8_t *frame_end = frame + width * height;
uint8_t *line_ptr;
int count, i, v, lines, segments;
lines = bytestream2_get_le16(gb);
if (lines > height)
return -1;
while (lines--) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(GetByteContext *VAR_0, uint8_t *VAR_1, int VAR_2, int VAR_3)
{
const uint8_t *VAR_4 = VAR_1 + VAR_2 * VAR_3;
uint8_t *line_ptr;
int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;
VAR_8 = bytestream2_get_le16(VAR_0);
if (VAR_8 > VAR_3)
return -1;
while (VAR_8--) {
... | [
"static int FUNC_0(GetByteContext *VAR_0, uint8_t *VAR_1, int VAR_2, int VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_1 + VAR_2 * VAR_3;",
"uint8_t *line_ptr;",
"int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;",
"VAR_8 = bytestream2_get_le16(VAR_0);",
"if (VAR_8 > VAR_3)\nreturn -1;",
"while (VAR_8--) {",
"if (by... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
9,941 | static void fw_cfg_comb_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
switch (size) {
case 1:
fw_cfg_write(opaque, (uint8_t)value);
break;
case 2:
fw_cfg_select(opaque, (uint16_t)value);
break;
}
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void fw_cfg_comb_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
switch (size) {
case 1:
fw_cfg_write(opaque, (uint8_t)value);
break;
case 2:
fw_cfg_select(opaque, (uint16_t)value);
break;
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
switch (VAR_3) {
case 1:
fw_cfg_write(VAR_0, (uint8_t)VAR_2);
break;
case 2:
fw_cfg_select(VAR_0, (uint16_t)VAR_2);
break;
}
}
| [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"switch (VAR_3) {",
"case 1:\nfw_cfg_write(VAR_0, (uint8_t)VAR_2);",
"break;",
"case 2:\nfw_cfg_select(VAR_0, (uint16_t)VAR_2);",
"break;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9,
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
]
] |
9,942 | void virtio_queue_notify(VirtIODevice *vdev, int n)
{
if (n < VIRTIO_PCI_QUEUE_MAX && vdev->vq[n].vring.desc) {
trace_virtio_queue_notify(vdev, n, &vdev->vq[n]);
vdev->vq[n].handle_output(vdev, &vdev->vq[n]);
}
}
| false | qemu | 25db9ebe15125deb32958c6df74996f745edf1f9 | void virtio_queue_notify(VirtIODevice *vdev, int n)
{
if (n < VIRTIO_PCI_QUEUE_MAX && vdev->vq[n].vring.desc) {
trace_virtio_queue_notify(vdev, n, &vdev->vq[n]);
vdev->vq[n].handle_output(vdev, &vdev->vq[n]);
}
}
| {
"code": [],
"line_no": []
} | void FUNC_0(VirtIODevice *VAR_0, int VAR_1)
{
if (VAR_1 < VIRTIO_PCI_QUEUE_MAX && VAR_0->vq[VAR_1].vring.desc) {
trace_virtio_queue_notify(VAR_0, VAR_1, &VAR_0->vq[VAR_1]);
VAR_0->vq[VAR_1].handle_output(VAR_0, &VAR_0->vq[VAR_1]);
}
}
| [
"void FUNC_0(VirtIODevice *VAR_0, int VAR_1)\n{",
"if (VAR_1 < VIRTIO_PCI_QUEUE_MAX && VAR_0->vq[VAR_1].vring.desc) {",
"trace_virtio_queue_notify(VAR_0, VAR_1, &VAR_0->vq[VAR_1]);",
"VAR_0->vq[VAR_1].handle_output(VAR_0, &VAR_0->vq[VAR_1]);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
9,944 | void ioinst_handle_stcrw(S390CPU *cpu, uint32_t ipb)
{
CRW *crw;
uint64_t addr;
int cc;
hwaddr len = sizeof(*crw);
CPUS390XState *env = &cpu->env;
addr = decode_basedisp_s(env, ipb);
if (addr & 3) {
program_interrupt(env, PGM_SPECIFICATION, 2);
return;
}
... | false | qemu | 7f74f0aa74a01698ef24459f7bc2a23f3880a2b8 | void ioinst_handle_stcrw(S390CPU *cpu, uint32_t ipb)
{
CRW *crw;
uint64_t addr;
int cc;
hwaddr len = sizeof(*crw);
CPUS390XState *env = &cpu->env;
addr = decode_basedisp_s(env, ipb);
if (addr & 3) {
program_interrupt(env, PGM_SPECIFICATION, 2);
return;
}
... | {
"code": [],
"line_no": []
} | void FUNC_0(S390CPU *VAR_0, uint32_t VAR_1)
{
CRW *crw;
uint64_t addr;
int VAR_2;
hwaddr len = sizeof(*crw);
CPUS390XState *env = &VAR_0->env;
addr = decode_basedisp_s(env, VAR_1);
if (addr & 3) {
program_interrupt(env, PGM_SPECIFICATION, 2);
return;
}
c... | [
"void FUNC_0(S390CPU *VAR_0, uint32_t VAR_1)\n{",
"CRW *crw;",
"uint64_t addr;",
"int VAR_2;",
"hwaddr len = sizeof(*crw);",
"CPUS390XState *env = &VAR_0->env;",
"addr = decode_basedisp_s(env, VAR_1);",
"if (addr & 3) {",
"program_interrupt(env, PGM_SPECIFICATION, 2);",
"return;",
"}",
"crw = ... | [
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
],
[
41
],
[
45,
47
],
[... |
9,945 | void sysbus_mmio_map_overlap(SysBusDevice *dev, int n, hwaddr addr,
unsigned priority)
{
sysbus_mmio_map_common(dev, n, addr, true, priority);
}
| false | qemu | a1ff8ae0666ffcbe78ae7e28812dd30db6bb7131 | void sysbus_mmio_map_overlap(SysBusDevice *dev, int n, hwaddr addr,
unsigned priority)
{
sysbus_mmio_map_common(dev, n, addr, true, priority);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(SysBusDevice *VAR_0, int VAR_1, hwaddr VAR_2,
unsigned VAR_3)
{
sysbus_mmio_map_common(VAR_0, VAR_1, VAR_2, true, VAR_3);
}
| [
"void FUNC_0(SysBusDevice *VAR_0, int VAR_1, hwaddr VAR_2,\nunsigned VAR_3)\n{",
"sysbus_mmio_map_common(VAR_0, VAR_1, VAR_2, true, VAR_3);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
9,946 | static int tpm_passthrough_test_tpmdev(int fd)
{
struct tpm_req_hdr req = {
.tag = cpu_to_be16(TPM_TAG_RQU_COMMAND),
.len = cpu_to_be32(sizeof(req)),
.ordinal = cpu_to_be32(TPM_ORD_GetTicks),
};
struct tpm_resp_hdr *resp;
fd_set readfds;
int n;
struct timeval tv... | false | qemu | 56a3c24ffc11955ddc7bb21362ca8069a3fc8c55 | static int tpm_passthrough_test_tpmdev(int fd)
{
struct tpm_req_hdr req = {
.tag = cpu_to_be16(TPM_TAG_RQU_COMMAND),
.len = cpu_to_be32(sizeof(req)),
.ordinal = cpu_to_be32(TPM_ORD_GetTicks),
};
struct tpm_resp_hdr *resp;
fd_set readfds;
int n;
struct timeval tv... | {
"code": [],
"line_no": []
} | static int FUNC_0(int VAR_0)
{
struct tpm_req_hdr VAR_1 = {
.tag = cpu_to_be16(TPM_TAG_RQU_COMMAND),
.len = cpu_to_be32(sizeof(VAR_1)),
.ordinal = cpu_to_be32(TPM_ORD_GetTicks),
};
struct tpm_resp_hdr *VAR_2;
fd_set readfds;
int VAR_3;
struct timeval VAR_4 = {
... | [
"static int FUNC_0(int VAR_0)\n{",
"struct tpm_req_hdr VAR_1 = {",
".tag = cpu_to_be16(TPM_TAG_RQU_COMMAND),\n.len = cpu_to_be32(sizeof(VAR_1)),\n.ordinal = cpu_to_be32(TPM_ORD_GetTicks),\n};",
"struct tpm_resp_hdr *VAR_2;",
"fd_set readfds;",
"int VAR_3;",
"struct timeval VAR_4 = {",
".tv_sec = 1,\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
] | [
[
1,
3
],
[
5
],
[
7,
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25,
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[... |
9,947 | static int tight_palette_insert(QDict *palette, uint32_t rgb, int bpp, int max)
{
uint8_t key[6];
int idx = qdict_size(palette);
bool present;
tight_palette_rgb2buf(rgb, bpp, key);
present = qdict_haskey(palette, (char *)key);
if (idx >= max && !present) {
return 0;
}
... | false | qemu | 245f7b51c0ea04fb2224b1127430a096c91aee70 | static int tight_palette_insert(QDict *palette, uint32_t rgb, int bpp, int max)
{
uint8_t key[6];
int idx = qdict_size(palette);
bool present;
tight_palette_rgb2buf(rgb, bpp, key);
present = qdict_haskey(palette, (char *)key);
if (idx >= max && !present) {
return 0;
}
... | {
"code": [],
"line_no": []
} | static int FUNC_0(QDict *VAR_0, uint32_t VAR_1, int VAR_2, int VAR_3)
{
uint8_t key[6];
int VAR_4 = qdict_size(VAR_0);
bool present;
tight_palette_rgb2buf(VAR_1, VAR_2, key);
present = qdict_haskey(VAR_0, (char *)key);
if (VAR_4 >= VAR_3 && !present) {
return 0;
}
if ... | [
"static int FUNC_0(QDict *VAR_0, uint32_t VAR_1, int VAR_2, int VAR_3)\n{",
"uint8_t key[6];",
"int VAR_4 = qdict_size(VAR_0);",
"bool present;",
"tight_palette_rgb2buf(VAR_1, VAR_2, key);",
"present = qdict_haskey(VAR_0, (char *)key);",
"if (VAR_4 >= VAR_3 && !present) {",
"return 0;",
"}",
"if (... | [
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
]
] |
9,948 | static void vnc_connect(VncDisplay *vd, int csock,
bool skipauth, bool websocket)
{
VncState *vs = g_malloc0(sizeof(VncState));
int i;
vs->csock = csock;
vs->vd = vd;
if (skipauth) {
vs->auth = VNC_AUTH_NONE;
vs->subauth = VNC_AUTH_INVALID;
} else {
... | false | qemu | 8e9b0d24fb986d4241ae3b77752eca5dab4cb486 | static void vnc_connect(VncDisplay *vd, int csock,
bool skipauth, bool websocket)
{
VncState *vs = g_malloc0(sizeof(VncState));
int i;
vs->csock = csock;
vs->vd = vd;
if (skipauth) {
vs->auth = VNC_AUTH_NONE;
vs->subauth = VNC_AUTH_INVALID;
} else {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(VncDisplay *VAR_0, int VAR_1,
bool VAR_2, bool VAR_3)
{
VncState *vs = g_malloc0(sizeof(VncState));
int VAR_4;
vs->VAR_1 = VAR_1;
vs->VAR_0 = VAR_0;
if (VAR_2) {
vs->auth = VNC_AUTH_NONE;
vs->subauth = VNC_AUTH_INVALID;
} else {
... | [
"static void FUNC_0(VncDisplay *VAR_0, int VAR_1,\nbool VAR_2, bool VAR_3)\n{",
"VncState *vs = g_malloc0(sizeof(VncState));",
"int VAR_4;",
"vs->VAR_1 = VAR_1;",
"vs->VAR_0 = VAR_0;",
"if (VAR_2) {",
"vs->auth = VNC_AUTH_NONE;",
"vs->subauth = VNC_AUTH_INVALID;",
"} else {",
"if (VAR_3) {",
"vs... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
49
... |
9,949 | static void lsi_command_complete(SCSIRequest *req, uint32_t status, size_t resid)
{
LSIState *s = DO_UPCAST(LSIState, dev.qdev, req->bus->qbus.parent);
int out;
out = (s->sstat1 & PHASE_MASK) == PHASE_DO;
DPRINTF("Command complete status=%d\n", (int)status);
s->status = status;
s->comma... | false | qemu | 8f6e699ddbcad32480fa64796ccf44cbaf5b4b91 | static void lsi_command_complete(SCSIRequest *req, uint32_t status, size_t resid)
{
LSIState *s = DO_UPCAST(LSIState, dev.qdev, req->bus->qbus.parent);
int out;
out = (s->sstat1 & PHASE_MASK) == PHASE_DO;
DPRINTF("Command complete status=%d\n", (int)status);
s->status = status;
s->comma... | {
"code": [],
"line_no": []
} | static void FUNC_0(SCSIRequest *VAR_0, uint32_t VAR_1, size_t VAR_2)
{
LSIState *s = DO_UPCAST(LSIState, dev.qdev, VAR_0->bus->qbus.parent);
int VAR_3;
VAR_3 = (s->sstat1 & PHASE_MASK) == PHASE_DO;
DPRINTF("Command complete VAR_1=%d\n", (int)VAR_1);
s->VAR_1 = VAR_1;
s->command_complete... | [
"static void FUNC_0(SCSIRequest *VAR_0, uint32_t VAR_1, size_t VAR_2)\n{",
"LSIState *s = DO_UPCAST(LSIState, dev.qdev, VAR_0->bus->qbus.parent);",
"int VAR_3;",
"VAR_3 = (s->sstat1 & PHASE_MASK) == PHASE_DO;",
"DPRINTF(\"Command complete VAR_1=%d\\n\", (int)VAR_1);",
"s->VAR_1 = VAR_1;",
"s->command_co... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
9,950 | static ssize_t test_block_init_func(QCryptoBlock *block,
void *opaque,
size_t headerlen,
Error **errp)
{
Buffer *header = opaque;
g_assert_cmpint(header->capacity, ==, 0);
buffer_reserve(he... | false | qemu | e4a3507e86a1ef1453d603031bca27d5ac4cff3c | static ssize_t test_block_init_func(QCryptoBlock *block,
void *opaque,
size_t headerlen,
Error **errp)
{
Buffer *header = opaque;
g_assert_cmpint(header->capacity, ==, 0);
buffer_reserve(he... | {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(QCryptoBlock *block,
void *opaque,
size_t headerlen,
Error **errp)
{
Buffer *header = opaque;
g_assert_cmpint(header->capacity, ==, 0);
buffer_reserve(header, headerle... | [
"static ssize_t FUNC_0(QCryptoBlock *block,\nvoid *opaque,\nsize_t headerlen,\nError **errp)\n{",
"Buffer *header = opaque;",
"g_assert_cmpint(header->capacity, ==, 0);",
"buffer_reserve(header, headerlen);",
"return headerlen;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
15
],
[
19
],
[
23
],
[
25
]
] |
9,951 | static inline void decode_hrd_parameters(H264Context *h, SPS *sps){
MpegEncContext * const s = &h->s;
int cpb_count, i;
cpb_count = get_ue_golomb(&s->gb) + 1;
get_bits(&s->gb, 4); /* bit_rate_scale */
get_bits(&s->gb, 4); /* cpb_size_scale */
for(i=0; i<cpb_count; i++){
get_ue_gol... | false | FFmpeg | d23b28c78b56f53f3f0e74edb0f15a3b451207ad | static inline void decode_hrd_parameters(H264Context *h, SPS *sps){
MpegEncContext * const s = &h->s;
int cpb_count, i;
cpb_count = get_ue_golomb(&s->gb) + 1;
get_bits(&s->gb, 4);
get_bits(&s->gb, 4);
for(i=0; i<cpb_count; i++){
get_ue_golomb(&s->gb);
get_ue_golomb(&s-... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(H264Context *VAR_0, SPS *VAR_1){
MpegEncContext * const s = &VAR_0->s;
int VAR_2, VAR_3;
VAR_2 = get_ue_golomb(&s->gb) + 1;
get_bits(&s->gb, 4);
get_bits(&s->gb, 4);
for(VAR_3=0; VAR_3<VAR_2; VAR_3++){
get_ue_golomb(&s->gb);
get_ue_golomb(&s->... | [
"static inline void FUNC_0(H264Context *VAR_0, SPS *VAR_1){",
"MpegEncContext * const s = &VAR_0->s;",
"int VAR_2, VAR_3;",
"VAR_2 = get_ue_golomb(&s->gb) + 1;",
"get_bits(&s->gb, 4);",
"get_bits(&s->gb, 4);",
"for(VAR_3=0; VAR_3<VAR_2; VAR_3++){",
"get_ue_golomb(&s->gb);",
"get_ue_golomb(&s->gb);",... | [
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
]
] |
9,952 | void OPPROTO op_addw_ESI_T0(void)
{
ESI = (ESI & ~0xffff) | ((ESI + T0) & 0xffff);
}
| false | qemu | 6e0d8677cb443e7408c0b7a25a93c6596d7fa380 | void OPPROTO op_addw_ESI_T0(void)
{
ESI = (ESI & ~0xffff) | ((ESI + T0) & 0xffff);
}
| {
"code": [],
"line_no": []
} | void VAR_0 op_addw_ESI_T0(void)
{
ESI = (ESI & ~0xffff) | ((ESI + T0) & 0xffff);
}
| [
"void VAR_0 op_addw_ESI_T0(void)\n{",
"ESI = (ESI & ~0xffff) | ((ESI + T0) & 0xffff);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
9,953 | uint8_t *xen_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size,
uint8_t lock)
{
MapCacheEntry *entry, *pentry = NULL;
target_phys_addr_t address_index = phys_addr >> MCACHE_BUCKET_SHIFT;
target_phys_addr_t address_offset = phys_addr & (MCACHE_BUCKET_SIZE - 1);
... | false | qemu | cd1ba7de230b3a85fb4dba53bb681b7ea626b4eb | uint8_t *xen_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size,
uint8_t lock)
{
MapCacheEntry *entry, *pentry = NULL;
target_phys_addr_t address_index = phys_addr >> MCACHE_BUCKET_SHIFT;
target_phys_addr_t address_offset = phys_addr & (MCACHE_BUCKET_SIZE - 1);
... | {
"code": [],
"line_no": []
} | uint8_t *FUNC_0(target_phys_addr_t phys_addr, target_phys_addr_t size,
uint8_t lock)
{
MapCacheEntry *entry, *pentry = NULL;
target_phys_addr_t address_index = phys_addr >> MCACHE_BUCKET_SHIFT;
target_phys_addr_t address_offset = phys_addr & (MCACHE_BUCKET_SIZE - 1);
target... | [
"uint8_t *FUNC_0(target_phys_addr_t phys_addr, target_phys_addr_t size,\nuint8_t lock)\n{",
"MapCacheEntry *entry, *pentry = NULL;",
"target_phys_addr_t address_index = phys_addr >> MCACHE_BUCKET_SHIFT;",
"target_phys_addr_t address_offset = phys_addr & (MCACHE_BUCKET_SIZE - 1);",
"target_phys_addr_t __siz... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33,
35
],
[
37,
39
],
[
41,
43
],
[
47
],
[
51,
53,
55,
57
],
[
59
],
[... |
9,954 | static unsigned int dec_move_pm(DisasContext *dc)
{
TCGv t0;
int memsize;
memsize = preg_sizes[dc->op2];
DIS(fprintf (logfile, "move.%c $p%u, [$r%u%s\n",
memsize_char(memsize),
dc->op2, dc->op1, dc->postinc ? "+]" : "]"));
/* prepare store. Address in T0, value in T1. */
if (dc->op2... | false | qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | static unsigned int dec_move_pm(DisasContext *dc)
{
TCGv t0;
int memsize;
memsize = preg_sizes[dc->op2];
DIS(fprintf (logfile, "move.%c $p%u, [$r%u%s\n",
memsize_char(memsize),
dc->op2, dc->op1, dc->postinc ? "+]" : "]"));
if (dc->op2 == PR_CCS)
cris_evaluate_flags(dc);
t0 = tc... | {
"code": [],
"line_no": []
} | static unsigned int FUNC_0(DisasContext *VAR_0)
{
TCGv t0;
int VAR_1;
VAR_1 = preg_sizes[VAR_0->op2];
DIS(fprintf (logfile, "move.%c $p%u, [$r%u%s\n",
memsize_char(VAR_1),
VAR_0->op2, VAR_0->op1, VAR_0->postinc ? "+]" : "]"));
if (VAR_0->op2 == PR_CCS)
cris_evaluate_flags(VAR_0);... | [
"static unsigned int FUNC_0(DisasContext *VAR_0)\n{",
"TCGv t0;",
"int VAR_1;",
"VAR_1 = preg_sizes[VAR_0->op2];",
"DIS(fprintf (logfile, \"move.%c $p%u, [$r%u%s\\n\",\nmemsize_char(VAR_1),\nVAR_0->op2, VAR_0->op1, VAR_0->postinc ? \"+]\" : \"]\"));",
"if (VAR_0->op2 == PR_CCS)\ncris_evaluate_flags(VAR_0)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15,
17,
19
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43,
45
],
[
47
],
[
49
]
] |
9,955 | static void test_event_d(TestEventData *data,
const void *unused)
{
UserDefOne struct1;
EventStructOne a;
UserDefZero z;
QDict *d, *d_data, *d_a, *d_struct1;
z.integer = 2;
struct1.base = &z;
struct1.string = g_strdup("test1");
struct1.has_enum1 = tru... | false | qemu | ddf21908961073199f3d186204da4810f2ea150b | static void test_event_d(TestEventData *data,
const void *unused)
{
UserDefOne struct1;
EventStructOne a;
UserDefZero z;
QDict *d, *d_data, *d_a, *d_struct1;
z.integer = 2;
struct1.base = &z;
struct1.string = g_strdup("test1");
struct1.has_enum1 = tru... | {
"code": [],
"line_no": []
} | static void FUNC_0(TestEventData *VAR_0,
const void *VAR_1)
{
UserDefOne struct1;
EventStructOne a;
UserDefZero z;
QDict *d, *d_data, *d_a, *d_struct1;
z.integer = 2;
struct1.base = &z;
struct1.string = g_strdup("test1");
struct1.has_enum1 = true;
... | [
"static void FUNC_0(TestEventData *VAR_0,\nconst void *VAR_1)\n{",
"UserDefOne struct1;",
"EventStructOne a;",
"UserDefZero z;",
"QDict *d, *d_data, *d_a, *d_struct1;",
"z.integer = 2;",
"struct1.base = &z;",
"struct1.string = g_strdup(\"test1\");",
"struct1.has_enum1 = true;",
"struct1.enum1 = EN... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[... |
9,957 | void ide_init2(IDEBus *bus, DriveInfo *hd0, DriveInfo *hd1,
qemu_irq irq)
{
IDEState *s;
static int drive_serial = 1;
int i, cylinders, heads, secs;
uint64_t nb_sectors;
for(i = 0; i < 2; i++) {
s = bus->ifs + i;
s->bus = bus;
s->unit = i;
... | false | qemu | 88804180fd705d3c4f3dd50e0b9bd7b70c5db0ef | void ide_init2(IDEBus *bus, DriveInfo *hd0, DriveInfo *hd1,
qemu_irq irq)
{
IDEState *s;
static int drive_serial = 1;
int i, cylinders, heads, secs;
uint64_t nb_sectors;
for(i = 0; i < 2; i++) {
s = bus->ifs + i;
s->bus = bus;
s->unit = i;
... | {
"code": [],
"line_no": []
} | void FUNC_0(IDEBus *VAR_0, DriveInfo *VAR_1, DriveInfo *VAR_2,
qemu_irq VAR_3)
{
IDEState *s;
static int VAR_4 = 1;
int VAR_5, VAR_6, VAR_7, VAR_8;
uint64_t nb_sectors;
for(VAR_5 = 0; VAR_5 < 2; VAR_5++) {
s = VAR_0->ifs + VAR_5;
s->VAR_0 = VAR_0;
s... | [
"void FUNC_0(IDEBus *VAR_0, DriveInfo *VAR_1, DriveInfo *VAR_2,\nqemu_irq VAR_3)\n{",
"IDEState *s;",
"static int VAR_4 = 1;",
"int VAR_5, VAR_6, VAR_7, VAR_8;",
"uint64_t nb_sectors;",
"for(VAR_5 = 0; VAR_5 < 2; VAR_5++) {",
"s = VAR_0->ifs + VAR_5;",
"s->VAR_0 = VAR_0;",
"s->unit = VAR_5;",
"if ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
9,958 | BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs,
const char *child_name,
const BdrvChildRole *child_role,
uint64_t perm, uint64_t shared_perm,
void *opaque, Error **er... | false | qemu | 33a610c398603efafd954c706ba07850835a5098 | BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs,
const char *child_name,
const BdrvChildRole *child_role,
uint64_t perm, uint64_t shared_perm,
void *opaque, Error **er... | {
"code": [],
"line_no": []
} | BdrvChild *FUNC_0(BlockDriverState *child_bs,
const char *child_name,
const BdrvChildRole *child_role,
uint64_t perm, uint64_t shared_perm,
void *opaque, Error **errp)
{
Bdrv... | [
"BdrvChild *FUNC_0(BlockDriverState *child_bs,\nconst char *child_name,\nconst BdrvChildRole *child_role,\nuint64_t perm, uint64_t shared_perm,\nvoid *opaque, Error **errp)\n{",
"BdrvChild *child;",
"int VAR_0;",
"VAR_0 = bdrv_check_update_perm(child_bs, perm, shared_perm, NULL, errp);",
"if (VAR_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,
43,
45
],
[
49
],
[
53
],
[
55
]
] |
9,959 | static void do_eject(int argc, const char **argv)
{
BlockDriverState *bs;
const char **parg;
int force;
parg = argv + 1;
if (!*parg) {
fail:
help_cmd(argv[0]);
return;
}
force = 0;
if (!strcmp(*parg, "-f")) {
force = 1;
parg++;
}
... | false | qemu | 9307c4c1d93939db9b04117b654253af5113dc21 | static void do_eject(int argc, const char **argv)
{
BlockDriverState *bs;
const char **parg;
int force;
parg = argv + 1;
if (!*parg) {
fail:
help_cmd(argv[0]);
return;
}
force = 0;
if (!strcmp(*parg, "-f")) {
force = 1;
parg++;
}
... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0, const char **VAR_1)
{
BlockDriverState *bs;
const char **VAR_2;
int VAR_3;
VAR_2 = VAR_1 + 1;
if (!*VAR_2) {
fail:
help_cmd(VAR_1[0]);
return;
}
VAR_3 = 0;
if (!strcmp(*VAR_2, "-f")) {
VAR_3 = 1;
VAR_2++;
... | [
"static void FUNC_0(int VAR_0, const char **VAR_1)\n{",
"BlockDriverState *bs;",
"const char **VAR_2;",
"int VAR_3;",
"VAR_2 = VAR_1 + 1;",
"if (!*VAR_2) {",
"fail:\nhelp_cmd(VAR_1[0]);",
"return;",
"}",
"VAR_3 = 0;",
"if (!strcmp(*VAR_2, \"-f\")) {",
"VAR_3 = 1;",
"VAR_2++;",
"}",
"if (... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
9,960 | long do_sigreturn(CPUSH4State *regs)
{
struct target_sigframe *frame;
abi_ulong frame_addr;
sigset_t blocked;
target_sigset_t target_set;
target_ulong r0;
int i;
int err = 0;
#if defined(DEBUG_SIGNAL)
fprintf(stderr, "do_sigreturn\n");
#endif
frame_addr = regs->gregs[15... | false | qemu | 1c275925bfbbc2de84a8f0e09d1dd70bbefb6da3 | long do_sigreturn(CPUSH4State *regs)
{
struct target_sigframe *frame;
abi_ulong frame_addr;
sigset_t blocked;
target_sigset_t target_set;
target_ulong r0;
int i;
int err = 0;
#if defined(DEBUG_SIGNAL)
fprintf(stderr, "do_sigreturn\n");
#endif
frame_addr = regs->gregs[15... | {
"code": [],
"line_no": []
} | long FUNC_0(CPUSH4State *VAR_0)
{
struct target_sigframe *VAR_1;
abi_ulong frame_addr;
sigset_t blocked;
target_sigset_t target_set;
target_ulong r0;
int VAR_2;
int VAR_3 = 0;
#if defined(DEBUG_SIGNAL)
fprintf(stderr, "FUNC_0\n");
#endif
frame_addr = VAR_0->gregs[15];
... | [
"long FUNC_0(CPUSH4State *VAR_0)\n{",
"struct target_sigframe *VAR_1;",
"abi_ulong frame_addr;",
"sigset_t blocked;",
"target_sigset_t target_set;",
"target_ulong r0;",
"int VAR_2;",
"int VAR_3 = 0;",
"#if defined(DEBUG_SIGNAL)\nfprintf(stderr, \"FUNC_0\\n\");",
"#endif\nframe_addr = VAR_0->gregs[... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
25,
27
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45,
47
],
[
51
],
[
53
... |
9,962 | static uint64_t pcnet_ioport_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
PCNetState *d = opaque;
if (addr < 16 && size == 1) {
return pcnet_aprom_readb(d, addr);
} else if (addr >= 0x10 && addr < 0x20 && size == 2) {
return pcnet_io... | false | qemu | 7ba7974197090285fdb413c6e1c41aaacd44b9c4 | static uint64_t pcnet_ioport_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
PCNetState *d = opaque;
if (addr < 16 && size == 1) {
return pcnet_aprom_readb(d, addr);
} else if (addr >= 0x10 && addr < 0x20 && size == 2) {
return pcnet_io... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,
unsigned size)
{
PCNetState *d = opaque;
if (addr < 16 && size == 1) {
return pcnet_aprom_readb(d, addr);
} else if (addr >= 0x10 && addr < 0x20 && size == 2) {
return pcnet_ioport_readw(... | [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,\nunsigned size)\n{",
"PCNetState *d = opaque;",
"if (addr < 16 && size == 1) {",
"return pcnet_aprom_readb(d, addr);",
"} else if (addr >= 0x10 && addr < 0x20 && size == 2) {",
"return pcnet_ioport_readw(d, addr);",
"} else if (addr >= 0x10 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
9,963 | int cpu_x86_gen_code(uint8_t *gen_code_buf, int max_code_size,
int *gen_code_size_ptr,
uint8_t *pc_start, uint8_t *cs_base, int flags)
{
DisasContext dc1, *dc = &dc1;
uint8_t *pc_ptr;
uint16_t *gen_opc_end;
int gen_code_size;
long ret;
#ifdef DEBU... | false | qemu | 9c605cb13547a5faa5cb1092e3e44ac8b0d0b841 | int cpu_x86_gen_code(uint8_t *gen_code_buf, int max_code_size,
int *gen_code_size_ptr,
uint8_t *pc_start, uint8_t *cs_base, int flags)
{
DisasContext dc1, *dc = &dc1;
uint8_t *pc_ptr;
uint16_t *gen_opc_end;
int gen_code_size;
long ret;
#ifdef DEBU... | {
"code": [],
"line_no": []
} | int FUNC_0(uint8_t *VAR_0, int VAR_1,
int *VAR_2,
uint8_t *VAR_3, uint8_t *VAR_4, int VAR_5)
{
DisasContext dc1, *dc = &dc1;
uint8_t *pc_ptr;
uint16_t *gen_opc_end;
int VAR_6;
long VAR_7;
#ifdef DEBUG_DISAS
struct disassemble_info disasm_info... | [
"int FUNC_0(uint8_t *VAR_0, int VAR_1,\nint *VAR_2,\nuint8_t *VAR_3, uint8_t *VAR_4, int VAR_5)\n{",
"DisasContext dc1, *dc = &dc1;",
"uint8_t *pc_ptr;",
"uint16_t *gen_opc_end;",
"int VAR_6;",
"long VAR_7;",
"#ifdef DEBUG_DISAS\nstruct disassemble_info disasm_info;",
"#endif\ndc->code32 = (VAR_5 >> ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
... |
9,965 | static void parse_type_int64(Visitor *v, const char *name, int64_t *obj,
Error **errp)
{
StringInputVisitor *siv = to_siv(v);
if (!siv->string) {
error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : "null",
"integer");
return;
... | false | qemu | a0efbf16604770b9d805bcf210ec29942321134f | static void parse_type_int64(Visitor *v, const char *name, int64_t *obj,
Error **errp)
{
StringInputVisitor *siv = to_siv(v);
if (!siv->string) {
error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : "null",
"integer");
return;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(Visitor *VAR_0, const char *VAR_1, int64_t *VAR_2,
Error **VAR_3)
{
StringInputVisitor *siv = to_siv(VAR_0);
if (!siv->string) {
error_setg(VAR_3, QERR_INVALID_PARAMETER_TYPE, VAR_1 ? VAR_1 : "null",
"integer");
return;
... | [
"static void FUNC_0(Visitor *VAR_0, const char *VAR_1, int64_t *VAR_2,\nError **VAR_3)\n{",
"StringInputVisitor *siv = to_siv(VAR_0);",
"if (!siv->string) {",
"error_setg(VAR_3, QERR_INVALID_PARAMETER_TYPE, VAR_1 ? VAR_1 : \"null\",\n\"integer\");",
"return;",
"}",
"if (parse_str(siv, VAR_1, 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
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.