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 |
|---|---|---|---|---|---|---|---|---|---|---|
3,300 | static always_inline void gen_arith3 (void *helper,
int ra, int rb, int rc,
int islit, uint8_t lit)
{
if (unlikely(rc == 31))
return;
if (ra != 31) {
if (islit) {
TCGv tmp = tcg_const_i64(lit);
... | false | qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | static always_inline void gen_arith3 (void *helper,
int ra, int rb, int rc,
int islit, uint8_t lit)
{
if (unlikely(rc == 31))
return;
if (ra != 31) {
if (islit) {
TCGv tmp = tcg_const_i64(lit);
... | {
"code": [],
"line_no": []
} | static always_inline void FUNC_0 (void *helper,
int ra, int rb, int rc,
int islit, uint8_t lit)
{
if (unlikely(rc == 31))
return;
if (ra != 31) {
if (islit) {
TCGv tmp = tcg_const_i64(lit);
... | [
"static always_inline void FUNC_0 (void *helper,\nint ra, int rb, int rc,\nint islit, uint8_t lit)\n{",
"if (unlikely(rc == 31))\nreturn;",
"if (ra != 31) {",
"if (islit) {",
"TCGv tmp = tcg_const_i64(lit);",
"tcg_gen_helper_1_2(helper, cpu_ir[rc], cpu_ir[ra], tmp);",
"tcg_temp_free(tmp);",
"} else",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9,
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
3,301 | int cpu_get_dump_info(ArchDumpInfo *info,
const struct GuestPhysBlockList *guest_phys_blocks)
{
PowerPCCPU *cpu = POWERPC_CPU(first_cpu);
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
info->d_machine = PPC_ELF_MACHINE;
info->d_class = ELFCLASS;
if ((*pcc->interr... | false | qemu | b1fde1ef5106c92dd12f1f0cfcb8c76e57d7f681 | int cpu_get_dump_info(ArchDumpInfo *info,
const struct GuestPhysBlockList *guest_phys_blocks)
{
PowerPCCPU *cpu = POWERPC_CPU(first_cpu);
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
info->d_machine = PPC_ELF_MACHINE;
info->d_class = ELFCLASS;
if ((*pcc->interr... | {
"code": [],
"line_no": []
} | int FUNC_0(ArchDumpInfo *VAR_0,
const struct GuestPhysBlockList *VAR_1)
{
PowerPCCPU *cpu = POWERPC_CPU(first_cpu);
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
VAR_0->d_machine = PPC_ELF_MACHINE;
VAR_0->d_class = ELFCLASS;
if ((*pcc->interrupts_big_endian)(cpu... | [
"int FUNC_0(ArchDumpInfo *VAR_0,\nconst struct GuestPhysBlockList *VAR_1)\n{",
"PowerPCCPU *cpu = POWERPC_CPU(first_cpu);",
"PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);",
"VAR_0->d_machine = PPC_ELF_MACHINE;",
"VAR_0->d_class = ELFCLASS;",
"if ((*pcc->interrupts_big_endian)(cpu)) {",
"VAR_0->d_en... | [
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
],
[
31,
33
],
[
35
],
[
37
],
[
41
],
[
43
]
] |
3,303 | static CharDriverState *qemu_chr_open_pty(QemuOpts *opts)
{
CharDriverState *chr;
PtyCharDriver *s;
struct termios tty;
const char *label;
int master_fd, slave_fd, len;
#if defined(__OpenBSD__) || defined(__DragonFly__)
char pty_name[PATH_MAX];
#define q_ptsname(x) pty_name
#else
... | false | qemu | e68c5958668596a5023e30ddf8368410878f7682 | static CharDriverState *qemu_chr_open_pty(QemuOpts *opts)
{
CharDriverState *chr;
PtyCharDriver *s;
struct termios tty;
const char *label;
int master_fd, slave_fd, len;
#if defined(__OpenBSD__) || defined(__DragonFly__)
char pty_name[PATH_MAX];
#define q_ptsname(x) pty_name
#else
... | {
"code": [],
"line_no": []
} | static CharDriverState *FUNC_0(QemuOpts *opts)
{
CharDriverState *chr;
PtyCharDriver *s;
struct termios VAR_0;
const char *VAR_1;
int VAR_2, VAR_3, VAR_4;
#if defined(__OpenBSD__) || defined(__DragonFly__)
char VAR_5[PATH_MAX];
#define q_ptsname(x) VAR_5
#else
char *VAR_5 = NULL;
... | [
"static CharDriverState *FUNC_0(QemuOpts *opts)\n{",
"CharDriverState *chr;",
"PtyCharDriver *s;",
"struct termios VAR_0;",
"const char *VAR_1;",
"int VAR_2, VAR_3, VAR_4;",
"#if defined(__OpenBSD__) || defined(__DragonFly__)\nchar VAR_5[PATH_MAX];",
"#define q_ptsname(x) VAR_5\n#else\nchar *VAR_5 = 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,
31
],
[
33
],
[
35
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
55
],
[... |
3,304 | static void put_frame(
AVFormatContext *s,
ASFStream *stream,
int timestamp,
const uint8_t *buf,
int m_obj_size
)
{
ASFContext *asf = s->priv_data;
int m_obj_offset, payload_len, frag_len1;
... | false | FFmpeg | 3c895fc098f7637f6d5ec3a9d6766e724a8b9e41 | static void put_frame(
AVFormatContext *s,
ASFStream *stream,
int timestamp,
const uint8_t *buf,
int m_obj_size
)
{
ASFContext *asf = s->priv_data;
int m_obj_offset, payload_len, frag_len1;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(
AVFormatContext *VAR_0,
ASFStream *VAR_1,
int VAR_2,
const uint8_t *VAR_3,
int VAR_4
)
{
ASFContext *asf = VAR_0->priv_data;
int VAR_5, VAR_6, VAR_7;
VAR_5 = 0;
whil... | [
"static void FUNC_0(\nAVFormatContext *VAR_0,\nASFStream *VAR_1,\nint VAR_2,\nconst uint8_t *VAR_3,\nint VAR_4\n)\n{",
"ASFContext *asf = VAR_0->priv_data;",
"int VAR_5, VAR_6, VAR_7;",
"VAR_5 = 0;",
"while (VAR_5 < VAR_4) {",
"VAR_6 = VAR_4 - VAR_5;",
"if (asf->packet_ti... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13,
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
3,305 | static char *print_drive(void *ptr)
{
return g_strdup(bdrv_get_device_name(ptr));
}
| false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static char *print_drive(void *ptr)
{
return g_strdup(bdrv_get_device_name(ptr));
}
| {
"code": [],
"line_no": []
} | static char *FUNC_0(void *VAR_0)
{
return g_strdup(bdrv_get_device_name(VAR_0));
}
| [
"static char *FUNC_0(void *VAR_0)\n{",
"return g_strdup(bdrv_get_device_name(VAR_0));",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
3,306 | static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn)
{
int op;
int q;
int rd, rn, rm;
int size;
int shift;
int pass;
int count;
int pairwise;
int u;
uint32_t imm, mask;
TCGv tmp, tmp2, tmp3, tmp4, tmp5;
TCGv_i64 tmp64;
if (!s... | false | qemu | fc2a9b37849d25d21d161c1319581420499ab4b2 | static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn)
{
int op;
int q;
int rd, rn, rm;
int size;
int shift;
int pass;
int count;
int pairwise;
int u;
uint32_t imm, mask;
TCGv tmp, tmp2, tmp3, tmp4, tmp5;
TCGv_i64 tmp64;
if (!s... | {
"code": [],
"line_no": []
} | static int FUNC_0(CPUState * VAR_0, DisasContext *VAR_1, uint32_t VAR_2)
{
int VAR_3;
int VAR_4;
int VAR_5, VAR_6, VAR_7;
int VAR_8;
int VAR_9;
int VAR_10;
int VAR_11;
int VAR_12;
int VAR_13;
uint32_t imm, mask;
TCGv tmp, tmp2, tmp3, tmp4, tmp5;
TCGv_i64 tmp6... | [
"static int FUNC_0(CPUState * VAR_0, DisasContext *VAR_1, uint32_t VAR_2)\n{",
"int VAR_3;",
"int VAR_4;",
"int VAR_5, VAR_6, VAR_7;",
"int VAR_8;",
"int VAR_9;",
"int VAR_10;",
"int VAR_11;",
"int VAR_12;",
"int VAR_13;",
"uint32_t imm, mask;",
"TCGv tmp, tmp2, tmp3, tmp4, tmp5;",
"TCGv_i64... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
3,307 | static void rtas_nvram_store(PowerPCCPU *cpu, sPAPREnvironment *spapr,
uint32_t token, uint32_t nargs,
target_ulong args,
uint32_t nret, target_ulong rets)
{
sPAPRNVRAM *nvram = spapr->nvram;
hwaddr offset, buffer, len;... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static void rtas_nvram_store(PowerPCCPU *cpu, sPAPREnvironment *spapr,
uint32_t token, uint32_t nargs,
target_ulong args,
uint32_t nret, target_ulong rets)
{
sPAPRNVRAM *nvram = spapr->nvram;
hwaddr offset, buffer, len;... | {
"code": [],
"line_no": []
} | static void FUNC_0(PowerPCCPU *VAR_0, sPAPREnvironment *VAR_1,
uint32_t VAR_2, uint32_t VAR_3,
target_ulong VAR_4,
uint32_t VAR_5, target_ulong VAR_6)
{
sPAPRNVRAM *nvram = VAR_1->nvram;
hwaddr offset, buffer, len;
... | [
"static void FUNC_0(PowerPCCPU *VAR_0, sPAPREnvironment *VAR_1,\nuint32_t VAR_2, uint32_t VAR_3,\ntarget_ulong VAR_4,\nuint32_t VAR_5, target_ulong VAR_6)\n{",
"sPAPRNVRAM *nvram = VAR_1->nvram;",
"hwaddr offset, buffer, len;",
"int VAR_7;",
"void *VAR_8;",
"if ((VAR_3 != 3) || (VAR_5 != 2)) {",
"rtas_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
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49,
51
],
[
53
... |
3,308 | int coroutine_fn qed_find_cluster(BDRVQEDState *s, QEDRequest *request,
uint64_t pos, size_t *len,
uint64_t *img_offset)
{
uint64_t l2_offset;
uint64_t offset = 0;
unsigned int index;
unsigned int n;
int ret;
/* Limit... | false | qemu | 1f01e50b8330c24714ddca5841fdbb703076b121 | int coroutine_fn qed_find_cluster(BDRVQEDState *s, QEDRequest *request,
uint64_t pos, size_t *len,
uint64_t *img_offset)
{
uint64_t l2_offset;
uint64_t offset = 0;
unsigned int index;
unsigned int n;
int ret;
... | {
"code": [],
"line_no": []
} | int VAR_0 qed_find_cluster(BDRVQEDState *s, QEDRequest *request,
uint64_t pos, size_t *len,
uint64_t *img_offset)
{
uint64_t l2_offset;
uint64_t offset = 0;
unsigned int index;
unsigned int n;
int ret;
*len ... | [
"int VAR_0 qed_find_cluster(BDRVQEDState *s, QEDRequest *request,\nuint64_t pos, size_t *len,\nuint64_t *img_offset)\n{",
"uint64_t l2_offset;",
"uint64_t offset = 0;",
"unsigned int index;",
"unsigned int n;",
"int ret;",
"*len = MIN(*len, (((pos >> s->l1_shift) + 1) << s->l1_shift) - pos);",
"l2_off... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
... |
3,310 | static int send_solid_rect(VncState *vs)
{
size_t bytes;
vnc_write_u8(vs, VNC_TIGHT_FILL << 4); /* no flushing, no filter */
if (vs->tight_pixel24) {
tight_pack24(vs, vs->tight.buffer, 1, &vs->tight.offset);
bytes = 3;
} else {
bytes = vs->clientds.pf.bytes_per_pixel;... | false | qemu | 245f7b51c0ea04fb2224b1127430a096c91aee70 | static int send_solid_rect(VncState *vs)
{
size_t bytes;
vnc_write_u8(vs, VNC_TIGHT_FILL << 4);
if (vs->tight_pixel24) {
tight_pack24(vs, vs->tight.buffer, 1, &vs->tight.offset);
bytes = 3;
} else {
bytes = vs->clientds.pf.bytes_per_pixel;
}
vnc_write(vs,... | {
"code": [],
"line_no": []
} | static int FUNC_0(VncState *VAR_0)
{
size_t bytes;
vnc_write_u8(VAR_0, VNC_TIGHT_FILL << 4);
if (VAR_0->tight_pixel24) {
tight_pack24(VAR_0, VAR_0->tight.buffer, 1, &VAR_0->tight.offset);
bytes = 3;
} else {
bytes = VAR_0->clientds.pf.bytes_per_pixel;
}
v... | [
"static int FUNC_0(VncState *VAR_0)\n{",
"size_t bytes;",
"vnc_write_u8(VAR_0, VNC_TIGHT_FILL << 4);",
"if (VAR_0->tight_pixel24) {",
"tight_pack24(VAR_0, VAR_0->tight.buffer, 1, &VAR_0->tight.offset);",
"bytes = 3;",
"} else {",
"bytes = VAR_0->clientds.pf.bytes_per_pixel;",
"}",
"vnc_write(VAR_0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
]
] |
3,311 | int DMA_read_memory (int nchan, void *buf, int pos, int len)
{
struct dma_regs *r = &dma_controllers[nchan > 3].regs[nchan & 3];
target_phys_addr_t addr = ((r->pageh & 0x7f) << 24) | (r->page << 16) | r->now[ADDR];
if (r->mode & 0x20) {
int i;
uint8_t *p = buf;
cpu_physica... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | int DMA_read_memory (int nchan, void *buf, int pos, int len)
{
struct dma_regs *r = &dma_controllers[nchan > 3].regs[nchan & 3];
target_phys_addr_t addr = ((r->pageh & 0x7f) << 24) | (r->page << 16) | r->now[ADDR];
if (r->mode & 0x20) {
int i;
uint8_t *p = buf;
cpu_physica... | {
"code": [],
"line_no": []
} | int FUNC_0 (int VAR_0, void *VAR_1, int VAR_2, int VAR_3)
{
struct dma_regs *VAR_4 = &dma_controllers[VAR_0 > 3].regs[VAR_0 & 3];
target_phys_addr_t addr = ((VAR_4->pageh & 0x7f) << 24) | (VAR_4->page << 16) | VAR_4->now[ADDR];
if (VAR_4->mode & 0x20) {
int VAR_5;
uint8_t *p = VAR_1;... | [
"int FUNC_0 (int VAR_0, void *VAR_1, int VAR_2, int VAR_3)\n{",
"struct dma_regs *VAR_4 = &dma_controllers[VAR_0 > 3].regs[VAR_0 & 3];",
"target_phys_addr_t addr = ((VAR_4->pageh & 0x7f) << 24) | (VAR_4->page << 16) | VAR_4->now[ADDR];",
"if (VAR_4->mode & 0x20) {",
"int VAR_5;",
"uint8_t *p = VAR_1;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
39
],
[
41
]
] |
3,313 | static ssize_t nc_sendv_compat(NetClientState *nc, const struct iovec *iov,
int iovcnt)
{
uint8_t buffer[4096];
size_t offset;
offset = iov_to_buf(iov, iovcnt, 0, buffer, sizeof(buffer));
return nc->info->receive(nc, buffer, offset);
}
| false | qemu | d32fcad366e5f45d33dab2ee4de0e5729439680b | static ssize_t nc_sendv_compat(NetClientState *nc, const struct iovec *iov,
int iovcnt)
{
uint8_t buffer[4096];
size_t offset;
offset = iov_to_buf(iov, iovcnt, 0, buffer, sizeof(buffer));
return nc->info->receive(nc, buffer, offset);
}
| {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(NetClientState *nc, const struct iovec *iov,
int iovcnt)
{
uint8_t buffer[4096];
size_t offset;
offset = iov_to_buf(iov, iovcnt, 0, buffer, sizeof(buffer));
return nc->info->receive(nc, buffer, offset);
}
| [
"static ssize_t FUNC_0(NetClientState *nc, const struct iovec *iov,\nint iovcnt)\n{",
"uint8_t buffer[4096];",
"size_t offset;",
"offset = iov_to_buf(iov, iovcnt, 0, buffer, sizeof(buffer));",
"return nc->info->receive(nc, buffer, offset);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
]
] |
3,314 | static uint32_t gic_dist_readl(void *opaque, target_phys_addr_t offset)
{
uint32_t val;
val = gic_dist_readw(opaque, offset);
val |= gic_dist_readw(opaque, offset + 2) << 16;
return val;
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint32_t gic_dist_readl(void *opaque, target_phys_addr_t offset)
{
uint32_t val;
val = gic_dist_readw(opaque, offset);
val |= gic_dist_readw(opaque, offset + 2) << 16;
return val;
}
| {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(void *opaque, target_phys_addr_t offset)
{
uint32_t val;
val = gic_dist_readw(opaque, offset);
val |= gic_dist_readw(opaque, offset + 2) << 16;
return val;
}
| [
"static uint32_t FUNC_0(void *opaque, target_phys_addr_t offset)\n{",
"uint32_t val;",
"val = gic_dist_readw(opaque, offset);",
"val |= gic_dist_readw(opaque, offset + 2) << 16;",
"return val;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
3,315 | static int ftp_flush_control_input(FTPContext *s)
{
char buf[CONTROL_BUFFER_SIZE];
int err, ori_block_flag = s->conn_control_block_flag;
s->conn_control_block_flag = 1;
do {
err = ftp_get_line(s, buf, sizeof(buf));
} while (!err);
s->conn_control_block_flag = ori_block_flag;
... | false | FFmpeg | 247e658784ead984f96021acb9c95052ba599f26 | static int ftp_flush_control_input(FTPContext *s)
{
char buf[CONTROL_BUFFER_SIZE];
int err, ori_block_flag = s->conn_control_block_flag;
s->conn_control_block_flag = 1;
do {
err = ftp_get_line(s, buf, sizeof(buf));
} while (!err);
s->conn_control_block_flag = ori_block_flag;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(FTPContext *VAR_0)
{
char VAR_1[CONTROL_BUFFER_SIZE];
int VAR_2, VAR_3 = VAR_0->conn_control_block_flag;
VAR_0->conn_control_block_flag = 1;
do {
VAR_2 = ftp_get_line(VAR_0, VAR_1, sizeof(VAR_1));
} while (!VAR_2);
VAR_0->conn_control_block_flag = VAR_3;
... | [
"static int FUNC_0(FTPContext *VAR_0)\n{",
"char VAR_1[CONTROL_BUFFER_SIZE];",
"int VAR_2, VAR_3 = VAR_0->conn_control_block_flag;",
"VAR_0->conn_control_block_flag = 1;",
"do {",
"VAR_2 = ftp_get_line(VAR_0, VAR_1, sizeof(VAR_1));",
"} while (!VAR_2);",
"VAR_0->conn_control_block_flag = VAR_3;",
"i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25,
27
],
[
31
],
[
33
]
] |
3,316 | static void virtio_rng_device_realize(DeviceState *dev, Error **errp)
{
VirtIODevice *vdev = VIRTIO_DEVICE(dev);
VirtIORNG *vrng = VIRTIO_RNG(dev);
Error *local_err = NULL;
if (!vrng->conf.period_ms > 0) {
error_setg(errp, "'period' parameter expects a positive integer");
return... | false | qemu | a3a292c420d2fec3c07a7ca56fbb064cd57a298a | static void virtio_rng_device_realize(DeviceState *dev, Error **errp)
{
VirtIODevice *vdev = VIRTIO_DEVICE(dev);
VirtIORNG *vrng = VIRTIO_RNG(dev);
Error *local_err = NULL;
if (!vrng->conf.period_ms > 0) {
error_setg(errp, "'period' parameter expects a positive integer");
return... | {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{
VirtIODevice *vdev = VIRTIO_DEVICE(VAR_0);
VirtIORNG *vrng = VIRTIO_RNG(VAR_0);
Error *local_err = NULL;
if (!vrng->conf.period_ms > 0) {
error_setg(VAR_1, "'period' parameter expects a positive integer");
return;
}
... | [
"static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{",
"VirtIODevice *vdev = VIRTIO_DEVICE(VAR_0);",
"VirtIORNG *vrng = VIRTIO_RNG(VAR_0);",
"Error *local_err = NULL;",
"if (!vrng->conf.period_ms > 0) {",
"error_setg(VAR_1, \"'period' parameter expects a positive integer\");",
"return;",
"}",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45,
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
3,317 | void arm_sysctl_init(uint32_t base, uint32_t sys_id)
{
DeviceState *dev;
dev = qdev_create(NULL, "realview_sysctl");
qdev_prop_set_uint32(dev, "sys_id", sys_id);
qdev_init_nofail(dev);
sysbus_mmio_map(sysbus_from_qdev(dev), 0, base);
}
| false | qemu | 26e92f65525ef4446a500d85e185cf78835922aa | void arm_sysctl_init(uint32_t base, uint32_t sys_id)
{
DeviceState *dev;
dev = qdev_create(NULL, "realview_sysctl");
qdev_prop_set_uint32(dev, "sys_id", sys_id);
qdev_init_nofail(dev);
sysbus_mmio_map(sysbus_from_qdev(dev), 0, base);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(uint32_t VAR_0, uint32_t VAR_1)
{
DeviceState *dev;
dev = qdev_create(NULL, "realview_sysctl");
qdev_prop_set_uint32(dev, "VAR_1", VAR_1);
qdev_init_nofail(dev);
sysbus_mmio_map(sysbus_from_qdev(dev), 0, VAR_0);
}
| [
"void FUNC_0(uint32_t VAR_0, uint32_t VAR_1)\n{",
"DeviceState *dev;",
"dev = qdev_create(NULL, \"realview_sysctl\");",
"qdev_prop_set_uint32(dev, \"VAR_1\", VAR_1);",
"qdev_init_nofail(dev);",
"sysbus_mmio_map(sysbus_from_qdev(dev), 0, VAR_0);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
3,318 | fdctrl_t *sun4m_fdctrl_init (qemu_irq irq, target_phys_addr_t io_base,
BlockDriverState **fds)
{
fdctrl_t *fdctrl;
fdctrl = fdctrl_init(irq, 0, 1, io_base, fds);
fdctrl->sun4m = 1;
return fdctrl;
}
| false | qemu | 7c560456707bfe53eb1728fcde759be7d9418b62 | fdctrl_t *sun4m_fdctrl_init (qemu_irq irq, target_phys_addr_t io_base,
BlockDriverState **fds)
{
fdctrl_t *fdctrl;
fdctrl = fdctrl_init(irq, 0, 1, io_base, fds);
fdctrl->sun4m = 1;
return fdctrl;
}
| {
"code": [],
"line_no": []
} | fdctrl_t *FUNC_0 (qemu_irq irq, target_phys_addr_t io_base,
BlockDriverState **fds)
{
fdctrl_t *fdctrl;
fdctrl = fdctrl_init(irq, 0, 1, io_base, fds);
fdctrl->sun4m = 1;
return fdctrl;
}
| [
"fdctrl_t *FUNC_0 (qemu_irq irq, target_phys_addr_t io_base,\nBlockDriverState **fds)\n{",
"fdctrl_t *fdctrl;",
"fdctrl = fdctrl_init(irq, 0, 1, io_base, fds);",
"fdctrl->sun4m = 1;",
"return fdctrl;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
]
] |
3,319 | void cpu_loop(CPUUniCore32State *env)
{
CPUState *cs = CPU(uc32_env_get_cpu(env));
int trapnr;
unsigned int n, insn;
target_siginfo_t info;
for (;;) {
cpu_exec_start(cs);
trapnr = uc32_cpu_exec(cs);
cpu_exec_end(cs);
switch (trapnr) {
case UC32_EX... | false | qemu | 120a9848c2f667bf8f1a06772dc9cde064d92a7d | void cpu_loop(CPUUniCore32State *env)
{
CPUState *cs = CPU(uc32_env_get_cpu(env));
int trapnr;
unsigned int n, insn;
target_siginfo_t info;
for (;;) {
cpu_exec_start(cs);
trapnr = uc32_cpu_exec(cs);
cpu_exec_end(cs);
switch (trapnr) {
case UC32_EX... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUUniCore32State *VAR_0)
{
CPUState *cs = CPU(uc32_env_get_cpu(VAR_0));
int VAR_1;
unsigned int VAR_2, VAR_3;
target_siginfo_t info;
for (;;) {
cpu_exec_start(cs);
VAR_1 = uc32_cpu_exec(cs);
cpu_exec_end(cs);
switch (VAR_1) {
case UC3... | [
"void FUNC_0(CPUUniCore32State *VAR_0)\n{",
"CPUState *cs = CPU(uc32_env_get_cpu(VAR_0));",
"int VAR_1;",
"unsigned int VAR_2, VAR_3;",
"target_siginfo_t info;",
"for (;;) {",
"cpu_exec_start(cs);",
"VAR_1 = uc32_cpu_exec(cs);",
"cpu_exec_end(cs);",
"switch (VAR_1) {",
"case UC32_EXCP_PRIV:\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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
31
],
[
33
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
3,321 | static int tm2_read_stream(TM2Context *ctx, const uint8_t *buf, int stream_id, int buf_size)
{
int i;
int cur = 0;
int skip = 0;
int len, toks;
TM2Codes codes;
/* get stream length in dwords */
len = AV_RB32(buf); buf += 4; cur += 4;
skip = len * 4 + 4;
if(len == 0)
... | true | FFmpeg | 65f0f9183b99881af58e90e3ae2ad8b0181d52f1 | static int tm2_read_stream(TM2Context *ctx, const uint8_t *buf, int stream_id, int buf_size)
{
int i;
int cur = 0;
int skip = 0;
int len, toks;
TM2Codes codes;
len = AV_RB32(buf); buf += 4; cur += 4;
skip = len * 4 + 4;
if(len == 0)
return 4;
if (len >=... | {
"code": [],
"line_no": []
} | static int FUNC_0(TM2Context *VAR_0, const uint8_t *VAR_1, int VAR_2, int VAR_3)
{
int VAR_4;
int VAR_5 = 0;
int VAR_6 = 0;
int VAR_7, VAR_8;
TM2Codes codes;
VAR_7 = AV_RB32(VAR_1); VAR_1 += 4; VAR_5 += 4;
VAR_6 = VAR_7 * 4 + 4;
if(VAR_7 == 0)
return 4;
... | [
"static int FUNC_0(TM2Context *VAR_0, const uint8_t *VAR_1, int VAR_2, int VAR_3)\n{",
"int VAR_4;",
"int VAR_5 = 0;",
"int VAR_6 = 0;",
"int VAR_7, VAR_8;",
"TM2Codes codes;",
"VAR_7 = AV_RB32(VAR_1); VAR_1 += 4; VAR_5 += 4;",
"VAR_6 = VAR_7 * 4 + 4;",
"if(VAR_7 == 0)\nreturn 4;",
"if (VAR_7 >= I... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
19
],
[
21
],
[
25,
27
],
[
31
],
[
33
],
[
36
],
[
40
],
[
42
],
[
44
],
[
46
],
[
48
],
[
50
],
[
52
],
[... |
3,323 | int64_t av_gcd(int64_t a, int64_t b)
{
if (b)
return av_gcd(b, a % b);
else
return a;
}
| true | FFmpeg | 971d12b7f9d7be3ca8eb98e6c04ed521f83cbd3c | int64_t av_gcd(int64_t a, int64_t b)
{
if (b)
return av_gcd(b, a % b);
else
return a;
}
| {
"code": [
"int64_t av_gcd(int64_t a, int64_t b)",
" if (b)",
" return av_gcd(b, a % b);"
],
"line_no": [
1,
5,
7
]
} | int64_t FUNC_0(int64_t a, int64_t b)
{
if (b)
return FUNC_0(b, a % b);
else
return a;
}
| [
"int64_t FUNC_0(int64_t a, int64_t b)\n{",
"if (b)\nreturn FUNC_0(b, a % b);",
"else\nreturn a;",
"}"
] | [
1,
1,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
]
] |
3,324 | static inline int ape_decode_value_3900(APEContext *ctx, APERice *rice)
{
unsigned int x, overflow;
int tmpk;
overflow = range_get_symbol(ctx, counts_3970, counts_diff_3970);
if (overflow == (MODEL_ELEMENTS - 1)) {
tmpk = range_decode_bits(ctx, 5);
overflow = 0;
} else
... | true | FFmpeg | ebfe154bd52204a4da19d26d8d5ae0f8003558ac | static inline int ape_decode_value_3900(APEContext *ctx, APERice *rice)
{
unsigned int x, overflow;
int tmpk;
overflow = range_get_symbol(ctx, counts_3970, counts_diff_3970);
if (overflow == (MODEL_ELEMENTS - 1)) {
tmpk = range_decode_bits(ctx, 5);
overflow = 0;
} else
... | {
"code": [
" } else if (tmpk <= 32) {"
],
"line_no": [
39
]
} | static inline int FUNC_0(APEContext *VAR_0, APERice *VAR_1)
{
unsigned int VAR_2, VAR_3;
int VAR_4;
VAR_3 = range_get_symbol(VAR_0, counts_3970, counts_diff_3970);
if (VAR_3 == (MODEL_ELEMENTS - 1)) {
VAR_4 = range_decode_bits(VAR_0, 5);
VAR_3 = 0;
} else
VAR_4 =... | [
"static inline int FUNC_0(APEContext *VAR_0, APERice *VAR_1)\n{",
"unsigned int VAR_2, VAR_3;",
"int VAR_4;",
"VAR_3 = range_get_symbol(VAR_0, counts_3970, counts_diff_3970);",
"if (VAR_3 == (MODEL_ELEMENTS - 1)) {",
"VAR_4 = range_decode_bits(VAR_0, 5);",
"VAR_3 = 0;",
"} else",
"VAR_4 = (VAR_1->k ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
3,325 | int avcodec_decode_video(AVCodecContext *avctx, AVPicture *picture,
int *got_picture_ptr,
UINT8 *buf, int buf_size)
{
int ret;
ret = avctx->codec->decode(avctx, picture, got_picture_ptr,
buf, buf_size);
avctx->frame_... | true | FFmpeg | 1cb0edb40b8e94e1a50ad40c40d43e34ed8435fe | int avcodec_decode_video(AVCodecContext *avctx, AVPicture *picture,
int *got_picture_ptr,
UINT8 *buf, int buf_size)
{
int ret;
ret = avctx->codec->decode(avctx, picture, got_picture_ptr,
buf, buf_size);
avctx->frame_... | {
"code": [
" avctx->frame_number++;"
],
"line_no": [
17
]
} | int FUNC_0(AVCodecContext *VAR_0, AVPicture *VAR_1,
int *VAR_2,
UINT8 *VAR_3, int VAR_4)
{
int VAR_5;
VAR_5 = VAR_0->codec->decode(VAR_0, VAR_1, VAR_2,
VAR_3, VAR_4);
VAR_0->frame_number++;
return VAR_5;
}
| [
"int FUNC_0(AVCodecContext *VAR_0, AVPicture *VAR_1,\nint *VAR_2,\nUINT8 *VAR_3, int VAR_4)\n{",
"int VAR_5;",
"VAR_5 = VAR_0->codec->decode(VAR_0, VAR_1, VAR_2,\nVAR_3, VAR_4);",
"VAR_0->frame_number++;",
"return VAR_5;",
"}"
] | [
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13,
15
],
[
17
],
[
19
],
[
21
]
] |
3,326 | static void nbd_teardown_connection(NbdClientSession *client)
{
struct nbd_request request = {
.type = NBD_CMD_DISC,
.from = 0,
.len = 0
};
nbd_send_request(client->sock, &request);
/* finish any pending coroutines */
shutdown(client->sock, 2);
nbd_recv_coro... | true | qemu | 4a41a2d68a684241aca96dba066e0699941b730d | static void nbd_teardown_connection(NbdClientSession *client)
{
struct nbd_request request = {
.type = NBD_CMD_DISC,
.from = 0,
.len = 0
};
nbd_send_request(client->sock, &request);
shutdown(client->sock, 2);
nbd_recv_coroutines_enter_all(client);
qe... | {
"code": [
"static void nbd_teardown_connection(NbdClientSession *client)",
" nbd_send_request(client->sock, &request);",
" shutdown(client->sock, 2);",
" nbd_recv_coroutines_enter_all(client);",
" qemu_aio_set_fd_handler(client->sock, NULL, NULL, NULL);",
" closesocket(client-... | static void FUNC_0(NbdClientSession *VAR_0)
{
struct nbd_request VAR_1 = {
.type = NBD_CMD_DISC,
.from = 0,
.len = 0
};
nbd_send_request(VAR_0->sock, &VAR_1);
shutdown(VAR_0->sock, 2);
nbd_recv_coroutines_enter_all(VAR_0);
qemu_aio_set_fd_handler(VAR... | [
"static void FUNC_0(NbdClientSession *VAR_0)\n{",
"struct nbd_request VAR_1 = {",
".type = NBD_CMD_DISC,\n.from = 0,\n.len = 0\n};",
"nbd_send_request(VAR_0->sock, &VAR_1);",
"shutdown(VAR_0->sock, 2);",
"nbd_recv_coroutines_enter_all(VAR_0);",
"qemu_aio_set_fd_handler(VAR_0->sock, NULL, NULL, NULL);",
... | [
1,
0,
0,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7,
9,
11,
13
],
[
17
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
3,329 | static void do_bit_allocation(AC3DecodeContext *ctx, int flags)
{
ac3_audio_block *ab = &ctx->audio_block;
int i, snroffst = 0;
if (!flags) /* bit allocation is not required */
return;
if (ab->flags & AC3_AB_SNROFFSTE) { /* check whether snroffsts are zero */
snroffst += ab->c... | false | FFmpeg | 486637af8ef29ec215e0e0b7ecd3b5470f0e04e5 | static void do_bit_allocation(AC3DecodeContext *ctx, int flags)
{
ac3_audio_block *ab = &ctx->audio_block;
int i, snroffst = 0;
if (!flags)
return;
if (ab->flags & AC3_AB_SNROFFSTE) {
snroffst += ab->csnroffst;
if (ab->flags & AC3_AB_CPLINU)
snroffst +=... | {
"code": [],
"line_no": []
} | static void FUNC_0(AC3DecodeContext *VAR_0, int VAR_1)
{
ac3_audio_block *ab = &VAR_0->audio_block;
int VAR_2, VAR_3 = 0;
if (!VAR_1)
return;
if (ab->VAR_1 & AC3_AB_SNROFFSTE) {
VAR_3 += ab->csnroffst;
if (ab->VAR_1 & AC3_AB_CPLINU)
VAR_3 += ab->cplfsnr... | [
"static void FUNC_0(AC3DecodeContext *VAR_0, int VAR_1)\n{",
"ac3_audio_block *ab = &VAR_0->audio_block;",
"int VAR_2, VAR_3 = 0;",
"if (!VAR_1)\nreturn;",
"if (ab->VAR_1 & AC3_AB_SNROFFSTE) {",
"VAR_3 += ab->csnroffst;",
"if (ab->VAR_1 & AC3_AB_CPLINU)\nVAR_3 += ab->cplfsnroffst;",
"for (VAR_2 = 0; V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
... |
3,331 | static int adx_decode_header(AVCodecContext *avctx, const uint8_t *buf,
int bufsize)
{
int offset;
if (buf[0] != 0x80)
return 0;
offset = (AV_RB32(buf) ^ 0x80000000) + 4;
if (bufsize < offset || memcmp(buf + offset - 6, "(c)CRI", 6))
return 0;
... | false | FFmpeg | e2d1eace00a80c4b53998397d38ea4e08c5d47f0 | static int adx_decode_header(AVCodecContext *avctx, const uint8_t *buf,
int bufsize)
{
int offset;
if (buf[0] != 0x80)
return 0;
offset = (AV_RB32(buf) ^ 0x80000000) + 4;
if (bufsize < offset || memcmp(buf + offset - 6, "(c)CRI", 6))
return 0;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, const uint8_t *VAR_1,
int VAR_2)
{
int VAR_3;
if (VAR_1[0] != 0x80)
return 0;
VAR_3 = (AV_RB32(VAR_1) ^ 0x80000000) + 4;
if (VAR_2 < VAR_3 || memcmp(VAR_1 + VAR_3 - 6, "(c)CRI", 6))
return 0;
VAR_0->ch... | [
"static int FUNC_0(AVCodecContext *VAR_0, const uint8_t *VAR_1,\nint VAR_2)\n{",
"int VAR_3;",
"if (VAR_1[0] != 0x80)\nreturn 0;",
"VAR_3 = (AV_RB32(VAR_1) ^ 0x80000000) + 4;",
"if (VAR_2 < VAR_3 || memcmp(VAR_1 + VAR_3 - 6, \"(c)CRI\", 6))\nreturn 0;",
"VAR_0->channels = VAR_1[7];",
"VAR_0->sample_r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11,
13
],
[
15
],
[
17,
19
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
]
] |
3,332 | static void scsi_write_complete(void * opaque, int ret)
{
SCSIDiskReq *r = (SCSIDiskReq *)opaque;
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint32_t n;
if (r->req.aiocb != NULL) {
r->req.aiocb = NULL;
block_acct_done(bdrv_get_stats(s->qdev.conf.bs), &r->acct... | false | qemu | 3df9caf88f5c0859ae380101fea47609ba1dbfbd | static void scsi_write_complete(void * opaque, int ret)
{
SCSIDiskReq *r = (SCSIDiskReq *)opaque;
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint32_t n;
if (r->req.aiocb != NULL) {
r->req.aiocb = NULL;
block_acct_done(bdrv_get_stats(s->qdev.conf.bs), &r->acct... | {
"code": [],
"line_no": []
} | static void FUNC_0(void * VAR_0, int VAR_1)
{
SCSIDiskReq *r = (SCSIDiskReq *)VAR_0;
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint32_t n;
if (r->req.aiocb != NULL) {
r->req.aiocb = NULL;
block_acct_done(bdrv_get_stats(s->qdev.conf.bs), &r->acct);
}
... | [
"static void FUNC_0(void * VAR_0, int VAR_1)\n{",
"SCSIDiskReq *r = (SCSIDiskReq *)VAR_0;",
"SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);",
"uint32_t n;",
"if (r->req.aiocb != NULL) {",
"r->req.aiocb = NULL;",
"block_acct_done(bdrv_get_stats(s->qdev.conf.bs), &r->acct);",
"}",
"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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
... |
3,334 | static void mark_request_serialising(BdrvTrackedRequest *req, uint64_t align)
{
int64_t overlap_offset = req->offset & ~(align - 1);
unsigned int overlap_bytes = ROUND_UP(req->offset + req->bytes, align)
- overlap_offset;
if (!req->serialising) {
req->bs->seria... | false | qemu | 61007b316cd71ee7333ff7a0a749a8949527575f | static void mark_request_serialising(BdrvTrackedRequest *req, uint64_t align)
{
int64_t overlap_offset = req->offset & ~(align - 1);
unsigned int overlap_bytes = ROUND_UP(req->offset + req->bytes, align)
- overlap_offset;
if (!req->serialising) {
req->bs->seria... | {
"code": [],
"line_no": []
} | static void FUNC_0(BdrvTrackedRequest *VAR_0, uint64_t VAR_1)
{
int64_t overlap_offset = VAR_0->offset & ~(VAR_1 - 1);
unsigned int VAR_2 = ROUND_UP(VAR_0->offset + VAR_0->bytes, VAR_1)
- overlap_offset;
if (!VAR_0->serialising) {
VAR_0->bs->serialising_in_flig... | [
"static void FUNC_0(BdrvTrackedRequest *VAR_0, uint64_t VAR_1)\n{",
"int64_t overlap_offset = VAR_0->offset & ~(VAR_1 - 1);",
"unsigned int VAR_2 = ROUND_UP(VAR_0->offset + VAR_0->bytes, VAR_1)\n- overlap_offset;",
"if (!VAR_0->serialising) {",
"VAR_0->bs->serialising_in_flight++;",
"VAR_0->serialising = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
]
] |
3,335 | STATIC void DEF(avg, pixels8_xy2)(uint8_t *block, const uint8_t *pixels,
ptrdiff_t line_size, int h)
{
MOVQ_ZERO(mm7);
SET_RND(mm6); // =2 for rnd and =1 for no_rnd version
__asm__ volatile(
"movq (%1), %%mm0 \n\t"
"movq 1(%1), %%mm4... | false | FFmpeg | 308e7484a3b1954072871a4090e5c672d1097fa5 | STATIC void DEF(avg, pixels8_xy2)(uint8_t *block, const uint8_t *pixels,
ptrdiff_t line_size, int h)
{
MOVQ_ZERO(mm7);
SET_RND(mm6);
__asm__ volatile(
"movq (%1), %%mm0 \n\t"
"movq 1(%1), %%mm4 \n\t"
"movq %%mm0,... | {
"code": [],
"line_no": []
} | STATIC void FUNC_0(avg, pixels8_xy2)(uint8_t *block, const uint8_t *pixels,
ptrdiff_t line_size, int h)
{
MOVQ_ZERO(mm7);
SET_RND(mm6);
__asm__ volatile(
"movq (%1), %%mm0 \n\t"
"movq 1(%1), %%mm4 \n\t"
"movq %%m... | [
"STATIC void FUNC_0(avg, pixels8_xy2)(uint8_t *block, const uint8_t *pixels,\nptrdiff_t line_size, int h)\n{",
"MOVQ_ZERO(mm7);",
"SET_RND(mm6);",
"__asm__ volatile(\n\"movq (%1), %%mm0 \\n\\t\"\n\"movq 1(%1), %%mm4 \\n\\t\"\n\"movq %%mm0, %%mm1 \\n\\t\"\n\"movq %%mm4... | [
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11,
13,
15,
17,
19,
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,
63,
65,
67,
69,
71,
73,... |
3,336 | start_list(Visitor *v, const char *name, Error **errp)
{
StringInputVisitor *siv = to_siv(v);
if (parse_str(siv, name, errp) < 0) {
return;
}
siv->cur_range = g_list_first(siv->ranges);
if (siv->cur_range) {
Range *r = siv->cur_range->data;
if (r) {
... | false | qemu | d9f62dde1303286b24ac8ce88be27e2b9b9c5f46 | start_list(Visitor *v, const char *name, Error **errp)
{
StringInputVisitor *siv = to_siv(v);
if (parse_str(siv, name, errp) < 0) {
return;
}
siv->cur_range = g_list_first(siv->ranges);
if (siv->cur_range) {
Range *r = siv->cur_range->data;
if (r) {
... | {
"code": [],
"line_no": []
} | FUNC_0(Visitor *VAR_0, const char *VAR_1, Error **VAR_2)
{
StringInputVisitor *siv = to_siv(VAR_0);
if (parse_str(siv, VAR_1, VAR_2) < 0) {
return;
}
siv->cur_range = g_list_first(siv->ranges);
if (siv->cur_range) {
Range *r = siv->cur_range->data;
if (r) {
... | [
"FUNC_0(Visitor *VAR_0, const char *VAR_1, Error **VAR_2)\n{",
"StringInputVisitor *siv = to_siv(VAR_0);",
"if (parse_str(siv, VAR_1, VAR_2) < 0) {",
"return;",
"}",
"siv->cur_range = g_list_first(siv->ranges);",
"if (siv->cur_range) {",
"Range *r = siv->cur_range->data;",
"if (r) {",
"siv->cur = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
3,337 | static int check_arg(const CmdArgs *cmd_args, QDict *args)
{
QObject *value;
const char *name;
name = qstring_get_str(cmd_args->name);
if (!args) {
return check_opt(cmd_args, name, args);
}
value = qdict_get(args, name);
if (!value) {
return check_opt(cmd_args... | false | qemu | f6b4fc8b23b1154577c72937b70e565716bb0a60 | static int check_arg(const CmdArgs *cmd_args, QDict *args)
{
QObject *value;
const char *name;
name = qstring_get_str(cmd_args->name);
if (!args) {
return check_opt(cmd_args, name, args);
}
value = qdict_get(args, name);
if (!value) {
return check_opt(cmd_args... | {
"code": [],
"line_no": []
} | static int FUNC_0(const CmdArgs *VAR_0, QDict *VAR_1)
{
QObject *value;
const char *VAR_2;
VAR_2 = qstring_get_str(VAR_0->VAR_2);
if (!VAR_1) {
return check_opt(VAR_0, VAR_2, VAR_1);
}
value = qdict_get(VAR_1, VAR_2);
if (!value) {
return check_opt(VAR_0, VAR_... | [
"static int FUNC_0(const CmdArgs *VAR_0, QDict *VAR_1)\n{",
"QObject *value;",
"const char *VAR_2;",
"VAR_2 = qstring_get_str(VAR_0->VAR_2);",
"if (!VAR_1) {",
"return check_opt(VAR_0, VAR_2, VAR_1);",
"}",
"value = qdict_get(VAR_1, VAR_2);",
"if (!value) {",
"return check_opt(VAR_0, VAR_2, VAR_1)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35,
37,
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
... |
3,338 | static void blkdebug_refresh_filename(BlockDriverState *bs)
{
QDict *opts;
const QDictEntry *e;
bool force_json = false;
for (e = qdict_first(bs->options); e; e = qdict_next(bs->options, e)) {
if (strcmp(qdict_entry_key(e), "config") &&
strcmp(qdict_entry_key(e), "x-image") ... | false | qemu | 4cdd01d32ee6fe04f8d909bfd3708be6864873a2 | static void blkdebug_refresh_filename(BlockDriverState *bs)
{
QDict *opts;
const QDictEntry *e;
bool force_json = false;
for (e = qdict_first(bs->options); e; e = qdict_next(bs->options, e)) {
if (strcmp(qdict_entry_key(e), "config") &&
strcmp(qdict_entry_key(e), "x-image") ... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0)
{
QDict *opts;
const QDictEntry *VAR_1;
bool force_json = false;
for (VAR_1 = qdict_first(VAR_0->options); VAR_1; VAR_1 = qdict_next(VAR_0->options, VAR_1)) {
if (strcmp(qdict_entry_key(VAR_1), "config") &&
strcmp(qdict_entry_key(V... | [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"QDict *opts;",
"const QDictEntry *VAR_1;",
"bool force_json = false;",
"for (VAR_1 = qdict_first(VAR_0->options); VAR_1; VAR_1 = qdict_next(VAR_0->options, VAR_1)) {",
"if (strcmp(qdict_entry_key(VAR_1), \"config\") &&\nstrcmp(qdict_entry_key(VAR_1), \"x-... | [
0,
0,
0,
0,
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
],
[
35
],
[
41
],
[
43
],
[
47
],
[
49,
51,
53,
55
],
[
57
],
[... |
3,340 | static void memory_region_initfn(Object *obj)
{
MemoryRegion *mr = MEMORY_REGION(obj);
ObjectProperty *op;
mr->ops = &unassigned_mem_ops;
mr->enabled = true;
mr->romd_mode = true;
mr->global_locking = true;
mr->destructor = memory_region_destructor_none;
QTAILQ_INIT(&mr->subre... | false | qemu | b61359781958759317ee6fd1a45b59be0b7dbbe1 | static void memory_region_initfn(Object *obj)
{
MemoryRegion *mr = MEMORY_REGION(obj);
ObjectProperty *op;
mr->ops = &unassigned_mem_ops;
mr->enabled = true;
mr->romd_mode = true;
mr->global_locking = true;
mr->destructor = memory_region_destructor_none;
QTAILQ_INIT(&mr->subre... | {
"code": [],
"line_no": []
} | static void FUNC_0(Object *VAR_0)
{
MemoryRegion *mr = MEMORY_REGION(VAR_0);
ObjectProperty *op;
mr->ops = &unassigned_mem_ops;
mr->enabled = true;
mr->romd_mode = true;
mr->global_locking = true;
mr->destructor = memory_region_destructor_none;
QTAILQ_INIT(&mr->subregions);
... | [
"static void FUNC_0(Object *VAR_0)\n{",
"MemoryRegion *mr = MEMORY_REGION(VAR_0);",
"ObjectProperty *op;",
"mr->ops = &unassigned_mem_ops;",
"mr->enabled = true;",
"mr->romd_mode = true;",
"mr->global_locking = true;",
"mr->destructor = memory_region_destructor_none;",
"QTAILQ_INIT(&mr->subregions);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29,
31,
33,
35
],
[
37
],
[
41,
43,
45,
47
],
[
49,
51,
53,
55
],
[
57... |
3,341 | static void curl_setup_preadv(BlockDriverState *bs, CURLAIOCB *acb)
{
CURLState *state;
int running;
BDRVCURLState *s = bs->opaque;
uint64_t start = acb->offset;
uint64_t end;
qemu_mutex_lock(&s->mutex);
// In case we have the requested data already (e.g. read-ahead),
//... | false | qemu | 2bb5c936c5827e1d831002f7a7517cb8c2c2201d | static void curl_setup_preadv(BlockDriverState *bs, CURLAIOCB *acb)
{
CURLState *state;
int running;
BDRVCURLState *s = bs->opaque;
uint64_t start = acb->offset;
uint64_t end;
qemu_mutex_lock(&s->mutex);
if (curl_find_buf(s, start, acb->bytes, acb)) {
got... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0, CURLAIOCB *VAR_1)
{
CURLState *state;
int VAR_2;
BDRVCURLState *s = VAR_0->opaque;
uint64_t start = VAR_1->offset;
uint64_t end;
qemu_mutex_lock(&s->mutex);
if (curl_find_buf(s, start, VAR_1->bytes, VAR_1)) {
go... | [
"static void FUNC_0(BlockDriverState *VAR_0, CURLAIOCB *VAR_1)\n{",
"CURLState *state;",
"int VAR_2;",
"BDRVCURLState *s = VAR_0->opaque;",
"uint64_t start = VAR_1->offset;",
"uint64_t end;",
"qemu_mutex_lock(&s->mutex);",
"if (curl_find_buf(s, start, VAR_1->bytes, VAR_1)) {",
"goto out;",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
29
],
[
31
],
[
33
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
59... |
3,342 | static int local_rename(FsContext *ctx, const char *oldpath,
const char *newpath)
{
char *tmp;
int err;
tmp = qemu_strdup(rpath(ctx, oldpath));
if (tmp == NULL) {
return -1;
}
err = rename(tmp, rpath(ctx, newpath));
if (err == -1) {
int ... | false | qemu | f143efa60c44c65c22aeeb04217f3501e3d04b22 | static int local_rename(FsContext *ctx, const char *oldpath,
const char *newpath)
{
char *tmp;
int err;
tmp = qemu_strdup(rpath(ctx, oldpath));
if (tmp == NULL) {
return -1;
}
err = rename(tmp, rpath(ctx, newpath));
if (err == -1) {
int ... | {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, const char *VAR_1,
const char *VAR_2)
{
char *VAR_3;
int VAR_4;
VAR_3 = qemu_strdup(rpath(VAR_0, VAR_1));
if (VAR_3 == NULL) {
return -1;
}
VAR_4 = rename(VAR_3, rpath(VAR_0, VAR_2));
if (VAR_4 == -1) {
... | [
"static int FUNC_0(FsContext *VAR_0, const char *VAR_1,\nconst char *VAR_2)\n{",
"char *VAR_3;",
"int VAR_4;",
"VAR_3 = qemu_strdup(rpath(VAR_0, VAR_1));",
"if (VAR_3 == NULL) {",
"return -1;",
"}",
"VAR_4 = rename(VAR_3, rpath(VAR_0, VAR_2));",
"if (VAR_4 == -1) {",
"int VAR_5 = errno;",
"qemu_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
]
] |
3,343 | static Visitor *validate_test_init_raw(TestInputVisitorData *data,
const char *json_string)
{
return validate_test_init_internal(data, json_string, NULL);
}
| false | qemu | b3db211f3c80bb996a704d665fe275619f728bd4 | static Visitor *validate_test_init_raw(TestInputVisitorData *data,
const char *json_string)
{
return validate_test_init_internal(data, json_string, NULL);
}
| {
"code": [],
"line_no": []
} | static Visitor *FUNC_0(TestInputVisitorData *data,
const char *json_string)
{
return validate_test_init_internal(data, json_string, NULL);
}
| [
"static Visitor *FUNC_0(TestInputVisitorData *data,\nconst char *json_string)\n{",
"return validate_test_init_internal(data, json_string, NULL);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
3,345 | static void gen_compute_branch (DisasContext *ctx, uint32_t opc,
int insn_bytes,
int rs, int rt, int32_t offset)
{
target_ulong btgt = -1;
int blink = 0;
int bcond_compute = 0;
TCGv t0 = tcg_temp_new();
TCGv t1 = tcg_temp_new();... | false | qemu | 620e48f66350991918dd78e9a686a9b159fec111 | static void gen_compute_branch (DisasContext *ctx, uint32_t opc,
int insn_bytes,
int rs, int rt, int32_t offset)
{
target_ulong btgt = -1;
int blink = 0;
int bcond_compute = 0;
TCGv t0 = tcg_temp_new();
TCGv t1 = tcg_temp_new();... | {
"code": [],
"line_no": []
} | static void FUNC_0 (DisasContext *VAR_0, uint32_t VAR_1,
int VAR_2,
int VAR_3, int VAR_4, int32_t VAR_5)
{
target_ulong btgt = -1;
int VAR_6 = 0;
int VAR_7 = 0;
TCGv t0 = tcg_temp_new();
TCGv t1 = tcg_temp_new();
if (VAR_... | [
"static void FUNC_0 (DisasContext *VAR_0, uint32_t VAR_1,\nint VAR_2,\nint VAR_3, int VAR_4, int32_t VAR_5)\n{",
"target_ulong btgt = -1;",
"int VAR_6 = 0;",
"int VAR_7 = 0;",
"TCGv t0 = tcg_temp_new();",
"TCGv t1 = tcg_temp_new();",
"if (VAR_0->hflags & MIPS_HFLAG_BMASK) {",
"#ifdef MIPS_DEBUG_DISAS\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
],
[
39
],
[
41,
43,
45,
47,
51
],
[
53
],
[
55
],
[
57
... |
3,346 | static int tak_read_header(AVFormatContext *s)
{
TAKDemuxContext *tc = s->priv_data;
AVIOContext *pb = s->pb;
GetBitContext gb;
AVStream *st;
uint8_t *buffer = NULL;
int ret;
st = avformat_new_stream(s, 0);
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_... | false | FFmpeg | 4977e467a50a690a46af5988d568eaab2e5933c7 | static int tak_read_header(AVFormatContext *s)
{
TAKDemuxContext *tc = s->priv_data;
AVIOContext *pb = s->pb;
GetBitContext gb;
AVStream *st;
uint8_t *buffer = NULL;
int ret;
st = avformat_new_stream(s, 0);
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
TAKDemuxContext *tc = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
GetBitContext gb;
AVStream *st;
uint8_t *buffer = NULL;
int VAR_1;
st = avformat_new_stream(VAR_0, 0);
if (!st)
return AVERROR(ENOMEM);
st->code... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"TAKDemuxContext *tc = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"GetBitContext gb;",
"AVStream *st;",
"uint8_t *buffer = NULL;",
"int VAR_1;",
"st = avformat_new_stream(VAR_0, 0);",
"if (!st)\nreturn AVERROR(ENOMEM);",
"st->codec->code... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[... |
3,347 | int bdrv_make_zero(BdrvChild *child, BdrvRequestFlags flags)
{
int64_t target_size, ret, bytes, offset = 0;
BlockDriverState *bs = child->bs;
int n; /* sectors */
target_size = bdrv_getlength(bs);
if (target_size < 0) {
return target_size;
}
for (;;) {
bytes = M... | false | qemu | 237d78f8fc62e62f62246883ecf62e44ed35fb80 | int bdrv_make_zero(BdrvChild *child, BdrvRequestFlags flags)
{
int64_t target_size, ret, bytes, offset = 0;
BlockDriverState *bs = child->bs;
int n;
target_size = bdrv_getlength(bs);
if (target_size < 0) {
return target_size;
}
for (;;) {
bytes = MIN(target_siz... | {
"code": [],
"line_no": []
} | int FUNC_0(BdrvChild *VAR_0, BdrvRequestFlags VAR_1)
{
int64_t target_size, ret, bytes, offset = 0;
BlockDriverState *bs = VAR_0->bs;
int VAR_2;
target_size = bdrv_getlength(bs);
if (target_size < 0) {
return target_size;
}
for (;;) {
bytes = MIN(target_size - ... | [
"int FUNC_0(BdrvChild *VAR_0, BdrvRequestFlags VAR_1)\n{",
"int64_t target_size, ret, bytes, offset = 0;",
"BlockDriverState *bs = VAR_0->bs;",
"int VAR_2;",
"target_size = bdrv_getlength(bs);",
"if (target_size < 0) {",
"return target_size;",
"}",
"for (;;) {",
"bytes = MIN(target_size - offset, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
... |
3,349 | void HELPER(wsr_ibreaka)(uint32_t i, uint32_t v)
{
if (env->sregs[IBREAKENABLE] & (1 << i) && env->sregs[IBREAKA + i] != v) {
tb_invalidate_phys_page_range(
env->sregs[IBREAKA + i], env->sregs[IBREAKA + i] + 1, 0);
tb_invalidate_phys_page_range(v, v + 1, 0);
}
env->sre... | false | qemu | 3d0be8a5c135dadcfbd68ed354007a8cece98849 | void HELPER(wsr_ibreaka)(uint32_t i, uint32_t v)
{
if (env->sregs[IBREAKENABLE] & (1 << i) && env->sregs[IBREAKA + i] != v) {
tb_invalidate_phys_page_range(
env->sregs[IBREAKA + i], env->sregs[IBREAKA + i] + 1, 0);
tb_invalidate_phys_page_range(v, v + 1, 0);
}
env->sre... | {
"code": [],
"line_no": []
} | void FUNC_0(wsr_ibreaka)(uint32_t i, uint32_t v)
{
if (env->sregs[IBREAKENABLE] & (1 << i) && env->sregs[IBREAKA + i] != v) {
tb_invalidate_phys_page_range(
env->sregs[IBREAKA + i], env->sregs[IBREAKA + i] + 1, 0);
tb_invalidate_phys_page_range(v, v + 1, 0);
}
env->sre... | [
"void FUNC_0(wsr_ibreaka)(uint32_t i, uint32_t v)\n{",
"if (env->sregs[IBREAKENABLE] & (1 << i) && env->sregs[IBREAKA + i] != v) {",
"tb_invalidate_phys_page_range(\nenv->sregs[IBREAKA + i], env->sregs[IBREAKA + i] + 1, 0);",
"tb_invalidate_phys_page_range(v, v + 1, 0);",
"}",
"env->sregs[IBREAKA + i] = v... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
3,350 | static unsigned syborg_virtio_get_features(void *opaque)
{
unsigned ret = 0;
ret |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY);
return ret;
}
| false | qemu | 8172539d21a03e982aa7f139ddc1607dc1422045 | static unsigned syborg_virtio_get_features(void *opaque)
{
unsigned ret = 0;
ret |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY);
return ret;
}
| {
"code": [],
"line_no": []
} | static unsigned FUNC_0(void *VAR_0)
{
unsigned VAR_1 = 0;
VAR_1 |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY);
return VAR_1;
}
| [
"static unsigned FUNC_0(void *VAR_0)\n{",
"unsigned VAR_1 = 0;",
"VAR_1 |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY);",
"return VAR_1;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
3,351 | static int check_strtox_error(const char *p, char *endptr, const char **next,
int err)
{
if (err == 0 && endptr == p) {
err = EINVAL;
}
if (!next && *endptr) {
return -EINVAL;
}
if (next) {
*next = endptr;
}
return -err;
}
| false | qemu | 717adf960933da0650d995f050d457063d591914 | static int check_strtox_error(const char *p, char *endptr, const char **next,
int err)
{
if (err == 0 && endptr == p) {
err = EINVAL;
}
if (!next && *endptr) {
return -EINVAL;
}
if (next) {
*next = endptr;
}
return -err;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, char *VAR_1, const char **VAR_2,
int VAR_3)
{
if (VAR_3 == 0 && VAR_1 == VAR_0) {
VAR_3 = EINVAL;
}
if (!VAR_2 && *VAR_1) {
return -EINVAL;
}
if (VAR_2) {
*VAR_2 = VAR_1;
}
return -VAR_3;
... | [
"static int FUNC_0(const char *VAR_0, char *VAR_1, const char **VAR_2,\nint VAR_3)\n{",
"if (VAR_3 == 0 && VAR_1 == VAR_0) {",
"VAR_3 = EINVAL;",
"}",
"if (!VAR_2 && *VAR_1) {",
"return -EINVAL;",
"}",
"if (VAR_2) {",
"*VAR_2 = VAR_1;",
"}",
"return -VAR_3;",
"}"
] | [
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
]
] |
3,352 | void spapr_setup_hpt_and_vrma(sPAPRMachineState *spapr)
{
int hpt_shift;
if ((spapr->resize_hpt == SPAPR_RESIZE_HPT_DISABLED)
|| (spapr->cas_reboot
&& !spapr_ovec_test(spapr->ov5_cas, OV5_HPT_RESIZE))) {
hpt_shift = spapr_hpt_shift_for_ramsize(MACHINE(spapr)->maxram_size);
... | false | qemu | ee4d9ecc3675af1e68a9c00a8b338641898d613e | void spapr_setup_hpt_and_vrma(sPAPRMachineState *spapr)
{
int hpt_shift;
if ((spapr->resize_hpt == SPAPR_RESIZE_HPT_DISABLED)
|| (spapr->cas_reboot
&& !spapr_ovec_test(spapr->ov5_cas, OV5_HPT_RESIZE))) {
hpt_shift = spapr_hpt_shift_for_ramsize(MACHINE(spapr)->maxram_size);
... | {
"code": [],
"line_no": []
} | void FUNC_0(sPAPRMachineState *VAR_0)
{
int VAR_1;
if ((VAR_0->resize_hpt == SPAPR_RESIZE_HPT_DISABLED)
|| (VAR_0->cas_reboot
&& !spapr_ovec_test(VAR_0->ov5_cas, OV5_HPT_RESIZE))) {
VAR_1 = spapr_hpt_shift_for_ramsize(MACHINE(VAR_0)->maxram_size);
} else {
VAR_1... | [
"void FUNC_0(sPAPRMachineState *VAR_0)\n{",
"int VAR_1;",
"if ((VAR_0->resize_hpt == SPAPR_RESIZE_HPT_DISABLED)\n|| (VAR_0->cas_reboot\n&& !spapr_ovec_test(VAR_0->ov5_cas, OV5_HPT_RESIZE))) {",
"VAR_1 = spapr_hpt_shift_for_ramsize(MACHINE(VAR_0)->maxram_size);",
"} else {",
"VAR_1 = spapr_hpt_shift_for_ra... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
33
],
[
37
],
[
39
]
] |
3,353 | static CharDriverState *qmp_chardev_open_udp(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
Error **errp)
{
ChardevUdp *udp = backend->u.udp;
ChardevCommon *... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | static CharDriverState *qmp_chardev_open_udp(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
Error **errp)
{
ChardevUdp *udp = backend->u.udp;
ChardevCommon *... | {
"code": [],
"line_no": []
} | static CharDriverState *FUNC_0(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
Error **errp)
{
ChardevUdp *udp = backend->u.udp;
ChardevCommon *common = qapi_... | [
"static CharDriverState *FUNC_0(const char *id,\nChardevBackend *backend,\nChardevReturn *ret,\nError **errp)\n{",
"ChardevUdp *udp = backend->u.udp;",
"ChardevCommon *common = qapi_ChardevUdp_base(udp);",
"QIOChannelSocket *sioc = qio_channel_socket_new();",
"if (qio_channel_socket_dgram_sync(sioc,\nudp->l... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19,
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
3,354 | static inline int vec_reg_offset(int regno, int element, TCGMemOp size)
{
int offs = offsetof(CPUARMState, vfp.regs[regno * 2]);
#ifdef HOST_WORDS_BIGENDIAN
/* This is complicated slightly because vfp.regs[2n] is
* still the low half and vfp.regs[2n+1] the high half
* of the 128 bit vector, eve... | false | qemu | 90e496386fe7fd32c189561f846b7913f95b8cf4 | static inline int vec_reg_offset(int regno, int element, TCGMemOp size)
{
int offs = offsetof(CPUARMState, vfp.regs[regno * 2]);
#ifdef HOST_WORDS_BIGENDIAN
offs += (16 - ((element + 1) * (1 << size)));
offs ^= 8;
#else
offs += element * (1 << size);
#endif
return offs;
}
| {
"code": [],
"line_no": []
} | static inline int FUNC_0(int VAR_0, int VAR_1, TCGMemOp VAR_2)
{
int VAR_3 = offsetof(CPUARMState, vfp.regs[VAR_0 * 2]);
#ifdef HOST_WORDS_BIGENDIAN
VAR_3 += (16 - ((VAR_1 + 1) * (1 << VAR_2)));
VAR_3 ^= 8;
#else
VAR_3 += VAR_1 * (1 << VAR_2);
#endif
return VAR_3;
}
| [
"static inline int FUNC_0(int VAR_0, int VAR_1, TCGMemOp VAR_2)\n{",
"int VAR_3 = offsetof(CPUARMState, vfp.regs[VAR_0 * 2]);",
"#ifdef HOST_WORDS_BIGENDIAN\nVAR_3 += (16 - ((VAR_1 + 1) * (1 << VAR_2)));",
"VAR_3 ^= 8;",
"#else\nVAR_3 += VAR_1 * (1 << VAR_2);",
"#endif\nreturn VAR_3;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
21
],
[
23
],
[
25,
27
],
[
29,
31
],
[
33
]
] |
3,355 | static void gen_doz(DisasContext *ctx)
{
int l1 = gen_new_label();
int l2 = gen_new_label();
tcg_gen_brcond_tl(TCG_COND_GE, cpu_gpr[rB(ctx->opcode)], cpu_gpr[rA(ctx->opcode)], l1);
tcg_gen_sub_tl(cpu_gpr[rD(ctx->opcode)], cpu_gpr[rB(ctx->opcode)], cpu_gpr[rA(ctx->opcode)]);
tcg_gen_br(l2);
... | false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static void gen_doz(DisasContext *ctx)
{
int l1 = gen_new_label();
int l2 = gen_new_label();
tcg_gen_brcond_tl(TCG_COND_GE, cpu_gpr[rB(ctx->opcode)], cpu_gpr[rA(ctx->opcode)], l1);
tcg_gen_sub_tl(cpu_gpr[rD(ctx->opcode)], cpu_gpr[rB(ctx->opcode)], cpu_gpr[rA(ctx->opcode)]);
tcg_gen_br(l2);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0)
{
int VAR_1 = gen_new_label();
int VAR_2 = gen_new_label();
tcg_gen_brcond_tl(TCG_COND_GE, cpu_gpr[rB(VAR_0->opcode)], cpu_gpr[rA(VAR_0->opcode)], VAR_1);
tcg_gen_sub_tl(cpu_gpr[rD(VAR_0->opcode)], cpu_gpr[rB(VAR_0->opcode)], cpu_gpr[rA(VAR_0->opcode)]);
... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"int VAR_1 = gen_new_label();",
"int VAR_2 = gen_new_label();",
"tcg_gen_brcond_tl(TCG_COND_GE, cpu_gpr[rB(VAR_0->opcode)], cpu_gpr[rA(VAR_0->opcode)], VAR_1);",
"tcg_gen_sub_tl(cpu_gpr[rD(VAR_0->opcode)], cpu_gpr[rB(VAR_0->opcode)], cpu_gpr[rA(VAR_0->opcode)]);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
]
] |
3,357 | static av_cold int nvenc_alloc_surface(AVCodecContext *avctx, int idx)
{
NvencContext *ctx = avctx->priv_data;
NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;
NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &dl_fn->nvenc_funcs;
NVENCSTATUS nv_status;
NV_ENC_CREATE_BITSTREAM_BUFFER allocOut = ... | false | FFmpeg | 8de3458a07376b0a96772e586b6dba5e93432f52 | static av_cold int nvenc_alloc_surface(AVCodecContext *avctx, int idx)
{
NvencContext *ctx = avctx->priv_data;
NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;
NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &dl_fn->nvenc_funcs;
NVENCSTATUS nv_status;
NV_ENC_CREATE_BITSTREAM_BUFFER allocOut = ... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx, int idx)
{
NvencContext *ctx = avctx->priv_data;
NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;
NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &dl_fn->nvenc_funcs;
NVENCSTATUS nv_status;
NV_ENC_CREATE_BITSTREAM_BUFFER allocOut = { 0 };
a... | [
"static av_cold int FUNC_0(AVCodecContext *avctx, int idx)\n{",
"NvencContext *ctx = avctx->priv_data;",
"NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;",
"NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &dl_fn->nvenc_funcs;",
"NVENCSTATUS nv_status;",
"NV_ENC_CREATE_BITSTREAM_BUFFER allocOut = { 0 };",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
49
],
[
51
... |
3,358 | void host_cpuid(uint32_t function, uint32_t count,
uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx)
{
#if defined(CONFIG_KVM)
uint32_t vec[4];
#ifdef __x86_64__
asm volatile("cpuid"
: "=a"(vec[0]), "=b"(vec[1]),
"=c"(vec[2]), "=d"(vec[3])
... | false | qemu | c1f412260b4e0f309dba8da99482fb32d6098719 | void host_cpuid(uint32_t function, uint32_t count,
uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx)
{
#if defined(CONFIG_KVM)
uint32_t vec[4];
#ifdef __x86_64__
asm volatile("cpuid"
: "=a"(vec[0]), "=b"(vec[1]),
"=c"(vec[2]), "=d"(vec[3])
... | {
"code": [],
"line_no": []
} | void FUNC_0(uint32_t VAR_0, uint32_t VAR_1,
uint32_t *VAR_2, uint32_t *VAR_3, uint32_t *VAR_4, uint32_t *VAR_5)
{
#if defined(CONFIG_KVM)
uint32_t vec[4];
#ifdef __x86_64__
asm volatile("cpuid"
: "=a"(vec[0]), "=b"(vec[1]),
"=c"(vec[2]), "=d"(vec[3])... | [
"void FUNC_0(uint32_t VAR_0, uint32_t VAR_1,\nuint32_t *VAR_2, uint32_t *VAR_3, uint32_t *VAR_4, uint32_t *VAR_5)\n{",
"#if defined(CONFIG_KVM)\nuint32_t vec[4];",
"#ifdef __x86_64__\nasm volatile(\"cpuid\"\n: \"=a\"(vec[0]), \"=b\"(vec[1]),\n\"=c\"(vec[2]), \"=d\"(vec[3])\n: \"0\"(VAR_0), \"c\"(VAR_1) : \"cc\"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
13,
15,
17,
19,
21
],
[
23,
25,
27,
29,
31,
33,
35,
37,
39,
41
],
[
43,
47,
49
],
[
51,
53
],
[
55,
57
],
[
59,
61
],
[
63,
65
]
] |
3,359 | int qemu_add_child_watch(pid_t pid)
{
ChildProcessRecord *rec;
if (!sigchld_bh) {
qemu_init_child_watch();
}
QLIST_FOREACH(rec, &child_watches, next) {
if (rec->pid == pid) {
return 1;
}
}
rec = g_malloc0(sizeof(ChildProcessRecord));
rec->p... | false | qemu | c2b38b277a7882a592f4f2ec955084b2b756daaa | int qemu_add_child_watch(pid_t pid)
{
ChildProcessRecord *rec;
if (!sigchld_bh) {
qemu_init_child_watch();
}
QLIST_FOREACH(rec, &child_watches, next) {
if (rec->pid == pid) {
return 1;
}
}
rec = g_malloc0(sizeof(ChildProcessRecord));
rec->p... | {
"code": [],
"line_no": []
} | int FUNC_0(pid_t VAR_0)
{
ChildProcessRecord *rec;
if (!sigchld_bh) {
qemu_init_child_watch();
}
QLIST_FOREACH(rec, &child_watches, next) {
if (rec->VAR_0 == VAR_0) {
return 1;
}
}
rec = g_malloc0(sizeof(ChildProcessRecord));
rec->VAR_0 = V... | [
"int FUNC_0(pid_t VAR_0)\n{",
"ChildProcessRecord *rec;",
"if (!sigchld_bh) {",
"qemu_init_child_watch();",
"}",
"QLIST_FOREACH(rec, &child_watches, next) {",
"if (rec->VAR_0 == VAR_0) {",
"return 1;",
"}",
"}",
"rec = g_malloc0(sizeof(ChildProcessRecord));",
"rec->VAR_0 = VAR_0;",
"QLIST_IN... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
3,360 | static void bitband_writew(void *opaque, target_phys_addr_t offset,
uint32_t value)
{
uint32_t addr;
uint16_t mask;
uint16_t v;
addr = bitband_addr(opaque, offset) & ~1;
mask = (1 << ((offset >> 2) & 15));
mask = tswap16(mask);
cpu_physical_memory_read(add... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void bitband_writew(void *opaque, target_phys_addr_t offset,
uint32_t value)
{
uint32_t addr;
uint16_t mask;
uint16_t v;
addr = bitband_addr(opaque, offset) & ~1;
mask = (1 << ((offset >> 2) & 15));
mask = tswap16(mask);
cpu_physical_memory_read(add... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint32_t VAR_2)
{
uint32_t addr;
uint16_t mask;
uint16_t v;
addr = bitband_addr(VAR_0, VAR_1) & ~1;
mask = (1 << ((VAR_1 >> 2) & 15));
mask = tswap16(mask);
cpu_physical_memory_read(addr, (uint8_t *... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint32_t VAR_2)\n{",
"uint32_t addr;",
"uint16_t mask;",
"uint16_t v;",
"addr = bitband_addr(VAR_0, VAR_1) & ~1;",
"mask = (1 << ((VAR_1 >> 2) & 15));",
"mask = tswap16(mask);",
"cpu_physical_memory_read(addr, (uint8_t *)&v, 2);",
"if (VAR_... | [
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
]
] |
3,361 | static int write_console_data(SCLPEvent *event, const uint8_t *buf, int len)
{
int ret = 0;
const uint8_t *buf_offset;
SCLPConsoleLM *scon = SCLPLM_CONSOLE(event);
if (!scon->chr) {
/* If there's no backend, we can just say we consumed all data. */
return len;
}
bu... | false | qemu | 7983e829336f68b6df6952dd4b03493b1486fcf5 | static int write_console_data(SCLPEvent *event, const uint8_t *buf, int len)
{
int ret = 0;
const uint8_t *buf_offset;
SCLPConsoleLM *scon = SCLPLM_CONSOLE(event);
if (!scon->chr) {
return len;
}
buf_offset = buf;
while (len > 0) {
ret = qemu_chr_fe_... | {
"code": [],
"line_no": []
} | static int FUNC_0(SCLPEvent *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
int VAR_3 = 0;
const uint8_t *VAR_4;
SCLPConsoleLM *scon = SCLPLM_CONSOLE(VAR_0);
if (!scon->chr) {
return VAR_2;
}
VAR_4 = VAR_1;
while (VAR_2 > 0) {
VAR_3 = qemu_chr_fe_write(sc... | [
"static int FUNC_0(SCLPEvent *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"int VAR_3 = 0;",
"const uint8_t *VAR_4;",
"SCLPConsoleLM *scon = SCLPLM_CONSOLE(VAR_0);",
"if (!scon->chr) {",
"return VAR_2;",
"}",
"VAR_4 = VAR_1;",
"while (VAR_2 > 0) {",
"VAR_3 = qemu_chr_fe_write(scon->chr, VAR_1, VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53... |
3,362 | static int mirror_do_read(MirrorBlockJob *s, int64_t sector_num,
int nb_sectors)
{
BlockBackend *source = s->common.blk;
int sectors_per_chunk, nb_chunks;
int ret;
MirrorOp *op;
int max_sectors;
sectors_per_chunk = s->granularity >> BDRV_SECTOR_BITS;
max_... | false | qemu | b436982f04fb33bb29fcdea190bd1fdc97dc65ef | static int mirror_do_read(MirrorBlockJob *s, int64_t sector_num,
int nb_sectors)
{
BlockBackend *source = s->common.blk;
int sectors_per_chunk, nb_chunks;
int ret;
MirrorOp *op;
int max_sectors;
sectors_per_chunk = s->granularity >> BDRV_SECTOR_BITS;
max_... | {
"code": [],
"line_no": []
} | static int FUNC_0(MirrorBlockJob *VAR_0, int64_t VAR_1,
int VAR_2)
{
BlockBackend *source = VAR_0->common.blk;
int VAR_3, VAR_4;
int VAR_5;
MirrorOp *op;
int VAR_6;
VAR_3 = VAR_0->granularity >> BDRV_SECTOR_BITS;
VAR_6 = VAR_3 * VAR_0->max_iov;
... | [
"static int FUNC_0(MirrorBlockJob *VAR_0, int64_t VAR_1,\nint VAR_2)\n{",
"BlockBackend *source = VAR_0->common.blk;",
"int VAR_3, VAR_4;",
"int VAR_5;",
"MirrorOp *op;",
"int VAR_6;",
"VAR_3 = VAR_0->granularity >> BDRV_SECTOR_BITS;",
"VAR_6 = VAR_3 * VAR_0->max_iov;",
"VAR_2 = MIN(VAR_0->buf_size ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
51
],
[
53
],
[
57
],
[... |
3,363 | static void tcg_target_init(TCGContext *s)
{
#ifdef CONFIG_GETAUXVAL
unsigned long hwcap = getauxval(AT_HWCAP);
if (hwcap & PPC_FEATURE_ARCH_2_06) {
have_isa_2_06 = true;
}
#endif
tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I32], 0, 0xffffffff);
tcg_regset_set32(tcg_target... | false | qemu | 5e1702b0742b7cc88e85dfe76c3ba5d1432312aa | static void tcg_target_init(TCGContext *s)
{
#ifdef CONFIG_GETAUXVAL
unsigned long hwcap = getauxval(AT_HWCAP);
if (hwcap & PPC_FEATURE_ARCH_2_06) {
have_isa_2_06 = true;
}
#endif
tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I32], 0, 0xffffffff);
tcg_regset_set32(tcg_target... | {
"code": [],
"line_no": []
} | static void FUNC_0(TCGContext *VAR_0)
{
#ifdef CONFIG_GETAUXVAL
unsigned long hwcap = getauxval(AT_HWCAP);
if (hwcap & PPC_FEATURE_ARCH_2_06) {
have_isa_2_06 = true;
}
#endif
tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I32], 0, 0xffffffff);
tcg_regset_set32(tcg_target_avai... | [
"static void FUNC_0(TCGContext *VAR_0)\n{",
"#ifdef CONFIG_GETAUXVAL\nunsigned long hwcap = getauxval(AT_HWCAP);",
"if (hwcap & PPC_FEATURE_ARCH_2_06) {",
"have_isa_2_06 = true;",
"}",
"#endif\ntcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I32], 0, 0xffffffff);",
"tcg_regset_set32(tcg_target_avail... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13
],
[
15,
19
],
[
21
],
[
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53
],
[
57
],
[
59
],
[
61
],
[... |
3,364 | static void test_validate_alternate(TestInputVisitorData *data,
const void *unused)
{
UserDefAlternate *tmp = NULL;
Visitor *v;
v = validate_test_init(data, "42");
visit_type_UserDefAlternate(v, NULL, &tmp, &error_abort);
qapi_free_UserDefAlternate(tmp)... | false | qemu | b3db211f3c80bb996a704d665fe275619f728bd4 | static void test_validate_alternate(TestInputVisitorData *data,
const void *unused)
{
UserDefAlternate *tmp = NULL;
Visitor *v;
v = validate_test_init(data, "42");
visit_type_UserDefAlternate(v, NULL, &tmp, &error_abort);
qapi_free_UserDefAlternate(tmp)... | {
"code": [],
"line_no": []
} | static void FUNC_0(TestInputVisitorData *VAR_0,
const void *VAR_1)
{
UserDefAlternate *tmp = NULL;
Visitor *v;
v = validate_test_init(VAR_0, "42");
visit_type_UserDefAlternate(v, NULL, &tmp, &error_abort);
qapi_free_UserDefAlternate(tmp);
}
| [
"static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"UserDefAlternate *tmp = NULL;",
"Visitor *v;",
"v = validate_test_init(VAR_0, \"42\");",
"visit_type_UserDefAlternate(v, NULL, &tmp, &error_abort);",
"qapi_free_UserDefAlternate(tmp);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
]
] |
3,366 | static void parse_chap(struct iscsi_context *iscsi, const char *target,
Error **errp)
{
QemuOptsList *list;
QemuOpts *opts;
const char *user = NULL;
const char *password = NULL;
const char *secretid;
char *secret = NULL;
list = qemu_find_opts("iscsi");
... | false | qemu | 4317142020921c6dcdcfda7a349a91088d969f14 | static void parse_chap(struct iscsi_context *iscsi, const char *target,
Error **errp)
{
QemuOptsList *list;
QemuOpts *opts;
const char *user = NULL;
const char *password = NULL;
const char *secretid;
char *secret = NULL;
list = qemu_find_opts("iscsi");
... | {
"code": [],
"line_no": []
} | static void FUNC_0(struct iscsi_context *VAR_0, const char *VAR_1,
Error **VAR_2)
{
QemuOptsList *list;
QemuOpts *opts;
const char *VAR_3 = NULL;
const char *VAR_4 = NULL;
const char *VAR_5;
char *VAR_6 = NULL;
list = qemu_find_opts("VAR_0");
if (!list)... | [
"static void FUNC_0(struct iscsi_context *VAR_0, const char *VAR_1,\nError **VAR_2)\n{",
"QemuOptsList *list;",
"QemuOpts *opts;",
"const char *VAR_3 = NULL;",
"const char *VAR_4 = NULL;",
"const char *VAR_5;",
"char *VAR_6 = NULL;",
"list = qemu_find_opts(\"VAR_0\");",
"if (!list) {",
"return;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[... |
3,367 | static void mips_fulong2e_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->init... | false | qemu | 5039d6e23586fe6bbedc5e4fe302b48a66890ade | static void mips_fulong2e_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->init... | {
"code": [],
"line_no": []
} | static void FUNC_0(MachineState *VAR_0)
{
ram_addr_t ram_size = VAR_0->ram_size;
const char *VAR_1 = VAR_0->VAR_1;
const char *VAR_2 = VAR_0->VAR_2;
const char *VAR_3 = VAR_0->VAR_3;
const char *VAR_4 = VAR_0->VAR_4;
char *VAR_5;
MemoryRegion *address_space_mem = get_system_memory();... | [
"static void FUNC_0(MachineState *VAR_0)\n{",
"ram_addr_t ram_size = VAR_0->ram_size;",
"const char *VAR_1 = VAR_0->VAR_1;",
"const char *VAR_2 = VAR_0->VAR_2;",
"const char *VAR_3 = VAR_0->VAR_3;",
"const char *VAR_4 = VAR_0->VAR_4;",
"char *VAR_5;",
"MemoryRegion *address_space_mem = get_system_memo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
... |
3,369 | static inline void downmix_dualmono_to_stereo(float *samples)
{
int i;
float tmp;
for (i = 0; i < 256; i++) {
tmp = samples[i] + samples[i + 256];
samples[i] = samples[i + 256] = tmp;
}
}
| false | FFmpeg | 0058584580b87feb47898e60e4b80c7f425882ad | static inline void downmix_dualmono_to_stereo(float *samples)
{
int i;
float tmp;
for (i = 0; i < 256; i++) {
tmp = samples[i] + samples[i + 256];
samples[i] = samples[i + 256] = tmp;
}
}
| {
"code": [],
"line_no": []
} | static inline void FUNC_0(float *VAR_0)
{
int VAR_1;
float VAR_2;
for (VAR_1 = 0; VAR_1 < 256; VAR_1++) {
VAR_2 = VAR_0[VAR_1] + VAR_0[VAR_1 + 256];
VAR_0[VAR_1] = VAR_0[VAR_1 + 256] = VAR_2;
}
}
| [
"static inline void FUNC_0(float *VAR_0)\n{",
"int VAR_1;",
"float VAR_2;",
"for (VAR_1 = 0; VAR_1 < 256; VAR_1++) {",
"VAR_2 = VAR_0[VAR_1] + VAR_0[VAR_1 + 256];",
"VAR_0[VAR_1] = VAR_0[VAR_1 + 256] = VAR_2;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
3,370 | static int64_t mmsh_read_seek(URLContext *h, int stream_index,
int64_t timestamp, int flags)
{
MMSHContext *mmsh = h->priv_data;
MMSContext *mms = &mmsh->mms;
int ret;
ret= mmsh_open_internal(h, mmsh->location, 0, timestamp, 0);
if(ret>=0){
if (mms->mms_hd... | false | FFmpeg | 8af4ac5272e8eaff90c3102b9473bb09cc6f4201 | static int64_t mmsh_read_seek(URLContext *h, int stream_index,
int64_t timestamp, int flags)
{
MMSHContext *mmsh = h->priv_data;
MMSContext *mms = &mmsh->mms;
int ret;
ret= mmsh_open_internal(h, mmsh->location, 0, timestamp, 0);
if(ret>=0){
if (mms->mms_hd... | {
"code": [],
"line_no": []
} | static int64_t FUNC_0(URLContext *h, int stream_index,
int64_t timestamp, int flags)
{
MMSHContext *mmsh = h->priv_data;
MMSContext *mms = &mmsh->mms;
int VAR_0;
VAR_0= mmsh_open_internal(h, mmsh->location, 0, timestamp, 0);
if(VAR_0>=0){
if (mms->mms_hd)
... | [
"static int64_t FUNC_0(URLContext *h, int stream_index,\nint64_t timestamp, int flags)\n{",
"MMSHContext *mmsh = h->priv_data;",
"MMSContext *mms = &mmsh->mms;",
"int VAR_0;",
"VAR_0= mmsh_open_internal(h, mmsh->location, 0, timestamp, 0);",
"if(VAR_0>=0){",
"if (mms->mms_hd)\nffurl_close(mms->mms_hd)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
3,371 | static int get_current_cpu(void)
{
return cpu_single_env->cpu_index;
}
| true | qemu | c3203fa5b2c17a1c446e44c87788fef21b4af5f4 | static int get_current_cpu(void)
{
return cpu_single_env->cpu_index;
}
| {
"code": [
" return cpu_single_env->cpu_index;"
],
"line_no": [
5
]
} | static int FUNC_0(void)
{
return cpu_single_env->cpu_index;
}
| [
"static int FUNC_0(void)\n{",
"return cpu_single_env->cpu_index;",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
3,372 | static void bonito_cop_writel(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
PCIBonitoState *s = opaque;
((uint32_t *)(&s->boncop))[addr/sizeof(uint32_t)] = val & 0xffffffff; | true | qemu | 58d479786b11a7e982419c1e0905b8490ef9a787 | static void bonito_cop_writel(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
PCIBonitoState *s = opaque;
((uint32_t *)(&s->boncop))[addr/sizeof(uint32_t)] = val & 0xffffffff; | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
PCIBonitoState *s = VAR_0;
((uint32_t *)(&s->boncop))[VAR_1/sizeof(uint32_t)] = VAR_2 & 0xffffffff; | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"PCIBonitoState *s = VAR_0;",
"((uint32_t *)(&s->boncop))[VAR_1/sizeof(uint32_t)] = VAR_2 & 0xffffffff;"
] | [
0,
0,
0
] | [
[
1,
2,
3
],
[
4
],
[
5
]
] |
3,373 | static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadFunc *read_child, int ctx_size, enum MXFMetadataSetType type)
{
AVIOContext *pb = mxf->fc->pb;
MXFMetadataSet *ctx = ctx_size ? av_mallocz(ctx_size) : mxf;
uint64_t klv_end = avio_tell(pb) + klv->length;
if (!ctx)
... | true | FFmpeg | 4373a25d94dba2cb361aa18e8d70806e1894df81 | static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadFunc *read_child, int ctx_size, enum MXFMetadataSetType type)
{
AVIOContext *pb = mxf->fc->pb;
MXFMetadataSet *ctx = ctx_size ? av_mallocz(ctx_size) : mxf;
uint64_t klv_end = avio_tell(pb) + klv->length;
if (!ctx)
... | {
"code": [
" if (ctx_size && tag == 0x3C0A)",
" else if ((ret = read_child(ctx, pb, tag, size, uid, -1)) < 0)",
" if (ctx_size)",
" av_free(ctx);"
],
"line_no": [
65,
69,
81,
83
]
} | static int FUNC_0(MXFContext *VAR_0, KLVPacket *VAR_1, MXFMetadataReadFunc *VAR_2, int VAR_3, enum MXFMetadataSetType VAR_4)
{
AVIOContext *pb = VAR_0->fc->pb;
MXFMetadataSet *ctx = VAR_3 ? av_mallocz(VAR_3) : VAR_0;
uint64_t klv_end = avio_tell(pb) + VAR_1->length;
if (!ctx)
return AVER... | [
"static int FUNC_0(MXFContext *VAR_0, KLVPacket *VAR_1, MXFMetadataReadFunc *VAR_2, int VAR_3, enum MXFMetadataSetType VAR_4)\n{",
"AVIOContext *pb = VAR_0->fc->pb;",
"MXFMetadataSet *ctx = VAR_3 ? av_mallocz(VAR_3) : VAR_0;",
"uint64_t klv_end = avio_tell(pb) + VAR_1->length;",
"if (!ctx)\nreturn AVERROR(E... | [
0,
0,
0,
0,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
3,374 | static int vhost_client_migration_log(CPUPhysMemoryClient *client,
int enable)
{
struct vhost_dev *dev = container_of(client, struct vhost_dev, client);
int r;
if (!!enable == dev->log_enabled) {
return 0;
}
if (!dev->started) {
dev->log... | true | qemu | 04097f7c5957273c578f72b9bd603ba6b1d69e33 | static int vhost_client_migration_log(CPUPhysMemoryClient *client,
int enable)
{
struct vhost_dev *dev = container_of(client, struct vhost_dev, client);
int r;
if (!!enable == dev->log_enabled) {
return 0;
}
if (!dev->started) {
dev->log... | {
"code": [
" struct vhost_dev *dev = container_of(client, struct vhost_dev, client);",
" struct vhost_dev *dev = container_of(client, struct vhost_dev, client);",
"static int vhost_client_migration_log(CPUPhysMemoryClient *client,",
" int enable)",
" ... | static int FUNC_0(CPUPhysMemoryClient *VAR_0,
int VAR_1)
{
struct vhost_dev *VAR_2 = container_of(VAR_0, struct vhost_dev, VAR_0);
int VAR_3;
if (!!VAR_1 == VAR_2->log_enabled) {
return 0;
}
if (!VAR_2->started) {
VAR_2->log_enabled = VA... | [
"static int FUNC_0(CPUPhysMemoryClient *VAR_0,\nint VAR_1)\n{",
"struct vhost_dev *VAR_2 = container_of(VAR_0, struct vhost_dev, VAR_0);",
"int VAR_3;",
"if (!!VAR_1 == VAR_2->log_enabled) {",
"return 0;",
"}",
"if (!VAR_2->started) {",
"VAR_2->log_enabled = VAR_1;",
"return 0;",
"}",
"if (!VAR_... | [
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
3,376 | long do_rt_sigreturn(CPUS390XState *env)
{
rt_sigframe *frame;
abi_ulong frame_addr = env->regs[15];
sigset_t set;
trace_user_do_rt_sigreturn(env, frame_addr);
if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1)) {
goto badframe;
}
target_to_host_sigset(&set, &frame->... | true | qemu | c599d4d6d6e9bfdb64e54c33a22cb26e3496b96d | long do_rt_sigreturn(CPUS390XState *env)
{
rt_sigframe *frame;
abi_ulong frame_addr = env->regs[15];
sigset_t set;
trace_user_do_rt_sigreturn(env, frame_addr);
if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1)) {
goto badframe;
}
target_to_host_sigset(&set, &frame->... | {
"code": [
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" ret... | long FUNC_0(CPUS390XState *VAR_0)
{
rt_sigframe *frame;
abi_ulong frame_addr = VAR_0->regs[15];
sigset_t set;
trace_user_do_rt_sigreturn(VAR_0, frame_addr);
if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1)) {
goto badframe;
}
target_to_host_sigset(&set, &frame->uc.... | [
"long FUNC_0(CPUS390XState *VAR_0)\n{",
"rt_sigframe *frame;",
"abi_ulong frame_addr = VAR_0->regs[15];",
"sigset_t set;",
"trace_user_do_rt_sigreturn(VAR_0, frame_addr);",
"if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1)) {",
"goto badframe;",
"}",
"target_to_host_sigset(&set, &frame->uc.t... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51,
53
... |
3,377 | static int no_init_out (HWVoiceOut *hw, struct audsettings *as)
{
audio_pcm_init_info (&hw->info, as);
hw->samples = 1024;
return 0;
}
| true | qemu | 5706db1deb061ee9affdcea81e59c4c2cad7c41e | static int no_init_out (HWVoiceOut *hw, struct audsettings *as)
{
audio_pcm_init_info (&hw->info, as);
hw->samples = 1024;
return 0;
}
| {
"code": [
"static int no_init_out (HWVoiceOut *hw, struct audsettings *as)"
],
"line_no": [
1
]
} | static int FUNC_0 (HWVoiceOut *VAR_0, struct audsettings *VAR_1)
{
audio_pcm_init_info (&VAR_0->info, VAR_1);
VAR_0->samples = 1024;
return 0;
}
| [
"static int FUNC_0 (HWVoiceOut *VAR_0, struct audsettings *VAR_1)\n{",
"audio_pcm_init_info (&VAR_0->info, VAR_1);",
"VAR_0->samples = 1024;",
"return 0;",
"}"
] | [
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
3,378 | static int protocol_client_vencrypt_init(VncState *vs, uint8_t *data, size_t len)
{
if (data[0] != 0 ||
data[1] != 2) {
VNC_DEBUG("Unsupported VeNCrypt protocol %d.%d\n", (int)data[0], (int)data[1]);
vnc_write_u8(vs, 1); /* Reject version */
vnc_flush(vs);
vnc_client_e... | true | qemu | 7364dbdabb7824d5bde1e341bb6d928282f01c83 | static int protocol_client_vencrypt_init(VncState *vs, uint8_t *data, size_t len)
{
if (data[0] != 0 ||
data[1] != 2) {
VNC_DEBUG("Unsupported VeNCrypt protocol %d.%d\n", (int)data[0], (int)data[1]);
vnc_write_u8(vs, 1);
vnc_flush(vs);
vnc_client_error(vs);
} els... | {
"code": [
" VNC_DEBUG(\"Unsupported VeNCrypt protocol %d.%d\\n\", (int)data[0], (int)data[1]);",
" VNC_DEBUG(\"Sending allowed auth %d\\n\", vs->subauth);"
],
"line_no": [
9,
19
]
} | static int FUNC_0(VncState *VAR_0, uint8_t *VAR_1, size_t VAR_2)
{
if (VAR_1[0] != 0 ||
VAR_1[1] != 2) {
VNC_DEBUG("Unsupported VeNCrypt protocol %d.%d\n", (int)VAR_1[0], (int)VAR_1[1]);
vnc_write_u8(VAR_0, 1);
vnc_flush(VAR_0);
vnc_client_error(VAR_0);
} else {
... | [
"static int FUNC_0(VncState *VAR_0, uint8_t *VAR_1, size_t VAR_2)\n{",
"if (VAR_1[0] != 0 ||\nVAR_1[1] != 2) {",
"VNC_DEBUG(\"Unsupported VeNCrypt protocol %d.%d\\n\", (int)VAR_1[0], (int)VAR_1[1]);",
"vnc_write_u8(VAR_0, 1);",
"vnc_flush(VAR_0);",
"vnc_client_error(VAR_0);",
"} else {",
"VNC_DEBUG(\"... | [
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
3,379 | static always_inline int _pte_check (mmu_ctx_t *ctx, int is_64b,
target_ulong pte0, target_ulong pte1,
int h, int rw, int type)
{
target_ulong ptem, mmask;
int access, ret, pteh, ptev, pp;
access = 0;
ret = -1;
/* Ch... | true | qemu | 6f2d8978728c48ca46f5c01835438508aace5c64 | static always_inline int _pte_check (mmu_ctx_t *ctx, int is_64b,
target_ulong pte0, target_ulong pte1,
int h, int rw, int type)
{
target_ulong ptem, mmask;
int access, ret, pteh, ptev, pp;
access = 0;
ret = -1;
#if... | {
"code": [
" if (ctx->raddr != (target_ulong)-1) {"
],
"line_no": [
75
]
} | static always_inline int FUNC_0 (mmu_ctx_t *ctx, int is_64b,
target_ulong pte0, target_ulong pte1,
int h, int rw, int type)
{
target_ulong ptem, mmask;
int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4;
VAR_0 = 0;
VAR_1 = -1;
... | [
"static always_inline int FUNC_0 (mmu_ctx_t *ctx, int is_64b,\ntarget_ulong pte0, target_ulong pte1,\nint h, int rw, int type)\n{",
"target_ulong ptem, mmask;",
"int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4;",
"VAR_0 = 0;",
"VAR_1 = -1;",
"#if defined(TARGET_PPC64)\nif (is_64b) {",
"VAR_3 = pte64_is_valid(pte0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45,
47
],
[
49
],
[
51
],
[... |
3,380 | static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,
const H2645NAL *nal)
{
const SPS *sps;
const PPS *pps;
int ret;
unsigned int slice_type, tmp, i;
int field_pic_flag, bottom_field_flag;
int droppable, picture_structure;
... | false | FFmpeg | 5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c | static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,
const H2645NAL *nal)
{
const SPS *sps;
const PPS *pps;
int ret;
unsigned int slice_type, tmp, i;
int field_pic_flag, bottom_field_flag;
int droppable, picture_structure;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(const H264Context *VAR_0, H264SliceContext *VAR_1,
const H2645NAL *VAR_2)
{
const SPS *VAR_3;
const PPS *VAR_4;
int VAR_5;
unsigned int VAR_6, VAR_7, VAR_8;
int VAR_9, VAR_10;
int VAR_11, VAR_12;
VAR_1->first_mb_addr = get_ue_go... | [
"static int FUNC_0(const H264Context *VAR_0, H264SliceContext *VAR_1,\nconst H2645NAL *VAR_2)\n{",
"const SPS *VAR_3;",
"const PPS *VAR_4;",
"int VAR_5;",
"unsigned int VAR_6, VAR_7, VAR_8;",
"int VAR_9, VAR_10;",
"int VAR_11, VAR_12;",
"VAR_1->first_mb_addr = get_ue_golomb(&VAR_1->gb);",
"VAR_6 = g... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
3,381 | static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) {
NUTContext * priv = avf->priv_data;
ByteIOContext * bc = &avf->pb;
nut_demuxer_opts_t dopts = {
.input = {
.priv = bc,
.seek = av_seek,
.read = av_read,
.eof = NULL,
... | false | FFmpeg | e4bb70838f0c3092a9b893f2210e7c303f0f2a4a | static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) {
NUTContext * priv = avf->priv_data;
ByteIOContext * bc = &avf->pb;
nut_demuxer_opts_t dopts = {
.input = {
.priv = bc,
.seek = av_seek,
.read = av_read,
.eof = NULL,
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext * VAR_0, AVFormatParameters * VAR_1) {
NUTContext * priv = VAR_0->priv_data;
ByteIOContext * bc = &VAR_0->pb;
nut_demuxer_opts_t dopts = {
.input = {
.priv = bc,
.seek = av_seek,
.read = av_read,
.eof = NULL,
... | [
"static int FUNC_0(AVFormatContext * VAR_0, AVFormatParameters * VAR_1) {",
"NUTContext * priv = VAR_0->priv_data;",
"ByteIOContext * bc = &VAR_0->pb;",
"nut_demuxer_opts_t dopts = {",
".input = {",
".priv = bc,\n.seek = av_seek,\n.read = av_read,\n.eof = NULL,\n.file_pos = 0,\n},",
".alloc = { av_mallo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
... |
3,382 | static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length)
{
GetBitContext gb;
int i;
init_get_bits(&gb, src, length * 8);
for (i = 0; i < 3; i++) {
if (read_len_table(s->len[i], &gb) < 0)
return -1;
if (ff_huffyuv_generate_bits_table(s->bits[i... | false | FFmpeg | f67a0d115254461649470452058fa3c28c0df294 | static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length)
{
GetBitContext gb;
int i;
init_get_bits(&gb, src, length * 8);
for (i = 0; i < 3; i++) {
if (read_len_table(s->len[i], &gb) < 0)
return -1;
if (ff_huffyuv_generate_bits_table(s->bits[i... | {
"code": [],
"line_no": []
} | static int FUNC_0(HYuvContext *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
GetBitContext gb;
int VAR_3;
init_get_bits(&gb, VAR_1, VAR_2 * 8);
for (VAR_3 = 0; VAR_3 < 3; VAR_3++) {
if (read_len_table(VAR_0->len[VAR_3], &gb) < 0)
return -1;
if (ff_huffyuv_generate_bit... | [
"static int FUNC_0(HYuvContext *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"GetBitContext gb;",
"int VAR_3;",
"init_get_bits(&gb, VAR_1, VAR_2 * 8);",
"for (VAR_3 = 0; VAR_3 < 3; VAR_3++) {",
"if (read_len_table(VAR_0->len[VAR_3], &gb) < 0)\nreturn -1;",
"if (ff_huffyuv_generate_bits_table(VAR_0->bits... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
37
],
[
41
],
[
43
]
] |
3,384 | static int h264_slice_header_init(H264Context *h, int reinit)
{
int nb_slices = (HAVE_THREADS &&
h->avctx->active_thread_type & FF_THREAD_SLICE) ?
h->avctx->thread_count : 1;
int i, ret;
h->avctx->sample_aspect_ratio = h->sps.sar;
av_assert0(h->avctx->sa... | false | FFmpeg | 9e500efdbe0deeff1602500ebc229a0a6b6bb1a2 | static int h264_slice_header_init(H264Context *h, int reinit)
{
int nb_slices = (HAVE_THREADS &&
h->avctx->active_thread_type & FF_THREAD_SLICE) ?
h->avctx->thread_count : 1;
int i, ret;
h->avctx->sample_aspect_ratio = h->sps.sar;
av_assert0(h->avctx->sa... | {
"code": [],
"line_no": []
} | static int FUNC_0(H264Context *VAR_0, int VAR_1)
{
int VAR_2 = (HAVE_THREADS &&
VAR_0->avctx->active_thread_type & FF_THREAD_SLICE) ?
VAR_0->avctx->thread_count : 1;
int VAR_3, VAR_4;
VAR_0->avctx->sample_aspect_ratio = VAR_0->sps.sar;
av_assert0(VAR_0->... | [
"static int FUNC_0(H264Context *VAR_0, int VAR_1)\n{",
"int VAR_2 = (HAVE_THREADS &&\nVAR_0->avctx->active_thread_type & FF_THREAD_SLICE) ?\nVAR_0->avctx->thread_count : 1;",
"int VAR_3, VAR_4;",
"VAR_0->avctx->sample_aspect_ratio = VAR_0->sps.sar;",
"av_assert0(VAR_0->avctx->sample_aspect_ratio.den);",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5,
7,
9
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
25
],
[
27
],
[
29,
31
],
[
33,
35
],
[
37
],
[
41,
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
... |
3,385 | static unsigned tget_long(GetByteContext *gb, int le)
{
unsigned v = le ? bytestream2_get_le32u(gb) : bytestream2_get_be32u(gb);
return v;
}
| false | FFmpeg | ce1ebb31a9a0e556a89cd7681082af19fbc1cced | static unsigned tget_long(GetByteContext *gb, int le)
{
unsigned v = le ? bytestream2_get_le32u(gb) : bytestream2_get_be32u(gb);
return v;
}
| {
"code": [],
"line_no": []
} | static unsigned FUNC_0(GetByteContext *VAR_0, int VAR_1)
{
unsigned VAR_2 = VAR_1 ? bytestream2_get_le32u(VAR_0) : bytestream2_get_be32u(VAR_0);
return VAR_2;
}
| [
"static unsigned FUNC_0(GetByteContext *VAR_0, int VAR_1)\n{",
"unsigned VAR_2 = VAR_1 ? bytestream2_get_le32u(VAR_0) : bytestream2_get_be32u(VAR_0);",
"return VAR_2;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
3,386 | static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst,
int pitch, const uint8_t *table)
{
int i;
int j;
int out = 0;
if (width & 1)
return AVERROR_INVALIDDATA;
/* first line contain absolute values, other lines contain deltas... | true | FFmpeg | 159fb8ff7e4038edf13e91d3c08bc7b8abc369b9 | static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst,
int pitch, const uint8_t *table)
{
int i;
int j;
int out = 0;
if (width & 1)
return AVERROR_INVALIDDATA;
while (out < width) {
int c = ir2_get_code(&ctx->g... | {
"code": [
" int t = dst[out - pitch] + (table[c * 2] - 128);"
],
"line_no": [
83
]
} | static int FUNC_0(Ir2Context *VAR_0, int VAR_1, int VAR_2, uint8_t *VAR_3,
int VAR_4, const uint8_t *VAR_5)
{
int VAR_6;
int VAR_7;
int VAR_8 = 0;
if (VAR_1 & 1)
return AVERROR_INVALIDDATA;
while (VAR_8 < VAR_1) {
int VAR_10 = ir2_get_co... | [
"static int FUNC_0(Ir2Context *VAR_0, int VAR_1, int VAR_2, uint8_t *VAR_3,\nint VAR_4, const uint8_t *VAR_5)\n{",
"int VAR_6;",
"int VAR_7;",
"int VAR_8 = 0;",
"if (VAR_1 & 1)\nreturn AVERROR_INVALIDDATA;",
"while (VAR_8 < VAR_1) {",
"int VAR_10 = ir2_get_code(&VAR_0->gb);",
"if (VAR_10 >= 0x80) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
3,387 | void hmp_change(Monitor *mon, const QDict *qdict)
{
const char *device = qdict_get_str(qdict, "device");
const char *target = qdict_get_str(qdict, "target");
const char *arg = qdict_get_try_str(qdict, "arg");
const char *read_only = qdict_get_try_str(qdict, "read-only-mode");
BlockdevChangeRea... | true | qemu | 788cf9f8c8cbda53843e060540f3e91a060eb744 | void hmp_change(Monitor *mon, const QDict *qdict)
{
const char *device = qdict_get_str(qdict, "device");
const char *target = qdict_get_str(qdict, "target");
const char *arg = qdict_get_try_str(qdict, "arg");
const char *read_only = qdict_get_try_str(qdict, "read-only-mode");
BlockdevChangeRea... | {
"code": [
" if (err &&",
" error_get_class(err) == ERROR_CLASS_DEVICE_ENCRYPTED) {",
" error_free(err);",
" monitor_read_block_device_key(mon, device, NULL, NULL);",
" Error *err = NULL;"
],
"line_no": [
77,
79,
81,
83,
15
]
} | void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{
const char *VAR_2 = qdict_get_str(VAR_1, "VAR_2");
const char *VAR_3 = qdict_get_str(VAR_1, "VAR_3");
const char *VAR_4 = qdict_get_try_str(VAR_1, "VAR_4");
const char *VAR_5 = qdict_get_try_str(VAR_1, "read-only-mode");
BlockdevChangeReadOnlyM... | [
"void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)\n{",
"const char *VAR_2 = qdict_get_str(VAR_1, \"VAR_2\");",
"const char *VAR_3 = qdict_get_str(VAR_1, \"VAR_3\");",
"const char *VAR_4 = qdict_get_try_str(VAR_1, \"VAR_4\");",
"const char *VAR_5 = qdict_get_try_str(VAR_1, \"read-only-mode\");",
"BlockdevCh... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
3,388 | static CharDriverState *text_console_init(ChardevVC *vc)
{
CharDriverState *chr;
QemuConsole *s;
unsigned width = 0;
unsigned height = 0;
chr = g_malloc0(sizeof(CharDriverState));
if (vc->has_width) {
width = vc->width;
} else if (vc->has_cols) {
width = vc->col... | true | qemu | afff2b15e89ac81c113f2ebfd729aaa02b40edb6 | static CharDriverState *text_console_init(ChardevVC *vc)
{
CharDriverState *chr;
QemuConsole *s;
unsigned width = 0;
unsigned height = 0;
chr = g_malloc0(sizeof(CharDriverState));
if (vc->has_width) {
width = vc->width;
} else if (vc->has_cols) {
width = vc->col... | {
"code": [
" s = new_console(NULL, TEXT_CONSOLE);",
" s = new_console(NULL, TEXT_CONSOLE_FIXED_SIZE);"
],
"line_no": [
47,
51
]
} | static CharDriverState *FUNC_0(ChardevVC *vc)
{
CharDriverState *chr;
QemuConsole *s;
unsigned VAR_0 = 0;
unsigned VAR_1 = 0;
chr = g_malloc0(sizeof(CharDriverState));
if (vc->has_width) {
VAR_0 = vc->VAR_0;
} else if (vc->has_cols) {
VAR_0 = vc->cols * FONT_WID... | [
"static CharDriverState *FUNC_0(ChardevVC *vc)\n{",
"CharDriverState *chr;",
"QemuConsole *s;",
"unsigned VAR_0 = 0;",
"unsigned VAR_1 = 0;",
"chr = g_malloc0(sizeof(CharDriverState));",
"if (vc->has_width) {",
"VAR_0 = vc->VAR_0;",
"} else if (vc->has_cols) {",
"VAR_0 = vc->cols * FONT_WIDTH;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
... |
3,389 | static int codec_reinit(AVCodecContext *avctx, int width, int height, int quality) {
NuvContext *c = avctx->priv_data;
width = (width + 1) & ~1;
height = (height + 1) & ~1;
if (quality >= 0)
get_quant_quality(c, quality);
if (width != c->width || height != c->height) {
if (av_... | true | FFmpeg | e7b95918fca1c3d057d35f77ba58ee2d00d03151 | static int codec_reinit(AVCodecContext *avctx, int width, int height, int quality) {
NuvContext *c = avctx->priv_data;
width = (width + 1) & ~1;
height = (height + 1) & ~1;
if (quality >= 0)
get_quant_quality(c, quality);
if (width != c->width || height != c->height) {
if (av_... | {
"code": [
" c->decomp_size = c->height * c->width * 3 / 2;",
" c->decomp_buf = av_realloc(c->decomp_buf, c->decomp_size + AV_LZO_OUTPUT_PADDING);"
],
"line_no": [
23,
25
]
} | static int FUNC_0(AVCodecContext *VAR_0, int VAR_1, int VAR_2, int VAR_3) {
NuvContext *c = VAR_0->priv_data;
VAR_1 = (VAR_1 + 1) & ~1;
VAR_2 = (VAR_2 + 1) & ~1;
if (VAR_3 >= 0)
get_quant_quality(c, VAR_3);
if (VAR_1 != c->VAR_1 || VAR_2 != c->VAR_2) {
if (av_image_check_size(... | [
"static int FUNC_0(AVCodecContext *VAR_0, int VAR_1, int VAR_2, int VAR_3) {",
"NuvContext *c = VAR_0->priv_data;",
"VAR_1 = (VAR_1 + 1) & ~1;",
"VAR_2 = (VAR_2 + 1) & ~1;",
"if (VAR_3 >= 0)\nget_quant_quality(c, VAR_3);",
"if (VAR_1 != c->VAR_1 || VAR_2 != c->VAR_2) {",
"if (av_image_check_size(VAR_2, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9,
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
3,390 | int av_open_input_stream(AVFormatContext **ic_ptr,
ByteIOContext *pb, const char *filename,
AVInputFormat *fmt, AVFormatParameters *ap)
{
int err;
AVFormatContext *ic;
AVFormatParameters default_ap;
if(!ap){
ap=&default_ap;
mem... | true | FFmpeg | ec973f45a3afd82fd53313b0b570645c03b2b178 | int av_open_input_stream(AVFormatContext **ic_ptr,
ByteIOContext *pb, const char *filename,
AVInputFormat *fmt, AVFormatParameters *ap)
{
int err;
AVFormatContext *ic;
AVFormatParameters default_ap;
if(!ap){
ap=&default_ap;
mem... | {
"code": [],
"line_no": []
} | int FUNC_0(AVFormatContext **VAR_0,
ByteIOContext *VAR_1, const char *VAR_2,
AVInputFormat *VAR_3, AVFormatParameters *VAR_4)
{
int VAR_5;
AVFormatContext *ic;
AVFormatParameters default_ap;
if(!VAR_4){
VAR_4=&default_ap;
memse... | [
"int FUNC_0(AVFormatContext **VAR_0,\nByteIOContext *VAR_1, const char *VAR_2,\nAVInputFormat *VAR_3, AVFormatParameters *VAR_4)\n{",
"int VAR_5;",
"AVFormatContext *ic;",
"AVFormatParameters default_ap;",
"if(!VAR_4){",
"VAR_4=&default_ap;",
"memset(VAR_4, 0, sizeof(default_ap));",
"}",
"if(!VAR_4-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27,
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
3,391 | static void network_to_control(RDMAControlHeader *control)
{
control->type = ntohl(control->type);
control->len = ntohl(control->len);
control->repeat = ntohl(control->repeat);
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static void network_to_control(RDMAControlHeader *control)
{
control->type = ntohl(control->type);
control->len = ntohl(control->len);
control->repeat = ntohl(control->repeat);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(RDMAControlHeader *VAR_0)
{
VAR_0->type = ntohl(VAR_0->type);
VAR_0->len = ntohl(VAR_0->len);
VAR_0->repeat = ntohl(VAR_0->repeat);
}
| [
"static void FUNC_0(RDMAControlHeader *VAR_0)\n{",
"VAR_0->type = ntohl(VAR_0->type);",
"VAR_0->len = ntohl(VAR_0->len);",
"VAR_0->repeat = ntohl(VAR_0->repeat);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
3,393 | void ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
{
int id;
id = avio_rl16(pb);
codec->codec_type = AVMEDIA_TYPE_AUDIO;
codec->codec_tag = id;
codec->channels = avio_rl16(pb);
codec->sample_rate = avio_rl32(pb);
codec->bit_rate = avio_rl32(pb) * 8;
codec... | true | FFmpeg | ca402f32e392590a81a1381dab41c4f9c2c2f98a | void ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
{
int id;
id = avio_rl16(pb);
codec->codec_type = AVMEDIA_TYPE_AUDIO;
codec->codec_tag = id;
codec->channels = avio_rl16(pb);
codec->sample_rate = avio_rl32(pb);
codec->bit_rate = avio_rl32(pb) * 8;
codec... | {
"code": [
"void ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)"
],
"line_no": [
1
]
} | void FUNC_0(AVIOContext *VAR_0, AVCodecContext *VAR_1, int VAR_2)
{
int VAR_3;
VAR_3 = avio_rl16(VAR_0);
VAR_1->codec_type = AVMEDIA_TYPE_AUDIO;
VAR_1->codec_tag = VAR_3;
VAR_1->channels = avio_rl16(VAR_0);
VAR_1->sample_rate = avio_rl32(VAR_0);
VAR_1->bit_rate = avio_rl32(VAR_0) *... | [
"void FUNC_0(AVIOContext *VAR_0, AVCodecContext *VAR_1, int VAR_2)\n{",
"int VAR_3;",
"VAR_3 = avio_rl16(VAR_0);",
"VAR_1->codec_type = AVMEDIA_TYPE_AUDIO;",
"VAR_1->codec_tag = VAR_3;",
"VAR_1->channels = avio_rl16(VAR_0);",
"VAR_1->sample_rate = avio_rl32(VAR_0);",
"VAR_1->bit_rate = avio_rl32(VAR_0... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
3,395 | static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
const uint8_t *buf, unsigned int substr)
{
SubStream *s = &m->substream[substr];
unsigned int ch;
int sync_word, tmp;
uint8_t checksum;
uint8_t lossless_check;
int start_count = get_bit... | false | FFmpeg | a9cd12ee2afb3f3aad783c396816b23d8513f472 | static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
const uint8_t *buf, unsigned int substr)
{
SubStream *s = &m->substream[substr];
unsigned int ch;
int sync_word, tmp;
uint8_t checksum;
uint8_t lossless_check;
int start_count = get_bit... | {
"code": [],
"line_no": []
} | static int FUNC_0(MLPDecodeContext *VAR_0, GetBitContext *VAR_1,
const uint8_t *VAR_2, unsigned int VAR_3)
{
SubStream *s = &VAR_0->substream[VAR_3];
unsigned int VAR_4;
int VAR_5, VAR_6;
uint8_t checksum;
uint8_t lossless_check;
int VAR_7 = get_bits_count(... | [
"static int FUNC_0(MLPDecodeContext *VAR_0, GetBitContext *VAR_1,\nconst uint8_t *VAR_2, unsigned int VAR_3)\n{",
"SubStream *s = &VAR_0->substream[VAR_3];",
"unsigned int VAR_4;",
"int VAR_5, VAR_6;",
"uint8_t checksum;",
"uint8_t lossless_check;",
"int VAR_7 = get_bits_count(VAR_1);",
"const int VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21,
23
],
[
27
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
... |
3,396 | static void init_blk_migration(Monitor *mon, QEMUFile *f)
{
BlkMigDevState *bmds;
BlockDriverState *bs;
block_mig_state.submitted = 0;
block_mig_state.read_done = 0;
block_mig_state.transferred = 0;
block_mig_state.total_sector_sum = 0;
block_mig_state.prev_progress = -1;
fo... | true | qemu | 792773b2255d25c6f5fe9dfa0ae200debab92de4 | static void init_blk_migration(Monitor *mon, QEMUFile *f)
{
BlkMigDevState *bmds;
BlockDriverState *bs;
block_mig_state.submitted = 0;
block_mig_state.read_done = 0;
block_mig_state.transferred = 0;
block_mig_state.total_sector_sum = 0;
block_mig_state.prev_progress = -1;
fo... | {
"code": [
" bmds->total_sectors = bdrv_getlength(bs) >> BDRV_SECTOR_BITS;",
" block_mig_state.total_sector_sum += bmds->total_sectors;"
],
"line_no": [
33,
41
]
} | static void FUNC_0(Monitor *VAR_0, QEMUFile *VAR_1)
{
BlkMigDevState *bmds;
BlockDriverState *bs;
block_mig_state.submitted = 0;
block_mig_state.read_done = 0;
block_mig_state.transferred = 0;
block_mig_state.total_sector_sum = 0;
block_mig_state.prev_progress = -1;
for (bs ... | [
"static void FUNC_0(Monitor *VAR_0, QEMUFile *VAR_1)\n{",
"BlkMigDevState *bmds;",
"BlockDriverState *bs;",
"block_mig_state.submitted = 0;",
"block_mig_state.read_done = 0;",
"block_mig_state.transferred = 0;",
"block_mig_state.total_sector_sum = 0;",
"block_mig_state.prev_progress = -1;",
"for (bs... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47,
49,
51... |
3,400 | static void vmgenid_device_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->vmsd = &vmstate_vmgenid;
dc->realize = vmgenid_realize;
dc->hotpluggable = false;
dc->props = vmgenid_properties;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
obje... | true | qemu | c8389550dedc65892fba9c3df29423efd802f544 | static void vmgenid_device_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->vmsd = &vmstate_vmgenid;
dc->realize = vmgenid_realize;
dc->hotpluggable = false;
dc->props = vmgenid_properties;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
obje... | {
"code": [
" dc->props = vmgenid_properties;"
],
"line_no": [
15
]
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
dc->vmsd = &vmstate_vmgenid;
dc->realize = vmgenid_realize;
dc->hotpluggable = false;
dc->props = vmgenid_properties;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
object_class_property_... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"dc->vmsd = &vmstate_vmgenid;",
"dc->realize = vmgenid_realize;",
"dc->hotpluggable = false;",
"dc->props = vmgenid_properties;",
"set_bit(DEVICE_CATEGORY_MISC, dc->categories);",
"object_class_property... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
25,
27,
29,
31
],
[
33
]
] |
3,402 | static void run_block_job(BlockJob *job, Error **errp)
{
AioContext *aio_context = blk_get_aio_context(job->blk);
/* FIXME In error cases, the job simply goes away and we access a dangling
* pointer below. */
aio_context_acquire(aio_context);
do {
aio_poll(aio_context, true);
... | true | qemu | 4172a00373b2c81374293becc02b16b7f8c76659 | static void run_block_job(BlockJob *job, Error **errp)
{
AioContext *aio_context = blk_get_aio_context(job->blk);
aio_context_acquire(aio_context);
do {
aio_poll(aio_context, true);
qemu_progress_print(job->len ?
((float)job->offset / job->len * 1... | {
"code": [
" } while (!job->ready);",
" block_job_complete_sync(job, errp);",
" qemu_progress_print(100.f, 0);"
],
"line_no": [
23,
27,
37
]
} | static void FUNC_0(BlockJob *VAR_0, Error **VAR_1)
{
AioContext *aio_context = blk_get_aio_context(VAR_0->blk);
aio_context_acquire(aio_context);
do {
aio_poll(aio_context, true);
qemu_progress_print(VAR_0->len ?
((float)VAR_0->offset / VAR_0->len... | [
"static void FUNC_0(BlockJob *VAR_0, Error **VAR_1)\n{",
"AioContext *aio_context = blk_get_aio_context(VAR_0->blk);",
"aio_context_acquire(aio_context);",
"do {",
"aio_poll(aio_context, true);",
"qemu_progress_print(VAR_0->len ?\n((float)VAR_0->offset / VAR_0->len * 100.f) : 0.0f, 0);",
"} while (!VAR_... | [
0,
0,
0,
0,
0,
0,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
27
],
[
29
],
[
37
],
[
39
]
] |
3,403 | static int dxtory_decode_v1_420(AVCodecContext *avctx, AVFrame *pic,
const uint8_t *src, int src_size)
{
int h, w;
uint8_t *Y1, *Y2, *U, *V;
int ret;
if (src_size < avctx->width * avctx->height * 3 / 2) {
av_log(avctx, AV_LOG_ERROR, "packet too small\n");... | true | FFmpeg | a392bf657015c9a79a5a13adfbfb15086c1943b9 | static int dxtory_decode_v1_420(AVCodecContext *avctx, AVFrame *pic,
const uint8_t *src, int src_size)
{
int h, w;
uint8_t *Y1, *Y2, *U, *V;
int ret;
if (src_size < avctx->width * avctx->height * 3 / 2) {
av_log(avctx, AV_LOG_ERROR, "packet too small\n");... | {
"code": [
" if (src_size < avctx->width * avctx->height * 3 / 2) {"
],
"line_no": [
15
]
} | static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1,
const uint8_t *VAR_2, int VAR_3)
{
int VAR_4, VAR_5;
uint8_t *Y1, *Y2, *U, *V;
int VAR_6;
if (VAR_3 < VAR_0->width * VAR_0->height * 3 / 2) {
av_log(VAR_0, AV_LOG_ERROR, "packet too small\n");
... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5;",
"uint8_t *Y1, *Y2, *U, *V;",
"int VAR_6;",
"if (VAR_3 < VAR_0->width * VAR_0->height * 3 / 2) {",
"av_log(VAR_0, AV_LOG_ERROR, \"packet too small\\n\");",
"return AVERROR_INVALIDDATA;",
... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27,
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
3,404 | int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
AVPacket *avpkt,
const AVFrame *frame,
int *got_packet_ptr)
{
int ret;
AVPacket user_pkt = *avpkt;
in... | true | FFmpeg | 3393cd85459cb9c23dec90373da91559987000ee | int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
AVPacket *avpkt,
const AVFrame *frame,
int *got_packet_ptr)
{
int ret;
AVPacket user_pkt = *avpkt;
in... | {
"code": [],
"line_no": []
} | int VAR_0 avcodec_encode_video2(AVCodecContext *avctx,
AVPacket *avpkt,
const AVFrame *frame,
int *got_packet_ptr)
{
int ret;
AVPacket user_pkt = *avpkt;
int needs_reallo... | [
"int VAR_0 avcodec_encode_video2(AVCodecContext *avctx,\nAVPacket *avpkt,\nconst AVFrame *frame,\nint *got_packet_ptr)\n{",
"int ret;",
"AVPacket user_pkt = *avpkt;",
"int needs_realloc = !user_pkt.data;",
"*got_packet_ptr = 0;",
"if(CONFIG_FRAME_THREAD_ENCODER &&\navctx->internal->frame_thread_encoder &&... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
24
],
[
... |
3,405 | static int dxva2_hevc_start_frame(AVCodecContext *avctx,
av_unused const uint8_t *buffer,
av_unused uint32_t size)
{
const HEVCContext *h = avctx->priv_data;
AVDXVAContext *ctx = avctx->hwaccel_context;
struct hevc_dxva2_picture_conte... | false | FFmpeg | ab28108a361196134704071b7b34c42fc7d747c7 | static int dxva2_hevc_start_frame(AVCodecContext *avctx,
av_unused const uint8_t *buffer,
av_unused uint32_t size)
{
const HEVCContext *h = avctx->priv_data;
AVDXVAContext *ctx = avctx->hwaccel_context;
struct hevc_dxva2_picture_conte... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
av_unused const VAR_1 *buffer,
av_unused uint32_t size)
{
const HEVCContext *VAR_2 = VAR_0->priv_data;
AVDXVAContext *ctx = VAR_0->hwaccel_context;
struct hevc_dxva2_picture_context *VAR_3 = VA... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nav_unused const VAR_1 *buffer,\nav_unused uint32_t size)\n{",
"const HEVCContext *VAR_2 = VAR_0->priv_data;",
"AVDXVAContext *ctx = VAR_0->hwaccel_context;",
"struct hevc_dxva2_picture_context *VAR_3 = VAR_2->ref->hwaccel_picture_private;",
"if (!DXVA_CONTEXT_VALID... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
21
],
[
27
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
3,406 | static uint8_t *ogg_write_vorbiscomment(int offset, int bitexact,
int *header_len, AVDictionary **m, int framing_bit)
{
const char *vendor = bitexact ? "ffmpeg" : LIBAVFORMAT_IDENT;
int size;
uint8_t *p, *p0;
ff_metadata_conv(m, ff_vorbiscomment_metadata_c... | false | FFmpeg | 0db5b2b9f8a96298eeba7988d43c4eb44220fab3 | static uint8_t *ogg_write_vorbiscomment(int offset, int bitexact,
int *header_len, AVDictionary **m, int framing_bit)
{
const char *vendor = bitexact ? "ffmpeg" : LIBAVFORMAT_IDENT;
int size;
uint8_t *p, *p0;
ff_metadata_conv(m, ff_vorbiscomment_metadata_c... | {
"code": [],
"line_no": []
} | static uint8_t *FUNC_0(int offset, int bitexact,
int *header_len, AVDictionary **m, int framing_bit)
{
const char *VAR_0 = bitexact ? "ffmpeg" : LIBAVFORMAT_IDENT;
int VAR_1;
uint8_t *p, *p0;
ff_metadata_conv(m, ff_vorbiscomment_metadata_conv, NULL);
... | [
"static uint8_t *FUNC_0(int offset, int bitexact,\nint *header_len, AVDictionary **m, int framing_bit)\n{",
"const char *VAR_0 = bitexact ? \"ffmpeg\" : LIBAVFORMAT_IDENT;",
"int VAR_1;",
"uint8_t *p, *p0;",
"ff_metadata_conv(m, ff_vorbiscomment_metadata_conv, NULL);",
"VAR_1 = offset + ff_vorbiscomment_l... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
31
],
[
33
],
[
35,
37
],
[
41
],
[
43
],
[
45
]
] |
3,407 | static void envelope_peak16(WaveformContext *s, AVFrame *out, int plane, int component)
{
const int dst_linesize = out->linesize[component] / 2;
const int bg = s->bg_color[component] * (s->size / 256);
const int limit = s->size - 1;
const int is_chroma = (component == 1 || component == 2);
con... | false | FFmpeg | db592f3b03a21d5bd5237021c00af3ce0431fc60 | static void envelope_peak16(WaveformContext *s, AVFrame *out, int plane, int component)
{
const int dst_linesize = out->linesize[component] / 2;
const int bg = s->bg_color[component] * (s->size / 256);
const int limit = s->size - 1;
const int is_chroma = (component == 1 || component == 2);
con... | {
"code": [],
"line_no": []
} | static void FUNC_0(WaveformContext *VAR_0, AVFrame *VAR_1, int VAR_2, int VAR_3)
{
const int VAR_4 = VAR_1->linesize[VAR_3] / 2;
const int VAR_5 = VAR_0->bg_color[VAR_3] * (VAR_0->size / 256);
const int VAR_6 = VAR_0->size - 1;
const int VAR_7 = (VAR_3 == 1 || VAR_3 == 2);
const int VAR_8 = (V... | [
"static void FUNC_0(WaveformContext *VAR_0, AVFrame *VAR_1, int VAR_2, int VAR_3)\n{",
"const int VAR_4 = VAR_1->linesize[VAR_3] / 2;",
"const int VAR_5 = VAR_0->bg_color[VAR_3] * (VAR_0->size / 256);",
"const int VAR_6 = VAR_0->size - 1;",
"const int VAR_7 = (VAR_3 == 1 || VAR_3 == 2);",
"const int VAR_8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
3,408 | int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4], int srcRange, const int table[4], int dstRange, int brightness, int contrast, int saturation)
{
int64_t crv = inv_table[0];
int64_t cbu = inv_table[1];
int64_t cgu = -inv_table[2];
int64_t cgv = -inv_table[3];
int64_t cy = ... | false | FFmpeg | f684f3c58a77a20f18b80f888d69c2bacb53ca9b | int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4], int srcRange, const int table[4], int dstRange, int brightness, int contrast, int saturation)
{
int64_t crv = inv_table[0];
int64_t cbu = inv_table[1];
int64_t cgu = -inv_table[2];
int64_t cgv = -inv_table[3];
int64_t cy = ... | {
"code": [],
"line_no": []
} | int FUNC_0(SwsContext *VAR_0, const int VAR_1[4], int VAR_2, const int VAR_3[4], int VAR_4, int VAR_5, int VAR_6, int VAR_7)
{
int64_t crv = VAR_1[0];
int64_t cbu = VAR_1[1];
int64_t cgu = -VAR_1[2];
int64_t cgv = -VAR_1[3];
int64_t cy = 1<<16;
int64_t oy = 0;
memcpy(VAR_0->src... | [
"int FUNC_0(SwsContext *VAR_0, const int VAR_1[4], int VAR_2, const int VAR_3[4], int VAR_4, int VAR_5, int VAR_6, int VAR_7)\n{",
"int64_t crv = VAR_1[0];",
"int64_t cbu = VAR_1[1];",
"int64_t cgu = -VAR_1[2];",
"int64_t cgv = -VAR_1[3];",
"int64_t cy = 1<<16;",
"int64_t oy = 0;",
"memcpy(VAR_0->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
... |
3,409 | static int decode_mb_info(IVI5DecContext *ctx, IVIBandDesc *band,
IVITile *tile, AVCodecContext *avctx)
{
int x, y, mv_x, mv_y, mv_delta, offs, mb_offset,
mv_scale, blks_per_mb;
IVIMbInfo *mb, *ref_mb;
int row_offset = band->mb_size * band->p... | false | FFmpeg | c855ece101cd960ddd20eabd5f295e0b02b71dcc | static int decode_mb_info(IVI5DecContext *ctx, IVIBandDesc *band,
IVITile *tile, AVCodecContext *avctx)
{
int x, y, mv_x, mv_y, mv_delta, offs, mb_offset,
mv_scale, blks_per_mb;
IVIMbInfo *mb, *ref_mb;
int row_offset = band->mb_size * band->p... | {
"code": [],
"line_no": []
} | static int FUNC_0(IVI5DecContext *VAR_0, IVIBandDesc *VAR_1,
IVITile *VAR_2, AVCodecContext *VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10,
VAR_11, VAR_12;
IVIMbInfo *mb, *ref_mb;
int VAR_13 = VAR_1->mb_size * VAR_1->pitch;
... | [
"static int FUNC_0(IVI5DecContext *VAR_0, IVIBandDesc *VAR_1,\nIVITile *VAR_2, AVCodecContext *VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10,\nVAR_11, VAR_12;",
"IVIMbInfo *mb, *ref_mb;",
"int VAR_13 = VAR_1->mb_size * VAR_1->pitch;",
"mb = VAR_2->mbs;",
"ref_mb =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25,
27,
29
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
57
],
[
59
... |
3,410 | void ff_imdct_calc(MDCTContext *s, FFTSample *output,
const FFTSample *input, FFTSample *tmp)
{
int k, n8, n4, n2, n, j;
const uint16_t *revtab = s->fft.revtab;
const FFTSample *tcos = s->tcos;
const FFTSample *tsin = s->tsin;
const FFTSample *in1, *in2;
FFTComplex *z ... | true | FFmpeg | b9fa32082c71013e90eab9e9997967d2939cf4a6 | void ff_imdct_calc(MDCTContext *s, FFTSample *output,
const FFTSample *input, FFTSample *tmp)
{
int k, n8, n4, n2, n, j;
const uint16_t *revtab = s->fft.revtab;
const FFTSample *tcos = s->tcos;
const FFTSample *tsin = s->tsin;
const FFTSample *in1, *in2;
FFTComplex *z ... | {
"code": [
" n8 = n >> 3;",
" n8 = n >> 3;",
"void ff_imdct_calc(MDCTContext *s, FFTSample *output,",
" const FFTSample *input, FFTSample *tmp)",
" int k, n8, n4, n2, n, j;",
" n8 = n >> 3;"
],
"line_no": [
27,
27,
1,
3,
7,
27
]
} | void FUNC_0(MDCTContext *VAR_0, FFTSample *VAR_1,
const FFTSample *VAR_2, FFTSample *VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;
const uint16_t *VAR_10 = VAR_0->fft.VAR_10;
const FFTSample *VAR_11 = VAR_0->VAR_11;
const FFTSample *VAR_12 = VAR_0->VAR_12;
const FF... | [
"void FUNC_0(MDCTContext *VAR_0, FFTSample *VAR_1,\nconst FFTSample *VAR_2, FFTSample *VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;",
"const uint16_t *VAR_10 = VAR_0->fft.VAR_10;",
"const FFTSample *VAR_11 = VAR_0->VAR_11;",
"const FFTSample *VAR_12 = VAR_0->VAR_12;",
"const FFTSample *VAR_1... | [
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
3,411 | ISADevice *isa_create(const char *name)
{
DeviceState *dev;
if (!isabus) {
fprintf(stderr, "Tried to create isa device %s with no isa bus present.\n", name);
return NULL;
}
dev = qdev_create(&isabus->qbus, name);
return DO_UPCAST(ISADevice, qdev, dev);
}
| true | qemu | 3f66aa9c07d6392757f9d7b83849c7f791981725 | ISADevice *isa_create(const char *name)
{
DeviceState *dev;
if (!isabus) {
fprintf(stderr, "Tried to create isa device %s with no isa bus present.\n", name);
return NULL;
}
dev = qdev_create(&isabus->qbus, name);
return DO_UPCAST(ISADevice, qdev, dev);
}
| {
"code": [
" fprintf(stderr, \"Tried to create isa device %s with no isa bus present.\\n\", name);",
" return NULL;",
" return NULL;"
],
"line_no": [
11,
13,
13
]
} | ISADevice *FUNC_0(const char *name)
{
DeviceState *dev;
if (!isabus) {
fprintf(stderr, "Tried to create isa device %s with no isa bus present.\n", name);
return NULL;
}
dev = qdev_create(&isabus->qbus, name);
return DO_UPCAST(ISADevice, qdev, dev);
}
| [
"ISADevice *FUNC_0(const char *name)\n{",
"DeviceState *dev;",
"if (!isabus) {",
"fprintf(stderr, \"Tried to create isa device %s with no isa bus present.\\n\", name);",
"return NULL;",
"}",
"dev = qdev_create(&isabus->qbus, name);",
"return DO_UPCAST(ISADevice, qdev, dev);",
"}"
] | [
0,
0,
0,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
3,412 | static int applehttp_read_seek(AVFormatContext *s, int stream_index,
int64_t timestamp, int flags)
{
AppleHTTPContext *c = s->priv_data;
int i, j, ret;
if ((flags & AVSEEK_FLAG_BYTE) || !c->variants[0]->finished)
return AVERROR(ENOSYS);
timestamp = av_re... | true | FFmpeg | 6f20921deec135a68f78cb327472ea6cf28644a5 | static int applehttp_read_seek(AVFormatContext *s, int stream_index,
int64_t timestamp, int flags)
{
AppleHTTPContext *c = s->priv_data;
int i, j, ret;
if ((flags & AVSEEK_FLAG_BYTE) || !c->variants[0]->finished)
return AVERROR(ENOSYS);
timestamp = av_re... | {
"code": [
" int64_t pos = 0;",
" if (var->input) {"
],
"line_no": [
35,
37
]
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,
int64_t VAR_2, int VAR_3)
{
AppleHTTPContext *c = VAR_0->priv_data;
int VAR_4, VAR_5, VAR_6;
if ((VAR_3 & AVSEEK_FLAG_BYTE) || !c->variants[0]->finished)
return AVERROR(ENOSYS);
VAR_2 = av_rescale_rnd(... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,\nint64_t VAR_2, int VAR_3)\n{",
"AppleHTTPContext *c = VAR_0->priv_data;",
"int VAR_4, VAR_5, VAR_6;",
"if ((VAR_3 & AVSEEK_FLAG_BYTE) || !c->variants[0]->finished)\nreturn AVERROR(ENOSYS);",
"VAR_2 = av_rescale_rnd(VAR_2, 1, VAR_1 >= 0 ?\nVAR_0->streams... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13,
15
],
[
19,
21,
23,
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
55
],
[... |
3,413 | int coroutine_fn qemu_co_recvv(int sockfd, struct iovec *iov,
int len, int iov_offset)
{
int total = 0;
int ret;
while (len) {
ret = qemu_recvv(sockfd, iov, len, iov_offset + total);
if (ret < 0) {
if (errno == EAGAIN) {
qem... | true | qemu | 3e80bf9351f8fec9085c46df6da075efd5e71003 | int coroutine_fn qemu_co_recvv(int sockfd, struct iovec *iov,
int len, int iov_offset)
{
int total = 0;
int ret;
while (len) {
ret = qemu_recvv(sockfd, iov, len, iov_offset + total);
if (ret < 0) {
if (errno == EAGAIN) {
qem... | {
"code": [
" ret = qemu_recvv(sockfd, iov, len, iov_offset + total);"
],
"line_no": [
13
]
} | int VAR_0 qemu_co_recvv(int sockfd, struct iovec *iov,
int len, int iov_offset)
{
int total = 0;
int ret;
while (len) {
ret = qemu_recvv(sockfd, iov, len, iov_offset + total);
if (ret < 0) {
if (errno == EAGAIN) {
qemu_corou... | [
"int VAR_0 qemu_co_recvv(int sockfd, struct iovec *iov,\nint len, int iov_offset)\n{",
"int total = 0;",
"int ret;",
"while (len) {",
"ret = qemu_recvv(sockfd, iov, len, iov_offset + total);",
"if (ret < 0) {",
"if (errno == EAGAIN) {",
"qemu_coroutine_yield();",
"continue;",
"}",
"if (total == ... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
3,414 | static void vc1_decode_p_blocks(VC1Context *v)
{
MpegEncContext *s = &v->s;
int apply_loop_filter;
/* select codingmode used for VLC tables selection */
switch (v->c_ac_table_index) {
case 0:
v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
break;
... | true | FFmpeg | 22ce78a95efb5d67dcd925285ad8c836b67d2c19 | static void vc1_decode_p_blocks(VC1Context *v)
{
MpegEncContext *s = &v->s;
int apply_loop_filter;
switch (v->c_ac_table_index) {
case 0:
v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
break;
case 1:
v->codingset = CS_HIGH_MOT_INTRA... | {
"code": [
" if (apply_loop_filter) {"
],
"line_no": [
123
]
} | static void FUNC_0(VC1Context *VAR_0)
{
MpegEncContext *s = &VAR_0->s;
int VAR_1;
switch (VAR_0->c_ac_table_index) {
case 0:
VAR_0->codingset = (VAR_0->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
break;
case 1:
VAR_0->codingset = CS_HIGH_MOT_INTRA;... | [
"static void FUNC_0(VC1Context *VAR_0)\n{",
"MpegEncContext *s = &VAR_0->s;",
"int VAR_1;",
"switch (VAR_0->c_ac_table_index) {",
"case 0:\nVAR_0->codingset = (VAR_0->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;",
"break;",
"case 1:\nVAR_0->codingset = CS_HIGH_MOT_INTRA;",
"break;",
"case ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15,
17
],
[
19
],
[
21,
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
37
],
[
39,
41
],
[
43
],
[
45,
47
],
[
49
],
[
51,
53... |
3,415 | static int get_metadata(AVFormatContext *s,
const char *const tag,
const unsigned data_size)
{
uint8_t *buf = ((data_size + 1) == 0) ? NULL : av_malloc(data_size + 1);
if (!buf)
return AVERROR(ENOMEM);
if (avio_read(s->pb, buf, data_size) < ... | true | FFmpeg | 8e90c7285d1cbf62a9c9a5f9e6efda998dc0d454 | static int get_metadata(AVFormatContext *s,
const char *const tag,
const unsigned data_size)
{
uint8_t *buf = ((data_size + 1) == 0) ? NULL : av_malloc(data_size + 1);
if (!buf)
return AVERROR(ENOMEM);
if (avio_read(s->pb, buf, data_size) < ... | {
"code": [
" if (avio_read(s->pb, buf, data_size) < 0) {"
],
"line_no": [
19
]
} | static int FUNC_0(AVFormatContext *VAR_0,
const char *const VAR_1,
const unsigned VAR_2)
{
uint8_t *buf = ((VAR_2 + 1) == 0) ? NULL : av_malloc(VAR_2 + 1);
if (!buf)
return AVERROR(ENOMEM);
if (avio_read(VAR_0->pb, buf, VAR_2) < 0) {
... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nconst char *const VAR_1,\nconst unsigned VAR_2)\n{",
"uint8_t *buf = ((VAR_2 + 1) == 0) ? NULL : av_malloc(VAR_2 + 1);",
"if (!buf)\nreturn AVERROR(ENOMEM);",
"if (avio_read(VAR_0->pb, buf, VAR_2) < 0) {",
"av_free(buf);",
"return AVERROR(EIO);",
"}",
"buf[V... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13,
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
3,417 | static int set_sps(HEVCContext *s, const HEVCSPS *sps)
{
int ret;
int num = 0, den = 0;
pic_arrays_free(s);
ret = pic_arrays_init(s, sps);
if (ret < 0)
goto fail;
s->avctx->coded_width = sps->width;
s->avctx->coded_height = sps->height;
s->avctx->widt... | false | FFmpeg | ed06e5d92b4c67b49068d538461fbbe0a53a8c5e | static int set_sps(HEVCContext *s, const HEVCSPS *sps)
{
int ret;
int num = 0, den = 0;
pic_arrays_free(s);
ret = pic_arrays_init(s, sps);
if (ret < 0)
goto fail;
s->avctx->coded_width = sps->width;
s->avctx->coded_height = sps->height;
s->avctx->widt... | {
"code": [],
"line_no": []
} | static int FUNC_0(HEVCContext *VAR_0, const HEVCSPS *VAR_1)
{
int VAR_2;
int VAR_3 = 0, VAR_4 = 0;
pic_arrays_free(VAR_0);
VAR_2 = pic_arrays_init(VAR_0, VAR_1);
if (VAR_2 < 0)
goto fail;
VAR_0->avctx->coded_width = VAR_1->width;
VAR_0->avctx->coded_height ... | [
"static int FUNC_0(HEVCContext *VAR_0, const HEVCSPS *VAR_1)\n{",
"int VAR_2;",
"int VAR_3 = 0, VAR_4 = 0;",
"pic_arrays_free(VAR_0);",
"VAR_2 = pic_arrays_init(VAR_0, VAR_1);",
"if (VAR_2 < 0)\ngoto fail;",
"VAR_0->avctx->coded_width = VAR_1->width;",
"VAR_0->avctx->coded_height = VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39,
41
],
[
43,
45
],
[
49
],
[
51
],
[
53... |
3,418 | yuv2mono_2_c_template(SwsContext *c, const int16_t *buf[2],
const int16_t *ubuf[2], const int16_t *vbuf[2],
const int16_t *abuf[2], uint8_t *dest, int dstW,
int yalpha, int uvalpha, int y,
enum AVPixelFormat target)
{
cons... | false | FFmpeg | 1e0e193240a8e47a980ac76b8b5af831b17b7928 | yuv2mono_2_c_template(SwsContext *c, const int16_t *buf[2],
const int16_t *ubuf[2], const int16_t *vbuf[2],
const int16_t *abuf[2], uint8_t *dest, int dstW,
int yalpha, int uvalpha, int y,
enum AVPixelFormat target)
{
cons... | {
"code": [],
"line_no": []
} | FUNC_0(SwsContext *VAR_0, const int16_t *VAR_1[2],
const int16_t *VAR_2[2], const int16_t *VAR_3[2],
const int16_t *VAR_4[2], uint8_t *VAR_5, int VAR_6,
int VAR_7, int VAR_8, int VAR_9,
enum AVPixelFormat VAR_10)
{
const i... | [
"FUNC_0(SwsContext *VAR_0, const int16_t *VAR_1[2],\nconst int16_t *VAR_2[2], const int16_t *VAR_3[2],\nconst int16_t *VAR_4[2], uint8_t *VAR_5, int VAR_6,\nint VAR_7, int VAR_8, int VAR_9,\nenum AVPixelFormat VAR_10)\n{",
"const int16_t *VAR_11 = VAR_1[0], *buf1 = VAR_1[1];",
"const uint8_t * const VAR_12 =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
... |
3,419 | static double eval_expr(Parser * p, AVEvalExpr * e) {
switch (e->type) {
case e_value: return e->value;
case e_const: return e->value * p->const_value[e->a.const_index];
case e_func0: return e->value * e->a.func0(eval_expr(p, e->param[0]));
case e_func1: return e->value * e-... | false | FFmpeg | 63a547eabc3ec874ca0f732d141eb2b2e95224a8 | static double eval_expr(Parser * p, AVEvalExpr * e) {
switch (e->type) {
case e_value: return e->value;
case e_const: return e->value * p->const_value[e->a.const_index];
case e_func0: return e->value * e->a.func0(eval_expr(p, e->param[0]));
case e_func1: return e->value * e-... | {
"code": [],
"line_no": []
} | static double FUNC_0(Parser * VAR_0, AVEvalExpr * VAR_1) {
switch (VAR_1->type) {
case e_value: return VAR_1->value;
case e_const: return VAR_1->value * VAR_0->const_value[VAR_1->a.const_index];
case e_func0: return VAR_1->value * VAR_1->a.func0(FUNC_0(VAR_0, VAR_1->param[0]));
... | [
"static double FUNC_0(Parser * VAR_0, AVEvalExpr * VAR_1) {",
"switch (VAR_1->type) {",
"case e_value: return VAR_1->value;",
"case e_const: return VAR_1->value * VAR_0->const_value[VAR_1->a.const_index];",
"case e_func0: return VAR_1->value * VAR_1->a.func0(FUNC_0(VAR_0, VAR_1->param[0]));",
"case e_f... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
... |
3,420 | static int build_filter(ResampleContext *c, void *filter, double factor, int tap_count, int alloc, int phase_count, int scale,
int filter_type, int kaiser_beta){
int ph, i;
double x, y, w;
double *tab = av_malloc_array(tap_count, sizeof(*tab));
const int center= (tap_count-... | true | FFmpeg | 9bec6d71a22ab42908f900f3b3289fa1edfcea6e | static int build_filter(ResampleContext *c, void *filter, double factor, int tap_count, int alloc, int phase_count, int scale,
int filter_type, int kaiser_beta){
int ph, i;
double x, y, w;
double *tab = av_malloc_array(tap_count, sizeof(*tab));
const int center= (tap_count-... | {
"code": [
" double *tab = av_malloc_array(tap_count, sizeof(*tab));",
" for(ph=0;ph<phase_count;ph++) {",
" for(i=0;i<tap_count;i++) {",
" norm += y;"
],
"line_no": [
9,
29,
33,
81
]
} | static int FUNC_0(ResampleContext *VAR_0, void *VAR_1, double VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6,
int VAR_7, int VAR_8){
int VAR_9, VAR_10;
double VAR_11, VAR_12, VAR_13;
double *VAR_14 = av_malloc_array(VAR_3, sizeof(*VAR_14));
const int VAR_15= (VAR_3-1)/2;... | [
"static int FUNC_0(ResampleContext *VAR_0, void *VAR_1, double VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6,\nint VAR_7, int VAR_8){",
"int VAR_9, VAR_10;",
"double VAR_11, VAR_12, VAR_13;",
"double *VAR_14 = av_malloc_array(VAR_3, sizeof(*VAR_14));",
"const int VAR_15= (VAR_3-1)/2;",
"if (!VAR_14)\... | [
0,
0,
0,
1,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
23,
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
3,421 | void avcodec_get_context_defaults2(AVCodecContext *s, enum CodecType codec_type){
int flags=0;
memset(s, 0, sizeof(AVCodecContext));
s->av_class= &av_codec_context_class;
s->codec_type = codec_type;
if(codec_type == CODEC_TYPE_AUDIO)
flags= AV_OPT_FLAG_AUDIO_PARAM;
else if(cod... | true | FFmpeg | 3cffbe090a5168dcfe580de8d662a32e7ad1d911 | void avcodec_get_context_defaults2(AVCodecContext *s, enum CodecType codec_type){
int flags=0;
memset(s, 0, sizeof(AVCodecContext));
s->av_class= &av_codec_context_class;
s->codec_type = codec_type;
if(codec_type == CODEC_TYPE_AUDIO)
flags= AV_OPT_FLAG_AUDIO_PARAM;
else if(cod... | {
"code": [
" s->rc_eq= av_strdup(\"tex^qComp\");"
],
"line_no": [
31
]
} | void FUNC_0(AVCodecContext *VAR_0, enum CodecType VAR_1){
int VAR_2=0;
memset(VAR_0, 0, sizeof(AVCodecContext));
VAR_0->av_class= &av_codec_context_class;
VAR_0->VAR_1 = VAR_1;
if(VAR_1 == CODEC_TYPE_AUDIO)
VAR_2= AV_OPT_FLAG_AUDIO_PARAM;
else if(VAR_1 == CODEC_TYPE_VIDEO)
... | [
"void FUNC_0(AVCodecContext *VAR_0, enum CodecType VAR_1){",
"int VAR_2=0;",
"memset(VAR_0, 0, sizeof(AVCodecContext));",
"VAR_0->av_class= &av_codec_context_class;",
"VAR_0->VAR_1 = VAR_1;",
"if(VAR_1 == CODEC_TYPE_AUDIO)\nVAR_2= AV_OPT_FLAG_AUDIO_PARAM;",
"else if(VAR_1 == CODEC_TYPE_VIDEO)\nVAR_2= AV... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
13
],
[
15,
17
],
[
19,
21
],
[
23,
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51... |
3,422 | static void dec_float(DisasContext *dc, uint32_t insn)
{
uint32_t op0;
uint32_t ra, rb, rd;
op0 = extract32(insn, 0, 8);
ra = extract32(insn, 16, 5);
rb = extract32(insn, 11, 5);
rd = extract32(insn, 21, 5);
switch (op0) {
case 0x00: /* lf.add.s */
LOG_DIS("lf.add.... | true | qemu | 6597c28d618a3d16d468770b7c30a0237a8c8ea9 | static void dec_float(DisasContext *dc, uint32_t insn)
{
uint32_t op0;
uint32_t ra, rb, rd;
op0 = extract32(insn, 0, 8);
ra = extract32(insn, 16, 5);
rb = extract32(insn, 11, 5);
rd = extract32(insn, 21, 5);
switch (op0) {
case 0x00:
LOG_DIS("lf.add.s r%d, r%d, r%... | {
"code": [
" if (ra != 0 && rb != 0) {",
" gen_helper_float_mul_s(cpu_R[rd], cpu_env, cpu_R[ra], cpu_R[rb]);",
" } else {",
" tcg_gen_ori_tl(fpcsr, fpcsr, FPCSR_ZF);",
" tcg_gen_movi_i32(cpu_R[rd], 0x0);",
" if (ra != 0 && rb != 0) {",
... | static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1)
{
uint32_t op0;
uint32_t ra, rb, rd;
op0 = extract32(VAR_1, 0, 8);
ra = extract32(VAR_1, 16, 5);
rb = extract32(VAR_1, 11, 5);
rd = extract32(VAR_1, 21, 5);
switch (op0) {
case 0x00:
LOG_DIS("lf.add.s r%d, r%... | [
"static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1)\n{",
"uint32_t op0;",
"uint32_t ra, rb, rd;",
"op0 = extract32(VAR_1, 0, 8);",
"ra = extract32(VAR_1, 16, 5);",
"rb = extract32(VAR_1, 11, 5);",
"rd = extract32(VAR_1, 21, 5);",
"switch (op0) {",
"case 0x00:\nLOG_DIS(\"lf.add.s r%d, r%d, r%d\\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
31,
33
],
[
35
],
[
37
],
[
43,
45
],
[
47
],
[
49
],
[
51
],
[... |
3,423 | void rng_backend_open(RngBackend *s, Error **errp)
{
object_property_set_bool(OBJECT(s), true, "opened", errp);
}
| true | qemu | 57d3e1b3f52d07d215ed96df946ee01f8d9f9526 | void rng_backend_open(RngBackend *s, Error **errp)
{
object_property_set_bool(OBJECT(s), true, "opened", errp);
}
| {
"code": [
"void rng_backend_open(RngBackend *s, Error **errp)",
" object_property_set_bool(OBJECT(s), true, \"opened\", errp);"
],
"line_no": [
1,
5
]
} | void FUNC_0(RngBackend *VAR_0, Error **VAR_1)
{
object_property_set_bool(OBJECT(VAR_0), true, "opened", VAR_1);
}
| [
"void FUNC_0(RngBackend *VAR_0, Error **VAR_1)\n{",
"object_property_set_bool(OBJECT(VAR_0), true, \"opened\", VAR_1);",
"}"
] | [
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.