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 |
|---|---|---|---|---|---|---|---|---|---|---|
19,863 | static int ohci_eof_timer_pre_load(void *opaque)
{
OHCIState *ohci = opaque;
ohci_bus_start(ohci);
return 0;
}
| true | qemu | fa1298c2d623522eda7b4f1f721fcb935abb7360 | static int ohci_eof_timer_pre_load(void *opaque)
{
OHCIState *ohci = opaque;
ohci_bus_start(ohci);
return 0;
}
| {
"code": [
"static int ohci_eof_timer_pre_load(void *opaque)",
" OHCIState *ohci = opaque;",
" ohci_bus_start(ohci);",
" return 0;"
],
"line_no": [
1,
5,
9,
13
]
} | static int FUNC_0(void *VAR_0)
{
OHCIState *ohci = VAR_0;
ohci_bus_start(ohci);
return 0;
}
| [
"static int FUNC_0(void *VAR_0)\n{",
"OHCIState *ohci = VAR_0;",
"ohci_bus_start(ohci);",
"return 0;",
"}"
] | [
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
]
] |
19,865 | envlist_free(envlist_t *envlist)
{
struct envlist_entry *entry;
assert(envlist != NULL);
while (envlist->el_entries.lh_first != NULL) {
entry = envlist->el_entries.lh_first;
QLIST_REMOVE(entry, ev_link);
free((char *)entry->ev_var);
free(entry);
}
free(envlist);
}
| true | qemu | ec45bbe5f1921c6553fbf9c0c76b358b0403c22d | envlist_free(envlist_t *envlist)
{
struct envlist_entry *entry;
assert(envlist != NULL);
while (envlist->el_entries.lh_first != NULL) {
entry = envlist->el_entries.lh_first;
QLIST_REMOVE(entry, ev_link);
free((char *)entry->ev_var);
free(entry);
}
free(envlist);
}
| {
"code": [
"\t\tfree((char *)entry->ev_var);",
"\t\tfree(entry);",
"\tfree(envlist);",
"\t\tfree((char *)entry->ev_var);",
"\t\tfree(entry);",
"\t\tfree(entry);",
"\t\tfree((char *)entry->ev_var);",
"\t\tfree(entry);"
],
"line_no": [
21,
23,
27,
21,
23,
23,... | FUNC_0(envlist_t *VAR_0)
{
struct envlist_entry *VAR_1;
assert(VAR_0 != NULL);
while (VAR_0->el_entries.lh_first != NULL) {
VAR_1 = VAR_0->el_entries.lh_first;
QLIST_REMOVE(VAR_1, ev_link);
free((char *)VAR_1->ev_var);
free(VAR_1);
}
free(VAR_0);
}
| [
"FUNC_0(envlist_t *VAR_0)\n{",
"struct envlist_entry *VAR_1;",
"assert(VAR_0 != NULL);",
"while (VAR_0->el_entries.lh_first != NULL) {",
"VAR_1 = VAR_0->el_entries.lh_first;",
"QLIST_REMOVE(VAR_1, ev_link);",
"free((char *)VAR_1->ev_var);",
"free(VAR_1);",
"}",
"free(VAR_0);",
"}"
] | [
0,
0,
0,
0,
0,
0,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
19,867 | static void test_visitor_in_intList(TestInputVisitorData *data,
const void *unused)
{
/* Note: the visitor *sorts* ranges *unsigned* */
int64_t expect1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20 };
int64_t expect2[] = { 32767, -32768, -32767 };
int64_t expect3[] = { INT64... | true | qemu | a9416dc62c36079b93b4951c894a0b15e53bb38c | static void test_visitor_in_intList(TestInputVisitorData *data,
const void *unused)
{
int64_t expect1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20 };
int64_t expect2[] = { 32767, -32768, -32767 };
int64_t expect3[] = { INT64_MAX, INT64_MIN };
uint64_t expect4[] = { UIN... | {
"code": [],
"line_no": []
} | static void FUNC_0(TestInputVisitorData *VAR_0,
const void *VAR_1)
{
int64_t expect1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20 };
int64_t expect2[] = { 32767, -32768, -32767 };
int64_t expect3[] = { INT64_MAX, INT64_MIN };
uint64_t expect4[] = { UINT64_MAX };
Er... | [
"static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"int64_t expect1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20 };",
"int64_t expect2[] = { 32767, -32768, -32767 };",
"int64_t expect3[] = { INT64_MAX, INT64_MIN };",
"uint64_t expect4[] = { UINT64_MAX };",
"Error *err = NULL;",
"int64Li... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19,
20
],
[
21
],
[
22
],
[
23
],
[
25
]... |
19,868 | static void put_unused_buffer(QEMUFile *f, void *pv, size_t size)
{
static const uint8_t buf[1024];
int block_len;
while (size > 0) {
block_len = MIN(sizeof(buf), size);
size -= block_len;
qemu_put_buffer(f, buf, block_len);
}
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static void put_unused_buffer(QEMUFile *f, void *pv, size_t size)
{
static const uint8_t buf[1024];
int block_len;
while (size > 0) {
block_len = MIN(sizeof(buf), size);
size -= block_len;
qemu_put_buffer(f, buf, block_len);
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2)
{
static const uint8_t VAR_3[1024];
int VAR_4;
while (VAR_2 > 0) {
VAR_4 = MIN(sizeof(VAR_3), VAR_2);
VAR_2 -= VAR_4;
qemu_put_buffer(VAR_0, VAR_3, VAR_4);
}
}
| [
"static void FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2)\n{",
"static const uint8_t VAR_3[1024];",
"int VAR_4;",
"while (VAR_2 > 0) {",
"VAR_4 = MIN(sizeof(VAR_3), VAR_2);",
"VAR_2 -= VAR_4;",
"qemu_put_buffer(VAR_0, VAR_3, VAR_4);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
19,869 | static int find_snapshot_by_id(BlockDriverState *bs, const char *id_str)
{
BDRVQcowState *s = bs->opaque;
int i;
for(i = 0; i < s->nb_snapshots; i++) {
if (!strcmp(s->snapshots[i].id_str, id_str))
return i;
}
return -1;
}
| true | qemu | a89d89d3e65800fa4a8e00de7af0ea8272bef779 | static int find_snapshot_by_id(BlockDriverState *bs, const char *id_str)
{
BDRVQcowState *s = bs->opaque;
int i;
for(i = 0; i < s->nb_snapshots; i++) {
if (!strcmp(s->snapshots[i].id_str, id_str))
return i;
}
return -1;
}
| {
"code": [
"static int find_snapshot_by_id(BlockDriverState *bs, const char *id_str)",
" for(i = 0; i < s->nb_snapshots; i++) {",
" if (!strcmp(s->snapshots[i].id_str, id_str))",
" return i;",
" BDRVQcowState *s = bs->opaque;",
" for(i = 0; i < s->nb_snapshots; i++)... | static int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1)
{
BDRVQcowState *s = VAR_0->opaque;
int VAR_2;
for(VAR_2 = 0; VAR_2 < s->nb_snapshots; VAR_2++) {
if (!strcmp(s->snapshots[VAR_2].VAR_1, VAR_1))
return VAR_2;
}
return -1;
}
| [
"static int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"int VAR_2;",
"for(VAR_2 = 0; VAR_2 < s->nb_snapshots; VAR_2++) {",
"if (!strcmp(s->snapshots[VAR_2].VAR_1, VAR_1))\nreturn VAR_2;",
"}",
"return -1;",
"}"
] | [
1,
1,
0,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
]
] |
19,870 | static inline void vmsvga_update_rect(struct vmsvga_state_s *s,
int x, int y, int w, int h)
{
DisplaySurface *surface = qemu_console_surface(s->vga.con);
int line;
int bypl;
int width;
int start;
uint8_t *src;
uint8_t *dst;
if (x < 0) {
... | true | qemu | 1735fe1edba9cc86bc0f26937ed5a62d3cb47c9c | static inline void vmsvga_update_rect(struct vmsvga_state_s *s,
int x, int y, int w, int h)
{
DisplaySurface *surface = qemu_console_surface(s->vga.con);
int line;
int bypl;
int width;
int start;
uint8_t *src;
uint8_t *dst;
if (x < 0) {
... | {
"code": [
" if (x < 0) {",
" fprintf(stderr, \"%s: update x was < 0 (%d)\\n\", __func__, x);",
" w += x;",
" if (w < 0) {",
" fprintf(stderr, \"%s: update w was < 0 (%d)\\n\", __func__, w);",
" w = 0;",
" if (x + w > surface_width(surface)) {",
" ... | static inline void FUNC_0(struct vmsvga_state_s *VAR_0,
int VAR_1, int VAR_2, int VAR_3, int VAR_4)
{
DisplaySurface *surface = qemu_console_surface(VAR_0->vga.con);
int VAR_5;
int VAR_6;
int VAR_7;
int VAR_8;
uint8_t *src;
uint8_t *dst;
... | [
"static inline void FUNC_0(struct vmsvga_state_s *VAR_0,\nint VAR_1, int VAR_2, int VAR_3, int VAR_4)\n{",
"DisplaySurface *surface = qemu_console_surface(VAR_0->vga.con);",
"int VAR_5;",
"int VAR_6;",
"int VAR_7;",
"int VAR_8;",
"uint8_t *src;",
"uint8_t *dst;",
"if (VAR_1 < 0) {",
"fprintf(stder... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
1,
1,
1,
0,
1,
1,
1,
1,
0,
1,
1,
1,
0,
0,
1,
1,
1,
0,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
... |
19,871 | static int webm_dash_manifest_cues(AVFormatContext *s, int64_t init_range)
{
MatroskaDemuxContext *matroska = s->priv_data;
EbmlList *seekhead_list = &matroska->seekhead;
MatroskaSeekhead *seekhead = seekhead_list->elem;
char *buf;
int64_t cues_start = -1, cues_end = -1, before_pos, bandwidth;... | true | FFmpeg | cc25a887c5467be5c7b004665047a32d36c9cf42 | static int webm_dash_manifest_cues(AVFormatContext *s, int64_t init_range)
{
MatroskaDemuxContext *matroska = s->priv_data;
EbmlList *seekhead_list = &matroska->seekhead;
MatroskaSeekhead *seekhead = seekhead_list->elem;
char *buf;
int64_t cues_start = -1, cues_end = -1, before_pos, bandwidth;... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, int64_t VAR_1)
{
MatroskaDemuxContext *matroska = VAR_0->priv_data;
EbmlList *seekhead_list = &matroska->seekhead;
MatroskaSeekhead *seekhead = seekhead_list->elem;
char *VAR_2;
int64_t cues_start = -1, cues_end = -1, before_pos, bandwidth;
int VA... | [
"static int FUNC_0(AVFormatContext *VAR_0, int64_t VAR_1)\n{",
"MatroskaDemuxContext *matroska = VAR_0->priv_data;",
"EbmlList *seekhead_list = &matroska->seekhead;",
"MatroskaSeekhead *seekhead = seekhead_list->elem;",
"char *VAR_2;",
"int64_t cues_start = -1, cues_end = -1, before_pos, bandwidth;",
"i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25,
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[... |
19,872 | int avresample_convert(AVAudioResampleContext *avr, void **output,
int out_plane_size, int out_samples, void **input,
int in_plane_size, int in_samples)
{
AudioData input_buffer;
AudioData output_buffer;
AudioData *current_buffer;
int ret;
/* r... | true | FFmpeg | 9684341346fd5aad436325529cade47966c4731b | int avresample_convert(AVAudioResampleContext *avr, void **output,
int out_plane_size, int out_samples, void **input,
int in_plane_size, int in_samples)
{
AudioData input_buffer;
AudioData output_buffer;
AudioData *current_buffer;
int ret;
... | {
"code": [
" return handle_buffered_output(avr, &output_buffer, current_buffer);"
],
"line_no": [
309
]
} | int FUNC_0(AVAudioResampleContext *VAR_0, void **VAR_1,
int VAR_2, int VAR_3, void **VAR_4,
int VAR_5, int VAR_6)
{
AudioData input_buffer;
AudioData output_buffer;
AudioData *current_buffer;
int VAR_7;
if (VAR_0->in_buffer) {
VA... | [
"int FUNC_0(AVAudioResampleContext *VAR_0, void **VAR_1,\nint VAR_2, int VAR_3, void **VAR_4,\nint VAR_5, int VAR_6)\n{",
"AudioData input_buffer;",
"AudioData output_buffer;",
"AudioData *current_buffer;",
"int VAR_7;",
"if (VAR_0->in_buffer) {",
"VAR_0->in_buffer->nb_samples = 0;",
"ff_audio_data_se... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[... |
19,873 | static ssize_t rtl8139_do_receive(VLANClientState *nc, const uint8_t *buf, size_t size_, int do_interrupt)
{
RTL8139State *s = DO_UPCAST(NICState, nc, nc)->opaque;
/* size is the length of the buffer passed to the driver */
int size = size_;
const uint8_t *dot1q_buf = NULL;
uint32_t packet_h... | true | qemu | afcd9c0dcd1d6ab14a72db6abde76142c6a0ac12 | static ssize_t rtl8139_do_receive(VLANClientState *nc, const uint8_t *buf, size_t size_, int do_interrupt)
{
RTL8139State *s = DO_UPCAST(NICState, nc, nc)->opaque;
int size = size_;
const uint8_t *dot1q_buf = NULL;
uint32_t packet_header = 0;
uint8_t buf1[MIN_BUF_SIZE + VLAN_HLEN];
... | {
"code": [
" DEBUG_PRINT((\"RTL8139: +++ C+ mode reading RX descriptor %d from host memory at %08x %08x = %016\" PRIx64 \"\\n\",",
" descriptor, s->RxRingAddrHI, s->RxRingAddrLO, (uint64_t)cplus_rx_ring_desc));"
],
"line_no": [
315,
317
]
} | static ssize_t FUNC_0(VLANClientState *nc, const uint8_t *buf, size_t size_, int do_interrupt)
{
RTL8139State *s = DO_UPCAST(NICState, nc, nc)->opaque;
int VAR_0 = size_;
const uint8_t *VAR_1 = NULL;
uint32_t packet_header = 0;
uint8_t buf1[MIN_BUF_SIZE + VLAN_HLEN];
static cons... | [
"static ssize_t FUNC_0(VLANClientState *nc, const uint8_t *buf, size_t size_, int do_interrupt)\n{",
"RTL8139State *s = DO_UPCAST(NICState, nc, nc)->opaque;",
"int VAR_0 = size_;",
"const uint8_t *VAR_1 = NULL;",
"uint32_t packet_header = 0;",
"uint8_t buf1[MIN_BUF_SIZE + VLAN_HLEN];",
"static const uin... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21,
23
],
[
27
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
49,
51
],
[
53
],
[
55
],
[
57
],
[
63
],
[
67
],
... |
19,874 | static void decode_mb(MadContext *t, int inter)
{
MpegEncContext *s = &t->s;
int mv_map = 0;
int mv_x, mv_y;
int j;
if (inter) {
int v = decode210(&s->gb);
if (v < 2) {
mv_map = v ? get_bits(&s->gb, 6) : 63;
mv_x = decode_motion(&s->gb);
... | true | FFmpeg | 6e20554a6d33e92b81dc3cfed6082e03bff2a7f8 | static void decode_mb(MadContext *t, int inter)
{
MpegEncContext *s = &t->s;
int mv_map = 0;
int mv_x, mv_y;
int j;
if (inter) {
int v = decode210(&s->gb);
if (v < 2) {
mv_map = v ? get_bits(&s->gb, 6) : 63;
mv_x = decode_motion(&s->gb);
... | {
"code": [
" comp_block(t, s->mb_x, s->mb_y, j, mv_x, mv_y, add);"
],
"line_no": [
43
]
} | static void FUNC_0(MadContext *VAR_0, int VAR_1)
{
MpegEncContext *s = &VAR_0->s;
int VAR_2 = 0;
int VAR_3, VAR_4;
int VAR_5;
if (VAR_1) {
int VAR_6 = decode210(&s->gb);
if (VAR_6 < 2) {
VAR_2 = VAR_6 ? get_bits(&s->gb, 6) : 63;
VAR_3 = decode_moti... | [
"static void FUNC_0(MadContext *VAR_0, int VAR_1)\n{",
"MpegEncContext *s = &VAR_0->s;",
"int VAR_2 = 0;",
"int VAR_3, VAR_4;",
"int VAR_5;",
"if (VAR_1) {",
"int VAR_6 = decode210(&s->gb);",
"if (VAR_6 < 2) {",
"VAR_2 = VAR_6 ? get_bits(&s->gb, 6) : 63;",
"VAR_3 = decode_motion(&s->gb);",
"VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
19,876 | static int save_subtitle_set(AVCodecContext *avctx, AVSubtitle *sub, int *got_output)
{
DVBSubContext *ctx = avctx->priv_data;
DVBSubRegionDisplay *display;
DVBSubDisplayDefinition *display_def = ctx->display_definition;
DVBSubRegion *region;
AVSubtitleRect *rect;
DVBSubCLUT *clut;
u... | true | FFmpeg | eec67f7b24da5407cc2e8933ffe72358336811ab | static int save_subtitle_set(AVCodecContext *avctx, AVSubtitle *sub, int *got_output)
{
DVBSubContext *ctx = avctx->priv_data;
DVBSubRegionDisplay *display;
DVBSubDisplayDefinition *display_def = ctx->display_definition;
DVBSubRegion *region;
AVSubtitleRect *rect;
DVBSubCLUT *clut;
u... | {
"code": [
" if ((clut == &default_clut && ctx->compute_clut == -1) || ctx->compute_clut == 1)",
" compute_default_clut(rect, rect->w, rect->h);"
],
"line_no": [
213,
215
]
} | static int FUNC_0(AVCodecContext *VAR_0, AVSubtitle *VAR_1, int *VAR_2)
{
DVBSubContext *ctx = VAR_0->priv_data;
DVBSubRegionDisplay *display;
DVBSubDisplayDefinition *display_def = ctx->display_definition;
DVBSubRegion *region;
AVSubtitleRect *rect;
DVBSubCLUT *clut;
uint32_t *clut_... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVSubtitle *VAR_1, int *VAR_2)\n{",
"DVBSubContext *ctx = VAR_0->priv_data;",
"DVBSubRegionDisplay *display;",
"DVBSubDisplayDefinition *display_def = ctx->display_definition;",
"DVBSubRegion *region;",
"AVSubtitleRect *rect;",
"DVBSubCLUT *clut;",
"uint32_t *... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
35
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
19,877 | static bool vexpress_cfgctrl_read(arm_sysctl_state *s, unsigned int dcc,
unsigned int function, unsigned int site,
unsigned int position, unsigned int device,
uint32_t *val)
{
/* We don't support anything othe... | true | qemu | ec1efab95767312ff4afb816d0d4b548e093b031 | static bool vexpress_cfgctrl_read(arm_sysctl_state *s, unsigned int dcc,
unsigned int function, unsigned int site,
unsigned int position, unsigned int device,
uint32_t *val)
{
if (dcc != 0 || positio... | {
"code": [
" if (site == SYS_CFG_SITE_MB && device < sizeof(s->mb_clock)) {",
" if (site == SYS_CFG_SITE_MB && device < sizeof(s->mb_clock)) {"
],
"line_no": [
57,
57
]
} | static bool FUNC_0(arm_sysctl_state *s, unsigned int dcc,
unsigned int function, unsigned int site,
unsigned int position, unsigned int device,
uint32_t *val)
{
if (dcc != 0 || position != 0 ||
... | [
"static bool FUNC_0(arm_sysctl_state *s, unsigned int dcc,\nunsigned int function, unsigned int site,\nunsigned int position, unsigned int device,\nuint32_t *val)\n{",
"if (dcc != 0 || position != 0 ||\n(site != SYS_CFG_SITE_MB && site != SYS_CFG_SITE_DB1)) {",
"goto cfgctrl_unimp;",
"}",
"switch (function)... | [
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
],
[
17,
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55,
57
],
[
61
],
[
63
... |
19,878 | static void vc1_decode_ac_coeff(VC1Context *v, int *last, int *skip, int *value, int codingset)
{
GetBitContext *gb = &v->s.gb;
int index, escape, run = 0, level = 0, lst = 0;
index = get_vlc2(gb, ff_vc1_ac_coeff_table[codingset].table, AC_VLC_BITS, 3);
if (index != vc1_ac_sizes[codingset] - 1) {... | true | FFmpeg | 2bbec1eda46d907605772a8b6e8263caa4bc4c82 | static void vc1_decode_ac_coeff(VC1Context *v, int *last, int *skip, int *value, int codingset)
{
GetBitContext *gb = &v->s.gb;
int index, escape, run = 0, level = 0, lst = 0;
index = get_vlc2(gb, ff_vc1_ac_coeff_table[codingset].table, AC_VLC_BITS, 3);
if (index != vc1_ac_sizes[codingset] - 1) {... | {
"code": [
" lst = index >= vc1_last_decode_table[codingset];"
],
"line_no": [
19
]
} | static void FUNC_0(VC1Context *VAR_0, int *VAR_1, int *VAR_2, int *VAR_3, int VAR_4)
{
GetBitContext *gb = &VAR_0->s.gb;
int VAR_5, VAR_6, VAR_7 = 0, VAR_8 = 0, VAR_9 = 0;
VAR_5 = get_vlc2(gb, ff_vc1_ac_coeff_table[VAR_4].table, AC_VLC_BITS, 3);
if (VAR_5 != vc1_ac_sizes[VAR_4] - 1) {
VA... | [
"static void FUNC_0(VC1Context *VAR_0, int *VAR_1, int *VAR_2, int *VAR_3, int VAR_4)\n{",
"GetBitContext *gb = &VAR_0->s.gb;",
"int VAR_5, VAR_6, VAR_7 = 0, VAR_8 = 0, VAR_9 = 0;",
"VAR_5 = get_vlc2(gb, ff_vc1_ac_coeff_table[VAR_4].table, AC_VLC_BITS, 3);",
"if (VAR_5 != vc1_ac_sizes[VAR_4] - 1) {",
"VAR... | [
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
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45... |
19,879 | static int find_slice_quant(AVCodecContext *avctx, const AVFrame *pic,
int trellis_node, int x, int y, int mbs_per_slice,
ProresThreadData *td)
{
ProresContext *ctx = avctx->priv_data;
int i, q, pq, xp, yp;
const uint16_t *src;
int slice_wid... | true | FFmpeg | 4690e01c3aaf495c87127e5dc74aa347197dbc0b | static int find_slice_quant(AVCodecContext *avctx, const AVFrame *pic,
int trellis_node, int x, int y, int mbs_per_slice,
ProresThreadData *td)
{
ProresContext *ctx = avctx->priv_data;
int i, q, pq, xp, yp;
const uint16_t *src;
int slice_wid... | {
"code": [
" if (bits > 65000 * 8) {",
" break;"
],
"line_no": [
155,
159
]
} | static int FUNC_0(AVCodecContext *VAR_0, const AVFrame *VAR_1,
int VAR_2, int VAR_3, int VAR_4, int VAR_5,
ProresThreadData *VAR_6)
{
ProresContext *ctx = VAR_0->priv_data;
int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;
const uint16_t *VAR_12;
int... | [
"static int FUNC_0(AVCodecContext *VAR_0, const AVFrame *VAR_1,\nint VAR_2, int VAR_3, int VAR_4, int VAR_5,\nProresThreadData *VAR_6)\n{",
"ProresContext *ctx = VAR_0->priv_data;",
"int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;",
"const uint16_t *VAR_12;",
"int VAR_13 = av_log2(VAR_5);",
"int VAR_14[MAX_PLANE... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39,
41
],
[
43,
45
],
[
47
... |
19,880 | static void process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eof)
{
int i;
int repeating = 0;
AVPacket avpkt;
if (ist->next_dts == AV_NOPTS_VALUE)
ist->next_dts = ist->last_dts;
if (!pkt) {
/* EOF handling */
av_init_packet(&avpkt);
avp... | true | FFmpeg | 27085d1b47c3741cc0fac284c916127c4066d049 | static void process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eof)
{
int i;
int repeating = 0;
AVPacket avpkt;
if (ist->next_dts == AV_NOPTS_VALUE)
ist->next_dts = ist->last_dts;
if (!pkt) {
av_init_packet(&avpkt);
avpkt.data = NULL;
... | {
"code": [
" ret = decode_audio (ist, repeating ? NULL : &avpkt, &got_output);",
" ret = decode_video (ist, repeating ? NULL : &avpkt, &got_output);",
" ret = transcode_subtitles(ist, &avpkt, &got_output);",
" av_log(NULL, AV_LOG_ERROR, \"Error while ... | static void FUNC_0(InputStream *VAR_0, const AVPacket *VAR_1, int VAR_2)
{
int VAR_3;
int VAR_4 = 0;
AVPacket avpkt;
if (VAR_0->next_dts == AV_NOPTS_VALUE)
VAR_0->next_dts = VAR_0->last_dts;
if (!VAR_1) {
av_init_packet(&avpkt);
avpkt.data = NULL;
... | [
"static void FUNC_0(InputStream *VAR_0, const AVPacket *VAR_1, int VAR_2)\n{",
"int VAR_3;",
"int VAR_4 = 0;",
"AVPacket avpkt;",
"if (VAR_0->next_dts == AV_NOPTS_VALUE)\nVAR_0->next_dts = VAR_0->last_dts;",
"if (!VAR_1) {",
"av_init_packet(&avpkt);",
"avpkt.data = NULL;",
"avpkt.size = 0;",
"} el... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
45
],
[
47
],
[
49
],
[
53,
55
],
[
59
],
[... |
19,881 | static int adx_decode_header(AVCodecContext *avctx,const unsigned char *buf,size_t bufsize)
{
int offset;
int channels,freq,size;
offset = is_adx(buf,bufsize);
if (offset==0) return 0;
channels = buf[7];
freq = read_long(buf+8);
size = read_long(buf+12);
// printf("freq=%d ch=%d\n",freq,channels);... | true | FFmpeg | f19af812a32c1398d48c3550d11dbc6aafbb2bfc | static int adx_decode_header(AVCodecContext *avctx,const unsigned char *buf,size_t bufsize)
{
int offset;
int channels,freq,size;
offset = is_adx(buf,bufsize);
if (offset==0) return 0;
channels = buf[7];
freq = read_long(buf+8);
size = read_long(buf+12);
avctx->sample_rate = freq;
avctx->ch... | {
"code": [
"\treturn offset;",
"\tint offset;",
"\tint channels,freq,size;",
"\toffset = is_adx(buf,bufsize);",
"\tif (offset==0) return 0;",
"\tchannels = buf[7];",
"\tfreq = read_long(buf+8);",
"\tsize = read_long(buf+12);",
"\tavctx->sample_rate = freq;",
"\tavctx->channels... | static int FUNC_0(AVCodecContext *VAR_0,const unsigned char *VAR_1,size_t VAR_2)
{
int VAR_3;
int VAR_4,VAR_5,VAR_6;
VAR_3 = is_adx(VAR_1,VAR_2);
if (VAR_3==0) return 0;
VAR_4 = VAR_1[7];
VAR_5 = read_long(VAR_1+8);
VAR_6 = read_long(VAR_1+12);
VAR_0->sample_rate = VAR_5;
VAR_0->VAR_4 = VAR... | [
"static int FUNC_0(AVCodecContext *VAR_0,const unsigned char *VAR_1,size_t VAR_2)\n{",
"int VAR_3;",
"int VAR_4,VAR_5,VAR_6;",
"VAR_3 = is_adx(VAR_1,VAR_2);",
"if (VAR_3==0) return 0;",
"VAR_4 = VAR_1[7];",
"VAR_5 = read_long(VAR_1+8);",
"VAR_6 = read_long(VAR_1+12);",
"VAR_0->sample_rate = VAR_5;",... | [
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
29
],
[
31
],
[
33
],
[
39
],
[
41
]
] |
19,882 | uint32_t pci_default_read_config(PCIDevice *d,
uint32_t address, int len)
{
uint32_t val;
switch(len) {
case 1:
val = d->config[address];
break;
case 2:
val = le16_to_cpu(*(uint16_t *)(d->config + address));
break;
default:... | true | qemu | a2d4e44b485222a8972ea9e555b148148c655bb9 | uint32_t pci_default_read_config(PCIDevice *d,
uint32_t address, int len)
{
uint32_t val;
switch(len) {
case 1:
val = d->config[address];
break;
case 2:
val = le16_to_cpu(*(uint16_t *)(d->config + address));
break;
default:... | {
"code": [
" case 1:",
" val = d->config[address];",
" break;",
" case 2:",
" val = le16_to_cpu(*(uint16_t *)(d->config + address));",
" break;",
" val = le32_to_cpu(*(uint32_t *)(d->config + address));"
],
"line_no": [
11,
13,
15,
... | uint32_t FUNC_0(PCIDevice *d,
uint32_t address, int len)
{
uint32_t val;
switch(len) {
case 1:
val = d->config[address];
break;
case 2:
val = le16_to_cpu(*(uint16_t *)(d->config + address));
break;
default:
case 4:
... | [
"uint32_t FUNC_0(PCIDevice *d,\nuint32_t address, int len)\n{",
"uint32_t val;",
"switch(len) {",
"case 1:\nval = d->config[address];",
"break;",
"case 2:\nval = le16_to_cpu(*(uint16_t *)(d->config + address));",
"break;",
"default:\ncase 4:\nval = le32_to_cpu(*(uint32_t *)(d->config + address));",
... | [
0,
0,
0,
1,
1,
1,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
19,883 | static QDict *qmp_check_input_obj(QObject *input_obj, Error **errp)
{
const QDictEntry *ent;
int has_exec_key = 0;
QDict *input_dict;
if (qobject_type(input_obj) != QTYPE_QDICT) {
error_set(errp, QERR_QMP_BAD_INPUT_OBJECT, "object");
return NULL;
}
input_dict = qobje... | true | qemu | 779cec4d20907cbccb26fbf5f5c19c6cdee33eff | static QDict *qmp_check_input_obj(QObject *input_obj, Error **errp)
{
const QDictEntry *ent;
int has_exec_key = 0;
QDict *input_dict;
if (qobject_type(input_obj) != QTYPE_QDICT) {
error_set(errp, QERR_QMP_BAD_INPUT_OBJECT, "object");
return NULL;
}
input_dict = qobje... | {
"code": [],
"line_no": []
} | static QDict *FUNC_0(QObject *input_obj, Error **errp)
{
const QDictEntry *VAR_0;
int VAR_1 = 0;
QDict *input_dict;
if (qobject_type(input_obj) != QTYPE_QDICT) {
error_set(errp, QERR_QMP_BAD_INPUT_OBJECT, "object");
return NULL;
}
input_dict = qobject_to_qdict(input_... | [
"static QDict *FUNC_0(QObject *input_obj, Error **errp)\n{",
"const QDictEntry *VAR_0;",
"int VAR_1 = 0;",
"QDict *input_dict;",
"if (qobject_type(input_obj) != QTYPE_QDICT) {",
"error_set(errp, QERR_QMP_BAD_INPUT_OBJECT, \"object\");",
"return NULL;",
"}",
"input_dict = qobject_to_qdict(input_obj);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
19,884 | static void vmxnet3_rx_need_csum_calculate(struct NetRxPkt *pkt,
const void *pkt_data,
size_t pkt_len)
{
struct virtio_net_hdr *vhdr;
bool isip4, isip6, istcp, isudp;
uint8_t *data;
int len;
if (!net_rx_p... | true | qemu | 0dacea92d26c31d453c58de2e99c178fee554166 | static void vmxnet3_rx_need_csum_calculate(struct NetRxPkt *pkt,
const void *pkt_data,
size_t pkt_len)
{
struct virtio_net_hdr *vhdr;
bool isip4, isip6, istcp, isudp;
uint8_t *data;
int len;
if (!net_rx_p... | {
"code": [
" stw_be_p(data + vhdr->csum_offset, net_raw_checksum(data, len));"
],
"line_no": [
73
]
} | static void FUNC_0(struct NetRxPkt *VAR_0,
const void *VAR_1,
size_t VAR_2)
{
struct virtio_net_hdr *VAR_3;
bool isip4, isip6, istcp, isudp;
uint8_t *data;
int VAR_4;
if (!net_rx_pkt_has_virt_hdr(VAR_0)) ... | [
"static void FUNC_0(struct NetRxPkt *VAR_0,\nconst void *VAR_1,\nsize_t VAR_2)\n{",
"struct virtio_net_hdr *VAR_3;",
"bool isip4, isip6, istcp, isudp;",
"uint8_t *data;",
"int VAR_4;",
"if (!net_rx_pkt_has_virt_hdr(VAR_0)) {",
"return;",
"}",
"VAR_3 = net_rx_pkt_get_vhdr(VAR_0);",
"if (!VMXNET_FLA... | [
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
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
53
],
[
55,... |
19,885 | int ff_ps_apply(AVCodecContext *avctx, PSContext *ps, float L[2][38][64], float R[2][38][64], int top)
{
float Lbuf[91][32][2];
float Rbuf[91][32][2];
const int len = 32;
int is34 = ps->is34bands;
top += NR_BANDS[is34] - 64;
memset(ps->delay+top, 0, (NR_BANDS[is34] - top)*sizeof(ps->del... | false | FFmpeg | bf1945af301aff54c33352e75f17aec6cb5269d7 | int ff_ps_apply(AVCodecContext *avctx, PSContext *ps, float L[2][38][64], float R[2][38][64], int top)
{
float Lbuf[91][32][2];
float Rbuf[91][32][2];
const int len = 32;
int is34 = ps->is34bands;
top += NR_BANDS[is34] - 64;
memset(ps->delay+top, 0, (NR_BANDS[is34] - top)*sizeof(ps->del... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0, PSContext *VAR_1, float VAR_2[2][38][64], float VAR_3[2][38][64], int VAR_4)
{
float VAR_5[91][32][2];
float VAR_6[91][32][2];
const int VAR_7 = 32;
int VAR_8 = VAR_1->is34bands;
VAR_4 += NR_BANDS[VAR_8] - 64;
memset(VAR_1->delay+VAR_4, 0, (NR_BANDS[VAR... | [
"int FUNC_0(AVCodecContext *VAR_0, PSContext *VAR_1, float VAR_2[2][38][64], float VAR_3[2][38][64], int VAR_4)\n{",
"float VAR_5[91][32][2];",
"float VAR_6[91][32][2];",
"const int VAR_7 = 32;",
"int VAR_8 = VAR_1->is34bands;",
"VAR_4 += NR_BANDS[VAR_8] - 64;",
"memset(VAR_1->delay+VAR_4, 0, (NR_BANDS[... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
]
] |
19,887 | static void bl_intrp(EVRCContext *e, float *ex, float delay)
{
float *f;
int offset, i, coef_idx;
int16_t t;
offset = lrintf(fabs(delay));
t = (offset - delay + 0.5) * 8.0 + 0.5;
if (t == 8) {
t = 0;
offset--;
}
f = ex - offset - 8;
coef_idx = t * ... | false | FFmpeg | f18d2dff1194b34b79dc7641aafe54d1df349e40 | static void bl_intrp(EVRCContext *e, float *ex, float delay)
{
float *f;
int offset, i, coef_idx;
int16_t t;
offset = lrintf(fabs(delay));
t = (offset - delay + 0.5) * 8.0 + 0.5;
if (t == 8) {
t = 0;
offset--;
}
f = ex - offset - 8;
coef_idx = t * ... | {
"code": [],
"line_no": []
} | static void FUNC_0(EVRCContext *VAR_0, float *VAR_1, float VAR_2)
{
float *VAR_3;
int VAR_4, VAR_5, VAR_6;
int16_t t;
VAR_4 = lrintf(fabs(VAR_2));
t = (VAR_4 - VAR_2 + 0.5) * 8.0 + 0.5;
if (t == 8) {
t = 0;
VAR_4--;
}
VAR_3 = VAR_1 - VAR_4 - 8;
VAR... | [
"static void FUNC_0(EVRCContext *VAR_0, float *VAR_1, float VAR_2)\n{",
"float *VAR_3;",
"int VAR_4, VAR_5, VAR_6;",
"int16_t t;",
"VAR_4 = lrintf(fabs(VAR_2));",
"t = (VAR_4 - VAR_2 + 0.5) * 8.0 + 0.5;",
"if (t == 8) {",
"t = 0;",
"VAR_4--;",
"}",
"VAR_3 = VAR_1 - VAR_4 - 8;",
"VAR_6 = t * (2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
19,888 | static av_always_inline void fic_idct(int16_t *blk, int step, int shift, int rnd)
{
const int t0 = 27246 * blk[3 * step] + 18405 * blk[5 * step];
const int t1 = 27246 * blk[5 * step] - 18405 * blk[3 * step];
const int t2 = 6393 * blk[7 * step] + 32139 * blk[1 * step];
const int t3 = 6393 * bl... | true | FFmpeg | 0c9d5b015c2022e8deebb93367f8ee8a8eb779e8 | static av_always_inline void fic_idct(int16_t *blk, int step, int shift, int rnd)
{
const int t0 = 27246 * blk[3 * step] + 18405 * blk[5 * step];
const int t1 = 27246 * blk[5 * step] - 18405 * blk[3 * step];
const int t2 = 6393 * blk[7 * step] + 32139 * blk[1 * step];
const int t3 = 6393 * bl... | {
"code": [
" const int t0 = 27246 * blk[3 * step] + 18405 * blk[5 * step];",
" const int t1 = 27246 * blk[5 * step] - 18405 * blk[3 * step];",
" const int t2 = 6393 * blk[7 * step] + 32139 * blk[1 * step];",
" const int t3 = 6393 * blk[1 * step] - 32139 * blk[7 * step];",
" c... | static av_always_inline void FUNC_0(int16_t *blk, int step, int shift, int rnd)
{
const int VAR_0 = 27246 * blk[3 * step] + 18405 * blk[5 * step];
const int VAR_1 = 27246 * blk[5 * step] - 18405 * blk[3 * step];
const int VAR_2 = 6393 * blk[7 * step] + 32139 * blk[1 * step];
const int VAR_3 = ... | [
"static av_always_inline void FUNC_0(int16_t *blk, int step, int shift, int rnd)\n{",
"const int VAR_0 = 27246 * blk[3 * step] + 18405 * blk[5 * step];",
"const int VAR_1 = 27246 * blk[5 * step] - 18405 * blk[3 * step];",
"const int VAR_2 = 6393 * blk[7 * step] + 32139 * blk[1 * step];",
"const int VAR_... | [
0,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
... |
19,890 | static int qemu_rdma_alloc_pd_cq(RDMAContext *rdma)
{
/* allocate pd */
rdma->pd = ibv_alloc_pd(rdma->verbs);
if (!rdma->pd) {
fprintf(stderr, "failed to allocate protection domain\n");
return -1;
}
/* create completion channel */
rdma->comp_channel = ibv_create_comp_c... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static int qemu_rdma_alloc_pd_cq(RDMAContext *rdma)
{
rdma->pd = ibv_alloc_pd(rdma->verbs);
if (!rdma->pd) {
fprintf(stderr, "failed to allocate protection domain\n");
return -1;
}
rdma->comp_channel = ibv_create_comp_channel(rdma->verbs);
if (!rdma->comp_channe... | {
"code": [],
"line_no": []
} | static int FUNC_0(RDMAContext *VAR_0)
{
VAR_0->pd = ibv_alloc_pd(VAR_0->verbs);
if (!VAR_0->pd) {
fprintf(stderr, "failed to allocate protection domain\n");
return -1;
}
VAR_0->comp_channel = ibv_create_comp_channel(VAR_0->verbs);
if (!VAR_0->comp_channel) {
... | [
"static int FUNC_0(RDMAContext *VAR_0)\n{",
"VAR_0->pd = ibv_alloc_pd(VAR_0->verbs);",
"if (!VAR_0->pd) {",
"fprintf(stderr, \"failed to allocate protection domain\\n\");",
"return -1;",
"}",
"VAR_0->comp_channel = ibv_create_comp_channel(VAR_0->verbs);",
"if (!VAR_0->comp_channel) {",
"fprintf(stde... | [
0,
0,
0,
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
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
59,
61
],
[
63... |
19,891 | static void qobject_input_type_int64(Visitor *v, const char *name, int64_t *obj,
Error **errp)
{
QObjectInputVisitor *qiv = to_qiv(v);
QObject *qobj = qobject_input_get_object(qiv, name, true, errp);
QInt *qint;
if (!qobj) {
return;
}
qint ... | true | qemu | a9fc37f6bc3f2ab90585cb16493da9f6dcfbfbcf | static void qobject_input_type_int64(Visitor *v, const char *name, int64_t *obj,
Error **errp)
{
QObjectInputVisitor *qiv = to_qiv(v);
QObject *qobj = qobject_input_get_object(qiv, name, true, errp);
QInt *qint;
if (!qobj) {
return;
}
qint ... | {
"code": [
" error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : \"null\",",
" error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : \"null\",",
" error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : \"null\",",
" \"integer\");",
" ... | static void FUNC_0(Visitor *VAR_0, const char *VAR_1, int64_t *VAR_2,
Error **VAR_3)
{
QObjectInputVisitor *qiv = to_qiv(VAR_0);
QObject *qobj = qobject_input_get_object(qiv, VAR_1, true, VAR_3);
QInt *qint;
if (!qobj) {
return;
}
qint = qo... | [
"static void FUNC_0(Visitor *VAR_0, const char *VAR_1, int64_t *VAR_2,\nError **VAR_3)\n{",
"QObjectInputVisitor *qiv = to_qiv(VAR_0);",
"QObject *qobj = qobject_input_get_object(qiv, VAR_1, true, VAR_3);",
"QInt *qint;",
"if (!qobj) {",
"return;",
"}",
"qint = qobject_to_qint(qobj);",
"if (!qint) {... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
35
],
[
37
]
] |
19,894 | static void xlnx_zynqmp_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
dc->props = xlnx_zynqmp_props;
dc->realize = xlnx_zynqmp_realize;
} | true | qemu | 4c315c27661502a0813b129e41c0bf640c34a8d6 | static void xlnx_zynqmp_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
dc->props = xlnx_zynqmp_props;
dc->realize = xlnx_zynqmp_realize;
} | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
dc->props = xlnx_zynqmp_props;
dc->realize = xlnx_zynqmp_realize;
} | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"dc->props = xlnx_zynqmp_props;",
"dc->realize = xlnx_zynqmp_realize;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
]
] |
19,895 | static target_ulong h_send_logical_lan(CPUPPCState *env, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
target_ulong reg = args[0];
target_ulong *bufs = args + 1;
target_ulong continue_token = args[7];
VIOsPAPRDevice *sdev = spapr_vio_fin... | true | qemu | ad0ebb91cd8b5fdc4a583b03645677771f420a46 | static target_ulong h_send_logical_lan(CPUPPCState *env, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
target_ulong reg = args[0];
target_ulong *bufs = args + 1;
target_ulong continue_token = args[7];
VIOsPAPRDevice *sdev = spapr_vio_fin... | {
"code": [
" ret = spapr_tce_dma_read(sdev, VLAN_BD_ADDR(bufs[i]),",
" if (ret < 0) {",
" return ret;",
" if (ret < 0) {",
" return ret;",
" if (ret < 0) {",
" return ret;",
" return H_PARAMETER;",
" return... | static target_ulong FUNC_0(CPUPPCState *env, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
target_ulong reg = args[0];
target_ulong *bufs = args + 1;
target_ulong continue_token = args[7];
VIOsPAPRDevice *sdev = spapr_vio_find_by_reg(spa... | [
"static target_ulong FUNC_0(CPUPPCState *env, sPAPREnvironment *spapr,\ntarget_ulong opcode, target_ulong *args)\n{",
"target_ulong reg = args[0];",
"target_ulong *bufs = args + 1;",
"target_ulong continue_token = args[7];",
"VIOsPAPRDevice *sdev = spapr_vio_find_by_reg(spapr->vio_bus, reg);",
"VIOsPAPRVL... | [
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,
1,
1,
1,
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
... |
19,896 | static ssize_t virtio_net_receive(NetClientState *nc, const uint8_t *buf, size_t size)
{
VirtIONet *n = qemu_get_nic_opaque(nc);
VirtIONetQueue *q = virtio_net_get_subqueue(nc);
VirtIODevice *vdev = VIRTIO_DEVICE(n);
struct iovec mhdr_sg[VIRTQUEUE_MAX_SIZE];
struct virtio_net_hdr_mrg_rxbuf mhd... | true | qemu | 0cf33fb6b49a19de32859e2cdc6021334f448fb3 | static ssize_t virtio_net_receive(NetClientState *nc, const uint8_t *buf, size_t size)
{
VirtIONet *n = qemu_get_nic_opaque(nc);
VirtIONetQueue *q = virtio_net_get_subqueue(nc);
VirtIODevice *vdev = VIRTIO_DEVICE(n);
struct iovec mhdr_sg[VIRTQUEUE_MAX_SIZE];
struct virtio_net_hdr_mrg_rxbuf mhd... | {
"code": [
"#if 0",
" error_report(\"virtio-net truncated non-mergeable packet: \"",
" \"i %zd mergeable %d offset %zd, size %zd, \"",
" \"guest hdr len %zd, host hdr len %zd\",",
" i, n->mergeable_rx_bufs,",
"... | static ssize_t FUNC_0(NetClientState *nc, const uint8_t *buf, size_t size)
{
VirtIONet *n = qemu_get_nic_opaque(nc);
VirtIONetQueue *q = virtio_net_get_subqueue(nc);
VirtIODevice *vdev = VIRTIO_DEVICE(n);
struct iovec VAR_0[VIRTQUEUE_MAX_SIZE];
struct virtio_net_hdr_mrg_rxbuf VAR_1;
unsig... | [
"static ssize_t FUNC_0(NetClientState *nc, const uint8_t *buf, size_t size)\n{",
"VirtIONet *n = qemu_get_nic_opaque(nc);",
"VirtIONetQueue *q = virtio_net_get_subqueue(nc);",
"VirtIODevice *vdev = VIRTIO_DEVICE(n);",
"struct iovec VAR_0[VIRTQUEUE_MAX_SIZE];",
"struct virtio_net_hdr_mrg_rxbuf 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,
1,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
31
],
[
33
],
[
35
],
[
39,
41
],
[
45
],
[
49
],
[
51
],
[
53
],
[... |
19,897 | static int read_sm_data(AVFormatContext *s, AVIOContext *bc, AVPacket *pkt, int is_meta, int64_t maxpos)
{
int count = ffio_read_varlen(bc);
int skip_start = 0;
int skip_end = 0;
int channels = 0;
int64_t channel_layout = 0;
int sample_rate = 0;
int width = 0;
int height = 0;
... | true | FFmpeg | 0b79a389ba488d50fd9947554d803fc51b877bb3 | static int read_sm_data(AVFormatContext *s, AVIOContext *bc, AVPacket *pkt, int is_meta, int64_t maxpos)
{
int count = ffio_read_varlen(bc);
int skip_start = 0;
int skip_end = 0;
int channels = 0;
int64_t channel_layout = 0;
int sample_rate = 0;
int width = 0;
int height = 0;
... | {
"code": [
" get_str(bc, str_value, sizeof(str_value));",
" get_str(bc, type_str, sizeof(type_str));",
" get_str(bc, str_value, sizeof(str_value));",
" get_str(bc, str_value, sizeof(str_value));",
" get_str(bc, type_str, sizeof(type_str));"
... | static int FUNC_0(AVFormatContext *VAR_0, AVIOContext *VAR_1, AVPacket *VAR_2, int VAR_3, int64_t VAR_4)
{
int VAR_5 = ffio_read_varlen(VAR_1);
int VAR_6 = 0;
int VAR_7 = 0;
int VAR_8 = 0;
int64_t channel_layout = 0;
int VAR_9 = 0;
int VAR_10 = 0;
int VAR_11 = 0;
int VAR_12... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVIOContext *VAR_1, AVPacket *VAR_2, int VAR_3, int64_t VAR_4)\n{",
"int VAR_5 = ffio_read_varlen(VAR_1);",
"int VAR_6 = 0;",
"int VAR_7 = 0;",
"int VAR_8 = 0;",
"int64_t channel_layout = 0;",
"int VAR_9 = 0;",
"int VAR_10 = 0;",
"int VAR_11 = 0;",
"int V... | [
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
19,898 | static uint32_t epic_decode_pixel_pred(ePICContext *dc, int x, int y,
const uint32_t *curr_row,
const uint32_t *above_row)
{
uint32_t N, W, NW, pred;
unsigned delta;
int GN, GW, GNW, R, G, B;
if (x && y) {
W = curr_ro... | true | FFmpeg | b1e242bc565665420661e016127fe07b4b615ecb | static uint32_t epic_decode_pixel_pred(ePICContext *dc, int x, int y,
const uint32_t *curr_row,
const uint32_t *above_row)
{
uint32_t N, W, NW, pred;
unsigned delta;
int GN, GW, GNW, R, G, B;
if (x && y) {
W = curr_ro... | {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(ePICContext *dc, int x, int y,
const uint32_t *curr_row,
const uint32_t *above_row)
{
uint32_t N, W, NW, pred;
unsigned VAR_0;
int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;
if (x && y) {
W = cur... | [
"static uint32_t FUNC_0(ePICContext *dc, int x, int y,\nconst uint32_t *curr_row,\nconst uint32_t *above_row)\n{",
"uint32_t N, W, NW, pred;",
"unsigned VAR_0;",
"int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;",
"if (x && y) {",
"W = curr_row[x - 1];",
"N = above_row[x];",
"NW = above_row[x - 1];",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3,
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16,
17,
18,
19
],
[
20,
21,
22,
23
],
[
24
],
[
25,
... |
19,899 | static USBDevice *usb_host_device_open_addr(int bus_num, int addr, const char *prod_name)
{
int fd = -1, ret;
USBDevice *d = NULL;
USBHostDevice *dev;
struct usbdevfs_connectinfo ci;
char buf[1024];
printf("husb: open device %d.%d\n", bus_num, addr);
if (!usb_host_device_path) {
... | true | qemu | 33e66b86d89040f0a9e99aa53deb74ce8936a649 | static USBDevice *usb_host_device_open_addr(int bus_num, int addr, const char *prod_name)
{
int fd = -1, ret;
USBDevice *d = NULL;
USBHostDevice *dev;
struct usbdevfs_connectinfo ci;
char buf[1024];
printf("husb: open device %d.%d\n", bus_num, addr);
if (!usb_host_device_path) {
... | {
"code": [
" qdev_init(&d->qdev);"
],
"line_no": [
173
]
} | static USBDevice *FUNC_0(int bus_num, int addr, const char *prod_name)
{
int VAR_0 = -1, VAR_1;
USBDevice *d = NULL;
USBHostDevice *dev;
struct usbdevfs_connectinfo VAR_2;
char VAR_3[1024];
printf("husb: open device %d.%d\n", bus_num, addr);
if (!usb_host_device_path) {
... | [
"static USBDevice *FUNC_0(int bus_num, int addr, const char *prod_name)\n{",
"int VAR_0 = -1, VAR_1;",
"USBDevice *d = NULL;",
"USBHostDevice *dev;",
"struct usbdevfs_connectinfo VAR_2;",
"char VAR_3[1024];",
"printf(\"husb: open device %d.%d\\n\", bus_num, addr);",
"if (!usb_host_device_path) {",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[... |
19,900 | static int vp9_decode_frame(AVCodecContext *avctx, void *frame,
int *got_frame, AVPacket *pkt)
{
const uint8_t *data = pkt->data;
int size = pkt->size;
VP9Context *s = avctx->priv_data;
int ret, i, j, ref;
int retain_segmap_ref = s->s.frames[REF_FRAME_SEGMAP].segme... | true | FFmpeg | 5e03eea673a9da2253ed15152e46b1422b35d145 | static int vp9_decode_frame(AVCodecContext *avctx, void *frame,
int *got_frame, AVPacket *pkt)
{
const uint8_t *data = pkt->data;
int size = pkt->size;
VP9Context *s = avctx->priv_data;
int ret, i, j, ref;
int retain_segmap_ref = s->s.frames[REF_FRAME_SEGMAP].segme... | {
"code": [
" if (ret < 0)"
],
"line_no": [
367
]
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_4;
int VAR_5 = VAR_3->VAR_5;
VP9Context *s = VAR_0->priv_data;
int VAR_6, VAR_7, VAR_11, VAR_9;
int VAR_10 = s->s.frames[REF_FRAME_SEGMAP].segment... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_4;",
"int VAR_5 = VAR_3->VAR_5;",
"VP9Context *s = VAR_0->priv_data;",
"int VAR_6, VAR_7, VAR_11, VAR_9;",
"int VAR_10 = s->s.frames[REF_FRAME_SEGMAP].segmentation_map &&\n(!s->s.h.... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45,
47
],
[... |
19,901 | static void ccid_card_vscard_send_msg(PassthruState *s,
VSCMsgType type, uint32_t reader_id,
const uint8_t *payload, uint32_t length)
{
VSCMsgHeader scr_msg_header;
scr_msg_header.type = htonl(type);
scr_msg_header.reader_id = htonl(reader_id);
scr_msg_header.length = htonl(leng... | true | qemu | 6ab3fc32ea640026726bc5f9f4db622d0954fb8a | static void ccid_card_vscard_send_msg(PassthruState *s,
VSCMsgType type, uint32_t reader_id,
const uint8_t *payload, uint32_t length)
{
VSCMsgHeader scr_msg_header;
scr_msg_header.type = htonl(type);
scr_msg_header.reader_id = htonl(reader_id);
scr_msg_header.length = htonl(leng... | {
"code": [
" qemu_chr_fe_write(s->cs, (uint8_t *)&scr_msg_header, sizeof(VSCMsgHeader));",
" qemu_chr_fe_write(s->cs, payload, length);"
],
"line_no": [
19,
21
]
} | static void FUNC_0(PassthruState *VAR_0,
VSCMsgType VAR_1, uint32_t VAR_2,
const uint8_t *VAR_3, uint32_t VAR_4)
{
VSCMsgHeader scr_msg_header;
scr_msg_header.VAR_1 = htonl(VAR_1);
scr_msg_header.VAR_2 = htonl(VAR_2);
scr_msg_header.VAR_4 = htonl(VAR_4);
qemu_chr_fe_write(V... | [
"static void FUNC_0(PassthruState *VAR_0,\nVSCMsgType VAR_1, uint32_t VAR_2,\nconst uint8_t *VAR_3, uint32_t VAR_4)\n{",
"VSCMsgHeader scr_msg_header;",
"scr_msg_header.VAR_1 = htonl(VAR_1);",
"scr_msg_header.VAR_2 = htonl(VAR_2);",
"scr_msg_header.VAR_4 = htonl(VAR_4);",
"qemu_chr_fe_write(VAR_0->cs, (ui... | [
0,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
19,902 | static int kvmclock_post_load(void *opaque, int version_id)
{
KVMClockState *s = opaque;
struct kvm_clock_data data;
data.clock = s->clock;
data.flags = 0;
return kvm_vm_ioctl(kvm_state, KVM_SET_CLOCK, &data);
}
| true | qemu | 00f4d64ee76e873be881a82d893a591487aa7950 | static int kvmclock_post_load(void *opaque, int version_id)
{
KVMClockState *s = opaque;
struct kvm_clock_data data;
data.clock = s->clock;
data.flags = 0;
return kvm_vm_ioctl(kvm_state, KVM_SET_CLOCK, &data);
}
| {
"code": [
" KVMClockState *s = opaque;",
" struct kvm_clock_data data;",
"static int kvmclock_post_load(void *opaque, int version_id)",
" KVMClockState *s = opaque;",
" struct kvm_clock_data data;",
" data.clock = s->clock;",
" data.flags = 0;",
" return kvm_vm_i... | static int FUNC_0(void *VAR_0, int VAR_1)
{
KVMClockState *s = VAR_0;
struct kvm_clock_data VAR_2;
VAR_2.clock = s->clock;
VAR_2.flags = 0;
return kvm_vm_ioctl(kvm_state, KVM_SET_CLOCK, &VAR_2);
}
| [
"static int FUNC_0(void *VAR_0, int VAR_1)\n{",
"KVMClockState *s = VAR_0;",
"struct kvm_clock_data VAR_2;",
"VAR_2.clock = s->clock;",
"VAR_2.flags = 0;",
"return kvm_vm_ioctl(kvm_state, KVM_SET_CLOCK, &VAR_2);",
"}"
] | [
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
19,903 | static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, bool is_64)
{
TCGReg datalo, datahi, addrlo, rbase;
TCGReg addrhi __attribute__((unused));
TCGMemOpIdx oi;
TCGMemOp opc, s_bits;
#ifdef CONFIG_SOFTMMU
int mem_index;
tcg_insn_unit *label_ptr;
#endif
datalo = *args++;
... | true | qemu | 68d45bb61c5bbfb3999486f78cf026c1e79eb301 | static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, bool is_64)
{
TCGReg datalo, datahi, addrlo, rbase;
TCGReg addrhi __attribute__((unused));
TCGMemOpIdx oi;
TCGMemOp opc, s_bits;
#ifdef CONFIG_SOFTMMU
int mem_index;
tcg_insn_unit *label_ptr;
#endif
datalo = *args++;
... | {
"code": [
" addrlo = tcg_out_tlb_read(s, s_bits, addrlo, addrhi, mem_index, false);"
],
"line_no": [
43
]
} | static void FUNC_0(TCGContext *VAR_0, const TCGArg *VAR_1, bool VAR_2)
{
TCGReg datalo, datahi, addrlo, rbase;
TCGReg addrhi __attribute__((unused));
TCGMemOpIdx oi;
TCGMemOp opc, s_bits;
#ifdef CONFIG_SOFTMMU
int mem_index;
tcg_insn_unit *label_ptr;
#endif
datalo = *VAR_1++;
... | [
"static void FUNC_0(TCGContext *VAR_0, const TCGArg *VAR_1, bool VAR_2)\n{",
"TCGReg datalo, datahi, addrlo, rbase;",
"TCGReg addrhi __attribute__((unused));",
"TCGMemOpIdx oi;",
"TCGMemOp opc, s_bits;",
"#ifdef CONFIG_SOFTMMU\nint mem_index;",
"tcg_insn_unit *label_ptr;",
"#endif\ndatalo = *VAR_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,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39,
41
],
[
43
],
[
49
],
[
51
],
[... |
19,904 | static int decode_dvd_subtitles(AVSubtitle *sub_header,
const uint8_t *buf, int buf_size)
{
int cmd_pos, pos, cmd, x1, y1, x2, y2, offset1, offset2, next_cmd_pos;
int big_offsets, offset_size, is_8bit = 0;
const uint8_t *yuv_palette = 0;
uint8_t colormap[4], alpha[2... | true | FFmpeg | ffbe087b589506cb0e671fa711e5c2c6ea203ac0 | static int decode_dvd_subtitles(AVSubtitle *sub_header,
const uint8_t *buf, int buf_size)
{
int cmd_pos, pos, cmd, x1, y1, x2, y2, offset1, offset2, next_cmd_pos;
int big_offsets, offset_size, is_8bit = 0;
const uint8_t *yuv_palette = 0;
uint8_t colormap[4], alpha[2... | {
"code": [
" while ((cmd_pos + 2 + offset_size) < buf_size) {"
],
"line_no": [
63
]
} | static int FUNC_0(AVSubtitle *VAR_0,
const uint8_t *VAR_1, int VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;
int VAR_13, VAR_14, VAR_15 = 0;
const uint8_t *VAR_16 = 0;
uint8_t colormap[4], alpha[256];
int VAR_17;
int... | [
"static int FUNC_0(AVSubtitle *VAR_0,\nconst uint8_t *VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;",
"int VAR_13, VAR_14, VAR_15 = 0;",
"const uint8_t *VAR_16 = 0;",
"uint8_t colormap[4], alpha[256];",
"int VAR_17;",
"int VAR_18;",
"int VAR_19 = ... | [
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,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
19,905 | int ff_vaapi_render_picture(struct vaapi_context *vactx, VASurfaceID surface)
{
VABufferID va_buffers[3];
unsigned int n_va_buffers = 0;
vaUnmapBuffer(vactx->display, vactx->pic_param_buf_id);
va_buffers[n_va_buffers++] = vactx->pic_param_buf_id;
if (vactx->iq_matrix_buf_id) {
vaUnmapBuffer(... | true | FFmpeg | 2ee380aefbb92c89e8e9c7aa5846aa404919ec7c | int ff_vaapi_render_picture(struct vaapi_context *vactx, VASurfaceID surface)
{
VABufferID va_buffers[3];
unsigned int n_va_buffers = 0;
vaUnmapBuffer(vactx->display, vactx->pic_param_buf_id);
va_buffers[n_va_buffers++] = vactx->pic_param_buf_id;
if (vactx->iq_matrix_buf_id) {
vaUnmapBuffer(... | {
"code": [],
"line_no": []
} | int FUNC_0(struct vaapi_context *VAR_0, VASurfaceID VAR_1)
{
VABufferID va_buffers[3];
unsigned int VAR_2 = 0;
vaUnmapBuffer(VAR_0->display, VAR_0->pic_param_buf_id);
va_buffers[VAR_2++] = VAR_0->pic_param_buf_id;
if (VAR_0->iq_matrix_buf_id) {
vaUnmapBuffer(VAR_0->display, VAR_0->iq_matrix_... | [
"int FUNC_0(struct vaapi_context *VAR_0, VASurfaceID VAR_1)\n{",
"VABufferID va_buffers[3];",
"unsigned int VAR_2 = 0;",
"vaUnmapBuffer(VAR_0->display, VAR_0->pic_param_buf_id);",
"va_buffers[VAR_2++] = VAR_0->pic_param_buf_id;",
"if (VAR_0->iq_matrix_buf_id) {",
"vaUnmapBuffer(VAR_0->display, VAR_0->iq... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15,
16,
17
],
[
18,
19,
20
],
[
21,
22,
23,
24
],
[
... |
19,906 | static av_cold int xcbgrab_read_header(AVFormatContext *s)
{
XCBGrabContext *c = s->priv_data;
int screen_num, ret;
const xcb_setup_t *setup;
char *host = s->filename[0] ? s->filename : NULL;
const char *opts = strchr(s->filename, '+');
if (opts) {
sscanf(opts, "%d,%d",... | true | FFmpeg | 5f5b78aca35d07c771f5c4c73a984be9fe04a0b8 | static av_cold int xcbgrab_read_header(AVFormatContext *s)
{
XCBGrabContext *c = s->priv_data;
int screen_num, ret;
const xcb_setup_t *setup;
char *host = s->filename[0] ? s->filename : NULL;
const char *opts = strchr(s->filename, '+');
if (opts) {
sscanf(opts, "%d,%d",... | {
"code": [
" if (opts)",
" av_free(host);"
],
"line_no": [
33,
35
]
} | static av_cold int FUNC_0(AVFormatContext *s)
{
XCBGrabContext *c = s->priv_data;
int VAR_0, VAR_1;
const xcb_setup_t *VAR_2;
char *VAR_3 = s->filename[0] ? s->filename : NULL;
const char *VAR_4 = strchr(s->filename, '+');
if (VAR_4) {
sscanf(VAR_4, "%d,%d", &c->x, &c->... | [
"static av_cold int FUNC_0(AVFormatContext *s)\n{",
"XCBGrabContext *c = s->priv_data;",
"int VAR_0, VAR_1;",
"const xcb_setup_t *VAR_2;",
"char *VAR_3 = s->filename[0] ? s->filename : NULL;",
"const char *VAR_4 = strchr(s->filename, '+');",
"if (VAR_4) {",
"sscanf(VAR_4, \"%d,%d\", &c->x, &c-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33,
35
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
53
... |
19,909 | static int parse_pixel_format(AVCodecContext *avctx)
{
DDSContext *ctx = avctx->priv_data;
GetByteContext *gbc = &ctx->gbc;
char buf[32];
uint32_t flags, fourcc, gimp_tag;
enum DDSDXGIFormat dxgi;
int size, bpp, r, g, b, a;
int alpha_exponent, ycocg_classic, ycocg_scaled, normal_map, array;
... | true | FFmpeg | 0a8bff788b0a9f96b863f0e836a235cb1d223f55 | static int parse_pixel_format(AVCodecContext *avctx)
{
DDSContext *ctx = avctx->priv_data;
GetByteContext *gbc = &ctx->gbc;
char buf[32];
uint32_t flags, fourcc, gimp_tag;
enum DDSDXGIFormat dxgi;
int size, bpp, r, g, b, a;
int alpha_exponent, ycocg_classic, ycocg_scaled, normal_map, array;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0)
{
DDSContext *ctx = VAR_0->priv_data;
GetByteContext *gbc = &ctx->gbc;
char VAR_1[32];
uint32_t flags, fourcc, gimp_tag;
enum DDSDXGIFormat VAR_2;
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
int VAR_9, VAR_10, VAR_11, VAR_12, VAR_13;
bytest... | [
"static int FUNC_0(AVCodecContext *VAR_0)\n{",
"DDSContext *ctx = VAR_0->priv_data;",
"GetByteContext *gbc = &ctx->gbc;",
"char VAR_1[32];",
"uint32_t flags, fourcc, gimp_tag;",
"enum DDSDXGIFormat VAR_2;",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"int VAR_9, VAR_10, VAR_11, VAR_12, VAR_13;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
23
],... |
19,911 | static int write_number(void *obj, const AVOption *o, void *dst, double num, int den, int64_t intnum)
{
if (o->max*den < num*intnum || o->min*den > num*intnum) {
av_log(obj, AV_LOG_ERROR, "Value %f for parameter '%s' out of range\n",
num*intnum/den, o->name);
return AVERROR(ERANG... | true | FFmpeg | ef4dc3e55b677b27f6e8f471946c711bcf92da82 | static int write_number(void *obj, const AVOption *o, void *dst, double num, int den, int64_t intnum)
{
if (o->max*den < num*intnum || o->min*den > num*intnum) {
av_log(obj, AV_LOG_ERROR, "Value %f for parameter '%s' out of range\n",
num*intnum/den, o->name);
return AVERROR(ERANG... | {
"code": [
" av_log(obj, AV_LOG_ERROR, \"Value %f for parameter '%s' out of range\\n\",",
" num*intnum/den, o->name);"
],
"line_no": [
7,
9
]
} | static int FUNC_0(void *VAR_0, const AVOption *VAR_1, void *VAR_2, double VAR_3, int VAR_4, int64_t VAR_5)
{
if (VAR_1->max*VAR_4 < VAR_3*VAR_5 || VAR_1->min*VAR_4 > VAR_3*VAR_5) {
av_log(VAR_0, AV_LOG_ERROR, "Value %f for parameter '%s' out of range\n",
VAR_3*VAR_5/VAR_4, VAR_1->name);
... | [
"static int FUNC_0(void *VAR_0, const AVOption *VAR_1, void *VAR_2, double VAR_3, int VAR_4, int64_t VAR_5)\n{",
"if (VAR_1->max*VAR_4 < VAR_3*VAR_5 || VAR_1->min*VAR_4 > VAR_3*VAR_5) {",
"av_log(VAR_0, AV_LOG_ERROR, \"Value %f for parameter '%s' out of range\\n\",\nVAR_3*VAR_5/VAR_4, VAR_1->name);",
"return ... | [
0,
0,
1,
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
]
] |
19,913 | static uint64_t itc_tag_read(void *opaque, hwaddr addr, unsigned size)
{
MIPSITUState *tag = (MIPSITUState *)opaque;
uint64_t index = addr >> 3;
uint64_t ret = 0;
switch (index) {
case 0 ... ITC_ADDRESSMAP_NUM:
ret = tag->ITCAddressMap[index];
break;
default:
... | true | qemu | f2eb665a11a34ac9f6459f8a18c3d9d8be9ca359 | static uint64_t itc_tag_read(void *opaque, hwaddr addr, unsigned size)
{
MIPSITUState *tag = (MIPSITUState *)opaque;
uint64_t index = addr >> 3;
uint64_t ret = 0;
switch (index) {
case 0 ... ITC_ADDRESSMAP_NUM:
ret = tag->ITCAddressMap[index];
break;
default:
... | {
"code": [
" uint64_t ret = 0;",
" switch (index) {",
" case 0 ... ITC_ADDRESSMAP_NUM:",
" ret = tag->ITCAddressMap[index];",
" break;",
" default:",
" break;",
" return ret;"
],
"line_no": [
9,
13,
15,
17,
19,
21,
19... | static uint64_t FUNC_0(void *opaque, hwaddr addr, unsigned size)
{
MIPSITUState *tag = (MIPSITUState *)opaque;
uint64_t index = addr >> 3;
uint64_t ret = 0;
switch (index) {
case 0 ... ITC_ADDRESSMAP_NUM:
ret = tag->ITCAddressMap[index];
break;
default:
qemu_l... | [
"static uint64_t FUNC_0(void *opaque, hwaddr addr, unsigned size)\n{",
"MIPSITUState *tag = (MIPSITUState *)opaque;",
"uint64_t index = addr >> 3;",
"uint64_t ret = 0;",
"switch (index) {",
"case 0 ... ITC_ADDRESSMAP_NUM:\nret = tag->ITCAddressMap[index];",
"break;",
"default:\nqemu_log_mask(LOG_GUEST... | [
0,
0,
0,
1,
1,
1,
1,
1,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
31
],
[
33
]
] |
19,914 | static int calc_add_mv(RV34DecContext *r, int dir, int val)
{
int mul = dir ? -r->mv_weight2 : r->mv_weight1;
return (val * mul + 0x2000) >> 14;
}
| true | FFmpeg | 4bd869eb7c8416942f12b61db6439d2bfc474456 | static int calc_add_mv(RV34DecContext *r, int dir, int val)
{
int mul = dir ? -r->mv_weight2 : r->mv_weight1;
return (val * mul + 0x2000) >> 14;
}
| {
"code": [
" return (val * mul + 0x2000) >> 14;"
],
"line_no": [
9
]
} | static int FUNC_0(RV34DecContext *VAR_0, int VAR_1, int VAR_2)
{
int VAR_3 = VAR_1 ? -VAR_0->mv_weight2 : VAR_0->mv_weight1;
return (VAR_2 * VAR_3 + 0x2000) >> 14;
}
| [
"static int FUNC_0(RV34DecContext *VAR_0, int VAR_1, int VAR_2)\n{",
"int VAR_3 = VAR_1 ? -VAR_0->mv_weight2 : VAR_0->mv_weight1;",
"return (VAR_2 * VAR_3 + 0x2000) >> 14;",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
19,915 | static void put_line(uint8_t *dst, int size, int width, const int *runs)
{
PutBitContext pb;
int run, mode = ~0, pix_left = width, run_idx = 0;
init_put_bits(&pb, dst, size * 8);
while (pix_left > 0) {
run = runs[run_idx++];
mode = ~mode;
pix_left -= run;
... | true | FFmpeg | 50833c9f7b4e1922197a8955669f8ab3589c8cef | static void put_line(uint8_t *dst, int size, int width, const int *runs)
{
PutBitContext pb;
int run, mode = ~0, pix_left = width, run_idx = 0;
init_put_bits(&pb, dst, size * 8);
while (pix_left > 0) {
run = runs[run_idx++];
mode = ~mode;
pix_left -= run;
... | {
"code": [
" init_put_bits(&pb, dst, size * 8);"
],
"line_no": [
11
]
} | static void FUNC_0(uint8_t *VAR_0, int VAR_1, int VAR_2, const int *VAR_3)
{
PutBitContext pb;
int VAR_4, VAR_5 = ~0, VAR_6 = VAR_2, VAR_7 = 0;
init_put_bits(&pb, VAR_0, VAR_1 * 8);
while (VAR_6 > 0) {
VAR_4 = VAR_3[VAR_7++];
VAR_5 = ~VAR_5;
VAR_6 -= VAR_4;
... | [
"static void FUNC_0(uint8_t *VAR_0, int VAR_1, int VAR_2, const int *VAR_3)\n{",
"PutBitContext pb;",
"int VAR_4, VAR_5 = ~0, VAR_6 = VAR_2, VAR_7 = 0;",
"init_put_bits(&pb, VAR_0, VAR_1 * 8);",
"while (VAR_6 > 0) {",
"VAR_4 = VAR_3[VAR_7++];",
"VAR_5 = ~VAR_5;",
"VAR_6 -= VAR_4;",
"for (... | [
0,
0,
0,
1,
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
]
] |
19,917 | int ff_load_image(uint8_t *data[4], int linesize[4],
int *w, int *h, enum PixelFormat *pix_fmt,
const char *filename, void *log_ctx)
{
AVInputFormat *iformat = NULL;
AVFormatContext *format_ctx;
AVCodec *codec;
AVCodecContext *codec_ctx;
AVFrame *frame;
... | false | FFmpeg | 44391f706b0be13e74b2432b57a6597b210a989c | int ff_load_image(uint8_t *data[4], int linesize[4],
int *w, int *h, enum PixelFormat *pix_fmt,
const char *filename, void *log_ctx)
{
AVInputFormat *iformat = NULL;
AVFormatContext *format_ctx;
AVCodec *codec;
AVCodecContext *codec_ctx;
AVFrame *frame;
... | {
"code": [],
"line_no": []
} | int FUNC_0(uint8_t *VAR_0[4], int VAR_1[4],
int *VAR_2, int *VAR_3, enum PixelFormat *VAR_4,
const char *VAR_5, void *VAR_6)
{
AVInputFormat *iformat = NULL;
AVFormatContext *format_ctx;
AVCodec *codec;
AVCodecContext *codec_ctx;
AVFrame *frame;
int V... | [
"int FUNC_0(uint8_t *VAR_0[4], int VAR_1[4],\nint *VAR_2, int *VAR_3, enum PixelFormat *VAR_4,\nconst char *VAR_5, void *VAR_6)\n{",
"AVInputFormat *iformat = NULL;",
"AVFormatContext *format_ctx;",
"AVCodec *codec;",
"AVCodecContext *codec_ctx;",
"AVFrame *frame;",
"int VAR_7, VAR_8 = 0;",
"AVPacket ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
19,918 | void ff_vdpau_h264_picture_complete(MpegEncContext *s)
{
H264Context *h = s->avctx->priv_data;
struct vdpau_render_state *render;
int i;
render = (struct vdpau_render_state *)s->current_picture_ptr->data[0];
assert(render);
render->info.h264.slice_count = h->slice_num;
if (render... | false | FFmpeg | 49caac24132c06e2f14b275da9048588c7da63d0 | void ff_vdpau_h264_picture_complete(MpegEncContext *s)
{
H264Context *h = s->avctx->priv_data;
struct vdpau_render_state *render;
int i;
render = (struct vdpau_render_state *)s->current_picture_ptr->data[0];
assert(render);
render->info.h264.slice_count = h->slice_num;
if (render... | {
"code": [],
"line_no": []
} | void FUNC_0(MpegEncContext *VAR_0)
{
H264Context *h = VAR_0->avctx->priv_data;
struct vdpau_render_state *VAR_1;
int VAR_2;
VAR_1 = (struct vdpau_render_state *)VAR_0->current_picture_ptr->data[0];
assert(VAR_1);
VAR_1->info.h264.slice_count = h->slice_num;
if (VAR_1->info.h264.s... | [
"void FUNC_0(MpegEncContext *VAR_0)\n{",
"H264Context *h = VAR_0->avctx->priv_data;",
"struct vdpau_render_state *VAR_1;",
"int VAR_2;",
"VAR_1 = (struct vdpau_render_state *)VAR_0->current_picture_ptr->data[0];",
"assert(VAR_1);",
"VAR_1->info.h264.slice_count = h->slice_num;",
"if (VAR_1->info.h264.... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
19,920 | static void flat_print_int(WriterContext *wctx, const char *key, long long int value)
{
flat_print_key_prefix(wctx);
printf("%s=%lld\n", key, value);
}
| false | FFmpeg | 01e4537f66c6d054f8c7bdbdd5b3cfb4220d12fe | static void flat_print_int(WriterContext *wctx, const char *key, long long int value)
{
flat_print_key_prefix(wctx);
printf("%s=%lld\n", key, value);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(WriterContext *VAR_0, const char *VAR_1, long long int VAR_2)
{
flat_print_key_prefix(VAR_0);
printf("%s=%lld\n", VAR_1, VAR_2);
}
| [
"static void FUNC_0(WriterContext *VAR_0, const char *VAR_1, long long int VAR_2)\n{",
"flat_print_key_prefix(VAR_0);",
"printf(\"%s=%lld\\n\", VAR_1, VAR_2);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
19,921 | void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int size)
{
while (size > 0) {
int len = FFMIN(f->end - f->wptr, size);
memcpy(f->wptr, buf, len);
f->wptr += len;
if (f->wptr >= f->end)
f->wptr = f->buffer;
buf += len;
size -= len;
}
... | false | FFmpeg | 50b4468598cbc032c0ec4597df9637f71b9ef664 | void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int size)
{
while (size > 0) {
int len = FFMIN(f->end - f->wptr, size);
memcpy(f->wptr, buf, len);
f->wptr += len;
if (f->wptr >= f->end)
f->wptr = f->buffer;
buf += len;
size -= len;
}
... | {
"code": [],
"line_no": []
} | void FUNC_0(AVFifoBuffer *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
while (VAR_2 > 0) {
int VAR_3 = FFMIN(VAR_0->end - VAR_0->wptr, VAR_2);
memcpy(VAR_0->wptr, VAR_1, VAR_3);
VAR_0->wptr += VAR_3;
if (VAR_0->wptr >= VAR_0->end)
VAR_0->wptr = VAR_0->buffer;
... | [
"void FUNC_0(AVFifoBuffer *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"while (VAR_2 > 0) {",
"int VAR_3 = FFMIN(VAR_0->end - VAR_0->wptr, VAR_2);",
"memcpy(VAR_0->wptr, VAR_1, VAR_3);",
"VAR_0->wptr += VAR_3;",
"if (VAR_0->wptr >= VAR_0->end)\nVAR_0->wptr = VAR_0->buffer;",
"VAR_1 += VAR_3;",
"VAR_2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
19,922 | static int handle_packets(MpegTSContext *ts, int nb_packets)
{
AVFormatContext *s = ts->stream;
uint8_t packet[TS_PACKET_SIZE];
int packet_num, ret = 0;
if (avio_tell(s->pb) != ts->last_pos) {
int i;
av_dlog("Skipping after seek\n");
/* seek detected, flush pes buffer *... | false | FFmpeg | 162f1fbc147bbff6e23b4df1e587cec5d5111052 | static int handle_packets(MpegTSContext *ts, int nb_packets)
{
AVFormatContext *s = ts->stream;
uint8_t packet[TS_PACKET_SIZE];
int packet_num, ret = 0;
if (avio_tell(s->pb) != ts->last_pos) {
int i;
av_dlog("Skipping after seek\n");
for (i = 0; i < NB_PID_MAX... | {
"code": [],
"line_no": []
} | static int FUNC_0(MpegTSContext *VAR_0, int VAR_1)
{
AVFormatContext *s = VAR_0->stream;
uint8_t packet[TS_PACKET_SIZE];
int VAR_2, VAR_3 = 0;
if (avio_tell(s->pb) != VAR_0->last_pos) {
int VAR_4;
av_dlog("Skipping after seek\n");
for (VAR_4 = 0; VAR_4 < NB_PI... | [
"static int FUNC_0(MpegTSContext *VAR_0, int VAR_1)\n{",
"AVFormatContext *s = VAR_0->stream;",
"uint8_t packet[TS_PACKET_SIZE];",
"int VAR_2, VAR_3 = 0;",
"if (avio_tell(s->pb) != VAR_0->last_pos) {",
"int VAR_4;",
"av_dlog(\"Skipping after seek\\n\");",
"for (VAR_4 = 0; VAR_4 < NB_PID_MAX; 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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
... |
19,923 | void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, unsigned int linesize, unsigned int uvlinesize) {
const int mb_xy= mb_x + mb_y*h->mb_stride;
const int mb_type = h->cur_pic.mb_type[mb_xy];
const int mvy_limit = IS_INTERLACED(mb_type) ? 2 : 4;
... | false | FFmpeg | f777504f640260337974848c7d5d7a3f064bbb45 | void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, unsigned int linesize, unsigned int uvlinesize) {
const int mb_xy= mb_x + mb_y*h->mb_stride;
const int mb_type = h->cur_pic.mb_type[mb_xy];
const int mvy_limit = IS_INTERLACED(mb_type) ? 2 : 4;
... | {
"code": [],
"line_no": []
} | void FUNC_0( H264Context *VAR_0, int VAR_1, int VAR_2, uint8_t *VAR_3, uint8_t *VAR_4, uint8_t *VAR_5, unsigned int VAR_6, unsigned int VAR_7) {
const int VAR_8= VAR_1 + VAR_2*VAR_0->mb_stride;
const int VAR_9 = VAR_0->cur_pic.VAR_9[VAR_8];
const int VAR_10 = IS_INTERLACED(VAR_9) ? 2 : 4;
int VAR_11... | [
"void FUNC_0( H264Context *VAR_0, int VAR_1, int VAR_2, uint8_t *VAR_3, uint8_t *VAR_4, uint8_t *VAR_5, unsigned int VAR_6, unsigned int VAR_7) {",
"const int VAR_8= VAR_1 + VAR_2*VAR_0->mb_stride;",
"const int VAR_9 = VAR_0->cur_pic.VAR_9[VAR_8];",
"const int VAR_10 = IS_INTERLACED(VAR_9) ? 2 : 4;",
"int V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
27,
31
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[... |
19,924 | DIRAC_PIXOP(put, ff_put, mmx)
DIRAC_PIXOP(avg, ff_avg, mmx)
DIRAC_PIXOP(avg, ff_avg, mmxext)
void ff_put_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h)
{
if (h&3)
ff_put_dirac_pixels16_c(dst, src, stride, h);
else
ff_put_pixels16_sse2(dst, src[0], stride, h);
... | false | FFmpeg | 6a4832caaede15e3d918b1408ff83fe30324507b | DIRAC_PIXOP(put, ff_put, mmx)
DIRAC_PIXOP(avg, ff_avg, mmx)
DIRAC_PIXOP(avg, ff_avg, mmxext)
void ff_put_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h)
{
if (h&3)
ff_put_dirac_pixels16_c(dst, src, stride, h);
else
ff_put_pixels16_sse2(dst, src[0], stride, h);
... | {
"code": [],
"line_no": []
} | DIRAC_PIXOP(put, ff_put, mmx)
DIRAC_PIXOP(avg, ff_avg, mmx)
DIRAC_PIXOP(avg, ff_avg, mmxext)
void ff_put_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h)
{
if (h&3)
ff_put_dirac_pixels16_c(dst, src, stride, h);
else
ff_put_pixels16_sse2(dst, src[0], stride, h);
... | [
"DIRAC_PIXOP(put, ff_put, mmx)\nDIRAC_PIXOP(avg, ff_avg, mmx)\nDIRAC_PIXOP(avg, ff_avg, mmxext)\nvoid ff_put_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h)\n{",
"if (h&3)\nff_put_dirac_pixels16_c(dst, src, stride, h);",
"else\nff_put_pixels16_sse2(dst, src[0], stride, h);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5,
9,
11
],
[
13,
15
],
[
17,
19
],
[
21
]
] |
19,925 | static CharDriverState *qemu_chr_open_spice_vmc(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
Error **errp)
{
const char *type = backend->u.spicevmc->ty... | false | qemu | d0d7708ba29cbcc343364a46bff981e0ff88366f | static CharDriverState *qemu_chr_open_spice_vmc(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
Error **errp)
{
const char *type = backend->u.spicevmc->ty... | {
"code": [],
"line_no": []
} | static CharDriverState *FUNC_0(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
Error **errp)
{
const char *VAR_0 = backend->u.spicevmc->VAR_0;
const ... | [
"static CharDriverState *FUNC_0(const char *id,\nChardevBackend *backend,\nChardevReturn *ret,\nError **errp)\n{",
"const char *VAR_0 = backend->u.spicevmc->VAR_0;",
"const char **VAR_1 = spice_server_char_device_recognized_subtypes();",
"for (; *VAR_1 != NULL; ++VAR_1) {",
"if (strcmp(VAR_0, *VAR_1) == 0) ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
]
] |
19,926 | void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
{
GArray *table_offsets;
unsigned facs, dsdt, rsdt;
AcpiCpuInfo cpu;
AcpiPmInfo pm;
AcpiMiscInfo misc;
AcpiMcfgInfo mcfg;
PcPciInfo pci;
uint8_t *u;
acpi_get_cpu_info(&cpu);
acpi_get_pm_info(&pm);
... | false | qemu | 99fd437dee468609de8218f0eb3b16621fb6a9c9 | void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
{
GArray *table_offsets;
unsigned facs, dsdt, rsdt;
AcpiCpuInfo cpu;
AcpiPmInfo pm;
AcpiMiscInfo misc;
AcpiMcfgInfo mcfg;
PcPciInfo pci;
uint8_t *u;
acpi_get_cpu_info(&cpu);
acpi_get_pm_info(&pm);
... | {
"code": [],
"line_no": []
} | void FUNC_0(PcGuestInfo *VAR_0, AcpiBuildTables *VAR_1)
{
GArray *table_offsets;
unsigned VAR_2, VAR_3, VAR_4;
AcpiCpuInfo cpu;
AcpiPmInfo pm;
AcpiMiscInfo misc;
AcpiMcfgInfo mcfg;
PcPciInfo pci;
uint8_t *u;
acpi_get_cpu_info(&cpu);
acpi_get_pm_info(&pm);
acpi_g... | [
"void FUNC_0(PcGuestInfo *VAR_0, AcpiBuildTables *VAR_1)\n{",
"GArray *table_offsets;",
"unsigned VAR_2, VAR_3, VAR_4;",
"AcpiCpuInfo cpu;",
"AcpiPmInfo pm;",
"AcpiMiscInfo misc;",
"AcpiMcfgInfo mcfg;",
"PcPciInfo pci;",
"uint8_t *u;",
"acpi_get_cpu_info(&cpu);",
"acpi_get_pm_info(&pm);",
"acp... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
41
],
[
45,
47,
49
],
[... |
19,928 | static uint32_t xen_platform_ioport_readb(void *opaque, uint32_t addr)
{
addr &= 0xff;
if (addr == 0) {
return platform_fixed_ioport_readb(opaque, XEN_PLATFORM_IOPORT);
} else {
return ~0u;
}
}
| false | qemu | de00982e9e14e2d6ba3d148f02c5a1e94deaa985 | static uint32_t xen_platform_ioport_readb(void *opaque, uint32_t addr)
{
addr &= 0xff;
if (addr == 0) {
return platform_fixed_ioport_readb(opaque, XEN_PLATFORM_IOPORT);
} else {
return ~0u;
}
}
| {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(void *opaque, uint32_t addr)
{
addr &= 0xff;
if (addr == 0) {
return platform_fixed_ioport_readb(opaque, XEN_PLATFORM_IOPORT);
} else {
return ~0u;
}
}
| [
"static uint32_t FUNC_0(void *opaque, uint32_t addr)\n{",
"addr &= 0xff;",
"if (addr == 0) {",
"return platform_fixed_ioport_readb(opaque, XEN_PLATFORM_IOPORT);",
"} else {",
"return ~0u;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
19,929 | static ssize_t mp_pacl_getxattr(FsContext *ctx, const char *path,
const char *name, void *value, size_t size)
{
char buffer[PATH_MAX];
return lgetxattr(rpath(ctx, path, buffer), MAP_ACL_ACCESS, value, size);
}
| false | qemu | 4fa4ce7107c6ec432f185307158c5df91ce54308 | static ssize_t mp_pacl_getxattr(FsContext *ctx, const char *path,
const char *name, void *value, size_t size)
{
char buffer[PATH_MAX];
return lgetxattr(rpath(ctx, path, buffer), MAP_ACL_ACCESS, value, size);
}
| {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(FsContext *ctx, const char *path,
const char *name, void *value, size_t size)
{
char VAR_0[PATH_MAX];
return lgetxattr(rpath(ctx, path, VAR_0), MAP_ACL_ACCESS, value, size);
}
| [
"static ssize_t FUNC_0(FsContext *ctx, const char *path,\nconst char *name, void *value, size_t size)\n{",
"char VAR_0[PATH_MAX];",
"return lgetxattr(rpath(ctx, path, VAR_0), MAP_ACL_ACCESS, value, size);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
]
] |
19,930 | void ga_command_state_init(GAState *s, GACommandState *cs)
{
if (vss_init(true)) {
ga_command_state_add(cs, NULL, guest_fsfreeze_cleanup);
}
}
| false | qemu | 1281c08a46df94a66acca140bafc1785c0fcd47f | void ga_command_state_init(GAState *s, GACommandState *cs)
{
if (vss_init(true)) {
ga_command_state_add(cs, NULL, guest_fsfreeze_cleanup);
}
}
| {
"code": [],
"line_no": []
} | void FUNC_0(GAState *VAR_0, GACommandState *VAR_1)
{
if (vss_init(true)) {
ga_command_state_add(VAR_1, NULL, guest_fsfreeze_cleanup);
}
}
| [
"void FUNC_0(GAState *VAR_0, GACommandState *VAR_1)\n{",
"if (vss_init(true)) {",
"ga_command_state_add(VAR_1, NULL, guest_fsfreeze_cleanup);",
"}",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
19,931 | int ff_vaapi_commit_slices(FFVAContext *vactx)
{
VABufferID *slice_buf_ids;
VABufferID slice_param_buf_id, slice_data_buf_id;
if (vactx->slice_count == 0)
return 0;
slice_buf_ids =
av_fast_realloc(vactx->slice_buf_ids,
&vactx->slice_buf_ids_alloc,
... | false | FFmpeg | 8813d55fa5978660d9f4e7dbe1f50da9922be08d | int ff_vaapi_commit_slices(FFVAContext *vactx)
{
VABufferID *slice_buf_ids;
VABufferID slice_param_buf_id, slice_data_buf_id;
if (vactx->slice_count == 0)
return 0;
slice_buf_ids =
av_fast_realloc(vactx->slice_buf_ids,
&vactx->slice_buf_ids_alloc,
... | {
"code": [],
"line_no": []
} | int FUNC_0(FFVAContext *VAR_0)
{
VABufferID *slice_buf_ids;
VABufferID slice_param_buf_id, slice_data_buf_id;
if (VAR_0->slice_count == 0)
return 0;
slice_buf_ids =
av_fast_realloc(VAR_0->slice_buf_ids,
&VAR_0->slice_buf_ids_alloc,
... | [
"int FUNC_0(FFVAContext *VAR_0)\n{",
"VABufferID *slice_buf_ids;",
"VABufferID slice_param_buf_id, slice_data_buf_id;",
"if (VAR_0->slice_count == 0)\nreturn 0;",
"slice_buf_ids =\nav_fast_realloc(VAR_0->slice_buf_ids,\n&VAR_0->slice_buf_ids_alloc,\n(VAR_0->n_slice_buf_ids + 2) * sizeof(slice_buf_ids[0]));"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17,
19,
21,
23
],
[
25,
27
],
[
29
],
[
33
],
[
35,
37,
39,
41,
43,
45
],
[
47
],
[
51
],
[
53,
55,
57,
59,
61,
63
],
... |
19,934 | static void dec_scall(DisasContext *dc)
{
TCGv t0;
int l1;
if (dc->imm5 == 7) {
LOG_DIS("scall\n");
} else if (dc->imm5 == 2) {
LOG_DIS("break\n");
} else {
cpu_abort(dc->env, "invalid opcode\n");
}
t0 = tcg_temp_new();
l1 = gen_new_label();
... | false | qemu | b798068d51ecf173702c91617793989ab843c8fb | static void dec_scall(DisasContext *dc)
{
TCGv t0;
int l1;
if (dc->imm5 == 7) {
LOG_DIS("scall\n");
} else if (dc->imm5 == 2) {
LOG_DIS("break\n");
} else {
cpu_abort(dc->env, "invalid opcode\n");
}
t0 = tcg_temp_new();
l1 = gen_new_label();
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0)
{
TCGv t0;
int VAR_1;
if (VAR_0->imm5 == 7) {
LOG_DIS("scall\n");
} else if (VAR_0->imm5 == 2) {
LOG_DIS("break\n");
} else {
cpu_abort(VAR_0->env, "invalid opcode\n");
}
t0 = tcg_temp_new();
VAR_1 = gen_new_... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"TCGv t0;",
"int VAR_1;",
"if (VAR_0->imm5 == 7) {",
"LOG_DIS(\"scall\\n\");",
"} else if (VAR_0->imm5 == 2) {",
"LOG_DIS(\"break\\n\");",
"} else {",
"cpu_abort(VAR_0->env, \"invalid opcode\\n\");",
"}",
"t0 = tcg_temp_new();",
"VAR_1 = gen_new_la... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
19,936 | static void slavio_check_interrupts(void *opaque)
{
CPUState *env;
SLAVIO_INTCTLState *s = opaque;
uint32_t pending = s->intregm_pending;
unsigned int i, j, max = 0;
pending &= ~s->intregm_disabled;
if (pending && !(s->intregm_disabled & 0x80000000)) {
for (i = 0; i < 32; i++) {
... | false | qemu | b3a2319792ad5c0f0f8c3d2f4d02b95fd7efbc69 | static void slavio_check_interrupts(void *opaque)
{
CPUState *env;
SLAVIO_INTCTLState *s = opaque;
uint32_t pending = s->intregm_pending;
unsigned int i, j, max = 0;
pending &= ~s->intregm_disabled;
if (pending && !(s->intregm_disabled & 0x80000000)) {
for (i = 0; i < 32; i++) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
CPUState *env;
SLAVIO_INTCTLState *s = VAR_0;
uint32_t pending = s->intregm_pending;
unsigned int VAR_1, VAR_2, VAR_3 = 0;
pending &= ~s->intregm_disabled;
if (pending && !(s->intregm_disabled & 0x80000000)) {
for (VAR_1 = 0; VAR_1 < 32; VAR_1++) {
... | [
"static void FUNC_0(void *VAR_0)\n{",
"CPUState *env;",
"SLAVIO_INTCTLState *s = VAR_0;",
"uint32_t pending = s->intregm_pending;",
"unsigned int VAR_1, VAR_2, VAR_3 = 0;",
"pending &= ~s->intregm_disabled;",
"if (pending && !(s->intregm_disabled & 0x80000000)) {",
"for (VAR_1 = 0; VAR_1 < 32; 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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
... |
19,937 | static int pci_add_option_rom(PCIDevice *pdev, bool is_default_rom)
{
int size;
char *path;
void *ptr;
char name[32];
const VMStateDescription *vmsd;
if (!pdev->romfile)
return 0;
if (strlen(pdev->romfile) == 0)
return 0;
if (!pdev->rom_bar) {
/*
... | false | qemu | 8c7f3dd05e4f1ee90000c89e428e69ae2e6bd691 | static int pci_add_option_rom(PCIDevice *pdev, bool is_default_rom)
{
int size;
char *path;
void *ptr;
char name[32];
const VMStateDescription *vmsd;
if (!pdev->romfile)
return 0;
if (strlen(pdev->romfile) == 0)
return 0;
if (!pdev->rom_bar) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(PCIDevice *VAR_0, bool VAR_1)
{
int VAR_2;
char *VAR_3;
void *VAR_4;
char VAR_5[32];
const VMStateDescription *VAR_6;
if (!VAR_0->romfile)
return 0;
if (strlen(VAR_0->romfile) == 0)
return 0;
if (!VAR_0->rom_bar) {
... | [
"static int FUNC_0(PCIDevice *VAR_0, bool VAR_1)\n{",
"int VAR_2;",
"char *VAR_3;",
"void *VAR_4;",
"char VAR_5[32];",
"const VMStateDescription *VAR_6;",
"if (!VAR_0->romfile)\nreturn 0;",
"if (strlen(VAR_0->romfile) == 0)\nreturn 0;",
"if (!VAR_0->rom_bar) {",
"int VAR_7 = pci_get_word(VAR_0->co... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
21,
23
],
[
27
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57
... |
19,938 | static char *qemu_rbd_next_tok(int max_len,
char *src, char delim,
const char *name,
char **p, Error **errp)
{
int l;
char *end;
*p = NULL;
if (delim != '\0') {
for (end = src; *end; ++end) ... | false | qemu | 730b00bbfdc15f914f47e03a703fa7647c10c4a9 | static char *qemu_rbd_next_tok(int max_len,
char *src, char delim,
const char *name,
char **p, Error **errp)
{
int l;
char *end;
*p = NULL;
if (delim != '\0') {
for (end = src; *end; ++end) ... | {
"code": [],
"line_no": []
} | static char *FUNC_0(int VAR_0,
char *VAR_1, char VAR_2,
const char *VAR_3,
char **VAR_4, Error **VAR_5)
{
int VAR_6;
char *VAR_7;
*VAR_4 = NULL;
if (VAR_2 != '\0') {
for (VAR_7 = VAR_1; *VAR... | [
"static char *FUNC_0(int VAR_0,\nchar *VAR_1, char VAR_2,\nconst char *VAR_3,\nchar **VAR_4, Error **VAR_5)\n{",
"int VAR_6;",
"char *VAR_7;",
"*VAR_4 = NULL;",
"if (VAR_2 != '\\0') {",
"for (VAR_7 = VAR_1; *VAR_7; ++VAR_7) {",
"if (*VAR_7 == VAR_2) {",
"break;",
"}",
"if (*VAR_7 == '\\\\' && VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
19,939 | static int protocol_client_vencrypt_auth(VncState *vs, uint8_t *data, size_t len)
{
int auth = read_u32(data, 0);
if (auth != vs->vd->subauth) {
VNC_DEBUG("Rejecting auth %d\n", auth);
vnc_write_u8(vs, 0); /* Reject auth */
vnc_flush(vs);
vnc_client_error(vs);
} els... | false | qemu | 7e7e2ebc942da8285931ceabf12823e165dced8b | static int protocol_client_vencrypt_auth(VncState *vs, uint8_t *data, size_t len)
{
int auth = read_u32(data, 0);
if (auth != vs->vd->subauth) {
VNC_DEBUG("Rejecting auth %d\n", auth);
vnc_write_u8(vs, 0);
vnc_flush(vs);
vnc_client_error(vs);
} else {
VNC_... | {
"code": [],
"line_no": []
} | static int FUNC_0(VncState *VAR_0, uint8_t *VAR_1, size_t VAR_2)
{
int VAR_3 = read_u32(VAR_1, 0);
if (VAR_3 != VAR_0->vd->subauth) {
VNC_DEBUG("Rejecting VAR_3 %d\n", VAR_3);
vnc_write_u8(VAR_0, 0);
vnc_flush(VAR_0);
vnc_client_error(VAR_0);
} else {
VNC_... | [
"static int FUNC_0(VncState *VAR_0, uint8_t *VAR_1, size_t VAR_2)\n{",
"int VAR_3 = read_u32(VAR_1, 0);",
"if (VAR_3 != VAR_0->vd->subauth) {",
"VNC_DEBUG(\"Rejecting VAR_3 %d\\n\", VAR_3);",
"vnc_write_u8(VAR_0, 0);",
"vnc_flush(VAR_0);",
"vnc_client_error(VAR_0);",
"} else {",
"VNC_DEBUG(\"Accepti... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
19,940 | int64_t qemu_strtosz_metric(const char *nptr, char **end)
{
return do_strtosz(nptr, end, 'B', 1000);
}
| false | qemu | f17fd4fdf0df3d2f3444399d04c38d22b9a3e1b7 | int64_t qemu_strtosz_metric(const char *nptr, char **end)
{
return do_strtosz(nptr, end, 'B', 1000);
}
| {
"code": [],
"line_no": []
} | int64_t FUNC_0(const char *nptr, char **end)
{
return do_strtosz(nptr, end, 'B', 1000);
}
| [
"int64_t FUNC_0(const char *nptr, char **end)\n{",
"return do_strtosz(nptr, end, 'B', 1000);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
19,941 | static int l2_load(BlockDriverState *bs, uint64_t l2_offset,
uint64_t **l2_table)
{
BDRVQcow2State *s = bs->opaque;
int ret;
ret = qcow2_cache_get(bs, s->l2_table_cache, l2_offset, (void**) l2_table);
return ret;
}
| false | qemu | 9be385980d37e8f4fd33f605f5fb1c3d144170a8 | static int l2_load(BlockDriverState *bs, uint64_t l2_offset,
uint64_t **l2_table)
{
BDRVQcow2State *s = bs->opaque;
int ret;
ret = qcow2_cache_get(bs, s->l2_table_cache, l2_offset, (void**) l2_table);
return ret;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,
uint64_t **VAR_2)
{
BDRVQcow2State *s = VAR_0->opaque;
int VAR_3;
VAR_3 = qcow2_cache_get(VAR_0, s->l2_table_cache, VAR_1, (void**) VAR_2);
return VAR_3;
}
| [
"static int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,\nuint64_t **VAR_2)\n{",
"BDRVQcow2State *s = VAR_0->opaque;",
"int VAR_3;",
"VAR_3 = qcow2_cache_get(VAR_0, s->l2_table_cache, VAR_1, (void**) VAR_2);",
"return VAR_3;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
]
] |
19,942 | static int mjpeg_decode_init(AVCodecContext *avctx)
{
MJpegDecodeContext *s = avctx->priv_data;
MpegEncContext s2;
s->avctx = avctx;
/* ugly way to get the idct & scantable */
memset(&s2, 0, sizeof(MpegEncContext));
s2.flags= avctx->flags;
s2.avctx= avctx;
// s2->out_format =... | false | FFmpeg | 68f593b48433842f3407586679fe07f3e5199ab9 | static int mjpeg_decode_init(AVCodecContext *avctx)
{
MJpegDecodeContext *s = avctx->priv_data;
MpegEncContext s2;
s->avctx = avctx;
memset(&s2, 0, sizeof(MpegEncContext));
s2.flags= avctx->flags;
s2.avctx= avctx;
s2.width = 8;
s2.height = 8;
if (MPV_common_init... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0)
{
MJpegDecodeContext *s = VAR_0->priv_data;
MpegEncContext s2;
s->VAR_0 = VAR_0;
memset(&s2, 0, sizeof(MpegEncContext));
s2.flags= VAR_0->flags;
s2.VAR_0= VAR_0;
s2.width = 8;
s2.height = 8;
if (MPV_common_init(&s2) < 0)
... | [
"static int FUNC_0(AVCodecContext *VAR_0)\n{",
"MJpegDecodeContext *s = VAR_0->priv_data;",
"MpegEncContext s2;",
"s->VAR_0 = VAR_0;",
"memset(&s2, 0, sizeof(MpegEncContext));",
"s2.flags= VAR_0->flags;",
"s2.VAR_0= VAR_0;",
"s2.width = 8;",
"s2.height = 8;",
"if (MPV_common_init(&s2) < 0)\nreturn... | [
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49,
51
],
[
53
],
[
55... |
19,943 | static int pci_std_vga_initfn(PCIDevice *dev)
{
PCIVGAState *d = DO_UPCAST(PCIVGAState, dev, dev);
VGACommonState *s = &d->vga;
/* vga + console init */
vga_common_init(s);
vga_init(s, pci_address_space(dev), pci_address_space_io(dev), true);
s->con = graphic_console_init(s->update, s... | false | qemu | 2c62f08ddbf3fa80dc7202eb9a2ea60ae44e2cc5 | static int pci_std_vga_initfn(PCIDevice *dev)
{
PCIVGAState *d = DO_UPCAST(PCIVGAState, dev, dev);
VGACommonState *s = &d->vga;
vga_common_init(s);
vga_init(s, pci_address_space(dev), pci_address_space_io(dev), true);
s->con = graphic_console_init(s->update, s->invalidate,
... | {
"code": [],
"line_no": []
} | static int FUNC_0(PCIDevice *VAR_0)
{
PCIVGAState *d = DO_UPCAST(PCIVGAState, VAR_0, VAR_0);
VGACommonState *s = &d->vga;
vga_common_init(s);
vga_init(s, pci_address_space(VAR_0), pci_address_space_io(VAR_0), true);
s->con = graphic_console_init(s->update, s->invalidate,
... | [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"PCIVGAState *d = DO_UPCAST(PCIVGAState, VAR_0, VAR_0);",
"VGACommonState *s = &d->vga;",
"vga_common_init(s);",
"vga_init(s, pci_address_space(VAR_0), pci_address_space_io(VAR_0), true);",
"s->con = graphic_console_init(s->update, s->invalidate,\ns->screen_dump, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
19,
21
],
[
27
],
[
33
],
[
35
],
[
37,
39
],
[
41,
43
],
[
47,
49
],
[
51,
53
],
[
55
],
[
57
],
[
61
],
[
65
],
... |
19,944 | static int tosa_dac_recv(I2CSlave *s)
{
printf("%s: recv not supported!!!\n", __FUNCTION__);
return -1;
}
| false | qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | static int tosa_dac_recv(I2CSlave *s)
{
printf("%s: recv not supported!!!\n", __FUNCTION__);
return -1;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(I2CSlave *VAR_0)
{
printf("%VAR_0: recv not supported!!!\n", __FUNCTION__);
return -1;
}
| [
"static int FUNC_0(I2CSlave *VAR_0)\n{",
"printf(\"%VAR_0: recv not supported!!!\\n\", __FUNCTION__);",
"return -1;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
19,945 | static int waveformat_from_audio_settings (WAVEFORMATEX *wfx, audsettings_t *as)
{
memset (wfx, 0, sizeof (*wfx));
wfx->wFormatTag = WAVE_FORMAT_PCM;
wfx->nChannels = as->nchannels;
wfx->nSamplesPerSec = as->freq;
wfx->nAvgBytesPerSec = as->freq << (as->nchannels == 2);
wfx->nBlockAlign... | false | qemu | 1ea879e5580f63414693655fcf0328559cdce138 | static int waveformat_from_audio_settings (WAVEFORMATEX *wfx, audsettings_t *as)
{
memset (wfx, 0, sizeof (*wfx));
wfx->wFormatTag = WAVE_FORMAT_PCM;
wfx->nChannels = as->nchannels;
wfx->nSamplesPerSec = as->freq;
wfx->nAvgBytesPerSec = as->freq << (as->nchannels == 2);
wfx->nBlockAlign... | {
"code": [],
"line_no": []
} | static int FUNC_0 (WAVEFORMATEX *VAR_0, audsettings_t *VAR_1)
{
memset (VAR_0, 0, sizeof (*VAR_0));
VAR_0->wFormatTag = WAVE_FORMAT_PCM;
VAR_0->nChannels = VAR_1->nchannels;
VAR_0->nSamplesPerSec = VAR_1->freq;
VAR_0->nAvgBytesPerSec = VAR_1->freq << (VAR_1->nchannels == 2);
VAR_0->nBlo... | [
"static int FUNC_0 (WAVEFORMATEX *VAR_0, audsettings_t *VAR_1)\n{",
"memset (VAR_0, 0, sizeof (*VAR_0));",
"VAR_0->wFormatTag = WAVE_FORMAT_PCM;",
"VAR_0->nChannels = VAR_1->nchannels;",
"VAR_0->nSamplesPerSec = VAR_1->freq;",
"VAR_0->nAvgBytesPerSec = VAR_1->freq << (VAR_1->nchannels == 2);",
"VAR_0->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
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27,
29
],
[
31
],
[
35,
37,
39
],
[
41
],
[
43
],
[
45
],
[
49,
51,
53
],
[
55... |
19,946 | static BlockDriverAIOCB *raw_aio_readv(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
return bdrv_aio_readv(bs->file, sector_num, qiov, nb_sectors, cb, opaque);
}
| false | qemu | d8b7e0adf562277180f96ecbd7f1777a384a0308 | static BlockDriverAIOCB *raw_aio_readv(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
return bdrv_aio_readv(bs->file, sector_num, qiov, nb_sectors, cb, opaque);
}
| {
"code": [],
"line_no": []
} | static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
return bdrv_aio_readv(bs->file, sector_num, qiov, nb_sectors, cb, opaque);
}
| [
"static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs,\nint64_t sector_num, QEMUIOVector *qiov, int nb_sectors,\nBlockDriverCompletionFunc *cb, void *opaque)\n{",
"return bdrv_aio_readv(bs->file, sector_num, qiov, nb_sectors, cb, opaque);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
]
] |
19,947 | static int blk_mig_save_dirty_block(Monitor *mon, QEMUFile *f, int is_async)
{
BlkMigDevState *bmds;
int ret = 0;
QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {
if (mig_save_device_dirty(mon, f, bmds, is_async) == 0) {
ret = 1;
break;
}
}
... | false | qemu | 539de1246d355d3b8aa33fb7cde732352d8827c7 | static int blk_mig_save_dirty_block(Monitor *mon, QEMUFile *f, int is_async)
{
BlkMigDevState *bmds;
int ret = 0;
QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {
if (mig_save_device_dirty(mon, f, bmds, is_async) == 0) {
ret = 1;
break;
}
}
... | {
"code": [],
"line_no": []
} | static int FUNC_0(Monitor *VAR_0, QEMUFile *VAR_1, int VAR_2)
{
BlkMigDevState *bmds;
int VAR_3 = 0;
QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {
if (mig_save_device_dirty(VAR_0, VAR_1, bmds, VAR_2) == 0) {
VAR_3 = 1;
break;
}
}
re... | [
"static int FUNC_0(Monitor *VAR_0, QEMUFile *VAR_1, int VAR_2)\n{",
"BlkMigDevState *bmds;",
"int VAR_3 = 0;",
"QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {",
"if (mig_save_device_dirty(VAR_0, VAR_1, bmds, VAR_2) == 0) {",
"VAR_3 = 1;",
"break;",
"}",
"}",
"return VAR_3;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
]
] |
19,948 | float64 float64_sqrt( float64 a STATUS_PARAM )
{
flag aSign;
int16 aExp, zExp;
bits64 aSig, zSig, doubleZSig;
bits64 rem0, rem1, term0, term1;
aSig = extractFloat64Frac( a );
aExp = extractFloat64Exp( a );
aSign = extractFloat64Sign( a );
if ( aExp == 0x7FF ) {
if ( a... | false | qemu | f090c9d4ad5812fb92843d6470a1111c15190c4c | float64 float64_sqrt( float64 a STATUS_PARAM )
{
flag aSign;
int16 aExp, zExp;
bits64 aSig, zSig, doubleZSig;
bits64 rem0, rem1, term0, term1;
aSig = extractFloat64Frac( a );
aExp = extractFloat64Exp( a );
aSign = extractFloat64Sign( a );
if ( aExp == 0x7FF ) {
if ( a... | {
"code": [],
"line_no": []
} | float64 FUNC_0( float64 a STATUS_PARAM )
{
flag aSign;
int16 aExp, zExp;
bits64 aSig, zSig, doubleZSig;
bits64 rem0, rem1, term0, term1;
aSig = extractFloat64Frac( a );
aExp = extractFloat64Exp( a );
aSign = extractFloat64Sign( a );
if ( aExp == 0x7FF ) {
if ( aSig ) ... | [
"float64 FUNC_0( float64 a STATUS_PARAM )\n{",
"flag aSign;",
"int16 aExp, zExp;",
"bits64 aSig, zSig, doubleZSig;",
"bits64 rem0, rem1, term0, term1;",
"aSig = extractFloat64Frac( a );",
"aExp = extractFloat64Exp( a );",
"aSign = extractFloat64Sign( a );",
"if ( aExp == 0x7FF ) {",
"if ( aSig ) r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
... |
19,950 | static int dynticks_start_timer(struct qemu_alarm_timer *t)
{
struct sigevent ev;
timer_t host_timer;
struct sigaction act;
sigfillset(&act.sa_mask);
act.sa_flags = 0;
act.sa_handler = host_alarm_handler;
sigaction(SIGALRM, &act, NULL);
/*
* Initialize ev struct to ... | false | qemu | 1e9737da4aafb54681203931dfe8f8eea21fcef7 | static int dynticks_start_timer(struct qemu_alarm_timer *t)
{
struct sigevent ev;
timer_t host_timer;
struct sigaction act;
sigfillset(&act.sa_mask);
act.sa_flags = 0;
act.sa_handler = host_alarm_handler;
sigaction(SIGALRM, &act, NULL);
memset(&ev, 0, sizeof(ev... | {
"code": [],
"line_no": []
} | static int FUNC_0(struct qemu_alarm_timer *VAR_0)
{
struct sigevent VAR_1;
timer_t host_timer;
struct sigaction VAR_2;
sigfillset(&VAR_2.sa_mask);
VAR_2.sa_flags = 0;
VAR_2.sa_handler = host_alarm_handler;
sigaction(SIGALRM, &VAR_2, NULL);
memset(&VAR_1, 0, siz... | [
"static int FUNC_0(struct qemu_alarm_timer *VAR_0)\n{",
"struct sigevent VAR_1;",
"timer_t host_timer;",
"struct sigaction VAR_2;",
"sigfillset(&VAR_2.sa_mask);",
"VAR_2.sa_flags = 0;",
"VAR_2.sa_handler = host_alarm_handler;",
"sigaction(SIGALRM, &VAR_2, NULL);",
"memset(&VAR_1, 0, sizeof(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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49,
51
],
[
55
],
[
57
],
[
59
... |
19,951 | void sysbus_register_withprop(SysBusDeviceInfo *info)
{
info->qdev.init = sysbus_device_init;
info->qdev.bus_type = BUS_TYPE_SYSTEM;
assert(info->qdev.size >= sizeof(SysBusDevice));
qdev_register(&info->qdev);
}
| false | qemu | 10c4c98ab7dc18169b37b76f6ea5e60ebe65222b | void sysbus_register_withprop(SysBusDeviceInfo *info)
{
info->qdev.init = sysbus_device_init;
info->qdev.bus_type = BUS_TYPE_SYSTEM;
assert(info->qdev.size >= sizeof(SysBusDevice));
qdev_register(&info->qdev);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(SysBusDeviceInfo *VAR_0)
{
VAR_0->qdev.init = sysbus_device_init;
VAR_0->qdev.bus_type = BUS_TYPE_SYSTEM;
assert(VAR_0->qdev.size >= sizeof(SysBusDevice));
qdev_register(&VAR_0->qdev);
}
| [
"void FUNC_0(SysBusDeviceInfo *VAR_0)\n{",
"VAR_0->qdev.init = sysbus_device_init;",
"VAR_0->qdev.bus_type = BUS_TYPE_SYSTEM;",
"assert(VAR_0->qdev.size >= sizeof(SysBusDevice));",
"qdev_register(&VAR_0->qdev);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
]
] |
19,952 | int qemu_timer_expired(QEMUTimer *timer_head, int64_t current_time)
{
if (!timer_head)
return 0;
return (timer_head->expire_time <= current_time);
}
| false | qemu | 4a998740b22aa673ea475060c787da7c545588cf | int qemu_timer_expired(QEMUTimer *timer_head, int64_t current_time)
{
if (!timer_head)
return 0;
return (timer_head->expire_time <= current_time);
}
| {
"code": [],
"line_no": []
} | int FUNC_0(QEMUTimer *VAR_0, int64_t VAR_1)
{
if (!VAR_0)
return 0;
return (VAR_0->expire_time <= VAR_1);
}
| [
"int FUNC_0(QEMUTimer *VAR_0, int64_t VAR_1)\n{",
"if (!VAR_0)\nreturn 0;",
"return (VAR_0->expire_time <= VAR_1);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
]
] |
19,953 | static int cbs_read_se_golomb(CodedBitstreamContext *ctx, BitstreamContext *bc,
const char *name, int32_t *write_to,
int32_t range_min, int32_t range_max)
{
int32_t value;
int position;
if (ctx->trace_enable) {
char bits[65];
... | false | FFmpeg | 44cde38c8acbef7d5250e6d1b52b1020871e093b | static int cbs_read_se_golomb(CodedBitstreamContext *ctx, BitstreamContext *bc,
const char *name, int32_t *write_to,
int32_t range_min, int32_t range_max)
{
int32_t value;
int position;
if (ctx->trace_enable) {
char bits[65];
... | {
"code": [],
"line_no": []
} | static int FUNC_0(CodedBitstreamContext *VAR_0, BitstreamContext *VAR_1,
const char *VAR_2, int32_t *VAR_3,
int32_t VAR_4, int32_t VAR_5)
{
int32_t value;
int VAR_6;
if (VAR_0->trace_enable) {
char VAR_7[65];
uint32_t v;
... | [
"static int FUNC_0(CodedBitstreamContext *VAR_0, BitstreamContext *VAR_1,\nconst char *VAR_2, int32_t *VAR_3,\nint32_t VAR_4, int32_t VAR_5)\n{",
"int32_t value;",
"int VAR_6;",
"if (VAR_0->trace_enable) {",
"char VAR_7[65];",
"uint32_t v;",
"unsigned int VAR_8;",
"int VAR_9, VAR_10;",
"VAR_6 = bits... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45,
47,
49
],
[
51
],
[... |
19,954 | void cpu_x86_cpuid(CPUX86State *env, uint32_t index,
uint32_t *eax, uint32_t *ebx,
uint32_t *ecx, uint32_t *edx)
{
/* test if maximum index reached */
if (index & 0x80000000) {
if (index > env->cpuid_xlevel)
index = env->cpuid_level;
} else {... | false | qemu | 57003085037f554de82327cbc34105cda1942892 | void cpu_x86_cpuid(CPUX86State *env, uint32_t index,
uint32_t *eax, uint32_t *ebx,
uint32_t *ecx, uint32_t *edx)
{
if (index & 0x80000000) {
if (index > env->cpuid_xlevel)
index = env->cpuid_level;
} else {
if (index > env->cpuid_le... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUX86State *VAR_0, uint32_t VAR_1,
uint32_t *VAR_2, uint32_t *VAR_3,
uint32_t *VAR_4, uint32_t *VAR_5)
{
if (VAR_1 & 0x80000000) {
if (VAR_1 > VAR_0->cpuid_xlevel)
VAR_1 = VAR_0->cpuid_level;
} else {
if (VAR_1 > VAR_0-... | [
"void FUNC_0(CPUX86State *VAR_0, uint32_t VAR_1,\nuint32_t *VAR_2, uint32_t *VAR_3,\nuint32_t *VAR_4, uint32_t *VAR_5)\n{",
"if (VAR_1 & 0x80000000) {",
"if (VAR_1 > VAR_0->cpuid_xlevel)\nVAR_1 = VAR_0->cpuid_level;",
"} else {",
"if (VAR_1 > VAR_0->cpuid_level)\nVAR_1 = VAR_0->cpuid_level;",
"}",
"swit... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
11
],
[
13,
15
],
[
17
],
[
19,
21
],
[
23
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
49,
51
],
[
53
],
[
55,
57
],
[
59
],
[
61
],
... |
19,955 | static uint32_t isa_mmio_readl(void *opaque, target_phys_addr_t addr)
{
return cpu_inl(addr & IOPORTS_MASK);
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint32_t isa_mmio_readl(void *opaque, target_phys_addr_t addr)
{
return cpu_inl(addr & IOPORTS_MASK);
}
| {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(void *opaque, target_phys_addr_t addr)
{
return cpu_inl(addr & IOPORTS_MASK);
}
| [
"static uint32_t FUNC_0(void *opaque, target_phys_addr_t addr)\n{",
"return cpu_inl(addr & IOPORTS_MASK);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
19,956 | static always_inline int _pte_check (mmu_ctx_t *ctx, int is_64b,
target_ulong pte0, target_ulong pte1,
int h, int rw)
{
target_ulong ptem, mmask;
int access, ret, pteh, ptev;
access = 0;
ret = -1;
/* Check validity a... | false | qemu | b227a8e9aa5f27d29f77ba90d5eb9d0662a1175e | static always_inline int _pte_check (mmu_ctx_t *ctx, int is_64b,
target_ulong pte0, target_ulong pte1,
int h, int rw)
{
target_ulong ptem, mmask;
int access, ret, pteh, ptev;
access = 0;
ret = -1;
#if defined(TARGE... | {
"code": [],
"line_no": []
} | static always_inline int FUNC_0 (mmu_ctx_t *ctx, int is_64b,
target_ulong pte0, target_ulong pte1,
int h, int rw)
{
target_ulong ptem, mmask;
int VAR_0, VAR_1, VAR_2, VAR_3;
VAR_0 = 0;
VAR_1 = -1;
#if defined(TARGE... | [
"static always_inline int FUNC_0 (mmu_ctx_t *ctx, int is_64b,\ntarget_ulong pte0, target_ulong pte1,\nint h, int rw)\n{",
"target_ulong ptem, mmask;",
"int VAR_0, VAR_1, VAR_2, VAR_3;",
"VAR_0 = 0;",
"VAR_1 = -1;",
"#if defined(TARGET_PPC64)\nif (is_64b) {",
"VAR_3 = pte64_is_valid(pte0);",
"VAR_2 = (... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45,
47
],
[
49
],
[
51
],
[... |
19,957 | void qmp_block_job_resume(const char *device, Error **errp)
{
BlockJob *job = find_block_job(device);
if (!job) {
error_set(errp, QERR_BLOCK_JOB_NOT_ACTIVE, device);
return;
}
trace_qmp_block_job_resume(job);
block_job_resume(job);
}
| false | qemu | 3d948cdf3760b52238038626a7ffa7d30913060b | void qmp_block_job_resume(const char *device, Error **errp)
{
BlockJob *job = find_block_job(device);
if (!job) {
error_set(errp, QERR_BLOCK_JOB_NOT_ACTIVE, device);
return;
}
trace_qmp_block_job_resume(job);
block_job_resume(job);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(const char *VAR_0, Error **VAR_1)
{
BlockJob *job = find_block_job(VAR_0);
if (!job) {
error_set(VAR_1, QERR_BLOCK_JOB_NOT_ACTIVE, VAR_0);
return;
}
trace_qmp_block_job_resume(job);
block_job_resume(job);
}
| [
"void FUNC_0(const char *VAR_0, Error **VAR_1)\n{",
"BlockJob *job = find_block_job(VAR_0);",
"if (!job) {",
"error_set(VAR_1, QERR_BLOCK_JOB_NOT_ACTIVE, VAR_0);",
"return;",
"}",
"trace_qmp_block_job_resume(job);",
"block_job_resume(job);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
]
] |
19,958 | int AUD_write (SWVoiceOut *sw, void *buf, int size)
{
int bytes;
if (!sw) {
/* XXX: Consider options */
return size;
}
if (!sw->hw->enabled) {
dolog ("Writing to disabled voice %s\n", SW_NAME (sw));
return 0;
}
bytes = sw->hw->pcm_ops->write (sw, ... | false | qemu | 9be385980d37e8f4fd33f605f5fb1c3d144170a8 | int AUD_write (SWVoiceOut *sw, void *buf, int size)
{
int bytes;
if (!sw) {
return size;
}
if (!sw->hw->enabled) {
dolog ("Writing to disabled voice %s\n", SW_NAME (sw));
return 0;
}
bytes = sw->hw->pcm_ops->write (sw, buf, size);
return byt... | {
"code": [],
"line_no": []
} | int FUNC_0 (SWVoiceOut *VAR_0, void *VAR_1, int VAR_2)
{
int VAR_3;
if (!VAR_0) {
return VAR_2;
}
if (!VAR_0->hw->enabled) {
dolog ("Writing to disabled voice %s\n", SW_NAME (VAR_0));
return 0;
}
VAR_3 = VAR_0->hw->pcm_ops->write (VAR_0, VAR_1, V... | [
"int FUNC_0 (SWVoiceOut *VAR_0, void *VAR_1, int VAR_2)\n{",
"int VAR_3;",
"if (!VAR_0) {",
"return VAR_2;",
"}",
"if (!VAR_0->hw->enabled) {",
"dolog (\"Writing to disabled voice %s\\n\", SW_NAME (VAR_0));",
"return 0;",
"}",
"VAR_3 = VAR_0->hw->pcm_ops->write (VAR_0, VAR_1, VAR_2);",
"return V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
]
] |
19,959 | static void option_rom_setup_reset(target_phys_addr_t addr, unsigned size)
{
RomResetData *rrd = qemu_malloc(sizeof *rrd);
rrd->data = qemu_malloc(size);
cpu_physical_memory_read(addr, rrd->data, size);
rrd->addr = addr;
rrd->size = size;
qemu_register_reset(option_rom_reset, rrd);
}
| false | qemu | 45a50b1668822c23afc2a89f724654e176518bc4 | static void option_rom_setup_reset(target_phys_addr_t addr, unsigned size)
{
RomResetData *rrd = qemu_malloc(sizeof *rrd);
rrd->data = qemu_malloc(size);
cpu_physical_memory_read(addr, rrd->data, size);
rrd->addr = addr;
rrd->size = size;
qemu_register_reset(option_rom_reset, rrd);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(target_phys_addr_t VAR_0, unsigned VAR_1)
{
RomResetData *rrd = qemu_malloc(sizeof *rrd);
rrd->data = qemu_malloc(VAR_1);
cpu_physical_memory_read(VAR_0, rrd->data, VAR_1);
rrd->VAR_0 = VAR_0;
rrd->VAR_1 = VAR_1;
qemu_register_reset(option_rom_reset, rrd);
}
| [
"static void FUNC_0(target_phys_addr_t VAR_0, unsigned VAR_1)\n{",
"RomResetData *rrd = qemu_malloc(sizeof *rrd);",
"rrd->data = qemu_malloc(VAR_1);",
"cpu_physical_memory_read(VAR_0, rrd->data, VAR_1);",
"rrd->VAR_0 = VAR_0;",
"rrd->VAR_1 = VAR_1;",
"qemu_register_reset(option_rom_reset, rrd);",
"}"
... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
19,960 | static uint32_t drc_unisolate_physical(sPAPRDRConnector *drc)
{
/* cannot unisolate a non-existent resource, and, or resources
* which are in an 'UNUSABLE' allocation state. (PAPR 2.7,
* 13.5.3.5)
*/
if (!drc->dev) {
return RTAS_OUT_NO_SUCH_INDICATOR;
}
drc->isolation_s... | false | qemu | 9d4c0f4f0a71e74fd7e04d73620268484d693adf | static uint32_t drc_unisolate_physical(sPAPRDRConnector *drc)
{
if (!drc->dev) {
return RTAS_OUT_NO_SUCH_INDICATOR;
}
drc->isolation_state = SPAPR_DR_ISOLATION_STATE_UNISOLATED;
return RTAS_OUT_SUCCESS;
}
| {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(sPAPRDRConnector *drc)
{
if (!drc->dev) {
return RTAS_OUT_NO_SUCH_INDICATOR;
}
drc->isolation_state = SPAPR_DR_ISOLATION_STATE_UNISOLATED;
return RTAS_OUT_SUCCESS;
}
| [
"static uint32_t FUNC_0(sPAPRDRConnector *drc)\n{",
"if (!drc->dev) {",
"return RTAS_OUT_NO_SUCH_INDICATOR;",
"}",
"drc->isolation_state = SPAPR_DR_ISOLATION_STATE_UNISOLATED;",
"return RTAS_OUT_SUCCESS;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
]
] |
19,961 | static void monitor_command_cb(Monitor *mon, const char *cmdline, void *opaque)
{
monitor_suspend(mon);
handle_user_command(mon, cmdline);
monitor_resume(mon);
}
| false | qemu | c60bf3391bf4cb79b7adc6650094e21671ddaabd | static void monitor_command_cb(Monitor *mon, const char *cmdline, void *opaque)
{
monitor_suspend(mon);
handle_user_command(mon, cmdline);
monitor_resume(mon);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(Monitor *VAR_0, const char *VAR_1, void *VAR_2)
{
monitor_suspend(VAR_0);
handle_user_command(VAR_0, VAR_1);
monitor_resume(VAR_0);
}
| [
"static void FUNC_0(Monitor *VAR_0, const char *VAR_1, void *VAR_2)\n{",
"monitor_suspend(VAR_0);",
"handle_user_command(VAR_0, VAR_1);",
"monitor_resume(VAR_0);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
19,964 | static void dct_unquantize_mpeg1_c(MpegEncContext *s,
DCTELEM *block, int n, int qscale)
{
int i, level, nCoeffs;
const UINT16 *quant_matrix;
if(s->alternate_scan) nCoeffs= 64;
else nCoeffs= s->block_last_index[n]+1;
if (s->mb_intra) {
if (... | true | FFmpeg | d7e9533aa06f4073a27812349b35ba5fede11ca1 | static void dct_unquantize_mpeg1_c(MpegEncContext *s,
DCTELEM *block, int n, int qscale)
{
int i, level, nCoeffs;
const UINT16 *quant_matrix;
if(s->alternate_scan) nCoeffs= 64;
else nCoeffs= s->block_last_index[n]+1;
if (s->mb_intra) {
if (... | {
"code": [
" quant_matrix = s->non_intra_matrix;",
" quant_matrix = s->non_intra_matrix;",
" i = 0;",
"#endif",
"#endif",
"#endif",
" } else {",
" } else {",
"#ifdef PARANOID",
"#endif",
" quant_matrix = s->non_intra_matrix;",
" ... | static void FUNC_0(MpegEncContext *VAR_0,
DCTELEM *VAR_1, int VAR_2, int VAR_3)
{
int VAR_4, VAR_5, VAR_6;
const UINT16 *VAR_7;
if(VAR_0->alternate_scan) VAR_6= 64;
else VAR_6= VAR_0->block_last_index[VAR_2]+1;
if (VAR_0->mb_intra) {
if (VA... | [
"static void FUNC_0(MpegEncContext *VAR_0,\nDCTELEM *VAR_1, int VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6;",
"const UINT16 *VAR_7;",
"if(VAR_0->alternate_scan) VAR_6= 64;",
"else VAR_6= VAR_0->block_last_index[VAR_2]+1;",
"if (VAR_0->mb_intra) {",
"if (VAR_2 < 4)\nVAR_1[0] = VAR_1[0] * VAR_0->y_dc... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
1,
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
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
25,
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
19,967 | static void balloon_stats_get_all(Object *obj, struct Visitor *v,
void *opaque, const char *name, Error **errp)
{
Error *err = NULL;
VirtIOBalloon *s = opaque;
int i;
if (!s->stats_last_update) {
error_setg(errp, "guest hasn't updated any stats yet");
... | true | qemu | 297a3646c2947ee64a6d42ca264039732c6218e0 | static void balloon_stats_get_all(Object *obj, struct Visitor *v,
void *opaque, const char *name, Error **errp)
{
Error *err = NULL;
VirtIOBalloon *s = opaque;
int i;
if (!s->stats_last_update) {
error_setg(errp, "guest hasn't updated any stats yet");
... | {
"code": [
" visit_end_struct(v, &err);",
" for (i = 0; i < VIRTIO_BALLOON_S_NR; i++) {",
" goto out;",
" Error *err = NULL;"
],
"line_no": [
57,
49,
29,
7
]
} | static void FUNC_0(Object *VAR_0, struct Visitor *VAR_1,
void *VAR_2, const char *VAR_3, Error **VAR_4)
{
Error *err = NULL;
VirtIOBalloon *s = VAR_2;
int VAR_5;
if (!s->stats_last_update) {
error_setg(VAR_4, "guest hasn't updated any stats yet");
... | [
"static void FUNC_0(Object *VAR_0, struct Visitor *VAR_1,\nvoid *VAR_2, const char *VAR_3, Error **VAR_4)\n{",
"Error *err = NULL;",
"VirtIOBalloon *s = VAR_2;",
"int VAR_5;",
"if (!s->stats_last_update) {",
"error_setg(VAR_4, \"guest hasn't updated any stats yet\");",
"return;",
"}",
"visit_start_s... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51,
53
... |
19,968 | void qemuio_add_command(const cmdinfo_t *ci)
{
cmdtab = g_realloc(cmdtab, ++ncmds * sizeof(*cmdtab));
cmdtab[ncmds - 1] = *ci;
qsort(cmdtab, ncmds, sizeof(*cmdtab), compare_cmdname);
}
| true | qemu | 02c4f26b1517d9e403ec10d6f6ca3c0276d19e43 | void qemuio_add_command(const cmdinfo_t *ci)
{
cmdtab = g_realloc(cmdtab, ++ncmds * sizeof(*cmdtab));
cmdtab[ncmds - 1] = *ci;
qsort(cmdtab, ncmds, sizeof(*cmdtab), compare_cmdname);
}
| {
"code": [
" cmdtab = g_realloc(cmdtab, ++ncmds * sizeof(*cmdtab));"
],
"line_no": [
5
]
} | void FUNC_0(const cmdinfo_t *VAR_0)
{
cmdtab = g_realloc(cmdtab, ++ncmds * sizeof(*cmdtab));
cmdtab[ncmds - 1] = *VAR_0;
qsort(cmdtab, ncmds, sizeof(*cmdtab), compare_cmdname);
}
| [
"void FUNC_0(const cmdinfo_t *VAR_0)\n{",
"cmdtab = g_realloc(cmdtab, ++ncmds * sizeof(*cmdtab));",
"cmdtab[ncmds - 1] = *VAR_0;",
"qsort(cmdtab, ncmds, sizeof(*cmdtab), compare_cmdname);",
"}"
] | [
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
19,969 | static void max_x86_cpu_initfn(Object *obj)
{
X86CPU *cpu = X86_CPU(obj);
CPUX86State *env = &cpu->env;
KVMState *s = kvm_state;
/* We can't fill the features array here because we don't know yet if
* "migratable" is true or false.
*/
cpu->max_features = true;
if (kvm_enab... | true | qemu | bd1820227ecc0c77cc2aeba7c7c25b2d0a72ff3c | static void max_x86_cpu_initfn(Object *obj)
{
X86CPU *cpu = X86_CPU(obj);
CPUX86State *env = &cpu->env;
KVMState *s = kvm_state;
cpu->max_features = true;
if (kvm_enabled()) {
X86CPUDefinition host_cpudef = { };
uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;
... | {
"code": [
" X86CPUDefinition host_cpudef = { };",
" uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;",
" host_vendor_fms(host_cpudef.vendor, &host_cpudef.family,",
" &host_cpudef.model, &host_cpudef.stepping);",
" cpu_x86_fill_model_id(host_cpudef.m... | static void FUNC_0(Object *VAR_0)
{
X86CPU *cpu = X86_CPU(VAR_0);
CPUX86State *env = &cpu->env;
KVMState *s = kvm_state;
cpu->max_features = true;
if (kvm_enabled()) {
X86CPUDefinition host_cpudef = { };
uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;
ho... | [
"static void FUNC_0(Object *VAR_0)\n{",
"X86CPU *cpu = X86_CPU(VAR_0);",
"CPUX86State *env = &cpu->env;",
"KVMState *s = kvm_state;",
"cpu->max_features = true;",
"if (kvm_enabled()) {",
"X86CPUDefinition host_cpudef = { };",
"uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;",
"host_vendor_fms(host_cpud... | [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
37
],
[
41
],
[
45,
47
],
[
49,
51
],
[
53,
55
],
[
59
],
[
61
],
[
63
],
[
65
... |
19,971 | static int vfio_get_device(VFIOGroup *group, const char *name, VFIODevice *vdev)
{
struct vfio_device_info dev_info = { .argsz = sizeof(dev_info) };
struct vfio_region_info reg_info = { .argsz = sizeof(reg_info) };
int ret, i;
ret = ioctl(group->fd, VFIO_GROUP_GET_DEVICE_FD, name);
if (ret <... | true | qemu | 8fc94e5a8046e349e07976f9bcaffbcd5833f3a2 | static int vfio_get_device(VFIOGroup *group, const char *name, VFIODevice *vdev)
{
struct vfio_device_info dev_info = { .argsz = sizeof(dev_info) };
struct vfio_region_info reg_info = { .argsz = sizeof(reg_info) };
int ret, i;
ret = ioctl(group->fd, VFIO_GROUP_GET_DEVICE_FD, name);
if (ret <... | {
"code": [
" if (dev_info.num_regions != VFIO_PCI_NUM_REGIONS) {",
" if (dev_info.num_irqs != VFIO_PCI_NUM_IRQS) {"
],
"line_no": [
79,
91
]
} | static int FUNC_0(VFIOGroup *VAR_0, const char *VAR_1, VFIODevice *VAR_2)
{
struct vfio_device_info VAR_3 = { .argsz = sizeof(VAR_3) };
struct vfio_region_info VAR_4 = { .argsz = sizeof(VAR_4) };
int VAR_5, VAR_6;
VAR_5 = ioctl(VAR_0->fd, VFIO_GROUP_GET_DEVICE_FD, VAR_1);
if (VAR_5 < 0) {
... | [
"static int FUNC_0(VFIOGroup *VAR_0, const char *VAR_1, VFIODevice *VAR_2)\n{",
"struct vfio_device_info VAR_3 = { .argsz = sizeof(VAR_3) };",
"struct vfio_region_info VAR_4 = { .argsz = sizeof(VAR_4) };",
"int VAR_5, VAR_6;",
"VAR_5 = ioctl(VAR_0->fd, VFIO_GROUP_GET_DEVICE_FD, VAR_1);",
"if (VAR_5 < 0) {... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17,
19
],
[
21,
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53,... |
19,972 | static int parse_inputs(const char **buf, AVFilterInOut **currInputs,
AVFilterInOut **openLinks, AVClass *log_ctx)
{
int pad = 0;
while(**buf == '[') {
char *name = parse_link_name(buf, log_ctx);
AVFilterInOut *match;
if(!name)
return -1;
... | true | FFmpeg | 64fbf5e263a0698c6cf6e0580feebe9a6f502ae5 | static int parse_inputs(const char **buf, AVFilterInOut **currInputs,
AVFilterInOut **openLinks, AVClass *log_ctx)
{
int pad = 0;
while(**buf == '[') {
char *name = parse_link_name(buf, log_ctx);
AVFilterInOut *match;
if(!name)
return -1;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char **VAR_0, AVFilterInOut **VAR_1,
AVFilterInOut **VAR_2, AVClass *VAR_3)
{
int VAR_4 = 0;
while(**VAR_0 == '[') {
char *VAR_5 = parse_link_name(VAR_0, VAR_3);
AVFilterInOut *match;
if(!VAR_5)
return -1;
... | [
"static int FUNC_0(const char **VAR_0, AVFilterInOut **VAR_1,\nAVFilterInOut **VAR_2, AVClass *VAR_3)\n{",
"int VAR_4 = 0;",
"while(**VAR_0 == '[') {",
"char *VAR_5 = parse_link_name(VAR_0, VAR_3);",
"AVFilterInOut *match;",
"if(!VAR_5)\nreturn -1;",
"match = extract_inout(VAR_5, VAR_2);",
"if(match) ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
27
],
[
31
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
48
],
[
52
],
[
54
],
[
56
],
[
58
],
[
60
],
... |
19,973 | static BlockBackend *blockdev_init(const char *file, QDict *bs_opts,
Error **errp)
{
const char *buf;
int bdrv_flags = 0;
int on_read_error, on_write_error;
BlockBackend *blk;
BlockDriverState *bs;
ThrottleConfig cfg;
int snapshot = 0;
Error ... | true | qemu | 362e9299b34b3101aaa20f20363441c9f055fa5e | static BlockBackend *blockdev_init(const char *file, QDict *bs_opts,
Error **errp)
{
const char *buf;
int bdrv_flags = 0;
int on_read_error, on_write_error;
BlockBackend *blk;
BlockDriverState *bs;
ThrottleConfig cfg;
int snapshot = 0;
Error ... | {
"code": [],
"line_no": []
} | static BlockBackend *FUNC_0(const char *file, QDict *bs_opts,
Error **errp)
{
const char *VAR_0;
int VAR_1 = 0;
int VAR_2, VAR_3;
BlockBackend *blk;
BlockDriverState *bs;
ThrottleConfig cfg;
int VAR_4 = 0;
Error *error = NULL;
QemuOpts *... | [
"static BlockBackend *FUNC_0(const char *file, QDict *bs_opts,\nError **errp)\n{",
"const char *VAR_0;",
"int VAR_1 = 0;",
"int VAR_2, VAR_3;",
"BlockBackend *blk;",
"BlockDriverState *bs;",
"ThrottleConfig cfg;",
"int VAR_4 = 0;",
"Error *error = NULL;",
"QemuOpts *opts;",
"const char *VAR_5;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
14
],
[
16
],
[
18
],
[
20
],
[
22
],
[
24
],
[
26
],
[
28
],
[
30,
32
],
[
34
],
[
42
],
[
44
],
[
46
],
[
48
],
[
50
... |
19,974 | static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
AVFilterInOut *in)
{
AVFilterContext *last_filter;
const AVFilter *buffer_filt = avfilter_get_by_name("buffer");
InputStream *ist = ifilter->ist;
InputFile *f = input_files[is... | true | FFmpeg | 4a81bddb4d9bd6402fc3be64ca406dda7976058d | static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
AVFilterInOut *in)
{
AVFilterContext *last_filter;
const AVFilter *buffer_filt = avfilter_get_by_name("buffer");
InputStream *ist = ifilter->ist;
InputFile *f = input_files[is... | {
"code": [
" return AVERROR(EINVAL);",
" return ret;",
" return ret;",
" return ret;"
],
"line_no": [
49,
67,
115,
115
]
} | static int FUNC_0(FilterGraph *VAR_0, InputFilter *VAR_1,
AVFilterInOut *VAR_2)
{
AVFilterContext *last_filter;
const AVFilter *VAR_3 = avfilter_get_by_name("buffer");
InputStream *ist = VAR_1->ist;
InputFile *f = input_files[ist->file_index];
AVRat... | [
"static int FUNC_0(FilterGraph *VAR_0, InputFilter *VAR_1,\nAVFilterInOut *VAR_2)\n{",
"AVFilterContext *last_filter;",
"const AVFilter *VAR_3 = avfilter_get_by_name(\"buffer\");",
"InputStream *ist = VAR_1->ist;",
"InputFile *f = input_files[ist->file_index];",
"AVRational tb = ist->framerate.num ? a... | [
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[... |
19,975 | static void do_video_stats(OutputStream *ost, int frame_size)
{
AVCodecContext *enc;
int frame_number;
double ti1, bitrate, avg_bitrate;
/* this is executed just the first time do_video_stats is called */
if (!vstats_file) {
vstats_file = fopen(vstats_filename, "w");
if (!v... | true | FFmpeg | 636ced8e1dc8248a1353b416240b93d70ad03edb | static void do_video_stats(OutputStream *ost, int frame_size)
{
AVCodecContext *enc;
int frame_number;
double ti1, bitrate, avg_bitrate;
if (!vstats_file) {
vstats_file = fopen(vstats_filename, "w");
if (!vstats_file) {
perror("fopen");
exit(1);
... | {
"code": [
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);"
],
"line_no": [
23,
23,
23,
23,
23,
23,
23,
23
... | static void FUNC_0(OutputStream *VAR_0, int VAR_1)
{
AVCodecContext *enc;
int VAR_2;
double VAR_3, VAR_4, VAR_5;
if (!vstats_file) {
vstats_file = fopen(vstats_filename, "w");
if (!vstats_file) {
perror("fopen");
exit(1);
}
}
... | [
"static void FUNC_0(OutputStream *VAR_0, int VAR_1)\n{",
"AVCodecContext *enc;",
"int VAR_2;",
"double VAR_3, VAR_4, VAR_5;",
"if (!vstats_file) {",
"vstats_file = fopen(vstats_filename, \"w\");",
"if (!vstats_file) {",
"perror(\"fopen\");",
"exit(1);",
"}",
"}",
"enc = VAR_0->st->codec;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
45
],
[
49
],
[
51,
53
... |
19,977 | void intra_predict(VP8Context *s, uint8_t *dst[3], VP8Macroblock *mb,
int mb_x, int mb_y)
{
AVCodecContext *avctx = s->avctx;
int x, y, mode, nnz, tr;
// for the first row, we need to run xchg_mb_border to init the top edge to 127
// otherwise, skip it if we aren't going to de... | true | FFmpeg | 7148da489e4991c88eeff9cd6238ad6e273613b5 | void intra_predict(VP8Context *s, uint8_t *dst[3], VP8Macroblock *mb,
int mb_x, int mb_y)
{
AVCodecContext *avctx = s->avctx;
int x, y, mode, nnz, tr;
if (!(avctx->flags & CODEC_FLAG_EMU_EDGE && !mb_y) && (s->deblock_filter || !mb_y))
xchg_mb_border(s->top_bord... | {
"code": [
" if (mb_x == s->mb_width-1) {"
],
"line_no": [
63
]
} | void FUNC_0(VP8Context *VAR_0, uint8_t *VAR_1[3], VP8Macroblock *VAR_2,
int VAR_3, int VAR_4)
{
AVCodecContext *avctx = VAR_0->avctx;
int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;
if (!(avctx->flags & CODEC_FLAG_EMU_EDGE && !VAR_4) && (VAR_0->deblock_filter || !VAR_4))
... | [
"void FUNC_0(VP8Context *VAR_0, uint8_t *VAR_1[3], VP8Macroblock *VAR_2,\nint VAR_3, int VAR_4)\n{",
"AVCodecContext *avctx = VAR_0->avctx;",
"int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;",
"if (!(avctx->flags & CODEC_FLAG_EMU_EDGE && !VAR_4) && (VAR_0->deblock_filter || !VAR_4))\nxchg_mb_border(VAR_0->top_border[V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
17,
19,
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
55
],
[
63
],
[
65
... |
19,978 | Aml *aml_buffer(void)
{
Aml *var = aml_bundle(0x11 /* BufferOp */, AML_BUFFER);
return var;
}
| true | qemu | ed8b5847e46c24d6e9c286892a00a34bee9b0835 | Aml *aml_buffer(void)
{
Aml *var = aml_bundle(0x11 , AML_BUFFER);
return var;
}
| {
"code": [
"Aml *aml_buffer(void)"
],
"line_no": [
1
]
} | Aml *FUNC_0(void)
{
Aml *var = aml_bundle(0x11 , AML_BUFFER);
return var;
}
| [
"Aml *FUNC_0(void)\n{",
"Aml *var = aml_bundle(0x11 , AML_BUFFER);",
"return var;",
"}"
] | [
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
19,979 | static hwaddr ppc_hash64_pteg_search(PowerPCCPU *cpu, hwaddr hash,
ppc_slb_t *slb, target_ulong ptem,
ppc_hash_pte64_t *pte)
{
CPUPPCState *env = &cpu->env;
int i;
uint64_t token;
target_ulong pte0, pte1;
target_ulong ... | true | qemu | 949868633f0454715af1781c0f377413b6ab000e | static hwaddr ppc_hash64_pteg_search(PowerPCCPU *cpu, hwaddr hash,
ppc_slb_t *slb, target_ulong ptem,
ppc_hash_pte64_t *pte)
{
CPUPPCState *env = &cpu->env;
int i;
uint64_t token;
target_ulong pte0, pte1;
target_ulong ... | {
"code": [
" ppc_hash_pte64_t *pte)",
" unsigned pshift = hpte_page_shift(slb->sps, pte0, pte1);",
" if (pshift == 0) {",
" ppc_hash_pte64_t *pte)",
" return -1;"
],
"line_no": [
5,
43... | static hwaddr FUNC_0(PowerPCCPU *cpu, hwaddr hash,
ppc_slb_t *slb, target_ulong ptem,
ppc_hash_pte64_t *pte)
{
CPUPPCState *env = &cpu->env;
int VAR_0;
uint64_t token;
target_ulong pte0, pte1;
target_ulong pte_index;
... | [
"static hwaddr FUNC_0(PowerPCCPU *cpu, hwaddr hash,\nppc_slb_t *slb, target_ulong ptem,\nppc_hash_pte64_t *pte)\n{",
"CPUPPCState *env = &cpu->env;",
"int VAR_0;",
"uint64_t token;",
"target_ulong pte0, pte1;",
"target_ulong pte_index;",
"pte_index = (hash & env->htab_mask) * HPTES_PER_GROUP;",
"token... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
1,
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
],
[
33
],
[
35
],
[
41
],
[
43
],
[
59
],
[
61
],
[
63
... |
19,980 | static int qxl_init_common(PCIQXLDevice *qxl)
{
uint8_t* config = qxl->pci.config;
uint32_t pci_device_rev;
uint32_t io_size;
qxl->mode = QXL_MODE_UNDEFINED;
qxl->generation = 1;
qxl->num_memslots = NUM_MEMSLOTS;
qemu_mutex_init(&qxl->track_lock);
qemu_mutex_init(&qxl->async_l... | true | qemu | e25a0651f4be22099122b5e14c77c354be0aa88b | static int qxl_init_common(PCIQXLDevice *qxl)
{
uint8_t* config = qxl->pci.config;
uint32_t pci_device_rev;
uint32_t io_size;
qxl->mode = QXL_MODE_UNDEFINED;
qxl->generation = 1;
qxl->num_memslots = NUM_MEMSLOTS;
qemu_mutex_init(&qxl->track_lock);
qemu_mutex_init(&qxl->async_l... | {
"code": [
" qemu_spice_add_interface(&qxl->ssd.qxl.base);"
],
"line_no": [
201
]
} | static int FUNC_0(PCIQXLDevice *VAR_0)
{
uint8_t* config = VAR_0->pci.config;
uint32_t pci_device_rev;
uint32_t io_size;
VAR_0->mode = QXL_MODE_UNDEFINED;
VAR_0->generation = 1;
VAR_0->num_memslots = NUM_MEMSLOTS;
qemu_mutex_init(&VAR_0->track_lock);
qemu_mutex_init(&VAR_0->as... | [
"static int FUNC_0(PCIQXLDevice *VAR_0)\n{",
"uint8_t* config = VAR_0->pci.config;",
"uint32_t pci_device_rev;",
"uint32_t io_size;",
"VAR_0->mode = QXL_MODE_UNDEFINED;",
"VAR_0->generation = 1;",
"VAR_0->num_memslots = NUM_MEMSLOTS;",
"qemu_mutex_init(&VAR_0->track_lock);",
"qemu_mutex_init(&VAR_0-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47,... |
19,981 | static void create_header64(DumpState *s, Error **errp)
{
DiskDumpHeader64 *dh = NULL;
KdumpSubHeader64 *kh = NULL;
size_t size;
uint32_t block_size;
uint32_t sub_hdr_size;
uint32_t bitmap_blocks;
uint32_t status = 0;
uint64_t offset_note;
Error *local_err = NULL;
/* write common... | true | qemu | 9ada575bbafaf6d3724a7f59df9da89776817cac | static void create_header64(DumpState *s, Error **errp)
{
DiskDumpHeader64 *dh = NULL;
KdumpSubHeader64 *kh = NULL;
size_t size;
uint32_t block_size;
uint32_t sub_hdr_size;
uint32_t bitmap_blocks;
uint32_t status = 0;
uint64_t offset_note;
Error *local_err = NULL;
size = siz... | {
"code": [],
"line_no": []
} | static void FUNC_0(DumpState *VAR_0, Error **VAR_1)
{
DiskDumpHeader64 *dh = NULL;
KdumpSubHeader64 *kh = NULL;
size_t size;
uint32_t block_size;
uint32_t sub_hdr_size;
uint32_t bitmap_blocks;
uint32_t status = 0;
uint64_t offset_note;
Error *local_err = NULL;
size = sizeof(... | [
"static void FUNC_0(DumpState *VAR_0, Error **VAR_1)\n{",
"DiskDumpHeader64 *dh = NULL;",
"KdumpSubHeader64 *kh = NULL;",
"size_t size;",
"uint32_t block_size;",
"uint32_t sub_hdr_size;",
"uint32_t bitmap_blocks;",
"uint32_t status = 0;",
"uint64_t offset_note;",
"Error *local_err = NULL;",
"siz... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
23
],... |
19,982 | static void test_rtas_get_time_of_day(void)
{
QOSState *qs;
struct tm tm;
uint32_t ns;
uint64_t ret;
time_t t1, t2;
qs = qtest_spapr_boot("-machine pseries");
g_assert(qs != NULL);
t1 = time(NULL);
ret = qrtas_get_time_of_day(qs->alloc, &tm, &ns);
g_assert_cmpint(r... | true | qemu | 458f3b2c953bdc7110896cb3691251023652523f | static void test_rtas_get_time_of_day(void)
{
QOSState *qs;
struct tm tm;
uint32_t ns;
uint64_t ret;
time_t t1, t2;
qs = qtest_spapr_boot("-machine pseries");
g_assert(qs != NULL);
t1 = time(NULL);
ret = qrtas_get_time_of_day(qs->alloc, &tm, &ns);
g_assert_cmpint(r... | {
"code": [
" g_assert(qs != NULL);"
],
"line_no": [
19
]
} | static void FUNC_0(void)
{
QOSState *qs;
struct VAR_0 VAR_0;
uint32_t ns;
uint64_t ret;
time_t t1, t2;
qs = qtest_spapr_boot("-machine pseries");
g_assert(qs != NULL);
t1 = time(NULL);
ret = qrtas_get_time_of_day(qs->alloc, &VAR_0, &ns);
g_assert_cmpint(ret, ==, 0)... | [
"static void FUNC_0(void)\n{",
"QOSState *qs;",
"struct VAR_0 VAR_0;",
"uint32_t ns;",
"uint64_t ret;",
"time_t t1, t2;",
"qs = qtest_spapr_boot(\"-machine pseries\");",
"g_assert(qs != NULL);",
"t1 = time(NULL);",
"ret = qrtas_get_time_of_day(qs->alloc, &VAR_0, &ns);",
"g_assert_cmpint(ret, ==,... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
]
] |
19,983 | int qemu_opts_set(QemuOptsList *list, const char *id,
const char *name, const char *value)
{
QemuOpts *opts;
opts = qemu_opts_create(list, id, 1);
if (opts == NULL) {
return -1;
}
return qemu_opt_set(opts, name, value);
}
| true | qemu | 8be7e7e4c72c048b90e3482557954a24bba43ba7 | int qemu_opts_set(QemuOptsList *list, const char *id,
const char *name, const char *value)
{
QemuOpts *opts;
opts = qemu_opts_create(list, id, 1);
if (opts == NULL) {
return -1;
}
return qemu_opt_set(opts, name, value);
}
| {
"code": [
" opts = qemu_opts_create(list, id, 1);",
" if (opts == NULL) {"
],
"line_no": [
11,
13
]
} | int FUNC_0(QemuOptsList *VAR_0, const char *VAR_1,
const char *VAR_2, const char *VAR_3)
{
QemuOpts *opts;
opts = qemu_opts_create(VAR_0, VAR_1, 1);
if (opts == NULL) {
return -1;
}
return qemu_opt_set(opts, VAR_2, VAR_3);
}
| [
"int FUNC_0(QemuOptsList *VAR_0, const char *VAR_1,\nconst char *VAR_2, const char *VAR_3)\n{",
"QemuOpts *opts;",
"opts = qemu_opts_create(VAR_0, VAR_1, 1);",
"if (opts == NULL) {",
"return -1;",
"}",
"return qemu_opt_set(opts, VAR_2, VAR_3);",
"}"
] | [
0,
0,
1,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
19,984 | static int parse_icy(HTTPContext *s, const char *tag, const char *p)
{
int len = 4 + strlen(p) + strlen(tag);
int is_first = !s->icy_metadata_headers;
int ret;
if (s->icy_metadata_headers)
len += strlen(s->icy_metadata_headers);
if ((ret = av_reallocp(&s->icy_metadata_headers, len)) < 0)
... | true | FFmpeg | 6998a9f4c4e069f515c50614179f4cfc7d0184f5 | static int parse_icy(HTTPContext *s, const char *tag, const char *p)
{
int len = 4 + strlen(p) + strlen(tag);
int is_first = !s->icy_metadata_headers;
int ret;
if (s->icy_metadata_headers)
len += strlen(s->icy_metadata_headers);
if ((ret = av_reallocp(&s->icy_metadata_headers, len)) < 0)
... | {
"code": [],
"line_no": []
} | static int FUNC_0(HTTPContext *VAR_0, const char *VAR_1, const char *VAR_2)
{
int VAR_3 = 4 + strlen(VAR_2) + strlen(VAR_1);
int VAR_4 = !VAR_0->icy_metadata_headers;
int VAR_5;
if (VAR_0->icy_metadata_headers)
VAR_3 += strlen(VAR_0->icy_metadata_headers);
if ((VAR_5 = av_reallocp(&VAR_0->ic... | [
"static int FUNC_0(HTTPContext *VAR_0, const char *VAR_1, const char *VAR_2)\n{",
"int VAR_3 = 4 + strlen(VAR_2) + strlen(VAR_1);",
"int VAR_4 = !VAR_0->icy_metadata_headers;",
"int VAR_5;",
"if (VAR_0->icy_metadata_headers)\nVAR_3 += strlen(VAR_0->icy_metadata_headers);",
"if ((VAR_5 = av_reallocp(&VAR_0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6,
7
],
[
8,
9
],
[
10
],
[
11
],
[
12
]
] |
19,985 | static av_cold void decode_init_vlc(void){
static int done = 0;
if (!done) {
int i;
done = 1;
init_vlc(&chroma_dc_coeff_token_vlc, CHROMA_DC_COEFF_TOKEN_VLC_BITS, 4*5,
&chroma_dc_coeff_token_len [0], 1, 1,
&chroma_dc_coeff_token_bits[0], 1, 1,... | true | FFmpeg | 910e3668170d2e1e56dc28f8b722232a218e4b9a | static av_cold void decode_init_vlc(void){
static int done = 0;
if (!done) {
int i;
done = 1;
init_vlc(&chroma_dc_coeff_token_vlc, CHROMA_DC_COEFF_TOKEN_VLC_BITS, 4*5,
&chroma_dc_coeff_token_len [0], 1, 1,
&chroma_dc_coeff_token_bits[0], 1, 1,... | {
"code": [
" &chroma_dc_coeff_token_bits[0], 1, 1, 1);",
" &coeff_token_bits[i][0], 1, 1, 1);",
" init_vlc(&chroma_dc_total_zeros_vlc[i], CHROMA_DC_TOTAL_ZEROS_VLC_BITS, 4,",
" &chroma_dc_total_zeros_bits[i][0], 1, 1, 1);",
" ... | static av_cold void FUNC_0(void){
static int VAR_0 = 0;
if (!VAR_0) {
int VAR_1;
VAR_0 = 1;
init_vlc(&chroma_dc_coeff_token_vlc, CHROMA_DC_COEFF_TOKEN_VLC_BITS, 4*5,
&chroma_dc_coeff_token_len [0], 1, 1,
&chroma_dc_coeff_token_bits[0], 1, 1, 1... | [
"static av_cold void FUNC_0(void){",
"static int VAR_0 = 0;",
"if (!VAR_0) {",
"int VAR_1;",
"VAR_0 = 1;",
"init_vlc(&chroma_dc_coeff_token_vlc, CHROMA_DC_COEFF_TOKEN_VLC_BITS, 4*5,\n&chroma_dc_coeff_token_len [0], 1, 1,\n&chroma_dc_coeff_token_bits[0], 1, 1, 1);",
"for(VAR_1=0; VAR_1<4; VAR_1++){",
"... | [
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
1,
0,
0,
1,
0,
0,
1,
0,
1,
0,
0
] | [
[
1
],
[
3
],
[
7
],
[
9
],
[
11
],
[
15,
17,
19
],
[
23
],
[
25,
27,
29
],
[
31
],
[
35
],
[
37,
39,
41
],
[
43
],
[
45
],
[
47,
49,
51
],
[
53
],
[
57
],
... |
19,986 | static USBDevice *usb_serial_init(USBBus *bus, const char *filename)
{
USBDevice *dev;
CharDriverState *cdrv;
uint32_t vendorid = 0, productid = 0;
char label[32];
static int index;
while (*filename && *filename != ':') {
const char *p;
char *e;
if (strstart(f... | true | qemu | 3bc36a401e0f33e63a4d2c58b646ddf78efb567c | static USBDevice *usb_serial_init(USBBus *bus, const char *filename)
{
USBDevice *dev;
CharDriverState *cdrv;
uint32_t vendorid = 0, productid = 0;
char label[32];
static int index;
while (*filename && *filename != ':') {
const char *p;
char *e;
if (strstart(f... | {
"code": [
" return NULL;",
" qdev_init_nofail(&dev->qdev);",
" qdev_init_nofail(&dev->qdev);",
" qdev_init_nofail(&dev->qdev);",
" return NULL;",
" qdev_init_nofail(&dev->qdev);"
],
"line_no": [
69,
99,
99,
99,
69,
99
]
} | static USBDevice *FUNC_0(USBBus *bus, const char *filename)
{
USBDevice *dev;
CharDriverState *cdrv;
uint32_t vendorid = 0, productid = 0;
char VAR_0[32];
static int VAR_1;
while (*filename && *filename != ':') {
const char *VAR_2;
char *VAR_3;
if (strstart(fi... | [
"static USBDevice *FUNC_0(USBBus *bus, const char *filename)\n{",
"USBDevice *dev;",
"CharDriverState *cdrv;",
"uint32_t vendorid = 0, productid = 0;",
"char VAR_0[32];",
"static int VAR_1;",
"while (*filename && *filename != ':') {",
"const char *VAR_2;",
"char *VAR_3;",
"if (strstart(filename, \... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.