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 |
|---|---|---|---|---|---|---|---|---|---|---|
16,317 | static void test_qemu_strtoull_correct(void)
{
const char *str = "12345 foo";
char f = 'X';
const char *endptr = &f;
uint64_t res = 999;
int err;
err = qemu_strtoull(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, 12345);
g_assert(endptr ==... | false | qemu | bc7c08a2c375acb7ae4d433054415588b176d34c | static void test_qemu_strtoull_correct(void)
{
const char *str = "12345 foo";
char f = 'X';
const char *endptr = &f;
uint64_t res = 999;
int err;
err = qemu_strtoull(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, 12345);
g_assert(endptr ==... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
const char *VAR_0 = "12345 foo";
char VAR_1 = 'X';
const char *VAR_2 = &VAR_1;
uint64_t res = 999;
int VAR_3;
VAR_3 = qemu_strtoull(VAR_0, &VAR_2, 0, &res);
g_assert_cmpint(VAR_3, ==, 0);
g_assert_cmpint(res, ==, 12345);
g_assert(VAR_2 == VAR_... | [
"static void FUNC_0(void)\n{",
"const char *VAR_0 = \"12345 foo\";",
"char VAR_1 = 'X';",
"const char *VAR_2 = &VAR_1;",
"uint64_t res = 999;",
"int VAR_3;",
"VAR_3 = qemu_strtoull(VAR_0, &VAR_2, 0, &res);",
"g_assert_cmpint(VAR_3, ==, 0);",
"g_assert_cmpint(res, ==, 12345);",
"g_assert(VAR_2 == V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
16,320 | static void test_visitor_in_enum(TestInputVisitorData *data,
const void *unused)
{
Error *err = NULL;
Visitor *v;
EnumOne i;
for (i = 0; EnumOne_lookup[i]; i++) {
EnumOne res = -1;
v = visitor_input_test_init(data, "%s", EnumOne_lookup[i]);
... | false | qemu | 3f66f764ee25f10d3e1144ebc057a949421b7728 | static void test_visitor_in_enum(TestInputVisitorData *data,
const void *unused)
{
Error *err = NULL;
Visitor *v;
EnumOne i;
for (i = 0; EnumOne_lookup[i]; i++) {
EnumOne res = -1;
v = visitor_input_test_init(data, "%s", EnumOne_lookup[i]);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(TestInputVisitorData *VAR_0,
const void *VAR_1)
{
Error *err = NULL;
Visitor *v;
EnumOne i;
for (i = 0; EnumOne_lookup[i]; i++) {
EnumOne res = -1;
v = visitor_input_test_init(VAR_0, "%s", EnumOne_lookup[i]);
visi... | [
"static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"Error *err = NULL;",
"Visitor *v;",
"EnumOne i;",
"for (i = 0; EnumOne_lookup[i]; i++) {",
"EnumOne res = -1;",
"v = visitor_input_test_init(VAR_0, \"%s\", EnumOne_lookup[i]);",
"visit_type_EnumOne(v, &res, NULL, &err);",
"g_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
16,321 | static void v9fs_lock(void *opaque)
{
int8_t status;
V9fsFlock *flock;
size_t offset = 7;
struct stat stbuf;
V9fsFidState *fidp;
int32_t fid, err = 0;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
flock = g_malloc(sizeof(*flock));
pdu_unmarshal(pdu, offset, "dbdqqds"... | false | qemu | ddca7f86ac022289840e0200fd4050b2b58e9176 | static void v9fs_lock(void *opaque)
{
int8_t status;
V9fsFlock *flock;
size_t offset = 7;
struct stat stbuf;
V9fsFidState *fidp;
int32_t fid, err = 0;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
flock = g_malloc(sizeof(*flock));
pdu_unmarshal(pdu, offset, "dbdqqds"... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
int8_t status;
V9fsFlock *flock;
size_t offset = 7;
struct stat VAR_1;
V9fsFidState *fidp;
int32_t fid, err = 0;
V9fsPDU *pdu = VAR_0;
V9fsState *s = pdu->s;
flock = g_malloc(sizeof(*flock));
pdu_unmarshal(pdu, offset, "dbdqqds", &fi... | [
"static void FUNC_0(void *VAR_0)\n{",
"int8_t status;",
"V9fsFlock *flock;",
"size_t offset = 7;",
"struct stat VAR_1;",
"V9fsFidState *fidp;",
"int32_t fid, err = 0;",
"V9fsPDU *pdu = VAR_0;",
"V9fsState *s = pdu->s;",
"flock = g_malloc(sizeof(*flock));",
"pdu_unmarshal(pdu, offset, \"dbdqqds\"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27,
29
],
[
33,
35
],
[
39
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[... |
16,322 | int ff_intrax8_decode_picture(IntraX8Context *const w, int dquant,
int quant_offset)
{
MpegEncContext *const s = w->s;
int mb_xy;
assert(s);
w->use_quant_matrix = get_bits1(&s->gb);
w->dquant = dquant;
w->quant = dquant >> 1;
w->qsum = quant_offset... | false | FFmpeg | 577393321c389ad2973bec6168a8045c94a9e099 | int ff_intrax8_decode_picture(IntraX8Context *const w, int dquant,
int quant_offset)
{
MpegEncContext *const s = w->s;
int mb_xy;
assert(s);
w->use_quant_matrix = get_bits1(&s->gb);
w->dquant = dquant;
w->quant = dquant >> 1;
w->qsum = quant_offset... | {
"code": [],
"line_no": []
} | int FUNC_0(IntraX8Context *const VAR_0, int VAR_1,
int VAR_2)
{
MpegEncContext *const s = VAR_0->s;
int VAR_3;
assert(s);
VAR_0->use_quant_matrix = get_bits1(&s->gb);
VAR_0->VAR_1 = VAR_1;
VAR_0->quant = VAR_1 >> 1;
VAR_0->qsum = VAR_2;
VAR_... | [
"int FUNC_0(IntraX8Context *const VAR_0, int VAR_1,\nint VAR_2)\n{",
"MpegEncContext *const s = VAR_0->s;",
"int VAR_3;",
"assert(s);",
"VAR_0->use_quant_matrix = get_bits1(&s->gb);",
"VAR_0->VAR_1 = VAR_1;",
"VAR_0->quant = VAR_1 >> 1;",
"VAR_0->qsum = VAR_2;",
"VAR_0->divide_quant_dc_luma = ((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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[... |
16,323 | void commit_start(BlockDriverState *bs, BlockDriverState *base,
BlockDriverState *top, int64_t speed,
BlockdevOnError on_error, BlockDriverCompletionFunc *cb,
void *opaque, Error **errp)
{
CommitBlockJob *s;
BlockReopenQueue *reopen_queue = NULL;
... | false | qemu | 18da7f94cdce130f2a71387de4980ffa817181a1 | void commit_start(BlockDriverState *bs, BlockDriverState *base,
BlockDriverState *top, int64_t speed,
BlockdevOnError on_error, BlockDriverCompletionFunc *cb,
void *opaque, Error **errp)
{
CommitBlockJob *s;
BlockReopenQueue *reopen_queue = NULL;
... | {
"code": [],
"line_no": []
} | void FUNC_0(BlockDriverState *VAR_0, BlockDriverState *VAR_1,
BlockDriverState *VAR_2, int64_t VAR_3,
BlockdevOnError VAR_4, BlockDriverCompletionFunc *VAR_5,
void *VAR_6, Error **VAR_7)
{
CommitBlockJob *s;
BlockReopenQueue *reopen_queue = NULL;
... | [
"void FUNC_0(BlockDriverState *VAR_0, BlockDriverState *VAR_1,\nBlockDriverState *VAR_2, int64_t VAR_3,\nBlockdevOnError VAR_4, BlockDriverCompletionFunc *VAR_5,\nvoid *VAR_6, Error **VAR_7)\n{",
"CommitBlockJob *s;",
"BlockReopenQueue *reopen_queue = NULL;",
"int VAR_8;",
"int VAR_9;",
"BlockDriverState ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
53
],
[
55
... |
16,324 | static void blizzard_screen_dump(void *opaque, const char *filename,
bool cswitch, Error **errp)
{
BlizzardState *s = (BlizzardState *) opaque;
DisplaySurface *surface = qemu_console_surface(s->con);
blizzard_update_display(opaque);
if (s && surface_data(surface)... | false | qemu | 2c62f08ddbf3fa80dc7202eb9a2ea60ae44e2cc5 | static void blizzard_screen_dump(void *opaque, const char *filename,
bool cswitch, Error **errp)
{
BlizzardState *s = (BlizzardState *) opaque;
DisplaySurface *surface = qemu_console_surface(s->con);
blizzard_update_display(opaque);
if (s && surface_data(surface)... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, const char *VAR_1,
bool VAR_2, Error **VAR_3)
{
BlizzardState *s = (BlizzardState *) VAR_0;
DisplaySurface *surface = qemu_console_surface(s->con);
blizzard_update_display(VAR_0);
if (s && surface_data(surface)) {
ppm_save... | [
"static void FUNC_0(void *VAR_0, const char *VAR_1,\nbool VAR_2, Error **VAR_3)\n{",
"BlizzardState *s = (BlizzardState *) VAR_0;",
"DisplaySurface *surface = qemu_console_surface(s->con);",
"blizzard_update_display(VAR_0);",
"if (s && surface_data(surface)) {",
"ppm_save(VAR_1, surface, VAR_3);",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
16,325 | static void lan9118_writew(void *opaque, target_phys_addr_t offset,
uint32_t val)
{
lan9118_state *s = (lan9118_state *)opaque;
offset &= 0xff;
if (s->write_word_prev_offset != (offset & ~0x3)) {
/* New offset, reset word counter */
s->write_word_n = 0;
... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void lan9118_writew(void *opaque, target_phys_addr_t offset,
uint32_t val)
{
lan9118_state *s = (lan9118_state *)opaque;
offset &= 0xff;
if (s->write_word_prev_offset != (offset & ~0x3)) {
s->write_word_n = 0;
s->write_word_prev_offset = o... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint32_t VAR_2)
{
lan9118_state *s = (lan9118_state *)VAR_0;
VAR_1 &= 0xff;
if (s->write_word_prev_offset != (VAR_1 & ~0x3)) {
s->write_word_n = 0;
s->write_word_prev_offset = VAR_1 & ~0x3... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint32_t VAR_2)\n{",
"lan9118_state *s = (lan9118_state *)VAR_0;",
"VAR_1 &= 0xff;",
"if (s->write_word_prev_offset != (VAR_1 & ~0x3)) {",
"s->write_word_n = 0;",
"s->write_word_prev_offset = VAR_1 & ~0x3;",
"}",
"if (VAR_1 & 0x2) {",
"s->w... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
]
] |
16,326 | int float32_eq( float32 a, float32 b STATUS_PARAM )
{
if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) )
|| ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) )
) {
if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) {
... | false | qemu | f090c9d4ad5812fb92843d6470a1111c15190c4c | int float32_eq( float32 a, float32 b STATUS_PARAM )
{
if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) )
|| ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) )
) {
if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) {
... | {
"code": [],
"line_no": []
} | int FUNC_0( float32 VAR_0, float32 VAR_1 STATUS_PARAM )
{
if ( ( ( extractFloat32Exp( VAR_0 ) == 0xFF ) && extractFloat32Frac( VAR_0 ) )
|| ( ( extractFloat32Exp( VAR_1 ) == 0xFF ) && extractFloat32Frac( VAR_1 ) )
) {
if ( float32_is_signaling_nan( VAR_0 ) || float32_is_signaling_n... | [
"int FUNC_0( float32 VAR_0, float32 VAR_1 STATUS_PARAM )\n{",
"if ( ( ( extractFloat32Exp( VAR_0 ) == 0xFF ) && extractFloat32Frac( VAR_0 ) )\n|| ( ( extractFloat32Exp( VAR_1 ) == 0xFF ) && extractFloat32Frac( VAR_1 ) )\n) {",
"if ( float32_is_signaling_nan( VAR_0 ) || float32_is_signaling_nan( VAR_1 ) ) {",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
]
] |
16,327 | int chsc_sei_nt2_get_event(void *res)
{
ChscSeiNt2Res *nt2_res = (ChscSeiNt2Res *)res;
PciCcdfAvail *accdf;
PciCcdfErr *eccdf;
int rc = 1;
SeiContainer *sei_cont;
S390pciState *s = S390_PCI_HOST_BRIDGE(
object_resolve_path(TYPE_S390_PCI_HOST_BRIDGE, NULL));
if (!s) {
... | false | qemu | e7d336959b7c01699702dcda4b54a822972d74a8 | int chsc_sei_nt2_get_event(void *res)
{
ChscSeiNt2Res *nt2_res = (ChscSeiNt2Res *)res;
PciCcdfAvail *accdf;
PciCcdfErr *eccdf;
int rc = 1;
SeiContainer *sei_cont;
S390pciState *s = S390_PCI_HOST_BRIDGE(
object_resolve_path(TYPE_S390_PCI_HOST_BRIDGE, NULL));
if (!s) {
... | {
"code": [],
"line_no": []
} | int FUNC_0(void *VAR_0)
{
ChscSeiNt2Res *nt2_res = (ChscSeiNt2Res *)VAR_0;
PciCcdfAvail *accdf;
PciCcdfErr *eccdf;
int VAR_1 = 1;
SeiContainer *sei_cont;
S390pciState *s = S390_PCI_HOST_BRIDGE(
object_resolve_path(TYPE_S390_PCI_HOST_BRIDGE, NULL));
if (!s) {
retur... | [
"int FUNC_0(void *VAR_0)\n{",
"ChscSeiNt2Res *nt2_res = (ChscSeiNt2Res *)VAR_0;",
"PciCcdfAvail *accdf;",
"PciCcdfErr *eccdf;",
"int VAR_1 = 1;",
"SeiContainer *sei_cont;",
"S390pciState *s = S390_PCI_HOST_BRIDGE(\nobject_resolve_path(TYPE_S390_PCI_HOST_BRIDGE, NULL));",
"if (!s) {",
"return VAR_1;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
... |
16,328 | static void icount_adjust_rt(void *opaque)
{
timer_mod(icount_rt_timer,
qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_RT) + 1000);
icount_adjust();
}
| false | qemu | b39e3f34c9de7ead6a11a74aa2de78baf41d81a7 | static void icount_adjust_rt(void *opaque)
{
timer_mod(icount_rt_timer,
qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_RT) + 1000);
icount_adjust();
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
timer_mod(icount_rt_timer,
qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_RT) + 1000);
icount_adjust();
}
| [
"static void FUNC_0(void *VAR_0)\n{",
"timer_mod(icount_rt_timer,\nqemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_RT) + 1000);",
"icount_adjust();",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
]
] |
16,329 | static inline int tcg_target_const_match(tcg_target_long val,
const TCGArgConstraint *arg_ct)
{
int ct;
ct = arg_ct->ct;
if (ct & TCG_CT_CONST)
return 1;
else if ((ct & TCG_CT_CONST_S11) && ABS(val) == (ABS(val) & 0x3ff))
return 1;
... | false | qemu | f02ca5cbeaf86038834c1953247a1579d7921927 | static inline int tcg_target_const_match(tcg_target_long val,
const TCGArgConstraint *arg_ct)
{
int ct;
ct = arg_ct->ct;
if (ct & TCG_CT_CONST)
return 1;
else if ((ct & TCG_CT_CONST_S11) && ABS(val) == (ABS(val) & 0x3ff))
return 1;
... | {
"code": [],
"line_no": []
} | static inline int FUNC_0(tcg_target_long VAR_0,
const TCGArgConstraint *VAR_1)
{
int VAR_2;
VAR_2 = VAR_1->VAR_2;
if (VAR_2 & TCG_CT_CONST)
return 1;
else if ((VAR_2 & TCG_CT_CONST_S11) && ABS(VAR_0) == (ABS(VAR_0) & 0x3ff))
return 1;
... | [
"static inline int FUNC_0(tcg_target_long VAR_0,\nconst TCGArgConstraint *VAR_1)\n{",
"int VAR_2;",
"VAR_2 = VAR_1->VAR_2;",
"if (VAR_2 & TCG_CT_CONST)\nreturn 1;",
"else if ((VAR_2 & TCG_CT_CONST_S11) && ABS(VAR_0) == (ABS(VAR_0) & 0x3ff))\nreturn 1;",
"else if ((VAR_2 & TCG_CT_CONST_S13) && ABS(VAR_0) =... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13,
15
],
[
17,
19
],
[
21,
23
],
[
25,
27
],
[
29
]
] |
16,330 | static void iscsi_close(BlockDriverState *bs)
{
IscsiLun *iscsilun = bs->opaque;
struct iscsi_context *iscsi = iscsilun->iscsi;
iscsi_detach_aio_context(bs);
if (iscsi_is_logged_in(iscsi)) {
iscsi_logout_sync(iscsi);
}
iscsi_destroy_context(iscsi);
g_free(iscsilun->zeroblo... | false | qemu | e1123a3b40a1a9a625a29c8ed4debb7e206ea690 | static void iscsi_close(BlockDriverState *bs)
{
IscsiLun *iscsilun = bs->opaque;
struct iscsi_context *iscsi = iscsilun->iscsi;
iscsi_detach_aio_context(bs);
if (iscsi_is_logged_in(iscsi)) {
iscsi_logout_sync(iscsi);
}
iscsi_destroy_context(iscsi);
g_free(iscsilun->zeroblo... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0)
{
IscsiLun *iscsilun = VAR_0->opaque;
struct iscsi_context *VAR_1 = iscsilun->VAR_1;
iscsi_detach_aio_context(VAR_0);
if (iscsi_is_logged_in(VAR_1)) {
iscsi_logout_sync(VAR_1);
}
iscsi_destroy_context(VAR_1);
g_free(iscsilun->zer... | [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"IscsiLun *iscsilun = VAR_0->opaque;",
"struct iscsi_context *VAR_1 = iscsilun->VAR_1;",
"iscsi_detach_aio_context(VAR_0);",
"if (iscsi_is_logged_in(VAR_1)) {",
"iscsi_logout_sync(VAR_1);",
"}",
"iscsi_destroy_context(VAR_1);",
"g_free(iscsilun->zero... | [
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
]
] |
16,331 | void i2c_register_slave(I2CSlaveInfo *info)
{
assert(info->qdev.size >= sizeof(i2c_slave));
info->qdev.init = i2c_slave_qdev_init;
info->qdev.bus_type = BUS_TYPE_I2C;
qdev_register(&info->qdev);
}
| false | qemu | 10c4c98ab7dc18169b37b76f6ea5e60ebe65222b | void i2c_register_slave(I2CSlaveInfo *info)
{
assert(info->qdev.size >= sizeof(i2c_slave));
info->qdev.init = i2c_slave_qdev_init;
info->qdev.bus_type = BUS_TYPE_I2C;
qdev_register(&info->qdev);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(I2CSlaveInfo *VAR_0)
{
assert(VAR_0->qdev.size >= sizeof(i2c_slave));
VAR_0->qdev.init = i2c_slave_qdev_init;
VAR_0->qdev.bus_type = BUS_TYPE_I2C;
qdev_register(&VAR_0->qdev);
}
| [
"void FUNC_0(I2CSlaveInfo *VAR_0)\n{",
"assert(VAR_0->qdev.size >= sizeof(i2c_slave));",
"VAR_0->qdev.init = i2c_slave_qdev_init;",
"VAR_0->qdev.bus_type = BUS_TYPE_I2C;",
"qdev_register(&VAR_0->qdev);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
16,332 | static int img_compare(int argc, char **argv)
{
const char *fmt1 = NULL, *fmt2 = NULL, *cache, *filename1, *filename2;
BlockBackend *blk1, *blk2;
BlockDriverState *bs1, *bs2;
int64_t total_sectors1, total_sectors2;
uint8_t *buf1 = NULL, *buf2 = NULL;
int pnum1, pnum2;
int allocated1,... | false | qemu | 67a0fd2a9bca204d2b39f910a97c7137636a0715 | static int img_compare(int argc, char **argv)
{
const char *fmt1 = NULL, *fmt2 = NULL, *cache, *filename1, *filename2;
BlockBackend *blk1, *blk2;
BlockDriverState *bs1, *bs2;
int64_t total_sectors1, total_sectors2;
uint8_t *buf1 = NULL, *buf2 = NULL;
int pnum1, pnum2;
int allocated1,... | {
"code": [],
"line_no": []
} | static int FUNC_0(int VAR_0, char **VAR_1)
{
const char *VAR_2 = NULL, *VAR_3 = NULL, *VAR_4, *VAR_5, *VAR_6;
BlockBackend *blk1, *blk2;
BlockDriverState *bs1, *bs2;
int64_t total_sectors1, total_sectors2;
uint8_t *buf1 = NULL, *buf2 = NULL;
int VAR_7, VAR_8;
int VAR_9, VAR_10;
... | [
"static int FUNC_0(int VAR_0, char **VAR_1)\n{",
"const char *VAR_2 = NULL, *VAR_3 = NULL, *VAR_4, *VAR_5, *VAR_6;",
"BlockBackend *blk1, *blk2;",
"BlockDriverState *bs1, *bs2;",
"int64_t total_sectors1, total_sectors2;",
"uint8_t *buf1 = NULL, *buf2 = NULL;",
"int VAR_7, VAR_8;",
"int VAR_9, VAR_10;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
... |
16,333 | static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap)
{
struct video_data *s = s1->priv_data;
AVStream *st;
int width, height;
int res, frame_rate, frame_rate_base;
uint32_t desired_format, capabilities;
const char *video_device;
if (!ap || ap->width <= 0 || ap->... | false | FFmpeg | c04c3282b4334ff64cfd69d40fea010602e830fd | static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap)
{
struct video_data *s = s1->priv_data;
AVStream *st;
int width, height;
int res, frame_rate, frame_rate_base;
uint32_t desired_format, capabilities;
const char *video_device;
if (!ap || ap->width <= 0 || ap->... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1)
{
struct video_data *VAR_2 = VAR_0->priv_data;
AVStream *st;
int VAR_3, VAR_4;
int VAR_5, VAR_6, VAR_7;
uint32_t desired_format, capabilities;
const char *VAR_8;
if (!VAR_1 || VAR_1->VAR_3 <= 0 || VAR_1->VAR_4 <= ... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1)\n{",
"struct video_data *VAR_2 = VAR_0->priv_data;",
"AVStream *st;",
"int VAR_3, VAR_4;",
"int VAR_5, VAR_6, VAR_7;",
"uint32_t desired_format, capabilities;",
"const char *VAR_8;",
"if (!VAR_1 || VAR_1->VAR_3 <= 0 || VAR_1->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
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49
],
[
53
... |
16,334 | static void handle_keyup(DisplayState *ds, SDL_Event *ev)
{
int mod_state;
if (!alt_grab) {
mod_state = (ev->key.keysym.mod & gui_grab_code);
} else {
mod_state = (ev->key.keysym.mod & (gui_grab_code | KMOD_LSHIFT));
}
if (!mod_state && gui_key_modifier_pressed) {
... | false | qemu | 85f94f868fcd868f0f605e9d3c1ad6351c557190 | static void handle_keyup(DisplayState *ds, SDL_Event *ev)
{
int mod_state;
if (!alt_grab) {
mod_state = (ev->key.keysym.mod & gui_grab_code);
} else {
mod_state = (ev->key.keysym.mod & (gui_grab_code | KMOD_LSHIFT));
}
if (!mod_state && gui_key_modifier_pressed) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisplayState *VAR_0, SDL_Event *VAR_1)
{
int VAR_2;
if (!alt_grab) {
VAR_2 = (VAR_1->key.keysym.mod & gui_grab_code);
} else {
VAR_2 = (VAR_1->key.keysym.mod & (gui_grab_code | KMOD_LSHIFT));
}
if (!VAR_2 && gui_key_modifier_pressed) {
gui_key_mo... | [
"static void FUNC_0(DisplayState *VAR_0, SDL_Event *VAR_1)\n{",
"int VAR_2;",
"if (!alt_grab) {",
"VAR_2 = (VAR_1->key.keysym.mod & gui_grab_code);",
"} else {",
"VAR_2 = (VAR_1->key.keysym.mod & (gui_grab_code | KMOD_LSHIFT));",
"}",
"if (!VAR_2 && gui_key_modifier_pressed) {",
"gui_key_modifier_pr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
53
],
[
55
],
... |
16,336 | static int mpegts_resync(ByteIOContext *pb)
{
int c, i;
for(i = 0;i < MAX_RESYNC_SIZE; i++) {
c = url_fgetc(pb);
if (c < 0)
return -1;
if (c == 0x47) {
url_fseek(pb, -1, SEEK_CUR);
return 0;
}
}
/* no sync found */
re... | false | FFmpeg | 1303d62d8416fa315a0cc7bbbe35cfdab787ea92 | static int mpegts_resync(ByteIOContext *pb)
{
int c, i;
for(i = 0;i < MAX_RESYNC_SIZE; i++) {
c = url_fgetc(pb);
if (c < 0)
return -1;
if (c == 0x47) {
url_fseek(pb, -1, SEEK_CUR);
return 0;
}
}
return -1;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(ByteIOContext *VAR_0)
{
int VAR_1, VAR_2;
for(VAR_2 = 0;VAR_2 < MAX_RESYNC_SIZE; VAR_2++) {
VAR_1 = url_fgetc(VAR_0);
if (VAR_1 < 0)
return -1;
if (VAR_1 == 0x47) {
url_fseek(VAR_0, -1, SEEK_CUR);
return 0;
}
... | [
"static int FUNC_0(ByteIOContext *VAR_0)\n{",
"int VAR_1, VAR_2;",
"for(VAR_2 = 0;VAR_2 < MAX_RESYNC_SIZE; VAR_2++) {",
"VAR_1 = url_fgetc(VAR_0);",
"if (VAR_1 < 0)\nreturn -1;",
"if (VAR_1 == 0x47) {",
"url_fseek(VAR_0, -1, SEEK_CUR);",
"return 0;",
"}",
"}",
"return -1;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
]
] |
16,337 | static int write_header(FlashSV2Context * s, uint8_t * buf, int buf_size)
{
PutBitContext pb;
int buf_pos, len;
if (buf_size < 5)
return -1;
init_put_bits(&pb, buf, buf_size * 8);
put_bits(&pb, 4, (s->block_width >> 4) - 1);
put_bits(&pb, 12, s->image_width);
put_bits... | true | FFmpeg | 50833c9f7b4e1922197a8955669f8ab3589c8cef | static int write_header(FlashSV2Context * s, uint8_t * buf, int buf_size)
{
PutBitContext pb;
int buf_pos, len;
if (buf_size < 5)
return -1;
init_put_bits(&pb, buf, buf_size * 8);
put_bits(&pb, 4, (s->block_width >> 4) - 1);
put_bits(&pb, 12, s->image_width);
put_bits... | {
"code": [
" init_put_bits(&pb, buf, buf_size * 8);",
" init_put_bits(&pb, buf, buf_size * 8);"
],
"line_no": [
17,
17
]
} | static int FUNC_0(FlashSV2Context * VAR_0, uint8_t * VAR_1, int VAR_2)
{
PutBitContext pb;
int VAR_3, VAR_4;
if (VAR_2 < 5)
return -1;
init_put_bits(&pb, VAR_1, VAR_2 * 8);
put_bits(&pb, 4, (VAR_0->block_width >> 4) - 1);
put_bits(&pb, 12, VAR_0->image_width);
put_bit... | [
"static int FUNC_0(FlashSV2Context * VAR_0, uint8_t * VAR_1, int VAR_2)\n{",
"PutBitContext pb;",
"int VAR_3, VAR_4;",
"if (VAR_2 < 5)\nreturn -1;",
"init_put_bits(&pb, VAR_1, VAR_2 * 8);",
"put_bits(&pb, 4, (VAR_0->block_width >> 4) - 1);",
"put_bits(&pb, 12, VAR_0->image_width);",
"put_bits(&pb, 4,... | [
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
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[
55
],
[
57... |
16,338 | void usb_ohci_init_pxa(target_phys_addr_t base, int num_ports, int devfn,
qemu_irq irq)
{
OHCIState *ohci = (OHCIState *)qemu_mallocz(sizeof(OHCIState));
usb_ohci_init(ohci, num_ports, devfn, irq,
OHCI_TYPE_PXA, "OHCI USB");
ohci->mem_base = base;
cpu_... | true | qemu | 187337f8b0ec0813dd3876d1efe37d415fb81c2e | void usb_ohci_init_pxa(target_phys_addr_t base, int num_ports, int devfn,
qemu_irq irq)
{
OHCIState *ohci = (OHCIState *)qemu_mallocz(sizeof(OHCIState));
usb_ohci_init(ohci, num_ports, devfn, irq,
OHCI_TYPE_PXA, "OHCI USB");
ohci->mem_base = base;
cpu_... | {
"code": [
" cpu_register_physical_memory(ohci->mem_base, 0xfff, ohci->mem);"
],
"line_no": [
19
]
} | void FUNC_0(target_phys_addr_t VAR_0, int VAR_1, int VAR_2,
qemu_irq VAR_3)
{
OHCIState *ohci = (OHCIState *)qemu_mallocz(sizeof(OHCIState));
usb_ohci_init(ohci, VAR_1, VAR_2, VAR_3,
OHCI_TYPE_PXA, "OHCI USB");
ohci->mem_base = VAR_0;
cpu_register_phys... | [
"void FUNC_0(target_phys_addr_t VAR_0, int VAR_1, int VAR_2,\nqemu_irq VAR_3)\n{",
"OHCIState *ohci = (OHCIState *)qemu_mallocz(sizeof(OHCIState));",
"usb_ohci_init(ohci, VAR_1, VAR_2, VAR_3,\nOHCI_TYPE_PXA, \"OHCI USB\");",
"ohci->mem_base = VAR_0;",
"cpu_register_physical_memory(ohci->mem_base, 0xfff, ohc... | [
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
11,
13
],
[
15
],
[
19
],
[
21
]
] |
16,340 | static void RENAME(yuv2rgb32_1)(SwsContext *c, const int16_t *buf0,
const int16_t *ubuf[2], const int16_t *bguf[2],
const int16_t *abuf0, uint8_t *dest,
int dstW, int uvalpha, int y)
{
const int16_t *ubuf0 = ubuf[0]... | true | FFmpeg | 1bab6f852c7ca433285d19f65c701885fa69cc57 | static void RENAME(yuv2rgb32_1)(SwsContext *c, const int16_t *buf0,
const int16_t *ubuf[2], const int16_t *bguf[2],
const int16_t *abuf0, uint8_t *dest,
int dstW, int uvalpha, int y)
{
const int16_t *ubuf0 = ubuf[0]... | {
"code": [
" const int16_t *ubuf[2], const int16_t *bguf[2],",
" const int16_t *ubuf0 = ubuf[0], *ubuf1 = ubuf[1];",
" const int16_t *ubuf[2], const int16_t *bguf[2],",
" const int16_t *ubuf0 = ubuf[0], *ubuf1 = ubuf[1];",
" c... | static void FUNC_0(yuv2rgb32_1)(SwsContext *c, const int16_t *buf0,
const int16_t *ubuf[2], const int16_t *bguf[2],
const int16_t *abuf0, uint8_t *dest,
int dstW, int uvalpha, int y)
{
const int16_t *VAR_0 = ubuf[0]... | [
"static void FUNC_0(yuv2rgb32_1)(SwsContext *c, const int16_t *buf0,\nconst int16_t *ubuf[2], const int16_t *bguf[2],\nconst int16_t *abuf0, uint8_t *dest,\nint dstW, int uvalpha, int y)\n{",
"const int16_t *VAR_0 = ubuf[0], *ubuf1 = ubuf[1];",
"const int16_t *VAR_1= buf0;",
"if (uvalpha < 2048) {",
"if (CO... | [
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43
],
[
45
],
[
47,
49,
51,
53,
55,
57,
59,
61,
63,
65,
67,... |
16,341 | VirtIODevice *virtio_9p_init(DeviceState *dev, V9fsConf *conf)
{
V9fsState *s;
int i, len;
struct stat stat;
FsTypeEntry *fse;
s = (V9fsState *)virtio_common_init("virtio-9p",
VIRTIO_ID_9P,
sizeof(struct virtio_9p_c... | true | qemu | 12848bfc5d719bad536c5448205a3226be1fda47 | VirtIODevice *virtio_9p_init(DeviceState *dev, V9fsConf *conf)
{
V9fsState *s;
int i, len;
struct stat stat;
FsTypeEntry *fse;
s = (V9fsState *)virtio_common_init("virtio-9p",
VIRTIO_ID_9P,
sizeof(struct virtio_9p_c... | {
"code": [
" fprintf(stderr, \"one of the following must be specified as the\"",
" return NULL;"
],
"line_no": [
99,
105
]
} | VirtIODevice *FUNC_0(DeviceState *dev, V9fsConf *conf)
{
V9fsState *s;
int VAR_0, VAR_1;
struct VAR_2 VAR_2;
FsTypeEntry *fse;
s = (V9fsState *)virtio_common_init("virtio-9p",
VIRTIO_ID_9P,
sizeof(struct virtio_9p_c... | [
"VirtIODevice *FUNC_0(DeviceState *dev, V9fsConf *conf)\n{",
"V9fsState *s;",
"int VAR_0, VAR_1;",
"struct VAR_2 VAR_2;",
"FsTypeEntry *fse;",
"s = (V9fsState *)virtio_common_init(\"virtio-9p\",\nVIRTIO_ID_9P,\nsizeof(struct virtio_9p_config)+\nMAX_TAG_LEN,\nsizeof(V9fsState));",
"QLIST_INIT(&s->free_li... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17,
19,
21,
23,
25
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
49
],
[
53,
55
],
[
57
],
[
59
],
[
63
],
[... |
16,342 | int pcilg_service_call(S390CPU *cpu, uint8_t r1, uint8_t r2)
{
CPUS390XState *env = &cpu->env;
S390PCIBusDevice *pbdev;
uint64_t offset;
uint64_t data;
MemoryRegion *mr;
uint8_t len;
uint32_t fh;
uint8_t pcias;
cpu_synchronize_state(CPU(cpu));
if (env->psw.mask & P... | true | qemu | 88ee13c7b656e5504613b527f3a51591e9afae69 | int pcilg_service_call(S390CPU *cpu, uint8_t r1, uint8_t r2)
{
CPUS390XState *env = &cpu->env;
S390PCIBusDevice *pbdev;
uint64_t offset;
uint64_t data;
MemoryRegion *mr;
uint8_t len;
uint32_t fh;
uint8_t pcias;
cpu_synchronize_state(CPU(cpu));
if (env->psw.mask & P... | {
"code": [
" memory_region_dispatch_read(mr, offset, &data, len,",
" MEMTXATTRS_UNSPECIFIED);"
],
"line_no": [
113,
115
]
} | int FUNC_0(S390CPU *VAR_0, uint8_t VAR_1, uint8_t VAR_2)
{
CPUS390XState *env = &VAR_0->env;
S390PCIBusDevice *pbdev;
uint64_t offset;
uint64_t data;
MemoryRegion *mr;
uint8_t len;
uint32_t fh;
uint8_t pcias;
cpu_synchronize_state(CPU(VAR_0));
if (env->psw.mask & P... | [
"int FUNC_0(S390CPU *VAR_0, uint8_t VAR_1, uint8_t VAR_2)\n{",
"CPUS390XState *env = &VAR_0->env;",
"S390PCIBusDevice *pbdev;",
"uint64_t offset;",
"uint64_t data;",
"MemoryRegion *mr;",
"uint8_t len;",
"uint32_t fh;",
"uint8_t pcias;",
"cpu_synchronize_state(CPU(VAR_0));",
"if (env->psw.mask & ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
... |
16,343 | static void vnc_client_cache_auth(VncState *client)
{
if (!client->info) {
return;
}
#ifdef CONFIG_VNC_TLS
if (client->tls.session &&
client->tls.dname) {
client->info->has_x509_dname = true;
client->info->x509_dname = g_strdup(client->tls.dname);
}
#endif
#... | true | qemu | 3e305e4a4752f70c0b5c3cf5b43ec957881714f7 | static void vnc_client_cache_auth(VncState *client)
{
if (!client->info) {
return;
}
#ifdef CONFIG_VNC_TLS
if (client->tls.session &&
client->tls.dname) {
client->info->has_x509_dname = true;
client->info->x509_dname = g_strdup(client->tls.dname);
}
#endif
#... | {
"code": [
"#ifdef CONFIG_VNC_TLS",
"#ifdef CONFIG_VNC_TLS",
"#endif",
"#endif",
"#ifdef CONFIG_VNC_TLS",
"#ifdef CONFIG_VNC_TLS",
"#ifdef CONFIG_VNC_TLS",
"#endif",
"#ifdef CONFIG_VNC_TLS",
" if (client->tls.session &&",
" client->tls.dname) {",
" cli... | static void FUNC_0(VncState *VAR_0)
{
if (!VAR_0->info) {
return;
}
#ifdef CONFIG_VNC_TLS
if (VAR_0->tls.session &&
VAR_0->tls.dname) {
VAR_0->info->has_x509_dname = true;
VAR_0->info->x509_dname = g_strdup(VAR_0->tls.dname);
}
#endif
#ifdef CONFIG_VNC_SASL
... | [
"static void FUNC_0(VncState *VAR_0)\n{",
"if (!VAR_0->info) {",
"return;",
"}",
"#ifdef CONFIG_VNC_TLS\nif (VAR_0->tls.session &&\nVAR_0->tls.dname) {",
"VAR_0->info->has_x509_dname = true;",
"VAR_0->info->x509_dname = g_strdup(VAR_0->tls.dname);",
"}",
"#endif\n#ifdef CONFIG_VNC_SASL\nif (VAR_0->s... | [
0,
0,
0,
0,
1,
1,
1,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15,
17
],
[
19
],
[
21
],
[
23
],
[
25,
27,
29,
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
]
] |
16,344 | static void add_wav(int16_t *dest, int n, int skip_first, int *m,
const int16_t *s1, const int8_t *s2, const int8_t *s3)
{
int i;
int v[3];
v[0] = 0;
for (i=!skip_first; i<3; i++)
v[i] = (gain_val_tab[n][i] * m[i]) >> gain_exp_tab[n];
dest[i] = (s1[i]*v[... | true | FFmpeg | 9e27e0d4f825e97104333e3006f450f566935af0 | static void add_wav(int16_t *dest, int n, int skip_first, int *m,
const int16_t *s1, const int8_t *s2, const int8_t *s3)
{
int i;
int v[3];
v[0] = 0;
for (i=!skip_first; i<3; i++)
v[i] = (gain_val_tab[n][i] * m[i]) >> gain_exp_tab[n];
dest[i] = (s1[i]*v[... | {
"code": [],
"line_no": []
} | static void FUNC_0(int16_t *VAR_0, int VAR_1, int VAR_2, int *VAR_3,
const int16_t *VAR_4, const int8_t *VAR_5, const int8_t *VAR_6)
{
int VAR_7;
int VAR_8[3];
VAR_8[0] = 0;
for (VAR_7=!VAR_2; VAR_7<3; VAR_7++)
VAR_8[VAR_7] = (gain_val_tab[VAR_1][VAR_7] * VAR_3[VAR_7... | [
"static void FUNC_0(int16_t *VAR_0, int VAR_1, int VAR_2, int *VAR_3,\nconst int16_t *VAR_4, const int8_t *VAR_5, const int8_t *VAR_6)\n{",
"int VAR_7;",
"int VAR_8[3];",
"VAR_8[0] = 0;",
"for (VAR_7=!VAR_2; VAR_7<3; VAR_7++)",
"VAR_8[VAR_7] = (gain_val_tab[VAR_1][VAR_7] * VAR_3[VAR_7]) >> gain_exp_tab[VA... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
23
]
] |
16,345 | void qtest_qmp(QTestState *s, const char *fmt, ...)
{
va_list ap;
bool has_reply = false;
int nesting = 0;
/* Send QMP request */
va_start(ap, fmt);
socket_sendf(s->qmp_fd, fmt, ap);
va_end(ap);
/* Receive reply */
while (!has_reply || nesting > 0) {
ssize_t len;
char... | true | qemu | 039380a8e18f618cdacf72486449c04dc1b70eef | void qtest_qmp(QTestState *s, const char *fmt, ...)
{
va_list ap;
bool has_reply = false;
int nesting = 0;
va_start(ap, fmt);
socket_sendf(s->qmp_fd, fmt, ap);
va_end(ap);
while (!has_reply || nesting > 0) {
ssize_t len;
char c;
len = read(s->qmp_fd, &c, 1);... | {
"code": [],
"line_no": []
} | void FUNC_0(QTestState *VAR_0, const char *VAR_1, ...)
{
va_list ap;
bool has_reply = false;
int VAR_2 = 0;
va_start(ap, VAR_1);
socket_sendf(VAR_0->qmp_fd, VAR_1, ap);
va_end(ap);
while (!has_reply || VAR_2 > 0) {
ssize_t len;
char VAR_3;
len = read(VAR_0->... | [
"void FUNC_0(QTestState *VAR_0, const char *VAR_1, ...)\n{",
"va_list ap;",
"bool has_reply = false;",
"int VAR_2 = 0;",
"va_start(ap, VAR_1);",
"socket_sendf(VAR_0->qmp_fd, VAR_1, ap);",
"va_end(ap);",
"while (!has_reply || VAR_2 > 0) {",
"ssize_t len;",
"char VAR_3;",
"len = read(VAR_0->qmp_fd... | [
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
],
[
7
],
[
8
],
[
9
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
23
]... |
16,346 | static void vmxnet3_reset(VMXNET3State *s)
{
VMW_CBPRN("Resetting vmxnet3...");
vmxnet3_deactivate_device(s);
vmxnet3_reset_interrupt_states(s);
vmxnet_tx_pkt_reset(s->tx_pkt);
s->drv_shmem = 0;
s->tx_sop = true;
s->skip_current_tx_pkt = false;
}
| true | qemu | aa4a3dce1c88ed51b616806b8214b7c8428b7470 | static void vmxnet3_reset(VMXNET3State *s)
{
VMW_CBPRN("Resetting vmxnet3...");
vmxnet3_deactivate_device(s);
vmxnet3_reset_interrupt_states(s);
vmxnet_tx_pkt_reset(s->tx_pkt);
s->drv_shmem = 0;
s->tx_sop = true;
s->skip_current_tx_pkt = false;
}
| {
"code": [
" vmxnet_tx_pkt_reset(s->tx_pkt);",
" vmxnet_tx_pkt_reset(s->tx_pkt);"
],
"line_no": [
13,
13
]
} | static void FUNC_0(VMXNET3State *VAR_0)
{
VMW_CBPRN("Resetting vmxnet3...");
vmxnet3_deactivate_device(VAR_0);
vmxnet3_reset_interrupt_states(VAR_0);
vmxnet_tx_pkt_reset(VAR_0->tx_pkt);
VAR_0->drv_shmem = 0;
VAR_0->tx_sop = true;
VAR_0->skip_current_tx_pkt = false;
}
| [
"static void FUNC_0(VMXNET3State *VAR_0)\n{",
"VMW_CBPRN(\"Resetting vmxnet3...\");",
"vmxnet3_deactivate_device(VAR_0);",
"vmxnet3_reset_interrupt_states(VAR_0);",
"vmxnet_tx_pkt_reset(VAR_0->tx_pkt);",
"VAR_0->drv_shmem = 0;",
"VAR_0->tx_sop = true;",
"VAR_0->skip_current_tx_pkt = false;",
"}"
] | [
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
16,347 | static av_cold int X264_close(AVCodecContext *avctx)
{
X264Context *x4 = avctx->priv_data;
av_freep(&avctx->extradata);
av_free(x4->sei);
if (x4->enc)
x264_encoder_close(x4->enc);
av_frame_free(&avctx->coded_frame);
return 0;
}
| true | FFmpeg | eae7338e1592f4a398b7c3cb9d1ac854b7a44ff8 | static av_cold int X264_close(AVCodecContext *avctx)
{
X264Context *x4 = avctx->priv_data;
av_freep(&avctx->extradata);
av_free(x4->sei);
if (x4->enc)
x264_encoder_close(x4->enc);
av_frame_free(&avctx->coded_frame);
return 0;
}
| {
"code": [
" av_free(x4->sei);",
" if (x4->enc)"
],
"line_no": [
11,
15
]
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
X264Context *x4 = avctx->priv_data;
av_freep(&avctx->extradata);
av_free(x4->sei);
if (x4->enc)
x264_encoder_close(x4->enc);
av_frame_free(&avctx->coded_frame);
return 0;
}
| [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"X264Context *x4 = avctx->priv_data;",
"av_freep(&avctx->extradata);",
"av_free(x4->sei);",
"if (x4->enc)\nx264_encoder_close(x4->enc);",
"av_frame_free(&avctx->coded_frame);",
"return 0;",
"}"
] | [
0,
0,
0,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15,
17
],
[
21
],
[
25
],
[
27
]
] |
16,349 | static always_inline void gen_op_subfo_64 (void)
{
gen_op_move_T2_T0();
gen_op_subf();
gen_op_check_subfo_64();
}
| true | qemu | c3e10c7b4377c1cbc0a4fbc12312c2cf41c0cda7 | static always_inline void gen_op_subfo_64 (void)
{
gen_op_move_T2_T0();
gen_op_subf();
gen_op_check_subfo_64();
}
| {
"code": [
" gen_op_move_T2_T0();",
" gen_op_move_T2_T0();",
" gen_op_check_subfo_64();",
" gen_op_move_T2_T0();",
" gen_op_move_T2_T0();",
" gen_op_check_subfo_64();",
" gen_op_move_T2_T0();",
" gen_op_move_T2_T0();",
" gen_op_check_subfo_64();"
],
... | static always_inline void FUNC_0 (void)
{
gen_op_move_T2_T0();
gen_op_subf();
gen_op_check_subfo_64();
}
| [
"static always_inline void FUNC_0 (void)\n{",
"gen_op_move_T2_T0();",
"gen_op_subf();",
"gen_op_check_subfo_64();",
"}"
] | [
0,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
16,350 | int slirp_can_output(void)
{
return 1;
}
| true | qemu | d861b05ea30e6ac177de9b679da96194ebe21afc | int slirp_can_output(void)
{
return 1;
}
| {
"code": [
" return 1;"
],
"line_no": [
5
]
} | int FUNC_0(void)
{
return 1;
}
| [
"int FUNC_0(void)\n{",
"return 1;",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
16,351 | int main(int argc, char **argv, char **envp)
{
struct target_pt_regs regs1, *regs = ®s1;
struct image_info info1, *info = &info1;
struct linux_binprm bprm;
TaskState *ts;
CPUArchState *env;
CPUState *cpu;
int optind;
char **target_environ, **wrk;
char **target_argv;
... | true | qemu | ec45bbe5f1921c6553fbf9c0c76b358b0403c22d | int main(int argc, char **argv, char **envp)
{
struct target_pt_regs regs1, *regs = ®s1;
struct image_info info1, *info = &info1;
struct linux_binprm bprm;
TaskState *ts;
CPUArchState *env;
CPUState *cpu;
int optind;
char **target_environ, **wrk;
char **target_argv;
... | {
"code": [
" if ((envlist = envlist_create()) == NULL) {",
" (void) fprintf(stderr, \"Unable to allocate envlist\\n\");",
" exit(1);",
" exit(1);",
" free(*wrk);",
" free(target_environ);",
" if ((envlist = envlist_create()) == NULL) {",
" ... | int FUNC_0(int VAR_0, char **VAR_1, char **VAR_2)
{
struct target_pt_regs VAR_3, *VAR_4 = &VAR_3;
struct image_info VAR_5, *VAR_6 = &VAR_5;
struct linux_binprm VAR_7;
TaskState *ts;
CPUArchState *env;
CPUState *cpu;
int VAR_8;
char **VAR_9, **VAR_10;
char **VAR_11;
int... | [
"int FUNC_0(int VAR_0, char **VAR_1, char **VAR_2)\n{",
"struct target_pt_regs VAR_3, *VAR_4 = &VAR_3;",
"struct image_info VAR_5, *VAR_6 = &VAR_5;",
"struct linux_binprm VAR_7;",
"TaskState *ts;",
"CPUArchState *env;",
"CPUState *cpu;",
"int VAR_8;",
"char **VAR_9, **VAR_10;",
"char **VAR_11;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
... |
16,353 | static int aiff_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
int size, filesize;
offset_t offset = 0;
uint32_t tag;
unsigned version = AIFF_C_VERSION1;
ByteIOContext *pb = s->pb;
AVStream * st = s->streams[0];
/* check FORM header */
f... | true | FFmpeg | 9c7fd997f794d3180ef4cbde019e4827ff309988 | static int aiff_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
int size, filesize;
offset_t offset = 0;
uint32_t tag;
unsigned version = AIFF_C_VERSION1;
ByteIOContext *pb = s->pb;
AVStream * st = s->streams[0];
filesize = get_tag(pb, &... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
AVFormatParameters *VAR_1)
{
int VAR_2, VAR_3;
offset_t offset = 0;
uint32_t tag;
unsigned VAR_4 = AIFF_C_VERSION1;
ByteIOContext *pb = VAR_0->pb;
AVStream * st = VAR_0->streams[0];
VAR_3 = get_tag(pb, &ta... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nAVFormatParameters *VAR_1)\n{",
"int VAR_2, VAR_3;",
"offset_t offset = 0;",
"uint32_t tag;",
"unsigned VAR_4 = AIFF_C_VERSION1;",
"ByteIOContext *pb = VAR_0->pb;",
"AVStream * st = VAR_0->streams[0];",
"VAR_3 = get_tag(pb, &tag);",
"if (VAR_3 < 0 || tag !... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25,
27
],
[
33
],
[
35,
37
],
[
39,
41
],
[
45
],
[
49
],
[
51,
53
],
[
57
],
[
61
],
[... |
16,354 | static int start_frame_overlay(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
{
AVFilterContext *ctx = inlink->dst;
OverlayContext *over = ctx->priv;
inlink->cur_buf = NULL;
over->overpicref = inpicref;
over->overpicref->pts = av_rescale_q(inpicref->pts, ctx->inputs[OVERLAY]->time_base... | true | FFmpeg | f431315a866da9600e3eaa99fc54da1f554f170c | static int start_frame_overlay(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
{
AVFilterContext *ctx = inlink->dst;
OverlayContext *over = ctx->priv;
inlink->cur_buf = NULL;
over->overpicref = inpicref;
over->overpicref->pts = av_rescale_q(inpicref->pts, ctx->inputs[OVERLAY]->time_base... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFilterLink *VAR_0, AVFilterBufferRef *VAR_1)
{
AVFilterContext *ctx = VAR_0->dst;
OverlayContext *over = ctx->priv;
VAR_0->cur_buf = NULL;
over->overpicref = VAR_1;
over->overpicref->pts = av_rescale_q(VAR_1->pts, ctx->inputs[OVERLAY]->time_base,
... | [
"static int FUNC_0(AVFilterLink *VAR_0, AVFilterBufferRef *VAR_1)\n{",
"AVFilterContext *ctx = VAR_0->dst;",
"OverlayContext *over = ctx->priv;",
"VAR_0->cur_buf = NULL;",
"over->overpicref = VAR_1;",
"over->overpicref->pts = av_rescale_q(VAR_1->pts, ctx->inputs[OVERLAY]->time_base,\nctx->outputs[0]->tim... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
14
],
[
16,
18
],
[
20
],
[
22
]
] |
16,355 | int bdrv_file_open(BlockDriverState **pbs, const char *filename,
QDict *options, int flags, Error **errp)
{
BlockDriverState *bs;
BlockDriver *drv;
const char *drvname;
bool allow_protocol_prefix = false;
Error *local_err = NULL;
int ret;
/* NULL means an empty ... | true | qemu | 8f94a6e40e46cbc8e8014da825d25824b1803b34 | int bdrv_file_open(BlockDriverState **pbs, const char *filename,
QDict *options, int flags, Error **errp)
{
BlockDriverState *bs;
BlockDriver *drv;
const char *drvname;
bool allow_protocol_prefix = false;
Error *local_err = NULL;
int ret;
if (options == NU... | {
"code": [
" drv = bdrv_find_whitelisted_format(drvname, !(flags & BDRV_O_RDWR));",
" drv = bdrv_find_whitelisted_format(drvname, !(flags & BDRV_O_RDWR));"
],
"line_no": [
71,
71
]
} | int FUNC_0(BlockDriverState **VAR_0, const char *VAR_1,
QDict *VAR_2, int VAR_3, Error **VAR_4)
{
BlockDriverState *bs;
BlockDriver *drv;
const char *VAR_5;
bool allow_protocol_prefix = false;
Error *local_err = NULL;
int VAR_6;
if (VAR_2 == NULL) {
... | [
"int FUNC_0(BlockDriverState **VAR_0, const char *VAR_1,\nQDict *VAR_2, int VAR_3, Error **VAR_4)\n{",
"BlockDriverState *bs;",
"BlockDriver *drv;",
"const char *VAR_5;",
"bool allow_protocol_prefix = false;",
"Error *local_err = NULL;",
"int VAR_6;",
"if (VAR_2 == NULL) {",
"VAR_2 = qdict_new();",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
16,356 | ser_write(void *opaque, hwaddr addr,
uint64_t val64, unsigned int size)
{
ETRAXSerial *s = opaque;
uint32_t value = val64;
unsigned char ch = val64;
D(qemu_log("%s " TARGET_FMT_plx "=%x\n", __func__, addr, value));
addr >>= 2;
switch (addr)
{
case RW_DOUT:
... | true | qemu | 6ab3fc32ea640026726bc5f9f4db622d0954fb8a | ser_write(void *opaque, hwaddr addr,
uint64_t val64, unsigned int size)
{
ETRAXSerial *s = opaque;
uint32_t value = val64;
unsigned char ch = val64;
D(qemu_log("%s " TARGET_FMT_plx "=%x\n", __func__, addr, value));
addr >>= 2;
switch (addr)
{
case RW_DOUT:
... | {
"code": [
" qemu_chr_fe_write(s->chr, &ch, 1);",
" qemu_chr_fe_write(s->chr, &ch, 1);",
" qemu_chr_fe_write(s->chr, &ch, 1);",
" qemu_chr_fe_write(s->chr, &ch, 1);",
" qemu_chr_fe_write(s->chr, &ch, 1);",
" qemu_chr_fe_write(s... | FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned int VAR_3)
{
ETRAXSerial *s = VAR_0;
uint32_t value = VAR_2;
unsigned char VAR_4 = VAR_2;
D(qemu_log("%s " TARGET_FMT_plx "=%x\n", __func__, VAR_1, value));
VAR_1 >>= 2;
switch (VAR_1)
{
case RW_DOUT:
... | [
"FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned int VAR_3)\n{",
"ETRAXSerial *s = VAR_0;",
"uint32_t value = VAR_2;",
"unsigned char VAR_4 = VAR_2;",
"D(qemu_log(\"%s \" TARGET_FMT_plx \"=%x\\n\", __func__, VAR_1, value));",
"VAR_1 >>= 2;",
"switch (VAR_1)\n{",
"case RW_DOUT:\nqemu_chr_f... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[... |
16,357 | static av_cold int X264_init(AVCodecContext *avctx)
{
X264Context *x4 = avctx->priv_data;
int sw,sh;
if (avctx->global_quality > 0)
av_log(avctx, AV_LOG_WARNING, "-qscale is ignored, -crf is recommended.\n");
x264_param_default(&x4->params);
x4->params.b_deblocking_filter ... | true | FFmpeg | 066dc0437368acd21546ee327a0a94c60c3808b2 | static av_cold int X264_init(AVCodecContext *avctx)
{
X264Context *x4 = avctx->priv_data;
int sw,sh;
if (avctx->global_quality > 0)
av_log(avctx, AV_LOG_WARNING, "-qscale is ignored, -crf is recommended.\n");
x264_param_default(&x4->params);
x4->params.b_deblocking_filter ... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
X264Context *x4 = avctx->priv_data;
int VAR_0,VAR_1;
if (avctx->global_quality > 0)
av_log(avctx, AV_LOG_WARNING, "-qscale is ignored, -crf is recommended.\n");
x264_param_default(&x4->params);
x4->params.b_deblocking_filter ... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"X264Context *x4 = avctx->priv_data;",
"int VAR_0,VAR_1;",
"if (avctx->global_quality > 0)\nav_log(avctx, AV_LOG_WARNING, \"-qscale is ignored, -crf is recommended.\\n\");",
"x264_param_default(&x4->params);",
"x4->params.b_deblocking_filter =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51... |
16,359 | int vhost_dev_init(struct vhost_dev *hdev, void *opaque,
VhostBackendType backend_type)
{
uint64_t features;
int i, r;
if (vhost_set_backend_type(hdev, backend_type) < 0) {
if (hdev->vhost_ops->vhost_backend_init(hdev, opaque) < 0) {
return -errno;
... | true | qemu | aebf81680bf49c5953d7ae9ebb7b98c0f4dad8f3 | int vhost_dev_init(struct vhost_dev *hdev, void *opaque,
VhostBackendType backend_type)
{
uint64_t features;
int i, r;
if (vhost_set_backend_type(hdev, backend_type) < 0) {
if (hdev->vhost_ops->vhost_backend_init(hdev, opaque) < 0) {
return -errno;
... | {
"code": [],
"line_no": []
} | int FUNC_0(struct vhost_dev *VAR_0, void *VAR_1,
VhostBackendType VAR_2)
{
uint64_t features;
int VAR_3, VAR_4;
if (vhost_set_backend_type(VAR_0, VAR_2) < 0) {
if (VAR_0->vhost_ops->vhost_backend_init(VAR_0, VAR_1) < 0) {
return -errno;
QLIST_INSER... | [
"int FUNC_0(struct vhost_dev *VAR_0, void *VAR_1,\nVhostBackendType VAR_2)\n{",
"uint64_t features;",
"int VAR_3, VAR_4;",
"if (vhost_set_backend_type(VAR_0, VAR_2) < 0) {",
"if (VAR_0->vhost_ops->vhost_backend_init(VAR_0, VAR_1) < 0) {",
"return -errno;",
"QLIST_INSERT_HEAD(&vhost_devices, VAR_0, entry... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
20
],
[
23
],
[
34
],
[
38
],
[
40
],
[
42
],
[
47
],
[
49
],
[
51
],
[
56
],
[
58
],
[
60
],
[
62
],
[
66
],
[
70
],
[... |
16,362 | static int vnc_display_disable_login(DisplayState *ds)
{
VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
if (!vs) {
return -1;
}
if (vs->password) {
g_free(vs->password);
}
vs->password = NULL;
if (vs->auth == VNC_AUTH_NONE) {
vs->auth =... | true | qemu | 21ef45d71221b4577330fe3aacfb06afad91ad46 | static int vnc_display_disable_login(DisplayState *ds)
{
VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
if (!vs) {
return -1;
}
if (vs->password) {
g_free(vs->password);
}
vs->password = NULL;
if (vs->auth == VNC_AUTH_NONE) {
vs->auth =... | {
"code": [
" VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;",
" VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;",
" VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;",
" VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;",
" VncDi... | static int FUNC_0(DisplayState *VAR_0)
{
VncDisplay *vs = VAR_0 ? (VncDisplay *)VAR_0->opaque : vnc_display;
if (!vs) {
return -1;
}
if (vs->password) {
g_free(vs->password);
}
vs->password = NULL;
if (vs->auth == VNC_AUTH_NONE) {
vs->auth = VNC_AUTH_... | [
"static int FUNC_0(DisplayState *VAR_0)\n{",
"VncDisplay *vs = VAR_0 ? (VncDisplay *)VAR_0->opaque : vnc_display;",
"if (!vs) {",
"return -1;",
"}",
"if (vs->password) {",
"g_free(vs->password);",
"}",
"vs->password = NULL;",
"if (vs->auth == VNC_AUTH_NONE) {",
"vs->auth = VNC_AUTH_VNC;",
"}",... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
]
] |
16,363 | static int vfio_connect_container(VFIOGroup *group)
{
VFIOContainer *container;
int ret, fd;
if (group->container) {
return 0;
}
QLIST_FOREACH(container, &container_list, next) {
if (!ioctl(group->fd, VFIO_GROUP_SET_CONTAINER, &container->fd)) {
group->contai... | true | qemu | 3df3e0a5872cbc8fcc55a0413416352eec68132e | static int vfio_connect_container(VFIOGroup *group)
{
VFIOContainer *container;
int ret, fd;
if (group->container) {
return 0;
}
QLIST_FOREACH(container, &container_list, next) {
if (!ioctl(group->fd, VFIO_GROUP_SET_CONTAINER, &container->fd)) {
group->contai... | {
"code": [
"static int vfio_connect_container(VFIOGroup *group)",
" if (group->container) {",
" return 0;",
" QLIST_FOREACH(container, &container_list, next) {",
" QLIST_INSERT_HEAD(&container_list, container, next);"
],
"line_no": [
1,
11,
13,
19,
141
]
... | static int FUNC_0(VFIOGroup *VAR_0)
{
VFIOContainer *container;
int VAR_1, VAR_2;
if (VAR_0->container) {
return 0;
}
QLIST_FOREACH(container, &container_list, next) {
if (!ioctl(VAR_0->VAR_2, VFIO_GROUP_SET_CONTAINER, &container->VAR_2)) {
VAR_0->container =... | [
"static int FUNC_0(VFIOGroup *VAR_0)\n{",
"VFIOContainer *container;",
"int VAR_1, VAR_2;",
"if (VAR_0->container) {",
"return 0;",
"}",
"QLIST_FOREACH(container, &container_list, next) {",
"if (!ioctl(VAR_0->VAR_2, VFIO_GROUP_SET_CONTAINER, &container->VAR_2)) {",
"VAR_0->container = container;",
... | [
1,
0,
0,
1,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49... |
16,364 | static void v9fs_fsync(void *opaque)
{
int err;
int32_t fid;
int datasync;
size_t offset = 7;
V9fsFidState *fidp;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "dd", &fid, &datasync);
fidp = get_fid(pdu, fid);
if (fidp == NULL) {
err = -ENOENT;
... | true | qemu | c572f23a3e7180dbeab5e86583e43ea2afed6271 | static void v9fs_fsync(void *opaque)
{
int err;
int32_t fid;
int datasync;
size_t offset = 7;
V9fsFidState *fidp;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "dd", &fid, &datasync);
fidp = get_fid(pdu, fid);
if (fidp == NULL) {
err = -ENOENT;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
int VAR_1;
int32_t fid;
int VAR_2;
size_t offset = 7;
V9fsFidState *fidp;
V9fsPDU *pdu = VAR_0;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "dd", &fid, &VAR_2);
fidp = get_fid(pdu, fid);
if (fidp == NULL) {
VAR_1 = -ENOENT;
... | [
"static void FUNC_0(void *VAR_0)\n{",
"int VAR_1;",
"int32_t fid;",
"int VAR_2;",
"size_t offset = 7;",
"V9fsFidState *fidp;",
"V9fsPDU *pdu = VAR_0;",
"V9fsState *s = pdu->s;",
"pdu_unmarshal(pdu, offset, \"dd\", &fid, &VAR_2);",
"fidp = get_fid(pdu, fid);",
"if (fidp == NULL) {",
"VAR_1 = -E... | [
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,
... |
16,366 | static float quantize_and_encode_band_cost(struct AACEncContext *s,
PutBitContext *pb, const float *in,
const float *scaled, int size, int scale_idx,
int cb, const float lambda, const float uplim,
... | true | FFmpeg | 4d986b71721ddf26ab8563b933ec8dd3ec88e59c | static float quantize_and_encode_band_cost(struct AACEncContext *s,
PutBitContext *pb, const float *in,
const float *scaled, int size, int scale_idx,
int cb, const float lambda, const float uplim,
... | {
"code": [
"#ifndef USE_REALLY_FULL_SEARCH",
" int offs[4];",
"#ifndef USE_REALLY_FULL_SEARCH",
" offs[0] = 1;",
" for (i = 1; i < dim; i++)",
" offs[i] = offs[i-1]*range;",
" float mincost;",
" int minidx = 0;",
" int minbits = 0;",
"#ifn... | static float FUNC_0(struct AACEncContext *VAR_0,
PutBitContext *VAR_1, const float *VAR_2,
const float *VAR_3, int VAR_4, int VAR_5,
int VAR_6, const float VAR_7, const float VAR_8,
int *V... | [
"static float FUNC_0(struct AACEncContext *VAR_0,\nPutBitContext *VAR_1, const float *VAR_2,\nconst float *VAR_3, int VAR_4, int VAR_5,\nint VAR_6, const float VAR_7, const float VAR_8,\nint *VAR_9)\n{",
"const float VAR_10 = ff_aac_pow2sf_tab[200 + VAR_5 - SCALE_ONE_POS + SCALE_DIV_512];",
"const float VAR_11... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
0,
0,
1,
1,
1,
0,
1,
1,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37,
41
],
[
43
],
[
45
],
[
47,
49
],
[... |
16,367 | static SocketAddress *nbd_config(BDRVNBDState *s, QDict *options, char **export,
Error **errp)
{
SocketAddress *saddr;
if (qdict_haskey(options, "path") == qdict_haskey(options, "host")) {
if (qdict_haskey(options, "path")) {
error_setg(errp, "path an... | true | qemu | 7ccc44fd7d1dfa62c4d6f3a680df809d6e7068ce | static SocketAddress *nbd_config(BDRVNBDState *s, QDict *options, char **export,
Error **errp)
{
SocketAddress *saddr;
if (qdict_haskey(options, "path") == qdict_haskey(options, "host")) {
if (qdict_haskey(options, "path")) {
error_setg(errp, "path an... | {
"code": [
"static SocketAddress *nbd_config(BDRVNBDState *s, QDict *options, char **export,",
" if (qdict_haskey(options, \"path\") == qdict_haskey(options, \"host\")) {",
" if (qdict_haskey(options, \"path\")) {",
" if (qdict_haskey(options, \"path\")) {",
" q_unix->path = g... | static SocketAddress *FUNC_0(BDRVNBDState *s, QDict *options, char **export,
Error **errp)
{
SocketAddress *saddr;
if (qdict_haskey(options, "path") == qdict_haskey(options, "host")) {
if (qdict_haskey(options, "path")) {
error_setg(errp, "path and ho... | [
"static SocketAddress *FUNC_0(BDRVNBDState *s, QDict *options, char **export,\nError **errp)\n{",
"SocketAddress *saddr;",
"if (qdict_haskey(options, \"path\") == qdict_haskey(options, \"host\")) {",
"if (qdict_haskey(options, \"path\")) {",
"error_setg(errp, \"path and host may not be used at the same time... | [
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
1,
0,
0,
0,
0,
1,
1,
0,
0,
1,
0,
1,
1,
0,
0,
1,
1,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
... |
16,368 | static void init_excp_602 (CPUPPCState *env)
{
#if !defined(CONFIG_USER_ONLY)
env->excp_vectors[POWERPC_EXCP_RESET] = 0x00000100;
env->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200;
env->excp_vectors[POWERPC_EXCP_DSI] = 0x00000300;
env->excp_vectors[POWERPC_EXCP_ISI] = 0x00000400;
... | true | qemu | faadf50e2962dd54175647a80bd6fc4319c91973 | static void init_excp_602 (CPUPPCState *env)
{
#if !defined(CONFIG_USER_ONLY)
env->excp_vectors[POWERPC_EXCP_RESET] = 0x00000100;
env->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200;
env->excp_vectors[POWERPC_EXCP_DSI] = 0x00000300;
env->excp_vectors[POWERPC_EXCP_ISI] = 0x00000400;
... | {
"code": [
"#endif",
" env->excp_prefix = 0xFFF00000;",
" env->excp_prefix = 0xFFF00000;",
"#if !defined(CONFIG_USER_ONLY)",
" env->excp_prefix = 0xFFF00000;",
"#endif",
"#if !defined(CONFIG_USER_ONLY)",
" env->excp_prefix = 0xFFF00000;",
"#endif",
"#if !defined(CO... | static void FUNC_0 (CPUPPCState *VAR_0)
{
#if !defined(CONFIG_USER_ONLY)
VAR_0->excp_vectors[POWERPC_EXCP_RESET] = 0x00000100;
VAR_0->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200;
VAR_0->excp_vectors[POWERPC_EXCP_DSI] = 0x00000300;
VAR_0->excp_vectors[POWERPC_EXCP_ISI] = 0x0000040... | [
"static void FUNC_0 (CPUPPCState *VAR_0)\n{",
"#if !defined(CONFIG_USER_ONLY)\nVAR_0->excp_vectors[POWERPC_EXCP_RESET] = 0x00000100;",
"VAR_0->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200;",
"VAR_0->excp_vectors[POWERPC_EXCP_DSI] = 0x00000300;",
"VAR_0->excp_vectors[POWERPC_EXCP_ISI] = 0x00... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
16,369 | int qcow2_check_refcounts(BlockDriverState *bs, BdrvCheckResult *res,
BdrvCheckMode fix)
{
BDRVQcowState *s = bs->opaque;
int64_t size, i, highest_cluster, nb_clusters;
int refcount1, refcount2;
QCowSnapshot *sn;
uint16_t *refcount_table;
int ret;
size = ... | true | qemu | de82815db1c89da058b7fb941dab137d6d9ab738 | int qcow2_check_refcounts(BlockDriverState *bs, BdrvCheckResult *res,
BdrvCheckMode fix)
{
BDRVQcowState *s = bs->opaque;
int64_t size, i, highest_cluster, nb_clusters;
int refcount1, refcount2;
QCowSnapshot *sn;
uint16_t *refcount_table;
int ret;
size = ... | {
"code": [
" refcount_table = g_malloc0(nb_clusters * sizeof(uint16_t));"
],
"line_no": [
45
]
} | int FUNC_0(BlockDriverState *VAR_0, BdrvCheckResult *VAR_1,
BdrvCheckMode VAR_2)
{
BDRVQcowState *s = VAR_0->opaque;
int64_t size, i, highest_cluster, nb_clusters;
int VAR_3, VAR_4;
QCowSnapshot *sn;
uint16_t *refcount_table;
int VAR_5;
size = bdrv_getlen... | [
"int FUNC_0(BlockDriverState *VAR_0, BdrvCheckResult *VAR_1,\nBdrvCheckMode VAR_2)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"int64_t size, i, highest_cluster, nb_clusters;",
"int VAR_3, VAR_4;",
"QCowSnapshot *sn;",
"uint16_t *refcount_table;",
"int VAR_5;",
"size = bdrv_getlength(VAR_0->file);",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
49,
51
... |
16,371 | BlockDriverState *bdrv_find_backing_image(BlockDriverState *bs,
const char *backing_file)
{
char *filename_full = NULL;
char *backing_file_full = NULL;
char *filename_tmp = NULL;
int is_protocol = 0;
BlockDriverState *curr_bs = NULL;
BlockDriverState *retval = NULL;
if (!... | true | qemu | 418661e0324c1c419552cf24bd4447292e884bdd | BlockDriverState *bdrv_find_backing_image(BlockDriverState *bs,
const char *backing_file)
{
char *filename_full = NULL;
char *backing_file_full = NULL;
char *filename_tmp = NULL;
int is_protocol = 0;
BlockDriverState *curr_bs = NULL;
BlockDriverState *retval = NULL;
if (!... | {
"code": [],
"line_no": []
} | BlockDriverState *FUNC_0(BlockDriverState *bs,
const char *backing_file)
{
char *VAR_0 = NULL;
char *VAR_1 = NULL;
char *VAR_2 = NULL;
int VAR_3 = 0;
BlockDriverState *curr_bs = NULL;
BlockDriverState *retval = NULL;
if (!bs || !bs->drv || !backing_file) {
return... | [
"BlockDriverState *FUNC_0(BlockDriverState *bs,\nconst char *backing_file)\n{",
"char *VAR_0 = NULL;",
"char *VAR_1 = NULL;",
"char *VAR_2 = NULL;",
"int VAR_3 = 0;",
"BlockDriverState *curr_bs = NULL;",
"BlockDriverState *retval = NULL;",
"if (!bs || !bs->drv || !backing_file) {",
"return 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,
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
],
[
22
],
[
24
],
[
26
],
[
30
],
[
32
],
[
34
],
[
38
],
[
42
],
[
50
],
[
52
],
[
54
],
[
56
],
[... |
16,372 | static void test_ivshmem_pair(void)
{
IVState state1, state2, *s1, *s2;
char *data;
int i;
setup_vm(&state1);
s1 = &state1;
setup_vm(&state2);
s2 = &state2;
data = g_malloc0(TMPSHMSIZE);
/* host write, guest 1 & 2 read */
memset(tmpshmem, 0x42, TMPSHMSIZE);
... | true | qemu | 1760048a5d21bacf0e4838da2f61b2d8db7d2866 | static void test_ivshmem_pair(void)
{
IVState state1, state2, *s1, *s2;
char *data;
int i;
setup_vm(&state1);
s1 = &state1;
setup_vm(&state2);
s2 = &state2;
data = g_malloc0(TMPSHMSIZE);
memset(tmpshmem, 0x42, TMPSHMSIZE);
qtest_memread(s1->qtest, (uintptr_... | {
"code": [
" qtest_quit(s1->qtest);",
" qtest_quit(s2->qtest);",
" qtest_quit(s2->qtest);",
" qtest_quit(s1->qtest);"
],
"line_no": [
85,
87,
87,
85
]
} | static void FUNC_0(void)
{
IVState state1, state2, *s1, *s2;
char *VAR_0;
int VAR_1;
setup_vm(&state1);
s1 = &state1;
setup_vm(&state2);
s2 = &state2;
VAR_0 = g_malloc0(TMPSHMSIZE);
memset(tmpshmem, 0x42, TMPSHMSIZE);
qtest_memread(s1->qtest, (uintptr_t)s1-... | [
"static void FUNC_0(void)\n{",
"IVState state1, state2, *s1, *s2;",
"char *VAR_0;",
"int VAR_1;",
"setup_vm(&state1);",
"s1 = &state1;",
"setup_vm(&state2);",
"s2 = &state2;",
"VAR_0 = g_malloc0(TMPSHMSIZE);",
"memset(tmpshmem, 0x42, TMPSHMSIZE);",
"qtest_memread(s1->qtest, (uintptr_t)s1->mem_ba... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
51
],
[
53
... |
16,373 | int ff_h264_execute_decode_slices(H264Context *h, unsigned context_count)
{
AVCodecContext *const avctx = h->avctx;
H264SliceContext *sl;
int i;
av_assert0(context_count && h->slice_ctx[context_count - 1].mb_y < h->mb_height);
if (h->avctx->hwaccel ||
h->avctx->codec->capabilities... | true | FFmpeg | 43b434210e597d484aef57c4139c3126d22b7e2b | int ff_h264_execute_decode_slices(H264Context *h, unsigned context_count)
{
AVCodecContext *const avctx = h->avctx;
H264SliceContext *sl;
int i;
av_assert0(context_count && h->slice_ctx[context_count - 1].mb_y < h->mb_height);
if (h->avctx->hwaccel ||
h->avctx->codec->capabilities... | {
"code": [
" for (i = 1; i < context_count; i++) {"
],
"line_no": [
35
]
} | int FUNC_0(H264Context *VAR_0, unsigned VAR_1)
{
AVCodecContext *const avctx = VAR_0->avctx;
H264SliceContext *sl;
int VAR_2;
av_assert0(VAR_1 && VAR_0->slice_ctx[VAR_1 - 1].mb_y < VAR_0->mb_height);
if (VAR_0->avctx->hwaccel ||
VAR_0->avctx->codec->capabilities & CODEC_CAP_HWACCE... | [
"int FUNC_0(H264Context *VAR_0, unsigned VAR_1)\n{",
"AVCodecContext *const avctx = VAR_0->avctx;",
"H264SliceContext *sl;",
"int VAR_2;",
"av_assert0(VAR_1 && VAR_0->slice_ctx[VAR_1 - 1].mb_y < VAR_0->mb_height);",
"if (VAR_0->avctx->hwaccel ||\nVAR_0->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU... | [
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
],
[
17,
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49,... |
16,374 | static void qdev_prop_set_globals_for_type(DeviceState *dev,
const char *typename)
{
GList *l;
for (l = global_props; l; l = l->next) {
GlobalProperty *prop = l->data;
Error *err = NULL;
if (strcmp(typename, prop->driver) != 0) {
... | true | qemu | 5eb6a3c50185e101f87382f41fb66eed5784e7ac | static void qdev_prop_set_globals_for_type(DeviceState *dev,
const char *typename)
{
GList *l;
for (l = global_props; l; l = l->next) {
GlobalProperty *prop = l->data;
Error *err = NULL;
if (strcmp(typename, prop->driver) != 0) {
... | {
"code": [
"static void qdev_prop_set_globals_for_type(DeviceState *dev,",
" const char *typename)",
" if (strcmp(typename, prop->driver) != 0) {"
],
"line_no": [
1,
3,
19
]
} | static void FUNC_0(DeviceState *VAR_0,
const char *VAR_1)
{
GList *l;
for (l = global_props; l; l = l->next) {
GlobalProperty *prop = l->data;
Error *err = NULL;
if (strcmp(VAR_1, prop->driver) != 0) {
continue;
... | [
"static void FUNC_0(DeviceState *VAR_0,\nconst char *VAR_1)\n{",
"GList *l;",
"for (l = global_props; l; l = l->next) {",
"GlobalProperty *prop = l->data;",
"Error *err = NULL;",
"if (strcmp(VAR_1, prop->driver) != 0) {",
"continue;",
"}",
"prop->used = true;",
"object_property_parse(OBJECT(VAR_0)... | [
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
16,375 | static int lag_decode_frame(AVCodecContext *avctx,
void *data, int *data_size, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
LagarithContext *l = avctx->priv_data;
AVFrame *const p = &l->picture;
uint8_t frametype = 0;
uint32... | true | FFmpeg | 98d0d19208959766a58f13dd6a678d1f765a26ac | static int lag_decode_frame(AVCodecContext *avctx,
void *data, int *data_size, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
LagarithContext *l = avctx->priv_data;
AVFrame *const p = &l->picture;
uint8_t frametype = 0;
uint32... | {
"code": [
" l->rgb_planes = av_malloc(l->rgb_stride * avctx->height * planes);"
],
"line_no": [
127
]
} | 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;
LagarithContext *l = VAR_0->priv_data;
AVFrame *const p = &l->picture;
uint8_t frametype = 0;
uint32_t offset_gu ... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2, AVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"LagarithContext *l = VAR_0->priv_data;",
"AVFrame *const p = &l->picture;",
"uint8_t frametype = 0;",
"uint32_t offset_gu = 0, offset_bv = 0, off... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31,
33
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
],
[
53
],
[
55,... |
16,376 | static int sd_parse_uri(BDRVSheepdogState *s, const char *filename,
char *vdi, uint32_t *snapid, char *tag)
{
URI *uri;
QueryParams *qp = NULL;
int ret = 0;
uri = uri_parse(filename);
if (!uri) {
return -EINVAL;
}
/* transport */
if (!strcmp... | true | qemu | 36bcac16fdd6ecb75314db06171f54dcd400ab8c | static int sd_parse_uri(BDRVSheepdogState *s, const char *filename,
char *vdi, uint32_t *snapid, char *tag)
{
URI *uri;
QueryParams *qp = NULL;
int ret = 0;
uri = uri_parse(filename);
if (!uri) {
return -EINVAL;
}
if (!strcmp(uri->scheme, "... | {
"code": [
"static int sd_parse_uri(BDRVSheepdogState *s, const char *filename,",
" char *vdi, uint32_t *snapid, char *tag)",
" int ret = 0;",
" return -EINVAL;",
" ret = -EINVAL;",
" ret = -EINVAL;",
" ret = -EINVAL;",
" if (qp... | static int FUNC_0(BDRVSheepdogState *VAR_0, const char *VAR_1,
char *VAR_2, uint32_t *VAR_3, char *VAR_4)
{
URI *uri;
QueryParams *qp = NULL;
int VAR_5 = 0;
uri = uri_parse(VAR_1);
if (!uri) {
return -EINVAL;
}
if (!strcmp(uri->scheme, "she... | [
"static int FUNC_0(BDRVSheepdogState *VAR_0, const char *VAR_1,\nchar *VAR_2, uint32_t *VAR_3, char *VAR_4)\n{",
"URI *uri;",
"QueryParams *qp = NULL;",
"int VAR_5 = 0;",
"uri = uri_parse(VAR_1);",
"if (!uri) {",
"return -EINVAL;",
"}",
"if (!strcmp(uri->scheme, \"sheepdog\")) {",
"VAR_0->is_unix ... | [
1,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[... |
16,377 | static void test_visitor_in_errors(TestInputVisitorData *data,
const void *unused)
{
TestStruct *p = NULL;
Error *err = NULL;
Visitor *v;
strList *q = NULL;
UserDefTwo *r = NULL;
WrapAlternate *s = NULL;
v = visitor_input_test_init(data, "{ 'integer': false... | true | qemu | 9b4e38fe6a35890bb1d995316d7be08de0b30ee5 | static void test_visitor_in_errors(TestInputVisitorData *data,
const void *unused)
{
TestStruct *p = NULL;
Error *err = NULL;
Visitor *v;
strList *q = NULL;
UserDefTwo *r = NULL;
WrapAlternate *s = NULL;
v = visitor_input_test_init(data, "{ 'integer': false... | {
"code": [],
"line_no": []
} | static void FUNC_0(TestInputVisitorData *VAR_0,
const void *VAR_1)
{
TestStruct *p = NULL;
Error *err = NULL;
Visitor *v;
strList *q = NULL;
UserDefTwo *r = NULL;
WrapAlternate *s = NULL;
v = visitor_input_test_init(VAR_0, "{ 'integer': false, 'boolean': 'f... | [
"static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"TestStruct *p = NULL;",
"Error *err = NULL;",
"Visitor *v;",
"strList *q = NULL;",
"UserDefTwo *r = NULL;",
"WrapAlternate *s = NULL;",
"v = visitor_input_test_init(VAR_0, \"{ 'integer': false, 'boolean': 'foo', \"",
"\"'stri... | [
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
]
] |
16,378 | BlockAIOCB *bdrv_aio_flush(BlockDriverState *bs,
BlockCompletionFunc *cb, void *opaque)
{
trace_bdrv_aio_flush(bs, opaque);
Coroutine *co;
BlockAIOCBCoroutine *acb;
/* Matched by bdrv_co_complete's bdrv_dec_in_flight. */
bdrv_inc_in_flight(bs);
acb = qemu_aio_get(&bdrv_em_... | true | qemu | e92f0e1910f0655a0edd8d87c5a7262d36517a89 | BlockAIOCB *bdrv_aio_flush(BlockDriverState *bs,
BlockCompletionFunc *cb, void *opaque)
{
trace_bdrv_aio_flush(bs, opaque);
Coroutine *co;
BlockAIOCBCoroutine *acb;
bdrv_inc_in_flight(bs);
acb = qemu_aio_get(&bdrv_em_co_aiocb_info, bs, cb, opaque);
acb->need_bh = true... | {
"code": [
" qemu_coroutine_enter(co);",
" qemu_coroutine_enter(co);",
" qemu_coroutine_enter(co);"
],
"line_no": [
33,
33,
33
]
} | BlockAIOCB *FUNC_0(BlockDriverState *bs,
BlockCompletionFunc *cb, void *opaque)
{
trace_bdrv_aio_flush(bs, opaque);
Coroutine *co;
BlockAIOCBCoroutine *acb;
bdrv_inc_in_flight(bs);
acb = qemu_aio_get(&bdrv_em_co_aiocb_info, bs, cb, opaque);
acb->need_bh = true;
a... | [
"BlockAIOCB *FUNC_0(BlockDriverState *bs,\nBlockCompletionFunc *cb, void *opaque)\n{",
"trace_bdrv_aio_flush(bs, opaque);",
"Coroutine *co;",
"BlockAIOCBCoroutine *acb;",
"bdrv_inc_in_flight(bs);",
"acb = qemu_aio_get(&bdrv_em_co_aiocb_info, bs, cb, opaque);",
"acb->need_bh = true;",
"acb->req.error =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
]
] |
16,379 | static int filter_packet(void *log_ctx, AVPacket *pkt,
AVFormatContext *fmt_ctx, AVBitStreamFilterContext *bsf_ctx)
{
AVCodecContext *enc_ctx = fmt_ctx->streams[pkt->stream_index]->codec;
int ret;
while (bsf_ctx) {
AVPacket new_pkt = *pkt;
ret = av_bitstream... | true | FFmpeg | c4c3a3d580fa2f9d65af3fb6027ffbf9a28e9d55 | static int filter_packet(void *log_ctx, AVPacket *pkt,
AVFormatContext *fmt_ctx, AVBitStreamFilterContext *bsf_ctx)
{
AVCodecContext *enc_ctx = fmt_ctx->streams[pkt->stream_index]->codec;
int ret;
while (bsf_ctx) {
AVPacket new_pkt = *pkt;
ret = av_bitstream... | {
"code": [
" int ret;"
],
"line_no": [
9
]
} | static int FUNC_0(void *VAR_0, AVPacket *VAR_1,
AVFormatContext *VAR_2, AVBitStreamFilterContext *VAR_3)
{
AVCodecContext *enc_ctx = VAR_2->streams[VAR_1->stream_index]->codec;
int VAR_4;
while (VAR_3) {
AVPacket new_pkt = *VAR_1;
VAR_4 = av_bitstream_filter... | [
"static int FUNC_0(void *VAR_0, AVPacket *VAR_1,\nAVFormatContext *VAR_2, AVBitStreamFilterContext *VAR_3)\n{",
"AVCodecContext *enc_ctx = VAR_2->streams[VAR_1->stream_index]->codec;",
"int VAR_4;",
"while (VAR_3) {",
"AVPacket new_pkt = *VAR_1;",
"VAR_4 = av_bitstream_filter_filter(VAR_3, enc_ctx, NULL,\... | [
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
],
[
37
],
[
39
],
[
41,
43
],
[
45,
47
],
[
49
],
[
51
],
[... |
16,380 | VirtIODevice *virtio_net_init(DeviceState *dev, NICConf *conf,
virtio_net_conf *net)
{
VirtIONet *n;
n = (VirtIONet *)virtio_common_init("virtio-net", VIRTIO_ID_NET,
sizeof(struct virtio_net_config),
... | true | qemu | a697a334b3c4d3250e6420f5d38550ea10eb5319 | VirtIODevice *virtio_net_init(DeviceState *dev, NICConf *conf,
virtio_net_conf *net)
{
VirtIONet *n;
n = (VirtIONet *)virtio_common_init("virtio-net", VIRTIO_ID_NET,
sizeof(struct virtio_net_config),
... | {
"code": [
" n->tx_vq = virtio_add_queue(&n->vdev, 256, virtio_net_handle_tx);",
" n->tx_timer = qemu_new_timer(vm_clock, virtio_net_tx_timer, n);",
" n->tx_timeout = net->txtimer;"
],
"line_no": [
35,
55,
59
]
} | VirtIODevice *FUNC_0(DeviceState *dev, NICConf *conf,
virtio_net_conf *net)
{
VirtIONet *n;
n = (VirtIONet *)virtio_common_init("virtio-net", VIRTIO_ID_NET,
sizeof(struct virtio_net_config),
siz... | [
"VirtIODevice *FUNC_0(DeviceState *dev, NICConf *conf,\nvirtio_net_conf *net)\n{",
"VirtIONet *n;",
"n = (VirtIONet *)virtio_common_init(\"virtio-net\", VIRTIO_ID_NET,\nsizeof(struct virtio_net_config),\nsizeof(VirtIONet));",
"n->vdev.get_config = virtio_net_get_config;",
"n->vdev.set_config = virtio_net_se... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
1,
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
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
51
],
... |
16,381 | int cpu_x86_register(X86CPU *cpu, const char *cpu_model)
{
CPUX86State *env = &cpu->env;
x86_def_t def1, *def = &def1;
Error *error = NULL;
char *name, *features;
gchar **model_pieces;
memset(def, 0, sizeof(*def));
model_pieces = g_strsplit(cpu_model, ",", 2);
if (!model_pie... | true | qemu | 2c728dfef56d468a6a80b4dacdfb7109220d2546 | int cpu_x86_register(X86CPU *cpu, const char *cpu_model)
{
CPUX86State *env = &cpu->env;
x86_def_t def1, *def = &def1;
Error *error = NULL;
char *name, *features;
gchar **model_pieces;
memset(def, 0, sizeof(*def));
model_pieces = g_strsplit(cpu_model, ",", 2);
if (!model_pie... | {
"code": [
" object_property_set_int(OBJECT(cpu), (int64_t)def->tsc_khz * 1000,",
" \"tsc-frequency\", &error);"
],
"line_no": [
87,
89
]
} | int FUNC_0(X86CPU *VAR_0, const char *VAR_1)
{
CPUX86State *env = &VAR_0->env;
x86_def_t def1, *def = &def1;
Error *error = NULL;
char *VAR_2, *VAR_3;
gchar **model_pieces;
memset(def, 0, sizeof(*def));
model_pieces = g_strsplit(VAR_1, ",", 2);
if (!model_pieces[0]) {
... | [
"int FUNC_0(X86CPU *VAR_0, const char *VAR_1)\n{",
"CPUX86State *env = &VAR_0->env;",
"x86_def_t def1, *def = &def1;",
"Error *error = NULL;",
"char *VAR_2, *VAR_3;",
"gchar **model_pieces;",
"memset(def, 0, sizeof(*def));",
"model_pieces = g_strsplit(VAR_1, \",\", 2);",
"if (!model_pieces[0]) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
... |
16,382 | static int srt_encode_frame(AVCodecContext *avctx,
unsigned char *buf, int bufsize, const AVSubtitle *sub)
{
SRTContext *s = avctx->priv_data;
ASSDialog *dialog;
int i, len, num;
s->ptr = s->buffer;
s->end = s->ptr + sizeof(s->buffer);
for (i=0; i<sub->num... | true | FFmpeg | eb36ee1ee11c269e24ad4595fadf50e78463d5e2 | static int srt_encode_frame(AVCodecContext *avctx,
unsigned char *buf, int bufsize, const AVSubtitle *sub)
{
SRTContext *s = avctx->priv_data;
ASSDialog *dialog;
int i, len, num;
s->ptr = s->buffer;
s->end = s->ptr + sizeof(s->buffer);
for (i=0; i<sub->num... | {
"code": [
" s->dialog_start = s->ptr - 2;"
],
"line_no": [
65
]
} | static int FUNC_0(AVCodecContext *VAR_0,
unsigned char *VAR_1, int VAR_2, const AVSubtitle *VAR_3)
{
SRTContext *s = VAR_0->priv_data;
ASSDialog *dialog;
int VAR_4, VAR_5, VAR_6;
s->ptr = s->buffer;
s->end = s->ptr + sizeof(s->buffer);
for (VAR_4=0; VAR_4<... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nunsigned char *VAR_1, int VAR_2, const AVSubtitle *VAR_3)\n{",
"SRTContext *s = VAR_0->priv_data;",
"ASSDialog *dialog;",
"int VAR_4, VAR_5, VAR_6;",
"s->ptr = s->buffer;",
"s->end = s->ptr + sizeof(s->buffer);",
"for (VAR_4=0; VAR_4<VAR_3->num_rects; 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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
16,383 | static int img_info(int argc, char **argv)
{
int c;
OutputFormat output_format = OFORMAT_HUMAN;
bool chain = false;
const char *filename, *fmt, *output;
ImageInfoList *list;
bool image_opts = false;
fmt = NULL;
output = NULL;
for(;;) {
int option_index = 0;
... | true | qemu | c919297379e9980c2bcc4d2053addbc1fd6d762b | static int img_info(int argc, char **argv)
{
int c;
OutputFormat output_format = OFORMAT_HUMAN;
bool chain = false;
const char *filename, *fmt, *output;
ImageInfoList *list;
bool image_opts = false;
fmt = NULL;
output = NULL;
for(;;) {
int option_index = 0;
... | {
"code": [
" c = getopt_long(argc, argv, \"f:h\",",
" c = getopt_long(argc, argv, \"f:h\",",
" case 'h':",
" case 'h':",
" case 'h':"
],
"line_no": [
45,
45,
59,
59,
59
]
} | static int FUNC_0(int VAR_0, char **VAR_1)
{
int VAR_2;
OutputFormat output_format = OFORMAT_HUMAN;
bool chain = false;
const char *VAR_3, *VAR_4, *VAR_5;
ImageInfoList *list;
bool image_opts = false;
VAR_4 = NULL;
VAR_5 = NULL;
for(;;) {
int VAR_6 = 0;
... | [
"static int FUNC_0(int VAR_0, char **VAR_1)\n{",
"int VAR_2;",
"OutputFormat output_format = OFORMAT_HUMAN;",
"bool chain = false;",
"const char *VAR_3, *VAR_4, *VAR_5;",
"ImageInfoList *list;",
"bool image_opts = false;",
"VAR_4 = NULL;",
"VAR_5 = NULL;",
"for(;;) {",
"int VAR_6 = 0;",
"stati... | [
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
16,384 | void pp_postprocess(const uint8_t * src[3], const int srcStride[3],
uint8_t * dst[3], const int dstStride[3],
int width, int height,
const QP_STORE_T *QP_store, int QPStride,
pp_mode *vm, void *vc, int pict_type)
{
int mbWi... | true | FFmpeg | 590743101dc934043f34013f1c9bb9fb261355b0 | void pp_postprocess(const uint8_t * src[3], const int srcStride[3],
uint8_t * dst[3], const int dstStride[3],
int width, int height,
const QP_STORE_T *QP_store, int QPStride,
pp_mode *vm, void *vc, int pict_type)
{
int mbWi... | {
"code": [
" ((uint32_t*)c->nonBQPTable)[i] = ((const uint32_t*)QP_store)[i] & 0x3F3F3F3F;"
],
"line_no": [
117
]
} | void FUNC_0(const uint8_t * VAR_0[3], const int VAR_1[3],
uint8_t * VAR_2[3], const int VAR_3[3],
int VAR_4, int VAR_5,
const QP_STORE_T *VAR_6, int VAR_7,
pp_mode *VAR_8, void *VAR_9, int VAR_10)
{
int VAR_11 = (VAR_4+15)>... | [
"void FUNC_0(const uint8_t * VAR_0[3], const int VAR_1[3],\nuint8_t * VAR_2[3], const int VAR_3[3],\nint VAR_4, int VAR_5,\nconst QP_STORE_T *VAR_6, int VAR_7,\npp_mode *VAR_8, void *VAR_9, int VAR_10)\n{",
"int VAR_11 = (VAR_4+15)>>4;",
"int VAR_12= (VAR_5+15)>>4;",
"PPMode *mode = VAR_8;",
"PPContext *... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29,
31,
33,
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51,
53
],
[
55
],
[... |
16,386 | static int handle_sigp(S390CPU *cpu, uint8_t ipa1, uint32_t ipb)
{
CPUS390XState *env = &cpu->env;
const uint8_t r1 = ipa1 >> 4;
const uint8_t r3 = ipa1 & 0x0f;
int ret;
uint8_t order;
uint64_t *status_reg;
uint64_t param;
S390CPU *dst_cpu = NULL;
cpu_synchronize_state(CP... | false | qemu | 74b4c74d5efb0a489bdf0acc5b5d0197167e7649 | static int handle_sigp(S390CPU *cpu, uint8_t ipa1, uint32_t ipb)
{
CPUS390XState *env = &cpu->env;
const uint8_t r1 = ipa1 >> 4;
const uint8_t r3 = ipa1 & 0x0f;
int ret;
uint8_t order;
uint64_t *status_reg;
uint64_t param;
S390CPU *dst_cpu = NULL;
cpu_synchronize_state(CP... | {
"code": [],
"line_no": []
} | static int FUNC_0(S390CPU *VAR_0, uint8_t VAR_1, uint32_t VAR_2)
{
CPUS390XState *env = &VAR_0->env;
const uint8_t VAR_3 = VAR_1 >> 4;
const uint8_t VAR_4 = VAR_1 & 0x0f;
int VAR_5;
uint8_t order;
uint64_t *status_reg;
uint64_t param;
S390CPU *dst_cpu = NULL;
cpu_synchron... | [
"static int FUNC_0(S390CPU *VAR_0, uint8_t VAR_1, uint32_t VAR_2)\n{",
"CPUS390XState *env = &VAR_0->env;",
"const uint8_t VAR_3 = VAR_1 >> 4;",
"const uint8_t VAR_4 = VAR_1 & 0x0f;",
"int VAR_5;",
"uint8_t order;",
"uint64_t *status_reg;",
"uint64_t param;",
"S390CPU *dst_cpu = NULL;",
"cpu_synch... | [
0,
0,
0,
0,
0,
0,
0,
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
],
[
29,
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51,
53
... |
16,387 | static void bt_hci_done(struct HCIInfo *info)
{
struct bt_hci_s *hci = hci_from_info(info);
int handle;
bt_device_done(&hci->device);
if (hci->device.lmp_name)
g_free((void *) hci->device.lmp_name);
/* Be gentle and send DISCONNECT to all connected peers and those
* curren... | false | qemu | ef1e1e0782e99c9dcf2b35e5310cdd8ca9211374 | static void bt_hci_done(struct HCIInfo *info)
{
struct bt_hci_s *hci = hci_from_info(info);
int handle;
bt_device_done(&hci->device);
if (hci->device.lmp_name)
g_free((void *) hci->device.lmp_name);
if (hci->conn_req_host) {
bt_hci_connection_reject(hci,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(struct HCIInfo *VAR_0)
{
struct bt_hci_s *VAR_1 = hci_from_info(VAR_0);
int VAR_2;
bt_device_done(&VAR_1->device);
if (VAR_1->device.lmp_name)
g_free((void *) VAR_1->device.lmp_name);
if (VAR_1->conn_req_host) {
bt_hci_connection_reject(VAR_... | [
"static void FUNC_0(struct HCIInfo *VAR_0)\n{",
"struct bt_hci_s *VAR_1 = hci_from_info(VAR_0);",
"int VAR_2;",
"bt_device_done(&VAR_1->device);",
"if (VAR_1->device.lmp_name)\ng_free((void *) VAR_1->device.lmp_name);",
"if (VAR_1->conn_req_host) {",
"bt_hci_connection_reject(VAR_1,\nVAR_1->conn_req_hos... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15,
17
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43,
45
],
[
67
],
[
69
],
[
71
],
[
75
],
[
77
]
] |
16,388 | static int get_port(const struct sockaddr_storage *ss)
{
sockaddr_union ssu = (sockaddr_union){.storage = *ss};
if (ss->ss_family == AF_INET)
return ntohs(ssu.in.sin_port);
#if HAVE_STRUCT_SOCKADDR_IN6
if (ss->ss_family == AF_INET6)
return ntohs(ssu.in6.sin6_port);
#endif
return... | false | FFmpeg | 474d858fd9551b45a17e1f3a4322de1a88e749b9 | static int get_port(const struct sockaddr_storage *ss)
{
sockaddr_union ssu = (sockaddr_union){.storage = *ss};
if (ss->ss_family == AF_INET)
return ntohs(ssu.in.sin_port);
#if HAVE_STRUCT_SOCKADDR_IN6
if (ss->ss_family == AF_INET6)
return ntohs(ssu.in6.sin6_port);
#endif
return... | {
"code": [],
"line_no": []
} | static int FUNC_0(const struct sockaddr_storage *VAR_0)
{
sockaddr_union ssu = (sockaddr_union){.storage = *VAR_0};
if (VAR_0->ss_family == AF_INET)
return ntohs(ssu.in.sin_port);
#if HAVE_STRUCT_SOCKADDR_IN6
if (VAR_0->ss_family == AF_INET6)
return ntohs(ssu.in6.sin6_port);
#endif
... | [
"static int FUNC_0(const struct sockaddr_storage *VAR_0)\n{",
"sockaddr_union ssu = (sockaddr_union){.storage = *VAR_0};",
"if (VAR_0->ss_family == AF_INET)\nreturn ntohs(ssu.in.sin_port);",
"#if HAVE_STRUCT_SOCKADDR_IN6\nif (VAR_0->ss_family == AF_INET6)\nreturn ntohs(ssu.in6.sin6_port);",
"#endif\nreturn ... | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13,
15
],
[
17,
19
],
[
21
]
] |
16,389 | int avformat_network_deinit(void)
{
#if CONFIG_NETWORK
ff_network_close();
ff_tls_deinit();
ff_network_inited_globally = 0;
#endif
return 0;
}
| false | FFmpeg | 631c56a8e46dea41585f3e7b3ef9c52b49faa385 | int avformat_network_deinit(void)
{
#if CONFIG_NETWORK
ff_network_close();
ff_tls_deinit();
ff_network_inited_globally = 0;
#endif
return 0;
}
| {
"code": [],
"line_no": []
} | int FUNC_0(void)
{
#if CONFIG_NETWORK
ff_network_close();
ff_tls_deinit();
ff_network_inited_globally = 0;
#endif
return 0;
}
| [
"int FUNC_0(void)\n{",
"#if CONFIG_NETWORK\nff_network_close();",
"ff_tls_deinit();",
"ff_network_inited_globally = 0;",
"#endif\nreturn 0;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13,
15
],
[
17
]
] |
16,390 | void ff_avg_h264_qpel8_mc02_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride)
{
avc_luma_vt_and_aver_dst_8x8_msa(src - (stride * 2), stride, dst, stride);
}
| false | FFmpeg | 72dbc610be3272ba36603f78a39cc2d2d8fe0cc3 | void ff_avg_h264_qpel8_mc02_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride)
{
avc_luma_vt_and_aver_dst_8x8_msa(src - (stride * 2), stride, dst, stride);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1,
ptrdiff_t VAR_2)
{
avc_luma_vt_and_aver_dst_8x8_msa(VAR_1 - (VAR_2 * 2), VAR_2, VAR_0, VAR_2);
}
| [
"void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1,\nptrdiff_t VAR_2)\n{",
"avc_luma_vt_and_aver_dst_8x8_msa(VAR_1 - (VAR_2 * 2), VAR_2, VAR_0, VAR_2);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
16,391 | static void gen_spr_vtb(CPUPPCState *env)
{
spr_register(env, SPR_VTB, "VTB",
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_tbl, SPR_NOACCESS,
0x00000000);
}
| false | qemu | 6dd836f5d32b989e18c6dda655a26f4d73a52f6a | static void gen_spr_vtb(CPUPPCState *env)
{
spr_register(env, SPR_VTB, "VTB",
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_tbl, SPR_NOACCESS,
0x00000000);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(CPUPPCState *VAR_0)
{
spr_register(VAR_0, SPR_VTB, "VTB",
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_tbl, SPR_NOACCESS,
0x00000000);
}
| [
"static void FUNC_0(CPUPPCState *VAR_0)\n{",
"spr_register(VAR_0, SPR_VTB, \"VTB\",\nSPR_NOACCESS, SPR_NOACCESS,\n&spr_read_tbl, SPR_NOACCESS,\n0x00000000);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5,
7,
9,
11
],
[
13
]
] |
16,392 | static void bswap_note(struct elf_note *en)
{
bswap32s(&en->n_namesz);
bswap32s(&en->n_descsz);
bswap32s(&en->n_type);
}
| false | qemu | 991f8f0c91d65cebf51fa931450e02b0d5209012 | static void bswap_note(struct elf_note *en)
{
bswap32s(&en->n_namesz);
bswap32s(&en->n_descsz);
bswap32s(&en->n_type);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(struct elf_note *VAR_0)
{
bswap32s(&VAR_0->n_namesz);
bswap32s(&VAR_0->n_descsz);
bswap32s(&VAR_0->n_type);
}
| [
"static void FUNC_0(struct elf_note *VAR_0)\n{",
"bswap32s(&VAR_0->n_namesz);",
"bswap32s(&VAR_0->n_descsz);",
"bswap32s(&VAR_0->n_type);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
16,393 | void ide_init_drive(IDEState *s, DriveInfo *dinfo,
const char *version, const char *serial)
{
int cylinders, heads, secs;
uint64_t nb_sectors;
s->bs = dinfo->bdrv;
bdrv_get_geometry(s->bs, &nb_sectors);
bdrv_guess_geometry(s->bs, &cylinders, &heads, &secs);
s->cylin... | false | qemu | f8b6cc0070aab8b75bd082582c829be1353f395f | void ide_init_drive(IDEState *s, DriveInfo *dinfo,
const char *version, const char *serial)
{
int cylinders, heads, secs;
uint64_t nb_sectors;
s->bs = dinfo->bdrv;
bdrv_get_geometry(s->bs, &nb_sectors);
bdrv_guess_geometry(s->bs, &cylinders, &heads, &secs);
s->cylin... | {
"code": [],
"line_no": []
} | void FUNC_0(IDEState *VAR_0, DriveInfo *VAR_1,
const char *VAR_2, const char *VAR_3)
{
int VAR_4, VAR_5, VAR_6;
uint64_t nb_sectors;
VAR_0->bs = VAR_1->bdrv;
bdrv_get_geometry(VAR_0->bs, &nb_sectors);
bdrv_guess_geometry(VAR_0->bs, &VAR_4, &VAR_5, &VAR_6);
VAR_0->VA... | [
"void FUNC_0(IDEState *VAR_0, DriveInfo *VAR_1,\nconst char *VAR_2, const char *VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6;",
"uint64_t nb_sectors;",
"VAR_0->bs = VAR_1->bdrv;",
"bdrv_get_geometry(VAR_0->bs, &nb_sectors);",
"bdrv_guess_geometry(VAR_0->bs, &VAR_4, &VAR_5, &VAR_6);",
"VAR_0->VAR_4 = 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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
16,394 | static inline int dmg_read_chunk(BlockDriverState *bs, uint64_t sector_num)
{
BDRVDMGState *s = bs->opaque;
if (!is_sector_in_chunk(s, s->current_chunk, sector_num)) {
int ret;
uint32_t chunk = search_chunk(s, sector_num);
#ifdef CONFIG_BZIP2
uint64_t total_out;
#endif
... | false | qemu | 177b75104da3e3a9af84975c32a44782d903c41f | static inline int dmg_read_chunk(BlockDriverState *bs, uint64_t sector_num)
{
BDRVDMGState *s = bs->opaque;
if (!is_sector_in_chunk(s, s->current_chunk, sector_num)) {
int ret;
uint32_t chunk = search_chunk(s, sector_num);
#ifdef CONFIG_BZIP2
uint64_t total_out;
#endif
... | {
"code": [],
"line_no": []
} | static inline int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1)
{
BDRVDMGState *s = VAR_0->opaque;
if (!is_sector_in_chunk(s, s->current_chunk, VAR_1)) {
int VAR_2;
uint32_t chunk = search_chunk(s, VAR_1);
#ifdef CONFIG_BZIP2
uint64_t total_out;
#endif
if (chunk >=... | [
"static inline int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1)\n{",
"BDRVDMGState *s = VAR_0->opaque;",
"if (!is_sector_in_chunk(s, s->current_chunk, VAR_1)) {",
"int VAR_2;",
"uint32_t chunk = search_chunk(s, VAR_1);",
"#ifdef CONFIG_BZIP2\nuint64_t total_out;",
"#endif\nif (chunk >= s->n_chunks) {... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
],
... |
16,395 | static void qmp_output_add_obj(QmpOutputVisitor *qov, const char *name,
QObject *value)
{
QStackEntry *e = QTAILQ_FIRST(&qov->stack);
QObject *cur = e ? e->value : NULL;
if (!cur) {
/* FIXME we should require the user to reset the visitor, rather
* th... | false | qemu | 56a6f02b8ce1fe41a2a9077593e46eca7d98267d | static void qmp_output_add_obj(QmpOutputVisitor *qov, const char *name,
QObject *value)
{
QStackEntry *e = QTAILQ_FIRST(&qov->stack);
QObject *cur = e ? e->value : NULL;
if (!cur) {
qobject_decref(qov->root);
qov->root = value;
} else ... | {
"code": [],
"line_no": []
} | static void FUNC_0(QmpOutputVisitor *VAR_0, const char *VAR_1,
QObject *VAR_2)
{
QStackEntry *e = QTAILQ_FIRST(&VAR_0->stack);
QObject *cur = e ? e->VAR_2 : NULL;
if (!cur) {
qobject_decref(VAR_0->root);
VAR_0->root = VAR_2;
} else {
... | [
"static void FUNC_0(QmpOutputVisitor *VAR_0, const char *VAR_1,\nQObject *VAR_2)\n{",
"QStackEntry *e = QTAILQ_FIRST(&VAR_0->stack);",
"QObject *cur = e ? e->VAR_2 : NULL;",
"if (!cur) {",
"qobject_decref(VAR_0->root);",
"VAR_0->root = VAR_2;",
"} else {",
"switch (qobject_type(cur)) {",
"case QTYPE... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
]
] |
16,397 | static GenericList *qapi_dealloc_next_list(Visitor *v, GenericList **list,
Error **errp)
{
GenericList *retval = *list;
g_free(retval->value);
*list = retval->next;
return retval;
}
| false | qemu | 5666dd19dd95d966be00d0c3e7efdfaecc096ff3 | static GenericList *qapi_dealloc_next_list(Visitor *v, GenericList **list,
Error **errp)
{
GenericList *retval = *list;
g_free(retval->value);
*list = retval->next;
return retval;
}
| {
"code": [],
"line_no": []
} | static GenericList *FUNC_0(Visitor *v, GenericList **list,
Error **errp)
{
GenericList *retval = *list;
g_free(retval->value);
*list = retval->next;
return retval;
}
| [
"static GenericList *FUNC_0(Visitor *v, GenericList **list,\nError **errp)\n{",
"GenericList *retval = *list;",
"g_free(retval->value);",
"*list = retval->next;",
"return retval;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
16,398 | static int nbd_co_discard(BlockDriverState *bs, int64_t sector_num,
int nb_sectors)
{
BDRVNBDState *s = bs->opaque;
struct nbd_request request;
struct nbd_reply reply;
if (!(s->nbdflags & NBD_FLAG_SEND_TRIM)) {
return 0;
}
request.type = NBD_CMD_TRIM;... | false | qemu | fc19f8a02e45c4d8ad24dd7eb374330b03dfc28e | static int nbd_co_discard(BlockDriverState *bs, int64_t sector_num,
int nb_sectors)
{
BDRVNBDState *s = bs->opaque;
struct nbd_request request;
struct nbd_reply reply;
if (!(s->nbdflags & NBD_FLAG_SEND_TRIM)) {
return 0;
}
request.type = NBD_CMD_TRIM;... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,
int VAR_2)
{
BDRVNBDState *s = VAR_0->opaque;
struct nbd_request VAR_3;
struct nbd_reply VAR_4;
if (!(s->nbdflags & NBD_FLAG_SEND_TRIM)) {
return 0;
}
VAR_3.type = NBD_CMD_TRIM;
VAR_3.from... | [
"static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,\nint VAR_2)\n{",
"BDRVNBDState *s = VAR_0->opaque;",
"struct nbd_request VAR_3;",
"struct nbd_reply VAR_4;",
"if (!(s->nbdflags & NBD_FLAG_SEND_TRIM)) {",
"return 0;",
"}",
"VAR_3.type = NBD_CMD_TRIM;",
"VAR_3.from = VAR_1 * 512;;",
"VAR_3... | [
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
16,399 | static bool memory_region_access_valid(MemoryRegion *mr,
target_phys_addr_t addr,
unsigned size)
{
if (!mr->ops->valid.unaligned && (addr & (size - 1))) {
return false;
}
/* Treat zero as compatibility all valid *... | false | qemu | 897fa7cff21a98b260a5b3e73eae39273fa60272 | static bool memory_region_access_valid(MemoryRegion *mr,
target_phys_addr_t addr,
unsigned size)
{
if (!mr->ops->valid.unaligned && (addr & (size - 1))) {
return false;
}
if (!mr->ops->valid.max_access_size)... | {
"code": [],
"line_no": []
} | static bool FUNC_0(MemoryRegion *mr,
target_phys_addr_t addr,
unsigned size)
{
if (!mr->ops->valid.unaligned && (addr & (size - 1))) {
return false;
}
if (!mr->ops->valid.max_access_size) {
return t... | [
"static bool FUNC_0(MemoryRegion *mr,\ntarget_phys_addr_t addr,\nunsigned size)\n{",
"if (!mr->ops->valid.unaligned && (addr & (size - 1))) {",
"return false;",
"}",
"if (!mr->ops->valid.max_access_size) {",
"return true;",
"}",
"if (size > mr->ops->valid.max_access_size\n|| size < mr->ops->valid.min_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
16,400 | static int pci_pcnet_init(PCIDevice *pci_dev)
{
PCIPCNetState *d = DO_UPCAST(PCIPCNetState, pci_dev, pci_dev);
PCNetState *s = &d->state;
uint8_t *pci_conf;
#if 0
printf("sizeof(RMD)=%d, sizeof(TMD)=%d\n",
sizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD));
#endif
pci_conf = pc... | false | qemu | d7dccd11683d17e4658606349544312a0769ecea | static int pci_pcnet_init(PCIDevice *pci_dev)
{
PCIPCNetState *d = DO_UPCAST(PCIPCNetState, pci_dev, pci_dev);
PCNetState *s = &d->state;
uint8_t *pci_conf;
#if 0
printf("sizeof(RMD)=%d, sizeof(TMD)=%d\n",
sizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD));
#endif
pci_conf = pc... | {
"code": [],
"line_no": []
} | static int FUNC_0(PCIDevice *VAR_0)
{
PCIPCNetState *d = DO_UPCAST(PCIPCNetState, VAR_0, VAR_0);
PCNetState *s = &d->state;
uint8_t *pci_conf;
#if 0
printf("sizeof(RMD)=%d, sizeof(TMD)=%d\n",
sizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD));
#endif
pci_conf = VAR_0->config;
... | [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"PCIPCNetState *d = DO_UPCAST(PCIPCNetState, VAR_0, VAR_0);",
"PCNetState *s = &d->state;",
"uint8_t *pci_conf;",
"#if 0\nprintf(\"sizeof(RMD)=%d, sizeof(TMD)=%d\\n\",\nsizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD));",
"#endif\npci_conf = VAR_0->config;",
"... | [
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
57,
59,
61
... |
16,401 | static int dvvideo_encode_close(AVCodecContext *avctx)
{
av_frame_free(&avctx->coded_frame);
return 0;
}
| false | FFmpeg | d6604b29ef544793479d7fb4e05ef6622bb3e534 | static int dvvideo_encode_close(AVCodecContext *avctx)
{
av_frame_free(&avctx->coded_frame);
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0)
{
av_frame_free(&VAR_0->coded_frame);
return 0;
}
| [
"static int FUNC_0(AVCodecContext *VAR_0)\n{",
"av_frame_free(&VAR_0->coded_frame);",
"return 0;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
16,402 | void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, bool smm_enabled,
qemu_irq sci_irq)
{
memory_region_init(&pm->io, OBJECT(lpc_pci), "ich9-pm", ICH9_PMIO_SIZE);
memory_region_set_enabled(&pm->io, false);
memory_region_add_subregion(pci_address_space_io(lpc_pci),
... | false | qemu | 920557971b60e53c2f3f22e5d6c620ab1ed411fd | void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, bool smm_enabled,
qemu_irq sci_irq)
{
memory_region_init(&pm->io, OBJECT(lpc_pci), "ich9-pm", ICH9_PMIO_SIZE);
memory_region_set_enabled(&pm->io, false);
memory_region_add_subregion(pci_address_space_io(lpc_pci),
... | {
"code": [],
"line_no": []
} | void FUNC_0(PCIDevice *VAR_0, ICH9LPCPMRegs *VAR_1, bool VAR_2,
qemu_irq VAR_3)
{
memory_region_init(&VAR_1->io, OBJECT(VAR_0), "ich9-VAR_1", ICH9_PMIO_SIZE);
memory_region_set_enabled(&VAR_1->io, false);
memory_region_add_subregion(pci_address_space_io(VAR_0),
... | [
"void FUNC_0(PCIDevice *VAR_0, ICH9LPCPMRegs *VAR_1, bool VAR_2,\nqemu_irq VAR_3)\n{",
"memory_region_init(&VAR_1->io, OBJECT(VAR_0), \"ich9-VAR_1\", ICH9_PMIO_SIZE);",
"memory_region_set_enabled(&VAR_1->io, false);",
"memory_region_add_subregion(pci_address_space_io(VAR_0),\n0, &VAR_1->io);",
"acpi_pm_tmr_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11,
13
],
[
17
],
[
19
],
[
21,
23
],
[
27
],
[
29,
31
],
[
33
],
[
37,
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[... |
16,403 | static inline int gen_intermediate_code_internal(CPUState *env,
TranslationBlock *tb,
int search_pc)
{
DisasContext dc1, *dc = &dc1;
uint8_t *pc_ptr;
uint16_t *gen_opc_end;
int flags, j, lj;
ui... | false | qemu | 415fa2ea77b726ea5a5768d659881e919df1fcf2 | static inline int gen_intermediate_code_internal(CPUState *env,
TranslationBlock *tb,
int search_pc)
{
DisasContext dc1, *dc = &dc1;
uint8_t *pc_ptr;
uint16_t *gen_opc_end;
int flags, j, lj;
ui... | {
"code": [],
"line_no": []
} | static inline int FUNC_0(CPUState *VAR_0,
TranslationBlock *VAR_1,
int VAR_2)
{
DisasContext dc1, *dc = &dc1;
uint8_t *pc_ptr;
uint16_t *gen_opc_end;
int VAR_3, VAR_4, VAR_5;
uint8_t *pc_start;... | [
"static inline int FUNC_0(CPUState *VAR_0,\nTranslationBlock *VAR_1,\nint VAR_2)\n{",
"DisasContext dc1, *dc = &dc1;",
"uint8_t *pc_ptr;",
"uint16_t *gen_opc_end;",
"int VAR_3, VAR_4, VAR_5;",
"uint8_t *pc_start;",
"uint8_t *cs_base;",
"pc_start = (uint8_t *)VAR_1->pc;",
"cs_base = (uint8_t *)VAR_1-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
16,404 | static void nbd_detach_aio_context(BlockDriverState *bs)
{
BDRVNBDState *s = bs->opaque;
nbd_client_session_detach_aio_context(&s->client);
}
| false | qemu | f53a829bb9ef14be800556cbc02d8b20fc1050a7 | static void nbd_detach_aio_context(BlockDriverState *bs)
{
BDRVNBDState *s = bs->opaque;
nbd_client_session_detach_aio_context(&s->client);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0)
{
BDRVNBDState *s = VAR_0->opaque;
nbd_client_session_detach_aio_context(&s->client);
}
| [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVNBDState *s = VAR_0->opaque;",
"nbd_client_session_detach_aio_context(&s->client);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
16,405 | void *g_malloc0_n(size_t nmemb, size_t size)
{
size_t sz;
void *ptr;
__coverity_negative_sink__(nmemb);
__coverity_negative_sink__(size);
sz = nmemb * size;
ptr = __coverity_alloc__(size);
__coverity_writeall0__(ptr);
__coverity_mark_as_afm_allocated__(ptr, AFM_free);
ret... | false | qemu | 7ad4c7200111d20eb97eed4f46b6026e3f0b0eef | void *g_malloc0_n(size_t nmemb, size_t size)
{
size_t sz;
void *ptr;
__coverity_negative_sink__(nmemb);
__coverity_negative_sink__(size);
sz = nmemb * size;
ptr = __coverity_alloc__(size);
__coverity_writeall0__(ptr);
__coverity_mark_as_afm_allocated__(ptr, AFM_free);
ret... | {
"code": [],
"line_no": []
} | void *FUNC_0(size_t VAR_0, size_t VAR_1)
{
size_t sz;
void *VAR_2;
__coverity_negative_sink__(VAR_0);
__coverity_negative_sink__(VAR_1);
sz = VAR_0 * VAR_1;
VAR_2 = __coverity_alloc__(VAR_1);
__coverity_writeall0__(VAR_2);
__coverity_mark_as_afm_allocated__(VAR_2, AFM_free);
... | [
"void *FUNC_0(size_t VAR_0, size_t VAR_1)\n{",
"size_t sz;",
"void *VAR_2;",
"__coverity_negative_sink__(VAR_0);",
"__coverity_negative_sink__(VAR_1);",
"sz = VAR_0 * VAR_1;",
"VAR_2 = __coverity_alloc__(VAR_1);",
"__coverity_writeall0__(VAR_2);",
"__coverity_mark_as_afm_allocated__(VAR_2, AFM_free)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
16,407 | static uint32_t nvram_readb (void *opaque, target_phys_addr_t addr)
{
M48t59State *NVRAM = opaque;
uint32_t retval;
retval = m48t59_read(NVRAM, addr);
return retval;
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint32_t nvram_readb (void *opaque, target_phys_addr_t addr)
{
M48t59State *NVRAM = opaque;
uint32_t retval;
retval = m48t59_read(NVRAM, addr);
return retval;
}
| {
"code": [],
"line_no": []
} | static uint32_t FUNC_0 (void *opaque, target_phys_addr_t addr)
{
M48t59State *NVRAM = opaque;
uint32_t retval;
retval = m48t59_read(NVRAM, addr);
return retval;
}
| [
"static uint32_t FUNC_0 (void *opaque, target_phys_addr_t addr)\n{",
"M48t59State *NVRAM = opaque;",
"uint32_t retval;",
"retval = m48t59_read(NVRAM, addr);",
"return retval;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
]
] |
16,413 | static void coroutine_fn commit_run(void *opaque)
{
CommitBlockJob *s = opaque;
BlockDriverState *active = s->active;
BlockDriverState *top = s->top;
BlockDriverState *base = s->base;
BlockDriverState *overlay_bs;
int64_t sector_num, end;
int ret = 0;
int n = 0;
void *buf;
... | false | qemu | 9e85cd5ce0d3fc99d910428c9fd9d267764d341b | static void coroutine_fn commit_run(void *opaque)
{
CommitBlockJob *s = opaque;
BlockDriverState *active = s->active;
BlockDriverState *top = s->top;
BlockDriverState *base = s->base;
BlockDriverState *overlay_bs;
int64_t sector_num, end;
int ret = 0;
int n = 0;
void *buf;
... | {
"code": [],
"line_no": []
} | static void VAR_0 commit_run(void *opaque)
{
CommitBlockJob *s = opaque;
BlockDriverState *active = s->active;
BlockDriverState *top = s->top;
BlockDriverState *base = s->base;
BlockDriverState *overlay_bs;
int64_t sector_num, end;
int ret = 0;
int n = 0;
void *buf;
in... | [
"static void VAR_0 commit_run(void *opaque)\n{",
"CommitBlockJob *s = opaque;",
"BlockDriverState *active = s->active;",
"BlockDriverState *top = s->top;",
"BlockDriverState *base = s->base;",
"BlockDriverState *overlay_bs;",
"int64_t sector_num, end;",
"int ret = 0;",
"int n = 0;",
"void *buf;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
... |
16,416 | static int nvme_start_ctrl(NvmeCtrl *n)
{
uint32_t page_bits = NVME_CC_MPS(n->bar.cc) + 12;
uint32_t page_size = 1 << page_bits;
if (n->cq[0] || n->sq[0] || !n->bar.asq || !n->bar.acq ||
n->bar.asq & (page_size - 1) || n->bar.acq & (page_size - 1) ||
NVME_CC_MPS(n->bar.cc) < ... | false | qemu | 720fdd6fa92df9041316e94816ab7e56abaed4e9 | static int nvme_start_ctrl(NvmeCtrl *n)
{
uint32_t page_bits = NVME_CC_MPS(n->bar.cc) + 12;
uint32_t page_size = 1 << page_bits;
if (n->cq[0] || n->sq[0] || !n->bar.asq || !n->bar.acq ||
n->bar.asq & (page_size - 1) || n->bar.acq & (page_size - 1) ||
NVME_CC_MPS(n->bar.cc) < ... | {
"code": [],
"line_no": []
} | static int FUNC_0(NvmeCtrl *VAR_0)
{
uint32_t page_bits = NVME_CC_MPS(VAR_0->bar.cc) + 12;
uint32_t page_size = 1 << page_bits;
if (VAR_0->cq[0] || VAR_0->sq[0] || !VAR_0->bar.asq || !VAR_0->bar.acq ||
VAR_0->bar.asq & (page_size - 1) || VAR_0->bar.acq & (page_size - 1) ||
NV... | [
"static int FUNC_0(NvmeCtrl *VAR_0)\n{",
"uint32_t page_bits = NVME_CC_MPS(VAR_0->bar.cc) + 12;",
"uint32_t page_size = 1 << page_bits;",
"if (VAR_0->cq[0] || VAR_0->sq[0] || !VAR_0->bar.asq || !VAR_0->bar.acq ||\nVAR_0->bar.asq & (page_size - 1) || VAR_0->bar.acq & (page_size - 1) ||\nNVME_CC_MPS(VAR_0->bar.... | [
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
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51,
53
],
[
57
],
... |
16,417 | static void netmap_send(void *opaque)
{
NetmapState *s = opaque;
struct netmap_ring *ring = s->me.rx;
/* Keep sending while there are available packets into the netmap
RX ring and the forwarding path towards the peer is open. */
while (!nm_ring_empty(ring) && qemu_can_send_packet(&s->nc))... | false | qemu | e8dd1d9c396104f0fac4b39a701143df49df2a74 | static void netmap_send(void *opaque)
{
NetmapState *s = opaque;
struct netmap_ring *ring = s->me.rx;
while (!nm_ring_empty(ring) && qemu_can_send_packet(&s->nc)) {
uint32_t i;
uint32_t idx;
bool morefrag;
int iovcnt = 0;
int iovsize;
do ... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
NetmapState *s = VAR_0;
struct netmap_ring *VAR_1 = s->me.rx;
while (!nm_ring_empty(VAR_1) && qemu_can_send_packet(&s->nc)) {
uint32_t i;
uint32_t idx;
bool morefrag;
int VAR_2 = 0;
int VAR_3;
do {
... | [
"static void FUNC_0(void *VAR_0)\n{",
"NetmapState *s = VAR_0;",
"struct netmap_ring *VAR_1 = s->me.rx;",
"while (!nm_ring_empty(VAR_1) && qemu_can_send_packet(&s->nc)) {",
"uint32_t i;",
"uint32_t idx;",
"bool morefrag;",
"int VAR_2 = 0;",
"int VAR_3;",
"do {",
"i = VAR_1->cur;",
"idx = VAR_1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
51
],
[
53... |
16,418 | static uint64_t gpio_read(void *opaque, target_phys_addr_t addr, unsigned size)
{
struct gpio_state_t *s = opaque;
uint32_t r = 0;
addr >>= 2;
switch (addr)
{
case R_PA_DIN:
r = s->regs[RW_PA_DOUT] & s->regs[RW_PA_OE];
/* Encode pins from the nand. */
... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t gpio_read(void *opaque, target_phys_addr_t addr, unsigned size)
{
struct gpio_state_t *s = opaque;
uint32_t r = 0;
addr >>= 2;
switch (addr)
{
case R_PA_DIN:
r = s->regs[RW_PA_DOUT] & s->regs[RW_PA_OE];
r |= s->nand->rdy << 7... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr, unsigned size)
{
struct gpio_state_t *VAR_0 = opaque;
uint32_t r = 0;
addr >>= 2;
switch (addr)
{
case R_PA_DIN:
r = VAR_0->regs[RW_PA_DOUT] & VAR_0->regs[RW_PA_OE];
r |= VAR_0->n... | [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr, unsigned size)\n{",
"struct gpio_state_t *VAR_0 = opaque;",
"uint32_t r = 0;",
"addr >>= 2;",
"switch (addr)\n{",
"case R_PA_DIN:\nr = VAR_0->regs[RW_PA_DOUT] & VAR_0->regs[RW_PA_OE];",
"r |= VAR_0->nand->rdy << 7;",
"break;",
"case R_PD... | [
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
],
[
25
],
[
27
],
[
29,
31
],
[
37
],
[
39
],
[
43,
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
]
] |
16,420 | static void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int nr)
{
struct vfio_region_info *rom = NULL, *opregion = NULL,
*host = NULL, *lpc = NULL;
VFIOQuirk *quirk;
VFIOIGDQuirk *igd;
PCIDevice *lpc_bridge;
int i, ret, ggms_mb, gms_mb = 0, gen;
uint64_t *b... | false | qemu | 93587e3af3a259deac89c12863d93653d69d22b8 | static void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int nr)
{
struct vfio_region_info *rom = NULL, *opregion = NULL,
*host = NULL, *lpc = NULL;
VFIOQuirk *quirk;
VFIOIGDQuirk *igd;
PCIDevice *lpc_bridge;
int i, ret, ggms_mb, gms_mb = 0, gen;
uint64_t *b... | {
"code": [],
"line_no": []
} | static void FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1)
{
struct vfio_region_info *VAR_2 = NULL, *VAR_3 = NULL,
*VAR_4 = NULL, *VAR_5 = NULL;
VFIOQuirk *quirk;
VFIOIGDQuirk *igd;
PCIDevice *lpc_bridge;
int VAR_6, VAR_7, VAR_8, VAR_9 = 0, VAR_10;
uint64_t *bdsm_siz... | [
"static void FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1)\n{",
"struct vfio_region_info *VAR_2 = NULL, *VAR_3 = NULL,\n*VAR_4 = NULL, *VAR_5 = NULL;",
"VFIOQuirk *quirk;",
"VFIOIGDQuirk *igd;",
"PCIDevice *lpc_bridge;",
"int VAR_6, VAR_7, VAR_8, VAR_9 = 0, VAR_10;",
"uint64_t *bdsm_size;",
"uint32_t gmch;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29,
31
],
[
33
],
[
35
],
[
49
],
[
51
],
[
53,
55
],
[
57
],
[
59
],
[... |
16,421 | int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr,
int is_write1, int mmu_idx)
{
uint64_t ptep, pte;
target_ulong pde_addr, pte_addr;
int error_code, is_dirty, prot, page_size, is_write, is_user;
target_phys_addr_t paddr;
uint32_t page_offset;
... | false | qemu | a9321a4d49d65d29c2926a51aedc5b91a01f3591 | int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr,
int is_write1, int mmu_idx)
{
uint64_t ptep, pte;
target_ulong pde_addr, pte_addr;
int error_code, is_dirty, prot, page_size, is_write, is_user;
target_phys_addr_t paddr;
uint32_t page_offset;
... | {
"code": [],
"line_no": []
} | int FUNC_0(CPUX86State *VAR_0, target_ulong VAR_1,
int VAR_2, int VAR_3)
{
uint64_t ptep, pte;
target_ulong pde_addr, pte_addr;
int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;
target_phys_addr_t paddr;
uint32_t page_offset;
target_ulong vaddr, virt_addr;
... | [
"int FUNC_0(CPUX86State *VAR_0, target_ulong VAR_1,\nint VAR_2, int VAR_3)\n{",
"uint64_t ptep, pte;",
"target_ulong pde_addr, pte_addr;",
"int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;",
"target_phys_addr_t paddr;",
"uint32_t page_offset;",
"target_ulong vaddr, virt_addr;",
"VAR_9 = VAR_3 == MMU_USER... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25,
27
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
... |
16,423 | static void test_qga_invalid_args(gconstpointer fix)
{
const TestFixture *fixture = fix;
QDict *ret, *error;
const gchar *class, *desc;
ret = qmp_fd(fixture->fd, "{'execute': 'guest-ping', "
"'arguments': {'foo': 42 }}");
g_assert_nonnull(ret);
error = qdict_get_qdic... | true | qemu | 910f738b851a263396fc85b2052e47f884ffead3 | static void test_qga_invalid_args(gconstpointer fix)
{
const TestFixture *fixture = fix;
QDict *ret, *error;
const gchar *class, *desc;
ret = qmp_fd(fixture->fd, "{'execute': 'guest-ping', "
"'arguments': {'foo': 42 }}");
g_assert_nonnull(ret);
error = qdict_get_qdic... | {
"code": [
" g_assert_cmpstr(desc, ==, \"QMP input object member 'foo' is unexpected\");"
],
"line_no": [
31
]
} | static void FUNC_0(gconstpointer VAR_0)
{
const TestFixture *VAR_1 = VAR_0;
QDict *ret, *error;
const gchar *VAR_2, *desc;
ret = qmp_fd(VAR_1->fd, "{'execute': 'guest-ping', "
"'arguments': {'foo': 42 }}");
g_assert_nonnull(ret);
error = qdict_get_qdict(ret, "error")... | [
"static void FUNC_0(gconstpointer VAR_0)\n{",
"const TestFixture *VAR_1 = VAR_0;",
"QDict *ret, *error;",
"const gchar *VAR_2, *desc;",
"ret = qmp_fd(VAR_1->fd, \"{'execute': 'guest-ping', \"",
"\"'arguments': {'foo': 42 }}\");",
"g_assert_nonnull(ret);",
"error = qdict_get_qdict(ret, \"error\");",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
]
] |
16,424 | int ff_mlz_decompression(MLZ* mlz, GetBitContext* gb, int size, unsigned char *buff) {
MLZDict *dict = mlz->dict;
unsigned long output_chars;
int string_code, last_string_code, char_code;
string_code = 0;
char_code = -1;
last_string_code = -1;
output_chars = 0;
while (outpu... | true | FFmpeg | 1abcd972c4c0e16f1e83be2fd32a251f51b2946d | int ff_mlz_decompression(MLZ* mlz, GetBitContext* gb, int size, unsigned char *buff) {
MLZDict *dict = mlz->dict;
unsigned long output_chars;
int string_code, last_string_code, char_code;
string_code = 0;
char_code = -1;
last_string_code = -1;
output_chars = 0;
while (outpu... | {
"code": [],
"line_no": []
} | int FUNC_0(MLZ* VAR_0, GetBitContext* VAR_1, int VAR_2, unsigned char *VAR_3) {
MLZDict *dict = VAR_0->dict;
unsigned long VAR_4;
int VAR_5, VAR_6, VAR_7;
VAR_5 = 0;
VAR_7 = -1;
VAR_6 = -1;
VAR_4 = 0;
while (VAR_4 < VAR_2) {
VAR_5 = input_code(VAR_1, VAR_0->dic_cod... | [
"int FUNC_0(MLZ* VAR_0, GetBitContext* VAR_1, int VAR_2, unsigned char *VAR_3) {",
"MLZDict *dict = VAR_0->dict;",
"unsigned long VAR_4;",
"int VAR_5, VAR_6, VAR_7;",
"VAR_5 = 0;",
"VAR_7 = -1;",
"VAR_6 = -1;",
"VAR_4 = 0;",
"while (VAR_4 < VAR_2) {",
"VAR_5 = input_code(VAR_1, VAR_0->dic_code_b... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27,
29,
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45,
47
],
... |
16,426 | static void kvm_client_set_memory(struct CPUPhysMemoryClient *client,
target_phys_addr_t start_addr,
ram_addr_t size, ram_addr_t phys_offset,
bool log_dirty)
{
kvm_set_phys_mem(start_addr, size, phys_offset, l... | true | qemu | a01672d3968cf91208666d371784110bfde9d4f8 | static void kvm_client_set_memory(struct CPUPhysMemoryClient *client,
target_phys_addr_t start_addr,
ram_addr_t size, ram_addr_t phys_offset,
bool log_dirty)
{
kvm_set_phys_mem(start_addr, size, phys_offset, l... | {
"code": [
"static void kvm_client_set_memory(struct CPUPhysMemoryClient *client,",
" target_phys_addr_t start_addr,",
" ram_addr_t size, ram_addr_t phys_offset,",
" bool log_dirty)",
" kvm_set_p... | static void FUNC_0(struct CPUPhysMemoryClient *VAR_0,
target_phys_addr_t VAR_1,
ram_addr_t VAR_2, ram_addr_t VAR_3,
bool VAR_4)
{
kvm_set_phys_mem(VAR_1, VAR_2, VAR_3, VAR_4);
}
| [
"static void FUNC_0(struct CPUPhysMemoryClient *VAR_0,\ntarget_phys_addr_t VAR_1,\nram_addr_t VAR_2, ram_addr_t VAR_3,\nbool VAR_4)\n{",
"kvm_set_phys_mem(VAR_1, VAR_2, VAR_3, VAR_4);",
"}"
] | [
1,
1,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
]
] |
16,428 | static void balloon_stats_set_poll_interval(Object *obj, struct Visitor *v,
void *opaque, const char *name,
Error **errp)
{
VirtIOBalloon *s = opaque;
Error *local_err = NULL;
int64_t value;
visit_type_int(v... | true | qemu | 22644cd2c60151a964d9505f4c5f7baf845f20d8 | static void balloon_stats_set_poll_interval(Object *obj, struct Visitor *v,
void *opaque, const char *name,
Error **errp)
{
VirtIOBalloon *s = opaque;
Error *local_err = NULL;
int64_t value;
visit_type_int(v... | {
"code": [
" if (value > UINT_MAX) {"
],
"line_no": [
39
]
} | static void FUNC_0(Object *VAR_0, struct Visitor *VAR_1,
void *VAR_2, const char *VAR_3,
Error **VAR_4)
{
VirtIOBalloon *s = VAR_2;
Error *local_err = NULL;
int64_t value;
visit_type_int(VAR_1, &value, VAR_3... | [
"static void FUNC_0(Object *VAR_0, struct Visitor *VAR_1,\nvoid *VAR_2, const char *VAR_3,\nError **VAR_4)\n{",
"VirtIOBalloon *s = VAR_2;",
"Error *local_err = NULL;",
"int64_t value;",
"visit_type_int(VAR_1, &value, VAR_3, &local_err);",
"if (local_err) {",
"error_propagate(VAR_4, local_err);",
"ret... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
... |
16,429 | static OutputStream *choose_output(void)
{
int i;
int64_t opts_min = INT64_MAX;
OutputStream *ost_min = NULL;
for (i = 0; i < nb_output_streams; i++) {
OutputStream *ost = output_streams[i];
int64_t opts = av_rescale_q(ost->st->cur_dts, ost->st->time_base,
... | true | FFmpeg | 6770a9d6898a0c7561586dabd7a4e5b5187bed62 | static OutputStream *choose_output(void)
{
int i;
int64_t opts_min = INT64_MAX;
OutputStream *ost_min = NULL;
for (i = 0; i < nb_output_streams; i++) {
OutputStream *ost = output_streams[i];
int64_t opts = av_rescale_q(ost->st->cur_dts, ost->st->time_base,
... | {
"code": [
" int64_t opts = av_rescale_q(ost->st->cur_dts, ost->st->time_base,"
],
"line_no": [
17
]
} | static OutputStream *FUNC_0(void)
{
int VAR_0;
int64_t opts_min = INT64_MAX;
OutputStream *ost_min = NULL;
for (VAR_0 = 0; VAR_0 < nb_output_streams; VAR_0++) {
OutputStream *ost = output_streams[VAR_0];
int64_t opts = av_rescale_q(ost->st->cur_dts, ost->st->time_base,
... | [
"static OutputStream *FUNC_0(void)\n{",
"int VAR_0;",
"int64_t opts_min = INT64_MAX;",
"OutputStream *ost_min = NULL;",
"for (VAR_0 = 0; VAR_0 < nb_output_streams; VAR_0++) {",
"OutputStream *ost = output_streams[VAR_0];",
"int64_t opts = av_rescale_q(ost->st->cur_dts, ost->st->time_base,\nAV_TIME_BASE_... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
16,430 | static int vfio_msi_setup(VFIOPCIDevice *vdev, int pos)
{
uint16_t ctrl;
bool msi_64bit, msi_maskbit;
int ret, entries;
if (pread(vdev->vbasedev.fd, &ctrl, sizeof(ctrl),
vdev->config_offset + pos + PCI_CAP_FLAGS) != sizeof(ctrl)) {
return -errno;
}
ctrl = le16_to... | true | qemu | 1108b2f8a939fb5778d384149e2f1b99062a72da | static int vfio_msi_setup(VFIOPCIDevice *vdev, int pos)
{
uint16_t ctrl;
bool msi_64bit, msi_maskbit;
int ret, entries;
if (pread(vdev->vbasedev.fd, &ctrl, sizeof(ctrl),
vdev->config_offset + pos + PCI_CAP_FLAGS) != sizeof(ctrl)) {
return -errno;
}
ctrl = le16_to... | {
"code": [
" ret = msi_init(&vdev->pdev, pos, entries, msi_64bit, msi_maskbit);",
" error_report(\"vfio: msi_init failed\");"
],
"line_no": [
37,
47
]
} | static int FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1)
{
uint16_t ctrl;
bool msi_64bit, msi_maskbit;
int VAR_2, VAR_3;
if (pread(VAR_0->vbasedev.fd, &ctrl, sizeof(ctrl),
VAR_0->config_offset + VAR_1 + PCI_CAP_FLAGS) != sizeof(ctrl)) {
return -errno;
}
ctrl = le16_to_... | [
"static int FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1)\n{",
"uint16_t ctrl;",
"bool msi_64bit, msi_maskbit;",
"int VAR_2, VAR_3;",
"if (pread(VAR_0->vbasedev.fd, &ctrl, sizeof(ctrl),\nVAR_0->config_offset + VAR_1 + PCI_CAP_FLAGS) != sizeof(ctrl)) {",
"return -errno;",
"}",
"ctrl = le16_to_cpu(ctrl);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
16,432 | static void gen_advance_ccount(DisasContext *dc)
{
gen_advance_ccount_cond(dc);
dc->ccount_delta = 0;
}
| true | qemu | 2db59a76c421cdd1039d10e32a9798952d3ff5ba | static void gen_advance_ccount(DisasContext *dc)
{
gen_advance_ccount_cond(dc);
dc->ccount_delta = 0;
}
| {
"code": [
"static void gen_advance_ccount(DisasContext *dc)",
" gen_advance_ccount_cond(dc);"
],
"line_no": [
1,
5
]
} | static void FUNC_0(DisasContext *VAR_0)
{
gen_advance_ccount_cond(VAR_0);
VAR_0->ccount_delta = 0;
}
| [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"gen_advance_ccount_cond(VAR_0);",
"VAR_0->ccount_delta = 0;",
"}"
] | [
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
16,433 | void init_paths(const char *prefix)
{
char pref_buf[PATH_MAX];
if (prefix[0] == '\0' ||
!strcmp(prefix, "/"))
return;
if (prefix[0] != '/') {
char *cwd = getcwd(NULL, 0);
size_t pref_buf_len = sizeof(pref_buf);
if (!cwd)
abort();
p... | true | qemu | bc5008a832f95aae86efce844382e64d54da2146 | void init_paths(const char *prefix)
{
char pref_buf[PATH_MAX];
if (prefix[0] == '\0' ||
!strcmp(prefix, "/"))
return;
if (prefix[0] != '/') {
char *cwd = getcwd(NULL, 0);
size_t pref_buf_len = sizeof(pref_buf);
if (!cwd)
abort();
p... | {
"code": [
" free(base->name);",
" free(base);"
],
"line_no": [
51,
53
]
} | void FUNC_0(const char *VAR_0)
{
char VAR_1[PATH_MAX];
if (VAR_0[0] == '\0' ||
!strcmp(VAR_0, "/"))
return;
if (VAR_0[0] != '/') {
char *VAR_2 = getcwd(NULL, 0);
size_t pref_buf_len = sizeof(VAR_1);
if (!VAR_2)
abort();
pstrcpy(VAR... | [
"void FUNC_0(const char *VAR_0)\n{",
"char VAR_1[PATH_MAX];",
"if (VAR_0[0] == '\\0' ||\n!strcmp(VAR_0, \"/\"))\nreturn;",
"if (VAR_0[0] != '/') {",
"char *VAR_2 = getcwd(NULL, 0);",
"size_t pref_buf_len = sizeof(VAR_1);",
"if (!VAR_2)\nabort();",
"pstrcpy(VAR_1, sizeof(VAR_1), VAR_2);",
"pstrcat(VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11,
13
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
... |
16,434 | int bdrv_all_create_snapshot(QEMUSnapshotInfo *sn,
BlockDriverState *vm_state_bs,
uint64_t vm_state_size,
BlockDriverState **first_bad_bs)
{
int err = 0;
BlockDriverState *bs;
BdrvNextIterator it;
for (bs = ... | true | qemu | 5e003f17ec518cd96f5d2ac23ce9e14144426235 | int bdrv_all_create_snapshot(QEMUSnapshotInfo *sn,
BlockDriverState *vm_state_bs,
uint64_t vm_state_size,
BlockDriverState **first_bad_bs)
{
int err = 0;
BlockDriverState *bs;
BdrvNextIterator it;
for (bs = ... | {
"code": [
" BlockDriverState *bs;"
],
"line_no": [
13
]
} | int FUNC_0(QEMUSnapshotInfo *VAR_0,
BlockDriverState *VAR_1,
uint64_t VAR_2,
BlockDriverState **VAR_3)
{
int VAR_4 = 0;
BlockDriverState *bs;
BdrvNextIterator it;
for (bs = bdrv_first(&it); bs; bs = bdrv_nex... | [
"int FUNC_0(QEMUSnapshotInfo *VAR_0,\nBlockDriverState *VAR_1,\nuint64_t VAR_2,\nBlockDriverState **VAR_3)\n{",
"int VAR_4 = 0;",
"BlockDriverState *bs;",
"BdrvNextIterator it;",
"for (bs = bdrv_first(&it); bs; bs = bdrv_next(&it)) {",
"AioContext *ctx = bdrv_get_aio_context(bs);",
"aio_context_acquire(... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
46
],
[
48
],
[... |
16,436 | void tb_target_set_jmp_target(uintptr_t tc_ptr, uintptr_t jmp_addr,
uintptr_t addr)
{
if (TCG_TARGET_REG_BITS == 64) {
tcg_insn_unit i1, i2;
intptr_t tb_diff = addr - tc_ptr;
intptr_t br_diff = addr - (jmp_addr + 4);
uint64_t pair;
/* T... | true | qemu | ba026602a673677735428e64e621cdf95b5cd6d9 | void tb_target_set_jmp_target(uintptr_t tc_ptr, uintptr_t jmp_addr,
uintptr_t addr)
{
if (TCG_TARGET_REG_BITS == 64) {
tcg_insn_unit i1, i2;
intptr_t tb_diff = addr - tc_ptr;
intptr_t br_diff = addr - (jmp_addr + 4);
uint64_t pair;
... | {
"code": [
" atomic_set((uint64_t *)jmp_addr, pair);"
],
"line_no": [
57
]
} | void FUNC_0(uintptr_t VAR_0, uintptr_t VAR_1,
uintptr_t VAR_2)
{
if (TCG_TARGET_REG_BITS == 64) {
tcg_insn_unit i1, i2;
intptr_t tb_diff = VAR_2 - VAR_0;
intptr_t br_diff = VAR_2 - (VAR_1 + 4);
uint64_t pair;
if (tb_diff =... | [
"void FUNC_0(uintptr_t VAR_0, uintptr_t VAR_1,\nuintptr_t VAR_2)\n{",
"if (TCG_TARGET_REG_BITS == 64) {",
"tcg_insn_unit i1, i2;",
"intptr_t tb_diff = VAR_2 - VAR_0;",
"intptr_t br_diff = VAR_2 - (VAR_1 + 4);",
"uint64_t pair;",
"if (tb_diff == (int16_t)tb_diff) {",
"i1 = ADDI | TAI(TCG_REG_TB, TCG_RE... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49,
51
],
[... |
16,438 | static av_always_inline int setup_classifs(vorbis_context *vc,
vorbis_residue *vr,
uint8_t *do_not_decode,
unsigned ch_used,
int partition_count... | true | FFmpeg | 8c50704ebf1777bee76772c4835d9760b3721057 | static av_always_inline int setup_classifs(vorbis_context *vc,
vorbis_residue *vr,
uint8_t *do_not_decode,
unsigned ch_used,
int partition_count... | {
"code": [
" int partition_count)",
" if (i < vr->ptns_to_read)",
" if (i < vr->ptns_to_read)",
" p += vr->ptns_to_read;"
],
"line_no": [
9,
53,
53,
81
]
} | static av_always_inline int FUNC_0(vorbis_context *vc,
vorbis_residue *vr,
uint8_t *do_not_decode,
unsigned ch_used,
int partition_count)
{
... | [
"static av_always_inline int FUNC_0(vorbis_context *vc,\nvorbis_residue *vr,\nuint8_t *do_not_decode,\nunsigned ch_used,\nint partition_count)\n{",
"int VAR_0, VAR_1, VAR_2;",
"unsigned VAR_3 = vc->codebooks[vr->classbook].dimensions;",
"unsigned VAR_4 = ff_inverse[vr->classifications];",
"unsigned ... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
31
],
[
35,
37
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53,
55
],
[
57
],
[... |
16,439 | static int xan_unpack(uint8_t *dest, const int dest_len,
const uint8_t *src, const int src_len)
{
uint8_t opcode;
int size;
uint8_t *orig_dest = dest;
const uint8_t *src_end = src + src_len;
const uint8_t *dest_end = dest + dest_len;
while (dest < dest_end) {
... | true | FFmpeg | 55188278169c3a1838334d7aa47a1f7a40741690 | static int xan_unpack(uint8_t *dest, const int dest_len,
const uint8_t *src, const int src_len)
{
uint8_t opcode;
int size;
uint8_t *orig_dest = dest;
const uint8_t *src_end = src + src_len;
const uint8_t *dest_end = dest + dest_len;
while (dest < dest_end) {
... | {
"code": [
"static int xan_unpack(uint8_t *dest, const int dest_len,",
" const uint8_t *src, const int src_len)",
" const uint8_t *src_end = src + src_len;",
" opcode = *src++;",
" back = ((opcode & 0x60) << 3) + *src++ + 1;",
" si... | static int FUNC_0(uint8_t *VAR_0, const int VAR_1,
const uint8_t *VAR_2, const int VAR_3)
{
uint8_t opcode;
int VAR_4;
uint8_t *orig_dest = VAR_0;
const uint8_t *VAR_5 = VAR_2 + VAR_3;
const uint8_t *VAR_6 = VAR_0 + VAR_1;
while (VAR_0 < VAR_6) {
opcode =... | [
"static int FUNC_0(uint8_t *VAR_0, const int VAR_1,\nconst uint8_t *VAR_2, const int VAR_3)\n{",
"uint8_t opcode;",
"int VAR_4;",
"uint8_t *orig_dest = VAR_0;",
"const uint8_t *VAR_5 = VAR_2 + VAR_3;",
"const uint8_t *VAR_6 = VAR_0 + VAR_1;",
"while (VAR_0 < VAR_6) {",
"opcode = *VAR_2++;",
"if (opc... | [
1,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
1,
1,
0,
0,
0,
1,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
16,440 | static void qht_do_test(unsigned int mode, size_t init_entries)
{
qht_init(&ht, 0, mode);
insert(0, N);
check(0, N, true);
check_n(N);
check(-N, -1, false);
iter_check(N);
rm(101, 102);
check_n(N - 1);
insert(N, N * 2);
check_n(N + N - 1);
rm(N, N * 2);
check_n(N - 1);
... | true | qemu | 7266ae91a111001abda65c79299c9b7e365456b6 | static void qht_do_test(unsigned int mode, size_t init_entries)
{
qht_init(&ht, 0, mode);
insert(0, N);
check(0, N, true);
check_n(N);
check(-N, -1, false);
iter_check(N);
rm(101, 102);
check_n(N - 1);
insert(N, N * 2);
check_n(N + N - 1);
rm(N, N * 2);
check_n(N - 1);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(unsigned int VAR_0, size_t VAR_1)
{
qht_init(&ht, 0, VAR_0);
insert(0, N);
check(0, N, true);
check_n(N);
check(-N, -1, false);
iter_check(N);
rm(101, 102);
check_n(N - 1);
insert(N, N * 2);
check_n(N + N - 1);
rm(N, N * 2);
check_n(N - 1);
insert(1... | [
"static void FUNC_0(unsigned int VAR_0, size_t VAR_1)\n{",
"qht_init(&ht, 0, VAR_0);",
"insert(0, N);",
"check(0, N, true);",
"check_n(N);",
"check(-N, -1, false);",
"iter_check(N);",
"rm(101, 102);",
"check_n(N - 1);",
"insert(N, N * 2);",
"check_n(N + N - 1);",
"rm(N, N * 2);",
"check_n(N ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],... |
16,441 | static int mov_write_tkhd_tag(ByteIOContext *pb, MOVTrack* track)
{
int64_t maxTrackLenTemp;
put_be32(pb, 0x5c); /* size (always 0x5c) */
put_tag(pb, "tkhd");
put_be32(pb, 0xf); /* version & flags (track enabled) */
put_be32(pb, track->time); /* creation time */
put_be32(pb, track->time);... | false | FFmpeg | 69dde1ad36b7d95b8b9268f414aa6c076212ed41 | static int mov_write_tkhd_tag(ByteIOContext *pb, MOVTrack* track)
{
int64_t maxTrackLenTemp;
put_be32(pb, 0x5c);
put_tag(pb, "tkhd");
put_be32(pb, 0xf);
put_be32(pb, track->time);
put_be32(pb, track->time);
put_be32(pb, track->trackID);
put_be32(pb, 0);
maxTrackLenTem... | {
"code": [],
"line_no": []
} | static int FUNC_0(ByteIOContext *VAR_0, MOVTrack* VAR_1)
{
int64_t maxTrackLenTemp;
put_be32(VAR_0, 0x5c);
put_tag(VAR_0, "tkhd");
put_be32(VAR_0, 0xf);
put_be32(VAR_0, VAR_1->time);
put_be32(VAR_0, VAR_1->time);
put_be32(VAR_0, VAR_1->trackID);
put_be32(VAR_0, 0);
ma... | [
"static int FUNC_0(ByteIOContext *VAR_0, MOVTrack* VAR_1)\n{",
"int64_t maxTrackLenTemp;",
"put_be32(VAR_0, 0x5c);",
"put_tag(VAR_0, \"tkhd\");",
"put_be32(VAR_0, 0xf);",
"put_be32(VAR_0, VAR_1->time);",
"put_be32(VAR_0, VAR_1->time);",
"put_be32(VAR_0, VAR_1->trackID);",
"put_be32(VAR_0, 0);",
"m... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
39,
41
],
[
43
],
[
49
],
[
51
... |
16,442 | static void quantize_and_encode_band_cost_NONE_mips(struct AACEncContext *s,
PutBitContext *pb, const float *in, float *out,
const float *scaled, int size, int scale_idx,
... | true | FFmpeg | 01ecb7172b684f1c4b3e748f95c5a9a494ca36ec | static void quantize_and_encode_band_cost_NONE_mips(struct AACEncContext *s,
PutBitContext *pb, const float *in, float *out,
const float *scaled, int size, int scale_idx,
... | {
"code": [
" int *bits, const float ROUNDING) {",
" int *bits, const float ROUNDING) {"
],
"line_no": [
9,
9
]
} | static void FUNC_0(struct AACEncContext *VAR_0,
PutBitContext *VAR_1, const float *VAR_2, float *VAR_3,
const float *VAR_4, int VAR_5, int VAR_6,
... | [
"static void FUNC_0(struct AACEncContext *VAR_0,\nPutBitContext *VAR_1, const float *VAR_2, float *VAR_3,\nconst float *VAR_4, int VAR_5, int VAR_6,\nint VAR_7, const float VAR_8, const float VAR_9,\nint *VAR_10, const float VAR_11) {",
"av_assert0(0);",
"}"
] | [
1,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
]
] |
16,443 | int qcrypto_cipher_setiv(QCryptoCipher *cipher,
const uint8_t *iv, size_t niv,
Error **errp)
{
QCryptoCipherNettle *ctx = cipher->opaque;
if (niv != ctx->niv) {
error_setg(errp, "Expected IV size %zu not %zu",
ctx->niv, niv);
... | true | qemu | 3a661f1eabf7e8db66e28489884d9b54aacb94ea | int qcrypto_cipher_setiv(QCryptoCipher *cipher,
const uint8_t *iv, size_t niv,
Error **errp)
{
QCryptoCipherNettle *ctx = cipher->opaque;
if (niv != ctx->niv) {
error_setg(errp, "Expected IV size %zu not %zu",
ctx->niv, niv);
... | {
"code": [
" if (niv != ctx->niv) {",
" ctx->niv, niv);"
],
"line_no": [
11,
15
]
} | int FUNC_0(QCryptoCipher *VAR_0,
const uint8_t *VAR_1, size_t VAR_2,
Error **VAR_3)
{
QCryptoCipherNettle *ctx = VAR_0->opaque;
if (VAR_2 != ctx->VAR_2) {
error_setg(VAR_3, "Expected IV size %zu not %zu",
ctx->VAR_2, VAR_2);
... | [
"int FUNC_0(QCryptoCipher *VAR_0,\nconst uint8_t *VAR_1, size_t VAR_2,\nError **VAR_3)\n{",
"QCryptoCipherNettle *ctx = VAR_0->opaque;",
"if (VAR_2 != ctx->VAR_2) {",
"error_setg(VAR_3, \"Expected IV size %zu not %zu\",\nctx->VAR_2, VAR_2);",
"return -1;",
"}",
"memcpy(ctx->VAR_1, VAR_1, VAR_2);",
"re... | [
0,
0,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
16,444 | static int uhci_handle_td(UHCIState *s, uint32_t addr, UHCI_TD *td,
uint32_t *int_mask, bool queuing)
{
UHCIAsync *async;
int len = 0, max_len;
uint8_t pid;
USBDevice *dev;
USBEndpoint *ep;
/* Is active ? */
if (!(td->ctrl & TD_CTRL_ACTIVE))
retu... | true | qemu | e2f89926f19d2940eda070542501f39f51a8c81f | static int uhci_handle_td(UHCIState *s, uint32_t addr, UHCI_TD *td,
uint32_t *int_mask, bool queuing)
{
UHCIAsync *async;
int len = 0, max_len;
uint8_t pid;
USBDevice *dev;
USBEndpoint *ep;
if (!(td->ctrl & TD_CTRL_ACTIVE))
return TD_RESULT_NEXT... | {
"code": [
" usb_packet_unmap(&async->packet);"
],
"line_no": [
157
]
} | static int FUNC_0(UHCIState *VAR_0, uint32_t VAR_1, UHCI_TD *VAR_2,
uint32_t *VAR_3, bool VAR_4)
{
UHCIAsync *async;
int VAR_5 = 0, VAR_6;
uint8_t pid;
USBDevice *dev;
USBEndpoint *ep;
if (!(VAR_2->ctrl & TD_CTRL_ACTIVE))
return TD_RESULT_NEXT_Q... | [
"static int FUNC_0(UHCIState *VAR_0, uint32_t VAR_1, UHCI_TD *VAR_2,\nuint32_t *VAR_3, bool VAR_4)\n{",
"UHCIAsync *async;",
"int VAR_5 = 0, VAR_6;",
"uint8_t pid;",
"USBDevice *dev;",
"USBEndpoint *ep;",
"if (!(VAR_2->ctrl & TD_CTRL_ACTIVE))\nreturn TD_RESULT_NEXT_QH;",
"async = uhci_async_find_td(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,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21,
23
],
[
27
],
[
29
],
[
33
],
[
37,
39
],
[
41
],
[
49
],
[
51
],
[
55
],
[
57
],
[
59
],
[
65
],
[... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.