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 |
|---|---|---|---|---|---|---|---|---|---|---|
8,474 | void HELPER(set_cp_reg)(CPUARMState *env, void *rip, uint32_t value)
{
const ARMCPRegInfo *ri = rip;
ri->writefn(env, ri, value);
}
| true | qemu | 8d04fb55dec381bc5105cb47f29d918e579e8cbd | void HELPER(set_cp_reg)(CPUARMState *env, void *rip, uint32_t value)
{
const ARMCPRegInfo *ri = rip;
ri->writefn(env, ri, value);
}
| {
"code": [
" ri->writefn(env, ri, value);",
" ri->writefn(env, ri, value);"
],
"line_no": [
9,
9
]
} | void FUNC_0(set_cp_reg)(CPUARMState *env, void *rip, uint32_t value)
{
const ARMCPRegInfo *VAR_0 = rip;
VAR_0->writefn(env, VAR_0, value);
}
| [
"void FUNC_0(set_cp_reg)(CPUARMState *env, void *rip, uint32_t value)\n{",
"const ARMCPRegInfo *VAR_0 = rip;",
"VAR_0->writefn(env, VAR_0, value);",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
8,475 | static int libspeex_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
LibSpeexContext *s = avctx->priv_data;
int16_t *output;
int ret, consumed = 0;
/* get outp... | false | FFmpeg | f3c9d66bafde9b8586bd63dd3307daa87352af75 | static int libspeex_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
LibSpeexContext *s = avctx->priv_data;
int16_t *output;
int ret, consumed = 0;
s->fr... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
uint8_t *buf = VAR_3->VAR_1;
int VAR_4 = VAR_3->size;
LibSpeexContext *s = VAR_0->priv_data;
int16_t *output;
int VAR_5, VAR_6 = 0;
s->frame.nb_samples = s->frame... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"uint8_t *buf = VAR_3->VAR_1;",
"int VAR_4 = VAR_3->size;",
"LibSpeexContext *s = VAR_0->priv_data;",
"int16_t *output;",
"int VAR_5, VAR_6 = 0;",
"s->frame.nb_samples = s->frame_size;",
"if ((VAR_5 = ff_get_buff... | [
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
43,
45
],
[
49
],
[
51
],
[
53
],
[
55
],
[
59
],
[
61
... |
8,476 | static void vmport_class_initfn(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = vmport_realizefn;
dc->no_user = 1;
}
| true | qemu | efec3dd631d94160288392721a5f9c39e50fb2bc | static void vmport_class_initfn(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = vmport_realizefn;
dc->no_user = 1;
}
| {
"code": [
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;"... | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
dc->realize = vmport_realizefn;
dc->no_user = 1;
}
| [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"dc->realize = vmport_realizefn;",
"dc->no_user = 1;",
"}"
] | [
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
]
] |
8,477 | void qemu_file_skip(QEMUFile *f, int size)
{
if (f->buf_index + size <= f->buf_size) {
f->buf_index += size;
}
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | void qemu_file_skip(QEMUFile *f, int size)
{
if (f->buf_index + size <= f->buf_size) {
f->buf_index += size;
}
}
| {
"code": [],
"line_no": []
} | void FUNC_0(QEMUFile *VAR_0, int VAR_1)
{
if (VAR_0->buf_index + VAR_1 <= VAR_0->buf_size) {
VAR_0->buf_index += VAR_1;
}
}
| [
"void FUNC_0(QEMUFile *VAR_0, int VAR_1)\n{",
"if (VAR_0->buf_index + VAR_1 <= VAR_0->buf_size) {",
"VAR_0->buf_index += VAR_1;",
"}",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
8,478 | static int doTest(uint8_t *ref[4], int refStride[4], int w, int h,
enum PixelFormat srcFormat, enum PixelFormat dstFormat,
int srcW, int srcH, int dstW, int dstH, int flags)
{
uint8_t *src[4] = {0};
uint8_t *dst[4] = {0};
uint8_t *out[4] = {0};
int srcStride[4]... | true | FFmpeg | b6f1e7ec44dfaa7c8a49c14221b977d4052adb4d | static int doTest(uint8_t *ref[4], int refStride[4], int w, int h,
enum PixelFormat srcFormat, enum PixelFormat dstFormat,
int srcW, int srcH, int dstW, int dstH, int flags)
{
uint8_t *src[4] = {0};
uint8_t *dst[4] = {0};
uint8_t *out[4] = {0};
int srcStride[4]... | {
"code": [
" printf(\" %s %dx%d -> %s %4dx%4d flags=%2d SSD=%5\"PRId64\",%5\"PRId64\",%5\"PRId64\",%5\"PRId64\"\\n\",",
" av_pix_fmt_descriptors[srcFormat].name, srcW, srcH,",
" av_pix_fmt_descriptors[dstFormat].name, dstW, dstH,",
" flags, ssdY, ssdU, ssdV, ssdA);",
... | static int FUNC_0(uint8_t *VAR_0[4], int VAR_1[4], int VAR_2, int VAR_3,
enum PixelFormat VAR_4, enum PixelFormat VAR_5,
int VAR_6, int VAR_7, int VAR_8, int VAR_9, int VAR_10)
{
uint8_t *src[4] = {0};
uint8_t *dst[4] = {0};
uint8_t *out[4] = {0};
int VAR_11[4]... | [
"static int FUNC_0(uint8_t *VAR_0[4], int VAR_1[4], int VAR_2, int VAR_3,\nenum PixelFormat VAR_4, enum PixelFormat VAR_5,\nint VAR_6, int VAR_7, int VAR_8, int VAR_9, int VAR_10)\n{",
"uint8_t *src[4] = {0};",
"uint8_t *dst[4] = {0};",
"uint8_t *out[4] = {0};",
"int VAR_11[4], VAR_12[4];",
"int VAR_13;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
29
],
[
31
],
[
35,
37
],
[
39,
41
],
[
43,
45
],
[
49,
51
],
[
53,
55
... |
8,479 | static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
{
mp_image_t *dmpi;
// hope we'll get DR buffer:
dmpi=ff_vf_get_image(vf->next, IMGFMT_YV12,
MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE |
((vf->priv->scaleh == 1) ... | true | FFmpeg | 2f11aa141a01f97c5d2a015bd9dbdb27314b79c4 | static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
{
mp_image_t *dmpi;
dmpi=ff_vf_get_image(vf->next, IMGFMT_YV12,
MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE |
((vf->priv->scaleh == 1) ? MP_IMGFLAG_READABLE : 0),
... | {
"code": [
"static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)",
" mp_image_t *dmpi;",
" dmpi=ff_vf_get_image(vf->next, IMGFMT_YV12,",
" MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE |",
" ((vf->priv->scaleh == 1) ... | static int FUNC_0(struct vf_instance *VAR_0, mp_image_t *VAR_1, double VAR_2)
{
mp_image_t *dmpi;
dmpi=ff_vf_get_image(VAR_0->next, IMGFMT_YV12,
MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE |
((VAR_0->priv->scaleh == 1) ? MP_IMGFLAG_READA... | [
"static int FUNC_0(struct vf_instance *VAR_0, mp_image_t *VAR_1, double VAR_2)\n{",
"mp_image_t *dmpi;",
"dmpi=ff_vf_get_image(VAR_0->next, IMGFMT_YV12,\nMP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE |\n((VAR_0->priv->scaleh == 1) ? MP_IMGFLAG_READABLE : 0),\nVAR_1->w * VAR_0->priv->scalew,\nVAR_1->h / VAR_0->priv-... | [
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
11,
13,
15,
17,
19
],
[
23,
25
],
[
29
],
[
31
]
] |
8,480 | static void runstate_init(void)
{
const RunStateTransition *p;
memset(&runstate_valid_transitions, 0, sizeof(runstate_valid_transitions));
for (p = &runstate_transitions_def[0]; p->from != RUN_STATE_MAX; p++) {
runstate_valid_transitions[p->from][p->to] = true;
}
}
| true | qemu | 74892d2468b9f0c56b915ce94848d6f7fac39740 | static void runstate_init(void)
{
const RunStateTransition *p;
memset(&runstate_valid_transitions, 0, sizeof(runstate_valid_transitions));
for (p = &runstate_transitions_def[0]; p->from != RUN_STATE_MAX; p++) {
runstate_valid_transitions[p->from][p->to] = true;
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
const RunStateTransition *VAR_0;
memset(&runstate_valid_transitions, 0, sizeof(runstate_valid_transitions));
for (VAR_0 = &runstate_transitions_def[0]; VAR_0->from != RUN_STATE_MAX; VAR_0++) {
runstate_valid_transitions[VAR_0->from][VAR_0->to] = true;
}
}
| [
"static void FUNC_0(void)\n{",
"const RunStateTransition *VAR_0;",
"memset(&runstate_valid_transitions, 0, sizeof(runstate_valid_transitions));",
"for (VAR_0 = &runstate_transitions_def[0]; VAR_0->from != RUN_STATE_MAX; VAR_0++) {",
"runstate_valid_transitions[VAR_0->from][VAR_0->to] = true;",
"}",
"}"
... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
8,481 | static void decode_vui(HEVCContext *s, HEVCSPS *sps)
{
VUI *vui = &sps->vui;
GetBitContext *gb = &s->HEVClc->gb;
GetBitContext backup;
int sar_present, alt = 0;
av_log(s->avctx, AV_LOG_DEBUG, "Decoding VUI\n");
sar_present = get_bits1(gb);
if (sar_present) {
uin... | false | FFmpeg | cbb277988afc7032e632393e2c96a70d4389ac4f | static void decode_vui(HEVCContext *s, HEVCSPS *sps)
{
VUI *vui = &sps->vui;
GetBitContext *gb = &s->HEVClc->gb;
GetBitContext backup;
int sar_present, alt = 0;
av_log(s->avctx, AV_LOG_DEBUG, "Decoding VUI\n");
sar_present = get_bits1(gb);
if (sar_present) {
uin... | {
"code": [],
"line_no": []
} | static void FUNC_0(HEVCContext *VAR_0, HEVCSPS *VAR_1)
{
VUI *vui = &VAR_1->vui;
GetBitContext *gb = &VAR_0->HEVClc->gb;
GetBitContext backup;
int VAR_2, VAR_3 = 0;
av_log(VAR_0->avctx, AV_LOG_DEBUG, "Decoding VUI\n");
VAR_2 = get_bits1(gb);
if (VAR_2) {
uint8_t... | [
"static void FUNC_0(HEVCContext *VAR_0, HEVCSPS *VAR_1)\n{",
"VUI *vui = &VAR_1->vui;",
"GetBitContext *gb = &VAR_0->HEVClc->gb;",
"GetBitContext backup;",
"int VAR_2, VAR_3 = 0;",
"av_log(VAR_0->avctx, AV_LOG_DEBUG, \"Decoding VUI\\n\");",
"VAR_2 = get_bits1(gb);",
"if (VAR_2) {",
"uint8_t... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
45
],
[
47,
49
],
[... |
8,483 | void ff_vc1_interp_mc(VC1Context *v)
{
MpegEncContext *s = &v->s;
H264ChromaContext *h264chroma = &v->h264chroma;
uint8_t *srcY, *srcU, *srcV;
int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y;
int off, off_uv;
int v_edge_pos = s->v_edge_pos >> v->field_mode;
int use_ic = v... | false | FFmpeg | 28d82b7675bea76a1349070a3cdd737d964d4775 | void ff_vc1_interp_mc(VC1Context *v)
{
MpegEncContext *s = &v->s;
H264ChromaContext *h264chroma = &v->h264chroma;
uint8_t *srcY, *srcU, *srcV;
int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y;
int off, off_uv;
int v_edge_pos = s->v_edge_pos >> v->field_mode;
int use_ic = v... | {
"code": [],
"line_no": []
} | void FUNC_0(VC1Context *VAR_0)
{
MpegEncContext *s = &VAR_0->s;
H264ChromaContext *h264chroma = &VAR_0->h264chroma;
uint8_t *srcY, *srcU, *srcV;
int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;
int VAR_10, VAR_11;
int VAR_12 = s->VAR_12 >> VAR_0->field_mode;
int VAR... | [
"void FUNC_0(VC1Context *VAR_0)\n{",
"MpegEncContext *s = &VAR_0->s;",
"H264ChromaContext *h264chroma = &VAR_0->h264chroma;",
"uint8_t *srcY, *srcU, *srcV;",
"int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;",
"int VAR_10, VAR_11;",
"int VAR_12 = s->VAR_12 >> VAR_0->field_mode;",
"in... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
43
],
[
45
],
[
47
... |
8,484 | static av_cold int msrle_decode_init(AVCodecContext *avctx)
{
MsrleContext *s = avctx->priv_data;
s->avctx = avctx;
switch (avctx->bits_per_coded_sample) {
case 4:
case 8:
avctx->pix_fmt = AV_PIX_FMT_PAL8;
break;
case 24:
avctx->pix_fmt = AV_PIX_FMT_BGR24;
... | false | FFmpeg | 3b199d29cd597a3518136d78860e172060b9e83d | static av_cold int msrle_decode_init(AVCodecContext *avctx)
{
MsrleContext *s = avctx->priv_data;
s->avctx = avctx;
switch (avctx->bits_per_coded_sample) {
case 4:
case 8:
avctx->pix_fmt = AV_PIX_FMT_PAL8;
break;
case 24:
avctx->pix_fmt = AV_PIX_FMT_BGR24;
... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
MsrleContext *s = avctx->priv_data;
s->avctx = avctx;
switch (avctx->bits_per_coded_sample) {
case 4:
case 8:
avctx->pix_fmt = AV_PIX_FMT_PAL8;
break;
case 24:
avctx->pix_fmt = AV_PIX_FMT_BGR24;
bre... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"MsrleContext *s = avctx->priv_data;",
"s->avctx = avctx;",
"switch (avctx->bits_per_coded_sample) {",
"case 4:\ncase 8:\navctx->pix_fmt = AV_PIX_FMT_PAL8;",
"break;",
"case 24:\navctx->pix_fmt = AV_PIX_FMT_BGR24;",
"break;",
"default:\nav_log(a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15,
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
39
],
[
43
],
[
45
]
] |
8,485 | static int mm_decode_intra(MmContext * s, int half_horiz, int half_vert)
{
int x = 0, y = 0;
while (bytestream2_get_bytes_left(&s->gb) > 0) {
int run_length, color;
if (y >= s->avctx->height)
return 0;
color = bytestream2_get_byte(&s->gb);
if (color & 0x... | false | FFmpeg | 8b0e96e1f21b761ca15dbb470cd619a1ebf86c3e | static int mm_decode_intra(MmContext * s, int half_horiz, int half_vert)
{
int x = 0, y = 0;
while (bytestream2_get_bytes_left(&s->gb) > 0) {
int run_length, color;
if (y >= s->avctx->height)
return 0;
color = bytestream2_get_byte(&s->gb);
if (color & 0x... | {
"code": [],
"line_no": []
} | static int FUNC_0(MmContext * VAR_0, int VAR_1, int VAR_2)
{
int VAR_3 = 0, VAR_4 = 0;
while (bytestream2_get_bytes_left(&VAR_0->gb) > 0) {
int VAR_5, VAR_6;
if (VAR_4 >= VAR_0->avctx->height)
return 0;
VAR_6 = bytestream2_get_byte(&VAR_0->gb);
if (VAR_6... | [
"static int FUNC_0(MmContext * VAR_0, int VAR_1, int VAR_2)\n{",
"int VAR_3 = 0, VAR_4 = 0;",
"while (bytestream2_get_bytes_left(&VAR_0->gb) > 0) {",
"int VAR_5, VAR_6;",
"if (VAR_4 >= VAR_0->avctx->height)\nreturn 0;",
"VAR_6 = bytestream2_get_byte(&VAR_0->gb);",
"if (VAR_6 & 0x80) {",
"VAR_5 = 1;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
43,
45
],
[
49
],
[
51
],
[
53,
55
],
[
57... |
8,486 | 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;
UID op;
uint64_t footer_partition;
uint32_t nb_essence_containers;
int err;
if (mxf->partitions_count+1 >= UINT_MAX / siz... | false | FFmpeg | f5fbbbc022f723d3ccf99afd5d658a977b51c08a | 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;
UID op;
uint64_t footer_partition;
uint32_t nb_essence_containers;
int err;
if (mxf->partitions_count+1 >= UINT_MAX / siz... | {
"code": [],
"line_no": []
} | 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;
UID op;
uint64_t footer_partition;
uint32_t nb_essence_containers;
int VAR_6;
if (mxf->partitions_count+1 >= UINT_MAX / sizeof(*mxf... | [
"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;",
"UID op;",
"uint64_t footer_partition;",
"uint32_t nb_essence_containers;",
"int VAR_6;",
"if (mxf->partitions_count+1 >= UINT_MAX / sizeof(*... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
43,
45,
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
8,488 | char *av_base64_encode(uint8_t * src, int len)
{
static const char b64[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
char *ret, *dst;
unsigned i_bits = 0;
int i_shift = 0;
int bytes_remaining = len;
if (len < UINT_MAX / 4) {
ret = dst = av_mal... | false | FFmpeg | bd03c380ce67cffaaf3c456407cc98e02917ebf7 | char *av_base64_encode(uint8_t * src, int len)
{
static const char b64[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
char *ret, *dst;
unsigned i_bits = 0;
int i_shift = 0;
int bytes_remaining = len;
if (len < UINT_MAX / 4) {
ret = dst = av_mal... | {
"code": [],
"line_no": []
} | char *FUNC_0(uint8_t * VAR_0, int VAR_1)
{
static const char VAR_2[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
char *VAR_3, *VAR_4;
unsigned VAR_5 = 0;
int VAR_6 = 0;
int VAR_7 = VAR_1;
if (VAR_1 < UINT_MAX / 4) {
VAR_3 = VAR_4 = av_malloc(V... | [
"char *FUNC_0(uint8_t * VAR_0, int VAR_1)\n{",
"static const char VAR_2[] =\n\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";",
"char *VAR_3, *VAR_4;",
"unsigned VAR_5 = 0;",
"int VAR_6 = 0;",
"int VAR_7 = VAR_1;",
"if (VAR_1 < UINT_MAX / 4) {",
"VAR_3 = VAR_4 = av_malloc(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
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
8,489 | av_cold void ff_blockdsp_init_x86(BlockDSPContext *c,
AVCodecContext *avctx)
#else
av_cold void ff_blockdsp_init_x86(BlockDSPContext *c)
#endif /* FF_API_XVMC */
{
#if HAVE_INLINE_ASM
int cpu_flags = av_get_cpu_flags();
if (INLINE_MMX(cpu_flags)) {
c->clear_b... | false | FFmpeg | dcc39ee10e82833ce24aa57926c00ffeb1948198 | av_cold void ff_blockdsp_init_x86(BlockDSPContext *c,
AVCodecContext *avctx)
#else
av_cold void ff_blockdsp_init_x86(BlockDSPContext *c)
#endif
{
#if HAVE_INLINE_ASM
int cpu_flags = av_get_cpu_flags();
if (INLINE_MMX(cpu_flags)) {
c->clear_block = clear_blo... | {
"code": [],
"line_no": []
} | av_cold void ff_blockdsp_init_x86(BlockDSPContext *c,
AVCodecContext *avctx)
#else
av_cold void ff_blockdsp_init_x86(BlockDSPContext *c)
#endif
{
#if HAVE_INLINE_ASM
int cpu_flags = av_get_cpu_flags();
if (INLINE_MMX(cpu_flags)) {
c->clear_block = clear_blo... | [
"av_cold void ff_blockdsp_init_x86(BlockDSPContext *c,\nAVCodecContext *avctx)\n#else\nav_cold void ff_blockdsp_init_x86(BlockDSPContext *c)\n#endif\n{",
"#if HAVE_INLINE_ASM\nint cpu_flags = av_get_cpu_flags();",
"if (INLINE_MMX(cpu_flags)) {",
"c->clear_block = clear_block_mmx;",
"c->clear_blocks = clear... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13,
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31,
35,
37
],
[
39,
41,
45
],
[
47
],
[
49
],
[
51
],
[
53,
55
]
] |
8,490 | static int read_bfraction(VC1Context *v, GetBitContext* gb) {
v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1);
v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index];
return 0;
}
| false | FFmpeg | dcf5bfbdb6137ffdca66e0b7c2929ced42732951 | static int read_bfraction(VC1Context *v, GetBitContext* gb) {
v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1);
v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index];
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(VC1Context *VAR_0, GetBitContext* VAR_1) {
VAR_0->bfraction_lut_index = get_vlc2(VAR_1, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1);
VAR_0->bfraction = ff_vc1_bfraction_lut[VAR_0->bfraction_lut_index];
return 0;
}
| [
"static int FUNC_0(VC1Context *VAR_0, GetBitContext* VAR_1) {",
"VAR_0->bfraction_lut_index = get_vlc2(VAR_1, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1);",
"VAR_0->bfraction = ff_vc1_bfraction_lut[VAR_0->bfraction_lut_index];",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
]
] |
8,491 | AVStream *add_video_stream(AVFormatContext *oc, int codec_id)
{
AVCodec *codec;
AVCodecContext *c;
AVStream *st;
uint8_t *picture_buf;
int size;
st = av_new_stream(oc, 0);
if (!st) {
fprintf(stderr, "Could not alloc stream\n");
exit(1);
}
/* find t... | true | FFmpeg | e70fcf075b8f92c4e410b80c703fbdc1d531d42d | AVStream *add_video_stream(AVFormatContext *oc, int codec_id)
{
AVCodec *codec;
AVCodecContext *c;
AVStream *st;
uint8_t *picture_buf;
int size;
st = av_new_stream(oc, 0);
if (!st) {
fprintf(stderr, "Could not alloc stream\n");
exit(1);
}
cod... | {
"code": [
" AVCodec *codec;",
" codec = avcodec_find_encoder(codec_id);",
" if (!codec) {",
" fprintf(stderr, \"codec not found\\n\");",
" exit(1);",
" return st;",
" AVCodec *codec;",
" uint8_t *picture_buf;",
" int size;",
" codec = avc... | AVStream *FUNC_0(AVFormatContext *oc, int codec_id)
{
AVCodec *codec;
AVCodecContext *c;
AVStream *st;
uint8_t *picture_buf;
int VAR_0;
st = av_new_stream(oc, 0);
if (!st) {
fprintf(stderr, "Could not alloc stream\n");
exit(1);
}
codec = avco... | [
"AVStream *FUNC_0(AVFormatContext *oc, int codec_id)\n{",
"AVCodec *codec;",
"AVCodecContext *c;",
"AVStream *st;",
"uint8_t *picture_buf;",
"int VAR_0;",
"st = av_new_stream(oc, 0);",
"if (!st) {",
"fprintf(stderr, \"Could not alloc stream\\n\");",
"exit(1);",
"}",
"codec = avcodec_find_encod... | [
0,
1,
1,
0,
1,
1,
0,
0,
0,
1,
0,
1,
1,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
51
],
[
55
... |
8,492 | const uint8_t *get_submv_prob(uint32_t left, uint32_t top)
{
if (left == top)
return vp8_submv_prob[4 - !!left];
if (!top)
return vp8_submv_prob[2];
return vp8_submv_prob[1 - !!left];
}
| true | FFmpeg | ac4b32df71bd932838043a4838b86d11e169707f | const uint8_t *get_submv_prob(uint32_t left, uint32_t top)
{
if (left == top)
return vp8_submv_prob[4 - !!left];
if (!top)
return vp8_submv_prob[2];
return vp8_submv_prob[1 - !!left];
}
| {
"code": [
"const uint8_t *get_submv_prob(uint32_t left, uint32_t top)"
],
"line_no": [
1
]
} | const uint8_t *FUNC_0(uint32_t left, uint32_t top)
{
if (left == top)
return vp8_submv_prob[4 - !!left];
if (!top)
return vp8_submv_prob[2];
return vp8_submv_prob[1 - !!left];
}
| [
"const uint8_t *FUNC_0(uint32_t left, uint32_t top)\n{",
"if (left == top)\nreturn vp8_submv_prob[4 - !!left];",
"if (!top)\nreturn vp8_submv_prob[2];",
"return vp8_submv_prob[1 - !!left];",
"}"
] | [
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
],
[
15
]
] |
8,493 | static inline void cpu_handle_interrupt(CPUState *cpu,
TranslationBlock **last_tb)
{
CPUClass *cc = CPU_GET_CLASS(cpu);
int interrupt_request = cpu->interrupt_request;
if (unlikely(interrupt_request)) {
if (unlikely(cpu->singlestep_enabled & SSTEP_NOIR... | true | qemu | 027d9a7d2911e993cdcbd21c7c35d1dd058f05bb | static inline void cpu_handle_interrupt(CPUState *cpu,
TranslationBlock **last_tb)
{
CPUClass *cc = CPU_GET_CLASS(cpu);
int interrupt_request = cpu->interrupt_request;
if (unlikely(interrupt_request)) {
if (unlikely(cpu->singlestep_enabled & SSTEP_NOIR... | {
"code": [
" if (unlikely(cpu->exit_request || replay_has_interrupt())) {",
" cpu->exit_request = 0;"
],
"line_no": [
125,
127
]
} | static inline void FUNC_0(CPUState *VAR_0,
TranslationBlock **VAR_1)
{
CPUClass *cc = CPU_GET_CLASS(VAR_0);
int VAR_2 = VAR_0->VAR_2;
if (unlikely(VAR_2)) {
if (unlikely(VAR_0->singlestep_enabled & SSTEP_NOIRQ)) {
VAR_2 &= ~C... | [
"static inline void FUNC_0(CPUState *VAR_0,\nTranslationBlock **VAR_1)\n{",
"CPUClass *cc = CPU_GET_CLASS(VAR_0);",
"int VAR_2 = VAR_0->VAR_2;",
"if (unlikely(VAR_2)) {",
"if (unlikely(VAR_0->singlestep_enabled & SSTEP_NOIRQ)) {",
"VAR_2 &= ~CPU_INTERRUPT_SSTEP_MASK;",
"}",
"if (VAR_2 & CPU_INTERRUPT_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
8,494 | int qemu_get_byte(QEMUFile *f)
{
int result;
result = qemu_peek_byte(f, 0);
qemu_file_skip(f, 1);
return result;
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | int qemu_get_byte(QEMUFile *f)
{
int result;
result = qemu_peek_byte(f, 0);
qemu_file_skip(f, 1);
return result;
}
| {
"code": [],
"line_no": []
} | int FUNC_0(QEMUFile *VAR_0)
{
int VAR_1;
VAR_1 = qemu_peek_byte(VAR_0, 0);
qemu_file_skip(VAR_0, 1);
return VAR_1;
}
| [
"int FUNC_0(QEMUFile *VAR_0)\n{",
"int VAR_1;",
"VAR_1 = qemu_peek_byte(VAR_0, 0);",
"qemu_file_skip(VAR_0, 1);",
"return VAR_1;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
8,495 | bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr)
{
TranslationBlock *tb;
bool r = false;
tb_lock();
tb = tb_find_pc(retaddr);
if (tb) {
cpu_restore_state_from_tb(cpu, tb, retaddr);
if (tb->cflags & CF_NOCACHE) {
/* one-shot translation, invalidate it immediately *... | true | qemu | d8b2239bcd8872a5c5f7534d1658fc2365caab2d | bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr)
{
TranslationBlock *tb;
bool r = false;
tb_lock();
tb = tb_find_pc(retaddr);
if (tb) {
cpu_restore_state_from_tb(cpu, tb, retaddr);
if (tb->cflags & CF_NOCACHE) {
tb_phys_invalidate(tb, -1);
... | {
"code": [],
"line_no": []
} | bool FUNC_0(CPUState *cpu, uintptr_t retaddr)
{
TranslationBlock *tb;
bool r = false;
tb_lock();
tb = tb_find_pc(retaddr);
if (tb) {
cpu_restore_state_from_tb(cpu, tb, retaddr);
if (tb->cflags & CF_NOCACHE) {
tb_phys_invalidate(tb, -1);
tb_free(tb... | [
"bool FUNC_0(CPUState *cpu, uintptr_t retaddr)\n{",
"TranslationBlock *tb;",
"bool r = false;",
"tb_lock();",
"tb = tb_find_pc(retaddr);",
"if (tb) {",
"cpu_restore_state_from_tb(cpu, tb, retaddr);",
"if (tb->cflags & CF_NOCACHE) {",
"tb_phys_invalidate(tb, -1);",
"tb_free(tb);",
"r = true;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
11
],
[
12
],
[
13
],
[
14
]
] |
8,496 | pflash_t *pflash_cfi01_register(target_phys_addr_t base,
DeviceState *qdev, const char *name,
target_phys_addr_t size,
BlockDriverState *bs, uint32_t sector_len,
int nb_blocs, int width,
... | true | qemu | 262e1eaafabf32d33a9fa0b03b3c8ea426c5ae1b | pflash_t *pflash_cfi01_register(target_phys_addr_t base,
DeviceState *qdev, const char *name,
target_phys_addr_t size,
BlockDriverState *bs, uint32_t sector_len,
int nb_blocs, int width,
... | {
"code": [
" pfl->cfi_table[0x35] = '1';"
],
"line_no": [
265
]
} | pflash_t *FUNC_0(target_phys_addr_t base,
DeviceState *qdev, const char *name,
target_phys_addr_t size,
BlockDriverState *bs, uint32_t sector_len,
int nb_blocs, int width,
... | [
"pflash_t *FUNC_0(target_phys_addr_t base,\nDeviceState *qdev, const char *name,\ntarget_phys_addr_t size,\nBlockDriverState *bs, uint32_t sector_len,\nint nb_blocs, int width,\nuint16_t id0, uint16_t id1,\nuint16_t id2, uint16_t id3, int be)\n{",
"pflash_t *pfl;",
"target_phys_addr_t total_len;",
"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,
0... | [
[
1,
3,
5,
7,
9,
11,
13,
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
31,
33,
35,
37
],
[
39,
43
],
[
47,
49,
51
],
[
53
],
[
55
],
[
57
],
[
61
],
[
63
],
[
67
... |
8,497 | 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);
if... | true | qemu | 7f102ebeb5bad7b723a25557234b0feb493f6134 | 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);
if... | {
"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, VAR_4);
... | [
"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,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
... |
8,498 | static int writev_f(BlockBackend *blk, int argc, char **argv)
{
struct timeval t1, t2;
bool Cflag = false, qflag = false;
int flags = 0;
int c, cnt;
char *buf;
int64_t offset;
/* Some compilers get confused and warn if this is not initialized. */
int total = 0;
int nr_iov;... | true | qemu | 4ca1d3401b834662efddd12bd62ad80f5ef1ef05 | static int writev_f(BlockBackend *blk, int argc, char **argv)
{
struct timeval t1, t2;
bool Cflag = false, qflag = false;
int flags = 0;
int c, cnt;
char *buf;
int64_t offset;
int total = 0;
int nr_iov;
int pattern = 0xcd;
QEMUIOVector qiov;
while ((c = ge... | {
"code": [
" while ((c = getopt(argc, argv, \"CqP:\")) != -1) {"
],
"line_no": [
29
]
} | static int FUNC_0(BlockBackend *VAR_0, int VAR_1, char **VAR_2)
{
struct timeval VAR_3, VAR_4;
bool Cflag = false, qflag = false;
int VAR_5 = 0;
int VAR_6, VAR_7;
char *VAR_8;
int64_t offset;
int VAR_9 = 0;
int VAR_10;
int VAR_11 = 0xcd;
QEMUIOVector qiov;
... | [
"static int FUNC_0(BlockBackend *VAR_0, int VAR_1, char **VAR_2)\n{",
"struct timeval VAR_3, VAR_4;",
"bool Cflag = false, qflag = false;",
"int VAR_5 = 0;",
"int VAR_6, VAR_7;",
"char *VAR_8;",
"int64_t offset;",
"int VAR_9 = 0;",
"int VAR_10;",
"int VAR_11 = 0xcd;",
"QEMUIOVector qiov;",
"wh... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39,
41
],
[
43
],
[
45,
47
],
[... |
8,499 | libAVMemInputPin_Receive(libAVMemInputPin *this, IMediaSample *sample)
{
libAVPin *pin = (libAVPin *) ((uint8_t *) this - imemoffset);
enum dshowDeviceType devtype = pin->filter->type;
void *priv_data;
uint8_t *buf;
int buf_size;
int index;
int64_t curtime;
dshowdebug("libAVMe... | true | FFmpeg | 773eb74babe07bc5c97c32aa564efc40e2d4b00c | libAVMemInputPin_Receive(libAVMemInputPin *this, IMediaSample *sample)
{
libAVPin *pin = (libAVPin *) ((uint8_t *) this - imemoffset);
enum dshowDeviceType devtype = pin->filter->type;
void *priv_data;
uint8_t *buf;
int buf_size;
int index;
int64_t curtime;
dshowdebug("libAVMe... | {
"code": [
" pin->filter->callback(priv_data, index, buf, buf_size, curtime);"
],
"line_no": [
61
]
} | FUNC_0(libAVMemInputPin *VAR_0, IMediaSample *VAR_1)
{
libAVPin *pin = (libAVPin *) ((uint8_t *) VAR_0 - imemoffset);
enum dshowDeviceType VAR_2 = pin->filter->type;
void *VAR_3;
uint8_t *buf;
int VAR_4;
int VAR_5;
int64_t curtime;
dshowdebug("FUNC_0(%p)\n", VAR_0);
if ... | [
"FUNC_0(libAVMemInputPin *VAR_0, IMediaSample *VAR_1)\n{",
"libAVPin *pin = (libAVPin *) ((uint8_t *) VAR_0 - imemoffset);",
"enum dshowDeviceType VAR_2 = pin->filter->type;",
"void *VAR_3;",
"uint8_t *buf;",
"int VAR_4;",
"int VAR_5;",
"int64_t curtime;",
"dshowdebug(\"FUNC_0(%p)\\n\", VAR_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
],
[
17
],
[
21
],
[
25,
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[... |
8,500 | static int vp9_decode_frame(AVCodecContext *avctx, AVFrame *frame,
int *got_frame, const uint8_t *data, int size)
{
VP9Context *s = avctx->priv_data;
int ret, tile_row, tile_col, i, ref = -1, row, col;
ptrdiff_t yoff = 0, uvoff = 0;
ret = decode_frame_header(avctx, da... | true | FFmpeg | 50866c8d95bfd97c299199aec0d68291f38a72e1 | static int vp9_decode_frame(AVCodecContext *avctx, AVFrame *frame,
int *got_frame, const uint8_t *data, int size)
{
VP9Context *s = avctx->priv_data;
int ret, tile_row, tile_col, i, ref = -1, row, col;
ptrdiff_t yoff = 0, uvoff = 0;
ret = decode_frame_header(avctx, da... | {
"code": [
" memcpy(s->prob_ctx[s->framectxid].coef, s->prob.coef,",
" sizeof(s->prob.coef));"
],
"line_no": [
281,
283
]
} | static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1,
int *VAR_2, const uint8_t *VAR_3, int VAR_4)
{
VP9Context *s = VAR_0->priv_data;
int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9 = -1, VAR_10, VAR_11;
ptrdiff_t yoff = 0, uvoff = 0;
VAR_5 = decode_frame_header(VAR_0, VAR_... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1,\nint *VAR_2, const uint8_t *VAR_3, int VAR_4)\n{",
"VP9Context *s = VAR_0->priv_data;",
"int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9 = -1, VAR_10, VAR_11;",
"ptrdiff_t yoff = 0, uvoff = 0;",
"VAR_5 = decode_frame_header(VAR_0, VAR_3, VAR_4, &VAR_9);",
"i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
8,501 | static int parallels_open(BlockDriverState *bs, int flags)
{
BDRVParallelsState *s = bs->opaque;
int i;
struct parallels_header ph;
bs->read_only = 1; // no write support yet
if (bdrv_pread(bs->file, 0, &ph, sizeof(ph)) != sizeof(ph))
goto fail;
if (memcmp(ph.magic, HEADER_... | true | qemu | 46536235d80a012cc4286b71426cafad0c7f41f0 | static int parallels_open(BlockDriverState *bs, int flags)
{
BDRVParallelsState *s = bs->opaque;
int i;
struct parallels_header ph;
bs->read_only = 1;
if (bdrv_pread(bs->file, 0, &ph, sizeof(ph)) != sizeof(ph))
goto fail;
if (memcmp(ph.magic, HEADER_MAGIC, 16) ||
(le32_t... | {
"code": [
" if (bdrv_pread(bs->file, 0, &ph, sizeof(ph)) != sizeof(ph))",
"\t(le32_to_cpu(ph.version) != HEADER_VERSION)) {",
" if (bdrv_pread(bs->file, 64, s->catalog_bitmap, s->catalog_size * 4) !=",
"\ts->catalog_size * 4)",
"\tgoto fail;",
" if (s->catalog_bitmap)",
"\tg_fre... | static int FUNC_0(BlockDriverState *VAR_0, int VAR_1)
{
BDRVParallelsState *s = VAR_0->opaque;
int VAR_2;
struct parallels_header VAR_3;
VAR_0->read_only = 1;
if (bdrv_pread(VAR_0->file, 0, &VAR_3, sizeof(VAR_3)) != sizeof(VAR_3))
goto fail;
if (memcmp(VAR_3.magic, HEADER_... | [
"static int FUNC_0(BlockDriverState *VAR_0, int VAR_1)\n{",
"BDRVParallelsState *s = VAR_0->opaque;",
"int VAR_2;",
"struct parallels_header VAR_3;",
"VAR_0->read_only = 1;",
"if (bdrv_pread(VAR_0->file, 0, &VAR_3, sizeof(VAR_3)) != sizeof(VAR_3))\ngoto fail;",
"if (memcmp(VAR_3.magic, HEADER_MAGIC, 16)... | [
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17,
19
],
[
23,
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
41
],
[
43
],
[
45,
47,
49
],
[
51
],
[
53
],
[
57
],
[
59
... |
8,502 | int inet_aton (const char * str, struct in_addr * add)
{
const char * pch = str;
unsigned int add1 = 0, add2 = 0, add3 = 0, add4 = 0;
add1 = atoi(pch);
pch = strpbrk(pch,".");
if (pch == 0 || ++pch == 0) goto done;
add2 = atoi(pch);
pch = strpbrk(pch,".");
if (pch == 0 || ++pc... | true | FFmpeg | 104d04182d85e8538e8934c072432a05ab7ed999 | int inet_aton (const char * str, struct in_addr * add)
{
const char * pch = str;
unsigned int add1 = 0, add2 = 0, add3 = 0, add4 = 0;
add1 = atoi(pch);
pch = strpbrk(pch,".");
if (pch == 0 || ++pch == 0) goto done;
add2 = atoi(pch);
pch = strpbrk(pch,".");
if (pch == 0 || ++pc... | {
"code": [
" if (pch == 0 || ++pch == 0) goto done;",
" if (pch == 0 || ++pch == 0) goto done;",
" if (pch == 0 || ++pch == 0) goto done;",
"done:"
],
"line_no": [
15,
15,
15,
33
]
} | int FUNC_0 (const char * VAR_0, struct in_addr * VAR_1)
{
const char * VAR_2 = VAR_0;
unsigned int VAR_3 = 0, VAR_4 = 0, VAR_5 = 0, VAR_6 = 0;
VAR_3 = atoi(VAR_2);
VAR_2 = strpbrk(VAR_2,".");
if (VAR_2 == 0 || ++VAR_2 == 0) goto done;
VAR_4 = atoi(VAR_2);
VAR_2 = strpbrk(VAR_2,".")... | [
"int FUNC_0 (const char * VAR_0, struct in_addr * VAR_1)\n{",
"const char * VAR_2 = VAR_0;",
"unsigned int VAR_3 = 0, VAR_4 = 0, VAR_5 = 0, VAR_6 = 0;",
"VAR_3 = atoi(VAR_2);",
"VAR_2 = strpbrk(VAR_2,\".\");",
"if (VAR_2 == 0 || ++VAR_2 == 0) goto done;",
"VAR_4 = atoi(VAR_2);",
"VAR_2 = strpbrk(VAR_2... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33,
35
],
[
39
],
[
41
]
] |
8,503 | static void pci_indirect(void)
{
QVirtioPCIDevice *dev;
QPCIBus *bus;
QVirtQueuePCI *vqpci;
QGuestAllocator *alloc;
QVirtioBlkReq req;
QVRingIndirectDesc *indirect;
void *addr;
uint64_t req_addr;
uint64_t capacity;
uint32_t features;
uint32_t free_head;
uint8... | true | qemu | 70556264a89a268efba1d7e8e341adcdd7881eb4 | static void pci_indirect(void)
{
QVirtioPCIDevice *dev;
QPCIBus *bus;
QVirtQueuePCI *vqpci;
QGuestAllocator *alloc;
QVirtioBlkReq req;
QVRingIndirectDesc *indirect;
void *addr;
uint64_t req_addr;
uint64_t capacity;
uint32_t features;
uint32_t free_head;
uint8... | {
"code": [
" g_assert(qvirtio_wait_queue_isr(&qvirtio_pci, &dev->vdev, &vqpci->vq,",
" QVIRTIO_BLK_TIMEOUT));",
" g_assert(qvirtio_wait_queue_isr(&qvirtio_pci, &dev->vdev, &vqpci->vq,",
" ... | static void FUNC_0(void)
{
QVirtioPCIDevice *dev;
QPCIBus *bus;
QVirtQueuePCI *vqpci;
QGuestAllocator *alloc;
QVirtioBlkReq req;
QVRingIndirectDesc *indirect;
void *VAR_0;
uint64_t req_addr;
uint64_t capacity;
uint32_t features;
uint32_t free_head;
uint8_t st... | [
"static void FUNC_0(void)\n{",
"QVirtioPCIDevice *dev;",
"QPCIBus *bus;",
"QVirtQueuePCI *vqpci;",
"QGuestAllocator *alloc;",
"QVirtioBlkReq req;",
"QVRingIndirectDesc *indirect;",
"void *VAR_0;",
"uint64_t req_addr;",
"uint64_t capacity;",
"uint32_t features;",
"uint32_t free_head;",
"uint8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
43
],
[
47
],
[
49
],
[
53
... |
8,504 | static void qvirtio_scsi_pci_free(QVirtIOSCSI *vs)
{
int i;
for (i = 0; i < vs->num_queues + 2; i++) {
qvirtqueue_cleanup(vs->dev->bus, vs->vq[i], vs->qs->alloc);
}
qvirtio_pci_device_disable(container_of(vs->dev, QVirtioPCIDevice, vdev));
g_free(vs->dev);
qvirtio_scsi_stop(vs-... | true | qemu | 3caab54d081bb3ce1b237d9628dd2b8ee7680159 | static void qvirtio_scsi_pci_free(QVirtIOSCSI *vs)
{
int i;
for (i = 0; i < vs->num_queues + 2; i++) {
qvirtqueue_cleanup(vs->dev->bus, vs->vq[i], vs->qs->alloc);
}
qvirtio_pci_device_disable(container_of(vs->dev, QVirtioPCIDevice, vdev));
g_free(vs->dev);
qvirtio_scsi_stop(vs-... | {
"code": [
" g_free(vs->dev);"
],
"line_no": [
17
]
} | static void FUNC_0(QVirtIOSCSI *VAR_0)
{
int VAR_1;
for (VAR_1 = 0; VAR_1 < VAR_0->num_queues + 2; VAR_1++) {
qvirtqueue_cleanup(VAR_0->dev->bus, VAR_0->vq[VAR_1], VAR_0->qs->alloc);
}
qvirtio_pci_device_disable(container_of(VAR_0->dev, QVirtioPCIDevice, vdev));
g_free(VAR_0->dev);
... | [
"static void FUNC_0(QVirtIOSCSI *VAR_0)\n{",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < VAR_0->num_queues + 2; VAR_1++) {",
"qvirtqueue_cleanup(VAR_0->dev->bus, VAR_0->vq[VAR_1], VAR_0->qs->alloc);",
"}",
"qvirtio_pci_device_disable(container_of(VAR_0->dev, QVirtioPCIDevice, vdev));",
"g_free(VAR_0->dev);",... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
8,505 | static void *circular_buffer_task_tx( void *_URLContext)
{
URLContext *h = _URLContext;
UDPContext *s = h->priv_data;
int old_cancelstate;
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_cancelstate);
for(;;) {
int len;
uint8_t tmp[4];
pthread_setcancelstat... | true | FFmpeg | 9b7a8bddac52bd05dddb28afd4dff92739946d3b | static void *circular_buffer_task_tx( void *_URLContext)
{
URLContext *h = _URLContext;
UDPContext *s = h->priv_data;
int old_cancelstate;
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_cancelstate);
for(;;) {
int len;
uint8_t tmp[4];
pthread_setcancelstat... | {
"code": [
" UDPContext *s = h->priv_data;",
" pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_cancelstate);",
" av_usleep(s->packet_gap);",
" pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_cancelstate);",
" pthread_mutex_lock(&s->mutex);",
" av_f... | static void *FUNC_0( void *VAR_0)
{
URLContext *h = VAR_0;
UDPContext *s = h->priv_data;
int VAR_1;
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &VAR_1);
for(;;) {
int VAR_2;
uint8_t tmp[4];
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &VAR_1);
av... | [
"static void *FUNC_0( void *VAR_0)\n{",
"URLContext *h = VAR_0;",
"UDPContext *s = h->priv_data;",
"int VAR_1;",
"pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &VAR_1);",
"for(;;) {",
"int VAR_2;",
"uint8_t tmp[4];",
"pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &VAR_1);",
"av_usleep(s->packet_g... | [
0,
0,
1,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
1,
1,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
33
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
59
... |
8,506 | int ff_lpc_calc_coefs(LPCContext *s,
const int32_t *samples, int blocksize, int min_order,
int max_order, int precision,
int32_t coefs[][MAX_LPC_ORDER], int *shift,
enum FFLPCType lpc_type, int lpc_passes,
... | true | FFmpeg | e27be795f019a8ba41c33b0cf0e3a060069252ea | int ff_lpc_calc_coefs(LPCContext *s,
const int32_t *samples, int blocksize, int min_order,
int max_order, int precision,
int32_t coefs[][MAX_LPC_ORDER], int *shift,
enum FFLPCType lpc_type, int lpc_passes,
... | {
"code": [
" eval= m[(pass-1)&1].evaluate_lls(&m[(pass-1)&1], var+1, max_order-1);"
],
"line_no": [
117
]
} | int FUNC_0(LPCContext *VAR_0,
const int32_t *VAR_1, int VAR_2, int VAR_3,
int VAR_4, int VAR_5,
int32_t VAR_6[][MAX_LPC_ORDER], int *VAR_7,
enum FFLPCType VAR_8, int VAR_9,
int VAR_10, int VAR_11, int VAR_... | [
"int FUNC_0(LPCContext *VAR_0,\nconst int32_t *VAR_1, int VAR_2, int VAR_3,\nint VAR_4, int VAR_5,\nint32_t VAR_6[][MAX_LPC_ORDER], int *VAR_7,\nenum FFLPCType VAR_8, int VAR_9,\nint VAR_10, int VAR_11, int VAR_12)\n{",
"double VAR_13[MAX_LPC_ORDER+1];",
"double VAR_14[MAX_LPC_ORDER];",
"double VAR_15[MAX_LPC... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
47,
49
],
[
53
],
[
55
],
[
59
],
[
63
... |
8,507 | static void string_deserialize(void **native_out, void *datap,
VisitorFunc visit, Error **errp)
{
StringSerializeData *d = datap;
d->siv = string_input_visitor_new(string_output_get_string(d->sov));
visit(string_input_get_visitor(d->siv), native_out, errp);
}
| true | qemu | 2bd01ac1e238c76e201ba21f314cec46437d2c5a | static void string_deserialize(void **native_out, void *datap,
VisitorFunc visit, Error **errp)
{
StringSerializeData *d = datap;
d->siv = string_input_visitor_new(string_output_get_string(d->sov));
visit(string_input_get_visitor(d->siv), native_out, errp);
}
| {
"code": [
" d->siv = string_input_visitor_new(string_output_get_string(d->sov));"
],
"line_no": [
11
]
} | static void FUNC_0(void **VAR_0, void *VAR_1,
VisitorFunc VAR_2, Error **VAR_3)
{
StringSerializeData *d = VAR_1;
d->siv = string_input_visitor_new(string_output_get_string(d->sov));
VAR_2(string_input_get_visitor(d->siv), VAR_0, VAR_3);
}
| [
"static void FUNC_0(void **VAR_0, void *VAR_1,\nVisitorFunc VAR_2, Error **VAR_3)\n{",
"StringSerializeData *d = VAR_1;",
"d->siv = string_input_visitor_new(string_output_get_string(d->sov));",
"VAR_2(string_input_get_visitor(d->siv), VAR_0, VAR_3);",
"}"
] | [
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
]
] |
8,508 | static int rtp_read_header(AVFormatContext *s)
{
uint8_t recvbuf[RTP_MAX_PACKET_LENGTH];
char host[500], sdp[500];
int ret, port;
URLContext* in = NULL;
int payload_type;
AVCodecContext codec = { 0 };
struct sockaddr_storage addr;
AVIOContext pb;
socklen_t addrlen = sizeof(... | true | FFmpeg | ec4c48397641dbaf4ae8df36c32aaa5a311a11bf | static int rtp_read_header(AVFormatContext *s)
{
uint8_t recvbuf[RTP_MAX_PACKET_LENGTH];
char host[500], sdp[500];
int ret, port;
URLContext* in = NULL;
int payload_type;
AVCodecContext codec = { 0 };
struct sockaddr_storage addr;
AVIOContext pb;
socklen_t addrlen = sizeof(... | {
"code": [
" rt->protocols = ffurl_get_protocols(NULL, NULL);",
" rt->protocols = ffurl_get_protocols(NULL, NULL);",
" rt->protocols = ffurl_get_protocols(NULL, NULL);",
" rt->protocols = ffurl_get_protocols(NULL, NULL);"
],
"line_no": [
35,
35,
35,
35
... | static int FUNC_0(AVFormatContext *VAR_0)
{
uint8_t recvbuf[RTP_MAX_PACKET_LENGTH];
char VAR_1[500], VAR_2[500];
int VAR_3, VAR_4;
URLContext* in = NULL;
int VAR_5;
AVCodecContext codec = { 0 };
struct sockaddr_storage VAR_6;
AVIOContext pb;
socklen_t addrlen = sizeof(VAR_6... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"uint8_t recvbuf[RTP_MAX_PACKET_LENGTH];",
"char VAR_1[500], VAR_2[500];",
"int VAR_3, VAR_4;",
"URLContext* in = NULL;",
"int VAR_5;",
"AVCodecContext codec = { 0 };",
"struct sockaddr_storage VAR_6;",
"AVIOContext pb;",
"socklen_t addrlen = sizeof(... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
45,
47
],
[
49,
51
... |
8,509 | static void qemu_aio_wait_all(void)
{
while (aio_poll(ctx, true)) {
/* Do nothing */
}
}
| true | qemu | 35ecde26018207fe723bec6efbd340db6e9c2d53 | static void qemu_aio_wait_all(void)
{
while (aio_poll(ctx, true)) {
}
}
| {
"code": [
"static void qemu_aio_wait_all(void)",
" while (aio_poll(ctx, true)) {"
],
"line_no": [
1,
5
]
} | static void FUNC_0(void)
{
while (aio_poll(ctx, true)) {
}
}
| [
"static void FUNC_0(void)\n{",
"while (aio_poll(ctx, true)) {",
"}",
"}"
] | [
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
8,510 | static int send_invoke_response(URLContext *s, RTMPPacket *pkt)
{
RTMPContext *rt = s->priv_data;
double seqnum;
char filename[64];
char command[64];
int stringlen;
char *pchar;
const uint8_t *p = pkt->data;
uint8_t *pp = NULL;
RTMPPacket spkt = { 0 };
GetByteCon... | true | FFmpeg | d6ded94036e43a04889f4ff2813a7f7dd60b82fe | static int send_invoke_response(URLContext *s, RTMPPacket *pkt)
{
RTMPContext *rt = s->priv_data;
double seqnum;
char filename[64];
char command[64];
int stringlen;
char *pchar;
const uint8_t *p = pkt->data;
uint8_t *pp = NULL;
RTMPPacket spkt = { 0 };
GetByteCon... | {
"code": [
" char filename[64];"
],
"line_no": [
9
]
} | static int FUNC_0(URLContext *VAR_0, RTMPPacket *VAR_1)
{
RTMPContext *rt = VAR_0->priv_data;
double VAR_2;
char VAR_3[64];
char VAR_4[64];
int VAR_5;
char *VAR_6;
const uint8_t *VAR_7 = VAR_1->data;
uint8_t *pp = NULL;
RTMPPacket spkt = { 0 };
GetByteContext gbc... | [
"static int FUNC_0(URLContext *VAR_0, RTMPPacket *VAR_1)\n{",
"RTMPContext *rt = VAR_0->priv_data;",
"double VAR_2;",
"char VAR_3[64];",
"char VAR_4[64];",
"int VAR_5;",
"char *VAR_6;",
"const uint8_t *VAR_7 = VAR_1->data;",
"uint8_t *pp = NULL;",
"RTMPPacket spkt = { 0 };",
"GetByteContex... | [
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,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45,
47
... |
8,511 | static void coroutine_fn v9fs_open(void *opaque)
{
int flags;
int32_t fid;
int32_t mode;
V9fsQID qid;
int iounit = 0;
ssize_t err = 0;
size_t offset = 7;
struct stat stbuf;
V9fsFidState *fidp;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
if (s->proto_versi... | true | qemu | 49dd946bb5419681c8668b09a6d10f42bc707b78 | static void coroutine_fn v9fs_open(void *opaque)
{
int flags;
int32_t fid;
int32_t mode;
V9fsQID qid;
int iounit = 0;
ssize_t err = 0;
size_t offset = 7;
struct stat stbuf;
V9fsFidState *fidp;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
if (s->proto_versi... | {
"code": [
" BUG_ON(fidp->fid_type != P9_FID_NONE);",
" BUG_ON(fidp->fid_type != P9_FID_NONE);"
],
"line_no": [
63,
63
]
} | static void VAR_0 v9fs_open(void *opaque)
{
int flags;
int32_t fid;
int32_t mode;
V9fsQID qid;
int iounit = 0;
ssize_t err = 0;
size_t offset = 7;
struct stat stbuf;
V9fsFidState *fidp;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
if (s->proto_version == V... | [
"static void VAR_0 v9fs_open(void *opaque)\n{",
"int flags;",
"int32_t fid;",
"int32_t mode;",
"V9fsQID qid;",
"int iounit = 0;",
"ssize_t err = 0;",
"size_t offset = 7;",
"struct stat stbuf;",
"V9fsFidState *fidp;",
"V9fsPDU *pdu = opaque;",
"V9fsState *s = pdu->s;",
"if (s->proto_version =... | [
0,
0,
0,
0,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
8,512 | static void init_blk_migration_it(void *opaque, BlockDriverState *bs)
{
BlkMigDevState *bmds;
int64_t sectors;
if (!bdrv_is_read_only(bs)) {
sectors = bdrv_nb_sectors(bs);
if (sectors <= 0) {
return;
}
bmds = g_malloc0(sizeof(BlkMigDevState));
... | true | qemu | 5839e53bbc0fec56021d758aab7610df421ed8c8 | static void init_blk_migration_it(void *opaque, BlockDriverState *bs)
{
BlkMigDevState *bmds;
int64_t sectors;
if (!bdrv_is_read_only(bs)) {
sectors = bdrv_nb_sectors(bs);
if (sectors <= 0) {
return;
}
bmds = g_malloc0(sizeof(BlkMigDevState));
... | {
"code": [
" bmds = g_malloc0(sizeof(BlkMigDevState));"
],
"line_no": [
23
]
} | static void FUNC_0(void *VAR_0, BlockDriverState *VAR_1)
{
BlkMigDevState *bmds;
int64_t sectors;
if (!bdrv_is_read_only(VAR_1)) {
sectors = bdrv_nb_sectors(VAR_1);
if (sectors <= 0) {
return;
}
bmds = g_malloc0(sizeof(BlkMigDevState));
bmds-... | [
"static void FUNC_0(void *VAR_0, BlockDriverState *VAR_1)\n{",
"BlkMigDevState *bmds;",
"int64_t sectors;",
"if (!bdrv_is_read_only(VAR_1)) {",
"sectors = bdrv_nb_sectors(VAR_1);",
"if (sectors <= 0) {",
"return;",
"}",
"bmds = g_malloc0(sizeof(BlkMigDevState));",
"bmds->VAR_1 = VAR_1;",
"bmds->... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
49... |
8,513 | static void megasas_command_complete(SCSIRequest *req, uint32_t status,
size_t resid)
{
MegasasCmd *cmd = req->hba_private;
uint8_t cmd_status = MFI_STAT_OK;
trace_megasas_command_complete(cmd->index, status, resid);
if (req->io_canceled) {
return;... | true | qemu | 87e459a810d7b1ec1638085b5a80ea3d9b43119a | static void megasas_command_complete(SCSIRequest *req, uint32_t status,
size_t resid)
{
MegasasCmd *cmd = req->hba_private;
uint8_t cmd_status = MFI_STAT_OK;
trace_megasas_command_complete(cmd->index, status, resid);
if (req->io_canceled) {
return;... | {
"code": [
" if (cmd->req == NULL) {"
],
"line_no": [
25
]
} | static void FUNC_0(SCSIRequest *VAR_0, uint32_t VAR_1,
size_t VAR_2)
{
MegasasCmd *cmd = VAR_0->hba_private;
uint8_t cmd_status = MFI_STAT_OK;
trace_megasas_command_complete(cmd->index, VAR_1, VAR_2);
if (VAR_0->io_canceled) {
return;
}
... | [
"static void FUNC_0(SCSIRequest *VAR_0, uint32_t VAR_1,\nsize_t VAR_2)\n{",
"MegasasCmd *cmd = VAR_0->hba_private;",
"uint8_t cmd_status = MFI_STAT_OK;",
"trace_megasas_command_complete(cmd->index, VAR_1, VAR_2);",
"if (VAR_0->io_canceled) {",
"return;",
"}",
"if (cmd->VAR_0 == NULL) {",
"cmd_status... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
8,514 | static void GLZWDecodeInit(GifState * s, int csize)
{
/* read buffer */
s->eob_reached = 0;
s->pbuf = s->buf;
s->ebuf = s->buf;
s->bbuf = 0;
s->bbits = 0;
/* decoder */
s->codesize = csize;
s->cursize = s->codesize + 1;
s->curmask = mask[s->cursize];
s->top_slot... | true | FFmpeg | 0b54f3c0878a3acaa9142e4f24942e762d97e350 | static void GLZWDecodeInit(GifState * s, int csize)
{
s->eob_reached = 0;
s->pbuf = s->buf;
s->ebuf = s->buf;
s->bbuf = 0;
s->bbits = 0;
s->codesize = csize;
s->cursize = s->codesize + 1;
s->curmask = mask[s->cursize];
s->top_slot = 1 << s->cursize;
s->cl... | {
"code": [
"static void GLZWDecodeInit(GifState * s, int csize)",
" s->eob_reached = 0;",
" s->pbuf = s->buf;",
" s->ebuf = s->buf;",
" s->bbuf = 0;",
" s->bbits = 0;",
" s->codesize = csize;",
" s->cursize = s->codesize + 1;",
" s->curmask = mask[s->cursiz... | static void FUNC_0(GifState * VAR_0, int VAR_1)
{
VAR_0->eob_reached = 0;
VAR_0->pbuf = VAR_0->buf;
VAR_0->ebuf = VAR_0->buf;
VAR_0->bbuf = 0;
VAR_0->bbits = 0;
VAR_0->codesize = VAR_1;
VAR_0->cursize = VAR_0->codesize + 1;
VAR_0->curmask = mask[VAR_0->cursize];
... | [
"static void FUNC_0(GifState * VAR_0, int VAR_1)\n{",
"VAR_0->eob_reached = 0;",
"VAR_0->pbuf = VAR_0->buf;",
"VAR_0->ebuf = VAR_0->buf;",
"VAR_0->bbuf = 0;",
"VAR_0->bbits = 0;",
"VAR_0->codesize = VAR_1;",
"VAR_0->cursize = VAR_0->codesize + 1;",
"VAR_0->curmask = mask[VAR_0->cursize];",
"VAR_0-... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
8,515 | SchroFrame *ff_create_schro_frame(AVCodecContext *avctx,
SchroFrameFormat schro_frame_fmt)
{
AVFrame *p_pic;
SchroFrame *p_frame;
int y_width, uv_width;
int y_height, uv_height;
int i;
y_width = avctx->width;
y_height = avctx->height;
uv_w... | true | FFmpeg | 220b24c7c97dc033ceab1510549f66d0e7b52ef1 | SchroFrame *ff_create_schro_frame(AVCodecContext *avctx,
SchroFrameFormat schro_frame_fmt)
{
AVFrame *p_pic;
SchroFrame *p_frame;
int y_width, uv_width;
int y_height, uv_height;
int i;
y_width = avctx->width;
y_height = avctx->height;
uv_w... | {
"code": [
"SchroFrame *ff_create_schro_frame(AVCodecContext *avctx,",
" SchroFrameFormat schro_frame_fmt)",
" AVFrame *p_pic;",
" SchroFrame *p_frame;",
" int y_width, uv_width;",
" int y_height, uv_height;",
" int i;",
" y_width =... | SchroFrame *FUNC_0(AVCodecContext *avctx,
SchroFrameFormat schro_frame_fmt)
{
AVFrame *p_pic;
SchroFrame *p_frame;
int VAR_0, VAR_1;
int VAR_2, VAR_3;
int VAR_4;
VAR_0 = avctx->width;
VAR_2 = avctx->height;
VAR_1 = VAR_0 >> (SCHRO_FRAME_... | [
"SchroFrame *FUNC_0(AVCodecContext *avctx,\nSchroFrameFormat schro_frame_fmt)\n{",
"AVFrame *p_pic;",
"SchroFrame *p_frame;",
"int VAR_0, VAR_1;",
"int VAR_2, VAR_3;",
"int VAR_4;",
"VAR_0 = avctx->width;",
"VAR_2 = avctx->height;",
"VAR_1 = VAR_0 >> (SCHRO_FRAME_FORMAT_H_SHIFT(schro_frame_fmt)... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
... |
8,516 | static int applehttp_open(URLContext *h, const char *uri, int flags)
{
AppleHTTPContext *s;
int ret, i;
const char *nested_url;
if (flags & AVIO_FLAG_WRITE)
return AVERROR(ENOSYS);
s = av_mallocz(sizeof(AppleHTTPContext));
if (!s)
return AVERROR(ENOMEM);
h->priv... | true | FFmpeg | 1ca87d600bc069fe4cf497c410b4f794e88a122d | static int applehttp_open(URLContext *h, const char *uri, int flags)
{
AppleHTTPContext *s;
int ret, i;
const char *nested_url;
if (flags & AVIO_FLAG_WRITE)
return AVERROR(ENOSYS);
s = av_mallocz(sizeof(AppleHTTPContext));
if (!s)
return AVERROR(ENOMEM);
h->priv... | {
"code": [
" av_free(s);",
" av_free(s);",
" return 0;"
],
"line_no": [
111,
111,
105
]
} | static int FUNC_0(URLContext *VAR_0, const char *VAR_1, int VAR_2)
{
AppleHTTPContext *s;
int VAR_3, VAR_4;
const char *VAR_5;
if (VAR_2 & AVIO_FLAG_WRITE)
return AVERROR(ENOSYS);
s = av_mallocz(sizeof(AppleHTTPContext));
if (!s)
return AVERROR(ENOMEM);
VAR_0->p... | [
"static int FUNC_0(URLContext *VAR_0, const char *VAR_1, int VAR_2)\n{",
"AppleHTTPContext *s;",
"int VAR_3, VAR_4;",
"const char *VAR_5;",
"if (VAR_2 & AVIO_FLAG_WRITE)\nreturn AVERROR(ENOSYS);",
"s = av_mallocz(sizeof(AppleHTTPContext));",
"if (!s)\nreturn AVERROR(ENOMEM);",
"VAR_0->priv_data = 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,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
8,517 | static int mpeg_decode_slice(AVCodecContext *avctx,
AVPicture *pict,
int start_code,
UINT8 *buf, int buf_size)
{
Mpeg1Context *s1 = avctx->priv_data;
MpegEncContext *s = &s1->mpeg_enc_ctx;
int ret;
start... | true | FFmpeg | d7e9533aa06f4073a27812349b35ba5fede11ca1 | static int mpeg_decode_slice(AVCodecContext *avctx,
AVPicture *pict,
int start_code,
UINT8 *buf, int buf_size)
{
Mpeg1Context *s1 = avctx->priv_data;
MpegEncContext *s = &s1->mpeg_enc_ctx;
int ret;
start... | {
"code": [
" } else {",
" } else {",
" } else {",
" } else {",
" } else {",
" } else {"
],
"line_no": [
119,
165,
165,
119,
129,
119
]
} | static int FUNC_0(AVCodecContext *VAR_0,
AVPicture *VAR_1,
int VAR_2,
UINT8 *VAR_3, int VAR_4)
{
Mpeg1Context *s1 = VAR_0->priv_data;
MpegEncContext *s = &s1->mpeg_enc_ctx;
int VAR_5;
VAR_2 = (VAR_2 - 1)... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nAVPicture *VAR_1,\nint VAR_2,\nUINT8 *VAR_3, int VAR_4)\n{",
"Mpeg1Context *s1 = VAR_0->priv_data;",
"MpegEncContext *s = &s1->mpeg_enc_ctx;",
"int VAR_5;",
"VAR_2 = (VAR_2 - 1) & 0xff;",
"if (VAR_2 >= s->mb_height)\nreturn -1;",
"s->last_dc[0] = 1 << (7 + s->i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
... |
8,519 | static int h264_handle_packet(AVFormatContext *ctx,
PayloadContext *data,
AVStream *st,
AVPacket * pkt,
uint32_t * timestamp,
const uint8_t * buf,
... | true | FFmpeg | eafb17d140f6772c9aac8fbf31641f24a371b2c0 | static int h264_handle_packet(AVFormatContext *ctx,
PayloadContext *data,
AVStream *st,
AVPacket * pkt,
uint32_t * timestamp,
const uint8_t * buf,
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
PayloadContext *VAR_1,
AVStream *VAR_2,
AVPacket * VAR_3,
uint32_t * VAR_4,
const uint8_t * VAR_5,
... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nPayloadContext *VAR_1,\nAVStream *VAR_2,\nAVPacket * VAR_3,\nuint32_t * VAR_4,\nconst uint8_t * VAR_5,\nint VAR_6, int VAR_7)\n{",
"uint8_t nal = VAR_5[0];",
"uint8_t type = (nal & 0x1f);",
"int VAR_8= 0;",
"uint8_t start_sequence[]= {0, 0, 1};",
"#ifdef DEBUG\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
2,
3,
4,
5,
6,
7,
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13,
14
],
[
15
],
[
16,
17
],
[
18,
19
],
[
20
],
[
21,
22
],
[
23
],
[
24,
25
],
[
26
],
[
... |
8,520 | static inline void RENAME(yuv2yuv1)(SwsContext *c, const int16_t *lumSrc, const int16_t *chrSrc, const int16_t *alpSrc,
uint8_t *dest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW)
{
int i;
#if COMPILE_TEMPLATE_MMX
if(!(c->flags & SWS_BITEXACT)) ... | true | FFmpeg | c3ab0004ae4dffc32494ae84dd15cfaa909a7884 | static inline void RENAME(yuv2yuv1)(SwsContext *c, const int16_t *lumSrc, const int16_t *chrSrc, const int16_t *alpSrc,
uint8_t *dest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW)
{
int i;
#if COMPILE_TEMPLATE_MMX
if(!(c->flags & SWS_BITEXACT)) ... | {
"code": [
" uint8_t *dest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW)",
" uint8_t *dest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW)"
],
"line_no": [
3,
3
]
} | static inline void FUNC_0(yuv2yuv1)(SwsContext *c, const int16_t *lumSrc, const int16_t *chrSrc, const int16_t *alpSrc,
uint8_t *dest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW)
{
int VAR_0;
#if COMPILE_TEMPLATE_MMX
if(!(c->flags & SWS_BITEXAC... | [
"static inline void FUNC_0(yuv2yuv1)(SwsContext *c, const int16_t *lumSrc, const int16_t *chrSrc, const int16_t *alpSrc,\nuint8_t *dest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW)\n{",
"int VAR_0;",
"#if COMPILE_TEMPLATE_MMX\nif(!(c->flags & SWS_BITEXACT)) {",
"long p= 4;",
"cons... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29,
31,
33,
35,
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
8,521 | static int interp(RA144Context *ractx, int16_t *out, int a,
int copyold, int energy)
{
int work[10];
int b = NBLOCKS - a;
int i;
// Interpolate block coefficients from the this frame's forth block and
// last frame's forth block.
for (i=0; i<30; i++)
out[i] =... | true | FFmpeg | 643bae382c2610512652d3c5cfa7aabb450a706e | static int interp(RA144Context *ractx, int16_t *out, int a,
int copyold, int energy)
{
int work[10];
int b = NBLOCKS - a;
int i;
for (i=0; i<30; i++)
out[i] = (a * ractx->lpc_coef[0][i] + b * ractx->lpc_coef[1][i])>> 2;
if (eval_refl(work, out, ractx... | {
"code": [
" if (eval_refl(work, out, ractx)) {"
],
"line_no": [
25
]
} | static int FUNC_0(RA144Context *VAR_0, int16_t *VAR_1, int VAR_2,
int VAR_3, int VAR_4)
{
int VAR_5[10];
int VAR_6 = NBLOCKS - VAR_2;
int VAR_7;
for (VAR_7=0; VAR_7<30; VAR_7++)
VAR_1[VAR_7] = (VAR_2 * VAR_0->lpc_coef[0][VAR_7] + VAR_6 * VAR_0->lpc_coef[1][... | [
"static int FUNC_0(RA144Context *VAR_0, int16_t *VAR_1, int VAR_2,\nint VAR_3, int VAR_4)\n{",
"int VAR_5[10];",
"int VAR_6 = NBLOCKS - VAR_2;",
"int VAR_7;",
"for (VAR_7=0; VAR_7<30; VAR_7++)",
"VAR_1[VAR_7] = (VAR_2 * VAR_0->lpc_coef[0][VAR_7] + VAR_6 * VAR_0->lpc_coef[1][VAR_7])>> 2;",
"if (eval_refl... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
19
],
[
21
],
[
25
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
8,523 | static int dv_extract_audio(uint8_t *frame, uint8_t *ppcm[4],
const DVprofile *sys)
{
int size, chan, i, j, d, of, smpls, freq, quant, half_ch;
uint16_t lc, rc;
const uint8_t *as_pack;
uint8_t *pcm, ipcm;
as_pack = dv_extract_pack(frame, dv_audio_source);
if... | true | FFmpeg | 7ee191cab0dc44700f26c5784e2adeb6a779651b | static int dv_extract_audio(uint8_t *frame, uint8_t *ppcm[4],
const DVprofile *sys)
{
int size, chan, i, j, d, of, smpls, freq, quant, half_ch;
uint16_t lc, rc;
const uint8_t *as_pack;
uint8_t *pcm, ipcm;
as_pack = dv_extract_pack(frame, dv_audio_source);
if... | {
"code": [
"static int dv_extract_audio(uint8_t *frame, uint8_t *ppcm[4],"
],
"line_no": [
1
]
} | static int FUNC_0(uint8_t *VAR_0, uint8_t *VAR_1[4],
const DVprofile *VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;
uint16_t lc, rc;
const uint8_t *VAR_13;
uint8_t *pcm, ipcm;
VAR_13 = dv_extract_pack(VAR_0, dv_audio_source... | [
"static int FUNC_0(uint8_t *VAR_0, uint8_t *VAR_1[4],\nconst DVprofile *VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;",
"uint16_t lc, rc;",
"const uint8_t *VAR_13;",
"uint8_t *pcm, ipcm;",
"VAR_13 = dv_extract_pack(VAR_0, dv_audio_source);",
"if (!VAR_13)\nret... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
33,
35
],
[
39,
41
],
[
45
],
[
47
],
[
55
],
[
61
],
[
65
],
[
67,... |
8,524 | void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
{
if (min_size < *size)
return ptr;
min_size = FFMAX(17 * min_size / 16 + 32, min_size);
ptr = av_realloc(ptr, min_size);
/* we could set this to the unmodified min_size but this is safer
* if the user lost the... | true | FFmpeg | b3415e4c5f9205820fd6c9211ad50a4df2692a36 | void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
{
if (min_size < *size)
return ptr;
min_size = FFMAX(17 * min_size / 16 + 32, min_size);
ptr = av_realloc(ptr, min_size);
if (!ptr)
min_size = 0;
*size = min_size;
return ptr;
}
| {
"code": [
" min_size = FFMAX(17 * min_size / 16 + 32, min_size);",
" min_size = FFMAX(17 * min_size / 16 + 32, min_size);"
],
"line_no": [
11,
11
]
} | void *FUNC_0(void *VAR_0, unsigned int *VAR_1, size_t VAR_2)
{
if (VAR_2 < *VAR_1)
return VAR_0;
VAR_2 = FFMAX(17 * VAR_2 / 16 + 32, VAR_2);
VAR_0 = av_realloc(VAR_0, VAR_2);
if (!VAR_0)
VAR_2 = 0;
*VAR_1 = VAR_2;
return VAR_0;
}
| [
"void *FUNC_0(void *VAR_0, unsigned int *VAR_1, size_t VAR_2)\n{",
"if (VAR_2 < *VAR_1)\nreturn VAR_0;",
"VAR_2 = FFMAX(17 * VAR_2 / 16 + 32, VAR_2);",
"VAR_0 = av_realloc(VAR_0, VAR_2);",
"if (!VAR_0)\nVAR_2 = 0;",
"*VAR_1 = VAR_2;",
"return VAR_0;",
"}"
] | [
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
11
],
[
15
],
[
23,
25
],
[
29
],
[
33
],
[
35
]
] |
8,525 | static inline int svq3_decode_block(GetBitContext *gb, DCTELEM *block,
int index, const int type)
{
static const uint8_t *const scan_patterns[4] =
{ luma_dc_zigzag_scan, zigzag_scan, svq3_scan, chroma_dc_scan };
int run, level, sign, vlc, limit;
const int intr... | true | FFmpeg | 9a2e79116d6235c53d8e9663a8d30d1950d7431a | static inline int svq3_decode_block(GetBitContext *gb, DCTELEM *block,
int index, const int type)
{
static const uint8_t *const scan_patterns[4] =
{ luma_dc_zigzag_scan, zigzag_scan, svq3_scan, chroma_dc_scan };
int run, level, sign, vlc, limit;
const int intr... | {
"code": [
" int run, level, sign, vlc, limit;",
" if (vlc == INVALID_VLC)",
" return -1;",
" sign = (vlc & 0x1) - 1;",
" vlc = vlc + 1 >> 1;"
],
"line_no": [
13,
25,
27,
31,
33
]
} | static inline int FUNC_0(GetBitContext *VAR_0, DCTELEM *VAR_1,
int VAR_2, const int VAR_3)
{
static const uint8_t *const VAR_4[4] =
{ luma_dc_zigzag_scan, zigzag_scan, svq3_scan, chroma_dc_scan };
int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;
const int VAR_10 ... | [
"static inline int FUNC_0(GetBitContext *VAR_0, DCTELEM *VAR_1,\nint VAR_2, const int VAR_3)\n{",
"static const uint8_t *const VAR_4[4] =\n{ luma_dc_zigzag_scan, zigzag_scan, svq3_scan, chroma_dc_scan };",
"int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;",
"const int VAR_10 = 3 * VAR_3 >> 2;",
"const uint8... | [
0,
0,
1,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25,
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
8,528 | static int flac_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
FLACContext *s = avctx->priv_data;
int metadata_last, metadata_type, metadata_size;
int tmp = 0, i, j = 0, input_buf_size;
int16_t ... | false | FFmpeg | 9d656110966fbdde0fd1d2e685f3ed3633ba3596 | static int flac_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
FLACContext *s = avctx->priv_data;
int metadata_last, metadata_type, metadata_size;
int tmp = 0, i, j = 0, input_buf_size;
int16_t ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
uint8_t *VAR_3, int VAR_4)
{
FLACContext *s = VAR_0->priv_data;
int VAR_5, VAR_6, VAR_7;
int VAR_8 = 0, VAR_9, VAR_10 = 0, VAR_11;
int16_t *samples = VAR_1, *left, *right;
... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nuint8_t *VAR_3, int VAR_4)\n{",
"FLACContext *s = VAR_0->priv_data;",
"int VAR_5, VAR_6, VAR_7;",
"int VAR_8 = 0, VAR_9, VAR_10 = 0, VAR_11;",
"int16_t *samples = VAR_1, *left, *right;",
"*VAR_2 = 0;",
"s->VAR_0 = VAR_0;",
"if(s->max... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
49
],
[
51
],
[
53
],
[
55
... |
8,529 | int64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name)
{
switch(nb_channels) {
case 1: return AV_CH_LAYOUT_MONO;
case 2: return AV_CH_LAYOUT_STEREO;
case 3: return AV_CH_LAYOUT_SURROUND;
case 4: return AV_CH_LAYOUT_QUAD;
case 5: return AV_CH_LAY... | false | FFmpeg | cc276c85d15272df6e44fb3252657a43cbd49555 | int64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name)
{
switch(nb_channels) {
case 1: return AV_CH_LAYOUT_MONO;
case 2: return AV_CH_LAYOUT_STEREO;
case 3: return AV_CH_LAYOUT_SURROUND;
case 4: return AV_CH_LAYOUT_QUAD;
case 5: return AV_CH_LAY... | {
"code": [],
"line_no": []
} | int64_t FUNC_0(int nb_channels, enum CodecID codec_id, const char *fmt_name)
{
switch(nb_channels) {
case 1: return AV_CH_LAYOUT_MONO;
case 2: return AV_CH_LAYOUT_STEREO;
case 3: return AV_CH_LAYOUT_SURROUND;
case 4: return AV_CH_LAYOUT_QUAD;
case 5: return AV_CH_LAYOUT_5POINT0;
case... | [
"int64_t FUNC_0(int nb_channels, enum CodecID codec_id, const char *fmt_name)\n{",
"switch(nb_channels) {",
"case 1: return AV_CH_LAYOUT_MONO;",
"case 2: return AV_CH_LAYOUT_STEREO;",
"case 3: return AV_CH_LAYOUT_SURROUND;",
"case 4: return AV_CH_LAYOUT_QUAD;",
"case 5: return AV_CH_LAYOUT_5POINT0;",
... | [
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
]
] |
8,530 | static inline void downmix_2f_1r_to_dolby(float *samples)
{
int i;
for (i = 0; i < 256; i++) {
samples[i] -= samples[i + 512];
samples[i + 256] += samples[i + 512];
samples[i + 512] = 0;
}
}
| false | FFmpeg | 0058584580b87feb47898e60e4b80c7f425882ad | static inline void downmix_2f_1r_to_dolby(float *samples)
{
int i;
for (i = 0; i < 256; i++) {
samples[i] -= samples[i + 512];
samples[i + 256] += samples[i + 512];
samples[i + 512] = 0;
}
}
| {
"code": [],
"line_no": []
} | static inline void FUNC_0(float *VAR_0)
{
int VAR_1;
for (VAR_1 = 0; VAR_1 < 256; VAR_1++) {
VAR_0[VAR_1] -= VAR_0[VAR_1 + 512];
VAR_0[VAR_1 + 256] += VAR_0[VAR_1 + 512];
VAR_0[VAR_1 + 512] = 0;
}
}
| [
"static inline void FUNC_0(float *VAR_0)\n{",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < 256; VAR_1++) {",
"VAR_0[VAR_1] -= VAR_0[VAR_1 + 512];",
"VAR_0[VAR_1 + 256] += VAR_0[VAR_1 + 512];",
"VAR_0[VAR_1 + 512] = 0;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
8,531 | static int vc1_init_common(VC1Context *v)
{
static int done = 0;
int i = 0;
static VLC_TYPE vlc_table[32372][2];
v->hrd_rate = v->hrd_buffer = NULL;
/* VLC tables */
if (!done) {
INIT_VLC_STATIC(&ff_vc1_bfraction_vlc, VC1_BFRACTION_VLC_BITS, 23,
ff_vc... | false | FFmpeg | c742ab4e81bb9dcabfdab006d6b8b09a5808c4ce | static int vc1_init_common(VC1Context *v)
{
static int done = 0;
int i = 0;
static VLC_TYPE vlc_table[32372][2];
v->hrd_rate = v->hrd_buffer = NULL;
if (!done) {
INIT_VLC_STATIC(&ff_vc1_bfraction_vlc, VC1_BFRACTION_VLC_BITS, 23,
ff_vc1_bfraction_bits... | {
"code": [],
"line_no": []
} | static int FUNC_0(VC1Context *VAR_0)
{
static int VAR_1 = 0;
int VAR_2 = 0;
static VLC_TYPE VAR_3[32372][2];
VAR_0->hrd_rate = VAR_0->hrd_buffer = NULL;
if (!VAR_1) {
INIT_VLC_STATIC(&ff_vc1_bfraction_vlc, VC1_BFRACTION_VLC_BITS, 23,
ff_vc1_bfraction... | [
"static int FUNC_0(VC1Context *VAR_0)\n{",
"static int VAR_1 = 0;",
"int VAR_2 = 0;",
"static VLC_TYPE VAR_3[32372][2];",
"VAR_0->hrd_rate = VAR_0->hrd_buffer = NULL;",
"if (!VAR_1) {",
"INIT_VLC_STATIC(&ff_vc1_bfraction_vlc, VC1_BFRACTION_VLC_BITS, 23,\nff_vc1_bfraction_bits, 1, 1,\nff_vc1_bfraction_co... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
19
],
[
21,
23,
25
],
[
27,
29,
31
],
[
33,
35,
37
],
[
39,
41,
43
],
[
45
],
[
47
],
[
49
],
[
51,
53,
55
],
[
57
... |
8,532 | static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
int *golden_frame)
{
VP56RangeCoder *c = &s->c;
int parse_filter_info = 0;
int coeff_offset = 0;
int vrt_shift = 0;
int sub_version;
int rows, cols;
int res = 1;
int separa... | false | FFmpeg | 91f104496bb7632ed5ff03798e06dd8af014f0d9 | static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
int *golden_frame)
{
VP56RangeCoder *c = &s->c;
int parse_filter_info = 0;
int coeff_offset = 0;
int vrt_shift = 0;
int sub_version;
int rows, cols;
int res = 1;
int separa... | {
"code": [],
"line_no": []
} | static int FUNC_0(VP56Context *VAR_0, const uint8_t *VAR_1, int VAR_2,
int *VAR_3)
{
VP56RangeCoder *c = &VAR_0->c;
int VAR_4 = 0;
int VAR_5 = 0;
int VAR_6 = 0;
int VAR_7;
int VAR_8, VAR_9;
int VAR_10 = 1;
int VAR_11 = VAR_1[0] & 1;
VAR_0->fra... | [
"static int FUNC_0(VP56Context *VAR_0, const uint8_t *VAR_1, int VAR_2,\nint *VAR_3)\n{",
"VP56RangeCoder *c = &VAR_0->c;",
"int VAR_4 = 0;",
"int VAR_5 = 0;",
"int VAR_6 = 0;",
"int VAR_7;",
"int VAR_8, VAR_9;",
"int VAR_10 = 1;",
"int VAR_11 = VAR_1[0] & 1;",
"VAR_0->framep[VP56_FRAME_CURRENT]->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
47
... |
8,533 | int ff_network_wait_fd_timeout(int fd, int write, int64_t timeout, AVIOInterruptCB *int_cb)
{
int ret;
int64_t wait_start = 0;
while (1) {
ret = ff_network_wait_fd(fd, write);
if (ret != AVERROR(EAGAIN))
return ret;
if (ff_check_interrupt(int_cb))
r... | false | FFmpeg | 1e85b5e077e7e6fb9901bfd1a7a4f2594ba5a9a5 | int ff_network_wait_fd_timeout(int fd, int write, int64_t timeout, AVIOInterruptCB *int_cb)
{
int ret;
int64_t wait_start = 0;
while (1) {
ret = ff_network_wait_fd(fd, write);
if (ret != AVERROR(EAGAIN))
return ret;
if (ff_check_interrupt(int_cb))
r... | {
"code": [],
"line_no": []
} | int FUNC_0(int VAR_0, int VAR_1, int64_t VAR_2, AVIOInterruptCB *VAR_3)
{
int VAR_4;
int64_t wait_start = 0;
while (1) {
VAR_4 = ff_network_wait_fd(VAR_0, VAR_1);
if (VAR_4 != AVERROR(EAGAIN))
return VAR_4;
if (ff_check_interrupt(VAR_3))
return AVER... | [
"int FUNC_0(int VAR_0, int VAR_1, int64_t VAR_2, AVIOInterruptCB *VAR_3)\n{",
"int VAR_4;",
"int64_t wait_start = 0;",
"while (1) {",
"VAR_4 = ff_network_wait_fd(VAR_0, VAR_1);",
"if (VAR_4 != AVERROR(EAGAIN))\nreturn VAR_4;",
"if (ff_check_interrupt(VAR_3))\nreturn AVERROR_EXIT;",
"if (VAR_2 > 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
]
] |
8,535 | GuestNetworkInterfaceList *qmp_guest_network_get_interfaces(Error **errp)
{
GuestNetworkInterfaceList *head = NULL, *cur_item = NULL;
struct ifaddrs *ifap, *ifa;
if (getifaddrs(&ifap) < 0) {
error_setg_errno(errp, errno, "getifaddrs failed");
goto error;
}
for (ifa = ifap... | true | qemu | 10a2158f52796e5b2b7ce7991bde09a3c985a37b | GuestNetworkInterfaceList *qmp_guest_network_get_interfaces(Error **errp)
{
GuestNetworkInterfaceList *head = NULL, *cur_item = NULL;
struct ifaddrs *ifap, *ifa;
if (getifaddrs(&ifap) < 0) {
error_setg_errno(errp, errno, "getifaddrs failed");
goto error;
}
for (ifa = ifap... | {
"code": [
" close(sock);",
" address_item = g_malloc0(sizeof(*address_item));",
" address_item->value = g_malloc0(sizeof(*address_item->value));",
" address_item = g_malloc0(sizeof(*address_item));",
" address_item->value = g_malloc0(sizeof(... | GuestNetworkInterfaceList *FUNC_0(Error **errp)
{
GuestNetworkInterfaceList *head = NULL, *cur_item = NULL;
struct ifaddrs *VAR_0, *VAR_1;
if (getifaddrs(&VAR_0) < 0) {
error_setg_errno(errp, errno, "getifaddrs failed");
goto error;
}
for (VAR_1 = VAR_0; VAR_1; VAR_1 = VA... | [
"GuestNetworkInterfaceList *FUNC_0(Error **errp)\n{",
"GuestNetworkInterfaceList *head = NULL, *cur_item = NULL;",
"struct ifaddrs *VAR_0, *VAR_1;",
"if (getifaddrs(&VAR_0) < 0) {",
"error_setg_errno(errp, errno, \"getifaddrs failed\");",
"goto error;",
"}",
"for (VAR_1 = VAR_0; VAR_1; VAR_1 = 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,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
49
],
[
51... |
8,536 | PPC_OP(mulli)
{
T0 = (Ts0 * SPARAM(1));
RETURN();
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | PPC_OP(mulli)
{
T0 = (Ts0 * SPARAM(1));
RETURN();
}
| {
"code": [
" RETURN();",
" T0 = (Ts0 * SPARAM(1));",
" RETURN();"
],
"line_no": [
7,
5,
7
]
} | FUNC_0(VAR_0)
{
T0 = (Ts0 * SPARAM(1));
RETURN();
}
| [
"FUNC_0(VAR_0)\n{",
"T0 = (Ts0 * SPARAM(1));",
"RETURN();",
"}"
] | [
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
8,537 | static int print_uint64(DeviceState *dev, Property *prop, char *dest, size_t len)
{
uint64_t *ptr = qdev_get_prop_ptr(dev, prop);
return snprintf(dest, len, "%" PRIu64, *ptr);
}
| true | qemu | 5cb9b56acfc0b50acf7ccd2d044ab4991c47fdde | static int print_uint64(DeviceState *dev, Property *prop, char *dest, size_t len)
{
uint64_t *ptr = qdev_get_prop_ptr(dev, prop);
return snprintf(dest, len, "%" PRIu64, *ptr);
}
| {
"code": [
" uint64_t *ptr = qdev_get_prop_ptr(dev, prop);",
"static int print_uint64(DeviceState *dev, Property *prop, char *dest, size_t len)",
" uint64_t *ptr = qdev_get_prop_ptr(dev, prop);",
" return snprintf(dest, len, \"%\" PRIu64, *ptr);"
],
"line_no": [
5,
1,
5,
... | static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, char *VAR_2, size_t VAR_3)
{
uint64_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1);
return snprintf(VAR_2, VAR_3, "%" PRIu64, *ptr);
}
| [
"static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, char *VAR_2, size_t VAR_3)\n{",
"uint64_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1);",
"return snprintf(VAR_2, VAR_3, \"%\" PRIu64, *ptr);",
"}"
] | [
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
8,539 | static av_always_inline void decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata,
int jobnr, int threadnr, int is_vp7)
{
VP8Context *s = avctx->priv_data;
VP8ThreadData *prev_td, *next_td, *td = &s->thread_data[threadnr];
int mb_y = td->thread_mb_pos >> 16... | true | FFmpeg | 7b5ff7d57355dc608f0fd86e3ab32a2fda65e752 | static av_always_inline void decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata,
int jobnr, int threadnr, int is_vp7)
{
VP8Context *s = avctx->priv_data;
VP8ThreadData *prev_td, *next_td, *td = &s->thread_data[threadnr];
int mb_y = td->thread_mb_pos >> 16... | {
"code": [
"static av_always_inline void decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata,"
],
"line_no": [
1
]
} | static av_always_inline void FUNC_0(AVCodecContext *avctx, void *tdata,
int jobnr, int threadnr, int is_vp7)
{
VP8Context *s = avctx->priv_data;
VP8ThreadData *prev_td, *next_td, *td = &s->thread_data[threadnr];
int VAR_0 = td->thread_mb_pos >> 16;
int VAR_1... | [
"static av_always_inline void FUNC_0(AVCodecContext *avctx, void *tdata,\nint jobnr, int threadnr, int is_vp7)\n{",
"VP8Context *s = avctx->priv_data;",
"VP8ThreadData *prev_td, *next_td, *td = &s->thread_data[threadnr];",
"int VAR_0 = td->thread_mb_pos >> 16;",
"int VAR_1, VAR_2 = VAR_0 * s->mb_width;",
... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27,
29,
31
],
[
33,
35
],
[
37,
39
],
[
41,
43
],
[
45,
47
],
[
49,... |
8,540 | static void yop_next_macroblock(YopDecContext *s)
{
// If we are advancing to the next row of macroblocks
if (s->row_pos == s->frame.linesize[0] - 2) {
s->dstptr += s->frame.linesize[0];
s->row_pos = 0;
}else {
s->row_pos += 2;
}
s->dstptr += 2;
}
| true | FFmpeg | c6303f8d70c25dd6c6e6486c78bf99c9924e2b6b | static void yop_next_macroblock(YopDecContext *s)
{
if (s->row_pos == s->frame.linesize[0] - 2) {
s->dstptr += s->frame.linesize[0];
s->row_pos = 0;
}else {
s->row_pos += 2;
}
s->dstptr += 2;
}
| {
"code": [
"static void yop_next_macroblock(YopDecContext *s)",
" if (s->row_pos == s->frame.linesize[0] - 2) {",
" s->dstptr += s->frame.linesize[0];",
" s->row_pos = 0;",
" }else {",
" s->row_pos += 2;",
" s->dstptr += 2;"
],
"line_no": [
1,
7... | static void FUNC_0(YopDecContext *VAR_0)
{
if (VAR_0->row_pos == VAR_0->frame.linesize[0] - 2) {
VAR_0->dstptr += VAR_0->frame.linesize[0];
VAR_0->row_pos = 0;
}else {
VAR_0->row_pos += 2;
}
VAR_0->dstptr += 2;
}
| [
"static void FUNC_0(YopDecContext *VAR_0)\n{",
"if (VAR_0->row_pos == VAR_0->frame.linesize[0] - 2) {",
"VAR_0->dstptr += VAR_0->frame.linesize[0];",
"VAR_0->row_pos = 0;",
"}else {",
"VAR_0->row_pos += 2;",
"}",
"VAR_0->dstptr += 2;",
"}"
] | [
1,
1,
1,
1,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
8,541 | static int ahci_populate_sglist(AHCIDevice *ad, QEMUSGList *sglist)
{
AHCICmdHdr *cmd = ad->cur_cmd;
uint32_t opts = le32_to_cpu(cmd->opts);
uint64_t prdt_addr = le64_to_cpu(cmd->tbl_addr) + 0x80;
int sglist_alloc_hint = opts >> AHCI_CMD_HDR_PRDT_LEN;
dma_addr_t prdt_len = (sglist_alloc_hint *... | true | qemu | 61f52e06f0a21bab782f98ef3ea789aa6d0aa046 | static int ahci_populate_sglist(AHCIDevice *ad, QEMUSGList *sglist)
{
AHCICmdHdr *cmd = ad->cur_cmd;
uint32_t opts = le32_to_cpu(cmd->opts);
uint64_t prdt_addr = le64_to_cpu(cmd->tbl_addr) + 0x80;
int sglist_alloc_hint = opts >> AHCI_CMD_HDR_PRDT_LEN;
dma_addr_t prdt_len = (sglist_alloc_hint *... | {
"code": [
"static int ahci_populate_sglist(AHCIDevice *ad, QEMUSGList *sglist)",
" qemu_sglist_init(sglist, sglist_alloc_hint, ad->hba->dma);"
],
"line_no": [
1,
69
]
} | static int FUNC_0(AHCIDevice *VAR_0, QEMUSGList *VAR_1)
{
AHCICmdHdr *cmd = VAR_0->cur_cmd;
uint32_t opts = le32_to_cpu(cmd->opts);
uint64_t prdt_addr = le64_to_cpu(cmd->tbl_addr) + 0x80;
int VAR_2 = opts >> AHCI_CMD_HDR_PRDT_LEN;
dma_addr_t prdt_len = (VAR_2 * sizeof(AHCI_SG));
dma_addr_... | [
"static int FUNC_0(AHCIDevice *VAR_0, QEMUSGList *VAR_1)\n{",
"AHCICmdHdr *cmd = VAR_0->cur_cmd;",
"uint32_t opts = le32_to_cpu(cmd->opts);",
"uint64_t prdt_addr = le64_to_cpu(cmd->tbl_addr) + 0x80;",
"int VAR_2 = opts >> AHCI_CMD_HDR_PRDT_LEN;",
"dma_addr_t prdt_len = (VAR_2 * sizeof(AHCI_SG));",
"dma_... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[... |
8,542 | static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
{
MpegEncContext *s = &ctx->m;
int width, height, vo_ver_id;
/* vol header */
skip_bits(gb, 1); /* random access */
s->vo_type = get_bits(gb, 8);
if (get_bits1(gb) != 0) { /* is_ol_id */
vo_... | true | FFmpeg | 3edc3b159503d512c919b3d5902f7026e961823a | static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
{
MpegEncContext *s = &ctx->m;
int width, height, vo_ver_id;
skip_bits(gb, 1);
s->vo_type = get_bits(gb, 8);
if (get_bits1(gb) != 0) {
vo_ver_id = get_bits(gb, 4);
skip_bits(g... | {
"code": [],
"line_no": []
} | static int FUNC_0(Mpeg4DecContext *VAR_0, GetBitContext *VAR_1)
{
MpegEncContext *s = &VAR_0->m;
int VAR_2, VAR_3, VAR_4;
skip_bits(VAR_1, 1);
s->vo_type = get_bits(VAR_1, 8);
if (get_bits1(VAR_1) != 0) {
VAR_4 = get_bits(VAR_1, 4);
skip_bits(VA... | [
"static int FUNC_0(Mpeg4DecContext *VAR_0, GetBitContext *VAR_1)\n{",
"MpegEncContext *s = &VAR_0->m;",
"int VAR_2, VAR_3, VAR_4;",
"skip_bits(VAR_1, 1);",
"s->vo_type = get_bits(VAR_1, 8);",
"if (get_bits1(VAR_1) != 0) {",
"VAR_4 = get_bits(VAR_1, 4);",
"skip_bits(VAR_1, 3);",
"} else {",
"VAR_4 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
2
],
[
3
],
[
4
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21,
22
],
[
... |
8,544 | static int ac3_probe(AVProbeData *p)
{
int max_frames, first_frames, frames;
uint8_t *buf, *buf2, *end;
AC3HeaderInfo hdr;
if(p->buf_size < 7)
return 0;
max_frames = 0;
buf = p->buf;
end = buf + FFMIN(4096, p->buf_size - 7);
for(; buf < end; buf++) {
buf2... | true | FFmpeg | 8c222bb405f7031b2326c601f5072ca2980b1079 | static int ac3_probe(AVProbeData *p)
{
int max_frames, first_frames, frames;
uint8_t *buf, *buf2, *end;
AC3HeaderInfo hdr;
if(p->buf_size < 7)
return 0;
max_frames = 0;
buf = p->buf;
end = buf + FFMIN(4096, p->buf_size - 7);
for(; buf < end; buf++) {
buf2... | {
"code": [
" int max_frames, first_frames, frames;"
],
"line_no": [
5
]
} | static int FUNC_0(AVProbeData *VAR_0)
{
int VAR_1, VAR_2, VAR_3;
uint8_t *buf, *buf2, *end;
AC3HeaderInfo hdr;
if(VAR_0->buf_size < 7)
return 0;
VAR_1 = 0;
buf = VAR_0->buf;
end = buf + FFMIN(4096, VAR_0->buf_size - 7);
for(; buf < end; buf++) {
buf2 = bu... | [
"static int FUNC_0(AVProbeData *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3;",
"uint8_t *buf, *buf2, *end;",
"AC3HeaderInfo hdr;",
"if(VAR_0->buf_size < 7)\nreturn 0;",
"VAR_1 = 0;",
"buf = VAR_0->buf;",
"end = buf + FFMIN(4096, VAR_0->buf_size - 7);",
"for(; buf < end; buf++) {",
"buf2 = buf;",
"for(V... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[... |
8,545 | static void virtio_ccw_device_plugged(DeviceState *d)
{
VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(d);
SubchDev *sch = dev->sch;
sch->id.cu_model = virtio_bus_get_vdev_id(&dev->bus);
css_generate_sch_crws(sch->cssid, sch->ssid, sch->schid,
d->hotplugged, 1);
}
| true | qemu | e83980455c8c7eb066405de512be7c4bace3ac4d | static void virtio_ccw_device_plugged(DeviceState *d)
{
VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(d);
SubchDev *sch = dev->sch;
sch->id.cu_model = virtio_bus_get_vdev_id(&dev->bus);
css_generate_sch_crws(sch->cssid, sch->ssid, sch->schid,
d->hotplugged, 1);
}
| {
"code": [
"static void virtio_ccw_device_plugged(DeviceState *d)"
],
"line_no": [
1
]
} | static void FUNC_0(DeviceState *VAR_0)
{
VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(VAR_0);
SubchDev *sch = dev->sch;
sch->id.cu_model = virtio_bus_get_vdev_id(&dev->bus);
css_generate_sch_crws(sch->cssid, sch->ssid, sch->schid,
VAR_0->hotplugged, 1);
}
| [
"static void FUNC_0(DeviceState *VAR_0)\n{",
"VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(VAR_0);",
"SubchDev *sch = dev->sch;",
"sch->id.cu_model = virtio_bus_get_vdev_id(&dev->bus);",
"css_generate_sch_crws(sch->cssid, sch->ssid, sch->schid,\nVAR_0->hotplugged, 1);",
"}"
] | [
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15,
17
],
[
19
]
] |
8,546 | static void digic_uart_write(void *opaque, hwaddr addr, uint64_t value,
unsigned size)
{
DigicUartState *s = opaque;
unsigned char ch = value;
addr >>= 2;
switch (addr) {
case R_TX:
if (s->chr) {
qemu_chr_fe_write_all(s->chr, &ch, 1);
... | true | qemu | 6ab3fc32ea640026726bc5f9f4db622d0954fb8a | static void digic_uart_write(void *opaque, hwaddr addr, uint64_t value,
unsigned size)
{
DigicUartState *s = opaque;
unsigned char ch = value;
addr >>= 2;
switch (addr) {
case R_TX:
if (s->chr) {
qemu_chr_fe_write_all(s->chr, &ch, 1);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2,
unsigned VAR_3)
{
DigicUartState *s = VAR_0;
unsigned char VAR_4 = VAR_2;
VAR_1 >>= 2;
switch (VAR_1) {
case R_TX:
if (s->chr) {
qemu_chr_fe_write_all(s->chr, &VAR_4, 1);
... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2,\nunsigned VAR_3)\n{",
"DigicUartState *s = VAR_0;",
"unsigned char VAR_4 = VAR_2;",
"VAR_1 >>= 2;",
"switch (VAR_1) {",
"case R_TX:\nif (s->chr) {",
"qemu_chr_fe_write_all(s->chr, &VAR_4, 1);",
"}",
"break;",
"case R_ST:\nbreak;",
"d... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
33,
57
],
[
61,
63,
65,
67
],
[
69
],
[
71
]
] |
8,547 | static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc,
vorbis_residue *vr,
uint_fast8_t ch,
uint_fast8_t *do_not_dec... | true | FFmpeg | 366d919016a679d3955f6fe5278fa7ce4f47b81e | static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc,
vorbis_residue *vr,
uint_fast8_t ch,
uint_fast8_t *do_not_dec... | {
"code": [
" uint_fast8_t *classifs = vr->classifs;"
],
"line_no": [
23
]
} | static av_always_inline int FUNC_0(vorbis_context *vc,
vorbis_residue *vr,
uint_fast8_t ch,
uint_fast8_t *do_not_decode,
... | [
"static av_always_inline int FUNC_0(vorbis_context *vc,\nvorbis_residue *vr,\nuint_fast8_t ch,\nuint_fast8_t *do_not_decode,\nfloat *vec,\nuint_fast16_t vlen,\nint vr_type)\n{",
"GetBitContext *gb = &vc->gb;",
"uint_fast8_t c_p_c = vc->codebooks[vr->classbook].dimensions;",
"uint_fast16_t ptns_to_read = vr->p... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11,
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[... |
8,548 | static int local_name_to_path(FsContext *ctx, V9fsPath *dir_path,
const char *name, V9fsPath *target)
{
if (dir_path) {
v9fs_path_sprintf(target, "%s/%s", dir_path->data, name);
} else {
v9fs_path_sprintf(target, "%s", name);
}
return 0;
}
| true | qemu | 9c6b899f7a46893ab3b671e341a2234e9c0c060e | static int local_name_to_path(FsContext *ctx, V9fsPath *dir_path,
const char *name, V9fsPath *target)
{
if (dir_path) {
v9fs_path_sprintf(target, "%s/%s", dir_path->data, name);
} else {
v9fs_path_sprintf(target, "%s", name);
}
return 0;
}
| {
"code": [
" } else {"
],
"line_no": [
11
]
} | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
const char *VAR_2, V9fsPath *VAR_3)
{
if (VAR_1) {
v9fs_path_sprintf(VAR_3, "%s/%s", VAR_1->data, VAR_2);
} else {
v9fs_path_sprintf(VAR_3, "%s", VAR_2);
}
return 0;
}
| [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,\nconst char *VAR_2, V9fsPath *VAR_3)\n{",
"if (VAR_1) {",
"v9fs_path_sprintf(VAR_3, \"%s/%s\", VAR_1->data, VAR_2);",
"} else {",
"v9fs_path_sprintf(VAR_3, \"%s\", VAR_2);",
"}",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
8,549 | static inline void RENAME(bgr24ToUV_half)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
{
int i;
for (i=0; i<width; i++) {
int b= src1[6*i + 0] + src1[6*i + 3];
int g= src1[6*i + 1] + src1[6*i + 4];
int r= src1[6*i + 2] + src1... | false | FFmpeg | d1adad3cca407f493c3637e20ecd4f7124e69212 | static inline void RENAME(bgr24ToUV_half)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
{
int i;
for (i=0; i<width; i++) {
int b= src1[6*i + 0] + src1[6*i + 3];
int g= src1[6*i + 1] + src1[6*i + 4];
int r= src1[6*i + 2] + src1... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(bgr24ToUV_half)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
{
int VAR_0;
for (VAR_0=0; VAR_0<width; VAR_0++) {
int b= src1[6*VAR_0 + 0] + src1[6*VAR_0 + 3];
int g= src1[6*VAR_0 + 1] + src1[6*VAR_0 + 4];
... | [
"static inline void FUNC_0(bgr24ToUV_half)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)\n{",
"int VAR_0;",
"for (VAR_0=0; VAR_0<width; VAR_0++) {",
"int b= src1[6*VAR_0 + 0] + src1[6*VAR_0 + 3];",
"int g= src1[6*VAR_0 + 1] + src1[6*VAR_0 + 4];",
"in... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
8,550 | static int ftp_parse_entry_mlsd(char *mlsd, AVIODirEntry *next)
{
char *fact, *value;
av_dlog(NULL, "%s\n", mlsd);
while(fact = av_strtok(mlsd, ";", &mlsd)) {
if (fact[0] == ' ') {
next->name = av_strdup(&fact[1]);
continue;
}
fact = av_strtok(fact, "... | false | FFmpeg | 229843aa359ae0c9519977d7fa952688db63f559 | static int ftp_parse_entry_mlsd(char *mlsd, AVIODirEntry *next)
{
char *fact, *value;
av_dlog(NULL, "%s\n", mlsd);
while(fact = av_strtok(mlsd, ";", &mlsd)) {
if (fact[0] == ' ') {
next->name = av_strdup(&fact[1]);
continue;
}
fact = av_strtok(fact, "... | {
"code": [],
"line_no": []
} | static int FUNC_0(char *VAR_0, AVIODirEntry *VAR_1)
{
char *VAR_2, *VAR_3;
av_dlog(NULL, "%s\n", VAR_0);
while(VAR_2 = av_strtok(VAR_0, ";", &VAR_0)) {
if (VAR_2[0] == ' ') {
VAR_1->name = av_strdup(&VAR_2[1]);
continue;
}
VAR_2 = av_strtok(VAR_2, "="... | [
"static int FUNC_0(char *VAR_0, AVIODirEntry *VAR_1)\n{",
"char *VAR_2, *VAR_3;",
"av_dlog(NULL, \"%s\\n\", VAR_0);",
"while(VAR_2 = av_strtok(VAR_0, \";\", &VAR_0)) {",
"if (VAR_2[0] == ' ') {",
"VAR_1->name = av_strdup(&VAR_2[1]);",
"continue;",
"}",
"VAR_2 = av_strtok(VAR_2, \"=\", &VAR_3);",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27,
29
],
[
31,
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
8,551 | static int get_scale_idx(GetBitContext *gb, int ref)
{
int t = get_vlc2(gb, dscf_vlc.table, MPC7_DSCF_BITS, 1) - 7;
if (t == 8)
return get_bits(gb, 6);
return ref + t;
}
| false | FFmpeg | d7eabd50425a61b31e90c763a0c3e4316a725404 | static int get_scale_idx(GetBitContext *gb, int ref)
{
int t = get_vlc2(gb, dscf_vlc.table, MPC7_DSCF_BITS, 1) - 7;
if (t == 8)
return get_bits(gb, 6);
return ref + t;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(GetBitContext *VAR_0, int VAR_1)
{
int VAR_2 = get_vlc2(VAR_0, dscf_vlc.table, MPC7_DSCF_BITS, 1) - 7;
if (VAR_2 == 8)
return get_bits(VAR_0, 6);
return VAR_1 + VAR_2;
}
| [
"static int FUNC_0(GetBitContext *VAR_0, int VAR_1)\n{",
"int VAR_2 = get_vlc2(VAR_0, dscf_vlc.table, MPC7_DSCF_BITS, 1) - 7;",
"if (VAR_2 == 8)\nreturn get_bits(VAR_0, 6);",
"return VAR_1 + VAR_2;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
]
] |
8,552 | int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
struct image_info * info)
{
struct elfhdr elf_ex;
struct elfhdr interp_elf_ex;
struct exec interp_ex;
int interpreter_fd = -1; /* avoid warning */
abi_ulong load_addr, load_bias;
int load_ad... | false | qemu | 9058abdd180843473d440958c79a1a781be723c1 | int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
struct image_info * info)
{
struct elfhdr elf_ex;
struct elfhdr interp_elf_ex;
struct exec interp_ex;
int interpreter_fd = -1;
abi_ulong load_addr, load_bias;
int load_addr_set = 0;
un... | {
"code": [],
"line_no": []
} | int FUNC_0(struct linux_binprm * VAR_0, struct target_pt_regs * VAR_1,
struct image_info * VAR_2)
{
struct elfhdr VAR_3;
struct elfhdr VAR_4;
struct exec VAR_5;
int VAR_6 = -1;
abi_ulong load_addr, load_bias;
int VAR_7 = 0;
unsigned int VAR_8 = INTERPRETER_NONE;... | [
"int FUNC_0(struct linux_binprm * VAR_0, struct target_pt_regs * VAR_1,\nstruct image_info * VAR_2)\n{",
"struct elfhdr VAR_3;",
"struct elfhdr VAR_4;",
"struct exec VAR_5;",
"int VAR_6 = -1;",
"abi_ulong load_addr, load_bias;",
"int VAR_7 = 0;",
"unsigned int VAR_8 = INTERPRETER_NONE;",
"unsigned c... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
8,553 | static sd_rsp_type_t sd_app_command(SDState *sd,
SDRequest req)
{
DPRINTF("ACMD%d 0x%08x\n", req.cmd, req.arg);
sd->card_status |= APP_CMD;
switch (req.cmd) {
case 6: /* ACMD6: SET_BUS_WIDTH */
switch (sd->state) {
case sd_transfer_state:
... | false | qemu | dd26eb43337adf53d22b3fda3591e3837bc08b8c | static sd_rsp_type_t sd_app_command(SDState *sd,
SDRequest req)
{
DPRINTF("ACMD%d 0x%08x\n", req.cmd, req.arg);
sd->card_status |= APP_CMD;
switch (req.cmd) {
case 6:
switch (sd->state) {
case sd_transfer_state:
sd->sd_status[0] &... | {
"code": [],
"line_no": []
} | static sd_rsp_type_t FUNC_0(SDState *sd,
SDRequest req)
{
DPRINTF("ACMD%d 0x%08x\n", req.cmd, req.arg);
sd->card_status |= APP_CMD;
switch (req.cmd) {
case 6:
switch (sd->state) {
case sd_transfer_state:
sd->sd_status[0] &= 0x3f;
... | [
"static sd_rsp_type_t FUNC_0(SDState *sd,\nSDRequest req)\n{",
"DPRINTF(\"ACMD%d 0x%08x\\n\", req.cmd, req.arg);",
"sd->card_status |= APP_CMD;",
"switch (req.cmd) {",
"case 6:\nswitch (sd->state) {",
"case sd_transfer_state:\nsd->sd_status[0] &= 0x3f;",
"sd->sd_status[0] |= (req.arg & 0x03) << 6;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13,
15
],
[
17,
19
],
[
21
],
[
23
],
[
27,
29
],
[
31
],
[
33
],
[
37,
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
53,... |
8,554 | static void bt_dummy_lmp_connection_complete(struct bt_link_s *link)
{
if (link->slave->reject_reason)
fprintf(stderr, "%s: stray LMP_not_accepted received, fixme\n",
__func__);
else
fprintf(stderr, "%s: stray LMP_accepted received, fixme\n",
... | false | qemu | bf937a7965c1d1a6dce4f615d0ead2e2ab505004 | static void bt_dummy_lmp_connection_complete(struct bt_link_s *link)
{
if (link->slave->reject_reason)
fprintf(stderr, "%s: stray LMP_not_accepted received, fixme\n",
__func__);
else
fprintf(stderr, "%s: stray LMP_accepted received, fixme\n",
... | {
"code": [],
"line_no": []
} | static void FUNC_0(struct bt_link_s *VAR_0)
{
if (VAR_0->slave->reject_reason)
fprintf(stderr, "%s: stray LMP_not_accepted received, fixme\n",
__func__);
else
fprintf(stderr, "%s: stray LMP_accepted received, fixme\n",
__func__);
exit(-... | [
"static void FUNC_0(struct bt_link_s *VAR_0)\n{",
"if (VAR_0->slave->reject_reason)\nfprintf(stderr, \"%s: stray LMP_not_accepted received, fixme\\n\",\n__func__);",
"else\nfprintf(stderr, \"%s: stray LMP_accepted received, fixme\\n\",\n__func__);",
"exit(-1);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7,
9
],
[
11,
13,
15
],
[
17
],
[
19
]
] |
8,555 | static void add_flagname_to_bitmaps(const char *flagname, uint32_t *features,
uint32_t *ext_features,
uint32_t *ext2_features,
uint32_t *ext3_features)
{
int i;
int found = 0;
for ( i = 0 ; i... | false | qemu | bb0300dc57c10b3721451b0ff566a03f9276cc77 | static void add_flagname_to_bitmaps(const char *flagname, uint32_t *features,
uint32_t *ext_features,
uint32_t *ext2_features,
uint32_t *ext3_features)
{
int i;
int found = 0;
for ( i = 0 ; i... | {
"code": [],
"line_no": []
} | static void FUNC_0(const char *VAR_0, uint32_t *VAR_1,
uint32_t *VAR_2,
uint32_t *VAR_3,
uint32_t *VAR_4)
{
int VAR_5;
int VAR_6 = 0;
for ( VAR_5 = 0 ; VAR_5 < 32 ; VAR_5++ )
if (fea... | [
"static void FUNC_0(const char *VAR_0, uint32_t *VAR_1,\nuint32_t *VAR_2,\nuint32_t *VAR_3,\nuint32_t *VAR_4)\n{",
"int VAR_5;",
"int VAR_6 = 0;",
"for ( VAR_5 = 0 ; VAR_5 < 32 ; VAR_5++ )",
"if (feature_name[VAR_5] && !strcmp (VAR_0, feature_name[VAR_5])) {",
"*VAR_1 |= 1 << VAR_5;",
"VAR_6 = 1;",
"}... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
8,556 | struct pxa2xx_i2c_s *pxa2xx_i2c_init(target_phys_addr_t base,
qemu_irq irq, int ioregister)
{
int iomemtype;
struct pxa2xx_i2c_s *s = (struct pxa2xx_i2c_s *)
i2c_slave_init(i2c_init_bus(), 0, sizeof(struct pxa2xx_i2c_s));
s->base = base;
s->irq = irq;
s->slave.e... | false | qemu | 2a1639291bf9f3c88c62d10459fedaa677536ff5 | struct pxa2xx_i2c_s *pxa2xx_i2c_init(target_phys_addr_t base,
qemu_irq irq, int ioregister)
{
int iomemtype;
struct pxa2xx_i2c_s *s = (struct pxa2xx_i2c_s *)
i2c_slave_init(i2c_init_bus(), 0, sizeof(struct pxa2xx_i2c_s));
s->base = base;
s->irq = irq;
s->slave.e... | {
"code": [],
"line_no": []
} | struct pxa2xx_i2c_s *FUNC_0(target_phys_addr_t VAR_0,
qemu_irq VAR_1, int VAR_2)
{
int VAR_3;
struct pxa2xx_i2c_s *VAR_4 = (struct pxa2xx_i2c_s *)
i2c_slave_init(i2c_init_bus(), 0, sizeof(struct pxa2xx_i2c_s));
VAR_4->VAR_0 = VAR_0;
VAR_4->VAR_1 = VAR_1;
VAR_4->... | [
"struct pxa2xx_i2c_s *FUNC_0(target_phys_addr_t VAR_0,\nqemu_irq VAR_1, int VAR_2)\n{",
"int VAR_3;",
"struct pxa2xx_i2c_s *VAR_4 = (struct pxa2xx_i2c_s *)\ni2c_slave_init(i2c_init_bus(), 0, sizeof(struct pxa2xx_i2c_s));",
"VAR_4->VAR_0 = VAR_0;",
"VAR_4->VAR_1 = VAR_1;",
"VAR_4->slave.event = pxa2xx_i2c_... | [
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
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
41,
43
],
[
47
],
[
49
]
] |
8,557 | static int v9fs_synth_link(FsContext *fs_ctx, V9fsPath *oldpath,
V9fsPath *newpath, const char *buf)
{
errno = EPERM;
return -1;
}
| false | qemu | 364031f17932814484657e5551ba12957d993d7e | static int v9fs_synth_link(FsContext *fs_ctx, V9fsPath *oldpath,
V9fsPath *newpath, const char *buf)
{
errno = EPERM;
return -1;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
V9fsPath *VAR_2, const char *VAR_3)
{
errno = EPERM;
return -1;
}
| [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,\nV9fsPath *VAR_2, const char *VAR_3)\n{",
"errno = EPERM;",
"return -1;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
]
] |
8,558 | static bool pmsav7_rgnr_vmstate_validate(void *opaque, int version_id)
{
ARMCPU *cpu = opaque;
return cpu->env.pmsav7.rnr < cpu->pmsav7_dregion;
}
| false | qemu | 1bc04a8880374407c4b12d82ceb8752e12ff5336 | static bool pmsav7_rgnr_vmstate_validate(void *opaque, int version_id)
{
ARMCPU *cpu = opaque;
return cpu->env.pmsav7.rnr < cpu->pmsav7_dregion;
}
| {
"code": [],
"line_no": []
} | static bool FUNC_0(void *opaque, int version_id)
{
ARMCPU *cpu = opaque;
return cpu->env.pmsav7.rnr < cpu->pmsav7_dregion;
}
| [
"static bool FUNC_0(void *opaque, int version_id)\n{",
"ARMCPU *cpu = opaque;",
"return cpu->env.pmsav7.rnr < cpu->pmsav7_dregion;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
8,559 | int net_init_dump(const NetClientOptions *opts, const char *name,
NetClientState *peer, Error **errp)
{
int len, rc;
const char *file;
char def_file[128];
const NetdevDumpOptions *dump;
NetClientState *nc;
DumpNetClient *dnc;
assert(opts->type == NET_CLIENT_OPTIO... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | int net_init_dump(const NetClientOptions *opts, const char *name,
NetClientState *peer, Error **errp)
{
int len, rc;
const char *file;
char def_file[128];
const NetdevDumpOptions *dump;
NetClientState *nc;
DumpNetClient *dnc;
assert(opts->type == NET_CLIENT_OPTIO... | {
"code": [],
"line_no": []
} | int FUNC_0(const NetClientOptions *VAR_0, const char *VAR_1,
NetClientState *VAR_2, Error **VAR_3)
{
int VAR_4, VAR_5;
const char *VAR_6;
char VAR_7[128];
const NetdevDumpOptions *VAR_8;
NetClientState *nc;
DumpNetClient *dnc;
assert(VAR_0->type == NET_CLIENT_OPT... | [
"int FUNC_0(const NetClientOptions *VAR_0, const char *VAR_1,\nNetClientState *VAR_2, Error **VAR_3)\n{",
"int VAR_4, VAR_5;",
"const char *VAR_6;",
"char VAR_7[128];",
"const NetdevDumpOptions *VAR_8;",
"NetClientState *nc;",
"DumpNetClient *dnc;",
"assert(VAR_0->type == NET_CLIENT_OPTIONS_KIND_DUMP)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[
51
],
[... |
8,560 | static int handle_secondary_tcp_pkt(NetFilterState *nf,
Connection *conn,
Packet *pkt)
{
struct tcphdr *tcp_pkt;
tcp_pkt = (struct tcphdr *)pkt->transport_header;
if (trace_event_get_state(TRACE_COLO_FILTER_REWRITER_DEBUG)) {
... | false | qemu | db0a762e4be965b8976abe9df82c6d47c57336fc | static int handle_secondary_tcp_pkt(NetFilterState *nf,
Connection *conn,
Packet *pkt)
{
struct tcphdr *tcp_pkt;
tcp_pkt = (struct tcphdr *)pkt->transport_header;
if (trace_event_get_state(TRACE_COLO_FILTER_REWRITER_DEBUG)) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(NetFilterState *VAR_0,
Connection *VAR_1,
Packet *VAR_2)
{
struct tcphdr *VAR_3;
VAR_3 = (struct tcphdr *)VAR_2->transport_header;
if (trace_event_get_state(TRACE_COLO_FILTER_REWRITER_DEBUG)) {
trace... | [
"static int FUNC_0(NetFilterState *VAR_0,\nConnection *VAR_1,\nPacket *VAR_2)\n{",
"struct tcphdr *VAR_3;",
"VAR_3 = (struct tcphdr *)VAR_2->transport_header;",
"if (trace_event_get_state(TRACE_COLO_FILTER_REWRITER_DEBUG)) {",
"trace_colo_filter_rewriter_pkt_info(__func__,\ninet_ntoa(VAR_2->ip->ip_src), ine... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
17
],
[
19,
21,
23,
25
],
[
27
],
[
29
],
[
33
],
[
45
],
[
47
],
[
51
],
[
55
],
[
59
],
[
61
],
[
65
],
[
67
]
] |
8,561 | static void nvdimm_dsm_reserved_root(AcpiNVDIMMState *state, NvdimmDsmIn *in,
hwaddr dsm_mem_addr)
{
switch (in->function) {
case 0x0:
nvdimm_dsm_function0(0x1 | 1 << 1 /* Read FIT */, dsm_mem_addr);
return;
case 0x1 /* Read FIT */:
nvdimm... | false | qemu | 5a33db78b0f3ee808a3d8dd5c427edfbe80bdc73 | static void nvdimm_dsm_reserved_root(AcpiNVDIMMState *state, NvdimmDsmIn *in,
hwaddr dsm_mem_addr)
{
switch (in->function) {
case 0x0:
nvdimm_dsm_function0(0x1 | 1 << 1 , dsm_mem_addr);
return;
case 0x1 :
nvdimm_dsm_func_read_fit(state, in... | {
"code": [],
"line_no": []
} | static void FUNC_0(AcpiNVDIMMState *VAR_0, NvdimmDsmIn *VAR_1,
hwaddr VAR_2)
{
switch (VAR_1->function) {
case 0x0:
nvdimm_dsm_function0(0x1 | 1 << 1 , VAR_2);
return;
case 0x1 :
nvdimm_dsm_func_read_fit(VAR_0, VAR_1, VAR_2);
retu... | [
"static void FUNC_0(AcpiNVDIMMState *VAR_0, NvdimmDsmIn *VAR_1,\nhwaddr VAR_2)\n{",
"switch (VAR_1->function) {",
"case 0x0:\nnvdimm_dsm_function0(0x1 | 1 << 1 , VAR_2);",
"return;",
"case 0x1 :\nnvdimm_dsm_func_read_fit(VAR_0, VAR_1, VAR_2);",
"return;",
"}",
"nvdimm_dsm_no_payload(NVDIMM_DSM_RET_STA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9,
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
25
],
[
27
]
] |
8,563 | static void omap_prcm_dpll_update(struct omap_prcm_s *s)
{
omap_clk dpll = omap_findclk(s->mpu, "dpll");
omap_clk dpll_x2 = omap_findclk(s->mpu, "dpll");
omap_clk core = omap_findclk(s->mpu, "core_clk");
int mode = (s->clken[9] >> 0) & 3;
int mult, div;
mult = (s->clksel[5] >> 12) & 0x3... | false | qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | static void omap_prcm_dpll_update(struct omap_prcm_s *s)
{
omap_clk dpll = omap_findclk(s->mpu, "dpll");
omap_clk dpll_x2 = omap_findclk(s->mpu, "dpll");
omap_clk core = omap_findclk(s->mpu, "core_clk");
int mode = (s->clken[9] >> 0) & 3;
int mult, div;
mult = (s->clksel[5] >> 12) & 0x3... | {
"code": [],
"line_no": []
} | static void FUNC_0(struct omap_prcm_s *VAR_0)
{
omap_clk dpll = omap_findclk(VAR_0->mpu, "dpll");
omap_clk dpll_x2 = omap_findclk(VAR_0->mpu, "dpll");
omap_clk core = omap_findclk(VAR_0->mpu, "core_clk");
int VAR_1 = (VAR_0->clken[9] >> 0) & 3;
int VAR_2, VAR_3;
VAR_2 = (VAR_0->clksel[5... | [
"static void FUNC_0(struct omap_prcm_s *VAR_0)\n{",
"omap_clk dpll = omap_findclk(VAR_0->mpu, \"dpll\");",
"omap_clk dpll_x2 = omap_findclk(VAR_0->mpu, \"dpll\");",
"omap_clk core = omap_findclk(VAR_0->mpu, \"core_clk\");",
"int VAR_1 = (VAR_0->clken[9] >> 0) & 3;",
"int VAR_2, VAR_3;",
"VAR_2 = (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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21,
23
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37,
39,
41
],
[
43
],
[
45
],
[
47,
49
],
[... |
8,564 | void HELPER(dc_zva)(CPUARMState *env, uint64_t vaddr_in)
{
/* Implement DC ZVA, which zeroes a fixed-length block of memory.
* Note that we do not implement the (architecturally mandated)
* alignment fault for attempts to use this on Device memory
* (which matches the usual QEMU behaviour of not... | false | qemu | 01ecaf438b1eb46abe23392c8ce5b7628b0c8cf5 | void HELPER(dc_zva)(CPUARMState *env, uint64_t vaddr_in)
{
ARMCPU *cpu = arm_env_get_cpu(env);
uint64_t blocklen = 4 << cpu->dcz_blocksize;
uint64_t vaddr = vaddr_in & ~(blocklen - 1);
#ifndef CONFIG_USER_ONLY
{
int maxidx = DIV_ROUND_UP(blocklen,... | {
"code": [],
"line_no": []
} | void FUNC_0(dc_zva)(CPUARMState *env, uint64_t vaddr_in)
{
ARMCPU *cpu = arm_env_get_cpu(env);
uint64_t blocklen = 4 << cpu->dcz_blocksize;
uint64_t vaddr = vaddr_in & ~(blocklen - 1);
#ifndef CONFIG_USER_ONLY
{
int VAR_0 = DIV_ROUND_UP(blocklen, ... | [
"void FUNC_0(dc_zva)(CPUARMState *env, uint64_t vaddr_in)\n{",
"ARMCPU *cpu = arm_env_get_cpu(env);",
"uint64_t blocklen = 4 << cpu->dcz_blocksize;",
"uint64_t vaddr = vaddr_in & ~(blocklen - 1);",
"#ifndef CONFIG_USER_ONLY\n{",
"int VAR_0 = DIV_ROUND_UP(blocklen, TARGET_PAGE_SIZE);",
"void *VAR_1[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
] | [
[
1,
3
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
57
],
[
61
],
[
63,
65,
67
],
[
69
],
[
71
],
[
73
],
[
75
],
[
77
],
... |
8,567 | static void slirp_bootp_load(QEMUFile *f, Slirp *slirp)
{
int i;
for (i = 0; i < NB_BOOTP_CLIENTS; i++) {
slirp->bootp_clients[i].allocated = qemu_get_be16(f);
qemu_get_buffer(f, slirp->bootp_clients[i].macaddr, 6);
}
}
| false | qemu | eb5d4f5329df83ea15244b47f7fbca21adaae41b | static void slirp_bootp_load(QEMUFile *f, Slirp *slirp)
{
int i;
for (i = 0; i < NB_BOOTP_CLIENTS; i++) {
slirp->bootp_clients[i].allocated = qemu_get_be16(f);
qemu_get_buffer(f, slirp->bootp_clients[i].macaddr, 6);
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(QEMUFile *VAR_0, Slirp *VAR_1)
{
int VAR_2;
for (VAR_2 = 0; VAR_2 < NB_BOOTP_CLIENTS; VAR_2++) {
VAR_1->bootp_clients[VAR_2].allocated = qemu_get_be16(VAR_0);
qemu_get_buffer(VAR_0, VAR_1->bootp_clients[VAR_2].macaddr, 6);
}
}
| [
"static void FUNC_0(QEMUFile *VAR_0, Slirp *VAR_1)\n{",
"int VAR_2;",
"for (VAR_2 = 0; VAR_2 < NB_BOOTP_CLIENTS; VAR_2++) {",
"VAR_1->bootp_clients[VAR_2].allocated = qemu_get_be16(VAR_0);",
"qemu_get_buffer(VAR_0, VAR_1->bootp_clients[VAR_2].macaddr, 6);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
8,569 | static int scsi_handle_rw_error(SCSIDiskReq *r, int error)
{
bool is_read = (r->req.cmd.xfer == SCSI_XFER_FROM_DEV);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
BlockErrorAction action = bdrv_get_error_action(s->qdev.conf.bs, is_read, error);
if (action == BLOCK_ERROR_ACTION_RE... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static int scsi_handle_rw_error(SCSIDiskReq *r, int error)
{
bool is_read = (r->req.cmd.xfer == SCSI_XFER_FROM_DEV);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
BlockErrorAction action = bdrv_get_error_action(s->qdev.conf.bs, is_read, error);
if (action == BLOCK_ERROR_ACTION_RE... | {
"code": [],
"line_no": []
} | static int FUNC_0(SCSIDiskReq *VAR_0, int VAR_1)
{
bool is_read = (VAR_0->req.cmd.xfer == SCSI_XFER_FROM_DEV);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->req.dev);
BlockErrorAction action = bdrv_get_error_action(s->qdev.conf.bs, is_read, VAR_1);
if (action == BLOCK_ERROR_ACTION_REPO... | [
"static int FUNC_0(SCSIDiskReq *VAR_0, int VAR_1)\n{",
"bool is_read = (VAR_0->req.cmd.xfer == SCSI_XFER_FROM_DEV);",
"SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->req.dev);",
"BlockErrorAction action = bdrv_get_error_action(s->qdev.conf.bs, is_read, VAR_1);",
"if (action == BLOCK_ERROR_ACTION_R... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[... |
8,570 | void migrate_fd_connect(MigrationState *s)
{
s->state = MIG_STATE_ACTIVE;
trace_migrate_set_state(MIG_STATE_ACTIVE);
s->bytes_xfer = 0;
/* This is a best 1st approximation. ns to ms */
s->expected_downtime = max_downtime/1000000;
s->cleanup_bh = qemu_bh_new(migrate_fd_cleanup, s);
... | false | qemu | 1964a397063967acc5ce71a2a24ed26e74824ee1 | void migrate_fd_connect(MigrationState *s)
{
s->state = MIG_STATE_ACTIVE;
trace_migrate_set_state(MIG_STATE_ACTIVE);
s->bytes_xfer = 0;
s->expected_downtime = max_downtime/1000000;
s->cleanup_bh = qemu_bh_new(migrate_fd_cleanup, s);
s->file = qemu_fopen_ops(s, &migration_file_op... | {
"code": [],
"line_no": []
} | void FUNC_0(MigrationState *VAR_0)
{
VAR_0->state = MIG_STATE_ACTIVE;
trace_migrate_set_state(MIG_STATE_ACTIVE);
VAR_0->bytes_xfer = 0;
VAR_0->expected_downtime = max_downtime/1000000;
VAR_0->cleanup_bh = qemu_bh_new(migrate_fd_cleanup, VAR_0);
VAR_0->file = qemu_fopen_ops(VAR_0... | [
"void FUNC_0(MigrationState *VAR_0)\n{",
"VAR_0->state = MIG_STATE_ACTIVE;",
"trace_migrate_set_state(MIG_STATE_ACTIVE);",
"VAR_0->bytes_xfer = 0;",
"VAR_0->expected_downtime = max_downtime/1000000;",
"VAR_0->cleanup_bh = qemu_bh_new(migrate_fd_cleanup, VAR_0);",
"VAR_0->file = qemu_fopen_ops(VAR_0, &mi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
19
],
[
21
],
[
25,
27
],
[
31,
33
],
[
35
],
[
37
]
] |
8,571 | void *iommu_dma_memory_map(DMAContext *dma, dma_addr_t addr, dma_addr_t *len,
DMADirection dir)
{
int err;
target_phys_addr_t paddr, plen;
void *buf;
if (dma->map) {
return dma->map(dma, addr, len, dir);
}
plen = *len;
err = dma->translate(dma... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | void *iommu_dma_memory_map(DMAContext *dma, dma_addr_t addr, dma_addr_t *len,
DMADirection dir)
{
int err;
target_phys_addr_t paddr, plen;
void *buf;
if (dma->map) {
return dma->map(dma, addr, len, dir);
}
plen = *len;
err = dma->translate(dma... | {
"code": [],
"line_no": []
} | void *FUNC_0(DMAContext *VAR_0, dma_addr_t VAR_1, dma_addr_t *VAR_2,
DMADirection VAR_3)
{
int VAR_4;
target_phys_addr_t paddr, plen;
void *VAR_5;
if (VAR_0->map) {
return VAR_0->map(VAR_0, VAR_1, VAR_2, VAR_3);
}
plen = *VAR_2;
VAR_4 = VAR_0-... | [
"void *FUNC_0(DMAContext *VAR_0, dma_addr_t VAR_1, dma_addr_t *VAR_2,\nDMADirection VAR_3)\n{",
"int VAR_4;",
"target_phys_addr_t paddr, plen;",
"void *VAR_5;",
"if (VAR_0->map) {",
"return VAR_0->map(VAR_0, VAR_1, VAR_2, VAR_3);",
"}",
"plen = *VAR_2;",
"VAR_4 = VAR_0->translate(VAR_0, VAR_1, &padd... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
],
[
59
],
[
61
]
] |
8,572 | static void lx_init(const LxBoardDesc *board, MachineState *machine)
{
#ifdef TARGET_WORDS_BIGENDIAN
int be = 1;
#else
int be = 0;
#endif
MemoryRegion *system_memory = get_system_memory();
XtensaCPU *cpu = NULL;
CPUXtensaState *env = NULL;
MemoryRegion *ram, *rom, *system_io;
Driv... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static void lx_init(const LxBoardDesc *board, MachineState *machine)
{
#ifdef TARGET_WORDS_BIGENDIAN
int be = 1;
#else
int be = 0;
#endif
MemoryRegion *system_memory = get_system_memory();
XtensaCPU *cpu = NULL;
CPUXtensaState *env = NULL;
MemoryRegion *ram, *rom, *system_io;
Driv... | {
"code": [],
"line_no": []
} | static void FUNC_0(const LxBoardDesc *VAR_0, MachineState *VAR_1)
{
#ifdef TARGET_WORDS_BIGENDIAN
int VAR_2 = 1;
#else
int VAR_2 = 0;
#endif
MemoryRegion *system_memory = get_system_memory();
XtensaCPU *cpu = NULL;
CPUXtensaState *env = NULL;
MemoryRegion *ram, *rom, *system_io;
D... | [
"static void FUNC_0(const LxBoardDesc *VAR_0, MachineState *VAR_1)\n{",
"#ifdef TARGET_WORDS_BIGENDIAN\nint VAR_2 = 1;",
"#else\nint VAR_2 = 0;",
"#endif\nMemoryRegion *system_memory = get_system_memory();",
"XtensaCPU *cpu = NULL;",
"CPUXtensaState *env = NULL;",
"MemoryRegion *ram, *rom, *system_io;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[... |
8,575 | void kvm_arch_reset_vcpu(X86CPU *cpu)
{
CPUX86State *env = &cpu->env;
env->exception_injected = -1;
env->interrupt_injected = -1;
env->xcr0 = 1;
if (kvm_irqchip_in_kernel()) {
env->mp_state = cpu_is_bsp(cpu) ? KVM_MP_STATE_RUNNABLE :
KVM_MP... | false | qemu | b7394c8394d38cb38b6db14eb431cac7a91e7140 | void kvm_arch_reset_vcpu(X86CPU *cpu)
{
CPUX86State *env = &cpu->env;
env->exception_injected = -1;
env->interrupt_injected = -1;
env->xcr0 = 1;
if (kvm_irqchip_in_kernel()) {
env->mp_state = cpu_is_bsp(cpu) ? KVM_MP_STATE_RUNNABLE :
KVM_MP... | {
"code": [],
"line_no": []
} | void FUNC_0(X86CPU *VAR_0)
{
CPUX86State *env = &VAR_0->env;
env->exception_injected = -1;
env->interrupt_injected = -1;
env->xcr0 = 1;
if (kvm_irqchip_in_kernel()) {
env->mp_state = cpu_is_bsp(VAR_0) ? KVM_MP_STATE_RUNNABLE :
KVM_MP_STATE_... | [
"void FUNC_0(X86CPU *VAR_0)\n{",
"CPUX86State *env = &VAR_0->env;",
"env->exception_injected = -1;",
"env->interrupt_injected = -1;",
"env->xcr0 = 1;",
"if (kvm_irqchip_in_kernel()) {",
"env->mp_state = cpu_is_bsp(VAR_0) ? KVM_MP_STATE_RUNNABLE :\nKVM_MP_STATE_UNINITIALIZED;",
"} else {",
"env->mp_s... | [
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
8,576 | static int speex_header(AVFormatContext *s, int idx) {
struct ogg *ogg = s->priv_data;
struct ogg_stream *os = ogg->streams + idx;
struct speex_params *spxp = os->private;
AVStream *st = s->streams[idx];
uint8_t *p = os->buf + os->pstart;
if (!spxp) {
spxp = av_mallocz(sizeof(*s... | true | FFmpeg | eb5cc8febc6cd7938f8fdce95d78cacdbe1be30b | static int speex_header(AVFormatContext *s, int idx) {
struct ogg *ogg = s->priv_data;
struct ogg_stream *os = ogg->streams + idx;
struct speex_params *spxp = os->private;
AVStream *st = s->streams[idx];
uint8_t *p = os->buf + os->pstart;
if (!spxp) {
spxp = av_mallocz(sizeof(*s... | {
"code": [
" ff_alloc_extradata(st->codec, os->psize);"
],
"line_no": [
79
]
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1) {
struct VAR_2 *VAR_2 = VAR_0->priv_data;
struct ogg_stream *VAR_3 = VAR_2->streams + VAR_1;
struct speex_params *VAR_4 = VAR_3->private;
AVStream *st = VAR_0->streams[VAR_1];
uint8_t *p = VAR_3->buf + VAR_3->pstart;
if (!VAR_4) {
... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1) {",
"struct VAR_2 *VAR_2 = VAR_0->priv_data;",
"struct ogg_stream *VAR_3 = VAR_2->streams + VAR_1;",
"struct speex_params *VAR_4 = VAR_3->private;",
"AVStream *st = VAR_0->streams[VAR_1];",
"uint8_t *p = VAR_3->buf + VAR_3->pstart;",
"if (!VAR_4) {",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
... |
8,578 | static ExitStatus trans_fop_wed_0e(DisasContext *ctx, uint32_t insn,
const DisasInsn *di)
{
unsigned rt = assemble_rt64(insn);
unsigned ra = extract32(insn, 21, 5);
return do_fop_wed(ctx, rt, ra, di->f_wed);
}
| true | qemu | eff235eb2bcd7092901f4698a7907e742f3b7f2f | static ExitStatus trans_fop_wed_0e(DisasContext *ctx, uint32_t insn,
const DisasInsn *di)
{
unsigned rt = assemble_rt64(insn);
unsigned ra = extract32(insn, 21, 5);
return do_fop_wed(ctx, rt, ra, di->f_wed);
}
| {
"code": [
" return do_fop_wed(ctx, rt, ra, di->f_wed);",
" return do_fop_wed(ctx, rt, ra, di->f_wed);"
],
"line_no": [
11,
11
]
} | static ExitStatus FUNC_0(DisasContext *ctx, uint32_t insn,
const DisasInsn *di)
{
unsigned VAR_0 = assemble_rt64(insn);
unsigned VAR_1 = extract32(insn, 21, 5);
return do_fop_wed(ctx, VAR_0, VAR_1, di->f_wed);
}
| [
"static ExitStatus FUNC_0(DisasContext *ctx, uint32_t insn,\nconst DisasInsn *di)\n{",
"unsigned VAR_0 = assemble_rt64(insn);",
"unsigned VAR_1 = extract32(insn, 21, 5);",
"return do_fop_wed(ctx, VAR_0, VAR_1, di->f_wed);",
"}"
] | [
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
8,579 | void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb, VP8FilterStrength *f)
{
int interior_limit, filter_level;
if (s->segmentation.enabled) {
filter_level = s->segmentation.filter_level[mb->segment];
if (!s->segmentation.absolute_vals)
filter_level += s->filter.level;
... | true | FFmpeg | ac4b32df71bd932838043a4838b86d11e169707f | void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb, VP8FilterStrength *f)
{
int interior_limit, filter_level;
if (s->segmentation.enabled) {
filter_level = s->segmentation.filter_level[mb->segment];
if (!s->segmentation.absolute_vals)
filter_level += s->filter.level;
... | {
"code": [
"void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb, VP8FilterStrength *f)",
" f->inner_filter = !mb->skip || mb->mode == MODE_I4x4 ||"
],
"line_no": [
1,
55
]
} | void FUNC_0(VP8Context *VAR_0, VP8Macroblock *VAR_1, VP8FilterStrength *VAR_2)
{
int VAR_3, VAR_4;
if (VAR_0->segmentation.enabled) {
VAR_4 = VAR_0->segmentation.VAR_4[VAR_1->segment];
if (!VAR_0->segmentation.absolute_vals)
VAR_4 += VAR_0->filter.level;
} else
... | [
"void FUNC_0(VP8Context *VAR_0, VP8Macroblock *VAR_1, VP8FilterStrength *VAR_2)\n{",
"int VAR_3, VAR_4;",
"if (VAR_0->segmentation.enabled) {",
"VAR_4 = VAR_0->segmentation.VAR_4[VAR_1->segment];",
"if (!VAR_0->segmentation.absolute_vals)\nVAR_4 += VAR_0->filter.level;",
"} else",
"VAR_4 = VAR_0->filter... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
... |
8,580 | void muls64(int64_t *phigh, int64_t *plow, int64_t a, int64_t b)
{
#if defined(__x86_64__)
__asm__ ("imul %0\n\t"
: "=d" (*phigh), "=a" (*plow)
: "a" (a), "0" (b)
);
#else
int64_t ph;
uint64_t pm1, pm2, pl;
pl = (uint64_t)((uint32_t)a) * (uint64_t)((uin... | true | qemu | 67fc07d3fba681f3362f7644a69b7a581a2670e8 | void muls64(int64_t *phigh, int64_t *plow, int64_t a, int64_t b)
{
#if defined(__x86_64__)
__asm__ ("imul %0\n\t"
: "=d" (*phigh), "=a" (*plow)
: "a" (a), "0" (b)
);
#else
int64_t ph;
uint64_t pm1, pm2, pl;
pl = (uint64_t)((uint32_t)a) * (uint64_t)((uin... | {
"code": [
" pm1 = (uint64_t)((uint32_t)pm1) + pm2 + (pl >> 32);",
" pm1 = (uint64_t)((uint32_t)pm1) + pm2 + (pl >> 32);"
],
"line_no": [
35,
35
]
} | void FUNC_0(int64_t *VAR_0, int64_t *VAR_1, int64_t VAR_2, int64_t VAR_3)
{
#if defined(__x86_64__)
__asm__ ("imul %0\n\t"
: "=d" (*VAR_0), "=VAR_2" (*VAR_1)
: "VAR_2" (VAR_2), "0" (VAR_3)
);
#else
int64_t ph;
uint64_t pm1, pm2, pl;
pl = (uint64_t)((uin... | [
"void FUNC_0(int64_t *VAR_0, int64_t *VAR_1, int64_t VAR_2, int64_t VAR_3)\n{",
"#if defined(__x86_64__)\n__asm__ (\"imul %0\\n\\t\"\n: \"=d\" (*VAR_0), \"=VAR_2\" (*VAR_1)\n: \"VAR_2\" (VAR_2), \"0\" (VAR_3)\n);",
"#else\nint64_t ph;",
"uint64_t pm1, pm2, pl;",
"pl = (uint64_t)((uint32_t)VAR_2) * (uint64_t... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5,
7,
9,
11,
13
],
[
15,
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43,
45
]
] |
8,582 | static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev);
uint64_t nb_sectors;
uint8_t *outbuf;
int buflen;
switch (req->cmd.buf[0]) {
case INQUIRY:
... | true | qemu | 823bd7391c96ba675f20fd6d952d1cb6e1ffb851 | static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev);
uint64_t nb_sectors;
uint8_t *outbuf;
int buflen;
switch (req->cmd.buf[0]) {
case INQUIRY:
... | {
"code": [
" if (!(req->cmd.buf[1] & 0x8)) {"
],
"line_no": [
499
]
} | static int32_t FUNC_0(SCSIRequest *req, uint8_t *buf)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev);
uint64_t nb_sectors;
uint8_t *outbuf;
int VAR_0;
switch (req->cmd.buf[0]) {
case INQUIRY:
case MODE_SENSE:
... | [
"static int32_t FUNC_0(SCSIRequest *req, uint8_t *buf)\n{",
"SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);",
"SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev);",
"uint64_t nb_sectors;",
"uint8_t *outbuf;",
"int VAR_0;",
"switch (req->cmd.buf[0]) {",
"case INQUIRY:\ncase MODE_SENSE:\nca... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19,
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45
],
[
49,
51
],
[
53
],
[
55
],
[
57
],
[
59
... |
8,583 | static int decode_syncpoint(NUTContext *nut){
AVFormatContext *s= nut->avf;
ByteIOContext *bc = &s->pb;
int64_t end;
uint64_t tmp;
int i;
AVRational time_base;
nut->last_syncpoint_pos= url_ftell(bc)-8;
end= get_packetheader(nut, bc, 1);
end += url_ftell(bc) - 4;
t... | true | FFmpeg | 5d97d9d53ea1cc2c28411ad734565372ddeccc32 | static int decode_syncpoint(NUTContext *nut){
AVFormatContext *s= nut->avf;
ByteIOContext *bc = &s->pb;
int64_t end;
uint64_t tmp;
int i;
AVRational time_base;
nut->last_syncpoint_pos= url_ftell(bc)-8;
end= get_packetheader(nut, bc, 1);
end += url_ftell(bc) - 4;
t... | {
"code": [
" return 0;",
" end += url_ftell(bc) - 4;",
" if(skip_reserved(bc, end) || check_checksum(bc)){",
" end += url_ftell(bc) - 4;",
" if(skip_reserved(bc, end) || check_checksum(bc)){",
" end += url_ftell(bc) - 4;",
" if(skip_reserved(bc, end) || check_checksum... | static int FUNC_0(NUTContext *VAR_0){
AVFormatContext *s= VAR_0->avf;
ByteIOContext *bc = &s->pb;
int64_t end;
uint64_t tmp;
int VAR_1;
AVRational time_base;
VAR_0->last_syncpoint_pos= url_ftell(bc)-8;
end= get_packetheader(VAR_0, bc, 1);
end += url_ftell(bc) - 4;
... | [
"static int FUNC_0(NUTContext *VAR_0){",
"AVFormatContext *s= VAR_0->avf;",
"ByteIOContext *bc = &s->pb;",
"int64_t end;",
"uint64_t tmp;",
"int VAR_1;",
"AVRational time_base;",
"VAR_0->last_syncpoint_pos= url_ftell(bc)-8;",
"end= get_packetheader(VAR_0, bc, 1);",
"end += url_ftell(bc) - 4;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37,
39,
41,
43,
45
],
[
49
],
[
55
],
[
57
],
[... |
8,584 | static void mips_jazz_init(MachineState *machine,
enum jazz_model_e jazz_model)
{
MemoryRegion *address_space = get_system_memory();
const char *cpu_model = machine->cpu_model;
char *filename;
int bios_size, n;
MIPSCPU *cpu;
CPUClass *cc;
CPUMIPSState *env... | true | qemu | f8ed85ac992c48814d916d5df4d44f9a971c5de4 | static void mips_jazz_init(MachineState *machine,
enum jazz_model_e jazz_model)
{
MemoryRegion *address_space = get_system_memory();
const char *cpu_model = machine->cpu_model;
char *filename;
int bios_size, n;
MIPSCPU *cpu;
CPUClass *cc;
CPUMIPSState *env... | {
"code": [
" &error_abort);",
" &error_abort);",
" &error_abort);",
" &error_abort);",
" &error_abort);",
" &error_abort);",
" ... | static void FUNC_0(MachineState *VAR_0,
enum jazz_model_e VAR_1)
{
MemoryRegion *address_space = get_system_memory();
const char *VAR_2 = VAR_0->VAR_2;
char *VAR_3;
int VAR_4, VAR_5;
MIPSCPU *cpu;
CPUClass *cc;
CPUMIPSState *env;
qemu_irq *i8259;
... | [
"static void FUNC_0(MachineState *VAR_0,\nenum jazz_model_e VAR_1)\n{",
"MemoryRegion *address_space = get_system_memory();",
"const char *VAR_2 = VAR_0->VAR_2;",
"char *VAR_3;",
"int VAR_4, VAR_5;",
"MIPSCPU *cpu;",
"CPUClass *cc;",
"CPUMIPSState *env;",
"qemu_irq *i8259;",
"rc4030_dma *dmas;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
8,585 | static void free_texture(void *opaque, uint8_t *data)
{
ID3D11Texture2D_Release((ID3D11Texture2D *)opaque);
} | true | FFmpeg | 2c2f25eb8920129ef3cfe6da2e1cefdedc485965 | static void free_texture(void *opaque, uint8_t *data)
{
ID3D11Texture2D_Release((ID3D11Texture2D *)opaque);
} | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, uint8_t *VAR_1)
{
ID3D11Texture2D_Release((ID3D11Texture2D *)VAR_0);
} | [
"static void FUNC_0(void *VAR_0, uint8_t *VAR_1)\n{",
"ID3D11Texture2D_Release((ID3D11Texture2D *)VAR_0);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
8
]
] |
8,586 | static int alac_decode_frame(AVCodecContext *avctx,
void *outbuffer, int *outputsize,
const uint8_t *inbuffer, int input_buffer_size)
{
ALACContext *alac = avctx->priv_data;
int channels;
unsigned int outputsamples;
int hassize;
int readsampl... | true | FFmpeg | f7739f3708f786a0b071d8d8b59331525b0ccfd8 | static int alac_decode_frame(AVCodecContext *avctx,
void *outbuffer, int *outputsize,
const uint8_t *inbuffer, int input_buffer_size)
{
ALACContext *alac = avctx->priv_data;
int channels;
unsigned int outputsamples;
int hassize;
int readsampl... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
const uint8_t *VAR_3, int VAR_4)
{
ALACContext *alac = VAR_0->priv_data;
int VAR_5;
unsigned int VAR_6;
int VAR_7;
int VAR_8;
int VAR_9;
int VAR_10;
uint8_t interla... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nconst uint8_t *VAR_3, int VAR_4)\n{",
"ALACContext *alac = VAR_0->priv_data;",
"int VAR_5;",
"unsigned int VAR_6;",
"int VAR_7;",
"int VAR_8;",
"int VAR_9;",
"int VAR_10;",
"uint8_t interlacing_shift;",
"uint8_t interlacing_leftw... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
2,
3,
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
15,
16
],
[
18
],
[
19
],
[
20,
21
],
[
22
],
[
23
],
[
24
],
[
25
],... |
8,587 | int bdrv_truncate(BlockDriverState *bs, int64_t offset)
{
BlockDriver *drv = bs->drv;
int ret;
if (!drv)
return -ENOMEDIUM;
if (!drv->bdrv_truncate)
return -ENOTSUP;
if (bs->read_only)
return -EACCES;
ret = drv->bdrv_truncate(bs, offset);
if (ret == 0) {
... | true | qemu | 3ff2f67a7c24183fcbcfe1332e5223ac6f96438c | int bdrv_truncate(BlockDriverState *bs, int64_t offset)
{
BlockDriver *drv = bs->drv;
int ret;
if (!drv)
return -ENOMEDIUM;
if (!drv->bdrv_truncate)
return -ENOTSUP;
if (bs->read_only)
return -EACCES;
ret = drv->bdrv_truncate(bs, offset);
if (ret == 0) {
... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1)
{
BlockDriver *drv = VAR_0->drv;
int VAR_2;
if (!drv)
return -ENOMEDIUM;
if (!drv->FUNC_0)
return -ENOTSUP;
if (VAR_0->read_only)
return -EACCES;
VAR_2 = drv->FUNC_0(VAR_0, VAR_1);
if (VAR_2 == 0) {
... | [
"int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1)\n{",
"BlockDriver *drv = VAR_0->drv;",
"int VAR_2;",
"if (!drv)\nreturn -ENOMEDIUM;",
"if (!drv->FUNC_0)\nreturn -ENOTSUP;",
"if (VAR_0->read_only)\nreturn -EACCES;",
"VAR_2 = drv->FUNC_0(VAR_0, VAR_1);",
"if (VAR_2 == 0) {",
"VAR_2 = refresh_total... | [
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
],
[
34
],
[
36
],
[
38
]
] |
8,588 | static void gen_sub(DisasContext *dc, TCGv dest, TCGv srca, TCGv srcb)
{
TCGv res = tcg_temp_new();
TCGv sr_cy = tcg_temp_new();
TCGv sr_ov = tcg_temp_new();
tcg_gen_sub_tl(res, srca, srcb);
tcg_gen_xor_tl(sr_cy, srca, srcb);
tcg_gen_xor_tl(sr_ov, res, srcb);
tcg_gen_and_tl(sr_ov, ... | true | qemu | 9745807191a81c45970f780166f44a7f93b18653 | static void gen_sub(DisasContext *dc, TCGv dest, TCGv srca, TCGv srcb)
{
TCGv res = tcg_temp_new();
TCGv sr_cy = tcg_temp_new();
TCGv sr_ov = tcg_temp_new();
tcg_gen_sub_tl(res, srca, srcb);
tcg_gen_xor_tl(sr_cy, srca, srcb);
tcg_gen_xor_tl(sr_ov, res, srcb);
tcg_gen_and_tl(sr_ov, ... | {
"code": [
" TCGv sr_cy = tcg_temp_new();",
" TCGv sr_ov = tcg_temp_new();",
" tcg_gen_shri_tl(sr_ov, sr_ov, TARGET_LONG_BITS - 1);",
" tcg_gen_deposit_tl(cpu_sr, cpu_sr, sr_cy, ctz32(SR_CY), 1);",
" tcg_gen_deposit_tl(cpu_sr, cpu_sr, sr_ov, ctz32(SR_OV), 1);",
" gen_ove_cyo... | static void FUNC_0(DisasContext *VAR_0, TCGv VAR_1, TCGv VAR_2, TCGv VAR_3)
{
TCGv res = tcg_temp_new();
TCGv sr_cy = tcg_temp_new();
TCGv sr_ov = tcg_temp_new();
tcg_gen_sub_tl(res, VAR_2, VAR_3);
tcg_gen_xor_tl(sr_cy, VAR_2, VAR_3);
tcg_gen_xor_tl(sr_ov, res, VAR_3);
tcg_gen_and_... | [
"static void FUNC_0(DisasContext *VAR_0, TCGv VAR_1, TCGv VAR_2, TCGv VAR_3)\n{",
"TCGv res = tcg_temp_new();",
"TCGv sr_cy = tcg_temp_new();",
"TCGv sr_ov = tcg_temp_new();",
"tcg_gen_sub_tl(res, VAR_2, VAR_3);",
"tcg_gen_xor_tl(sr_cy, VAR_2, VAR_3);",
"tcg_gen_xor_tl(sr_ov, res, VAR_3);",
"tcg_gen_a... | [
0,
0,
1,
1,
0,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
8,589 | static void ecc_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
{
ECCState *s = opaque;
switch (addr & ECC_ADDR_MASK) {
case ECC_MER:
s->regs[0] = (s->regs[0] & (ECC_MER_VER | ECC_MER_IMPL)) |
(val & ~(ECC_MER_VER | ECC_MER_IMPL));
DPRINTF("Write... | true | qemu | 8f2ad0a3fc5e3569183d44bf1c7fcb95294be4c0 | static void ecc_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
{
ECCState *s = opaque;
switch (addr & ECC_ADDR_MASK) {
case ECC_MER:
s->regs[0] = (s->regs[0] & (ECC_MER_VER | ECC_MER_IMPL)) |
(val & ~(ECC_MER_VER | ECC_MER_IMPL));
DPRINTF("Write... | {
"code": [
" switch (addr & ECC_ADDR_MASK) {",
" s->regs[0] = (s->regs[0] & (ECC_MER_VER | ECC_MER_IMPL)) |",
" (val & ~(ECC_MER_VER | ECC_MER_IMPL));",
" s->regs[1] = val & ECC_MDR_MASK;",
" s->regs[2] = val;",
" s->regs[3] = val;",
"... | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2)
{
ECCState *s = VAR_0;
switch (VAR_1 & ECC_ADDR_MASK) {
case ECC_MER:
s->regs[0] = (s->regs[0] & (ECC_MER_VER | ECC_MER_IMPL)) |
(VAR_2 & ~(ECC_MER_VER | ECC_MER_IMPL));
DPRINTF("Write mem... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2)\n{",
"ECCState *s = VAR_0;",
"switch (VAR_1 & ECC_ADDR_MASK) {",
"case ECC_MER:\ns->regs[0] = (s->regs[0] & (ECC_MER_VER | ECC_MER_IMPL)) |\n(VAR_2 & ~(ECC_MER_VER | ECC_MER_IMPL));",
"DPRINTF(\"Write memory enable %08x\\n\", VAR_2);... | [
0,
0,
1,
1,
0,
0,
1,
0,
0,
1,
0,
0,
1,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13,
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45,
47
],
[
49... |
8,590 | static void idct32(int *out, int *tab, int sblimit, int left_shift)
{
int i, j;
int *t, *t1, xr;
const int *xp = costab32;
for(j=31;j>=3;j-=2) tab[j] += tab[j - 2];
t = tab + 30;
t1 = tab + 2;
do {
t[0] += t[-4];
t[1] += t[1 - 4];
t -= 4;
} whi... | true | FFmpeg | afa982fdae1b49a8aee00a27da876bba10ba1073 | static void idct32(int *out, int *tab, int sblimit, int left_shift)
{
int i, j;
int *t, *t1, xr;
const int *xp = costab32;
for(j=31;j>=3;j-=2) tab[j] += tab[j - 2];
t = tab + 30;
t1 = tab + 2;
do {
t[0] += t[-4];
t[1] += t[1 - 4];
t -= 4;
} whi... | {
"code": [
"static void idct32(int *out, int *tab, int sblimit, int left_shift)",
" out[i] = tab[bitinv32[i]] << left_shift;"
],
"line_no": [
1,
231
]
} | static void FUNC_0(int *VAR_0, int *VAR_1, int VAR_2, int VAR_3)
{
int VAR_4, VAR_5;
int *VAR_6, *VAR_7, VAR_8;
const int *VAR_9 = costab32;
for(VAR_5=31;VAR_5>=3;VAR_5-=2) VAR_1[VAR_5] += VAR_1[VAR_5 - 2];
VAR_6 = VAR_1 + 30;
VAR_7 = VAR_1 + 2;
do {
VAR_6[0] += VAR_... | [
"static void FUNC_0(int *VAR_0, int *VAR_1, int VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5;",
"int *VAR_6, *VAR_7, VAR_8;",
"const int *VAR_9 = costab32;",
"for(VAR_5=31;VAR_5>=3;VAR_5-=2) VAR_1[VAR_5] += VAR_1[VAR_5 - 2];",
"VAR_6 = VAR_1 + 30;",
"VAR_7 = VAR_1 + 2;",
"do {",
"VAR_6[0] += VAR_6[-4];"... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.