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 |
|---|---|---|---|---|---|---|---|---|---|---|
4,045 | static void an5206_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;
M68kCPU *cpu;
CPUM68KState *env;
int kernel_size;
uint64_t elf_entry;
hwaddr entry;
... | true | qemu | 4482e05cbbb7e50e476f6a9500cf0b38913bd939 | static void an5206_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;
M68kCPU *cpu;
CPUM68KState *env;
int kernel_size;
uint64_t elf_entry;
hwaddr entry;
... | {
"code": [
" if (!cpu) {",
" exit(1);",
" if (!cpu) {",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" if (!cpu) {... | 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;
M68kCPU *cpu;
CPUM68KState *env;
int VAR_3;
uint64_t elf_entry;
hwaddr entry;
MemoryRegion *address_space_mem = get_system_me... | [
"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;",
"M68kCPU *cpu;",
"CPUM68KState *env;",
"int VAR_3;",
"uint64_t elf_entry;",
"hwaddr entry;",
"MemoryRegion *address_space_mem = get_syst... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
4,046 | static int mv_read_header(AVFormatContext *avctx)
{
MvContext *mv = avctx->priv_data;
AVIOContext *pb = avctx->pb;
AVStream *ast = NULL, *vst = NULL; //initialization to suppress warning
int version, i;
avio_skip(pb, 4);
version = avio_rb16(pb);
if (version == 2) {
uint6... | true | FFmpeg | 4c9f35bb7c94d20455d3fca3a184b892f1a0aa4e | static int mv_read_header(AVFormatContext *avctx)
{
MvContext *mv = avctx->priv_data;
AVIOContext *pb = avctx->pb;
AVStream *ast = NULL, *vst = NULL;
int version, i;
avio_skip(pb, 4);
version = avio_rb16(pb);
if (version == 2) {
uint64_t timestamp;
int v;
... | {
"code": [
" vst->time_base = (AVRational){1, 15};"
],
"line_no": [
51
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
MvContext *mv = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
AVStream *ast = NULL, *vst = NULL;
int VAR_1, VAR_2;
avio_skip(pb, 4);
VAR_1 = avio_rb16(pb);
if (VAR_1 == 2) {
uint64_t timestamp;
int VAR_3;
av... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"MvContext *mv = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"AVStream *ast = NULL, *vst = NULL;",
"int VAR_1, VAR_2;",
"avio_skip(pb, 4);",
"VAR_1 = avio_rb16(pb);",
"if (VAR_1 == 2) {",
"uint64_t timestamp;",
"int VAR_3;",
"avio_skip(pb, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
35
],
[
37,
39
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
4,047 | void qsb_free(QEMUSizedBuffer *qsb)
{
size_t i;
if (!qsb) {
return;
}
for (i = 0; i < qsb->n_iov; i++) {
g_free(qsb->iov[i].iov_base);
}
g_free(qsb->iov);
g_free(qsb);
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | void qsb_free(QEMUSizedBuffer *qsb)
{
size_t i;
if (!qsb) {
return;
}
for (i = 0; i < qsb->n_iov; i++) {
g_free(qsb->iov[i].iov_base);
}
g_free(qsb->iov);
g_free(qsb);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(QEMUSizedBuffer *VAR_0)
{
size_t i;
if (!VAR_0) {
return;
}
for (i = 0; i < VAR_0->n_iov; i++) {
g_free(VAR_0->iov[i].iov_base);
}
g_free(VAR_0->iov);
g_free(VAR_0);
}
| [
"void FUNC_0(QEMUSizedBuffer *VAR_0)\n{",
"size_t i;",
"if (!VAR_0) {",
"return;",
"}",
"for (i = 0; i < VAR_0->n_iov; i++) {",
"g_free(VAR_0->iov[i].iov_base);",
"}",
"g_free(VAR_0->iov);",
"g_free(VAR_0);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
4,048 | static int decode_frame(AVCodecContext * avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MPADecodeContext *s = avctx->priv_data;
uint32_t header;
int out_size;
OUT_INT *ou... | true | FFmpeg | 45a014d75efd043aa432b87869f898e552cbbb75 | static int decode_frame(AVCodecContext * avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MPADecodeContext *s = avctx->priv_data;
uint32_t header;
int out_size;
OUT_INT *ou... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext * VAR_0,
void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
MPADecodeContext *s = VAR_0->priv_data;
uint32_t header;
int VAR_6;
OUT_INT *out_samples = ... | [
"static int FUNC_0(AVCodecContext * VAR_0,\nvoid *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"MPADecodeContext *s = VAR_0->priv_data;",
"uint32_t header;",
"int VAR_6;",
"OUT_INT *out_samples = VAR_1;",
"if(VAR_5 < HEADER_SIZE)\nreturn... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
],
[... |
4,049 | static struct omap_32khz_timer_s *omap_os_timer_init(MemoryRegion *memory,
hwaddr base,
qemu_irq irq, omap_clk clk)
{
struct omap_32khz_timer_s *s = (struct omap_32khz_timer_s *)
g_malloc0(sizeof(struct omap_32khz_timer_s));
s->timer.irq = irq;
s->timer.c... | true | qemu | b45c03f585ea9bb1af76c73e82195418c294919d | static struct omap_32khz_timer_s *omap_os_timer_init(MemoryRegion *memory,
hwaddr base,
qemu_irq irq, omap_clk clk)
{
struct omap_32khz_timer_s *s = (struct omap_32khz_timer_s *)
g_malloc0(sizeof(struct omap_32khz_timer_s));
s->timer.irq = irq;
s->timer.c... | {
"code": [
" struct omap_32khz_timer_s *s = (struct omap_32khz_timer_s *)",
" g_malloc0(sizeof(struct omap_32khz_timer_s));"
],
"line_no": [
9,
11
]
} | static struct omap_32khz_timer_s *FUNC_0(MemoryRegion *VAR_0,
hwaddr VAR_1,
qemu_irq VAR_2, omap_clk VAR_3)
{
struct omap_32khz_timer_s *VAR_4 = (struct omap_32khz_timer_s *)
g_malloc0(sizeof(struct omap_32khz_timer_s));
VAR_4->timer.VAR_2 = VAR_2;
VAR_4-... | [
"static struct omap_32khz_timer_s *FUNC_0(MemoryRegion *VAR_0,\nhwaddr VAR_1,\nqemu_irq VAR_2, omap_clk VAR_3)\n{",
"struct omap_32khz_timer_s *VAR_4 = (struct omap_32khz_timer_s *)\ng_malloc0(sizeof(struct omap_32khz_timer_s));",
"VAR_4->timer.VAR_2 = VAR_2;",
"VAR_4->timer.VAR_3 = VAR_3;",
"VAR_4->timer.t... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9,
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
31
],
[
35
],
[
37
]
] |
4,050 | static bool check_irqchip_in_kernel(void)
{
if (kvm_irqchip_in_kernel()) {
return true;
}
error_report("pci-assign: error: requires KVM with in-kernel irqchip "
"enabled");
return false;
}
| true | qemu | 665f119fbad97c05c2603673ac6b2dcbf0d0e9e1 | static bool check_irqchip_in_kernel(void)
{
if (kvm_irqchip_in_kernel()) {
return true;
}
error_report("pci-assign: error: requires KVM with in-kernel irqchip "
"enabled");
return false;
}
| {
"code": [
"static bool check_irqchip_in_kernel(void)",
" return true;",
" error_report(\"pci-assign: error: requires KVM with in-kernel irqchip \"",
" \"enabled\");",
" return false;"
],
"line_no": [
1,
7,
11,
13,
15
]
} | static bool FUNC_0(void)
{
if (kvm_irqchip_in_kernel()) {
return true;
}
error_report("pci-assign: error: requires KVM with in-kernel irqchip "
"enabled");
return false;
}
| [
"static bool FUNC_0(void)\n{",
"if (kvm_irqchip_in_kernel()) {",
"return true;",
"}",
"error_report(\"pci-assign: error: requires KVM with in-kernel irqchip \"\n\"enabled\");",
"return false;",
"}"
] | [
1,
0,
1,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
17
]
] |
4,051 | static double get_qscale(MpegEncContext *s, RateControlEntry *rce, double rate_factor, int frame_num){
RateControlContext *rcc= &s->rc_context;
AVCodecContext *a= s->avctx;
double q, bits;
const int pict_type= rce->new_pict_type;
const double mb_num= s->mb_num;
int i;
double const_v... | true | FFmpeg | 2711cb28f46463760f0326d806fe5ef9551ade2c | static double get_qscale(MpegEncContext *s, RateControlEntry *rce, double rate_factor, int frame_num){
RateControlContext *rcc= &s->rc_context;
AVCodecContext *a= s->avctx;
double q, bits;
const int pict_type= rce->new_pict_type;
const double mb_num= s->mb_num;
int i;
double const_v... | {
"code": [],
"line_no": []
} | static double FUNC_0(MpegEncContext *VAR_0, RateControlEntry *VAR_1, double VAR_2, int VAR_3){
RateControlContext *rcc= &VAR_0->rc_context;
AVCodecContext *a= VAR_0->avctx;
double VAR_4, VAR_5;
const int VAR_6= VAR_1->new_pict_type;
const double VAR_7= VAR_0->VAR_7;
int VAR_8;
doubl... | [
"static double FUNC_0(MpegEncContext *VAR_0, RateControlEntry *VAR_1, double VAR_2, int VAR_3){",
"RateControlContext *rcc= &VAR_0->rc_context;",
"AVCodecContext *a= VAR_0->avctx;",
"double VAR_4, VAR_5;",
"const int VAR_6= VAR_1->new_pict_type;",
"const double VAR_7= VAR_0->VAR_7;",
"int VAR_8;",
"do... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19,
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
57,
59,
61,
63,
65,
67,
69
],
[
73
... |
4,052 | static int hpet_start_timer(struct qemu_alarm_timer *t)
{
struct hpet_info info;
int r, fd;
fd = open("/dev/hpet", O_RDONLY);
if (fd < 0)
return -1;
/* Set frequency */
r = ioctl(fd, HPET_IRQFREQ, RTC_FREQ);
if (r < 0) {
fprintf(stderr, "Could not configure '/de... | true | qemu | 40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4 | static int hpet_start_timer(struct qemu_alarm_timer *t)
{
struct hpet_info info;
int r, fd;
fd = open("/dev/hpet", O_RDONLY);
if (fd < 0)
return -1;
r = ioctl(fd, HPET_IRQFREQ, RTC_FREQ);
if (r < 0) {
fprintf(stderr, "Could not configure '/dev/hpet' to have a 1... | {
"code": [
" fd = open(\"/dev/hpet\", O_RDONLY);"
],
"line_no": [
11
]
} | static int FUNC_0(struct qemu_alarm_timer *VAR_0)
{
struct hpet_info VAR_1;
int VAR_2, VAR_3;
VAR_3 = open("/dev/hpet", O_RDONLY);
if (VAR_3 < 0)
return -1;
VAR_2 = ioctl(VAR_3, HPET_IRQFREQ, RTC_FREQ);
if (VAR_2 < 0) {
fprintf(stderr, "Could not configure '/de... | [
"static int FUNC_0(struct qemu_alarm_timer *VAR_0)\n{",
"struct hpet_info VAR_1;",
"int VAR_2, VAR_3;",
"VAR_3 = open(\"/dev/hpet\", O_RDONLY);",
"if (VAR_3 < 0)\nreturn -1;",
"VAR_2 = ioctl(VAR_3, HPET_IRQFREQ, RTC_FREQ);",
"if (VAR_2 < 0) {",
"fprintf(stderr, \"Could not configure '/dev/hpet' to hav... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
21
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33
],
[
39
],
[
41,
43
],
[
49
],
[
51,
53
],
[
59
],
[
61,
63
],
[
67... |
4,053 | static void cmd_read_cd(IDEState *s, uint8_t* buf)
{
int nb_sectors, lba, transfer_request;
nb_sectors = (buf[6] << 16) | (buf[7] << 8) | buf[8];
lba = ube32_to_cpu(buf + 2);
if (nb_sectors == 0) {
ide_atapi_cmd_ok(s);
return;
}
transfer_request = buf[9];
swit... | true | qemu | e7bd708ec85e40fd51569bb90c52d6613ffd8f45 | static void cmd_read_cd(IDEState *s, uint8_t* buf)
{
int nb_sectors, lba, transfer_request;
nb_sectors = (buf[6] << 16) | (buf[7] << 8) | buf[8];
lba = ube32_to_cpu(buf + 2);
if (nb_sectors == 0) {
ide_atapi_cmd_ok(s);
return;
}
transfer_request = buf[9];
swit... | {
"code": [
" transfer_request = buf[9];",
" switch(transfer_request & 0xf8) {",
" case 0x00:",
" break;"
],
"line_no": [
25,
27,
29,
35
]
} | static void FUNC_0(IDEState *VAR_0, uint8_t* VAR_1)
{
int VAR_2, VAR_3, VAR_4;
VAR_2 = (VAR_1[6] << 16) | (VAR_1[7] << 8) | VAR_1[8];
VAR_3 = ube32_to_cpu(VAR_1 + 2);
if (VAR_2 == 0) {
ide_atapi_cmd_ok(VAR_0);
return;
}
VAR_4 = VAR_1[9];
switch(VAR_4 & 0xf8) {... | [
"static void FUNC_0(IDEState *VAR_0, uint8_t* VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4;",
"VAR_2 = (VAR_1[6] << 16) | (VAR_1[7] << 8) | VAR_1[8];",
"VAR_3 = ube32_to_cpu(VAR_1 + 2);",
"if (VAR_2 == 0) {",
"ide_atapi_cmd_ok(VAR_0);",
"return;",
"}",
"VAR_4 = VAR_1[9];",
"switch(VAR_4 & 0xf8) {",
"cas... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29,
33
],
[
35
],
[
37,
41
],
[
43
],
[
45,
49
],
[
51
],
[
53,
55,
57
],
... |
4,054 | static const char *srt_to_ass(AVCodecContext *avctx, char *out, char *out_end,
const char *in, int x1, int y1, int x2, int y2)
{
char c, *param, buffer[128], tmp[128];
int len, tag_close, sptr = 1, line_start = 1, an = 0, end = 0;
SrtStack stack[16];
stack[0].tag[0]... | true | FFmpeg | aaa1173de775b9b865a714abcc270816d2f59dff | static const char *srt_to_ass(AVCodecContext *avctx, char *out, char *out_end,
const char *in, int x1, int y1, int x2, int y2)
{
char c, *param, buffer[128], tmp[128];
int len, tag_close, sptr = 1, line_start = 1, an = 0, end = 0;
SrtStack stack[16];
stack[0].tag[0]... | {
"code": [
" stack[j].param[i]);",
" stack[sptr].param[i]);"
],
"line_no": [
131,
203
]
} | static const char *FUNC_0(AVCodecContext *VAR_0, char *VAR_1, char *VAR_2,
const char *VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7)
{
char VAR_8, *VAR_9, VAR_10[128], VAR_11[128];
int VAR_12, VAR_13, VAR_14 = 1, VAR_15 = 1, VAR_16 = 0, VAR_17 = 0;
SrtStack stack[16];... | [
"static const char *FUNC_0(AVCodecContext *VAR_0, char *VAR_1, char *VAR_2,\nconst char *VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7)\n{",
"char VAR_8, *VAR_9, VAR_10[128], VAR_11[128];",
"int VAR_12, VAR_13, VAR_14 = 1, VAR_15 = 1, VAR_16 = 0, VAR_17 = 0;",
"SrtStack stack[16];",
"stack[0].tag[0] = 0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
19
],
[
21
],
[
25
],
[
27,
29,
31
],
[
33,
35
],
[
37
],
[
41
],
[
43
],
[
45,
47
],
[
49,
51
],
[
53
... |
4,055 | void tcg_prologue_init(TCGContext *s)
{
/* init global prologue and epilogue */
s->code_buf = s->code_gen_prologue;
s->code_ptr = s->code_buf;
tcg_target_qemu_prologue(s);
flush_icache_range((tcg_target_ulong)s->code_buf,
(tcg_target_ulong)s->code_ptr); | true | qemu | d6b64b2b606fe0fe5f2208e84ff7a28445de666a | void tcg_prologue_init(TCGContext *s)
{
s->code_buf = s->code_gen_prologue;
s->code_ptr = s->code_buf;
tcg_target_qemu_prologue(s);
flush_icache_range((tcg_target_ulong)s->code_buf,
(tcg_target_ulong)s->code_ptr); | {
"code": [],
"line_no": []
} | void FUNC_0(TCGContext *VAR_0)
{
VAR_0->code_buf = VAR_0->code_gen_prologue;
VAR_0->code_ptr = VAR_0->code_buf;
tcg_target_qemu_prologue(VAR_0);
flush_icache_range((tcg_target_ulong)VAR_0->code_buf,
(tcg_target_ulong)VAR_0->code_ptr); | [
"void FUNC_0(TCGContext *VAR_0)\n{",
"VAR_0->code_buf = VAR_0->code_gen_prologue;",
"VAR_0->code_ptr = VAR_0->code_buf;",
"tcg_target_qemu_prologue(VAR_0);",
"flush_icache_range((tcg_target_ulong)VAR_0->code_buf,\n(tcg_target_ulong)VAR_0->code_ptr);"
] | [
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
4
],
[
5
],
[
6
],
[
7,
8
]
] |
4,056 | static int decode_slice(AVCodecContext *c, void *arg)
{
FFV1Context *fs = *(void **)arg;
FFV1Context *f = fs->avctx->priv_data;
int width, height, x, y, ret;
const int ps = (av_pix_fmt_desc_get(c->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR)
? (c->bits_per_raw_sample > 8) + 1
... | false | FFmpeg | 4bb1070c154e49d35805fbcdac9c9e92f702ef96 | static int decode_slice(AVCodecContext *c, void *arg)
{
FFV1Context *fs = *(void **)arg;
FFV1Context *f = fs->avctx->priv_data;
int width, height, x, y, ret;
const int ps = (av_pix_fmt_desc_get(c->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR)
? (c->bits_per_raw_sample > 8) + 1
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1)
{
FFV1Context *fs = *(void **)VAR_1;
FFV1Context *f = fs->avctx->priv_data;
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;
const int VAR_7 = (av_pix_fmt_desc_get(VAR_0->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR)
? (VAR_0->bits_per_ra... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1)\n{",
"FFV1Context *fs = *(void **)VAR_1;",
"FFV1Context *f = fs->avctx->priv_data;",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;",
"const int VAR_7 = (av_pix_fmt_desc_get(VAR_0->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR)\n? (VAR_0->bits_per_raw_sample > 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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13,
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
4,057 | int text_console_init(QemuOpts *opts, CharDriverState **_chr)
{
CharDriverState *chr;
TextConsole *s;
unsigned width;
unsigned height;
chr = g_malloc0(sizeof(CharDriverState));
if (n_text_consoles == 128) {
fprintf(stderr, "Too many text consoles\n");
exit(1);
}... | true | qemu | 1f51470d044852592922f91000e741c381582cdc | int text_console_init(QemuOpts *opts, CharDriverState **_chr)
{
CharDriverState *chr;
TextConsole *s;
unsigned width;
unsigned height;
chr = g_malloc0(sizeof(CharDriverState));
if (n_text_consoles == 128) {
fprintf(stderr, "Too many text consoles\n");
exit(1);
}... | {
"code": [
"int text_console_init(QemuOpts *opts, CharDriverState **_chr)",
" return -EBUSY;",
" *_chr = chr;",
" return 0;",
" *_chr = chr;",
" return 0;",
" *_chr = chr;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" ... | int FUNC_0(QemuOpts *VAR_0, CharDriverState **VAR_1)
{
CharDriverState *chr;
TextConsole *s;
unsigned VAR_2;
unsigned VAR_3;
chr = g_malloc0(sizeof(CharDriverState));
if (n_text_consoles == 128) {
fprintf(stderr, "Too many text consoles\n");
exit(1);
}
text... | [
"int FUNC_0(QemuOpts *VAR_0, CharDriverState **VAR_1)\n{",
"CharDriverState *chr;",
"TextConsole *s;",
"unsigned VAR_2;",
"unsigned VAR_3;",
"chr = g_malloc0(sizeof(CharDriverState));",
"if (n_text_consoles == 128) {",
"fprintf(stderr, \"Too many text consoles\\n\");",
"exit(1);",
"}",
"text_con... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35,
37
],
[
41
],
[
43,
45
],
[
49
],
[
51
],
[
53
... |
4,058 | _eth_get_rss_ex_dst_addr(const struct iovec *pkt, int pkt_frags,
size_t rthdr_offset,
struct ip6_ext_hdr *ext_hdr,
struct in6_address *dst_addr)
{
struct ip6_ext_hdr_routing *rthdr = (struct ip6_ext_hdr_routing *) ext_hdr;
if ((rthd... | true | qemu | b2caa3b82edca29ccb5e7d6311ffcf841b9b7786 | _eth_get_rss_ex_dst_addr(const struct iovec *pkt, int pkt_frags,
size_t rthdr_offset,
struct ip6_ext_hdr *ext_hdr,
struct in6_address *dst_addr)
{
struct ip6_ext_hdr_routing *rthdr = (struct ip6_ext_hdr_routing *) ext_hdr;
if ((rthd... | {
"code": [
" return bytes_read == sizeof(dst_addr);"
],
"line_no": [
45
]
} | FUNC_0(const struct iovec *VAR_0, int VAR_1,
size_t VAR_2,
struct ip6_ext_hdr *VAR_3,
struct in6_address *VAR_4)
{
struct ip6_ext_hdr_routing *VAR_5 = (struct ip6_ext_hdr_routing *) VAR_3;
if ((VAR_5->rtype == 2) &&
(VAR_5-... | [
"FUNC_0(const struct iovec *VAR_0, int VAR_1,\nsize_t VAR_2,\nstruct ip6_ext_hdr *VAR_3,\nstruct in6_address *VAR_4)\n{",
"struct ip6_ext_hdr_routing *VAR_5 = (struct ip6_ext_hdr_routing *) VAR_3;",
"if ((VAR_5->rtype == 2) &&\n(VAR_5->len == sizeof(struct in6_address) / 8) &&\n(VAR_5->segleft == 1)) {",
"siz... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
15,
17,
19
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37,
39,
41
],
[
45
],
[
47
],
[
51
],
[
53
]
] |
4,059 | USBPacket *usb_ep_find_packet_by_id(USBDevice *dev, int pid, int ep,
uint64_t id)
{
struct USBEndpoint *uep = usb_ep_get(dev, pid, ep);
USBPacket *p;
while ((p = QTAILQ_FIRST(&uep->queue)) != NULL) {
if (p->id == id) {
return p;
}
... | true | qemu | 6735d433729f80fab80c0a1f70ae131398645613 | USBPacket *usb_ep_find_packet_by_id(USBDevice *dev, int pid, int ep,
uint64_t id)
{
struct USBEndpoint *uep = usb_ep_get(dev, pid, ep);
USBPacket *p;
while ((p = QTAILQ_FIRST(&uep->queue)) != NULL) {
if (p->id == id) {
return p;
}
... | {
"code": [
" while ((p = QTAILQ_FIRST(&uep->queue)) != NULL) {"
],
"line_no": [
13
]
} | USBPacket *FUNC_0(USBDevice *dev, int pid, int ep,
uint64_t id)
{
struct USBEndpoint *VAR_0 = usb_ep_get(dev, pid, ep);
USBPacket *p;
while ((p = QTAILQ_FIRST(&VAR_0->queue)) != NULL) {
if (p->id == id) {
return p;
}
}
ret... | [
"USBPacket *FUNC_0(USBDevice *dev, int pid, int ep,\nuint64_t id)\n{",
"struct USBEndpoint *VAR_0 = usb_ep_get(dev, pid, ep);",
"USBPacket *p;",
"while ((p = QTAILQ_FIRST(&VAR_0->queue)) != NULL) {",
"if (p->id == id) {",
"return p;",
"}",
"}",
"return NULL;",
"}"
] | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
]
] |
4,060 | void pci_bridge_exitfn(PCIDevice *pci_dev)
{
PCIBridge *s = DO_UPCAST(PCIBridge, dev, pci_dev);
assert(QLIST_EMPTY(&s->sec_bus.child));
QLIST_REMOVE(&s->sec_bus, sibling);
pci_bridge_region_cleanup(s);
memory_region_destroy(&s->address_space_mem);
memory_region_destroy(&s->address_space_i... | true | qemu | 523a59f596a3e62f5a28eb171adba35e71310040 | void pci_bridge_exitfn(PCIDevice *pci_dev)
{
PCIBridge *s = DO_UPCAST(PCIBridge, dev, pci_dev);
assert(QLIST_EMPTY(&s->sec_bus.child));
QLIST_REMOVE(&s->sec_bus, sibling);
pci_bridge_region_cleanup(s);
memory_region_destroy(&s->address_space_mem);
memory_region_destroy(&s->address_space_i... | {
"code": [
" pci_bridge_region_cleanup(s);"
],
"line_no": [
11
]
} | void FUNC_0(PCIDevice *VAR_0)
{
PCIBridge *s = DO_UPCAST(PCIBridge, dev, VAR_0);
assert(QLIST_EMPTY(&s->sec_bus.child));
QLIST_REMOVE(&s->sec_bus, sibling);
pci_bridge_region_cleanup(s);
memory_region_destroy(&s->address_space_mem);
memory_region_destroy(&s->address_space_io);
}
| [
"void FUNC_0(PCIDevice *VAR_0)\n{",
"PCIBridge *s = DO_UPCAST(PCIBridge, dev, VAR_0);",
"assert(QLIST_EMPTY(&s->sec_bus.child));",
"QLIST_REMOVE(&s->sec_bus, sibling);",
"pci_bridge_region_cleanup(s);",
"memory_region_destroy(&s->address_space_mem);",
"memory_region_destroy(&s->address_space_io);",
"}... | [
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
]
] |
4,063 | static void superh_cpu_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
CPUClass *cc = CPU_CLASS(oc);
SuperHCPUClass *scc = SUPERH_CPU_CLASS(oc);
scc->parent_realize = dc->realize;
dc->realize = superh_cpu_realizefn;
scc->parent_reset = cc->reset;
cc-... | true | qemu | ce5b1bbf624b977a55ff7f85bb3871682d03baff | static void superh_cpu_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
CPUClass *cc = CPU_CLASS(oc);
SuperHCPUClass *scc = SUPERH_CPU_CLASS(oc);
scc->parent_realize = dc->realize;
dc->realize = superh_cpu_realizefn;
scc->parent_reset = cc->reset;
cc-... | {
"code": [
" dc->cannot_destroy_with_object_finalize_yet = true;",
" dc->cannot_destroy_with_object_finalize_yet = true;",
" dc->cannot_destroy_with_object_finalize_yet = true;",
" dc->cannot_destroy_with_object_finalize_yet = true;",
" dc->cannot_destroy_with_object_finalize_yet =... | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
CPUClass *cc = CPU_CLASS(VAR_0);
SuperHCPUClass *scc = SUPERH_CPU_CLASS(VAR_0);
scc->parent_realize = dc->realize;
dc->realize = superh_cpu_realizefn;
scc->parent_reset = cc->reset;
cc->r... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"CPUClass *cc = CPU_CLASS(VAR_0);",
"SuperHCPUClass *scc = SUPERH_CPU_CLASS(VAR_0);",
"scc->parent_realize = dc->realize;",
"dc->realize = superh_cpu_realizefn;",
"scc->parent_reset = cc->reset;",
"cc->... | [
0,
0,
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
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47,
49
... |
4,065 | uint64_t HELPER(neon_abdl_u32)(uint32_t a, uint32_t b)
{
uint64_t tmp;
uint64_t result;
DO_ABD(result, a, b, uint16_t);
DO_ABD(tmp, a >> 16, b >> 16, uint16_t);
return result | (tmp << 32);
}
| true | qemu | 4d9ad7f793605abd9806fc932b3e04e028894565 | uint64_t HELPER(neon_abdl_u32)(uint32_t a, uint32_t b)
{
uint64_t tmp;
uint64_t result;
DO_ABD(result, a, b, uint16_t);
DO_ABD(tmp, a >> 16, b >> 16, uint16_t);
return result | (tmp << 32);
}
| {
"code": [
" DO_ABD(result, a, b, uint16_t);",
" DO_ABD(tmp, a >> 16, b >> 16, uint16_t);"
],
"line_no": [
9,
11
]
} | uint64_t FUNC_0(neon_abdl_u32)(uint32_t a, uint32_t b)
{
uint64_t tmp;
uint64_t result;
DO_ABD(result, a, b, uint16_t);
DO_ABD(tmp, a >> 16, b >> 16, uint16_t);
return result | (tmp << 32);
}
| [
"uint64_t FUNC_0(neon_abdl_u32)(uint32_t a, uint32_t b)\n{",
"uint64_t tmp;",
"uint64_t result;",
"DO_ABD(result, a, b, uint16_t);",
"DO_ABD(tmp, a >> 16, b >> 16, uint16_t);",
"return result | (tmp << 32);",
"}"
] | [
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
4,066 | void RENAME(swri_noise_shaping)(SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count){
int i, j, pos, ch;
int taps = s->dither.ns_taps;
float S = s->dither.ns_scale;
float S_1 = s->dither.ns_scale_1;
av_assert2((taps&3) != 2);
av_assert2((taps&3) !... | true | FFmpeg | cc4a41727e29a52a181e3d1c1a398f1da40969c3 | void RENAME(swri_noise_shaping)(SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count){
int i, j, pos, ch;
int taps = s->dither.ns_taps;
float S = s->dither.ns_scale;
float S_1 = s->dither.ns_scale_1;
av_assert2((taps&3) != 2);
av_assert2((taps&3) !... | {
"code": [
" int i, j, pos, ch;"
],
"line_no": [
3
]
} | void FUNC_0(swri_noise_shaping)(SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count){
int VAR_0, VAR_1, VAR_2, VAR_3;
int VAR_4 = s->dither.ns_taps;
float VAR_5 = s->dither.ns_scale;
float VAR_6 = s->dither.ns_scale_1;
av_assert2((VAR_4&3) != 2);
... | [
"void FUNC_0(swri_noise_shaping)(SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count){",
"int VAR_0, VAR_1, VAR_2, VAR_3;",
"int VAR_4 = s->dither.ns_taps;",
"float VAR_5 = s->dither.ns_scale;",
"float VAR_6 = s->dither.ns_scale_1;",
"av_assert2((VAR_4&3) != 2);",
... | [
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
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41,
43,
45
],
[
47
... |
4,067 | static int64_t expr_unary(Monitor *mon)
{
int64_t n;
char *p;
int ret;
switch(*pch) {
case '+':
next();
n = expr_unary(mon);
break;
case '-':
next();
n = -expr_unary(mon);
break;
case '~':
next();
n = ~expr_una... | true | qemu | 09b9418c6d085a0728372aa760ebd10128a020b1 | static int64_t expr_unary(Monitor *mon)
{
int64_t n;
char *p;
int ret;
switch(*pch) {
case '+':
next();
n = expr_unary(mon);
break;
case '-':
next();
n = -expr_unary(mon);
break;
case '~':
next();
n = ~expr_una... | {
"code": [
" if (ret == -1)",
" else if (ret == -2)",
" expr_error(mon, \"no cpu defined\");"
],
"line_no": [
113,
117,
119
]
} | static int64_t FUNC_0(Monitor *mon)
{
int64_t n;
char *VAR_0;
int VAR_1;
switch(*pch) {
case '+':
next();
n = FUNC_0(mon);
break;
case '-':
next();
n = -FUNC_0(mon);
break;
case '~':
next();
n = ~FUNC_0(mon);
... | [
"static int64_t FUNC_0(Monitor *mon)\n{",
"int64_t n;",
"char *VAR_0;",
"int VAR_1;",
"switch(*pch) {",
"case '+':\nnext();",
"n = FUNC_0(mon);",
"break;",
"case '-':\nnext();",
"n = -FUNC_0(mon);",
"break;",
"case '~':\nnext();",
"n = ~FUNC_0(mon);",
"break;",
"case '(':\nnext();",
"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,
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,
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
... |
4,068 | static av_cold void uninit(AVFilterContext *ctx)
{
DynamicAudioNormalizerContext *s = ctx->priv;
int c;
av_freep(&s->prev_amplification_factor);
av_freep(&s->dc_correction_value);
av_freep(&s->compress_threshold);
av_freep(&s->fade_factors[0]);
av_freep(&s->fade_factors[1]);
... | true | FFmpeg | 70df51112ccc8d281cdb96141f20b3fd8a5b11f8 | static av_cold void uninit(AVFilterContext *ctx)
{
DynamicAudioNormalizerContext *s = ctx->priv;
int c;
av_freep(&s->prev_amplification_factor);
av_freep(&s->dc_correction_value);
av_freep(&s->compress_threshold);
av_freep(&s->fade_factors[0]);
av_freep(&s->fade_factors[1]);
... | {
"code": [
" cqueue_free(s->gain_history_original[c]);",
" cqueue_free(s->gain_history_minimum[c]);",
" cqueue_free(s->gain_history_smoothed[c]);"
],
"line_no": [
25,
27,
29
]
} | static av_cold void FUNC_0(AVFilterContext *ctx)
{
DynamicAudioNormalizerContext *s = ctx->priv;
int VAR_0;
av_freep(&s->prev_amplification_factor);
av_freep(&s->dc_correction_value);
av_freep(&s->compress_threshold);
av_freep(&s->fade_factors[0]);
av_freep(&s->fade_factors[1]);
... | [
"static av_cold void FUNC_0(AVFilterContext *ctx)\n{",
"DynamicAudioNormalizerContext *s = ctx->priv;",
"int VAR_0;",
"av_freep(&s->prev_amplification_factor);",
"av_freep(&s->dc_correction_value);",
"av_freep(&s->compress_threshold);",
"av_freep(&s->fade_factors[0]);",
"av_freep(&s->fade_factors[1]);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
]
] |
4,069 | static int RENAME(dct_quantize)(MpegEncContext *s,
int16_t *block, int n,
int qscale, int *overflow)
{
x86_reg last_non_zero_p1;
int level=0, q; //=0 is because gcc says uninitialized ...
const uint16_t *qmat, *bias;
LOCAL_ALIGNED_16(int16_t... | true | FFmpeg | c25d2cd20b7643ea2c864dea9f25eef322cf3fb2 | static int RENAME(dct_quantize)(MpegEncContext *s,
int16_t *block, int n,
int qscale, int *overflow)
{
x86_reg last_non_zero_p1;
int level=0, q;
const uint16_t *qmat, *bias;
LOCAL_ALIGNED_16(int16_t, temp_block, [64]);
av_assert2((7&... | {
"code": [
" \"packuswb \"MM\"4, \"MM\"4 \\n\\t\""
],
"line_no": [
247
]
} | static int FUNC_0(dct_quantize)(MpegEncContext *s,
int16_t *block, int n,
int qscale, int *overflow)
{
x86_reg last_non_zero_p1;
int VAR_0=0, VAR_1;
const uint16_t *VAR_2, *bias;
LOCAL_ALIGNED_16(int16_t, temp_block, [64]);
av_assert... | [
"static int FUNC_0(dct_quantize)(MpegEncContext *s,\nint16_t *block, int n,\nint qscale, int *overflow)\n{",
"x86_reg last_non_zero_p1;",
"int VAR_0=0, VAR_1;",
"const uint16_t *VAR_2, *bias;",
"LOCAL_ALIGNED_16(int16_t, temp_block, [64]);",
"av_assert2((7&(int)(&temp_block[0])) == 0);",
"RENAMEl(ff_fdc... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
25
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[... |
4,073 | static int mxf_read_sequence(void *arg, AVIOContext *pb, int tag, int size, UID uid)
{
MXFSequence *sequence = arg;
switch(tag) {
case 0x0202:
sequence->duration = avio_rb64(pb);
break;
case 0x0201:
avio_read(pb, sequence->data_definition_ul, 16);
break;
cas... | true | FFmpeg | fd34dbea58e097609ff09cf7dcc59f74930195d3 | static int mxf_read_sequence(void *arg, AVIOContext *pb, int tag, int size, UID uid)
{
MXFSequence *sequence = arg;
switch(tag) {
case 0x0202:
sequence->duration = avio_rb64(pb);
break;
case 0x0201:
avio_read(pb, sequence->data_definition_ul, 16);
break;
cas... | {
"code": [
"static int mxf_read_sequence(void *arg, AVIOContext *pb, int tag, int size, UID uid)"
],
"line_no": [
1
]
} | static int FUNC_0(void *VAR_0, AVIOContext *VAR_1, int VAR_2, int VAR_3, UID VAR_4)
{
MXFSequence *sequence = VAR_0;
switch(VAR_2) {
case 0x0202:
sequence->duration = avio_rb64(VAR_1);
break;
case 0x0201:
avio_read(VAR_1, sequence->data_definition_ul, 16);
break;... | [
"static int FUNC_0(void *VAR_0, AVIOContext *VAR_1, int VAR_2, int VAR_3, UID VAR_4)\n{",
"MXFSequence *sequence = VAR_0;",
"switch(VAR_2) {",
"case 0x0202:\nsequence->duration = avio_rb64(VAR_1);",
"break;",
"case 0x0201:\navio_read(VAR_1, sequence->data_definition_ul, 16);",
"break;",
"case 0x1001:\... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13
],
[
15,
17
],
[
19
],
[
21,
23
],
[
25,
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
4,074 | World *world_alloc(Rocker *r, size_t sizeof_private,
enum rocker_world_type type, WorldOps *ops)
{
World *w = g_malloc0(sizeof(World) + sizeof_private);
if (w) {
w->r = r;
w->type = type;
w->ops = ops;
if (w->ops->init) {
w->ops->init(w);... | true | qemu | 107e4b352cc309f9bd7588ef1a44549200620078 | World *world_alloc(Rocker *r, size_t sizeof_private,
enum rocker_world_type type, WorldOps *ops)
{
World *w = g_malloc0(sizeof(World) + sizeof_private);
if (w) {
w->r = r;
w->type = type;
w->ops = ops;
if (w->ops->init) {
w->ops->init(w);... | {
"code": [
" if (w) {",
" w->r = r;",
" w->type = type;",
" w->ops = ops;",
" if (w->ops->init) {",
" w->ops->init(w);"
],
"line_no": [
11,
13,
15,
17,
19,
21
]
} | World *FUNC_0(Rocker *r, size_t sizeof_private,
enum rocker_world_type type, WorldOps *ops)
{
World *w = g_malloc0(sizeof(World) + sizeof_private);
if (w) {
w->r = r;
w->type = type;
w->ops = ops;
if (w->ops->init) {
w->ops->init(w);
... | [
"World *FUNC_0(Rocker *r, size_t sizeof_private,\nenum rocker_world_type type, WorldOps *ops)\n{",
"World *w = g_malloc0(sizeof(World) + sizeof_private);",
"if (w) {",
"w->r = r;",
"w->type = type;",
"w->ops = ops;",
"if (w->ops->init) {",
"w->ops->init(w);",
"}",
"}",
"return w;",
"}"
] | [
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
]
] |
4,075 | void ff_compute_frame_duration(int *pnum, int *pden, AVStream *st,
AVCodecParserContext *pc, AVPacket *pkt)
{
int frame_size;
*pnum = 0;
*pden = 0;
switch(st->codec->codec_type) {
case AVMEDIA_TYPE_VIDEO:
if (st->avg_frame_rate.num) {
*pn... | true | FFmpeg | 7709ce029a7bc101b9ac1ceee607cda10dcb89dc | void ff_compute_frame_duration(int *pnum, int *pden, AVStream *st,
AVCodecParserContext *pc, AVPacket *pkt)
{
int frame_size;
*pnum = 0;
*pden = 0;
switch(st->codec->codec_type) {
case AVMEDIA_TYPE_VIDEO:
if (st->avg_frame_rate.num) {
*pn... | {
"code": [
" *pnum = (*pnum) * (1 + pc->repeat_pict);"
],
"line_no": [
39
]
} | void FUNC_0(int *VAR_0, int *VAR_1, AVStream *VAR_2,
AVCodecParserContext *VAR_3, AVPacket *VAR_4)
{
int VAR_5;
*VAR_0 = 0;
*VAR_1 = 0;
switch(VAR_2->codec->codec_type) {
case AVMEDIA_TYPE_VIDEO:
if (VAR_2->avg_frame_rate.num) {
*VAR_0 = ... | [
"void FUNC_0(int *VAR_0, int *VAR_1, AVStream *VAR_2,\nAVCodecParserContext *VAR_3, AVPacket *VAR_4)\n{",
"int VAR_5;",
"*VAR_0 = 0;",
"*VAR_1 = 0;",
"switch(VAR_2->codec->codec_type) {",
"case AVMEDIA_TYPE_VIDEO:\nif (VAR_2->avg_frame_rate.num) {",
"*VAR_0 = VAR_2->avg_frame_rate.den;",
"*VAR_1 = VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
47
],
[
49... |
4,077 | static uint64_t serial_ioport_read(void *opaque, hwaddr addr, unsigned size)
{
SerialState *s = opaque;
uint32_t ret;
addr &= 7;
switch(addr) {
default:
case 0:
if (s->lcr & UART_LCR_DLAB) {
ret = s->divider & 0xff;
} else {
if(s->fcr & UART_F... | true | qemu | b165b0d8e62bb65a02d7670d75ebb77a9280bde1 | static uint64_t serial_ioport_read(void *opaque, hwaddr addr, unsigned size)
{
SerialState *s = opaque;
uint32_t ret;
addr &= 7;
switch(addr) {
default:
case 0:
if (s->lcr & UART_LCR_DLAB) {
ret = s->divider & 0xff;
} else {
if(s->fcr & UART_F... | {
"code": [
" ret = fifo8_is_full(&s->recv_fifo) ?"
],
"line_no": [
27
]
} | static uint64_t FUNC_0(void *opaque, hwaddr addr, unsigned size)
{
SerialState *s = opaque;
uint32_t ret;
addr &= 7;
switch(addr) {
default:
case 0:
if (s->lcr & UART_LCR_DLAB) {
ret = s->divider & 0xff;
} else {
if(s->fcr & UART_FCR_FE) {
... | [
"static uint64_t FUNC_0(void *opaque, hwaddr addr, unsigned size)\n{",
"SerialState *s = opaque;",
"uint32_t ret;",
"addr &= 7;",
"switch(addr) {",
"default:\ncase 0:\nif (s->lcr & UART_LCR_DLAB) {",
"ret = s->divider & 0xff;",
"} else {",
"if(s->fcr & UART_FCR_FE) {",
"ret = fifo8_is_full(&s->rec... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15,
17,
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
... |
4,078 | create_iovec(BlockBackend *blk, QEMUIOVector *qiov, char **argv, int nr_iov,
int pattern)
{
size_t *sizes = g_new0(size_t, nr_iov);
size_t count = 0;
void *buf = NULL;
void *p;
int i;
for (i = 0; i < nr_iov; i++) {
char *arg = argv[i];
int64_t len;
... | true | qemu | 3026c4688ca80d9c5cc1606368c4a1009a6f507d | create_iovec(BlockBackend *blk, QEMUIOVector *qiov, char **argv, int nr_iov,
int pattern)
{
size_t *sizes = g_new0(size_t, nr_iov);
size_t count = 0;
void *buf = NULL;
void *p;
int i;
for (i = 0; i < nr_iov; i++) {
char *arg = argv[i];
int64_t len;
... | {
"code": [
" if (len > SIZE_MAX) {",
" printf(\"Argument '%s' exceeds maximum size %llu\\n\", arg,",
" (unsigned long long)SIZE_MAX);"
],
"line_no": [
39,
41,
43
]
} | FUNC_0(BlockBackend *VAR_0, QEMUIOVector *VAR_1, char **VAR_2, int VAR_3,
int VAR_4)
{
size_t *sizes = g_new0(size_t, VAR_3);
size_t count = 0;
void *VAR_5 = NULL;
void *VAR_6;
int VAR_7;
for (VAR_7 = 0; VAR_7 < VAR_3; VAR_7++) {
char *VAR_8 = VAR_2[VAR_7];
... | [
"FUNC_0(BlockBackend *VAR_0, QEMUIOVector *VAR_1, char **VAR_2, int VAR_3,\nint VAR_4)\n{",
"size_t *sizes = g_new0(size_t, VAR_3);",
"size_t count = 0;",
"void *VAR_5 = NULL;",
"void *VAR_6;",
"int VAR_7;",
"for (VAR_7 = 0; VAR_7 < VAR_3; VAR_7++) {",
"char *VAR_8 = VAR_2[VAR_7];",
"int64_t len;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
51
... |
4,079 | static bool main_loop_should_exit(void)
{
RunState r;
if (qemu_debug_requested()) {
vm_stop(RUN_STATE_DEBUG);
}
if (qemu_suspend_requested()) {
qemu_system_suspend();
}
if (qemu_shutdown_requested()) {
qemu_kill_report();
monitor_protocol_event(QEVENT_S... | true | qemu | ede085b3fedfde36cb566968c4efcfbad4845af1 | static bool main_loop_should_exit(void)
{
RunState r;
if (qemu_debug_requested()) {
vm_stop(RUN_STATE_DEBUG);
}
if (qemu_suspend_requested()) {
qemu_system_suspend();
}
if (qemu_shutdown_requested()) {
qemu_kill_report();
monitor_protocol_event(QEVENT_S... | {
"code": [
" if (runstate_check(RUN_STATE_INTERNAL_ERROR) ||",
" runstate_check(RUN_STATE_SHUTDOWN)) {"
],
"line_no": [
47,
49
]
} | static bool FUNC_0(void)
{
RunState r;
if (qemu_debug_requested()) {
vm_stop(RUN_STATE_DEBUG);
}
if (qemu_suspend_requested()) {
qemu_system_suspend();
}
if (qemu_shutdown_requested()) {
qemu_kill_report();
monitor_protocol_event(QEVENT_SHUTDOWN, NULL);... | [
"static bool FUNC_0(void)\n{",
"RunState r;",
"if (qemu_debug_requested()) {",
"vm_stop(RUN_STATE_DEBUG);",
"}",
"if (qemu_suspend_requested()) {",
"qemu_system_suspend();",
"}",
"if (qemu_shutdown_requested()) {",
"qemu_kill_report();",
"monitor_protocol_event(QEVENT_SHUTDOWN, NULL);",
"if (n... | [
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
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
... |
4,082 | int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
{
AVStream *st;
MOVStreamContext *sc;
int j, pseudo_stream_id;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams-1];
sc = st->priv_data;
for (pseudo_stream_id=0; pseudo_str... | true | FFmpeg | 5f95c130a020ec8f6eb7ade8808f59dac5834410 | int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
{
AVStream *st;
MOVStreamContext *sc;
int j, pseudo_stream_id;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams-1];
sc = st->priv_data;
for (pseudo_stream_id=0; pseudo_str... | {
"code": [],
"line_no": []
} | int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1, int VAR_2)
{
AVStream *st;
MOVStreamContext *sc;
int VAR_3, VAR_4;
if (VAR_0->fc->nb_streams < 1)
return 0;
st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];
sc = st->priv_data;
for (VAR_4=0; VAR_4<VAR_2; VAR_4++) {
... | [
"int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1, int VAR_2)\n{",
"AVStream *st;",
"MOVStreamContext *sc;",
"int VAR_3, VAR_4;",
"if (VAR_0->fc->nb_streams < 1)\nreturn 0;",
"st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];",
"sc = st->priv_data;",
"for (VAR_4=0; VAR_4<VAR_2; VAR_4++) {",
"enum Co... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
52
],
[... |
4,083 | static void test_tco_max_timeout(void)
{
TestData d;
const uint16_t ticks = 0xffff;
uint32_t val;
int ret;
d.args = NULL;
d.noreboot = true;
test_init(&d);
stop_tco(&d);
clear_tco_status(&d);
reset_on_second_timeout(false);
set_tco_timeout(&d, ticks);
loa... | true | qemu | b4ba67d9a702507793c2724e56f98e9b0f7be02b | static void test_tco_max_timeout(void)
{
TestData d;
const uint16_t ticks = 0xffff;
uint32_t val;
int ret;
d.args = NULL;
d.noreboot = true;
test_init(&d);
stop_tco(&d);
clear_tco_status(&d);
reset_on_second_timeout(false);
set_tco_timeout(&d, ticks);
loa... | {
"code": [
" val = qpci_io_readw(d.dev, d.tco_io_base + TCO1_STS);",
" val = qpci_io_readw(d.dev, d.tco_io_base + TCO1_STS);",
" val = qpci_io_readw(d.dev, d.tco_io_base + TCO1_STS);",
" val = qpci_io_readw(d.dev, d.tco_io_base + TCO_RLD);",
" val = qpci_io_readw(d.dev, d.tco_io_ba... | static void FUNC_0(void)
{
TestData d;
const uint16_t VAR_0 = 0xffff;
uint32_t val;
int VAR_1;
d.args = NULL;
d.noreboot = true;
test_init(&d);
stop_tco(&d);
clear_tco_status(&d);
reset_on_second_timeout(false);
set_tco_timeout(&d, VAR_0);
load_tco(&d);
... | [
"static void FUNC_0(void)\n{",
"TestData d;",
"const uint16_t VAR_0 = 0xffff;",
"uint32_t val;",
"int VAR_1;",
"d.args = NULL;",
"d.noreboot = true;",
"test_init(&d);",
"stop_tco(&d);",
"clear_tco_status(&d);",
"reset_on_second_timeout(false);",
"set_tco_timeout(&d, VAR_0);",
"load_tco(&d);"... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
4,084 | YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48be, PIX_FMT_RGB48BE)
YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48le, PIX_FMT_RGB48LE)
YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48be, PIX_FMT_BGR48BE)
YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48le, PIX_FMT_BGR48LE)
/*
* Write out 2 RGB pixels in the target pixel format. This function takes ... | true | FFmpeg | 5ab6f0fe5abf8c5fccede33f7b68c9f3a3864e3a | YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48be, PIX_FMT_RGB48BE)
YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48le, PIX_FMT_RGB48LE)
YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48be, PIX_FMT_BGR48BE)
YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48le, PIX_FMT_BGR48LE)
static av_always_inline void
yuv2rgb_write(uint8_t *_dest, in... | {
"code": [
"yuv2rgb_write(uint8_t *_dest, int i, unsigned Y1, unsigned Y2,"
],
"line_no": [
29
]
} | YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48be, PIX_FMT_RGB48BE)
YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48le, PIX_FMT_RGB48LE)
YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48be, PIX_FMT_BGR48BE)
YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48le, PIX_FMT_BGR48LE)
static av_always_inline void
yuv2rgb_write(uint8_t *_dest, in... | [
"YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48be, PIX_FMT_RGB48BE)\nYUV2PACKED16WRAPPER(yuv2, rgb48, rgb48le, PIX_FMT_RGB48LE)\nYUV2PACKED16WRAPPER(yuv2, rgb48, bgr48be, PIX_FMT_BGR48BE)\nYUV2PACKED16WRAPPER(yuv2, rgb48, bgr48le, PIX_FMT_BGR48LE)\nstatic av_always_inline void\nyuv2rgb_write(uint8_t *_dest, int i, unsigned... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
27,
29,
31,
33,
35,
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53,
55
],
[
59
],
[
61
],
[
63,
65
],
[
67
],
[
71
],
[
73
],
[
75
],
... |
4,085 | int vhost_set_vring_enable(NetClientState *nc, int enable)
{
VHostNetState *net = get_vhost_net(nc);
const VhostOps *vhost_ops;
nc->vring_enable = enable;
if (!net) {
return 0;
}
vhost_ops = net->dev.vhost_ops;
if (vhost_ops->vhost_set_vring_enable) {
return v... | true | qemu | bb12e761e8e7b5c3c3d77bd08de9f007727a941e | int vhost_set_vring_enable(NetClientState *nc, int enable)
{
VHostNetState *net = get_vhost_net(nc);
const VhostOps *vhost_ops;
nc->vring_enable = enable;
if (!net) {
return 0;
}
vhost_ops = net->dev.vhost_ops;
if (vhost_ops->vhost_set_vring_enable) {
return v... | {
"code": [
" const VhostOps *vhost_ops;",
" if (!net) {",
" return 0;",
" vhost_ops = net->dev.vhost_ops;"
],
"line_no": [
7,
15,
17,
23
]
} | int FUNC_0(NetClientState *VAR_0, int VAR_1)
{
VHostNetState *net = get_vhost_net(VAR_0);
const VhostOps *VAR_2;
VAR_0->vring_enable = VAR_1;
if (!net) {
return 0;
}
VAR_2 = net->dev.VAR_2;
if (VAR_2->FUNC_0) {
return VAR_2->FUNC_0(&net->dev, VAR_1);
}
... | [
"int FUNC_0(NetClientState *VAR_0, int VAR_1)\n{",
"VHostNetState *net = get_vhost_net(VAR_0);",
"const VhostOps *VAR_2;",
"VAR_0->vring_enable = VAR_1;",
"if (!net) {",
"return 0;",
"}",
"VAR_2 = net->dev.VAR_2;",
"if (VAR_2->FUNC_0) {",
"return VAR_2->FUNC_0(&net->dev, VAR_1);",
"}",
"return... | [
0,
0,
1,
0,
1,
1,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
]
] |
4,086 | static int get_channel_idx(char **map, int *ch, char delim, int max_ch)
{
char *next = split(*map, delim);
int len;
int n = 0;
if (!next && delim == '-')
len = strlen(*map);
sscanf(*map, "%d%n", ch, &n);
if (n != len)
if (*ch < 0 || *ch > max_ch)
*map = next;
retu... | true | FFmpeg | 579795b2049bc8b0f291b302e7ab24f9561eaf24 | static int get_channel_idx(char **map, int *ch, char delim, int max_ch)
{
char *next = split(*map, delim);
int len;
int n = 0;
if (!next && delim == '-')
len = strlen(*map);
sscanf(*map, "%d%n", ch, &n);
if (n != len)
if (*ch < 0 || *ch > max_ch)
*map = next;
retu... | {
"code": [],
"line_no": []
} | static int FUNC_0(char **VAR_0, int *VAR_1, char VAR_2, int VAR_3)
{
char *VAR_4 = split(*VAR_0, VAR_2);
int VAR_5;
int VAR_6 = 0;
if (!VAR_4 && VAR_2 == '-')
VAR_5 = strlen(*VAR_0);
sscanf(*VAR_0, "%d%VAR_6", VAR_1, &VAR_6);
if (VAR_6 != VAR_5)
if (*VAR_1 < 0 || *VAR_1 > VA... | [
"static int FUNC_0(char **VAR_0, int *VAR_1, char VAR_2, int VAR_3)\n{",
"char *VAR_4 = split(*VAR_0, VAR_2);",
"int VAR_5;",
"int VAR_6 = 0;",
"if (!VAR_4 && VAR_2 == '-')\nVAR_5 = strlen(*VAR_0);",
"sscanf(*VAR_0, \"%d%VAR_6\", VAR_1, &VAR_6);",
"if (VAR_6 != VAR_5)\nif (*VAR_1 < 0 || *VAR_1 > VAR_3)\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
16
],
[
18
],
[
20,
23,
26
],
[
28
],
[
30
]
] |
4,087 | static void piix3_xen_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
dc->desc = "ISA bridge";
dc->vmsd = &vmstate_piix3;
dc->no_user = 1;
k->no_hotplug = 1;
k->init = piix3... | true | qemu | efec3dd631d94160288392721a5f9c39e50fb2bc | static void piix3_xen_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
dc->desc = "ISA bridge";
dc->vmsd = &vmstate_piix3;
dc->no_user = 1;
k->no_hotplug = 1;
k->init = piix3... | {
"code": [
" dc->no_user = 1;"
],
"line_no": [
15
]
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
PCIDeviceClass *k = PCI_DEVICE_CLASS(VAR_0);
dc->desc = "ISA bridge";
dc->vmsd = &vmstate_piix3;
dc->no_user = 1;
k->no_hotplug = 1;
k->init = piix3_initfn;
... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"PCIDeviceClass *k = PCI_DEVICE_CLASS(VAR_0);",
"dc->desc = \"ISA bridge\";",
"dc->vmsd = &vmstate_piix3;",
"dc->no_user = 1;",
"k->no_hotplug = 1;",
"k->init = piix3_initfn;... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
]
] |
4,088 | qio_channel_websock_source_check(GSource *source)
{
QIOChannelWebsockSource *wsource = (QIOChannelWebsockSource *)source;
GIOCondition cond = 0;
if (wsource->wioc->rawinput.offset) {
cond |= G_IO_IN;
}
if (wsource->wioc->rawoutput.offset < QIO_CHANNEL_WEBSOCK_MAX_BUFFER) {
... | true | qemu | eefa3d8ef649f9055611361e2201cca49f8c3433 | qio_channel_websock_source_check(GSource *source)
{
QIOChannelWebsockSource *wsource = (QIOChannelWebsockSource *)source;
GIOCondition cond = 0;
if (wsource->wioc->rawinput.offset) {
cond |= G_IO_IN;
}
if (wsource->wioc->rawoutput.offset < QIO_CHANNEL_WEBSOCK_MAX_BUFFER) {
... | {
"code": [
" if (wsource->wioc->rawinput.offset) {",
"qio_channel_websock_source_check(GSource *source)",
" QIOChannelWebsockSource *wsource = (QIOChannelWebsockSource *)source;",
" GIOCondition cond = 0;",
" if (wsource->wioc->rawinput.offset) {",
" cond |= G_IO_IN;",
... | FUNC_0(GSource *VAR_0)
{
QIOChannelWebsockSource *wsource = (QIOChannelWebsockSource *)VAR_0;
GIOCondition cond = 0;
if (wsource->wioc->rawinput.offset) {
cond |= G_IO_IN;
}
if (wsource->wioc->rawoutput.offset < QIO_CHANNEL_WEBSOCK_MAX_BUFFER) {
cond |= G_IO_OUT;
}
... | [
"FUNC_0(GSource *VAR_0)\n{",
"QIOChannelWebsockSource *wsource = (QIOChannelWebsockSource *)VAR_0;",
"GIOCondition cond = 0;",
"if (wsource->wioc->rawinput.offset) {",
"cond |= G_IO_IN;",
"}",
"if (wsource->wioc->rawoutput.offset < QIO_CHANNEL_WEBSOCK_MAX_BUFFER) {",
"cond |= G_IO_OUT;",
"}",
"ret... | [
1,
1,
1,
1,
1,
0,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
]
] |
4,089 | static int sad8_altivec(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
{
int i;
int s;
const vector unsigned int zero = (const vector unsigned int)vec_splat_u32(0);
const vector unsigned char permclear = (vector unsigned char){255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0};
vec... | true | FFmpeg | 98fdfa99704f1cfef3d3a26c580b92749b6b64cb | static int sad8_altivec(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
{
int i;
int s;
const vector unsigned int zero = (const vector unsigned int)vec_splat_u32(0);
const vector unsigned char permclear = (vector unsigned char){255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0};
vec... | {
"code": [
" vector unsigned char pix1l = vec_ld( 0, pix1);",
" vector unsigned char pix1r = vec_ld(15, pix1);",
" vector unsigned char pix2l = vec_ld( 0, pix2);",
" vector unsigned char pix2r = vec_ld(15, pix2);",
" vector unsigned char pix1l = vec_ld( 0, pix1)... | static int FUNC_0(void *VAR_0, uint8_t *VAR_1, uint8_t *VAR_2, int VAR_3, int VAR_4)
{
int VAR_5;
int VAR_6;
const vector unsigned int VAR_7 = (const vector unsigned int)vec_splat_u32(0);
const vector unsigned char VAR_8 = (vector unsigned char){255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0};
... | [
"static int FUNC_0(void *VAR_0, uint8_t *VAR_1, uint8_t *VAR_2, int VAR_3, int VAR_4)\n{",
"int VAR_5;",
"int VAR_6;",
"const vector unsigned int VAR_7 = (const vector unsigned int)vec_splat_u32(0);",
"const vector unsigned char VAR_8 = (vector unsigned char){255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0}... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
53
],
[
55
... |
4,092 | static void move_audio(vorbis_enc_context *venc, float **audio, int *samples, int sf_size)
{
AVFrame *cur = NULL;
int frame_size = 1 << (venc->log2_blocksize[1] - 1);
int subframes = frame_size / sf_size;
for (int sf = 0; sf < subframes; sf++) {
cur = ff_bufqueue_get(&venc->bufqueue);
... | true | FFmpeg | 34c52005605d68f7cd1957b169b6732c7d2447d9 | static void move_audio(vorbis_enc_context *venc, float **audio, int *samples, int sf_size)
{
AVFrame *cur = NULL;
int frame_size = 1 << (venc->log2_blocksize[1] - 1);
int subframes = frame_size / sf_size;
for (int sf = 0; sf < subframes; sf++) {
cur = ff_bufqueue_get(&venc->bufqueue);
... | {
"code": [
"static void move_audio(vorbis_enc_context *venc, float **audio, int *samples, int sf_size)",
" memcpy(&audio[ch][sf*sf_size], input, len);"
],
"line_no": [
1,
27
]
} | static void FUNC_0(vorbis_enc_context *VAR_0, float **VAR_1, int *VAR_2, int VAR_3)
{
AVFrame *cur = NULL;
int VAR_4 = 1 << (VAR_0->log2_blocksize[1] - 1);
int VAR_5 = VAR_4 / VAR_3;
for (int VAR_6 = 0; VAR_6 < VAR_5; VAR_6++) {
cur = ff_bufqueue_get(&VAR_0->bufqueue);
*VAR_2 +=... | [
"static void FUNC_0(vorbis_enc_context *VAR_0, float **VAR_1, int *VAR_2, int VAR_3)\n{",
"AVFrame *cur = NULL;",
"int VAR_4 = 1 << (VAR_0->log2_blocksize[1] - 1);",
"int VAR_5 = VAR_4 / VAR_3;",
"for (int VAR_6 = 0; VAR_6 < VAR_5; VAR_6++) {",
"cur = ff_bufqueue_get(&VAR_0->bufqueue);",
"*VAR_2 += cur-... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
4,094 | static void svq3_add_idct_c(uint8_t *dst, int16_t *block,
int stride, int qp, int dc)
{
const int qmul = svq3_dequant_coeff[qp];
int i;
if (dc) {
dc = 13 * 13 * (dc == 1 ? 1538U* block[0]
: qmul * (block[0] >> 3) / 2);
... | true | FFmpeg | 2c933c51687db958d8045d25ed87848342e869f6 | static void svq3_add_idct_c(uint8_t *dst, int16_t *block,
int stride, int qp, int dc)
{
const int qmul = svq3_dequant_coeff[qp];
int i;
if (dc) {
dc = 13 * 13 * (dc == 1 ? 1538U* block[0]
: qmul * (block[0] >> 3) / 2);
... | {
"code": [
" const int rr = (dc + 0x80000);"
],
"line_no": [
59
]
} | static void FUNC_0(uint8_t *VAR_0, int16_t *VAR_1,
int VAR_2, int VAR_3, int VAR_4)
{
const int VAR_5 = svq3_dequant_coeff[VAR_3];
int VAR_6;
if (VAR_4) {
VAR_4 = 13 * 13 * (VAR_4 == 1 ? 1538U* VAR_1[0]
: VAR_5 * (VAR_1... | [
"static void FUNC_0(uint8_t *VAR_0, int16_t *VAR_1,\nint VAR_2, int VAR_3, int VAR_4)\n{",
"const int VAR_5 = svq3_dequant_coeff[VAR_3];",
"int VAR_6;",
"if (VAR_4) {",
"VAR_4 = 13 * 13 * (VAR_4 == 1 ? 1538U* VAR_1[0]\n: VAR_5 * (VAR_1[0] >> 3) / 2);",
"VAR_1[0] = 0;",
"}",
"for (VAR_6 = 0; VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
... |
4,096 | static char *vnc_socket_local_addr(const char *format, int fd) {
struct sockaddr_storage sa;
socklen_t salen;
salen = sizeof(sa);
if (getsockname(fd, (struct sockaddr*)&sa, &salen) < 0)
return NULL;
return addr_to_string(format, &sa, salen);
}
| true | qemu | 2f9606b3736c3be4dbd606c46525c7b770ced119 | static char *vnc_socket_local_addr(const char *format, int fd) {
struct sockaddr_storage sa;
socklen_t salen;
salen = sizeof(sa);
if (getsockname(fd, (struct sockaddr*)&sa, &salen) < 0)
return NULL;
return addr_to_string(format, &sa, salen);
}
| {
"code": [
"static char *vnc_socket_local_addr(const char *format, int fd) {"
],
"line_no": [
1
]
} | static char *FUNC_0(const char *VAR_0, int VAR_1) {
struct sockaddr_storage VAR_2;
socklen_t salen;
salen = sizeof(VAR_2);
if (getsockname(VAR_1, (struct sockaddr*)&VAR_2, &salen) < 0)
return NULL;
return addr_to_string(VAR_0, &VAR_2, salen);
}
| [
"static char *FUNC_0(const char *VAR_0, int VAR_1) {",
"struct sockaddr_storage VAR_2;",
"socklen_t salen;",
"salen = sizeof(VAR_2);",
"if (getsockname(VAR_1, (struct sockaddr*)&VAR_2, &salen) < 0)\nreturn NULL;",
"return addr_to_string(VAR_0, &VAR_2, salen);",
"}"
] | [
1,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
11,
13
],
[
17
],
[
19
]
] |
4,097 | static int dca_subframe_header(DCAContext *s, int base_channel, int block_index)
{
/* Primary audio coding side information */
int j, k;
if (get_bits_left(&s->gb) < 0)
return AVERROR_INVALIDDATA;
if (!base_channel) {
s->subsubframes[s->current_subframe] = get_bits(&s->gb, 2... | true | FFmpeg | 8e77c3846e91b1af9df4084736257d9899156eef | static int dca_subframe_header(DCAContext *s, int base_channel, int block_index)
{
int j, k;
if (get_bits_left(&s->gb) < 0)
return AVERROR_INVALIDDATA;
if (!base_channel) {
s->subsubframes[s->current_subframe] = get_bits(&s->gb, 2) + 1;
s->partial_samples[s->curre... | {
"code": [
" for (j = base_channel; j < s->prim_channels; j++) {"
],
"line_no": [
275
]
} | static int FUNC_0(DCAContext *VAR_0, int VAR_1, int VAR_2)
{
int VAR_3, VAR_4;
if (get_bits_left(&VAR_0->gb) < 0)
return AVERROR_INVALIDDATA;
if (!VAR_1) {
VAR_0->subsubframes[VAR_0->current_subframe] = get_bits(&VAR_0->gb, 2) + 1;
VAR_0->partial_samples[VAR_0->cu... | [
"static int FUNC_0(DCAContext *VAR_0, int VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4;",
"if (get_bits_left(&VAR_0->gb) < 0)\nreturn AVERROR_INVALIDDATA;",
"if (!VAR_1) {",
"VAR_0->subsubframes[VAR_0->current_subframe] = get_bits(&VAR_0->gb, 2) + 1;",
"VAR_0->partial_samples[VAR_0->current_subframe] = get... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
59
],
... |
4,098 | static void gen_neon_dup_u8(TCGv var, int shift)
{
TCGv tmp = new_tmp();
if (shift)
tcg_gen_shri_i32(var, var, shift);
tcg_gen_ext8u_i32(var, var);
tcg_gen_shli_i32(tmp, var, 8);
tcg_gen_or_i32(var, var, tmp);
tcg_gen_shli_i32(tmp, var, 16);
tcg_gen_or_i32(var, var, tmp);
... | true | qemu | 7d1b0095bff7157e856d1d0e6c4295641ced2752 | static void gen_neon_dup_u8(TCGv var, int shift)
{
TCGv tmp = new_tmp();
if (shift)
tcg_gen_shri_i32(var, var, shift);
tcg_gen_ext8u_i32(var, var);
tcg_gen_shli_i32(tmp, var, 8);
tcg_gen_or_i32(var, var, tmp);
tcg_gen_shli_i32(tmp, var, 16);
tcg_gen_or_i32(var, var, tmp);
... | {
"code": [
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" dead_tmp(tmp);",
" TCGv tmp = new_tmp();",
" dead_tmp(tmp);",
" TCGv tmp = new_tmp();",
" dead_tmp(tmp);",
" TCGv tmp = new_tmp();",
" dead_tmp(tmp);",
... | static void FUNC_0(TCGv VAR_0, int VAR_1)
{
TCGv tmp = new_tmp();
if (VAR_1)
tcg_gen_shri_i32(VAR_0, VAR_0, VAR_1);
tcg_gen_ext8u_i32(VAR_0, VAR_0);
tcg_gen_shli_i32(tmp, VAR_0, 8);
tcg_gen_or_i32(VAR_0, VAR_0, tmp);
tcg_gen_shli_i32(tmp, VAR_0, 16);
tcg_gen_or_i32(VAR_0, VA... | [
"static void FUNC_0(TCGv VAR_0, int VAR_1)\n{",
"TCGv tmp = new_tmp();",
"if (VAR_1)\ntcg_gen_shri_i32(VAR_0, VAR_0, VAR_1);",
"tcg_gen_ext8u_i32(VAR_0, VAR_0);",
"tcg_gen_shli_i32(tmp, VAR_0, 8);",
"tcg_gen_or_i32(VAR_0, VAR_0, tmp);",
"tcg_gen_shli_i32(tmp, VAR_0, 16);",
"tcg_gen_or_i32(VAR_0, VAR_0... | [
0,
1,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
4,099 | static target_ulong helper_udiv_common(CPUSPARCState *env, target_ulong a,
target_ulong b, int cc)
{
SPARCCPU *cpu = sparc_env_get_cpu(env);
int overflow = 0;
uint64_t x0;
uint32_t x1;
x0 = (a & 0xffffffff) | ((int64_t) (env->y) << 32);
x1 = (b & ... | true | qemu | 6a5b69a959483c7404576a7dc54221ced41e6515 | static target_ulong helper_udiv_common(CPUSPARCState *env, target_ulong a,
target_ulong b, int cc)
{
SPARCCPU *cpu = sparc_env_get_cpu(env);
int overflow = 0;
uint64_t x0;
uint32_t x1;
x0 = (a & 0xffffffff) | ((int64_t) (env->y) << 32);
x1 = (b & ... | {
"code": [
" if (x0 > 0xffffffff) {",
" x0 = 0xffffffff;",
" x0 = x0 / x1;"
],
"line_no": [
35,
37,
33
]
} | static target_ulong FUNC_0(CPUSPARCState *env, target_ulong a,
target_ulong b, int cc)
{
SPARCCPU *cpu = sparc_env_get_cpu(env);
int VAR_0 = 0;
uint64_t x0;
uint32_t x1;
x0 = (a & 0xffffffff) | ((int64_t) (env->y) << 32);
x1 = (b & 0xffffffff);
... | [
"static target_ulong FUNC_0(CPUSPARCState *env, target_ulong a,\ntarget_ulong b, int cc)\n{",
"SPARCCPU *cpu = sparc_env_get_cpu(env);",
"int VAR_0 = 0;",
"uint64_t x0;",
"uint32_t x1;",
"x0 = (a & 0xffffffff) | ((int64_t) (env->y) << 32);",
"x1 = (b & 0xffffffff);",
"if (x1 == 0) {",
"cpu_restore_s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[... |
4,100 | static BlockStats *bdrv_query_stats(const BlockDriverState *bs,
bool query_backing)
{
BlockStats *s;
s = g_malloc0(sizeof(*s));
if (bdrv_get_device_name(bs)[0]) {
s->has_device = true;
s->device = g_strdup(bdrv_get_device_name(bs));
}
if (bdrv_get_... | true | qemu | 362e9299b34b3101aaa20f20363441c9f055fa5e | static BlockStats *bdrv_query_stats(const BlockDriverState *bs,
bool query_backing)
{
BlockStats *s;
s = g_malloc0(sizeof(*s));
if (bdrv_get_device_name(bs)[0]) {
s->has_device = true;
s->device = g_strdup(bdrv_get_device_name(bs));
}
if (bdrv_get_... | {
"code": [],
"line_no": []
} | static BlockStats *FUNC_0(const BlockDriverState *bs,
bool query_backing)
{
BlockStats *s;
s = g_malloc0(sizeof(*s));
if (bdrv_get_device_name(bs)[0]) {
s->has_device = true;
s->device = g_strdup(bdrv_get_device_name(bs));
}
if (bdrv_get_node_name(... | [
"static BlockStats *FUNC_0(const BlockDriverState *bs,\nbool query_backing)\n{",
"BlockStats *s;",
"s = g_malloc0(sizeof(*s));",
"if (bdrv_get_device_name(bs)[0]) {",
"s->has_device = true;",
"s->device = g_strdup(bdrv_get_device_name(bs));",
"}",
"if (bdrv_get_node_name(bs)[0]) {",
"s->has_node_nam... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
... |
4,101 | static uint64_t hb_regs_read(void *opaque, hwaddr offset,
unsigned size)
{
uint32_t *regs = opaque;
uint32_t value = regs[offset/4];
if ((offset == 0x100) || (offset == 0x108) || (offset == 0x10C)) {
value |= 0x30000000;
}
return value;
}
| false | qemu | c5c752af8cddad3e4e51acef40a46db998638144 | static uint64_t hb_regs_read(void *opaque, hwaddr offset,
unsigned size)
{
uint32_t *regs = opaque;
uint32_t value = regs[offset/4];
if ((offset == 0x100) || (offset == 0x108) || (offset == 0x10C)) {
value |= 0x30000000;
}
return value;
}
| {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, hwaddr offset,
unsigned size)
{
uint32_t *regs = opaque;
uint32_t value = regs[offset/4];
if ((offset == 0x100) || (offset == 0x108) || (offset == 0x10C)) {
value |= 0x30000000;
}
return value;
}
| [
"static uint64_t FUNC_0(void *opaque, hwaddr offset,\nunsigned size)\n{",
"uint32_t *regs = opaque;",
"uint32_t value = regs[offset/4];",
"if ((offset == 0x100) || (offset == 0x108) || (offset == 0x10C)) {",
"value |= 0x30000000;",
"}",
"return value;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
4,103 | static unsigned acpi_data_len(GArray *table)
{
#if GLIB_CHECK_VERSION(2, 14, 0)
assert(g_array_get_element_size(table) == 1);
#endif
return table->len;
}
| false | qemu | 134d42d614768b2803e551621f6654dab1fdc2d2 | static unsigned acpi_data_len(GArray *table)
{
#if GLIB_CHECK_VERSION(2, 14, 0)
assert(g_array_get_element_size(table) == 1);
#endif
return table->len;
}
| {
"code": [],
"line_no": []
} | static unsigned FUNC_0(GArray *VAR_0)
{
#if GLIB_CHECK_VERSION(2, 14, 0)
assert(g_array_get_element_size(VAR_0) == 1);
#endif
return VAR_0->len;
}
| [
"static unsigned FUNC_0(GArray *VAR_0)\n{",
"#if GLIB_CHECK_VERSION(2, 14, 0)\nassert(g_array_get_element_size(VAR_0) == 1);",
"#endif\nreturn VAR_0->len;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
]
] |
4,105 | static void init_excp_970 (CPUPPCState *env)
{
#if !defined(CONFIG_USER_ONLY)
env->excp_vectors[POWERPC_EXCP_RESET] = 0x00000100;
env->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200;
env->excp_vectors[POWERPC_EXCP_DSI] = 0x00000300;
env->excp_vectors[POWERPC_EXCP_DSEG] = 0x00000380;
... | false | qemu | b172c56a6d849554f7e43adc95983a9d6c042689 | static void init_excp_970 (CPUPPCState *env)
{
#if !defined(CONFIG_USER_ONLY)
env->excp_vectors[POWERPC_EXCP_RESET] = 0x00000100;
env->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200;
env->excp_vectors[POWERPC_EXCP_DSI] = 0x00000300;
env->excp_vectors[POWERPC_EXCP_DSEG] = 0x00000380;
... | {
"code": [],
"line_no": []
} | static void FUNC_0 (CPUPPCState *VAR_0)
{
#if !defined(CONFIG_USER_ONLY)
VAR_0->excp_vectors[POWERPC_EXCP_RESET] = 0x00000100;
VAR_0->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200;
VAR_0->excp_vectors[POWERPC_EXCP_DSI] = 0x00000300;
VAR_0->excp_vectors[POWERPC_EXCP_DSEG] = 0x0000038... | [
"static void FUNC_0 (CPUPPCState *VAR_0)\n{",
"#if !defined(CONFIG_USER_ONLY)\nVAR_0->excp_vectors[POWERPC_EXCP_RESET] = 0x00000100;",
"VAR_0->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200;",
"VAR_0->excp_vectors[POWERPC_EXCP_DSI] = 0x00000300;",
"VAR_0->excp_vectors[POWERPC_EXCP_DSEG] = 0x00... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
4,106 | static int proxy_ioc_getversion(FsContext *fs_ctx, V9fsPath *path,
mode_t st_mode, uint64_t *st_gen)
{
int err;
/* Do not try to open special files like device nodes, fifos etc
* we can get fd for regular files and directories only
*/
if (!S_ISREG(st_mode) ... | false | qemu | 494a8ebe713055d3946183f4b395f85a18b43e9e | static int proxy_ioc_getversion(FsContext *fs_ctx, V9fsPath *path,
mode_t st_mode, uint64_t *st_gen)
{
int err;
if (!S_ISREG(st_mode) && !S_ISDIR(st_mode)) {
errno = ENOTTY;
return -1;
}
err = v9fs_request(fs_ctx->private, T_GETVERSION,... | {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
mode_t VAR_2, uint64_t *VAR_3)
{
int VAR_4;
if (!S_ISREG(VAR_2) && !S_ISDIR(VAR_2)) {
errno = ENOTTY;
return -1;
}
VAR_4 = v9fs_request(VAR_0->private, T_GETVERSION, VAR_3, "s", VAR_1... | [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,\nmode_t VAR_2, uint64_t *VAR_3)\n{",
"int VAR_4;",
"if (!S_ISREG(VAR_2) && !S_ISDIR(VAR_2)) {",
"errno = ENOTTY;",
"return -1;",
"}",
"VAR_4 = v9fs_request(VAR_0->private, T_GETVERSION, VAR_3, \"s\", VAR_1);",
"if (VAR_4 < 0) {",
"errno = -VAR_4;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
4,107 | void vga_common_init(VGACommonState *s)
{
int i, j, v, b;
for(i = 0;i < 256; i++) {
v = 0;
for(j = 0; j < 8; j++) {
v |= ((i >> j) & 1) << (j * 4);
}
expand4[i] = v;
v = 0;
for(j = 0; j < 4; j++) {
v |= ((i >> (2 * j)) & 3) <... | false | qemu | 2c62f08ddbf3fa80dc7202eb9a2ea60ae44e2cc5 | void vga_common_init(VGACommonState *s)
{
int i, j, v, b;
for(i = 0;i < 256; i++) {
v = 0;
for(j = 0; j < 8; j++) {
v |= ((i >> j) & 1) << (j * 4);
}
expand4[i] = v;
v = 0;
for(j = 0; j < 4; j++) {
v |= ((i >> (2 * j)) & 3) <... | {
"code": [],
"line_no": []
} | void FUNC_0(VGACommonState *VAR_0)
{
int VAR_1, VAR_2, VAR_3, VAR_4;
for(VAR_1 = 0;VAR_1 < 256; VAR_1++) {
VAR_3 = 0;
for(VAR_2 = 0; VAR_2 < 8; VAR_2++) {
VAR_3 |= ((VAR_1 >> VAR_2) & 1) << (VAR_2 * 4);
}
expand4[VAR_1] = VAR_3;
VAR_3 = 0;
... | [
"void FUNC_0(VGACommonState *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3, VAR_4;",
"for(VAR_1 = 0;VAR_1 < 256; VAR_1++) {",
"VAR_3 = 0;",
"for(VAR_2 = 0; VAR_2 < 8; VAR_2++) {",
"VAR_3 |= ((VAR_1 >> VAR_2) & 1) << (VAR_2 * 4);",
"}",
"expand4[VAR_1] = VAR_3;",
"VAR_3 = 0;",
"for(VAR_2 = 0; VAR_2 < 4; 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
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45... |
4,108 | static uint32_t do_mac_read(lan9118_state *s, int reg)
{
switch (reg) {
case MAC_CR:
return s->mac_cr;
case MAC_ADDRH:
return s->conf.macaddr.a[4] | (s->conf.macaddr.a[5] << 8);
case MAC_ADDRL:
return s->conf.macaddr.a[0] | (s->conf.macaddr.a[1] << 8)
| (s... | false | qemu | 52b4bb7383b32e4e7512f98c57738c8fc9cb35ba | static uint32_t do_mac_read(lan9118_state *s, int reg)
{
switch (reg) {
case MAC_CR:
return s->mac_cr;
case MAC_ADDRH:
return s->conf.macaddr.a[4] | (s->conf.macaddr.a[5] << 8);
case MAC_ADDRL:
return s->conf.macaddr.a[0] | (s->conf.macaddr.a[1] << 8)
| (s... | {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(lan9118_state *s, int reg)
{
switch (reg) {
case MAC_CR:
return s->mac_cr;
case MAC_ADDRH:
return s->conf.macaddr.a[4] | (s->conf.macaddr.a[5] << 8);
case MAC_ADDRL:
return s->conf.macaddr.a[0] | (s->conf.macaddr.a[1] << 8)
| (s->con... | [
"static uint32_t FUNC_0(lan9118_state *s, int reg)\n{",
"switch (reg) {",
"case MAC_CR:\nreturn s->mac_cr;",
"case MAC_ADDRH:\nreturn s->conf.macaddr.a[4] | (s->conf.macaddr.a[5] << 8);",
"case MAC_ADDRL:\nreturn s->conf.macaddr.a[0] | (s->conf.macaddr.a[1] << 8)\n| (s->conf.macaddr.a[2] << 16) | (s->conf.m... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13
],
[
15,
17,
19
],
[
21,
23
],
[
25
],
[
27,
29
],
[
31
],
[
33,
35
],
[
37,
39
],
[
41,
43
],
[
45,
47,
49
],
[
51
],
[... |
4,109 | void visit_type_uint32(Visitor *v, uint32_t *obj, const char *name, Error **errp)
{
int64_t value;
if (v->type_uint32) {
v->type_uint32(v, obj, name, errp);
} else {
value = *obj;
v->type_int64(v, &value, name, errp);
if (value < 0 || value > UINT32_MAX) {
... | false | qemu | f755dea79dc81b0d6a8f6414e0672e165e28d8ba | void visit_type_uint32(Visitor *v, uint32_t *obj, const char *name, Error **errp)
{
int64_t value;
if (v->type_uint32) {
v->type_uint32(v, obj, name, errp);
} else {
value = *obj;
v->type_int64(v, &value, name, errp);
if (value < 0 || value > UINT32_MAX) {
... | {
"code": [],
"line_no": []
} | void FUNC_0(Visitor *VAR_0, uint32_t *VAR_1, const char *VAR_2, Error **VAR_3)
{
int64_t value;
if (VAR_0->type_uint32) {
VAR_0->type_uint32(VAR_0, VAR_1, VAR_2, VAR_3);
} else {
value = *VAR_1;
VAR_0->type_int64(VAR_0, &value, VAR_2, VAR_3);
if (value < 0 || value ... | [
"void FUNC_0(Visitor *VAR_0, uint32_t *VAR_1, const char *VAR_2, Error **VAR_3)\n{",
"int64_t value;",
"if (VAR_0->type_uint32) {",
"VAR_0->type_uint32(VAR_0, VAR_1, VAR_2, VAR_3);",
"} else {",
"value = *VAR_1;",
"VAR_0->type_int64(VAR_0, &value, VAR_2, VAR_3);",
"if (value < 0 || value > UINT32_MAX)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
4,110 | static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code){
AVFormatContext *s= nut->avf;
ByteIOContext *bc = &s->pb;
int size, stream_id, flags, discard;
int64_t pts, last_IP_pts;
size= decode_frame_header(nut, &flags, &pts, &stream_id, frame_code);
if(size < 0)
re... | false | FFmpeg | 06599638dd678c9939df0fd83ff693c43b25971d | static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code){
AVFormatContext *s= nut->avf;
ByteIOContext *bc = &s->pb;
int size, stream_id, flags, discard;
int64_t pts, last_IP_pts;
size= decode_frame_header(nut, &flags, &pts, &stream_id, frame_code);
if(size < 0)
re... | {
"code": [],
"line_no": []
} | static int FUNC_0(NUTContext *VAR_0, AVPacket *VAR_1, int VAR_2){
AVFormatContext *s= VAR_0->avf;
ByteIOContext *bc = &s->pb;
int VAR_3, VAR_4, VAR_5, VAR_6;
int64_t pts, last_IP_pts;
VAR_3= decode_frame_header(VAR_0, &VAR_5, &pts, &VAR_4, VAR_2);
if(VAR_3 < 0)
return -1;
... | [
"static int FUNC_0(NUTContext *VAR_0, AVPacket *VAR_1, int VAR_2){",
"AVFormatContext *s= VAR_0->avf;",
"ByteIOContext *bc = &s->pb;",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"int64_t pts, last_IP_pts;",
"VAR_3= decode_frame_header(VAR_0, &VAR_5, &pts, &VAR_4, VAR_2);",
"if(VAR_3 < 0)\nreturn -1;",
"if (VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
21,
23
],
[
27
],
[
29
],
[
31,
33,
35,
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51,
53
],
[... |
4,113 | static void bdrv_assign_node_name(BlockDriverState *bs,
const char *node_name,
Error **errp)
{
if (!node_name) {
return;
}
/* empty string node name is invalid */
if (node_name[0] == '\0') {
error_setg(errp, "... | false | qemu | 9aebf3b89281a173d2dfeee379b800be5e3f363e | static void bdrv_assign_node_name(BlockDriverState *bs,
const char *node_name,
Error **errp)
{
if (!node_name) {
return;
}
if (node_name[0] == '\0') {
error_setg(errp, "Empty node name");
return;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0,
const char *VAR_1,
Error **VAR_2)
{
if (!VAR_1) {
return;
}
if (VAR_1[0] == '\0') {
error_setg(VAR_2, "Empty node name");
return;
}
if (b... | [
"static void FUNC_0(BlockDriverState *VAR_0,\nconst char *VAR_1,\nError **VAR_2)\n{",
"if (!VAR_1) {",
"return;",
"}",
"if (VAR_1[0] == '\\0') {",
"error_setg(VAR_2, \"Empty node name\");",
"return;",
"}",
"if (bdrv_find(VAR_1)) {",
"error_setg(VAR_2, \"node-name=%s is conflicting with a device id... | [
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
],
[
23
],
[
25
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
45
],
[
47
],
[
49
],
[
51
],
[
57
],
[
59
],
[... |
4,114 | int bdrv_can_snapshot(BlockDriverState *bs)
{
BlockDriver *drv = bs->drv;
if (!drv || bdrv_is_removable(bs) || bdrv_is_read_only(bs)) {
return 0;
}
if (!drv->bdrv_snapshot_create) {
if (bs->file != NULL) {
return bdrv_can_snapshot(bs->file);
}
retu... | false | qemu | 07b70bfbb3f3aea9ce7a3a1da78cbfa8ae6bbce6 | int bdrv_can_snapshot(BlockDriverState *bs)
{
BlockDriver *drv = bs->drv;
if (!drv || bdrv_is_removable(bs) || bdrv_is_read_only(bs)) {
return 0;
}
if (!drv->bdrv_snapshot_create) {
if (bs->file != NULL) {
return bdrv_can_snapshot(bs->file);
}
retu... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0)
{
BlockDriver *drv = VAR_0->drv;
if (!drv || bdrv_is_removable(VAR_0) || bdrv_is_read_only(VAR_0)) {
return 0;
}
if (!drv->bdrv_snapshot_create) {
if (VAR_0->file != NULL) {
return FUNC_0(VAR_0->file);
}
return 0... | [
"int FUNC_0(BlockDriverState *VAR_0)\n{",
"BlockDriver *drv = VAR_0->drv;",
"if (!drv || bdrv_is_removable(VAR_0) || bdrv_is_read_only(VAR_0)) {",
"return 0;",
"}",
"if (!drv->bdrv_snapshot_create) {",
"if (VAR_0->file != NULL) {",
"return FUNC_0(VAR_0->file);",
"}",
"return 0;",
"}",
"return ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
]
] |
4,115 | int float32_le_quiet( float32 a, float32 b STATUS_PARAM )
{
flag aSign, bSign;
if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) )
|| ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) )
) {
if ( float32_is_signaling_nan( a ) || float32_is_signa... | false | qemu | f090c9d4ad5812fb92843d6470a1111c15190c4c | int float32_le_quiet( float32 a, float32 b STATUS_PARAM )
{
flag aSign, bSign;
if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) )
|| ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) )
) {
if ( float32_is_signaling_nan( a ) || float32_is_signa... | {
"code": [],
"line_no": []
} | int FUNC_0( float32 VAR_0, float32 VAR_1 STATUS_PARAM )
{
flag aSign, bSign;
if ( ( ( extractFloat32Exp( VAR_0 ) == 0xFF ) && extractFloat32Frac( VAR_0 ) )
|| ( ( extractFloat32Exp( VAR_1 ) == 0xFF ) && extractFloat32Frac( VAR_1 ) )
) {
if ( float32_is_signaling_nan( VAR_0 ) |... | [
"int FUNC_0( float32 VAR_0, float32 VAR_1 STATUS_PARAM )\n{",
"flag aSign, bSign;",
"if ( ( ( extractFloat32Exp( VAR_0 ) == 0xFF ) && extractFloat32Frac( VAR_0 ) )\n|| ( ( extractFloat32Exp( VAR_1 ) == 0xFF ) && extractFloat32Frac( VAR_1 ) )\n) {",
"if ( float32_is_signaling_nan( VAR_0 ) || float32_is_sign... | [
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
],
[
35
]
] |
4,116 | static AioContext *block_job_get_aio_context(BlockJob *job)
{
return job->deferred_to_main_loop ?
qemu_get_aio_context() :
blk_get_aio_context(job->blk);
}
| false | qemu | bae8196d9f97916de6323e70e3e374362ee16ec4 | static AioContext *block_job_get_aio_context(BlockJob *job)
{
return job->deferred_to_main_loop ?
qemu_get_aio_context() :
blk_get_aio_context(job->blk);
}
| {
"code": [],
"line_no": []
} | static AioContext *FUNC_0(BlockJob *job)
{
return job->deferred_to_main_loop ?
qemu_get_aio_context() :
blk_get_aio_context(job->blk);
}
| [
"static AioContext *FUNC_0(BlockJob *job)\n{",
"return job->deferred_to_main_loop ?\nqemu_get_aio_context() :\nblk_get_aio_context(job->blk);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5,
7,
9
],
[
11
]
] |
4,117 | static int gen_jz_ecx_string(DisasContext *s, target_ulong next_eip)
{
int l1, l2;
l1 = gen_new_label();
l2 = gen_new_label();
gen_op_jnz_ecx[s->aflag](l1);
gen_set_label(l2);
gen_jmp_tb(s, next_eip, 1);
gen_set_label(l1);
return l2;
}
| false | qemu | 6e0d8677cb443e7408c0b7a25a93c6596d7fa380 | static int gen_jz_ecx_string(DisasContext *s, target_ulong next_eip)
{
int l1, l2;
l1 = gen_new_label();
l2 = gen_new_label();
gen_op_jnz_ecx[s->aflag](l1);
gen_set_label(l2);
gen_jmp_tb(s, next_eip, 1);
gen_set_label(l1);
return l2;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(DisasContext *VAR_0, target_ulong VAR_1)
{
int VAR_2, VAR_3;
VAR_2 = gen_new_label();
VAR_3 = gen_new_label();
gen_op_jnz_ecx[VAR_0->aflag](VAR_2);
gen_set_label(VAR_3);
gen_jmp_tb(VAR_0, VAR_1, 1);
gen_set_label(VAR_2);
return VAR_3;
}
| [
"static int FUNC_0(DisasContext *VAR_0, target_ulong VAR_1)\n{",
"int VAR_2, VAR_3;",
"VAR_2 = gen_new_label();",
"VAR_3 = gen_new_label();",
"gen_op_jnz_ecx[VAR_0->aflag](VAR_2);",
"gen_set_label(VAR_3);",
"gen_jmp_tb(VAR_0, VAR_1, 1);",
"gen_set_label(VAR_2);",
"return VAR_3;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
4,119 | const char *qjson_get_str(QJSON *json)
{
return qstring_get_str(json->str);
}
| false | qemu | 17b74b98676aee5bc470b173b1e528d2fce2cf18 | const char *qjson_get_str(QJSON *json)
{
return qstring_get_str(json->str);
}
| {
"code": [],
"line_no": []
} | const char *FUNC_0(QJSON *VAR_0)
{
return qstring_get_str(VAR_0->str);
}
| [
"const char *FUNC_0(QJSON *VAR_0)\n{",
"return qstring_get_str(VAR_0->str);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
4,120 | void arm_v7m_cpu_do_interrupt(CPUState *cs)
{
ARMCPU *cpu = ARM_CPU(cs);
CPUARMState *env = &cpu->env;
uint32_t lr;
arm_log_exception(cs->exception_index);
/* For exceptions we just mark as pending on the NVIC, and let that
handle it. */
switch (cs->exception_index) {
ca... | false | qemu | 4d1e7a4745c050f7ccac49a1c01437526b5130b5 | void arm_v7m_cpu_do_interrupt(CPUState *cs)
{
ARMCPU *cpu = ARM_CPU(cs);
CPUARMState *env = &cpu->env;
uint32_t lr;
arm_log_exception(cs->exception_index);
switch (cs->exception_index) {
case EXCP_UDEF:
armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_USAGE);
e... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUState *VAR_0)
{
ARMCPU *cpu = ARM_CPU(VAR_0);
CPUARMState *env = &cpu->env;
uint32_t lr;
arm_log_exception(VAR_0->exception_index);
switch (VAR_0->exception_index) {
case EXCP_UDEF:
armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_USAGE);
env->v7... | [
"void FUNC_0(CPUState *VAR_0)\n{",
"ARMCPU *cpu = ARM_CPU(VAR_0);",
"CPUARMState *env = &cpu->env;",
"uint32_t lr;",
"arm_log_exception(VAR_0->exception_index);",
"switch (VAR_0->exception_index) {",
"case EXCP_UDEF:\narmv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_USAGE);",
"env->v7m.cfsr[env->v7m.sec... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47,
51
],
[
53
],
[
55,... |
4,122 | static av_cold int find_component(OMXContext *omx_context, void *logctx,
const char *role, char *str, int str_size)
{
OMX_U32 i, num = 0;
char **components;
int ret = 0;
#if CONFIG_OMX_RPI
if (av_strstart(role, "video_encoder.", NULL)) {
av_strlcpy(str... | false | FFmpeg | 16a75304fe42d3a007c78126b6370c94ccf891f6 | static av_cold int find_component(OMXContext *omx_context, void *logctx,
const char *role, char *str, int str_size)
{
OMX_U32 i, num = 0;
char **components;
int ret = 0;
#if CONFIG_OMX_RPI
if (av_strstart(role, "video_encoder.", NULL)) {
av_strlcpy(str... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(OMXContext *omx_context, void *logctx,
const char *role, char *str, int str_size)
{
OMX_U32 i, num = 0;
char **VAR_0;
int VAR_1 = 0;
#if CONFIG_OMX_RPI
if (av_strstart(role, "video_encoder.", NULL)) {
av_strlcpy(str, "OMX.broa... | [
"static av_cold int FUNC_0(OMXContext *omx_context, void *logctx,\nconst char *role, char *str, int str_size)\n{",
"OMX_U32 i, num = 0;",
"char **VAR_0;",
"int VAR_1 = 0;",
"#if CONFIG_OMX_RPI\nif (av_strstart(role, \"video_encoder.\", NULL)) {",
"av_strlcpy(str, \"OMX.broadcom.video_encode\", str_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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
... |
4,123 | set_mdic(E1000State *s, int index, uint32_t val)
{
uint32_t data = val & E1000_MDIC_DATA_MASK;
uint32_t addr = ((val & E1000_MDIC_REG_MASK) >> E1000_MDIC_REG_SHIFT);
if ((val & E1000_MDIC_PHY_MASK) >> E1000_MDIC_PHY_SHIFT != 1) // phy #
val = s->mac_reg[MDIC] | E1000_MDIC_ERROR;
else if ... | false | qemu | 1195fed9e6790bd8fd86b0dc33e2442d70355ac6 | set_mdic(E1000State *s, int index, uint32_t val)
{
uint32_t data = val & E1000_MDIC_DATA_MASK;
uint32_t addr = ((val & E1000_MDIC_REG_MASK) >> E1000_MDIC_REG_SHIFT);
if ((val & E1000_MDIC_PHY_MASK) >> E1000_MDIC_PHY_SHIFT != 1)
val = s->mac_reg[MDIC] | E1000_MDIC_ERROR;
else if (val & E... | {
"code": [],
"line_no": []
} | FUNC_0(E1000State *VAR_0, int VAR_1, uint32_t VAR_2)
{
uint32_t data = VAR_2 & E1000_MDIC_DATA_MASK;
uint32_t addr = ((VAR_2 & E1000_MDIC_REG_MASK) >> E1000_MDIC_REG_SHIFT);
if ((VAR_2 & E1000_MDIC_PHY_MASK) >> E1000_MDIC_PHY_SHIFT != 1)
VAR_2 = VAR_0->mac_reg[MDIC] | E1000_MDIC_ERROR;
... | [
"FUNC_0(E1000State *VAR_0, int VAR_1, uint32_t VAR_2)\n{",
"uint32_t data = VAR_2 & E1000_MDIC_DATA_MASK;",
"uint32_t addr = ((VAR_2 & E1000_MDIC_REG_MASK) >> E1000_MDIC_REG_SHIFT);",
"if ((VAR_2 & E1000_MDIC_PHY_MASK) >> E1000_MDIC_PHY_SHIFT != 1)\nVAR_2 = VAR_0->mac_reg[MDIC] | E1000_MDIC_ERROR;",
"else 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
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
... |
4,124 | void phys_mem_set_alloc(void *(*alloc)(size_t))
{
phys_mem_alloc = alloc;
}
| false | qemu | a2b257d6212ade772473f86bf0637480b2578a7e | void phys_mem_set_alloc(void *(*alloc)(size_t))
{
phys_mem_alloc = alloc;
}
| {
"code": [],
"line_no": []
} | void FUNC_0(void *(*VAR_0)(size_t))
{
phys_mem_alloc = VAR_0;
}
| [
"void FUNC_0(void *(*VAR_0)(size_t))\n{",
"phys_mem_alloc = VAR_0;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
4,126 | VirtIODevice *virtio_9p_init(DeviceState *dev, V9fsConf *conf)
{
V9fsState *s;
int i, len;
struct stat stat;
FsTypeEntry *fse;
s = (V9fsState *)virtio_common_init("virtio-9p",
VIRTIO_ID_9P,
sizeof(struct virtio_9p_c... | false | qemu | fc22118d9bb56ec71655b936a29513c140e6c289 | VirtIODevice *virtio_9p_init(DeviceState *dev, V9fsConf *conf)
{
V9fsState *s;
int i, len;
struct stat stat;
FsTypeEntry *fse;
s = (V9fsState *)virtio_common_init("virtio-9p",
VIRTIO_ID_9P,
sizeof(struct virtio_9p_c... | {
"code": [],
"line_no": []
} | VirtIODevice *FUNC_0(DeviceState *dev, V9fsConf *conf)
{
V9fsState *s;
int VAR_0, VAR_1;
struct VAR_2 VAR_2;
FsTypeEntry *fse;
s = (V9fsState *)virtio_common_init("virtio-9p",
VIRTIO_ID_9P,
sizeof(struct virtio_9p_c... | [
"VirtIODevice *FUNC_0(DeviceState *dev, V9fsConf *conf)\n{",
"V9fsState *s;",
"int VAR_0, VAR_1;",
"struct VAR_2 VAR_2;",
"FsTypeEntry *fse;",
"s = (V9fsState *)virtio_common_init(\"virtio-9p\",\nVIRTIO_ID_9P,\nsizeof(struct virtio_9p_config)+\nMAX_TAG_LEN,\nsizeof(V9fsState));",
"QLIST_INIT(&s->free_li... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17,
19,
21,
23,
25
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
49
],
[
53,
55
],
[
57
],
[
59
],
[
63
],
[... |
4,127 | static void coroutine_fn aio_read_response(void *opaque)
{
SheepdogObjRsp rsp;
BDRVSheepdogState *s = opaque;
int fd = s->fd;
int ret;
AIOReq *aio_req = NULL;
SheepdogAIOCB *acb;
uint64_t idx;
if (QLIST_EMPTY(&s->inflight_aio_head)) {
goto out;
}
/* read a... | false | qemu | 80731d9da560461bbdcda5ad4b05f4a8a846fccd | static void coroutine_fn aio_read_response(void *opaque)
{
SheepdogObjRsp rsp;
BDRVSheepdogState *s = opaque;
int fd = s->fd;
int ret;
AIOReq *aio_req = NULL;
SheepdogAIOCB *acb;
uint64_t idx;
if (QLIST_EMPTY(&s->inflight_aio_head)) {
goto out;
}
ret... | {
"code": [],
"line_no": []
} | static void VAR_0 aio_read_response(void *opaque)
{
SheepdogObjRsp rsp;
BDRVSheepdogState *s = opaque;
int fd = s->fd;
int ret;
AIOReq *aio_req = NULL;
SheepdogAIOCB *acb;
uint64_t idx;
if (QLIST_EMPTY(&s->inflight_aio_head)) {
goto out;
}
ret = qemu... | [
"static void VAR_0 aio_read_response(void *opaque)\n{",
"SheepdogObjRsp rsp;",
"BDRVSheepdogState *s = opaque;",
"int fd = s->fd;",
"int ret;",
"AIOReq *aio_req = NULL;",
"SheepdogAIOCB *acb;",
"uint64_t idx;",
"if (QLIST_EMPTY(&s->inflight_aio_head)) {",
"goto out;",
"}",
"ret = qemu_co_recv(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
45
],
[
47
],
[
49
],
[
51
... |
4,128 | static void add_flagname_to_bitmaps(char *flagname, uint32_t *features,
uint32_t *ext_features,
uint32_t *ext2_features,
uint32_t *ext3_features)
{
int i;
int found = 0;
for ( i = 0 ; i < ... | false | qemu | 6d2edc43731d0e804c1c846db1e07bddfb158ebd | static void add_flagname_to_bitmaps(char *flagname, uint32_t *features,
uint32_t *ext_features,
uint32_t *ext2_features,
uint32_t *ext3_features)
{
int i;
int found = 0;
for ( i = 0 ; i < ... | {
"code": [],
"line_no": []
} | static void FUNC_0(char *VAR_0, uint32_t *VAR_1,
uint32_t *VAR_2,
uint32_t *VAR_3,
uint32_t *VAR_4)
{
int VAR_5;
int VAR_6 = 0;
for ( VAR_5 = 0 ; VAR_5 < 32 ; VAR_5++ )
if (featu... | [
"static void FUNC_0(char *VAR_0, uint32_t *VAR_1,\nuint32_t *VAR_2,\nuint32_t *VAR_3,\nuint32_t *VAR_4)\n{",
"int VAR_5;",
"int VAR_6 = 0;",
"for ( VAR_5 = 0 ; VAR_5 < 32 ; VAR_5++ )",
"if (feature_name[VAR_5] && !strcmp (VAR_0, feature_name[VAR_5])) {",
"*VAR_1 |= 1 << VAR_5;",
"VAR_6 = 1;",
"}",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
4,129 | static void mirror_start_job(BlockDriverState *bs, BlockDriverState *target,
const char *replaces,
int64_t speed, uint32_t granularity,
int64_t buf_size,
BlockdevOnError on_source_error,
... | false | qemu | 1f0c461b82d5ec2664ca0cfc9548f80da87a8f8a | static void mirror_start_job(BlockDriverState *bs, BlockDriverState *target,
const char *replaces,
int64_t speed, uint32_t granularity,
int64_t buf_size,
BlockdevOnError on_source_error,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0, BlockDriverState *VAR_1,
const char *VAR_2,
int64_t VAR_3, uint32_t VAR_4,
int64_t VAR_5,
BlockdevOnError VAR_6,
BlockdevOnErr... | [
"static void FUNC_0(BlockDriverState *VAR_0, BlockDriverState *VAR_1,\nconst char *VAR_2,\nint64_t VAR_3, uint32_t VAR_4,\nint64_t VAR_5,\nBlockdevOnError VAR_6,\nBlockdevOnError VAR_7,\nbool VAR_8,\nBlockCompletionFunc *VAR_9,\nvoid *VAR_10, Error **VAR_11,\nconst BlockJobDriver *VAR_12,\nbool VAR_13, BlockDriverS... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
],
[
57
],
[
65
... |
4,130 | DisplaySurface *qemu_create_displaysurface_from(int width, int height, int bpp,
int linesize, uint8_t *data)
{
DisplaySurface *surface = g_new0(DisplaySurface, 1);
surface->pf = qemu_default_pixelformat(bpp);
surface->format = qemu_pixman_get_format(&... | false | qemu | b1424e0381a7f1c9969079eca4458d5f20bf1859 | DisplaySurface *qemu_create_displaysurface_from(int width, int height, int bpp,
int linesize, uint8_t *data)
{
DisplaySurface *surface = g_new0(DisplaySurface, 1);
surface->pf = qemu_default_pixelformat(bpp);
surface->format = qemu_pixman_get_format(&... | {
"code": [],
"line_no": []
} | DisplaySurface *FUNC_0(int width, int height, int bpp,
int linesize, uint8_t *data)
{
DisplaySurface *surface = g_new0(DisplaySurface, 1);
surface->pf = qemu_default_pixelformat(bpp);
surface->format = qemu_pixman_get_format(&surface->pf);
assert... | [
"DisplaySurface *FUNC_0(int width, int height, int bpp,\nint linesize, uint8_t *data)\n{",
"DisplaySurface *surface = g_new0(DisplaySurface, 1);",
"surface->pf = qemu_default_pixelformat(bpp);",
"surface->format = qemu_pixman_get_format(&surface->pf);",
"assert(surface->format != 0);",
"surface->image = p... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19,
21,
23
],
[
25
],
[
29,
31
],
[
33,
37
],
[
39
]
] |
4,131 | static void spapr_phb_reset(DeviceState *qdev)
{
SysBusDevice *s = SYS_BUS_DEVICE(qdev);
sPAPRPHBState *sphb = SPAPR_PCI_HOST_BRIDGE(s);
/* Reset the IOMMU state */
spapr_tce_reset(sphb->tcet);
}
| false | qemu | a83000f5e3fac30a7f213af1ba6a8f827622854d | static void spapr_phb_reset(DeviceState *qdev)
{
SysBusDevice *s = SYS_BUS_DEVICE(qdev);
sPAPRPHBState *sphb = SPAPR_PCI_HOST_BRIDGE(s);
spapr_tce_reset(sphb->tcet);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0)
{
SysBusDevice *s = SYS_BUS_DEVICE(VAR_0);
sPAPRPHBState *sphb = SPAPR_PCI_HOST_BRIDGE(s);
spapr_tce_reset(sphb->tcet);
}
| [
"static void FUNC_0(DeviceState *VAR_0)\n{",
"SysBusDevice *s = SYS_BUS_DEVICE(VAR_0);",
"sPAPRPHBState *sphb = SPAPR_PCI_HOST_BRIDGE(s);",
"spapr_tce_reset(sphb->tcet);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
]
] |
4,132 | static int64_t coroutine_fn vvfat_co_get_block_status(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int* n)
{
BDRVVVFATState* s = bs->opaque;
*n = s->sector_count - sector_num;
if (*n > nb_sectors) {
*n = nb_sectors;
} else if (*n < 0) {
return 0;
}
return ... | false | qemu | 67a0fd2a9bca204d2b39f910a97c7137636a0715 | static int64_t coroutine_fn vvfat_co_get_block_status(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int* n)
{
BDRVVVFATState* s = bs->opaque;
*n = s->sector_count - sector_num;
if (*n > nb_sectors) {
*n = nb_sectors;
} else if (*n < 0) {
return 0;
}
return ... | {
"code": [],
"line_no": []
} | static int64_t VAR_0 vvfat_co_get_block_status(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int* n)
{
BDRVVVFATState* s = bs->opaque;
*n = s->sector_count - sector_num;
if (*n > nb_sectors) {
*n = nb_sectors;
} else if (*n < 0) {
return 0;
}
return BDRV_BL... | [
"static int64_t VAR_0 vvfat_co_get_block_status(BlockDriverState *bs,\nint64_t sector_num, int nb_sectors, int* n)\n{",
"BDRVVVFATState* s = bs->opaque;",
"*n = s->sector_count - sector_num;",
"if (*n > nb_sectors) {",
"*n = nb_sectors;",
"} else if (*n < 0) {",
"return 0;",
"}",
"return BDRV_BLOCK_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
4,133 | static av_cold int nvenc_check_cuda(AVCodecContext *avctx)
{
int device_count = 0;
CUdevice cu_device = 0;
char gpu_name[128];
int smminor = 0, smmajor = 0;
int i, smver, target_smver;
NvencContext *ctx = avctx->priv_data;
NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;
... | false | FFmpeg | 0d021cc8b30a6f81c27fbeca7f99f1ee7a20acf8 | static av_cold int nvenc_check_cuda(AVCodecContext *avctx)
{
int device_count = 0;
CUdevice cu_device = 0;
char gpu_name[128];
int smminor = 0, smmajor = 0;
int i, smver, target_smver;
NvencContext *ctx = avctx->priv_data;
NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;
... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
int VAR_0 = 0;
CUdevice cu_device = 0;
char VAR_1[128];
int VAR_2 = 0, VAR_3 = 0;
int VAR_4, VAR_5, VAR_6;
NvencContext *ctx = avctx->priv_data;
NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;
switch (avctx->codec->i... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"int VAR_0 = 0;",
"CUdevice cu_device = 0;",
"char VAR_1[128];",
"int VAR_2 = 0, VAR_3 = 0;",
"int VAR_4, VAR_5, VAR_6;",
"NvencContext *ctx = avctx->priv_data;",
"NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;",
"switch (avctx->codec->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
29
],
[
31,
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
47,
49
],
[
53,... |
4,134 | static void gic_dist_writeb(void *opaque, hwaddr offset,
uint32_t value, MemTxAttrs attrs)
{
GICState *s = (GICState *)opaque;
int irq;
int i;
int cpu;
cpu = gic_get_current_cpu(s);
if (offset < 0x100) {
if (offset == 0) {
s->enabled = ... | false | qemu | c27a5ba94874cb3a29e21b3ad4bd5e504aea93b2 | static void gic_dist_writeb(void *opaque, hwaddr offset,
uint32_t value, MemTxAttrs attrs)
{
GICState *s = (GICState *)opaque;
int irq;
int i;
int cpu;
cpu = gic_get_current_cpu(s);
if (offset < 0x100) {
if (offset == 0) {
s->enabled = ... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint32_t VAR_2, MemTxAttrs VAR_3)
{
GICState *s = (GICState *)VAR_0;
int VAR_4;
int VAR_5;
int VAR_6;
VAR_6 = gic_get_current_cpu(s);
if (VAR_1 < 0x100) {
if (VAR_1 == 0) {
s->enabled = (VAR... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint32_t VAR_2, MemTxAttrs VAR_3)\n{",
"GICState *s = (GICState *)VAR_0;",
"int VAR_4;",
"int VAR_5;",
"int VAR_6;",
"VAR_6 = gic_get_current_cpu(s);",
"if (VAR_1 < 0x100) {",
"if (VAR_1 == 0) {",
"s->enabled = (VAR_2 & 1);",
"DPRINTF(\"Distribution ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47,
49
],
[
51
... |
4,135 | static int colo_packet_compare(Packet *ppkt, Packet *spkt)
{
trace_colo_compare_ip_info(ppkt->size, inet_ntoa(ppkt->ip->ip_src),
inet_ntoa(ppkt->ip->ip_dst), spkt->size,
inet_ntoa(spkt->ip->ip_src),
inet_ntoa(spkt->ip-... | false | qemu | 2ad7ca4c81733cba5c5c464078a643aba61044f8 | static int colo_packet_compare(Packet *ppkt, Packet *spkt)
{
trace_colo_compare_ip_info(ppkt->size, inet_ntoa(ppkt->ip->ip_src),
inet_ntoa(ppkt->ip->ip_dst), spkt->size,
inet_ntoa(spkt->ip->ip_src),
inet_ntoa(spkt->ip-... | {
"code": [],
"line_no": []
} | static int FUNC_0(Packet *VAR_0, Packet *VAR_1)
{
trace_colo_compare_ip_info(VAR_0->size, inet_ntoa(VAR_0->ip->ip_src),
inet_ntoa(VAR_0->ip->ip_dst), VAR_1->size,
inet_ntoa(VAR_1->ip->ip_src),
inet_ntoa(VAR_1->ip->ip_d... | [
"static int FUNC_0(Packet *VAR_0, Packet *VAR_1)\n{",
"trace_colo_compare_ip_info(VAR_0->size, inet_ntoa(VAR_0->ip->ip_src),\ninet_ntoa(VAR_0->ip->ip_dst), VAR_1->size,\ninet_ntoa(VAR_1->ip->ip_src),\ninet_ntoa(VAR_1->ip->ip_dst));",
"if (VAR_0->size == VAR_1->size) {",
"return memcmp(VAR_0->data, VAR_1->data... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7,
9,
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
4,136 | BlockAIOCB *bdrv_aio_discard(BlockDriverState *bs,
int64_t sector_num, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
Coroutine *co;
BlockAIOCBCoroutine *acb;
trace_bdrv_aio_discard(bs, sector_num, nb_sectors, opaque);
acb = qemu_aio_get(&bdrv_em_co_aiocb_info, bs, c... | false | qemu | 61007b316cd71ee7333ff7a0a749a8949527575f | BlockAIOCB *bdrv_aio_discard(BlockDriverState *bs,
int64_t sector_num, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
Coroutine *co;
BlockAIOCBCoroutine *acb;
trace_bdrv_aio_discard(bs, sector_num, nb_sectors, opaque);
acb = qemu_aio_get(&bdrv_em_co_aiocb_info, bs, c... | {
"code": [],
"line_no": []
} | BlockAIOCB *FUNC_0(BlockDriverState *bs,
int64_t sector_num, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
Coroutine *co;
BlockAIOCBCoroutine *acb;
trace_bdrv_aio_discard(bs, sector_num, nb_sectors, opaque);
acb = qemu_aio_get(&bdrv_em_co_aiocb_info, bs, cb, opaque)... | [
"BlockAIOCB *FUNC_0(BlockDriverState *bs,\nint64_t sector_num, int nb_sectors,\nBlockCompletionFunc *cb, void *opaque)\n{",
"Coroutine *co;",
"BlockAIOCBCoroutine *acb;",
"trace_bdrv_aio_discard(bs, sector_num, nb_sectors, opaque);",
"acb = qemu_aio_get(&bdrv_em_co_aiocb_info, bs, cb, opaque);",
"acb->nee... | [
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
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
]
] |
4,138 | static void bdrv_drain_poll(BlockDriverState *bs)
{
while (bdrv_requests_pending(bs)) {
/* Keep iterating */
aio_poll(bdrv_get_aio_context(bs), true);
}
}
| false | qemu | d42cf28837801cd1f835089fe9db2a42a1af55cd | static void bdrv_drain_poll(BlockDriverState *bs)
{
while (bdrv_requests_pending(bs)) {
aio_poll(bdrv_get_aio_context(bs), true);
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0)
{
while (bdrv_requests_pending(VAR_0)) {
aio_poll(bdrv_get_aio_context(VAR_0), true);
}
}
| [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"while (bdrv_requests_pending(VAR_0)) {",
"aio_poll(bdrv_get_aio_context(VAR_0), true);",
"}",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
]
] |
4,139 | static void quorum_aio_cb(void *opaque, int ret)
{
QuorumChildRequest *sacb = opaque;
QuorumAIOCB *acb = sacb->parent;
BDRVQuorumState *s = acb->common.bs->opaque;
sacb->ret = ret;
acb->count++;
if (ret == 0) {
acb->success_count++;
} else {
quorum_report_bad(acb,... | true | qemu | cf29a570a7aa7abab66bf256fdf9540873590811 | static void quorum_aio_cb(void *opaque, int ret)
{
QuorumChildRequest *sacb = opaque;
QuorumAIOCB *acb = sacb->parent;
BDRVQuorumState *s = acb->common.bs->opaque;
sacb->ret = ret;
acb->count++;
if (ret == 0) {
acb->success_count++;
} else {
quorum_report_bad(acb,... | {
"code": [
" quorum_vote(acb);",
" quorum_aio_finalize(acb);"
],
"line_no": [
43,
53
]
} | static void FUNC_0(void *VAR_0, int VAR_1)
{
QuorumChildRequest *sacb = VAR_0;
QuorumAIOCB *acb = sacb->parent;
BDRVQuorumState *s = acb->common.bs->VAR_0;
sacb->VAR_1 = VAR_1;
acb->count++;
if (VAR_1 == 0) {
acb->success_count++;
} else {
quorum_report_bad(acb, s... | [
"static void FUNC_0(void *VAR_0, int VAR_1)\n{",
"QuorumChildRequest *sacb = VAR_0;",
"QuorumAIOCB *acb = sacb->parent;",
"BDRVQuorumState *s = acb->common.bs->VAR_0;",
"sacb->VAR_1 = VAR_1;",
"acb->count++;",
"if (VAR_1 == 0) {",
"acb->success_count++;",
"} else {",
"quorum_report_bad(acb, sacb->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
41
],
[
43
],
[
45
],
[
47
... |
4,140 | static const uint8_t *pcx_rle_decode(const uint8_t *src,
const uint8_t *end,
uint8_t *dst,
unsigned int bytes_per_scanline,
int compressed)
{
unsigned int i = 0;
... | true | FFmpeg | 09b23786b3986502ee88d4907356979127169bdd | static const uint8_t *pcx_rle_decode(const uint8_t *src,
const uint8_t *end,
uint8_t *dst,
unsigned int bytes_per_scanline,
int compressed)
{
unsigned int i = 0;
... | {
"code": [
"static const uint8_t *pcx_rle_decode(const uint8_t *src,",
" const uint8_t *end,",
" uint8_t *dst,",
" unsigned int bytes_per_scanline,",
" i... | static const uint8_t *FUNC_0(const uint8_t *src,
const uint8_t *end,
uint8_t *dst,
unsigned int bytes_per_scanline,
int compressed)
{
unsigned int VAR_0 = 0;
... | [
"static const uint8_t *FUNC_0(const uint8_t *src,\nconst uint8_t *end,\nuint8_t *dst,\nunsigned int bytes_per_scanline,\nint compressed)\n{",
"unsigned int VAR_0 = 0;",
"unsigned char VAR_1, VAR_2;",
"if (compressed) {",
"while (VAR_0 < bytes_per_scanline && src < end) {",
"VAR_1 = 1;",
"VAR_2 = *src+... | [
1,
0,
0,
0,
1,
0,
1,
1,
0,
1,
0,
0,
0,
0,
1,
1,
0,
1,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
4,142 | void visit_type_int16(Visitor *v, int16_t *obj, const char *name, Error **errp)
{
int64_t value;
if (!error_is_set(errp)) {
if (v->type_int16) {
v->type_int16(v, obj, name, errp);
} else {
value = *obj;
v->type_int(v, &value, name, errp);
... | true | qemu | 297a3646c2947ee64a6d42ca264039732c6218e0 | void visit_type_int16(Visitor *v, int16_t *obj, const char *name, Error **errp)
{
int64_t value;
if (!error_is_set(errp)) {
if (v->type_int16) {
v->type_int16(v, obj, name, errp);
} else {
value = *obj;
v->type_int(v, &value, name, errp);
... | {
"code": [
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" } else {",
" value = *obj;",
" v->t... | void FUNC_0(Visitor *VAR_0, int16_t *VAR_1, const char *VAR_2, Error **VAR_3)
{
int64_t value;
if (!error_is_set(VAR_3)) {
if (VAR_0->type_int16) {
VAR_0->type_int16(VAR_0, VAR_1, VAR_2, VAR_3);
} else {
value = *VAR_1;
VAR_0->type_int(VAR_0, &value, V... | [
"void FUNC_0(Visitor *VAR_0, int16_t *VAR_1, const char *VAR_2, Error **VAR_3)\n{",
"int64_t value;",
"if (!error_is_set(VAR_3)) {",
"if (VAR_0->type_int16) {",
"VAR_0->type_int16(VAR_0, VAR_1, VAR_2, VAR_3);",
"} else {",
"value = *VAR_1;",
"VAR_0->type_int(VAR_0, &value, VAR_2, VAR_3);",
"if (valu... | [
0,
0,
1,
1,
1,
0,
1,
1,
1,
1,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
4,143 | static void qdev_prop_set_globals_for_type(DeviceState *dev,
const char *typename)
{
GlobalProperty *prop;
QTAILQ_FOREACH(prop, &global_props, next) {
Error *err = NULL;
if (strcmp(typename, prop->driver) != 0) {
continue;
}
... | true | qemu | f9a8b5530d438f836f9697639814f585aaec554d | static void qdev_prop_set_globals_for_type(DeviceState *dev,
const char *typename)
{
GlobalProperty *prop;
QTAILQ_FOREACH(prop, &global_props, next) {
Error *err = NULL;
if (strcmp(typename, prop->driver) != 0) {
continue;
}
... | {
"code": [
" GlobalProperty *prop;",
" QTAILQ_FOREACH(prop, &global_props, next) {",
" GlobalProperty *prop;",
" QTAILQ_FOREACH(prop, &global_props, next) {"
],
"line_no": [
7,
11,
7,
11
]
} | static void FUNC_0(DeviceState *VAR_0,
const char *VAR_1)
{
GlobalProperty *prop;
QTAILQ_FOREACH(prop, &global_props, next) {
Error *err = NULL;
if (strcmp(VAR_1, prop->driver) != 0) {
continue;
}
prop->used = true;
... | [
"static void FUNC_0(DeviceState *VAR_0,\nconst char *VAR_1)\n{",
"GlobalProperty *prop;",
"QTAILQ_FOREACH(prop, &global_props, next) {",
"Error *err = NULL;",
"if (strcmp(VAR_1, prop->driver) != 0) {",
"continue;",
"}",
"prop->used = true;",
"object_property_parse(OBJECT(VAR_0), prop->value, prop->p... | [
0,
1,
1,
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
]
] |
4,145 | static unsigned char get_ref_idx(AVFrame *frame)
{
FrameDecodeData *fdd;
NVDECFrame *cf;
if (!frame || !frame->private_ref)
return 255;
fdd = (FrameDecodeData*)frame->private_ref->data;
cf = (NVDECFrame*)fdd->hwaccel_priv;
return cf->idx;
}
| false | FFmpeg | 5a0f6b099f3e8fcb95a80e3ffe52b3bf369efe24 | static unsigned char get_ref_idx(AVFrame *frame)
{
FrameDecodeData *fdd;
NVDECFrame *cf;
if (!frame || !frame->private_ref)
return 255;
fdd = (FrameDecodeData*)frame->private_ref->data;
cf = (NVDECFrame*)fdd->hwaccel_priv;
return cf->idx;
}
| {
"code": [],
"line_no": []
} | static unsigned char FUNC_0(AVFrame *VAR_0)
{
FrameDecodeData *fdd;
NVDECFrame *cf;
if (!VAR_0 || !VAR_0->private_ref)
return 255;
fdd = (FrameDecodeData*)VAR_0->private_ref->data;
cf = (NVDECFrame*)fdd->hwaccel_priv;
return cf->idx;
}
| [
"static unsigned char FUNC_0(AVFrame *VAR_0)\n{",
"FrameDecodeData *fdd;",
"NVDECFrame *cf;",
"if (!VAR_0 || !VAR_0->private_ref)\nreturn 255;",
"fdd = (FrameDecodeData*)VAR_0->private_ref->data;",
"cf = (NVDECFrame*)fdd->hwaccel_priv;",
"return cf->idx;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
23
],
[
25
]
] |
4,146 | static av_cold int dnxhd_encode_end(AVCodecContext *avctx)
{
DNXHDEncContext *ctx = avctx->priv_data;
int max_level = 1 << (ctx->cid_table->bit_depth + 2);
int i;
av_free(ctx->vlc_codes - max_level * 2);
av_free(ctx->vlc_bits - max_level * 2);
av_freep(&ctx->run_codes);
av_f... | false | FFmpeg | d6604b29ef544793479d7fb4e05ef6622bb3e534 | static av_cold int dnxhd_encode_end(AVCodecContext *avctx)
{
DNXHDEncContext *ctx = avctx->priv_data;
int max_level = 1 << (ctx->cid_table->bit_depth + 2);
int i;
av_free(ctx->vlc_codes - max_level * 2);
av_free(ctx->vlc_bits - max_level * 2);
av_freep(&ctx->run_codes);
av_f... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
DNXHDEncContext *ctx = avctx->priv_data;
int VAR_0 = 1 << (ctx->cid_table->bit_depth + 2);
int VAR_1;
av_free(ctx->vlc_codes - VAR_0 * 2);
av_free(ctx->vlc_bits - VAR_0 * 2);
av_freep(&ctx->run_codes);
av_freep(&ctx->run_bit... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"DNXHDEncContext *ctx = avctx->priv_data;",
"int VAR_0 = 1 << (ctx->cid_table->bit_depth + 2);",
"int VAR_1;",
"av_free(ctx->vlc_codes - VAR_0 * 2);",
"av_free(ctx->vlc_bits - VAR_0 * 2);",
"av_freep(&ctx->run_codes);",
"av_freep(&ctx->run_... | [
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
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
... |
4,147 | static void *sigwait_compat(void *opaque)
{
struct sigfd_compat_info *info = opaque;
int err;
sigset_t all;
sigfillset(&all);
sigprocmask(SIG_BLOCK, &all, NULL);
do {
siginfo_t siginfo;
err = sigwaitinfo(&info->mask, &siginfo);
if (err == -1 && errno == EI... | true | qemu | 9e472e101f37233f4e32d181d2fee29014c1cf2f | static void *sigwait_compat(void *opaque)
{
struct sigfd_compat_info *info = opaque;
int err;
sigset_t all;
sigfillset(&all);
sigprocmask(SIG_BLOCK, &all, NULL);
do {
siginfo_t siginfo;
err = sigwaitinfo(&info->mask, &siginfo);
if (err == -1 && errno == EI... | {
"code": [
"static void *sigwait_compat(void *opaque)",
" struct sigfd_compat_info *info = opaque;",
" int err;",
" sigset_t all;",
" sigfillset(&all);",
" sigprocmask(SIG_BLOCK, &all, NULL);",
" do {",
" siginfo_t siginfo;",
" err = sigwaitinfo(&in... | static void *FUNC_0(void *VAR_0)
{
struct sigfd_compat_info *VAR_1 = VAR_0;
int VAR_2;
sigset_t all;
sigfillset(&all);
sigprocmask(SIG_BLOCK, &all, NULL);
do {
siginfo_t siginfo;
VAR_2 = sigwaitinfo(&VAR_1->mask, &siginfo);
if (VAR_2 == -1 && errno == EINT... | [
"static void *FUNC_0(void *VAR_0)\n{",
"struct sigfd_compat_info *VAR_1 = VAR_0;",
"int VAR_2;",
"sigset_t all;",
"sigfillset(&all);",
"sigprocmask(SIG_BLOCK, &all, NULL);",
"do {",
"siginfo_t siginfo;",
"VAR_2 = sigwaitinfo(&VAR_1->mask, &siginfo);",
"if (VAR_2 == -1 && errno == EINTR) {",
"VAR... | [
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53,... |
4,148 | static bool qvirtio_pci_get_queue_isr_status(QVirtioDevice *d, QVirtQueue *vq)
{
QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;
QVirtQueuePCI *vqpci = (QVirtQueuePCI *)vq;
uint32_t data;
if (dev->pdev->msix_enabled) {
g_assert_cmpint(vqpci->msix_entry, !=, -1);
if (qpci_msix_mas... | true | qemu | 1e34cf9681ec549e26f30daaabc1ce58d60446f7 | static bool qvirtio_pci_get_queue_isr_status(QVirtioDevice *d, QVirtQueue *vq)
{
QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;
QVirtQueuePCI *vqpci = (QVirtQueuePCI *)vq;
uint32_t data;
if (dev->pdev->msix_enabled) {
g_assert_cmpint(vqpci->msix_entry, !=, -1);
if (qpci_msix_mas... | {
"code": [
" writel(vqpci->msix_addr, 0);",
" return data == vqpci->msix_data;"
],
"line_no": [
27,
29
]
} | static bool FUNC_0(QVirtioDevice *d, QVirtQueue *vq)
{
QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;
QVirtQueuePCI *vqpci = (QVirtQueuePCI *)vq;
uint32_t data;
if (dev->pdev->msix_enabled) {
g_assert_cmpint(vqpci->msix_entry, !=, -1);
if (qpci_msix_masked(dev->pdev, vqpci->msix... | [
"static bool FUNC_0(QVirtioDevice *d, QVirtQueue *vq)\n{",
"QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;",
"QVirtQueuePCI *vqpci = (QVirtQueuePCI *)vq;",
"uint32_t data;",
"if (dev->pdev->msix_enabled) {",
"g_assert_cmpint(vqpci->msix_entry, !=, -1);",
"if (qpci_msix_masked(dev->pdev, vqpci->msix_entr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
4,149 | static void pxa2xx_pcmcia_realize(DeviceState *dev, Error **errp)
{
PXA2xxPCMCIAState *s = PXA2XX_PCMCIA(dev);
pcmcia_socket_register(&s->slot);
}
| true | qemu | 7797a73947d5c0e63dd5552b348cf66c384b4555 | static void pxa2xx_pcmcia_realize(DeviceState *dev, Error **errp)
{
PXA2xxPCMCIAState *s = PXA2XX_PCMCIA(dev);
pcmcia_socket_register(&s->slot);
}
| {
"code": [
"static void pxa2xx_pcmcia_realize(DeviceState *dev, Error **errp)",
" PXA2xxPCMCIAState *s = PXA2XX_PCMCIA(dev);",
" pcmcia_socket_register(&s->slot);"
],
"line_no": [
1,
5,
9
]
} | static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{
PXA2xxPCMCIAState *s = PXA2XX_PCMCIA(VAR_0);
pcmcia_socket_register(&s->slot);
}
| [
"static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{",
"PXA2xxPCMCIAState *s = PXA2XX_PCMCIA(VAR_0);",
"pcmcia_socket_register(&s->slot);",
"}"
] | [
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
4,150 | static int megasas_ld_get_info_submit(SCSIDevice *sdev, int lun,
MegasasCmd *cmd)
{
struct mfi_ld_info *info = cmd->iov_buf;
size_t dcmd_size = sizeof(struct mfi_ld_info);
uint8_t cdb[6];
SCSIRequest *req;
ssize_t len, resid;
uint16_t sdev_id = ((sde... | true | qemu | 87e459a810d7b1ec1638085b5a80ea3d9b43119a | static int megasas_ld_get_info_submit(SCSIDevice *sdev, int lun,
MegasasCmd *cmd)
{
struct mfi_ld_info *info = cmd->iov_buf;
size_t dcmd_size = sizeof(struct mfi_ld_info);
uint8_t cdb[6];
SCSIRequest *req;
ssize_t len, resid;
uint16_t sdev_id = ((sde... | {
"code": [
" SCSIRequest *req;",
" if (!req) {",
" len = scsi_req_enqueue(req);",
" scsi_req_continue(req);",
" if (!req) {",
" len = scsi_req_enqueue(req);",
" scsi_req_continue(req);",
" SCSIRequest *req;",
" req = s... | static int FUNC_0(SCSIDevice *VAR_0, int VAR_1,
MegasasCmd *VAR_2)
{
struct mfi_ld_info *VAR_3 = VAR_2->iov_buf;
size_t dcmd_size = sizeof(struct mfi_ld_info);
uint8_t cdb[6];
SCSIRequest *req;
ssize_t len, resid;
uint16_t sdev_id = ((VAR_0->id & 0xF... | [
"static int FUNC_0(SCSIDevice *VAR_0, int VAR_1,\nMegasasCmd *VAR_2)\n{",
"struct mfi_ld_info *VAR_3 = VAR_2->iov_buf;",
"size_t dcmd_size = sizeof(struct mfi_ld_info);",
"uint8_t cdb[6];",
"SCSIRequest *req;",
"ssize_t len, resid;",
"uint16_t sdev_id = ((VAR_0->id & 0xFF) << 8) | (VAR_1 & 0xFF);",
"u... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
4,151 | static void *migration_thread(void *opaque)
{
MigrationState *s = opaque;
int64_t initial_time = qemu_get_clock_ms(rt_clock);
int64_t initial_bytes = 0;
int64_t max_size = 0;
int64_t start_time = initial_time;
bool old_vm_running = false;
DPRINTF("beginning savevm\n");
qemu_sa... | true | qemu | d58f574bf39796ed2396dfd1e308352fbb03f944 | static void *migration_thread(void *opaque)
{
MigrationState *s = opaque;
int64_t initial_time = qemu_get_clock_ms(rt_clock);
int64_t initial_bytes = 0;
int64_t max_size = 0;
int64_t start_time = initial_time;
bool old_vm_running = false;
DPRINTF("beginning savevm\n");
qemu_sa... | {
"code": [
" migrate_finish_set_state(s, MIG_STATE_ERROR);",
" migrate_finish_set_state(s, MIG_STATE_COMPLETED);",
" migrate_finish_set_state(s, MIG_STATE_ERROR);"
],
"line_no": [
79,
89,
103
]
} | static void *FUNC_0(void *VAR_0)
{
MigrationState *s = VAR_0;
int64_t initial_time = qemu_get_clock_ms(rt_clock);
int64_t initial_bytes = 0;
int64_t max_size = 0;
int64_t start_time = initial_time;
bool old_vm_running = false;
DPRINTF("beginning savevm\n");
qemu_savevm_state_b... | [
"static void *FUNC_0(void *VAR_0)\n{",
"MigrationState *s = VAR_0;",
"int64_t initial_time = qemu_get_clock_ms(rt_clock);",
"int64_t initial_bytes = 0;",
"int64_t max_size = 0;",
"int64_t start_time = initial_time;",
"bool old_vm_running = false;",
"DPRINTF(\"beginning savevm\\n\");",
"qemu_savevm_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,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
4,152 | static av_always_inline void dnxhd_decode_dct_block(const DNXHDContext *ctx,
RowContext *row,
int n,
int index_bits,
... | true | FFmpeg | b8b8e82ea14016b2cb04b49ecea57f836e6ee7f8 | static av_always_inline void dnxhd_decode_dct_block(const DNXHDContext *ctx,
RowContext *row,
int n,
int index_bits,
... | {
"code": [
"static av_always_inline void dnxhd_decode_dct_block(const DNXHDContext *ctx,"
],
"line_no": [
1
]
} | static av_always_inline void FUNC_0(const DNXHDContext *ctx,
RowContext *row,
int n,
int index_bits,
int lev... | [
"static av_always_inline void FUNC_0(const DNXHDContext *ctx,\nRowContext *row,\nint n,\nint index_bits,\nint level_bias,\nint level_shift)\n{",
"int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5;",
"int VAR_6, VAR_7, VAR_8;",
"const int *VAR_9;",
"const uint8_t *VAR_10;",
"const uint8_t *VAR_11 = ctx->cid_tab... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
4,153 | static void coroutine_fn qed_co_pwrite_zeroes_cb(void *opaque, int ret)
{
QEDWriteZeroesCB *cb = opaque;
cb->done = true;
cb->ret = ret;
if (cb->co) {
qemu_coroutine_enter(cb->co, NULL);
}
}
| true | qemu | 0b8b8753e4d94901627b3e86431230f2319215c4 | static void coroutine_fn qed_co_pwrite_zeroes_cb(void *opaque, int ret)
{
QEDWriteZeroesCB *cb = opaque;
cb->done = true;
cb->ret = ret;
if (cb->co) {
qemu_coroutine_enter(cb->co, NULL);
}
}
| {
"code": [
" qemu_coroutine_enter(cb->co, NULL);",
" qemu_coroutine_enter(cb->co, NULL);"
],
"line_no": [
15,
15
]
} | static void VAR_0 qed_co_pwrite_zeroes_cb(void *opaque, int ret)
{
QEDWriteZeroesCB *cb = opaque;
cb->done = true;
cb->ret = ret;
if (cb->co) {
qemu_coroutine_enter(cb->co, NULL);
}
}
| [
"static void VAR_0 qed_co_pwrite_zeroes_cb(void *opaque, int ret)\n{",
"QEDWriteZeroesCB *cb = opaque;",
"cb->done = true;",
"cb->ret = ret;",
"if (cb->co) {",
"qemu_coroutine_enter(cb->co, NULL);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
4,154 | static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf,
int buf_size, AVSubtitle *sub)
{
DVBSubContext *ctx = avctx->priv_data;
DVBSubDisplayDefinition *display_def = ctx->display_definition;
DVBSubRegion *region;
DVBSubRegionDisplay... | true | FFmpeg | 1cfd566324f4a9be066ea400685b81c0695e64d9 | static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf,
int buf_size, AVSubtitle *sub)
{
DVBSubContext *ctx = avctx->priv_data;
DVBSubDisplayDefinition *display_def = ctx->display_definition;
DVBSubRegion *region;
DVBSubRegionDisplay... | {
"code": [
" if (sub->num_rects <= 0)",
" return AVERROR_INVALIDDATA;",
" sub->rects = av_mallocz_array(sub->num_rects * sub->num_rects,",
" sizeof(*sub->rects));",
" if (!sub->rects)",
" return AVERROR(ENOMEM);"
],
"line_no": [
... | static int FUNC_0(AVCodecContext *VAR_0, const uint8_t *VAR_1,
int VAR_2, AVSubtitle *VAR_3)
{
DVBSubContext *ctx = VAR_0->priv_data;
DVBSubDisplayDefinition *display_def = ctx->display_definition;
DVBSubRegion *region;
DVBSubRegionDisplay *display;
AVS... | [
"static int FUNC_0(AVCodecContext *VAR_0, const uint8_t *VAR_1,\nint VAR_2, AVSubtitle *VAR_3)\n{",
"DVBSubContext *ctx = VAR_0->priv_data;",
"DVBSubDisplayDefinition *display_def = ctx->display_definition;",
"DVBSubRegion *region;",
"DVBSubRegionDisplay *display;",
"AVSubtitleRect *rect;",
"DVBSubCLUT ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[... |
4,155 | DisplayState *init_displaystate(void)
{
gchar *name;
int i;
if (!display_state) {
display_state = g_new0(DisplayState, 1);
}
for (i = 0; i < nb_consoles; i++) {
if (consoles[i]->console_type != GRAPHIC_CONSOLE &&
consoles[i]->ds == NULL) {
text_c... | true | qemu | 333cb18ff4aaf249b2e81a376bee2b15370f4784 | DisplayState *init_displaystate(void)
{
gchar *name;
int i;
if (!display_state) {
display_state = g_new0(DisplayState, 1);
}
for (i = 0; i < nb_consoles; i++) {
if (consoles[i]->console_type != GRAPHIC_CONSOLE &&
consoles[i]->ds == NULL) {
text_c... | {
"code": [
" if (!display_state) {",
" display_state = g_new0(DisplayState, 1);"
],
"line_no": [
11,
13
]
} | DisplayState *FUNC_0(void)
{
gchar *name;
int VAR_0;
if (!display_state) {
display_state = g_new0(DisplayState, 1);
}
for (VAR_0 = 0; VAR_0 < nb_consoles; VAR_0++) {
if (consoles[VAR_0]->console_type != GRAPHIC_CONSOLE &&
consoles[VAR_0]->ds == NULL) {
... | [
"DisplayState *FUNC_0(void)\n{",
"gchar *name;",
"int VAR_0;",
"if (!display_state) {",
"display_state = g_new0(DisplayState, 1);",
"}",
"for (VAR_0 = 0; VAR_0 < nb_consoles; VAR_0++) {",
"if (consoles[VAR_0]->console_type != GRAPHIC_CONSOLE &&\nconsoles[VAR_0]->ds == NULL) {",
"text_console_do_init... | [
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
49
],
[
51
]
] |
4,156 | static void e1000e_device_init(QPCIBus *bus, e1000e_device *d)
{
uint32_t val;
d->pci_dev = e1000e_device_find(bus);
/* Enable the device */
qpci_device_enable(d->pci_dev);
/* Map BAR0 (mac registers) */
d->mac_regs = qpci_iomap(d->pci_dev, 0, NULL);
g_assert_nonnull(d->mac_reg... | true | qemu | b4ba67d9a702507793c2724e56f98e9b0f7be02b | static void e1000e_device_init(QPCIBus *bus, e1000e_device *d)
{
uint32_t val;
d->pci_dev = e1000e_device_find(bus);
qpci_device_enable(d->pci_dev);
d->mac_regs = qpci_iomap(d->pci_dev, 0, NULL);
g_assert_nonnull(d->mac_regs);
val = e1000e_macreg_read(d, E1000E_C... | {
"code": [
" g_assert_nonnull(d->mac_regs);"
],
"line_no": [
23
]
} | static void FUNC_0(QPCIBus *VAR_0, e1000e_device *VAR_1)
{
uint32_t val;
VAR_1->pci_dev = e1000e_device_find(VAR_0);
qpci_device_enable(VAR_1->pci_dev);
VAR_1->mac_regs = qpci_iomap(VAR_1->pci_dev, 0, NULL);
g_assert_nonnull(VAR_1->mac_regs);
val = e1000e_macreg_... | [
"static void FUNC_0(QPCIBus *VAR_0, e1000e_device *VAR_1)\n{",
"uint32_t val;",
"VAR_1->pci_dev = e1000e_device_find(VAR_0);",
"qpci_device_enable(VAR_1->pci_dev);",
"VAR_1->mac_regs = qpci_iomap(VAR_1->pci_dev, 0, NULL);",
"g_assert_nonnull(VAR_1->mac_regs);",
"val = e1000e_macreg_read(VAR_1, E1000E_CT... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
15
],
[
21
],
[
23
],
[
29
],
[
31
],
[
37
],
[
39
],
[
45
],
[
47,
49
],
[
55
],
[
57
],
[
63
],
[
65,
67
],
[
73
],
[
75
],
[
79... |
4,157 | static int scsi_disk_emulate_mode_sense(SCSIDiskReq *r, uint8_t *outbuf)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint64_t nb_sectors;
int page, dbd, buflen, ret, page_control;
uint8_t *p;
uint8_t dev_specific_param;
dbd = r->req.cmd.buf[1] & 0x8;
page = r-... | true | qemu | e2f0c49ffae8d3a00272c3cbc68850cc5aafbffa | static int scsi_disk_emulate_mode_sense(SCSIDiskReq *r, uint8_t *outbuf)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint64_t nb_sectors;
int page, dbd, buflen, ret, page_control;
uint8_t *p;
uint8_t dev_specific_param;
dbd = r->req.cmd.buf[1] & 0x8;
page = r-... | {
"code": [
" if (buflen > r->req.cmd.xfer) {",
" buflen = r->req.cmd.xfer;"
],
"line_no": [
173,
175
]
} | static int FUNC_0(SCSIDiskReq *VAR_0, uint8_t *VAR_1)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->req.dev);
uint64_t nb_sectors;
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;
uint8_t *p;
uint8_t dev_specific_param;
VAR_3 = VAR_0->req.cmd.buf[1] & 0x8;
VAR_2 = VAR_0->req.cm... | [
"static int FUNC_0(SCSIDiskReq *VAR_0, uint8_t *VAR_1)\n{",
"SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->req.dev);",
"uint64_t nb_sectors;",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;",
"uint8_t *p;",
"uint8_t dev_specific_param;",
"VAR_3 = VAR_0->req.cmd.buf[1] & 0x8;",
"VAR_2 = VAR_0->req... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[... |
4,158 | static int decode_block(MJpegDecodeContext *s, DCTELEM *block,
int component, int dc_index, int ac_index, int16_t *quant_matrix)
{
int code, i, j, level, val;
/* DC coef */
val = mjpeg_decode_dc(s, dc_index);
if (val == 0xffff) {
av_log(s->avctx, AV_LOG_ERROR, "e... | true | FFmpeg | 2111a191ebec422cf7781225cbcfdd69e71afce1 | static int decode_block(MJpegDecodeContext *s, DCTELEM *block,
int component, int dc_index, int ac_index, int16_t *quant_matrix)
{
int code, i, j, level, val;
val = mjpeg_decode_dc(s, dc_index);
if (val == 0xffff) {
av_log(s->avctx, AV_LOG_ERROR, "error dc\n");
... | {
"code": [
" for(;;) {"
],
"line_no": [
35
]
} | static int FUNC_0(MJpegDecodeContext *VAR_0, DCTELEM *VAR_1,
int VAR_2, int VAR_3, int VAR_4, int16_t *VAR_5)
{
int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;
VAR_10 = mjpeg_decode_dc(VAR_0, VAR_3);
if (VAR_10 == 0xffff) {
av_log(VAR_0->avctx, AV_LOG_ERROR, "error dc\n... | [
"static int FUNC_0(MJpegDecodeContext *VAR_0, DCTELEM *VAR_1,\nint VAR_2, int VAR_3, int VAR_4, int16_t *VAR_5)\n{",
"int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;",
"VAR_10 = mjpeg_decode_dc(VAR_0, VAR_3);",
"if (VAR_10 == 0xffff) {",
"av_log(VAR_0->avctx, AV_LOG_ERROR, \"error dc\\n\");",
"return -1;",
"}",... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
45,
47
],
[
49
],
[
51
],
[
53
],
... |
4,160 | static int decode_ext_header(Wmv2Context *w){
MpegEncContext * const s= &w->s;
GetBitContext gb;
int fps;
int code;
if(s->avctx->extradata_size<4) return -1;
init_get_bits(&gb, s->avctx->extradata, s->avctx->extradata_size*8);
fps = get_bits(&gb, 5);
s->bit_r... | true | FFmpeg | 3b99e00c7549ccad90c57b5bcd6e3456650a994a | static int decode_ext_header(Wmv2Context *w){
MpegEncContext * const s= &w->s;
GetBitContext gb;
int fps;
int code;
if(s->avctx->extradata_size<4) return -1;
init_get_bits(&gb, s->avctx->extradata, s->avctx->extradata_size*8);
fps = get_bits(&gb, 5);
s->bit_r... | {
"code": [
" init_get_bits(&gb, s->avctx->extradata, s->avctx->extradata_size*8);"
],
"line_no": [
17
]
} | static int FUNC_0(Wmv2Context *VAR_0){
MpegEncContext * const s= &VAR_0->s;
GetBitContext gb;
int VAR_1;
int VAR_2;
if(s->avctx->extradata_size<4) return -1;
init_get_bits(&gb, s->avctx->extradata, s->avctx->extradata_size*8);
VAR_1 = get_bits(&gb, 5);
s->bit... | [
"static int FUNC_0(Wmv2Context *VAR_0){",
"MpegEncContext * const s= &VAR_0->s;",
"GetBitContext gb;",
"int VAR_1;",
"int VAR_2;",
"if(s->avctx->extradata_size<4) return -1;",
"init_get_bits(&gb, s->avctx->extradata, s->avctx->extradata_size*8);",
"VAR_1 = get_bits(&gb, 5);",
"s->bit_... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
49
],
[
51,
53,... |
4,161 | static void tlb_flush_nocheck(CPUState *cpu)
{
CPUArchState *env = cpu->env_ptr;
/* The QOM tests will trigger tlb_flushes without setting up TCG
* so we bug out here in that case.
*/
if (!tcg_enabled()) {
return;
}
assert_cpu_is_self(cpu);
tlb_debug("(count: %d)\... | true | qemu | f3ced3c59287dabc253f83f0c70aa4934470c15e | static void tlb_flush_nocheck(CPUState *cpu)
{
CPUArchState *env = cpu->env_ptr;
if (!tcg_enabled()) {
return;
}
assert_cpu_is_self(cpu);
tlb_debug("(count: %d)\n", tlb_flush_count++);
tb_lock();
memset(env->tlb_table, -1, sizeof(env->tlb_table));
mems... | {
"code": [
" memset(cpu->tb_jmp_cache, 0, sizeof(cpu->tb_jmp_cache));",
" memset(cpu->tb_jmp_cache, 0, sizeof(cpu->tb_jmp_cache));"
],
"line_no": [
37,
37
]
} | static void FUNC_0(CPUState *VAR_0)
{
CPUArchState *env = VAR_0->env_ptr;
if (!tcg_enabled()) {
return;
}
assert_cpu_is_self(VAR_0);
tlb_debug("(count: %d)\n", tlb_flush_count++);
tb_lock();
memset(env->tlb_table, -1, sizeof(env->tlb_table));
memset(en... | [
"static void FUNC_0(CPUState *VAR_0)\n{",
"CPUArchState *env = VAR_0->env_ptr;",
"if (!tcg_enabled()) {",
"return;",
"}",
"assert_cpu_is_self(VAR_0);",
"tlb_debug(\"(count: %d)\\n\", tlb_flush_count++);",
"tb_lock();",
"memset(env->tlb_table, -1, sizeof(env->tlb_table));",
"memset(env->tlb_v_table... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
53
],
[
55
]
] |
4,162 | static void liveness_pass_1(TCGContext *s)
{
int nb_globals = s->nb_globals;
int oi, oi_prev;
tcg_la_func_end(s);
for (oi = s->gen_op_buf[0].prev; oi != 0; oi = oi_prev) {
int i, nb_iargs, nb_oargs;
TCGOpcode opc_new, opc_new2;
bool have_opc_new2;
TCGLifeData... | true | qemu | 15fa08f8451babc88d733bd411d4c94976f9d0f8 | static void liveness_pass_1(TCGContext *s)
{
int nb_globals = s->nb_globals;
int oi, oi_prev;
tcg_la_func_end(s);
for (oi = s->gen_op_buf[0].prev; oi != 0; oi = oi_prev) {
int i, nb_iargs, nb_oargs;
TCGOpcode opc_new, opc_new2;
bool have_opc_new2;
TCGLifeData... | {
"code": [
" TCGOp * const op = &s->gen_op_buf[oi];",
" int oi, oi_prev;",
" for (oi = s->gen_op_buf[0].prev; oi != 0; oi = oi_prev) {",
" TCGOp * const op = &s->gen_op_buf[oi];",
" oi_prev = op->prev;",
" TCGOp * const op = &s->gen_op_buf[oi];"
],
"line_... | static void FUNC_0(TCGContext *VAR_0)
{
int VAR_1 = VAR_0->VAR_1;
int VAR_2, VAR_3;
tcg_la_func_end(VAR_0);
for (VAR_2 = VAR_0->gen_op_buf[0].prev; VAR_2 != 0; VAR_2 = VAR_3) {
int VAR_4, VAR_5, VAR_6;
TCGOpcode opc_new, opc_new2;
bool have_opc_new2;
TCGLifeD... | [
"static void FUNC_0(TCGContext *VAR_0)\n{",
"int VAR_1 = VAR_0->VAR_1;",
"int VAR_2, VAR_3;",
"tcg_la_func_end(VAR_0);",
"for (VAR_2 = VAR_0->gen_op_buf[0].prev; VAR_2 != 0; VAR_2 = VAR_3) {",
"int VAR_4, VAR_5, VAR_6;",
"TCGOpcode opc_new, opc_new2;",
"bool have_opc_new2;",
"TCGLifeData arg_life = ... | [
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
41
],
[
43,
45
],
[
47
],
[
51
],
[
53
],
... |
4,163 | static uint64_t addrrange_end(AddrRange r)
{
return r.start + r.size;
}
| true | qemu | 8417cebfda193c7f9ca70be5e308eaa92cf84b94 | static uint64_t addrrange_end(AddrRange r)
{
return r.start + r.size;
}
| {
"code": [
"static uint64_t addrrange_end(AddrRange r)"
],
"line_no": [
1
]
} | static uint64_t FUNC_0(AddrRange r)
{
return r.start + r.size;
}
| [
"static uint64_t FUNC_0(AddrRange r)\n{",
"return r.start + r.size;",
"}"
] | [
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
4,164 | static void cqueue_free(cqueue *q)
{
av_free(q->elements);
av_free(q);
}
| true | FFmpeg | 70df51112ccc8d281cdb96141f20b3fd8a5b11f8 | static void cqueue_free(cqueue *q)
{
av_free(q->elements);
av_free(q);
}
| {
"code": [
" av_free(q->elements);"
],
"line_no": [
5
]
} | static void FUNC_0(cqueue *VAR_0)
{
av_free(VAR_0->elements);
av_free(VAR_0);
}
| [
"static void FUNC_0(cqueue *VAR_0)\n{",
"av_free(VAR_0->elements);",
"av_free(VAR_0);",
"}"
] | [
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
4,167 | static int alloc_scratch_buffers(H264SliceContext *sl, int linesize)
{
const H264Context *h = sl->h264;
int alloc_size = FFALIGN(FFABS(linesize) + 32, 32);
av_fast_malloc(&sl->bipred_scratchpad, &sl->bipred_scratchpad_allocated, 16 * 6 * alloc_size);
// edge emu needs blocksize + filter length - ... | true | FFmpeg | 6f37226b687f969bcf6e47a4fb5c28a32d107aa3 | static int alloc_scratch_buffers(H264SliceContext *sl, int linesize)
{
const H264Context *h = sl->h264;
int alloc_size = FFALIGN(FFABS(linesize) + 32, 32);
av_fast_malloc(&sl->bipred_scratchpad, &sl->bipred_scratchpad_allocated, 16 * 6 * alloc_size);
av_fast_malloc(&sl->edge_emu_buffe... | {
"code": [
" av_fast_malloc(&sl->top_borders[0], &sl->top_borders_allocated[0],",
" av_fast_malloc(&sl->top_borders[1], &sl->top_borders_allocated[1],"
],
"line_no": [
21,
25
]
} | static int FUNC_0(H264SliceContext *VAR_0, int VAR_1)
{
const H264Context *VAR_2 = VAR_0->h264;
int VAR_3 = FFALIGN(FFABS(VAR_1) + 32, 32);
av_fast_malloc(&VAR_0->bipred_scratchpad, &VAR_0->bipred_scratchpad_allocated, 16 * 6 * VAR_3);
av_fast_malloc(&VAR_0->edge_emu_buffer, &VAR_0->e... | [
"static int FUNC_0(H264SliceContext *VAR_0, int VAR_1)\n{",
"const H264Context *VAR_2 = VAR_0->h264;",
"int VAR_3 = FFALIGN(FFABS(VAR_1) + 32, 32);",
"av_fast_malloc(&VAR_0->bipred_scratchpad, &VAR_0->bipred_scratchpad_allocated, 16 * 6 * VAR_3);",
"av_fast_malloc(&VAR_0->edge_emu_buffer, &VAR_0->edge_emu_b... | [
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
17
],
[
21,
23
],
[
25,
27
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
... |
4,168 | static inline void RENAME(nv21ToUV)(uint8_t *dstU, uint8_t *dstV,
const uint8_t *src1, const uint8_t *src2,
int width, uint32_t *unused)
{
RENAME(nvXXtoUV)(dstV, dstU, src1, width);
}
| true | FFmpeg | c3ab0004ae4dffc32494ae84dd15cfaa909a7884 | static inline void RENAME(nv21ToUV)(uint8_t *dstU, uint8_t *dstV,
const uint8_t *src1, const uint8_t *src2,
int width, uint32_t *unused)
{
RENAME(nvXXtoUV)(dstV, dstU, src1, width);
}
| {
"code": [
" int width, uint32_t *unused)",
" int width, uint32_t *unused)"
],
"line_no": [
5,
5
]
} | static inline void FUNC_0(nv21ToUV)(uint8_t *dstU, uint8_t *dstV,
const uint8_t *src1, const uint8_t *src2,
int width, uint32_t *unused)
{
FUNC_0(nvXXtoUV)(dstV, dstU, src1, width);
}
| [
"static inline void FUNC_0(nv21ToUV)(uint8_t *dstU, uint8_t *dstV,\nconst uint8_t *src1, const uint8_t *src2,\nint width, uint32_t *unused)\n{",
"FUNC_0(nvXXtoUV)(dstV, dstU, src1, width);",
"}"
] | [
1,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
]
] |
4,169 | static void ehci_advance_periodic_state(EHCIState *ehci)
{
uint32_t entry;
uint32_t list;
const int async = 0;
// 4.6
switch(ehci_get_state(ehci, async)) {
case EST_INACTIVE:
if ( !(ehci->frindex & 7) && (ehci->usbcmd & USBCMD_PSE)) {
ehci_set_usbsts(ehci, USBSTS... | true | qemu | 4be23939ab0d7019c7e59a37485b416fbbf0f073 | static void ehci_advance_periodic_state(EHCIState *ehci)
{
uint32_t entry;
uint32_t list;
const int async = 0;
switch(ehci_get_state(ehci, async)) {
case EST_INACTIVE:
if ( !(ehci->frindex & 7) && (ehci->usbcmd & USBCMD_PSE)) {
ehci_set_usbsts(ehci, USBSTS_PSS);... | {
"code": [
" break;",
" ehci_queues_rip_unused(ehci, async);"
],
"line_no": [
31,
79
]
} | static void FUNC_0(EHCIState *VAR_0)
{
uint32_t entry;
uint32_t list;
const int VAR_1 = 0;
switch(ehci_get_state(VAR_0, VAR_1)) {
case EST_INACTIVE:
if ( !(VAR_0->frindex & 7) && (VAR_0->usbcmd & USBCMD_PSE)) {
ehci_set_usbsts(VAR_0, USBSTS_PSS);
eh... | [
"static void FUNC_0(EHCIState *VAR_0)\n{",
"uint32_t entry;",
"uint32_t list;",
"const int VAR_1 = 0;",
"switch(ehci_get_state(VAR_0, VAR_1)) {",
"case EST_INACTIVE:\nif ( !(VAR_0->frindex & 7) && (VAR_0->usbcmd & USBCMD_PSE)) {",
"ehci_set_usbsts(VAR_0, USBSTS_PSS);",
"ehci_set_state(VAR_0, VAR_1, ES... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
53
],
[
55
],
[
57
... |
4,171 | static void close_connection(HTTPContext *c)
{
HTTPContext **cp, *c1;
int i, nb_streams;
AVFormatContext *ctx;
URLContext *h;
AVStream *st;
/* remove connection from list */
cp = &first_http_ctx;
while ((*cp) != NULL) {
c1 = *cp;
if (c1 == c) {
*cp = c->next;
... | true | FFmpeg | 87638494cac0e58178a445b2c6436264b3af31e9 | static void close_connection(HTTPContext *c)
{
HTTPContext **cp, *c1;
int i, nb_streams;
AVFormatContext *ctx;
URLContext *h;
AVStream *st;
cp = &first_http_ctx;
while ((*cp) != NULL) {
c1 = *cp;
if (c1 == c) {
*cp = c->next;
} else {
cp =... | {
"code": [],
"line_no": []
} | static void FUNC_0(HTTPContext *VAR_0)
{
HTTPContext **cp, *c1;
int VAR_1, VAR_2;
AVFormatContext *ctx;
URLContext *h;
AVStream *st;
cp = &first_http_ctx;
while ((*cp) != NULL) {
c1 = *cp;
if (c1 == VAR_0) {
*cp = VAR_0->next;
} else {
cp ... | [
"static void FUNC_0(HTTPContext *VAR_0)\n{",
"HTTPContext **cp, *c1;",
"int VAR_1, VAR_2;",
"AVFormatContext *ctx;",
"URLContext *h;",
"AVStream *st;",
"cp = &first_http_ctx;",
"while ((*cp) != NULL) {",
"c1 = *cp;",
"if (c1 == VAR_0) {",
"*cp = VAR_0->next;",
"} else {",
"cp = &c1->next;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
17,
18
],
[
19
],
[
21
],
[
22
],
[
23
],
[
24
],
[
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.