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 |
|---|---|---|---|---|---|---|---|---|---|---|
20,371 | int rom_add_option(const char *file)
{
if (!rom_enable_driver_roms)
return 0;
return rom_add_file(file, "genroms", file, 0);
}
| false | qemu | bdb5ee3064d5ae786b0bcb6cf6ff4e3554a72990 | int rom_add_option(const char *file)
{
if (!rom_enable_driver_roms)
return 0;
return rom_add_file(file, "genroms", file, 0);
}
| {
"code": [],
"line_no": []
} | int FUNC_0(const char *VAR_0)
{
if (!rom_enable_driver_roms)
return 0;
return rom_add_file(VAR_0, "genroms", VAR_0, 0);
}
| [
"int FUNC_0(const char *VAR_0)\n{",
"if (!rom_enable_driver_roms)\nreturn 0;",
"return rom_add_file(VAR_0, \"genroms\", VAR_0, 0);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
]
] |
20,372 | static target_ulong h_client_architecture_support(PowerPCCPU *cpu_,
sPAPRMachineState *spapr,
target_ulong opcode,
target_ulong *args)
{
target_ulong list = ppc6... | false | qemu | 5b120785e70a9a48b43e3f1f156a10a015334a28 | static target_ulong h_client_architecture_support(PowerPCCPU *cpu_,
sPAPRMachineState *spapr,
target_ulong opcode,
target_ulong *args)
{
target_ulong list = ppc6... | {
"code": [],
"line_no": []
} | static target_ulong FUNC_0(PowerPCCPU *cpu_,
sPAPRMachineState *spapr,
target_ulong opcode,
target_ulong *args)
{
target_ulong list = ppc64_phys_to_real(args[0])... | [
"static target_ulong FUNC_0(PowerPCCPU *cpu_,\nsPAPRMachineState *spapr,\ntarget_ulong opcode,\ntarget_ulong *args)\n{",
"target_ulong list = ppc64_phys_to_real(args[0]);",
"target_ulong ov_table;",
"PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu_);",
"CPUState *cs;",
"bool cpu_match = false, cpu_update... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[... |
20,373 | static void rtas_ibm_configure_connector(PowerPCCPU *cpu,
sPAPRMachineState *spapr,
uint32_t token, uint32_t nargs,
target_ulong args, uint32_t nret,
ta... | false | qemu | 4445b1d27ee65ceee12b71bc20242996c8eb5cf8 | static void rtas_ibm_configure_connector(PowerPCCPU *cpu,
sPAPRMachineState *spapr,
uint32_t token, uint32_t nargs,
target_ulong args, uint32_t nret,
ta... | {
"code": [],
"line_no": []
} | static void FUNC_0(PowerPCCPU *VAR_0,
sPAPRMachineState *VAR_1,
uint32_t VAR_2, uint32_t VAR_3,
target_ulong VAR_4, uint32_t VAR_5,
target_ulong VAR_6)
... | [
"static void FUNC_0(PowerPCCPU *VAR_0,\nsPAPRMachineState *VAR_1,\nuint32_t VAR_2, uint32_t VAR_3,\ntarget_ulong VAR_4, uint32_t VAR_5,\ntarget_ulong VAR_6)\n{",
"uint64_t wa_addr;",
"uint64_t wa_offset;",
"uint32_t drc_index;",
"sPAPRDRConnector *drc;",
"sPAPRDRConnectorClass *drck;",
"sPAPRConfigureCo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
... |
20,374 | static void term_show_prompt2(void)
{
term_printf("(qemu) ");
fflush(stdout);
term_last_cmd_buf_index = 0;
term_last_cmd_buf_size = 0;
term_esc_state = IS_NORM;
}
| false | qemu | 7e2515e87c41e2e658aaed466e11cbdf1ea8bcb1 | static void term_show_prompt2(void)
{
term_printf("(qemu) ");
fflush(stdout);
term_last_cmd_buf_index = 0;
term_last_cmd_buf_size = 0;
term_esc_state = IS_NORM;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
term_printf("(qemu) ");
fflush(stdout);
term_last_cmd_buf_index = 0;
term_last_cmd_buf_size = 0;
term_esc_state = IS_NORM;
}
| [
"static void FUNC_0(void)\n{",
"term_printf(\"(qemu) \");",
"fflush(stdout);",
"term_last_cmd_buf_index = 0;",
"term_last_cmd_buf_size = 0;",
"term_esc_state = IS_NORM;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
20,375 | static void pxa2xx_lcdc_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
PXA2xxLCDState *s = (PXA2xxLCDState *) opaque;
int ch;
switch (offset) {
case LCCR0:
/* ACK Quick Disable done */
if ((s->control[0] & LCCR0_ENB) && !(value... | false | qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | static void pxa2xx_lcdc_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
PXA2xxLCDState *s = (PXA2xxLCDState *) opaque;
int ch;
switch (offset) {
case LCCR0:
if ((s->control[0] & LCCR0_ENB) && !(value & LCCR0_ENB))
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
PXA2xxLCDState *s = (PXA2xxLCDState *) VAR_0;
int VAR_4;
switch (VAR_1) {
case LCCR0:
if ((s->control[0] & LCCR0_ENB) && !(VAR_2 & LCCR0_ENB))
s->status[0... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"PXA2xxLCDState *s = (PXA2xxLCDState *) VAR_0;",
"int VAR_4;",
"switch (VAR_1) {",
"case LCCR0:\nif ((s->control[0] & LCCR0_ENB) && !(VAR_2 & LCCR0_ENB))\ns->status[0] |= LCSR0_QD;",
"if (!(s->control[0] & LCCR0_LCDT) && ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25,
27
],
[
31,
33,
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53,
55
],
[
57
],
[
61,
63
],
[
65
... |
20,376 | static void v9fs_clunk(void *opaque)
{
int err;
int32_t fid;
size_t offset = 7;
V9fsFidState *fidp;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "d", &fid);
trace_v9fs_clunk(pdu->tag, pdu->id, fid);
fidp = clunk_fid(s, fid);
if (fidp == ... | false | qemu | ddca7f86ac022289840e0200fd4050b2b58e9176 | static void v9fs_clunk(void *opaque)
{
int err;
int32_t fid;
size_t offset = 7;
V9fsFidState *fidp;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "d", &fid);
trace_v9fs_clunk(pdu->tag, pdu->id, fid);
fidp = clunk_fid(s, fid);
if (fidp == ... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
int VAR_1;
int32_t fid;
size_t offset = 7;
V9fsFidState *fidp;
V9fsPDU *pdu = VAR_0;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "d", &fid);
trace_v9fs_clunk(pdu->tag, pdu->id, fid);
fidp = clunk_fid(s, fid);
if (fidp == NULL... | [
"static void FUNC_0(void *VAR_0)\n{",
"int VAR_1;",
"int32_t fid;",
"size_t offset = 7;",
"V9fsFidState *fidp;",
"V9fsPDU *pdu = VAR_0;",
"V9fsState *s = pdu->s;",
"pdu_unmarshal(pdu, offset, \"d\", &fid);",
"trace_v9fs_clunk(pdu->tag, pdu->id, fid);",
"fidp = clunk_fid(s, fid);",
"if (fidp == N... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
43
],
[
45
],
[
49
],
[
51,
53
],
[
55
]
] |
20,377 | static void pcie_aer_update_log(PCIDevice *dev, const PCIEAERErr *err)
{
uint8_t *aer_cap = dev->config + dev->exp.aer_cap;
uint8_t first_bit = ffs(err->status) - 1;
uint32_t errcap = pci_get_long(aer_cap + PCI_ERR_CAP);
int i;
assert(err->status);
assert(!(err->status & (err->status - ... | false | qemu | 786a4ea82ec9c87e3a895cf41081029b285a5fe5 | static void pcie_aer_update_log(PCIDevice *dev, const PCIEAERErr *err)
{
uint8_t *aer_cap = dev->config + dev->exp.aer_cap;
uint8_t first_bit = ffs(err->status) - 1;
uint32_t errcap = pci_get_long(aer_cap + PCI_ERR_CAP);
int i;
assert(err->status);
assert(!(err->status & (err->status - ... | {
"code": [],
"line_no": []
} | static void FUNC_0(PCIDevice *VAR_0, const PCIEAERErr *VAR_1)
{
uint8_t *aer_cap = VAR_0->config + VAR_0->exp.aer_cap;
uint8_t first_bit = ffs(VAR_1->status) - 1;
uint32_t errcap = pci_get_long(aer_cap + PCI_ERR_CAP);
int VAR_2;
assert(VAR_1->status);
assert(!(VAR_1->status & (VAR_1->st... | [
"static void FUNC_0(PCIDevice *VAR_0, const PCIEAERErr *VAR_1)\n{",
"uint8_t *aer_cap = VAR_0->config + VAR_0->exp.aer_cap;",
"uint8_t first_bit = ffs(VAR_1->status) - 1;",
"uint32_t errcap = pci_get_long(aer_cap + PCI_ERR_CAP);",
"int VAR_2;",
"assert(VAR_1->status);",
"assert(!(VAR_1->status & (VAR_1-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51,
53,... |
20,378 | static int hdev_create(const char *filename, QEMUOptionParameter *options)
{
int fd;
int ret = 0;
struct stat stat_buf;
int64_t total_size = 0;
/* Read out options */
while (options && options->name) {
if (!strcmp(options->name, "size")) {
total_size = options->val... | false | qemu | 4099df586a0f16522383c4e4a9613e7c2dcd2491 | static int hdev_create(const char *filename, QEMUOptionParameter *options)
{
int fd;
int ret = 0;
struct stat stat_buf;
int64_t total_size = 0;
while (options && options->name) {
if (!strcmp(options->name, "size")) {
total_size = options->value.n / 512;
}... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, QEMUOptionParameter *VAR_1)
{
int VAR_2;
int VAR_3 = 0;
struct stat VAR_4;
int64_t total_size = 0;
while (VAR_1 && VAR_1->name) {
if (!strcmp(VAR_1->name, "size")) {
total_size = VAR_1->value.n / 512;
}
VAR_1+... | [
"static int FUNC_0(const char *VAR_0, QEMUOptionParameter *VAR_1)\n{",
"int VAR_2;",
"int VAR_3 = 0;",
"struct stat VAR_4;",
"int64_t total_size = 0;",
"while (VAR_1 && VAR_1->name) {",
"if (!strcmp(VAR_1->name, \"size\")) {",
"total_size = VAR_1->value.n / 512;",
"}",
"VAR_1++;",
"}",
"VAR_2 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33,
35
],
[
39,
41
],
[
43,
45
],
[
47,
49
],
[
53
],
[
55
... |
20,379 | void net_rx_pkt_set_protocols(struct NetRxPkt *pkt, const void *data,
size_t len)
{
assert(pkt);
eth_get_protocols(data, len, &pkt->isip4, &pkt->isip6,
&pkt->isudp, &pkt->istcp);
}
| false | qemu | eb700029c7836798046191d62d595363d92c84d4 | void net_rx_pkt_set_protocols(struct NetRxPkt *pkt, const void *data,
size_t len)
{
assert(pkt);
eth_get_protocols(data, len, &pkt->isip4, &pkt->isip6,
&pkt->isudp, &pkt->istcp);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(struct NetRxPkt *VAR_0, const void *VAR_1,
size_t VAR_2)
{
assert(VAR_0);
eth_get_protocols(VAR_1, VAR_2, &VAR_0->isip4, &VAR_0->isip6,
&VAR_0->isudp, &VAR_0->istcp);
}
| [
"void FUNC_0(struct NetRxPkt *VAR_0, const void *VAR_1,\nsize_t VAR_2)\n{",
"assert(VAR_0);",
"eth_get_protocols(VAR_1, VAR_2, &VAR_0->isip4, &VAR_0->isip6,\n&VAR_0->isudp, &VAR_0->istcp);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11,
13
],
[
15
]
] |
20,380 | static int decode_frame(AVCodecContext *avctx,
void *data,
int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
const uint8_t *buf_end = avpkt->data + avpkt->size;
int buf_size = avpkt->size;
DPXContext... | false | FFmpeg | 0abab003034145a33077a613807165055013030a | static int decode_frame(AVCodecContext *avctx,
void *data,
int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
const uint8_t *buf_end = avpkt->data + avpkt->size;
int buf_size = avpkt->size;
DPXContext... | {
"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;
const uint8_t *VAR_5 = VAR_3->VAR_1 + VAR_3->size;
int VAR_6 = VAR_3->size;
DPXContext *const s ... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1,\nint *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"const uint8_t *VAR_5 = VAR_3->VAR_1 + VAR_3->size;",
"int VAR_6 = VAR_3->size;",
"DPXContext *const s = VAR_0->priv_data;",
"AVFrame *picture = VAR_1;",
"AVFrame *c... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[... |
20,381 | static int hls_write_trailer(struct AVFormatContext *s)
{
HLSContext *hls = s->priv_data;
AVFormatContext *oc = hls->avf;
av_write_trailer(oc);
avio_closep(&oc->pb);
avformat_free_context(oc);
av_free(hls->basename);
append_entry(hls, hls->duration);
hls_window(s, 1);
f... | false | FFmpeg | 9f61abc8111c7c43f49ca012e957a108b9cc7610 | static int hls_write_trailer(struct AVFormatContext *s)
{
HLSContext *hls = s->priv_data;
AVFormatContext *oc = hls->avf;
av_write_trailer(oc);
avio_closep(&oc->pb);
avformat_free_context(oc);
av_free(hls->basename);
append_entry(hls, hls->duration);
hls_window(s, 1);
f... | {
"code": [],
"line_no": []
} | static int FUNC_0(struct AVFormatContext *VAR_0)
{
HLSContext *hls = VAR_0->priv_data;
AVFormatContext *VAR_1 = hls->avf;
av_write_trailer(VAR_1);
avio_closep(&VAR_1->pb);
avformat_free_context(VAR_1);
av_free(hls->basename);
append_entry(hls, hls->duration);
hls_window(VAR_0,... | [
"static int FUNC_0(struct AVFormatContext *VAR_0)\n{",
"HLSContext *hls = VAR_0->priv_data;",
"AVFormatContext *VAR_1 = hls->avf;",
"av_write_trailer(VAR_1);",
"avio_closep(&VAR_1->pb);",
"avformat_free_context(VAR_1);",
"av_free(hls->basename);",
"append_entry(hls, hls->duration);",
"hls_window(VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
]
] |
20,382 | static int g726_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
G726Context *c = avctx->priv_data;
int16_t *samples = data;
GetBitContext... | false | FFmpeg | c8d36d254e298a51ea569b2557451d26499d0f88 | static int g726_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
G726Context *c = avctx->priv_data;
int16_t *samples = data;
GetBitContext... | {
"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;
G726Context *c = VAR_0->priv_data;
int16_t *samples = VAR_1;
GetBitContext gb;
i... | [
"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;",
"G726Context *c = VAR_0->priv_data;",
"int16_t *samples = VAR_1;",
"GetBitContext gb;",
"init_get_bits(&gb, VAR_4, VAR_5 * 8);",
"while (get_bi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25,
27
],
[
31,
33
],
[
37
],
[
39
],
[
41
]
] |
20,383 | static inline void downmix_mono_to_stereo(float *samples)
{
int i;
for (i = 0; i < 256; i++)
samples[i + 256] = samples[i];
}
| false | FFmpeg | 0058584580b87feb47898e60e4b80c7f425882ad | static inline void downmix_mono_to_stereo(float *samples)
{
int i;
for (i = 0; i < 256; i++)
samples[i + 256] = samples[i];
}
| {
"code": [],
"line_no": []
} | static inline void FUNC_0(float *VAR_0)
{
int VAR_1;
for (VAR_1 = 0; VAR_1 < 256; VAR_1++)
VAR_0[VAR_1 + 256] = VAR_0[VAR_1];
}
| [
"static inline void FUNC_0(float *VAR_0)\n{",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < 256; VAR_1++)",
"VAR_0[VAR_1 + 256] = VAR_0[VAR_1];",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
]
] |
20,384 | dshow_cycle_devices(AVFormatContext *avctx, ICreateDevEnum *devenum,
enum dshowDeviceType devtype, enum dshowSourceFilterType sourcetype, IBaseFilter **pfilter)
{
struct dshow_ctx *ctx = avctx->priv_data;
IBaseFilter *device_filter = NULL;
IEnumMoniker *classenum = NULL;
IMonik... | false | FFmpeg | c33ffc7b21b9531a971b5da1edcae0b308fe88aa | dshow_cycle_devices(AVFormatContext *avctx, ICreateDevEnum *devenum,
enum dshowDeviceType devtype, enum dshowSourceFilterType sourcetype, IBaseFilter **pfilter)
{
struct dshow_ctx *ctx = avctx->priv_data;
IBaseFilter *device_filter = NULL;
IEnumMoniker *classenum = NULL;
IMonik... | {
"code": [],
"line_no": []
} | FUNC_0(AVFormatContext *VAR_0, ICreateDevEnum *VAR_1,
enum dshowDeviceType VAR_2, enum dshowSourceFilterType VAR_3, IBaseFilter **VAR_4)
{
struct dshow_ctx *VAR_5 = VAR_0->priv_data;
IBaseFilter *device_filter = NULL;
IEnumMoniker *classenum = NULL;
IMoniker *m = NULL;
con... | [
"FUNC_0(AVFormatContext *VAR_0, ICreateDevEnum *VAR_1,\nenum dshowDeviceType VAR_2, enum dshowSourceFilterType VAR_3, IBaseFilter **VAR_4)\n{",
"struct dshow_ctx *VAR_5 = VAR_0->priv_data;",
"IBaseFilter *device_filter = NULL;",
"IEnumMoniker *classenum = NULL;",
"IMoniker *m = NULL;",
"const char *VAR_6 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
51
... |
20,386 | static void rgb24_to_yuvj444p(AVPicture *dst, AVPicture *src,
int width, int height)
{
int src_wrap, x, y;
int r, g, b;
uint8_t *lum, *cb, *cr;
const uint8_t *p;
lum = dst->data[0];
cb = dst->data[1];
cr = dst->data[2];
src_wrap = src->linesize... | false | FFmpeg | 7e7e59409294af9caa63808e56c5cc824c98b4fc | static void rgb24_to_yuvj444p(AVPicture *dst, AVPicture *src,
int width, int height)
{
int src_wrap, x, y;
int r, g, b;
uint8_t *lum, *cb, *cr;
const uint8_t *p;
lum = dst->data[0];
cb = dst->data[1];
cr = dst->data[2];
src_wrap = src->linesize... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVPicture *VAR_0, AVPicture *VAR_1,
int VAR_2, int VAR_3)
{
int VAR_4, VAR_5, VAR_6;
int VAR_7, VAR_8, VAR_9;
uint8_t *lum, *cb, *cr;
const uint8_t *VAR_10;
lum = VAR_0->data[0];
cb = VAR_0->data[1];
cr = VAR_0->data[2];
VAR_... | [
"static void FUNC_0(AVPicture *VAR_0, AVPicture *VAR_1,\nint VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6;",
"int VAR_7, VAR_8, VAR_9;",
"uint8_t *lum, *cb, *cr;",
"const uint8_t *VAR_10;",
"lum = VAR_0->data[0];",
"cb = VAR_0->data[1];",
"cr = VAR_0->data[2];",
"VAR_4 = VAR_1->linesize[0] - 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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
20,387 | static int vf_open(vf_instance_t *vf, char *args){
vf->config=config;
vf->put_image=put_image;
vf->get_image=get_image;
vf->query_format=query_format;
vf->uninit=uninit;
vf->control= control;
vf->priv=malloc(sizeof(struct vf_priv_s));
memset(vf->priv, 0, sizeof(struct vf_priv_s))... | false | FFmpeg | 70205f1799252c3363a5bb5ea7ea5df090f2c88f | static int vf_open(vf_instance_t *vf, char *args){
vf->config=config;
vf->put_image=put_image;
vf->get_image=get_image;
vf->query_format=query_format;
vf->uninit=uninit;
vf->control= control;
vf->priv=malloc(sizeof(struct vf_priv_s));
memset(vf->priv, 0, sizeof(struct vf_priv_s))... | {
"code": [],
"line_no": []
} | static int FUNC_0(vf_instance_t *VAR_0, char *VAR_1){
VAR_0->config=config;
VAR_0->put_image=put_image;
VAR_0->get_image=get_image;
VAR_0->query_format=query_format;
VAR_0->uninit=uninit;
VAR_0->control= control;
VAR_0->priv=malloc(sizeof(struct vf_priv_s));
memset(VAR_0->priv, 0... | [
"static int FUNC_0(vf_instance_t *VAR_0, char *VAR_1){",
"VAR_0->config=config;",
"VAR_0->put_image=put_image;",
"VAR_0->get_image=get_image;",
"VAR_0->query_format=query_format;",
"VAR_0->uninit=uninit;",
"VAR_0->control= control;",
"VAR_0->priv=malloc(sizeof(struct vf_priv_s));",
"memset(VAR_0->pr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25,
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
49,
51
],
[
53
... |
20,388 | static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags, ID3v2ExtraMeta **extra_meta)
{
int isv34, tlen, unsync;
char tag[5];
int64_t next, end = avio_tell(s->pb) + len;
int taghdrlen;
const char *reason = NULL;
AVIOContext pb;
AVIOContext *pbx;
un... | false | FFmpeg | 1e18d32d01fc0ac784a0d592b46215bfbdcc579d | static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags, ID3v2ExtraMeta **extra_meta)
{
int isv34, tlen, unsync;
char tag[5];
int64_t next, end = avio_tell(s->pb) + len;
int taghdrlen;
const char *reason = NULL;
AVIOContext pb;
AVIOContext *pbx;
un... | {
"code": [],
"line_no": []
} | VAR_15staticVAR_15 VAR_15voidVAR_15 VAR_15ff_id3v2_parseVAR_15(VAR_15AVFormatContextVAR_15 *VAR_15VAR_0VAR_15, VAR_15intVAR_15 VAR_15VAR_1VAR_15, VAR_15uint8_tVAR_15 VAR_15VAR_2VAR_15, VAR_15uint8_tVAR_15 VAR_15VAR_3VAR_15, VAR_15ID3v2ExtraMetaVAR_15 **VAR_15VAR_4VAR_15)
{
VAR_15intVAR_15 VAR_15VAR_5VAR_15, VAR_1... | [
"VAR_15staticVAR_15 VAR_15voidVAR_15 VAR_15ff_id3v2_parseVAR_15(VAR_15AVFormatContextVAR_15 *VAR_15VAR_0VAR_15, VAR_15intVAR_15 VAR_15VAR_1VAR_15, VAR_15uint8_tVAR_15 VAR_15VAR_2VAR_15, VAR_15uint8_tVAR_15 VAR_15VAR_3VAR_15, VAR_15ID3v2ExtraMetaVAR_15 **VAR_15VAR_4VAR_15)\n{",
"VAR_15intVAR_15 VAR_15VAR_5VAR_15, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
20,389 | static int eval_refl(int *refl, const int16_t *coefs, RA144Context *ractx)
{
int b, c, i;
unsigned int u;
int buffer1[10];
int buffer2[10];
int *bp1 = buffer1;
int *bp2 = buffer2;
for (i=0; i < 10; i++)
buffer2[i] = coefs[i];
refl[9] = bp2[9];
if ((unsigned) ... | false | FFmpeg | b888abe1be9f0b3c75273c28e9a7b58fe47d5ec4 | static int eval_refl(int *refl, const int16_t *coefs, RA144Context *ractx)
{
int b, c, i;
unsigned int u;
int buffer1[10];
int buffer2[10];
int *bp1 = buffer1;
int *bp2 = buffer2;
for (i=0; i < 10; i++)
buffer2[i] = coefs[i];
refl[9] = bp2[9];
if ((unsigned) ... | {
"code": [],
"line_no": []
} | static int FUNC_0(int *VAR_0, const int16_t *VAR_1, RA144Context *VAR_2)
{
int VAR_3, VAR_4, VAR_5;
unsigned int VAR_6;
int VAR_7[10];
int VAR_8[10];
int *VAR_9 = VAR_7;
int *VAR_10 = VAR_8;
for (VAR_5=0; VAR_5 < 10; VAR_5++)
VAR_8[VAR_5] = VAR_1[VAR_5];
VAR_0[9] = ... | [
"static int FUNC_0(int *VAR_0, const int16_t *VAR_1, RA144Context *VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5;",
"unsigned int VAR_6;",
"int VAR_7[10];",
"int VAR_8[10];",
"int *VAR_9 = VAR_7;",
"int *VAR_10 = VAR_8;",
"for (VAR_5=0; VAR_5 < 10; VAR_5++)",
"VAR_8[VAR_5] = VAR_1[VAR_5];",
"VAR_0[9] = VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45,
47
],
[
51
],
[
53
],
[... |
20,390 | static char *sdp_media_attributes(char *buff, int size, AVCodecContext *c, int payload_type)
{
char *config = NULL;
switch (c->codec_id) {
case CODEC_ID_MPEG4:
if (c->flags & CODEC_FLAG_GLOBAL_HEADER) {
config = extradata2config(c->extradata, c->extradata_size);
... | false | FFmpeg | 21b37480291e827ad6af26df283f734381a9fb75 | static char *sdp_media_attributes(char *buff, int size, AVCodecContext *c, int payload_type)
{
char *config = NULL;
switch (c->codec_id) {
case CODEC_ID_MPEG4:
if (c->flags & CODEC_FLAG_GLOBAL_HEADER) {
config = extradata2config(c->extradata, c->extradata_size);
... | {
"code": [],
"line_no": []
} | static char *FUNC_0(char *VAR_0, int VAR_1, AVCodecContext *VAR_2, int VAR_3)
{
char *VAR_4 = NULL;
switch (VAR_2->codec_id) {
case CODEC_ID_MPEG4:
if (VAR_2->flags & CODEC_FLAG_GLOBAL_HEADER) {
VAR_4 = extradata2config(VAR_2->extradata, VAR_2->extradata_size);
... | [
"static char *FUNC_0(char *VAR_0, int VAR_1, AVCodecContext *VAR_2, int VAR_3)\n{",
"char *VAR_4 = NULL;",
"switch (VAR_2->codec_id) {",
"case CODEC_ID_MPEG4:\nif (VAR_2->flags & CODEC_FLAG_GLOBAL_HEADER) {",
"VAR_4 = extradata2config(VAR_2->extradata, VAR_2->extradata_size);",
"}",
"av_strlcatf(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
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19,
21,
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
... |
20,391 | static int mpegvideo_parse(AVCodecParserContext *s,
AVCodecContext *avctx,
const uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size)
{
ParseContext1 *pc1 = s->priv_data;
ParseContext *pc= &pc1->pc;
in... | false | FFmpeg | a4c7a5ea27050a28625eabf1ba98cfef9ac6620d | static int mpegvideo_parse(AVCodecParserContext *s,
AVCodecContext *avctx,
const uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size)
{
ParseContext1 *pc1 = s->priv_data;
ParseContext *pc= &pc1->pc;
in... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecParserContext *VAR_0,
AVCodecContext *VAR_1,
const uint8_t **VAR_2, int *VAR_3,
const uint8_t *VAR_4, int VAR_5)
{
ParseContext1 *pc1 = VAR_0->priv_data;
ParseContext *pc= &pc1->pc;
int VAR_6;
... | [
"static int FUNC_0(AVCodecParserContext *VAR_0,\nAVCodecContext *VAR_1,\nconst uint8_t **VAR_2, int *VAR_3,\nconst uint8_t *VAR_4, int VAR_5)\n{",
"ParseContext1 *pc1 = VAR_0->priv_data;",
"ParseContext *pc= &pc1->pc;",
"int VAR_6;",
"if(VAR_0->flags & PARSER_FLAG_COMPLETE_FRAMES){",
"VAR_6= VAR_5;",
"}... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
49
],
[
51,
53,
55
],
[
57,
61
... |
20,392 | int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count)
{
int i, av_uninit(j);
int current_ref_assigned = 0, err = 0;
H264Picture *av_uninit(pic);
if ((h->avctx->debug & FF_DEBUG_MMCO) && mmco_count == 0)
av_log(h->avctx, AV_LOG_DEBUG, "no mmco here\n");
fo... | false | FFmpeg | 3176217c60ca7828712985092d9102d331ea4f3d | int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count)
{
int i, av_uninit(j);
int current_ref_assigned = 0, err = 0;
H264Picture *av_uninit(pic);
if ((h->avctx->debug & FF_DEBUG_MMCO) && mmco_count == 0)
av_log(h->avctx, AV_LOG_DEBUG, "no mmco here\n");
fo... | {
"code": [],
"line_no": []
} | int FUNC_0(H264Context *VAR_0, MMCO *VAR_1, int VAR_2)
{
int VAR_3, FUNC_2(j);
int VAR_4 = 0, VAR_5 = 0;
H264Picture *FUNC_2(pic);
if ((VAR_0->avctx->debug & FF_DEBUG_MMCO) && VAR_2 == 0)
av_log(VAR_0->avctx, AV_LOG_DEBUG, "no VAR_1 here\n");
for (VAR_3 = 0; VAR_3 < VAR_2; VAR_3++... | [
"int FUNC_0(H264Context *VAR_0, MMCO *VAR_1, int VAR_2)\n{",
"int VAR_3, FUNC_2(j);",
"int VAR_4 = 0, VAR_5 = 0;",
"H264Picture *FUNC_2(pic);",
"if ((VAR_0->avctx->debug & FF_DEBUG_MMCO) && VAR_2 == 0)\nav_log(VAR_0->avctx, AV_LOG_DEBUG, \"no VAR_1 here\\n\");",
"for (VAR_3 = 0; VAR_3 < VAR_2; VAR_3++) {"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21
],
[
23,
25,
27
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41,
43,
45
],
[
47
],
[
49
],
[
51
],
[
53
... |
20,393 | static int libschroedinger_encode_close(AVCodecContext *avctx)
{
SchroEncoderParams *p_schro_params = avctx->priv_data;
/* Close the encoder. */
schro_encoder_free(p_schro_params->encoder);
/* Free data in the output frame queue. */
ff_schro_queue_free(&p_schro_params->enc_frame_queue,
... | false | FFmpeg | d6604b29ef544793479d7fb4e05ef6622bb3e534 | static int libschroedinger_encode_close(AVCodecContext *avctx)
{
SchroEncoderParams *p_schro_params = avctx->priv_data;
schro_encoder_free(p_schro_params->encoder);
ff_schro_queue_free(&p_schro_params->enc_frame_queue,
libschroedinger_free_frame);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0)
{
SchroEncoderParams *p_schro_params = VAR_0->priv_data;
schro_encoder_free(p_schro_params->encoder);
ff_schro_queue_free(&p_schro_params->enc_frame_queue,
libschroedinger_free_frame);
if (p_schro_params->en... | [
"static int FUNC_0(AVCodecContext *VAR_0)\n{",
"SchroEncoderParams *p_schro_params = VAR_0->priv_data;",
"schro_encoder_free(p_schro_params->encoder);",
"ff_schro_queue_free(&p_schro_params->enc_frame_queue,\nlibschroedinger_free_frame);",
"if (p_schro_params->enc_buf_size)\nav_freep(&p_schro_params->enc_bu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11
],
[
17,
19
],
[
27,
29
],
[
35
],
[
39
],
[
43
],
[
45
]
] |
20,394 | static void apply_window_mp3(float *in, float *win, int *unused, float *out,
int incr)
{
LOCAL_ALIGNED_16(float, suma, [17]);
LOCAL_ALIGNED_16(float, sumb, [17]);
LOCAL_ALIGNED_16(float, sumc, [17]);
LOCAL_ALIGNED_16(float, sumd, [17]);
float sum;
/* copy... | false | FFmpeg | f3e084909bff422f0c853507a82f92ff2efc0d28 | static void apply_window_mp3(float *in, float *win, int *unused, float *out,
int incr)
{
LOCAL_ALIGNED_16(float, suma, [17]);
LOCAL_ALIGNED_16(float, sumb, [17]);
LOCAL_ALIGNED_16(float, sumc, [17]);
LOCAL_ALIGNED_16(float, sumd, [17]);
float sum;
m... | {
"code": [],
"line_no": []
} | static void FUNC_0(float *VAR_0, float *VAR_1, int *VAR_2, float *VAR_3,
int VAR_4)
{
LOCAL_ALIGNED_16(float, suma, [17]);
LOCAL_ALIGNED_16(float, sumb, [17]);
LOCAL_ALIGNED_16(float, sumc, [17]);
LOCAL_ALIGNED_16(float, sumd, [17]);
float VAR_5;
me... | [
"static void FUNC_0(float *VAR_0, float *VAR_1, int *VAR_2, float *VAR_3,\nint VAR_4)\n{",
"LOCAL_ALIGNED_16(float, suma, [17]);",
"LOCAL_ALIGNED_16(float, sumb, [17]);",
"LOCAL_ALIGNED_16(float, sumc, [17]);",
"LOCAL_ALIGNED_16(float, sumd, [17]);",
"float VAR_5;",
"memcpy(VAR_0 + 512, VAR_0, 32 * size... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
23
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45,
47,
49,
51,
53,
55,
57,
59,
61,
63,
67
],
[... |
20,396 | static int mp_user_removexattr(FsContext *ctx,
const char *path, const char *name)
{
char buffer[PATH_MAX];
if (strncmp(name, "user.virtfs.", 12) == 0) {
/*
* Don't allow fetch of user.virtfs namesapce
* in case of mapped security
*/
... | false | qemu | 4fa4ce7107c6ec432f185307158c5df91ce54308 | static int mp_user_removexattr(FsContext *ctx,
const char *path, const char *name)
{
char buffer[PATH_MAX];
if (strncmp(name, "user.virtfs.", 12) == 0) {
errno = EACCES;
return -1;
}
return lremovexattr(rpath(ctx, path, buffer), name... | {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0,
const char *VAR_1, const char *VAR_2)
{
char VAR_3[PATH_MAX];
if (strncmp(VAR_2, "user.virtfs.", 12) == 0) {
errno = EACCES;
return -1;
}
return lremovexattr(rpath(VAR_0, VAR_1, VAR_3), VAR_2);
}
| [
"static int FUNC_0(FsContext *VAR_0,\nconst char *VAR_1, const char *VAR_2)\n{",
"char VAR_3[PATH_MAX];",
"if (strncmp(VAR_2, \"user.virtfs.\", 12) == 0) {",
"errno = EACCES;",
"return -1;",
"}",
"return lremovexattr(rpath(VAR_0, VAR_1, VAR_3), VAR_2);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
20,397 | static void sdhci_data_transfer(SDHCIState *s)
{
SDHCIClass *k = SDHCI_GET_CLASS(s);
if (s->trnmod & SDHC_TRNS_DMA) {
switch (SDHC_DMA_TYPE(s->hostctl)) {
case SDHC_CTRL_SDMA:
if ((s->trnmod & SDHC_TRNS_MULTI) &&
(!(s->trnmod & SDHC_TRNS_BLK_CNT_EN) || s-... | false | qemu | d368ba4376b2c1c24175c74b3733b8fe64dbe8a6 | static void sdhci_data_transfer(SDHCIState *s)
{
SDHCIClass *k = SDHCI_GET_CLASS(s);
if (s->trnmod & SDHC_TRNS_DMA) {
switch (SDHC_DMA_TYPE(s->hostctl)) {
case SDHC_CTRL_SDMA:
if ((s->trnmod & SDHC_TRNS_MULTI) &&
(!(s->trnmod & SDHC_TRNS_BLK_CNT_EN) || s-... | {
"code": [],
"line_no": []
} | static void FUNC_0(SDHCIState *VAR_0)
{
SDHCIClass *k = SDHCI_GET_CLASS(VAR_0);
if (VAR_0->trnmod & SDHC_TRNS_DMA) {
switch (SDHC_DMA_TYPE(VAR_0->hostctl)) {
case SDHC_CTRL_SDMA:
if ((VAR_0->trnmod & SDHC_TRNS_MULTI) &&
(!(VAR_0->trnmod & SDHC_TRNS_BLK_CN... | [
"static void FUNC_0(SDHCIState *VAR_0)\n{",
"SDHCIClass *k = SDHCI_GET_CLASS(VAR_0);",
"if (VAR_0->trnmod & SDHC_TRNS_DMA) {",
"switch (SDHC_DMA_TYPE(VAR_0->hostctl)) {",
"case SDHC_CTRL_SDMA:\nif ((VAR_0->trnmod & SDHC_TRNS_MULTI) &&\n(!(VAR_0->trnmod & SDHC_TRNS_BLK_CNT_EN) || VAR_0->blkcnt == 0)) {",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13,
15,
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
51
],
... |
20,399 | static void disas_cc(DisasContext *s, uint32_t insn)
{
unsigned int sf, op, y, cond, rn, nzcv, is_imm;
int label_continue = -1;
TCGv_i64 tcg_tmp, tcg_y, tcg_rn;
if (!extract32(insn, 29, 1)) {
unallocated_encoding(s);
return;
}
if (insn & (1 << 10 | 1 << 4)) {
... | false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static void disas_cc(DisasContext *s, uint32_t insn)
{
unsigned int sf, op, y, cond, rn, nzcv, is_imm;
int label_continue = -1;
TCGv_i64 tcg_tmp, tcg_y, tcg_rn;
if (!extract32(insn, 29, 1)) {
unallocated_encoding(s);
return;
}
if (insn & (1 << 10 | 1 << 4)) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1)
{
unsigned int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
int VAR_9 = -1;
TCGv_i64 tcg_tmp, tcg_y, tcg_rn;
if (!extract32(VAR_1, 29, 1)) {
unallocated_encoding(VAR_0);
return;
}
if (VAR_1 & (1 << 10 | 1 << 4... | [
"static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1)\n{",
"unsigned int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"int VAR_9 = -1;",
"TCGv_i64 tcg_tmp, tcg_y, tcg_rn;",
"if (!extract32(VAR_1, 29, 1)) {",
"unallocated_encoding(VAR_0);",
"return;",
"}",
"if (VAR_1 & (1 << 10 | 1 << 4)) {"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
... |
20,400 | static void xenfb_handle_events(struct XenFB *xenfb)
{
uint32_t prod, cons, out_cons;
struct xenfb_page *page = xenfb->c.page;
prod = page->out_prod;
out_cons = page->out_cons;
if (prod - out_cons >= XENFB_OUT_RING_LEN) {
return;
}
xen_rmb(); /* ensure we see ring content... | false | qemu | 4df26e88ee2f23c01418630368e87b719ed06b75 | static void xenfb_handle_events(struct XenFB *xenfb)
{
uint32_t prod, cons, out_cons;
struct xenfb_page *page = xenfb->c.page;
prod = page->out_prod;
out_cons = page->out_cons;
if (prod - out_cons >= XENFB_OUT_RING_LEN) {
return;
}
xen_rmb();
for (cons = out_cons; c... | {
"code": [],
"line_no": []
} | static void FUNC_0(struct XenFB *VAR_0)
{
uint32_t prod, cons, out_cons;
struct xenfb_page *VAR_1 = VAR_0->c.VAR_1;
prod = VAR_1->out_prod;
out_cons = VAR_1->out_cons;
if (prod - out_cons >= XENFB_OUT_RING_LEN) {
return;
}
xen_rmb();
for (cons = out_cons; cons != pr... | [
"static void FUNC_0(struct XenFB *VAR_0)\n{",
"uint32_t prod, cons, out_cons;",
"struct xenfb_page *VAR_1 = VAR_0->c.VAR_1;",
"prod = VAR_1->out_prod;",
"out_cons = VAR_1->out_cons;",
"if (prod - out_cons >= XENFB_OUT_RING_LEN) {",
"return;",
"}",
"xen_rmb();",
"for (cons = out_cons; cons != prod;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35,
37,
39
],
[
41,
43
],
[
45
],
[
47
],
... |
20,401 | static always_inline void gen_ext_l(void (*tcg_gen_ext_i64)(TCGv t0, TCGv t1),
int ra, int rb, int rc,
int islit, uint8_t lit)
{
if (unlikely(rc == 31))
return;
if (ra != 31) {
if (islit) {
tcg_gen_... | false | qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | static always_inline void gen_ext_l(void (*tcg_gen_ext_i64)(TCGv t0, TCGv t1),
int ra, int rb, int rc,
int islit, uint8_t lit)
{
if (unlikely(rc == 31))
return;
if (ra != 31) {
if (islit) {
tcg_gen_... | {
"code": [],
"line_no": []
} | static always_inline void FUNC_0(void (*tcg_gen_ext_i64)(TCGv t0, TCGv t1),
int ra, int rb, int rc,
int islit, uint8_t lit)
{
if (unlikely(rc == 31))
return;
if (ra != 31) {
if (islit) {
tcg_gen_shr... | [
"static always_inline void FUNC_0(void (*tcg_gen_ext_i64)(TCGv t0, TCGv t1),\nint ra, int rb, int rc,\nint islit, uint8_t lit)\n{",
"if (unlikely(rc == 31))\nreturn;",
"if (ra != 31) {",
"if (islit) {",
"tcg_gen_shri_i64(cpu_ir[rc], cpu_ir[ra], (lit & 7) * 8);",
"} else {",
"TCGv tmp = tcg_temp_new(TCG_... | [
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
]
] |
20,404 | eth_calc_pseudo_hdr_csum(struct ip_header *iphdr, uint16_t csl)
{
struct ip_pseudo_header ipph;
ipph.ip_src = iphdr->ip_src;
ipph.ip_dst = iphdr->ip_dst;
ipph.ip_payload = cpu_to_be16(csl);
ipph.ip_proto = iphdr->ip_p;
ipph.zeros = 0;
return net_checksum_add(sizeof(ipph), (uint8_t *)... | false | qemu | eb700029c7836798046191d62d595363d92c84d4 | eth_calc_pseudo_hdr_csum(struct ip_header *iphdr, uint16_t csl)
{
struct ip_pseudo_header ipph;
ipph.ip_src = iphdr->ip_src;
ipph.ip_dst = iphdr->ip_dst;
ipph.ip_payload = cpu_to_be16(csl);
ipph.ip_proto = iphdr->ip_p;
ipph.zeros = 0;
return net_checksum_add(sizeof(ipph), (uint8_t *)... | {
"code": [],
"line_no": []
} | FUNC_0(struct ip_header *VAR_0, uint16_t VAR_1)
{
struct ip_pseudo_header VAR_2;
VAR_2.ip_src = VAR_0->ip_src;
VAR_2.ip_dst = VAR_0->ip_dst;
VAR_2.ip_payload = cpu_to_be16(VAR_1);
VAR_2.ip_proto = VAR_0->ip_p;
VAR_2.zeros = 0;
return net_checksum_add(sizeof(VAR_2), (uint8_t *) &VAR_2... | [
"FUNC_0(struct ip_header *VAR_0, uint16_t VAR_1)\n{",
"struct ip_pseudo_header VAR_2;",
"VAR_2.ip_src = VAR_0->ip_src;",
"VAR_2.ip_dst = VAR_0->ip_dst;",
"VAR_2.ip_payload = cpu_to_be16(VAR_1);",
"VAR_2.ip_proto = VAR_0->ip_p;",
"VAR_2.zeros = 0;",
"return net_checksum_add(sizeof(VAR_2), (uint8_t *) &... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
20,405 | static int ftp_auth(FTPContext *s, char *auth)
{
const char *user = NULL, *pass = NULL;
char *end = NULL, buf[CONTROL_BUFFER_SIZE];
int err;
av_assert2(auth);
user = av_strtok(auth, ":", &end);
pass = av_strtok(end, ":", &end);
if (user) {
snprintf(buf, sizeof(buf), "USE... | false | FFmpeg | e46e49e31d7e8057881ffa89fc1f17e1f4d16d67 | static int ftp_auth(FTPContext *s, char *auth)
{
const char *user = NULL, *pass = NULL;
char *end = NULL, buf[CONTROL_BUFFER_SIZE];
int err;
av_assert2(auth);
user = av_strtok(auth, ":", &end);
pass = av_strtok(end, ":", &end);
if (user) {
snprintf(buf, sizeof(buf), "USE... | {
"code": [],
"line_no": []
} | static int FUNC_0(FTPContext *VAR_0, char *VAR_1)
{
const char *VAR_2 = NULL, *VAR_3 = NULL;
char *VAR_4 = NULL, buf[CONTROL_BUFFER_SIZE];
int VAR_5;
av_assert2(VAR_1);
VAR_2 = av_strtok(VAR_1, ":", &VAR_4);
VAR_3 = av_strtok(VAR_4, ":", &VAR_4);
if (VAR_2) {
snprintf(bu... | [
"static int FUNC_0(FTPContext *VAR_0, char *VAR_1)\n{",
"const char *VAR_2 = NULL, *VAR_3 = NULL;",
"char *VAR_4 = NULL, buf[CONTROL_BUFFER_SIZE];",
"int VAR_5;",
"av_assert2(VAR_1);",
"VAR_2 = av_strtok(VAR_1, \":\", &VAR_4);",
"VAR_3 = av_strtok(VAR_4, \":\", &VAR_4);",
"if (VAR_2) {",
"snprintf(b... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
20,406 | static void omap_l4_io_writew(void *opaque, target_phys_addr_t addr,
uint32_t value)
{
unsigned int i = (addr - OMAP2_L4_BASE) >> TARGET_PAGE_BITS;
return omap_l4_io_writew_fn[i](omap_l4_io_opaque[i], addr, value);
}
| false | qemu | 92c0bba9a95739c92e959fe478cb1acb92fa5446 | static void omap_l4_io_writew(void *opaque, target_phys_addr_t addr,
uint32_t value)
{
unsigned int i = (addr - OMAP2_L4_BASE) >> TARGET_PAGE_BITS;
return omap_l4_io_writew_fn[i](omap_l4_io_opaque[i], addr, value);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint32_t VAR_2)
{
unsigned int VAR_3 = (VAR_1 - OMAP2_L4_BASE) >> TARGET_PAGE_BITS;
return omap_l4_io_writew_fn[VAR_3](omap_l4_io_opaque[VAR_3], VAR_1, VAR_2);
}
| [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint32_t VAR_2)\n{",
"unsigned int VAR_3 = (VAR_1 - OMAP2_L4_BASE) >> TARGET_PAGE_BITS;",
"return omap_l4_io_writew_fn[VAR_3](omap_l4_io_opaque[VAR_3], VAR_1, VAR_2);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
]
] |
20,408 | static void pl050_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
pl050_state *s = (pl050_state *)opaque;
switch (offset >> 2) {
case 0: /* KMICR */
s->cr = value;
pl050_update(s, s->pending);
/* ??? Need to implement the enable/dis... | false | qemu | fbfecf43e9d354cfae04496563f7bb87d2ccde46 | static void pl050_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
pl050_state *s = (pl050_state *)opaque;
switch (offset >> 2) {
case 0:
s->cr = value;
pl050_update(s, s->pending);
break;
case 2:
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
pl050_state *s = (pl050_state *)VAR_0;
switch (VAR_1 >> 2) {
case 0:
s->cr = VAR_2;
pl050_update(s, s->pending);
break;
case 2:
... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"pl050_state *s = (pl050_state *)VAR_0;",
"switch (VAR_1 >> 2) {",
"case 0:\ns->cr = VAR_2;",
"pl050_update(s, s->pending);",
"break;",
"case 2:\nif (s->is_mouse) {",
"ps2_write_mouse(s->dev, VAR_2);",
"} else {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
19
],
[
21,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
]
] |
20,409 | static int eject_device(Monitor *mon, BlockDriverState *bs, int force)
{
if (!bdrv_is_removable(bs)) {
qerror_report(QERR_DEVICE_NOT_REMOVABLE, bdrv_get_device_name(bs));
return -1;
}
if (!force && bdrv_dev_is_medium_locked(bs)) {
qerror_report(QERR_DEVICE_LOCKED, bdrv_get_dev... | false | qemu | 2c6942fa7b332a95286071b92d233853e1000948 | static int eject_device(Monitor *mon, BlockDriverState *bs, int force)
{
if (!bdrv_is_removable(bs)) {
qerror_report(QERR_DEVICE_NOT_REMOVABLE, bdrv_get_device_name(bs));
return -1;
}
if (!force && bdrv_dev_is_medium_locked(bs)) {
qerror_report(QERR_DEVICE_LOCKED, bdrv_get_dev... | {
"code": [],
"line_no": []
} | static int FUNC_0(Monitor *VAR_0, BlockDriverState *VAR_1, int VAR_2)
{
if (!bdrv_is_removable(VAR_1)) {
qerror_report(QERR_DEVICE_NOT_REMOVABLE, bdrv_get_device_name(VAR_1));
return -1;
}
if (!VAR_2 && bdrv_dev_is_medium_locked(VAR_1)) {
qerror_report(QERR_DEVICE_LOCKED, bdrv... | [
"static int FUNC_0(Monitor *VAR_0, BlockDriverState *VAR_1, int VAR_2)\n{",
"if (!bdrv_is_removable(VAR_1)) {",
"qerror_report(QERR_DEVICE_NOT_REMOVABLE, bdrv_get_device_name(VAR_1));",
"return -1;",
"}",
"if (!VAR_2 && bdrv_dev_is_medium_locked(VAR_1)) {",
"qerror_report(QERR_DEVICE_LOCKED, bdrv_get_de... | [
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
]
] |
20,411 | static int load_dtb(target_phys_addr_t addr, const struct arm_boot_info *binfo)
{
#ifdef CONFIG_FDT
uint32_t *mem_reg_property;
uint32_t mem_reg_propsize;
void *fdt = NULL;
char *filename;
int size, rc;
uint32_t acells, scells, hival;
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS,... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static int load_dtb(target_phys_addr_t addr, const struct arm_boot_info *binfo)
{
#ifdef CONFIG_FDT
uint32_t *mem_reg_property;
uint32_t mem_reg_propsize;
void *fdt = NULL;
char *filename;
int size, rc;
uint32_t acells, scells, hival;
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS,... | {
"code": [],
"line_no": []
} | static int FUNC_0(target_phys_addr_t VAR_0, const struct arm_boot_info *VAR_1)
{
#ifdef CONFIG_FDT
uint32_t *mem_reg_property;
uint32_t mem_reg_propsize;
void *fdt = NULL;
char *filename;
int size, rc;
uint32_t acells, scells, hival;
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, ... | [
"static int FUNC_0(target_phys_addr_t VAR_0, const struct arm_boot_info *VAR_1)\n{",
"#ifdef CONFIG_FDT\nuint32_t *mem_reg_property;",
"uint32_t mem_reg_propsize;",
"void *fdt = NULL;",
"char *filename;",
"int size, rc;",
"uint32_t acells, scells, hival;",
"filename = qemu_find_file(QEMU_FILE_TYPE_BIO... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
20,412 | static void flush_compressed_data(QEMUFile *f)
{
int idx, len, thread_count;
if (!migrate_use_compression()) {
return;
}
thread_count = migrate_compress_threads();
for (idx = 0; idx < thread_count; idx++) {
if (!comp_param[idx].done) {
qemu_mutex_lock(comp_done... | false | qemu | 90e56fb46d0a7add88ed463efa4e723a6238f692 | static void flush_compressed_data(QEMUFile *f)
{
int idx, len, thread_count;
if (!migrate_use_compression()) {
return;
}
thread_count = migrate_compress_threads();
for (idx = 0; idx < thread_count; idx++) {
if (!comp_param[idx].done) {
qemu_mutex_lock(comp_done... | {
"code": [],
"line_no": []
} | static void FUNC_0(QEMUFile *VAR_0)
{
int VAR_1, VAR_2, VAR_3;
if (!migrate_use_compression()) {
return;
}
VAR_3 = migrate_compress_threads();
for (VAR_1 = 0; VAR_1 < VAR_3; VAR_1++) {
if (!comp_param[VAR_1].done) {
qemu_mutex_lock(comp_done_lock);
... | [
"static void FUNC_0(QEMUFile *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3;",
"if (!migrate_use_compression()) {",
"return;",
"}",
"VAR_3 = migrate_compress_threads();",
"for (VAR_1 = 0; VAR_1 < VAR_3; VAR_1++) {",
"if (!comp_param[VAR_1].done) {",
"qemu_mutex_lock(comp_done_lock);",
"while (!comp_param[V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
20,413 | sPAPRDRConnector *spapr_dr_connector_new(Object *owner,
sPAPRDRConnectorType type,
uint32_t id)
{
sPAPRDRConnector *drc =
SPAPR_DR_CONNECTOR(object_new(TYPE_SPAPR_DR_CONNECTOR));
g_assert(type);
drc->type = ... | false | qemu | 94649d423e4647fca3bc3e8b2b363d6d2adee9ce | sPAPRDRConnector *spapr_dr_connector_new(Object *owner,
sPAPRDRConnectorType type,
uint32_t id)
{
sPAPRDRConnector *drc =
SPAPR_DR_CONNECTOR(object_new(TYPE_SPAPR_DR_CONNECTOR));
g_assert(type);
drc->type = ... | {
"code": [],
"line_no": []
} | sPAPRDRConnector *FUNC_0(Object *owner,
sPAPRDRConnectorType type,
uint32_t id)
{
sPAPRDRConnector *drc =
SPAPR_DR_CONNECTOR(object_new(TYPE_SPAPR_DR_CONNECTOR));
g_assert(type);
drc->type = type;
drc->... | [
"sPAPRDRConnector *FUNC_0(Object *owner,\nsPAPRDRConnectorType type,\nuint32_t id)\n{",
"sPAPRDRConnector *drc =\nSPAPR_DR_CONNECTOR(object_new(TYPE_SPAPR_DR_CONNECTOR));",
"g_assert(type);",
"drc->type = type;",
"drc->id = id;",
"drc->owner = owner;",
"object_property_add_child(owner, \"dr-connector[*]... | [
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
],
[
73
],
[
75,
77
],
[
79
],
[
81,
83
],
[
85
],
[
87,
89,
91
],
[
93
],
[
95,
97
... |
20,414 | int bdrv_snapshot_create(BlockDriverState *bs,
QEMUSnapshotInfo *sn_info)
{
BlockDriver *drv = bs->drv;
if (!drv)
return -ENOMEDIUM;
if (drv->bdrv_snapshot_create)
return drv->bdrv_snapshot_create(bs, sn_info);
if (bs->file)
return bdrv_snapshot_... | false | qemu | de08c606f9ddafe647b6843e2b10a6d6030b0fc0 | int bdrv_snapshot_create(BlockDriverState *bs,
QEMUSnapshotInfo *sn_info)
{
BlockDriver *drv = bs->drv;
if (!drv)
return -ENOMEDIUM;
if (drv->bdrv_snapshot_create)
return drv->bdrv_snapshot_create(bs, sn_info);
if (bs->file)
return bdrv_snapshot_... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0,
QEMUSnapshotInfo *VAR_1)
{
BlockDriver *drv = VAR_0->drv;
if (!drv)
return -ENOMEDIUM;
if (drv->FUNC_0)
return drv->FUNC_0(VAR_0, VAR_1);
if (VAR_0->file)
return FUNC_0(VAR_0->file, VAR_1);
return -ENOTSUP... | [
"int FUNC_0(BlockDriverState *VAR_0,\nQEMUSnapshotInfo *VAR_1)\n{",
"BlockDriver *drv = VAR_0->drv;",
"if (!drv)\nreturn -ENOMEDIUM;",
"if (drv->FUNC_0)\nreturn drv->FUNC_0(VAR_0, VAR_1);",
"if (VAR_0->file)\nreturn FUNC_0(VAR_0->file, VAR_1);",
"return -ENOTSUP;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9,
11
],
[
13,
15
],
[
17,
19
],
[
21
],
[
23
]
] |
20,415 | static char *tcg_get_arg_str_idx(TCGContext *s, char *buf,
int buf_size, int idx)
{
assert(idx >= 0 && idx < s->nb_temps);
return tcg_get_arg_str_ptr(s, buf, buf_size, &s->temps[idx]);
}
| false | qemu | eabb7b91b36b202b4dac2df2d59d698e3aff197a | static char *tcg_get_arg_str_idx(TCGContext *s, char *buf,
int buf_size, int idx)
{
assert(idx >= 0 && idx < s->nb_temps);
return tcg_get_arg_str_ptr(s, buf, buf_size, &s->temps[idx]);
}
| {
"code": [],
"line_no": []
} | static char *FUNC_0(TCGContext *VAR_0, char *VAR_1,
int VAR_2, int VAR_3)
{
assert(VAR_3 >= 0 && VAR_3 < VAR_0->nb_temps);
return tcg_get_arg_str_ptr(VAR_0, VAR_1, VAR_2, &VAR_0->temps[VAR_3]);
}
| [
"static char *FUNC_0(TCGContext *VAR_0, char *VAR_1,\nint VAR_2, int VAR_3)\n{",
"assert(VAR_3 >= 0 && VAR_3 < VAR_0->nb_temps);",
"return tcg_get_arg_str_ptr(VAR_0, VAR_1, VAR_2, &VAR_0->temps[VAR_3]);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
]
] |
20,416 | static inline int mpeg4_is_resync(MpegEncContext *s){
const int bits_count= get_bits_count(&s->gb);
if(s->workaround_bugs&FF_BUG_NO_PADDING){
return 0;
}
if(bits_count + 8 >= s->gb.size*8){
int v= show_bits(&s->gb, 8);
v|= 0x7F >> (7-(bits_count&7));
... | false | FFmpeg | 68f593b48433842f3407586679fe07f3e5199ab9 | static inline int mpeg4_is_resync(MpegEncContext *s){
const int bits_count= get_bits_count(&s->gb);
if(s->workaround_bugs&FF_BUG_NO_PADDING){
return 0;
}
if(bits_count + 8 >= s->gb.size*8){
int v= show_bits(&s->gb, 8);
v|= 0x7F >> (7-(bits_count&7));
... | {
"code": [],
"line_no": []
} | static inline int FUNC_0(MpegEncContext *VAR_0){
const int VAR_1= get_bits_count(&VAR_0->gb);
if(VAR_0->workaround_bugs&FF_BUG_NO_PADDING){
return 0;
}
if(VAR_1 + 8 >= VAR_0->gb.size*8){
int VAR_2= show_bits(&VAR_0->gb, 8);
VAR_2|= 0x7F >> (7-(VAR_1&7));
... | [
"static inline int FUNC_0(MpegEncContext *VAR_0){",
"const int VAR_1= get_bits_count(&VAR_0->gb);",
"if(VAR_0->workaround_bugs&FF_BUG_NO_PADDING){",
"return 0;",
"}",
"if(VAR_1 + 8 >= VAR_0->gb.size*8){",
"int VAR_2= show_bits(&VAR_0->gb, 8);",
"VAR_2|= 0x7F >> (7-(VAR_1&7));",
"if(VAR_2==0x7F)\nret... | [
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
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
51
],
[
55... |
20,418 | ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
void *value, size_t vsize)
{
ssize_t size = 0;
char *buffer;
void *ovalue = value;
XattrOperations *xops;
char *orig_value, *orig_value_start;
ssize_t xattr_len, parsed_len = 0, attr_len;
/* Get the ... | true | qemu | 5507904e362df252f6065cb27d1ff98372db6abc | ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
void *value, size_t vsize)
{
ssize_t size = 0;
char *buffer;
void *ovalue = value;
XattrOperations *xops;
char *orig_value, *orig_value_start;
ssize_t xattr_len, parsed_len = 0, attr_len;
buffe... | {
"code": [
" char *buffer;",
" buffer = rpath(ctx, path);",
" xattr_len = llistxattr(buffer, value, 0);",
" g_free(buffer);",
" xattr_len = llistxattr(buffer, orig_value, xattr_len);",
" g_free(buffer);"
],
"line_no": [
9,
23,
25,
29,
41,
43
... | ssize_t FUNC_0(FsContext *ctx, const char *path,
void *value, size_t vsize)
{
ssize_t size = 0;
char *VAR_0;
void *VAR_1 = value;
XattrOperations *xops;
char *VAR_2, *VAR_3;
ssize_t xattr_len, parsed_len = 0, attr_len;
VAR_0 = rpath(ctx, path);
x... | [
"ssize_t FUNC_0(FsContext *ctx, const char *path,\nvoid *value, size_t vsize)\n{",
"ssize_t size = 0;",
"char *VAR_0;",
"void *VAR_1 = value;",
"XattrOperations *xops;",
"char *VAR_2, *VAR_3;",
"ssize_t xattr_len, parsed_len = 0, attr_len;",
"VAR_0 = rpath(ctx, path);",
"xattr_len = llistxattr(VAR_0... | [
0,
0,
1,
0,
0,
0,
0,
1,
1,
0,
1,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
39
],
[
41
],
[
43
],
[
49
],
[
51
],
[
53
],
[... |
20,419 | static int mov_write_udta_tag(ByteIOContext *pb, MOVContext* mov,
AVFormatContext *s)
{
int pos = url_ftell(pb);
int i;
put_be32(pb, 0); /* size */
put_tag(pb, "udta");
/* iTunes meta data */
mov_write_meta_tag(pb, mov, s);
/* Requirements */
... | true | FFmpeg | 501866a1fab9ee38b5360ae0e0dc0d04cbff1bf6 | static int mov_write_udta_tag(ByteIOContext *pb, MOVContext* mov,
AVFormatContext *s)
{
int pos = url_ftell(pb);
int i;
put_be32(pb, 0);
put_tag(pb, "udta");
mov_write_meta_tag(pb, mov, s);
for (i=0; i<MAX_STREAMS; i++) {
if(mov->... | {
"code": [
" if(!(mov->tracks[0].enc->flags & CODEC_FLAG_BITEXACT))"
],
"line_no": [
61
]
} | static int FUNC_0(ByteIOContext *VAR_0, MOVContext* VAR_1,
AVFormatContext *VAR_2)
{
int VAR_5 = url_ftell(VAR_0);
int VAR_4;
put_be32(VAR_0, 0);
put_tag(VAR_0, "udta");
mov_write_meta_tag(VAR_0, VAR_1, VAR_2);
for (VAR_4=0; VAR_4<MAX_STRE... | [
"static int FUNC_0(ByteIOContext *VAR_0, MOVContext* VAR_1,\nAVFormatContext *VAR_2)\n{",
"int VAR_5 = url_ftell(VAR_0);",
"int VAR_4;",
"put_be32(VAR_0, 0);",
"put_tag(VAR_0, \"udta\");",
"mov_write_meta_tag(VAR_0, VAR_1, VAR_2);",
"for (VAR_4=0; VAR_4<MAX_STREAMS; VAR_4++) {",
"if(VAR_1->tracks[VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
21
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[
53
],
[... |
20,420 | static void bochs_bios_write(void *opaque, uint32_t addr, uint32_t val)
{
static const char shutdown_str[8] = "Shutdown";
static int shutdown_index = 0;
switch(addr) {
/* Bochs BIOS messages */
case 0x400:
case 0x401:
/* used to be panic, now unused */
break;
... | true | qemu | 4333979e3d8c129953bba36ed87ce543d33cbea1 | static void bochs_bios_write(void *opaque, uint32_t addr, uint32_t val)
{
static const char shutdown_str[8] = "Shutdown";
static int shutdown_index = 0;
switch(addr) {
case 0x400:
case 0x401:
break;
case 0x402:
case 0x403:
#ifdef DEBUG_BIOS
fp... | {
"code": [
" fprintf(stderr, \"VGA BIOS panic, line %d\\n\", val);",
" exit(1);"
],
"line_no": [
67,
69
]
} | static void FUNC_0(void *VAR_0, uint32_t VAR_1, uint32_t VAR_2)
{
static const char VAR_3[8] = "Shutdown";
static int VAR_4 = 0;
switch(VAR_1) {
case 0x400:
case 0x401:
break;
case 0x402:
case 0x403:
#ifdef DEBUG_BIOS
fprintf(stderr, "%c", VAR... | [
"static void FUNC_0(void *VAR_0, uint32_t VAR_1, uint32_t VAR_2)\n{",
"static const char VAR_3[8] = \"Shutdown\";",
"static int VAR_4 = 0;",
"switch(VAR_1) {",
"case 0x400:\ncase 0x401:\nbreak;",
"case 0x402:\ncase 0x403:\n#ifdef DEBUG_BIOS\nfprintf(stderr, \"%c\", VAR_2);",
"#endif\nbreak;",
"case 0x... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15,
17,
21
],
[
23,
25,
27,
29
],
[
31,
33
],
[
35,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
... |
20,421 | void error_propagate(Error **dst_err, Error *local_err)
{
if (dst_err) {
*dst_err = local_err;
} else if (local_err) {
error_free(local_err);
}
}
| true | qemu | d195325b05199038b5907fa791729425b9720d21 | void error_propagate(Error **dst_err, Error *local_err)
{
if (dst_err) {
*dst_err = local_err;
} else if (local_err) {
error_free(local_err);
}
}
| {
"code": [
" if (dst_err) {"
],
"line_no": [
5
]
} | void FUNC_0(Error **VAR_0, Error *VAR_1)
{
if (VAR_0) {
*VAR_0 = VAR_1;
} else if (VAR_1) {
error_free(VAR_1);
}
}
| [
"void FUNC_0(Error **VAR_0, Error *VAR_1)\n{",
"if (VAR_0) {",
"*VAR_0 = VAR_1;",
"} else if (VAR_1) {",
"error_free(VAR_1);",
"}",
"}"
] | [
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
20,423 | static int macio_newworld_initfn(PCIDevice *d)
{
MacIOState *s = MACIO(d);
NewWorldMacIOState *ns = NEWWORLD_MACIO(d);
SysBusDevice *sysbus_dev;
MemoryRegion *timer_memory = g_new(MemoryRegion, 1);
int i;
int cur_irq = 0;
int ret = macio_common_initfn(d);
if (ret < 0) {
... | true | qemu | 6c5819c4d685bf5f3c81edb462f4d17fb99ca2b5 | static int macio_newworld_initfn(PCIDevice *d)
{
MacIOState *s = MACIO(d);
NewWorldMacIOState *ns = NEWWORLD_MACIO(d);
SysBusDevice *sysbus_dev;
MemoryRegion *timer_memory = g_new(MemoryRegion, 1);
int i;
int cur_irq = 0;
int ret = macio_common_initfn(d);
if (ret < 0) {
... | {
"code": [
" MemoryRegion *timer_memory = g_new(MemoryRegion, 1);"
],
"line_no": [
11
]
} | static int FUNC_0(PCIDevice *VAR_0)
{
MacIOState *s = MACIO(VAR_0);
NewWorldMacIOState *ns = NEWWORLD_MACIO(VAR_0);
SysBusDevice *sysbus_dev;
MemoryRegion *timer_memory = g_new(MemoryRegion, 1);
int VAR_1;
int VAR_2 = 0;
int VAR_3 = macio_common_initfn(VAR_0);
if (VAR_3 < 0) {
... | [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"MacIOState *s = MACIO(VAR_0);",
"NewWorldMacIOState *ns = NEWWORLD_MACIO(VAR_0);",
"SysBusDevice *sysbus_dev;",
"MemoryRegion *timer_memory = g_new(MemoryRegion, 1);",
"int VAR_1;",
"int VAR_2 = 0;",
"int VAR_3 = macio_common_initfn(VAR_0);",
"if (VAR_3 < 0... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
],
[
45
],
[
47
],
[
49
],
[
53
... |
20,424 | static void cpu_openrisc_load_kernel(ram_addr_t ram_size,
const char *kernel_filename,
OpenRISCCPU *cpu)
{
long kernel_size;
uint64_t elf_entry;
hwaddr entry;
if (kernel_filename && !qtest_enabled()) {
kernel_siz... | true | qemu | b6d9766ddf5453e79e0c66c9348728ba44ba115f | static void cpu_openrisc_load_kernel(ram_addr_t ram_size,
const char *kernel_filename,
OpenRISCCPU *cpu)
{
long kernel_size;
uint64_t elf_entry;
hwaddr entry;
if (kernel_filename && !qtest_enabled()) {
kernel_siz... | {
"code": [
" cpu->env.pc = entry;"
],
"line_no": [
61
]
} | static void FUNC_0(ram_addr_t VAR_0,
const char *VAR_1,
OpenRISCCPU *VAR_2)
{
long VAR_3;
uint64_t elf_entry;
hwaddr entry;
if (VAR_1 && !qtest_enabled()) {
VAR_3 = load_elf(VAR_1, NULL, NULL,
... | [
"static void FUNC_0(ram_addr_t VAR_0,\nconst char *VAR_1,\nOpenRISCCPU *VAR_2)\n{",
"long VAR_3;",
"uint64_t elf_entry;",
"hwaddr entry;",
"if (VAR_1 && !qtest_enabled()) {",
"VAR_3 = load_elf(VAR_1, NULL, NULL,\n&elf_entry, NULL, NULL, 1, ELF_MACHINE, 1);",
"entry = elf_entry;",
"if (VAR_3 < 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
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35,
37,
39
],
[
41
],
[
43
],
[
47
],
[
49,
51
],
[... |
20,426 | void qmp_migrate(const char *uri, bool has_blk, bool blk,
bool has_inc, bool inc, bool has_detach, bool detach,
Error **errp)
{
Error *local_err = NULL;
MigrationState *s = migrate_get_current();
MigrationParams params;
const char *p;
params.blk = has_blk ... | true | qemu | 24f3902b088cd4f2dbebfd90527b5d81d6a050e9 | void qmp_migrate(const char *uri, bool has_blk, bool blk,
bool has_inc, bool inc, bool has_detach, bool detach,
Error **errp)
{
Error *local_err = NULL;
MigrationState *s = migrate_get_current();
MigrationParams params;
const char *p;
params.blk = has_blk ... | {
"code": [
" if (qemu_savevm_state_blocked(errp)) {",
" if (migration_blockers) {",
" *errp = error_copy(migration_blockers->data);",
" if (qemu_savevm_state_blocked(errp)) {"
],
"line_no": [
45,
53,
55,
45
]
} | void FUNC_0(const char *VAR_0, bool VAR_1, bool VAR_2,
bool VAR_3, bool VAR_4, bool VAR_5, bool VAR_6,
Error **VAR_7)
{
Error *local_err = NULL;
MigrationState *s = migrate_get_current();
MigrationParams params;
const char *VAR_8;
params.VAR_2 = VAR_1 && V... | [
"void FUNC_0(const char *VAR_0, bool VAR_1, bool VAR_2,\nbool VAR_3, bool VAR_4, bool VAR_5, bool VAR_6,\nError **VAR_7)\n{",
"Error *local_err = NULL;",
"MigrationState *s = migrate_get_current();",
"MigrationParams params;",
"const char *VAR_8;",
"params.VAR_2 = VAR_1 && VAR_2;",
"params.shared = VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[... |
20,427 | static void avc_luma_hv_qrt_and_aver_dst_16x16_msa(const uint8_t *src_x,
const uint8_t *src_y,
int32_t src_stride,
uint8_t *dst,
... | false | FFmpeg | 1181d93231e9b807965724587d363c1cfd5a1d0d | static void avc_luma_hv_qrt_and_aver_dst_16x16_msa(const uint8_t *src_x,
const uint8_t *src_y,
int32_t src_stride,
uint8_t *dst,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(const uint8_t *VAR_0,
const uint8_t *VAR_1,
int32_t VAR_2,
uint8_t *VAR_3,
int32_t VAR_4)
{
... | [
"static void FUNC_0(const uint8_t *VAR_0,\nconst uint8_t *VAR_1,\nint32_t VAR_2,\nuint8_t *VAR_3,\nint32_t VAR_4)\n{",
"uint32_t multiple8_cnt;",
"for (multiple8_cnt = 2; multiple8_cnt--;) {",
"avc_luma_hv_qrt_and_aver_dst_8x8_msa(VAR_0, VAR_1, VAR_2,\nVAR_3, VAR_4);",
"VAR_0 += 8;",
"VAR_1 += 8;",
"VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
17
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45,
47
],
[
51
],
[
53
],
[
55
],
[
57
... |
20,428 | uint32_t net_checksum_add(int len, uint8_t *buf)
{
uint32_t sum = 0;
int i;
for (i = 0; i < len; i++) {
if (i & 1)
sum += (uint32_t)buf[i];
else
sum += (uint32_t)buf[i] << 8;
}
return sum;
}
| false | qemu | 22156ab498acf5f8104801148732ae8e83f336a0 | uint32_t net_checksum_add(int len, uint8_t *buf)
{
uint32_t sum = 0;
int i;
for (i = 0; i < len; i++) {
if (i & 1)
sum += (uint32_t)buf[i];
else
sum += (uint32_t)buf[i] << 8;
}
return sum;
}
| {
"code": [],
"line_no": []
} | uint32_t FUNC_0(int len, uint8_t *buf)
{
uint32_t sum = 0;
int VAR_0;
for (VAR_0 = 0; VAR_0 < len; VAR_0++) {
if (VAR_0 & 1)
sum += (uint32_t)buf[VAR_0];
else
sum += (uint32_t)buf[VAR_0] << 8;
}
return sum;
}
| [
"uint32_t FUNC_0(int len, uint8_t *buf)\n{",
"uint32_t sum = 0;",
"int VAR_0;",
"for (VAR_0 = 0; VAR_0 < len; VAR_0++) {",
"if (VAR_0 & 1)\nsum += (uint32_t)buf[VAR_0];",
"else\nsum += (uint32_t)buf[VAR_0] << 8;",
"}",
"return sum;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
]
] |
20,429 | static uint32_t hpet_ram_readl(void *opaque, target_phys_addr_t addr)
{
HPETState *s = opaque;
uint64_t cur_tick, index;
DPRINTF("qemu: Enter hpet_ram_readl at %" PRIx64 "\n", addr);
index = addr;
/*address range of all TN regs*/
if (index >= 0x100 && index <= 0x3ff) {
uint8_t ... | false | qemu | b2bedb214469af55179d907a60cd67fed6b0779e | static uint32_t hpet_ram_readl(void *opaque, target_phys_addr_t addr)
{
HPETState *s = opaque;
uint64_t cur_tick, index;
DPRINTF("qemu: Enter hpet_ram_readl at %" PRIx64 "\n", addr);
index = addr;
if (index >= 0x100 && index <= 0x3ff) {
uint8_t timer_id = (addr - 0x100) / 0x20... | {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(void *opaque, target_phys_addr_t addr)
{
HPETState *s = opaque;
uint64_t cur_tick, index;
DPRINTF("qemu: Enter FUNC_0 at %" PRIx64 "\n", addr);
index = addr;
if (index >= 0x100 && index <= 0x3ff) {
uint8_t timer_id = (addr - 0x100) / 0x20;
HPETT... | [
"static uint32_t FUNC_0(void *opaque, target_phys_addr_t addr)\n{",
"HPETState *s = opaque;",
"uint64_t cur_tick, index;",
"DPRINTF(\"qemu: Enter FUNC_0 at %\" PRIx64 \"\\n\", addr);",
"index = addr;",
"if (index >= 0x100 && index <= 0x3ff) {",
"uint8_t timer_id = (addr - 0x100) / 0x20;",
"HPETTimer *... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
41,
43
],
[
45,
47
],
[
49,
51
],
[
53... |
20,430 | static void gen_jump(DisasContext *dc, uint32_t imm, uint32_t reg, uint32_t op0)
{
target_ulong tmp_pc;
/* N26, 26bits imm */
tmp_pc = sign_extend((imm<<2), 26) + dc->pc;
switch (op0) {
case 0x00: /* l.j */
tcg_gen_movi_tl(jmp_pc, tmp_pc);
break;
case 0x01: /* ... | false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static void gen_jump(DisasContext *dc, uint32_t imm, uint32_t reg, uint32_t op0)
{
target_ulong tmp_pc;
tmp_pc = sign_extend((imm<<2), 26) + dc->pc;
switch (op0) {
case 0x00:
tcg_gen_movi_tl(jmp_pc, tmp_pc);
break;
case 0x01:
tcg_gen_movi_tl(cpu_R[9... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1, uint32_t VAR_2, uint32_t VAR_3)
{
target_ulong tmp_pc;
tmp_pc = sign_extend((VAR_1<<2), 26) + VAR_0->pc;
switch (VAR_3) {
case 0x00:
tcg_gen_movi_tl(jmp_pc, tmp_pc);
break;
case 0x01:
tcg_gen_m... | [
"static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1, uint32_t VAR_2, uint32_t VAR_3)\n{",
"target_ulong tmp_pc;",
"tmp_pc = sign_extend((VAR_1<<2), 26) + VAR_0->pc;",
"switch (VAR_3) {",
"case 0x00:\ntcg_gen_movi_tl(jmp_pc, tmp_pc);",
"break;",
"case 0x01:\ntcg_gen_movi_tl(cpu_R[9], (VAR_0->pc + 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
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
... |
20,431 | static int net_init_nic(const NetClientOptions *opts, const char *name,
NetClientState *peer, Error **errp)
{
int idx;
NICInfo *nd;
const NetLegacyNicOptions *nic;
assert(opts->type == NET_CLIENT_OPTIONS_KIND_NIC);
nic = opts->u.nic;
idx = nic_get_free_idx();
... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | static int net_init_nic(const NetClientOptions *opts, const char *name,
NetClientState *peer, Error **errp)
{
int idx;
NICInfo *nd;
const NetLegacyNicOptions *nic;
assert(opts->type == NET_CLIENT_OPTIONS_KIND_NIC);
nic = opts->u.nic;
idx = nic_get_free_idx();
... | {
"code": [],
"line_no": []
} | static int FUNC_0(const NetClientOptions *VAR_0, const char *VAR_1,
NetClientState *VAR_2, Error **VAR_3)
{
int VAR_4;
NICInfo *nd;
const NetLegacyNicOptions *VAR_5;
assert(VAR_0->type == NET_CLIENT_OPTIONS_KIND_NIC);
VAR_5 = VAR_0->u.VAR_5;
VAR_4 = nic_get_fr... | [
"static int FUNC_0(const NetClientOptions *VAR_0, const char *VAR_1,\nNetClientState *VAR_2, Error **VAR_3)\n{",
"int VAR_4;",
"NICInfo *nd;",
"const NetLegacyNicOptions *VAR_5;",
"assert(VAR_0->type == NET_CLIENT_OPTIONS_KIND_NIC);",
"VAR_5 = VAR_0->u.VAR_5;",
"VAR_4 = nic_get_free_idx();",
"if (VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
20,432 | static int dxtory_decode_v2_410(AVCodecContext *avctx, AVFrame *pic,
const uint8_t *src, int src_size)
{
GetByteContext gb;
GetBitContext gb2;
int nslices, slice, slice_height, ref_slice_height;
int cur_y, next_y;
uint32_t off, slice_size;
uint8_t *Y, *U,... | false | FFmpeg | 6a6bc43f5f79587b8936334cc0b3a6616f4807ac | static int dxtory_decode_v2_410(AVCodecContext *avctx, AVFrame *pic,
const uint8_t *src, int src_size)
{
GetByteContext gb;
GetBitContext gb2;
int nslices, slice, slice_height, ref_slice_height;
int cur_y, next_y;
uint32_t off, slice_size;
uint8_t *Y, *U,... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1,
const uint8_t *VAR_2, int VAR_3)
{
GetByteContext gb;
GetBitContext gb2;
int VAR_4, VAR_5, VAR_6, VAR_7;
int VAR_8, VAR_9;
uint32_t off, slice_size;
uint8_t *Y, *U, *V;
int VAR_10;
bytes... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{",
"GetByteContext gb;",
"GetBitContext gb2;",
"int VAR_4, VAR_5, VAR_6, VAR_7;",
"int VAR_8, VAR_9;",
"uint32_t off, slice_size;",
"uint8_t *Y, *U, *V;",
"int VAR_10;",
"bytestream2_init(&gb, VAR_2, VAR_3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41,
43
],
[
45
],
[
47
... |
20,435 | int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg)
{
struct kvm_irq_routing_entry kroute;
if (!kvm_irqchip_in_kernel()) {
return -ENOSYS;
}
kroute.gsi = virq;
kroute.type = KVM_IRQ_ROUTING_MSI;
kroute.flags = 0;
kroute.u.msi.address_lo = (uint32_t)ms... | false | qemu | d07cc1f12d8e15c167857852c39190d770763824 | int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg)
{
struct kvm_irq_routing_entry kroute;
if (!kvm_irqchip_in_kernel()) {
return -ENOSYS;
}
kroute.gsi = virq;
kroute.type = KVM_IRQ_ROUTING_MSI;
kroute.flags = 0;
kroute.u.msi.address_lo = (uint32_t)ms... | {
"code": [],
"line_no": []
} | int FUNC_0(KVMState *VAR_0, int VAR_1, MSIMessage VAR_2)
{
struct kvm_irq_routing_entry VAR_3;
if (!kvm_irqchip_in_kernel()) {
return -ENOSYS;
}
VAR_3.gsi = VAR_1;
VAR_3.type = KVM_IRQ_ROUTING_MSI;
VAR_3.flags = 0;
VAR_3.u.msi.address_lo = (uint32_t)VAR_2.address;
V... | [
"int FUNC_0(KVMState *VAR_0, int VAR_1, MSIMessage VAR_2)\n{",
"struct kvm_irq_routing_entry VAR_3;",
"if (!kvm_irqchip_in_kernel()) {",
"return -ENOSYS;",
"}",
"VAR_3.gsi = VAR_1;",
"VAR_3.type = KVM_IRQ_ROUTING_MSI;",
"VAR_3.flags = 0;",
"VAR_3.u.msi.address_lo = (uint32_t)VAR_2.address;",
"VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
]
] |
20,437 | type_init(pflash_cfi01_register_types)
pflash_t *pflash_cfi01_register(hwaddr base,
DeviceState *qdev, const char *name,
hwaddr size,
BlockDriverState *bs,
uint32_t sector_len, int nb_b... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | type_init(pflash_cfi01_register_types)
pflash_t *pflash_cfi01_register(hwaddr base,
DeviceState *qdev, const char *name,
hwaddr size,
BlockDriverState *bs,
uint32_t sector_len, int nb_b... | {
"code": [],
"line_no": []
} | type_init(pflash_cfi01_register_types)
pflash_t *pflash_cfi01_register(hwaddr base,
DeviceState *qdev, const char *name,
hwaddr size,
BlockDriverState *bs,
uint32_t sector_len, int nb_b... | [
"type_init(pflash_cfi01_register_types)\npflash_t *pflash_cfi01_register(hwaddr base,\nDeviceState *qdev, const char *name,\nhwaddr size,\nBlockDriverState *bs,\nuint32_t sector_len, int nb_blocs,\nint bank_width, uint16_t id0, uint16_t id1,\nuint16_t id2, uint16_t id3, int be)\n{",
"DeviceState *dev = qdev_creat... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
5,
7,
9,
11,
13,
15,
17,
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
... |
20,438 | static void vnc_write_u16(VncState *vs, uint16_t value)
{
uint8_t buf[2];
buf[0] = (value >> 8) & 0xFF;
buf[1] = value & 0xFF;
vnc_write(vs, buf, 2);
}
| false | qemu | 5fb6c7a8b26eab1a22207d24b4784bd2b39ab54b | static void vnc_write_u16(VncState *vs, uint16_t value)
{
uint8_t buf[2];
buf[0] = (value >> 8) & 0xFF;
buf[1] = value & 0xFF;
vnc_write(vs, buf, 2);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(VncState *VAR_0, uint16_t VAR_1)
{
uint8_t buf[2];
buf[0] = (VAR_1 >> 8) & 0xFF;
buf[1] = VAR_1 & 0xFF;
vnc_write(VAR_0, buf, 2);
}
| [
"static void FUNC_0(VncState *VAR_0, uint16_t VAR_1)\n{",
"uint8_t buf[2];",
"buf[0] = (VAR_1 >> 8) & 0xFF;",
"buf[1] = VAR_1 & 0xFF;",
"vnc_write(VAR_0, buf, 2);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
17
]
] |
20,439 | type_init(assign_register_types)
static void assigned_dev_load_option_rom(AssignedDevice *dev)
{
int size = 0;
pci_assign_dev_load_option_rom(&dev->dev, OBJECT(dev), &size,
dev->host.domain, dev->host.bus,
dev->host.slot, dev->host.... | false | qemu | be968c721ee9df49708691ab58f0e66b394dea82 | type_init(assign_register_types)
static void assigned_dev_load_option_rom(AssignedDevice *dev)
{
int size = 0;
pci_assign_dev_load_option_rom(&dev->dev, OBJECT(dev), &size,
dev->host.domain, dev->host.bus,
dev->host.slot, dev->host.... | {
"code": [],
"line_no": []
} | FUNC_0(VAR_0)
static void assigned_dev_load_option_rom(AssignedDevice *dev)
{
int VAR_1 = 0;
pci_assign_dev_load_option_rom(&dev->dev, OBJECT(dev), &VAR_1,
dev->host.domain, dev->host.bus,
dev->host.slot, dev->host.function);
... | [
"FUNC_0(VAR_0)\nstatic void assigned_dev_load_option_rom(AssignedDevice *dev)\n{",
"int VAR_1 = 0;",
"pci_assign_dev_load_option_rom(&dev->dev, OBJECT(dev), &VAR_1,\ndev->host.domain, dev->host.bus,\ndev->host.slot, dev->host.function);",
"if (!VAR_1) {",
"error_report(\"pci-assign: Invalid ROM.\");",
"}"... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
5,
7
],
[
9
],
[
13,
15,
17
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
20,440 | static void ide_issue_trim_cb(void *opaque, int ret)
{
TrimAIOCB *iocb = opaque;
if (ret >= 0) {
while (iocb->j < iocb->qiov->niov) {
int j = iocb->j;
while (++iocb->i < iocb->qiov->iov[j].iov_len / 8) {
int i = iocb->i;
uint64_t *buffer = ... | false | qemu | ef0e64a9838c0a20b5cb8a0bd2dcbcc59b0b812d | static void ide_issue_trim_cb(void *opaque, int ret)
{
TrimAIOCB *iocb = opaque;
if (ret >= 0) {
while (iocb->j < iocb->qiov->niov) {
int j = iocb->j;
while (++iocb->i < iocb->qiov->iov[j].iov_len / 8) {
int i = iocb->i;
uint64_t *buffer = ... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1)
{
TrimAIOCB *iocb = VAR_0;
if (VAR_1 >= 0) {
while (iocb->VAR_2 < iocb->qiov->niov) {
int VAR_2 = iocb->VAR_2;
while (++iocb->VAR_3 < iocb->qiov->iov[VAR_2].iov_len / 8) {
int VAR_3 = iocb->VAR_3;
... | [
"static void FUNC_0(void *VAR_0, int VAR_1)\n{",
"TrimAIOCB *iocb = VAR_0;",
"if (VAR_1 >= 0) {",
"while (iocb->VAR_2 < iocb->qiov->niov) {",
"int VAR_2 = iocb->VAR_2;",
"while (++iocb->VAR_3 < iocb->qiov->iov[VAR_2].iov_len / 8) {",
"int VAR_3 = iocb->VAR_3;",
"uint64_t *buffer = iocb->qiov->iov[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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
41,
43,
45,
47
],
[
49
],
[
51
],
[
55
],
[... |
20,441 | static void usbredir_device_disconnect(void *priv)
{
USBRedirDevice *dev = priv;
int i;
/* Stop any pending attaches */
qemu_del_timer(dev->attach_timer);
if (dev->dev.attached) {
usb_device_detach(&dev->dev);
/*
* Delay next usb device attach to give the guest ... | false | qemu | 1510168e273a12a56e3bd4488b4b2904f5138e09 | static void usbredir_device_disconnect(void *priv)
{
USBRedirDevice *dev = priv;
int i;
qemu_del_timer(dev->attach_timer);
if (dev->dev.attached) {
usb_device_detach(&dev->dev);
dev->next_attach_time = qemu_get_clock_ms(vm_clock) + 200;
}
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
USBRedirDevice *dev = VAR_0;
int VAR_1;
qemu_del_timer(dev->attach_timer);
if (dev->dev.attached) {
usb_device_detach(&dev->dev);
dev->next_attach_time = qemu_get_clock_ms(vm_clock) + 200;
}
usbredir_cle... | [
"static void FUNC_0(void *VAR_0)\n{",
"USBRedirDevice *dev = VAR_0;",
"int VAR_1;",
"qemu_del_timer(dev->attach_timer);",
"if (dev->dev.attached) {",
"usb_device_detach(&dev->dev);",
"dev->next_attach_time = qemu_get_clock_ms(vm_clock) + 200;",
"}",
"usbredir_cleanup_device_queues(dev);",
"memset(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
17
],
[
19
],
[
29
],
[
31
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
]
] |
20,442 | static void pm_write_config(PCIDevice *d,
uint32_t address, uint32_t val, int len)
{
DPRINTF("pm_write_config address 0x%x val 0x%x len 0x%x \n",
address, val, len);
pci_default_write_config(d, address, val, len);
}
| false | qemu | b2bedb214469af55179d907a60cd67fed6b0779e | static void pm_write_config(PCIDevice *d,
uint32_t address, uint32_t val, int len)
{
DPRINTF("pm_write_config address 0x%x val 0x%x len 0x%x \n",
address, val, len);
pci_default_write_config(d, address, val, len);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(PCIDevice *VAR_0,
uint32_t VAR_1, uint32_t VAR_2, int VAR_3)
{
DPRINTF("FUNC_0 VAR_1 0x%x VAR_2 0x%x VAR_3 0x%x \n",
VAR_1, VAR_2, VAR_3);
pci_default_write_config(VAR_0, VAR_1, VAR_2, VAR_3);
}
| [
"static void FUNC_0(PCIDevice *VAR_0,\nuint32_t VAR_1, uint32_t VAR_2, int VAR_3)\n{",
"DPRINTF(\"FUNC_0 VAR_1 0x%x VAR_2 0x%x VAR_3 0x%x \\n\",\nVAR_1, VAR_2, VAR_3);",
"pci_default_write_config(VAR_0, VAR_1, VAR_2, VAR_3);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
11
],
[
13
]
] |
20,443 | static int rv20_decode_picture_header(MpegEncContext *s)
{
int seq, mb_pos, i;
i= get_bits(&s->gb, 2);
switch(i){
case 0: s->pict_type= I_TYPE; break;
case 1: s->pict_type= I_TYPE; break; //hmm ...
case 2: s->pict_type= P_TYPE; break;
case 3: s->pict_type= B_TYPE; break;
defau... | false | FFmpeg | 332f9ac4e31ce5e6d0c42ac9e0229d7d1b2b4d60 | static int rv20_decode_picture_header(MpegEncContext *s)
{
int seq, mb_pos, i;
i= get_bits(&s->gb, 2);
switch(i){
case 0: s->pict_type= I_TYPE; break;
case 1: s->pict_type= I_TYPE; break;
case 2: s->pict_type= P_TYPE; break;
case 3: s->pict_type= B_TYPE; break;
default:
... | {
"code": [],
"line_no": []
} | static int FUNC_0(MpegEncContext *VAR_0)
{
int VAR_1, VAR_2, VAR_3;
VAR_3= get_bits(&VAR_0->gb, 2);
switch(VAR_3){
case 0: VAR_0->pict_type= I_TYPE; break;
case 1: VAR_0->pict_type= I_TYPE; break;
case 2: VAR_0->pict_type= P_TYPE; break;
case 3: VAR_0->pict_type= B_TYPE; break;
... | [
"static int FUNC_0(MpegEncContext *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3;",
"VAR_3= get_bits(&VAR_0->gb, 2);",
"switch(VAR_3){",
"case 0: VAR_0->pict_type= I_TYPE; break;",
"case 1: VAR_0->pict_type= I_TYPE; break;",
"case 2: VAR_0->pict_type= P_TYPE; break;",
"case 3: VAR_0->pict_type= B_TYPE; break;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
... |
20,445 | static void test_visitor_in_union_flat(TestInputVisitorData *data,
const void *unused)
{
Visitor *v;
Error *err = NULL;
UserDefFlatUnion *tmp;
UserDefUnionBase *base;
v = visitor_input_test_init(data,
"{ 'enum1': 'value... | false | qemu | 3f66f764ee25f10d3e1144ebc057a949421b7728 | static void test_visitor_in_union_flat(TestInputVisitorData *data,
const void *unused)
{
Visitor *v;
Error *err = NULL;
UserDefFlatUnion *tmp;
UserDefUnionBase *base;
v = visitor_input_test_init(data,
"{ 'enum1': 'value... | {
"code": [],
"line_no": []
} | static void FUNC_0(TestInputVisitorData *VAR_0,
const void *VAR_1)
{
Visitor *v;
Error *err = NULL;
UserDefFlatUnion *tmp;
UserDefUnionBase *base;
v = visitor_input_test_init(VAR_0,
"{ 'enum1': 'value1', "
... | [
"static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"Visitor *v;",
"Error *err = NULL;",
"UserDefFlatUnion *tmp;",
"UserDefUnionBase *base;",
"v = visitor_input_test_init(VAR_0,\n\"{ 'enum1': 'value1', \"",
"\"'integer': 41, \"\n\"'string': 'str', \"\n\"'boolean': true }\");",
"v... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
21,
23,
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[
51
]
] |
20,446 | static void s390_pcihost_hot_unplug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
PCIDevice *pci_dev = NULL;
PCIBus *bus;
int32_t devfn;
S390PCIBusDevice *pbdev = NULL;
S390pciState *s = s390_get_phb();
if (object_dynamic_cast(OBJECT... | false | qemu | fd56e0612b6454a282fa6a953fdb09281a98c589 | static void s390_pcihost_hot_unplug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
PCIDevice *pci_dev = NULL;
PCIBus *bus;
int32_t devfn;
S390PCIBusDevice *pbdev = NULL;
S390pciState *s = s390_get_phb();
if (object_dynamic_cast(OBJECT... | {
"code": [],
"line_no": []
} | static void FUNC_0(HotplugHandler *VAR_0,
DeviceState *VAR_1, Error **VAR_2)
{
PCIDevice *pci_dev = NULL;
PCIBus *bus;
int32_t devfn;
S390PCIBusDevice *pbdev = NULL;
S390pciState *s = s390_get_phb();
if (object_dynamic_cast(OBJECT(VAR_1), TYPE_PCI_BR... | [
"static void FUNC_0(HotplugHandler *VAR_0,\nDeviceState *VAR_1, Error **VAR_2)\n{",
"PCIDevice *pci_dev = NULL;",
"PCIBus *bus;",
"int32_t devfn;",
"S390PCIBusDevice *pbdev = NULL;",
"S390pciState *s = s390_get_phb();",
"if (object_dynamic_cast(OBJECT(VAR_1), TYPE_PCI_BRIDGE)) {",
"error_setg(VAR_2, \... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
20,447 | static int parse_presentation_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size,
int64_t pts)
{
PGSSubContext *ctx = avctx->priv_data;
int i, state, ret;
// Video descriptor
int w = bytestream_get_be16(&b... | true | FFmpeg | 89bcb77726e222aee9d8536f0310d805f7d39fac | static int parse_presentation_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size,
int64_t pts)
{
PGSSubContext *ctx = avctx->priv_data;
int i, state, ret;
int w = bytestream_get_be16(&buf);
int h = b... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
const uint8_t *VAR_1, int VAR_2,
int64_t VAR_3)
{
PGSSubContext *ctx = VAR_0->priv_data;
int VAR_4, VAR_5, VAR_6;
int VAR_7 = bytestream_get_be16(&VAR_1);
int VAR_8 = byte... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nconst uint8_t *VAR_1, int VAR_2,\nint64_t VAR_3)\n{",
"PGSSubContext *ctx = VAR_0->priv_data;",
"int VAR_4, VAR_5, VAR_6;",
"int VAR_7 = bytestream_get_be16(&VAR_1);",
"int VAR_8 = bytestream_get_be16(&VAR_1);",
"uint16_t object_index;",
"ctx->presentation.VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
18
],
[
20
],
[
24
],
[
28
],
[
32,
34
],
[
36
],
[
38,
40
],
[
46
],
[
52
],
[
72
],
[
74
],
[
76
],
[
78
],
[
88
],
[
90
... |
20,448 | static int crypto_close(URLContext *h)
{
CryptoContext *c = h->priv_data;
if (c->hd)
ffurl_close(c->hd);
av_freep(&c->aes);
av_freep(&c->key);
av_freep(&c->iv);
return 0;
}
| true | FFmpeg | 7d89f7cbf3ccd98f9a5f58db97effa9afd2d571a | static int crypto_close(URLContext *h)
{
CryptoContext *c = h->priv_data;
if (c->hd)
ffurl_close(c->hd);
av_freep(&c->aes);
av_freep(&c->key);
av_freep(&c->iv);
return 0;
}
| {
"code": [
" av_freep(&c->key);",
" av_freep(&c->iv);"
],
"line_no": [
13,
15
]
} | static int FUNC_0(URLContext *VAR_0)
{
CryptoContext *c = VAR_0->priv_data;
if (c->hd)
ffurl_close(c->hd);
av_freep(&c->aes);
av_freep(&c->key);
av_freep(&c->iv);
return 0;
}
| [
"static int FUNC_0(URLContext *VAR_0)\n{",
"CryptoContext *c = VAR_0->priv_data;",
"if (c->hd)\nffurl_close(c->hd);",
"av_freep(&c->aes);",
"av_freep(&c->key);",
"av_freep(&c->iv);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
20,449 | static int mimic_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int swap_buf_size = buf_size - MIMIC_HEADER_SIZE;
MimicContext *ctx = avctx->priv_data;
GetBy... | true | FFmpeg | a115eb9e750543f1d8bf951414d291069bf396c2 | static int mimic_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int swap_buf_size = buf_size - MIMIC_HEADER_SIZE;
MimicContext *ctx = avctx->priv_data;
GetBy... | {
"code": [
" ff_thread_release_buffer(avctx, &ctx->frames[ctx->cur_index]);"
],
"line_no": [
111
]
} | 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;
int VAR_6 = VAR_5 - MIMIC_HEADER_SIZE;
MimicContext *ctx = VAR_0->priv_data;
GetByteContext gb;
int VAR... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"int VAR_6 = VAR_5 - MIMIC_HEADER_SIZE;",
"MimicContext *ctx = VAR_0->priv_data;",
"GetByteContext gb;",
"int VAR_7;",
"int VAR_8, VAR_9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
20,450 | static void vmgenid_set_guid_auto_test(void)
{
const char *cmd;
QemuUUID measured;
cmd = "-machine accel=tcg -device vmgenid,id=testvgid," "guid=auto";
qtest_start(cmd);
read_guid_from_memory(&measured);
/* Just check that the GUID is non-null */
g_assert(!qemu_uuid_is_null(&me... | true | qemu | 4871b51b9241b10f4fd8e04bbb21577886795e25 | static void vmgenid_set_guid_auto_test(void)
{
const char *cmd;
QemuUUID measured;
cmd = "-machine accel=tcg -device vmgenid,id=testvgid," "guid=auto";
qtest_start(cmd);
read_guid_from_memory(&measured);
g_assert(!qemu_uuid_is_null(&measured));
qtest_quit(global_qtest);... | {
"code": [
" const char *cmd;",
" cmd = \"-machine accel=tcg -device vmgenid,id=testvgid,\" \"guid=auto\";"
],
"line_no": [
5,
11
]
} | static void FUNC_0(void)
{
const char *VAR_0;
QemuUUID measured;
VAR_0 = "-machine accel=tcg -device vmgenid,id=testvgid," "guid=auto";
qtest_start(VAR_0);
read_guid_from_memory(&measured);
g_assert(!qemu_uuid_is_null(&measured));
qtest_quit(global_qtest);
}
| [
"static void FUNC_0(void)\n{",
"const char *VAR_0;",
"QemuUUID measured;",
"VAR_0 = \"-machine accel=tcg -device vmgenid,id=testvgid,\" \"guid=auto\";",
"qtest_start(VAR_0);",
"read_guid_from_memory(&measured);",
"g_assert(!qemu_uuid_is_null(&measured));",
"qtest_quit(global_qtest);",
"}"
] | [
0,
1,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
23
],
[
27
],
[
29
]
] |
20,451 | static TCGv gen_lea_indexed(CPUM68KState *env, DisasContext *s, TCGv base)
{
uint32_t offset;
uint16_t ext;
TCGv add;
TCGv tmp;
uint32_t bd, od;
offset = s->pc;
ext = cpu_lduw_code(env, s->pc);
s->pc += 2;
if ((ext & 0x800) == 0 && !m68k_feature(s->env, M68K_FEATURE_WORD_INDEX))
... | true | qemu | d8633620a112296fcf6a6ae9a1cbba614c0ca502 | static TCGv gen_lea_indexed(CPUM68KState *env, DisasContext *s, TCGv base)
{
uint32_t offset;
uint16_t ext;
TCGv add;
TCGv tmp;
uint32_t bd, od;
offset = s->pc;
ext = cpu_lduw_code(env, s->pc);
s->pc += 2;
if ((ext & 0x800) == 0 && !m68k_feature(s->env, M68K_FEATURE_WORD_INDEX))
... | {
"code": [],
"line_no": []
} | static TCGv FUNC_0(CPUM68KState *env, DisasContext *s, TCGv base)
{
uint32_t offset;
uint16_t ext;
TCGv add;
TCGv tmp;
uint32_t bd, od;
offset = s->pc;
ext = cpu_lduw_code(env, s->pc);
s->pc += 2;
if ((ext & 0x800) == 0 && !m68k_feature(s->env, M68K_FEATURE_WORD_INDEX))
retur... | [
"static TCGv FUNC_0(CPUM68KState *env, DisasContext *s, TCGv base)\n{",
"uint32_t offset;",
"uint16_t ext;",
"TCGv add;",
"TCGv tmp;",
"uint32_t bd, od;",
"offset = s->pc;",
"ext = cpu_lduw_code(env, s->pc);",
"s->pc += 2;",
"if ((ext & 0x800) == 0 && !m68k_feature(s->env, M68K_FEATURE_WORD_INDEX)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
15,
16
],
[
17
],
[
19
],
[
20
],
[
21
],
[
22
],
[
23
],
[
24
],... |
20,452 | int swr_convert_frame(SwrContext *s,
AVFrame *out, const AVFrame *in)
{
int ret, setup = 0;
if (!swr_is_initialized(s)) {
if ((ret = swr_config_frame(s, out, in)) < 0)
return ret;
if ((ret = swr_init(s)) < 0)
return ret;
setup = 1;... | true | FFmpeg | 3fa8f263abf90650b62d43cb532cdb8cc5bd7c13 | int swr_convert_frame(SwrContext *s,
AVFrame *out, const AVFrame *in)
{
int ret, setup = 0;
if (!swr_is_initialized(s)) {
if ((ret = swr_config_frame(s, out, in)) < 0)
return ret;
if ((ret = swr_init(s)) < 0)
return ret;
setup = 1;... | {
"code": [
" out->nb_samples = swr_get_delay(s, s->out_sample_rate)",
" + in->nb_samples*(int64_t)s->out_sample_rate / s->in_sample_rate",
" + 3;"
],
"line_no": [
39,
41,
43
]
} | int FUNC_0(SwrContext *VAR_0,
AVFrame *VAR_1, const AVFrame *VAR_2)
{
int VAR_3, VAR_4 = 0;
if (!swr_is_initialized(VAR_0)) {
if ((VAR_3 = swr_config_frame(VAR_0, VAR_1, VAR_2)) < 0)
return VAR_3;
if ((VAR_3 = swr_init(VAR_0)) < 0)
return V... | [
"int FUNC_0(SwrContext *VAR_0,\nAVFrame *VAR_1, const AVFrame *VAR_2)\n{",
"int VAR_3, VAR_4 = 0;",
"if (!swr_is_initialized(VAR_0)) {",
"if ((VAR_3 = swr_config_frame(VAR_0, VAR_1, VAR_2)) < 0)\nreturn VAR_3;",
"if ((VAR_3 = swr_init(VAR_0)) < 0)\nreturn VAR_3;",
"VAR_4 = 1;",
"} else {",
"if ((VAR_3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13,
15
],
[
17,
19
],
[
21
],
[
23
],
[
27,
29
],
[
31
],
[
35
],
[
37
],
[
39,
41,
43
],
[
45
],
[
47,
49
],
[
51
],
[
53
],
... |
20,453 | av_cold static int fbdev_read_header(AVFormatContext *avctx,
AVFormatParameters *ap)
{
FBDevContext *fbdev = avctx->priv_data;
AVStream *st = NULL;
enum PixelFormat pix_fmt;
int ret, flags = O_RDONLY;
ret = av_parse_video_rate(&fbdev->framerate_q, fbdev-... | false | FFmpeg | 41b68dce4d148b6a227d001b32deb275c01aa550 | av_cold static int fbdev_read_header(AVFormatContext *avctx,
AVFormatParameters *ap)
{
FBDevContext *fbdev = avctx->priv_data;
AVStream *st = NULL;
enum PixelFormat pix_fmt;
int ret, flags = O_RDONLY;
ret = av_parse_video_rate(&fbdev->framerate_q, fbdev-... | {
"code": [],
"line_no": []
} | av_cold static int FUNC_0(AVFormatContext *avctx,
AVFormatParameters *ap)
{
FBDevContext *fbdev = avctx->priv_data;
AVStream *st = NULL;
enum PixelFormat VAR_0;
int VAR_1, VAR_2 = O_RDONLY;
VAR_1 = av_parse_video_rate(&fbdev->framerate_q, fbdev->framerat... | [
"av_cold static int FUNC_0(AVFormatContext *avctx,\nAVFormatParameters *ap)\n{",
"FBDevContext *fbdev = avctx->priv_data;",
"AVStream *st = NULL;",
"enum PixelFormat VAR_0;",
"int VAR_1, VAR_2 = O_RDONLY;",
"VAR_1 = av_parse_video_rate(&fbdev->framerate_q, fbdev->framerate);",
"if (VAR_1 < 0) {",
"av_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
37,
39
],
[
41
],
[
47,
49
],
[
53
],
[
55
],
[
57,... |
20,454 | static abi_long target_to_host_data_route(struct nlmsghdr *nlh)
{
struct ifinfomsg *ifi;
struct ifaddrmsg *ifa;
struct rtmsg *rtm;
switch (nlh->nlmsg_type) {
case RTM_GETLINK:
break;
case RTM_NEWLINK:
case RTM_DELLINK:
ifi = NLMSG_DATA(nlh);
ifi->ifi_type... | true | qemu | b9403979b5c51d42018f40bf568d07519edb992e | static abi_long target_to_host_data_route(struct nlmsghdr *nlh)
{
struct ifinfomsg *ifi;
struct ifaddrmsg *ifa;
struct rtmsg *rtm;
switch (nlh->nlmsg_type) {
case RTM_GETLINK:
break;
case RTM_NEWLINK:
case RTM_DELLINK:
ifi = NLMSG_DATA(nlh);
ifi->ifi_type... | {
"code": [
" ifi = NLMSG_DATA(nlh);",
" ifi->ifi_type = tswap16(ifi->ifi_type);",
" ifi->ifi_index = tswap32(ifi->ifi_index);",
" ifi->ifi_flags = tswap32(ifi->ifi_flags);",
" ifi->ifi_change = tswap32(ifi->ifi_change);",
" ifa = NLMSG_DATA(nlh);",
... | static abi_long FUNC_0(struct nlmsghdr *nlh)
{
struct ifinfomsg *VAR_0;
struct ifaddrmsg *VAR_1;
struct rtmsg *VAR_2;
switch (nlh->nlmsg_type) {
case RTM_GETLINK:
break;
case RTM_NEWLINK:
case RTM_DELLINK:
VAR_0 = NLMSG_DATA(nlh);
VAR_0->ifi_type = tswap1... | [
"static abi_long FUNC_0(struct nlmsghdr *nlh)\n{",
"struct ifinfomsg *VAR_0;",
"struct ifaddrmsg *VAR_1;",
"struct rtmsg *VAR_2;",
"switch (nlh->nlmsg_type) {",
"case RTM_GETLINK:\nbreak;",
"case RTM_NEWLINK:\ncase RTM_DELLINK:\nVAR_0 = NLMSG_DATA(nlh);",
"VAR_0->ifi_type = tswap16(VAR_0->ifi_type);",... | [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19,
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39,
41,
43,
45
],
[
47
],
[
49,
51
... |
20,456 | PPC_OP(cmp)
{
if (Ts0 < Ts1) {
T0 = 0x08;
} else if (Ts0 > Ts1) {
T0 = 0x04;
} else {
T0 = 0x02;
}
RETURN();
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | PPC_OP(cmp)
{
if (Ts0 < Ts1) {
T0 = 0x08;
} else if (Ts0 > Ts1) {
T0 = 0x04;
} else {
T0 = 0x02;
}
RETURN();
}
| {
"code": [
" RETURN();",
" } else {",
" } else {",
" } else {",
"PPC_OP(cmp)",
" if (Ts0 < Ts1) {",
" } else if (Ts0 > Ts1) {",
" } else {",
" } else {",
" } else {",
" } else {",
" } else {",
" RETURN();",
" } else {",
... | FUNC_0(VAR_0)
{
if (Ts0 < Ts1) {
T0 = 0x08;
} else if (Ts0 > Ts1) {
T0 = 0x04;
} else {
T0 = 0x02;
}
RETURN();
}
| [
"FUNC_0(VAR_0)\n{",
"if (Ts0 < Ts1) {",
"T0 = 0x08;",
"} else if (Ts0 > Ts1) {",
"T0 = 0x04;",
"} else {",
"T0 = 0x02;",
"}",
"RETURN();",
"}"
] | [
1,
1,
0,
1,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
20,458 | static int parse_channel_expressions(AVFilterContext *ctx,
int expected_nb_channels)
{
EvalContext *eval = ctx->priv;
char *args1 = av_strdup(eval->exprs);
char *expr, *last_expr, *buf;
double (* const *func1)(void *, double) = NULL;
const char * const *fu... | true | FFmpeg | efbf107f5b28866d2e82701484e2859f5aa77e6d | static int parse_channel_expressions(AVFilterContext *ctx,
int expected_nb_channels)
{
EvalContext *eval = ctx->priv;
char *args1 = av_strdup(eval->exprs);
char *expr, *last_expr, *buf;
double (* const *func1)(void *, double) = NULL;
const char * const *fu... | {
"code": [
" char *expr, *last_expr, *buf;"
],
"line_no": [
11
]
} | VAR_8staticVAR_8 VAR_8intVAR_8 VAR_8parse_channel_expressionsVAR_8(VAR_8AVFilterContextVAR_8 *VAR_8VAR_0VAR_8,
VAR_8intVAR_8 VAR_8VAR_1VAR_8)
{
VAR_8EvalContextVAR_8 *VAR_8evalVAR_8 = VAR_8VAR_0VAR_8->VAR_8privVAR_8;
VAR_8charVAR_8 *VAR_8VAR_2VAR_8 = VAR_8av_strdupVAR_8(... | [
"VAR_8staticVAR_8 VAR_8intVAR_8 VAR_8parse_channel_expressionsVAR_8(VAR_8AVFilterContextVAR_8 *VAR_8VAR_0VAR_8,\nVAR_8intVAR_8 VAR_8VAR_1VAR_8)\n{",
"VAR_8EvalContextVAR_8 *VAR_8evalVAR_8 = VAR_8VAR_0VAR_8->VAR_8privVAR_8;",
"VAR_8charVAR_8 *VAR_8VAR_2VAR_8 = VAR_8av_strdupVAR_8(VAR_8evalVAR_8->VAR_8exprsVAR_8)... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49,
51
],
[... |
20,459 | static int sdp_probe(AVProbeData *p1)
{
const char *p = p1->buf, *p_end = p1->buf + p1->buf_size;
/* we look for a line beginning "c=IN IP" */
while (p < p_end && *p != '\0') {
if (p + sizeof("c=IN IP") - 1 < p_end &&
av_strstart(p, "c=IN IP", NULL))
return AVPROBE_S... | true | FFmpeg | b425b81fd2040f173051efc0f1413f2101ba993e | static int sdp_probe(AVProbeData *p1)
{
const char *p = p1->buf, *p_end = p1->buf + p1->buf_size;
while (p < p_end && *p != '\0') {
if (p + sizeof("c=IN IP") - 1 < p_end &&
av_strstart(p, "c=IN IP", NULL))
return AVPROBE_SCORE_EXTENSION;
while (p < p_end ... | {
"code": [
" if (p + sizeof(\"c=IN IP\") - 1 < p_end &&"
],
"line_no": [
13
]
} | static int FUNC_0(AVProbeData *VAR_0)
{
const char *VAR_1 = VAR_0->buf, *VAR_2 = VAR_0->buf + VAR_0->buf_size;
while (VAR_1 < VAR_2 && *VAR_1 != '\0') {
if (VAR_1 + sizeof("c=IN IP") - 1 < VAR_2 &&
av_strstart(VAR_1, "c=IN IP", NULL))
return AVPROBE_SCORE_EXTENSION;... | [
"static int FUNC_0(AVProbeData *VAR_0)\n{",
"const char *VAR_1 = VAR_0->buf, *VAR_2 = VAR_0->buf + VAR_0->buf_size;",
"while (VAR_1 < VAR_2 && *VAR_1 != '\\0') {",
"if (VAR_1 + sizeof(\"c=IN IP\") - 1 < VAR_2 &&\nav_strstart(VAR_1, \"c=IN IP\", NULL))\nreturn AVPROBE_SCORE_EXTENSION;",
"while (VAR_1 < VAR_2... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11
],
[
13,
15,
17
],
[
21
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
]
] |
20,460 | int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples,
int *frame_size_ptr,
uint8_t *buf, int buf_size)
{
int ret;
*frame_size_ptr= 0;
ret = avctx->codec->decode(avctx, samples, frame_size_ptr,
buf, buf_si... | false | FFmpeg | fec9ccb7e6fdc6844b1e2d1bb95436b36f47a412 | int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples,
int *frame_size_ptr,
uint8_t *buf, int buf_size)
{
int ret;
*frame_size_ptr= 0;
ret = avctx->codec->decode(avctx, samples, frame_size_ptr,
buf, buf_si... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0, int16_t *VAR_1,
int *VAR_2,
uint8_t *VAR_3, int VAR_4)
{
int VAR_5;
*VAR_2= 0;
VAR_5 = VAR_0->codec->decode(VAR_0, VAR_1, VAR_2,
VAR_3, VAR_4);
VAR_0->frame_number++;
retur... | [
"int FUNC_0(AVCodecContext *VAR_0, int16_t *VAR_1,\nint *VAR_2,\nuint8_t *VAR_3, int VAR_4)\n{",
"int VAR_5;",
"*VAR_2= 0;",
"VAR_5 = VAR_0->codec->decode(VAR_0, VAR_1, VAR_2,\nVAR_3, VAR_4);",
"VAR_0->frame_number++;",
"return VAR_5;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
]
] |
20,461 | static int mpeg4_unpack_bframes_filter(AVBSFContext *ctx, AVPacket *out)
{
UnpackBFramesBSFContext *s = ctx->priv_data;
int pos_p = -1, nb_vop = 0, pos_vop2 = -1, ret = 0;
AVPacket *in;
ret = ff_bsf_get_packet(ctx, &in);
if (ret < 0)
return ret;
scan_buffer(in->data, in->size... | false | FFmpeg | 1c46e53dcc685593eaa0d730f263ec95c16a5da8 | static int mpeg4_unpack_bframes_filter(AVBSFContext *ctx, AVPacket *out)
{
UnpackBFramesBSFContext *s = ctx->priv_data;
int pos_p = -1, nb_vop = 0, pos_vop2 = -1, ret = 0;
AVPacket *in;
ret = ff_bsf_get_packet(ctx, &in);
if (ret < 0)
return ret;
scan_buffer(in->data, in->size... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVBSFContext *VAR_0, AVPacket *VAR_1)
{
UnpackBFramesBSFContext *s = VAR_0->priv_data;
int VAR_2 = -1, VAR_3 = 0, VAR_4 = -1, VAR_5 = 0;
AVPacket *in;
VAR_5 = ff_bsf_get_packet(VAR_0, &in);
if (VAR_5 < 0)
return VAR_5;
scan_buffer(in->data, in->size, &VAR_2,... | [
"static int FUNC_0(AVBSFContext *VAR_0, AVPacket *VAR_1)\n{",
"UnpackBFramesBSFContext *s = VAR_0->priv_data;",
"int VAR_2 = -1, VAR_3 = 0, VAR_4 = -1, VAR_5 = 0;",
"AVPacket *in;",
"VAR_5 = ff_bsf_get_packet(VAR_0, &in);",
"if (VAR_5 < 0)\nreturn VAR_5;",
"scan_buffer(in->data, in->size, &VAR_2, &VAR_3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
20,462 | static int set_string_number(void *obj, void *target_obj, const AVOption *o, const char *val, void *dst)
{
int ret = 0;
int num, den;
char c;
if (sscanf(val, "%d%*1[:/]%d%c", &num, &den, &c) == 2) {
if ((ret = write_number(obj, o, dst, 1, den, num)) >= 0)
return ret;
... | true | FFmpeg | 24327706e173c86ad7738dd9c21f214cc78cd8d1 | static int set_string_number(void *obj, void *target_obj, const AVOption *o, const char *val, void *dst)
{
int ret = 0;
int num, den;
char c;
if (sscanf(val, "%d%*1[:/]%d%c", &num, &den, &c) == 2) {
if ((ret = write_number(obj, o, dst, 1, den, num)) >= 0)
return ret;
... | {
"code": [
" const AVOption *o_named = av_opt_find(target_obj, buf, o->unit, 0, 0);"
],
"line_no": [
57
]
} | static int FUNC_0(void *VAR_0, void *VAR_1, const AVOption *VAR_2, const char *VAR_3, void *VAR_4)
{
int VAR_5 = 0;
int VAR_6, VAR_7;
char VAR_8;
if (sscanf(VAR_3, "%VAR_12%*1[:/]%VAR_12%VAR_8", &VAR_6, &VAR_7, &VAR_8) == 2) {
if ((VAR_5 = write_number(VAR_0, VAR_2, VAR_4, 1, VAR_7, VAR_... | [
"static int FUNC_0(void *VAR_0, void *VAR_1, const AVOption *VAR_2, const char *VAR_3, void *VAR_4)\n{",
"int VAR_5 = 0;",
"int VAR_6, VAR_7;",
"char VAR_8;",
"if (sscanf(VAR_3, \"%VAR_12%*1[:/]%VAR_12%VAR_8\", &VAR_6, &VAR_7, &VAR_8) == 2) {",
"if ((VAR_5 = write_number(VAR_0, VAR_2, VAR_4, 1, VAR_7, VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
... |
20,463 | static void qmp_input_pop(QmpInputVisitor *qiv, Error **errp)
{
StackObject *tos = &qiv->stack[qiv->nb_stack - 1];
assert(qiv->nb_stack > 0);
if (qiv->strict) {
GHashTable *const top_ht = tos->h;
if (top_ht) {
GHashTableIter iter;
const char *key;
... | true | qemu | 15c2f669e3fb2bc97f7b42d1871f595c0ac24af8 | static void qmp_input_pop(QmpInputVisitor *qiv, Error **errp)
{
StackObject *tos = &qiv->stack[qiv->nb_stack - 1];
assert(qiv->nb_stack > 0);
if (qiv->strict) {
GHashTable *const top_ht = tos->h;
if (top_ht) {
GHashTableIter iter;
const char *key;
... | {
"code": [
"static void qmp_input_pop(QmpInputVisitor *qiv, Error **errp)"
],
"line_no": [
1
]
} | static void FUNC_0(QmpInputVisitor *VAR_0, Error **VAR_1)
{
StackObject *tos = &VAR_0->stack[VAR_0->nb_stack - 1];
assert(VAR_0->nb_stack > 0);
if (VAR_0->strict) {
GHashTable *const top_ht = tos->h;
if (top_ht) {
GHashTableIter iter;
const char *VAR_2;
... | [
"static void FUNC_0(QmpInputVisitor *VAR_0, Error **VAR_1)\n{",
"StackObject *tos = &VAR_0->stack[VAR_0->nb_stack - 1];",
"assert(VAR_0->nb_stack > 0);",
"if (VAR_0->strict) {",
"GHashTable *const top_ht = tos->h;",
"if (top_ht) {",
"GHashTableIter iter;",
"const char *VAR_2;",
"g_hash_table_iter_in... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
]
] |
20,464 | static void large_dict(void)
{
GString *gstr = g_string_new("");
QObject *obj;
gen_test_json(gstr, 10, 100);
obj = qobject_from_json(gstr->str, NULL);
g_assert(obj != NULL);
qobject_decref(obj);
g_string_free(gstr, true);
}
| true | qemu | aec4b054ea36c53c8b887da99f20010133b84378 | static void large_dict(void)
{
GString *gstr = g_string_new("");
QObject *obj;
gen_test_json(gstr, 10, 100);
obj = qobject_from_json(gstr->str, NULL);
g_assert(obj != NULL);
qobject_decref(obj);
g_string_free(gstr, true);
}
| {
"code": [
" obj = qobject_from_json(gstr->str, NULL);"
],
"line_no": [
13
]
} | static void FUNC_0(void)
{
GString *gstr = g_string_new("");
QObject *obj;
gen_test_json(gstr, 10, 100);
obj = qobject_from_json(gstr->str, NULL);
g_assert(obj != NULL);
qobject_decref(obj);
g_string_free(gstr, true);
}
| [
"static void FUNC_0(void)\n{",
"GString *gstr = g_string_new(\"\");",
"QObject *obj;",
"gen_test_json(gstr, 10, 100);",
"obj = qobject_from_json(gstr->str, NULL);",
"g_assert(obj != NULL);",
"qobject_decref(obj);",
"g_string_free(gstr, true);",
"}"
] | [
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
]
] |
20,465 | static uint32_t m25p80_transfer8(SSISlave *ss, uint32_t tx)
{
Flash *s = M25P80(ss);
uint32_t r = 0;
switch (s->state) {
case STATE_PAGE_PROGRAM:
DB_PRINT_L(1, "page program cur_addr=%#" PRIx64 " data=%" PRIx8 "\n",
s->cur_addr, (uint8_t)tx);
flash_write8(s... | true | qemu | b68cb06093a36bd6fbd4d06cd62c08629fea2242 | static uint32_t m25p80_transfer8(SSISlave *ss, uint32_t tx)
{
Flash *s = M25P80(ss);
uint32_t r = 0;
switch (s->state) {
case STATE_PAGE_PROGRAM:
DB_PRINT_L(1, "page program cur_addr=%#" PRIx64 " data=%" PRIx8 "\n",
s->cur_addr, (uint8_t)tx);
flash_write8(s... | {
"code": [
" s->cur_addr++;",
" s->cur_addr = (s->cur_addr + 1) % s->size;"
],
"line_no": [
23,
37
]
} | static uint32_t FUNC_0(SSISlave *ss, uint32_t tx)
{
Flash *s = M25P80(ss);
uint32_t r = 0;
switch (s->state) {
case STATE_PAGE_PROGRAM:
DB_PRINT_L(1, "page program cur_addr=%#" PRIx64 " data=%" PRIx8 "\n",
s->cur_addr, (uint8_t)tx);
flash_write8(s, s->cur_a... | [
"static uint32_t FUNC_0(SSISlave *ss, uint32_t tx)\n{",
"Flash *s = M25P80(ss);",
"uint32_t r = 0;",
"switch (s->state) {",
"case STATE_PAGE_PROGRAM:\nDB_PRINT_L(1, \"page program cur_addr=%#\" PRIx64 \" data=%\" PRIx8 \"\\n\",\ns->cur_addr, (uint8_t)tx);",
"flash_write8(s, s->cur_addr, (uint8_t)tx);",
... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15,
17,
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
33,
35
],
[
37
],
[
39
],
[
43,
45,
47
],
[
49
],
[
53
],
[
55
],
[
57... |
20,466 | static void dec_scall(DisasContext *dc)
{
if (dc->imm5 == 7) {
LOG_DIS("scall\n");
} else if (dc->imm5 == 2) {
LOG_DIS("break\n");
} else {
cpu_abort(dc->env, "invalid opcode\n");
}
if (dc->imm5 == 7) {
tcg_gen_movi_tl(cpu_pc, dc->pc);
t_gen_raise... | true | qemu | 3604a76fea6ff37738d4a8f596be38407be74a83 | static void dec_scall(DisasContext *dc)
{
if (dc->imm5 == 7) {
LOG_DIS("scall\n");
} else if (dc->imm5 == 2) {
LOG_DIS("break\n");
} else {
cpu_abort(dc->env, "invalid opcode\n");
}
if (dc->imm5 == 7) {
tcg_gen_movi_tl(cpu_pc, dc->pc);
t_gen_raise... | {
"code": [
" cpu_abort(dc->env, \"invalid opcode\\n\");",
" } else {"
],
"line_no": [
15,
13
]
} | static void FUNC_0(DisasContext *VAR_0)
{
if (VAR_0->imm5 == 7) {
LOG_DIS("scall\n");
} else if (VAR_0->imm5 == 2) {
LOG_DIS("break\n");
} else {
cpu_abort(VAR_0->env, "invalid opcode\n");
}
if (VAR_0->imm5 == 7) {
tcg_gen_movi_tl(cpu_pc, VAR_0->pc);
... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"if (VAR_0->imm5 == 7) {",
"LOG_DIS(\"scall\\n\");",
"} else if (VAR_0->imm5 == 2) {",
"LOG_DIS(\"break\\n\");",
"} else {",
"cpu_abort(VAR_0->env, \"invalid opcode\\n\");",
"}",
"if (VAR_0->imm5 == 7) {",
"tcg_gen_movi_tl(cpu_pc, VAR_0->pc);",
"t_ge... | [
0,
0,
0,
0,
0,
0,
1,
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
]
] |
20,468 | static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed,
int completion)
{
int dir;
size_t len = 0;
#ifdef DEBUG_ISOCH
const char *str = NULL;
#endif
int pid;
int ret;
int i;
USBDevice *dev;
struct ohci_iso_td iso_td;
uint32_t ad... | true | qemu | 4f4321c11ff6e98583846bfd6f0e81954924b003 | static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed,
int completion)
{
int dir;
size_t len = 0;
#ifdef DEBUG_ISOCH
const char *str = NULL;
#endif
int pid;
int ret;
int i;
USBDevice *dev;
struct ohci_iso_td iso_td;
uint32_t ad... | {
"code": [
" ret = ohci->usb_packet.len;",
" ohci->usb_packet.pid = pid;",
" ohci->usb_packet.devaddr = OHCI_BM(ed->flags, ED_FA);",
" ohci->usb_packet.devep = OHCI_BM(ed->flags, ED_EN);",
" ohci->usb_packet.data = ohci->usb_buf;",
" ... | static int FUNC_0(OHCIState *VAR_0, struct ohci_ed *VAR_1,
int VAR_2)
{
int VAR_3;
size_t len = 0;
#ifdef DEBUG_ISOCH
const char *str = NULL;
#endif
int VAR_4;
int VAR_5;
int VAR_6;
USBDevice *dev;
struct ohci_iso_td VAR_7;
uint32_t addr;
... | [
"static int FUNC_0(OHCIState *VAR_0, struct ohci_ed *VAR_1,\nint VAR_2)\n{",
"int VAR_3;",
"size_t len = 0;",
"#ifdef DEBUG_ISOCH\nconst char *str = NULL;",
"#endif\nint VAR_4;",
"int VAR_5;",
"int VAR_6;",
"USBDevice *dev;",
"struct ohci_iso_td VAR_7;",
"uint32_t addr;",
"uint16_t starting_fram... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11,
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[... |
20,469 | int spapr_vio_send_crq(VIOsPAPRDevice *dev, uint8_t *crq)
{
int rc;
uint8_t byte;
if (!dev->crq.qsize) {
fprintf(stderr, "spapr_vio_send_creq on uninitialized queue\n");
return -1;
}
/* Maybe do a fast path for KVM just writing to the pages */
rc = spapr_tce_dma_read... | true | qemu | ad0ebb91cd8b5fdc4a583b03645677771f420a46 | int spapr_vio_send_crq(VIOsPAPRDevice *dev, uint8_t *crq)
{
int rc;
uint8_t byte;
if (!dev->crq.qsize) {
fprintf(stderr, "spapr_vio_send_creq on uninitialized queue\n");
return -1;
}
rc = spapr_tce_dma_read(dev, dev->crq.qladdr + dev->crq.qnext, &byte, 1);
if (... | {
"code": [
" return 0;",
" return 0;",
" rc = spapr_tce_dma_read(dev, dev->crq.qladdr + dev->crq.qnext, &byte, 1);",
" rc = spapr_tce_dma_write(dev, dev->crq.qladdr + dev->crq.qnext + 8,",
" rc = spapr_tce_dma_write(dev, dev->crq.qladdr + dev->crq.qnext, crq, 8);"
],
"line_no":... | int FUNC_0(VIOsPAPRDevice *VAR_0, uint8_t *VAR_1)
{
int VAR_2;
uint8_t byte;
if (!VAR_0->VAR_1.qsize) {
fprintf(stderr, "spapr_vio_send_creq on uninitialized queue\n");
return -1;
}
VAR_2 = spapr_tce_dma_read(VAR_0, VAR_0->VAR_1.qladdr + VAR_0->VAR_1.qnext, &byte, 1... | [
"int FUNC_0(VIOsPAPRDevice *VAR_0, uint8_t *VAR_1)\n{",
"int VAR_2;",
"uint8_t byte;",
"if (!VAR_0->VAR_1.qsize) {",
"fprintf(stderr, \"spapr_vio_send_creq on uninitialized queue\\n\");",
"return -1;",
"}",
"VAR_2 = spapr_tce_dma_read(VAR_0, VAR_0->VAR_1.qladdr + VAR_0->VAR_1.qnext, &byte, 1);",
"if... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
51
],
... |
20,470 | static void vhost_log_put(struct vhost_dev *dev, bool sync)
{
struct vhost_log *log = dev->log;
if (!log) {
return;
}
dev->log = NULL;
dev->log_size = 0;
--log->refcnt;
if (log->refcnt == 0) {
/* Sync only the range covered by the old log */
if (dev->lo... | true | qemu | 5c0ba1be37181bd8a7c96c7f81b19ae5f8e66e2d | static void vhost_log_put(struct vhost_dev *dev, bool sync)
{
struct vhost_log *log = dev->log;
if (!log) {
return;
}
dev->log = NULL;
dev->log_size = 0;
--log->refcnt;
if (log->refcnt == 0) {
if (dev->log_size && sync) {
vhost_log_sync_ra... | {
"code": [
" dev->log = NULL;",
" dev->log_size = 0;"
],
"line_no": [
15,
17
]
} | static void FUNC_0(struct vhost_dev *VAR_0, bool VAR_1)
{
struct vhost_log *VAR_2 = VAR_0->VAR_2;
if (!VAR_2) {
return;
}
VAR_0->VAR_2 = NULL;
VAR_0->log_size = 0;
--VAR_2->refcnt;
if (VAR_2->refcnt == 0) {
if (VAR_0->log_size && VAR_1) {
... | [
"static void FUNC_0(struct vhost_dev *VAR_0, bool VAR_1)\n{",
"struct vhost_log *VAR_2 = VAR_0->VAR_2;",
"if (!VAR_2) {",
"return;",
"}",
"VAR_0->VAR_2 = NULL;",
"VAR_0->log_size = 0;",
"--VAR_2->refcnt;",
"if (VAR_2->refcnt == 0) {",
"if (VAR_0->log_size && VAR_1) {",
"vhost_log_sync_range(VAR_... | [
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
... |
20,473 | static void mirror_set_speed(BlockJob *job, int64_t speed, Error **errp)
{
MirrorBlockJob *s = container_of(job, MirrorBlockJob, common);
if (speed < 0) {
error_setg(errp, QERR_INVALID_PARAMETER, "speed");
return;
}
ratelimit_set_speed(&s->limit, speed / BDRV_SECTOR_SIZE, SLICE_... | true | qemu | f3e4ce4af336f2ea306fa0f40ec1a5149864ca8c | static void mirror_set_speed(BlockJob *job, int64_t speed, Error **errp)
{
MirrorBlockJob *s = container_of(job, MirrorBlockJob, common);
if (speed < 0) {
error_setg(errp, QERR_INVALID_PARAMETER, "speed");
return;
}
ratelimit_set_speed(&s->limit, speed / BDRV_SECTOR_SIZE, SLICE_... | {
"code": [
" ratelimit_set_speed(&s->limit, speed / BDRV_SECTOR_SIZE, SLICE_TIME);",
" ratelimit_set_speed(&s->limit, speed / BDRV_SECTOR_SIZE, SLICE_TIME);",
" ratelimit_set_speed(&s->limit, speed / BDRV_SECTOR_SIZE, SLICE_TIME);",
" ratelimit_set_speed(&s->limit, speed / BDRV_SECTOR_SIZ... | static void FUNC_0(BlockJob *VAR_0, int64_t VAR_1, Error **VAR_2)
{
MirrorBlockJob *s = container_of(VAR_0, MirrorBlockJob, common);
if (VAR_1 < 0) {
error_setg(VAR_2, QERR_INVALID_PARAMETER, "VAR_1");
return;
}
ratelimit_set_speed(&s->limit, VAR_1 / BDRV_SECTOR_SIZE, SLICE_TIME... | [
"static void FUNC_0(BlockJob *VAR_0, int64_t VAR_1, Error **VAR_2)\n{",
"MirrorBlockJob *s = container_of(VAR_0, MirrorBlockJob, common);",
"if (VAR_1 < 0) {",
"error_setg(VAR_2, QERR_INVALID_PARAMETER, \"VAR_1\");",
"return;",
"}",
"ratelimit_set_speed(&s->limit, VAR_1 / BDRV_SECTOR_SIZE, SLICE_TIME);"... | [
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
20,474 | static uint16_t nvme_map_prp(QEMUSGList *qsg, QEMUIOVector *iov, uint64_t prp1,
uint64_t prp2, uint32_t len, NvmeCtrl *n)
{
hwaddr trans_len = n->page_size - (prp1 % n->page_size);
trans_len = MIN(len, trans_len);
int num_prps = (len >> n->page_bits) + 1;
if (!prp1) ... | true | qemu | 1ee24514aed34760fb2863d98bea3a1b705d9c9f | static uint16_t nvme_map_prp(QEMUSGList *qsg, QEMUIOVector *iov, uint64_t prp1,
uint64_t prp2, uint32_t len, NvmeCtrl *n)
{
hwaddr trans_len = n->page_size - (prp1 % n->page_size);
trans_len = MIN(len, trans_len);
int num_prps = (len >> n->page_bits) + 1;
if (!prp1) ... | {
"code": [
" if (!prp1) {",
" if (!prp2) {",
" if (!prp_ent || prp_ent & (n->page_size - 1)) {",
" if (!prp_ent || prp_ent & (n->page_size - 1)) {",
" if (prp2 & (n->page_size - 1)) {",
" if (!prp1) {"
],
"line_no": [
15,
4... | static uint16_t FUNC_0(QEMUSGList *qsg, QEMUIOVector *iov, uint64_t prp1,
uint64_t prp2, uint32_t len, NvmeCtrl *n)
{
hwaddr trans_len = n->page_size - (prp1 % n->page_size);
trans_len = MIN(len, trans_len);
int VAR_0 = (len >> n->page_bits) + 1;
if (!prp1) {
... | [
"static uint16_t FUNC_0(QEMUSGList *qsg, QEMUIOVector *iov, uint64_t prp1,\nuint64_t prp2, uint32_t len, NvmeCtrl *n)\n{",
"hwaddr trans_len = n->page_size - (prp1 % n->page_size);",
"trans_len = MIN(len, trans_len);",
"int VAR_0 = (len >> n->page_bits) + 1;",
"if (!prp1) {",
"return NVME_INVALID_FIELD | ... | [
0,
0,
0,
0,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
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... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
20,475 | static int init_input(AVFormatContext *s, const char *filename, AVDictionary **options)
{
int ret;
AVProbeData pd = {filename, NULL, 0};
if(s->iformat && !strlen(filename))
return 0;
if (s->pb) {
s->flags |= AVFMT_FLAG_CUSTOM_IO;
if (!s->iformat)
return a... | true | FFmpeg | 1171d938af219aa1217a472391bc392f6e698386 | static int init_input(AVFormatContext *s, const char *filename, AVDictionary **options)
{
int ret;
AVProbeData pd = {filename, NULL, 0};
if(s->iformat && !strlen(filename))
return 0;
if (s->pb) {
s->flags |= AVFMT_FLAG_CUSTOM_IO;
if (!s->iformat)
return a... | {
"code": [
" if(s->iformat && !strlen(filename))",
" return 0;"
],
"line_no": [
11,
13
]
} | static int FUNC_0(AVFormatContext *VAR_0, const char *VAR_1, AVDictionary **VAR_2)
{
int VAR_3;
AVProbeData pd = {VAR_1, NULL, 0};
if(VAR_0->iformat && !strlen(VAR_1))
return 0;
if (VAR_0->pb) {
VAR_0->flags |= AVFMT_FLAG_CUSTOM_IO;
if (!VAR_0->iformat)
r... | [
"static int FUNC_0(AVFormatContext *VAR_0, const char *VAR_1, AVDictionary **VAR_2)\n{",
"int VAR_3;",
"AVProbeData pd = {VAR_1, NULL, 0};",
"if(VAR_0->iformat && !strlen(VAR_1))\nreturn 0;",
"if (VAR_0->pb) {",
"VAR_0->flags |= AVFMT_FLAG_CUSTOM_IO;",
"if (!VAR_0->iformat)\nreturn av_probe_input_buffer... | [
0,
0,
0,
1,
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
],
[
37,
39,
41
],
[
45,
47,
49
],
[
51,
53
],
[
55
],
[
57
]
] |
20,476 | static GuestPCIAddress *get_pci_info(char *guid, Error **errp)
{
HDEVINFO dev_info;
SP_DEVINFO_DATA dev_info_data;
DWORD size = 0;
int i;
char dev_name[MAX_PATH];
char *buffer = NULL;
GuestPCIAddress *pci = NULL;
char *name = g_strdup(&guid[4]);
if (!QueryDosDevice(name, ... | true | qemu | 9bd8e9330ade42878b19a5172131087220d590d5 | static GuestPCIAddress *get_pci_info(char *guid, Error **errp)
{
HDEVINFO dev_info;
SP_DEVINFO_DATA dev_info_data;
DWORD size = 0;
int i;
char dev_name[MAX_PATH];
char *buffer = NULL;
GuestPCIAddress *pci = NULL;
char *name = g_strdup(&guid[4]);
if (!QueryDosDevice(name, ... | {
"code": [
" goto out;"
],
"line_no": [
81
]
} | static GuestPCIAddress *FUNC_0(char *guid, Error **errp)
{
HDEVINFO dev_info;
SP_DEVINFO_DATA dev_info_data;
DWORD size = 0;
int VAR_0;
char VAR_1[MAX_PATH];
char *VAR_2 = NULL;
GuestPCIAddress *pci = NULL;
char *VAR_3 = g_strdup(&guid[4]);
if (!QueryDosDevice(VAR_3, VAR_... | [
"static GuestPCIAddress *FUNC_0(char *guid, Error **errp)\n{",
"HDEVINFO dev_info;",
"SP_DEVINFO_DATA dev_info_data;",
"DWORD size = 0;",
"int VAR_0;",
"char VAR_1[MAX_PATH];",
"char *VAR_2 = NULL;",
"GuestPCIAddress *pci = NULL;",
"char *VAR_3 = g_strdup(&guid[4]);",
"if (!QueryDosDevice(VAR_3, V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[... |
20,477 | int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval)
{
int i, regnum;
PowerPCCPU *cpu = POWERPC_CPU(cs);
CPUPPCState *env = &cpu->env;
/* General purpose registers */
if ((tolower(name[0]) == 'r') &&
ppc_cpu_get_reg_num(name + 1, ARRAY_SIZE(env->gpr), ®num))... | true | qemu | 95a5befc2f8b359e72926f89cd661d063c2cf06c | int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval)
{
int i, regnum;
PowerPCCPU *cpu = POWERPC_CPU(cs);
CPUPPCState *env = &cpu->env;
if ((tolower(name[0]) == 'r') &&
ppc_cpu_get_reg_num(name + 1, ARRAY_SIZE(env->gpr), ®num)) {
*pval = env->gpr[re... | {
"code": [
" if ((tolower(name[0]) == 'r') &&",
" if ((tolower(name[0]) == 'f') &&"
],
"line_no": [
15,
29
]
} | int FUNC_0(CPUState *VAR_0, const char *VAR_1, uint64_t *VAR_2)
{
int VAR_3, VAR_4;
PowerPCCPU *cpu = POWERPC_CPU(VAR_0);
CPUPPCState *env = &cpu->env;
if ((tolower(VAR_1[0]) == 'r') &&
ppc_cpu_get_reg_num(VAR_1 + 1, ARRAY_SIZE(env->gpr), &VAR_4)) {
*VAR_2 = env->gpr[VAR_4... | [
"int FUNC_0(CPUState *VAR_0, const char *VAR_1, uint64_t *VAR_2)\n{",
"int VAR_3, VAR_4;",
"PowerPCCPU *cpu = POWERPC_CPU(VAR_0);",
"CPUPPCState *env = &cpu->env;",
"if ((tolower(VAR_1[0]) == 'r') &&\nppc_cpu_get_reg_num(VAR_1 + 1, ARRAY_SIZE(env->gpr), &VAR_4)) {",
"*VAR_2 = env->gpr[VAR_4];",
"return ... | [
0,
0,
0,
0,
1,
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
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
... |
20,479 | PPC_OP(update_nip)
{
env->nip = PARAM(1);
RETURN();
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | PPC_OP(update_nip)
{
env->nip = PARAM(1);
RETURN();
}
| {
"code": [
" env->nip = PARAM(1);",
" RETURN();",
" RETURN();"
],
"line_no": [
5,
7,
7
]
} | FUNC_0(VAR_0)
{
env->nip = PARAM(1);
RETURN();
}
| [
"FUNC_0(VAR_0)\n{",
"env->nip = PARAM(1);",
"RETURN();",
"}"
] | [
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
20,481 | static int mpeg1_decode_sequence(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
Mpeg1Context *s1 = avctx->priv_data;
MpegEncContext *s = &s1->mpeg_enc_ctx;
int width, height;
int i, v, j;
init_get_bits(&s->gb, buf, buf_size * 8);
width =... | true | FFmpeg | 863522431fb2fc7d35fce582fcaacdcf37fc3c44 | static int mpeg1_decode_sequence(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
Mpeg1Context *s1 = avctx->priv_data;
MpegEncContext *s = &s1->mpeg_enc_ctx;
int width, height;
int i, v, j;
init_get_bits(&s->gb, buf, buf_size * 8);
width =... | {
"code": [
" s->bit_rate = get_bits(&s->gb, 18) * 400;"
],
"line_no": [
61
]
} | static int FUNC_0(AVCodecContext *VAR_0,
const uint8_t *VAR_1, int VAR_2)
{
Mpeg1Context *s1 = VAR_0->priv_data;
MpegEncContext *s = &s1->mpeg_enc_ctx;
int VAR_3, VAR_4;
int VAR_5, VAR_6, VAR_8;
init_get_bits(&s->gb, VAR_1, VAR_2 * 8);
VAR_3 = get_b... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nconst uint8_t *VAR_1, int VAR_2)\n{",
"Mpeg1Context *s1 = VAR_0->priv_data;",
"MpegEncContext *s = &s1->mpeg_enc_ctx;",
"int VAR_3, VAR_4;",
"int VAR_5, VAR_6, VAR_8;",
"init_get_bits(&s->gb, VAR_1, VAR_2 * 8);",
"VAR_3 = get_bits(&s->gb, 12);",
"VAR_4 = ge... | [
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
... |
20,482 | static void vnc_async_encoding_end(VncState *orig, VncState *local)
{
orig->tight = local->tight;
orig->zlib = local->zlib;
orig->hextile = local->hextile;
orig->zrle = local->zrle;
orig->lossy_rect = local->lossy_rect;
} | true | qemu | c53af37f375ce9c4999ff451c51173bdc1167e67 | static void vnc_async_encoding_end(VncState *orig, VncState *local)
{
orig->tight = local->tight;
orig->zlib = local->zlib;
orig->hextile = local->hextile;
orig->zrle = local->zrle;
orig->lossy_rect = local->lossy_rect;
} | {
"code": [],
"line_no": []
} | static void FUNC_0(VncState *VAR_0, VncState *VAR_1)
{
VAR_0->tight = VAR_1->tight;
VAR_0->zlib = VAR_1->zlib;
VAR_0->hextile = VAR_1->hextile;
VAR_0->zrle = VAR_1->zrle;
VAR_0->lossy_rect = VAR_1->lossy_rect;
} | [
"static void FUNC_0(VncState *VAR_0, VncState *VAR_1)\n{",
"VAR_0->tight = VAR_1->tight;",
"VAR_0->zlib = VAR_1->zlib;",
"VAR_0->hextile = VAR_1->hextile;",
"VAR_0->zrle = VAR_1->zrle;",
"VAR_0->lossy_rect = VAR_1->lossy_rect;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
]
] |
20,483 | static int s302m_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
S302Context *s = avctx->priv_data;
AVFrame *frame = data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int block_size, ret;
int... | true | FFmpeg | a38e9797cb4123d13ba871d166a737786ba04a9b | static int s302m_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
S302Context *s = avctx->priv_data;
AVFrame *frame = data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int block_size, ret;
int... | {
"code": [
" *o++ = (ff_reverse[buf[2]] << 24) |",
" *o++ = (ff_reverse[buf[6] & 0xf0] << 28) |",
" *o++ = (ff_reverse[buf[2] & 0xf0] << 28) |",
" *o++ = (ff_reverse[buf[5] & 0xf0] << 28) |"
],
"line_no": [
63,
69,
107,
113
]
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
S302Context *s = VAR_0->priv_data;
AVFrame *frame = VAR_1;
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
int VAR_6, VAR_7;
int VAR_8;
int VAR_... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"S302Context *s = VAR_0->priv_data;",
"AVFrame *frame = VAR_1;",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"int VAR_6, VAR_7;",
"int VAR_8;",
"int VAR_9 = -1;",
"int VAR_10 =... | [
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,
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... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
31
],
[
33
],
[
39
],
[
41
],
[
43,
45
],
[
49,
51
],
[
53
],
[
57
... |
20,484 | static gboolean tcp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
{
CharDriverState *chr = opaque;
TCPCharDriver *s = chr->opaque;
uint8_t buf[READ_BUF_LEN];
int len, size;
if (!s->connected || s->max_size <= 0) {
return FALSE;
}
len = sizeof(buf);
if (l... | false | qemu | cdbf6e165988ab9d7c01da03b9e27bb8ac0c76aa | static gboolean tcp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
{
CharDriverState *chr = opaque;
TCPCharDriver *s = chr->opaque;
uint8_t buf[READ_BUF_LEN];
int len, size;
if (!s->connected || s->max_size <= 0) {
return FALSE;
}
len = sizeof(buf);
if (l... | {
"code": [],
"line_no": []
} | static gboolean FUNC_0(GIOChannel *chan, GIOCondition cond, void *opaque)
{
CharDriverState *chr = opaque;
TCPCharDriver *s = chr->opaque;
uint8_t buf[READ_BUF_LEN];
int VAR_0, VAR_1;
if (!s->connected || s->max_size <= 0) {
return FALSE;
}
VAR_0 = sizeof(buf);
if (VA... | [
"static gboolean FUNC_0(GIOChannel *chan, GIOCondition cond, void *opaque)\n{",
"CharDriverState *chr = opaque;",
"TCPCharDriver *s = chr->opaque;",
"uint8_t buf[READ_BUF_LEN];",
"int VAR_0, VAR_1;",
"if (!s->connected || s->max_size <= 0) {",
"return FALSE;",
"}",
"VAR_0 = sizeof(buf);",
"if (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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
20,486 | static void ivshmem_realize(PCIDevice *dev, Error **errp)
{
IVShmemState *s = IVSHMEM_COMMON(dev);
if (!qtest_enabled()) {
error_report("ivshmem is deprecated, please use ivshmem-plain"
" or ivshmem-doorbell instead");
}
if (!!qemu_chr_fe_get_driver(&s->server_chr... | false | qemu | f17fd4fdf0df3d2f3444399d04c38d22b9a3e1b7 | static void ivshmem_realize(PCIDevice *dev, Error **errp)
{
IVShmemState *s = IVSHMEM_COMMON(dev);
if (!qtest_enabled()) {
error_report("ivshmem is deprecated, please use ivshmem-plain"
" or ivshmem-doorbell instead");
}
if (!!qemu_chr_fe_get_driver(&s->server_chr... | {
"code": [],
"line_no": []
} | static void FUNC_0(PCIDevice *VAR_0, Error **VAR_1)
{
IVShmemState *s = IVSHMEM_COMMON(VAR_0);
if (!qtest_enabled()) {
error_report("ivshmem is deprecated, please use ivshmem-plain"
" or ivshmem-doorbell instead");
}
if (!!qemu_chr_fe_get_driver(&s->server_chr) + ... | [
"static void FUNC_0(PCIDevice *VAR_0, Error **VAR_1)\n{",
"IVShmemState *s = IVSHMEM_COMMON(VAR_0);",
"if (!qtest_enabled()) {",
"error_report(\"ivshmem is deprecated, please use ivshmem-plain\"\n\" or ivshmem-doorbell instead\");",
"}",
"if (!!qemu_chr_fe_get_driver(&s->server_chr) + !!s->shmobj != 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
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
... |
20,487 | void css_conditional_io_interrupt(SubchDev *sch)
{
/*
* If the subchannel is not currently status pending, make it pending
* with alert status.
*/
if (!(sch->curr_status.scsw.ctrl & SCSW_STCTL_STATUS_PEND)) {
S390CPU *cpu = s390_cpu_addr2state(0);
uint8_t isc = (sch->curr_... | false | qemu | 91b0a8f33419573c1d741e49559bfb666fd8b1f0 | void css_conditional_io_interrupt(SubchDev *sch)
{
if (!(sch->curr_status.scsw.ctrl & SCSW_STCTL_STATUS_PEND)) {
S390CPU *cpu = s390_cpu_addr2state(0);
uint8_t isc = (sch->curr_status.pmcw.flags & PMCW_FLAGS_MASK_ISC) >> 11;
trace_css_io_interrupt(sch->cssid, sch->ssid, sc... | {
"code": [],
"line_no": []
} | void FUNC_0(SubchDev *VAR_0)
{
if (!(VAR_0->curr_status.scsw.ctrl & SCSW_STCTL_STATUS_PEND)) {
S390CPU *cpu = s390_cpu_addr2state(0);
uint8_t isc = (VAR_0->curr_status.pmcw.flags & PMCW_FLAGS_MASK_ISC) >> 11;
trace_css_io_interrupt(VAR_0->cssid, VAR_0->ssid, VAR_0->schid,
... | [
"void FUNC_0(SubchDev *VAR_0)\n{",
"if (!(VAR_0->curr_status.scsw.ctrl & SCSW_STCTL_STATUS_PEND)) {",
"S390CPU *cpu = s390_cpu_addr2state(0);",
"uint8_t isc = (VAR_0->curr_status.pmcw.flags & PMCW_FLAGS_MASK_ISC) >> 11;",
"trace_css_io_interrupt(VAR_0->cssid, VAR_0->ssid, VAR_0->schid,\nVAR_0->curr_status.p... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
13
],
[
15
],
[
17
],
[
21,
23,
25
],
[
27
],
[
29,
31
],
[
35,
37,
39,
41,
43
],
[
45
],
[
47
]
] |
20,488 | int load_image_gzipped(const char *filename, hwaddr addr, uint64_t max_sz)
{
uint8_t *compressed_data = NULL;
uint8_t *data = NULL;
gsize len;
ssize_t bytes;
int ret = -1;
if (!g_file_get_contents(filename, (char **) &compressed_data, &len,
NULL)) {
... | false | qemu | 7d48a0f7217474899c5f5920b21f4cfdf4efa8d1 | int load_image_gzipped(const char *filename, hwaddr addr, uint64_t max_sz)
{
uint8_t *compressed_data = NULL;
uint8_t *data = NULL;
gsize len;
ssize_t bytes;
int ret = -1;
if (!g_file_get_contents(filename, (char **) &compressed_data, &len,
NULL)) {
... | {
"code": [],
"line_no": []
} | int FUNC_0(const char *VAR_0, hwaddr VAR_1, uint64_t VAR_2)
{
uint8_t *compressed_data = NULL;
uint8_t *data = NULL;
gsize len;
ssize_t bytes;
int VAR_3 = -1;
if (!g_file_get_contents(VAR_0, (char **) &compressed_data, &len,
NULL)) {
goto out;
... | [
"int FUNC_0(const char *VAR_0, hwaddr VAR_1, uint64_t VAR_2)\n{",
"uint8_t *compressed_data = NULL;",
"uint8_t *data = NULL;",
"gsize len;",
"ssize_t bytes;",
"int VAR_3 = -1;",
"if (!g_file_get_contents(VAR_0, (char **) &compressed_data, &len,\nNULL)) {",
"goto out;",
"}",
"if (len < 2 ||\ncompre... | [
0,
0,
0,
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
],
[
29,
31,
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
],
[... |
20,489 | static ioreq_t *cpu_get_ioreq_from_shared_memory(XenIOState *state, int vcpu)
{
ioreq_t *req = xen_vcpu_ioreq(state->shared_page, vcpu);
if (req->state != STATE_IOREQ_READY) {
DPRINTF("I/O request not ready: "
"%x, ptr: %x, port: %"PRIx64", "
"data: %"PRIx64", cou... | false | qemu | 47d3df2387ed6927732584ffa4159c26d9f4dee8 | static ioreq_t *cpu_get_ioreq_from_shared_memory(XenIOState *state, int vcpu)
{
ioreq_t *req = xen_vcpu_ioreq(state->shared_page, vcpu);
if (req->state != STATE_IOREQ_READY) {
DPRINTF("I/O request not ready: "
"%x, ptr: %x, port: %"PRIx64", "
"data: %"PRIx64", cou... | {
"code": [],
"line_no": []
} | static ioreq_t *FUNC_0(XenIOState *state, int vcpu)
{
ioreq_t *req = xen_vcpu_ioreq(state->shared_page, vcpu);
if (req->state != STATE_IOREQ_READY) {
DPRINTF("I/O request not ready: "
"%x, ptr: %x, port: %"PRIx64", "
"data: %"PRIx64", count: %" FMT_ioreq_size ", s... | [
"static ioreq_t *FUNC_0(XenIOState *state, int vcpu)\n{",
"ioreq_t *req = xen_vcpu_ioreq(state->shared_page, vcpu);",
"if (req->state != STATE_IOREQ_READY) {",
"DPRINTF(\"I/O request not ready: \"\n\"%x, ptr: %x, port: %\"PRIx64\", \"\n\"data: %\"PRIx64\", count: %\" FMT_ioreq_size \", size: %\" FMT_ioreq_siz... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13,
15,
17,
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
]
] |
20,490 | static void vfio_pci_write_config(PCIDevice *pdev, uint32_t addr,
uint32_t val, int len)
{
VFIODevice *vdev = DO_UPCAST(VFIODevice, pdev, pdev);
uint32_t val_le = cpu_to_le32(val);
DPRINTF("%s(%04x:%02x:%02x.%x, @0x%x, 0x%x, len=0x%x)\n", __func__,
vdev-... | false | qemu | 4b5d5e87c7ab2e979a2cad6c8e01bcae55b85f1c | static void vfio_pci_write_config(PCIDevice *pdev, uint32_t addr,
uint32_t val, int len)
{
VFIODevice *vdev = DO_UPCAST(VFIODevice, pdev, pdev);
uint32_t val_le = cpu_to_le32(val);
DPRINTF("%s(%04x:%02x:%02x.%x, @0x%x, 0x%x, len=0x%x)\n", __func__,
vdev-... | {
"code": [],
"line_no": []
} | static void FUNC_0(PCIDevice *VAR_0, uint32_t VAR_1,
uint32_t VAR_2, int VAR_3)
{
VFIODevice *vdev = DO_UPCAST(VFIODevice, VAR_0, VAR_0);
uint32_t val_le = cpu_to_le32(VAR_2);
DPRINTF("%s(%04x:%02x:%02x.%x, @0x%x, 0x%x, VAR_3=0x%x)\n", __func__,
vdev->ho... | [
"static void FUNC_0(PCIDevice *VAR_0, uint32_t VAR_1,\nuint32_t VAR_2, int VAR_3)\n{",
"VFIODevice *vdev = DO_UPCAST(VFIODevice, VAR_0, VAR_0);",
"uint32_t val_le = cpu_to_le32(VAR_2);",
"DPRINTF(\"%s(%04x:%02x:%02x.%x, @0x%x, 0x%x, VAR_3=0x%x)\\n\", __func__,\nvdev->host.domain, vdev->host.bus, vdev->host.sl... | [
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
23
],
[
25,
27,
29
],
[
31
],
[
37
],
[
39
],
[
41
],
[
43
],
[
49,
51
],
[
53
],
[
57
],
[
61
],
[
65
],
[
67
... |
20,491 | static int check_refblocks(BlockDriverState *bs, BdrvCheckResult *res,
BdrvCheckMode fix, uint16_t **refcount_table,
int64_t *nb_clusters)
{
BDRVQcowState *s = bs->opaque;
int64_t i;
for(i = 0; i < s->refcount_table_size; i++) {
uint64_t... | false | qemu | 78fb328e854542d79bebe54f3a426cba6d46dbf1 | static int check_refblocks(BlockDriverState *bs, BdrvCheckResult *res,
BdrvCheckMode fix, uint16_t **refcount_table,
int64_t *nb_clusters)
{
BDRVQcowState *s = bs->opaque;
int64_t i;
for(i = 0; i < s->refcount_table_size; i++) {
uint64_t... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, BdrvCheckResult *VAR_1,
BdrvCheckMode VAR_2, uint16_t **VAR_3,
int64_t *VAR_4)
{
BDRVQcowState *s = VAR_0->opaque;
int64_t i;
for(i = 0; i < s->refcount_table_size; i++) {
uint64_t offset, clust... | [
"static int FUNC_0(BlockDriverState *VAR_0, BdrvCheckResult *VAR_1,\nBdrvCheckMode VAR_2, uint16_t **VAR_3,\nint64_t *VAR_4)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"int64_t i;",
"for(i = 0; i < s->refcount_table_size; i++) {",
"uint64_t offset, cluster;",
"offset = s->VAR_3[i];",
"cluster = offset >>... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
51
],
[
55
... |
20,492 | static void gen_lwarx(DisasContext *ctx)
{
TCGv t0;
gen_set_access_type(ctx, ACCESS_RES);
t0 = tcg_temp_local_new();
gen_addr_reg_index(ctx, t0);
gen_check_align(ctx, t0, 0x03);
gen_qemu_ld32u(ctx, cpu_gpr[rD(ctx->opcode)], t0);
tcg_gen_mov_tl(cpu_reserve, t0);
tcg_temp_free(t0)... | false | qemu | 18b21a2f83a26c3d6a9e7f0bdc4e8eb2b177e8f6 | static void gen_lwarx(DisasContext *ctx)
{
TCGv t0;
gen_set_access_type(ctx, ACCESS_RES);
t0 = tcg_temp_local_new();
gen_addr_reg_index(ctx, t0);
gen_check_align(ctx, t0, 0x03);
gen_qemu_ld32u(ctx, cpu_gpr[rD(ctx->opcode)], t0);
tcg_gen_mov_tl(cpu_reserve, t0);
tcg_temp_free(t0)... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0)
{
TCGv t0;
gen_set_access_type(VAR_0, ACCESS_RES);
t0 = tcg_temp_local_new();
gen_addr_reg_index(VAR_0, t0);
gen_check_align(VAR_0, t0, 0x03);
gen_qemu_ld32u(VAR_0, cpu_gpr[rD(VAR_0->opcode)], t0);
tcg_gen_mov_tl(cpu_reserve, t0);
tcg_temp... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"TCGv t0;",
"gen_set_access_type(VAR_0, ACCESS_RES);",
"t0 = tcg_temp_local_new();",
"gen_addr_reg_index(VAR_0, t0);",
"gen_check_align(VAR_0, t0, 0x03);",
"gen_qemu_ld32u(VAR_0, cpu_gpr[rD(VAR_0->opcode)], t0);",
"tcg_gen_mov_tl(cpu_reserve, t0);",
"tcg... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.