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 |
|---|---|---|---|---|---|---|---|---|---|---|
23,985 | static void check_suspend_mode(GuestSuspendMode mode, Error **errp)
{
SYSTEM_POWER_CAPABILITIES sys_pwr_caps;
Error *local_err = NULL;
if (error_is_set(errp)) {
return;
}
ZeroMemory(&sys_pwr_caps, sizeof(sys_pwr_caps));
if (!GetPwrCapabilities(&sys_pwr_caps)) {
error_s... | true | qemu | 5e54769c921a3d8cd8858444f5a3fa62cc44260e | static void check_suspend_mode(GuestSuspendMode mode, Error **errp)
{
SYSTEM_POWER_CAPABILITIES sys_pwr_caps;
Error *local_err = NULL;
if (error_is_set(errp)) {
return;
}
ZeroMemory(&sys_pwr_caps, sizeof(sys_pwr_caps));
if (!GetPwrCapabilities(&sys_pwr_caps)) {
error_s... | {
"code": [
" if (error_is_set(errp)) {",
" if (error_is_set(errp)) {",
" if (error_is_set(errp)) {"
],
"line_no": [
11,
11,
11
]
} | static void FUNC_0(GuestSuspendMode VAR_0, Error **VAR_1)
{
SYSTEM_POWER_CAPABILITIES sys_pwr_caps;
Error *local_err = NULL;
if (error_is_set(VAR_1)) {
return;
}
ZeroMemory(&sys_pwr_caps, sizeof(sys_pwr_caps));
if (!GetPwrCapabilities(&sys_pwr_caps)) {
error_set(&local... | [
"static void FUNC_0(GuestSuspendMode VAR_0, Error **VAR_1)\n{",
"SYSTEM_POWER_CAPABILITIES sys_pwr_caps;",
"Error *local_err = NULL;",
"if (error_is_set(VAR_1)) {",
"return;",
"}",
"ZeroMemory(&sys_pwr_caps, sizeof(sys_pwr_caps));",
"if (!GetPwrCapabilities(&sys_pwr_caps)) {",
"error_set(&local_err,... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
31
],
[
33,
35
],
[
37,
39
],
[
41
],
[
43
],
[
45,
47
],
[
49... |
23,986 | static gint range_compare(gconstpointer a, gconstpointer b)
{
Range *ra = (Range *)a, *rb = (Range *)b;
if (ra->begin == rb->begin && ra->end == rb->end) {
return 0;
} else if (range_get_last(ra->begin, ra->end) <
range_get_last(rb->begin, rb->end)) {
return -1;
} ... | true | qemu | db486cc334aafd3dbdaf107388e37fc3d6d3e171 | static gint range_compare(gconstpointer a, gconstpointer b)
{
Range *ra = (Range *)a, *rb = (Range *)b;
if (ra->begin == rb->begin && ra->end == rb->end) {
return 0;
} else if (range_get_last(ra->begin, ra->end) <
range_get_last(rb->begin, rb->end)) {
return -1;
} ... | {
"code": [
"static gint range_compare(gconstpointer a, gconstpointer b)",
" Range *ra = (Range *)a, *rb = (Range *)b;",
" if (ra->begin == rb->begin && ra->end == rb->end) {",
" return 0;",
" } else if (range_get_last(ra->begin, ra->end) <",
" range_get_last(rb->... | static gint FUNC_0(gconstpointer a, gconstpointer b)
{
Range *ra = (Range *)a, *rb = (Range *)b;
if (ra->begin == rb->begin && ra->end == rb->end) {
return 0;
} else if (range_get_last(ra->begin, ra->end) <
range_get_last(rb->begin, rb->end)) {
return -1;
} else {
... | [
"static gint FUNC_0(gconstpointer a, gconstpointer b)\n{",
"Range *ra = (Range *)a, *rb = (Range *)b;",
"if (ra->begin == rb->begin && ra->end == rb->end) {",
"return 0;",
"} else if (range_get_last(ra->begin, ra->end) <",
"range_get_last(rb->begin, rb->end)) {",
"return -1;",
"} else {",
"return 1;... | [
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
23,987 | static void report_unsupported_feature(BlockDriverState *bs,
Error **errp, Qcow2Feature *table, uint64_t mask)
{
while (table && table->name[0] != '\0') {
if (table->type == QCOW2_FEAT_TYPE_INCOMPATIBLE) {
if (mask & (1 << table->bit)) {
report_unsupported(bs, errp, "%.... | true | qemu | 12ac6d3db721a288c8953c5c253230aa0949a0e1 | static void report_unsupported_feature(BlockDriverState *bs,
Error **errp, Qcow2Feature *table, uint64_t mask)
{
while (table && table->name[0] != '\0') {
if (table->type == QCOW2_FEAT_TYPE_INCOMPATIBLE) {
if (mask & (1 << table->bit)) {
report_unsupported(bs, errp, "%.... | {
"code": [
" if (mask & (1 << table->bit)) {",
" report_unsupported(bs, errp, \"%.46s\", table->name);",
" mask &= ~(1 << table->bit);",
" report_unsupported(bs, errp, \"Unknown incompatible feature: %\" PRIx64,",
" mask);"... | static void FUNC_0(BlockDriverState *VAR_0,
Error **VAR_1, Qcow2Feature *VAR_2, uint64_t VAR_3)
{
while (VAR_2 && VAR_2->name[0] != '\0') {
if (VAR_2->type == QCOW2_FEAT_TYPE_INCOMPATIBLE) {
if (VAR_3 & (1 << VAR_2->bit)) {
report_unsupported(VAR_0, VAR_1, "%.46s", VAR_... | [
"static void FUNC_0(BlockDriverState *VAR_0,\nError **VAR_1, Qcow2Feature *VAR_2, uint64_t VAR_3)\n{",
"while (VAR_2 && VAR_2->name[0] != '\\0') {",
"if (VAR_2->type == QCOW2_FEAT_TYPE_INCOMPATIBLE) {",
"if (VAR_3 & (1 << VAR_2->bit)) {",
"report_unsupported(VAR_0, VAR_1, \"%.46s\", VAR_2->name);",
"VAR_3... | [
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
33
],
[
35
]
] |
23,988 | void qemu_ram_free(ram_addr_t addr)
{
RAMBlock *block;
QLIST_FOREACH(block, &ram_list.blocks, next) {
if (addr == block->offset) {
QLIST_REMOVE(block, next);
if (block->flags & RAM_PREALLOC_MASK) {
;
} else if (mem_path) {
#if defined (__lin... | true | qemu | fd28aa132362320f9f3a30b23f634bb14dee528e | void qemu_ram_free(ram_addr_t addr)
{
RAMBlock *block;
QLIST_FOREACH(block, &ram_list.blocks, next) {
if (addr == block->offset) {
QLIST_REMOVE(block, next);
if (block->flags & RAM_PREALLOC_MASK) {
;
} else if (mem_path) {
#if defined (__lin... | {
"code": [],
"line_no": []
} | void FUNC_0(ram_addr_t VAR_0)
{
RAMBlock *block;
QLIST_FOREACH(block, &ram_list.blocks, next) {
if (VAR_0 == block->offset) {
QLIST_REMOVE(block, next);
if (block->flags & RAM_PREALLOC_MASK) {
;
} else if (mem_path) {
#if defined (__linux__)... | [
"void FUNC_0(ram_addr_t VAR_0)\n{",
"RAMBlock *block;",
"QLIST_FOREACH(block, &ram_list.blocks, next) {",
"if (VAR_0 == block->offset) {",
"QLIST_REMOVE(block, next);",
"if (block->flags & RAM_PREALLOC_MASK) {",
";",
"} else if (mem_path) {",
"#if defined (__linux__) && !defined(TARGET_S390X)\nif (b... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
41,
43
],
[
46
],
[
48,
50... |
23,989 | static int rocker_msix_init(Rocker *r)
{
PCIDevice *dev = PCI_DEVICE(r);
int err;
err = msix_init(dev, ROCKER_MSIX_VEC_COUNT(r->fp_ports),
&r->msix_bar,
ROCKER_PCI_MSIX_BAR_IDX, ROCKER_PCI_MSIX_TABLE_OFFSET,
&r->msix_bar,
... | true | qemu | ee640c625e190a0c0e6b8966adc0e4720fb75200 | static int rocker_msix_init(Rocker *r)
{
PCIDevice *dev = PCI_DEVICE(r);
int err;
err = msix_init(dev, ROCKER_MSIX_VEC_COUNT(r->fp_ports),
&r->msix_bar,
ROCKER_PCI_MSIX_BAR_IDX, ROCKER_PCI_MSIX_TABLE_OFFSET,
&r->msix_bar,
... | {
"code": [
" 0);",
" 0);"
],
"line_no": [
21,
21
]
} | static int FUNC_0(Rocker *VAR_0)
{
PCIDevice *dev = PCI_DEVICE(VAR_0);
int VAR_1;
VAR_1 = msix_init(dev, ROCKER_MSIX_VEC_COUNT(VAR_0->fp_ports),
&VAR_0->msix_bar,
ROCKER_PCI_MSIX_BAR_IDX, ROCKER_PCI_MSIX_TABLE_OFFSET,
&VAR_0->msix_bar,
... | [
"static int FUNC_0(Rocker *VAR_0)\n{",
"PCIDevice *dev = PCI_DEVICE(VAR_0);",
"int VAR_1;",
"VAR_1 = msix_init(dev, ROCKER_MSIX_VEC_COUNT(VAR_0->fp_ports),\n&VAR_0->msix_bar,\nROCKER_PCI_MSIX_BAR_IDX, ROCKER_PCI_MSIX_TABLE_OFFSET,\n&VAR_0->msix_bar,\nROCKER_PCI_MSIX_BAR_IDX, ROCKER_PCI_MSIX_PBA_OFFSET,\n0);",... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13,
15,
17,
19,
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45,
47
],
[
49
],
[
51
]
] |
23,990 | static void avc_wgt_4width_msa(uint8_t *data,
int32_t stride,
int32_t height,
int32_t log2_denom,
int32_t src_weight,
int32_t offset_in)
{
if (2 == height... | false | FFmpeg | bcd7bf7eeb09a395cc01698842d1b8be9af483fc | static void avc_wgt_4width_msa(uint8_t *data,
int32_t stride,
int32_t height,
int32_t log2_denom,
int32_t src_weight,
int32_t offset_in)
{
if (2 == height... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0,
int32_t VAR_1,
int32_t VAR_2,
int32_t VAR_3,
int32_t VAR_4,
int32_t VAR_5)
{
if (2 == VAR_2) {
avc_wgt_4x2_msa... | [
"static void FUNC_0(uint8_t *VAR_0,\nint32_t VAR_1,\nint32_t VAR_2,\nint32_t VAR_3,\nint32_t VAR_4,\nint32_t VAR_5)\n{",
"if (2 == VAR_2) {",
"avc_wgt_4x2_msa(VAR_0, VAR_1, VAR_3, VAR_4, VAR_5);",
"} else {",
"avc_wgt_4x4multiple_msa(VAR_0, VAR_1, VAR_2, VAR_3,\nVAR_4, VAR_5);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
]
] |
23,991 | static void do_apply_filter(APEContext *ctx, int version, APEFilter *f,
int32_t *data, int count, int order, int fracbits)
{
int res;
int absres;
while (count--) {
/* round fixedpoint scalar product */
res = ctx->adsp.scalarproduct_and_madd_int16(f->coeff... | false | FFmpeg | d3e5fbb1406995e07fccbff3ca8c1e24f57a1f7b | static void do_apply_filter(APEContext *ctx, int version, APEFilter *f,
int32_t *data, int count, int order, int fracbits)
{
int res;
int absres;
while (count--) {
res = ctx->adsp.scalarproduct_and_madd_int16(f->coeffs,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(APEContext *VAR_0, int VAR_1, APEFilter *VAR_2,
int32_t *VAR_3, int VAR_4, int VAR_5, int VAR_6)
{
int VAR_7;
int VAR_8;
while (VAR_4--) {
VAR_7 = VAR_0->adsp.scalarproduct_and_madd_int16(VAR_2->coeffs,
... | [
"static void FUNC_0(APEContext *VAR_0, int VAR_1, APEFilter *VAR_2,\nint32_t *VAR_3, int VAR_4, int VAR_5, int VAR_6)\n{",
"int VAR_7;",
"int VAR_8;",
"while (VAR_4--) {",
"VAR_7 = VAR_0->adsp.scalarproduct_and_madd_int16(VAR_2->coeffs,\nVAR_2->delay - VAR_5,\nVAR_2->adaptcoeffs - VAR_5,\nVAR_5, APESIGN(*VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17,
19,
21,
23
],
[
25
],
[
27
],
[
29
],
[
35
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
57
],
[
59,
61,
63
],
[
65,... |
23,992 | static int ffm2_read_header(AVFormatContext *s)
{
FFMContext *ffm = s->priv_data;
AVStream *st;
AVIOContext *pb = s->pb;
AVCodecContext *codec;
const AVCodecDescriptor *codec_desc;
int ret, i;
int f_main = 0, f_cprv = -1, f_stvi = -1, f_stau = -1;
AVCodec *enc;
char *buffer... | true | FFmpeg | 78baa450d9939957f52d5187beb95d763d2f1f18 | static int ffm2_read_header(AVFormatContext *s)
{
FFMContext *ffm = s->priv_data;
AVStream *st;
AVIOContext *pb = s->pb;
AVCodecContext *codec;
const AVCodecDescriptor *codec_desc;
int ret, i;
int f_main = 0, f_cprv = -1, f_stvi = -1, f_stau = -1;
AVCodec *enc;
char *buffer... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
FFMContext *ffm = VAR_0->priv_data;
AVStream *st;
AVIOContext *pb = VAR_0->pb;
AVCodecContext *codec;
const AVCodecDescriptor *VAR_1;
int VAR_2, VAR_3;
int VAR_4 = 0, VAR_5 = -1, VAR_6 = -1, VAR_7 = -1;
AVCodec *enc;
char *VAR_8;
... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"FFMContext *ffm = VAR_0->priv_data;",
"AVStream *st;",
"AVIOContext *pb = VAR_0->pb;",
"AVCodecContext *codec;",
"const AVCodecDescriptor *VAR_1;",
"int VAR_2, VAR_3;",
"int VAR_4 = 0, VAR_5 = -1, VAR_6 = -1, VAR_7 = -1;",
"AVCodec *enc;",
"char *VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
39
],
[
43
],
[
45
],
[
47,
49
],
[
51
... |
23,993 | static int h263p_decode_umotion(MpegEncContext * s, int pred)
{
int code = 0, sign;
if (get_bits1(&s->gb)) /* Motion difference = 0 */
return pred;
code = 2 + get_bits1(&s->gb);
while (get_bits1(&s->gb))
{
code <<= 1;
code += get_bits1(&s->gb);
if (code >= 32768) {... | true | FFmpeg | 12c3e120fe8f8d6881001eade390d8a5c185783d | static int h263p_decode_umotion(MpegEncContext * s, int pred)
{
int code = 0, sign;
if (get_bits1(&s->gb))
return pred;
code = 2 + get_bits1(&s->gb);
while (get_bits1(&s->gb))
{
code <<= 1;
code += get_bits1(&s->gb);
if (code >= 32768) {
avpriv_request_... | {
"code": [
" return AVERROR_INVALIDDATA;"
],
"line_no": [
31
]
} | static int FUNC_0(MpegEncContext * VAR_0, int VAR_1)
{
int VAR_2 = 0, VAR_3;
if (get_bits1(&VAR_0->gb))
return VAR_1;
VAR_2 = 2 + get_bits1(&VAR_0->gb);
while (get_bits1(&VAR_0->gb))
{
VAR_2 <<= 1;
VAR_2 += get_bits1(&VAR_0->gb);
if (VAR_2 >= 32768) {
a... | [
"static int FUNC_0(MpegEncContext * VAR_0, int VAR_1)\n{",
"int VAR_2 = 0, VAR_3;",
"if (get_bits1(&VAR_0->gb))\nreturn VAR_1;",
"VAR_2 = 2 + get_bits1(&VAR_0->gb);",
"while (get_bits1(&VAR_0->gb))\n{",
"VAR_2 <<= 1;",
"VAR_2 += get_bits1(&VAR_0->gb);",
"if (VAR_2 >= 32768) {",
"avpriv_request_sampl... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
51
]
] |
23,994 | static void stream_pause(VideoState *is)
{
is->paused = !is->paused;
if (!is->paused) {
if(is->read_pause_return != AVERROR(ENOSYS)){
is->video_current_pts = get_video_clock(is);
}
is->frame_timer += (av_gettime() - is->video_current_pts_time) / 1000000.0;
i... | true | FFmpeg | 68aefbe81cb3b9dd002108782bb8d798e1c12806 | static void stream_pause(VideoState *is)
{
is->paused = !is->paused;
if (!is->paused) {
if(is->read_pause_return != AVERROR(ENOSYS)){
is->video_current_pts = get_video_clock(is);
}
is->frame_timer += (av_gettime() - is->video_current_pts_time) / 1000000.0;
i... | {
"code": [
" is->paused = !is->paused;",
" if (!is->paused) {",
" is->video_current_pts = get_video_clock(is);",
" is->frame_timer += (av_gettime() - is->video_current_pts_time) / 1000000.0;",
" is->video_current_pts_time= av_gettime();"
],
"line_no": [
5,
... | static void FUNC_0(VideoState *VAR_0)
{
VAR_0->paused = !VAR_0->paused;
if (!VAR_0->paused) {
if(VAR_0->read_pause_return != AVERROR(ENOSYS)){
VAR_0->video_current_pts = get_video_clock(VAR_0);
}
VAR_0->frame_timer += (av_gettime() - VAR_0->video_current_pts_time) / ... | [
"static void FUNC_0(VideoState *VAR_0)\n{",
"VAR_0->paused = !VAR_0->paused;",
"if (!VAR_0->paused) {",
"if(VAR_0->read_pause_return != AVERROR(ENOSYS)){",
"VAR_0->video_current_pts = get_video_clock(VAR_0);",
"}",
"VAR_0->frame_timer += (av_gettime() - VAR_0->video_current_pts_time) / 1000000.0;",
"V... | [
0,
1,
1,
0,
1,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
23,995 | static void gen_tlbia(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
#else
if (unlikely(ctx->pr)) {
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
return;
}
gen_helper_tlbia(cpu_env);
#endif
}
| true | qemu | 1c7336c5d1f720e8d320cb36f9d747ad24663e0d | static void gen_tlbia(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
#else
if (unlikely(ctx->pr)) {
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
return;
}
gen_helper_tlbia(cpu_env);
#endif
}
| {
"code": [
" if (unlikely(ctx->pr)) {"
],
"line_no": [
11
]
} | static void FUNC_0(DisasContext *VAR_0)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);
#else
if (unlikely(VAR_0->pr)) {
gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);
return;
}
gen_helper_tlbia(cpu_env);
#endif
}
| [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"#if defined(CONFIG_USER_ONLY)\ngen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);",
"#else\nif (unlikely(VAR_0->pr)) {",
"gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);",
"return;",
"}",
"gen_helper_tlbia(cpu_env);",
"#endif\n}"
] | [
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
]
] |
23,996 | int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pic_arg, int *got_packet)
{
MpegEncContext *s = avctx->priv_data;
int i, stuffing_count, ret;
int context_count = s->slice_context_count;
s->picture_in_gop_number++;
if (load_input_pic... | true | FFmpeg | 19000122a4cc7551cef19ccc6ce4db82d7d290bd | int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pic_arg, int *got_packet)
{
MpegEncContext *s = avctx->priv_data;
int i, stuffing_count, ret;
int context_count = s->slice_context_count;
s->picture_in_gop_number++;
if (load_input_pic... | {
"code": [
" assert((put_bits_ptr(&s->pb) == s->pb.buf));"
],
"line_no": [
395
]
} | int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,
const AVFrame *VAR_2, int *VAR_3)
{
MpegEncContext *s = VAR_0->priv_data;
int VAR_12, VAR_5, VAR_6;
int VAR_7 = s->slice_context_count;
s->picture_in_gop_number++;
if (load_input_picture(s, VAR_2) < 0)
r... | [
"int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{",
"MpegEncContext *s = VAR_0->priv_data;",
"int VAR_12, VAR_5, VAR_6;",
"int VAR_7 = s->slice_context_count;",
"s->picture_in_gop_number++;",
"if (load_input_picture(s, VAR_2) < 0)\nreturn -1;",
"if (select_input_p... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
35
],
[
37,
39,
41
],
[
43
],
[
45,
47,
49
],
[
51
],
[
53
],
[
57
],
[
59
... |
23,997 | static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size)
{
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*src):"memory");... | false | FFmpeg | ae4cffd9fc5bc495692920d646d7d1462315cfa6 | static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size)
{
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*src):"memory");... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(rgb32tobgr15)(const uint8_t *VAR_2, uint8_t *dst, unsigned src_size)
{
const uint8_t *VAR_0 = VAR_2;
const uint8_t *VAR_1;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
VAR_1 = VAR_0 + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(... | [
"static inline void FUNC_0(rgb32tobgr15)(const uint8_t *VAR_2, uint8_t *dst, unsigned src_size)\n{",
"const uint8_t *VAR_0 = VAR_2;",
"const uint8_t *VAR_1;",
"#ifdef HAVE_MMX\nconst uint8_t *mm_end;",
"#endif\nuint16_t *d = (uint16_t *)dst;",
"VAR_1 = VAR_0 + src_size;",
"#ifdef HAVE_MMX\n__asm __volat... | [
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,... |
23,998 | static void FUNC(hevc_loop_filter_chroma)(uint8_t *_pix, ptrdiff_t _xstride,
ptrdiff_t _ystride, int *_tc,
uint8_t *_no_p, uint8_t *_no_q)
{
int d, j, no_p, no_q;
pixel *pix = (pixel *)_pix;
ptrdiff_t xstride = ... | false | FFmpeg | 8eeacf31c5ea37baf6b222dc38d20cf4fd33c455 | static void FUNC(hevc_loop_filter_chroma)(uint8_t *_pix, ptrdiff_t _xstride,
ptrdiff_t _ystride, int *_tc,
uint8_t *_no_p, uint8_t *_no_q)
{
int d, j, no_p, no_q;
pixel *pix = (pixel *)_pix;
ptrdiff_t xstride = ... | {
"code": [],
"line_no": []
} | static void FUNC_0(hevc_loop_filter_chroma)(uint8_t *_pix, ptrdiff_t _xstride,
ptrdiff_t _ystride, int *_tc,
uint8_t *_no_p, uint8_t *_no_q)
{
int VAR_0, VAR_1, VAR_2, VAR_3;
pixel *pix = (pixel *)_pix;
ptrdiff_... | [
"static void FUNC_0(hevc_loop_filter_chroma)(uint8_t *_pix, ptrdiff_t _xstride,\nptrdiff_t _ystride, int *_tc,\nuint8_t *_no_p, uint8_t *_no_q)\n{",
"int VAR_0, VAR_1, VAR_2, VAR_3;",
"pixel *pix = (pixel *)_pix;",
"ptrdiff_t xstride = _xstride / sizeof(pixel);",
"ptrdiff_t ystride = _ystride / sizeo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
23,999 | static inline void xchg_mb_border(H264Context *h, uint8_t *src_y,
uint8_t *src_cb, uint8_t *src_cr,
int linesize, int uvlinesize,
int xchg, int simple, int pixel_shift){
MpegEncContext * const s = &h->s;
i... | false | FFmpeg | 4e987f8282ff7658a6f804b9db39954bb59fa72e | static inline void xchg_mb_border(H264Context *h, uint8_t *src_y,
uint8_t *src_cb, uint8_t *src_cr,
int linesize, int uvlinesize,
int xchg, int simple, int pixel_shift){
MpegEncContext * const s = &h->s;
i... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(H264Context *VAR_0, uint8_t *VAR_1,
uint8_t *VAR_2, uint8_t *VAR_3,
int VAR_4, int VAR_5,
int VAR_6, int VAR_7, int VAR_8){
MpegEncContext * const s = &VAR_0->s;
int VAR_9;
i... | [
"static inline void FUNC_0(H264Context *VAR_0, uint8_t *VAR_1,\nuint8_t *VAR_2, uint8_t *VAR_3,\nint VAR_4, int VAR_5,\nint VAR_6, int VAR_7, int VAR_8){",
"MpegEncContext * const s = &VAR_0->s;",
"int VAR_9;",
"int VAR_10;",
"int VAR_11 = 1;",
"uint8_t *top_border_m1;",
"uint8_t *top_border;",
"if(!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
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
24,000 | static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output,
AVPacket *avpkt)
{
int ret;
HEVCContext *s = avctx->priv_data;
if (!avpkt->size) {
ret = ff_hevc_output_frame(s, data, 1);
if (ret < 0)
return ret;
*... | false | FFmpeg | f1783c05f1398b7a08f16f6aafbcf38a5323e770 | static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output,
AVPacket *avpkt)
{
int ret;
HEVCContext *s = avctx->priv_data;
if (!avpkt->size) {
ret = ff_hevc_output_frame(s, data, 1);
if (ret < 0)
return ret;
*... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
int VAR_4;
HEVCContext *s = VAR_0->priv_data;
if (!VAR_3->size) {
VAR_4 = ff_hevc_output_frame(s, VAR_1, 1);
if (VAR_4 < 0)
return VAR_4;
*VAR_2 ... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"int VAR_4;",
"HEVCContext *s = VAR_0->priv_data;",
"if (!VAR_3->size) {",
"VAR_4 = ff_hevc_output_frame(s, VAR_1, 1);",
"if (VAR_4 < 0)\nreturn VAR_4;",
"*VAR_2 = VAR_4;",
"return 0;",
"}",
"s->ref = NULL;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17,
19
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35,
37
],
[
43,
45,
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[... |
24,001 | static uint16_t nvme_get_feature(NvmeCtrl *n, NvmeCmd *cmd, NvmeRequest *req)
{
uint32_t dw10 = le32_to_cpu(cmd->cdw10);
uint32_t result;
switch (dw10) {
case NVME_VOLATILE_WRITE_CACHE:
result = blk_enable_write_cache(n->conf.blk);
break;
case NVME_NUMBER_OF_QUEUES:
... | true | qemu | cdd346371e09709be8e46398bb097dc690a746f2 | static uint16_t nvme_get_feature(NvmeCtrl *n, NvmeCmd *cmd, NvmeRequest *req)
{
uint32_t dw10 = le32_to_cpu(cmd->cdw10);
uint32_t result;
switch (dw10) {
case NVME_VOLATILE_WRITE_CACHE:
result = blk_enable_write_cache(n->conf.blk);
break;
case NVME_NUMBER_OF_QUEUES:
... | {
"code": [
" result = cpu_to_le32((n->num_queues - 1) | ((n->num_queues - 1) << 16));"
],
"line_no": [
21
]
} | static uint16_t FUNC_0(NvmeCtrl *n, NvmeCmd *cmd, NvmeRequest *req)
{
uint32_t dw10 = le32_to_cpu(cmd->cdw10);
uint32_t result;
switch (dw10) {
case NVME_VOLATILE_WRITE_CACHE:
result = blk_enable_write_cache(n->conf.blk);
break;
case NVME_NUMBER_OF_QUEUES:
result =... | [
"static uint16_t FUNC_0(NvmeCtrl *n, NvmeCmd *cmd, NvmeRequest *req)\n{",
"uint32_t dw10 = le32_to_cpu(cmd->cdw10);",
"uint32_t result;",
"switch (dw10) {",
"case NVME_VOLATILE_WRITE_CACHE:\nresult = blk_enable_write_cache(n->conf.blk);",
"break;",
"case NVME_NUMBER_OF_QUEUES:\nresult = cpu_to_le32((n->... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
33
],
[
35
],
[
37
]
] |
24,002 | static int decode_subframe(TAKDecContext *s, int32_t *decoded,
int subframe_size, int prev_subframe_size)
{
GetBitContext *gb = &s->gb;
int x, y, i, j, ret = 0;
int dshift, size, filter_quant, filter_order, filter_order16;
int tfilter[MAX_PREDICTORS];
if (!get_bit... | true | FFmpeg | 03616af2c91309d58f9419becf45d292cb93e625 | static int decode_subframe(TAKDecContext *s, int32_t *decoded,
int subframe_size, int prev_subframe_size)
{
GetBitContext *gb = &s->gb;
int x, y, i, j, ret = 0;
int dshift, size, filter_quant, filter_order, filter_order16;
int tfilter[MAX_PREDICTORS];
if (!get_bit... | {
"code": [
" int dshift, size, filter_quant, filter_order, filter_order16;",
" filter_order16 = FFALIGN(filter_order, 16);",
" AV_ZERO128(s->filter + filter_order16 - 16);",
" AV_ZERO128(s->filter + filter_order16 - 8);",
" v += s->adsp.scalarproduct_int16(&s->residues[i],... | static int FUNC_0(TAKDecContext *VAR_0, int32_t *VAR_1,
int VAR_2, int VAR_3)
{
GetBitContext *gb = &VAR_0->gb;
int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8 = 0;
int VAR_9, VAR_10, VAR_11, VAR_12, VAR_13;
int VAR_14[MAX_PREDICTORS];
if (!get_bits1(gb))
return de... | [
"static int FUNC_0(TAKDecContext *VAR_0, int32_t *VAR_1,\nint VAR_2, int VAR_3)\n{",
"GetBitContext *gb = &VAR_0->gb;",
"int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8 = 0;",
"int VAR_9, VAR_10, VAR_11, VAR_12, VAR_13;",
"int VAR_14[MAX_PREDICTORS];",
"if (!get_bits1(gb))\nreturn decode_residues(VAR_0, VAR_1, VAR_... | [
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,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
23
],
[
27
],
[
29,
31
],
[
35
],
[
37
],
[
41,
43
],
[
45
],
[
47
],
[
51,
53
],
[
57
],
[
59,
61
... |
24,003 | iscsi_allocmap_update(IscsiLun *iscsilun, int64_t sector_num,
int nb_sectors, bool allocated, bool valid)
{
int64_t cl_num_expanded, nb_cls_expanded, cl_num_shrunk, nb_cls_shrunk;
if (iscsilun->allocmap == NULL) {
return;
}
/* expand to entirely contain all affecte... | true | qemu | 1da45e0c4cf4719fa75898d019e0874b9b2bc774 | iscsi_allocmap_update(IscsiLun *iscsilun, int64_t sector_num,
int nb_sectors, bool allocated, bool valid)
{
int64_t cl_num_expanded, nb_cls_expanded, cl_num_shrunk, nb_cls_shrunk;
if (iscsilun->allocmap == NULL) {
return;
}
cl_num_expanded = sector_num / iscs... | {
"code": [
" bitmap_clear(iscsilun->allocmap, cl_num_shrunk, nb_cls_shrunk);",
" bitmap_set(iscsilun->allocmap_valid, cl_num_shrunk, nb_cls_shrunk);"
],
"line_no": [
39,
53
]
} | FUNC_0(IscsiLun *VAR_0, int64_t VAR_1,
int VAR_2, bool VAR_3, bool VAR_4)
{
int64_t cl_num_expanded, nb_cls_expanded, cl_num_shrunk, nb_cls_shrunk;
if (VAR_0->allocmap == NULL) {
return;
}
cl_num_expanded = VAR_1 / VAR_0->cluster_sectors;
nb_cls_expanded... | [
"FUNC_0(IscsiLun *VAR_0, int64_t VAR_1,\nint VAR_2, bool VAR_3, bool VAR_4)\n{",
"int64_t cl_num_expanded, nb_cls_expanded, cl_num_shrunk, nb_cls_shrunk;",
"if (VAR_0->allocmap == NULL) {",
"return;",
"}",
"cl_num_expanded = VAR_1 / VAR_0->cluster_sectors;",
"nb_cls_expanded = DIV_ROUND_UP(VAR_1 + VAR_2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
... |
24,004 | static int dca_decode_frame(AVCodecContext * avctx,
void *data, int *data_size,
const uint8_t * buf, int buf_size)
{
int i, j, k;
int16_t *samples = data;
DCAContext *s = avctx->priv_data;
int channels;
s->dca_buffer_size = dca_co... | true | FFmpeg | 4a24837e07c4782658d1475b77506bccc3d0b5e2 | static int dca_decode_frame(AVCodecContext * avctx,
void *data, int *data_size,
const uint8_t * buf, int buf_size)
{
int i, j, k;
int16_t *samples = data;
DCAContext *s = avctx->priv_data;
int channels;
s->dca_buffer_size = dca_co... | {
"code": [
" avctx->channels = channels;"
],
"line_no": [
67
]
} | static int FUNC_0(AVCodecContext * VAR_0,
void *VAR_1, int *VAR_2,
const uint8_t * VAR_3, int VAR_4)
{
int VAR_5, VAR_6, VAR_7;
int16_t *samples = VAR_1;
DCAContext *s = VAR_0->priv_data;
int VAR_8;
s->dca_buffer_size = dca_conver... | [
"static int FUNC_0(AVCodecContext * VAR_0,\nvoid *VAR_1, int *VAR_2,\nconst uint8_t * VAR_3, int VAR_4)\n{",
"int VAR_5, VAR_6, VAR_7;",
"int16_t *samples = VAR_1;",
"DCAContext *s = VAR_0->priv_data;",
"int VAR_8;",
"s->dca_buffer_size = dca_convert_bitstream(VAR_3, VAR_4, s->dca_buffer, DCA_MAX_FRAME_SI... | [
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
] | [
[
1,
3,
5,
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
55
],
[
57... |
24,005 | static int teletext_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *pkt)
{
TeletextContext *ctx = avctx->priv_data;
AVSubtitle *sub = data;
int ret = 0;
if (!ctx->vbi) {
if (!(ctx->vbi = vbi_decoder_new()))
return AVERROR(ENOMEM);
... | false | FFmpeg | 229843aa359ae0c9519977d7fa952688db63f559 | static int teletext_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *pkt)
{
TeletextContext *ctx = avctx->priv_data;
AVSubtitle *sub = data;
int ret = 0;
if (!ctx->vbi) {
if (!(ctx->vbi = vbi_decoder_new()))
return AVERROR(ENOMEM);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2, AVPacket *VAR_3)
{
TeletextContext *ctx = VAR_0->priv_data;
AVSubtitle *sub = VAR_1;
int VAR_4 = 0;
if (!ctx->vbi) {
if (!(ctx->vbi = vbi_decoder_new()))
return AVERROR(ENOMEM);
if (!... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2, AVPacket *VAR_3)\n{",
"TeletextContext *ctx = VAR_0->priv_data;",
"AVSubtitle *sub = VAR_1;",
"int VAR_4 = 0;",
"if (!ctx->vbi) {",
"if (!(ctx->vbi = vbi_decoder_new()))\nreturn AVERROR(ENOMEM);",
"if (!vbi_event_handler... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33,
35
],
[
39
],
[
41
],
[
43
],
[
49,
51
],
[
55
],
[... |
24,006 | static void pc_init_pci_1_5(QEMUMachineInitArgs *args)
{
has_pci_info = false;
pc_init_pci(args);
}
| true | qemu | 9604f70fdf8e21ec0dbf6eac5e59a0eb8beadd64 | static void pc_init_pci_1_5(QEMUMachineInitArgs *args)
{
has_pci_info = false;
pc_init_pci(args);
}
| {
"code": [
"static void pc_init_pci_1_5(QEMUMachineInitArgs *args)"
],
"line_no": [
1
]
} | static void FUNC_0(QEMUMachineInitArgs *VAR_0)
{
has_pci_info = false;
pc_init_pci(VAR_0);
}
| [
"static void FUNC_0(QEMUMachineInitArgs *VAR_0)\n{",
"has_pci_info = false;",
"pc_init_pci(VAR_0);",
"}"
] | [
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
24,007 | static int usbnet_can_receive(NetClientState *nc)
{
USBNetState *s = qemu_get_nic_opaque(nc);
if (is_rndis(s) && s->rndis_state != RNDIS_DATA_INITIALIZED) {
return 1;
return !s->in_len; | true | qemu | 278412d0e710e2e848c6e510f8308e5b1ed4d03e | static int usbnet_can_receive(NetClientState *nc)
{
USBNetState *s = qemu_get_nic_opaque(nc);
if (is_rndis(s) && s->rndis_state != RNDIS_DATA_INITIALIZED) {
return 1;
return !s->in_len; | {
"code": [],
"line_no": []
} | static int FUNC_0(NetClientState *VAR_0)
{
USBNetState *s = qemu_get_nic_opaque(VAR_0);
if (is_rndis(s) && s->rndis_state != RNDIS_DATA_INITIALIZED) {
return 1;
return !s->in_len; | [
"static int FUNC_0(NetClientState *VAR_0)\n{",
"USBNetState *s = qemu_get_nic_opaque(VAR_0);",
"if (is_rndis(s) && s->rndis_state != RNDIS_DATA_INITIALIZED) {",
"return 1;",
"return !s->in_len;"
] | [
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
]
] |
24,008 | static inline int hpel_motion_lowres(MpegEncContext *s,
uint8_t *dest, uint8_t *src,
int field_based, int field_select,
int src_x, int src_y,
int width, int height, int... | true | FFmpeg | c341f734e5f9d6af4a8fdcceb6f5d12de6395c76 | static inline int hpel_motion_lowres(MpegEncContext *s,
uint8_t *dest, uint8_t *src,
int field_based, int field_select,
int src_x, int src_y,
int width, int height, int... | {
"code": [
" int width, int height, int stride,"
],
"line_no": [
9
]
} | static inline int FUNC_0(MpegEncContext *VAR_0,
uint8_t *VAR_1, uint8_t *VAR_2,
int VAR_3, int VAR_4,
int VAR_5, int VAR_6,
int VAR_7, int VAR_8, int VAR_9,
... | [
"static inline int FUNC_0(MpegEncContext *VAR_0,\nuint8_t *VAR_1, uint8_t *VAR_2,\nint VAR_3, int VAR_4,\nint VAR_5, int VAR_6,\nint VAR_7, int VAR_8, int VAR_9,\nint VAR_10, int VAR_11,\nint VAR_12, int VAR_13, h264_chroma_mc_func *VAR_14,\nint VAR_15, int VAR_16)\n{",
"const int VAR_17 = VAR_0->avctx->VAR_17;... | [
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
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
55,
57
... |
24,010 | int qemu_devtree_add_subnode(void *fdt, const char *name)
{
int offset;
char *dupname = g_strdup(name);
char *basename = strrchr(dupname, '/');
int retval;
if (!basename) {
return -1;
}
basename[0] = '\0';
basename++;
offset = fdt_path_offset(fdt, dupname);
... | true | qemu | ccbcfedd17fd2d13521fcee66810d0df464ec1cc | int qemu_devtree_add_subnode(void *fdt, const char *name)
{
int offset;
char *dupname = g_strdup(name);
char *basename = strrchr(dupname, '/');
int retval;
if (!basename) {
return -1;
}
basename[0] = '\0';
basename++;
offset = fdt_path_offset(fdt, dupname);
... | {
"code": [
" return offset;",
" int offset;",
" return offset;",
" int offset;",
" return offset;",
" int offset;",
" return offset;",
" int offset;",
" offset = fdt_path_offset(fdt, dupname);",
" if (offset < 0) {",
" r... | int FUNC_0(void *VAR_0, const char *VAR_1)
{
int VAR_2;
char *VAR_3 = g_strdup(VAR_1);
char *VAR_4 = strrchr(VAR_3, '/');
int VAR_5;
if (!VAR_4) {
return -1;
}
VAR_4[0] = '\0';
VAR_4++;
VAR_2 = fdt_path_offset(VAR_0, VAR_3);
if (VAR_2 < 0) {
ret... | [
"int FUNC_0(void *VAR_0, const char *VAR_1)\n{",
"int VAR_2;",
"char *VAR_3 = g_strdup(VAR_1);",
"char *VAR_4 = strrchr(VAR_3, '/');",
"int VAR_5;",
"if (!VAR_4) {",
"return -1;",
"}",
"VAR_4[0] = '\\0';",
"VAR_4++;",
"VAR_2 = fdt_path_offset(VAR_0, VAR_3);",
"if (VAR_2 < 0) {",
"return VAR_... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
24,011 | av_cold void ff_mlz_init_dict(void* context, MLZ *mlz) {
mlz->dict = av_malloc_array(TABLE_SIZE, sizeof(*mlz->dict));
mlz->flush_code = FLUSH_CODE;
mlz->current_dic_index_max = DIC_INDEX_INIT;
mlz->dic_code_bit = CODE_BIT_INIT;
mlz->bump_code = (DIC_INDEX_INIT ... | true | FFmpeg | 2f7a12fab5a2ea17bd78b155e9af965669fb9b52 | av_cold void ff_mlz_init_dict(void* context, MLZ *mlz) {
mlz->dict = av_malloc_array(TABLE_SIZE, sizeof(*mlz->dict));
mlz->flush_code = FLUSH_CODE;
mlz->current_dic_index_max = DIC_INDEX_INIT;
mlz->dic_code_bit = CODE_BIT_INIT;
mlz->bump_code = (DIC_INDEX_INIT ... | {
"code": [
" mlz->dict = av_malloc_array(TABLE_SIZE, sizeof(*mlz->dict));"
],
"line_no": [
3
]
} | av_cold void FUNC_0(void* context, MLZ *mlz) {
mlz->dict = av_malloc_array(TABLE_SIZE, sizeof(*mlz->dict));
mlz->flush_code = FLUSH_CODE;
mlz->current_dic_index_max = DIC_INDEX_INIT;
mlz->dic_code_bit = CODE_BIT_INIT;
mlz->bump_code = (DIC_INDEX_INIT - 1);
... | [
"av_cold void FUNC_0(void* context, MLZ *mlz) {",
"mlz->dict = av_malloc_array(TABLE_SIZE, sizeof(*mlz->dict));",
"mlz->flush_code = FLUSH_CODE;",
"mlz->current_dic_index_max = DIC_INDEX_INIT;",
"mlz->dic_code_bit = CODE_BIT_INIT;",
"mlz->bump_code = (DIC_INDEX_INIT - 1);",... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
24,012 | static int decode_slice_chroma(AVCodecContext *avctx, SliceContext *slice,
uint16_t *dst, int dst_stride,
const uint8_t *buf, unsigned buf_size,
const int16_t *qmat, int log2_blocks_per_mb)
{
ProresContext *ctx = avctx... | true | FFmpeg | 4f5eaf0b5956e492ee5023929669b1d09aaf6299 | static int decode_slice_chroma(AVCodecContext *avctx, SliceContext *slice,
uint16_t *dst, int dst_stride,
const uint8_t *buf, unsigned buf_size,
const int16_t *qmat, int log2_blocks_per_mb)
{
ProresContext *ctx = avctx... | {
"code": [
" decode_dc_coeffs(&gb, blocks, blocks_per_slice);",
" decode_dc_coeffs(&gb, blocks, blocks_per_slice);"
],
"line_no": [
35,
35
]
} | static int FUNC_0(AVCodecContext *VAR_0, SliceContext *VAR_1,
uint16_t *VAR_2, int VAR_3,
const uint8_t *VAR_4, unsigned VAR_5,
const int16_t *VAR_6, int VAR_7)
{
ProresContext *ctx = VAR_0->priv_data;
LOCAL_ALIGN... | [
"static int FUNC_0(AVCodecContext *VAR_0, SliceContext *VAR_1,\nuint16_t *VAR_2, int VAR_3,\nconst uint8_t *VAR_4, unsigned VAR_5,\nconst int16_t *VAR_6, int VAR_7)\n{",
"ProresContext *ctx = VAR_0->priv_data;",
"LOCAL_ALIGNED_16(int16_t, blocks, [8*4*64]);",
"int16_t *block;",
"GetBitContext gb;",
"int V... | [
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
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37,
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
... |
24,014 | static int mxf_write_footer(AVFormatContext *s)
{
MXFContext *mxf = s->priv_data;
AVIOContext *pb = s->pb;
mxf->duration = mxf->last_indexed_edit_unit + mxf->edit_units_count;
mxf_write_klv_fill(s);
mxf->footer_partition_offset = avio_tell(pb);
if (mxf->edit_unit_byte_count) { // no n... | false | FFmpeg | 7684a36113fa12c88ba80b5498f05849a6b58632 | static int mxf_write_footer(AVFormatContext *s)
{
MXFContext *mxf = s->priv_data;
AVIOContext *pb = s->pb;
mxf->duration = mxf->last_indexed_edit_unit + mxf->edit_units_count;
mxf_write_klv_fill(s);
mxf->footer_partition_offset = avio_tell(pb);
if (mxf->edit_unit_byte_count) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
MXFContext *mxf = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
mxf->duration = mxf->last_indexed_edit_unit + mxf->edit_units_count;
mxf_write_klv_fill(VAR_0);
mxf->footer_partition_offset = avio_tell(pb);
if (mxf->edit_unit_byte_count) {
... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"MXFContext *mxf = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"mxf->duration = mxf->last_indexed_edit_unit + mxf->edit_units_count;",
"mxf_write_klv_fill(VAR_0);",
"mxf->footer_partition_offset = avio_tell(pb);",
"if (mxf->edit_unit_byte_count) {"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51... |
24,015 | static void pxa2xx_pcmcia_initfn(Object *obj)
{
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
PXA2xxPCMCIAState *s = PXA2XX_PCMCIA(obj);
memory_region_init(&s->container_mem, obj, "container", 0x10000000);
sysbus_init_mmio(sbd, &s->container_mem);
/* Socket I/O Memory Space */
memory_regio... | true | qemu | f3c7d0389fe8a2792fd4c1cf151b885de03c8f62 | static void pxa2xx_pcmcia_initfn(Object *obj)
{
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
PXA2xxPCMCIAState *s = PXA2XX_PCMCIA(obj);
memory_region_init(&s->container_mem, obj, "container", 0x10000000);
sysbus_init_mmio(sbd, &s->container_mem);
memory_region_init_io(&s->iomem, NULL, &p... | {
"code": [
" s->slot.irq = qemu_allocate_irqs(pxa2xx_pcmcia_set_irq, s, 1)[0];"
],
"line_no": [
57
]
} | static void FUNC_0(Object *VAR_0)
{
SysBusDevice *sbd = SYS_BUS_DEVICE(VAR_0);
PXA2xxPCMCIAState *s = PXA2XX_PCMCIA(VAR_0);
memory_region_init(&s->container_mem, VAR_0, "container", 0x10000000);
sysbus_init_mmio(sbd, &s->container_mem);
memory_region_init_io(&s->iomem, NULL, &pxa2xx_... | [
"static void FUNC_0(Object *VAR_0)\n{",
"SysBusDevice *sbd = SYS_BUS_DEVICE(VAR_0);",
"PXA2xxPCMCIAState *s = PXA2XX_PCMCIA(VAR_0);",
"memory_region_init(&s->container_mem, VAR_0, \"container\", 0x10000000);",
"sysbus_init_mmio(sbd, &s->container_mem);",
"memory_region_init_io(&s->iomem, NULL, &pxa2xx_pcm... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
19,
21
],
[
23,
25
],
[
35,
37
],
[
39,
41
],
[
47,
49
],
[
51,
53
],
[
57
],
[
61,
63,
65,
67
],
[
69
]
] |
24,016 | static int mirror_cow_align(MirrorBlockJob *s, int64_t *offset,
uint64_t *bytes)
{
bool need_cow;
int ret = 0;
int64_t align_offset = *offset;
unsigned int align_bytes = *bytes;
int max_bytes = s->granularity * s->max_iov;
assert(*bytes < INT_MAX);
need... | true | qemu | 7cfd527525a7d6b1c904890a6b84c1227846415e | static int mirror_cow_align(MirrorBlockJob *s, int64_t *offset,
uint64_t *bytes)
{
bool need_cow;
int ret = 0;
int64_t align_offset = *offset;
unsigned int align_bytes = *bytes;
int max_bytes = s->granularity * s->max_iov;
assert(*bytes < INT_MAX);
need... | {
"code": [
" unsigned int align_bytes = *bytes;",
" assert(*bytes < INT_MAX);"
],
"line_no": [
13,
19
]
} | static int FUNC_0(MirrorBlockJob *VAR_0, int64_t *VAR_1,
uint64_t *VAR_2)
{
bool need_cow;
int VAR_3 = 0;
int64_t align_offset = *VAR_1;
unsigned int VAR_4 = *VAR_2;
int VAR_5 = VAR_0->granularity * VAR_0->max_iov;
assert(*VAR_2 < INT_MAX);
need_cow = !... | [
"static int FUNC_0(MirrorBlockJob *VAR_0, int64_t *VAR_1,\nuint64_t *VAR_2)\n{",
"bool need_cow;",
"int VAR_3 = 0;",
"int64_t align_offset = *VAR_1;",
"unsigned int VAR_4 = *VAR_2;",
"int VAR_5 = VAR_0->granularity * VAR_0->max_iov;",
"assert(*VAR_2 < INT_MAX);",
"need_cow = !test_bit(*VAR_1 / VAR_0->... | [
0,
0,
0,
0,
1,
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
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
24,017 | static void GCC_FMT_ATTR(2, 3) blkverify_err(BlkverifyAIOCB *acb,
const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
fprintf(stderr, "blkverify: %s sector_num=%" PRId64 " nb_sectors=%d ",
acb->is_write ? "write" : "read", acb->sector_num,
... | true | qemu | 44b6789299a8acca3f25331bc411055cafc7bb06 | static void GCC_FMT_ATTR(2, 3) blkverify_err(BlkverifyAIOCB *acb,
const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
fprintf(stderr, "blkverify: %s sector_num=%" PRId64 " nb_sectors=%d ",
acb->is_write ? "write" : "read", acb->sector_num,
... | {
"code": [
"static void GCC_FMT_ATTR(2, 3) blkverify_err(BlkverifyAIOCB *acb,",
" fprintf(stderr, \"blkverify: %s sector_num=%\" PRId64 \" nb_sectors=%d \",",
" acb->is_write ? \"write\" : \"read\", acb->sector_num,",
" acb->nb_sectors);"
],
"line_no": [
1,
13,
... | static void GCC_FMT_ATTR(2, 3) blkverify_err(BlkverifyAIOCB *acb,
const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
fprintf(stderr, "blkverify: %s sector_num=%" PRId64 " nb_sectors=%d ",
acb->is_write ? "write" : "read", acb->sector_num,
... | [
"static void GCC_FMT_ATTR(2, 3) blkverify_err(BlkverifyAIOCB *acb,\nconst char *fmt, ...)\n{",
"va_list ap;",
"va_start(ap, fmt);",
"fprintf(stderr, \"blkverify: %s sector_num=%\" PRId64 \" nb_sectors=%d \",\nacb->is_write ? \"write\" : \"read\", acb->sector_num,\nacb->nb_sectors);",
"vfprintf(stderr, fmt, ... | [
1,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13,
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
24,019 | static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt)
{
MatroskaMuxContext *mkv = s->priv_data;
int codec_type = s->streams[pkt->stream_index]->codec->codec_type;
int keyframe = !!(pkt->flags & AV_PKT_FLAG_KEY);
int cluster_size;
int cluster_size_limit;
int64_... | false | FFmpeg | 98308bd44face14ea3142b501d16226eec23b75a | static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt)
{
MatroskaMuxContext *mkv = s->priv_data;
int codec_type = s->streams[pkt->stream_index]->codec->codec_type;
int keyframe = !!(pkt->flags & AV_PKT_FLAG_KEY);
int cluster_size;
int cluster_size_limit;
int64_... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
MatroskaMuxContext *mkv = VAR_0->priv_data;
int VAR_2 = VAR_0->streams[VAR_1->stream_index]->codec->VAR_2;
int VAR_3 = !!(VAR_1->flags & AV_PKT_FLAG_KEY);
int VAR_4;
int VAR_5;
int64_t cluster_time;
int6... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"MatroskaMuxContext *mkv = VAR_0->priv_data;",
"int VAR_2 = VAR_0->streams[VAR_1->stream_index]->codec->VAR_2;",
"int VAR_3 = !!(VAR_1->flags & AV_PKT_FLAG_KEY);",
"int VAR_4;",
"int VAR_5;",
"int64_t cluster_time;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
29,
31
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
24,020 | static int64_t getutime(void)
{
#ifdef HAVE_GETRUSAGE
struct rusage rusage;
getrusage(RUSAGE_SELF, &rusage);
return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
#elif defined(__MINGW32__)
return av_gettime();
#endif
}
| false | FFmpeg | 7495c3066d7b67bbc74b1d5565684ff48e430099 | static int64_t getutime(void)
{
#ifdef HAVE_GETRUSAGE
struct rusage rusage;
getrusage(RUSAGE_SELF, &rusage);
return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
#elif defined(__MINGW32__)
return av_gettime();
#endif
}
| {
"code": [],
"line_no": []
} | static int64_t FUNC_0(void)
{
#ifdef HAVE_GETRUSAGE
struct rusage rusage;
getrusage(RUSAGE_SELF, &rusage);
return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
#elif defined(__MINGW32__)
return av_gettime();
#endif
}
| [
"static int64_t FUNC_0(void)\n{",
"#ifdef HAVE_GETRUSAGE\nstruct rusage rusage;",
"getrusage(RUSAGE_SELF, &rusage);",
"return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;",
"#elif defined(__MINGW32__)\nreturn av_gettime();",
"#endif\n}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
11
],
[
13
],
[
15,
17
],
[
19,
21
]
] |
24,021 | static void colored_fputs(int level, const char *str)
{
if (!*str)
return;
if (use_color < 0) {
#if HAVE_SETCONSOLETEXTATTRIBUTE
CONSOLE_SCREEN_BUFFER_INFO con_info;
con = GetStdHandle(STD_ERROR_HANDLE);
use_color = (con != INVALID_HANDLE_VALUE) && !getenv("NO_COLOR") &... | false | FFmpeg | 061e340c05bde91ac988677e47bc562b04be5c20 | static void colored_fputs(int level, const char *str)
{
if (!*str)
return;
if (use_color < 0) {
#if HAVE_SETCONSOLETEXTATTRIBUTE
CONSOLE_SCREEN_BUFFER_INFO con_info;
con = GetStdHandle(STD_ERROR_HANDLE);
use_color = (con != INVALID_HANDLE_VALUE) && !getenv("NO_COLOR") &... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0, const char *VAR_1)
{
if (!*VAR_1)
return;
if (use_color < 0) {
#if HAVE_SETCONSOLETEXTATTRIBUTE
CONSOLE_SCREEN_BUFFER_INFO con_info;
con = GetStdHandle(STD_ERROR_HANDLE);
use_color = (con != INVALID_HANDLE_VALUE) && !getenv("NO_COLOR") &&
... | [
"static void FUNC_0(int VAR_0, const char *VAR_1)\n{",
"if (!*VAR_1)\nreturn;",
"if (use_color < 0) {",
"#if HAVE_SETCONSOLETEXTATTRIBUTE\nCONSOLE_SCREEN_BUFFER_INFO con_info;",
"con = GetStdHandle(STD_ERROR_HANDLE);",
"use_color = (con != INVALID_HANDLE_VALUE) && !getenv(\"NO_COLOR\") &&\n!getenv(\"AV_LO... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
11
],
[
13,
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35,
37,
39
],
[
41,
43
],
[
45,
47,
49
],
[
51,
53... |
24,022 | static int alsa_poll_helper (snd_pcm_t *handle, struct pollhlp *hlp, int mask)
{
int i, count, err;
struct pollfd *pfds;
count = snd_pcm_poll_descriptors_count (handle);
if (count <= 0) {
dolog ("Could not initialize poll mode\n"
"Invalid number of poll descriptors %d\n",... | true | qemu | be93f216278d84d283187c95cef16c0b60b711b8 | static int alsa_poll_helper (snd_pcm_t *handle, struct pollhlp *hlp, int mask)
{
int i, count, err;
struct pollfd *pfds;
count = snd_pcm_poll_descriptors_count (handle);
if (count <= 0) {
dolog ("Could not initialize poll mode\n"
"Invalid number of poll descriptors %d\n",... | {
"code": [
" err = qemu_set_fd_handler (pfds[i].fd, alsa_poll_handler,",
" NULL, hlp);",
" err = qemu_set_fd_handler (pfds[i].fd, NULL,",
" alsa_poll_handler, hlp);",
" if (err) {",
" ... | static int FUNC_0 (snd_pcm_t *VAR_0, struct pollhlp *VAR_1, int VAR_2)
{
int VAR_3, VAR_4, VAR_5;
struct pollfd *VAR_6;
VAR_4 = snd_pcm_poll_descriptors_count (VAR_0);
if (VAR_4 <= 0) {
dolog ("Could not initialize poll mode\n"
"Invalid number of poll descriptors %d\n", V... | [
"static int FUNC_0 (snd_pcm_t *VAR_0, struct pollhlp *VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5;",
"struct pollfd *VAR_6;",
"VAR_4 = snd_pcm_poll_descriptors_count (VAR_0);",
"if (VAR_4 <= 0) {",
"dolog (\"Could not initialize poll mode\\n\"\n\"Invalid number of poll descriptors %d\\n\", VAR_4);",
... | [
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,
0,
0,
1,
0,
1,
1,
1,
1,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49... |
24,023 | AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link, int perms,
enum AVSampleFormat sample_fmt, int size,
int64_t channel_layout, int planar)
{
AVFilterBuffer *samples = av_mallocz(sizeo... | false | FFmpeg | cc276c85d15272df6e44fb3252657a43cbd49555 | AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link, int perms,
enum AVSampleFormat sample_fmt, int size,
int64_t channel_layout, int planar)
{
AVFilterBuffer *samples = av_mallocz(sizeo... | {
"code": [],
"line_no": []
} | AVFilterBufferRef *FUNC_0(AVFilterLink *link, int perms,
enum AVSampleFormat sample_fmt, int size,
int64_t channel_layout, int planar)
{
AVFilterBuffer *samples = av_mallocz(sizeof(AVFilterBuffer));
AV... | [
"AVFilterBufferRef *FUNC_0(AVFilterLink *link, int perms,\nenum AVSampleFormat sample_fmt, int size,\nint64_t channel_layout, int planar)\n{",
"AVFilterBuffer *samples = av_mallocz(sizeof(AVFilterBuffer));",
"AVFilterBufferRef *ref = NULL;",
"int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5 = 0;",
"char *VAR_6;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
27
],
[
31
],
[
33,
35
],
[
39
],
[
41
],
[
43
],
[
49
],
[
53
],
[
55
],
[
59
],
[
61
... |
24,024 | static MigrationState *migrate_init(const MigrationParams *params)
{
MigrationState *s = migrate_get_current();
int64_t bandwidth_limit = s->bandwidth_limit;
bool enabled_capabilities[MIGRATION_CAPABILITY_MAX];
int64_t xbzrle_cache_size = s->xbzrle_cache_size;
memcpy(enabled_capabilities, s-... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static MigrationState *migrate_init(const MigrationParams *params)
{
MigrationState *s = migrate_get_current();
int64_t bandwidth_limit = s->bandwidth_limit;
bool enabled_capabilities[MIGRATION_CAPABILITY_MAX];
int64_t xbzrle_cache_size = s->xbzrle_cache_size;
memcpy(enabled_capabilities, s-... | {
"code": [],
"line_no": []
} | static MigrationState *FUNC_0(const MigrationParams *params)
{
MigrationState *s = migrate_get_current();
int64_t bandwidth_limit = s->bandwidth_limit;
bool enabled_capabilities[MIGRATION_CAPABILITY_MAX];
int64_t xbzrle_cache_size = s->xbzrle_cache_size;
memcpy(enabled_capabilities, s->enabl... | [
"static MigrationState *FUNC_0(const MigrationParams *params)\n{",
"MigrationState *s = migrate_get_current();",
"int64_t bandwidth_limit = s->bandwidth_limit;",
"bool enabled_capabilities[MIGRATION_CAPABILITY_MAX];",
"int64_t xbzrle_cache_size = s->xbzrle_cache_size;",
"memcpy(enabled_capabilities, s->en... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
]
] |
24,025 | static void chr_read(void *opaque, const uint8_t *buf, int size)
{
TestServer *s = opaque;
CharDriverState *chr = s->chr;
VhostUserMsg msg;
uint8_t *p = (uint8_t *) &msg;
int fd;
if (size != VHOST_USER_HDR_SIZE) {
g_test_message("Wrong message size received %d\n", size);
return;
... | true | qemu | 5d443f5adad6ddd8238602990b7e86404a288d48 | static void chr_read(void *opaque, const uint8_t *buf, int size)
{
TestServer *s = opaque;
CharDriverState *chr = s->chr;
VhostUserMsg msg;
uint8_t *p = (uint8_t *) &msg;
int fd;
if (size != VHOST_USER_HDR_SIZE) {
g_test_message("Wrong message size received %d\n", size);
return;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
TestServer *s = VAR_0;
CharDriverState *chr = s->chr;
VhostUserMsg msg;
uint8_t *p = (uint8_t *) &msg;
int VAR_3;
if (VAR_2 != VHOST_USER_HDR_SIZE) {
g_test_message("Wrong message VAR_2 received %d\n", VAR_2);
ret... | [
"static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"TestServer *s = VAR_0;",
"CharDriverState *chr = s->chr;",
"VhostUserMsg msg;",
"uint8_t *p = (uint8_t *) &msg;",
"int VAR_3;",
"if (VAR_2 != VHOST_USER_HDR_SIZE) {",
"g_test_message(\"Wrong message VAR_2 received %d\\n\", VAR_2);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
23
],... |
24,026 | static int encode_packet(Jpeg2000EncoderContext *s, Jpeg2000ResLevel *rlevel, int precno,
uint8_t *expn, int numgbits)
{
int bandno, empty = 1;
// init bitstream
*s->buf = 0;
s->bit_index = 0;
// header
// is the packet empty?
for (bandno = 0; bandno ... | true | FFmpeg | 3d5822d9cf07d08bce82903e4715658f46b01b5c | static int encode_packet(Jpeg2000EncoderContext *s, Jpeg2000ResLevel *rlevel, int precno,
uint8_t *expn, int numgbits)
{
int bandno, empty = 1;
*s->buf = 0;
s->bit_index = 0;
for (bandno = 0; bandno < rlevel->nbands; bandno++){
if (rlevel-... | {
"code": [
" bytestream_put_buffer(&s->buf, cblk->data, cblk->passes[cblk->ninclpasses-1].rate"
],
"line_no": [
175
]
} | static int FUNC_0(Jpeg2000EncoderContext *VAR_0, Jpeg2000ResLevel *VAR_1, int VAR_2,
uint8_t *VAR_3, int VAR_4)
{
int VAR_5, VAR_6 = 1;
*VAR_0->buf = 0;
VAR_0->bit_index = 0;
for (VAR_5 = 0; VAR_5 < VAR_1->nbands; VAR_5++){
if (VAR_1->band... | [
"static int FUNC_0(Jpeg2000EncoderContext *VAR_0, Jpeg2000ResLevel *VAR_1, int VAR_2,\nuint8_t *VAR_3, int VAR_4)\n{",
"int VAR_5, VAR_6 = 1;",
"*VAR_0->buf = 0;",
"VAR_0->bit_index = 0;",
"for (VAR_5 = 0; VAR_5 < VAR_1->nbands; VAR_5++){",
"if (VAR_1->band[VAR_5].coord[0][0] < VAR_1->band[VAR_5].coord[0]... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
13
],
[
15
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
],
[
57
],
[
59... |
24,027 | static int ivi_init_tiles(IVIBandDesc *band, IVITile *ref_tile,
int p, int b, int t_height, int t_width)
{
int x, y;
IVITile *tile = band->tiles;
for (y = 0; y < band->height; y += t_height) {
for (x = 0; x < band->width; x += t_width) {
tile->xpos ... | true | FFmpeg | d164ad3298c155330e303bea907920643b5d74a3 | static int ivi_init_tiles(IVIBandDesc *band, IVITile *ref_tile,
int p, int b, int t_height, int t_width)
{
int x, y;
IVITile *tile = band->tiles;
for (y = 0; y < band->height; y += t_height) {
for (x = 0; x < band->width; x += t_width) {
tile->xpos ... | {
"code": [
" tile->mbs = av_malloc(tile->num_MBs * sizeof(IVIMbInfo));"
],
"line_no": [
39
]
} | static int FUNC_0(IVIBandDesc *VAR_0, IVITile *VAR_1,
int VAR_2, int VAR_3, int VAR_4, int VAR_5)
{
int VAR_6, VAR_7;
IVITile *tile = VAR_0->tiles;
for (VAR_7 = 0; VAR_7 < VAR_0->height; VAR_7 += VAR_4) {
for (VAR_6 = 0; VAR_6 < VAR_0->width; VAR_6 += VAR_5) {
... | [
"static int FUNC_0(IVIBandDesc *VAR_0, IVITile *VAR_1,\nint VAR_2, int VAR_3, int VAR_4, int VAR_5)\n{",
"int VAR_6, VAR_7;",
"IVITile *tile = VAR_0->tiles;",
"for (VAR_7 = 0; VAR_7 < VAR_0->height; VAR_7 += VAR_4) {",
"for (VAR_6 = 0; VAR_6 < VAR_0->width; VAR_6 += VAR_5) {",
"tile->xpos = VAR_6;",
... | [
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
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
37
],
[
39
],
[
41,
43
],
[
47
],
[
49
],
[
51
],
[... |
24,028 | static av_cold int common_end(AVCodecContext *avctx){
FFV1Context *s = avctx->priv_data;
int i, j;
for(j=0; j<s->slice_count; j++){
FFV1Context *fs= s->slice_context[j];
for(i=0; i<s->plane_count; i++){
PlaneContext *p= &fs->plane[i];
av_freep(&p->state);
... | true | FFmpeg | a0e7079a207fc38cb3754cf11a29863c81f633e4 | static av_cold int common_end(AVCodecContext *avctx){
FFV1Context *s = avctx->priv_data;
int i, j;
for(j=0; j<s->slice_count; j++){
FFV1Context *fs= s->slice_context[j];
for(i=0; i<s->plane_count; i++){
PlaneContext *p= &fs->plane[i];
av_freep(&p->state);
... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx){
FFV1Context *s = avctx->priv_data;
int VAR_0, VAR_1;
for(VAR_1=0; VAR_1<s->slice_count; VAR_1++){
FFV1Context *fs= s->slice_context[VAR_1];
for(VAR_0=0; VAR_0<s->plane_count; VAR_0++){
PlaneContext *p= &fs->plane[VAR_0];
... | [
"static av_cold int FUNC_0(AVCodecContext *avctx){",
"FFV1Context *s = avctx->priv_data;",
"int VAR_0, VAR_1;",
"for(VAR_1=0; VAR_1<s->slice_count; VAR_1++){",
"FFV1Context *fs= s->slice_context[VAR_1];",
"for(VAR_0=0; VAR_0<s->plane_count; VAR_0++){",
"PlaneContext *p= &fs->plane[VAR_0];",
"av_freep(... | [
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
]
] |
24,029 | unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx,
const AVDXVAContext *ctx,
const AVFrame *frame)
{
void *surface = ff_dxva2_get_surface(frame);
unsigned i;
for (i = 0; i < DXVA_CONTEXT_COUNT(avctx, ctx); i++)
... | true | FFmpeg | be630b1e08ebe8f766b1798accd6b8e5e096f5aa | unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx,
const AVDXVAContext *ctx,
const AVFrame *frame)
{
void *surface = ff_dxva2_get_surface(frame);
unsigned i;
for (i = 0; i < DXVA_CONTEXT_COUNT(avctx, ctx); i++)
... | {
"code": [
" if (DXVA_CONTEXT_SURFACE(avctx, ctx, i) == surface)"
],
"line_no": [
17
]
} | unsigned FUNC_0(const AVCodecContext *VAR_0,
const AVDXVAContext *VAR_1,
const AVFrame *VAR_2)
{
void *VAR_3 = ff_dxva2_get_surface(VAR_2);
unsigned VAR_4;
for (VAR_4 = 0; VAR_4 < DXVA_CONTEXT_COUNT(VAR_0, VAR_1); VAR_4++)
... | [
"unsigned FUNC_0(const AVCodecContext *VAR_0,\nconst AVDXVAContext *VAR_1,\nconst AVFrame *VAR_2)\n{",
"void *VAR_3 = ff_dxva2_get_surface(VAR_2);",
"unsigned VAR_4;",
"for (VAR_4 = 0; VAR_4 < DXVA_CONTEXT_COUNT(VAR_0, VAR_1); VAR_4++)",
"if (DXVA_CONTEXT_SURFACE(VAR_0, VAR_1, VAR_4) == VAR_3)\nreturn VAR_4... | [
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
23
],
[
25
],
[
27
]
] |
24,030 | CpuInfoList *qmp_query_cpus(Error **errp)
{
MachineState *ms = MACHINE(qdev_get_machine());
MachineClass *mc = MACHINE_GET_CLASS(ms);
CpuInfoList *head = NULL, *cur_item = NULL;
CPUState *cpu;
CPU_FOREACH(cpu) {
CpuInfoList *info;
#if defined(TARGET_I386)
X86CPU *x86_cpu =... | true | qemu | afed5a5a7030a074a181d2a0ce8202de71a6ada4 | CpuInfoList *qmp_query_cpus(Error **errp)
{
MachineState *ms = MACHINE(qdev_get_machine());
MachineClass *mc = MACHINE_GET_CLASS(ms);
CpuInfoList *head = NULL, *cur_item = NULL;
CPUState *cpu;
CPU_FOREACH(cpu) {
CpuInfoList *info;
#if defined(TARGET_I386)
X86CPU *x86_cpu =... | {
"code": [],
"line_no": []
} | CpuInfoList *FUNC_0(Error **errp)
{
MachineState *ms = MACHINE(qdev_get_machine());
MachineClass *mc = MACHINE_GET_CLASS(ms);
CpuInfoList *head = NULL, *cur_item = NULL;
CPUState *cpu;
CPU_FOREACH(cpu) {
CpuInfoList *info;
#if defined(TARGET_I386)
X86CPU *x86_cpu = X86_CPU... | [
"CpuInfoList *FUNC_0(Error **errp)\n{",
"MachineState *ms = MACHINE(qdev_get_machine());",
"MachineClass *mc = MACHINE_GET_CLASS(ms);",
"CpuInfoList *head = NULL, *cur_item = NULL;",
"CPUState *cpu;",
"CPU_FOREACH(cpu) {",
"CpuInfoList *info;",
"#if defined(TARGET_I386)\nX86CPU *x86_cpu = X86_CPU(cpu)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
31,
33
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47
],
[... |
24,031 | static hwaddr ppc_hash64_htab_lookup(PowerPCCPU *cpu,
ppc_slb_t *slb, target_ulong eaddr,
ppc_hash_pte64_t *pte)
{
CPUPPCState *env = &cpu->env;
hwaddr pte_offset;
hwaddr hash;
uint64_t vsid, epnmask, epn, ptem;
/* T... | true | qemu | 073de86aa934d46d596a2367e7501da5500e5b86 | static hwaddr ppc_hash64_htab_lookup(PowerPCCPU *cpu,
ppc_slb_t *slb, target_ulong eaddr,
ppc_hash_pte64_t *pte)
{
CPUPPCState *env = &cpu->env;
hwaddr pte_offset;
hwaddr hash;
uint64_t vsid, epnmask, epn, ptem;
... | {
"code": [
" pte_offset = ppc_hash64_pteg_search(cpu, hash, slb, 0, ptem, pte);",
" pte_offset = ppc_hash64_pteg_search(cpu, ~hash, slb, 1, ptem, pte);"
],
"line_no": [
81,
101
]
} | static hwaddr FUNC_0(PowerPCCPU *cpu,
ppc_slb_t *slb, target_ulong eaddr,
ppc_hash_pte64_t *pte)
{
CPUPPCState *env = &cpu->env;
hwaddr pte_offset;
hwaddr hash;
uint64_t vsid, epnmask, epn, ptem;
assert(slb->... | [
"static hwaddr FUNC_0(PowerPCCPU *cpu,\nppc_slb_t *slb, target_ulong eaddr,\nppc_hash_pte64_t *pte)\n{",
"CPUPPCState *env = &cpu->env;",
"hwaddr pte_offset;",
"hwaddr hash;",
"uint64_t vsid, epnmask, epn, ptem;",
"assert(slb->sps);",
"epnmask = ~((1ULL << slb->sps->page_shift) - 1);",
"if (slb->vsid ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
23
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
59,
61,
63,... |
24,032 | static always_inline void gen_op_neg (DisasContext *ctx, TCGv ret, TCGv arg1, int ov_check)
{
int l1, l2;
l1 = gen_new_label();
l2 = gen_new_label();
#if defined(TARGET_PPC64)
if (ctx->sf_mode) {
tcg_gen_brcondi_tl(TCG_COND_EQ, arg1, INT64_MIN, l1);
} else {
TCGv t0 = tcg_... | true | qemu | ec6469a3b1da26247bdb3f5dd5276fabcc1b694a | static always_inline void gen_op_neg (DisasContext *ctx, TCGv ret, TCGv arg1, int ov_check)
{
int l1, l2;
l1 = gen_new_label();
l2 = gen_new_label();
#if defined(TARGET_PPC64)
if (ctx->sf_mode) {
tcg_gen_brcondi_tl(TCG_COND_EQ, arg1, INT64_MIN, l1);
} else {
TCGv t0 = tcg_... | {
"code": [
"static always_inline void gen_op_neg (DisasContext *ctx, TCGv ret, TCGv arg1, int ov_check)",
" int l1, l2;",
" l1 = gen_new_label();",
" l2 = gen_new_label();",
" tcg_gen_brcondi_tl(TCG_COND_EQ, arg1, INT64_MIN, l1);",
" } else {",
" TCGv t0 = tcg_te... | static always_inline void FUNC_0 (DisasContext *ctx, TCGv ret, TCGv arg1, int ov_check)
{
int VAR_0, VAR_1;
VAR_0 = gen_new_label();
VAR_1 = gen_new_label();
#if defined(TARGET_PPC64)
if (ctx->sf_mode) {
tcg_gen_brcondi_tl(TCG_COND_EQ, arg1, INT64_MIN, VAR_0);
} else {
TCG... | [
"static always_inline void FUNC_0 (DisasContext *ctx, TCGv ret, TCGv arg1, int ov_check)\n{",
"int VAR_0, VAR_1;",
"VAR_0 = gen_new_label();",
"VAR_1 = gen_new_label();",
"#if defined(TARGET_PPC64)\nif (ctx->sf_mode) {",
"tcg_gen_brcondi_tl(TCG_COND_EQ, arg1, INT64_MIN, VAR_0);",
"} else {",
"TCGv t0 ... | [
1,
1,
1,
1,
0,
1,
0,
1,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
... |
24,033 | static int tx_consume(Rocker *r, DescInfo *info)
{
PCIDevice *dev = PCI_DEVICE(r);
char *buf = desc_get_buf(info, true);
RockerTlv *tlv_frag;
RockerTlv *tlvs[ROCKER_TLV_TX_MAX + 1];
struct iovec iov[ROCKER_TX_FRAGS_MAX] = { { 0, }, };
uint32_t pport;
uint32_t port;
uint16_t tx_o... | true | qemu | 007cd223de527b5f41278f2d886c1a4beb3e67aa | static int tx_consume(Rocker *r, DescInfo *info)
{
PCIDevice *dev = PCI_DEVICE(r);
char *buf = desc_get_buf(info, true);
RockerTlv *tlv_frag;
RockerTlv *tlvs[ROCKER_TLV_TX_MAX + 1];
struct iovec iov[ROCKER_TX_FRAGS_MAX] = { { 0, }, };
uint32_t pport;
uint32_t port;
uint16_t tx_o... | {
"code": [
" if (++iovcnt > ROCKER_TX_FRAGS_MAX) {",
" goto err_too_many_frags;"
],
"line_no": [
193,
195
]
} | static int FUNC_0(Rocker *VAR_0, DescInfo *VAR_1)
{
PCIDevice *dev = PCI_DEVICE(VAR_0);
char *VAR_2 = desc_get_buf(VAR_1, true);
RockerTlv *tlv_frag;
RockerTlv *tlvs[ROCKER_TLV_TX_MAX + 1];
struct iovec VAR_3[ROCKER_TX_FRAGS_MAX] = { { 0, }, };
uint32_t pport;
uint32_t port;
uin... | [
"static int FUNC_0(Rocker *VAR_0, DescInfo *VAR_1)\n{",
"PCIDevice *dev = PCI_DEVICE(VAR_0);",
"char *VAR_2 = desc_get_buf(VAR_1, true);",
"RockerTlv *tlv_frag;",
"RockerTlv *tlvs[ROCKER_TLV_TX_MAX + 1];",
"struct iovec VAR_3[ROCKER_TX_FRAGS_MAX] = { { 0, }, };",
"uint32_t pport;",
"uint32_t port;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
... |
24,034 | static void gen_neon_dup_low16(TCGv var)
{
TCGv tmp = new_tmp();
tcg_gen_ext16u_i32(var, var);
tcg_gen_shli_i32(tmp, var, 16);
tcg_gen_or_i32(var, var, tmp);
dead_tmp(tmp);
}
| true | qemu | 7d1b0095bff7157e856d1d0e6c4295641ced2752 | static void gen_neon_dup_low16(TCGv var)
{
TCGv tmp = new_tmp();
tcg_gen_ext16u_i32(var, var);
tcg_gen_shli_i32(tmp, var, 16);
tcg_gen_or_i32(var, var, tmp);
dead_tmp(tmp);
}
| {
"code": [
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" TCGv tmp = new_tmp();",
" dead_tmp(tmp);",
" TCGv tmp = new_tmp();",
" dead_tmp(tmp);",
" TCGv tmp = new_tmp();",
" dead_tmp(tmp);",
" TCGv tmp = new_tmp();",
" dead_tmp(tmp);",
... | static void FUNC_0(TCGv VAR_0)
{
TCGv tmp = new_tmp();
tcg_gen_ext16u_i32(VAR_0, VAR_0);
tcg_gen_shli_i32(tmp, VAR_0, 16);
tcg_gen_or_i32(VAR_0, VAR_0, tmp);
dead_tmp(tmp);
}
| [
"static void FUNC_0(TCGv VAR_0)\n{",
"TCGv tmp = new_tmp();",
"tcg_gen_ext16u_i32(VAR_0, VAR_0);",
"tcg_gen_shli_i32(tmp, VAR_0, 16);",
"tcg_gen_or_i32(VAR_0, VAR_0, tmp);",
"dead_tmp(tmp);",
"}"
] | [
0,
1,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
24,035 | static void audio_print_settings (audsettings_t *as)
{
dolog ("frequency=%d nchannels=%d fmt=", as->freq, as->nchannels);
switch (as->fmt) {
case AUD_FMT_S8:
AUD_log (NULL, "S8");
break;
case AUD_FMT_U8:
AUD_log (NULL, "U8");
break;
case AUD_FMT_S16:
... | false | qemu | 1ea879e5580f63414693655fcf0328559cdce138 | static void audio_print_settings (audsettings_t *as)
{
dolog ("frequency=%d nchannels=%d fmt=", as->freq, as->nchannels);
switch (as->fmt) {
case AUD_FMT_S8:
AUD_log (NULL, "S8");
break;
case AUD_FMT_U8:
AUD_log (NULL, "U8");
break;
case AUD_FMT_S16:
... | {
"code": [],
"line_no": []
} | static void FUNC_0 (audsettings_t *VAR_0)
{
dolog ("frequency=%d nchannels=%d fmt=", VAR_0->freq, VAR_0->nchannels);
switch (VAR_0->fmt) {
case AUD_FMT_S8:
AUD_log (NULL, "S8");
break;
case AUD_FMT_U8:
AUD_log (NULL, "U8");
break;
case AUD_FMT_S16:
... | [
"static void FUNC_0 (audsettings_t *VAR_0)\n{",
"dolog (\"frequency=%d nchannels=%d fmt=\", VAR_0->freq, VAR_0->nchannels);",
"switch (VAR_0->fmt) {",
"case AUD_FMT_S8:\nAUD_log (NULL, \"S8\");",
"break;",
"case AUD_FMT_U8:\nAUD_log (NULL, \"U8\");",
"break;",
"case AUD_FMT_S16:\nAUD_log (NULL, \"S16\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47,
49
],
... |
24,036 | static void vnc_refresh(void *opaque)
{
VncDisplay *vd = opaque;
VncState *vs, *vn;
int has_dirty, rects = 0;
vga_hw_update();
if (vnc_trylock_display(vd)) {
vd->timer_interval = VNC_REFRESH_INTERVAL_BASE;
qemu_mod_timer(vd->timer, qemu_get_clock(rt_clock) +
... | false | qemu | 7bd427d801e1e3293a634d3c83beadaa90ffb911 | static void vnc_refresh(void *opaque)
{
VncDisplay *vd = opaque;
VncState *vs, *vn;
int has_dirty, rects = 0;
vga_hw_update();
if (vnc_trylock_display(vd)) {
vd->timer_interval = VNC_REFRESH_INTERVAL_BASE;
qemu_mod_timer(vd->timer, qemu_get_clock(rt_clock) +
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
VncDisplay *vd = VAR_0;
VncState *vs, *vn;
int VAR_1, VAR_2 = 0;
vga_hw_update();
if (vnc_trylock_display(vd)) {
vd->timer_interval = VNC_REFRESH_INTERVAL_BASE;
qemu_mod_timer(vd->timer, qemu_get_clock(rt_clock) +
... | [
"static void FUNC_0(void *VAR_0)\n{",
"VncDisplay *vd = VAR_0;",
"VncState *vs, *vn;",
"int VAR_1, VAR_2 = 0;",
"vga_hw_update();",
"if (vnc_trylock_display(vd)) {",
"vd->timer_interval = VNC_REFRESH_INTERVAL_BASE;",
"qemu_mod_timer(vd->timer, qemu_get_clock(rt_clock) +\nvd->timer_interval);",
"retu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
51,
53
],
[
57
],
[
59
],
[
61,... |
24,038 | static void set_pointer(Object *obj, Visitor *v, Property *prop,
int (*parse)(DeviceState *dev, const char *str, void **ptr),
const char *name, Error **errp)
{
DeviceState *dev = DEVICE(obj);
Error *local_err = NULL;
void **ptr = qdev_get_prop_ptr(dev, p... | false | qemu | d4d34b0d3f5af5c8e09980da0de2eebe9a27dc71 | static void set_pointer(Object *obj, Visitor *v, Property *prop,
int (*parse)(DeviceState *dev, const char *str, void **ptr),
const char *name, Error **errp)
{
DeviceState *dev = DEVICE(obj);
Error *local_err = NULL;
void **ptr = qdev_get_prop_ptr(dev, p... | {
"code": [],
"line_no": []
} | static void FUNC_0(Object *VAR_0, Visitor *VAR_1, Property *VAR_2,
int (*VAR_3)(DeviceState *VAR_4, const char *VAR_9, void **VAR_9),
const char *VAR_7, Error **VAR_8)
{
DeviceState *VAR_4 = DEVICE(VAR_0);
Error *local_err = NULL;
void **VAR_9 = qdev_get... | [
"static void FUNC_0(Object *VAR_0, Visitor *VAR_1, Property *VAR_2,\nint (*VAR_3)(DeviceState *VAR_4, const char *VAR_9, void **VAR_9),\nconst char *VAR_7, Error **VAR_8)\n{",
"DeviceState *VAR_4 = DEVICE(VAR_0);",
"Error *local_err = NULL;",
"void **VAR_9 = qdev_get_prop_ptr(VAR_4, VAR_2);",
"char *VAR_9;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
24,039 | static int scsi_hd_initfn(SCSIDevice *dev)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, dev);
s->qdev.blocksize = s->qdev.conf.logical_block_size;
s->qdev.type = TYPE_DISK;
if (!s->product) {
s->product = g_strdup("QEMU HARDDISK");
}
return scsi_initfn(&s->qdev);
}
| false | qemu | a818a4b69d47ca3826dee36878074395aeac2083 | static int scsi_hd_initfn(SCSIDevice *dev)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, dev);
s->qdev.blocksize = s->qdev.conf.logical_block_size;
s->qdev.type = TYPE_DISK;
if (!s->product) {
s->product = g_strdup("QEMU HARDDISK");
}
return scsi_initfn(&s->qdev);
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(SCSIDevice *VAR_0)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0);
s->qdev.blocksize = s->qdev.conf.logical_block_size;
s->qdev.type = TYPE_DISK;
if (!s->product) {
s->product = g_strdup("QEMU HARDDISK");
}
return scsi_initfn(&s->qdev);
}
| [
"static int FUNC_0(SCSIDevice *VAR_0)\n{",
"SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0);",
"s->qdev.blocksize = s->qdev.conf.logical_block_size;",
"s->qdev.type = TYPE_DISK;",
"if (!s->product) {",
"s->product = g_strdup(\"QEMU HARDDISK\");",
"}",
"return scsi_initfn(&s->qdev);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
24,040 | static int local_parse_opts(QemuOpts *opts, struct FsDriverEntry *fse)
{
const char *sec_model = qemu_opt_get(opts, "security_model");
const char *path = qemu_opt_get(opts, "path");
if (!sec_model) {
fprintf(stderr, "security model not specified, "
"local fs needs security mo... | false | qemu | 2c30dd744aa02d31a8a3b87daaba0b2cb774f346 | static int local_parse_opts(QemuOpts *opts, struct FsDriverEntry *fse)
{
const char *sec_model = qemu_opt_get(opts, "security_model");
const char *path = qemu_opt_get(opts, "path");
if (!sec_model) {
fprintf(stderr, "security model not specified, "
"local fs needs security mo... | {
"code": [],
"line_no": []
} | static int FUNC_0(QemuOpts *VAR_0, struct FsDriverEntry *VAR_1)
{
const char *VAR_2 = qemu_opt_get(VAR_0, "security_model");
const char *VAR_3 = qemu_opt_get(VAR_0, "VAR_3");
if (!VAR_2) {
fprintf(stderr, "security model not specified, "
"local fs needs security model\nvalid ... | [
"static int FUNC_0(QemuOpts *VAR_0, struct FsDriverEntry *VAR_1)\n{",
"const char *VAR_2 = qemu_opt_get(VAR_0, \"security_model\");",
"const char *VAR_3 = qemu_opt_get(VAR_0, \"VAR_3\");",
"if (!VAR_2) {",
"fprintf(stderr, \"security model not specified, \"\n\"local fs needs security model\\nvalid options a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15,
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
49
],
... |
24,041 | static void spr_write_dbatl_h (void *opaque, int sprn)
{
DisasContext *ctx = opaque;
gen_op_store_dbatl((sprn - SPR_DBAT4L) / 2);
RET_STOP(ctx);
}
| false | qemu | e1833e1f96456fd8fc17463246fe0b2050e68efb | static void spr_write_dbatl_h (void *opaque, int sprn)
{
DisasContext *ctx = opaque;
gen_op_store_dbatl((sprn - SPR_DBAT4L) / 2);
RET_STOP(ctx);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0 (void *VAR_0, int VAR_1)
{
DisasContext *ctx = VAR_0;
gen_op_store_dbatl((VAR_1 - SPR_DBAT4L) / 2);
RET_STOP(ctx);
}
| [
"static void FUNC_0 (void *VAR_0, int VAR_1)\n{",
"DisasContext *ctx = VAR_0;",
"gen_op_store_dbatl((VAR_1 - SPR_DBAT4L) / 2);",
"RET_STOP(ctx);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
]
] |
24,043 | static void do_branch_reg(DisasContext *dc, int32_t offset, uint32_t insn,
TCGv r_cond, TCGv r_reg)
{
unsigned int cond = GET_FIELD_SP(insn, 25, 27), a = (insn & (1 << 29));
target_ulong target = dc->pc + offset;
flush_cond(dc, r_cond);
gen_cond_reg(r_cond, cond, r_reg)... | false | qemu | 548f66db33b91bf305c4e5228bb29585701ab58d | static void do_branch_reg(DisasContext *dc, int32_t offset, uint32_t insn,
TCGv r_cond, TCGv r_reg)
{
unsigned int cond = GET_FIELD_SP(insn, 25, 27), a = (insn & (1 << 29));
target_ulong target = dc->pc + offset;
flush_cond(dc, r_cond);
gen_cond_reg(r_cond, cond, r_reg)... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, int32_t VAR_1, uint32_t VAR_2,
TCGv VAR_3, TCGv VAR_4)
{
unsigned int VAR_5 = GET_FIELD_SP(VAR_2, 25, 27), VAR_6 = (VAR_2 & (1 << 29));
target_ulong target = VAR_0->pc + VAR_1;
flush_cond(VAR_0, VAR_3);
gen_cond_reg(VAR_3, VAR_5, ... | [
"static void FUNC_0(DisasContext *VAR_0, int32_t VAR_1, uint32_t VAR_2,\nTCGv VAR_3, TCGv VAR_4)\n{",
"unsigned int VAR_5 = GET_FIELD_SP(VAR_2, 25, 27), VAR_6 = (VAR_2 & (1 << 29));",
"target_ulong target = VAR_0->pc + VAR_1;",
"flush_cond(VAR_0, VAR_3);",
"gen_cond_reg(VAR_3, VAR_5, VAR_4);",
"if (VAR_6)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
24,045 | static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
{
int b, prefixes, aflag, dflag;
int shift, ot;
int modrm, reg, rm, mod, reg_addr, op, opreg, offset_addr, val;
target_ulong next_eip, tval;
int rex_w, rex_r;
if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP | CPU_LOG_T... | false | qemu | a9321a4d49d65d29c2926a51aedc5b91a01f3591 | static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
{
int b, prefixes, aflag, dflag;
int shift, ot;
int modrm, reg, rm, mod, reg_addr, op, opreg, offset_addr, val;
target_ulong next_eip, tval;
int rex_w, rex_r;
if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP | CPU_LOG_T... | {
"code": [],
"line_no": []
} | static target_ulong FUNC_0(DisasContext *s, target_ulong pc_start)
{
int VAR_0, VAR_1, VAR_2, VAR_3;
int VAR_4, VAR_5;
int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_17, VAR_12, VAR_13, VAR_18;
target_ulong next_eip, tval;
int VAR_15, VAR_16;
if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP |... | [
"static target_ulong FUNC_0(DisasContext *s, target_ulong pc_start)\n{",
"int VAR_0, VAR_1, VAR_2, VAR_3;",
"int VAR_4, VAR_5;",
"int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_17, VAR_12, VAR_13, VAR_18;",
"target_ulong next_eip, tval;",
"int VAR_15, VAR_16;",
"if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_O... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[... |
24,049 | static void rpza_decode_stream(RpzaContext *s)
{
int width = s->avctx->width;
int stride = s->frame.linesize[0] / 2;
int row_inc = stride - 4;
int stream_ptr = 0;
int chunk_size;
unsigned char opcode;
int n_blocks;
unsigned short colorA = 0, colorB;
unsigned short color4[4]... | false | FFmpeg | 3819db745da2ac7fb3faacb116788c32f4753f34 | static void rpza_decode_stream(RpzaContext *s)
{
int width = s->avctx->width;
int stride = s->frame.linesize[0] / 2;
int row_inc = stride - 4;
int stream_ptr = 0;
int chunk_size;
unsigned char opcode;
int n_blocks;
unsigned short colorA = 0, colorB;
unsigned short color4[4]... | {
"code": [],
"line_no": []
} | static void FUNC_0(RpzaContext *VAR_0)
{
int VAR_1 = VAR_0->avctx->VAR_1;
int VAR_2 = VAR_0->frame.linesize[0] / 2;
int VAR_3 = VAR_2 - 4;
int VAR_4 = 0;
int VAR_5;
unsigned char VAR_6;
int VAR_7;
unsigned short VAR_8 = 0, VAR_9;
unsigned short VAR_10[4];
unsigned char... | [
"static void FUNC_0(RpzaContext *VAR_0)\n{",
"int VAR_1 = VAR_0->avctx->VAR_1;",
"int VAR_2 = VAR_0->frame.linesize[0] / 2;",
"int VAR_3 = VAR_2 - 4;",
"int VAR_4 = 0;",
"int VAR_5;",
"unsigned char VAR_6;",
"int VAR_7;",
"unsigned short VAR_8 = 0, VAR_9;",
"unsigned short VAR_10[4];",
"unsigned... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
45,
47,
49
... |
24,051 | int usb_device_attach(USBDevice *dev)
{
USBBus *bus = usb_bus_from_device(dev);
if (bus->nfree == 1 && dev->port_path == NULL) {
/* Create a new hub and chain it on
(unless a physical port location is specified). */
usb_create_simple(bus, "usb-hub");
}
return do_atta... | false | qemu | 891fb2cd4592b6fe76106a69e0ca40efbf82726a | int usb_device_attach(USBDevice *dev)
{
USBBus *bus = usb_bus_from_device(dev);
if (bus->nfree == 1 && dev->port_path == NULL) {
usb_create_simple(bus, "usb-hub");
}
return do_attach(dev);
}
| {
"code": [],
"line_no": []
} | int FUNC_0(USBDevice *VAR_0)
{
USBBus *bus = usb_bus_from_device(VAR_0);
if (bus->nfree == 1 && VAR_0->port_path == NULL) {
usb_create_simple(bus, "usb-hub");
}
return do_attach(VAR_0);
}
| [
"int FUNC_0(USBDevice *VAR_0)\n{",
"USBBus *bus = usb_bus_from_device(VAR_0);",
"if (bus->nfree == 1 && VAR_0->port_path == NULL) {",
"usb_create_simple(bus, \"usb-hub\");",
"}",
"return do_attach(VAR_0);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
24,052 | static void cpu_debug_handler(CPUState *env)
{
gdb_set_stop_cpu(env);
qemu_system_debug_request();
}
| false | qemu | 83f338f73ecb88cc6f85d6e7b81ebef112ce07be | static void cpu_debug_handler(CPUState *env)
{
gdb_set_stop_cpu(env);
qemu_system_debug_request();
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(CPUState *VAR_0)
{
gdb_set_stop_cpu(VAR_0);
qemu_system_debug_request();
}
| [
"static void FUNC_0(CPUState *VAR_0)\n{",
"gdb_set_stop_cpu(VAR_0);",
"qemu_system_debug_request();",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
24,054 | static uint16_t qpci_spapr_io_readw(QPCIBus *bus, void *addr)
{
QPCIBusSPAPR *s = container_of(bus, QPCIBusSPAPR, bus);
uint64_t port = (uintptr_t)addr;
uint16_t v;
if (port < s->pio.size) {
v = readw(s->pio_cpu_base + port);
} else {
v = readw(s->mmio_cpu_base + port);
... | false | qemu | 8360544a6d3a54df1fce80f55ba4ad075a8ded54 | static uint16_t qpci_spapr_io_readw(QPCIBus *bus, void *addr)
{
QPCIBusSPAPR *s = container_of(bus, QPCIBusSPAPR, bus);
uint64_t port = (uintptr_t)addr;
uint16_t v;
if (port < s->pio.size) {
v = readw(s->pio_cpu_base + port);
} else {
v = readw(s->mmio_cpu_base + port);
... | {
"code": [],
"line_no": []
} | static uint16_t FUNC_0(QPCIBus *bus, void *addr)
{
QPCIBusSPAPR *s = container_of(bus, QPCIBusSPAPR, bus);
uint64_t port = (uintptr_t)addr;
uint16_t v;
if (port < s->pio.size) {
v = readw(s->pio_cpu_base + port);
} else {
v = readw(s->mmio_cpu_base + port);
}
return... | [
"static uint16_t FUNC_0(QPCIBus *bus, void *addr)\n{",
"QPCIBusSPAPR *s = container_of(bus, QPCIBusSPAPR, bus);",
"uint64_t port = (uintptr_t)addr;",
"uint16_t v;",
"if (port < s->pio.size) {",
"v = readw(s->pio_cpu_base + port);",
"} else {",
"v = readw(s->mmio_cpu_base + port);",
"}",
"return bs... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
24,055 | static int ast_read_header(AVFormatContext *s)
{
int codec;
AVStream *st;
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
avio_skip(s->pb, 8);
codec = avio_rb16(s->pb);
switch (codec) {
case 1:
st->codec->codec_id = AV_CODEC_ID_PCM_S16BE... | false | FFmpeg | d0a503c97cc59b17e77585a726448dfa46245f4d | static int ast_read_header(AVFormatContext *s)
{
int codec;
AVStream *st;
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
avio_skip(s->pb, 8);
codec = avio_rb16(s->pb);
switch (codec) {
case 1:
st->codec->codec_id = AV_CODEC_ID_PCM_S16BE... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
int VAR_1;
AVStream *st;
st = avformat_new_stream(VAR_0, NULL);
if (!st)
return AVERROR(ENOMEM);
avio_skip(VAR_0->pb, 8);
VAR_1 = avio_rb16(VAR_0->pb);
switch (VAR_1) {
case 1:
st->VAR_1->codec_id = AV_CODEC_ID_PC... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"int VAR_1;",
"AVStream *st;",
"st = avformat_new_stream(VAR_0, NULL);",
"if (!st)\nreturn AVERROR(ENOMEM);",
"avio_skip(VAR_0->pb, 8);",
"VAR_1 = avio_rb16(VAR_0->pb);",
"switch (VAR_1) {",
"case 1:\nst->VAR_1->codec_id = AV_CODEC_ID_PCM_S16BE_PLANAR;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31,
33
],
[
35
],
[
39
],
[
43
],
[
45
],
[
47,
49
],
[
53,
55
],
... |
24,056 | static av_cold int vsink_init(AVFilterContext *ctx, void *opaque)
{
BufferSinkContext *buf = ctx->priv;
AVBufferSinkParams *params = opaque;
if (params && params->pixel_fmts) {
const int *pixel_fmts = params->pixel_fmts;
buf->pixel_fmts = ff_copy_int_list(pixel_fmts);
if (... | false | FFmpeg | e48ded8551172b58a78f30303a81dfce125344e0 | static av_cold int vsink_init(AVFilterContext *ctx, void *opaque)
{
BufferSinkContext *buf = ctx->priv;
AVBufferSinkParams *params = opaque;
if (params && params->pixel_fmts) {
const int *pixel_fmts = params->pixel_fmts;
buf->pixel_fmts = ff_copy_int_list(pixel_fmts);
if (... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVFilterContext *ctx, void *opaque)
{
BufferSinkContext *buf = ctx->priv;
AVBufferSinkParams *params = opaque;
if (params && params->VAR_0) {
const int *VAR_0 = params->VAR_0;
buf->VAR_0 = ff_copy_int_list(VAR_0);
if (!buf->VAR_0)
ret... | [
"static av_cold int FUNC_0(AVFilterContext *ctx, void *opaque)\n{",
"BufferSinkContext *buf = ctx->priv;",
"AVBufferSinkParams *params = opaque;",
"if (params && params->VAR_0) {",
"const int *VAR_0 = params->VAR_0;",
"buf->VAR_0 = ff_copy_int_list(VAR_0);",
"if (!buf->VAR_0)\nreturn AVERROR(ENOMEM);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23
],
[
27
],
[
29
]
] |
24,057 | static int aac_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AACContext *ac = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
GetBitContext gb;
int buf_consumed;
int buf_offset;
int ... | true | FFmpeg | 7f46a641bf2540b8cf1293d5e50c0c0e34264254 | static int aac_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AACContext *ac = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
GetBitContext gb;
int buf_consumed;
int buf_offset;
int ... | {
"code": [
" avctx->extradata_size*8, 1) < 0) {"
],
"line_no": [
61
]
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
AACContext *ac = VAR_0->priv_data;
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
GetBitContext gb;
int VAR_6;
int VAR_7;
int VAR_8;
int VAR_9;
c... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"AACContext *ac = VAR_0->priv_data;",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"GetBitContext gb;",
"int VAR_6;",
"int VAR_7;",
"int VAR_8;",
"int VAR_9;",
"const uint8_t *VAR_10 = ... | [
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
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25,
27
],
[
29
],
[
31,
33,
35
],
[
39
],
[
41
],
[
43,
45
],
[
47,
49
],
[... |
24,058 | static void init_proc_book3s_64(CPUPPCState *env, int version)
{
gen_spr_ne_601(env);
gen_tbl(env);
gen_spr_book3s_altivec(env);
gen_spr_book3s_pmu_sup(env);
gen_spr_book3s_pmu_user(env);
gen_spr_book3s_common(env);
switch (version) {
case BOOK3S_CPU_970:
case BOOK3S_CPU_... | true | qemu | f03a1af581b926118d619ad1acc3304ad84d5e5b | static void init_proc_book3s_64(CPUPPCState *env, int version)
{
gen_spr_ne_601(env);
gen_tbl(env);
gen_spr_book3s_altivec(env);
gen_spr_book3s_pmu_sup(env);
gen_spr_book3s_pmu_user(env);
gen_spr_book3s_common(env);
switch (version) {
case BOOK3S_CPU_970:
case BOOK3S_CPU_... | {
"code": [
" case BOOK3S_CPU_POWER8:"
],
"line_no": [
39
]
} | static void FUNC_0(CPUPPCState *VAR_0, int VAR_1)
{
gen_spr_ne_601(VAR_0);
gen_tbl(VAR_0);
gen_spr_book3s_altivec(VAR_0);
gen_spr_book3s_pmu_sup(VAR_0);
gen_spr_book3s_pmu_user(VAR_0);
gen_spr_book3s_common(VAR_0);
switch (VAR_1) {
case BOOK3S_CPU_970:
case BOOK3S_CPU_POW... | [
"static void FUNC_0(CPUPPCState *VAR_0, int VAR_1)\n{",
"gen_spr_ne_601(VAR_0);",
"gen_tbl(VAR_0);",
"gen_spr_book3s_altivec(VAR_0);",
"gen_spr_book3s_pmu_sup(VAR_0);",
"gen_spr_book3s_pmu_user(VAR_0);",
"gen_spr_book3s_common(VAR_0);",
"switch (VAR_1) {",
"case BOOK3S_CPU_970:\ncase BOOK3S_CPU_POWE... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39,
41
],
[
43
],
[
45
],
[
47
... |
24,059 | static void virtio_host_initfn(Object *obj)
{
VirtIOInputHostPCI *dev = VIRTIO_INPUT_HOST_PCI(obj);
virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
TYPE_VIRTIO_INPUT_HOST);
}
| true | qemu | c6047e9621f77a65993bcda8f58b676996e24bb5 | static void virtio_host_initfn(Object *obj)
{
VirtIOInputHostPCI *dev = VIRTIO_INPUT_HOST_PCI(obj);
virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
TYPE_VIRTIO_INPUT_HOST);
}
| {
"code": [
"static void virtio_host_initfn(Object *obj)",
" VirtIOInputHostPCI *dev = VIRTIO_INPUT_HOST_PCI(obj);",
" virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),",
" TYPE_VIRTIO_INPUT_HOST);"
],
"line_no": [
1,
5,
9,
11
]
... | static void FUNC_0(Object *VAR_0)
{
VirtIOInputHostPCI *dev = VIRTIO_INPUT_HOST_PCI(VAR_0);
virtio_instance_init_common(VAR_0, &dev->vdev, sizeof(dev->vdev),
TYPE_VIRTIO_INPUT_HOST);
}
| [
"static void FUNC_0(Object *VAR_0)\n{",
"VirtIOInputHostPCI *dev = VIRTIO_INPUT_HOST_PCI(VAR_0);",
"virtio_instance_init_common(VAR_0, &dev->vdev, sizeof(dev->vdev),\nTYPE_VIRTIO_INPUT_HOST);",
"}"
] | [
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
]
] |
24,060 | int qcow2_update_snapshot_refcount(BlockDriverState *bs,
int64_t l1_table_offset, int l1_size, int addend)
{
BDRVQcowState *s = bs->opaque;
uint64_t *l1_table, *l2_table, l2_offset, offset, l1_size2, l1_allocated;
int64_t old_offset, old_l2_offset;
int i, j, l1_modified = 0, nb_csectors, refco... | true | qemu | c2b6ff51e4a3ad1f7ec5dbc94970e9778b31d718 | int qcow2_update_snapshot_refcount(BlockDriverState *bs,
int64_t l1_table_offset, int l1_size, int addend)
{
BDRVQcowState *s = bs->opaque;
uint64_t *l1_table, *l2_table, l2_offset, offset, l1_size2, l1_allocated;
int64_t old_offset, old_l2_offset;
int i, j, l1_modified = 0, nb_csectors, refco... | {
"code": [
" if (addend >= 0 && l1_modified) {",
" for(i = 0; i < l1_size; i++)",
" if (bdrv_pwrite_sync(bs->file, l1_table_offset, l1_table,",
" l1_size2) < 0)",
" goto fail;",
" for(i = 0; i < l1_size; i++)"
],
"line_no": [
2... | int FUNC_0(BlockDriverState *VAR_0,
int64_t VAR_1, int VAR_2, int VAR_3)
{
BDRVQcowState *s = VAR_0->opaque;
uint64_t *l1_table, *l2_table, l2_offset, offset, l1_size2, l1_allocated;
int64_t old_offset, old_l2_offset;
int VAR_4, VAR_5, VAR_6 = 0, VAR_7, VAR_8;
int VAR_9;
l2_table =... | [
"int FUNC_0(BlockDriverState *VAR_0,\nint64_t VAR_1, int VAR_2, int VAR_3)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"uint64_t *l1_table, *l2_table, l2_offset, offset, l1_size2, l1_allocated;",
"int64_t old_offset, old_l2_offset;",
"int VAR_4, VAR_5, VAR_6 = 0, VAR_7, VAR_8;",
"int VAR_9;",
"l2_table = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
],
[... |
24,061 | int ff_dirac_golomb_read_32bit(DiracGolombLUT *lut_ctx, const uint8_t *buf,
int bytes, uint8_t *_dst, int coeffs)
{
int i, b, c_idx = 0;
int32_t *dst = (int32_t *)_dst;
DiracGolombLUT *future[4], *l = &lut_ctx[2*LUT_SIZE + buf[0]];
INIT_RESIDUE(res);
for (b = 1; b <= b... | true | FFmpeg | c595139f1fdb5ce5ee128c317ed9e4e836282436 | int ff_dirac_golomb_read_32bit(DiracGolombLUT *lut_ctx, const uint8_t *buf,
int bytes, uint8_t *_dst, int coeffs)
{
int i, b, c_idx = 0;
int32_t *dst = (int32_t *)_dst;
DiracGolombLUT *future[4], *l = &lut_ctx[2*LUT_SIZE + buf[0]];
INIT_RESIDUE(res);
for (b = 1; b <= b... | {
"code": [],
"line_no": []
} | int FUNC_0(DiracGolombLUT *VAR_0, const uint8_t *VAR_1,
int VAR_2, uint8_t *VAR_3, int VAR_4)
{
int VAR_5, VAR_6, VAR_7 = 0;
int32_t *dst = (int32_t *)VAR_3;
DiracGolombLUT *future[4], *l = &VAR_0[2*LUT_SIZE + VAR_1[0]];
INIT_RESIDUE(res);
for (VAR_6 = 1; VAR_6 <= VAR_... | [
"int FUNC_0(DiracGolombLUT *VAR_0, const uint8_t *VAR_1,\nint VAR_2, uint8_t *VAR_3, int VAR_4)\n{",
"int VAR_5, VAR_6, VAR_7 = 0;",
"int32_t *dst = (int32_t *)VAR_3;",
"DiracGolombLUT *future[4], *l = &VAR_0[2*LUT_SIZE + VAR_1[0]];",
"INIT_RESIDUE(res);",
"for (VAR_6 = 1; VAR_6 <= VAR_2; VAR_6++) {",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13,
14
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
23
],... |
24,062 | static uint32_t syborg_virtio_readl(void *opaque, target_phys_addr_t offset)
{
SyborgVirtIOProxy *s = opaque;
VirtIODevice *vdev = s->vdev;
uint32_t ret;
DPRINTF("readl 0x%x\n", (int)offset);
if (offset >= SYBORG_VIRTIO_CONFIG) {
return virtio_config_readl(vdev, offset - SYBORG_VIRT... | true | qemu | 6d74ca5aa83b83fb52332f7735c61ecb7a5328c1 | static uint32_t syborg_virtio_readl(void *opaque, target_phys_addr_t offset)
{
SyborgVirtIOProxy *s = opaque;
VirtIODevice *vdev = s->vdev;
uint32_t ret;
DPRINTF("readl 0x%x\n", (int)offset);
if (offset >= SYBORG_VIRTIO_CONFIG) {
return virtio_config_readl(vdev, offset - SYBORG_VIRT... | {
"code": [
" ret |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY);",
" ret |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY);"
],
"line_no": [
39,
39
]
} | static uint32_t FUNC_0(void *opaque, target_phys_addr_t offset)
{
SyborgVirtIOProxy *s = opaque;
VirtIODevice *vdev = s->vdev;
uint32_t ret;
DPRINTF("readl 0x%x\n", (int)offset);
if (offset >= SYBORG_VIRTIO_CONFIG) {
return virtio_config_readl(vdev, offset - SYBORG_VIRTIO_CONFIG);
... | [
"static uint32_t FUNC_0(void *opaque, target_phys_addr_t offset)\n{",
"SyborgVirtIOProxy *s = opaque;",
"VirtIODevice *vdev = s->vdev;",
"uint32_t ret;",
"DPRINTF(\"readl 0x%x\\n\", (int)offset);",
"if (offset >= SYBORG_VIRTIO_CONFIG) {",
"return virtio_config_readl(vdev, offset - SYBORG_VIRTIO_CONFIG);... | [
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
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
... |
24,064 | static int nfs_file_create(const char *url, QemuOpts *opts, Error **errp)
{
int ret = 0;
int64_t total_size = 0;
NFSClient *client = g_new0(NFSClient, 1);
QDict *options = NULL;
client->aio_context = qemu_get_aio_context();
/* Read out options */
total_size = ROUND_UP(qemu_opt_ge... | true | qemu | 07555ba6f303d4be8af538c3a66cc46ccb2e5751 | static int nfs_file_create(const char *url, QemuOpts *opts, Error **errp)
{
int ret = 0;
int64_t total_size = 0;
NFSClient *client = g_new0(NFSClient, 1);
QDict *options = NULL;
client->aio_context = qemu_get_aio_context();
total_size = ROUND_UP(qemu_opt_get_size_del(opts, BLOCK... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, QemuOpts *VAR_1, Error **VAR_2)
{
int VAR_3 = 0;
int64_t total_size = 0;
NFSClient *client = g_new0(NFSClient, 1);
QDict *options = NULL;
client->aio_context = qemu_get_aio_context();
total_size = ROUND_UP(qemu_opt_get_size_del(VAR_1, BLOCK_O... | [
"static int FUNC_0(const char *VAR_0, QemuOpts *VAR_1, Error **VAR_2)\n{",
"int VAR_3 = 0;",
"int64_t total_size = 0;",
"NFSClient *client = g_new0(NFSClient, 1);",
"QDict *options = NULL;",
"client->aio_context = qemu_get_aio_context();",
"total_size = ROUND_UP(qemu_opt_get_size_del(VAR_1, BLOCK_OPT_SI... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51,
54
... |
24,065 | int setenv(const char *name, const char *value, int overwrite)
{
int result = 0;
if (overwrite || !getenv(name)) {
size_t length = strlen(name) + strlen(value) + 2;
char *string = g_malloc(length);
snprintf(string, length, "%s=%s", name, value);
result = putenv(string);
}
... | true | qemu | 91a9ecefb6d7f066c6eecc09f7231ce7969d1817 | int setenv(const char *name, const char *value, int overwrite)
{
int result = 0;
if (overwrite || !getenv(name)) {
size_t length = strlen(name) + strlen(value) + 2;
char *string = g_malloc(length);
snprintf(string, length, "%s=%s", name, value);
result = putenv(string);
}
... | {
"code": [],
"line_no": []
} | int FUNC_0(const char *VAR_0, const char *VAR_1, int VAR_2)
{
int VAR_3 = 0;
if (VAR_2 || !getenv(VAR_0)) {
size_t length = strlen(VAR_0) + strlen(VAR_1) + 2;
char *VAR_4 = g_malloc(length);
snprintf(VAR_4, length, "%s=%s", VAR_0, VAR_1);
VAR_3 = putenv(VAR_4);
}
return V... | [
"int FUNC_0(const char *VAR_0, const char *VAR_1, int VAR_2)\n{",
"int VAR_3 = 0;",
"if (VAR_2 || !getenv(VAR_0)) {",
"size_t length = strlen(VAR_0) + strlen(VAR_1) + 2;",
"char *VAR_4 = g_malloc(length);",
"snprintf(VAR_4, length, \"%s=%s\", VAR_0, VAR_1);",
"VAR_3 = putenv(VAR_4);",
"}",
"return V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
]
] |
24,067 | static void clone_tables(H264Context *dst, H264Context *src){
dst->intra4x4_pred_mode = src->intra4x4_pred_mode;
dst->non_zero_count = src->non_zero_count;
dst->slice_table = src->slice_table;
dst->cbp_table = src->cbp_table;
dst->mb2b_xy ... | true | FFmpeg | 50c21814b9de5635cf01e2d1ea091a9a272a4d67 | static void clone_tables(H264Context *dst, H264Context *src){
dst->intra4x4_pred_mode = src->intra4x4_pred_mode;
dst->non_zero_count = src->non_zero_count;
dst->slice_table = src->slice_table;
dst->cbp_table = src->cbp_table;
dst->mb2b_xy ... | {
"code": [
" if(!dst->dequant4_coeff[0])",
" init_dequant_tables(dst);",
" dst->dequant_coeff_pps= -1;"
],
"line_no": [
25,
27,
33
]
} | static void FUNC_0(H264Context *VAR_0, H264Context *VAR_1){
VAR_0->intra4x4_pred_mode = VAR_1->intra4x4_pred_mode;
VAR_0->non_zero_count = VAR_1->non_zero_count;
VAR_0->slice_table = VAR_1->slice_table;
VAR_0->cbp_table = VAR_1->cbp_table;
VAR_0->mb2b... | [
"static void FUNC_0(H264Context *VAR_0, H264Context *VAR_1){",
"VAR_0->intra4x4_pred_mode = VAR_1->intra4x4_pred_mode;",
"VAR_0->non_zero_count = VAR_1->non_zero_count;",
"VAR_0->slice_table = VAR_1->slice_table;",
"VAR_0->cbp_table = VAR_1->cbp_table;",
"VAR_0-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
24,068 | static void adb_kbd_reset(DeviceState *dev)
{
ADBDevice *d = ADB_DEVICE(dev);
KBDState *s = ADB_KEYBOARD(dev);
d->handler = 1;
d->devaddr = ADB_DEVID_KEYBOARD;
memset(s->data, 0, sizeof(s->data));
s->rptr = 0;
s->wptr = 0;
s->count = 0;
}
| true | qemu | 77cb0f5aafc8e6d0c6d3c339f381c9b7921648e0 | static void adb_kbd_reset(DeviceState *dev)
{
ADBDevice *d = ADB_DEVICE(dev);
KBDState *s = ADB_KEYBOARD(dev);
d->handler = 1;
d->devaddr = ADB_DEVID_KEYBOARD;
memset(s->data, 0, sizeof(s->data));
s->rptr = 0;
s->wptr = 0;
s->count = 0;
}
| {
"code": [
"static void adb_kbd_reset(DeviceState *dev)",
" ADBDevice *d = ADB_DEVICE(dev);",
" KBDState *s = ADB_KEYBOARD(dev);",
" d->handler = 1;",
" d->devaddr = ADB_DEVID_KEYBOARD;",
" memset(s->data, 0, sizeof(s->data));",
" s->rptr = 0;",
" s->wptr = 0;",
... | static void FUNC_0(DeviceState *VAR_0)
{
ADBDevice *d = ADB_DEVICE(VAR_0);
KBDState *s = ADB_KEYBOARD(VAR_0);
d->handler = 1;
d->devaddr = ADB_DEVID_KEYBOARD;
memset(s->data, 0, sizeof(s->data));
s->rptr = 0;
s->wptr = 0;
s->count = 0;
}
| [
"static void FUNC_0(DeviceState *VAR_0)\n{",
"ADBDevice *d = ADB_DEVICE(VAR_0);",
"KBDState *s = ADB_KEYBOARD(VAR_0);",
"d->handler = 1;",
"d->devaddr = ADB_DEVID_KEYBOARD;",
"memset(s->data, 0, sizeof(s->data));",
"s->rptr = 0;",
"s->wptr = 0;",
"s->count = 0;",
"}"
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
24,071 | static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, int Al,
const uint8_t *mb_bitmask, const AVFrame *reference){
int i, mb_x, mb_y;
uint8_t* data[MAX_COMPONENTS];
const uint8_t *reference_data[MAX_COMPONENTS];
int linesize[MAX_COMPONENTS];
... | true | FFmpeg | 76cd98b445c5a1608e9a5974bef0b0be6b35f1ce | static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, int Al,
const uint8_t *mb_bitmask, const AVFrame *reference){
int i, mb_x, mb_y;
uint8_t* data[MAX_COMPONENTS];
const uint8_t *reference_data[MAX_COMPONENTS];
int linesize[MAX_COMPONENTS];
... | {
"code": [],
"line_no": []
} | static int FUNC_0(MJpegDecodeContext *VAR_0, int VAR_1, int VAR_2, int VAR_3,
const uint8_t *VAR_4, const AVFrame *VAR_5){
int VAR_6, VAR_7, VAR_8;
uint8_t* data[MAX_COMPONENTS];
const uint8_t *VAR_9[MAX_COMPONENTS];
int VAR_10[MAX_COMPONENTS];
GetBitContext mb_bit... | [
"static int FUNC_0(MJpegDecodeContext *VAR_0, int VAR_1, int VAR_2, int VAR_3,\nconst uint8_t *VAR_4, const AVFrame *VAR_5){",
"int VAR_6, VAR_7, VAR_8;",
"uint8_t* data[MAX_COMPONENTS];",
"const uint8_t *VAR_9[MAX_COMPONENTS];",
"int VAR_10[MAX_COMPONENTS];",
"GetBitContext mb_bitmask_gb;",
"if (VAR_4)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
24
],
[
26
],
[
28
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
... |
24,073 | static int flv_data_packet(AVFormatContext *s, AVPacket *pkt,
int64_t dts, int64_t next)
{
AVIOContext *pb = s->pb;
AVStream *st = NULL;
char buf[20];
int ret = AVERROR_INVALIDDATA;
int i, length = -1;
switch (avio_r8(pb)) {
case AMF_DATA_TYPE_MIXEDAR... | false | FFmpeg | 629b2ed0ac77d7c4bf1aeac5e70cafee5fa0fcae | static int flv_data_packet(AVFormatContext *s, AVPacket *pkt,
int64_t dts, int64_t next)
{
AVIOContext *pb = s->pb;
AVStream *st = NULL;
char buf[20];
int ret = AVERROR_INVALIDDATA;
int i, length = -1;
switch (avio_r8(pb)) {
case AMF_DATA_TYPE_MIXEDAR... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1,
int64_t VAR_2, int64_t VAR_3)
{
AVIOContext *pb = VAR_0->pb;
AVStream *st = NULL;
char VAR_4[20];
int VAR_5 = AVERROR_INVALIDDATA;
int VAR_6, VAR_7 = -1;
switch (avio_r8(pb)) {
case AMF_DATA_T... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1,\nint64_t VAR_2, int64_t VAR_3)\n{",
"AVIOContext *pb = VAR_0->pb;",
"AVStream *st = NULL;",
"char VAR_4[20];",
"int VAR_5 = AVERROR_INVALIDDATA;",
"int VAR_6, VAR_7 = -1;",
"switch (avio_r8(pb)) {",
"case AMF_DATA_TYPE_MIXEDARRAY:\navio_se... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
25,
27
],
[
29,
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[... |
24,074 | void ff_h264_write_back_intra_pred_mode(H264Context *h){
int8_t *mode= h->intra4x4_pred_mode + h->mb2br_xy[h->mb_xy];
AV_COPY32(mode, h->intra4x4_pred_mode_cache + 4 + 8*4);
mode[4]= h->intra4x4_pred_mode_cache[7+8*3];
mode[5]= h->intra4x4_pred_mode_cache[7+8*2];
mode[6]= h->intra4x4_pred_mod... | false | FFmpeg | 3b7ebeb4d52a25c7e1038ae90c6c19b0d6f11877 | void ff_h264_write_back_intra_pred_mode(H264Context *h){
int8_t *mode= h->intra4x4_pred_mode + h->mb2br_xy[h->mb_xy];
AV_COPY32(mode, h->intra4x4_pred_mode_cache + 4 + 8*4);
mode[4]= h->intra4x4_pred_mode_cache[7+8*3];
mode[5]= h->intra4x4_pred_mode_cache[7+8*2];
mode[6]= h->intra4x4_pred_mod... | {
"code": [],
"line_no": []
} | void FUNC_0(H264Context *VAR_0){
int8_t *mode= VAR_0->intra4x4_pred_mode + VAR_0->mb2br_xy[VAR_0->mb_xy];
AV_COPY32(mode, VAR_0->intra4x4_pred_mode_cache + 4 + 8*4);
mode[4]= VAR_0->intra4x4_pred_mode_cache[7+8*3];
mode[5]= VAR_0->intra4x4_pred_mode_cache[7+8*2];
mode[6]= VAR_0->intra4x4_pred... | [
"void FUNC_0(H264Context *VAR_0){",
"int8_t *mode= VAR_0->intra4x4_pred_mode + VAR_0->mb2br_xy[VAR_0->mb_xy];",
"AV_COPY32(mode, VAR_0->intra4x4_pred_mode_cache + 4 + 8*4);",
"mode[4]= VAR_0->intra4x4_pred_mode_cache[7+8*3];",
"mode[5]= VAR_0->intra4x4_pred_mode_cache[7+8*2];",
"mode[6]= VAR_0->intra4x4_p... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
24,076 | static int noise(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args,
uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size, int keyframe){
unsigned int *state= bsfc->priv_data;
int amount= args ? atoi(args) : (*state % 10001+1);
... | true | FFmpeg | 93ef29b6f47eda7d73eb9e71628f1f1abb64266d | static int noise(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args,
uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size, int keyframe){
unsigned int *state= bsfc->priv_data;
int amount= args ? atoi(args) : (*state % 10001+1);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVBitStreamFilterContext *VAR_0, AVCodecContext *VAR_1, const char *VAR_2,
uint8_t **VAR_3, int *VAR_4,
const uint8_t *VAR_5, int VAR_6, int VAR_7){
unsigned int *VAR_8= VAR_0->priv_data;
int VAR_9= VAR_2 ? atoi(VAR_2) : (*VAR_8 % 10001+1);
int VAR... | [
"static int FUNC_0(AVBitStreamFilterContext *VAR_0, AVCodecContext *VAR_1, const char *VAR_2,\nuint8_t **VAR_3, int *VAR_4,\nconst uint8_t *VAR_5, int VAR_6, int VAR_7){",
"unsigned int *VAR_8= VAR_0->priv_data;",
"int VAR_9= VAR_2 ? atoi(VAR_2) : (*VAR_8 % 10001+1);",
"int VAR_10;",
"*VAR_3= av_malloc(VAR_... | [
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
]
] |
24,077 | static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, int Al,
const uint8_t *mb_bitmask, const AVFrame *reference){
int i, mb_x, mb_y;
uint8_t* data[MAX_COMPONENTS];
const uint8_t *reference_data[MAX_COMPONENTS];
int linesize[MAX_COMPONENTS];
... | false | FFmpeg | e268a352af893e47bd3ea2aed90761cb0b4feca7 | static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, int Al,
const uint8_t *mb_bitmask, const AVFrame *reference){
int i, mb_x, mb_y;
uint8_t* data[MAX_COMPONENTS];
const uint8_t *reference_data[MAX_COMPONENTS];
int linesize[MAX_COMPONENTS];
... | {
"code": [],
"line_no": []
} | static int FUNC_0(MJpegDecodeContext *VAR_0, int VAR_1, int VAR_2, int VAR_3,
const uint8_t *VAR_4, const AVFrame *VAR_5){
int VAR_6, VAR_7, VAR_8;
uint8_t* data[MAX_COMPONENTS];
const uint8_t *VAR_9[MAX_COMPONENTS];
int VAR_10[MAX_COMPONENTS];
GetBitContext mb_bit... | [
"static int FUNC_0(MJpegDecodeContext *VAR_0, int VAR_1, int VAR_2, int VAR_3,\nconst uint8_t *VAR_4, const AVFrame *VAR_5){",
"int VAR_6, VAR_7, VAR_8;",
"uint8_t* data[MAX_COMPONENTS];",
"const uint8_t *VAR_9[MAX_COMPONENTS];",
"int VAR_10[MAX_COMPONENTS];",
"GetBitContext mb_bitmask_gb;",
"if (VAR_4)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
24,078 | static void qcow2_invalidate_cache(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
int flags = s->flags;
AES_KEY aes_encrypt_key;
AES_KEY aes_decrypt_key;
uint32_t crypt_method = 0;
QDict *options;
/*
* Backing files are read-only which makes all of their metadata immutable,
... | true | qemu | 3456a8d1852e970688b73d03fdc44dde851759e1 | static void qcow2_invalidate_cache(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
int flags = s->flags;
AES_KEY aes_encrypt_key;
AES_KEY aes_decrypt_key;
uint32_t crypt_method = 0;
QDict *options;
if (s->crypt_method) {
crypt_method = s->crypt_method;
memcpy(&... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0)
{
BDRVQcowState *s = VAR_0->opaque;
int VAR_1 = s->VAR_1;
AES_KEY aes_encrypt_key;
AES_KEY aes_decrypt_key;
uint32_t crypt_method = 0;
QDict *options;
if (s->crypt_method) {
crypt_method = s->crypt_method;
memcpy(&aes_encryp... | [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"int VAR_1 = s->VAR_1;",
"AES_KEY aes_encrypt_key;",
"AES_KEY aes_decrypt_key;",
"uint32_t crypt_method = 0;",
"QDict *options;",
"if (s->crypt_method) {",
"crypt_method = s->crypt_method;",
"memcpy(&aes_encrypt... | [
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
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20,
21
],
[
22
],
[
23
],
[
24
],
[
25
],
[
... |
24,079 | static av_cold int avui_encode_init(AVCodecContext *avctx)
{
avctx->coded_frame = av_frame_alloc();
if (avctx->width != 720 || avctx->height != 486 && avctx->height != 576) {
av_log(avctx, AV_LOG_ERROR, "Only 720x486 and 720x576 are supported.\n");
return AVERROR(EINVAL);
}
if (... | true | FFmpeg | e29153f414f5b2d10e0386abf7921aed4a4fa454 | static av_cold int avui_encode_init(AVCodecContext *avctx)
{
avctx->coded_frame = av_frame_alloc();
if (avctx->width != 720 || avctx->height != 486 && avctx->height != 576) {
av_log(avctx, AV_LOG_ERROR, "Only 720x486 and 720x576 are supported.\n");
return AVERROR(EINVAL);
}
if (... | {
"code": [
" avctx->coded_frame = av_frame_alloc();",
" if (!avctx->coded_frame) {",
" av_log(avctx, AV_LOG_ERROR, \"Could not allocate frame.\\n\");",
" return AVERROR(ENOMEM);"
],
"line_no": [
5,
17,
19,
21
]
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
avctx->coded_frame = av_frame_alloc();
if (avctx->width != 720 || avctx->height != 486 && avctx->height != 576) {
av_log(avctx, AV_LOG_ERROR, "Only 720x486 and 720x576 are supported.\n");
return AVERROR(EINVAL);
}
if (!avctx->co... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"avctx->coded_frame = av_frame_alloc();",
"if (avctx->width != 720 || avctx->height != 486 && avctx->height != 576) {",
"av_log(avctx, AV_LOG_ERROR, \"Only 720x486 and 720x576 are supported.\\n\");",
"return AVERROR(EINVAL);",
"}",
"if (!avctx->code... | [
0,
1,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
47
],
... |
24,080 | void acpi_pm1_evt_write_sts(ACPIREGS *ar, uint16_t val)
{
uint16_t pm1_sts = acpi_pm1_evt_get_sts(ar, ar->tmr.overflow_time);
if (pm1_sts & val & ACPI_BITMASK_TIMER_STATUS) {
/* if TMRSTS is reset, then compute the new overflow time */
acpi_pm_tmr_calc_overflow_time(ar);
}
ar->pm1... | true | qemu | 2886be1b01c274570fa139748a402207482405bd | void acpi_pm1_evt_write_sts(ACPIREGS *ar, uint16_t val)
{
uint16_t pm1_sts = acpi_pm1_evt_get_sts(ar, ar->tmr.overflow_time);
if (pm1_sts & val & ACPI_BITMASK_TIMER_STATUS) {
acpi_pm_tmr_calc_overflow_time(ar);
}
ar->pm1.evt.sts &= ~val;
}
| {
"code": [
" uint16_t pm1_sts = acpi_pm1_evt_get_sts(ar, ar->tmr.overflow_time);"
],
"line_no": [
5
]
} | void FUNC_0(ACPIREGS *VAR_0, uint16_t VAR_1)
{
uint16_t pm1_sts = acpi_pm1_evt_get_sts(VAR_0, VAR_0->tmr.overflow_time);
if (pm1_sts & VAR_1 & ACPI_BITMASK_TIMER_STATUS) {
acpi_pm_tmr_calc_overflow_time(VAR_0);
}
VAR_0->pm1.evt.sts &= ~VAR_1;
}
| [
"void FUNC_0(ACPIREGS *VAR_0, uint16_t VAR_1)\n{",
"uint16_t pm1_sts = acpi_pm1_evt_get_sts(VAR_0, VAR_0->tmr.overflow_time);",
"if (pm1_sts & VAR_1 & ACPI_BITMASK_TIMER_STATUS) {",
"acpi_pm_tmr_calc_overflow_time(VAR_0);",
"}",
"VAR_0->pm1.evt.sts &= ~VAR_1;",
"}"
] | [
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
24,081 | static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MPADecodeContext *s = avctx->priv_data;
uint32_t header;
int ret;
if (buf_size < HEADER_SIZE)... | false | FFmpeg | 955aec3c7c7be39b659197e1ec379a09f2b7c41c | static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MPADecodeContext *s = avctx->priv_data;
uint32_t header;
int ret;
if (buf_size < HEADER_SIZE)... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext * VAR_0, void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
MPADecodeContext *s = VAR_0->priv_data;
uint32_t header;
int VAR_6;
if (VAR_5 < HEADER_SIZE)
retu... | [
"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;",
"MPADecodeContext *s = VAR_0->priv_data;",
"uint32_t header;",
"int VAR_6;",
"if (VAR_5 < HEADER_SIZE)\nreturn AVERROR_INVALIDDATA;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53,... |
24,082 | int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options)
{
int ret = 0;
AVDictionary *tmp = NULL;
if (avcodec_is_open(avctx))
return 0;
if ((!codec && !avctx->codec)) {
av_log(avctx, AV_LOG_ERROR, "No codec provided to avcodec_open2(... | false | FFmpeg | fde1bc64adbec49301c665efab2b49b94bb39c23 | int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options)
{
int ret = 0;
AVDictionary *tmp = NULL;
if (avcodec_is_open(avctx))
return 0;
if ((!codec && !avctx->codec)) {
av_log(avctx, AV_LOG_ERROR, "No codec provided to avcodec_open2(... | {
"code": [],
"line_no": []
} | int VAR_0 avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options)
{
int ret = 0;
AVDictionary *tmp = NULL;
if (avcodec_is_open(avctx))
return 0;
if ((!codec && !avctx->codec)) {
av_log(avctx, AV_LOG_ERROR, "No codec provided to avcodec_open2().\n");
... | [
"int VAR_0 avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options)\n{",
"int ret = 0;",
"AVDictionary *tmp = NULL;",
"if (avcodec_is_open(avctx))\nreturn 0;",
"if ((!codec && !avctx->codec)) {",
"av_log(avctx, AV_LOG_ERROR, \"No codec provided to avcodec_open2().\\n\");",
"return AV... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35,
37
],
[
41,
43
],
[
47,
49
],
[
55
],
[
57,
59... |
24,083 | static int get_transform_coeffs1(uint8_t *exps, uint8_t *bap, float chcoeff,
float *coeffs, int start, int end, int dith_flag, GetBitContext *gb,
dither_state *state)
{
int16_t mantissa;
int i;
int gcode;
mant_group l3_grp, l5_grp, l11_grp;
for (i = 0; i < 3; i++)
... | false | FFmpeg | 486637af8ef29ec215e0e0b7ecd3b5470f0e04e5 | static int get_transform_coeffs1(uint8_t *exps, uint8_t *bap, float chcoeff,
float *coeffs, int start, int end, int dith_flag, GetBitContext *gb,
dither_state *state)
{
int16_t mantissa;
int i;
int gcode;
mant_group l3_grp, l5_grp, l11_grp;
for (i = 0; i < 3; i++)
... | {
"code": [],
"line_no": []
} | static int FUNC_0(uint8_t *VAR_0, uint8_t *VAR_1, float VAR_2,
float *VAR_3, int VAR_4, int VAR_5, int VAR_6, GetBitContext *VAR_7,
dither_state *VAR_8)
{
int16_t mantissa;
int VAR_9;
int VAR_10;
mant_group l3_grp, l5_grp, l11_grp;
for (VAR_9 = 0; VAR_9 < 3; VAR_9++)
... | [
"static int FUNC_0(uint8_t *VAR_0, uint8_t *VAR_1, float VAR_2,\nfloat *VAR_3, int VAR_4, int VAR_5, int VAR_6, GetBitContext *VAR_7,\ndither_state *VAR_8)\n{",
"int16_t mantissa;",
"int VAR_9;",
"int VAR_10;",
"mant_group l3_grp, l5_grp, l11_grp;",
"for (VAR_9 = 0; VAR_9 < 3; VAR_9++)",
"l3_grp.gcodes[... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31,
33
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
24,086 | static int usb_host_update_interfaces(USBHostDevice *dev, int configuration)
{
int dev_descr_len, config_descr_len;
int interface, nb_interfaces, nb_configurations;
int ret, i;
if (configuration == 0) /* address state - ignore */
return 1;
i = 0;
dev_descr_len = dev->descr[0]... | false | qemu | 1f3870ab242018b724b845957f7f928a2d7c1f5b | static int usb_host_update_interfaces(USBHostDevice *dev, int configuration)
{
int dev_descr_len, config_descr_len;
int interface, nb_interfaces, nb_configurations;
int ret, i;
if (configuration == 0)
return 1;
i = 0;
dev_descr_len = dev->descr[0];
if (dev_descr_len > d... | {
"code": [],
"line_no": []
} | static int FUNC_0(USBHostDevice *VAR_0, int VAR_1)
{
int VAR_2, VAR_3;
int VAR_4, VAR_5, VAR_6;
int VAR_7, VAR_8;
if (VAR_1 == 0)
return 1;
VAR_8 = 0;
VAR_2 = VAR_0->descr[0];
if (VAR_2 > VAR_0->descr_len)
goto fail;
VAR_6 = VAR_0->descr[17];
VAR_8 ... | [
"static int FUNC_0(USBHostDevice *VAR_0, int VAR_1)\n{",
"int VAR_2, VAR_3;",
"int VAR_4, VAR_5, VAR_6;",
"int VAR_7, VAR_8;",
"if (VAR_1 == 0)\nreturn 1;",
"VAR_8 = 0;",
"VAR_2 = VAR_0->descr[0];",
"if (VAR_2 > VAR_0->descr_len)\ngoto fail;",
"VAR_6 = VAR_0->descr[17];",
"VAR_8 += VAR_2;",
"whi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
31
],
[
33
],
[
35,
37,
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
24,088 | static int get_block_status(BlockDriverState *bs, int64_t offset,
int64_t bytes, MapEntry *e)
{
int64_t ret;
int depth;
BlockDriverState *file;
bool has_offset;
int nb_sectors = bytes >> BDRV_SECTOR_BITS;
assert(bytes < INT_MAX);
/* As an optimization, ... | false | qemu | 237d78f8fc62e62f62246883ecf62e44ed35fb80 | static int get_block_status(BlockDriverState *bs, int64_t offset,
int64_t bytes, MapEntry *e)
{
int64_t ret;
int depth;
BlockDriverState *file;
bool has_offset;
int nb_sectors = bytes >> BDRV_SECTOR_BITS;
assert(bytes < INT_MAX);
depth = 0... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,
int64_t VAR_2, MapEntry *VAR_3)
{
int64_t ret;
int VAR_4;
BlockDriverState *file;
bool has_offset;
int VAR_5 = VAR_2 >> BDRV_SECTOR_BITS;
assert(VAR_2 < INT_MAX);
VAR_4 = 0;
fo... | [
"static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,\nint64_t VAR_2, MapEntry *VAR_3)\n{",
"int64_t ret;",
"int VAR_4;",
"BlockDriverState *file;",
"bool has_offset;",
"int VAR_5 = VAR_2 >> BDRV_SECTOR_BITS;",
"assert(VAR_2 < INT_MAX);",
"VAR_4 = 0;",
"for (;;) {",
"ret = bdrv_get_block_stat... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
24,091 | static void *colo_compare_thread(void *opaque)
{
CompareState *s = opaque;
GSource *timeout_source;
s->worker_context = g_main_context_new();
qemu_chr_fe_set_handlers(&s->chr_pri_in, compare_chr_can_read,
compare_pri_chr_in, NULL, NULL,
... | false | qemu | dd321ecfc2e82e6f9578b986060b1aa3f036bd98 | static void *colo_compare_thread(void *opaque)
{
CompareState *s = opaque;
GSource *timeout_source;
s->worker_context = g_main_context_new();
qemu_chr_fe_set_handlers(&s->chr_pri_in, compare_chr_can_read,
compare_pri_chr_in, NULL, NULL,
... | {
"code": [],
"line_no": []
} | static void *FUNC_0(void *VAR_0)
{
CompareState *s = VAR_0;
GSource *timeout_source;
s->worker_context = g_main_context_new();
qemu_chr_fe_set_handlers(&s->chr_pri_in, compare_chr_can_read,
compare_pri_chr_in, NULL, NULL,
s, s->worker_... | [
"static void *FUNC_0(void *VAR_0)\n{",
"CompareState *s = VAR_0;",
"GSource *timeout_source;",
"s->worker_context = g_main_context_new();",
"qemu_chr_fe_set_handlers(&s->chr_pri_in, compare_chr_can_read,\ncompare_pri_chr_in, NULL, NULL,\ns, s->worker_context, true);",
"qemu_chr_fe_set_handlers(&s->chr_sec... | [
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
],
[
35
],
[
37,
39
],
[
41
],
[
45
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
]
] |
24,092 | static int find_image_format(BlockDriverState *bs, const char *filename,
BlockDriver **pdrv, Error **errp)
{
BlockDriver *drv;
uint8_t buf[BLOCK_PROBE_BUF_SIZE];
int ret = 0;
/* Return the raw BlockDriver * to scsi-generic devices or empty drives */
if (bs->sg |... | false | qemu | b192af8acc597a6e8068873434e56e0c7de1b7d3 | static int find_image_format(BlockDriverState *bs, const char *filename,
BlockDriver **pdrv, Error **errp)
{
BlockDriver *drv;
uint8_t buf[BLOCK_PROBE_BUF_SIZE];
int ret = 0;
if (bs->sg || !bdrv_is_inserted(bs) || bdrv_getlength(bs) == 0) {
*pdrv = &bd... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1,
BlockDriver **VAR_2, Error **VAR_3)
{
BlockDriver *drv;
uint8_t buf[BLOCK_PROBE_BUF_SIZE];
int VAR_4 = 0;
if (VAR_0->sg || !bdrv_is_inserted(VAR_0) || bdrv_getlength(VAR_0) == 0) {
*VAR_2 = ... | [
"static int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1,\nBlockDriver **VAR_2, Error **VAR_3)\n{",
"BlockDriver *drv;",
"uint8_t buf[BLOCK_PROBE_BUF_SIZE];",
"int VAR_4 = 0;",
"if (VAR_0->sg || !bdrv_is_inserted(VAR_0) || bdrv_getlength(VAR_0) == 0) {",
"*VAR_2 = &bdrv_raw;",
"return VAR_4;",
"}... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47,
49
],
[
51
],
[... |
24,093 | static int fits_write_packet(AVFormatContext *s, AVPacket *pkt)
{
write_image_header(s);
avio_write(s->pb, pkt->data, pkt->size);
return 0;
}
| false | FFmpeg | 284b432662b6e137148ff9d13ef2b554cb14b4ae | static int fits_write_packet(AVFormatContext *s, AVPacket *pkt)
{
write_image_header(s);
avio_write(s->pb, pkt->data, pkt->size);
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
write_image_header(VAR_0);
avio_write(VAR_0->pb, VAR_1->data, VAR_1->size);
return 0;
}
| [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"write_image_header(VAR_0);",
"avio_write(VAR_0->pb, VAR_1->data, VAR_1->size);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
24,094 | static void uart_parameters_setup(UartState *s)
{
QEMUSerialSetParams ssp;
unsigned int baud_rate, packet_size;
baud_rate = (s->r[R_MR] & UART_MR_CLKS) ?
UART_INPUT_CLK / 8 : UART_INPUT_CLK;
ssp.speed = baud_rate / (s->r[R_BRGR] * (s->r[R_BDIV] + 1));
packet_size = 1;
s... | false | qemu | af52fe862fba686713044efdf9158195f84535ab | static void uart_parameters_setup(UartState *s)
{
QEMUSerialSetParams ssp;
unsigned int baud_rate, packet_size;
baud_rate = (s->r[R_MR] & UART_MR_CLKS) ?
UART_INPUT_CLK / 8 : UART_INPUT_CLK;
ssp.speed = baud_rate / (s->r[R_BRGR] * (s->r[R_BDIV] + 1));
packet_size = 1;
s... | {
"code": [],
"line_no": []
} | static void FUNC_0(UartState *VAR_0)
{
QEMUSerialSetParams ssp;
unsigned int VAR_1, VAR_2;
VAR_1 = (VAR_0->r[R_MR] & UART_MR_CLKS) ?
UART_INPUT_CLK / 8 : UART_INPUT_CLK;
ssp.speed = VAR_1 / (VAR_0->r[R_BRGR] * (VAR_0->r[R_BDIV] + 1));
VAR_2 = 1;
switch (VAR_0->r[R_MR] &... | [
"static void FUNC_0(UartState *VAR_0)\n{",
"QEMUSerialSetParams ssp;",
"unsigned int VAR_1, VAR_2;",
"VAR_1 = (VAR_0->r[R_MR] & UART_MR_CLKS) ?\nUART_INPUT_CLK / 8 : UART_INPUT_CLK;",
"ssp.speed = VAR_1 / (VAR_0->r[R_BRGR] * (VAR_0->r[R_BDIV] + 1));",
"VAR_2 = 1;",
"switch (VAR_0->r[R_MR] & UART_MR_PAR)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
51
],
[
53... |
24,096 | eth_read(void *opaque, target_phys_addr_t addr, unsigned int size)
{
struct fs_eth *eth = opaque;
uint32_t r = 0;
addr >>= 2;
switch (addr) {
case R_STAT:
r = eth->mdio_bus.mdio & 1;
break;
default:
r = eth->regs[addr];
D(printf ("%s %x\n", __func__, addr * 4));
break;
}
return r;... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | eth_read(void *opaque, target_phys_addr_t addr, unsigned int size)
{
struct fs_eth *eth = opaque;
uint32_t r = 0;
addr >>= 2;
switch (addr) {
case R_STAT:
r = eth->mdio_bus.mdio & 1;
break;
default:
r = eth->regs[addr];
D(printf ("%s %x\n", __func__, addr * 4));
break;
}
return r;... | {
"code": [],
"line_no": []
} | FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, unsigned int VAR_2)
{
struct fs_eth *VAR_3 = VAR_0;
uint32_t r = 0;
VAR_1 >>= 2;
switch (VAR_1) {
case R_STAT:
r = VAR_3->mdio_bus.mdio & 1;
break;
default:
r = VAR_3->regs[VAR_1];
D(printf ("%s %x\n", __func__, VAR_1 * 4));
break;
}
r... | [
"FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, unsigned int VAR_2)\n{",
"struct fs_eth *VAR_3 = VAR_0;",
"uint32_t r = 0;",
"VAR_1 >>= 2;",
"switch (VAR_1) {",
"case R_STAT:\nr = VAR_3->mdio_bus.mdio & 1;",
"break;",
"default:\nr = VAR_3->regs[VAR_1];",
"D(printf (\"%s %x\\n\", __func__, VAR_1 * 4))... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
24,097 | int vnc_display_open(DisplayState *ds, const char *display)
{
VncState *vs = ds ? (VncState *)ds->opaque : vnc_state;
const char *options;
int password = 0;
int reverse = 0;
int to_port = 0;
#ifdef CONFIG_VNC_TLS
int tls = 0, x509 = 0;
#endif
vnc_display_close(ds);
if (strcm... | false | qemu | be3512610bdeebfaa40c63ae15d19d9fae991e1b | int vnc_display_open(DisplayState *ds, const char *display)
{
VncState *vs = ds ? (VncState *)ds->opaque : vnc_state;
const char *options;
int password = 0;
int reverse = 0;
int to_port = 0;
#ifdef CONFIG_VNC_TLS
int tls = 0, x509 = 0;
#endif
vnc_display_close(ds);
if (strcm... | {
"code": [],
"line_no": []
} | int FUNC_0(DisplayState *VAR_0, const char *VAR_1)
{
VncState *vs = VAR_0 ? (VncState *)VAR_0->opaque : vnc_state;
const char *VAR_2;
int VAR_3 = 0;
int VAR_4 = 0;
int VAR_5 = 0;
#ifdef CONFIG_VNC_TLS
int tls = 0, x509 = 0;
#endif
vnc_display_close(VAR_0);
if (strcmp(VAR_1, ... | [
"int FUNC_0(DisplayState *VAR_0, const char *VAR_1)\n{",
"VncState *vs = VAR_0 ? (VncState *)VAR_0->opaque : vnc_state;",
"const char *VAR_2;",
"int VAR_3 = 0;",
"int VAR_4 = 0;",
"int VAR_5 = 0;",
"#ifdef CONFIG_VNC_TLS\nint tls = 0, x509 = 0;",
"#endif\nvnc_display_close(VAR_0);",
"if (strcmp(VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15,
17
],
[
19,
23
],
[
25,
27
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
24,098 | static void nabm_writeb (void *opaque, uint32_t addr, uint32_t val)
{
PCIAC97LinkState *d = opaque;
AC97LinkState *s = &d->ac97;
AC97BusMasterRegs *r = NULL;
uint32_t index = addr - s->base[1];
switch (index) {
case PI_LVI:
case PO_LVI:
case MC_LVI:
r = &s->bm_regs[GET_... | false | qemu | 10ee2aaa417d8d8978cdb2bbed55ebb152df5f6b | static void nabm_writeb (void *opaque, uint32_t addr, uint32_t val)
{
PCIAC97LinkState *d = opaque;
AC97LinkState *s = &d->ac97;
AC97BusMasterRegs *r = NULL;
uint32_t index = addr - s->base[1];
switch (index) {
case PI_LVI:
case PO_LVI:
case MC_LVI:
r = &s->bm_regs[GET_... | {
"code": [],
"line_no": []
} | static void FUNC_0 (void *VAR_0, uint32_t VAR_1, uint32_t VAR_2)
{
PCIAC97LinkState *d = VAR_0;
AC97LinkState *s = &d->ac97;
AC97BusMasterRegs *r = NULL;
uint32_t index = VAR_1 - s->base[1];
switch (index) {
case PI_LVI:
case PO_LVI:
case MC_LVI:
r = &s->bm_regs[GET_BM ... | [
"static void FUNC_0 (void *VAR_0, uint32_t VAR_1, uint32_t VAR_2)\n{",
"PCIAC97LinkState *d = VAR_0;",
"AC97LinkState *s = &d->ac97;",
"AC97BusMasterRegs *r = NULL;",
"uint32_t index = VAR_1 - s->base[1];",
"switch (index) {",
"case PI_LVI:\ncase PO_LVI:\ncase MC_LVI:\nr = &s->bm_regs[GET_BM (index)];",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15,
17,
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43,
45,
47
... |
24,099 | void helper_xssubqp(CPUPPCState *env, uint32_t opcode)
{
ppc_vsr_t xt, xa, xb;
float_status tstat;
getVSR(rA(opcode) + 32, &xa, env);
getVSR(rB(opcode) + 32, &xb, env);
getVSR(rD(opcode) + 32, &xt, env);
helper_reset_fpstatus(env);
if (unlikely(Rc(opcode) != 0)) {
/* TOD... | false | qemu | a8d411abac9347aadeac87687b8a3c9895ea0fd7 | void helper_xssubqp(CPUPPCState *env, uint32_t opcode)
{
ppc_vsr_t xt, xa, xb;
float_status tstat;
getVSR(rA(opcode) + 32, &xa, env);
getVSR(rB(opcode) + 32, &xb, env);
getVSR(rD(opcode) + 32, &xt, env);
helper_reset_fpstatus(env);
if (unlikely(Rc(opcode) != 0)) {
... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUPPCState *VAR_0, uint32_t VAR_1)
{
ppc_vsr_t xt, xa, xb;
float_status tstat;
getVSR(rA(VAR_1) + 32, &xa, VAR_0);
getVSR(rB(VAR_1) + 32, &xb, VAR_0);
getVSR(rD(VAR_1) + 32, &xt, VAR_0);
helper_reset_fpstatus(VAR_0);
if (unlikely(Rc(VAR_1) != 0)) {
... | [
"void FUNC_0(CPUPPCState *VAR_0, uint32_t VAR_1)\n{",
"ppc_vsr_t xt, xa, xb;",
"float_status tstat;",
"getVSR(rA(VAR_1) + 32, &xa, VAR_0);",
"getVSR(rB(VAR_1) + 32, &xb, VAR_0);",
"getVSR(rD(VAR_1) + 32, &xt, VAR_0);",
"helper_reset_fpstatus(VAR_0);",
"if (unlikely(Rc(VAR_1) != 0)) {",
"abort();",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51... |
24,101 | void acpi_pm1_cnt_init(ACPIREGS *ar, MemoryRegion *parent)
{
ar->wakeup.notify = acpi_notify_wakeup;
qemu_register_wakeup_notifier(&ar->wakeup);
memory_region_init_io(&ar->pm1.cnt.io, &acpi_pm_cnt_ops, ar, "acpi-cnt", 2);
memory_region_add_subregion(parent, 4, &ar->pm1.cnt.io);
}
| false | qemu | 560e63965232e37d1916a447125cf91c18a96930 | void acpi_pm1_cnt_init(ACPIREGS *ar, MemoryRegion *parent)
{
ar->wakeup.notify = acpi_notify_wakeup;
qemu_register_wakeup_notifier(&ar->wakeup);
memory_region_init_io(&ar->pm1.cnt.io, &acpi_pm_cnt_ops, ar, "acpi-cnt", 2);
memory_region_add_subregion(parent, 4, &ar->pm1.cnt.io);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(ACPIREGS *VAR_0, MemoryRegion *VAR_1)
{
VAR_0->wakeup.notify = acpi_notify_wakeup;
qemu_register_wakeup_notifier(&VAR_0->wakeup);
memory_region_init_io(&VAR_0->pm1.cnt.io, &acpi_pm_cnt_ops, VAR_0, "acpi-cnt", 2);
memory_region_add_subregion(VAR_1, 4, &VAR_0->pm1.cnt.io);
}
| [
"void FUNC_0(ACPIREGS *VAR_0, MemoryRegion *VAR_1)\n{",
"VAR_0->wakeup.notify = acpi_notify_wakeup;",
"qemu_register_wakeup_notifier(&VAR_0->wakeup);",
"memory_region_init_io(&VAR_0->pm1.cnt.io, &acpi_pm_cnt_ops, VAR_0, \"acpi-cnt\", 2);",
"memory_region_add_subregion(VAR_1, 4, &VAR_0->pm1.cnt.io);",
"}"
... | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
24,102 | static void vfio_probe_nvidia_bar0_quirk(VFIOPCIDevice *vdev, int nr)
{
VFIOQuirk *quirk;
VFIOConfigMirrorQuirk *mirror;
if (!vfio_pci_is(vdev, PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID) ||
!vfio_is_vga(vdev) || nr != 0) {
return;
}
quirk = g_malloc0(sizeof(*quirk));
mirror =... | false | qemu | f5793fd9e1fd89808f4adbfe690235b094176a37 | static void vfio_probe_nvidia_bar0_quirk(VFIOPCIDevice *vdev, int nr)
{
VFIOQuirk *quirk;
VFIOConfigMirrorQuirk *mirror;
if (!vfio_pci_is(vdev, PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID) ||
!vfio_is_vga(vdev) || nr != 0) {
return;
}
quirk = g_malloc0(sizeof(*quirk));
mirror =... | {
"code": [],
"line_no": []
} | static void FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1)
{
VFIOQuirk *quirk;
VFIOConfigMirrorQuirk *mirror;
if (!vfio_pci_is(VAR_0, PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID) ||
!vfio_is_vga(VAR_0) || VAR_1 != 0) {
return;
}
quirk = g_malloc0(sizeof(*quirk));
mirror = quirk->data ... | [
"static void FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1)\n{",
"VFIOQuirk *quirk;",
"VFIOConfigMirrorQuirk *mirror;",
"if (!vfio_pci_is(VAR_0, PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID) ||\n!vfio_is_vga(VAR_0) || VAR_1 != 0) {",
"return;",
"}",
"quirk = g_malloc0(sizeof(*quirk));",
"mirror = quirk->data = g_malloc0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39,
41,
43
],
[
45,
47
],
[
51
],
[
57
],
... |
24,104 | static int mkv_write_tag_targets(AVFormatContext *s,
unsigned int elementid, unsigned int uid,
ebml_master *tags, ebml_master* tag)
{
AVIOContext *pb;
MatroskaMuxContext *mkv = s->priv_data;
ebml_master targets;
int ret;
if ... | false | FFmpeg | eabbc64728c2fdb74f565aededec2ab023d20699 | static int mkv_write_tag_targets(AVFormatContext *s,
unsigned int elementid, unsigned int uid,
ebml_master *tags, ebml_master* tag)
{
AVIOContext *pb;
MatroskaMuxContext *mkv = s->priv_data;
ebml_master targets;
int ret;
if ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
unsigned int VAR_1, unsigned int VAR_2,
ebml_master *VAR_3, ebml_master* VAR_4)
{
AVIOContext *pb;
MatroskaMuxContext *mkv = VAR_0->priv_data;
ebml_master targets;
int VAR_5;
if (!VA... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nunsigned int VAR_1, unsigned int VAR_2,\nebml_master *VAR_3, ebml_master* VAR_4)\n{",
"AVIOContext *pb;",
"MatroskaMuxContext *mkv = VAR_0->priv_data;",
"ebml_master targets;",
"int VAR_5;",
"if (!VAR_3->pos) {",
"VAR_5 = mkv_add_seekhead_entry(mkv->main_seekh... | [
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
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
]
] |
24,105 | static int v9fs_synth_symlink(FsContext *fs_ctx, const char *oldpath,
V9fsPath *newpath, const char *buf, FsCred *credp)
{
errno = EPERM;
return -1;
}
| false | qemu | 364031f17932814484657e5551ba12957d993d7e | static int v9fs_synth_symlink(FsContext *fs_ctx, const char *oldpath,
V9fsPath *newpath, const char *buf, FsCred *credp)
{
errno = EPERM;
return -1;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, const char *VAR_1,
V9fsPath *VAR_2, const char *VAR_3, FsCred *VAR_4)
{
errno = EPERM;
return -1;
}
| [
"static int FUNC_0(FsContext *VAR_0, const char *VAR_1,\nV9fsPath *VAR_2, const char *VAR_3, FsCred *VAR_4)\n{",
"errno = EPERM;",
"return -1;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
]
] |
24,106 | static uint32_t virtio_ioport_read(void *opaque, uint32_t addr)
{
VirtIODevice *vdev = to_virtio_device(opaque);
uint32_t ret = 0xFFFFFFFF;
addr -= vdev->addr;
switch (addr) {
case VIRTIO_PCI_HOST_FEATURES:
ret = vdev->get_features(vdev);
ret |= (1 << VIRTIO_F_NOTIFY_ON_E... | false | qemu | 8eca6b1bc770982595db2f7207c65051572436cb | static uint32_t virtio_ioport_read(void *opaque, uint32_t addr)
{
VirtIODevice *vdev = to_virtio_device(opaque);
uint32_t ret = 0xFFFFFFFF;
addr -= vdev->addr;
switch (addr) {
case VIRTIO_PCI_HOST_FEATURES:
ret = vdev->get_features(vdev);
ret |= (1 << VIRTIO_F_NOTIFY_ON_E... | {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(void *opaque, uint32_t addr)
{
VirtIODevice *vdev = to_virtio_device(opaque);
uint32_t ret = 0xFFFFFFFF;
addr -= vdev->addr;
switch (addr) {
case VIRTIO_PCI_HOST_FEATURES:
ret = vdev->get_features(vdev);
ret |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY);
... | [
"static uint32_t FUNC_0(void *opaque, uint32_t addr)\n{",
"VirtIODevice *vdev = to_virtio_device(opaque);",
"uint32_t ret = 0xFFFFFFFF;",
"addr -= vdev->addr;",
"switch (addr) {",
"case VIRTIO_PCI_HOST_FEATURES:\nret = vdev->get_features(vdev);",
"ret |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY);",
"break;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31,
33
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47
],
[
49,
51... |
24,107 | static void sb16_realizefn (DeviceState *dev, Error **errp)
{
ISADevice *isadev = ISA_DEVICE (dev);
SB16State *s = SB16 (dev);
IsaDmaClass *k;
isa_init_irq (isadev, &s->pic, s->irq);
s->mixer_regs[0x80] = magic_of_irq (s->irq);
s->mixer_regs[0x81] = (1 << s->dma) | (1 << s->hdma);
... | true | qemu | e305a16510afa74eec20390479e349402e55ef4c | static void sb16_realizefn (DeviceState *dev, Error **errp)
{
ISADevice *isadev = ISA_DEVICE (dev);
SB16State *s = SB16 (dev);
IsaDmaClass *k;
isa_init_irq (isadev, &s->pic, s->irq);
s->mixer_regs[0x80] = magic_of_irq (s->irq);
s->mixer_regs[0x81] = (1 << s->dma) | (1 << s->hdma);
... | {
"code": [
" isa_register_portio_list (isadev, s->port, sb16_ioport_list, s, \"sb16\");"
],
"line_no": [
43
]
} | static void FUNC_0 (DeviceState *VAR_0, Error **VAR_1)
{
ISADevice *isadev = ISA_DEVICE (VAR_0);
SB16State *s = SB16 (VAR_0);
IsaDmaClass *k;
isa_init_irq (isadev, &s->pic, s->irq);
s->mixer_regs[0x80] = magic_of_irq (s->irq);
s->mixer_regs[0x81] = (1 << s->dma) | (1 << s->hdma);
... | [
"static void FUNC_0 (DeviceState *VAR_0, Error **VAR_1)\n{",
"ISADevice *isadev = ISA_DEVICE (VAR_0);",
"SB16State *s = SB16 (VAR_0);",
"IsaDmaClass *k;",
"isa_init_irq (isadev, &s->pic, s->irq);",
"s->mixer_regs[0x80] = magic_of_irq (s->irq);",
"s->mixer_regs[0x81] = (1 << s->dma) | (1 << s->hdma);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
],
[
51
],
[
55
... |
24,108 | static int slavio_misc_init1(SysBusDevice *sbd)
{
DeviceState *dev = DEVICE(sbd);
MiscState *s = SLAVIO_MISC(dev);
sysbus_init_irq(sbd, &s->irq);
sysbus_init_irq(sbd, &s->fdc_tc);
/* 8 bit registers */
/* Slavio control */
memory_region_init_io(&s->cfg_iomem, OBJECT(s), &slavio_c... | true | qemu | 0e1cd6576c55269b6e5251dc739a7fc819f9b4a6 | static int slavio_misc_init1(SysBusDevice *sbd)
{
DeviceState *dev = DEVICE(sbd);
MiscState *s = SLAVIO_MISC(dev);
sysbus_init_irq(sbd, &s->irq);
sysbus_init_irq(sbd, &s->fdc_tc);
memory_region_init_io(&s->cfg_iomem, OBJECT(s), &slavio_cfg_mem_ops, s,
... | {
"code": [
" \"leds\", MISC_SIZE);",
" \"system-control\", MISC_SIZE);"
],
"line_no": [
55,
67
]
} | static int FUNC_0(SysBusDevice *VAR_0)
{
DeviceState *dev = DEVICE(VAR_0);
MiscState *s = SLAVIO_MISC(dev);
sysbus_init_irq(VAR_0, &s->irq);
sysbus_init_irq(VAR_0, &s->fdc_tc);
memory_region_init_io(&s->cfg_iomem, OBJECT(s), &slavio_cfg_mem_ops, s,
"c... | [
"static int FUNC_0(SysBusDevice *VAR_0)\n{",
"DeviceState *dev = DEVICE(VAR_0);",
"MiscState *s = SLAVIO_MISC(dev);",
"sysbus_init_irq(VAR_0, &s->irq);",
"sysbus_init_irq(VAR_0, &s->fdc_tc);",
"memory_region_init_io(&s->cfg_iomem, OBJECT(s), &slavio_cfg_mem_ops, s,\n\"configuration\", MISC_SIZE);",
"sys... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
21,
23
],
[
25
],
[
31,
33
],
[
35
],
[
41,
43
],
[
45
],
[
53,
55
],
[
57
],
[
65,
67
],
[
69
],
[
75,
77
],
[
79... |
24,109 | static QIOChannelSocket *nbd_establish_connection(SocketAddress *saddr,
Error **errp)
{
QIOChannelSocket *sioc;
Error *local_err = NULL;
sioc = qio_channel_socket_new();
qio_channel_set_name(QIO_CHANNEL(sioc), "nbd-client");
qio_channel_so... | true | qemu | cc1e13913916f755fd2dc5041b8d4bf25d3ea88e | static QIOChannelSocket *nbd_establish_connection(SocketAddress *saddr,
Error **errp)
{
QIOChannelSocket *sioc;
Error *local_err = NULL;
sioc = qio_channel_socket_new();
qio_channel_set_name(QIO_CHANNEL(sioc), "nbd-client");
qio_channel_so... | {
"code": [],
"line_no": []
} | static QIOChannelSocket *FUNC_0(SocketAddress *saddr,
Error **errp)
{
QIOChannelSocket *sioc;
Error *local_err = NULL;
sioc = qio_channel_socket_new();
qio_channel_set_name(QIO_CHANNEL(sioc), "nbd-client");
qio_channel_socket_connect_sync(... | [
"static QIOChannelSocket *FUNC_0(SocketAddress *saddr,\nError **errp)\n{",
"QIOChannelSocket *sioc;",
"Error *local_err = NULL;",
"sioc = qio_channel_socket_new();",
"qio_channel_set_name(QIO_CHANNEL(sioc), \"nbd-client\");",
"qio_channel_socket_connect_sync(sioc,\nsaddr,\n&local_err);",
"if (local_err)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19,
21,
23
],
[
25
],
[
28
],
[
30
],
[
32
],
[
36
],
[
40
],
[
42
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.