id int32 0 27.3k | func stringlengths 26 142k | target bool 2
classes | project stringclasses 2
values | commit_id stringlengths 40 40 | func_clean stringlengths 26 131k | vul_lines dict | normalized_func stringlengths 24 132k | lines listlengths 1 2.8k | label listlengths 1 2.8k | line_no listlengths 1 2.8k |
|---|---|---|---|---|---|---|---|---|---|---|
3,165 | static void fft_ref_init(int nbits, int inverse)
{
int i, n = 1 << nbits;
exptab = av_malloc((n / 2) * sizeof(*exptab));
for (i = 0; i < (n/2); i++) {
double alpha = 2 * M_PI * (float)i / (float)n;
double c1 = cos(alpha), s1 = sin(alpha);
if (!inverse)
s1 = -s... | false | FFmpeg | c3c96deb5f8cbbdb700ba97920ceedddacb5dcb9 | static void fft_ref_init(int nbits, int inverse)
{
int i, n = 1 << nbits;
exptab = av_malloc((n / 2) * sizeof(*exptab));
for (i = 0; i < (n/2); i++) {
double alpha = 2 * M_PI * (float)i / (float)n;
double c1 = cos(alpha), s1 = sin(alpha);
if (!inverse)
s1 = -s... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0, int VAR_1)
{
int VAR_2, VAR_3 = 1 << VAR_0;
exptab = av_malloc((VAR_3 / 2) * sizeof(*exptab));
for (VAR_2 = 0; VAR_2 < (VAR_3/2); VAR_2++) {
double VAR_4 = 2 * M_PI * (float)VAR_2 / (float)VAR_3;
double VAR_5 = cos(VAR_4), VAR_6 = sin(VAR_4);
... | [
"static void FUNC_0(int VAR_0, int VAR_1)\n{",
"int VAR_2, VAR_3 = 1 << VAR_0;",
"exptab = av_malloc((VAR_3 / 2) * sizeof(*exptab));",
"for (VAR_2 = 0; VAR_2 < (VAR_3/2); VAR_2++) {",
"double VAR_4 = 2 * M_PI * (float)VAR_2 / (float)VAR_3;",
"double VAR_5 = cos(VAR_4), VAR_6 = sin(VAR_4);",
"if (!VAR_1)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
3,166 | inline static int push_frame(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
AVFilterLink *inlink = ctx->inputs[0];
ShowWavesContext *showwaves = outlink->src->priv;
int nb_channels = inlink->channels;
int ret, i;
if ((ret = ff_filter_frame(outlink, showwaves->outpicref)) ... | false | FFmpeg | 8a2e2fc34aaeb0c092a9fd08d18bd5af7d240f1d | inline static int push_frame(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
AVFilterLink *inlink = ctx->inputs[0];
ShowWavesContext *showwaves = outlink->src->priv;
int nb_channels = inlink->channels;
int ret, i;
if ((ret = ff_filter_frame(outlink, showwaves->outpicref)) ... | {
"code": [],
"line_no": []
} | inline static int FUNC_0(AVFilterLink *VAR_0)
{
AVFilterContext *ctx = VAR_0->src;
AVFilterLink *inlink = ctx->inputs[0];
ShowWavesContext *showwaves = VAR_0->src->priv;
int VAR_1 = inlink->channels;
int VAR_2, VAR_3;
if ((VAR_2 = ff_filter_frame(VAR_0, showwaves->outpicref)) >= 0)
... | [
"inline static int FUNC_0(AVFilterLink *VAR_0)\n{",
"AVFilterContext *ctx = VAR_0->src;",
"AVFilterLink *inlink = ctx->inputs[0];",
"ShowWavesContext *showwaves = VAR_0->src->priv;",
"int VAR_1 = inlink->channels;",
"int VAR_2, VAR_3;",
"if ((VAR_2 = ff_filter_frame(VAR_0, showwaves->outpicref)) >= 0)\n... | [
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
]
] |
3,167 | uint64_t helper_tick_get_count(void *opaque)
{
#if !defined(CONFIG_USER_ONLY)
return cpu_tick_get_count(opaque);
#else
return 0;
#endif
}
| true | qemu | c9a464420d7eb67dace1f630554245360b4c7c5b | uint64_t helper_tick_get_count(void *opaque)
{
#if !defined(CONFIG_USER_ONLY)
return cpu_tick_get_count(opaque);
#else
return 0;
#endif
}
| {
"code": [
"uint64_t helper_tick_get_count(void *opaque)",
" return cpu_tick_get_count(opaque);"
],
"line_no": [
1,
7
]
} | uint64_t FUNC_0(void *opaque)
{
#if !defined(CONFIG_USER_ONLY)
return cpu_tick_get_count(opaque);
#else
return 0;
#endif
}
| [
"uint64_t FUNC_0(void *opaque)\n{",
"#if !defined(CONFIG_USER_ONLY)\nreturn cpu_tick_get_count(opaque);",
"#else\nreturn 0;",
"#endif\n}"
] | [
1,
1,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13,
15
]
] |
3,168 | uint64_t helper_mulqv (uint64_t op1, uint64_t op2)
{
uint64_t tl, th;
muls64(&tl, &th, op1, op2);
/* If th != 0 && th != -1, then we had an overflow */
if (unlikely((th + 1) > 1)) {
arith_excp(env, GETPC(), EXC_M_IOV, 0);
}
return tl;
}
| true | qemu | 2958620f67dcfd11476e62b4ca704dae0b978ea3 | uint64_t helper_mulqv (uint64_t op1, uint64_t op2)
{
uint64_t tl, th;
muls64(&tl, &th, op1, op2);
if (unlikely((th + 1) > 1)) {
arith_excp(env, GETPC(), EXC_M_IOV, 0);
}
return tl;
}
| {
"code": [
" arith_excp(env, GETPC(), EXC_M_IOV, 0);",
" arith_excp(env, GETPC(), EXC_M_IOV, 0);",
" arith_excp(env, GETPC(), EXC_M_IOV, 0);",
" arith_excp(env, GETPC(), EXC_M_IOV, 0);",
" arith_excp(env, GETPC(), EXC_M_IOV, 0);",
"uint64_t helper_mulqv (uin... | uint64_t FUNC_0 (uint64_t op1, uint64_t op2)
{
uint64_t tl, th;
muls64(&tl, &th, op1, op2);
if (unlikely((th + 1) > 1)) {
arith_excp(env, GETPC(), EXC_M_IOV, 0);
}
return tl;
}
| [
"uint64_t FUNC_0 (uint64_t op1, uint64_t op2)\n{",
"uint64_t tl, th;",
"muls64(&tl, &th, op1, op2);",
"if (unlikely((th + 1) > 1)) {",
"arith_excp(env, GETPC(), EXC_M_IOV, 0);",
"}",
"return tl;",
"}"
] | [
1,
1,
1,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
3,169 | static void dec_divu(DisasContext *dc)
{
int l1;
LOG_DIS("divu r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1);
if (!(dc->env->features & LM32_FEATURE_DIVIDE)) {
cpu_abort(dc->env, "hardware divider is not available\n");
}
l1 = gen_new_label();
tcg_gen_brcondi_tl(TCG_COND_NE, cpu... | true | qemu | 3604a76fea6ff37738d4a8f596be38407be74a83 | static void dec_divu(DisasContext *dc)
{
int l1;
LOG_DIS("divu r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1);
if (!(dc->env->features & LM32_FEATURE_DIVIDE)) {
cpu_abort(dc->env, "hardware divider is not available\n");
}
l1 = gen_new_label();
tcg_gen_brcondi_tl(TCG_COND_NE, cpu... | {
"code": [
" cpu_abort(dc->env, \"hardware divider is not available\\n\");",
" cpu_abort(dc->env, \"hardware divider is not available\\n\");"
],
"line_no": [
15,
15
]
} | static void FUNC_0(DisasContext *VAR_0)
{
int VAR_1;
LOG_DIS("divu r%d, r%d, r%d\n", VAR_0->r2, VAR_0->r0, VAR_0->r1);
if (!(VAR_0->env->features & LM32_FEATURE_DIVIDE)) {
cpu_abort(VAR_0->env, "hardware divider is not available\n");
}
VAR_1 = gen_new_label();
tcg_gen_brcon... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"int VAR_1;",
"LOG_DIS(\"divu r%d, r%d, r%d\\n\", VAR_0->r2, VAR_0->r0, VAR_0->r1);",
"if (!(VAR_0->env->features & LM32_FEATURE_DIVIDE)) {",
"cpu_abort(VAR_0->env, \"hardware divider is not available\\n\");",
"}",
"VAR_1 = gen_new_label();",
"tcg_gen_brco... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
3,170 | static void ffmpeg_cleanup(int ret)
{
int i, j;
if (do_benchmark) {
int maxrss = getmaxrss() / 1024;
av_log(NULL, AV_LOG_INFO, "bench: maxrss=%ikB\n", maxrss);
}
for (i = 0; i < nb_filtergraphs; i++) {
FilterGraph *fg = filtergraphs[i];
avfilter_graph_free(&fg->graph);
... | true | FFmpeg | 7a0361b06f0afbdcface8cab17751ed2c7e81769 | static void ffmpeg_cleanup(int ret)
{
int i, j;
if (do_benchmark) {
int maxrss = getmaxrss() / 1024;
av_log(NULL, AV_LOG_INFO, "bench: maxrss=%ikB\n", maxrss);
}
for (i = 0; i < nb_filtergraphs; i++) {
FilterGraph *fg = filtergraphs[i];
avfilter_graph_free(&fg->graph);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0)
{
int VAR_1, VAR_2;
if (do_benchmark) {
int VAR_3 = getmaxrss() / 1024;
av_log(NULL, AV_LOG_INFO, "bench: VAR_3=%ikB\n", VAR_3);
}
for (VAR_1 = 0; VAR_1 < nb_filtergraphs; VAR_1++) {
FilterGraph *fg = filtergraphs[VAR_1];
avfilter_graph_free(... | [
"static void FUNC_0(int VAR_0)\n{",
"int VAR_1, VAR_2;",
"if (do_benchmark) {",
"int VAR_3 = getmaxrss() / 1024;",
"av_log(NULL, AV_LOG_INFO, \"bench: VAR_3=%ikB\\n\", VAR_3);",
"}",
"for (VAR_1 = 0; VAR_1 < nb_filtergraphs; VAR_1++) {",
"FilterGraph *fg = filtergraphs[VAR_1];",
"avfilter_graph_free... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],... |
3,171 | void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],
const uint8_t *src_data[4], const int src_linesizes[4],
enum PixelFormat pix_fmt, int width, int height)
{
const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt];
if (desc->flags & PIX_FMT_HWAC... | true | FFmpeg | 38d553322891c8e47182f05199d19888422167dc | void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],
const uint8_t *src_data[4], const int src_linesizes[4],
enum PixelFormat pix_fmt, int width, int height)
{
const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt];
if (desc->flags & PIX_FMT_HWAC... | {
"code": [
" if (desc->flags & PIX_FMT_PAL) {",
" if (desc->flags & PIX_FMT_PAL) {"
],
"line_no": [
19,
19
]
} | void FUNC_0(uint8_t *VAR_0[4], int VAR_1[4],
const uint8_t *VAR_2[4], const int VAR_3[4],
enum PixelFormat VAR_4, int VAR_5, int VAR_6)
{
const AVPixFmtDescriptor *VAR_7 = &av_pix_fmt_descriptors[VAR_4];
if (VAR_7->flags & PIX_FMT_HWACCEL)
return;
if ... | [
"void FUNC_0(uint8_t *VAR_0[4], int VAR_1[4],\nconst uint8_t *VAR_2[4], const int VAR_3[4],\nenum PixelFormat VAR_4, int VAR_5, int VAR_6)\n{",
"const AVPixFmtDescriptor *VAR_7 = &av_pix_fmt_descriptors[VAR_4];",
"if (VAR_7->flags & PIX_FMT_HWACCEL)\nreturn;",
"if (VAR_7->flags & PIX_FMT_PAL) {",
"av_image_... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13,
15
],
[
19
],
[
21,
23,
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55,
57,... |
3,172 | static int webm_dash_manifest_cues(AVFormatContext *s)
{
MatroskaDemuxContext *matroska = s->priv_data;
EbmlList *seekhead_list = &matroska->seekhead;
MatroskaSeekhead *seekhead = seekhead_list->elem;
char *buf;
int64_t cues_start = -1, cues_end = -1, before_pos, bandwidth;
int i;
... | true | FFmpeg | 8e6b9ef4733be91b32c8b7becd95124340b92334 | static int webm_dash_manifest_cues(AVFormatContext *s)
{
MatroskaDemuxContext *matroska = s->priv_data;
EbmlList *seekhead_list = &matroska->seekhead;
MatroskaSeekhead *seekhead = seekhead_list->elem;
char *buf;
int64_t cues_start = -1, cues_end = -1, before_pos, bandwidth;
int i;
... | {
"code": [
" snprintf(buf, (i + 1) * 20 * sizeof(char),",
" \"%s%\" PRId64, buf, s->streams[0]->index_entries[i].timestamp);",
" if (i != s->streams[0]->nb_index_entries - 1)"
],
"line_no": [
107,
109,
111
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
MatroskaDemuxContext *matroska = VAR_0->priv_data;
EbmlList *seekhead_list = &matroska->seekhead;
MatroskaSeekhead *seekhead = seekhead_list->elem;
char *VAR_1;
int64_t cues_start = -1, cues_end = -1, before_pos, bandwidth;
int VAR_2;
... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"MatroskaDemuxContext *matroska = VAR_0->priv_data;",
"EbmlList *seekhead_list = &matroska->seekhead;",
"MatroskaSeekhead *seekhead = seekhead_list->elem;",
"char *VAR_1;",
"int64_t cues_start = -1, cues_end = -1, before_pos, bandwidth;",
"int VAR_2;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23,
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[... |
3,173 | static void pxa2xx_screen_dump(void *opaque, const char *filename)
{
/* TODO */
}
| true | qemu | 167351020420c285b67cdf0603501b3d3b15e3f7 | static void pxa2xx_screen_dump(void *opaque, const char *filename)
{
}
| {
"code": [
"static void pxa2xx_screen_dump(void *opaque, const char *filename)"
],
"line_no": [
1
]
} | static void FUNC_0(void *VAR_0, const char *VAR_1)
{
}
| [
"static void FUNC_0(void *VAR_0, const char *VAR_1)\n{",
"}"
] | [
1,
0
] | [
[
1,
3
],
[
7
]
] |
3,174 | static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int nb_components, int predictor, int point_transform)
{
int i, mb_x, mb_y;
uint16_t (*buffer)[4];
int left[4], top[4], topleft[4];
const int linesize = s->linesize[0];
const int mask = (1 << s->bits) - 1;
int resync_mb_y = 0;
int r... | true | FFmpeg | 61c68000eda643dfce96dc46b488d39fd5c4e309 | static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int nb_components, int predictor, int point_transform)
{
int i, mb_x, mb_y;
uint16_t (*buffer)[4];
int left[4], top[4], topleft[4];
const int linesize = s->linesize[0];
const int mask = (1 << s->bits) - 1;
int resync_mb_y = 0;
int r... | {
"code": [],
"line_no": []
} | static int FUNC_0(MJpegDecodeContext *VAR_0, int VAR_1, int VAR_2, int VAR_3)
{
int VAR_4, VAR_5, VAR_6;
uint16_t (*buffer)[4];
int VAR_7[4], VAR_8[4], VAR_9[4];
const int VAR_10 = VAR_0->VAR_10[0];
const int VAR_11 = (1 << VAR_0->bits) - 1;
int VAR_12 = 0;
int VAR_13 = 0;
VAR_0->res... | [
"static int FUNC_0(MJpegDecodeContext *VAR_0, int VAR_1, int VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6;",
"uint16_t (*buffer)[4];",
"int VAR_7[4], VAR_8[4], VAR_9[4];",
"const int VAR_10 = VAR_0->VAR_10[0];",
"const int VAR_11 = (1 << VAR_0->bits) - 1;",
"int VAR_12 = 0;",
"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,
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
],... |
3,175 | static av_cold int vp8_init(AVCodecContext *avctx)
{
VP8Context *ctx = avctx->priv_data;
const struct vpx_codec_iface *iface = &vpx_codec_vp8_cx_algo;
struct vpx_codec_enc_cfg enccfg;
int res;
av_log(avctx, AV_LOG_INFO, "%s\n", vpx_codec_version_str());
av_log(avctx, AV_LOG_VERBOSE, "%s... | true | FFmpeg | d472453efd32bfb0b3cd348183f4fcb7d4df4389 | static av_cold int vp8_init(AVCodecContext *avctx)
{
VP8Context *ctx = avctx->priv_data;
const struct vpx_codec_iface *iface = &vpx_codec_vp8_cx_algo;
struct vpx_codec_enc_cfg enccfg;
int res;
av_log(avctx, AV_LOG_INFO, "%s\n", vpx_codec_version_str());
av_log(avctx, AV_LOG_VERBOSE, "%s... | {
"code": [
" enccfg.rc_2pass_vbr_minsection_pct =",
" avctx->rc_min_rate * 100LL / avctx->bit_rate;"
],
"line_no": [
93,
95
]
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
VP8Context *ctx = avctx->priv_data;
const struct vpx_codec_iface *VAR_0 = &vpx_codec_vp8_cx_algo;
struct vpx_codec_enc_cfg VAR_1;
int VAR_2;
av_log(avctx, AV_LOG_INFO, "%s\n", vpx_codec_version_str());
av_log(avctx, AV_LOG_VERBOSE, "%s\... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"VP8Context *ctx = avctx->priv_data;",
"const struct vpx_codec_iface *VAR_0 = &vpx_codec_vp8_cx_algo;",
"struct vpx_codec_enc_cfg VAR_1;",
"int VAR_2;",
"av_log(avctx, AV_LOG_INFO, \"%s\\n\", vpx_codec_version_str());",
"av_log(avctx, AV_LOG_VERBOSE... | [
0,
0,
0,
0,
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
],
[
15
],
[
17
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49,
51
... |
3,177 | unsigned long virtio_load_direct(ulong rec_list1, ulong rec_list2,
ulong subchan_id, void *load_addr)
{
u8 status;
int sec = rec_list1;
int sec_num = ((rec_list2 >> 32) & 0xffff) + 1;
int sec_len = rec_list2 >> 48;
ulong addr = (ulong)load_addr;
if (sec... | true | qemu | c9262e8a84a29f22fbb5edde5d17f4f6166d5ae1 | unsigned long virtio_load_direct(ulong rec_list1, ulong rec_list2,
ulong subchan_id, void *load_addr)
{
u8 status;
int sec = rec_list1;
int sec_num = ((rec_list2 >> 32) & 0xffff) + 1;
int sec_len = rec_list2 >> 48;
ulong addr = (ulong)load_addr;
if (sec... | {
"code": [
" virtio_panic(\"I/O Error\");"
],
"line_no": [
33
]
} | unsigned long FUNC_0(ulong VAR_0, ulong VAR_1,
ulong VAR_2, void *VAR_3)
{
u8 status;
int VAR_4 = VAR_0;
int VAR_5 = ((VAR_1 >> 32) & 0xffff) + 1;
int VAR_6 = VAR_1 >> 48;
ulong addr = (ulong)VAR_3;
if (VAR_6 != virtio_get_block_size()) {
retur... | [
"unsigned long FUNC_0(ulong VAR_0, ulong VAR_1,\nulong VAR_2, void *VAR_3)\n{",
"u8 status;",
"int VAR_4 = VAR_0;",
"int VAR_5 = ((VAR_1 >> 32) & 0xffff) + 1;",
"int VAR_6 = VAR_1 >> 48;",
"ulong addr = (ulong)VAR_3;",
"if (VAR_6 != virtio_get_block_size()) {",
"return -1;",
"}",
"sclp_print(\".\"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
]
] |
3,178 | void restore_boot_order(void *opaque)
{
char *normal_boot_order = opaque;
static int first = 1;
/* Restore boot order and remove ourselves after the first boot */
if (first) {
first = 0;
return;
}
qemu_boot_set(normal_boot_order, NULL);
qemu_unregister_reset(r... | true | qemu | 76349f5ba8f4e2f0b8c93c12ec0950a8bc77408a | void restore_boot_order(void *opaque)
{
char *normal_boot_order = opaque;
static int first = 1;
if (first) {
first = 0;
return;
}
qemu_boot_set(normal_boot_order, NULL);
qemu_unregister_reset(restore_boot_order, normal_boot_order);
g_free(normal_boot_ord... | {
"code": [
" qemu_boot_set(normal_boot_order, NULL);"
],
"line_no": [
23
]
} | void FUNC_0(void *VAR_0)
{
char *VAR_1 = VAR_0;
static int VAR_2 = 1;
if (VAR_2) {
VAR_2 = 0;
return;
}
qemu_boot_set(VAR_1, NULL);
qemu_unregister_reset(FUNC_0, VAR_1);
g_free(VAR_1);
}
| [
"void FUNC_0(void *VAR_0)\n{",
"char *VAR_1 = VAR_0;",
"static int VAR_2 = 1;",
"if (VAR_2) {",
"VAR_2 = 0;",
"return;",
"}",
"qemu_boot_set(VAR_1, NULL);",
"qemu_unregister_reset(FUNC_0, VAR_1);",
"g_free(VAR_1);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
]
] |
3,181 | static int vmdaudio_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AVFrame *frame = data;
const uint8_t *buf = avpkt->data;
const uint8_t *buf_end;
int buf_size = avpkt->size;
VmdAudioContext *s = avctx->priv_data;
... | true | FFmpeg | f86d66bcfa48998b0727aa0d1089a30cbeae0933 | static int vmdaudio_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AVFrame *frame = data;
const uint8_t *buf = avpkt->data;
const uint8_t *buf_end;
int buf_size = avpkt->size;
VmdAudioContext *s = avctx->priv_data;
... | {
"code": [
" while (buf < buf_end) {"
],
"line_no": [
145
]
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
AVFrame *frame = VAR_1;
const uint8_t *VAR_4 = VAR_3->VAR_1;
const uint8_t *VAR_5;
int VAR_6 = VAR_3->size;
VmdAudioContext *s = VAR_0->priv_data;
int VAR_7, VAR_8, V... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"AVFrame *frame = VAR_1;",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"const uint8_t *VAR_5;",
"int VAR_6 = VAR_3->size;",
"VmdAudioContext *s = VAR_0->priv_data;",
"int VAR_7, VAR_8, VAR_9;",
"int VAR_10;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
3,185 | static int convert_sub_to_old_ass_form(AVSubtitle *sub, const AVPacket *pkt, AVRational tb)
{
int i;
AVBPrint buf;
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
for (i = 0; i < sub->num_rects; i++) {
char *final_dialog;
const char *dialog;
AVSubtitleRect *rect = ... | true | FFmpeg | 2b7a61cbd8ae134f839c4347a4c289e1e11475a3 | static int convert_sub_to_old_ass_form(AVSubtitle *sub, const AVPacket *pkt, AVRational tb)
{
int i;
AVBPrint buf;
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
for (i = 0; i < sub->num_rects; i++) {
char *final_dialog;
const char *dialog;
AVSubtitleRect *rect = ... | {
"code": [
" if (rect->type != SUBTITLE_ASS || !strncmp(rect->ass, \"Dialogue \", 10))"
],
"line_no": [
29
]
} | static int FUNC_0(AVSubtitle *VAR_0, const AVPacket *VAR_1, AVRational VAR_2)
{
int VAR_3;
AVBPrint buf;
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
for (VAR_3 = 0; VAR_3 < VAR_0->num_rects; VAR_3++) {
char *final_dialog;
const char *dialog;
AVSubtitleRect *rec... | [
"static int FUNC_0(AVSubtitle *VAR_0, const AVPacket *VAR_1, AVRational VAR_2)\n{",
"int VAR_3;",
"AVBPrint buf;",
"av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);",
"for (VAR_3 = 0; VAR_3 < VAR_0->num_rects; VAR_3++) {",
"char *final_dialog;",
"const char *dialog;",
"AVSubtitleRect *rect = VAR_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
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
35
],
[
41
],
[
43,
45
],
[
47
],
[
53
],
[
55,
57
],
[
59
],
... |
3,186 | static av_cold int bmp_encode_init(AVCodecContext *avctx){
switch (avctx->pix_fmt) {
case AV_PIX_FMT_BGR24:
avctx->bits_per_coded_sample = 24;
break;
case AV_PIX_FMT_RGB555:
case AV_PIX_FMT_RGB565:
case AV_PIX_FMT_RGB444:
avctx->bits_per_coded_sample = 16;
br... | false | FFmpeg | d6604b29ef544793479d7fb4e05ef6622bb3e534 | static av_cold int bmp_encode_init(AVCodecContext *avctx){
switch (avctx->pix_fmt) {
case AV_PIX_FMT_BGR24:
avctx->bits_per_coded_sample = 24;
break;
case AV_PIX_FMT_RGB555:
case AV_PIX_FMT_RGB565:
case AV_PIX_FMT_RGB444:
avctx->bits_per_coded_sample = 16;
br... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx){
switch (avctx->pix_fmt) {
case AV_PIX_FMT_BGR24:
avctx->bits_per_coded_sample = 24;
break;
case AV_PIX_FMT_RGB555:
case AV_PIX_FMT_RGB565:
case AV_PIX_FMT_RGB444:
avctx->bits_per_coded_sample = 16;
break;
... | [
"static av_cold int FUNC_0(AVCodecContext *avctx){",
"switch (avctx->pix_fmt) {",
"case AV_PIX_FMT_BGR24:\navctx->bits_per_coded_sample = 24;",
"break;",
"case AV_PIX_FMT_RGB555:\ncase AV_PIX_FMT_RGB565:\ncase AV_PIX_FMT_RGB444:\navctx->bits_per_coded_sample = 16;",
"break;",
"case AV_PIX_FMT_RGB8:\ncas... | [
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
],
[
53
],
[... |
3,188 | static int ape_read_header(AVFormatContext * s)
{
AVIOContext *pb = s->pb;
APEContext *ape = s->priv_data;
AVStream *st;
uint32_t tag;
int i;
int total_blocks, final_size = 0;
int64_t pts, file_size;
/* Skip any leading junk such as id3v2 tags */
ape->junklength = avio_te... | false | FFmpeg | 83548fe894cdb455cc127f754d09905b6d23c173 | static int ape_read_header(AVFormatContext * s)
{
AVIOContext *pb = s->pb;
APEContext *ape = s->priv_data;
AVStream *st;
uint32_t tag;
int i;
int total_blocks, final_size = 0;
int64_t pts, file_size;
ape->junklength = avio_tell(pb);
tag = avio_rl32(pb);
if (t... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext * VAR_0)
{
AVIOContext *pb = VAR_0->pb;
APEContext *ape = VAR_0->priv_data;
AVStream *st;
uint32_t tag;
int VAR_1;
int VAR_2, VAR_3 = 0;
int64_t pts, file_size;
ape->junklength = avio_tell(pb);
tag = avio_rl32(pb);
if (tag !=... | [
"static int FUNC_0(AVFormatContext * VAR_0)\n{",
"AVIOContext *pb = VAR_0->pb;",
"APEContext *ape = VAR_0->priv_data;",
"AVStream *st;",
"uint32_t tag;",
"int VAR_1;",
"int VAR_2, VAR_3 = 0;",
"int64_t pts, file_size;",
"ape->junklength = avio_tell(pb);",
"tag = avio_rl32(pb);",
"if (tag != MKTA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
27
],
[
29,
31
],
[
35
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
... |
3,190 | static gboolean udp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
{
CharDriverState *chr = opaque;
NetCharDriver *s = chr->opaque;
gsize bytes_read = 0;
GIOStatus status;
if (s->max_size == 0) {
return TRUE;
}
status = g_io_channel_read_chars(s->chan, (gchar ... | true | qemu | 2b316774f60291f57ca9ecb6a9f0712c532cae34 | static gboolean udp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
{
CharDriverState *chr = opaque;
NetCharDriver *s = chr->opaque;
gsize bytes_read = 0;
GIOStatus status;
if (s->max_size == 0) {
return TRUE;
}
status = g_io_channel_read_chars(s->chan, (gchar ... | {
"code": [
" g_source_remove(s->tag);",
" g_source_remove(s->tag);",
" g_source_remove(s->tag);"
],
"line_no": [
33,
33,
33
]
} | static gboolean FUNC_0(GIOChannel *chan, GIOCondition cond, void *opaque)
{
CharDriverState *chr = opaque;
NetCharDriver *s = chr->opaque;
gsize bytes_read = 0;
GIOStatus status;
if (s->max_size == 0) {
return TRUE;
}
status = g_io_channel_read_chars(s->chan, (gchar *)s->b... | [
"static gboolean FUNC_0(GIOChannel *chan, GIOCondition cond, void *opaque)\n{",
"CharDriverState *chr = opaque;",
"NetCharDriver *s = chr->opaque;",
"gsize bytes_read = 0;",
"GIOStatus status;",
"if (s->max_size == 0) {",
"return TRUE;",
"}",
"status = g_io_channel_read_chars(s->chan, (gchar *)s->bu... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[... |
3,191 | static void pc_q35_init_1_4(QEMUMachineInitArgs *args)
{
pc_sysfw_flash_vs_rom_bug_compatible = true;
has_pvpanic = false;
x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE);
pc_q35_init(args);
}
| true | qemu | 9e1c2ec8fd8d9a9ee299ea86c5f6c986fe25e838 | static void pc_q35_init_1_4(QEMUMachineInitArgs *args)
{
pc_sysfw_flash_vs_rom_bug_compatible = true;
has_pvpanic = false;
x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE);
pc_q35_init(args);
}
| {
"code": [
" pc_sysfw_flash_vs_rom_bug_compatible = true;",
" pc_sysfw_flash_vs_rom_bug_compatible = true;",
" pc_sysfw_flash_vs_rom_bug_compatible = true;",
" pc_sysfw_flash_vs_rom_bug_compatible = true;"
],
"line_no": [
5,
5,
5,
5
]
} | static void FUNC_0(QEMUMachineInitArgs *VAR_0)
{
pc_sysfw_flash_vs_rom_bug_compatible = true;
has_pvpanic = false;
x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE);
pc_q35_init(VAR_0);
}
| [
"static void FUNC_0(QEMUMachineInitArgs *VAR_0)\n{",
"pc_sysfw_flash_vs_rom_bug_compatible = true;",
"has_pvpanic = false;",
"x86_cpu_compat_set_features(\"n270\", FEAT_1_ECX, 0, CPUID_EXT_MOVBE);",
"pc_q35_init(VAR_0);",
"}"
] | [
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
3,193 | void do_interrupt(CPUARMState *env)
{
uint32_t addr;
uint32_t mask;
int new_mode;
uint32_t offset;
if (IS_M(env)) {
do_interrupt_v7m(env);
return;
}
/* TODO: Vectored interrupt controller. */
switch (env->exception_index) {
case EXCP_UDEF:
new_... | true | qemu | d8fd2954996255ba6ad610917e7849832d0120b7 | void do_interrupt(CPUARMState *env)
{
uint32_t addr;
uint32_t mask;
int new_mode;
uint32_t offset;
if (IS_M(env)) {
do_interrupt_v7m(env);
return;
}
switch (env->exception_index) {
case EXCP_UDEF:
new_mode = ARM_CPU_MODE_UND;
addr = 0x... | {
"code": [
" mask = lduw_code(env->regs[15] - 2) & 0xff;",
" mask = ldl_code(env->regs[15] - 4) & 0xffffff;",
" mask = lduw_code(env->regs[15]) & 0xff;"
],
"line_no": [
53,
57,
97
]
} | void FUNC_0(CPUARMState *VAR_0)
{
uint32_t addr;
uint32_t mask;
int VAR_1;
uint32_t offset;
if (IS_M(VAR_0)) {
do_interrupt_v7m(VAR_0);
return;
}
switch (VAR_0->exception_index) {
case EXCP_UDEF:
VAR_1 = ARM_CPU_MODE_UND;
addr = 0x04;
... | [
"void FUNC_0(CPUARMState *VAR_0)\n{",
"uint32_t addr;",
"uint32_t mask;",
"int VAR_1;",
"uint32_t offset;",
"if (IS_M(VAR_0)) {",
"do_interrupt_v7m(VAR_0);",
"return;",
"}",
"switch (VAR_0->exception_index) {",
"case EXCP_UDEF:\nVAR_1 = ARM_CPU_MODE_UND;",
"addr = 0x04;",
"mask = CPSR_I;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35,
37
],
[
39,
41
],
[
43
],
[
45,
47
],
[
51
... |
3,194 | static void ERROR(const char *str)
{
fprintf(stderr, "%s\n", str);
exit(1);
}
| true | FFmpeg | 1bfb4587a2e5b25ed15f742149e555efc8f305ae | static void ERROR(const char *str)
{
fprintf(stderr, "%s\n", str);
exit(1);
}
| {
"code": [
" fprintf(stderr, \"%s\\n\", str);",
" exit(1);"
],
"line_no": [
5,
7
]
} | static void FUNC_0(const char *VAR_0)
{
fprintf(stderr, "%s\n", VAR_0);
exit(1);
}
| [
"static void FUNC_0(const char *VAR_0)\n{",
"fprintf(stderr, \"%s\\n\", VAR_0);",
"exit(1);",
"}"
] | [
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
3,196 | static void handle_control_message(VirtIOSerial *vser, void *buf, size_t len)
{
struct VirtIOSerialPort *port;
struct virtio_console_control cpkt, *gcpkt;
uint8_t *buffer;
size_t buffer_len;
gcpkt = buf;
if (len < sizeof(cpkt)) {
/* The guest sent an invalid control packet */... | true | qemu | 5e52e5f903b2648c59030637e1610b32e965d615 | static void handle_control_message(VirtIOSerial *vser, void *buf, size_t len)
{
struct VirtIOSerialPort *port;
struct virtio_console_control cpkt, *gcpkt;
uint8_t *buffer;
size_t buffer_len;
gcpkt = buf;
if (len < sizeof(cpkt)) {
return;
}
cpkt.event = l... | {
"code": [
" vser->bus->qbus.name);",
" port->id, vser->bus->qbus.name);"
],
"line_no": [
51,
81
]
} | static void FUNC_0(VirtIOSerial *VAR_0, void *VAR_1, size_t VAR_2)
{
struct VirtIOSerialPort *VAR_3;
struct virtio_console_control VAR_4, *VAR_5;
uint8_t *buffer;
size_t buffer_len;
VAR_5 = VAR_1;
if (VAR_2 < sizeof(VAR_4)) {
return;
}
VAR_4.event = lduw... | [
"static void FUNC_0(VirtIOSerial *VAR_0, void *VAR_1, size_t VAR_2)\n{",
"struct VirtIOSerialPort *VAR_3;",
"struct virtio_console_control VAR_4, *VAR_5;",
"uint8_t *buffer;",
"size_t buffer_len;",
"VAR_5 = VAR_1;",
"if (VAR_2 < sizeof(VAR_4)) {",
"return;",
"}",
"VAR_4.event = lduw_p(&VAR_5->even... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
43
],
[
45,
47
],
[
49,
51
],
[
53
],
[
55
],
[... |
3,197 | static int asf_write_header1(AVFormatContext *s, int64_t file_size,
int64_t data_chunk_size)
{
ASFContext *asf = s->priv_data;
AVIOContext *pb = s->pb;
AVDictionaryEntry *tags[5];
int header_size, n, extra_size, extra_size2, wav_extra_size, file_time;
int has_titl... | false | FFmpeg | 4b45aa517c30091c20b75f1fd12f3607a679b841 | static int asf_write_header1(AVFormatContext *s, int64_t file_size,
int64_t data_chunk_size)
{
ASFContext *asf = s->priv_data;
AVIOContext *pb = s->pb;
AVDictionaryEntry *tags[5];
int header_size, n, extra_size, extra_size2, wav_extra_size, file_time;
int has_titl... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, int64_t VAR_1,
int64_t VAR_2)
{
ASFContext *asf = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
AVDictionaryEntry *tags[5];
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
int VAR_9, VAR_10 = 0;
int VAR_11;
AVCode... | [
"static int FUNC_0(AVFormatContext *VAR_0, int64_t VAR_1,\nint64_t VAR_2)\n{",
"ASFContext *asf = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"AVDictionaryEntry *tags[5];",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"int VAR_9, VAR_10 = 0;",
"int VAR_11;",
"AVCodecContext *enc;",
"int6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[... |
3,198 | static unsigned int codec_get_asf_tag(const CodecTag *tags, unsigned int id)
{
while (tags->id != 0) {
if (!tags->invalid_asf && tags->id == id)
return tags->tag;
tags++;
}
return 0;
}
| false | FFmpeg | fb7a2bf6956173eda6f9caceef8599fa4f83500d | static unsigned int codec_get_asf_tag(const CodecTag *tags, unsigned int id)
{
while (tags->id != 0) {
if (!tags->invalid_asf && tags->id == id)
return tags->tag;
tags++;
}
return 0;
}
| {
"code": [],
"line_no": []
} | static unsigned int FUNC_0(const CodecTag *VAR_0, unsigned int VAR_1)
{
while (VAR_0->VAR_1 != 0) {
if (!VAR_0->invalid_asf && VAR_0->VAR_1 == VAR_1)
return VAR_0->tag;
VAR_0++;
}
return 0;
}
| [
"static unsigned int FUNC_0(const CodecTag *VAR_0, unsigned int VAR_1)\n{",
"while (VAR_0->VAR_1 != 0) {",
"if (!VAR_0->invalid_asf && VAR_0->VAR_1 == VAR_1)\nreturn VAR_0->tag;",
"VAR_0++;",
"}",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
3,199 | static int decode_cblk(J2kDecoderContext *s, J2kCodingStyle *codsty, J2kT1Context *t1, J2kCblk *cblk,
int width, int height, int bandpos)
{
int passno = cblk->npasses, pass_t = 2, bpno = cblk->nonzerobits - 1, y, clnpass_cnt = 0;
int bpass_csty_symbol = J2K_CBLK_BYPASS & codsty->cblk_... | false | FFmpeg | 2fbf69103847d9449de466fa217f8bd4221aa3e9 | static int decode_cblk(J2kDecoderContext *s, J2kCodingStyle *codsty, J2kT1Context *t1, J2kCblk *cblk,
int width, int height, int bandpos)
{
int passno = cblk->npasses, pass_t = 2, bpno = cblk->nonzerobits - 1, y, clnpass_cnt = 0;
int bpass_csty_symbol = J2K_CBLK_BYPASS & codsty->cblk_... | {
"code": [],
"line_no": []
} | static int FUNC_0(J2kDecoderContext *VAR_0, J2kCodingStyle *VAR_1, J2kT1Context *VAR_2, J2kCblk *VAR_3,
int VAR_4, int VAR_5, int VAR_6)
{
int VAR_7 = VAR_3->npasses, VAR_8 = 2, VAR_9 = VAR_3->nonzerobits - 1, VAR_10, VAR_11 = 0;
int VAR_12 = J2K_CBLK_BYPASS & VAR_1->cblk_style;
... | [
"static int FUNC_0(J2kDecoderContext *VAR_0, J2kCodingStyle *VAR_1, J2kT1Context *VAR_2, J2kCblk *VAR_3,\nint VAR_4, int VAR_5, int VAR_6)\n{",
"int VAR_7 = VAR_3->npasses, VAR_8 = 2, VAR_9 = VAR_3->nonzerobits - 1, VAR_10, VAR_11 = 0;",
"int VAR_12 = J2K_CBLK_BYPASS & VAR_1->cblk_style;",
"int VAR_13 = J2K_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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47,
49
],
[
51
],
[... |
3,200 | static int do_token_out(USBDevice *s, USBPacket *p)
{
if (p->devep != 0)
return s->info->handle_data(s, p);
switch(s->setup_state) {
case SETUP_STATE_ACK:
if (s->setup_buf[0] & USB_DIR_IN) {
s->setup_state = SETUP_STATE_IDLE;
/* transfer OK */
} els... | true | qemu | 4f4321c11ff6e98583846bfd6f0e81954924b003 | static int do_token_out(USBDevice *s, USBPacket *p)
{
if (p->devep != 0)
return s->info->handle_data(s, p);
switch(s->setup_state) {
case SETUP_STATE_ACK:
if (s->setup_buf[0] & USB_DIR_IN) {
s->setup_state = SETUP_STATE_IDLE;
} else {
... | {
"code": [
" if (len > p->len)",
" len = p->len;",
" if (len > p->len)",
" len = p->len;",
" memcpy(s->data_buf + s->setup_index, p->data, len);"
],
"line_no": [
37,
39,
37,
39,
41
]
} | static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)
{
if (VAR_1->devep != 0)
return VAR_0->info->handle_data(VAR_0, VAR_1);
switch(VAR_0->setup_state) {
case SETUP_STATE_ACK:
if (VAR_0->setup_buf[0] & USB_DIR_IN) {
VAR_0->setup_state = SETUP_STATE_IDLE;
... | [
"static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)\n{",
"if (VAR_1->devep != 0)\nreturn VAR_0->info->handle_data(VAR_0, VAR_1);",
"switch(VAR_0->setup_state) {",
"case SETUP_STATE_ACK:\nif (VAR_0->setup_buf[0] & USB_DIR_IN) {",
"VAR_0->setup_state = SETUP_STATE_IDLE;",
"} else {",
"}",
"return 0;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
11
],
[
13,
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
31,
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[
55
],
... |
3,201 | static int coroutine_fn blkreplay_co_pwrite_zeroes(BlockDriverState *bs,
int64_t offset, int count, BdrvRequestFlags flags)
{
uint64_t reqid = request_id++;
int ret = bdrv_co_pwrite_zeroes(bs->file, offset, count, flags);
block_request_create(reqid, bs, qemu_coroutine_self());
qemu_coroutine_y... | true | qemu | 6d0ceb80ffe18ad4b28aab7356f440636c0be7be | static int coroutine_fn blkreplay_co_pwrite_zeroes(BlockDriverState *bs,
int64_t offset, int count, BdrvRequestFlags flags)
{
uint64_t reqid = request_id++;
int ret = bdrv_co_pwrite_zeroes(bs->file, offset, count, flags);
block_request_create(reqid, bs, qemu_coroutine_self());
qemu_coroutine_y... | {
"code": [
" uint64_t reqid = request_id++;",
" uint64_t reqid = request_id++;",
" uint64_t reqid = request_id++;",
" uint64_t reqid = request_id++;",
" uint64_t reqid = request_id++;"
],
"line_no": [
7,
7,
7,
7,
7
]
} | static int VAR_0 blkreplay_co_pwrite_zeroes(BlockDriverState *bs,
int64_t offset, int count, BdrvRequestFlags flags)
{
uint64_t reqid = request_id++;
int ret = bdrv_co_pwrite_zeroes(bs->file, offset, count, flags);
block_request_create(reqid, bs, qemu_coroutine_self());
qemu_coroutine_yield();... | [
"static int VAR_0 blkreplay_co_pwrite_zeroes(BlockDriverState *bs,\nint64_t offset, int count, BdrvRequestFlags flags)\n{",
"uint64_t reqid = request_id++;",
"int ret = bdrv_co_pwrite_zeroes(bs->file, offset, count, flags);",
"block_request_create(reqid, bs, qemu_coroutine_self());",
"qemu_coroutine_yield()... | [
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
]
] |
3,202 | int ff_eac3_parse_header(AC3DecodeContext *s)
{
int i, blk, ch;
int ac3_exponent_strategy, parse_aht_info, parse_spx_atten_data;
int parse_transient_proc_info;
int num_cpl_blocks;
GetBitContext *gbc = &s->gbc;
/* An E-AC-3 stream can have multiple independent streams which the
a... | true | FFmpeg | 7b05b5093ea67a3397b0c37cf398bab471e1ce2b | int ff_eac3_parse_header(AC3DecodeContext *s)
{
int i, blk, ch;
int ac3_exponent_strategy, parse_aht_info, parse_spx_atten_data;
int parse_transient_proc_info;
int num_cpl_blocks;
GetBitContext *gbc = &s->gbc;
if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT) {
avpriv_r... | {
"code": [
"int ff_eac3_parse_header(AC3DecodeContext *s)"
],
"line_no": [
1
]
} | int FUNC_0(AC3DecodeContext *VAR_0)
{
int VAR_1, VAR_2, VAR_3;
int VAR_4, VAR_5, VAR_6;
int VAR_7;
int VAR_8;
GetBitContext *gbc = &VAR_0->gbc;
if (VAR_0->frame_type == EAC3_FRAME_TYPE_DEPENDENT) {
avpriv_request_sample(VAR_0->avctx, "Dependent substream decoding");
... | [
"int FUNC_0(AC3DecodeContext *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3;",
"int VAR_4, VAR_5, VAR_6;",
"int VAR_7;",
"int VAR_8;",
"GetBitContext *gbc = &VAR_0->gbc;",
"if (VAR_0->frame_type == EAC3_FRAME_TYPE_DEPENDENT) {",
"avpriv_request_sample(VAR_0->avctx, \"Dependent substream decoding\");",
"retur... | [
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
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
45
],
[
49
],
[
51
],
[
53
],
[
57
],
[
67
],
[
69
... |
3,203 | static void ipmi_init_sensors_from_sdrs(IPMIBmcSim *s)
{
unsigned int i, pos;
IPMISensor *sens;
for (i = 0; i < MAX_SENSORS; i++) {
memset(s->sensors + i, 0, sizeof(*sens));
}
pos = 0;
for (i = 0; !sdr_find_entry(&s->sdr, i, &pos, NULL); i++) {
struct ipmi_sdr_compac... | true | qemu | 73d60fa5fae60c8e07e1f295d8c7fd5d04320160 | static void ipmi_init_sensors_from_sdrs(IPMIBmcSim *s)
{
unsigned int i, pos;
IPMISensor *sens;
for (i = 0; i < MAX_SENSORS; i++) {
memset(s->sensors + i, 0, sizeof(*sens));
}
pos = 0;
for (i = 0; !sdr_find_entry(&s->sdr, i, &pos, NULL); i++) {
struct ipmi_sdr_compac... | {
"code": [
" if (sdr->sensor_owner_number > MAX_SENSORS) {"
],
"line_no": [
45
]
} | static void FUNC_0(IPMIBmcSim *VAR_0)
{
unsigned int VAR_1, VAR_2;
IPMISensor *sens;
for (VAR_1 = 0; VAR_1 < MAX_SENSORS; VAR_1++) {
memset(VAR_0->sensors + VAR_1, 0, sizeof(*sens));
}
VAR_2 = 0;
for (VAR_1 = 0; !sdr_find_entry(&VAR_0->sdr, VAR_1, &VAR_2, NULL); VAR_1++) {
... | [
"static void FUNC_0(IPMIBmcSim *VAR_0)\n{",
"unsigned int VAR_1, VAR_2;",
"IPMISensor *sens;",
"for (VAR_1 = 0; VAR_1 < MAX_SENSORS; VAR_1++) {",
"memset(VAR_0->sensors + VAR_1, 0, sizeof(*sens));",
"}",
"VAR_2 = 0;",
"for (VAR_1 = 0; !sdr_find_entry(&VAR_0->sdr, VAR_1, &VAR_2, NULL); VAR_1++) {",
"... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
... |
3,204 | static int calc_bit_demand(AacPsyContext *ctx, float pe, int bits, int size,
int short_window)
{
const float bitsave_slope = short_window ? PSY_3GPP_SAVE_SLOPE_S : PSY_3GPP_SAVE_SLOPE_L;
const float bitsave_add = short_window ? PSY_3GPP_SAVE_ADD_S : PSY_3GPP_SAVE_ADD_L;
... | true | FFmpeg | 01ecb7172b684f1c4b3e748f95c5a9a494ca36ec | static int calc_bit_demand(AacPsyContext *ctx, float pe, int bits, int size,
int short_window)
{
const float bitsave_slope = short_window ? PSY_3GPP_SAVE_SLOPE_S : PSY_3GPP_SAVE_SLOPE_L;
const float bitsave_add = short_window ? PSY_3GPP_SAVE_ADD_S : PSY_3GPP_SAVE_ADD_L;
... | {
"code": [
" return FFMIN(ctx->frame_bits * bit_factor, ctx->frame_bits + size - bits);"
],
"line_no": [
61
]
} | static int FUNC_0(AacPsyContext *VAR_0, float VAR_1, int VAR_2, int VAR_3,
int VAR_4)
{
const float VAR_5 = VAR_4 ? PSY_3GPP_SAVE_SLOPE_S : PSY_3GPP_SAVE_SLOPE_L;
const float VAR_6 = VAR_4 ? PSY_3GPP_SAVE_ADD_S : PSY_3GPP_SAVE_ADD_L;
const float VAR_7 = VAR_4 ? PSY_3G... | [
"static int FUNC_0(AacPsyContext *VAR_0, float VAR_1, int VAR_2, int VAR_3,\nint VAR_4)\n{",
"const float VAR_5 = VAR_4 ? PSY_3GPP_SAVE_SLOPE_S : PSY_3GPP_SAVE_SLOPE_L;",
"const float VAR_6 = VAR_4 ? PSY_3GPP_SAVE_ADD_S : PSY_3GPP_SAVE_ADD_L;",
"const float VAR_7 = VAR_4 ? PSY_3GPP_SPEND_SLOPE_S : PSY... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
51
],
[
55
],
[
57
],
[... |
3,206 | static void RENAME(yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
long width, long height,
long lumStride, long chromStride, long srcStride)
{
long y;
const long chromWidth= -((-width)>>1);
fo... | false | FFmpeg | d1adad3cca407f493c3637e20ecd4f7124e69212 | static void RENAME(yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
long width, long height,
long lumStride, long chromStride, long srcStride)
{
long y;
const long chromWidth= -((-width)>>1);
fo... | {
"code": [],
"line_no": []
} | static void FUNC_0(yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
long width, long height,
long lumStride, long chromStride, long srcStride)
{
long VAR_0;
const long VAR_1= -((-width)>>1);
for... | [
"static void FUNC_0(yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,\nlong width, long height,\nlong lumStride, long chromStride, long srcStride)\n{",
"long VAR_0;",
"const long VAR_1= -((-width)>>1);",
"for (VAR_0=0; VAR_0<height; VAR_0++) {",
"FUNC_0(extract_even)(src, ydst, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37,
39,
41,
43,
45,
47
],
[
49,
51
]
] |
3,208 | static uint64_t log16(uint64_t a){
int i;
int out=0;
assert(a >= (1<<16));
a<<=16;
for(i=19;i>=0;i--){
if(a<(exp16_table[i]<<16)) continue;
out |= 1<<i;
a = ((a<<16) + exp16_table[i]/2)/exp16_table[i];
}
return out;
}
| true | FFmpeg | 8176bd1a4689ff08b0e85984563ad8288110f1a7 | static uint64_t log16(uint64_t a){
int i;
int out=0;
assert(a >= (1<<16));
a<<=16;
for(i=19;i>=0;i--){
if(a<(exp16_table[i]<<16)) continue;
out |= 1<<i;
a = ((a<<16) + exp16_table[i]/2)/exp16_table[i];
}
return out;
}
| {
"code": [
" if(a<(exp16_table[i]<<16)) continue;",
" a = ((a<<16) + exp16_table[i]/2)/exp16_table[i];"
],
"line_no": [
17,
21
]
} | static uint64_t FUNC_0(uint64_t a){
int VAR_0;
int VAR_1=0;
assert(a >= (1<<16));
a<<=16;
for(VAR_0=19;VAR_0>=0;VAR_0--){
if(a<(exp16_table[VAR_0]<<16)) continue;
VAR_1 |= 1<<VAR_0;
a = ((a<<16) + exp16_table[VAR_0]/2)/exp16_table[VAR_0];
}
retur... | [
"static uint64_t FUNC_0(uint64_t a){",
"int VAR_0;",
"int VAR_1=0;",
"assert(a >= (1<<16));",
"a<<=16;",
"for(VAR_0=19;VAR_0>=0;VAR_0--){",
"if(a<(exp16_table[VAR_0]<<16)) continue;",
"VAR_1 |= 1<<VAR_0;",
"a = ((a<<16) + exp16_table[VAR_0]/2)/exp16_table[VAR_0];",
"}",
"return VAR_1;",
"}"
] | [
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
3,209 | static int mxf_read_track(void *arg, AVIOContext *pb, int tag, int size, UID uid)
{
MXFTrack *track = arg;
switch(tag) {
case 0x4801:
track->track_id = avio_rb32(pb);
break;
case 0x4804:
avio_read(pb, track->track_number, 4);
break;
case 0x4B01:
tra... | true | FFmpeg | fd34dbea58e097609ff09cf7dcc59f74930195d3 | static int mxf_read_track(void *arg, AVIOContext *pb, int tag, int size, UID uid)
{
MXFTrack *track = arg;
switch(tag) {
case 0x4801:
track->track_id = avio_rb32(pb);
break;
case 0x4804:
avio_read(pb, track->track_number, 4);
break;
case 0x4B01:
tra... | {
"code": [
"static int mxf_read_track(void *arg, AVIOContext *pb, int tag, int size, UID uid)"
],
"line_no": [
1
]
} | static int FUNC_0(void *VAR_0, AVIOContext *VAR_1, int VAR_2, int VAR_3, UID VAR_4)
{
MXFTrack *track = VAR_0;
switch(VAR_2) {
case 0x4801:
track->track_id = avio_rb32(VAR_1);
break;
case 0x4804:
avio_read(VAR_1, track->track_number, 4);
break;
case 0x4B01:
... | [
"static int FUNC_0(void *VAR_0, AVIOContext *VAR_1, int VAR_2, int VAR_3, UID VAR_4)\n{",
"MXFTrack *track = VAR_0;",
"switch(VAR_2) {",
"case 0x4801:\ntrack->track_id = avio_rb32(VAR_1);",
"break;",
"case 0x4804:\navio_read(VAR_1, track->track_number, 4);",
"break;",
"case 0x4B01:\ntrack->edit_rate.d... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13
],
[
15,
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
3,210 | void pl181_init(uint32_t base, BlockDriverState *bd,
qemu_irq irq0, qemu_irq irq1)
{
int iomemtype;
pl181_state *s;
s = (pl181_state *)qemu_mallocz(sizeof(pl181_state));
iomemtype = cpu_register_io_memory(0, pl181_readfn,
pl181_writefn, s);... | true | qemu | 187337f8b0ec0813dd3876d1efe37d415fb81c2e | void pl181_init(uint32_t base, BlockDriverState *bd,
qemu_irq irq0, qemu_irq irq1)
{
int iomemtype;
pl181_state *s;
s = (pl181_state *)qemu_mallocz(sizeof(pl181_state));
iomemtype = cpu_register_io_memory(0, pl181_readfn,
pl181_writefn, s);... | {
"code": [
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_phys... | void FUNC_0(uint32_t VAR_0, BlockDriverState *VAR_1,
qemu_irq VAR_2, qemu_irq VAR_3)
{
int VAR_4;
pl181_state *s;
s = (pl181_state *)qemu_mallocz(sizeof(pl181_state));
VAR_4 = cpu_register_io_memory(0, pl181_readfn,
pl181_writefn, s);
... | [
"void FUNC_0(uint32_t VAR_0, BlockDriverState *VAR_1,\nqemu_irq VAR_2, qemu_irq VAR_3)\n{",
"int VAR_4;",
"pl181_state *s;",
"s = (pl181_state *)qemu_mallocz(sizeof(pl181_state));",
"VAR_4 = cpu_register_io_memory(0, pl181_readfn,\npl181_writefn, s);",
"cpu_register_physical_memory(VAR_0, 0x00000fff, VAR_... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
]
] |
3,212 | static int dxva2_get_decoder_configuration(AVCodecContext *s, const GUID *device_guid,
const DXVA2_VideoDesc *desc,
DXVA2_ConfigPictureDecode *config)
{
InputStream *ist = s->opaque;
int loglevel = (ist->hwaccel_id == HW... | false | FFmpeg | 70143a3954e1c4412efb2bf1a3a818adea2d3abf | static int dxva2_get_decoder_configuration(AVCodecContext *s, const GUID *device_guid,
const DXVA2_VideoDesc *desc,
DXVA2_ConfigPictureDecode *config)
{
InputStream *ist = s->opaque;
int loglevel = (ist->hwaccel_id == HW... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, const GUID *VAR_1,
const DXVA2_VideoDesc *VAR_2,
DXVA2_ConfigPictureDecode *VAR_3)
{
InputStream *ist = VAR_0->opaque;
int VAR_4 = (ist->hwaccel_id == HWACCEL_AUTO) ? AV_LOG_VERBO... | [
"static int FUNC_0(AVCodecContext *VAR_0, const GUID *VAR_1,\nconst DXVA2_VideoDesc *VAR_2,\nDXVA2_ConfigPictureDecode *VAR_3)\n{",
"InputStream *ist = VAR_0->opaque;",
"int VAR_4 = (ist->hwaccel_id == HWACCEL_AUTO) ? AV_LOG_VERBOSE : AV_LOG_ERROR;",
"DXVA2Context *ctx = ist->hwaccel_ctx;",
"unsigned VAR_5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47,
49
],
[... |
3,213 | static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){
int y, h_size;
if(c->srcFormat == PIX_FMT_YUV422P){
srcStride[1] *= 2;
srcStride[2] *= 2;
}
h_size= (c->dstW+7)&~7;
if(h_s... | false | FFmpeg | 20da77449d4427a7152b80e4f9acce6a8c93ee7d | static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){
int y, h_size;
if(c->srcFormat == PIX_FMT_YUV422P){
srcStride[1] *= 2;
srcStride[2] *= 2;
}
h_size= (c->dstW+7)&~7;
if(h_s... | {
"code": [],
"line_no": []
} | static inline int FUNC_0(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){
int VAR_0, VAR_1;
if(c->srcFormat == PIX_FMT_YUV422P){
srcStride[1] *= 2;
srcStride[2] *= 2;
}
VAR_1= (c->dstW+7)&~7;
if(V... | [
"static inline int FUNC_0(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,\nint srcSliceH, uint8_t* dst[], int dstStride[]){",
"int VAR_0, VAR_1;",
"if(c->srcFormat == PIX_FMT_YUV422P){",
"srcStride[1] *= 2;",
"srcStride[2] *= 2;",
"}",
"VAR_1= (c->dstW+7)&~7;",
"if(VAR_1*2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
57... |
3,214 | static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
int letter, const char *buf)
{
RTSPState *rt = s->priv_data;
char buf1[64], st_type[64];
const char *p;
int codec_type, payload_type, i;
AVStream *st;
RTSPStream *rtsp_st;
struct in_addr sdp... | false | FFmpeg | 6ba5cbc699e77cae66bb719354fa142114b64eab | static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
int letter, const char *buf)
{
RTSPState *rt = s->priv_data;
char buf1[64], st_type[64];
const char *p;
int codec_type, payload_type, i;
AVStream *st;
RTSPStream *rtsp_st;
struct in_addr sdp... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVFormatContext *VAR_0, SDPParseState *VAR_1,
int VAR_2, const char *VAR_3)
{
RTSPState *rt = VAR_0->priv_data;
char VAR_4[64], VAR_5[64];
const char *VAR_6;
int VAR_7, VAR_8, VAR_9;
AVStream *st;
RTSPStream *rtsp_st;
struct in_addr VAR_... | [
"static void FUNC_0(AVFormatContext *VAR_0, SDPParseState *VAR_1,\nint VAR_2, const char *VAR_3)\n{",
"RTSPState *rt = VAR_0->priv_data;",
"char VAR_4[64], VAR_5[64];",
"const char *VAR_6;",
"int VAR_7, VAR_8, VAR_9;",
"AVStream *st;",
"RTSPStream *rtsp_st;",
"struct in_addr VAR_10;",
"int VAR_11;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
29,
33
],
[
35
],
[
37,
39
],
[
41,
43
],
[
45
],
[
47,
49
],
[
51
... |
3,216 | static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
{
s->scratch_size = SVGA_SCRATCH_SIZE;
s->scratch = qemu_malloc(s->scratch_size * 4);
vmsvga_reset(s);
s->fifo_size = SVGA_FIFO_SIZE;
s->fifo_offset = qemu_ram_alloc(s->fifo_size);
s->fifo_ptr = qemu_get_ram_ptr(s->fi... | true | qemu | a6109ff1b5d7184a9d490c4ff94f175940232ebd | static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
{
s->scratch_size = SVGA_SCRATCH_SIZE;
s->scratch = qemu_malloc(s->scratch_size * 4);
vmsvga_reset(s);
s->fifo_size = SVGA_FIFO_SIZE;
s->fifo_offset = qemu_ram_alloc(s->fifo_size);
s->fifo_ptr = qemu_get_ram_ptr(s->fi... | {
"code": [
" s->vga.ds = graphic_console_init(vmsvga_update_display,",
" vmsvga_invalidate_display,",
" vmsvga_screen_dump,",
" vmsvga_text_update, s);"
],
"line_no": [
31,
33,
... | static void FUNC_0(struct vmsvga_state_s *VAR_0, int VAR_1)
{
VAR_0->scratch_size = SVGA_SCRATCH_SIZE;
VAR_0->scratch = qemu_malloc(VAR_0->scratch_size * 4);
vmsvga_reset(VAR_0);
VAR_0->fifo_size = SVGA_FIFO_SIZE;
VAR_0->fifo_offset = qemu_ram_alloc(VAR_0->fifo_size);
VAR_0->fifo_ptr ... | [
"static void FUNC_0(struct vmsvga_state_s *VAR_0, int VAR_1)\n{",
"VAR_0->scratch_size = SVGA_SCRATCH_SIZE;",
"VAR_0->scratch = qemu_malloc(VAR_0->scratch_size * 4);",
"vmsvga_reset(VAR_0);",
"VAR_0->fifo_size = SVGA_FIFO_SIZE;",
"VAR_0->fifo_offset = qemu_ram_alloc(VAR_0->fifo_size);",
"VAR_0->fifo_ptr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31,
33,
35,
37
],
[
41
],
[
43
],
[
45
]
] |
3,217 | static uint32_t ehci_mem_readw(void *ptr, target_phys_addr_t addr)
{
EHCIState *s = ptr;
uint32_t val;
val = s->mmio[addr] | (s->mmio[addr+1] << 8);
return val;
}
| true | qemu | 3e4f910c8d490a1490409a7e381dbbb229f9d272 | static uint32_t ehci_mem_readw(void *ptr, target_phys_addr_t addr)
{
EHCIState *s = ptr;
uint32_t val;
val = s->mmio[addr] | (s->mmio[addr+1] << 8);
return val;
}
| {
"code": [
" uint32_t val;",
" return val;",
"static uint32_t ehci_mem_readw(void *ptr, target_phys_addr_t addr)",
" val = s->mmio[addr] | (s->mmio[addr+1] << 8);"
],
"line_no": [
7,
15,
1,
11
]
} | static uint32_t FUNC_0(void *ptr, target_phys_addr_t addr)
{
EHCIState *s = ptr;
uint32_t val;
val = s->mmio[addr] | (s->mmio[addr+1] << 8);
return val;
}
| [
"static uint32_t FUNC_0(void *ptr, target_phys_addr_t addr)\n{",
"EHCIState *s = ptr;",
"uint32_t val;",
"val = s->mmio[addr] | (s->mmio[addr+1] << 8);",
"return val;",
"}"
] | [
1,
0,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
]
] |
3,218 | static int qcow2_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVQcowState *s = bs->opaque;
int len, i, ret = 0;
QCowHeader header;
QemuOpts *opts;
Error *local_err = NULL;
uint64_t ext_end;
uint64_t l1_vm_state_index;
const char ... | true | qemu | 24342f2cae47d03911e346fe1e520b00dc2818e0 | static int qcow2_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVQcowState *s = bs->opaque;
int len, i, ret = 0;
QCowHeader header;
QemuOpts *opts;
Error *local_err = NULL;
uint64_t ext_end;
uint64_t l1_vm_state_index;
const char ... | {
"code": [
" if (header.cluster_bits < MIN_CLUSTER_BITS ||",
" header.cluster_bits > MAX_CLUSTER_BITS) {",
" error_setg(errp, \"Unsupported cluster size: 2^%i\", header.cluster_bits);",
" ret = -EINVAL;",
" goto fail;",
" s->cluster_bits = header.cluster_bits... | static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2,
Error **VAR_3)
{
BDRVQcowState *s = VAR_0->opaque;
int VAR_4, VAR_5, VAR_6 = 0;
QCowHeader header;
QemuOpts *opts;
Error *local_err = NULL;
uint64_t ext_end;
uint64_t l1_vm_state_index;
co... | [
"static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2,\nError **VAR_3)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"int VAR_4, VAR_5, VAR_6 = 0;",
"QCowHeader header;",
"QemuOpts *opts;",
"Error *local_err = NULL;",
"uint64_t ext_end;",
"uint64_t l1_vm_state_index;",
"const char *VAR_7;"... | [
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,
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... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
3,220 | static void replay_save_event(Event *event, int checkpoint)
{
if (replay_mode != REPLAY_MODE_PLAY) {
/* put the event into the file */
replay_put_event(EVENT_ASYNC);
replay_put_byte(checkpoint);
replay_put_byte(event->event_kind);
/* save event-specific data */
... | true | qemu | 95b4aed5fd0bec00e2c3f754c86fec5ba7a83a20 | static void replay_save_event(Event *event, int checkpoint)
{
if (replay_mode != REPLAY_MODE_PLAY) {
replay_put_event(EVENT_ASYNC);
replay_put_byte(checkpoint);
replay_put_byte(event->event_kind);
switch (event->event_kind) {
case REPLAY_ASYNC_EVE... | {
"code": [
" error_report(\"Unknown ID %d of replay event\", read_event_kind);"
],
"line_no": [
45
]
} | static void FUNC_0(Event *VAR_0, int VAR_1)
{
if (replay_mode != REPLAY_MODE_PLAY) {
replay_put_event(EVENT_ASYNC);
replay_put_byte(VAR_1);
replay_put_byte(VAR_0->event_kind);
switch (VAR_0->event_kind) {
case REPLAY_ASYNC_EVENT_BH:
r... | [
"static void FUNC_0(Event *VAR_0, int VAR_1)\n{",
"if (replay_mode != REPLAY_MODE_PLAY) {",
"replay_put_event(EVENT_ASYNC);",
"replay_put_byte(VAR_1);",
"replay_put_byte(VAR_0->event_kind);",
"switch (VAR_0->event_kind) {",
"case REPLAY_ASYNC_EVENT_BH:\nreplay_put_qword(VAR_0->id);",
"break;",
"case... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
19
],
[
21,
23
],
[
25
],
[
27,
29
],
[
31
],
[
33,
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
51
],
... |
3,221 | int avformat_alloc_output_context2(AVFormatContext **avctx, AVOutputFormat *oformat,
const char *format, const char *filename)
{
AVFormatContext *s = avformat_alloc_context();
int ret = 0;
*avctx = NULL;
if (!s)
goto nomem;
if (!oformat) {
... | false | FFmpeg | ea3672b7d67c432724bdbc8de0221f869b6a04c6 | int avformat_alloc_output_context2(AVFormatContext **avctx, AVOutputFormat *oformat,
const char *format, const char *filename)
{
AVFormatContext *s = avformat_alloc_context();
int ret = 0;
*avctx = NULL;
if (!s)
goto nomem;
if (!oformat) {
... | {
"code": [],
"line_no": []
} | int FUNC_0(AVFormatContext **VAR_0, AVOutputFormat *VAR_1,
const char *VAR_2, const char *VAR_3)
{
AVFormatContext *s = avformat_alloc_context();
int VAR_4 = 0;
*VAR_0 = NULL;
if (!s)
goto nomem;
if (!VAR_1) {
if (VAR_2) {
... | [
"int FUNC_0(AVFormatContext **VAR_0, AVOutputFormat *VAR_1,\nconst char *VAR_2, const char *VAR_3)\n{",
"AVFormatContext *s = avformat_alloc_context();",
"int VAR_4 = 0;",
"*VAR_0 = NULL;",
"if (!s)\ngoto nomem;",
"if (!VAR_1) {",
"if (VAR_2) {",
"VAR_1 = av_guess_format(VAR_2, NULL, NULL);",
"if (!... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[... |
3,222 | static av_cold int gif_encode_init(AVCodecContext *avctx)
{
GIFContext *s = avctx->priv_data;
if (avctx->width > 65535 || avctx->height > 65535) {
av_log(avctx, AV_LOG_ERROR, "GIF does not support resolutions above 65535x65535\n");
return AVERROR(EINVAL);
}
#if FF_API_CODED_FRAME
F... | false | FFmpeg | 03d83ba34b2070878909eae18dfac0f519503777 | static av_cold int gif_encode_init(AVCodecContext *avctx)
{
GIFContext *s = avctx->priv_data;
if (avctx->width > 65535 || avctx->height > 65535) {
av_log(avctx, AV_LOG_ERROR, "GIF does not support resolutions above 65535x65535\n");
return AVERROR(EINVAL);
}
#if FF_API_CODED_FRAME
F... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
GIFContext *s = avctx->priv_data;
if (avctx->width > 65535 || avctx->height > 65535) {
av_log(avctx, AV_LOG_ERROR, "GIF does not support resolutions above 65535x65535\n");
return AVERROR(EINVAL);
}
#if FF_API_CODED_FRAME
FF_DISABLE... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"GIFContext *s = avctx->priv_data;",
"if (avctx->width > 65535 || avctx->height > 65535) {",
"av_log(avctx, AV_LOG_ERROR, \"GIF does not support resolutions above 65535x65535\\n\");",
"return AVERROR(EINVAL);",
"}",
"#if FF_API_CODED_FRAME\nFF_DISAB... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17,
19,
21
],
[
23
],
[
25,
27,
31
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
47,
49
],
[
53
],
[
55
]
] |
3,223 | static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *gb)
{
MpegEncContext *s = &ctx->m;
int a = 2 << s->sprite_warping_accuracy;
int rho = 3 - s->sprite_warping_accuracy;
int r = 16 / a;
int alpha = 0;
int beta = 0;
int w = s->width;
int... | false | FFmpeg | 9a0f60a0f89a7a71839dfa9def5a26f2037aed62 | static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *gb)
{
MpegEncContext *s = &ctx->m;
int a = 2 << s->sprite_warping_accuracy;
int rho = 3 - s->sprite_warping_accuracy;
int r = 16 / a;
int alpha = 0;
int beta = 0;
int w = s->width;
int... | {
"code": [],
"line_no": []
} | static int FUNC_0(Mpeg4DecContext *VAR_0, GetBitContext *VAR_1)
{
MpegEncContext *s = &VAR_0->m;
int VAR_2 = 2 << s->sprite_warping_accuracy;
int VAR_3 = 3 - s->sprite_warping_accuracy;
int VAR_4 = 16 / VAR_2;
int VAR_5 = 0;
int VAR_6 = 0;
int VAR_7 = s->width;
i... | [
"static int FUNC_0(Mpeg4DecContext *VAR_0, GetBitContext *VAR_1)\n{",
"MpegEncContext *s = &VAR_0->m;",
"int VAR_2 = 2 << s->sprite_warping_accuracy;",
"int VAR_3 = 3 - s->sprite_warping_accuracy;",
"int VAR_4 = 16 / VAR_2;",
"int VAR_5 = 0;",
"int VAR_6 = 0;",
"int VAR_7 = s->width;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
35
],
[
39,
41
],
[
45
],
[
47
],
[
49
],
[... |
3,225 | static int fchmodat_nofollow(int dirfd, const char *name, mode_t mode)
{
int fd, ret;
/* FIXME: this should be handled with fchmodat(AT_SYMLINK_NOFOLLOW).
* Unfortunately, the linux kernel doesn't implement it yet. As an
* alternative, let's open the file and use fchmod() instead. This
* ... | true | qemu | 4751fd5328dfcd4fe2f9055728a72a0e3ae56512 | static int fchmodat_nofollow(int dirfd, const char *name, mode_t mode)
{
int fd, ret;
fd = openat_file(dirfd, name, O_RDONLY, 0);
if (fd == -1) {
if (errno == EACCES) {
fd = openat_file(dirfd, name, O_WRONLY, 0);
}
if (fd == -1 && e... | {
"code": [
" fd = openat_file(dirfd, name, O_RDONLY, 0);"
],
"line_no": [
25
]
} | static int FUNC_0(int VAR_0, const char *VAR_1, mode_t VAR_2)
{
int VAR_3, VAR_4;
VAR_3 = openat_file(VAR_0, VAR_1, O_RDONLY, 0);
if (VAR_3 == -1) {
if (errno == EACCES) {
VAR_3 = openat_file(VAR_0, VAR_1, O_WRONLY, 0);
}
if (VAR_3 ... | [
"static int FUNC_0(int VAR_0, const char *VAR_1, mode_t VAR_2)\n{",
"int VAR_3, VAR_4;",
"VAR_3 = openat_file(VAR_0, VAR_1, O_RDONLY, 0);",
"if (VAR_3 == -1) {",
"if (errno == EACCES) {",
"VAR_3 = openat_file(VAR_0, VAR_1, O_WRONLY, 0);",
"}",
"if (VAR_3 == -1 && errno == EISDIR) {",
"errno = EACCES... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
]
] |
3,226 | void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev,
uint32_t event, uint32_t reason)
{
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
VirtIOSCSIReq *req;
VirtIOSCSIEvent *evt;
VirtIODevice *vdev = VIRTIO_DEVICE(s);
if (!(vdev->status & VIRTIO_CONFIG_S_DRIV... | true | qemu | 661e32fb3cb71c7e019daee375be4bb487b9917c | void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev,
uint32_t event, uint32_t reason)
{
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
VirtIOSCSIReq *req;
VirtIOSCSIEvent *evt;
VirtIODevice *vdev = VIRTIO_DEVICE(s);
if (!(vdev->status & VIRTIO_CONFIG_S_DRIV... | {
"code": [
" virtio_scsi_bad_req();",
" virtio_scsi_bad_req();"
],
"line_no": [
59,
59
]
} | void FUNC_0(VirtIOSCSI *VAR_0, SCSIDevice *VAR_1,
uint32_t VAR_2, uint32_t VAR_3)
{
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(VAR_0);
VirtIOSCSIReq *req;
VirtIOSCSIEvent *evt;
VirtIODevice *vdev = VIRTIO_DEVICE(VAR_0);
if (!(vdev->status & VIRTIO_CONFIG_S_DRIVER_... | [
"void FUNC_0(VirtIOSCSI *VAR_0, SCSIDevice *VAR_1,\nuint32_t VAR_2, uint32_t VAR_3)\n{",
"VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(VAR_0);",
"VirtIOSCSIReq *req;",
"VirtIOSCSIEvent *evt;",
"VirtIODevice *vdev = VIRTIO_DEVICE(VAR_0);",
"if (!(vdev->status & VIRTIO_CONFIG_S_DRIVER_OK)) {",
"return;",
"... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[... |
3,229 | static int parse_int32(DeviceState *dev, Property *prop, const char *str)
{
int32_t *ptr = qdev_get_prop_ptr(dev, prop);
char *end;
*ptr = strtol(str, &end, 10);
if ((*end != '\0') || (end == str)) {
return -EINVAL;
}
return 0;
}
| true | qemu | 5cb9b56acfc0b50acf7ccd2d044ab4991c47fdde | static int parse_int32(DeviceState *dev, Property *prop, const char *str)
{
int32_t *ptr = qdev_get_prop_ptr(dev, prop);
char *end;
*ptr = strtol(str, &end, 10);
if ((*end != '\0') || (end == str)) {
return -EINVAL;
}
return 0;
}
| {
"code": [
" return -EINVAL;",
" return 0;",
" char *end;",
" if ((*end != '\\0') || (end == str)) {",
" return -EINVAL;",
" return 0;",
" char *end;",
" if ((*end != '\\0') || (end == str)) {",
" return -EINVAL;",
" return 0;",
" ... | static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, const char *VAR_2)
{
int32_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1);
char *VAR_3;
*ptr = strtol(VAR_2, &VAR_3, 10);
if ((*VAR_3 != '\0') || (VAR_3 == VAR_2)) {
return -EINVAL;
}
return 0;
}
| [
"static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, const char *VAR_2)\n{",
"int32_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1);",
"char *VAR_3;",
"*ptr = strtol(VAR_2, &VAR_3, 10);",
"if ((*VAR_3 != '\\0') || (VAR_3 == VAR_2)) {",
"return -EINVAL;",
"}",
"return 0;",
"}"
] | [
1,
1,
1,
1,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
3,230 | static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
UtvideoContext *c = avctx->priv_data;
int i, j;
const uint8_t *plane_start[5];
int plane_size, max_slice_siz... | true | FFmpeg | e86444b19d0b63c098298243fb20fd577f34cf34 | static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
UtvideoContext *c = avctx->priv_data;
int i, j;
const uint8_t *plane_start[5];
int plane_size, max_slice_siz... | {
"code": [
" slice_size = slice_end - slice_start;",
" if (slice_end < 0 || slice_size < 0 ||"
],
"line_no": [
59,
61
]
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
UtvideoContext *c = VAR_0->priv_data;
int VAR_6, VAR_7;
const uint8_t *VAR_8[5];
int VAR_9, VAR_10 = 0, VAR_11, VAR_1... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"UtvideoContext *c = VAR_0->priv_data;",
"int VAR_6, VAR_7;",
"const uint8_t *VAR_8[5];",
"int VAR_9, VAR_10 = 0, VAR_11, VAR_12, VAR_13;",
"int... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
45
],
[
47
],
[
49
... |
3,231 | static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx)
{
return ff_vaapi_encode_init(avctx, &vaapi_encode_type_h264);
}
| false | FFmpeg | 80a5d05108cb218e8cd2e25c6621a3bfef0a832e | static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx)
{
return ff_vaapi_encode_init(avctx, &vaapi_encode_type_h264);
}
| {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
return ff_vaapi_encode_init(avctx, &vaapi_encode_type_h264);
}
| [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"return ff_vaapi_encode_init(avctx, &vaapi_encode_type_h264);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
3,233 | static void test_qemu_strtoul_full_max(void)
{
const char *str = g_strdup_printf("%lu", ULONG_MAX);
unsigned long res = 999;
int err;
err = qemu_strtoul(str, NULL, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, ULONG_MAX);
}
| true | qemu | d6f723b513a0c3c4e58343b7c52a2f9850861fa0 | static void test_qemu_strtoul_full_max(void)
{
const char *str = g_strdup_printf("%lu", ULONG_MAX);
unsigned long res = 999;
int err;
err = qemu_strtoul(str, NULL, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, ULONG_MAX);
}
| {
"code": [
" const char *str = g_strdup_printf(\"%lu\", ULONG_MAX);",
" const char *str = g_strdup_printf(\"%lu\", ULONG_MAX);"
],
"line_no": [
5,
5
]
} | static void FUNC_0(void)
{
const char *VAR_0 = g_strdup_printf("%lu", ULONG_MAX);
unsigned long VAR_1 = 999;
int VAR_2;
VAR_2 = qemu_strtoul(VAR_0, NULL, 0, &VAR_1);
g_assert_cmpint(VAR_2, ==, 0);
g_assert_cmpint(VAR_1, ==, ULONG_MAX);
}
| [
"static void FUNC_0(void)\n{",
"const char *VAR_0 = g_strdup_printf(\"%lu\", ULONG_MAX);",
"unsigned long VAR_1 = 999;",
"int VAR_2;",
"VAR_2 = qemu_strtoul(VAR_0, NULL, 0, &VAR_1);",
"g_assert_cmpint(VAR_2, ==, 0);",
"g_assert_cmpint(VAR_1, ==, ULONG_MAX);",
"}"
] | [
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
]
] |
3,235 | static int cloop_open(BlockDriverState *bs, int flags)
{
BDRVCloopState *s = bs->opaque;
uint32_t offsets_size, max_compressed_block_size = 1, i;
bs->read_only = 1;
/* read header */
if (bdrv_pread(bs->file, 128, &s->block_size, 4) < 4) {
goto cloop_close;
}
s->block_siz... | true | qemu | 1a60657f5729bac57e70802eb17e67ad793400fd | static int cloop_open(BlockDriverState *bs, int flags)
{
BDRVCloopState *s = bs->opaque;
uint32_t offsets_size, max_compressed_block_size = 1, i;
bs->read_only = 1;
if (bdrv_pread(bs->file, 128, &s->block_size, 4) < 4) {
goto cloop_close;
}
s->block_size = be32_to_cpu(s... | {
"code": [
" if (bdrv_pread(bs->file, 128, &s->block_size, 4) < 4) {",
" goto cloop_close;",
" if (bdrv_pread(bs->file, 128 + 4, &s->n_blocks, 4) < 4) {",
" goto cloop_close;",
" if (bdrv_pread(bs->file, 128 + 4 + 4, s->offsets, offsets_size) <",
" offsets_si... | static int FUNC_0(BlockDriverState *VAR_0, int VAR_1)
{
BDRVCloopState *s = VAR_0->opaque;
uint32_t offsets_size, max_compressed_block_size = 1, i;
VAR_0->read_only = 1;
if (bdrv_pread(VAR_0->file, 128, &s->block_size, 4) < 4) {
goto cloop_close;
}
s->block_size = be32_... | [
"static int FUNC_0(BlockDriverState *VAR_0, int VAR_1)\n{",
"BDRVCloopState *s = VAR_0->opaque;",
"uint32_t offsets_size, max_compressed_block_size = 1, i;",
"VAR_0->read_only = 1;",
"if (bdrv_pread(VAR_0->file, 128, &s->block_size, 4) < 4) {",
"goto cloop_close;",
"}",
"s->block_size = be32_to_cpu(s-... | [
0,
0,
0,
0,
1,
1,
0,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
51
],
[
53
],
... |
3,238 | static void monitor_find_completion(Monitor *mon,
const char *cmdline)
{
const char *cmdname;
char *args[MAX_ARGS];
int nb_args, i, len;
const char *ptype, *str;
const mon_cmd_t *cmd;
MonitorBlockComplete mbs;
parse_cmdline(cmdline, &nb_args, ar... | true | qemu | dcc70cdf0932172fc5cf27617a3b033ca58d0176 | static void monitor_find_completion(Monitor *mon,
const char *cmdline)
{
const char *cmdname;
char *args[MAX_ARGS];
int nb_args, i, len;
const char *ptype, *str;
const mon_cmd_t *cmd;
MonitorBlockComplete mbs;
parse_cmdline(cmdline, &nb_args, ar... | {
"code": [
" break;",
" break;",
" parse_cmdline(cmdline, &nb_args, args);",
" for (i = 0; i < nb_args; i++) {",
" g_free(args[i]);"
],
"line_no": [
129,
129,
21,
25,
203
]
} | static void FUNC_0(Monitor *VAR_0,
const char *VAR_1)
{
const char *VAR_2;
char *VAR_3[MAX_ARGS];
int VAR_4, VAR_5, VAR_6;
const char *VAR_7, *VAR_8;
const mon_cmd_t *VAR_9;
MonitorBlockComplete mbs;
parse_cmdline(VAR_1, &VAR_4, VAR_3);
#ifdef ... | [
"static void FUNC_0(Monitor *VAR_0,\nconst char *VAR_1)\n{",
"const char *VAR_2;",
"char *VAR_3[MAX_ARGS];",
"int VAR_4, VAR_5, VAR_6;",
"const char *VAR_7, *VAR_8;",
"const mon_cmd_t *VAR_9;",
"MonitorBlockComplete mbs;",
"parse_cmdline(VAR_1, &VAR_4, VAR_3);",
"#ifdef DEBUG_COMPLETION\nfor (VAR_5 ... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
3,239 | static void decode_channel_map(uint8_t layout_map[][3],
enum ChannelPosition type,
GetBitContext *gb, int n)
{
while (n--) {
enum RawDataBlockType syn_ele;
switch (type) {
case AAC_CHANNEL_FRONT:
case AAC_CHANNEL_B... | true | FFmpeg | a48b890392aa22033f182421ba9e3f3b3256461d | static void decode_channel_map(uint8_t layout_map[][3],
enum ChannelPosition type,
GetBitContext *gb, int n)
{
while (n--) {
enum RawDataBlockType syn_ele;
switch (type) {
case AAC_CHANNEL_FRONT:
case AAC_CHANNEL_B... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t VAR_0[][3],
enum ChannelPosition VAR_1,
GetBitContext *VAR_2, int VAR_3)
{
while (VAR_3--) {
enum RawDataBlockType VAR_4;
switch (VAR_1) {
case AAC_CHANNEL_FRONT:
case AAC_CHANNEL_BACK:
... | [
"static void FUNC_0(uint8_t VAR_0[][3],\nenum ChannelPosition VAR_1,\nGetBitContext *VAR_2, int VAR_3)\n{",
"while (VAR_3--) {",
"enum RawDataBlockType VAR_4;",
"switch (VAR_1) {",
"case AAC_CHANNEL_FRONT:\ncase AAC_CHANNEL_BACK:\ncase AAC_CHANNEL_SIDE:\nVAR_4 = get_bits1(VAR_2);",
"break;",
"case AAC_C... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15,
17,
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
3,240 | int qemu_devtree_setprop_cell(void *fdt, const char *node_path,
const char *property, uint32_t val)
{
int offset;
offset = fdt_path_offset(fdt, node_path);
if (offset < 0)
return offset;
return fdt_setprop_cell(fdt, offset, property, val);
}
| true | qemu | ccbcfedd17fd2d13521fcee66810d0df464ec1cc | int qemu_devtree_setprop_cell(void *fdt, const char *node_path,
const char *property, uint32_t val)
{
int offset;
offset = fdt_path_offset(fdt, node_path);
if (offset < 0)
return offset;
return fdt_setprop_cell(fdt, offset, property, val);
}
| {
"code": [
" if (offset < 0)",
" return offset;",
" int offset;",
" offset = fdt_path_offset(fdt, node_path);",
" if (offset < 0)",
" return offset;",
" return fdt_setprop_cell(fdt, offset, property, val);",
" int offset;",
" offset = fdt_path_of... | int FUNC_0(void *VAR_0, const char *VAR_1,
const char *VAR_2, uint32_t VAR_3)
{
int VAR_4;
VAR_4 = fdt_path_offset(VAR_0, VAR_1);
if (VAR_4 < 0)
return VAR_4;
return fdt_setprop_cell(VAR_0, VAR_4, VAR_2, VAR_3);
}
| [
"int FUNC_0(void *VAR_0, const char *VAR_1,\nconst char *VAR_2, uint32_t VAR_3)\n{",
"int VAR_4;",
"VAR_4 = fdt_path_offset(VAR_0, VAR_1);",
"if (VAR_4 < 0)\nreturn VAR_4;",
"return fdt_setprop_cell(VAR_0, VAR_4, VAR_2, VAR_3);",
"}"
] | [
0,
1,
1,
1,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13,
15
],
[
19
],
[
21
]
] |
3,241 | static void qed_copy_from_backing_file(BDRVQEDState *s, uint64_t pos,
uint64_t len, uint64_t offset,
BlockDriverCompletionFunc *cb,
void *opaque)
{
CopyFromBackingFileCB *copy_cb;
/* Skip... | true | qemu | f06ee3d4aa547df8d7d2317b2b6db7a88c1f3744 | static void qed_copy_from_backing_file(BDRVQEDState *s, uint64_t pos,
uint64_t len, uint64_t offset,
BlockDriverCompletionFunc *cb,
void *opaque)
{
CopyFromBackingFileCB *copy_cb;
i... | {
"code": [
" qed_read_backing_file(s, pos, ©_cb->qiov,"
],
"line_no": [
41
]
} | static void FUNC_0(BDRVQEDState *VAR_0, uint64_t VAR_1,
uint64_t VAR_2, uint64_t VAR_3,
BlockDriverCompletionFunc *VAR_4,
void *VAR_5)
{
CopyFromBackingFileCB *copy_cb;
if (VAR_2 ==... | [
"static void FUNC_0(BDRVQEDState *VAR_0, uint64_t VAR_1,\nuint64_t VAR_2, uint64_t VAR_3,\nBlockDriverCompletionFunc *VAR_4,\nvoid *VAR_5)\n{",
"CopyFromBackingFileCB *copy_cb;",
"if (VAR_2 == 0) {",
"VAR_4(VAR_5, 0);",
"return;",
"}",
"copy_cb = gencb_alloc(sizeof(*copy_cb), VAR_4, VAR_5);",
"copy_cb... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41,
43
],
[
45
]
] |
3,242 | void align_get_bits(GetBitContext *s)
{
int n= (-get_bits_count(s)) & 7;
if(n) skip_bits(s, n);
}
| false | FFmpeg | 5a7bd28335d502d90c727f69a50e6f251c305e72 | void align_get_bits(GetBitContext *s)
{
int n= (-get_bits_count(s)) & 7;
if(n) skip_bits(s, n);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(GetBitContext *VAR_0)
{
int VAR_1= (-get_bits_count(VAR_0)) & 7;
if(VAR_1) skip_bits(VAR_0, VAR_1);
}
| [
"void FUNC_0(GetBitContext *VAR_0)\n{",
"int VAR_1= (-get_bits_count(VAR_0)) & 7;",
"if(VAR_1) skip_bits(VAR_0, VAR_1);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
3,243 | static uint64_t do_cvttq(CPUAlphaState *env, uint64_t a, int roundmode)
{
uint64_t frac, ret = 0;
uint32_t exp, sign, exc = 0;
int shift;
sign = (a >> 63);
exp = (uint32_t)(a >> 52) & 0x7ff;
frac = a & 0xfffffffffffffull;
if (exp == 0) {
if (unlikely(frac != 0)) {
... | true | qemu | 4ed069ab5334a495b49d0704795524fa34e8dbfc | static uint64_t do_cvttq(CPUAlphaState *env, uint64_t a, int roundmode)
{
uint64_t frac, ret = 0;
uint32_t exp, sign, exc = 0;
int shift;
sign = (a >> 63);
exp = (uint32_t)(a >> 52) & 0x7ff;
frac = a & 0xfffffffffffffull;
if (exp == 0) {
if (unlikely(frac != 0)) {
... | {
"code": [
" if (unlikely(frac != 0)) {"
],
"line_no": [
23
]
} | static uint64_t FUNC_0(CPUAlphaState *env, uint64_t a, int roundmode)
{
uint64_t frac, ret = 0;
uint32_t exp, sign, exc = 0;
int VAR_0;
sign = (a >> 63);
exp = (uint32_t)(a >> 52) & 0x7ff;
frac = a & 0xfffffffffffffull;
if (exp == 0) {
if (unlikely(frac != 0)) {
... | [
"static uint64_t FUNC_0(CPUAlphaState *env, uint64_t a, int roundmode)\n{",
"uint64_t frac, ret = 0;",
"uint32_t exp, sign, exc = 0;",
"int VAR_0;",
"sign = (a >> 63);",
"exp = (uint32_t)(a >> 52) & 0x7ff;",
"frac = a & 0xfffffffffffffull;",
"if (exp == 0) {",
"if (unlikely(frac != 0)) {",
"goto d... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
41
],
[
43
],
[
49
],
[
51
],
[
53
... |
3,244 | static inline void RENAME(rgb15to24)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
#ifdef HAVE_MMX
const uint16_t *mm_end;
#endif
uint8_t *d = (uint8_t *)dst;
const uint16_t *s = (uint16_t *)src;
end = s + src_size/2;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*s):"mem... | true | FFmpeg | 6e42e6c4b410dbef8b593c2d796a5dad95f89ee4 | static inline void RENAME(rgb15to24)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
#ifdef HAVE_MMX
const uint16_t *mm_end;
#endif
uint8_t *d = (uint8_t *)dst;
const uint16_t *s = (uint16_t *)src;
end = s + src_size/2;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*s):"mem... | {
"code": [
"\tconst uint16_t *end;",
"\tuint8_t *d = (uint8_t *)dst;",
"\tconst uint16_t *s = (uint16_t *)src;",
"\tend = s + src_size/2;",
"\twhile(s < end)",
"\t\tregister uint16_t bgr;",
"\t\tbgr = *s++;",
"\tconst uint16_t *end;",
"\tuint8_t *d = (uint8_t *)dst;",
"\tend =... | static inline void FUNC_0(rgb15to24)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *VAR_0;
#ifdef HAVE_MMX
const uint16_t *mm_end;
#endif
uint8_t *d = (uint8_t *)dst;
const uint16_t *VAR_1 = (uint16_t *)src;
VAR_0 = VAR_1 + src_size/2;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::... | [
"static inline void FUNC_0(rgb15to24)(const uint8_t *src, uint8_t *dst, long src_size)\n{",
"const uint16_t *VAR_0;",
"#ifdef HAVE_MMX\nconst uint16_t *mm_end;",
"#endif\nuint8_t *d = (uint8_t *)dst;",
"const uint16_t *VAR_1 = (uint16_t *)src;",
"VAR_0 = VAR_1 + src_size/2;",
"#ifdef HAVE_MMX\n__asm __v... | [
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,... |
3,245 | static int pick_geometry(FDrive *drv)
{
BlockBackend *blk = drv->blk;
const FDFormat *parse;
uint64_t nb_sectors, size;
int i;
int match, size_match, type_match;
bool magic = drv->drive == FLOPPY_DRIVE_TYPE_AUTO;
/* We can only pick a geometry if we have a diskette. */
if (!dr... | true | qemu | c691320faa6a1749042134716a628e22abb81ed2 | static int pick_geometry(FDrive *drv)
{
BlockBackend *blk = drv->blk;
const FDFormat *parse;
uint64_t nb_sectors, size;
int i;
int match, size_match, type_match;
bool magic = drv->drive == FLOPPY_DRIVE_TYPE_AUTO;
if (!drv->blk || !blk_is_inserted(drv->blk) ||
drv->dr... | {
"code": [
" \"%d sector '%s' type\\n\","
],
"line_no": [
123
]
} | static int FUNC_0(FDrive *VAR_0)
{
BlockBackend *blk = VAR_0->blk;
const FDFormat *VAR_1;
uint64_t nb_sectors, size;
int VAR_2;
int VAR_3, VAR_4, VAR_5;
bool magic = VAR_0->drive == FLOPPY_DRIVE_TYPE_AUTO;
if (!VAR_0->blk || !blk_is_inserted(VAR_0->blk) ||
VAR_0->dri... | [
"static int FUNC_0(FDrive *VAR_0)\n{",
"BlockBackend *blk = VAR_0->blk;",
"const FDFormat *VAR_1;",
"uint64_t nb_sectors, size;",
"int VAR_2;",
"int VAR_3, VAR_4, VAR_5;",
"bool magic = VAR_0->drive == FLOPPY_DRIVE_TYPE_AUTO;",
"if (!VAR_0->blk || !blk_is_inserted(VAR_0->blk) ||\nVAR_0->drive == FLOPP... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21,
23,
25
],
[
27
],
[
29
],
[
51
],
[
53
],
[
55
],
[
57
],
[
59
],
[
61
],
[
63
],
[
65
],
[
67
... |
3,246 | static int usbredir_get_bufpq(QEMUFile *f, void *priv, size_t unused)
{
struct endp_data *endp = priv;
USBRedirDevice *dev = endp->dev;
struct buf_packet *bufp;
int i;
endp->bufpq_size = qemu_get_be32(f);
for (i = 0; i < endp->bufpq_size; i++) {
bufp = g_malloc(sizeof(struct bu... | true | qemu | 98f343395e937fa1db3a28dfb4f303f97cfddd6c | static int usbredir_get_bufpq(QEMUFile *f, void *priv, size_t unused)
{
struct endp_data *endp = priv;
USBRedirDevice *dev = endp->dev;
struct buf_packet *bufp;
int i;
endp->bufpq_size = qemu_get_be32(f);
for (i = 0; i < endp->bufpq_size; i++) {
bufp = g_malloc(sizeof(struct bu... | {
"code": [
" bufp = g_malloc(sizeof(struct buf_packet));"
],
"line_no": [
19
]
} | static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2)
{
struct endp_data *VAR_3 = VAR_1;
USBRedirDevice *dev = VAR_3->dev;
struct buf_packet *VAR_4;
int VAR_5;
VAR_3->bufpq_size = qemu_get_be32(VAR_0);
for (VAR_5 = 0; VAR_5 < VAR_3->bufpq_size; VAR_5++) {
VAR_4 = g_mall... | [
"static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2)\n{",
"struct endp_data *VAR_3 = VAR_1;",
"USBRedirDevice *dev = VAR_3->dev;",
"struct buf_packet *VAR_4;",
"int VAR_5;",
"VAR_3->bufpq_size = qemu_get_be32(VAR_0);",
"for (VAR_5 = 0; VAR_5 < VAR_3->bufpq_size; VAR_5++) {",
"VAR_4 = g_mallo... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
]
] |
3,247 | static int vp8_packet(AVFormatContext *s, int idx)
{
struct ogg *ogg = s->priv_data;
struct ogg_stream *os = ogg->streams + idx;
uint8_t *p = os->buf + os->pstart;
if ((!os->lastpts || os->lastpts == AV_NOPTS_VALUE) &&
!(os->flags & OGG_FLAG_EOS)) {
int seg;
int duratio... | true | FFmpeg | c5fd57f483d2ad8e34551b78509f1e14136f73c0 | static int vp8_packet(AVFormatContext *s, int idx)
{
struct ogg *ogg = s->priv_data;
struct ogg_stream *os = ogg->streams + idx;
uint8_t *p = os->buf + os->pstart;
if ((!os->lastpts || os->lastpts == AV_NOPTS_VALUE) &&
!(os->flags & OGG_FLAG_EOS)) {
int seg;
int duratio... | {
"code": [
" if (s->streams[idx]->duration)"
],
"line_no": [
55
]
} | 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;
uint8_t *p = VAR_3->buf + VAR_3->pstart;
if ((!VAR_3->lastpts || VAR_3->lastpts == AV_NOPTS_VALUE) &&
!(VAR_3->flags & OGG_FLAG_EOS)) {
... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)\n{",
"struct VAR_2 *VAR_2 = VAR_0->priv_data;",
"struct ogg_stream *VAR_3 = VAR_2->streams + VAR_1;",
"uint8_t *p = VAR_3->buf + VAR_3->pstart;",
"if ((!VAR_3->lastpts || VAR_3->lastpts == AV_NOPTS_VALUE) &&\n!(VAR_3->flags & OGG_FLAG_EOS)) {",
"int VA... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
3,248 | static int xen_pt_config_reg_init(XenPCIPassthroughState *s,
XenPTRegGroup *reg_grp, XenPTRegInfo *reg)
{
XenPTReg *reg_entry;
uint32_t data = 0;
int rc = 0;
reg_entry = g_new0(XenPTReg, 1);
reg_entry->reg = reg;
if (reg->init) {
/* initiali... | true | qemu | c5633d998a27502ad8cc10c2d46f91b02555ae7a | static int xen_pt_config_reg_init(XenPCIPassthroughState *s,
XenPTRegGroup *reg_grp, XenPTRegInfo *reg)
{
XenPTReg *reg_entry;
uint32_t data = 0;
int rc = 0;
reg_entry = g_new0(XenPTReg, 1);
reg_entry->reg = reg;
if (reg->init) {
r... | {
"code": [
" free(reg_entry);",
" free(reg_entry);"
],
"line_no": [
31,
31
]
} | static int FUNC_0(XenPCIPassthroughState *VAR_0,
XenPTRegGroup *VAR_1, XenPTRegInfo *VAR_2)
{
XenPTReg *reg_entry;
uint32_t data = 0;
int VAR_3 = 0;
reg_entry = g_new0(XenPTReg, 1);
reg_entry->VAR_2 = VAR_2;
if (VAR_2->init) {
VAR_... | [
"static int FUNC_0(XenPCIPassthroughState *VAR_0,\nXenPTRegGroup *VAR_1, XenPTRegInfo *VAR_2)\n{",
"XenPTReg *reg_entry;",
"uint32_t data = 0;",
"int VAR_3 = 0;",
"reg_entry = g_new0(XenPTReg, 1);",
"reg_entry->VAR_2 = VAR_2;",
"if (VAR_2->init) {",
"VAR_3 = VAR_2->init(VAR_0, reg_entry->VAR_2,\nVAR_1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
55
... |
3,250 | static void open_help(void)
{
printf(
"\n"
" opens a new file in the requested mode\n"
"\n"
" Example:\n"
" 'open -Cn /tmp/data' - creates/opens data file read-write and uncached\n"
"\n"
" Opens a file for subsequent use by all of the other qemu-io commands.\n"
" -r, -- open file read-only\n"
" -s, -- us... | false | qemu | e4e12bb26d9f2e2de02ff888063f41cc1e1b3935 | static void open_help(void)
{
printf(
"\n"
" opens a new file in the requested mode\n"
"\n"
" Example:\n"
" 'open -Cn /tmp/data' - creates/opens data file read-write and uncached\n"
"\n"
" Opens a file for subsequent use by all of the other qemu-io commands.\n"
" -r, -- open file read-only\n"
" -s, -- us... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
printf(
"\n"
" opens a new file in the requested mode\n"
"\n"
" Example:\n"
" 'open -Cn /tmp/data' - creates/opens data file read-write and uncached\n"
"\n"
" Opens a file for subsequent use by all of the other qemu-io commands.\n"
" -r, -- open file read-only\n"
" -s, -- use s... | [
"static void FUNC_0(void)\n{",
"printf(\n\"\\n\"\n\" opens a new file in the requested mode\\n\"\n\"\\n\"\n\" Example:\\n\"\n\" 'open -Cn /tmp/data' - creates/opens data file read-write and uncached\\n\"\n\"\\n\"\n\" Opens a file for subsequent use by all of the other qemu-io commands.\\n\"\n\" -r, -- open file r... | [
0,
0,
0
] | [
[
1,
3
],
[
5,
7,
9,
11,
13,
15,
17,
19,
21,
23,
25,
27,
29
],
[
31
]
] |
3,251 | static const char *scsi_command_name(uint8_t cmd)
{
static const char *names[] = {
[ TEST_UNIT_READY ] = "TEST_UNIT_READY",
[ REWIND ] = "REWIND",
[ REQUEST_SENSE ] = "REQUEST_SENSE",
[ FORMAT_UNIT ] = "FORMAT_UNIT",
[... | false | qemu | 48bb9f53f4944771bc5d7bf89bbaa61094ad4382 | static const char *scsi_command_name(uint8_t cmd)
{
static const char *names[] = {
[ TEST_UNIT_READY ] = "TEST_UNIT_READY",
[ REWIND ] = "REWIND",
[ REQUEST_SENSE ] = "REQUEST_SENSE",
[ FORMAT_UNIT ] = "FORMAT_UNIT",
[... | {
"code": [],
"line_no": []
} | static const char *FUNC_0(uint8_t VAR_0)
{
static const char *VAR_1[] = {
[ TEST_UNIT_READY ] = "TEST_UNIT_READY",
[ REWIND ] = "REWIND",
[ REQUEST_SENSE ] = "REQUEST_SENSE",
[ FORMAT_UNIT ] = "FORMAT_UNIT",
[ READ_BLO... | [
"static const char *FUNC_0(uint8_t VAR_0)\n{",
"static const char *VAR_1[] = {",
"[ TEST_UNIT_READY ] = \"TEST_UNIT_READY\",\n[ REWIND ] = \"REWIND\",\n[ REQUEST_SENSE ] = \"REQUEST_SENSE\",\n[ FORMAT_UNIT ] = \"FORMAT_UNIT\",\n[ READ_BLOCK_LIMITS ] = \"... | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9,
11,
13,
15,
17,
19,
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,
63,
65,
67,
69,
71,
73,
75,... |
3,252 | static void intra_predict_vert_dc_8x8_msa(uint8_t *src, int32_t stride)
{
uint8_t lp_cnt;
uint32_t out0 = 0, out1 = 0;
v16u8 src_top;
v8u16 add;
v4u32 sum;
v4i32 res0, res1;
src_top = LD_UB(src - stride);
add = __msa_hadd_u_h(src_top, src_top);
sum = __msa_hadd_u_w(add, a... | false | FFmpeg | d6737539e77e78fca9a04914d51996cfd1ccc55c | static void intra_predict_vert_dc_8x8_msa(uint8_t *src, int32_t stride)
{
uint8_t lp_cnt;
uint32_t out0 = 0, out1 = 0;
v16u8 src_top;
v8u16 add;
v4u32 sum;
v4i32 res0, res1;
src_top = LD_UB(src - stride);
add = __msa_hadd_u_h(src_top, src_top);
sum = __msa_hadd_u_w(add, a... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, int32_t VAR_1)
{
uint8_t lp_cnt;
uint32_t out0 = 0, out1 = 0;
v16u8 src_top;
v8u16 add;
v4u32 sum;
v4i32 res0, res1;
src_top = LD_UB(VAR_0 - VAR_1);
add = __msa_hadd_u_h(src_top, src_top);
sum = __msa_hadd_u_w(add, add);
sum = (v4u3... | [
"static void FUNC_0(uint8_t *VAR_0, int32_t VAR_1)\n{",
"uint8_t lp_cnt;",
"uint32_t out0 = 0, out1 = 0;",
"v16u8 src_top;",
"v8u16 add;",
"v4u32 sum;",
"v4i32 res0, res1;",
"src_top = LD_UB(VAR_0 - VAR_1);",
"add = __msa_hadd_u_h(src_top, src_top);",
"sum = __msa_hadd_u_w(add, add);",
"sum = (v... | [
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
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
3,253 | int bdrv_block_status(BlockDriverState *bs, int64_t offset, int64_t bytes,
int64_t *pnum, int64_t *map, BlockDriverState **file)
{
int64_t ret;
int n;
assert(QEMU_IS_ALIGNED(offset | bytes, BDRV_SECTOR_SIZE));
assert(pnum);
/*
* The contract allows us to return p... | false | qemu | 3182664220571d11d4fe03ecdc10fcc1e842ed32 | int bdrv_block_status(BlockDriverState *bs, int64_t offset, int64_t bytes,
int64_t *pnum, int64_t *map, BlockDriverState **file)
{
int64_t ret;
int n;
assert(QEMU_IS_ALIGNED(offset | bytes, BDRV_SECTOR_SIZE));
assert(pnum);
bytes = MIN(bytes, BDRV_REQUEST... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1, int64_t VAR_2,
int64_t *VAR_3, int64_t *VAR_4, BlockDriverState **VAR_5)
{
int64_t ret;
int VAR_6;
assert(QEMU_IS_ALIGNED(VAR_1 | VAR_2, BDRV_SECTOR_SIZE));
assert(VAR_3);
VAR_2 = MIN(VAR_2, BDRV_REQUEST_... | [
"int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1, int64_t VAR_2,\nint64_t *VAR_3, int64_t *VAR_4, BlockDriverState **VAR_5)\n{",
"int64_t ret;",
"int VAR_6;",
"assert(QEMU_IS_ALIGNED(VAR_1 | VAR_2, BDRV_SECTOR_SIZE));",
"assert(VAR_3);",
"VAR_2 = MIN(VAR_2, BDRV_REQUEST_MAX_BYTES);",
"ret = bdrv_get_b... | [
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
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[... |
3,254 | int css_do_csch(SubchDev *sch)
{
SCSW *s = &sch->curr_status.scsw;
PMCW *p = &sch->curr_status.pmcw;
int ret;
if (!(p->flags & (PMCW_FLAGS_MASK_DNV | PMCW_FLAGS_MASK_ENA))) {
ret = -ENODEV;
goto out;
}
/* Trigger the clear function. */
s->ctrl &= ~(SCSW_CTRL_MAS... | false | qemu | c679e74d2e29fa08ede9121d59aee4e9675611d7 | int css_do_csch(SubchDev *sch)
{
SCSW *s = &sch->curr_status.scsw;
PMCW *p = &sch->curr_status.pmcw;
int ret;
if (!(p->flags & (PMCW_FLAGS_MASK_DNV | PMCW_FLAGS_MASK_ENA))) {
ret = -ENODEV;
goto out;
}
s->ctrl &= ~(SCSW_CTRL_MASK_FCTL | SCSW_CTRL_MASK_ACTL);
... | {
"code": [],
"line_no": []
} | int FUNC_0(SubchDev *VAR_0)
{
SCSW *s = &VAR_0->curr_status.scsw;
PMCW *p = &VAR_0->curr_status.pmcw;
int VAR_1;
if (!(p->flags & (PMCW_FLAGS_MASK_DNV | PMCW_FLAGS_MASK_ENA))) {
VAR_1 = -ENODEV;
goto out;
}
s->ctrl &= ~(SCSW_CTRL_MASK_FCTL | SCSW_CTRL_MASK_ACTL... | [
"int FUNC_0(SubchDev *VAR_0)\n{",
"SCSW *s = &VAR_0->curr_status.scsw;",
"PMCW *p = &VAR_0->curr_status.pmcw;",
"int VAR_1;",
"if (!(p->flags & (PMCW_FLAGS_MASK_DNV | PMCW_FLAGS_MASK_ENA))) {",
"VAR_1 = -ENODEV;",
"goto out;",
"}",
"s->ctrl &= ~(SCSW_CTRL_MASK_FCTL | SCSW_CTRL_MASK_ACTL);",
"s->ct... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37,
39
],
[
41
]
] |
3,257 | build_dsdt(GArray *table_data, BIOSLinker *linker,
AcpiPmInfo *pm, AcpiMiscInfo *misc,
Range *pci_hole, Range *pci_hole64, MachineState *machine)
{
CrsRangeEntry *entry;
Aml *dsdt, *sb_scope, *scope, *dev, *method, *field, *pkg, *crs;
GPtrArray *mem_ranges = g_ptr_array_new_with_... | false | qemu | a0efbf16604770b9d805bcf210ec29942321134f | build_dsdt(GArray *table_data, BIOSLinker *linker,
AcpiPmInfo *pm, AcpiMiscInfo *misc,
Range *pci_hole, Range *pci_hole64, MachineState *machine)
{
CrsRangeEntry *entry;
Aml *dsdt, *sb_scope, *scope, *dev, *method, *field, *pkg, *crs;
GPtrArray *mem_ranges = g_ptr_array_new_with_... | {
"code": [],
"line_no": []
} | FUNC_0(GArray *VAR_0, BIOSLinker *VAR_1,
AcpiPmInfo *VAR_2, AcpiMiscInfo *VAR_3,
Range *VAR_4, Range *VAR_5, MachineState *VAR_6)
{
CrsRangeEntry *entry;
Aml *dsdt, *sb_scope, *scope, *dev, *method, *field, *pkg, *crs;
GPtrArray *mem_ranges = g_ptr_array_new_with_free_func(crs_ra... | [
"FUNC_0(GArray *VAR_0, BIOSLinker *VAR_1,\nAcpiPmInfo *VAR_2, AcpiMiscInfo *VAR_3,\nRange *VAR_4, Range *VAR_5, MachineState *VAR_6)\n{",
"CrsRangeEntry *entry;",
"Aml *dsdt, *sb_scope, *scope, *dev, *method, *field, *pkg, *crs;",
"GPtrArray *mem_ranges = g_ptr_array_new_with_free_func(crs_range_free);",
"G... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
3,258 | static void ics_kvm_realize(DeviceState *dev, Error **errp)
{
ICSState *ics = ICS_SIMPLE(dev);
if (!ics->nr_irqs) {
error_setg(errp, "Number of interrupts needs to be greater 0");
return;
}
ics->irqs = g_malloc0(ics->nr_irqs * sizeof(ICSIRQState));
ics->qirqs = qemu_allocat... | false | qemu | 100f738850639a108d6767316ce4dcc1d1ea4ae4 | static void ics_kvm_realize(DeviceState *dev, Error **errp)
{
ICSState *ics = ICS_SIMPLE(dev);
if (!ics->nr_irqs) {
error_setg(errp, "Number of interrupts needs to be greater 0");
return;
}
ics->irqs = g_malloc0(ics->nr_irqs * sizeof(ICSIRQState));
ics->qirqs = qemu_allocat... | {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{
ICSState *ics = ICS_SIMPLE(VAR_0);
if (!ics->nr_irqs) {
error_setg(VAR_1, "Number of interrupts needs to be greater 0");
return;
}
ics->irqs = g_malloc0(ics->nr_irqs * sizeof(ICSIRQState));
ics->qirqs = qemu_allocate_i... | [
"static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{",
"ICSState *ics = ICS_SIMPLE(VAR_0);",
"if (!ics->nr_irqs) {",
"error_setg(VAR_1, \"Number of interrupts needs to be greater 0\");",
"return;",
"}",
"ics->irqs = g_malloc0(ics->nr_irqs * sizeof(ICSIRQState));",
"ics->qirqs = qemu_allocate_irqs... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
]
] |
3,259 | ram_addr_t memory_region_get_ram_addr(MemoryRegion *mr)
{
assert(mr->backend_registered);
return mr->ram_addr;
}
| false | qemu | 26a83ad0e793465b74a8b06a65f2f6fdc5615413 | ram_addr_t memory_region_get_ram_addr(MemoryRegion *mr)
{
assert(mr->backend_registered);
return mr->ram_addr;
}
| {
"code": [],
"line_no": []
} | ram_addr_t FUNC_0(MemoryRegion *mr)
{
assert(mr->backend_registered);
return mr->ram_addr;
}
| [
"ram_addr_t FUNC_0(MemoryRegion *mr)\n{",
"assert(mr->backend_registered);",
"return mr->ram_addr;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
3,260 | static void tpm_passthrough_cancel_cmd(TPMBackend *tb)
{
/* cancelling an ongoing command is known not to work with some TPMs */
}
| false | qemu | 92dcc234ec1f266fb5d59bed77d66320c2c75965 | static void tpm_passthrough_cancel_cmd(TPMBackend *tb)
{
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(TPMBackend *VAR_0)
{
}
| [
"static void FUNC_0(TPMBackend *VAR_0)\n{",
"}"
] | [
0,
0
] | [
[
1,
3
],
[
7
]
] |
3,261 | void hmp_info_spice(Monitor *mon, const QDict *qdict)
{
SpiceChannelList *chan;
SpiceInfo *info;
const char *channel_name;
const char * const channel_names[] = {
[SPICE_CHANNEL_MAIN] = "main",
[SPICE_CHANNEL_DISPLAY] = "display",
[SPICE_CHANNEL_INPUTS] = "inputs",
... | false | qemu | ddf21908961073199f3d186204da4810f2ea150b | void hmp_info_spice(Monitor *mon, const QDict *qdict)
{
SpiceChannelList *chan;
SpiceInfo *info;
const char *channel_name;
const char * const channel_names[] = {
[SPICE_CHANNEL_MAIN] = "main",
[SPICE_CHANNEL_DISPLAY] = "display",
[SPICE_CHANNEL_INPUTS] = "inputs",
... | {
"code": [],
"line_no": []
} | void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{
SpiceChannelList *chan;
SpiceInfo *info;
const char *VAR_2;
const char * const VAR_3[] = {
[SPICE_CHANNEL_MAIN] = "main",
[SPICE_CHANNEL_DISPLAY] = "display",
[SPICE_CHANNEL_INPUTS] = "inputs",
[SPICE_CHANNEL_CURS... | [
"void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)\n{",
"SpiceChannelList *chan;",
"SpiceInfo *info;",
"const char *VAR_2;",
"const char * const VAR_3[] = {",
"[SPICE_CHANNEL_MAIN] = \"main\",\n[SPICE_CHANNEL_DISPLAY] = \"display\",\n[SPICE_CHANNEL_INPUTS] = \"inputs\",\n[SPICE_CHANNEL_CURSOR] = \"cursor\",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
41,
43,
45
],
[
49
],
[
53
],
[
55
],
[
57
],
[
59
],
[
63
],
[
65
],
[... |
3,262 | START_TEST(qdict_get_try_int_test)
{
int ret;
const int value = 100;
const char *key = "int";
qdict_put(tests_dict, key, qint_from_int(value));
ret = qdict_get_try_int(tests_dict, key, 0);
fail_unless(ret == value);
}
| false | qemu | ac531cb6e542b1e61d668604adf9dc5306a948c0 | START_TEST(qdict_get_try_int_test)
{
int ret;
const int value = 100;
const char *key = "int";
qdict_put(tests_dict, key, qint_from_int(value));
ret = qdict_get_try_int(tests_dict, key, 0);
fail_unless(ret == value);
}
| {
"code": [],
"line_no": []
} | FUNC_0(VAR_0)
{
int VAR_1;
const int VAR_2 = 100;
const char *VAR_3 = "int";
qdict_put(tests_dict, VAR_3, qint_from_int(VAR_2));
VAR_1 = qdict_get_try_int(tests_dict, VAR_3, 0);
fail_unless(VAR_1 == VAR_2);
}
| [
"FUNC_0(VAR_0)\n{",
"int VAR_1;",
"const int VAR_2 = 100;",
"const char *VAR_3 = \"int\";",
"qdict_put(tests_dict, VAR_3, qint_from_int(VAR_2));",
"VAR_1 = qdict_get_try_int(tests_dict, VAR_3, 0);",
"fail_unless(VAR_1 == VAR_2);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
]
] |
3,263 | static int get_cv_transfer_function(AVCodecContext *avctx,
CFStringRef *transfer_fnc,
CFNumberRef *gamma_level)
{
enum AVColorTransferCharacteristic trc = avctx->color_trc;
Float32 gamma;
*gamma_level = NULL;
switch (trc) {... | false | FFmpeg | dcd3418a35aab7ef283b68ed9997ce4ac204094e | static int get_cv_transfer_function(AVCodecContext *avctx,
CFStringRef *transfer_fnc,
CFNumberRef *gamma_level)
{
enum AVColorTransferCharacteristic trc = avctx->color_trc;
Float32 gamma;
*gamma_level = NULL;
switch (trc) {... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
CFStringRef *VAR_1,
CFNumberRef *VAR_2)
{
enum AVColorTransferCharacteristic VAR_3 = VAR_0->color_trc;
Float32 gamma;
*VAR_2 = NULL;
switch (VAR_3) {
case AVCOL_TRC_UNSPECIF... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nCFStringRef *VAR_1,\nCFNumberRef *VAR_2)\n{",
"enum AVColorTransferCharacteristic VAR_3 = VAR_0->color_trc;",
"Float32 gamma;",
"*VAR_2 = NULL;",
"switch (VAR_3) {",
"case AVCOL_TRC_UNSPECIFIED:\n*VAR_1 = NULL;",
"break;",
"case AVCOL_TRC_BT709:\n*VAR_1 = kCV... | [
0,
0,
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
],
[
35,
37
],
[
39
],
[
43,
45
],
[
47
],
[
49
],
[
51
],
[
55,
57
],
[... |
3,264 | void qmp_block_set_io_throttle(const char *device, int64_t bps, int64_t bps_rd,
int64_t bps_wr,
int64_t iops,
int64_t iops_rd,
int64_t iops_wr,
bool has_bps_max... | false | qemu | a0d64a61db602696f4f1895a890c65eda5b3b618 | void qmp_block_set_io_throttle(const char *device, int64_t bps, int64_t bps_rd,
int64_t bps_wr,
int64_t iops,
int64_t iops_rd,
int64_t iops_wr,
bool has_bps_max... | {
"code": [],
"line_no": []
} | void FUNC_0(const char *VAR_0, int64_t VAR_1, int64_t VAR_2,
int64_t VAR_3,
int64_t VAR_4,
int64_t VAR_5,
int64_t VAR_6,
bool VAR_7,
... | [
"void FUNC_0(const char *VAR_0, int64_t VAR_1, int64_t VAR_2,\nint64_t VAR_3,\nint64_t VAR_4,\nint64_t VAR_5,\nint64_t VAR_6,\nbool VAR_7,\nint64_t VAR_8,\nbool VAR_9,\nint64_t VAR_10,\nbool VAR_11,\nint64_t VAR_12,\nbool VAR_13,\nint64_t VAR_14,\nbool VAR_15,\nint64_t VAR_16,\nbool VAR_17,\nint64_t VAR_18,\nbool V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13,
15,
17,
19,
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57
],
[
59,
61
],
[
63
],
[... |
3,265 | static inline void gen_op_eval_fbue(TCGv dst, TCGv src,
unsigned int fcc_offset)
{
gen_mov_reg_FCC0(dst, src, fcc_offset);
gen_mov_reg_FCC1(cpu_tmp0, src, fcc_offset);
tcg_gen_xor_tl(dst, dst, cpu_tmp0);
tcg_gen_xori_tl(dst, dst, 0x1);
}
| false | qemu | de9e9d9f17a36ff76c1a02a5348835e5e0a081b0 | static inline void gen_op_eval_fbue(TCGv dst, TCGv src,
unsigned int fcc_offset)
{
gen_mov_reg_FCC0(dst, src, fcc_offset);
gen_mov_reg_FCC1(cpu_tmp0, src, fcc_offset);
tcg_gen_xor_tl(dst, dst, cpu_tmp0);
tcg_gen_xori_tl(dst, dst, 0x1);
}
| {
"code": [],
"line_no": []
} | static inline void FUNC_0(TCGv VAR_0, TCGv VAR_1,
unsigned int VAR_2)
{
gen_mov_reg_FCC0(VAR_0, VAR_1, VAR_2);
gen_mov_reg_FCC1(cpu_tmp0, VAR_1, VAR_2);
tcg_gen_xor_tl(VAR_0, VAR_0, cpu_tmp0);
tcg_gen_xori_tl(VAR_0, VAR_0, 0x1);
}
| [
"static inline void FUNC_0(TCGv VAR_0, TCGv VAR_1,\nunsigned int VAR_2)\n{",
"gen_mov_reg_FCC0(VAR_0, VAR_1, VAR_2);",
"gen_mov_reg_FCC1(cpu_tmp0, VAR_1, VAR_2);",
"tcg_gen_xor_tl(VAR_0, VAR_0, cpu_tmp0);",
"tcg_gen_xori_tl(VAR_0, VAR_0, 0x1);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
3,267 | static void vnc_client_error(VncState *vs)
{
vnc_client_io_error(vs, -1, EINVAL);
}
| false | qemu | 5fb6c7a8b26eab1a22207d24b4784bd2b39ab54b | static void vnc_client_error(VncState *vs)
{
vnc_client_io_error(vs, -1, EINVAL);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(VncState *VAR_0)
{
vnc_client_io_error(VAR_0, -1, EINVAL);
}
| [
"static void FUNC_0(VncState *VAR_0)\n{",
"vnc_client_io_error(VAR_0, -1, EINVAL);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
3,268 | static void msix_set_pending(PCIDevice *dev, int vector)
{
*msix_pending_byte(dev, vector) |= msix_pending_mask(vector);
}
| false | qemu | 70f8ee395afda6d96b15cb9a5b311af7720dded0 | static void msix_set_pending(PCIDevice *dev, int vector)
{
*msix_pending_byte(dev, vector) |= msix_pending_mask(vector);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(PCIDevice *VAR_0, int VAR_1)
{
*msix_pending_byte(VAR_0, VAR_1) |= msix_pending_mask(VAR_1);
}
| [
"static void FUNC_0(PCIDevice *VAR_0, int VAR_1)\n{",
"*msix_pending_byte(VAR_0, VAR_1) |= msix_pending_mask(VAR_1);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
3,269 | static void qlist_destroy_obj(QObject *obj)
{
QList *qlist;
QListEntry *entry, *next_entry;
assert(obj != NULL);
qlist = qobject_to_qlist(obj);
QTAILQ_FOREACH_SAFE(entry, &qlist->head, next, next_entry) {
QTAILQ_REMOVE(&qlist->head, entry, next);
qobject_decref(entry->val... | false | qemu | 55e1819c509b3d9c10a54678b9c585bbda13889e | static void qlist_destroy_obj(QObject *obj)
{
QList *qlist;
QListEntry *entry, *next_entry;
assert(obj != NULL);
qlist = qobject_to_qlist(obj);
QTAILQ_FOREACH_SAFE(entry, &qlist->head, next, next_entry) {
QTAILQ_REMOVE(&qlist->head, entry, next);
qobject_decref(entry->val... | {
"code": [],
"line_no": []
} | static void FUNC_0(QObject *VAR_0)
{
QList *qlist;
QListEntry *entry, *next_entry;
assert(VAR_0 != NULL);
qlist = qobject_to_qlist(VAR_0);
QTAILQ_FOREACH_SAFE(entry, &qlist->head, next, next_entry) {
QTAILQ_REMOVE(&qlist->head, entry, next);
qobject_decref(entry->value);
... | [
"static void FUNC_0(QObject *VAR_0)\n{",
"QList *qlist;",
"QListEntry *entry, *next_entry;",
"assert(VAR_0 != NULL);",
"qlist = qobject_to_qlist(VAR_0);",
"QTAILQ_FOREACH_SAFE(entry, &qlist->head, next, next_entry) {",
"QTAILQ_REMOVE(&qlist->head, entry, next);",
"qobject_decref(entry->value);",
"g_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
]
] |
3,271 | static int read_f(int argc, char **argv)
{
struct timeval t1, t2;
int Cflag = 0, pflag = 0, qflag = 0, vflag = 0;
int Pflag = 0, sflag = 0, lflag = 0, bflag = 0;
int c, cnt;
char *buf;
int64_t offset;
int count;
/* Some compilers get confused and warn if this is not initialized.... | false | qemu | 031380d8770d2df6c386e4aeabd412007d3ebd54 | static int read_f(int argc, char **argv)
{
struct timeval t1, t2;
int Cflag = 0, pflag = 0, qflag = 0, vflag = 0;
int Pflag = 0, sflag = 0, lflag = 0, bflag = 0;
int c, cnt;
char *buf;
int64_t offset;
int count;
int total = 0;
int pattern = 0, pattern_offset = 0, patt... | {
"code": [],
"line_no": []
} | static int FUNC_0(int VAR_0, char **VAR_1)
{
struct timeval VAR_2, VAR_3;
int VAR_4 = 0, VAR_5 = 0, VAR_6 = 0, VAR_7 = 0;
int VAR_8 = 0, VAR_9 = 0, VAR_10 = 0, VAR_11 = 0;
int VAR_12, VAR_13;
char *VAR_14;
int64_t offset;
int VAR_15;
int VAR_16 = 0;
int VAR_17 = 0, VA... | [
"static int FUNC_0(int VAR_0, char **VAR_1)\n{",
"struct timeval VAR_2, VAR_3;",
"int VAR_4 = 0, VAR_5 = 0, VAR_6 = 0, VAR_7 = 0;",
"int VAR_8 = 0, VAR_9 = 0, VAR_10 = 0, VAR_11 = 0;",
"int VAR_12, VAR_13;",
"char *VAR_14;",
"int64_t offset;",
"int VAR_15;",
"int VAR_16 = 0;",
"int VAR_17 = 0, VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[... |
3,272 | static void dec_barrel(DisasContext *dc)
{
TCGv t0;
unsigned int s, t;
if ((dc->tb_flags & MSR_EE_FLAG)
&& !(dc->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK)
&& !(dc->env->pvr.regs[0] & PVR0_USE_BARREL_MASK)) {
tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP);
... | false | qemu | 97f90cbfe810bb153fc44bde732d9639610783bb | static void dec_barrel(DisasContext *dc)
{
TCGv t0;
unsigned int s, t;
if ((dc->tb_flags & MSR_EE_FLAG)
&& !(dc->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK)
&& !(dc->env->pvr.regs[0] & PVR0_USE_BARREL_MASK)) {
tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0)
{
TCGv t0;
unsigned int VAR_1, VAR_2;
if ((VAR_0->tb_flags & MSR_EE_FLAG)
&& !(VAR_0->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK)
&& !(VAR_0->env->pvr.regs[0] & PVR0_USE_BARREL_MASK)) {
tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEG... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"TCGv t0;",
"unsigned int VAR_1, VAR_2;",
"if ((VAR_0->tb_flags & MSR_EE_FLAG)\n&& !(VAR_0->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK)\n&& !(VAR_0->env->pvr.regs[0] & PVR0_USE_BARREL_MASK)) {",
"tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP);",
"t_gen_ra... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33,
35
],
[
39
],
[
43
],
[
45
],
[
49,
51
],
[
53
],
[
55,
57
],
... |
3,273 | static void ide_dma_restart_cb(void *opaque, int running, int reason)
{
BMDMAState *bm = opaque;
if (!running)
return;
if (bm->status & BM_STATUS_DMA_RETRY) {
bm->status &= ~BM_STATUS_DMA_RETRY;
ide_dma_restart(bm->ide_if);
} else if (bm->status & BM_STATUS_PIO_RETRY) {
... | false | qemu | 213189ab65d83ecd9072f27c80a15dcb91b6bdbf | static void ide_dma_restart_cb(void *opaque, int running, int reason)
{
BMDMAState *bm = opaque;
if (!running)
return;
if (bm->status & BM_STATUS_DMA_RETRY) {
bm->status &= ~BM_STATUS_DMA_RETRY;
ide_dma_restart(bm->ide_if);
} else if (bm->status & BM_STATUS_PIO_RETRY) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)
{
BMDMAState *bm = VAR_0;
if (!VAR_1)
return;
if (bm->status & BM_STATUS_DMA_RETRY) {
bm->status &= ~BM_STATUS_DMA_RETRY;
ide_dma_restart(bm->ide_if);
} else if (bm->status & BM_STATUS_PIO_RETRY) {
bm->status ... | [
"static void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)\n{",
"BMDMAState *bm = VAR_0;",
"if (!VAR_1)\nreturn;",
"if (bm->status & BM_STATUS_DMA_RETRY) {",
"bm->status &= ~BM_STATUS_DMA_RETRY;",
"ide_dma_restart(bm->ide_if);",
"} else if (bm->status & BM_STATUS_PIO_RETRY) {",
"bm->status &= ~BM_STATUS_P... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
3,276 | static int ahci_start_transfer(IDEDMA *dma)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
IDEState *s = &ad->port.ifs[0];
uint32_t size = (uint32_t)(s->data_end - s->data_ptr);
/* write == ram -> device */
uint32_t opts = le32_to_cpu(ad->cur_cmd->opts);
int is_write = opts & AHCI_CM... | true | qemu | 61f52e06f0a21bab782f98ef3ea789aa6d0aa046 | static int ahci_start_transfer(IDEDMA *dma)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
IDEState *s = &ad->port.ifs[0];
uint32_t size = (uint32_t)(s->data_end - s->data_ptr);
uint32_t opts = le32_to_cpu(ad->cur_cmd->opts);
int is_write = opts & AHCI_CMD_WRITE;
int is_atapi =... | {
"code": [
" if (!ahci_populate_sglist(ad, &s->sg)) {"
],
"line_no": [
35
]
} | static int FUNC_0(IDEDMA *VAR_0)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, VAR_0, VAR_0);
IDEState *s = &ad->port.ifs[0];
uint32_t size = (uint32_t)(s->data_end - s->data_ptr);
uint32_t opts = le32_to_cpu(ad->cur_cmd->opts);
int VAR_1 = opts & AHCI_CMD_WRITE;
int VAR_2 = opts & AHCI_... | [
"static int FUNC_0(IDEDMA *VAR_0)\n{",
"AHCIDevice *ad = DO_UPCAST(AHCIDevice, VAR_0, VAR_0);",
"IDEState *s = &ad->port.ifs[0];",
"uint32_t size = (uint32_t)(s->data_end - s->data_ptr);",
"uint32_t opts = le32_to_cpu(ad->cur_cmd->opts);",
"int VAR_1 = opts & AHCI_CMD_WRITE;",
"int VAR_2 = opts & AHCI_C... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43,
45,
47
],
[
51
],
[
53
],
[
55
... |
3,277 | SocketAddress *socket_address_flatten(SocketAddressLegacy *addr_legacy)
{
SocketAddress *addr = g_new(SocketAddress, 1);
if (!addr_legacy) {
return NULL;
}
switch (addr_legacy->type) {
case SOCKET_ADDRESS_LEGACY_KIND_INET:
addr->type = SOCKET_ADDRESS_TYPE_INET;
Q... | true | qemu | fc0f005958ac2cba0d1b081733e19ef055d59636 | SocketAddress *socket_address_flatten(SocketAddressLegacy *addr_legacy)
{
SocketAddress *addr = g_new(SocketAddress, 1);
if (!addr_legacy) {
return NULL;
}
switch (addr_legacy->type) {
case SOCKET_ADDRESS_LEGACY_KIND_INET:
addr->type = SOCKET_ADDRESS_TYPE_INET;
Q... | {
"code": [
" SocketAddress *addr = g_new(SocketAddress, 1);"
],
"line_no": [
5
]
} | SocketAddress *FUNC_0(SocketAddressLegacy *addr_legacy)
{
SocketAddress *addr = g_new(SocketAddress, 1);
if (!addr_legacy) {
return NULL;
}
switch (addr_legacy->type) {
case SOCKET_ADDRESS_LEGACY_KIND_INET:
addr->type = SOCKET_ADDRESS_TYPE_INET;
QAPI_CLONE_MEMBER... | [
"SocketAddress *FUNC_0(SocketAddressLegacy *addr_legacy)\n{",
"SocketAddress *addr = g_new(SocketAddress, 1);",
"if (!addr_legacy) {",
"return NULL;",
"}",
"switch (addr_legacy->type) {",
"case SOCKET_ADDRESS_LEGACY_KIND_INET:\naddr->type = SOCKET_ADDRESS_TYPE_INET;",
"QAPI_CLONE_MEMBERS(InetSocketAdd... | [
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
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33,
35
],
[
37
],
[
39,
41
],
[
43,
45
],
[
47
],
[
49,
51
],
... |
3,280 | static void spapr_cpu_core_realize(DeviceState *dev, Error **errp)
{
sPAPRCPUCore *sc = SPAPR_CPU_CORE(OBJECT(dev));
CPUCore *cc = CPU_CORE(OBJECT(dev));
const char *typename = object_class_get_name(sc->cpu_class);
size_t size = object_type_get_instance_size(typename);
Error *local_err = NULL;... | true | qemu | 8e758dee663bfda2ccfe0076914bf49108055386 | static void spapr_cpu_core_realize(DeviceState *dev, Error **errp)
{
sPAPRCPUCore *sc = SPAPR_CPU_CORE(OBJECT(dev));
CPUCore *cc = CPU_CORE(OBJECT(dev));
const char *typename = object_class_get_name(sc->cpu_class);
size_t size = object_type_get_instance_size(typename);
Error *local_err = NULL;... | {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{
sPAPRCPUCore *sc = SPAPR_CPU_CORE(OBJECT(VAR_0));
CPUCore *cc = CPU_CORE(OBJECT(VAR_0));
const char *VAR_2 = object_class_get_name(sc->cpu_class);
size_t size = object_type_get_instance_size(VAR_2);
Error *local_err = NULL;
Object *o... | [
"static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{",
"sPAPRCPUCore *sc = SPAPR_CPU_CORE(OBJECT(VAR_0));",
"CPUCore *cc = CPU_CORE(OBJECT(VAR_0));",
"const char *VAR_2 = object_class_get_name(sc->cpu_class);",
"size_t size = object_type_get_instance_size(VAR_2);",
"Error *local_err = NULL;",
"Obje... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
44
],
[
46
... |
3,281 | static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
uint8_t *dst1, uint8_t *dst2,
int width, int height,
int srcStride1, int srcStride2,
... | true | FFmpeg | 90540c2d5ace46a1e9789c75fde0b1f7dbb12a9b | static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
uint8_t *dst1, uint8_t *dst2,
int width, int height,
int srcStride1, int srcStride2,
... | {
"code": [
" x86_reg y;",
" int x,w,h;",
" PREFETCH\" 32%1 \\n\\t\"",
" \"movq %1, %%mm0 \\n\\t\"",
" \"movq 8%1, %%mm2 \\n\\t\"",
" \"movq 16%1, %%mm4 \\n\\t\"",
" \"movq ... | static inline void FUNC_0(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
uint8_t *dst1, uint8_t *dst2,
int width, int height,
int srcStride1, int srcStride2,
... | [
"static inline void FUNC_0(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,\nuint8_t *dst1, uint8_t *dst2,\nint width, int height,\nint srcStride1, int srcStride2,\nint dstStride1, int dstStride2)\n{",
"x86_reg y;",
"int VAR_0,VAR_1,VAR_2;",
"VAR_1=width/2; VAR_2=height/2;",
"__asm__ volatile(\nPREFET... | [
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19,
21,
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,... |
3,282 | void rgb16tobgr24(const uint8_t *src, uint8_t *dst, unsigned int src_size)
{
const uint16_t *end;
uint8_t *d = (uint8_t *)dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
while(s < end)
{
register uint16_t bgr;
bgr = *s++;
*d++ = (bgr&0xF800)>>8;
*d++ = (bgr&0x7E0)>>3;
*... | true | FFmpeg | 7f526efd17973ec6d2204f7a47b6923e2be31363 | void rgb16tobgr24(const uint8_t *src, uint8_t *dst, unsigned int src_size)
{
const uint16_t *end;
uint8_t *d = (uint8_t *)dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
while(s < end)
{
register uint16_t bgr;
bgr = *s++;
*d++ = (bgr&0xF800)>>8;
*d++ = (bgr&0x7E0)>>3;
*... | {
"code": [
"void rgb16tobgr24(const uint8_t *src, uint8_t *dst, unsigned int src_size)"
],
"line_no": [
1
]
} | void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, unsigned int VAR_2)
{
const uint16_t *VAR_3;
uint8_t *d = (uint8_t *)VAR_1;
const uint16_t *VAR_4 = (const uint16_t *)VAR_0;
VAR_3 = VAR_4 + VAR_2/2;
while(VAR_4 < VAR_3)
{
register uint16_t VAR_5;
VAR_5 = *VAR_4++;
*d++ = (VAR_5&0xF800)>>8;
*d+... | [
"void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, unsigned int VAR_2)\n{",
"const uint16_t *VAR_3;",
"uint8_t *d = (uint8_t *)VAR_1;",
"const uint16_t *VAR_4 = (const uint16_t *)VAR_0;",
"VAR_3 = VAR_4 + VAR_2/2;",
"while(VAR_4 < VAR_3)\n{",
"register uint16_t VAR_5;",
"VAR_5 = *VAR_4++;",
"*d++ = ... | [
1,
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
]
] |
3,283 | static int dyn_buf_write(void *opaque, uint8_t *buf, int buf_size)
{
DynBuffer *d = opaque;
int new_size, new_allocated_size;
/* reallocate buffer if needed */
new_size = d->pos + buf_size;
new_allocated_size = d->allocated_size;
if(new_size < d->pos || new_size > INT_MAX/2)
re... | true | FFmpeg | 6bc03a695bc4c1ecd212263c4a3c9cf638d025e0 | static int dyn_buf_write(void *opaque, uint8_t *buf, int buf_size)
{
DynBuffer *d = opaque;
int new_size, new_allocated_size;
new_size = d->pos + buf_size;
new_allocated_size = d->allocated_size;
if(new_size < d->pos || new_size > INT_MAX/2)
return -1;
while (new_size > n... | {
"code": [
" int new_size, new_allocated_size;"
],
"line_no": [
7
]
} | static int FUNC_0(void *VAR_0, uint8_t *VAR_1, int VAR_2)
{
DynBuffer *d = VAR_0;
int VAR_3, VAR_4;
VAR_3 = d->pos + VAR_2;
VAR_4 = d->allocated_size;
if(VAR_3 < d->pos || VAR_3 > INT_MAX/2)
return -1;
while (VAR_3 > VAR_4) {
if (!VAR_4)
VAR_4 = VAR_... | [
"static int FUNC_0(void *VAR_0, uint8_t *VAR_1, int VAR_2)\n{",
"DynBuffer *d = VAR_0;",
"int VAR_3, VAR_4;",
"VAR_3 = d->pos + VAR_2;",
"VAR_4 = d->allocated_size;",
"if(VAR_3 < d->pos || VAR_3 > INT_MAX/2)\nreturn -1;",
"while (VAR_3 > VAR_4) {",
"if (!VAR_4)\nVAR_4 = VAR_3;",
"else\nVAR_4 += VAR_... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27,
29
],
[
31
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51... |
3,285 | static void vfio_msi_enable(VFIOPCIDevice *vdev)
{
int ret, i;
vfio_disable_interrupts(vdev);
vdev->nr_vectors = msi_nr_vectors_allocated(&vdev->pdev);
retry:
vdev->msi_vectors = g_malloc0(vdev->nr_vectors * sizeof(VFIOMSIVector));
for (i = 0; i < vdev->nr_vectors; i++) {
VFIOM... | true | qemu | bdd81addf4033ce26e6cd180b060f63095f3ded9 | static void vfio_msi_enable(VFIOPCIDevice *vdev)
{
int ret, i;
vfio_disable_interrupts(vdev);
vdev->nr_vectors = msi_nr_vectors_allocated(&vdev->pdev);
retry:
vdev->msi_vectors = g_malloc0(vdev->nr_vectors * sizeof(VFIOMSIVector));
for (i = 0; i < vdev->nr_vectors; i++) {
VFIOM... | {
"code": [
" vdev->msi_vectors = g_malloc0(vdev->nr_vectors * sizeof(VFIOMSIVector));"
],
"line_no": [
17
]
} | static void FUNC_0(VFIOPCIDevice *VAR_0)
{
int VAR_1, VAR_2;
vfio_disable_interrupts(VAR_0);
VAR_0->nr_vectors = msi_nr_vectors_allocated(&VAR_0->pdev);
retry:
VAR_0->msi_vectors = g_malloc0(VAR_0->nr_vectors * sizeof(VFIOMSIVector));
for (VAR_2 = 0; VAR_2 < VAR_0->nr_vectors; VAR_2++) ... | [
"static void FUNC_0(VFIOPCIDevice *VAR_0)\n{",
"int VAR_1, VAR_2;",
"vfio_disable_interrupts(VAR_0);",
"VAR_0->nr_vectors = msi_nr_vectors_allocated(&VAR_0->pdev);",
"retry:\nVAR_0->msi_vectors = g_malloc0(VAR_0->nr_vectors * sizeof(VFIOMSIVector));",
"for (VAR_2 = 0; VAR_2 < VAR_0->nr_vectors; VAR_2++) {... | [
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
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45,
47
],
[
59
],
[
61
],
[
67
],
[
71... |
3,286 | static inline void RENAME(rgb32to24)(const uint8_t *src,uint8_t *dst,unsigned src_size)
{
uint8_t *dest = dst;
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
end = s + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*s):"memory");
mm_end ... | true | FFmpeg | 7f526efd17973ec6d2204f7a47b6923e2be31363 | static inline void RENAME(rgb32to24)(const uint8_t *src,uint8_t *dst,unsigned src_size)
{
uint8_t *dest = dst;
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
end = s + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*s):"memory");
mm_end ... | {
"code": [
"static inline void RENAME(rgb32to24)(const uint8_t *src,uint8_t *dst,unsigned src_size)"
],
"line_no": [
1
]
} | static inline void FUNC_0(rgb32to24)(const uint8_t *src,uint8_t *dst,unsigned src_size)
{
uint8_t *dest = dst;
const uint8_t *VAR_0 = src;
const uint8_t *VAR_1;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
VAR_1 = VAR_0 + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*VAR_0):"memo... | [
"static inline void FUNC_0(rgb32to24)(const uint8_t *src,uint8_t *dst,unsigned src_size)\n{",
"uint8_t *dest = dst;",
"const uint8_t *VAR_0 = src;",
"const uint8_t *VAR_1;",
"#ifdef HAVE_MMX\nconst uint8_t *mm_end;",
"#endif\nVAR_1 = VAR_0 + src_size;",
"#ifdef HAVE_MMX\n__asm __volatile(PREFETCH\"\t%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,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,... |
3,287 | static void scsi_remove_request(SCSIDiskReq *r)
{
qemu_free(r->iov.iov_base);
scsi_req_free(&r->req);
}
| true | qemu | f8a83245d9ec685bc6aa6173d6765fe03e20688f | static void scsi_remove_request(SCSIDiskReq *r)
{
qemu_free(r->iov.iov_base);
scsi_req_free(&r->req);
}
| {
"code": [
" qemu_free(r->iov.iov_base);"
],
"line_no": [
5
]
} | static void FUNC_0(SCSIDiskReq *VAR_0)
{
qemu_free(VAR_0->iov.iov_base);
scsi_req_free(&VAR_0->req);
}
| [
"static void FUNC_0(SCSIDiskReq *VAR_0)\n{",
"qemu_free(VAR_0->iov.iov_base);",
"scsi_req_free(&VAR_0->req);",
"}"
] | [
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
3,289 | static void uncouple_channels(AC3DecodeContext * ctx)
{
ac3_audio_block *ab = &ctx->audio_block;
int ch, sbnd, bin;
int index;
int16_t mantissa;
/* uncouple channels */
for (ch = 0; ch < ctx->bsi.nfchans; ch++)
if (ab->chincpl & (1 << ch))
for (sbnd = ab->cplbegf; ... | false | FFmpeg | 486637af8ef29ec215e0e0b7ecd3b5470f0e04e5 | static void uncouple_channels(AC3DecodeContext * ctx)
{
ac3_audio_block *ab = &ctx->audio_block;
int ch, sbnd, bin;
int index;
int16_t mantissa;
for (ch = 0; ch < ctx->bsi.nfchans; ch++)
if (ab->chincpl & (1 << ch))
for (sbnd = ab->cplbegf; sbnd < 3 + ab->cplendf;... | {
"code": [],
"line_no": []
} | static void FUNC_0(AC3DecodeContext * VAR_0)
{
ac3_audio_block *ab = &VAR_0->audio_block;
int VAR_1, VAR_2, VAR_3;
int VAR_4;
int16_t mantissa;
for (VAR_1 = 0; VAR_1 < VAR_0->bsi.nfchans; VAR_1++)
if (ab->chincpl & (1 << VAR_1))
for (VAR_2 = ab->cplbegf; VAR_2 < 3... | [
"static void FUNC_0(AC3DecodeContext * VAR_0)\n{",
"ac3_audio_block *ab = &VAR_0->audio_block;",
"int VAR_1, VAR_2, VAR_3;",
"int VAR_4;",
"int16_t mantissa;",
"for (VAR_1 = 0; VAR_1 < VAR_0->bsi.nfchans; VAR_1++)",
"if (ab->chincpl & (1 << VAR_1))\nfor (VAR_2 = ab->cplbegf; VAR_2 < 3 + ab->cplendf; VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
3,291 | void qemu_input_event_send_key_delay(uint32_t delay_ms)
{
if (!kbd_timer) {
kbd_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, qemu_input_queue_process,
&kbd_queue);
if (queue_count < queue_limit) {
qemu_input_queue_delay(&kbd_queue, kbd_timer,
... | true | qemu | 05c6638b203fd7d8bbfa88ac6e6198e32ed0506f | void qemu_input_event_send_key_delay(uint32_t delay_ms)
{
if (!kbd_timer) {
kbd_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, qemu_input_queue_process,
&kbd_queue);
if (queue_count < queue_limit) {
qemu_input_queue_delay(&kbd_queue, kbd_timer,
... | {
"code": [],
"line_no": []
} | void FUNC_0(uint32_t VAR_0)
{
if (!kbd_timer) {
kbd_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, qemu_input_queue_process,
&kbd_queue);
if (queue_count < queue_limit) {
qemu_input_queue_delay(&kbd_queue, kbd_timer,
VAR_0 ? VAR_0 : kbd_d... | [
"void FUNC_0(uint32_t VAR_0)\n{",
"if (!kbd_timer) {",
"kbd_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, qemu_input_queue_process,\n&kbd_queue);",
"if (queue_count < queue_limit) {",
"qemu_input_queue_delay(&kbd_queue, kbd_timer,\nVAR_0 ? VAR_0 : kbd_default_delay_ms);"
] | [
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4,
5
],
[
6
],
[
7,
8
]
] |
3,292 | static int pci_add_option_rom(PCIDevice *pdev)
{
int size;
char *path;
void *ptr;
char name[32];
if (!pdev->romfile)
return 0;
if (strlen(pdev->romfile) == 0)
return 0;
if (!pdev->rom_bar) {
/*
* Load rom via fw_cfg instead of creating a rom b... | true | qemu | ab85ceb1ad8797af2fb4c06bdc70f0ce0cf9b34f | static int pci_add_option_rom(PCIDevice *pdev)
{
int size;
char *path;
void *ptr;
char name[32];
if (!pdev->romfile)
return 0;
if (strlen(pdev->romfile) == 0)
return 0;
if (!pdev->rom_bar) {
int class = pci_get_word(pdev->config + PCI_CL... | {
"code": [
"static int pci_add_option_rom(PCIDevice *pdev)"
],
"line_no": [
1
]
} | static int FUNC_0(PCIDevice *VAR_0)
{
int VAR_1;
char *VAR_2;
void *VAR_3;
char VAR_4[32];
if (!VAR_0->romfile)
return 0;
if (strlen(VAR_0->romfile) == 0)
return 0;
if (!VAR_0->rom_bar) {
int VAR_5 = pci_get_word(VAR_0->config + PCI_CLAS... | [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"int VAR_1;",
"char *VAR_2;",
"void *VAR_3;",
"char VAR_4[32];",
"if (!VAR_0->romfile)\nreturn 0;",
"if (strlen(VAR_0->romfile) == 0)\nreturn 0;",
"if (!VAR_0->rom_bar) {",
"int VAR_5 = pci_get_word(VAR_0->config + PCI_CLASS_DEVICE);",
"if (VAR_5 == 0x0300... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
19,
21
],
[
25
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
],
[
57
... |
3,294 | static int convert_zp2tf(AVFilterContext *ctx, int channels)
{
AudioIIRContext *s = ctx->priv;
int ch, i, j, ret;
for (ch = 0; ch < channels; ch++) {
IIRChannel *iir = &s->iir[ch];
double *topc, *botc;
topc = av_calloc((iir->nb_ab[0] + 1) * 2, sizeof(*topc));
botc... | true | FFmpeg | 3c29f68b4db316c5d2b126619220cfa4255eacd6 | static int convert_zp2tf(AVFilterContext *ctx, int channels)
{
AudioIIRContext *s = ctx->priv;
int ch, i, j, ret;
for (ch = 0; ch < channels; ch++) {
IIRChannel *iir = &s->iir[ch];
double *topc, *botc;
topc = av_calloc((iir->nb_ab[0] + 1) * 2, sizeof(*topc));
botc... | {
"code": [
" int ch, i, j, ret;",
" if (!topc || !botc)",
" return AVERROR(ENOMEM);",
" av_free(topc);",
" av_free(botc);",
" return ret;",
" av_free(topc);",
" av_free(botc);",
" return ret;",
... | static int FUNC_0(AVFilterContext *VAR_0, int VAR_1)
{
AudioIIRContext *s = VAR_0->priv;
int VAR_2, VAR_3, VAR_4, VAR_5;
for (VAR_2 = 0; VAR_2 < VAR_1; VAR_2++) {
IIRChannel *iir = &s->iir[VAR_2];
double *VAR_6, *VAR_7;
VAR_6 = av_calloc((iir->nb_ab[0] + 1) * 2, sizeof(*VA... | [
"static int FUNC_0(AVFilterContext *VAR_0, int VAR_1)\n{",
"AudioIIRContext *s = VAR_0->priv;",
"int VAR_2, VAR_3, VAR_4, VAR_5;",
"for (VAR_2 = 0; VAR_2 < VAR_1; VAR_2++) {",
"IIRChannel *iir = &s->iir[VAR_2];",
"double *VAR_6, *VAR_7;",
"VAR_6 = av_calloc((iir->nb_ab[0] + 1) * 2, sizeof(*VAR_6));",
... | [
0,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23,
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
... |
3,295 | static int decode_hybrid(const uint8_t *sptr, uint8_t *dptr, int dx, int dy,
int h, int w, int stride, const uint32_t *pal)
{
int x, y;
const uint8_t *orig_src = sptr;
for (y = dx + h; y > dx; y--) {
uint8_t *dst = dptr + (y * stride) + dy * 3;
for (x = 0; x... | true | FFmpeg | a33c7dd21362a694692d0dc30fdbffae5a5d837e | static int decode_hybrid(const uint8_t *sptr, uint8_t *dptr, int dx, int dy,
int h, int w, int stride, const uint32_t *pal)
{
int x, y;
const uint8_t *orig_src = sptr;
for (y = dx + h; y > dx; y--) {
uint8_t *dst = dptr + (y * stride) + dy * 3;
for (x = 0; x... | {
"code": [
"static int decode_hybrid(const uint8_t *sptr, uint8_t *dptr, int dx, int dy,"
],
"line_no": [
1
]
} | static int FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, int VAR_2, int VAR_3,
int VAR_4, int VAR_5, int VAR_6, const uint32_t *VAR_7)
{
int VAR_8, VAR_9;
const uint8_t *VAR_10 = VAR_0;
for (VAR_9 = VAR_2 + VAR_4; VAR_9 > VAR_2; VAR_9--) {
uint8_t *dst = VAR_1 + (VAR_... | [
"static int FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, int VAR_2, int VAR_3,\nint VAR_4, int VAR_5, int VAR_6, const uint32_t *VAR_7)\n{",
"int VAR_8, VAR_9;",
"const uint8_t *VAR_10 = VAR_0;",
"for (VAR_9 = VAR_2 + VAR_4; VAR_9 > VAR_2; VAR_9--) {",
"uint8_t *dst = VAR_1 + (VAR_9 * VAR_6) + VAR_3 * 3;",
... | [
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
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[... |
3,296 | static void set_sensor_type(IPMIBmcSim *ibs,
uint8_t *cmd, unsigned int cmd_len,
uint8_t *rsp, unsigned int *rsp_len,
unsigned int max_rsp_len)
{
IPMISensor *sens;
IPMI_CHECK_CMD_LEN(5);
if ((cmd[2] > MAX... | true | qemu | 73d60fa5fae60c8e07e1f295d8c7fd5d04320160 | static void set_sensor_type(IPMIBmcSim *ibs,
uint8_t *cmd, unsigned int cmd_len,
uint8_t *rsp, unsigned int *rsp_len,
unsigned int max_rsp_len)
{
IPMISensor *sens;
IPMI_CHECK_CMD_LEN(5);
if ((cmd[2] > MAX... | {
"code": [
" if ((cmd[2] > MAX_SENSORS) ||",
" if ((cmd[2] > MAX_SENSORS) ||",
" if ((cmd[2] > MAX_SENSORS) ||",
" if ((cmd[2] > MAX_SENSORS) ||",
" if ((cmd[2] > MAX_SENSORS) ||",
" if ((cmd[2] > MAX_SENSORS) ||",
" if ((cmd[2] > MAX_SENSORS) ||"
],
"line_no": [
... | static void FUNC_0(IPMIBmcSim *VAR_0,
uint8_t *VAR_1, unsigned int VAR_2,
uint8_t *VAR_3, unsigned int *VAR_4,
unsigned int VAR_5)
{
IPMISensor *sens;
IPMI_CHECK_CMD_LEN(5);
if ((VAR_1[2] > MAX_SENSORS) |... | [
"static void FUNC_0(IPMIBmcSim *VAR_0,\nuint8_t *VAR_1, unsigned int VAR_2,\nuint8_t *VAR_3, unsigned int *VAR_4,\nunsigned int VAR_5)\n{",
"IPMISensor *sens;",
"IPMI_CHECK_CMD_LEN(5);",
"if ((VAR_1[2] > MAX_SENSORS) ||\n!IPMI_SENSOR_GET_PRESENT(VAR_0->sensors + VAR_1[2])) {",
"VAR_3[2] = IPMI_CC_REQ_ENTRY_... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
3,297 | DescRing *desc_ring_alloc(Rocker *r, int index)
{
DescRing *ring;
ring = g_malloc0(sizeof(DescRing));
if (!ring) {
return NULL;
}
ring->r = r;
ring->index = index;
return ring;
}
| true | qemu | 778358d0a8f74a76488daea3c1b6fb327d8135b4 | DescRing *desc_ring_alloc(Rocker *r, int index)
{
DescRing *ring;
ring = g_malloc0(sizeof(DescRing));
if (!ring) {
return NULL;
}
ring->r = r;
ring->index = index;
return ring;
}
| {
"code": [
" ring = g_malloc0(sizeof(DescRing));"
],
"line_no": [
9
]
} | DescRing *FUNC_0(Rocker *r, int index)
{
DescRing *ring;
ring = g_malloc0(sizeof(DescRing));
if (!ring) {
return NULL;
}
ring->r = r;
ring->index = index;
return ring;
}
| [
"DescRing *FUNC_0(Rocker *r, int index)\n{",
"DescRing *ring;",
"ring = g_malloc0(sizeof(DescRing));",
"if (!ring) {",
"return NULL;",
"}",
"ring->r = r;",
"ring->index = index;",
"return ring;",
"}"
] | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
]
] |
3,298 | START_TEST(vararg_string)
{
int i;
struct {
const char *decoded;
} test_cases[] = {
{ "hello world" },
{ "the quick brown fox jumped over the fence" },
{}
};
for (i = 0; test_cases[i].decoded; i++) {
QObject *obj;
QString *str;
... | false | qemu | ef76dc59fa5203d146a2acf85a0ad5a5971a4824 | START_TEST(vararg_string)
{
int i;
struct {
const char *decoded;
} test_cases[] = {
{ "hello world" },
{ "the quick brown fox jumped over the fence" },
{}
};
for (i = 0; test_cases[i].decoded; i++) {
QObject *obj;
QString *str;
... | {
"code": [],
"line_no": []
} | FUNC_0(VAR_0)
{
int VAR_1;
struct {
const char *decoded;
} VAR_2[] = {
{ "hello world" },
{ "the quick brown fox jumped over the fence" },
{}
};
for (VAR_1 = 0; VAR_2[VAR_1].decoded; VAR_1++) {
QObject *obj;
QString *str;
obj =... | [
"FUNC_0(VAR_0)\n{",
"int VAR_1;",
"struct {",
"const char *decoded;",
"} VAR_2[] = {",
"{ \"hello world\" },",
"{ \"the quick brown fox jumped over the fence\" },",
"{}",
"};",
"for (VAR_1 = 0; VAR_2[VAR_1].decoded; VAR_1++) {",
"QObject *obj;",
"QString *str;",
"obj = qobject_from_jsonf(\"%... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
... |
3,299 | static void t_gen_cris_dstep(TCGv d, TCGv a, TCGv b)
{
int l1;
l1 = gen_new_label();
/*
* d <<= 1
* if (d >= s)
* d -= s;
*/
tcg_gen_shli_tl(d, a, 1);
tcg_gen_brcond_tl(TCG_COND_LTU, d, b, l1);
tcg_gen_sub_tl(d, d, b);
gen_set_label(l1);
}
| false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static void t_gen_cris_dstep(TCGv d, TCGv a, TCGv b)
{
int l1;
l1 = gen_new_label();
tcg_gen_shli_tl(d, a, 1);
tcg_gen_brcond_tl(TCG_COND_LTU, d, b, l1);
tcg_gen_sub_tl(d, d, b);
gen_set_label(l1);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(TCGv VAR_0, TCGv VAR_1, TCGv VAR_2)
{
int VAR_3;
VAR_3 = gen_new_label();
tcg_gen_shli_tl(VAR_0, VAR_1, 1);
tcg_gen_brcond_tl(TCG_COND_LTU, VAR_0, VAR_2, VAR_3);
tcg_gen_sub_tl(VAR_0, VAR_0, VAR_2);
gen_set_label(VAR_3);
}
| [
"static void FUNC_0(TCGv VAR_0, TCGv VAR_1, TCGv VAR_2)\n{",
"int VAR_3;",
"VAR_3 = gen_new_label();",
"tcg_gen_shli_tl(VAR_0, VAR_1, 1);",
"tcg_gen_brcond_tl(TCG_COND_LTU, VAR_0, VAR_2, VAR_3);",
"tcg_gen_sub_tl(VAR_0, VAR_0, VAR_2);",
"gen_set_label(VAR_3);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.