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 |
|---|---|---|---|---|---|---|---|---|---|---|
14,315 | int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
int tag;
if (fc->nb_streams < 1)
return 0;
st = fc->streams[fc->nb_streams-1];
avio_rb32(pb); /* version + flags */
ff_mp4_read_descr(fc, pb, &tag);
if (tag == MP4ESDescrTag) {
... | true | FFmpeg | 86dfcfd0e30d6645eea2c63c1c60a0550e7c97ea | int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
int tag;
if (fc->nb_streams < 1)
return 0;
st = fc->streams[fc->nb_streams-1];
avio_rb32(pb);
ff_mp4_read_descr(fc, pb, &tag);
if (tag == MP4ESDescrTag) {
ff_mp4_parse_es_d... | {
"code": [
"int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb, MOVAtom atom)"
],
"line_no": [
1
]
} | int FUNC_0(AVFormatContext *VAR_0, AVIOContext *VAR_1, MOVAtom VAR_2)
{
AVStream *st;
int VAR_3;
if (VAR_0->nb_streams < 1)
return 0;
st = VAR_0->streams[VAR_0->nb_streams-1];
avio_rb32(VAR_1);
ff_mp4_read_descr(VAR_0, VAR_1, &VAR_3);
if (VAR_3 == MP4ESDescrTag) {
... | [
"int FUNC_0(AVFormatContext *VAR_0, AVIOContext *VAR_1, MOVAtom VAR_2)\n{",
"AVStream *st;",
"int VAR_3;",
"if (VAR_0->nb_streams < 1)\nreturn 0;",
"st = VAR_0->streams[VAR_0->nb_streams-1];",
"avio_rb32(VAR_1);",
"ff_mp4_read_descr(VAR_0, VAR_1, &VAR_3);",
"if (VAR_3 == MP4ESDescrTag) {",
"ff_mp4_p... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35,
37
],
[
39
],
[
41
]
] |
14,316 | static void usb_serial_handle_data(USBDevice *dev, USBPacket *p)
{
USBSerialState *s = (USBSerialState *)dev;
uint8_t devep = p->ep->nr;
struct iovec *iov;
uint8_t header[2];
int i, first_len, len;
switch (p->pid) {
case USB_TOKEN_OUT:
if (devep != 2)
goto fai... | true | qemu | 6ab3fc32ea640026726bc5f9f4db622d0954fb8a | static void usb_serial_handle_data(USBDevice *dev, USBPacket *p)
{
USBSerialState *s = (USBSerialState *)dev;
uint8_t devep = p->ep->nr;
struct iovec *iov;
uint8_t header[2];
int i, first_len, len;
switch (p->pid) {
case USB_TOKEN_OUT:
if (devep != 2)
goto fai... | {
"code": [
" qemu_chr_fe_write(s->cs, iov->iov_base, iov->iov_len);"
],
"line_no": [
29
]
} | static void FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)
{
USBSerialState *s = (USBSerialState *)VAR_0;
uint8_t devep = VAR_1->ep->nr;
struct iovec *VAR_2;
uint8_t header[2];
int VAR_3, VAR_4, VAR_5;
switch (VAR_1->pid) {
case USB_TOKEN_OUT:
if (devep != 2)
goto... | [
"static void FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)\n{",
"USBSerialState *s = (USBSerialState *)VAR_0;",
"uint8_t devep = VAR_1->ep->nr;",
"struct iovec *VAR_2;",
"uint8_t header[2];",
"int VAR_3, VAR_4, VAR_5;",
"switch (VAR_1->pid) {",
"case USB_TOKEN_OUT:\nif (devep != 2)\ngoto fail;",
"for (... | [
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
],
[
11
],
[
13
],
[
17
],
[
19,
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39,
41,
43
],
[
45
],
[
47
],
[
49
... |
14,317 | int ff_hevc_decode_nal_pps(HEVCContext *s)
{
GetBitContext *gb = &s->HEVClc.gb;
HEVCSPS *sps = NULL;
int pic_area_in_ctbs, pic_area_in_min_cbs, pic_area_in_min_tbs;
int log2_diff_ctb_min_tb_size;
int i, j, x, y, ctb_addr_rs, tile_id;
int ret = 0;
int pps_id = 0;
AVBuff... | true | FFmpeg | 4d33873c2990b8d6096f60fef384f0efc4482b55 | int ff_hevc_decode_nal_pps(HEVCContext *s)
{
GetBitContext *gb = &s->HEVClc.gb;
HEVCSPS *sps = NULL;
int pic_area_in_ctbs, pic_area_in_min_cbs, pic_area_in_min_tbs;
int log2_diff_ctb_min_tb_size;
int i, j, x, y, ctb_addr_rs, tile_id;
int ret = 0;
int pps_id = 0;
AVBuff... | {
"code": [
" int ret = 0;",
" int ret = 0;",
" int pps_id = 0;"
],
"line_no": [
15,
15,
17
]
} | int FUNC_0(HEVCContext *VAR_0)
{
GetBitContext *gb = &VAR_0->HEVClc.gb;
HEVCSPS *sps = NULL;
int VAR_1, VAR_2, VAR_3;
int VAR_4;
int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;
int VAR_11 = 0;
int VAR_12 = 0;
AVBufferRef *pps_buf;
HEVCPPS *pps = av_mallocz(sizeof(*... | [
"int FUNC_0(HEVCContext *VAR_0)\n{",
"GetBitContext *gb = &VAR_0->HEVClc.gb;",
"HEVCSPS *sps = NULL;",
"int VAR_1, VAR_2, VAR_3;",
"int VAR_4;",
"int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;",
"int VAR_11 = 0;",
"int VAR_12 = 0;",
"AVBufferRef *pps_buf;",
"HEVCPPS *pps = av_mallocz(sizeo... | [
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27,
29
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
53
],
[
55
... |
14,318 | static int raw_read_options(QDict *options, BlockDriverState *bs,
BDRVRawState *s, Error **errp)
{
Error *local_err = NULL;
QemuOpts *opts = NULL;
int64_t real_size = 0;
int ret;
real_size = bdrv_getlength(bs->file->bs);
if (real_size < 0) {
error_setg_errno(errp, -real_si... | true | qemu | 80a15e3e2eed96926d886693663503985c9a98bb | static int raw_read_options(QDict *options, BlockDriverState *bs,
BDRVRawState *s, Error **errp)
{
Error *local_err = NULL;
QemuOpts *opts = NULL;
int64_t real_size = 0;
int ret;
real_size = bdrv_getlength(bs->file->bs);
if (real_size < 0) {
error_setg_errno(errp, -real_si... | {
"code": [
" if (!QEMU_IS_ALIGNED(s->size, BDRV_SECTOR_SIZE)) {"
],
"line_no": [
103
]
} | static int FUNC_0(QDict *VAR_0, BlockDriverState *VAR_1,
BDRVRawState *VAR_2, Error **VAR_3)
{
Error *local_err = NULL;
QemuOpts *opts = NULL;
int64_t real_size = 0;
int VAR_4;
real_size = bdrv_getlength(VAR_1->file->VAR_1);
if (real_size < 0) {
error_setg_errno(VAR_3, -re... | [
"static int FUNC_0(QDict *VAR_0, BlockDriverState *VAR_1,\nBDRVRawState *VAR_2, Error **VAR_3)\n{",
"Error *local_err = NULL;",
"QemuOpts *opts = NULL;",
"int64_t real_size = 0;",
"int VAR_4;",
"real_size = bdrv_getlength(VAR_1->file->VAR_1);",
"if (real_size < 0) {",
"error_setg_errno(VAR_3, -real_si... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[... |
14,319 | inline static void RENAME(hcscale)(uint16_t *dst, long dstWidth, uint8_t *src1, uint8_t *src2,
int srcW, int xInc, int flags, int canMMX2BeUsed, int16_t *hChrFilter,
int16_t *hChrFilterPos, int hChrFilterSize, void *funnyUVCode,
... | true | FFmpeg | 8b2fce0d3f5a56c40c28899c9237210ca8f9cf75 | inline static void RENAME(hcscale)(uint16_t *dst, long dstWidth, uint8_t *src1, uint8_t *src2,
int srcW, int xInc, int flags, int canMMX2BeUsed, int16_t *hChrFilter,
int16_t *hChrFilterPos, int hChrFilterSize, void *funnyUVCode,
... | {
"code": [
" RENAME(yuy2ToUV)(formatConvBuffer, formatConvBuffer+2048, src1, src2, srcW);",
" src2= formatConvBuffer+2048;",
" RENAME(uyvyToUV)(formatConvBuffer, formatConvBuffer+2048, src1, src2, srcW);",
" src2= formatConvBuffer+2048;",
" RENAME(bgr32ToUV)(for... | inline static void FUNC_0(hcscale)(uint16_t *dst, long dstWidth, uint8_t *src1, uint8_t *src2,
int srcW, int xInc, int flags, int canMMX2BeUsed, int16_t *hChrFilter,
int16_t *hChrFilterPos, int hChrFilterSize, void *funnyUVCode,
... | [
"inline static void FUNC_0(hcscale)(uint16_t *dst, long dstWidth, uint8_t *src1, uint8_t *src2,\nint srcW, int xInc, int flags, int canMMX2BeUsed, int16_t *hChrFilter,\nint16_t *hChrFilterPos, int hChrFilterSize, void *funnyUVCode,\nint srcFormat, uint8_t *formatConvBuffer, int16_t *mmx2Filter,\nint32_t *mmx2Filter... | [
0,
0,
1,
0,
1,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0... | [
[
1,
3,
5,
7,
9,
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
14,320 | uint64_t cpu_tick_get_count(CPUTimer *timer)
{
uint64_t real_count = timer_to_cpu_ticks(
qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - timer->clock_offset,
timer->frequency);
TIMER_DPRINTF("%s get_count count=0x%016lx (%s) p=%p\n",
timer->name, real_count,
... | true | qemu | bf43330aa418908f7a5e2acda28ac1a8ed0d8ad6 | uint64_t cpu_tick_get_count(CPUTimer *timer)
{
uint64_t real_count = timer_to_cpu_ticks(
qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - timer->clock_offset,
timer->frequency);
TIMER_DPRINTF("%s get_count count=0x%016lx (%s) p=%p\n",
timer->name, real_count,
... | {
"code": [
" TIMER_DPRINTF(\"%s get_count count=0x%016lx (%s) p=%p\\n\",",
" timer->disabled?\"disabled\":\"enabled\", timer);",
" if (timer->disabled)",
" real_count |= timer->disabled_mask;"
],
"line_no": [
13,
17,
21,
23
]
} | uint64_t FUNC_0(CPUTimer *timer)
{
uint64_t real_count = timer_to_cpu_ticks(
qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - timer->clock_offset,
timer->frequency);
TIMER_DPRINTF("%s get_count count=0x%016lx (%s) p=%p\n",
timer->name, real_count,
ti... | [
"uint64_t FUNC_0(CPUTimer *timer)\n{",
"uint64_t real_count = timer_to_cpu_ticks(\nqemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - timer->clock_offset,\ntimer->frequency);",
"TIMER_DPRINTF(\"%s get_count count=0x%016lx (%s) p=%p\\n\",\ntimer->name, real_count,\ntimer->disabled?\"disabled\":\"enabled\", timer);",
"if ... | [
0,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5,
7,
9
],
[
13,
15,
17
],
[
21,
23
],
[
27
],
[
29
]
] |
14,321 | static int mov_read_colr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
char color_parameter_type[5] = { 0 };
int color_primaries, color_trc, color_matrix;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams - 1];
avio_read(pb, color_para... | true | FFmpeg | 5c720657c23afd798ae0db7c7362eb859a89ab3d | static int mov_read_colr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
char color_parameter_type[5] = { 0 };
int color_primaries, color_trc, color_matrix;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams - 1];
avio_read(pb, color_para... | {
"code": [
" avio_read(pb, color_parameter_type, 4);"
],
"line_no": [
21
]
} | static int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1, MOVAtom VAR_2)
{
AVStream *st;
char VAR_3[5] = { 0 };
int VAR_4, VAR_5, VAR_6;
if (VAR_0->fc->nb_streams < 1)
return 0;
st = VAR_0->fc->streams[VAR_0->fc->nb_streams - 1];
avio_read(VAR_1, VAR_3, 4);
if (strncmp(VA... | [
"static int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1, MOVAtom VAR_2)\n{",
"AVStream *st;",
"char VAR_3[5] = { 0 };",
"int VAR_4, VAR_5, VAR_6;",
"if (VAR_0->fc->nb_streams < 1)\nreturn 0;",
"st = VAR_0->fc->streams[VAR_0->fc->nb_streams - 1];",
"avio_read(VAR_1, VAR_3, 4);",
"if (strncmp(VAR_3, \"... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
17
],
[
21
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45,
47,
49
],
[
53
],
[
55
],
[... |
14,322 | void gen_intermediate_code(CPUOpenRISCState *env, struct TranslationBlock *tb)
{
OpenRISCCPU *cpu = openrisc_env_get_cpu(env);
CPUState *cs = CPU(cpu);
struct DisasContext ctx, *dc = &ctx;
uint32_t pc_start;
uint32_t next_page_start;
int num_insns;
int max_insns;
pc_start = tb... | true | qemu | 0c53d7342b4e8412f3b81eed67f053304813dc5d | void gen_intermediate_code(CPUOpenRISCState *env, struct TranslationBlock *tb)
{
OpenRISCCPU *cpu = openrisc_env_get_cpu(env);
CPUState *cs = CPU(cpu);
struct DisasContext ctx, *dc = &ctx;
uint32_t pc_start;
uint32_t next_page_start;
int num_insns;
int max_insns;
pc_start = tb... | {
"code": [
" dc->delayed_branch = !!(dc->tb_flags & D_FLAG);"
],
"line_no": [
39
]
} | void FUNC_0(CPUOpenRISCState *VAR_0, struct TranslationBlock *VAR_1)
{
OpenRISCCPU *cpu = openrisc_env_get_cpu(VAR_0);
CPUState *cs = CPU(cpu);
struct DisasContext VAR_2, *VAR_3 = &VAR_2;
uint32_t pc_start;
uint32_t next_page_start;
int VAR_4;
int VAR_5;
pc_start = VAR_1->pc;
... | [
"void FUNC_0(CPUOpenRISCState *VAR_0, struct TranslationBlock *VAR_1)\n{",
"OpenRISCCPU *cpu = openrisc_env_get_cpu(VAR_0);",
"CPUState *cs = CPU(cpu);",
"struct DisasContext VAR_2, *VAR_3 = &VAR_2;",
"uint32_t pc_start;",
"uint32_t next_page_start;",
"int VAR_4;",
"int VAR_5;",
"pc_start = VAR_1->p... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
... |
14,323 | static int videotoolbox_common_end_frame(AVCodecContext *avctx, AVFrame *frame)
{
int status;
AVVideotoolboxContext *videotoolbox = avctx->hwaccel_context;
VTContext *vtctx = avctx->internal->hwaccel_priv_data;
av_buffer_unref(&frame->buf[0]);
if (!videotoolbox->session || !vtctx->bitstrea... | true | FFmpeg | b6eaa3928e198554a3934dd5ad6eac4d16f27df2 | static int videotoolbox_common_end_frame(AVCodecContext *avctx, AVFrame *frame)
{
int status;
AVVideotoolboxContext *videotoolbox = avctx->hwaccel_context;
VTContext *vtctx = avctx->internal->hwaccel_priv_data;
av_buffer_unref(&frame->buf[0]);
if (!videotoolbox->session || !vtctx->bitstrea... | {
"code": [
" av_buffer_unref(&frame->buf[0]);"
],
"line_no": [
13
]
} | static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1)
{
int VAR_2;
AVVideotoolboxContext *videotoolbox = VAR_0->hwaccel_context;
VTContext *vtctx = VAR_0->internal->hwaccel_priv_data;
av_buffer_unref(&VAR_1->buf[0]);
if (!videotoolbox->session || !vtctx->bitstream)
return AVERR... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1)\n{",
"int VAR_2;",
"AVVideotoolboxContext *videotoolbox = VAR_0->hwaccel_context;",
"VTContext *vtctx = VAR_0->internal->hwaccel_priv_data;",
"av_buffer_unref(&VAR_1->buf[0]);",
"if (!videotoolbox->session || !vtctx->bitstream)\nreturn AVERROR_INVA... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17,
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
43
],
[
45
]
] |
14,325 | static void block_job_completed_single(BlockJob *job)
{
if (!job->ret) {
if (job->driver->commit) {
job->driver->commit(job);
} else {
if (job->driver->abort) {
job->driver->abort(job);
if (job->cb) {
job->cb(job->opaque, job->ret);
if (... | true | qemu | e8a40bf71d606f9f87866fb2461eaed52814b38e | static void block_job_completed_single(BlockJob *job)
{
if (!job->ret) {
if (job->driver->commit) {
job->driver->commit(job);
} else {
if (job->driver->abort) {
job->driver->abort(job);
if (job->cb) {
job->cb(job->opaque, job->ret);
if (... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockJob *VAR_0)
{
if (!VAR_0->ret) {
if (VAR_0->driver->commit) {
VAR_0->driver->commit(VAR_0);
} else {
if (VAR_0->driver->abort) {
VAR_0->driver->abort(VAR_0);
if (VAR_0->cb) {
VAR_0->cb(VAR_0->opaque, VAR_0->ret);
... | [
"static void FUNC_0(BlockJob *VAR_0)\n{",
"if (!VAR_0->ret) {",
"if (VAR_0->driver->commit) {",
"VAR_0->driver->commit(VAR_0);",
"} else {",
"if (VAR_0->driver->abort) {",
"VAR_0->driver->abort(VAR_0);",
"if (VAR_0->cb) {",
"VAR_0->cb(VAR_0->opaque, VAR_0->ret);",
"if (block_job_is_cancelled(VAR_0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
12
],
[
14
],
[
16
],
[
25
],
[
27
],
[
30
],
[
32
],
[
34
],
[
36
],
[
38
],
[
40
],
[
43
],
[
48
],
[
50
],
[
52
],
[
55
... |
14,326 | static UHCIQueue *uhci_queue_get(UHCIState *s, UHCI_TD *td, USBEndpoint *ep)
{
uint32_t token = uhci_queue_token(td);
UHCIQueue *queue;
QTAILQ_FOREACH(queue, &s->queues, next) {
if (queue->token == token) {
return queue;
}
}
queue = g_new0(UHCIQueue, 1);
... | true | qemu | 66a08cbe6ad1aebec8eecf58b3ba042e19dd1649 | static UHCIQueue *uhci_queue_get(UHCIState *s, UHCI_TD *td, USBEndpoint *ep)
{
uint32_t token = uhci_queue_token(td);
UHCIQueue *queue;
QTAILQ_FOREACH(queue, &s->queues, next) {
if (queue->token == token) {
return queue;
}
}
queue = g_new0(UHCIQueue, 1);
... | {
"code": [
"static UHCIQueue *uhci_queue_get(UHCIState *s, UHCI_TD *td, USBEndpoint *ep)",
" uint32_t token = uhci_queue_token(td);",
" QTAILQ_FOREACH(queue, &s->queues, next) {",
" if (queue->token == token) {",
" return queue;",
" queue->token = token;"
],
"li... | static UHCIQueue *FUNC_0(UHCIState *s, UHCI_TD *td, USBEndpoint *ep)
{
uint32_t token = uhci_queue_token(td);
UHCIQueue *queue;
QTAILQ_FOREACH(queue, &s->queues, next) {
if (queue->token == token) {
return queue;
}
}
queue = g_new0(UHCIQueue, 1);
queue->... | [
"static UHCIQueue *FUNC_0(UHCIState *s, UHCI_TD *td, USBEndpoint *ep)\n{",
"uint32_t token = uhci_queue_token(td);",
"UHCIQueue *queue;",
"QTAILQ_FOREACH(queue, &s->queues, next) {",
"if (queue->token == token) {",
"return queue;",
"}",
"}",
"queue = g_new0(UHCIQueue, 1);",
"queue->uhci = s;",
"... | [
1,
1,
0,
1,
1,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
14,327 | HBitmap *hbitmap_alloc(uint64_t size, int granularity)
{
HBitmap *hb = g_malloc0(sizeof (struct HBitmap));
unsigned i;
assert(granularity >= 0 && granularity < 64);
size = (size + (1ULL << granularity) - 1) >> granularity;
assert(size <= ((uint64_t)1 << HBITMAP_LOG_MAX_SIZE));
hb->siz... | true | qemu | e1cf5582644ef63528993fb2b88dd3b43b9914c6 | HBitmap *hbitmap_alloc(uint64_t size, int granularity)
{
HBitmap *hb = g_malloc0(sizeof (struct HBitmap));
unsigned i;
assert(granularity >= 0 && granularity < 64);
size = (size + (1ULL << granularity) - 1) >> granularity;
assert(size <= ((uint64_t)1 << HBITMAP_LOG_MAX_SIZE));
hb->siz... | {
"code": [
" HBitmap *hb = g_malloc0(sizeof (struct HBitmap));",
" hb->levels[i] = g_malloc0(size * sizeof(unsigned long));"
],
"line_no": [
5,
27
]
} | HBitmap *FUNC_0(uint64_t size, int granularity)
{
HBitmap *hb = g_malloc0(sizeof (struct HBitmap));
unsigned VAR_0;
assert(granularity >= 0 && granularity < 64);
size = (size + (1ULL << granularity) - 1) >> granularity;
assert(size <= ((uint64_t)1 << HBITMAP_LOG_MAX_SIZE));
hb->size =... | [
"HBitmap *FUNC_0(uint64_t size, int granularity)\n{",
"HBitmap *hb = g_malloc0(sizeof (struct HBitmap));",
"unsigned VAR_0;",
"assert(granularity >= 0 && granularity < 64);",
"size = (size + (1ULL << granularity) - 1) >> granularity;",
"assert(size <= ((uint64_t)1 << HBITMAP_LOG_MAX_SIZE));",
"hb->size ... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
41
],
[
43
],
[
45
],
[
47
]
] |
14,328 | static int mp3_read_header(AVFormatContext *s)
{
MP3DecContext *mp3 = s->priv_data;
AVStream *st;
int64_t off;
int ret;
int i;
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = ... | false | FFmpeg | 1c9215e580b6436d1aff3c0118ef01269712ebd9 | static int mp3_read_header(AVFormatContext *s)
{
MP3DecContext *mp3 = s->priv_data;
AVStream *st;
int64_t off;
int ret;
int i;
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
MP3DecContext *mp3 = VAR_0->priv_data;
AVStream *st;
int64_t off;
int VAR_1;
int VAR_2;
st = avformat_new_stream(VAR_0, NULL);
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->co... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"MP3DecContext *mp3 = VAR_0->priv_data;",
"AVStream *st;",
"int64_t off;",
"int VAR_1;",
"int VAR_2;",
"st = avformat_new_stream(VAR_0, NULL);",
"if (!st)\nreturn AVERROR(ENOMEM);",
"st->codec->codec_type = AVMEDIA_TYPE_AUDIO;",
"st->codec->codec_id ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
37
],
[
41
],
[
43
],
[
47,
49
],
[
53,
55
],
[
59,
61
... |
14,329 | static av_cold int close_decoder(AVCodecContext *avctx)
{
PGSSubContext *ctx = avctx->priv_data;
av_freep(&ctx->picture.rle);
ctx->picture.rle_buffer_size = 0;
return 0;
}
| false | FFmpeg | d150a147dac67faeaf6b1f25a523ae330168ee1e | static av_cold int close_decoder(AVCodecContext *avctx)
{
PGSSubContext *ctx = avctx->priv_data;
av_freep(&ctx->picture.rle);
ctx->picture.rle_buffer_size = 0;
return 0;
}
| {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
PGSSubContext *ctx = avctx->priv_data;
av_freep(&ctx->picture.rle);
ctx->picture.rle_buffer_size = 0;
return 0;
}
| [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"PGSSubContext *ctx = avctx->priv_data;",
"av_freep(&ctx->picture.rle);",
"ctx->picture.rle_buffer_size = 0;",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
17
]
] |
14,330 | static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
const uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size)
{
GSMParseContext *s = s1->priv_data;
ParseContext *pc = &s->pc;
int next;
if (!s->block_size) {
... | false | FFmpeg | 4d2f83f8acb6c6444c3b276e15c5369d28b7c037 | static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
const uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size)
{
GSMParseContext *s = s1->priv_data;
ParseContext *pc = &s->pc;
int next;
if (!s->block_size) {
... | {
"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)
{
GSMParseContext *s = VAR_0->priv_data;
ParseContext *pc = &s->pc;
int VAR_6;
if (!s->block_size) {
switc... | [
"static int FUNC_0(AVCodecParserContext *VAR_0, AVCodecContext *VAR_1,\nconst uint8_t **VAR_2, int *VAR_3,\nconst uint8_t *VAR_4, int VAR_5)\n{",
"GSMParseContext *s = VAR_0->priv_data;",
"ParseContext *pc = &s->pc;",
"int VAR_6;",
"if (!s->block_size) {",
"switch (VAR_1->codec_id) {",
"case AV_CODEC_ID... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
47,
49
],
[
51
... |
14,331 | static void put_ebml_uint(ByteIOContext *pb, unsigned int elementid, uint64_t val)
{
int i, bytes = 1;
while (val >> bytes*8) bytes++;
put_ebml_id(pb, elementid);
put_ebml_num(pb, bytes, 0);
for (i = bytes - 1; i >= 0; i--)
put_byte(pb, val >> i*8);
}
| false | FFmpeg | d597655f771979c70c08f8f8ed84c1319da121e8 | static void put_ebml_uint(ByteIOContext *pb, unsigned int elementid, uint64_t val)
{
int i, bytes = 1;
while (val >> bytes*8) bytes++;
put_ebml_id(pb, elementid);
put_ebml_num(pb, bytes, 0);
for (i = bytes - 1; i >= 0; i--)
put_byte(pb, val >> i*8);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(ByteIOContext *VAR_0, unsigned int VAR_1, uint64_t VAR_2)
{
int VAR_3, VAR_4 = 1;
while (VAR_2 >> VAR_4*8) VAR_4++;
put_ebml_id(VAR_0, VAR_1);
put_ebml_num(VAR_0, VAR_4, 0);
for (VAR_3 = VAR_4 - 1; VAR_3 >= 0; VAR_3--)
put_byte(VAR_0, VAR_2 >> VAR_3*8);
}
| [
"static void FUNC_0(ByteIOContext *VAR_0, unsigned int VAR_1, uint64_t VAR_2)\n{",
"int VAR_3, VAR_4 = 1;",
"while (VAR_2 >> VAR_4*8) VAR_4++;",
"put_ebml_id(VAR_0, VAR_1);",
"put_ebml_num(VAR_0, VAR_4, 0);",
"for (VAR_3 = VAR_4 - 1; VAR_3 >= 0; VAR_3--)",
"put_byte(VAR_0, VAR_2 >> VAR_3*8);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
14,332 | static void sdl_audio_callback(void *opaque, Uint8 *stream, int len)
{
VideoState *is = opaque;
int audio_size, len1;
int bytes_per_sec;
int frame_size = av_samples_get_buffer_size(NULL, is->audio_tgt.channels, 1, is->audio_tgt.fmt, 1);
double pts;
audio_callback_time = av_gettime();
... | false | FFmpeg | b2a8850969b89151677253be4d99e0ba29212749 | static void sdl_audio_callback(void *opaque, Uint8 *stream, int len)
{
VideoState *is = opaque;
int audio_size, len1;
int bytes_per_sec;
int frame_size = av_samples_get_buffer_size(NULL, is->audio_tgt.channels, 1, is->audio_tgt.fmt, 1);
double pts;
audio_callback_time = av_gettime();
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, Uint8 *VAR_1, int VAR_2)
{
VideoState *is = VAR_0;
int VAR_3, VAR_4;
int VAR_5;
int VAR_6 = av_samples_get_buffer_size(NULL, is->audio_tgt.channels, 1, is->audio_tgt.fmt, 1);
double VAR_7;
audio_callback_time = av_gettime();
while (VAR_2 > 0) {
... | [
"static void FUNC_0(void *VAR_0, Uint8 *VAR_1, int VAR_2)\n{",
"VideoState *is = VAR_0;",
"int VAR_3, VAR_4;",
"int VAR_5;",
"int VAR_6 = av_samples_get_buffer_size(NULL, is->audio_tgt.channels, 1, is->audio_tgt.fmt, 1);",
"double VAR_7;",
"audio_callback_time = av_gettime();",
"while (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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
14,334 | static int vmdk_write_cid(BlockDriverState *bs, uint32_t cid)
{
char desc[DESC_SIZE], tmp_desc[DESC_SIZE];
char *p_name, *tmp_str;
/* the descriptor offset = 0x200 */
if (bdrv_pread(bs->file, 0x200, desc, DESC_SIZE) != DESC_SIZE)
return -1;
tmp_str = strstr(desc,"parentCID");
... | true | qemu | b8852e87d9d113096342c3e0977266cda0fe9ee5 | static int vmdk_write_cid(BlockDriverState *bs, uint32_t cid)
{
char desc[DESC_SIZE], tmp_desc[DESC_SIZE];
char *p_name, *tmp_str;
if (bdrv_pread(bs->file, 0x200, desc, DESC_SIZE) != DESC_SIZE)
return -1;
tmp_str = strstr(desc,"parentCID");
pstrcpy(tmp_desc, sizeof(tmp_desc)... | {
"code": [
" if (bdrv_pwrite(bs->file, 0x200, desc, DESC_SIZE) != DESC_SIZE)"
],
"line_no": [
35
]
} | static int FUNC_0(BlockDriverState *VAR_0, uint32_t VAR_1)
{
char VAR_2[DESC_SIZE], tmp_desc[DESC_SIZE];
char *VAR_3, *VAR_4;
if (bdrv_pread(VAR_0->file, 0x200, VAR_2, DESC_SIZE) != DESC_SIZE)
return -1;
VAR_4 = strstr(VAR_2,"parentCID");
pstrcpy(tmp_desc, sizeof(tmp_desc), ... | [
"static int FUNC_0(BlockDriverState *VAR_0, uint32_t VAR_1)\n{",
"char VAR_2[DESC_SIZE], tmp_desc[DESC_SIZE];",
"char *VAR_3, *VAR_4;",
"if (bdrv_pread(VAR_0->file, 0x200, VAR_2, DESC_SIZE) != DESC_SIZE)\nreturn -1;",
"VAR_4 = strstr(VAR_2,\"parentCID\");",
"pstrcpy(tmp_desc, sizeof(tmp_desc), VAR_4);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13,
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
39
],
[
41
]
] |
14,335 | static int process_input(void)
{
InputFile *ifile;
AVFormatContext *is;
InputStream *ist;
AVPacket pkt;
int ret, i, j;
/* select the stream that we must read now */
ifile = select_input_file();
/* if none, if is finished */
if (!ifile) {
if (got_eagain()) {
... | true | FFmpeg | 636ced8e1dc8248a1353b416240b93d70ad03edb | static int process_input(void)
{
InputFile *ifile;
AVFormatContext *is;
InputStream *ist;
AVPacket pkt;
int ret, i, j;
ifile = select_input_file();
if (!ifile) {
if (got_eagain()) {
reset_eagain();
av_usleep(10000);
return... | {
"code": [
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" ... | static int FUNC_0(void)
{
InputFile *ifile;
AVFormatContext *is;
InputStream *ist;
AVPacket pkt;
int VAR_0, VAR_1, VAR_2;
ifile = select_input_file();
if (!ifile) {
if (got_eagain()) {
reset_eagain();
av_usleep(10000);
ret... | [
"static int FUNC_0(void)\n{",
"InputFile *ifile;",
"AVFormatContext *is;",
"InputStream *ist;",
"AVPacket pkt;",
"int VAR_0, VAR_1, VAR_2;",
"ifile = select_input_file();",
"if (!ifile) {",
"if (got_eagain()) {",
"reset_eagain();",
"av_usleep(10000);",
"return AVERROR(EAGAIN);",
"}",
"av_l... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[
51
... |
14,336 | static int get_int32_le(QEMUFile *f, void *pv, size_t size)
{
int32_t *cur = pv;
int32_t loaded;
qemu_get_sbe32s(f, &loaded);
if (loaded >= 0 && loaded <= *cur) {
*cur = loaded;
return 0;
}
return -EINVAL;
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static int get_int32_le(QEMUFile *f, void *pv, size_t size)
{
int32_t *cur = pv;
int32_t loaded;
qemu_get_sbe32s(f, &loaded);
if (loaded >= 0 && loaded <= *cur) {
*cur = loaded;
return 0;
}
return -EINVAL;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2)
{
int32_t *cur = VAR_1;
int32_t loaded;
qemu_get_sbe32s(VAR_0, &loaded);
if (loaded >= 0 && loaded <= *cur) {
*cur = loaded;
return 0;
}
return -EINVAL;
}
| [
"static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2)\n{",
"int32_t *cur = VAR_1;",
"int32_t loaded;",
"qemu_get_sbe32s(VAR_0, &loaded);",
"if (loaded >= 0 && loaded <= *cur) {",
"*cur = loaded;",
"return 0;",
"}",
"return -EINVAL;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
14,337 | static int h264_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
H264Context *h = avctx->priv_data;
AVFrame *pict = data;
int buf_index = 0;
H2... | true | FFmpeg | 9aebea0a4de1dc19c6309694cb1a5cd7554438cc | static int h264_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
H264Context *h = avctx->priv_data;
AVFrame *pict = data;
int buf_index = 0;
H2... | {
"code": [
" if (h->next_output_pic && ("
],
"line_no": [
203
]
} | 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;
H264Context *h = VAR_0->priv_data;
AVFrame *pict = VAR_1;
int VAR_6 = 0;
H264Picture *out;
... | [
"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;",
"H264Context *h = VAR_0->priv_data;",
"AVFrame *pict = VAR_1;",
"int VAR_6 = 0;",
"H264Picture *out;",
"int VAR_7, VAR_8;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
14,338 | static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size, UID uid, int64_t klv_offset)
{
MXFContext *mxf = arg;
MXFPartition *partition, *tmp_part;
UID op;
uint64_t footer_partition;
uint32_t nb_essence_containers;
tmp_part = av_realloc_array(mxf->partitions, mxf... | true | FFmpeg | 4162ceea93684f3cd656dc21d30903e102a44e73 | static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size, UID uid, int64_t klv_offset)
{
MXFContext *mxf = arg;
MXFPartition *partition, *tmp_part;
UID op;
uint64_t footer_partition;
uint32_t nb_essence_containers;
tmp_part = av_realloc_array(mxf->partitions, mxf... | {
"code": [
" avio_read(pb, op, sizeof(UID));"
],
"line_no": [
115
]
} | static int FUNC_0(void *VAR_0, AVIOContext *VAR_1, int VAR_2, int VAR_3, UID VAR_4, int64_t VAR_5)
{
MXFContext *mxf = VAR_0;
MXFPartition *partition, *tmp_part;
UID op;
uint64_t footer_partition;
uint32_t nb_essence_containers;
tmp_part = av_realloc_array(mxf->partitions, mxf->partitio... | [
"static int FUNC_0(void *VAR_0, AVIOContext *VAR_1, int VAR_2, int VAR_3, UID VAR_4, int64_t VAR_5)\n{",
"MXFContext *mxf = VAR_0;",
"MXFPartition *partition, *tmp_part;",
"UID op;",
"uint64_t footer_partition;",
"uint32_t nb_essence_containers;",
"tmp_part = av_realloc_array(mxf->partitions, mxf->parti... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23
],
[
27
],
[
33,
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[... |
14,339 | void commit_start(BlockDriverState *bs, BlockDriverState *base,
BlockDriverState *top, int64_t speed,
BlockdevOnError on_error, BlockCompletionFunc *cb,
void *opaque, const char *backing_file_str, Error **errp)
{
CommitBlockJob *s;
BlockReopenQueue *re... | true | qemu | 7f0317cfc8da620cdb38cb5cfec5f82b8dd05403 | void commit_start(BlockDriverState *bs, BlockDriverState *base,
BlockDriverState *top, int64_t speed,
BlockdevOnError on_error, BlockCompletionFunc *cb,
void *opaque, const char *backing_file_str, Error **errp)
{
CommitBlockJob *s;
BlockReopenQueue *re... | {
"code": [
" s = block_job_create(&commit_job_driver, bs, speed, cb, opaque, errp);"
],
"line_no": [
51
]
} | void FUNC_0(BlockDriverState *VAR_0, BlockDriverState *VAR_1,
BlockDriverState *VAR_2, int64_t VAR_3,
BlockdevOnError VAR_4, BlockCompletionFunc *VAR_5,
void *VAR_6, const char *VAR_7, Error **VAR_8)
{
CommitBlockJob *s;
BlockReopenQueue *reopen_queue ... | [
"void FUNC_0(BlockDriverState *VAR_0, BlockDriverState *VAR_1,\nBlockDriverState *VAR_2, int64_t VAR_3,\nBlockdevOnError VAR_4, BlockCompletionFunc *VAR_5,\nvoid *VAR_6, const char *VAR_7, Error **VAR_8)\n{",
"CommitBlockJob *s;",
"BlockReopenQueue *reopen_queue = NULL;",
"int VAR_9;",
"int VAR_10;",
"Blo... | [
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
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[... |
14,340 | int spapr_tce_dma_read(VIOsPAPRDevice *dev, uint64_t taddr, void *buf,
uint32_t size)
{
#ifdef DEBUG_TCE
fprintf(stderr, "spapr_tce_dma_write taddr=0x%llx size=0x%x\n",
(unsigned long long)taddr, size);
#endif
/* Check for bypass */
if (dev->flags & VIO_PAPR_FLAG... | true | qemu | ad0ebb91cd8b5fdc4a583b03645677771f420a46 | int spapr_tce_dma_read(VIOsPAPRDevice *dev, uint64_t taddr, void *buf,
uint32_t size)
{
#ifdef DEBUG_TCE
fprintf(stderr, "spapr_tce_dma_write taddr=0x%llx size=0x%x\n",
(unsigned long long)taddr, size);
#endif
if (dev->flags & VIO_PAPR_FLAG_DMA_BYPASS) {
... | {
"code": [
"#ifdef DEBUG_TCE",
"#endif",
" return H_SUCCESS;",
"#ifdef DEBUG_TCE",
"#endif",
"#ifdef DEBUG_TCE",
" fprintf(stderr, \"spapr_tce_dma_write taddr=0x%llx size=0x%x\\n\",",
" (unsigned long long)taddr, size);",
"#endif",
" if (dev->flags & VIO_PA... | int FUNC_0(VIOsPAPRDevice *VAR_0, uint64_t VAR_1, void *VAR_2,
uint32_t VAR_3)
{
#ifdef DEBUG_TCE
fprintf(stderr, "spapr_tce_dma_write VAR_1=0x%llx VAR_3=0x%x\n",
(unsigned long long)VAR_1, VAR_3);
#endif
if (VAR_0->flags & VIO_PAPR_FLAG_DMA_BYPASS) {
c... | [
"int FUNC_0(VIOsPAPRDevice *VAR_0, uint64_t VAR_1, void *VAR_2,\nuint32_t VAR_3)\n{",
"#ifdef DEBUG_TCE\nfprintf(stderr, \"spapr_tce_dma_write VAR_1=0x%llx VAR_3=0x%x\\n\",\n(unsigned long long)VAR_1, VAR_3);",
"#endif\nif (VAR_0->flags & VIO_PAPR_FLAG_DMA_BYPASS) {",
"cpu_physical_memory_read(VAR_1, VAR_2, V... | [
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
1,
0
] | [
[
1,
3,
5
],
[
7,
9,
11
],
[
13,
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
41
],
[
43,
45
],
[
47,
49
],
[
51
],
[
53
],
[
59
],
[
65
... |
14,341 | static av_cold int sunrast_encode_init(AVCodecContext *avctx)
{
SUNRASTContext *s = avctx->priv_data;
switch (avctx->coder_type) {
case FF_CODER_TYPE_RLE:
s->type = RT_BYTE_ENCODED;
break;
case FF_CODER_TYPE_RAW:
s->type = RT_STANDARD;
break;
default:
... | false | FFmpeg | d6604b29ef544793479d7fb4e05ef6622bb3e534 | static av_cold int sunrast_encode_init(AVCodecContext *avctx)
{
SUNRASTContext *s = avctx->priv_data;
switch (avctx->coder_type) {
case FF_CODER_TYPE_RLE:
s->type = RT_BYTE_ENCODED;
break;
case FF_CODER_TYPE_RAW:
s->type = RT_STANDARD;
break;
default:
... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
SUNRASTContext *s = avctx->priv_data;
switch (avctx->coder_type) {
case FF_CODER_TYPE_RLE:
s->type = RT_BYTE_ENCODED;
break;
case FF_CODER_TYPE_RAW:
s->type = RT_STANDARD;
break;
default:
av_log(a... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"SUNRASTContext *s = avctx->priv_data;",
"switch (avctx->coder_type) {",
"case FF_CODER_TYPE_RLE:\ns->type = RT_BYTE_ENCODED;",
"break;",
"case FF_CODER_TYPE_RAW:\ns->type = RT_STANDARD;",
"break;",
"default:\nav_log(avctx, AV_LOG_ERROR, \"invalid... | [
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35,
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53... |
14,342 | static void frame_end(MpegEncContext *s)
{
if (s->unrestricted_mv &&
s->current_picture.reference &&
!s->intra_only) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
int hshift = desc->log2_chroma_w;
int vshift = desc->log2_chroma_h;
... | true | FFmpeg | 99b823f0a1be42abc0f3a6a0da946c4464db5fb6 | static void frame_end(MpegEncContext *s)
{
if (s->unrestricted_mv &&
s->current_picture.reference &&
!s->intra_only) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
int hshift = desc->log2_chroma_w;
int vshift = desc->log2_chroma_h;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(MpegEncContext *VAR_0)
{
if (VAR_0->unrestricted_mv &&
VAR_0->current_picture.reference &&
!VAR_0->intra_only) {
const AVPixFmtDescriptor *VAR_1 = av_pix_fmt_desc_get(VAR_0->avctx->pix_fmt);
int VAR_2 = VAR_1->log2_chroma_w;
int VAR_3 = VAR_1->log2_c... | [
"static void FUNC_0(MpegEncContext *VAR_0)\n{",
"if (VAR_0->unrestricted_mv &&\nVAR_0->current_picture.reference &&\n!VAR_0->intra_only) {",
"const AVPixFmtDescriptor *VAR_1 = av_pix_fmt_desc_get(VAR_0->avctx->pix_fmt);",
"int VAR_2 = VAR_1->log2_chroma_w;",
"int VAR_3 = VAR_1->log2_chroma_h;",
"VAR_0->mp... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17,
19,
21,
23,
25
],
[
27,
29,
31,
33,
35,
37,
39
],
[
41,
43,
45,
47,
49,
51,
53
],
[
55
],
[
59
],
[
63
... |
14,343 | static int scsi_disk_emulate_read_toc(SCSIRequest *req, uint8_t *outbuf)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev);
int start_track, format, msf, toclen;
uint64_t nb_sectors;
msf = req->cmd.buf[1] & 2;
format = req->cmd.buf[2] & 0xf;
start_track = req->cmd.buf[6];
... | true | qemu | e2f0c49ffae8d3a00272c3cbc68850cc5aafbffa | static int scsi_disk_emulate_read_toc(SCSIRequest *req, uint8_t *outbuf)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev);
int start_track, format, msf, toclen;
uint64_t nb_sectors;
msf = req->cmd.buf[1] & 2;
format = req->cmd.buf[2] & 0xf;
start_track = req->cmd.buf[6];
... | {
"code": [
" if (toclen > req->cmd.xfer) {",
" toclen = req->cmd.xfer;"
],
"line_no": [
61,
63
]
} | static int FUNC_0(SCSIRequest *VAR_0, uint8_t *VAR_1)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->dev);
int VAR_2, VAR_3, VAR_4, VAR_5;
uint64_t nb_sectors;
VAR_4 = VAR_0->cmd.buf[1] & 2;
VAR_3 = VAR_0->cmd.buf[2] & 0xf;
VAR_2 = VAR_0->cmd.buf[6];
bdrv_get_geometry(s... | [
"static int FUNC_0(SCSIRequest *VAR_0, uint8_t *VAR_1)\n{",
"SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->dev);",
"int VAR_2, VAR_3, VAR_4, VAR_5;",
"uint64_t nb_sectors;",
"VAR_4 = VAR_0->cmd.buf[1] & 2;",
"VAR_3 = VAR_0->cmd.buf[2] & 0xf;",
"VAR_2 = VAR_0->cmd.buf[6];",
"bdrv_get_geometr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
14,344 | static CharDriverState *qemu_chr_open_win_file(HANDLE fd_out)
{
CharDriverState *chr;
WinCharState *s;
chr = qemu_chr_alloc();
s = g_malloc0(sizeof(WinCharState));
s->hcom = fd_out;
chr->opaque = s;
chr->chr_write = win_chr_write;
return chr;
}
| true | qemu | 2d528d45ecf5ee3c1a566a9f3d664464925ef830 | static CharDriverState *qemu_chr_open_win_file(HANDLE fd_out)
{
CharDriverState *chr;
WinCharState *s;
chr = qemu_chr_alloc();
s = g_malloc0(sizeof(WinCharState));
s->hcom = fd_out;
chr->opaque = s;
chr->chr_write = win_chr_write;
return chr;
}
| {
"code": [
" s = g_malloc0(sizeof(WinCharState));",
" s = g_malloc0(sizeof(WinCharState));",
" s = g_malloc0(sizeof(WinCharState));"
],
"line_no": [
13,
13,
13
]
} | static CharDriverState *FUNC_0(HANDLE fd_out)
{
CharDriverState *chr;
WinCharState *s;
chr = qemu_chr_alloc();
s = g_malloc0(sizeof(WinCharState));
s->hcom = fd_out;
chr->opaque = s;
chr->chr_write = win_chr_write;
return chr;
}
| [
"static CharDriverState *FUNC_0(HANDLE fd_out)\n{",
"CharDriverState *chr;",
"WinCharState *s;",
"chr = qemu_chr_alloc();",
"s = g_malloc0(sizeof(WinCharState));",
"s->hcom = fd_out;",
"chr->opaque = s;",
"chr->chr_write = win_chr_write;",
"return chr;",
"}"
] | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
14,345 | static av_cold int v4l2_decode_init(AVCodecContext *avctx)
{
V4L2m2mContext *s = avctx->priv_data;
V4L2Context *capture = &s->capture;
V4L2Context *output = &s->output;
int ret;
/* if these dimensions are invalid (ie, 0 or too small) an event will be raised
* by the v4l2 driver; this e... | true | FFmpeg | a0c624e299730c8c5800375c2f5f3c6c200053ff | static av_cold int v4l2_decode_init(AVCodecContext *avctx)
{
V4L2m2mContext *s = avctx->priv_data;
V4L2Context *capture = &s->capture;
V4L2Context *output = &s->output;
int ret;
output->height = capture->height = avctx->coded_height;
output->width = capture->width = avctx->c... | {
"code": [
" V4L2m2mContext *s = avctx->priv_data;",
" V4L2m2mContext *s = avctx->priv_data;",
" V4L2m2mContext *s = avctx->priv_data;",
" V4L2m2mContext *s = avctx->priv_data;",
" V4L2Context *capture = &s->capture;",
" V4L2Context *output = &s->output;",
" V4L2m2mCo... | static av_cold int FUNC_0(AVCodecContext *avctx)
{
V4L2m2mContext *s = avctx->priv_data;
V4L2Context *capture = &s->capture;
V4L2Context *output = &s->output;
int VAR_0;
output->height = capture->height = avctx->coded_height;
output->width = capture->width = avctx->coded_wid... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"V4L2m2mContext *s = avctx->priv_data;",
"V4L2Context *capture = &s->capture;",
"V4L2Context *output = &s->output;",
"int VAR_0;",
"output->height = capture->height = avctx->coded_height;",
"output->width = capture->width = avctx->coded_width;",
"... | [
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
]
] |
14,346 | static int16_t square_root(int val)
{
return (ff_sqrt(val << 1) >> 1) & (~1);
}
| true | FFmpeg | 014b178f84fd6c5766e6a626a83f15a0dc635c90 | static int16_t square_root(int val)
{
return (ff_sqrt(val << 1) >> 1) & (~1);
}
| {
"code": [
"static int16_t square_root(int val)"
],
"line_no": [
1
]
} | static int16_t FUNC_0(int val)
{
return (ff_sqrt(val << 1) >> 1) & (~1);
}
| [
"static int16_t FUNC_0(int val)\n{",
"return (ff_sqrt(val << 1) >> 1) & (~1);",
"}"
] | [
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
14,347 | static int process_audio_header_eacs(AVFormatContext *s)
{
EaDemuxContext *ea = s->priv_data;
AVIOContext *pb = s->pb;
int compression_type;
ea->sample_rate = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb);
ea->bytes = avio_r8(pb); /* 1=8-bit, 2=16-bit */
ea->num_channels ... | true | FFmpeg | 0d3a51e5d279dd2a56c81ba7a81a70128c5a7545 | static int process_audio_header_eacs(AVFormatContext *s)
{
EaDemuxContext *ea = s->priv_data;
AVIOContext *pb = s->pb;
int compression_type;
ea->sample_rate = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb);
ea->bytes = avio_r8(pb);
ea->num_channels = avio_r8(pb);
com... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
EaDemuxContext *ea = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
int VAR_1;
ea->sample_rate = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb);
ea->bytes = avio_r8(pb);
ea->num_channels = avio_r8(pb);
VAR_1 = avio_r8(pb);
... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"EaDemuxContext *ea = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"int VAR_1;",
"ea->sample_rate = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb);",
"ea->bytes = avio_r8(pb);",
"ea->num_channels = avio_r8(pb);",
"VAR_1 = avio_r8(pb);",
... | [
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
],
[
23
],
[
25
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
40
],
[
42
],
[
44
],
[
46,
48
],
[
53
]
] |
14,348 | void isa_ne2000_init(int base, qemu_irq irq, NICInfo *nd)
{
NE2000State *s;
qemu_check_nic_model(nd, "ne2k_isa");
s = qemu_mallocz(sizeof(NE2000State));
register_ioport_write(base, 16, 1, ne2000_ioport_write, s);
register_ioport_read(base, 16, 1, ne2000_ioport_read, s);
register_i... | true | qemu | b946a1533209f61a93e34898aebb5b43154b99c3 | void isa_ne2000_init(int base, qemu_irq irq, NICInfo *nd)
{
NE2000State *s;
qemu_check_nic_model(nd, "ne2k_isa");
s = qemu_mallocz(sizeof(NE2000State));
register_ioport_write(base, 16, 1, ne2000_ioport_write, s);
register_ioport_read(base, 16, 1, ne2000_ioport_read, s);
register_i... | {
"code": [
" ne2000_receive, ne2000_can_receive, s);",
" ne2000_receive, ne2000_can_receive, s);"
],
"line_no": [
49,
49
]
} | void FUNC_0(int VAR_0, qemu_irq VAR_1, NICInfo *VAR_2)
{
NE2000State *s;
qemu_check_nic_model(VAR_2, "ne2k_isa");
s = qemu_mallocz(sizeof(NE2000State));
register_ioport_write(VAR_0, 16, 1, ne2000_ioport_write, s);
register_ioport_read(VAR_0, 16, 1, ne2000_ioport_read, s);
register... | [
"void FUNC_0(int VAR_0, qemu_irq VAR_1, NICInfo *VAR_2)\n{",
"NE2000State *s;",
"qemu_check_nic_model(VAR_2, \"ne2k_isa\");",
"s = qemu_mallocz(sizeof(NE2000State));",
"register_ioport_write(VAR_0, 16, 1, ne2000_ioport_write, s);",
"register_ioport_read(VAR_0, 16, 1, ne2000_ioport_read, s);",
"register_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
47,
49
],
[
53
],
[
57
],
[
59
]
] |
14,349 | static void add_pid_to_pmt(MpegTSContext *ts, unsigned int programid,
unsigned int pid)
{
struct Program *p = get_program(ts, programid);
int i;
if (!p)
return;
if (p->nb_pids >= MAX_PIDS_PER_PROGRAM)
return;
for (i = 0; i < MAX_PIDS_PER_PROGRA... | true | FFmpeg | 786594184a1797cc4b573001f3eeb188d5912062 | static void add_pid_to_pmt(MpegTSContext *ts, unsigned int programid,
unsigned int pid)
{
struct Program *p = get_program(ts, programid);
int i;
if (!p)
return;
if (p->nb_pids >= MAX_PIDS_PER_PROGRAM)
return;
for (i = 0; i < MAX_PIDS_PER_PROGRA... | {
"code": [
" for (i = 0; i < MAX_PIDS_PER_PROGRAM; i++)"
],
"line_no": [
23
]
} | static void FUNC_0(MpegTSContext *VAR_0, unsigned int VAR_1,
unsigned int VAR_2)
{
struct Program *VAR_3 = get_program(VAR_0, VAR_1);
int VAR_4;
if (!VAR_3)
return;
if (VAR_3->nb_pids >= MAX_PIDS_PER_PROGRAM)
return;
for (VAR_4 = 0; VAR_4 < MAX... | [
"static void FUNC_0(MpegTSContext *VAR_0, unsigned int VAR_1,\nunsigned int VAR_2)\n{",
"struct Program *VAR_3 = get_program(VAR_0, VAR_1);",
"int VAR_4;",
"if (!VAR_3)\nreturn;",
"if (VAR_3->nb_pids >= MAX_PIDS_PER_PROGRAM)\nreturn;",
"for (VAR_4 = 0; VAR_4 < MAX_PIDS_PER_PROGRAM; VAR_4++)",
"if (VAR_3... | [
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11,
13
],
[
17,
19
],
[
23
],
[
25,
27
],
[
31
],
[
33
]
] |
14,351 | static int calculate_geometry(int64_t total_sectors, uint16_t* cyls,
uint8_t* heads, uint8_t* secs_per_cyl)
{
uint32_t cyls_times_heads;
if (total_sectors > 65535 * 16 * 255)
return -EFBIG;
if (total_sectors > 65535 * 16 * 63) {
*secs_per_cyl = 255;
*heads = 16;
... | true | qemu | dede4188cc817a039154ed2ecd7f3285f6b94056 | static int calculate_geometry(int64_t total_sectors, uint16_t* cyls,
uint8_t* heads, uint8_t* secs_per_cyl)
{
uint32_t cyls_times_heads;
if (total_sectors > 65535 * 16 * 255)
return -EFBIG;
if (total_sectors > 65535 * 16 * 63) {
*secs_per_cyl = 255;
*heads = 16;
... | {
"code": [
" *cyls = (cyls_times_heads + *heads - 1) / *heads;",
" return -EFBIG;"
],
"line_no": [
71,
13
]
} | static int FUNC_0(int64_t VAR_0, uint16_t* VAR_1,
uint8_t* VAR_2, uint8_t* VAR_3)
{
uint32_t cyls_times_heads;
if (VAR_0 > 65535 * 16 * 255)
return -EFBIG;
if (VAR_0 > 65535 * 16 * 63) {
*VAR_3 = 255;
*VAR_2 = 16;
cyls_times_heads = VAR_0 / *VAR_3;
} els... | [
"static int FUNC_0(int64_t VAR_0, uint16_t* VAR_1,\nuint8_t* VAR_2, uint8_t* VAR_3)\n{",
"uint32_t cyls_times_heads;",
"if (VAR_0 > 65535 * 16 * 255)\nreturn -EFBIG;",
"if (VAR_0 > 65535 * 16 * 63) {",
"*VAR_3 = 255;",
"*VAR_2 = 16;",
"cyls_times_heads = VAR_0 / *VAR_3;",
"} else {",
"*VAR_3 = 17;",... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
... |
14,352 | static inline void gen_arm_shift_reg(TCGv var, int shiftop,
TCGv shift, int flags)
{
if (flags) {
switch (shiftop) {
case 0: gen_helper_shl_cc(var, var, shift); break;
case 1: gen_helper_shr_cc(var, var, shift); break;
case 2: gen_helper_sa... | true | qemu | 7d1b0095bff7157e856d1d0e6c4295641ced2752 | static inline void gen_arm_shift_reg(TCGv var, int shiftop,
TCGv shift, int flags)
{
if (flags) {
switch (shiftop) {
case 0: gen_helper_shl_cc(var, var, shift); break;
case 1: gen_helper_shr_cc(var, var, shift); break;
case 2: gen_helper_sa... | {
"code": [
" dead_tmp(shift);"
],
"line_no": [
39
]
} | static inline void FUNC_0(TCGv VAR_0, int VAR_1,
TCGv VAR_2, int VAR_3)
{
if (VAR_3) {
switch (VAR_1) {
case 0: gen_helper_shl_cc(VAR_0, VAR_0, VAR_2); break;
case 1: gen_helper_shr_cc(VAR_0, VAR_0, VAR_2); break;
case 2: gen_helper_sar_cc(... | [
"static inline void FUNC_0(TCGv VAR_0, int VAR_1,\nTCGv VAR_2, int VAR_3)\n{",
"if (VAR_3) {",
"switch (VAR_1) {",
"case 0: gen_helper_shl_cc(VAR_0, VAR_0, VAR_2); break;",
"case 1: gen_helper_shr_cc(VAR_0, VAR_0, VAR_2); break;",
"case 2: gen_helper_sar_cc(VAR_0, VAR_0, VAR_2); break;",
"case 3: gen_he... | [
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
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
14,353 | static inline void RENAME(bgr15ToY)(uint8_t *dst, uint8_t *src, int width)
{
int i;
for(i=0; i<width; i++)
{
int d= ((uint16_t*)src)[i];
int b= d&0x1F;
int g= (d>>5)&0x1F;
int r= (d>>10)&0x1F;
dst[i]= ((RY*r + GY*g + BY*b)>>(RGB2YUV_SHIFT-3)) + 16;
}
}
| true | FFmpeg | 2da0d70d5eebe42f9fcd27ee554419ebe2a5da06 | static inline void RENAME(bgr15ToY)(uint8_t *dst, uint8_t *src, int width)
{
int i;
for(i=0; i<width; i++)
{
int d= ((uint16_t*)src)[i];
int b= d&0x1F;
int g= (d>>5)&0x1F;
int r= (d>>10)&0x1F;
dst[i]= ((RY*r + GY*g + BY*b)>>(RGB2YUV_SHIFT-3)) + 16;
}
}
| {
"code": [
"\tint i;",
"\tint i;",
"\tint i;",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
"\tfor(i=0; i<width; i++)",
"\tint i;",
... | static inline void FUNC_0(bgr15ToY)(uint8_t *dst, uint8_t *src, int width)
{
int VAR_0;
for(VAR_0=0; VAR_0<width; VAR_0++)
{
int d= ((uint16_t*)src)[VAR_0];
int b= d&0x1F;
int g= (d>>5)&0x1F;
int r= (d>>10)&0x1F;
dst[VAR_0]= ((RY*r + GY*g + BY*b)>>(RGB2YUV_SHIFT-3)) + 16;
}
}
| [
"static inline void FUNC_0(bgr15ToY)(uint8_t *dst, uint8_t *src, int width)\n{",
"int VAR_0;",
"for(VAR_0=0; VAR_0<width; VAR_0++)",
"{",
"int d= ((uint16_t*)src)[VAR_0];",
"int b= d&0x1F;",
"int g= (d>>5)&0x1F;",
"int r= (d>>10)&0x1F;",
"dst[VAR_0]= ((RY*r + GY*g + BY*b)>>(RGB2YUV_SHIFT-3)) + 16;",... | [
0,
1,
1,
0,
1,
1,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
]
] |
14,355 | static void decode_gain_info(GetBitContext *gb, int *gaininfo)
{
int i, n;
while (get_bits1(gb)) {
/* NOTHING */
}
n = get_bits_count(gb) - 1; // amount of elements*2 to update
i = 0;
while (n--) {
int index = get_bits(gb, 3);
int gain = get_bits1(gb) ... | true | FFmpeg | 65988b991659fea72365be53e17d10953c0f8f78 | static void decode_gain_info(GetBitContext *gb, int *gaininfo)
{
int i, n;
while (get_bits1(gb)) {
}
n = get_bits_count(gb) - 1;
i = 0;
while (n--) {
int index = get_bits(gb, 3);
int gain = get_bits1(gb) ? get_bits(gb, 4) - 7 : -1;
while (... | {
"code": [
" while (get_bits1(gb)) {"
],
"line_no": [
9
]
} | static void FUNC_0(GetBitContext *VAR_0, int *VAR_1)
{
int VAR_2, VAR_3;
while (get_bits1(VAR_0)) {
}
VAR_3 = get_bits_count(VAR_0) - 1;
VAR_2 = 0;
while (VAR_3--) {
int VAR_4 = get_bits(VAR_0, 3);
int VAR_5 = get_bits1(VAR_0) ? get_bits(VAR_0, 4) - ... | [
"static void FUNC_0(GetBitContext *VAR_0, int *VAR_1)\n{",
"int VAR_2, VAR_3;",
"while (get_bits1(VAR_0)) {",
"}",
"VAR_3 = get_bits_count(VAR_0) - 1;",
"VAR_2 = 0;",
"while (VAR_3--) {",
"int VAR_4 = get_bits(VAR_0, 3);",
"int VAR_5 = get_bits1(VAR_0) ? get_bits(VAR_0, 4) - 7 : -1;",
"while (VAR_... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
35
],
[
37,
39
],
[
41
]
] |
14,357 | static int decode_b_picture_primary_header(VC9Context *v)
{
GetBitContext *gb = &v->s.gb;
int pqindex;
/* Prolog common to all frametypes should be done in caller */
if (v->profile == PROFILE_SIMPLE)
{
av_log(v->s.avctx, AV_LOG_ERROR, "Found a B frame while in Simple Profile!\n");
... | true | FFmpeg | 7cc84d241ba6ef8e27e4d057176a4ad385ad3d59 | static int decode_b_picture_primary_header(VC9Context *v)
{
GetBitContext *gb = &v->s.gb;
int pqindex;
if (v->profile == PROFILE_SIMPLE)
{
av_log(v->s.avctx, AV_LOG_ERROR, "Found a B frame while in Simple Profile!\n");
return FRAME_SKIPED;
}
v->bfraction = vc9_bf... | {
"code": [
" if (v->profile > PROFILE_MAIN)",
" GetBitContext *gb = &v->s.gb;",
" GetBitContext *gb = &v->s.gb;",
" if (v->profile > PROFILE_MAIN)",
" if (v->profile > PROFILE_MAIN)",
" if (v->profile > PROFILE_MAIN)",
" if (v->profile > PROFILE_MAIN)",
" if (v... | static int FUNC_0(VC9Context *VAR_0)
{
GetBitContext *gb = &VAR_0->s.gb;
int VAR_1;
if (VAR_0->profile == PROFILE_SIMPLE)
{
av_log(VAR_0->s.avctx, AV_LOG_ERROR, "Found a B frame while in Simple Profile!\n");
return FRAME_SKIPED;
}
VAR_0->bfraction = vc9_bfraction... | [
"static int FUNC_0(VC9Context *VAR_0)\n{",
"GetBitContext *gb = &VAR_0->s.gb;",
"int VAR_1;",
"if (VAR_0->profile == PROFILE_SIMPLE)\n{",
"av_log(VAR_0->s.avctx, AV_LOG_ERROR, \"Found a B frame while in Simple Profile!\\n\");",
"return FRAME_SKIPED;",
"}",
"VAR_0->bfraction = vc9_bfraction_lut[get_vlc... | [
0,
1,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
43
],
[
45
],
[
47
],
[
53
],
[
55... |
14,358 | static inline void check_privileged(DisasContext *s)
{
if (s->tb->flags & (PSW_MASK_PSTATE >> 32)) {
gen_program_exception(s, PGM_PRIVILEGED);
}
}
| true | qemu | 8841d9dfc7f871cec7c3401a8a2d31ad34e881f7 | static inline void check_privileged(DisasContext *s)
{
if (s->tb->flags & (PSW_MASK_PSTATE >> 32)) {
gen_program_exception(s, PGM_PRIVILEGED);
}
}
| {
"code": [
"static inline void check_privileged(DisasContext *s)"
],
"line_no": [
1
]
} | static inline void FUNC_0(DisasContext *VAR_0)
{
if (VAR_0->tb->flags & (PSW_MASK_PSTATE >> 32)) {
gen_program_exception(VAR_0, PGM_PRIVILEGED);
}
}
| [
"static inline void FUNC_0(DisasContext *VAR_0)\n{",
"if (VAR_0->tb->flags & (PSW_MASK_PSTATE >> 32)) {",
"gen_program_exception(VAR_0, PGM_PRIVILEGED);",
"}",
"}"
] | [
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
14,361 | static int decode_p_mbs(VC9Context *v)
{
MpegEncContext *s = &v->s;
GetBitContext *gb = &v->s.gb;
int current_mb = 0, i; /* MB/Block Position info */
uint8_t cbpcy[4], previous_cbpcy[4], predicted_cbpcy,
*p_cbpcy /* Pointer to skip some math */;
int hybrid_pred; /* Prediction types */... | true | FFmpeg | 7cc84d241ba6ef8e27e4d057176a4ad385ad3d59 | static int decode_p_mbs(VC9Context *v)
{
MpegEncContext *s = &v->s;
GetBitContext *gb = &v->s.gb;
int current_mb = 0, i;
uint8_t cbpcy[4], previous_cbpcy[4], predicted_cbpcy,
*p_cbpcy ;
int hybrid_pred;
int mv_mode_bit = 0;
int mqdiff, mquant;
int ttmb;
stat... | {
"code": [
"#endif",
"#endif",
"#endif",
"#endif",
" GetBitContext *gb = &v->s.gb;",
" GetBitContext *gb = &v->s.gb;",
"#endif",
" if (v->pq < 5) v->ttmb_vlc = &vc9_ttmb_vlc[0];",
" else if (v->pq < 13) v->ttmb_vlc = &vc9_ttmb_vlc[1];",
" else v->ttmb_vlc = &vc9... | static int FUNC_0(VC9Context *VAR_0)
{
MpegEncContext *s = &VAR_0->s;
GetBitContext *gb = &VAR_0->s.gb;
int VAR_1 = 0, VAR_2;
uint8_t cbpcy[4], previous_cbpcy[4], predicted_cbpcy,
*p_cbpcy ;
int VAR_3;
int VAR_4 = 0;
int VAR_5, VAR_6;
int VAR_7;
static const... | [
"static int FUNC_0(VC9Context *VAR_0)\n{",
"MpegEncContext *s = &VAR_0->s;",
"GetBitContext *gb = &VAR_0->s.gb;",
"int VAR_1 = 0, VAR_2;",
"uint8_t cbpcy[4], previous_cbpcy[4], predicted_cbpcy,\n*p_cbpcy ;",
"int VAR_3;",
"int VAR_4 = 0;",
"int VAR_5, VAR_6;",
"int VAR_7;",
"static const int VAR_8... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
1,
1,
1,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
45
],
[
47
],
[... |
14,363 | static void fsl_imx25_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
dc->realize = fsl_imx25_realize;
} | true | qemu | 4c315c27661502a0813b129e41c0bf640c34a8d6 | static void fsl_imx25_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
dc->realize = fsl_imx25_realize;
} | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
dc->realize = fsl_imx25_realize;
} | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"dc->realize = fsl_imx25_realize;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
]
] |
14,364 | SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c)
{
SwsFunc t = NULL;
#if (HAVE_MMX2 || HAVE_MMX) && CONFIG_GPL
t = ff_yuv2rgb_init_mmx(c);
#endif
#if HAVE_VIS
t = ff_yuv2rgb_init_vis(c);
#endif
#if CONFIG_MLIB
t = ff_yuv2rgb_init_mlib(c);
#endif
#if HAVE_ALTIVEC && CONFIG_GPL
if (c->flag... | false | FFmpeg | 29ce0433743c8cb0bfa4b0e174437212d31730fb | SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c)
{
SwsFunc t = NULL;
#if (HAVE_MMX2 || HAVE_MMX) && CONFIG_GPL
t = ff_yuv2rgb_init_mmx(c);
#endif
#if HAVE_VIS
t = ff_yuv2rgb_init_vis(c);
#endif
#if CONFIG_MLIB
t = ff_yuv2rgb_init_mlib(c);
#endif
#if HAVE_ALTIVEC && CONFIG_GPL
if (c->flag... | {
"code": [],
"line_no": []
} | SwsFunc FUNC_0(SwsContext *c)
{
SwsFunc t = NULL;
#if (HAVE_MMX2 || HAVE_MMX) && CONFIG_GPL
t = ff_yuv2rgb_init_mmx(c);
#endif
#if HAVE_VIS
t = ff_yuv2rgb_init_vis(c);
#endif
#if CONFIG_MLIB
t = ff_yuv2rgb_init_mlib(c);
#endif
#if HAVE_ALTIVEC && CONFIG_GPL
if (c->flags & SWS_CPU_CAPS_... | [
"SwsFunc FUNC_0(SwsContext *c)\n{",
"SwsFunc t = NULL;",
"#if (HAVE_MMX2 || HAVE_MMX) && CONFIG_GPL\nt = ff_yuv2rgb_init_mmx(c);",
"#endif\n#if HAVE_VIS\nt = ff_yuv2rgb_init_vis(c);",
"#endif\n#if CONFIG_MLIB\nt = ff_yuv2rgb_init_mlib(c);",
"#endif\n#if HAVE_ALTIVEC && CONFIG_GPL\nif (c->flags & SWS_CPU_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
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13,
15
],
[
17,
19,
21
],
[
23,
25,
27,
29
],
[
31,
35,
37,
39
],
[
41,
45,
47
],
[
51
],
[
55
],
[
57,
59
],
[
61,
63
],
[... |
14,365 | static inline void celt_encode_pulses(OpusRangeCoder *rc, int *y, uint32_t N, uint32_t K)
{
ff_opus_rc_enc_uint(rc, celt_icwrsi(N, y), CELT_PVQ_V(N, K));
}
| false | FFmpeg | 67fa02ed794f9505bd9c3584c14bfb61c895f5bc | static inline void celt_encode_pulses(OpusRangeCoder *rc, int *y, uint32_t N, uint32_t K)
{
ff_opus_rc_enc_uint(rc, celt_icwrsi(N, y), CELT_PVQ_V(N, K));
}
| {
"code": [],
"line_no": []
} | static inline void FUNC_0(OpusRangeCoder *VAR_0, int *VAR_1, uint32_t VAR_2, uint32_t VAR_3)
{
ff_opus_rc_enc_uint(VAR_0, celt_icwrsi(VAR_2, VAR_1), CELT_PVQ_V(VAR_2, VAR_3));
}
| [
"static inline void FUNC_0(OpusRangeCoder *VAR_0, int *VAR_1, uint32_t VAR_2, uint32_t VAR_3)\n{",
"ff_opus_rc_enc_uint(VAR_0, celt_icwrsi(VAR_2, VAR_1), CELT_PVQ_V(VAR_2, VAR_3));",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
14,368 | static void gen_partset_reg(int opsize, TCGv reg, TCGv val)
{
TCGv tmp;
switch (opsize) {
case OS_BYTE:
tcg_gen_andi_i32(reg, reg, 0xffffff00);
tmp = tcg_temp_new();
tcg_gen_ext8u_i32(tmp, val);
tcg_gen_or_i32(reg, reg, tmp);
break;
case OS_WORD:
... | true | qemu | 7372c2b926200db295412efbb53f93773b7f1754 | static void gen_partset_reg(int opsize, TCGv reg, TCGv val)
{
TCGv tmp;
switch (opsize) {
case OS_BYTE:
tcg_gen_andi_i32(reg, reg, 0xffffff00);
tmp = tcg_temp_new();
tcg_gen_ext8u_i32(tmp, val);
tcg_gen_or_i32(reg, reg, tmp);
break;
case OS_WORD:
... | {
"code": [
" qemu_assert(0, \"Bad operand size\");",
" break;",
" qemu_assert(0, \"Bad operand size\");"
],
"line_no": [
43,
19,
43
]
} | static void FUNC_0(int VAR_0, TCGv VAR_1, TCGv VAR_2)
{
TCGv tmp;
switch (VAR_0) {
case OS_BYTE:
tcg_gen_andi_i32(VAR_1, VAR_1, 0xffffff00);
tmp = tcg_temp_new();
tcg_gen_ext8u_i32(tmp, VAR_2);
tcg_gen_or_i32(VAR_1, VAR_1, tmp);
break;
case OS_WORD:
... | [
"static void FUNC_0(int VAR_0, TCGv VAR_1, TCGv VAR_2)\n{",
"TCGv tmp;",
"switch (VAR_0) {",
"case OS_BYTE:\ntcg_gen_andi_i32(VAR_1, VAR_1, 0xffffff00);",
"tmp = tcg_temp_new();",
"tcg_gen_ext8u_i32(tmp, VAR_2);",
"tcg_gen_or_i32(VAR_1, VAR_1, tmp);",
"break;",
"case OS_WORD:\ntcg_gen_andi_i32(VAR_1... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[... |
14,369 | PCIBus *pci_apb_init(target_phys_addr_t special_base,
target_phys_addr_t mem_base,
qemu_irq *pic, PCIBus **bus2, PCIBus **bus3)
{
DeviceState *dev;
SysBusDevice *s;
APBState *d;
/* Ultrasparc PBM main bus */
dev = qdev_create(NULL, "pbm");
qde... | true | qemu | e23a1b33b53d25510320b26d9f154e19c6c99725 | PCIBus *pci_apb_init(target_phys_addr_t special_base,
target_phys_addr_t mem_base,
qemu_irq *pic, PCIBus **bus2, PCIBus **bus3)
{
DeviceState *dev;
SysBusDevice *s;
APBState *d;
dev = qdev_create(NULL, "pbm");
qdev_init(dev);
s = sysbus_... | {
"code": [
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" ... | PCIBus *FUNC_0(target_phys_addr_t special_base,
target_phys_addr_t mem_base,
qemu_irq *pic, PCIBus **bus2, PCIBus **bus3)
{
DeviceState *dev;
SysBusDevice *s;
APBState *d;
dev = qdev_create(NULL, "pbm");
qdev_init(dev);
s = sysbus_from_q... | [
"PCIBus *FUNC_0(target_phys_addr_t special_base,\ntarget_phys_addr_t mem_base,\nqemu_irq *pic, PCIBus **bus2, PCIBus **bus3)\n{",
"DeviceState *dev;",
"SysBusDevice *s;",
"APBState *d;",
"dev = qdev_create(NULL, \"pbm\");",
"qdev_init(dev);",
"s = sysbus_from_qdev(dev);",
"sysbus_mmio_map(s, 0, specia... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
35
],
[
39
],
[
41
],
[
43,
45,
47
],
[
49
],
[
53,
55,
57
],
[
59,
61,
63
... |
14,370 | static void pc_numa_cpu(const void *data)
{
char *cli;
QDict *resp;
QList *cpus;
const QObject *e;
cli = make_cli(data, "-cpu pentium -smp 8,sockets=2,cores=2,threads=2 "
"-numa node,nodeid=0 -numa node,nodeid=1 "
"-numa cpu,node-id=1,socket-id=0 "
"-numa cpu,node-... | true | qemu | 5e39d89d20b17cf6fb7f09d181d34f17b2ae2160 | static void pc_numa_cpu(const void *data)
{
char *cli;
QDict *resp;
QList *cpus;
const QObject *e;
cli = make_cli(data, "-cpu pentium -smp 8,sockets=2,cores=2,threads=2 "
"-numa node,nodeid=0 -numa node,nodeid=1 "
"-numa cpu,node-id=1,socket-id=0 "
"-numa cpu,node-... | {
"code": [
" const QObject *e;",
" const QObject *e;",
" const QObject *e;",
" const QObject *e;"
],
"line_no": [
11,
11,
11,
11
]
} | static void FUNC_0(const void *VAR_0)
{
char *VAR_1;
QDict *resp;
QList *cpus;
const QObject *VAR_2;
VAR_1 = make_cli(VAR_0, "-cpu pentium -smp 8,sockets=2,cores=2,threads=2 "
"-numa node,nodeid=0 -numa node,nodeid=1 "
"-numa cpu,node-id=1,socket-id=0 "
"-numa cpu,... | [
"static void FUNC_0(const void *VAR_0)\n{",
"char *VAR_1;",
"QDict *resp;",
"QList *cpus;",
"const QObject *VAR_2;",
"VAR_1 = make_cli(VAR_0, \"-cpu pentium -smp 8,sockets=2,cores=2,threads=2 \"\n\"-numa node,nodeid=0 -numa node,nodeid=1 \"\n\"-numa cpu,node-id=1,socket-id=0 \"\n\"-numa cpu,node-id=0,sock... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17,
19,
21,
23,
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[... |
14,371 | static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip)
{
CPUState *cs = CPU(cpu);
CPUX86State *env = &cpu->env;
VAPICHandlers *handlers;
uint8_t opcode[2];
uint32_t imm32 = 0;
target_ulong current_pc = 0;
target_ulong current_cs_base = 0;
uint32_t current_... | true | qemu | 8d04fb55dec381bc5105cb47f29d918e579e8cbd | static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip)
{
CPUState *cs = CPU(cpu);
CPUX86State *env = &cpu->env;
VAPICHandlers *handlers;
uint8_t opcode[2];
uint32_t imm32 = 0;
target_ulong current_pc = 0;
target_ulong current_cs_base = 0;
uint32_t current_... | {
"code": [
" } else {"
],
"line_no": [
27
]
} | static void FUNC_0(VAPICROMState *VAR_0, X86CPU *VAR_1, target_ulong VAR_2)
{
CPUState *cs = CPU(VAR_1);
CPUX86State *env = &VAR_1->env;
VAPICHandlers *handlers;
uint8_t opcode[2];
uint32_t imm32 = 0;
target_ulong current_pc = 0;
target_ulong current_cs_base = 0;
uint32_t curren... | [
"static void FUNC_0(VAPICROMState *VAR_0, X86CPU *VAR_1, target_ulong VAR_2)\n{",
"CPUState *cs = CPU(VAR_1);",
"CPUX86State *env = &VAR_1->env;",
"VAPICHandlers *handlers;",
"uint8_t opcode[2];",
"uint32_t imm32 = 0;",
"target_ulong current_pc = 0;",
"target_ulong current_cs_base = 0;",
"uint32_t 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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
47
],
[
49
],
[
51
],
[... |
14,374 | static int vc9_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
VC9Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
int ret = FRAME_SKIPED, len, start_code;
AVFrame *pict = data;
uin... | true | FFmpeg | 7cc84d241ba6ef8e27e4d057176a4ad385ad3d59 | static int vc9_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
VC9Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
int ret = FRAME_SKIPED, len, start_code;
AVFrame *pict = data;
uin... | {
"code": [
"#endif",
"#endif",
"#endif",
"#endif",
" if (v->profile > PROFILE_MAIN)",
"#endif",
" if (v->profile > PROFILE_MAIN)",
" if (v->profile > PROFILE_MAIN)",
" if (v->profile > PROFILE_MAIN)",
" if (v->profile > PROFILE_MAIN)",
" if (v... | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
uint8_t *VAR_3, int VAR_4)
{
VC9Context *v = VAR_0->priv_data;
MpegEncContext *s = &v->s;
int VAR_5 = FRAME_SKIPED, VAR_6, VAR_7;
AVFrame *pict = VAR_1;
uint8_t *tmp_buf;... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nuint8_t *VAR_3, int VAR_4)\n{",
"VC9Context *v = VAR_0->priv_data;",
"MpegEncContext *s = &v->s;",
"int VAR_5 = FRAME_SKIPED, VAR_6, VAR_7;",
"AVFrame *pict = VAR_1;",
"uint8_t *tmp_buf;",
"v->s.VAR_0 = VAR_0;",
"if (!VAR_4) return 0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
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,
0,
0,
0,
0,
0,
0,
1... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
25
],
[
29,
31
],
[
33
],
[
35,
37
],
[
41,
43
],
[
45,
51
],
[
53
],
[
57,
59
],
[
61
],
[... |
14,375 | static void lm32_uclinux_init(MachineState *machine)
{
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->initrd_filename;
LM32CPU *cpu;
CPULM32Sta... | true | qemu | 4482e05cbbb7e50e476f6a9500cf0b38913bd939 | static void lm32_uclinux_init(MachineState *machine)
{
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->initrd_filename;
LM32CPU *cpu;
CPULM32Sta... | {
"code": [
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" if (cpu == NULL) {",
" fprintf(stderr, \"qemu: unable to find CPU '%s'\\n\", cpu_model);",... | static void FUNC_0(MachineState *VAR_0)
{
const char *VAR_1 = VAR_0->VAR_1;
const char *VAR_2 = VAR_0->VAR_2;
const char *VAR_3 = VAR_0->VAR_3;
const char *VAR_4 = VAR_0->VAR_4;
LM32CPU *cpu;
CPULM32State *env;
DriveInfo *dinfo;
MemoryRegion *address_space_mem = get_system_memo... | [
"static void FUNC_0(MachineState *VAR_0)\n{",
"const char *VAR_1 = VAR_0->VAR_1;",
"const char *VAR_2 = VAR_0->VAR_2;",
"const char *VAR_3 = VAR_0->VAR_3;",
"const char *VAR_4 = VAR_0->VAR_4;",
"LM32CPU *cpu;",
"CPULM32State *env;",
"DriveInfo *dinfo;",
"MemoryRegion *address_space_mem = get_system... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
14,377 | static int vnc_update_client(VncState *vs, int has_dirty)
{
if (vs->need_update && vs->csock != -1) {
VncDisplay *vd = vs->vd;
VncJob *job;
int y;
int width, height;
int n = 0;
if (vs->output.offset && !vs->audio_cap && !vs->force_update)
/* k... | true | qemu | 38ee14f4f33f8836fc0e209ca59c6ae8c6edf380 | static int vnc_update_client(VncState *vs, int has_dirty)
{
if (vs->need_update && vs->csock != -1) {
VncDisplay *vd = vs->vd;
VncJob *job;
int y;
int width, height;
int n = 0;
if (vs->output.offset && !vs->audio_cap && !vs->force_update)
... | {
"code": [
"static int vnc_update_client(VncState *vs, int has_dirty)",
" if (vs->csock == -1)"
],
"line_no": [
1,
119
]
} | static int FUNC_0(VncState *VAR_0, int VAR_1)
{
if (VAR_0->need_update && VAR_0->csock != -1) {
VncDisplay *vd = VAR_0->vd;
VncJob *job;
int VAR_2;
int VAR_3, VAR_4;
int VAR_5 = 0;
if (VAR_0->output.offset && !VAR_0->audio_cap && !VAR_0->force_update)
... | [
"static int FUNC_0(VncState *VAR_0, int VAR_1)\n{",
"if (VAR_0->need_update && VAR_0->csock != -1) {",
"VncDisplay *vd = VAR_0->vd;",
"VncJob *job;",
"int VAR_2;",
"int VAR_3, VAR_4;",
"int VAR_5 = 0;",
"if (VAR_0->output.offset && !VAR_0->audio_cap && !VAR_0->force_update)\nreturn 0;",
"if (!VAR_1 ... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21,
25
],
[
29,
31
],
[
47
],
[
51
],
[
53
],
[
57
],
[
59
],
[
61
],
[
63
],
[
65
],
[
67
],
[
69
... |
14,378 | static void test_qemu_strtol_empty(void)
{
const char *str = "";
char f = 'X';
const char *endptr = &f;
long res = 999;
int err;
err = qemu_strtol(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, 0);
g_assert(endptr == str);
}
| true | qemu | 47d4be12c3997343e436c6cca89aefbbbeb70863 | static void test_qemu_strtol_empty(void)
{
const char *str = "";
char f = 'X';
const char *endptr = &f;
long res = 999;
int err;
err = qemu_strtol(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, 0);
g_assert(endptr == str);
}
| {
"code": [
" g_assert_cmpint(err, ==, 0);",
" g_assert_cmpint(res, ==, 0);",
" g_assert(endptr == str);",
" g_assert_cmpint(err, ==, 0);",
" g_assert_cmpint(res, ==, 0);",
" g_assert(endptr == str);",
" g_assert_cmpint(err, ==, 0);",
" g_assert_cmpint(res, ==, ... | static void FUNC_0(void)
{
const char *VAR_0 = "";
char VAR_1 = 'X';
const char *VAR_2 = &VAR_1;
long VAR_3 = 999;
int VAR_4;
VAR_4 = qemu_strtol(VAR_0, &VAR_2, 0, &VAR_3);
g_assert_cmpint(VAR_4, ==, 0);
g_assert_cmpint(VAR_3, ==, 0);
g_assert(VAR_2 == VAR_0);
}
| [
"static void FUNC_0(void)\n{",
"const char *VAR_0 = \"\";",
"char VAR_1 = 'X';",
"const char *VAR_2 = &VAR_1;",
"long VAR_3 = 999;",
"int VAR_4;",
"VAR_4 = qemu_strtol(VAR_0, &VAR_2, 0, &VAR_3);",
"g_assert_cmpint(VAR_4, ==, 0);",
"g_assert_cmpint(VAR_3, ==, 0);",
"g_assert(VAR_2 == VAR_0);",
"}... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
14,380 | static void test_endianness(gconstpointer data)
{
const TestCase *test = data;
char *args;
args = g_strdup_printf("-display none -M %s%s%s -device pc-testdev",
test->machine,
test->superio ? " -device " : "",
test->sup... | true | qemu | 2ad645d2854746b55ddfd1d8e951f689cca5d78f | static void test_endianness(gconstpointer data)
{
const TestCase *test = data;
char *args;
args = g_strdup_printf("-display none -M %s%s%s -device pc-testdev",
test->machine,
test->superio ? " -device " : "",
test->sup... | {
"code": [
" args = g_strdup_printf(\"-display none -M %s%s%s -device pc-testdev\",",
" args = g_strdup_printf(\"-display none -M %s%s%s -device pc-testdev\",",
" args = g_strdup_printf(\"-display none -M %s%s%s -device pc-testdev\","
],
"line_no": [
11,
11,
11
]
} | static void FUNC_0(gconstpointer VAR_0)
{
const TestCase *VAR_1 = VAR_0;
char *VAR_2;
VAR_2 = g_strdup_printf("-display none -M %s%s%s -device pc-testdev",
VAR_1->machine,
VAR_1->superio ? " -device " : "",
VAR_1->supe... | [
"static void FUNC_0(gconstpointer VAR_0)\n{",
"const TestCase *VAR_1 = VAR_0;",
"char *VAR_2;",
"VAR_2 = g_strdup_printf(\"-display none -M %s%s%s -device pc-testdev\",\nVAR_1->machine,\nVAR_1->superio ? \" -device \" : \"\",\nVAR_1->superio ?: \"\");",
"qtest_start(VAR_2);",
"isa_outl(VAR_1, 0xe0, 0x8765... | [
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,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13,
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
... |
14,381 | float32 HELPER(ucf64_negs)(float32 a)
{
return float32_chs(a);
}
| false | qemu | e8ede0a8bb5298a6979bcf7ed84ef64a64a4e3fe | float32 HELPER(ucf64_negs)(float32 a)
{
return float32_chs(a);
}
| {
"code": [],
"line_no": []
} | float32 FUNC_0(ucf64_negs)(float32 a)
{
return float32_chs(a);
}
| [
"float32 FUNC_0(ucf64_negs)(float32 a)\n{",
"return float32_chs(a);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
14,382 | static void *rcu_read_perf_test(void *arg)
{
int i;
long long n_reads_local = 0;
rcu_register_thread();
*(struct rcu_reader_data **)arg = &rcu_reader;
atomic_inc(&nthreadsrunning);
while (goflag == GOFLAG_INIT) {
g_usleep(1000);
}
while (goflag == GOFLAG_RUN) {
... | false | qemu | 8a5956ad6392f115521dad774055c737c49fb0dd | static void *rcu_read_perf_test(void *arg)
{
int i;
long long n_reads_local = 0;
rcu_register_thread();
*(struct rcu_reader_data **)arg = &rcu_reader;
atomic_inc(&nthreadsrunning);
while (goflag == GOFLAG_INIT) {
g_usleep(1000);
}
while (goflag == GOFLAG_RUN) {
... | {
"code": [],
"line_no": []
} | static void *FUNC_0(void *VAR_0)
{
int VAR_1;
long long VAR_2 = 0;
rcu_register_thread();
*(struct rcu_reader_data **)VAR_0 = &rcu_reader;
atomic_inc(&nthreadsrunning);
while (goflag == GOFLAG_INIT) {
g_usleep(1000);
}
while (goflag == GOFLAG_RUN) {
for (VA... | [
"static void *FUNC_0(void *VAR_0)\n{",
"int VAR_1;",
"long long VAR_2 = 0;",
"rcu_register_thread();",
"*(struct rcu_reader_data **)VAR_0 = &rcu_reader;",
"atomic_inc(&nthreadsrunning);",
"while (goflag == GOFLAG_INIT) {",
"g_usleep(1000);",
"}",
"while (goflag == GOFLAG_RUN) {",
"for (VAR_1 = 0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47... |
14,383 | static inline int coeff_unpack_golomb(GetBitContext *gb, int qfactor, int qoffset)
{
int sign, coeff;
uint32_t buf;
OPEN_READER(re, gb);
UPDATE_CACHE(re, gb);
buf = GET_CACHE(re, gb);
if (buf & 0xAA800000) {
buf >>= 32 - 8;
SKIP_BITS(re, gb, ff_interleaved_golomb_vlc... | false | FFmpeg | bbd977162590db4b29a5532e3e7102e054ff3ae0 | static inline int coeff_unpack_golomb(GetBitContext *gb, int qfactor, int qoffset)
{
int sign, coeff;
uint32_t buf;
OPEN_READER(re, gb);
UPDATE_CACHE(re, gb);
buf = GET_CACHE(re, gb);
if (buf & 0xAA800000) {
buf >>= 32 - 8;
SKIP_BITS(re, gb, ff_interleaved_golomb_vlc... | {
"code": [],
"line_no": []
} | static inline int FUNC_0(GetBitContext *VAR_0, int VAR_1, int VAR_2)
{
int VAR_3, VAR_4;
uint32_t buf;
OPEN_READER(re, VAR_0);
UPDATE_CACHE(re, VAR_0);
buf = GET_CACHE(re, VAR_0);
if (buf & 0xAA800000) {
buf >>= 32 - 8;
SKIP_BITS(re, VAR_0, ff_interleaved_golomb_vlc_... | [
"static inline int FUNC_0(GetBitContext *VAR_0, int VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4;",
"uint32_t buf;",
"OPEN_READER(re, VAR_0);",
"UPDATE_CACHE(re, VAR_0);",
"buf = GET_CACHE(re, VAR_0);",
"if (buf & 0xAA800000) {",
"buf >>= 32 - 8;",
"SKIP_BITS(re, VAR_0, ff_interleaved_golomb_vlc_len[buf... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39,
41
],
[
45
],
[
47
],
[
49
],
[
51
],
... |
14,384 | static CharDriverState *qemu_chr_open_tcp(const char *host_str,
int is_telnet,
int is_unix)
{
CharDriverState *chr = NULL;
TCPCharDriver *s = NULL;
int fd = -1, ret, err, val;
int is_listen = 0;
int is_waitconnect = 1;
int do_nodelay = 0;... | false | qemu | f07b6003b6cebaa5404d702ad8aca181580e4d6c | static CharDriverState *qemu_chr_open_tcp(const char *host_str,
int is_telnet,
int is_unix)
{
CharDriverState *chr = NULL;
TCPCharDriver *s = NULL;
int fd = -1, ret, err, val;
int is_listen = 0;
int is_waitconnect = 1;
int do_nodelay = 0;... | {
"code": [],
"line_no": []
} | static CharDriverState *FUNC_0(const char *host_str,
int is_telnet,
int is_unix)
{
CharDriverState *chr = NULL;
TCPCharDriver *s = NULL;
int VAR_0 = -1, VAR_1, VAR_2, VAR_3;
int VAR_4 = 0;
int VAR_5 = 1;
int VAR_6 = 0;
const char *VA... | [
"static CharDriverState *FUNC_0(const char *host_str,\nint is_telnet,\nint is_unix)\n{",
"CharDriverState *chr = NULL;",
"TCPCharDriver *s = NULL;",
"int VAR_0 = -1, VAR_1, VAR_2, VAR_3;",
"int VAR_4 = 0;",
"int VAR_5 = 1;",
"int VAR_6 = 0;",
"const char *VAR_7;",
"struct sockaddr_in VAR_8;",
"#if... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
37,
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
... |
14,385 | void define_one_arm_cp_reg_with_opaque(ARMCPU *cpu,
const ARMCPRegInfo *r, void *opaque)
{
/* Define implementations of coprocessor registers.
* We store these in a hashtable because typically
* there are less than 150 registers in a space which
* is 16*16... | false | qemu | 6e6efd612f58726189893fd4d948b7fc10acd872 | void define_one_arm_cp_reg_with_opaque(ARMCPU *cpu,
const ARMCPRegInfo *r, void *opaque)
{
int crm, opc1, opc2;
int crmmin = (r->crm == CP_ANY) ? 0 : r->crm;
int crmmax = (r->crm == CP_ANY) ? 15 : r->crm;
int opc1min = (r->opc1 == ... | {
"code": [],
"line_no": []
} | void FUNC_0(ARMCPU *VAR_0,
const ARMCPRegInfo *VAR_1, void *VAR_2)
{
int VAR_3, VAR_4, VAR_5;
int VAR_6 = (VAR_1->VAR_3 == CP_ANY) ? 0 : VAR_1->VAR_3;
int VAR_7 = (VAR_1->VAR_3 == CP_ANY) ? 15 : VAR_1->VAR_3;
int VAR_8 = (VAR_1->VA... | [
"void FUNC_0(ARMCPU *VAR_0,\nconst ARMCPRegInfo *VAR_1, void *VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5;",
"int VAR_6 = (VAR_1->VAR_3 == CP_ANY) ? 0 : VAR_1->VAR_3;",
"int VAR_7 = (VAR_1->VAR_3 == CP_ANY) ? 15 : VAR_1->VAR_3;",
"int VAR_8 = (VAR_1->VAR_4 == CP_ANY) ? 0 : VAR_1->VAR_4;",
"int VAR_9 = (VAR_1->VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
55
],
[
57
],
[
59
],
[
61
],
[
63
],
[
65
],
[
67
],
[
69
],
[
73
],
[
75
],
... |
14,389 | static void sdhci_sdma_transfer_single_block(SDHCIState *s)
{
int n;
uint32_t datacnt = s->blksize & 0x0fff;
if (s->trnmod & SDHC_TRNS_READ) {
for (n = 0; n < datacnt; n++) {
s->fifo_buffer[n] = sdbus_read_data(&s->sdbus);
}
dma_memory_write(&address_space_memor... | false | qemu | 241999bf4c0dd75d300ceee46f7ad28b3a39fe97 | static void sdhci_sdma_transfer_single_block(SDHCIState *s)
{
int n;
uint32_t datacnt = s->blksize & 0x0fff;
if (s->trnmod & SDHC_TRNS_READ) {
for (n = 0; n < datacnt; n++) {
s->fifo_buffer[n] = sdbus_read_data(&s->sdbus);
}
dma_memory_write(&address_space_memor... | {
"code": [],
"line_no": []
} | static void FUNC_0(SDHCIState *VAR_0)
{
int VAR_1;
uint32_t datacnt = VAR_0->blksize & 0x0fff;
if (VAR_0->trnmod & SDHC_TRNS_READ) {
for (VAR_1 = 0; VAR_1 < datacnt; VAR_1++) {
VAR_0->fifo_buffer[VAR_1] = sdbus_read_data(&VAR_0->sdbus);
}
dma_memory_write(&addre... | [
"static void FUNC_0(SDHCIState *VAR_0)\n{",
"int VAR_1;",
"uint32_t datacnt = VAR_0->blksize & 0x0fff;",
"if (VAR_0->trnmod & SDHC_TRNS_READ) {",
"for (VAR_1 = 0; VAR_1 < datacnt; VAR_1++) {",
"VAR_0->fifo_buffer[VAR_1] = sdbus_read_data(&VAR_0->sdbus);",
"}",
"dma_memory_write(&address_space_memory, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49... |
14,391 | static int tight_compress_data(VncState *vs, int stream_id, size_t bytes,
int level, int strategy)
{
z_streamp zstream = &vs->tight_stream[stream_id];
int previous_out;
if (bytes < VNC_TIGHT_MIN_TO_COMPRESS) {
vnc_write(vs, vs->tight.buffer, vs->tight.offset);
... | false | qemu | 245f7b51c0ea04fb2224b1127430a096c91aee70 | static int tight_compress_data(VncState *vs, int stream_id, size_t bytes,
int level, int strategy)
{
z_streamp zstream = &vs->tight_stream[stream_id];
int previous_out;
if (bytes < VNC_TIGHT_MIN_TO_COMPRESS) {
vnc_write(vs, vs->tight.buffer, vs->tight.offset);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(VncState *VAR_0, int VAR_1, size_t VAR_2,
int VAR_3, int VAR_4)
{
z_streamp zstream = &VAR_0->tight_stream[VAR_1];
int VAR_5;
if (VAR_2 < VNC_TIGHT_MIN_TO_COMPRESS) {
vnc_write(VAR_0, VAR_0->tight.buffer, VAR_0->tight.offset);
return ... | [
"static int FUNC_0(VncState *VAR_0, int VAR_1, size_t VAR_2,\nint VAR_3, int VAR_4)\n{",
"z_streamp zstream = &VAR_0->tight_stream[VAR_1];",
"int VAR_5;",
"if (VAR_2 < VNC_TIGHT_MIN_TO_COMPRESS) {",
"vnc_write(VAR_0, VAR_0->tight.buffer, VAR_0->tight.offset);",
"return VAR_2;",
"}",
"if (tight_init_st... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
33
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
55
],
[
57
],
[... |
14,392 | static void gen_compute_eflags_p(DisasContext *s, TCGv reg)
{
gen_compute_eflags(s);
tcg_gen_shri_tl(reg, cpu_cc_src, 2);
tcg_gen_andi_tl(reg, reg, 1);
}
| false | qemu | bec93d7283b635aabaf0bbff67b6da7fc99e020a | static void gen_compute_eflags_p(DisasContext *s, TCGv reg)
{
gen_compute_eflags(s);
tcg_gen_shri_tl(reg, cpu_cc_src, 2);
tcg_gen_andi_tl(reg, reg, 1);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, TCGv VAR_1)
{
gen_compute_eflags(VAR_0);
tcg_gen_shri_tl(VAR_1, cpu_cc_src, 2);
tcg_gen_andi_tl(VAR_1, VAR_1, 1);
}
| [
"static void FUNC_0(DisasContext *VAR_0, TCGv VAR_1)\n{",
"gen_compute_eflags(VAR_0);",
"tcg_gen_shri_tl(VAR_1, cpu_cc_src, 2);",
"tcg_gen_andi_tl(VAR_1, VAR_1, 1);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
14,394 | int attribute_align_arg avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
{
int ret;
av_frame_unref(frame);
if (!avcodec_is_open(avctx) || !av_codec_is_decoder(avctx->codec))
return AVERROR(EINVAL);
if (avctx->codec->receive_frame) {
if (avctx->internal->draining ... | false | FFmpeg | 40fbf3204208f89a0626f85ce6dd06ca0741583b | int attribute_align_arg avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
{
int ret;
av_frame_unref(frame);
if (!avcodec_is_open(avctx) || !av_codec_is_decoder(avctx->codec))
return AVERROR(EINVAL);
if (avctx->codec->receive_frame) {
if (avctx->internal->draining ... | {
"code": [],
"line_no": []
} | int VAR_0 avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
{
int ret;
av_frame_unref(frame);
if (!avcodec_is_open(avctx) || !av_codec_is_decoder(avctx->codec))
return AVERROR(EINVAL);
if (avctx->codec->receive_frame) {
if (avctx->internal->draining && !(avctx->co... | [
"int VAR_0 avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)\n{",
"int ret;",
"av_frame_unref(frame);",
"if (!avcodec_is_open(avctx) || !av_codec_is_decoder(avctx->codec))\nreturn AVERROR(EINVAL);",
"if (avctx->codec->receive_frame) {",
"if (avctx->internal->draining && !(avctx->codec->capabili... | [
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
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
35
],
[
37,
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
61,
63,
65
],
[
67
],
... |
14,395 | static void test_visitor_out_no_string(TestOutputVisitorData *data,
const void *unused)
{
char *string = NULL;
QObject *obj;
/* A null string should return "" */
visit_type_str(data->ov, NULL, &string, &error_abort);
obj = visitor_get(data);
g_a... | false | qemu | b3db211f3c80bb996a704d665fe275619f728bd4 | static void test_visitor_out_no_string(TestOutputVisitorData *data,
const void *unused)
{
char *string = NULL;
QObject *obj;
visit_type_str(data->ov, NULL, &string, &error_abort);
obj = visitor_get(data);
g_assert(qobject_type(obj) == QTYPE_QST... | {
"code": [],
"line_no": []
} | static void FUNC_0(TestOutputVisitorData *VAR_0,
const void *VAR_1)
{
char *VAR_2 = NULL;
QObject *obj;
visit_type_str(VAR_0->ov, NULL, &VAR_2, &error_abort);
obj = visitor_get(VAR_0);
g_assert(qobject_type(obj) == QTYPE_QSTRING);
g_assert... | [
"static void FUNC_0(TestOutputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"char *VAR_2 = NULL;",
"QObject *obj;",
"visit_type_str(VAR_0->ov, NULL, &VAR_2, &error_abort);",
"obj = visitor_get(VAR_0);",
"g_assert(qobject_type(obj) == QTYPE_QSTRING);",
"g_assert_cmpstr(qstring_get_str(qobject_to_qstring(o... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
14,397 | static int spapr_fixup_cpu_dt(void *fdt, sPAPREnvironment *spapr)
{
int ret = 0, offset, cpus_offset;
CPUState *cs;
char cpu_model[32];
int smt = kvmppc_smt_threads();
uint32_t pft_size_prop[] = {0, cpu_to_be32(spapr->htab_shift)};
CPU_FOREACH(cs) {
PowerPCCPU *cpu = POWERPC_CP... | false | qemu | 2a48d99335c572b0d3da59c1387ad131ea6ee590 | static int spapr_fixup_cpu_dt(void *fdt, sPAPREnvironment *spapr)
{
int ret = 0, offset, cpus_offset;
CPUState *cs;
char cpu_model[32];
int smt = kvmppc_smt_threads();
uint32_t pft_size_prop[] = {0, cpu_to_be32(spapr->htab_shift)};
CPU_FOREACH(cs) {
PowerPCCPU *cpu = POWERPC_CP... | {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0, sPAPREnvironment *VAR_1)
{
int VAR_2 = 0, VAR_3, VAR_4;
CPUState *cs;
char VAR_5[32];
int VAR_6 = kvmppc_smt_threads();
uint32_t pft_size_prop[] = {0, cpu_to_be32(VAR_1->htab_shift)};
CPU_FOREACH(cs) {
PowerPCCPU *cpu = POWERPC_CPU(cs);
D... | [
"static int FUNC_0(void *VAR_0, sPAPREnvironment *VAR_1)\n{",
"int VAR_2 = 0, VAR_3, VAR_4;",
"CPUState *cs;",
"char VAR_5[32];",
"int VAR_6 = kvmppc_smt_threads();",
"uint32_t pft_size_prop[] = {0, cpu_to_be32(VAR_1->htab_shift)};",
"CPU_FOREACH(cs) {",
"PowerPCCPU *cpu = POWERPC_CPU(cs);",
"Device... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29,
31,
33,
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
51
],
[
53
... |
14,398 | static always_inline void gen_excp (DisasContext *ctx,
int exception, int error_code)
{
TCGv tmp1, tmp2;
tcg_gen_movi_i64(cpu_pc, ctx->pc);
tmp1 = tcg_const_i32(exception);
tmp2 = tcg_const_i32(error_code);
tcg_gen_helper_0_2(helper_excp, tmp1, tmp2);
... | false | qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | static always_inline void gen_excp (DisasContext *ctx,
int exception, int error_code)
{
TCGv tmp1, tmp2;
tcg_gen_movi_i64(cpu_pc, ctx->pc);
tmp1 = tcg_const_i32(exception);
tmp2 = tcg_const_i32(error_code);
tcg_gen_helper_0_2(helper_excp, tmp1, tmp2);
... | {
"code": [],
"line_no": []
} | static always_inline void FUNC_0 (DisasContext *ctx,
int exception, int error_code)
{
TCGv tmp1, tmp2;
tcg_gen_movi_i64(cpu_pc, ctx->pc);
tmp1 = tcg_const_i32(exception);
tmp2 = tcg_const_i32(error_code);
tcg_gen_helper_0_2(helper_excp, tmp1, tmp2);
... | [
"static always_inline void FUNC_0 (DisasContext *ctx,\nint exception, int error_code)\n{",
"TCGv tmp1, tmp2;",
"tcg_gen_movi_i64(cpu_pc, ctx->pc);",
"tmp1 = tcg_const_i32(exception);",
"tmp2 = tcg_const_i32(error_code);",
"tcg_gen_helper_0_2(helper_excp, tmp1, tmp2);",
"tcg_temp_free(tmp2);",
"tcg_tem... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
14,399 | static bool gen_check_loop_end(DisasContext *dc, int slot)
{
if (option_enabled(dc, XTENSA_OPTION_LOOP) &&
!(dc->tb->flags & XTENSA_TBFLAG_EXCM) &&
dc->next_pc == dc->lend) {
int label = gen_new_label();
gen_advance_ccount(dc);
tcg_gen_brcondi_i32(TCG_COND_EQ... | false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static bool gen_check_loop_end(DisasContext *dc, int slot)
{
if (option_enabled(dc, XTENSA_OPTION_LOOP) &&
!(dc->tb->flags & XTENSA_TBFLAG_EXCM) &&
dc->next_pc == dc->lend) {
int label = gen_new_label();
gen_advance_ccount(dc);
tcg_gen_brcondi_i32(TCG_COND_EQ... | {
"code": [],
"line_no": []
} | static bool FUNC_0(DisasContext *dc, int slot)
{
if (option_enabled(dc, XTENSA_OPTION_LOOP) &&
!(dc->tb->flags & XTENSA_TBFLAG_EXCM) &&
dc->next_pc == dc->lend) {
int VAR_0 = gen_new_label();
gen_advance_ccount(dc);
tcg_gen_brcondi_i32(TCG_COND_EQ, cpu_SR[LCO... | [
"static bool FUNC_0(DisasContext *dc, int slot)\n{",
"if (option_enabled(dc, XTENSA_OPTION_LOOP) &&\n!(dc->tb->flags & XTENSA_TBFLAG_EXCM) &&\ndc->next_pc == dc->lend) {",
"int VAR_0 = gen_new_label();",
"gen_advance_ccount(dc);",
"tcg_gen_brcondi_i32(TCG_COND_EQ, cpu_SR[LCOUNT], 0, VAR_0);",
"tcg_gen_sub... | [
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
]
] |
14,400 | int i2c_send(I2CBus *bus, uint8_t data)
{
I2CSlaveClass *sc;
I2CNode *node;
int ret = 0;
QLIST_FOREACH(node, &bus->current_devs, next) {
sc = I2C_SLAVE_GET_CLASS(node->elt);
if (sc->send) {
ret = ret || sc->send(node->elt, data);
} else {
ret =... | false | qemu | 056fca7b51d949aa0e18e0eb647838874a53bcbe | int i2c_send(I2CBus *bus, uint8_t data)
{
I2CSlaveClass *sc;
I2CNode *node;
int ret = 0;
QLIST_FOREACH(node, &bus->current_devs, next) {
sc = I2C_SLAVE_GET_CLASS(node->elt);
if (sc->send) {
ret = ret || sc->send(node->elt, data);
} else {
ret =... | {
"code": [],
"line_no": []
} | int FUNC_0(I2CBus *VAR_0, uint8_t VAR_1)
{
I2CSlaveClass *sc;
I2CNode *node;
int VAR_2 = 0;
QLIST_FOREACH(node, &VAR_0->current_devs, next) {
sc = I2C_SLAVE_GET_CLASS(node->elt);
if (sc->send) {
VAR_2 = VAR_2 || sc->send(node->elt, VAR_1);
} else {
... | [
"int FUNC_0(I2CBus *VAR_0, uint8_t VAR_1)\n{",
"I2CSlaveClass *sc;",
"I2CNode *node;",
"int VAR_2 = 0;",
"QLIST_FOREACH(node, &VAR_0->current_devs, next) {",
"sc = I2C_SLAVE_GET_CLASS(node->elt);",
"if (sc->send) {",
"VAR_2 = VAR_2 || sc->send(node->elt, VAR_1);",
"} else {",
"VAR_2 = -1;",
"}",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
14,401 | static int find_image_range(int *pfirst_index, int *plast_index,
const char *path, int start_index, int start_index_range)
{
char buf[1024];
int range, last_index, range1, first_index;
/* find the first image */
for (first_index = start_index; first_index < start_inde... | false | FFmpeg | e9e87822022fc81f92866f870ecedfd2f6272ac9 | static int find_image_range(int *pfirst_index, int *plast_index,
const char *path, int start_index, int start_index_range)
{
char buf[1024];
int range, last_index, range1, first_index;
for (first_index = start_index; first_index < start_index + start_index_range; fir... | {
"code": [],
"line_no": []
} | static int FUNC_0(int *VAR_0, int *VAR_1,
const char *VAR_2, int VAR_3, int VAR_4)
{
char VAR_5[1024];
int VAR_6, VAR_7, VAR_8, VAR_9;
for (VAR_9 = VAR_3; VAR_9 < VAR_3 + VAR_4; VAR_9++) {
if (av_get_frame_filename(VAR_5, sizeof(VAR_5), VAR_2, VAR_9) < 0) {
... | [
"static int FUNC_0(int *VAR_0, int *VAR_1,\nconst char *VAR_2, int VAR_3, int VAR_4)\n{",
"char VAR_5[1024];",
"int VAR_6, VAR_7, VAR_8, VAR_9;",
"for (VAR_9 = VAR_3; VAR_9 < VAR_3 + VAR_4; VAR_9++) {",
"if (av_get_frame_filename(VAR_5, sizeof(VAR_5), VAR_2, VAR_9) < 0) {",
"*VAR_0 =\n*VAR_1 = 1;",
"if... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
15
],
[
17
],
[
19,
21
],
[
23,
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37,
39
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53,
55
... |
14,403 | start_list(Visitor *v, const char *name, GenericList **list, size_t size,
Error **errp)
{
StringInputVisitor *siv = to_siv(v);
/* We don't support visits without a list */
assert(list);
if (parse_str(siv, name, errp) < 0) {
*list = NULL;
return;
}
siv->... | false | qemu | a0efbf16604770b9d805bcf210ec29942321134f | start_list(Visitor *v, const char *name, GenericList **list, size_t size,
Error **errp)
{
StringInputVisitor *siv = to_siv(v);
assert(list);
if (parse_str(siv, name, errp) < 0) {
*list = NULL;
return;
}
siv->cur_range = g_list_first(siv->ranges);
... | {
"code": [],
"line_no": []
} | FUNC_0(Visitor *VAR_0, const char *VAR_1, GenericList **VAR_2, size_t VAR_3,
Error **VAR_4)
{
StringInputVisitor *siv = to_siv(VAR_0);
assert(VAR_2);
if (parse_str(siv, VAR_1, VAR_4) < 0) {
*VAR_2 = NULL;
return;
}
siv->cur_range = g_list_first(siv->ra... | [
"FUNC_0(Visitor *VAR_0, const char *VAR_1, GenericList **VAR_2, size_t VAR_3,\nError **VAR_4)\n{",
"StringInputVisitor *siv = to_siv(VAR_0);",
"assert(VAR_2);",
"if (parse_str(siv, VAR_1, VAR_4) < 0) {",
"*VAR_2 = NULL;",
"return;",
"}",
"siv->cur_range = g_list_first(siv->ranges);",
"if (siv->cur_r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
]
] |
14,404 | static int xio3130_downstream_initfn(PCIDevice *d)
{
PCIBridge* br = DO_UPCAST(PCIBridge, dev, d);
PCIEPort *p = DO_UPCAST(PCIEPort, br, br);
PCIESlot *s = DO_UPCAST(PCIESlot, port, p);
int rc;
int tmp;
rc = pci_bridge_initfn(d);
if (rc < 0) {
return rc;
}
pcie... | false | qemu | 3ec39b2d20a25505382619e31e6572e3d04f311e | static int xio3130_downstream_initfn(PCIDevice *d)
{
PCIBridge* br = DO_UPCAST(PCIBridge, dev, d);
PCIEPort *p = DO_UPCAST(PCIEPort, br, br);
PCIESlot *s = DO_UPCAST(PCIESlot, port, p);
int rc;
int tmp;
rc = pci_bridge_initfn(d);
if (rc < 0) {
return rc;
}
pcie... | {
"code": [],
"line_no": []
} | static int FUNC_0(PCIDevice *VAR_0)
{
PCIBridge* br = DO_UPCAST(PCIBridge, dev, VAR_0);
PCIEPort *p = DO_UPCAST(PCIEPort, br, br);
PCIESlot *s = DO_UPCAST(PCIESlot, port, p);
int VAR_1;
int VAR_2;
VAR_1 = pci_bridge_initfn(VAR_0);
if (VAR_1 < 0) {
return VAR_1;
}
... | [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"PCIBridge* br = DO_UPCAST(PCIBridge, dev, VAR_0);",
"PCIEPort *p = DO_UPCAST(PCIEPort, br, br);",
"PCIESlot *s = DO_UPCAST(PCIESlot, port, p);",
"int VAR_1;",
"int VAR_2;",
"VAR_1 = pci_bridge_initfn(VAR_0);",
"if (VAR_1 < 0) {",
"return VAR_1;",
"}",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39,
41
],
[
43
],
[
45
],
[
47
],
[
49,... |
14,406 | void imx_timerg_create(const target_phys_addr_t addr,
qemu_irq irq,
DeviceState *ccm)
{
IMXTimerGState *pp;
DeviceState *dev;
dev = sysbus_create_simple("imx_timerg", addr, irq);
pp = container_of(dev, IMXTimerGState, busdev.qdev);
... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | void imx_timerg_create(const target_phys_addr_t addr,
qemu_irq irq,
DeviceState *ccm)
{
IMXTimerGState *pp;
DeviceState *dev;
dev = sysbus_create_simple("imx_timerg", addr, irq);
pp = container_of(dev, IMXTimerGState, busdev.qdev);
... | {
"code": [],
"line_no": []
} | void FUNC_0(const target_phys_addr_t VAR_0,
qemu_irq VAR_1,
DeviceState *VAR_2)
{
IMXTimerGState *pp;
DeviceState *dev;
dev = sysbus_create_simple("imx_timerg", VAR_0, VAR_1);
pp = container_of(dev, IMXTimerGState, busdev.qdev);
p... | [
"void FUNC_0(const target_phys_addr_t VAR_0,\nqemu_irq VAR_1,\nDeviceState *VAR_2)\n{",
"IMXTimerGState *pp;",
"DeviceState *dev;",
"dev = sysbus_create_simple(\"imx_timerg\", VAR_0, VAR_1);",
"pp = container_of(dev, IMXTimerGState, busdev.qdev);",
"pp->VAR_2 = VAR_2;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
14,407 | static int mig_save_device_bulk(Monitor *mon, QEMUFile *f,
BlkMigDevState *bmds)
{
int64_t total_sectors = bmds->total_sectors;
int64_t cur_sector = bmds->cur_sector;
BlockDriverState *bs = bmds->bs;
BlkMigBlock *blk;
int nr_sectors;
if (bmds->shared_bas... | false | qemu | 539de1246d355d3b8aa33fb7cde732352d8827c7 | static int mig_save_device_bulk(Monitor *mon, QEMUFile *f,
BlkMigDevState *bmds)
{
int64_t total_sectors = bmds->total_sectors;
int64_t cur_sector = bmds->cur_sector;
BlockDriverState *bs = bmds->bs;
BlkMigBlock *blk;
int nr_sectors;
if (bmds->shared_bas... | {
"code": [],
"line_no": []
} | static int FUNC_0(Monitor *VAR_0, QEMUFile *VAR_1,
BlkMigDevState *VAR_2)
{
int64_t total_sectors = VAR_2->total_sectors;
int64_t cur_sector = VAR_2->cur_sector;
BlockDriverState *bs = VAR_2->bs;
BlkMigBlock *blk;
int VAR_3;
if (VAR_2->shared_base) {
... | [
"static int FUNC_0(Monitor *VAR_0, QEMUFile *VAR_1,\nBlkMigDevState *VAR_2)\n{",
"int64_t total_sectors = VAR_2->total_sectors;",
"int64_t cur_sector = VAR_2->cur_sector;",
"BlockDriverState *bs = VAR_2->bs;",
"BlkMigBlock *blk;",
"int VAR_3;",
"if (VAR_2->shared_base) {",
"while (cur_sector < total_s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23,
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
49
],
[
55
],
[... |
14,408 | int64_t qemu_clock_get_ns(QEMUClockType type)
{
int64_t now, last;
QEMUClock *clock = qemu_clock_ptr(type);
switch (type) {
case QEMU_CLOCK_REALTIME:
return get_clock();
default:
case QEMU_CLOCK_VIRTUAL:
if (use_icount) {
return cpu_get_icount();
... | false | qemu | fb1a3a051d89975f26296163066bb0745ecca49d | int64_t qemu_clock_get_ns(QEMUClockType type)
{
int64_t now, last;
QEMUClock *clock = qemu_clock_ptr(type);
switch (type) {
case QEMU_CLOCK_REALTIME:
return get_clock();
default:
case QEMU_CLOCK_VIRTUAL:
if (use_icount) {
return cpu_get_icount();
... | {
"code": [],
"line_no": []
} | int64_t FUNC_0(QEMUClockType type)
{
int64_t now, last;
QEMUClock *clock = qemu_clock_ptr(type);
switch (type) {
case QEMU_CLOCK_REALTIME:
return get_clock();
default:
case QEMU_CLOCK_VIRTUAL:
if (use_icount) {
return cpu_get_icount();
} else {
... | [
"int64_t FUNC_0(QEMUClockType type)\n{",
"int64_t now, last;",
"QEMUClock *clock = qemu_clock_ptr(type);",
"switch (type) {",
"case QEMU_CLOCK_REALTIME:\nreturn get_clock();",
"default:\ncase QEMU_CLOCK_VIRTUAL:\nif (use_icount) {",
"return cpu_get_icount();",
"} else {",
"return cpu_get_clock();",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17,
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
14,409 | static void test_acpi_q35_tcg_cphp(void)
{
test_data data;
memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".cphp";
test_acpi_one(" -smp 2,cores=3,sockets=2,maxcpus=6"
" -numa node -numa node",
&data);
free_test_data(&data... | false | qemu | fda4096fca83dcdc72e0fc0e4a1ae6e7724fb5e0 | static void test_acpi_q35_tcg_cphp(void)
{
test_data data;
memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".cphp";
test_acpi_one(" -smp 2,cores=3,sockets=2,maxcpus=6"
" -numa node -numa node",
&data);
free_test_data(&data... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
test_data data;
memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".cphp";
test_acpi_one(" -smp 2,cores=3,sockets=2,maxcpus=6"
" -numa node -numa node",
&data);
free_test_data(&data);
}
| [
"static void FUNC_0(void)\n{",
"test_data data;",
"memset(&data, 0, sizeof(data));",
"data.machine = MACHINE_Q35;",
"data.variant = \".cphp\";",
"test_acpi_one(\" -smp 2,cores=3,sockets=2,maxcpus=6\"\n\" -numa node -numa node\",\n&data);",
"free_test_data(&data);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15,
17,
19
],
[
21
],
[
23
]
] |
14,411 | int block_job_set_speed(BlockJob *job, int64_t value)
{
int rc;
if (!job->job_type->set_speed) {
return -ENOTSUP;
}
rc = job->job_type->set_speed(job, value);
if (rc == 0) {
job->speed = value;
}
return rc;
}
| false | qemu | 9e6636c72d8d6f0605e23ed820c8487686882b12 | int block_job_set_speed(BlockJob *job, int64_t value)
{
int rc;
if (!job->job_type->set_speed) {
return -ENOTSUP;
}
rc = job->job_type->set_speed(job, value);
if (rc == 0) {
job->speed = value;
}
return rc;
}
| {
"code": [],
"line_no": []
} | int FUNC_0(BlockJob *VAR_0, int64_t VAR_1)
{
int VAR_2;
if (!VAR_0->job_type->set_speed) {
return -ENOTSUP;
}
VAR_2 = VAR_0->job_type->set_speed(VAR_0, VAR_1);
if (VAR_2 == 0) {
VAR_0->speed = VAR_1;
}
return VAR_2;
}
| [
"int FUNC_0(BlockJob *VAR_0, int64_t VAR_1)\n{",
"int VAR_2;",
"if (!VAR_0->job_type->set_speed) {",
"return -ENOTSUP;",
"}",
"VAR_2 = VAR_0->job_type->set_speed(VAR_0, VAR_1);",
"if (VAR_2 == 0) {",
"VAR_0->speed = VAR_1;",
"}",
"return VAR_2;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
14,412 | static void test_acpi_q35_tcg_memhp(void)
{
test_data data;
memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".memhp";
test_acpi_one(" -m 128,slots=3,maxmem=1G -numa node", &data);
free_test_data(&data);
}
| false | qemu | fda4096fca83dcdc72e0fc0e4a1ae6e7724fb5e0 | static void test_acpi_q35_tcg_memhp(void)
{
test_data data;
memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".memhp";
test_acpi_one(" -m 128,slots=3,maxmem=1G -numa node", &data);
free_test_data(&data);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
test_data data;
memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".memhp";
test_acpi_one(" -m 128,slots=3,maxmem=1G -numa node", &data);
free_test_data(&data);
}
| [
"static void FUNC_0(void)\n{",
"test_data data;",
"memset(&data, 0, sizeof(data));",
"data.machine = MACHINE_Q35;",
"data.variant = \".memhp\";",
"test_acpi_one(\" -m 128,slots=3,maxmem=1G -numa node\", &data);",
"free_test_data(&data);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
14,414 | void pci_bus_reset(PCIBus *bus)
{
int i;
for (i = 0; i < bus->nirq; i++) {
bus->irq_count[i] = 0;
}
for (i = 0; i < ARRAY_SIZE(bus->devices); ++i) {
if (bus->devices[i]) {
pci_device_reset(bus->devices[i]);
}
}
}
| false | qemu | 81e3e75b6461c53724fe7c7918bc54468fcdaf9d | void pci_bus_reset(PCIBus *bus)
{
int i;
for (i = 0; i < bus->nirq; i++) {
bus->irq_count[i] = 0;
}
for (i = 0; i < ARRAY_SIZE(bus->devices); ++i) {
if (bus->devices[i]) {
pci_device_reset(bus->devices[i]);
}
}
}
| {
"code": [],
"line_no": []
} | void FUNC_0(PCIBus *VAR_0)
{
int VAR_1;
for (VAR_1 = 0; VAR_1 < VAR_0->nirq; VAR_1++) {
VAR_0->irq_count[VAR_1] = 0;
}
for (VAR_1 = 0; VAR_1 < ARRAY_SIZE(VAR_0->devices); ++VAR_1) {
if (VAR_0->devices[VAR_1]) {
pci_device_reset(VAR_0->devices[VAR_1]);
}
... | [
"void FUNC_0(PCIBus *VAR_0)\n{",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < VAR_0->nirq; VAR_1++) {",
"VAR_0->irq_count[VAR_1] = 0;",
"}",
"for (VAR_1 = 0; VAR_1 < ARRAY_SIZE(VAR_0->devices); ++VAR_1) {",
"if (VAR_0->devices[VAR_1]) {",
"pci_device_reset(VAR_0->devices[VAR_1]);",
"}",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
14,415 | static bool invalid_qmp_mode(const Monitor *mon, const mon_cmd_t *cmd)
{
bool is_cap = cmd->mhandler.cmd_new == do_qmp_capabilities;
if (is_cap && qmp_cmd_mode(mon)) {
qerror_report(ERROR_CLASS_COMMAND_NOT_FOUND,
"Capabilities negotiation is already complete, command "
... | false | qemu | 4086182fcd9b106345b5cc535d78bcc6d13a7683 | static bool invalid_qmp_mode(const Monitor *mon, const mon_cmd_t *cmd)
{
bool is_cap = cmd->mhandler.cmd_new == do_qmp_capabilities;
if (is_cap && qmp_cmd_mode(mon)) {
qerror_report(ERROR_CLASS_COMMAND_NOT_FOUND,
"Capabilities negotiation is already complete, command "
... | {
"code": [],
"line_no": []
} | static bool FUNC_0(const Monitor *mon, const mon_cmd_t *cmd)
{
bool is_cap = cmd->mhandler.cmd_new == do_qmp_capabilities;
if (is_cap && qmp_cmd_mode(mon)) {
qerror_report(ERROR_CLASS_COMMAND_NOT_FOUND,
"Capabilities negotiation is already complete, command "
... | [
"static bool FUNC_0(const Monitor *mon, const mon_cmd_t *cmd)\n{",
"bool is_cap = cmd->mhandler.cmd_new == do_qmp_capabilities;",
"if (is_cap && qmp_cmd_mode(mon)) {",
"qerror_report(ERROR_CLASS_COMMAND_NOT_FOUND,\n\"Capabilities negotiation is already complete, command \"\n\"'%s' ignored\", cmd->name);",
"... | [
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
]
] |
14,416 | static int encode_ext_header(Wmv2Context *w){
MpegEncContext * const s= &w->s;
PutBitContext pb;
int code;
init_put_bits(&pb, s->avctx->extradata, s->avctx->extradata_size);
put_bits(&pb, 5, s->avctx->time_base.den / s->avctx->time_base.num); //yes 29.97 -> 29
put_bits(&pb, 11, FFMIN(s... | false | FFmpeg | a8ff69ce2bad1c4bb043e88ea35f5ab5691d4f3c | static int encode_ext_header(Wmv2Context *w){
MpegEncContext * const s= &w->s;
PutBitContext pb;
int code;
init_put_bits(&pb, s->avctx->extradata, s->avctx->extradata_size);
put_bits(&pb, 5, s->avctx->time_base.den / s->avctx->time_base.num);
put_bits(&pb, 11, FFMIN(s->bit_rate/1024, ... | {
"code": [],
"line_no": []
} | static int FUNC_0(Wmv2Context *VAR_0){
MpegEncContext * const s= &VAR_0->s;
PutBitContext pb;
int VAR_1;
init_put_bits(&pb, s->avctx->extradata, s->avctx->extradata_size);
put_bits(&pb, 5, s->avctx->time_base.den / s->avctx->time_base.num);
put_bits(&pb, 11, FFMIN(s->bit_rate/1024, 20... | [
"static int FUNC_0(Wmv2Context *VAR_0){",
"MpegEncContext * const s= &VAR_0->s;",
"PutBitContext pb;",
"int VAR_1;",
"init_put_bits(&pb, s->avctx->extradata, s->avctx->extradata_size);",
"put_bits(&pb, 5, s->avctx->time_base.den / s->avctx->time_base.num);",
"put_bits(&pb, 11, FFMIN(s->bit_rate/1024, 20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
41
],
[
45
],
[
47
]
] |
14,417 | static int sd_schedule_bh(QEMUBHFunc *cb, SheepdogAIOCB *acb)
{
if (acb->bh) {
error_report("bug: %d %d\n", acb->aiocb_type, acb->aiocb_type);
return -EIO;
}
acb->bh = qemu_bh_new(cb, acb);
if (!acb->bh) {
error_report("oom: %d %d\n", acb->aiocb_type, acb->aiocb_type);
... | false | qemu | db78ef5b0a93b16ad56b70a70e21b1c5e7d06ba8 | static int sd_schedule_bh(QEMUBHFunc *cb, SheepdogAIOCB *acb)
{
if (acb->bh) {
error_report("bug: %d %d\n", acb->aiocb_type, acb->aiocb_type);
return -EIO;
}
acb->bh = qemu_bh_new(cb, acb);
if (!acb->bh) {
error_report("oom: %d %d\n", acb->aiocb_type, acb->aiocb_type);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(QEMUBHFunc *VAR_0, SheepdogAIOCB *VAR_1)
{
if (VAR_1->bh) {
error_report("bug: %d %d\n", VAR_1->aiocb_type, VAR_1->aiocb_type);
return -EIO;
}
VAR_1->bh = qemu_bh_new(VAR_0, VAR_1);
if (!VAR_1->bh) {
error_report("oom: %d %d\n", VAR_1->aiocb_type, VAR_... | [
"static int FUNC_0(QEMUBHFunc *VAR_0, SheepdogAIOCB *VAR_1)\n{",
"if (VAR_1->bh) {",
"error_report(\"bug: %d %d\\n\", VAR_1->aiocb_type, VAR_1->aiocb_type);",
"return -EIO;",
"}",
"VAR_1->bh = qemu_bh_new(VAR_0, VAR_1);",
"if (!VAR_1->bh) {",
"error_report(\"oom: %d %d\\n\", VAR_1->aiocb_type, VAR_1->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
]
] |
14,418 | static int uhci_handle_td(UHCIState *s, UHCIQueue *q, uint32_t qh_addr,
UHCI_TD *td, uint32_t td_addr, uint32_t *int_mask)
{
int len = 0, max_len;
bool spd;
bool queuing = (q != NULL);
uint8_t pid = td->token & 0xff;
UHCIAsync *async = uhci_async_find_td(s, td_addr);... | false | qemu | 8928c9c43df1a0eeda1ae2e9582beb34dce49330 | static int uhci_handle_td(UHCIState *s, UHCIQueue *q, uint32_t qh_addr,
UHCI_TD *td, uint32_t td_addr, uint32_t *int_mask)
{
int len = 0, max_len;
bool spd;
bool queuing = (q != NULL);
uint8_t pid = td->token & 0xff;
UHCIAsync *async = uhci_async_find_td(s, td_addr);... | {
"code": [],
"line_no": []
} | static int FUNC_0(UHCIState *VAR_0, UHCIQueue *VAR_1, uint32_t VAR_2,
UHCI_TD *VAR_3, uint32_t VAR_4, uint32_t *VAR_5)
{
int VAR_6 = 0, VAR_7;
bool spd;
bool queuing = (VAR_1 != NULL);
uint8_t pid = VAR_3->token & 0xff;
UHCIAsync *async = uhci_async_find_td(VAR_0, VA... | [
"static int FUNC_0(UHCIState *VAR_0, UHCIQueue *VAR_1, uint32_t VAR_2,\nUHCI_TD *VAR_3, uint32_t VAR_4, uint32_t *VAR_5)\n{",
"int VAR_6 = 0, VAR_7;",
"bool spd;",
"bool queuing = (VAR_1 != NULL);",
"uint8_t pid = VAR_3->token & 0xff;",
"UHCIAsync *async = uhci_async_find_td(VAR_0, VAR_4);",
"if (async)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
14,419 | static int ccid_handle_data(USBDevice *dev, USBPacket *p)
{
USBCCIDState *s = DO_UPCAST(USBCCIDState, dev, dev);
int ret = 0;
uint8_t buf[2];
switch (p->pid) {
case USB_TOKEN_OUT:
ret = ccid_handle_bulk_out(s, p);
break;
case USB_TOKEN_IN:
switch (p->devep &... | false | qemu | 079d0b7f1eedcc634c371fe05b617fdc55c8b762 | static int ccid_handle_data(USBDevice *dev, USBPacket *p)
{
USBCCIDState *s = DO_UPCAST(USBCCIDState, dev, dev);
int ret = 0;
uint8_t buf[2];
switch (p->pid) {
case USB_TOKEN_OUT:
ret = ccid_handle_bulk_out(s, p);
break;
case USB_TOKEN_IN:
switch (p->devep &... | {
"code": [],
"line_no": []
} | static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)
{
USBCCIDState *s = DO_UPCAST(USBCCIDState, VAR_0, VAR_0);
int VAR_2 = 0;
uint8_t buf[2];
switch (VAR_1->pid) {
case USB_TOKEN_OUT:
VAR_2 = ccid_handle_bulk_out(s, VAR_1);
break;
case USB_TOKEN_IN:
switch... | [
"static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)\n{",
"USBCCIDState *s = DO_UPCAST(USBCCIDState, VAR_0, VAR_0);",
"int VAR_2 = 0;",
"uint8_t buf[2];",
"switch (VAR_1->pid) {",
"case USB_TOKEN_OUT:\nVAR_2 = ccid_handle_bulk_out(s, VAR_1);",
"break;",
"case USB_TOKEN_IN:\nswitch (VAR_1->devep & 0x... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
47
],
[
49
],
[
51
... |
14,420 | char *g_strconcat(const char *s, ...)
{
char *s;
/*
* Can't model: last argument must be null, the others
* null-terminated strings
*/
s = __coverity_alloc_nosize__();
__coverity_writeall__(s);
__coverity_mark_as_afm_allocated__(s, AFM_free);
return s;
}
| false | qemu | 7ad4c7200111d20eb97eed4f46b6026e3f0b0eef | char *g_strconcat(const char *s, ...)
{
char *s;
s = __coverity_alloc_nosize__();
__coverity_writeall__(s);
__coverity_mark_as_afm_allocated__(s, AFM_free);
return s;
}
| {
"code": [],
"line_no": []
} | char *FUNC_0(const char *VAR_1, ...)
{
char *VAR_1;
VAR_1 = __coverity_alloc_nosize__();
__coverity_writeall__(VAR_1);
__coverity_mark_as_afm_allocated__(VAR_1, AFM_free);
return VAR_1;
}
| [
"char *FUNC_0(const char *VAR_1, ...)\n{",
"char *VAR_1;",
"VAR_1 = __coverity_alloc_nosize__();",
"__coverity_writeall__(VAR_1);",
"__coverity_mark_as_afm_allocated__(VAR_1, AFM_free);",
"return VAR_1;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
14,421 | static void test_qemu_strtoul_max(void)
{
char *str = g_strdup_printf("%lu", ULONG_MAX);
char f = 'X';
const char *endptr = &f;
unsigned long res = 999;
int err;
err = qemu_strtoul(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, ULONG_MAX);
... | false | qemu | bc7c08a2c375acb7ae4d433054415588b176d34c | static void test_qemu_strtoul_max(void)
{
char *str = g_strdup_printf("%lu", ULONG_MAX);
char f = 'X';
const char *endptr = &f;
unsigned long res = 999;
int err;
err = qemu_strtoul(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, ULONG_MAX);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
char *VAR_0 = g_strdup_printf("%lu", ULONG_MAX);
char VAR_1 = 'X';
const char *VAR_2 = &VAR_1;
unsigned long VAR_3 = 999;
int VAR_4;
VAR_4 = qemu_strtoul(VAR_0, &VAR_2, 0, &VAR_3);
g_assert_cmpint(VAR_4, ==, 0);
g_assert_cmpint(VAR_3, ==, ULONG_MAX... | [
"static void FUNC_0(void)\n{",
"char *VAR_0 = g_strdup_printf(\"%lu\", ULONG_MAX);",
"char VAR_1 = 'X';",
"const char *VAR_2 = &VAR_1;",
"unsigned long VAR_3 = 999;",
"int VAR_4;",
"VAR_4 = qemu_strtoul(VAR_0, &VAR_2, 0, &VAR_3);",
"g_assert_cmpint(VAR_4, ==, 0);",
"g_assert_cmpint(VAR_3, ==, ULONG_... | [
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
]
] |
14,422 | static int coroutine_enter_func(void *arg)
{
Coroutine *co = arg;
qemu_coroutine_enter(co, NULL);
return 0;
}
| false | qemu | fe52840c8760122257be7b7e4893dd951480a71f | static int coroutine_enter_func(void *arg)
{
Coroutine *co = arg;
qemu_coroutine_enter(co, NULL);
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0)
{
Coroutine *co = VAR_0;
qemu_coroutine_enter(co, NULL);
return 0;
}
| [
"static int FUNC_0(void *VAR_0)\n{",
"Coroutine *co = VAR_0;",
"qemu_coroutine_enter(co, NULL);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
14,423 | START_TEST(qdict_new_test)
{
QDict *qdict;
qdict = qdict_new();
fail_unless(qdict != NULL);
fail_unless(qdict_size(qdict) == 0);
fail_unless(qdict->base.refcnt == 1);
fail_unless(qobject_type(QOBJECT(qdict)) == QTYPE_QDICT);
// destroy doesn't exit yet
free(qdict);
}
| false | qemu | ac531cb6e542b1e61d668604adf9dc5306a948c0 | START_TEST(qdict_new_test)
{
QDict *qdict;
qdict = qdict_new();
fail_unless(qdict != NULL);
fail_unless(qdict_size(qdict) == 0);
fail_unless(qdict->base.refcnt == 1);
fail_unless(qobject_type(QOBJECT(qdict)) == QTYPE_QDICT);
free(qdict);
}
| {
"code": [],
"line_no": []
} | FUNC_0(VAR_0)
{
QDict *qdict;
qdict = qdict_new();
fail_unless(qdict != NULL);
fail_unless(qdict_size(qdict) == 0);
fail_unless(qdict->base.refcnt == 1);
fail_unless(qobject_type(QOBJECT(qdict)) == QTYPE_QDICT);
free(qdict);
}
| [
"FUNC_0(VAR_0)\n{",
"QDict *qdict;",
"qdict = qdict_new();",
"fail_unless(qdict != NULL);",
"fail_unless(qdict_size(qdict) == 0);",
"fail_unless(qdict->base.refcnt == 1);",
"fail_unless(qobject_type(QOBJECT(qdict)) == QTYPE_QDICT);",
"free(qdict);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
]
] |
14,424 | int print_insn_xtensa(bfd_vma memaddr, struct disassemble_info *info)
{
xtensa_isa isa = info->private_data;
xtensa_insnbuf insnbuf = xtensa_insnbuf_alloc(isa);
xtensa_insnbuf slotbuf = xtensa_insnbuf_alloc(isa);
bfd_byte *buffer = g_malloc(1);
int status = info->read_memory_func(memaddr, buff... | false | qemu | 847a6473206607bc6c84f6c537a0fe603ff7aaa6 | int print_insn_xtensa(bfd_vma memaddr, struct disassemble_info *info)
{
xtensa_isa isa = info->private_data;
xtensa_insnbuf insnbuf = xtensa_insnbuf_alloc(isa);
xtensa_insnbuf slotbuf = xtensa_insnbuf_alloc(isa);
bfd_byte *buffer = g_malloc(1);
int status = info->read_memory_func(memaddr, buff... | {
"code": [],
"line_no": []
} | int FUNC_0(bfd_vma VAR_0, struct disassemble_info *VAR_1)
{
xtensa_isa isa = VAR_1->private_data;
xtensa_insnbuf insnbuf = xtensa_insnbuf_alloc(isa);
xtensa_insnbuf slotbuf = xtensa_insnbuf_alloc(isa);
bfd_byte *buffer = g_malloc(1);
int VAR_2 = VAR_1->read_memory_func(VAR_0, buffer, 1, VAR_1)... | [
"int FUNC_0(bfd_vma VAR_0, struct disassemble_info *VAR_1)\n{",
"xtensa_isa isa = VAR_1->private_data;",
"xtensa_insnbuf insnbuf = xtensa_insnbuf_alloc(isa);",
"xtensa_insnbuf slotbuf = xtensa_insnbuf_alloc(isa);",
"bfd_byte *buffer = g_malloc(1);",
"int VAR_2 = VAR_1->read_memory_func(VAR_0, buffer, 1, 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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
37
],
[
39
],
[
41
],
[
43
... |
14,425 | char *qemu_strdup(const char *str)
{
char *ptr;
size_t len = strlen(str);
ptr = qemu_malloc(len + 1);
if (!ptr)
return NULL;
pstrcpy(ptr, len + 1, str);
return ptr;
}
| false | qemu | ac4b0d0c4feb291643c0e8a07a92e449e13881b5 | char *qemu_strdup(const char *str)
{
char *ptr;
size_t len = strlen(str);
ptr = qemu_malloc(len + 1);
if (!ptr)
return NULL;
pstrcpy(ptr, len + 1, str);
return ptr;
}
| {
"code": [],
"line_no": []
} | char *FUNC_0(const char *VAR_0)
{
char *VAR_1;
size_t len = strlen(VAR_0);
VAR_1 = qemu_malloc(len + 1);
if (!VAR_1)
return NULL;
pstrcpy(VAR_1, len + 1, VAR_0);
return VAR_1;
}
| [
"char *FUNC_0(const char *VAR_0)\n{",
"char *VAR_1;",
"size_t len = strlen(VAR_0);",
"VAR_1 = qemu_malloc(len + 1);",
"if (!VAR_1)\nreturn NULL;",
"pstrcpy(VAR_1, len + 1, VAR_0);",
"return VAR_1;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
]
] |
14,426 | static inline void flash_sync_area(Flash *s, int64_t off, int64_t len)
{
int64_t start, end, nb_sectors;
QEMUIOVector iov;
if (!s->bdrv || bdrv_is_read_only(s->bdrv)) {
return;
}
assert(!(len % BDRV_SECTOR_SIZE));
start = off / BDRV_SECTOR_SIZE;
end = (off + len) / BDRV_... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static inline void flash_sync_area(Flash *s, int64_t off, int64_t len)
{
int64_t start, end, nb_sectors;
QEMUIOVector iov;
if (!s->bdrv || bdrv_is_read_only(s->bdrv)) {
return;
}
assert(!(len % BDRV_SECTOR_SIZE));
start = off / BDRV_SECTOR_SIZE;
end = (off + len) / BDRV_... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(Flash *VAR_0, int64_t VAR_1, int64_t VAR_2)
{
int64_t start, end, nb_sectors;
QEMUIOVector iov;
if (!VAR_0->bdrv || bdrv_is_read_only(VAR_0->bdrv)) {
return;
}
assert(!(VAR_2 % BDRV_SECTOR_SIZE));
start = VAR_1 / BDRV_SECTOR_SIZE;
end = (VAR_1 +... | [
"static inline void FUNC_0(Flash *VAR_0, int64_t VAR_1, int64_t VAR_2)\n{",
"int64_t start, end, nb_sectors;",
"QEMUIOVector iov;",
"if (!VAR_0->bdrv || bdrv_is_read_only(VAR_0->bdrv)) {",
"return;",
"}",
"assert(!(VAR_2 % BDRV_SECTOR_SIZE));",
"start = VAR_1 / BDRV_SECTOR_SIZE;",
"end = (VAR_1 + VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
]
] |
14,428 | static ssize_t test_block_read_func(QCryptoBlock *block,
size_t offset,
uint8_t *buf,
size_t buflen,
Error **errp,
void *opaque)
{
... | false | qemu | 375092332eeaa6e47561ce47fd36144cdaf964d0 | static ssize_t test_block_read_func(QCryptoBlock *block,
size_t offset,
uint8_t *buf,
size_t buflen,
Error **errp,
void *opaque)
{
... | {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(QCryptoBlock *block,
size_t offset,
uint8_t *buf,
size_t buflen,
Error **errp,
void *opaque)
{
Buffer *head... | [
"static ssize_t FUNC_0(QCryptoBlock *block,\nsize_t offset,\nuint8_t *buf,\nsize_t buflen,\nError **errp,\nvoid *opaque)\n{",
"Buffer *header = opaque;",
"g_assert_cmpint(offset + buflen, <=, header->capacity);",
"memcpy(buf, header->buffer + offset, buflen);",
"return buflen;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
19
],
[
23
],
[
27
],
[
29
]
] |
14,430 | static void decode_micromips32_opc (CPUMIPSState *env, DisasContext *ctx,
uint16_t insn_hw1)
{
int32_t offset;
uint16_t insn;
int rt, rs, rd, rr;
int16_t imm;
uint32_t op, minor, mips32_op;
uint32_t cond, fmt, cc;
insn = cpu_lduw_code(env, ctx->... | false | qemu | 7f6613cedc59fa849105668ae971dc31004bca1c | static void decode_micromips32_opc (CPUMIPSState *env, DisasContext *ctx,
uint16_t insn_hw1)
{
int32_t offset;
uint16_t insn;
int rt, rs, rd, rr;
int16_t imm;
uint32_t op, minor, mips32_op;
uint32_t cond, fmt, cc;
insn = cpu_lduw_code(env, ctx->... | {
"code": [],
"line_no": []
} | static void FUNC_0 (CPUMIPSState *VAR_0, DisasContext *VAR_1,
uint16_t VAR_2)
{
int32_t VAR_8;
uint16_t insn;
int VAR_3, VAR_4, VAR_5, VAR_6;
int16_t imm;
uint32_t op, minor, mips32_op;
uint32_t cond, fmt, cc;
insn = cpu_lduw_code(VAR_0, VAR_1->... | [
"static void FUNC_0 (CPUMIPSState *VAR_0, DisasContext *VAR_1,\nuint16_t VAR_2)\n{",
"int32_t VAR_8;",
"uint16_t insn;",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"int16_t imm;",
"uint32_t op, minor, mips32_op;",
"uint32_t cond, fmt, cc;",
"insn = cpu_lduw_code(VAR_0, VAR_1->pc + 2);",
"VAR_1->opcode = (VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49,... |
14,431 | static void test_qga_guest_exec(gconstpointer fix)
{
const TestFixture *fixture = fix;
QDict *ret, *val;
const gchar *out;
guchar *decoded;
int64_t pid, now, exitcode;
gsize len;
bool exited;
/* exec 'echo foo bar' */
ret = qmp_fd(fixture->fd, "{'execute': 'guest-exec', '... | false | qemu | 1792d7d0a2dc18496e8fc52906163f9f73f3d931 | static void test_qga_guest_exec(gconstpointer fix)
{
const TestFixture *fixture = fix;
QDict *ret, *val;
const gchar *out;
guchar *decoded;
int64_t pid, now, exitcode;
gsize len;
bool exited;
ret = qmp_fd(fixture->fd, "{'execute': 'guest-exec', 'arguments': {"
... | {
"code": [],
"line_no": []
} | static void FUNC_0(gconstpointer VAR_0)
{
const TestFixture *VAR_1 = VAR_0;
QDict *ret, *val;
const gchar *VAR_2;
guchar *decoded;
int64_t pid, now, exitcode;
gsize len;
bool exited;
ret = qmp_fd(VAR_1->fd, "{'execute': 'guest-exec', 'arguments': {"
" '... | [
"static void FUNC_0(gconstpointer VAR_0)\n{",
"const TestFixture *VAR_1 = VAR_0;",
"QDict *ret, *val;",
"const gchar *VAR_2;",
"guchar *decoded;",
"int64_t pid, now, exitcode;",
"gsize len;",
"bool exited;",
"ret = qmp_fd(VAR_1->fd, \"{'execute': 'guest-exec', 'arguments': {\"",
"\" 'path': '/bin/... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
45
],
[
47
],
[
49
],
[... |
14,432 | static void vtd_do_iommu_translate(VTDAddressSpace *vtd_as, uint8_t bus_num,
uint8_t devfn, hwaddr addr, bool is_write,
IOMMUTLBEntry *entry)
{
IntelIOMMUState *s = vtd_as->iommu_state;
VTDContextEntry ce;
VTDContextCacheEntry *cc_e... | false | qemu | 7df953bd456da45f761064974820ab5c3fd7b2aa | static void vtd_do_iommu_translate(VTDAddressSpace *vtd_as, uint8_t bus_num,
uint8_t devfn, hwaddr addr, bool is_write,
IOMMUTLBEntry *entry)
{
IntelIOMMUState *s = vtd_as->iommu_state;
VTDContextEntry ce;
VTDContextCacheEntry *cc_e... | {
"code": [],
"line_no": []
} | static void FUNC_0(VTDAddressSpace *VAR_0, uint8_t VAR_1,
uint8_t VAR_2, hwaddr VAR_3, bool VAR_4,
IOMMUTLBEntry *VAR_5)
{
IntelIOMMUState *s = VAR_0->iommu_state;
VTDContextEntry ce;
VTDContextCacheEntry *cc_entry = &VAR_0->context... | [
"static void FUNC_0(VTDAddressSpace *VAR_0, uint8_t VAR_1,\nuint8_t VAR_2, hwaddr VAR_3, bool VAR_4,\nIOMMUTLBEntry *VAR_5)\n{",
"IntelIOMMUState *s = VAR_0->iommu_state;",
"VTDContextEntry ce;",
"VTDContextCacheEntry *cc_entry = &VAR_0->context_cache_entry;",
"uint64_t slpte;",
"uint32_t level;",
"uint... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
49,
51
],
[
53
],
[
55
],
[
57
],
[... |
14,433 | static void single_quote_string(void)
{
int i;
struct {
const char *encoded;
const char *decoded;
} test_cases[] = {
{ "'hello world'", "hello world" },
{ "'the quick brown fox \\' jumped over the fence'",
"the quick brown fox ' jumped over the fence" },
... | false | qemu | 363e13f86eb60bce1e112a35a4c107505a69c9fe | static void single_quote_string(void)
{
int i;
struct {
const char *encoded;
const char *decoded;
} test_cases[] = {
{ "'hello world'", "hello world" },
{ "'the quick brown fox \\' jumped over the fence'",
"the quick brown fox ' jumped over the fence" },
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
int VAR_0;
struct {
const char *encoded;
const char *decoded;
} VAR_1[] = {
{ "'hello world'", "hello world" },
{ "'the quick brown fox \\' jumped over the fence'",
"the quick brown fox ' jumped over the fence" },
{}
... | [
"static void FUNC_0(void)\n{",
"int VAR_0;",
"struct {",
"const char *encoded;",
"const char *decoded;",
"} VAR_1[] = {",
"{ \"'hello world'\", \"hello world\" },",
"{ \"'the quick brown fox \\\\' jumped over the fence'\",",
"\"the quick brown fox ' jumped over the fence\" },",
"{}",
"};",
"fo... | [
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
],
[
45
],
[
47
],
[
51
... |
14,434 | static int alloc_refcount_block(BlockDriverState *bs,
int64_t cluster_index, uint16_t **refcount_block)
{
BDRVQcowState *s = bs->opaque;
unsigned int refcount_table_index;
int ret;
BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_ALLOC);
/* Find the refcount block for the given cluster */
... | false | qemu | 2795ecf681107d55e4113592b3045ece5f6e7b3b | static int alloc_refcount_block(BlockDriverState *bs,
int64_t cluster_index, uint16_t **refcount_block)
{
BDRVQcowState *s = bs->opaque;
unsigned int refcount_table_index;
int ret;
BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_ALLOC);
refcount_table_index = cluster_index >> (s->cluster... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0,
int64_t VAR_1, uint16_t **VAR_2)
{
BDRVQcowState *s = VAR_0->opaque;
unsigned int VAR_3;
int VAR_4;
BLKDBG_EVENT(VAR_0->file, BLKDBG_REFBLOCK_ALLOC);
VAR_3 = VAR_1 >> (s->cluster_bits - REFCOUNT_SHIFT);
if (VAR_3 < s->refcount_ta... | [
"static int FUNC_0(BlockDriverState *VAR_0,\nint64_t VAR_1, uint16_t **VAR_2)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"unsigned int VAR_3;",
"int VAR_4;",
"BLKDBG_EVENT(VAR_0->file, BLKDBG_REFBLOCK_ALLOC);",
"VAR_3 = VAR_1 >> (s->cluster_bits - REFCOUNT_SHIFT);",
"if (VAR_3 < s->refcount_table_size) {... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
25
],
[
29,
31
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
93
],
[
99
],
[
105
],
[
107
],
[
109
],
[
111
],... |
14,435 | static always_inline void gen_qemu_stg (TCGv t0, TCGv t1, int flags)
{
TCGv tmp = tcg_temp_new(TCG_TYPE_I64);
tcg_gen_helper_1_1(helper_g_to_memory, tmp, t0);
tcg_gen_qemu_st64(tmp, t1, flags);
tcg_temp_free(tmp);
}
| false | qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | static always_inline void gen_qemu_stg (TCGv t0, TCGv t1, int flags)
{
TCGv tmp = tcg_temp_new(TCG_TYPE_I64);
tcg_gen_helper_1_1(helper_g_to_memory, tmp, t0);
tcg_gen_qemu_st64(tmp, t1, flags);
tcg_temp_free(tmp);
}
| {
"code": [],
"line_no": []
} | static always_inline void FUNC_0 (TCGv t0, TCGv t1, int flags)
{
TCGv tmp = tcg_temp_new(TCG_TYPE_I64);
tcg_gen_helper_1_1(helper_g_to_memory, tmp, t0);
tcg_gen_qemu_st64(tmp, t1, flags);
tcg_temp_free(tmp);
}
| [
"static always_inline void FUNC_0 (TCGv t0, TCGv t1, int flags)\n{",
"TCGv tmp = tcg_temp_new(TCG_TYPE_I64);",
"tcg_gen_helper_1_1(helper_g_to_memory, tmp, t0);",
"tcg_gen_qemu_st64(tmp, t1, flags);",
"tcg_temp_free(tmp);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
14,436 | static void test_qemu_strtosz_erange(void)
{
const char *str = "10E";
char *endptr = NULL;
int64_t res;
res = qemu_strtosz(str, &endptr);
g_assert_cmpint(res, ==, -ERANGE);
g_assert(endptr == str + 3);
}
| false | qemu | 0b742797aaada3a2e243175a69d542d2ed997aac | static void test_qemu_strtosz_erange(void)
{
const char *str = "10E";
char *endptr = NULL;
int64_t res;
res = qemu_strtosz(str, &endptr);
g_assert_cmpint(res, ==, -ERANGE);
g_assert(endptr == str + 3);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
const char *VAR_0 = "10E";
char *VAR_1 = NULL;
int64_t res;
res = qemu_strtosz(VAR_0, &VAR_1);
g_assert_cmpint(res, ==, -ERANGE);
g_assert(VAR_1 == VAR_0 + 3);
}
| [
"static void FUNC_0(void)\n{",
"const char *VAR_0 = \"10E\";",
"char *VAR_1 = NULL;",
"int64_t res;",
"res = qemu_strtosz(VAR_0, &VAR_1);",
"g_assert_cmpint(res, ==, -ERANGE);",
"g_assert(VAR_1 == VAR_0 + 3);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
14,437 | static uint32_t scsi_init_iovec(SCSIDiskReq *r)
{
r->iov.iov_len = MIN(r->sector_count * 512, SCSI_DMA_BUF_SIZE);
qemu_iovec_init_external(&r->qiov, &r->iov, 1);
return r->qiov.size / 512;
}
| false | qemu | 7285477ab11831b1cf56e45878a89170dd06d9b9 | static uint32_t scsi_init_iovec(SCSIDiskReq *r)
{
r->iov.iov_len = MIN(r->sector_count * 512, SCSI_DMA_BUF_SIZE);
qemu_iovec_init_external(&r->qiov, &r->iov, 1);
return r->qiov.size / 512;
}
| {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(SCSIDiskReq *r)
{
r->iov.iov_len = MIN(r->sector_count * 512, SCSI_DMA_BUF_SIZE);
qemu_iovec_init_external(&r->qiov, &r->iov, 1);
return r->qiov.size / 512;
}
| [
"static uint32_t FUNC_0(SCSIDiskReq *r)\n{",
"r->iov.iov_len = MIN(r->sector_count * 512, SCSI_DMA_BUF_SIZE);",
"qemu_iovec_init_external(&r->qiov, &r->iov, 1);",
"return r->qiov.size / 512;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
14,438 | static int read_dct_coeffs(BitstreamContext *bc, int32_t block[64],
const uint8_t *scan,
const int32_t quant_matrices[16][64], int q)
{
int coef_list[128];
int mode_list[128];
int i, t, bits, ccoef, mode;
int list_start = 64, list_end = 64, li... | false | FFmpeg | fd92dafaff8844b5fedf94679b93d953939a7f7b | static int read_dct_coeffs(BitstreamContext *bc, int32_t block[64],
const uint8_t *scan,
const int32_t quant_matrices[16][64], int q)
{
int coef_list[128];
int mode_list[128];
int i, t, bits, ccoef, mode;
int list_start = 64, list_end = 64, li... | {
"code": [],
"line_no": []
} | static int FUNC_0(BitstreamContext *VAR_0, int32_t VAR_1[64],
const uint8_t *VAR_2,
const int32_t VAR_3[16][64], int VAR_4)
{
int VAR_5[128];
int VAR_6[128];
int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;
int VAR_12 = 64, VAR_13 = 64, VAR_14;
i... | [
"static int FUNC_0(BitstreamContext *VAR_0, int32_t VAR_1[64],\nconst uint8_t *VAR_2,\nconst int32_t VAR_3[16][64], int VAR_4)\n{",
"int VAR_5[128];",
"int VAR_6[128];",
"int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;",
"int VAR_12 = 64, VAR_13 = 64, VAR_14;",
"int VAR_15 = 0;",
"int VAR_16[64];",
"int VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
... |
14,439 | bool qemu_co_queue_next(CoQueue *queue)
{
Coroutine *next;
next = QTAILQ_FIRST(&queue->entries);
if (next) {
QTAILQ_REMOVE(&queue->entries, next, co_queue_next);
QTAILQ_INSERT_TAIL(&unlock_bh_queue, next, co_queue_next);
trace_qemu_co_queue_next(next);
qemu_bh_sched... | false | qemu | 28f082469650a0f4c0e37b4ccd6f9514b1a0698d | bool qemu_co_queue_next(CoQueue *queue)
{
Coroutine *next;
next = QTAILQ_FIRST(&queue->entries);
if (next) {
QTAILQ_REMOVE(&queue->entries, next, co_queue_next);
QTAILQ_INSERT_TAIL(&unlock_bh_queue, next, co_queue_next);
trace_qemu_co_queue_next(next);
qemu_bh_sched... | {
"code": [],
"line_no": []
} | bool FUNC_0(CoQueue *queue)
{
Coroutine *next;
next = QTAILQ_FIRST(&queue->entries);
if (next) {
QTAILQ_REMOVE(&queue->entries, next, co_queue_next);
QTAILQ_INSERT_TAIL(&unlock_bh_queue, next, co_queue_next);
trace_qemu_co_queue_next(next);
qemu_bh_schedule(unlock_b... | [
"bool FUNC_0(CoQueue *queue)\n{",
"Coroutine *next;",
"next = QTAILQ_FIRST(&queue->entries);",
"if (next) {",
"QTAILQ_REMOVE(&queue->entries, next, co_queue_next);",
"QTAILQ_INSERT_TAIL(&unlock_bh_queue, next, co_queue_next);",
"trace_qemu_co_queue_next(next);",
"qemu_bh_schedule(unlock_bh);",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
]
] |
14,440 | static int nut_write_packet(AVFormatContext *s, int stream_index,
const uint8_t *buf, int size, int64_t pts)
{
NUTContext *nut = s->priv_data;
StreamContext *stream= &nut->stream[stream_index];
ByteIOContext *bc = &s->pb;
int key_frame = 0, full_pts=0;
AVCodecContext *enc;
int64_... | false | FFmpeg | ee9f36a88eb3e2706ea659acb0ca80c414fa5d8a | static int nut_write_packet(AVFormatContext *s, int stream_index,
const uint8_t *buf, int size, int64_t pts)
{
NUTContext *nut = s->priv_data;
StreamContext *stream= &nut->stream[stream_index];
ByteIOContext *bc = &s->pb;
int key_frame = 0, full_pts=0;
AVCodecContext *enc;
int64_... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,
const uint8_t *VAR_2, int VAR_3, int64_t VAR_4)
{
NUTContext *nut = VAR_0->priv_data;
StreamContext *stream= &nut->stream[VAR_1];
ByteIOContext *bc = &VAR_0->pb;
int VAR_5 = 0, VAR_6=0;
AVCodecContext *enc;
int64_t lsb_pts, del... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,\nconst uint8_t *VAR_2, int VAR_3, int64_t VAR_4)\n{",
"NUTContext *nut = VAR_0->priv_data;",
"StreamContext *stream= &nut->stream[VAR_1];",
"ByteIOContext *bc = &VAR_0->pb;",
"int VAR_5 = 0, VAR_6=0;",
"AVCodecContext *enc;",
"int64_t lsb_pts, delta_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45,
47
],
[
49
],
[
51,
53
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.