id int32 0 27.3k | func stringlengths 26 142k | target bool 2
classes | project stringclasses 2
values | commit_id stringlengths 40 40 | func_clean stringlengths 26 131k | vul_lines dict | normalized_func stringlengths 24 132k | lines listlengths 1 2.8k | label listlengths 1 2.8k | line_no listlengths 1 2.8k |
|---|---|---|---|---|---|---|---|---|---|---|
8,352 | void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
{
int ret;
int status;
pid_t pid;
Error *local_err = NULL;
struct timeval tv;
/* If user has passed a time, validate and set it. */
if (has_time) {
/* year-2038 will overflow in case time_t is 32bit */
if (... | true | qemu | 00d2f3707a63881a0cec8d00cbd467f9b2d8af41 | void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
{
int ret;
int status;
pid_t pid;
Error *local_err = NULL;
struct timeval tv;
if (has_time) {
if (time_ns / 1000000000 != (time_t)(time_ns / 1000000000)) {
error_setg(errp, "Time %" PRId64 " i... | {
"code": [],
"line_no": []
} | void FUNC_0(bool VAR_0, int64_t VAR_1, Error **VAR_2)
{
int VAR_3;
int VAR_4;
pid_t pid;
Error *local_err = NULL;
struct timeval VAR_5;
if (VAR_0) {
if (VAR_1 / 1000000000 != (time_t)(VAR_1 / 1000000000)) {
error_setg(VAR_2, "Time %" PRId64 " is too large", VAR_... | [
"void FUNC_0(bool VAR_0, int64_t VAR_1, Error **VAR_2)\n{",
"int VAR_3;",
"int VAR_4;",
"pid_t pid;",
"Error *local_err = NULL;",
"struct timeval VAR_5;",
"if (VAR_0) {",
"if (VAR_1 / 1000000000 != (time_t)(VAR_1 / 1000000000)) {",
"error_setg(VAR_2, \"Time %\" PRId64 \" is too large\", VAR_1);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
9
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
23
]... |
8,353 | static int posix_aio_init(void)
{
sigset_t mask;
PosixAioState *s;
if (posix_aio_state)
return 0;
s = qemu_malloc(sizeof(PosixAioState));
if (s == NULL)
return -ENOMEM;
/* Make sure to block AIO signal */
sigemptyset(&mask);
sigaddset(&mask, SIGUSR2);
... | true | qemu | 9e472e101f37233f4e32d181d2fee29014c1cf2f | static int posix_aio_init(void)
{
sigset_t mask;
PosixAioState *s;
if (posix_aio_state)
return 0;
s = qemu_malloc(sizeof(PosixAioState));
if (s == NULL)
return -ENOMEM;
sigemptyset(&mask);
sigaddset(&mask, SIGUSR2);
sigprocmask(SIG_BLOCK, &mask, N... | {
"code": [
" sigset_t mask;",
" sigemptyset(&mask);",
" sigaddset(&mask, SIGUSR2);",
" sigprocmask(SIG_BLOCK, &mask, NULL);",
" s->fd = qemu_signalfd(&mask);",
" if (s->fd == -1) {",
" fprintf(stderr, \"failed to create signalfd\\n\");",
" fcntl(s->fd, F_SE... | static int FUNC_0(void)
{
sigset_t mask;
PosixAioState *s;
if (posix_aio_state)
return 0;
s = qemu_malloc(sizeof(PosixAioState));
if (s == NULL)
return -ENOMEM;
sigemptyset(&mask);
sigaddset(&mask, SIGUSR2);
sigprocmask(SIG_BLOCK, &mask, NULL);
... | [
"static int FUNC_0(void)\n{",
"sigset_t mask;",
"PosixAioState *s;",
"if (posix_aio_state)\nreturn 0;",
"s = qemu_malloc(sizeof(PosixAioState));",
"if (s == NULL)\nreturn -ENOMEM;",
"sigemptyset(&mask);",
"sigaddset(&mask, SIGUSR2);",
"sigprocmask(SIG_BLOCK, &mask, NULL);",
"s->first_aio = NULL;",... | [
0,
1,
0,
1,
0,
0,
1,
1,
1,
0,
1,
1,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
19,
21
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
53
],
[
57,
59
],
... |
8,354 | static void vp8_idct_dc_add4y_c(uint8_t *dst, int16_t block[4][16],
ptrdiff_t stride)
{
vp8_idct_dc_add_c(dst + 0, block[0], stride);
vp8_idct_dc_add_c(dst + 4, block[1], stride);
vp8_idct_dc_add_c(dst + 8, block[2], stride);
vp8_idct_dc_add_c(dst + 12, block[3],... | true | FFmpeg | ac4b32df71bd932838043a4838b86d11e169707f | static void vp8_idct_dc_add4y_c(uint8_t *dst, int16_t block[4][16],
ptrdiff_t stride)
{
vp8_idct_dc_add_c(dst + 0, block[0], stride);
vp8_idct_dc_add_c(dst + 4, block[1], stride);
vp8_idct_dc_add_c(dst + 8, block[2], stride);
vp8_idct_dc_add_c(dst + 12, block[3],... | {
"code": [
"static void vp8_idct_dc_add4y_c(uint8_t *dst, int16_t block[4][16],",
" ptrdiff_t stride)",
" vp8_idct_dc_add_c(dst + 0, block[0], stride);",
" vp8_idct_dc_add_c(dst + 4, block[1], stride);",
" vp8_idct_dc_add_c(dst + 8, block[2], stride);",
... | static void FUNC_0(uint8_t *VAR_0, int16_t VAR_1[4][16],
ptrdiff_t VAR_2)
{
vp8_idct_dc_add_c(VAR_0 + 0, VAR_1[0], VAR_2);
vp8_idct_dc_add_c(VAR_0 + 4, VAR_1[1], VAR_2);
vp8_idct_dc_add_c(VAR_0 + 8, VAR_1[2], VAR_2);
vp8_idct_dc_add_c(VAR_0 + 12, VAR_1[3], VAR_2)... | [
"static void FUNC_0(uint8_t *VAR_0, int16_t VAR_1[4][16],\nptrdiff_t VAR_2)\n{",
"vp8_idct_dc_add_c(VAR_0 + 0, VAR_1[0], VAR_2);",
"vp8_idct_dc_add_c(VAR_0 + 4, VAR_1[1], VAR_2);",
"vp8_idct_dc_add_c(VAR_0 + 8, VAR_1[2], VAR_2);",
"vp8_idct_dc_add_c(VAR_0 + 12, VAR_1[3], VAR_2);",
"}"
] | [
1,
1,
1,
1,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
8,355 | void ff_frame_thread_encoder_free(AVCodecContext *avctx){
int i;
ThreadContext *c= avctx->internal->frame_thread_encoder;
pthread_mutex_lock(&c->task_fifo_mutex);
c->exit = 1;
pthread_cond_broadcast(&c->task_fifo_cond);
pthread_mutex_unlock(&c->task_fifo_mutex);
for (i=0; i<avctx-... | true | FFmpeg | 183216b21870f21c86c904a7530d53682d7db46d | void ff_frame_thread_encoder_free(AVCodecContext *avctx){
int i;
ThreadContext *c= avctx->internal->frame_thread_encoder;
pthread_mutex_lock(&c->task_fifo_mutex);
c->exit = 1;
pthread_cond_broadcast(&c->task_fifo_cond);
pthread_mutex_unlock(&c->task_fifo_mutex);
for (i=0; i<avctx-... | {
"code": [
" c->exit = 1;"
],
"line_no": [
11
]
} | void FUNC_0(AVCodecContext *VAR_0){
int VAR_1;
ThreadContext *c= VAR_0->internal->frame_thread_encoder;
pthread_mutex_lock(&c->task_fifo_mutex);
c->exit = 1;
pthread_cond_broadcast(&c->task_fifo_cond);
pthread_mutex_unlock(&c->task_fifo_mutex);
for (VAR_1=0; VAR_1<VAR_0->thread_co... | [
"void FUNC_0(AVCodecContext *VAR_0){",
"int VAR_1;",
"ThreadContext *c= VAR_0->internal->frame_thread_encoder;",
"pthread_mutex_lock(&c->task_fifo_mutex);",
"c->exit = 1;",
"pthread_cond_broadcast(&c->task_fifo_cond);",
"pthread_mutex_unlock(&c->task_fifo_mutex);",
"for (VAR_1=0; VAR_1<VAR_0->thread_c... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
8,356 | static void build_fs_mount_list_from_mtab(FsMountList *mounts, Error **errp)
{
struct mntent *ment;
FsMount *mount;
char const *mtab = "/proc/self/mounts";
FILE *fp;
unsigned int devmajor, devminor;
fp = setmntent(mtab, "r");
if (!fp) {
error_setg(errp, "failed to open mta... | true | qemu | f3a06403b82c7f036564e4caf18b52ce6885fcfb | static void build_fs_mount_list_from_mtab(FsMountList *mounts, Error **errp)
{
struct mntent *ment;
FsMount *mount;
char const *mtab = "/proc/self/mounts";
FILE *fp;
unsigned int devmajor, devminor;
fp = setmntent(mtab, "r");
if (!fp) {
error_setg(errp, "failed to open mta... | {
"code": [
" mount = g_malloc0(sizeof(FsMount));",
" mount = g_malloc0(sizeof(FsMount));"
],
"line_no": [
63,
63
]
} | static void FUNC_0(FsMountList *VAR_0, Error **VAR_1)
{
struct mntent *VAR_2;
FsMount *mount;
char const *VAR_3 = "/proc/self/VAR_0";
FILE *fp;
unsigned int VAR_4, VAR_5;
fp = setmntent(VAR_3, "r");
if (!fp) {
error_setg(VAR_1, "failed to open VAR_3 file: '%s'", VAR_3);
... | [
"static void FUNC_0(FsMountList *VAR_0, Error **VAR_1)\n{",
"struct mntent *VAR_2;",
"FsMount *mount;",
"char const *VAR_3 = \"/proc/self/VAR_0\";",
"FILE *fp;",
"unsigned int VAR_4, VAR_5;",
"fp = setmntent(VAR_3, \"r\");",
"if (!fp) {",
"error_setg(VAR_1, \"failed to open VAR_3 file: '%s'\", VAR_3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
43,
45,
47
],
[
49
],
[
51
],
[
53
],
[
57
],
[
59
],
[
63
... |
8,358 | static int mov_read_mdhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
MOVStreamContext *sc;
int version;
char language[4] = {0};
unsigned lang;
int64_t creation_time;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams-1];
... | false | FFmpeg | ab61b79b1c707a9ea0512238d837ea3e8b8395ed | static int mov_read_mdhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
MOVStreamContext *sc;
int version;
char language[4] = {0};
unsigned lang;
int64_t creation_time;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams-1];
... | {
"code": [],
"line_no": []
} | static int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1, MOVAtom VAR_2)
{
AVStream *st;
MOVStreamContext *sc;
int VAR_3;
char VAR_4[4] = {0};
unsigned VAR_5;
int64_t creation_time;
if (VAR_0->fc->nb_streams < 1)
return 0;
st = VAR_0->fc->streams[VAR_0->fc->nb_streams-... | [
"static int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1, MOVAtom VAR_2)\n{",
"AVStream *st;",
"MOVStreamContext *sc;",
"int VAR_3;",
"char VAR_4[4] = {0};",
"unsigned VAR_5;",
"int64_t creation_time;",
"if (VAR_0->fc->nb_streams < 1)\nreturn 0;",
"st = VAR_0->fc->streams[VAR_0->fc->nb_streams-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
],
[
19,
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
8,359 | void visit_type_enum(Visitor *v, const char *name, int *obj,
const char *const strings[], Error **errp)
{
assert(obj && strings);
if (v->type == VISITOR_INPUT) {
input_type_enum(v, name, obj, strings, errp);
} else if (v->type == VISITOR_OUTPUT) {
output_type_enum... | true | qemu | a15fcc3cf69ee3d408f60d6cc316488d2b0249b4 | void visit_type_enum(Visitor *v, const char *name, int *obj,
const char *const strings[], Error **errp)
{
assert(obj && strings);
if (v->type == VISITOR_INPUT) {
input_type_enum(v, name, obj, strings, errp);
} else if (v->type == VISITOR_OUTPUT) {
output_type_enum... | {
"code": [
" if (v->type == VISITOR_INPUT) {",
" if (v->type == VISITOR_INPUT) {",
" if (v->type == VISITOR_INPUT) {",
" } else if (v->type == VISITOR_OUTPUT) {"
],
"line_no": [
9,
9,
9,
13
]
} | void FUNC_0(Visitor *VAR_0, const char *VAR_1, int *VAR_2,
const char *const VAR_3[], Error **VAR_4)
{
assert(VAR_2 && VAR_3);
if (VAR_0->type == VISITOR_INPUT) {
input_type_enum(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4);
} else if (VAR_0->type == VISITOR_OUTPUT) {
outpu... | [
"void FUNC_0(Visitor *VAR_0, const char *VAR_1, int *VAR_2,\nconst char *const VAR_3[], Error **VAR_4)\n{",
"assert(VAR_2 && VAR_3);",
"if (VAR_0->type == VISITOR_INPUT) {",
"input_type_enum(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4);",
"} else if (VAR_0->type == VISITOR_OUTPUT) {",
"output_type_enum(VAR_0, VAR_1... | [
0,
0,
1,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
8,360 | av_cold int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans)
{
int n = 1 << nbits;
int i;
const double theta = (trans == RDFT || trans == IRIDFT ? -1 : 1)*2*M_PI/n;
s->nbits = nbits;
s->inverse = trans == IRDFT || trans == IRIDFT;
s->sign_convention... | true | FFmpeg | aafd659518356d1ae3624830a36816f154d94d83 | av_cold int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans)
{
int n = 1 << nbits;
int i;
const double theta = (trans == RDFT || trans == IRIDFT ? -1 : 1)*2*M_PI/n;
s->nbits = nbits;
s->inverse = trans == IRDFT || trans == IRIDFT;
s->sign_convention... | {
"code": [
" s->tcos[i] = cos(i*theta);"
],
"line_no": [
39
]
} | av_cold int FUNC_0(RDFTContext *s, int nbits, enum RDFTransformType trans)
{
int VAR_0 = 1 << nbits;
int VAR_1;
const double VAR_2 = (trans == RDFT || trans == IRIDFT ? -1 : 1)*2*M_PI/VAR_0;
s->nbits = nbits;
s->inverse = trans == IRDFT || trans == IRIDFT;
s->sign_conv... | [
"av_cold int FUNC_0(RDFTContext *s, int nbits, enum RDFTransformType trans)\n{",
"int VAR_0 = 1 << nbits;",
"int VAR_1;",
"const double VAR_2 = (trans == RDFT || trans == IRIDFT ? -1 : 1)*2*M_PI/VAR_0;",
"s->nbits = nbits;",
"s->inverse = trans == IRDFT || trans == IRIDFT;",
"s->sign_c... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
27,
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
]
] |
8,361 | static int qio_channel_buffer_close(QIOChannel *ioc,
Error **errp)
{
QIOChannelBuffer *bioc = QIO_CHANNEL_BUFFER(ioc);
g_free(bioc->data);
bioc->capacity = bioc->usage = bioc->offset = 0;
return 0;
} | true | qemu | d656ec5ea823bcdb59b6512cb73b3f2f97a8308f | static int qio_channel_buffer_close(QIOChannel *ioc,
Error **errp)
{
QIOChannelBuffer *bioc = QIO_CHANNEL_BUFFER(ioc);
g_free(bioc->data);
bioc->capacity = bioc->usage = bioc->offset = 0;
return 0;
} | {
"code": [],
"line_no": []
} | static int FUNC_0(QIOChannel *VAR_0,
Error **VAR_1)
{
QIOChannelBuffer *bioc = QIO_CHANNEL_BUFFER(VAR_0);
g_free(bioc->data);
bioc->capacity = bioc->usage = bioc->offset = 0;
return 0;
} | [
"static int FUNC_0(QIOChannel *VAR_0,\nError **VAR_1)\n{",
"QIOChannelBuffer *bioc = QIO_CHANNEL_BUFFER(VAR_0);",
"g_free(bioc->data);",
"bioc->capacity = bioc->usage = bioc->offset = 0;",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
14
],
[
18
],
[
20
]
] |
8,362 | static void cpu_4xx_wdt_cb (void *opaque)
{
PowerPCCPU *cpu;
CPUPPCState *env;
ppc_tb_t *tb_env;
ppc40x_timer_t *ppc40x_timer;
uint64_t now, next;
env = opaque;
cpu = ppc_env_get_cpu(env);
tb_env = env->tb_env;
ppc40x_timer = tb_env->opaque;
now = qemu_clock_get_ns(Q... | true | qemu | a1f7f97b950a46393b0e55a9a0082e70f540cbbd | static void cpu_4xx_wdt_cb (void *opaque)
{
PowerPCCPU *cpu;
CPUPPCState *env;
ppc_tb_t *tb_env;
ppc40x_timer_t *ppc40x_timer;
uint64_t now, next;
env = opaque;
cpu = ppc_env_get_cpu(env);
tb_env = env->tb_env;
ppc40x_timer = tb_env->opaque;
now = qemu_clock_get_ns(Q... | {
"code": [
" env->spr[SPR_40x_TSR] |= 1 << 31;"
],
"line_no": [
81
]
} | static void FUNC_0 (void *VAR_0)
{
PowerPCCPU *cpu;
CPUPPCState *env;
ppc_tb_t *tb_env;
ppc40x_timer_t *ppc40x_timer;
uint64_t now, next;
env = VAR_0;
cpu = ppc_env_get_cpu(env);
tb_env = env->tb_env;
ppc40x_timer = tb_env->VAR_0;
now = qemu_clock_get_ns(QEMU_CLOCK_V... | [
"static void FUNC_0 (void *VAR_0)\n{",
"PowerPCCPU *cpu;",
"CPUPPCState *env;",
"ppc_tb_t *tb_env;",
"ppc40x_timer_t *ppc40x_timer;",
"uint64_t now, next;",
"env = VAR_0;",
"cpu = ppc_env_get_cpu(env);",
"tb_env = env->tb_env;",
"ppc40x_timer = tb_env->VAR_0;",
"now = qemu_clock_get_ns(QEMU_CLOC... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[... |
8,363 | int unix_connect_opts(QemuOpts *opts)
{
struct sockaddr_un un;
const char *path = qemu_opt_get(opts, "path");
int sock;
if (NULL == path) {
fprintf(stderr, "unix connect: no path specified\n");
return -1;
}
sock = qemu_socket(PF_UNIX, SOCK_STREAM, 0);
if (sock <... | true | qemu | 9d9474726274d0e1c420f055849a0e3058cad0e4 | int unix_connect_opts(QemuOpts *opts)
{
struct sockaddr_un un;
const char *path = qemu_opt_get(opts, "path");
int sock;
if (NULL == path) {
fprintf(stderr, "unix connect: no path specified\n");
return -1;
}
sock = qemu_socket(PF_UNIX, SOCK_STREAM, 0);
if (sock <... | {
"code": [],
"line_no": []
} | int FUNC_0(QemuOpts *VAR_0)
{
struct sockaddr_un VAR_1;
const char *VAR_2 = qemu_opt_get(VAR_0, "VAR_2");
int VAR_3;
if (NULL == VAR_2) {
fprintf(stderr, "unix connect: no VAR_2 specified\n");
return -1;
}
VAR_3 = qemu_socket(PF_UNIX, SOCK_STREAM, 0);
if (VAR_3 ... | [
"int FUNC_0(QemuOpts *VAR_0)\n{",
"struct sockaddr_un VAR_1;",
"const char *VAR_2 = qemu_opt_get(VAR_0, \"VAR_2\");",
"int VAR_3;",
"if (NULL == VAR_2) {",
"fprintf(stderr, \"unix connect: no VAR_2 specified\\n\");",
"return -1;",
"}",
"VAR_3 = qemu_socket(PF_UNIX, SOCK_STREAM, 0);",
"if (VAR_3 < ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
46
],
[
48
... |
8,364 | static int vhost_net_start_one(struct vhost_net *net,
VirtIODevice *dev)
{
struct vhost_vring_file file = { };
int r;
net->dev.nvqs = 2;
net->dev.vqs = net->vqs;
r = vhost_dev_enable_notifiers(&net->dev, dev);
if (r < 0) {
goto fail_notifiers;
... | true | qemu | 950d94ba0671e7f154a9e87a277f8efbddcee28f | static int vhost_net_start_one(struct vhost_net *net,
VirtIODevice *dev)
{
struct vhost_vring_file file = { };
int r;
net->dev.nvqs = 2;
net->dev.vqs = net->vqs;
r = vhost_dev_enable_notifiers(&net->dev, dev);
if (r < 0) {
goto fail_notifiers;
... | {
"code": [
" const VhostOps *vhost_ops = net->dev.vhost_ops;",
" r = vhost_ops->vhost_net_set_backend(&net->dev, &file);",
" const VhostOps *vhost_ops = net->dev.vhost_ops;",
" int r = vhost_ops->vhost_net_set_backend(&net->dev, &file);",
" c... | static int FUNC_0(struct vhost_net *VAR_0,
VirtIODevice *VAR_1)
{
struct vhost_vring_file VAR_2 = { };
int VAR_5;
VAR_0->VAR_1.nvqs = 2;
VAR_0->VAR_1.vqs = VAR_0->vqs;
VAR_5 = vhost_dev_enable_notifiers(&VAR_0->VAR_1, VAR_1);
if (VAR_5 < 0) {
g... | [
"static int FUNC_0(struct vhost_net *VAR_0,\nVirtIODevice *VAR_1)\n{",
"struct vhost_vring_file VAR_2 = { };",
"int VAR_5;",
"VAR_0->VAR_1.nvqs = 2;",
"VAR_0->VAR_1.vqs = VAR_0->vqs;",
"VAR_5 = vhost_dev_enable_notifiers(&VAR_0->VAR_1, VAR_1);",
"if (VAR_5 < 0) {",
"goto fail_notifiers;",
"}",
"VA... | [
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[... |
8,365 | int qcow2_pre_write_overlap_check(BlockDriverState *bs, int chk, int64_t offset,
int64_t size)
{
int ret = qcow2_check_metadata_overlap(bs, chk, offset, size);
if (ret < 0) {
return ret;
} else if (ret > 0) {
int metadata_ol_bitnr = ffs(ret) - 1;
... | true | qemu | 231bb267644ee3a9ebfd9c7f42d5d41610194b45 | int qcow2_pre_write_overlap_check(BlockDriverState *bs, int chk, int64_t offset,
int64_t size)
{
int ret = qcow2_check_metadata_overlap(bs, chk, offset, size);
if (ret < 0) {
return ret;
} else if (ret > 0) {
int metadata_ol_bitnr = ffs(ret) - 1;
... | {
"code": [
"int qcow2_pre_write_overlap_check(BlockDriverState *bs, int chk, int64_t offset,",
" int ret = qcow2_check_metadata_overlap(bs, chk, offset, size);",
"int qcow2_pre_write_overlap_check(BlockDriverState *bs, int chk, int64_t offset,"
],
"line_no": [
1,
7,
1
]
} | int FUNC_0(BlockDriverState *VAR_0, int VAR_1, int64_t VAR_2,
int64_t VAR_3)
{
int VAR_4 = qcow2_check_metadata_overlap(VAR_0, VAR_1, VAR_2, VAR_3);
if (VAR_4 < 0) {
return VAR_4;
} else if (VAR_4 > 0) {
int VAR_5 = ffs(VAR_4) - 1;
char *VA... | [
"int FUNC_0(BlockDriverState *VAR_0, int VAR_1, int64_t VAR_2,\nint64_t VAR_3)\n{",
"int VAR_4 = qcow2_check_metadata_overlap(VAR_0, VAR_1, VAR_2, VAR_3);",
"if (VAR_4 < 0) {",
"return VAR_4;",
"} else if (VAR_4 > 0) {",
"int VAR_5 = ffs(VAR_4) - 1;",
"char *VAR_6;",
"QObject *data;",
"assert(VAR_5 ... | [
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
... |
8,367 | static OutputStream *new_audio_stream(OptionsContext *o, AVFormatContext *oc, int source_index)
{
int n;
AVStream *st;
OutputStream *ost;
AVCodecContext *audio_enc;
ost = new_output_stream(o, oc, AVMEDIA_TYPE_AUDIO, source_index);
st = ost->st;
audio_enc = st->codec;
audio_... | false | FFmpeg | 8803b970ef98ea51278dece401d23dc870c5aa01 | static OutputStream *new_audio_stream(OptionsContext *o, AVFormatContext *oc, int source_index)
{
int n;
AVStream *st;
OutputStream *ost;
AVCodecContext *audio_enc;
ost = new_output_stream(o, oc, AVMEDIA_TYPE_AUDIO, source_index);
st = ost->st;
audio_enc = st->codec;
audio_... | {
"code": [],
"line_no": []
} | static OutputStream *FUNC_0(OptionsContext *o, AVFormatContext *oc, int source_index)
{
int VAR_0;
AVStream *st;
OutputStream *ost;
AVCodecContext *audio_enc;
ost = new_output_stream(o, oc, AVMEDIA_TYPE_AUDIO, source_index);
st = ost->st;
audio_enc = st->codec;
audio_enc->c... | [
"static OutputStream *FUNC_0(OptionsContext *o, AVFormatContext *oc, int source_index)\n{",
"int VAR_0;",
"AVStream *st;",
"OutputStream *ost;",
"AVCodecContext *audio_enc;",
"ost = new_output_stream(o, oc, AVMEDIA_TYPE_AUDIO, source_index);",
"st = ost->st;",
"audio_enc = st->codec;",
"audio_enc->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[
53
],
[... |
8,368 | static void end_frame(AVFilterLink *link)
{
DeshakeContext *deshake = link->dst->priv;
AVFilterBufferRef *in = link->cur_buf;
AVFilterBufferRef *out = link->dst->outputs[0]->out_buf;
Transform t;
float matrix[9];
float alpha = 2.0 / deshake->refcount;
char tmp[256];
Transform o... | false | FFmpeg | 7f6004fc7466c2ce975894446f4b13ca6c3779a0 | static void end_frame(AVFilterLink *link)
{
DeshakeContext *deshake = link->dst->priv;
AVFilterBufferRef *in = link->cur_buf;
AVFilterBufferRef *out = link->dst->outputs[0]->out_buf;
Transform t;
float matrix[9];
float alpha = 2.0 / deshake->refcount;
char tmp[256];
Transform o... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVFilterLink *VAR_0)
{
DeshakeContext *deshake = VAR_0->dst->priv;
AVFilterBufferRef *in = VAR_0->cur_buf;
AVFilterBufferRef *out = VAR_0->dst->outputs[0]->out_buf;
Transform t;
float VAR_1[9];
float VAR_2 = 2.0 / deshake->refcount;
char VAR_3[256];
Transform... | [
"static void FUNC_0(AVFilterLink *VAR_0)\n{",
"DeshakeContext *deshake = VAR_0->dst->priv;",
"AVFilterBufferRef *in = VAR_0->cur_buf;",
"AVFilterBufferRef *out = VAR_0->dst->outputs[0]->out_buf;",
"Transform t;",
"float VAR_1[9];",
"float VAR_2 = 2.0 / deshake->refcount;",
"char VAR_3[256];",
"Tran... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
51
],
[
55
... |
8,369 | static av_cold int dsp_init(AVCodecContext *avctx, AACEncContext *s)
{
int ret = 0;
s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
if (!s->fdsp)
return AVERROR(ENOMEM);
// window init
ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);
ff_kbd_window_in... | false | FFmpeg | 3fb726c6b4772594365271046d11c87ae8417bde | static av_cold int dsp_init(AVCodecContext *avctx, AACEncContext *s)
{
int ret = 0;
s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
if (!s->fdsp)
return AVERROR(ENOMEM);
ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);
ff_kbd_window_init(ff_aac_kbd_... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx, AACEncContext *s)
{
int VAR_0 = 0;
s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
if (!s->fdsp)
return AVERROR(ENOMEM);
ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);
ff_kbd_window_init(ff_aac_kbd_... | [
"static av_cold int FUNC_0(AVCodecContext *avctx, AACEncContext *s)\n{",
"int VAR_0 = 0;",
"s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);",
"if (!s->fdsp)\nreturn AVERROR(ENOMEM);",
"ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);",
"ff_kbd_window_init(ff_aac_kbd_short_128, 6.... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
33,
35
],
[
39
],
[
41
]
] |
8,371 | static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
{
int k, e;
int ch;
if (id_aac == TYPE_CPE && sbr->bs_coupling) {
int alpha = sbr->data[0].bs_amp_res ? 2 : 1;
int pan_offset = sbr->data[0].bs_amp_res ? 12 : 24;
for (e = 1; e <= sbr->data[0].bs_num_en... | false | FFmpeg | bfd0e02dd64e912a6b67c25d9f86b3b0b849ad10 | static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
{
int k, e;
int ch;
if (id_aac == TYPE_CPE && sbr->bs_coupling) {
int alpha = sbr->data[0].bs_amp_res ? 2 : 1;
int pan_offset = sbr->data[0].bs_amp_res ? 12 : 24;
for (e = 1; e <= sbr->data[0].bs_num_en... | {
"code": [],
"line_no": []
} | static void FUNC_0(SpectralBandReplication *VAR_0, int VAR_1)
{
int VAR_2, VAR_3;
int VAR_4;
if (VAR_1 == TYPE_CPE && VAR_0->bs_coupling) {
int VAR_5 = VAR_0->data[0].bs_amp_res ? 2 : 1;
int VAR_6 = VAR_0->data[0].bs_amp_res ? 12 : 24;
for (VAR_3 = 1; VAR_3 <= VAR_0->... | [
"static void FUNC_0(SpectralBandReplication *VAR_0, int VAR_1)\n{",
"int VAR_2, VAR_3;",
"int VAR_4;",
"if (VAR_1 == TYPE_CPE && VAR_0->bs_coupling) {",
"int VAR_5 = VAR_0->data[0].bs_amp_res ? 2 : 1;",
"int VAR_6 = VAR_0->data[0].bs_amp_res ? 12 : 24;",
"for (VAR_3 = 1; VAR_3 <= VAR_0->data[0].b... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27,
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49... |
8,372 | static int decode_value(SCPRContext *s, unsigned *cnt, unsigned maxc, unsigned step, unsigned *rval)
{
GetByteContext *gb = &s->gb;
RangeCoder *rc = &s->rc;
unsigned totfr = cnt[maxc];
unsigned value;
unsigned c = 0, cumfr = 0, cnt_c = 0;
int i, ret;
if ((ret = s->get_freq(rc, totf... | false | FFmpeg | 86ab6b6e08e2982fb5785e0691c0a7e289339ffb | static int decode_value(SCPRContext *s, unsigned *cnt, unsigned maxc, unsigned step, unsigned *rval)
{
GetByteContext *gb = &s->gb;
RangeCoder *rc = &s->rc;
unsigned totfr = cnt[maxc];
unsigned value;
unsigned c = 0, cumfr = 0, cnt_c = 0;
int i, ret;
if ((ret = s->get_freq(rc, totf... | {
"code": [],
"line_no": []
} | static int FUNC_0(SCPRContext *VAR_0, unsigned *VAR_1, unsigned VAR_2, unsigned VAR_3, unsigned *VAR_4)
{
GetByteContext *gb = &VAR_0->gb;
RangeCoder *rc = &VAR_0->rc;
unsigned VAR_5 = VAR_1[VAR_2];
unsigned VAR_6;
unsigned VAR_7 = 0, VAR_8 = 0, VAR_9 = 0;
int VAR_10, VAR_11;
if ((... | [
"static int FUNC_0(SCPRContext *VAR_0, unsigned *VAR_1, unsigned VAR_2, unsigned VAR_3, unsigned *VAR_4)\n{",
"GetByteContext *gb = &VAR_0->gb;",
"RangeCoder *rc = &VAR_0->rc;",
"unsigned VAR_5 = VAR_1[VAR_2];",
"unsigned VAR_6;",
"unsigned VAR_7 = 0, VAR_8 = 0, VAR_9 = 0;",
"int VAR_10, VAR_11;",
"if... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
27
],
[
29,
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[... |
8,373 | char *socket_address_to_string(struct SocketAddressLegacy *addr, Error **errp)
{
char *buf;
InetSocketAddress *inet;
switch (addr->type) {
case SOCKET_ADDRESS_LEGACY_KIND_INET:
inet = addr->u.inet.data;
if (strchr(inet->host, ':') == NULL) {
buf = g_strdup_printf("%... | false | qemu | bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884 | char *socket_address_to_string(struct SocketAddressLegacy *addr, Error **errp)
{
char *buf;
InetSocketAddress *inet;
switch (addr->type) {
case SOCKET_ADDRESS_LEGACY_KIND_INET:
inet = addr->u.inet.data;
if (strchr(inet->host, ':') == NULL) {
buf = g_strdup_printf("%... | {
"code": [],
"line_no": []
} | char *FUNC_0(struct SocketAddressLegacy *VAR_0, Error **VAR_1)
{
char *VAR_2;
InetSocketAddress *inet;
switch (VAR_0->type) {
case SOCKET_ADDRESS_LEGACY_KIND_INET:
inet = VAR_0->u.inet.data;
if (strchr(inet->host, ':') == NULL) {
VAR_2 = g_strdup_printf("%s:%s", ine... | [
"char *FUNC_0(struct SocketAddressLegacy *VAR_0, Error **VAR_1)\n{",
"char *VAR_2;",
"InetSocketAddress *inet;",
"switch (VAR_0->type) {",
"case SOCKET_ADDRESS_LEGACY_KIND_INET:\ninet = VAR_0->u.inet.data;",
"if (strchr(inet->host, ':') == NULL) {",
"VAR_2 = g_strdup_printf(\"%s:%s\", inet->host, inet->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
35
],
[
39,
41
],
[
43
],
[
47,
49,
51,
53
],
[
55... |
8,375 | START_TEST(unterminated_escape)
{
QObject *obj = qobject_from_json("\"abc\\\"");
fail_unless(obj == NULL);
}
| false | qemu | ef76dc59fa5203d146a2acf85a0ad5a5971a4824 | START_TEST(unterminated_escape)
{
QObject *obj = qobject_from_json("\"abc\\\"");
fail_unless(obj == NULL);
}
| {
"code": [],
"line_no": []
} | FUNC_0(VAR_0)
{
QObject *obj = qobject_from_json("\"abc\\\"");
fail_unless(obj == NULL);
}
| [
"FUNC_0(VAR_0)\n{",
"QObject *obj = qobject_from_json(\"\\\"abc\\\\\\\"\");",
"fail_unless(obj == NULL);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
8,376 | BlockBackend *blk_new(uint64_t perm, uint64_t shared_perm)
{
BlockBackend *blk;
blk = g_new0(BlockBackend, 1);
blk->refcnt = 1;
blk->perm = perm;
blk->shared_perm = shared_perm;
blk_set_enable_write_cache(blk, true);
qemu_co_mutex_init(&blk->public.throttle_group_member.throttled... | false | qemu | f738cfc843055238ad969782db69156929873832 | BlockBackend *blk_new(uint64_t perm, uint64_t shared_perm)
{
BlockBackend *blk;
blk = g_new0(BlockBackend, 1);
blk->refcnt = 1;
blk->perm = perm;
blk->shared_perm = shared_perm;
blk_set_enable_write_cache(blk, true);
qemu_co_mutex_init(&blk->public.throttle_group_member.throttled... | {
"code": [],
"line_no": []
} | BlockBackend *FUNC_0(uint64_t perm, uint64_t shared_perm)
{
BlockBackend *blk;
blk = g_new0(BlockBackend, 1);
blk->refcnt = 1;
blk->perm = perm;
blk->shared_perm = shared_perm;
blk_set_enable_write_cache(blk, true);
qemu_co_mutex_init(&blk->public.throttle_group_member.throttled_... | [
"BlockBackend *FUNC_0(uint64_t perm, uint64_t shared_perm)\n{",
"BlockBackend *blk;",
"blk = g_new0(BlockBackend, 1);",
"blk->refcnt = 1;",
"blk->perm = perm;",
"blk->shared_perm = shared_perm;",
"blk_set_enable_write_cache(blk, true);",
"qemu_co_mutex_init(&blk->public.throttle_group_member.throttled... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
]
] |
8,377 | static inline int put_dwords(uint32_t addr, uint32_t *buf, int num)
{
int i;
for(i = 0; i < num; i++, buf++, addr += sizeof(*buf)) {
uint32_t tmp = cpu_to_le32(*buf);
cpu_physical_memory_rw(addr,(uint8_t *)&tmp, sizeof(tmp), 1);
}
return 1;
}
| false | qemu | 68d553587c0aa271c3eb2902921b503740d775b6 | static inline int put_dwords(uint32_t addr, uint32_t *buf, int num)
{
int i;
for(i = 0; i < num; i++, buf++, addr += sizeof(*buf)) {
uint32_t tmp = cpu_to_le32(*buf);
cpu_physical_memory_rw(addr,(uint8_t *)&tmp, sizeof(tmp), 1);
}
return 1;
}
| {
"code": [],
"line_no": []
} | static inline int FUNC_0(uint32_t VAR_0, uint32_t *VAR_1, int VAR_2)
{
int VAR_3;
for(VAR_3 = 0; VAR_3 < VAR_2; VAR_3++, VAR_1++, VAR_0 += sizeof(*VAR_1)) {
uint32_t tmp = cpu_to_le32(*VAR_1);
cpu_physical_memory_rw(VAR_0,(uint8_t *)&tmp, sizeof(tmp), 1);
}
return 1;
}
| [
"static inline int FUNC_0(uint32_t VAR_0, uint32_t *VAR_1, int VAR_2)\n{",
"int VAR_3;",
"for(VAR_3 = 0; VAR_3 < VAR_2; VAR_3++, VAR_1++, VAR_0 += sizeof(*VAR_1)) {",
"uint32_t tmp = cpu_to_le32(*VAR_1);",
"cpu_physical_memory_rw(VAR_0,(uint8_t *)&tmp, sizeof(tmp), 1);",
"}",
"return 1;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
]
] |
8,378 | static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n, int mquant, int ttmb, int first_block,
uint8_t *dst, int linesize, int skip_block)
{
MpegEncContext *s = &v->s;
GetBitContext *gb = &s->gb;
int i, j;
int subblkpat = 0;
int scale, off, idx, la... | false | FFmpeg | 00a750009ffe232960ab0f729fdcbd454b233e26 | static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n, int mquant, int ttmb, int first_block,
uint8_t *dst, int linesize, int skip_block)
{
MpegEncContext *s = &v->s;
GetBitContext *gb = &s->gb;
int i, j;
int subblkpat = 0;
int scale, off, idx, la... | {
"code": [],
"line_no": []
} | static int FUNC_0(VC1Context *VAR_0, DCTELEM VAR_1[64], int VAR_2, int VAR_3, int VAR_4, int VAR_5,
uint8_t *VAR_6, int VAR_7, int VAR_8)
{
MpegEncContext *s = &VAR_0->s;
GetBitContext *gb = &s->gb;
int VAR_9, VAR_10;
int VAR_11 = 0;
int VAR_12, VAR_13, VAR_14, V... | [
"static int FUNC_0(VC1Context *VAR_0, DCTELEM VAR_1[64], int VAR_2, int VAR_3, int VAR_4, int VAR_5,\nuint8_t *VAR_6, int VAR_7, int VAR_8)\n{",
"MpegEncContext *s = &VAR_0->s;",
"GetBitContext *gb = &s->gb;",
"int VAR_9, VAR_10;",
"int VAR_11 = 0;",
"int VAR_12, VAR_13, VAR_14, VAR_15, VAR_16, VAR_17;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
8,379 | static void dma_bdrv_unmap(DMAAIOCB *dbs)
{
int i;
for (i = 0; i < dbs->iov.niov; ++i) {
dma_memory_unmap(dbs->sg->as, dbs->iov.iov[i].iov_base,
dbs->iov.iov[i].iov_len, dbs->dir,
dbs->iov.iov[i].iov_len);
}
qemu_iovec_reset(&dbs->iov);... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static void dma_bdrv_unmap(DMAAIOCB *dbs)
{
int i;
for (i = 0; i < dbs->iov.niov; ++i) {
dma_memory_unmap(dbs->sg->as, dbs->iov.iov[i].iov_base,
dbs->iov.iov[i].iov_len, dbs->dir,
dbs->iov.iov[i].iov_len);
}
qemu_iovec_reset(&dbs->iov);... | {
"code": [],
"line_no": []
} | static void FUNC_0(DMAAIOCB *VAR_0)
{
int VAR_1;
for (VAR_1 = 0; VAR_1 < VAR_0->iov.niov; ++VAR_1) {
dma_memory_unmap(VAR_0->sg->as, VAR_0->iov.iov[VAR_1].iov_base,
VAR_0->iov.iov[VAR_1].iov_len, VAR_0->dir,
VAR_0->iov.iov[VAR_1].iov_len);
}... | [
"static void FUNC_0(DMAAIOCB *VAR_0)\n{",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < VAR_0->iov.niov; ++VAR_1) {",
"dma_memory_unmap(VAR_0->sg->as, VAR_0->iov.iov[VAR_1].iov_base,\nVAR_0->iov.iov[VAR_1].iov_len, VAR_0->dir,\nVAR_0->iov.iov[VAR_1].iov_len);",
"}",
"qemu_iovec_reset(&VAR_0->iov);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13,
15
],
[
17
],
[
19
],
[
21
]
] |
8,381 | static inline abi_long do_msgsnd(int msqid, abi_long msgp,
unsigned int msgsz, int msgflg)
{
struct target_msgbuf *target_mb;
struct msgbuf *host_mb;
abi_long ret = 0;
if (!lock_user_struct(VERIFY_READ, target_mb, msgp, 0))
return -TARGET_EFAULT;
ho... | false | qemu | edcc5f9dc39309d32f4b3737e6b750ae967f5bbd | static inline abi_long do_msgsnd(int msqid, abi_long msgp,
unsigned int msgsz, int msgflg)
{
struct target_msgbuf *target_mb;
struct msgbuf *host_mb;
abi_long ret = 0;
if (!lock_user_struct(VERIFY_READ, target_mb, msgp, 0))
return -TARGET_EFAULT;
ho... | {
"code": [],
"line_no": []
} | static inline abi_long FUNC_0(int msqid, abi_long msgp,
unsigned int msgsz, int msgflg)
{
struct target_msgbuf *VAR_0;
struct msgbuf *VAR_1;
abi_long ret = 0;
if (!lock_user_struct(VERIFY_READ, VAR_0, msgp, 0))
return -TARGET_EFAULT;
VAR_1 = malloc(... | [
"static inline abi_long FUNC_0(int msqid, abi_long msgp,\nunsigned int msgsz, int msgflg)\n{",
"struct target_msgbuf *VAR_0;",
"struct msgbuf *VAR_1;",
"abi_long ret = 0;",
"if (!lock_user_struct(VERIFY_READ, VAR_0, msgp, 0))\nreturn -TARGET_EFAULT;",
"VAR_1 = malloc(msgsz+sizeof(long));",
"VAR_1->mtype... | [
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
],
[
33
],
[
35
]
] |
8,382 | void qemu_service_io(void)
{
qemu_notify_event();
}
| false | qemu | ad96090a01d848df67d70c5259ed8aa321fa8716 | void qemu_service_io(void)
{
qemu_notify_event();
}
| {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
qemu_notify_event();
}
| [
"void FUNC_0(void)\n{",
"qemu_notify_event();",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
8,383 | static int v9fs_synth_chown(FsContext *fs_ctx, V9fsPath *path, FsCred *credp)
{
errno = EPERM;
return -1;
}
| false | qemu | 364031f17932814484657e5551ba12957d993d7e | static int v9fs_synth_chown(FsContext *fs_ctx, V9fsPath *path, FsCred *credp)
{
errno = EPERM;
return -1;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1, FsCred *VAR_2)
{
errno = EPERM;
return -1;
}
| [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1, FsCred *VAR_2)\n{",
"errno = EPERM;",
"return -1;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
8,384 | static void invalidate_tlb (int idx, int use_extra)
{
tlb_t *tlb;
target_ulong addr;
uint8_t ASID;
ASID = env->CP0_EntryHi & 0xFF;
tlb = &env->tlb[idx];
/* The qemu TLB is flushed then the ASID changes, so no need to
flush these entries again. */
if (tlb->G == 0 && tlb->... | false | qemu | 2ee4aed86ff2ba38a0e1846de18a9aec38d73015 | static void invalidate_tlb (int idx, int use_extra)
{
tlb_t *tlb;
target_ulong addr;
uint8_t ASID;
ASID = env->CP0_EntryHi & 0xFF;
tlb = &env->tlb[idx];
if (tlb->G == 0 && tlb->ASID != ASID) {
return;
}
if (use_extra && env->tlb_in_use < MIPS_TLB_MAX) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0 (int VAR_0, int VAR_1)
{
tlb_t *tlb;
target_ulong addr;
uint8_t ASID;
ASID = env->CP0_EntryHi & 0xFF;
tlb = &env->tlb[VAR_0];
if (tlb->G == 0 && tlb->ASID != ASID) {
return;
}
if (VAR_1 && env->tlb_in_use < MIPS_TLB_MAX) {
... | [
"static void FUNC_0 (int VAR_0, int VAR_1)\n{",
"tlb_t *tlb;",
"target_ulong addr;",
"uint8_t ASID;",
"ASID = env->CP0_EntryHi & 0xFF;",
"tlb = &env->tlb[VAR_0];",
"if (tlb->G == 0 && tlb->ASID != ASID) {",
"return;",
"}",
"if (VAR_1 && env->tlb_in_use < MIPS_TLB_MAX) {",
"env->tlb[env->tlb_in_u... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
23
],
[
25
],
[
27
],
[
31
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[
59
... |
8,385 | static int parse_uri(const char *filename, QDict *options, Error **errp)
{
URI *uri = NULL;
QueryParams *qp = NULL;
int i;
uri = uri_parse(filename);
if (!uri) {
return -EINVAL;
}
if (strcmp(uri->scheme, "ssh") != 0) {
error_setg(errp, "URI scheme must be 'ssh'"... | false | qemu | eab2ac9d3c1675a58989000c2647aa33e440906a | static int parse_uri(const char *filename, QDict *options, Error **errp)
{
URI *uri = NULL;
QueryParams *qp = NULL;
int i;
uri = uri_parse(filename);
if (!uri) {
return -EINVAL;
}
if (strcmp(uri->scheme, "ssh") != 0) {
error_setg(errp, "URI scheme must be 'ssh'"... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, QDict *VAR_1, Error **VAR_2)
{
URI *uri = NULL;
QueryParams *qp = NULL;
int VAR_3;
uri = uri_parse(VAR_0);
if (!uri) {
return -EINVAL;
}
if (strcmp(uri->scheme, "ssh") != 0) {
error_setg(VAR_2, "URI scheme must be 'ssh'");
... | [
"static int FUNC_0(const char *VAR_0, QDict *VAR_1, Error **VAR_2)\n{",
"URI *uri = NULL;",
"QueryParams *qp = NULL;",
"int VAR_3;",
"uri = uri_parse(VAR_0);",
"if (!uri) {",
"return -EINVAL;",
"}",
"if (strcmp(uri->scheme, \"ssh\") != 0) {",
"error_setg(VAR_2, \"URI scheme must be 'ssh'\");",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
... |
8,386 | static void qmp_chardev_open_udp(Chardev *chr,
ChardevBackend *backend,
bool *be_opened,
Error **errp)
{
ChardevUdp *udp = backend->u.udp.data;
QIOChannelSocket *sioc = qio_channel_socket_new();
char *n... | false | qemu | bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884 | static void qmp_chardev_open_udp(Chardev *chr,
ChardevBackend *backend,
bool *be_opened,
Error **errp)
{
ChardevUdp *udp = backend->u.udp.data;
QIOChannelSocket *sioc = qio_channel_socket_new();
char *n... | {
"code": [],
"line_no": []
} | static void FUNC_0(Chardev *VAR_0,
ChardevBackend *VAR_1,
bool *VAR_2,
Error **VAR_3)
{
ChardevUdp *udp = VAR_1->u.udp.data;
QIOChannelSocket *sioc = qio_channel_socket_new();
char *VAR_4;
UdpChard... | [
"static void FUNC_0(Chardev *VAR_0,\nChardevBackend *VAR_1,\nbool *VAR_2,\nError **VAR_3)\n{",
"ChardevUdp *udp = VAR_1->u.udp.data;",
"QIOChannelSocket *sioc = qio_channel_socket_new();",
"char *VAR_4;",
"UdpChardev *s = UDP_CHARDEV(VAR_0);",
"if (qio_channel_socket_dgram_sync(sioc,\nudp->local, udp->rem... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23,
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
]
] |
8,387 | void qbus_create_inplace(BusState *bus, const char *typename,
DeviceState *parent, const char *name)
{
object_initialize(bus, typename);
qbus_realize(bus, parent, name);
}
| false | qemu | 39355c3826f5d9a2eb1ce3dc9b4cdd68893769d6 | void qbus_create_inplace(BusState *bus, const char *typename,
DeviceState *parent, const char *name)
{
object_initialize(bus, typename);
qbus_realize(bus, parent, name);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(BusState *VAR_0, const char *VAR_1,
DeviceState *VAR_2, const char *VAR_3)
{
object_initialize(VAR_0, VAR_1);
qbus_realize(VAR_0, VAR_2, VAR_3);
}
| [
"void FUNC_0(BusState *VAR_0, const char *VAR_1,\nDeviceState *VAR_2, const char *VAR_3)\n{",
"object_initialize(VAR_0, VAR_1);",
"qbus_realize(VAR_0, VAR_2, VAR_3);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
]
] |
8,388 | static int qemu_rdma_drain_cq(QEMUFile *f, RDMAContext *rdma)
{
int ret;
if (qemu_rdma_write_flush(f, rdma) < 0) {
return -EIO;
}
while (rdma->nb_sent) {
ret = qemu_rdma_block_for_wrid(rdma, RDMA_WRID_RDMA_WRITE);
if (ret < 0) {
fprintf(stderr, "rdma migr... | false | qemu | 88571882516a7cb4291a329c537eb79fd126e1f2 | static int qemu_rdma_drain_cq(QEMUFile *f, RDMAContext *rdma)
{
int ret;
if (qemu_rdma_write_flush(f, rdma) < 0) {
return -EIO;
}
while (rdma->nb_sent) {
ret = qemu_rdma_block_for_wrid(rdma, RDMA_WRID_RDMA_WRITE);
if (ret < 0) {
fprintf(stderr, "rdma migr... | {
"code": [],
"line_no": []
} | static int FUNC_0(QEMUFile *VAR_0, RDMAContext *VAR_1)
{
int VAR_2;
if (qemu_rdma_write_flush(VAR_0, VAR_1) < 0) {
return -EIO;
}
while (VAR_1->nb_sent) {
VAR_2 = qemu_rdma_block_for_wrid(VAR_1, RDMA_WRID_RDMA_WRITE);
if (VAR_2 < 0) {
fprintf(stderr, "VAR... | [
"static int FUNC_0(QEMUFile *VAR_0, RDMAContext *VAR_1)\n{",
"int VAR_2;",
"if (qemu_rdma_write_flush(VAR_0, VAR_1) < 0) {",
"return -EIO;",
"}",
"while (VAR_1->nb_sent) {",
"VAR_2 = qemu_rdma_block_for_wrid(VAR_1, RDMA_WRID_RDMA_WRITE);",
"if (VAR_2 < 0) {",
"fprintf(stderr, \"VAR_1 migration: comp... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
]
] |
8,389 | SwsVector *sws_cloneVec(SwsVector *a)
{
int i;
SwsVector *vec = sws_allocVec(a->length);
if (!vec)
return NULL;
for (i = 0; i < a->length; i++)
vec->coeff[i] = a->coeff[i];
return vec;
}
| false | FFmpeg | c914c99d4b8159d6be7c53c21f63d84f24d5ffeb | SwsVector *sws_cloneVec(SwsVector *a)
{
int i;
SwsVector *vec = sws_allocVec(a->length);
if (!vec)
return NULL;
for (i = 0; i < a->length; i++)
vec->coeff[i] = a->coeff[i];
return vec;
}
| {
"code": [],
"line_no": []
} | SwsVector *FUNC_0(SwsVector *a)
{
int VAR_0;
SwsVector *vec = sws_allocVec(a->length);
if (!vec)
return NULL;
for (VAR_0 = 0; VAR_0 < a->length; VAR_0++)
vec->coeff[VAR_0] = a->coeff[VAR_0];
return vec;
}
| [
"SwsVector *FUNC_0(SwsVector *a)\n{",
"int VAR_0;",
"SwsVector *vec = sws_allocVec(a->length);",
"if (!vec)\nreturn NULL;",
"for (VAR_0 = 0; VAR_0 < a->length; VAR_0++)",
"vec->coeff[VAR_0] = a->coeff[VAR_0];",
"return vec;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
23
],
[
25
]
] |
8,390 | static void expr_error(const char *fmt)
{
term_printf(fmt);
term_printf("\n");
longjmp(expr_env, 1);
}
| false | qemu | 60cbfb95522b33c3ec1dd4fa32da261c6c3d6a9d | static void expr_error(const char *fmt)
{
term_printf(fmt);
term_printf("\n");
longjmp(expr_env, 1);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(const char *VAR_0)
{
term_printf(VAR_0);
term_printf("\n");
longjmp(expr_env, 1);
}
| [
"static void FUNC_0(const char *VAR_0)\n{",
"term_printf(VAR_0);",
"term_printf(\"\\n\");",
"longjmp(expr_env, 1);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
8,391 | static void dec_wcsr(DisasContext *dc)
{
int no;
LOG_DIS("wcsr r%d, %d\n", dc->r1, dc->csr);
switch (dc->csr) {
case CSR_IE:
tcg_gen_mov_tl(cpu_ie, cpu_R[dc->r1]);
tcg_gen_movi_tl(cpu_pc, dc->pc + 4);
dc->is_jmp = DISAS_UPDATE;
break;
case CSR_IM:
... | false | qemu | bd79255d2571a3c68820117caf94ea9afe1d527e | static void dec_wcsr(DisasContext *dc)
{
int no;
LOG_DIS("wcsr r%d, %d\n", dc->r1, dc->csr);
switch (dc->csr) {
case CSR_IE:
tcg_gen_mov_tl(cpu_ie, cpu_R[dc->r1]);
tcg_gen_movi_tl(cpu_pc, dc->pc + 4);
dc->is_jmp = DISAS_UPDATE;
break;
case CSR_IM:
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0)
{
int VAR_1;
LOG_DIS("wcsr r%d, %d\n", VAR_0->r1, VAR_0->csr);
switch (VAR_0->csr) {
case CSR_IE:
tcg_gen_mov_tl(cpu_ie, cpu_R[VAR_0->r1]);
tcg_gen_movi_tl(cpu_pc, VAR_0->pc + 4);
VAR_0->is_jmp = DISAS_UPDATE;
break;
... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"int VAR_1;",
"LOG_DIS(\"wcsr r%d, %d\\n\", VAR_0->r1, VAR_0->csr);",
"switch (VAR_0->csr) {",
"case CSR_IE:\ntcg_gen_mov_tl(cpu_ie, cpu_R[VAR_0->r1]);",
"tcg_gen_movi_tl(cpu_pc, VAR_0->pc + 4);",
"VAR_0->is_jmp = DISAS_UPDATE;",
"break;",
"case CSR_IM:\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49... |
8,392 | static void coroutine_enter_cb(void *opaque, int ret)
{
Coroutine *co = opaque;
qemu_coroutine_enter(co, NULL);
}
| false | qemu | fe52840c8760122257be7b7e4893dd951480a71f | static void coroutine_enter_cb(void *opaque, int ret)
{
Coroutine *co = opaque;
qemu_coroutine_enter(co, NULL);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1)
{
Coroutine *co = VAR_0;
qemu_coroutine_enter(co, NULL);
}
| [
"static void FUNC_0(void *VAR_0, int VAR_1)\n{",
"Coroutine *co = VAR_0;",
"qemu_coroutine_enter(co, NULL);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
8,393 | int cpu_ppc_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
int mmu_idx, int is_softmmu)
{
mmu_ctx_t ctx;
int access_type;
int ret = 0;
if (rw == 2) {
/* code access */
rw = 0;
access_type = ACCESS_CODE;
} else {
... | false | qemu | dcbc9a70af47fdd49d053f6a544a86de8dca398a | int cpu_ppc_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
int mmu_idx, int is_softmmu)
{
mmu_ctx_t ctx;
int access_type;
int ret = 0;
if (rw == 2) {
rw = 0;
access_type = ACCESS_CODE;
} else {
acce... | {
"code": [],
"line_no": []
} | int FUNC_0 (CPUState *VAR_0, target_ulong VAR_1, int VAR_2,
int VAR_3, int VAR_4)
{
mmu_ctx_t ctx;
int VAR_5;
int VAR_6 = 0;
if (VAR_2 == 2) {
VAR_2 = 0;
VAR_5 = ACCESS_CODE;
} else {
VAR_5 = VAR_0->VAR_5;
}
... | [
"int FUNC_0 (CPUState *VAR_0, target_ulong VAR_1, int VAR_2,\nint VAR_3, int VAR_4)\n{",
"mmu_ctx_t ctx;",
"int VAR_5;",
"int VAR_6 = 0;",
"if (VAR_2 == 2) {",
"VAR_2 = 0;",
"VAR_5 = ACCESS_CODE;",
"} else {",
"VAR_5 = VAR_0->VAR_5;",
"}",
"VAR_6 = get_physical_address(VAR_0, &ctx, VAR_1, VAR_2,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49,
53
... |
8,394 | static int sd_create(const char *filename, QEMUOptionParameter *options,
Error **errp)
{
int ret = 0;
uint32_t vid = 0;
char *backing_file = NULL;
BDRVSheepdogState *s;
char tag[SD_MAX_VDI_TAG_LEN];
uint32_t snapid;
bool prealloc = false;
Error *local_err =... | false | qemu | a3120deee5fc1d702ba5da98fd9c845ad1c8f301 | static int sd_create(const char *filename, QEMUOptionParameter *options,
Error **errp)
{
int ret = 0;
uint32_t vid = 0;
char *backing_file = NULL;
BDRVSheepdogState *s;
char tag[SD_MAX_VDI_TAG_LEN];
uint32_t snapid;
bool prealloc = false;
Error *local_err =... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, QEMUOptionParameter *VAR_1,
Error **VAR_2)
{
int VAR_3 = 0;
uint32_t vid = 0;
char *VAR_4 = NULL;
BDRVSheepdogState *s;
char VAR_5[SD_MAX_VDI_TAG_LEN];
uint32_t snapid;
bool prealloc = false;
Error *local_err = NULL;
... | [
"static int FUNC_0(const char *VAR_0, QEMUOptionParameter *VAR_1,\nError **VAR_2)\n{",
"int VAR_3 = 0;",
"uint32_t vid = 0;",
"char *VAR_4 = NULL;",
"BDRVSheepdogState *s;",
"char VAR_5[SD_MAX_VDI_TAG_LEN];",
"uint32_t snapid;",
"bool prealloc = false;",
"Error *local_err = NULL;",
"s = g_malloc0(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
41
],
[
43
],
[
45
],
[
49
... |
8,395 | opts_type_uint64(Visitor *v, uint64_t *obj, const char *name, Error **errp)
{
OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, v);
const QemuOpt *opt;
const char *str;
unsigned long long val;
char *endptr;
if (ov->list_mode == LM_UNSIGNED_INTERVAL) {
*obj = ov->range_next.u;
... | false | qemu | 15a849be100b54776bcf63193c3fea598666030f | opts_type_uint64(Visitor *v, uint64_t *obj, const char *name, Error **errp)
{
OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, v);
const QemuOpt *opt;
const char *str;
unsigned long long val;
char *endptr;
if (ov->list_mode == LM_UNSIGNED_INTERVAL) {
*obj = ov->range_next.u;
... | {
"code": [],
"line_no": []
} | FUNC_0(Visitor *VAR_0, uint64_t *VAR_1, const char *VAR_2, Error **VAR_3)
{
OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, VAR_0);
const QemuOpt *VAR_4;
const char *VAR_5;
unsigned long long VAR_6;
char *VAR_7;
if (ov->list_mode == LM_UNSIGNED_INTERVAL) {
*VAR_1 = ov->range_... | [
"FUNC_0(Visitor *VAR_0, uint64_t *VAR_1, const char *VAR_2, Error **VAR_3)\n{",
"OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, VAR_0);",
"const QemuOpt *VAR_4;",
"const char *VAR_5;",
"unsigned long long VAR_6;",
"char *VAR_7;",
"if (ov->list_mode == LM_UNSIGNED_INTERVAL) {",
"*VAR_1 = ov->range_n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
... |
8,396 | static void pci_basic_config(void)
{
QVirtIO9P *v9p;
void *addr;
size_t tag_len;
char *tag;
int i;
qvirtio_9p_start();
v9p = qvirtio_9p_pci_init();
addr = ((QVirtioPCIDevice *) v9p->dev)->addr + VIRTIO_PCI_CONFIG_OFF(false);
tag_len = qvirtio_config_readw(v9p->dev,
... | false | qemu | a980f7f2c2f4d7e9a1eba4f804cd66dbd458b6d4 | static void pci_basic_config(void)
{
QVirtIO9P *v9p;
void *addr;
size_t tag_len;
char *tag;
int i;
qvirtio_9p_start();
v9p = qvirtio_9p_pci_init();
addr = ((QVirtioPCIDevice *) v9p->dev)->addr + VIRTIO_PCI_CONFIG_OFF(false);
tag_len = qvirtio_config_readw(v9p->dev,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
QVirtIO9P *v9p;
void *VAR_0;
size_t tag_len;
char *VAR_1;
int VAR_2;
qvirtio_9p_start();
v9p = qvirtio_9p_pci_init();
VAR_0 = ((QVirtioPCIDevice *) v9p->dev)->VAR_0 + VIRTIO_PCI_CONFIG_OFF(false);
tag_len = qvirtio_config_readw(v9p->dev,
... | [
"static void FUNC_0(void)\n{",
"QVirtIO9P *v9p;",
"void *VAR_0;",
"size_t tag_len;",
"char *VAR_1;",
"int VAR_2;",
"qvirtio_9p_start();",
"v9p = qvirtio_9p_pci_init();",
"VAR_0 = ((QVirtioPCIDevice *) v9p->dev)->VAR_0 + VIRTIO_PCI_CONFIG_OFF(false);",
"tag_len = qvirtio_config_readw(v9p->dev,\n(ui... | [
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
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[... |
8,397 | static ssize_t qio_channel_websock_readv(QIOChannel *ioc,
const struct iovec *iov,
size_t niov,
int **fds,
size_t *nfds,
... | false | qemu | e79ea67a9785a5da4d1889b6e2bb71d03e916add | static ssize_t qio_channel_websock_readv(QIOChannel *ioc,
const struct iovec *iov,
size_t niov,
int **fds,
size_t *nfds,
... | {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(QIOChannel *ioc,
const struct iovec *iov,
size_t niov,
int **fds,
size_t *nfds,
Error **... | [
"static ssize_t FUNC_0(QIOChannel *ioc,\nconst struct iovec *iov,\nsize_t niov,\nint **fds,\nsize_t *nfds,\nError **errp)\n{",
"QIOChannelWebsock *wioc = QIO_CHANNEL_WEBSOCK(ioc);",
"size_t i;",
"ssize_t got = 0;",
"ssize_t ret;",
"if (wioc->io_err) {",
"*errp = error_copy(wioc->io_err);",
"return -1;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[... |
8,398 | static void ppc_core99_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->initrd_... | false | qemu | 3a5c76baf312d83cb77c8faa72c5f7a477effed0 | static void ppc_core99_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->initrd_... | {
"code": [],
"line_no": []
} | static void FUNC_0(MachineState *VAR_0)
{
ram_addr_t ram_size = VAR_0->ram_size;
const char *VAR_1 = VAR_0->VAR_1;
const char *VAR_2 = VAR_0->VAR_2;
const char *VAR_3 = VAR_0->VAR_3;
const char *VAR_4 = VAR_0->VAR_4;
const char *VAR_5 = VAR_0->boot_order;
PowerPCCPU *cpu = NULL;
... | [
"static void FUNC_0(MachineState *VAR_0)\n{",
"ram_addr_t ram_size = VAR_0->ram_size;",
"const char *VAR_1 = VAR_0->VAR_1;",
"const char *VAR_2 = VAR_0->VAR_2;",
"const char *VAR_3 = VAR_0->VAR_3;",
"const char *VAR_4 = VAR_0->VAR_4;",
"const char *VAR_5 = VAR_0->boot_order;",
"PowerPCCPU *cpu = NULL;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
... |
8,399 | static CoroutineThreadState *coroutine_get_thread_state(void)
{
CoroutineThreadState *s = pthread_getspecific(thread_state_key);
if (!s) {
s = g_malloc0(sizeof(*s));
s->current = &s->leader.base;
QLIST_INIT(&s->pool);
pthread_setspecific(thread_state_key, s);
}
... | false | qemu | 39a7a362e16bb27e98738d63f24d1ab5811e26a8 | static CoroutineThreadState *coroutine_get_thread_state(void)
{
CoroutineThreadState *s = pthread_getspecific(thread_state_key);
if (!s) {
s = g_malloc0(sizeof(*s));
s->current = &s->leader.base;
QLIST_INIT(&s->pool);
pthread_setspecific(thread_state_key, s);
}
... | {
"code": [],
"line_no": []
} | static CoroutineThreadState *FUNC_0(void)
{
CoroutineThreadState *s = pthread_getspecific(thread_state_key);
if (!s) {
s = g_malloc0(sizeof(*s));
s->current = &s->leader.base;
QLIST_INIT(&s->pool);
pthread_setspecific(thread_state_key, s);
}
return s;
}
| [
"static CoroutineThreadState *FUNC_0(void)\n{",
"CoroutineThreadState *s = pthread_getspecific(thread_state_key);",
"if (!s) {",
"s = g_malloc0(sizeof(*s));",
"s->current = &s->leader.base;",
"QLIST_INIT(&s->pool);",
"pthread_setspecific(thread_state_key, s);",
"}",
"return s;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
8,400 | void swri_resample_dsp_init(ResampleContext *c)
{
#define FNIDX(fmt) (AV_SAMPLE_FMT_##fmt - AV_SAMPLE_FMT_S16P)
c->dsp.resample_one[FNIDX(S16P)] = (resample_one_fn) resample_one_int16;
c->dsp.resample_one[FNIDX(S32P)] = (resample_one_fn) resample_one_int32;
c->dsp.resample_one[FNIDX(FLTP)] = (resample_... | false | FFmpeg | 857cd1f33bcf86005529af2a77f861f884327be5 | void swri_resample_dsp_init(ResampleContext *c)
{
#define FNIDX(fmt) (AV_SAMPLE_FMT_##fmt - AV_SAMPLE_FMT_S16P)
c->dsp.resample_one[FNIDX(S16P)] = (resample_one_fn) resample_one_int16;
c->dsp.resample_one[FNIDX(S32P)] = (resample_one_fn) resample_one_int32;
c->dsp.resample_one[FNIDX(FLTP)] = (resample_... | {
"code": [],
"line_no": []
} | void FUNC_0(ResampleContext *VAR_0)
{
#define FNIDX(fmt) (AV_SAMPLE_FMT_##fmt - AV_SAMPLE_FMT_S16P)
VAR_0->dsp.resample_one[FNIDX(S16P)] = (resample_one_fn) resample_one_int16;
VAR_0->dsp.resample_one[FNIDX(S32P)] = (resample_one_fn) resample_one_int32;
VAR_0->dsp.resample_one[FNIDX(FLTP)] = (resample_... | [
"void FUNC_0(ResampleContext *VAR_0)\n{",
"#define FNIDX(fmt) (AV_SAMPLE_FMT_##fmt - AV_SAMPLE_FMT_S16P)\nVAR_0->dsp.resample_one[FNIDX(S16P)] = (resample_one_fn) resample_one_int16;",
"VAR_0->dsp.resample_one[FNIDX(S32P)] = (resample_one_fn) resample_one_int32;",
"VAR_0->dsp.resample_one[FNIDX(FLTP)] = (resa... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
]
] |
8,401 | static int qxl_init_primary(PCIDevice *dev)
{
PCIQXLDevice *qxl = DO_UPCAST(PCIQXLDevice, pci, dev);
VGACommonState *vga = &qxl->vga;
PortioList *qxl_vga_port_list = g_new(PortioList, 1);
DisplayState *ds;
int rc;
qxl->id = 0;
qxl_init_ramsize(qxl);
vga->vram_size_mb = qxl->vg... | false | qemu | 2c62f08ddbf3fa80dc7202eb9a2ea60ae44e2cc5 | static int qxl_init_primary(PCIDevice *dev)
{
PCIQXLDevice *qxl = DO_UPCAST(PCIQXLDevice, pci, dev);
VGACommonState *vga = &qxl->vga;
PortioList *qxl_vga_port_list = g_new(PortioList, 1);
DisplayState *ds;
int rc;
qxl->id = 0;
qxl_init_ramsize(qxl);
vga->vram_size_mb = qxl->vg... | {
"code": [],
"line_no": []
} | static int FUNC_0(PCIDevice *VAR_0)
{
PCIQXLDevice *qxl = DO_UPCAST(PCIQXLDevice, pci, VAR_0);
VGACommonState *vga = &qxl->vga;
PortioList *qxl_vga_port_list = g_new(PortioList, 1);
DisplayState *ds;
int VAR_1;
qxl->id = 0;
qxl_init_ramsize(qxl);
vga->vram_size_mb = qxl->vga.v... | [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"PCIQXLDevice *qxl = DO_UPCAST(PCIQXLDevice, pci, VAR_0);",
"VGACommonState *vga = &qxl->vga;",
"PortioList *qxl_vga_port_list = g_new(PortioList, 1);",
"DisplayState *ds;",
"int VAR_1;",
"qxl->id = 0;",
"qxl_init_ramsize(qxl);",
"vga->vram_size_mb = qxl->vg... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33,
35,
37
],
[
39,
41
],
[
45
],
[
47
],
[
49
],
[... |
8,402 | int zipl_load(void)
{
struct mbr *mbr = (void*)sec;
uint8_t *ns, *ns_end;
int program_table_entries = 0;
int pte_len = sizeof(struct scsi_blockptr);
struct scsi_blockptr *prog_table_entry;
const char *error = "";
/* Grab the MBR */
virtio_read(0, (void*)mbr);
dputs("che... | false | qemu | abd696e4f74a9d30801c6ae2693efe4e5979c2f2 | int zipl_load(void)
{
struct mbr *mbr = (void*)sec;
uint8_t *ns, *ns_end;
int program_table_entries = 0;
int pte_len = sizeof(struct scsi_blockptr);
struct scsi_blockptr *prog_table_entry;
const char *error = "";
virtio_read(0, (void*)mbr);
dputs("checking magic\n");
... | {
"code": [],
"line_no": []
} | int FUNC_0(void)
{
struct VAR_0 *VAR_0 = (void*)sec;
uint8_t *ns, *ns_end;
int VAR_1 = 0;
int VAR_2 = sizeof(struct scsi_blockptr);
struct scsi_blockptr *VAR_3;
const char *VAR_4 = "";
virtio_read(0, (void*)VAR_0);
dputs("checking magic\n");
if (!zipl_magic(VAR_... | [
"int FUNC_0(void)\n{",
"struct VAR_0 *VAR_0 = (void*)sec;",
"uint8_t *ns, *ns_end;",
"int VAR_1 = 0;",
"int VAR_2 = sizeof(struct scsi_blockptr);",
"struct scsi_blockptr *VAR_3;",
"const char *VAR_4 = \"\";",
"virtio_read(0, (void*)VAR_0);",
"dputs(\"checking magic\\n\");",
"if (!zipl_magic(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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57
... |
8,403 | static void sdhci_data_transfer(void *opaque)
{
SDHCIState *s = (SDHCIState *)opaque;
if (s->trnmod & SDHC_TRNS_DMA) {
switch (SDHC_DMA_TYPE(s->hostctl)) {
case SDHC_CTRL_SDMA:
if ((s->trnmod & SDHC_TRNS_MULTI) &&
(!(s->trnmod & SDHC_TRNS_BLK_CNT_EN) || s... | false | qemu | 6e86d90352adf6cb08295255220295cf23c4286e | static void sdhci_data_transfer(void *opaque)
{
SDHCIState *s = (SDHCIState *)opaque;
if (s->trnmod & SDHC_TRNS_DMA) {
switch (SDHC_DMA_TYPE(s->hostctl)) {
case SDHC_CTRL_SDMA:
if ((s->trnmod & SDHC_TRNS_MULTI) &&
(!(s->trnmod & SDHC_TRNS_BLK_CNT_EN) || s... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
SDHCIState *s = (SDHCIState *)VAR_0;
if (s->trnmod & SDHC_TRNS_DMA) {
switch (SDHC_DMA_TYPE(s->hostctl)) {
case SDHC_CTRL_SDMA:
if ((s->trnmod & SDHC_TRNS_MULTI) &&
(!(s->trnmod & SDHC_TRNS_BLK_CNT_EN) || s->blkcnt == 0))... | [
"static void FUNC_0(void *VAR_0)\n{",
"SDHCIState *s = (SDHCIState *)VAR_0;",
"if (s->trnmod & SDHC_TRNS_DMA) {",
"switch (SDHC_DMA_TYPE(s->hostctl)) {",
"case SDHC_CTRL_SDMA:\nif ((s->trnmod & SDHC_TRNS_MULTI) &&\n(!(s->trnmod & SDHC_TRNS_BLK_CNT_EN) || s->blkcnt == 0)) {",
"break;",
"}",
"if ((s->bl... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13,
15,
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
51
],
... |
8,404 | static const char *keyval_parse_one(QDict *qdict, const char *params,
const char *implied_key,
Error **errp)
{
const char *key, *key_end, *s;
size_t len;
char key_in_cur[128];
QDict *cur;
QObject *next;
QString *val... | false | qemu | f740048323398ebde9575a5730bf6d9f2a237f08 | static const char *keyval_parse_one(QDict *qdict, const char *params,
const char *implied_key,
Error **errp)
{
const char *key, *key_end, *s;
size_t len;
char key_in_cur[128];
QDict *cur;
QObject *next;
QString *val... | {
"code": [],
"line_no": []
} | static const char *FUNC_0(QDict *VAR_0, const char *VAR_1,
const char *VAR_2,
Error **VAR_3)
{
const char *VAR_4, *VAR_5, *VAR_6;
size_t len;
char VAR_7[128];
QDict *cur;
QObject *next;
QString *val;
VAR_4 = ... | [
"static const char *FUNC_0(QDict *VAR_0, const char *VAR_1,\nconst char *VAR_2,\nError **VAR_3)\n{",
"const char *VAR_4, *VAR_5, *VAR_6;",
"size_t len;",
"char VAR_7[128];",
"QDict *cur;",
"QObject *next;",
"QString *val;",
"VAR_4 = VAR_1;",
"len = strcspn(VAR_1, \"=,\");",
"if (VAR_2 && len && VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
... |
8,405 | void kvm_s390_cmma_reset(void)
{
int rc;
struct kvm_device_attr attr = {
.group = KVM_S390_VM_MEM_CTRL,
.attr = KVM_S390_VM_MEM_CLR_CMMA,
};
if (mem_path || !kvm_s390_cmma_available()) {
return;
}
rc = kvm_vm_ioctl(kvm_state, KVM_SET_DEVICE_ATTR, &attr);
... | false | qemu | 03f47ee49e1478b5ffffb3a9b6203c672903196c | void kvm_s390_cmma_reset(void)
{
int rc;
struct kvm_device_attr attr = {
.group = KVM_S390_VM_MEM_CTRL,
.attr = KVM_S390_VM_MEM_CLR_CMMA,
};
if (mem_path || !kvm_s390_cmma_available()) {
return;
}
rc = kvm_vm_ioctl(kvm_state, KVM_SET_DEVICE_ATTR, &attr);
... | {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
int VAR_0;
struct kvm_device_attr VAR_1 = {
.group = KVM_S390_VM_MEM_CTRL,
.VAR_1 = KVM_S390_VM_MEM_CLR_CMMA,
};
if (mem_path || !kvm_s390_cmma_available()) {
return;
}
VAR_0 = kvm_vm_ioctl(kvm_state, KVM_SET_DEVICE_ATTR, &VAR_1);
tr... | [
"void FUNC_0(void)\n{",
"int VAR_0;",
"struct kvm_device_attr VAR_1 = {",
".group = KVM_S390_VM_MEM_CTRL,\n.VAR_1 = KVM_S390_VM_MEM_CLR_CMMA,\n};",
"if (mem_path || !kvm_s390_cmma_available()) {",
"return;",
"}",
"VAR_0 = kvm_vm_ioctl(kvm_state, KVM_SET_DEVICE_ATTR, &VAR_1);",
"trace_kvm_clear_cmma(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11,
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
]
] |
8,406 | static void nested_struct_compare(UserDefTwo *udnp1, UserDefTwo *udnp2)
{
g_assert(udnp1);
g_assert(udnp2);
g_assert_cmpstr(udnp1->string0, ==, udnp2->string0);
g_assert_cmpstr(udnp1->dict1->string1, ==, udnp2->dict1->string1);
g_assert_cmpint(udnp1->dict1->dict2->userdef->base->integer, ==,
... | false | qemu | ddf21908961073199f3d186204da4810f2ea150b | static void nested_struct_compare(UserDefTwo *udnp1, UserDefTwo *udnp2)
{
g_assert(udnp1);
g_assert(udnp2);
g_assert_cmpstr(udnp1->string0, ==, udnp2->string0);
g_assert_cmpstr(udnp1->dict1->string1, ==, udnp2->dict1->string1);
g_assert_cmpint(udnp1->dict1->dict2->userdef->base->integer, ==,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(UserDefTwo *VAR_0, UserDefTwo *VAR_1)
{
g_assert(VAR_0);
g_assert(VAR_1);
g_assert_cmpstr(VAR_0->string0, ==, VAR_1->string0);
g_assert_cmpstr(VAR_0->dict1->string1, ==, VAR_1->dict1->string1);
g_assert_cmpint(VAR_0->dict1->dict2->userdef->base->integer, ==,
... | [
"static void FUNC_0(UserDefTwo *VAR_0, UserDefTwo *VAR_1)\n{",
"g_assert(VAR_0);",
"g_assert(VAR_1);",
"g_assert_cmpstr(VAR_0->string0, ==, VAR_1->string0);",
"g_assert_cmpstr(VAR_0->dict1->string1, ==, VAR_1->dict1->string1);",
"g_assert_cmpint(VAR_0->dict1->dict2->userdef->base->integer, ==,\nVAR_1->dic... | [
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
]
] |
8,407 | static int scsi_generic_initfn(SCSIDevice *s)
{
int rc;
int sg_version;
struct sg_scsi_id scsiid;
if (!s->conf.bs) {
error_report("drive property not set");
return -1;
}
if (bdrv_get_on_error(s->conf.bs, 0) != BLOCKDEV_ON_ERROR_ENOSPC) {
error_report("Device... | false | qemu | a818a4b69d47ca3826dee36878074395aeac2083 | static int scsi_generic_initfn(SCSIDevice *s)
{
int rc;
int sg_version;
struct sg_scsi_id scsiid;
if (!s->conf.bs) {
error_report("drive property not set");
return -1;
}
if (bdrv_get_on_error(s->conf.bs, 0) != BLOCKDEV_ON_ERROR_ENOSPC) {
error_report("Device... | {
"code": [],
"line_no": []
} | static int FUNC_0(SCSIDevice *VAR_0)
{
int VAR_1;
int VAR_2;
struct sg_scsi_id VAR_3;
if (!VAR_0->conf.bs) {
error_report("drive property not set");
return -1;
}
if (bdrv_get_on_error(VAR_0->conf.bs, 0) != BLOCKDEV_ON_ERROR_ENOSPC) {
error_report("Device doe... | [
"static int FUNC_0(SCSIDevice *VAR_0)\n{",
"int VAR_1;",
"int VAR_2;",
"struct sg_scsi_id VAR_3;",
"if (!VAR_0->conf.bs) {",
"error_report(\"drive property not set\");",
"return -1;",
"}",
"if (bdrv_get_on_error(VAR_0->conf.bs, 0) != BLOCKDEV_ON_ERROR_ENOSPC) {",
"error_report(\"Device doesn't sup... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47,
49,
51
... |
8,408 | VIOsPAPRDevice *spapr_vty_get_default(VIOsPAPRBus *bus)
{
VIOsPAPRDevice *sdev, *selected;
DeviceState *iter;
/*
* To avoid the console bouncing around we want one VTY to be
* the "default". We haven't really got anything to go on, so
* arbitrarily choose the one with the lowest reg ... | false | qemu | 3954d33ab7f82f5a5fa0ced231849920265a5fec | VIOsPAPRDevice *spapr_vty_get_default(VIOsPAPRBus *bus)
{
VIOsPAPRDevice *sdev, *selected;
DeviceState *iter;
selected = NULL;
QTAILQ_FOREACH(iter, &bus->bus.children, sibling) {
if (qdev_get_info(iter) != &spapr_vty_info.qdev) {
continue;
... | {
"code": [],
"line_no": []
} | VIOsPAPRDevice *FUNC_0(VIOsPAPRBus *bus)
{
VIOsPAPRDevice *sdev, *selected;
DeviceState *iter;
selected = NULL;
QTAILQ_FOREACH(iter, &bus->bus.children, sibling) {
if (qdev_get_info(iter) != &spapr_vty_info.qdev) {
continue;
}
sd... | [
"VIOsPAPRDevice *FUNC_0(VIOsPAPRBus *bus)\n{",
"VIOsPAPRDevice *sdev, *selected;",
"DeviceState *iter;",
"selected = NULL;",
"QTAILQ_FOREACH(iter, &bus->bus.children, sibling) {",
"if (qdev_get_info(iter) != &spapr_vty_info.qdev) {",
"continue;",
"}",
"sdev = DO_UPCAST(VIOsPAPRDevice, qdev, iter);",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
43
],
[
45
],
[
47
],
[
49
],
[
55
],
[
57
],
[
59
],
[
61
],
[
65
],
[
67
]
] |
8,410 | static int decode_ext_header(Wmv2Context *w){
MpegEncContext * const s= &w->s;
GetBitContext gb;
int fps;
int code;
if(s->avctx->extradata_size<4) return -1;
init_get_bits(&gb, s->avctx->extradata, s->avctx->extradata_size*8);
fps = get_bits(&gb, 5);
s->bit_r... | false | FFmpeg | a8ff69ce2bad1c4bb043e88ea35f5ab5691d4f3c | static int decode_ext_header(Wmv2Context *w){
MpegEncContext * const s= &w->s;
GetBitContext gb;
int fps;
int code;
if(s->avctx->extradata_size<4) return -1;
init_get_bits(&gb, s->avctx->extradata, s->avctx->extradata_size*8);
fps = get_bits(&gb, 5);
s->bit_r... | {
"code": [],
"line_no": []
} | static int FUNC_0(Wmv2Context *VAR_0){
MpegEncContext * const s= &VAR_0->s;
GetBitContext gb;
int VAR_1;
int VAR_2;
if(s->avctx->extradata_size<4) return -1;
init_get_bits(&gb, s->avctx->extradata, s->avctx->extradata_size*8);
VAR_1 = get_bits(&gb, 5);
s->bit... | [
"static int FUNC_0(Wmv2Context *VAR_0){",
"MpegEncContext * const s= &VAR_0->s;",
"GetBitContext gb;",
"int VAR_1;",
"int VAR_2;",
"if(s->avctx->extradata_size<4) return -1;",
"init_get_bits(&gb, s->avctx->extradata, s->avctx->extradata_size*8);",
"VAR_1 = get_bits(&gb, 5);",
"s->bit_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
49
],
[
51,
53,... |
8,411 | void fw_cfg_add_file(FWCfgState *s, const char *filename, uint8_t *data,
uint32_t len)
{
int i, index;
if (!s->files) {
int dsize = sizeof(uint32_t) + sizeof(FWCfgFile) * FW_CFG_FILE_SLOTS;
s->files = g_malloc0(dsize);
fw_cfg_add_bytes(s, FW_CFG_FILE_DIR, (... | true | qemu | 089da572b956ef0f8f5b8d5917358e07892a77c2 | void fw_cfg_add_file(FWCfgState *s, const char *filename, uint8_t *data,
uint32_t len)
{
int i, index;
if (!s->files) {
int dsize = sizeof(uint32_t) + sizeof(FWCfgFile) * FW_CFG_FILE_SLOTS;
s->files = g_malloc0(dsize);
fw_cfg_add_bytes(s, FW_CFG_FILE_DIR, (... | {
"code": [
"void fw_cfg_add_file(FWCfgState *s, const char *filename, uint8_t *data,",
" uint32_t len)",
" int dsize = sizeof(uint32_t) + sizeof(FWCfgFile) * FW_CFG_FILE_SLOTS;",
" fw_cfg_add_bytes(s, FW_CFG_FILE_DIR, (uint8_t*)s->files, dsize);"
],
"line_no": [... | void FUNC_0(FWCfgState *VAR_0, const char *VAR_1, uint8_t *VAR_2,
uint32_t VAR_3)
{
int VAR_4, VAR_5;
if (!VAR_0->files) {
int VAR_6 = sizeof(uint32_t) + sizeof(FWCfgFile) * FW_CFG_FILE_SLOTS;
VAR_0->files = g_malloc0(VAR_6);
fw_cfg_add_bytes(VAR_0, FW_CFG_... | [
"void FUNC_0(FWCfgState *VAR_0, const char *VAR_1, uint8_t *VAR_2,\nuint32_t VAR_3)\n{",
"int VAR_4, VAR_5;",
"if (!VAR_0->files) {",
"int VAR_6 = sizeof(uint32_t) + sizeof(FWCfgFile) * FW_CFG_FILE_SLOTS;",
"VAR_0->files = g_malloc0(VAR_6);",
"fw_cfg_add_bytes(VAR_0, FW_CFG_FILE_DIR, (uint8_t*)VAR_0->fil... | [
1,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
29
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53... |
8,413 | static int tls_open(URLContext *h, const char *uri, int flags)
{
TLSContext *c = h->priv_data;
int ret;
int port;
char buf[200], host[200];
int numerichost = 0;
struct addrinfo hints = { 0 }, *ai = NULL;
const char *proxy_path;
int use_proxy;
ff_tls_init();
av_url_... | true | FFmpeg | 8b09d917e7dc7d7f2ace31419f802d4ff518236c | static int tls_open(URLContext *h, const char *uri, int flags)
{
TLSContext *c = h->priv_data;
int ret;
int port;
char buf[200], host[200];
int numerichost = 0;
struct addrinfo hints = { 0 }, *ai = NULL;
const char *proxy_path;
int use_proxy;
ff_tls_init();
av_url_... | {
"code": [
" gnutls_certificate_set_verify_flags(c->cred, 0);"
],
"line_no": [
97
]
} | static int FUNC_0(URLContext *VAR_0, const char *VAR_1, int VAR_2)
{
TLSContext *c = VAR_0->priv_data;
int VAR_3;
int VAR_4;
char VAR_5[200], VAR_6[200];
int VAR_7 = 0;
struct addrinfo VAR_8 = { 0 }, *VAR_9 = NULL;
const char *VAR_10;
int VAR_11;
ff_tls_init();
av_... | [
"static int FUNC_0(URLContext *VAR_0, const char *VAR_1, int VAR_2)\n{",
"TLSContext *c = VAR_0->priv_data;",
"int VAR_3;",
"int VAR_4;",
"char VAR_5[200], VAR_6[200];",
"int VAR_7 = 0;",
"struct addrinfo VAR_8 = { 0 }, *VAR_9 = NULL;",
"const char *VAR_10;",
"int VAR_11;",
"ff_tls_init();",
"av... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
23
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47,
49,
53
... |
8,414 | void OPPROTO op_fdivr_STN_ST0(void)
{
CPU86_LDouble *p;
p = &ST(PARAM1);
*p = ST0 / *p;
}
| true | qemu | 2ee73ac3a855fb0cfba3db91fdd1ecebdbc6f971 | void OPPROTO op_fdivr_STN_ST0(void)
{
CPU86_LDouble *p;
p = &ST(PARAM1);
*p = ST0 / *p;
}
| {
"code": [
" *p = ST0 / *p;"
],
"line_no": [
9
]
} | void VAR_0 op_fdivr_STN_ST0(void)
{
CPU86_LDouble *p;
p = &ST(PARAM1);
*p = ST0 / *p;
}
| [
"void VAR_0 op_fdivr_STN_ST0(void)\n{",
"CPU86_LDouble *p;",
"p = &ST(PARAM1);",
"*p = ST0 / *p;",
"}"
] | [
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
8,415 | static int output_packet(AVFormatContext *ctx, int flush){
MpegMuxContext *s = ctx->priv_data;
AVStream *st;
StreamInfo *stream;
int i, avail_space=0, es_size, trailer_size;
int best_i= -1;
int best_score= INT_MIN;
int ignore_constraints=0;
int64_t scr= s->last_scr;
PacketDe... | true | FFmpeg | 32cde962969363bebc4ad49b770ffff39487d3f8 | static int output_packet(AVFormatContext *ctx, int flush){
MpegMuxContext *s = ctx->priv_data;
AVStream *st;
StreamInfo *stream;
int i, avail_space=0, es_size, trailer_size;
int best_i= -1;
int best_score= INT_MIN;
int ignore_constraints=0;
int64_t scr= s->last_scr;
PacketDe... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1){
MpegMuxContext *s = VAR_0->priv_data;
AVStream *st;
StreamInfo *stream;
int VAR_2, VAR_3=0, VAR_4, VAR_5;
int VAR_6= -1;
int VAR_7= INT_MIN;
int VAR_8=0;
int64_t scr= s->last_scr;
PacketDesc *timestamp_packet;
const ... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1){",
"MpegMuxContext *s = VAR_0->priv_data;",
"AVStream *st;",
"StreamInfo *stream;",
"int VAR_2, VAR_3=0, VAR_4, VAR_5;",
"int VAR_6= -1;",
"int VAR_7= INT_MIN;",
"int VAR_8=0;",
"int64_t scr= s->last_scr;",
"PacketDesc *timestamp_packet;",
"c... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
47,
49,
51
... |
8,416 | static void openpic_src_write(void *opaque, hwaddr addr, uint64_t val,
unsigned len)
{
OpenPICState *opp = opaque;
int idx;
DPRINTF("%s: addr %08x <= %08x\n", __func__, addr, val);
if (addr & 0xF)
return;
addr = addr & 0xFFF0;
idx = addr >> 5;
... | true | qemu | af7e9e74c6a62a5bcd911726a9e88d28b61490e0 | static void openpic_src_write(void *opaque, hwaddr addr, uint64_t val,
unsigned len)
{
OpenPICState *opp = opaque;
int idx;
DPRINTF("%s: addr %08x <= %08x\n", __func__, addr, val);
if (addr & 0xF)
return;
addr = addr & 0xFFF0;
idx = addr >> 5;
... | {
"code": [
" if (addr & 0xF)",
" if (addr & 0xF)",
" if (addr & 0xF)",
" if (addr & 0xF)",
" if (addr & 0xF)",
" if (addr & 0xF)",
" if (addr & 0xF)"
],
"line_no": [
15,
15,
15,
15,
15,
15,
15
]
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2,
unsigned VAR_3)
{
OpenPICState *opp = VAR_0;
int VAR_4;
DPRINTF("%s: VAR_1 %08x <= %08x\n", __func__, VAR_1, VAR_2);
if (VAR_1 & 0xF)
return;
VAR_1 = VAR_1 & 0xFFF0;
VAR_4 = VAR_1 >> 5;... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2,\nunsigned VAR_3)\n{",
"OpenPICState *opp = VAR_0;",
"int VAR_4;",
"DPRINTF(\"%s: VAR_1 %08x <= %08x\\n\", __func__, VAR_1, VAR_2);",
"if (VAR_1 & 0xF)\nreturn;",
"VAR_1 = VAR_1 & 0xFFF0;",
"VAR_4 = VAR_1 >> 5;",
"if (VAR_1 & 0x10) {",
"w... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
]
] |
8,417 | uint64_t helper_addlv(CPUAlphaState *env, uint64_t op1, uint64_t op2)
{
uint64_t tmp = op1;
op1 = (uint32_t)(op1 + op2);
if (unlikely((tmp ^ op2 ^ (-1UL)) & (tmp ^ op1) & (1UL << 31))) {
arith_excp(env, GETPC(), EXC_M_IOV, 0);
}
return op1;
}
| true | qemu | 4d1628e832dfc6ec02b0d196f6cc250aaa7bf3b3 | uint64_t helper_addlv(CPUAlphaState *env, uint64_t op1, uint64_t op2)
{
uint64_t tmp = op1;
op1 = (uint32_t)(op1 + op2);
if (unlikely((tmp ^ op2 ^ (-1UL)) & (tmp ^ op1) & (1UL << 31))) {
arith_excp(env, GETPC(), EXC_M_IOV, 0);
}
return op1;
}
| {
"code": [
" uint64_t tmp = op1;",
" return op1;",
"uint64_t helper_addlv(CPUAlphaState *env, uint64_t op1, uint64_t op2)",
" uint64_t tmp = op1;",
" op1 = (uint32_t)(op1 + op2);",
" if (unlikely((tmp ^ op2 ^ (-1UL)) & (tmp ^ op1) & (1UL << 31))) {",
" arith_excp(env... | uint64_t FUNC_0(CPUAlphaState *env, uint64_t op1, uint64_t op2)
{
uint64_t tmp = op1;
op1 = (uint32_t)(op1 + op2);
if (unlikely((tmp ^ op2 ^ (-1UL)) & (tmp ^ op1) & (1UL << 31))) {
arith_excp(env, GETPC(), EXC_M_IOV, 0);
}
return op1;
}
| [
"uint64_t FUNC_0(CPUAlphaState *env, uint64_t op1, uint64_t op2)\n{",
"uint64_t tmp = op1;",
"op1 = (uint32_t)(op1 + op2);",
"if (unlikely((tmp ^ op2 ^ (-1UL)) & (tmp ^ op1) & (1UL << 31))) {",
"arith_excp(env, GETPC(), EXC_M_IOV, 0);",
"}",
"return op1;",
"}"
] | [
1,
1,
1,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
8,418 | static int ahci_dma_prepare_buf(IDEDMA *dma, int is_write)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
IDEState *s = &ad->port.ifs[0];
ahci_populate_sglist(ad, &s->sg);
s->io_buffer_size = s->sg.size;
DPRINTF(ad->port_no, "len=%#x\n", s->io_buffer_size);
return s->io_buffer_si... | true | qemu | 61f52e06f0a21bab782f98ef3ea789aa6d0aa046 | static int ahci_dma_prepare_buf(IDEDMA *dma, int is_write)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
IDEState *s = &ad->port.ifs[0];
ahci_populate_sglist(ad, &s->sg);
s->io_buffer_size = s->sg.size;
DPRINTF(ad->port_no, "len=%#x\n", s->io_buffer_size);
return s->io_buffer_si... | {
"code": [
" ahci_populate_sglist(ad, &s->sg);"
],
"line_no": [
11
]
} | static int FUNC_0(IDEDMA *VAR_0, int VAR_1)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, VAR_0, VAR_0);
IDEState *s = &ad->port.ifs[0];
ahci_populate_sglist(ad, &s->sg);
s->io_buffer_size = s->sg.size;
DPRINTF(ad->port_no, "len=%#x\n", s->io_buffer_size);
return s->io_buffer_size != 0;
}... | [
"static int FUNC_0(IDEDMA *VAR_0, int VAR_1)\n{",
"AHCIDevice *ad = DO_UPCAST(AHCIDevice, VAR_0, VAR_0);",
"IDEState *s = &ad->port.ifs[0];",
"ahci_populate_sglist(ad, &s->sg);",
"s->io_buffer_size = s->sg.size;",
"DPRINTF(ad->port_no, \"len=%#x\\n\", s->io_buffer_size);",
"return s->io_buffer_size != 0... | [
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
]
] |
8,420 | int av_vsrc_buffer_add_frame(AVFilterContext *buffer_src, const AVFrame *frame)
{
int ret;
AVFilterBufferRef *picref =
avfilter_get_video_buffer_ref_from_frame(frame, AV_PERM_WRITE);
if (!picref)
return AVERROR(ENOMEM);
ret = av_vsrc_buffer_add_video_buffer_ref(buffer_src, picref)... | true | FFmpeg | 27bcf55f459e038e81f09c17e72e6d44898b9015 | int av_vsrc_buffer_add_frame(AVFilterContext *buffer_src, const AVFrame *frame)
{
int ret;
AVFilterBufferRef *picref =
avfilter_get_video_buffer_ref_from_frame(frame, AV_PERM_WRITE);
if (!picref)
return AVERROR(ENOMEM);
ret = av_vsrc_buffer_add_video_buffer_ref(buffer_src, picref)... | {
"code": [
"int av_vsrc_buffer_add_frame(AVFilterContext *buffer_src, const AVFrame *frame)",
" ret = av_vsrc_buffer_add_video_buffer_ref(buffer_src, picref);"
],
"line_no": [
1,
15
]
} | int FUNC_0(AVFilterContext *VAR_0, const AVFrame *VAR_1)
{
int VAR_2;
AVFilterBufferRef *picref =
avfilter_get_video_buffer_ref_from_frame(VAR_1, AV_PERM_WRITE);
if (!picref)
return AVERROR(ENOMEM);
VAR_2 = av_vsrc_buffer_add_video_buffer_ref(VAR_0, picref);
picref->buf->data... | [
"int FUNC_0(AVFilterContext *VAR_0, const AVFrame *VAR_1)\n{",
"int VAR_2;",
"AVFilterBufferRef *picref =\navfilter_get_video_buffer_ref_from_frame(VAR_1, AV_PERM_WRITE);",
"if (!picref)\nreturn AVERROR(ENOMEM);",
"VAR_2 = av_vsrc_buffer_add_video_buffer_ref(VAR_0, picref);",
"picref->buf->data[0] = NULL;... | [
1,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
]
] |
8,421 | static ssize_t mp_user_getxattr(FsContext *ctx, const char *path,
const char *name, void *value, size_t size)
{
char *buffer;
ssize_t ret;
if (strncmp(name, "user.virtfs.", 12) == 0) {
/*
* Don't allow fetch of user.virtfs namesapce
* in ca... | true | qemu | 56ad3e54dad6cdcee8668d170df161d89581846f | static ssize_t mp_user_getxattr(FsContext *ctx, const char *path,
const char *name, void *value, size_t size)
{
char *buffer;
ssize_t ret;
if (strncmp(name, "user.virtfs.", 12) == 0) {
errno = ENOATTR;
return -1;
}
buffer = r... | {
"code": [
" char *buffer;",
" ssize_t ret;",
" buffer = rpath(ctx, path);",
" g_free(buffer);",
" return ret;",
" char *buffer;",
" ssize_t ret;",
" buffer = rpath(ctx, path);",
" g_free(buffer);",
" return ret;",
" char *buffer;",
" ... | static ssize_t FUNC_0(FsContext *ctx, const char *path,
const char *name, void *value, size_t size)
{
char *VAR_0;
ssize_t ret;
if (strncmp(name, "user.virtfs.", 12) == 0) {
errno = ENOATTR;
return -1;
}
VAR_0 = rpath(ctx, pa... | [
"static ssize_t FUNC_0(FsContext *ctx, const char *path,\nconst char *name, void *value, size_t size)\n{",
"char *VAR_0;",
"ssize_t ret;",
"if (strncmp(name, \"user.virtfs.\", 12) == 0) {",
"errno = ENOATTR;",
"return -1;",
"}",
"VAR_0 = rpath(ctx, path);",
"ret = lgetxattr(VAR_0, name, value, size)... | [
0,
1,
1,
0,
0,
0,
0,
1,
1,
1,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
8,422 | static int mpeg_decode_slice(AVCodecContext *avctx,
AVFrame *pict,
int start_code,
UINT8 *buf, int buf_size)
{
Mpeg1Context *s1 = avctx->priv_data;
MpegEncContext *s = &s1->mpeg_enc_ctx;
int ret;
start_c... | false | FFmpeg | 68f593b48433842f3407586679fe07f3e5199ab9 | static int mpeg_decode_slice(AVCodecContext *avctx,
AVFrame *pict,
int start_code,
UINT8 *buf, int buf_size)
{
Mpeg1Context *s1 = avctx->priv_data;
MpegEncContext *s = &s1->mpeg_enc_ctx;
int ret;
start_c... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
AVFrame *VAR_1,
int VAR_2,
UINT8 *VAR_3, int VAR_4)
{
Mpeg1Context *s1 = VAR_0->priv_data;
MpegEncContext *s = &s1->mpeg_enc_ctx;
int VAR_5;
VAR_2 = (VAR_2 - 1) &... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nAVFrame *VAR_1,\nint VAR_2,\nUINT8 *VAR_3, int VAR_4)\n{",
"Mpeg1Context *s1 = VAR_0->priv_data;",
"MpegEncContext *s = &s1->mpeg_enc_ctx;",
"int VAR_5;",
"VAR_2 = (VAR_2 - 1) & 0xff;",
"if (VAR_2 >= s->mb_height){",
"fprintf(stderr, \"slice below image (%d >= ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43,
45
],
[
49
],
[
51,... |
8,423 | static void generate_codebook(RoqContext *enc, RoqTempdata *tempdata,
int *points, int inputCount, roq_cell *results,
int size, int cbsize)
{
int i, j, k;
int c_size = size*size/4;
int *buf;
int *codebook = av_malloc(6*c_size*cbsize*size... | false | FFmpeg | 3beb9cbad35218ed1fb3473eeb3cfc97a931bff4 | static void generate_codebook(RoqContext *enc, RoqTempdata *tempdata,
int *points, int inputCount, roq_cell *results,
int size, int cbsize)
{
int i, j, k;
int c_size = size*size/4;
int *buf;
int *codebook = av_malloc(6*c_size*cbsize*size... | {
"code": [],
"line_no": []
} | static void FUNC_0(RoqContext *VAR_0, RoqTempdata *VAR_1,
int *VAR_2, int VAR_3, roq_cell *VAR_4,
int VAR_5, int VAR_6)
{
int VAR_7, VAR_8, VAR_9;
int VAR_10 = VAR_5*VAR_5/4;
int *VAR_11;
int *VAR_12 = av_malloc(6*VAR_10*VAR_6*sizeof(int... | [
"static void FUNC_0(RoqContext *VAR_0, RoqTempdata *VAR_1,\nint *VAR_2, int VAR_3, roq_cell *VAR_4,\nint VAR_5, int VAR_6)\n{",
"int VAR_7, VAR_8, VAR_9;",
"int VAR_10 = VAR_5*VAR_5/4;",
"int *VAR_11;",
"int *VAR_12 = av_malloc(6*VAR_10*VAR_6*sizeof(int));",
"int *VAR_13;",
"if (VAR_5 == 4)\nVAR_13 = av... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
25,
27
],
[
31
],
[
33
],
[
37,
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[... |
8,426 | static av_cold int xma_decode_init(AVCodecContext *avctx)
{
XMADecodeCtx *s = avctx->priv_data;
int i, ret;
for (i = 0; i < avctx->channels / 2; i++) {
ret = decode_init(&s->xma[i], avctx);
s->frames[i] = av_frame_alloc();
if (!s->frames[i])
return AVERROR(ENOME... | false | FFmpeg | 45f4bf94afb8b70d99fb7b5760fd65f5c3ad8b88 | static av_cold int xma_decode_init(AVCodecContext *avctx)
{
XMADecodeCtx *s = avctx->priv_data;
int i, ret;
for (i = 0; i < avctx->channels / 2; i++) {
ret = decode_init(&s->xma[i], avctx);
s->frames[i] = av_frame_alloc();
if (!s->frames[i])
return AVERROR(ENOME... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
XMADecodeCtx *s = avctx->priv_data;
int VAR_0, VAR_1;
for (VAR_0 = 0; VAR_0 < avctx->channels / 2; VAR_0++) {
VAR_1 = decode_init(&s->xma[VAR_0], avctx);
s->frames[VAR_0] = av_frame_alloc();
if (!s->frames[VAR_0])
... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"XMADecodeCtx *s = avctx->priv_data;",
"int VAR_0, VAR_1;",
"for (VAR_0 = 0; VAR_0 < avctx->channels / 2; VAR_0++) {",
"VAR_1 = decode_init(&s->xma[VAR_0], avctx);",
"s->frames[VAR_0] = av_frame_alloc();",
"if (!s->frames[VAR_0])\nreturn AVERROR(ENO... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37
]
] |
8,427 | int main (int argc, char *argv[])
{
char *fnam = argv[0];
FILE *f;
if (argv[0][0] != '/')
{
fnam = malloc (strlen (argv[0]) + 2);
if (fnam == NULL)
abort ();
strcpy (fnam, "/");
strcat (fnam, argv[0]);
}
f = fopen (fnam, "rb");
if (f == NULL)
abort ();
c... | true | qemu | 2917dce477f91e933052f5555b4c6be961ff624e | int main (int argc, char *argv[])
{
char *fnam = argv[0];
FILE *f;
if (argv[0][0] != '/')
{
fnam = malloc (strlen (argv[0]) + 2);
if (fnam == NULL)
abort ();
strcpy (fnam, "/");
strcat (fnam, argv[0]);
}
f = fopen (fnam, "rb");
if (f == NULL)
abort ();
c... | {
"code": [
" close (f);",
" close (f);"
],
"line_no": [
33,
33
]
} | int FUNC_0 (int VAR_0, char *VAR_1[])
{
char *VAR_2 = VAR_1[0];
FILE *f;
if (VAR_1[0][0] != '/')
{
VAR_2 = malloc (strlen (VAR_1[0]) + 2);
if (VAR_2 == NULL)
abort ();
strcpy (VAR_2, "/");
strcat (VAR_2, VAR_1[0]);
}
f = fopen (VAR_2, "rb");
if (f == NULL)
... | [
"int FUNC_0 (int VAR_0, char *VAR_1[])\n{",
"char *VAR_2 = VAR_1[0];",
"FILE *f;",
"if (VAR_1[0][0] != '/')\n{",
"VAR_2 = malloc (strlen (VAR_1[0]) + 2);",
"if (VAR_2 == NULL)\nabort ();",
"strcpy (VAR_2, \"/\");",
"strcat (VAR_2, VAR_1[0]);",
"}",
"f = fopen (VAR_2, \"rb\");",
"if (f == NULL)\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
33
],
[
39,
41,
43
],
[
45
],
[
47
],
[
49
]
] |
8,429 | int xbzrle_decode_buffer(uint8_t *src, int slen, uint8_t *dst, int dlen)
{
int i = 0, d = 0;
int ret;
uint32_t count = 0;
while (i < slen) {
/* zrun */
if ((slen - i) < 2) {
return -1;
}
ret = uleb128_decode_small(src + i, &count);
if ... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | int xbzrle_decode_buffer(uint8_t *src, int slen, uint8_t *dst, int dlen)
{
int i = 0, d = 0;
int ret;
uint32_t count = 0;
while (i < slen) {
if ((slen - i) < 2) {
return -1;
}
ret = uleb128_decode_small(src + i, &count);
if (ret < 0 |... | {
"code": [],
"line_no": []
} | int FUNC_0(uint8_t *VAR_0, int VAR_1, uint8_t *VAR_2, int VAR_3)
{
int VAR_4 = 0, VAR_5 = 0;
int VAR_6;
uint32_t count = 0;
while (VAR_4 < VAR_1) {
if ((VAR_1 - VAR_4) < 2) {
return -1;
}
VAR_6 = uleb128_decode_small(VAR_0 + VAR_4, &count);
... | [
"int FUNC_0(uint8_t *VAR_0, int VAR_1, uint8_t *VAR_2, int VAR_3)\n{",
"int VAR_4 = 0, VAR_5 = 0;",
"int VAR_6;",
"uint32_t count = 0;",
"while (VAR_4 < VAR_1) {",
"if ((VAR_1 - VAR_4) < 2) {",
"return -1;",
"}",
"VAR_6 = uleb128_decode_small(VAR_0 + VAR_4, &count);",
"if (VAR_6 < 0 || (VAR_4 && !... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
53
],
[
55
],
[
57
... |
8,430 | av_cold void ff_vp8dsp_init(VP8DSPContext *dsp)
{
dsp->vp8_luma_dc_wht = vp8_luma_dc_wht_c;
dsp->vp8_luma_dc_wht_dc = vp8_luma_dc_wht_dc_c;
dsp->vp8_idct_add = vp8_idct_add_c;
dsp->vp8_idct_dc_add = vp8_idct_dc_add_c;
dsp->vp8_idct_dc_add4y = vp8_idct_dc_add4y_c;
dsp->vp8_idc... | false | FFmpeg | b8664c929437d6d079e16979c496a2db40cf2324 | av_cold void ff_vp8dsp_init(VP8DSPContext *dsp)
{
dsp->vp8_luma_dc_wht = vp8_luma_dc_wht_c;
dsp->vp8_luma_dc_wht_dc = vp8_luma_dc_wht_dc_c;
dsp->vp8_idct_add = vp8_idct_add_c;
dsp->vp8_idct_dc_add = vp8_idct_dc_add_c;
dsp->vp8_idct_dc_add4y = vp8_idct_dc_add4y_c;
dsp->vp8_idc... | {
"code": [],
"line_no": []
} | av_cold void FUNC_0(VP8DSPContext *dsp)
{
dsp->vp8_luma_dc_wht = vp8_luma_dc_wht_c;
dsp->vp8_luma_dc_wht_dc = vp8_luma_dc_wht_dc_c;
dsp->vp8_idct_add = vp8_idct_add_c;
dsp->vp8_idct_dc_add = vp8_idct_dc_add_c;
dsp->vp8_idct_dc_add4y = vp8_idct_dc_add4y_c;
dsp->vp8_idct_dc_add... | [
"av_cold void FUNC_0(VP8DSPContext *dsp)\n{",
"dsp->vp8_luma_dc_wht = vp8_luma_dc_wht_c;",
"dsp->vp8_luma_dc_wht_dc = vp8_luma_dc_wht_dc_c;",
"dsp->vp8_idct_add = vp8_idct_add_c;",
"dsp->vp8_idct_dc_add = vp8_idct_dc_add_c;",
"dsp->vp8_idct_dc_add4y = vp8_idct_dc_add4y_c;",
"dsp->vp8_idct_d... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
... |
8,432 | static void throttle_fix_bucket(LeakyBucket *bkt)
{
double min;
/* zero bucket level */
bkt->level = bkt->burst_level = 0;
/* The following is done to cope with the Linux CFQ block scheduler
* which regroup reads and writes by block of 100ms in the guest.
* When they are two process... | true | qemu | 0770a7a6466cc2dbf4ac91841173ad4488e1fbc7 | static void throttle_fix_bucket(LeakyBucket *bkt)
{
double min;
bkt->level = bkt->burst_level = 0;
min = bkt->avg / 10;
if (bkt->avg && !bkt->max) {
bkt->max = min;
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(LeakyBucket *VAR_0)
{
double VAR_1;
VAR_0->level = VAR_0->burst_level = 0;
VAR_1 = VAR_0->avg / 10;
if (VAR_0->avg && !VAR_0->max) {
VAR_0->max = VAR_1;
}
}
| [
"static void FUNC_0(LeakyBucket *VAR_0)\n{",
"double VAR_1;",
"VAR_0->level = VAR_0->burst_level = 0;",
"VAR_1 = VAR_0->avg / 10;",
"if (VAR_0->avg && !VAR_0->max) {",
"VAR_0->max = VAR_1;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
8,433 | int net_client_init(const char *device, const char *p)
{
static const char * const fd_params[] = {
"vlan", "name", "fd", NULL
};
char buf[1024];
int vlan_id, ret;
VLANState *vlan;
char *name = NULL;
vlan_id = 0;
if (get_param_value(buf, sizeof(buf), "vlan", p)) {
... | true | qemu | cda94b27821726df74eead0701d8401c1acda6ec | int net_client_init(const char *device, const char *p)
{
static const char * const fd_params[] = {
"vlan", "name", "fd", NULL
};
char buf[1024];
int vlan_id, ret;
VLANState *vlan;
char *name = NULL;
vlan_id = 0;
if (get_param_value(buf, sizeof(buf), "vlan", p)) {
... | {
"code": [
" fprintf(stderr, \"qemu: invalid parameter in '%s'\\n\", p);",
" fprintf(stderr, \"qemu: invalid parameter in '%s'\\n\", p);",
" fprintf(stderr, \"qemu: invalid parameter in '%s'\\n\", p);",
" fprintf(stderr, \"qemu: invalid parameter in '%s... | int FUNC_0(const char *VAR_0, const char *VAR_1)
{
static const char * const VAR_2[] = {
"vlan", "VAR_6", "VAR_14", NULL
};
char VAR_3[1024];
int VAR_4, VAR_5;
VLANState *vlan;
char *VAR_6 = NULL;
VAR_4 = 0;
if (get_param_value(VAR_3, sizeof(VAR_3), "vlan", VAR_1)) {
... | [
"int FUNC_0(const char *VAR_0, const char *VAR_1)\n{",
"static const char * const VAR_2[] = {",
"\"vlan\", \"VAR_6\", \"VAR_14\", NULL\n};",
"char VAR_3[1024];",
"int VAR_4, VAR_5;",
"VLANState *vlan;",
"char *VAR_6 = NULL;",
"VAR_4 = 0;",
"if (get_param_value(VAR_3, sizeof(VAR_3), \"vlan\", VAR_1))... | [
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,
0,
0... | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
... |
8,434 | int MPA_encode_init(AVCodecContext *avctx)
{
MpegAudioContext *s = avctx->priv_data;
int freq = avctx->sample_rate;
int bitrate = avctx->bit_rate;
int channels = avctx->channels;
int i, v, table;
float a;
if (channels > 2)
return -1;
bitrate = bitrate / 1000;
s->... | true | FFmpeg | afa982fdae1b49a8aee00a27da876bba10ba1073 | int MPA_encode_init(AVCodecContext *avctx)
{
MpegAudioContext *s = avctx->priv_data;
int freq = avctx->sample_rate;
int bitrate = avctx->bit_rate;
int channels = avctx->channels;
int i, v, table;
float a;
if (channels > 2)
return -1;
bitrate = bitrate / 1000;
s->... | {
"code": [
" v = (mpa_enwindow[i] + 2) >> 2;"
],
"line_no": [
135
]
} | int FUNC_0(AVCodecContext *VAR_0)
{
MpegAudioContext *s = VAR_0->priv_data;
int VAR_1 = VAR_0->sample_rate;
int VAR_2 = VAR_0->bit_rate;
int VAR_3 = VAR_0->VAR_3;
int VAR_4, VAR_8, VAR_6;
float VAR_7;
if (VAR_3 > 2)
return -1;
VAR_2 = VAR_2 / 1000;
s->nb_channels... | [
"int FUNC_0(AVCodecContext *VAR_0)\n{",
"MpegAudioContext *s = VAR_0->priv_data;",
"int VAR_1 = VAR_0->sample_rate;",
"int VAR_2 = VAR_0->bit_rate;",
"int VAR_3 = VAR_0->VAR_3;",
"int VAR_4, VAR_8, VAR_6;",
"float VAR_7;",
"if (VAR_3 > 2)\nreturn -1;",
"VAR_2 = VAR_2 / 1000;",
"s->nb_channels = VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
... |
8,436 | static void rv40_v_strong_loop_filter(uint8_t *src, const int stride,
const int alpha, const int lims,
const int dmode, const int chroma)
{
rv40_strong_loop_filter(src, 1, stride, alpha, lims, dmode, chroma);
}
| true | FFmpeg | 3ab9a2a5577d445252724af4067d2a7c8a378efa | static void rv40_v_strong_loop_filter(uint8_t *src, const int stride,
const int alpha, const int lims,
const int dmode, const int chroma)
{
rv40_strong_loop_filter(src, 1, stride, alpha, lims, dmode, chroma);
}
| {
"code": [
"static void rv40_v_strong_loop_filter(uint8_t *src, const int stride,"
],
"line_no": [
1
]
} | static void FUNC_0(uint8_t *VAR_0, const int VAR_1,
const int VAR_2, const int VAR_3,
const int VAR_4, const int VAR_5)
{
rv40_strong_loop_filter(VAR_0, 1, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);
}
| [
"static void FUNC_0(uint8_t *VAR_0, const int VAR_1,\nconst int VAR_2, const int VAR_3,\nconst int VAR_4, const int VAR_5)\n{",
"rv40_strong_loop_filter(VAR_0, 1, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);",
"}"
] | [
1,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
]
] |
8,437 | static int mode_sense_page(SCSIRequest *req, int page, uint8_t *p)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev);
BlockDriverState *bdrv = s->bs;
int cylinders, heads, secs;
switch (page) {
case 4: /* Rigid disk device geometry page. */
p[0] = 4;
p[1] = 0x16... | true | qemu | 282ab04eb1e6f4faa6c5d2827e3209c4a1eec40e | static int mode_sense_page(SCSIRequest *req, int page, uint8_t *p)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev);
BlockDriverState *bdrv = s->bs;
int cylinders, heads, secs;
switch (page) {
case 4:
p[0] = 4;
p[1] = 0x16;
bdrv_get_geometry... | {
"code": [
"static int mode_sense_page(SCSIRequest *req, int page, uint8_t *p)",
" return 0x16;",
" return 0x1e;",
" return 20;",
" return 22;"
],
"line_no": [
1,
69,
141,
157,
217
]
} | static int FUNC_0(SCSIRequest *VAR_0, int VAR_1, uint8_t *VAR_2)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->dev);
BlockDriverState *bdrv = s->bs;
int VAR_3, VAR_4, VAR_5;
switch (VAR_1) {
case 4:
VAR_2[0] = 4;
VAR_2[1] = 0x16;
bdrv_get_ge... | [
"static int FUNC_0(SCSIRequest *VAR_0, int VAR_1, uint8_t *VAR_2)\n{",
"SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->dev);",
"BlockDriverState *bdrv = s->bs;",
"int VAR_3, VAR_4, VAR_5;",
"switch (VAR_1) {",
"case 4:\nVAR_2[0] = 4;",
"VAR_2[1] = 0x16;",
"bdrv_get_geometry_hint(bdrv, &VAR_3... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
51
],
[... |
8,438 | static av_cold int init(AVFilterContext *ctx)
{
SendCmdContext *sendcmd = ctx->priv;
int ret, i, j;
if (sendcmd->commands_filename && sendcmd->commands_str) {
av_log(ctx, AV_LOG_ERROR,
"Only one of the filename or commands options must be specified\n");
return AVERROR... | true | FFmpeg | 83ee820a1678937ab8343f2766e9662ef9fd420f | static av_cold int init(AVFilterContext *ctx)
{
SendCmdContext *sendcmd = ctx->priv;
int ret, i, j;
if (sendcmd->commands_filename && sendcmd->commands_str) {
av_log(ctx, AV_LOG_ERROR,
"Only one of the filename or commands options must be specified\n");
return AVERROR... | {
"code": [
" if (sendcmd->commands_filename && sendcmd->commands_str) {",
" \"Only one of the filename or commands options must be specified\\n\");",
" av_log(ctx, AV_LOG_ERROR, \"No commands\\n\");"
],
"line_no": [
11,
15,
73
]
} | static av_cold int FUNC_0(AVFilterContext *ctx)
{
SendCmdContext *sendcmd = ctx->priv;
int VAR_0, VAR_1, VAR_2;
if (sendcmd->commands_filename && sendcmd->commands_str) {
av_log(ctx, AV_LOG_ERROR,
"Only one of the filename or commands options must be specified\n");
re... | [
"static av_cold int FUNC_0(AVFilterContext *ctx)\n{",
"SendCmdContext *sendcmd = ctx->priv;",
"int VAR_0, VAR_1, VAR_2;",
"if (sendcmd->commands_filename && sendcmd->commands_str) {",
"av_log(ctx, AV_LOG_ERROR,\n\"Only one of the filename or commands options must be specified\\n\");",
"return AVERROR(EINV... | [
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33,
35
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
... |
8,439 | int scsi_build_sense(uint8_t *in_buf, int in_len,
uint8_t *buf, int len, bool fixed)
{
bool fixed_in;
SCSISense sense;
if (!fixed && len < 8) {
return 0;
}
if (in_len == 0) {
sense.key = NO_SENSE;
sense.asc = 0;
sense.ascq = 0;
}... | true | qemu | 846424350b292f16b732b573273a5c1f195cd7a3 | int scsi_build_sense(uint8_t *in_buf, int in_len,
uint8_t *buf, int len, bool fixed)
{
bool fixed_in;
SCSISense sense;
if (!fixed && len < 8) {
return 0;
}
if (in_len == 0) {
sense.key = NO_SENSE;
sense.asc = 0;
sense.ascq = 0;
}... | {
"code": [
" return MIN(len, 18);"
],
"line_no": [
81
]
} | int FUNC_0(uint8_t *VAR_0, int VAR_1,
uint8_t *VAR_2, int VAR_3, bool VAR_4)
{
bool fixed_in;
SCSISense sense;
if (!VAR_4 && VAR_3 < 8) {
return 0;
}
if (VAR_1 == 0) {
sense.key = NO_SENSE;
sense.asc = 0;
sense.ascq = 0;
} else {... | [
"int FUNC_0(uint8_t *VAR_0, int VAR_1,\nuint8_t *VAR_2, int VAR_3, bool VAR_4)\n{",
"bool fixed_in;",
"SCSISense sense;",
"if (!VAR_4 && VAR_3 < 8) {",
"return 0;",
"}",
"if (VAR_1 == 0) {",
"sense.key = NO_SENSE;",
"sense.asc = 0;",
"sense.ascq = 0;",
"} else {",
"fixed_in = (VAR_0[0] & 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,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[... |
8,441 | static void move_audio(vorbis_enc_context *venc, float *audio, int *samples, int sf_size)
{
AVFrame *cur = NULL;
int frame_size = 1 << (venc->log2_blocksize[1] - 1);
int subframes = frame_size / sf_size;
for (int sf = 0; sf < subframes; sf++) {
cur = ff_bufqueue_get(&venc->bufqueue);
... | false | FFmpeg | 5a2ad7ede33b5d63c1f1b1313a218da62e1c0d48 | static void move_audio(vorbis_enc_context *venc, float *audio, int *samples, int sf_size)
{
AVFrame *cur = NULL;
int frame_size = 1 << (venc->log2_blocksize[1] - 1);
int subframes = frame_size / sf_size;
for (int sf = 0; sf < subframes; sf++) {
cur = ff_bufqueue_get(&venc->bufqueue);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(vorbis_enc_context *VAR_0, float *VAR_1, int *VAR_2, int VAR_3)
{
AVFrame *cur = NULL;
int VAR_4 = 1 << (VAR_0->log2_blocksize[1] - 1);
int VAR_5 = VAR_4 / VAR_3;
for (int VAR_6 = 0; VAR_6 < VAR_5; VAR_6++) {
cur = ff_bufqueue_get(&VAR_0->bufqueue);
*VAR_2 += ... | [
"static void FUNC_0(vorbis_enc_context *VAR_0, float *VAR_1, int *VAR_2, int VAR_3)\n{",
"AVFrame *cur = NULL;",
"int VAR_4 = 1 << (VAR_0->log2_blocksize[1] - 1);",
"int VAR_5 = VAR_4 / VAR_3;",
"for (int VAR_6 = 0; VAR_6 < VAR_5; VAR_6++) {",
"cur = ff_bufqueue_get(&VAR_0->bufqueue);",
"*VAR_2 += cur->... | [
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
]
] |
8,442 | static int push_single_pic(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
AVFilterLink *inlink = ctx->inputs[0];
ShowWavesContext *showwaves = ctx->priv;
int64_t n = 0, max_samples = showwaves->total_samples / outlink->w;
AVFrame *out = showwaves->outpicref;
struct frame_node *nod... | true | FFmpeg | a212a983c7f4faf06e600f32a165592dc5b6ae76 | static int push_single_pic(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
AVFilterLink *inlink = ctx->inputs[0];
ShowWavesContext *showwaves = ctx->priv;
int64_t n = 0, max_samples = showwaves->total_samples / outlink->w;
AVFrame *out = showwaves->outpicref;
struct frame_node *nod... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFilterLink *VAR_0)
{
AVFilterContext *ctx = VAR_0->src;
AVFilterLink *inlink = ctx->inputs[0];
ShowWavesContext *showwaves = ctx->priv;
int64_t n = 0, max_samples = showwaves->total_samples / VAR_0->w;
AVFrame *out = showwaves->outpicref;
struct frame_node *VAR_1;
const i... | [
"static int FUNC_0(AVFilterLink *VAR_0)\n{",
"AVFilterContext *ctx = VAR_0->src;",
"AVFilterLink *inlink = ctx->inputs[0];",
"ShowWavesContext *showwaves = ctx->priv;",
"int64_t n = 0, max_samples = showwaves->total_samples / VAR_0->w;",
"AVFrame *out = showwaves->outpicref;",
"struct frame_node *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
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],... |
8,443 | static void host_signal_handler(int host_signum, siginfo_t *info,
void *puc)
{
int sig;
target_siginfo_t tinfo;
/* the CPU emulator uses some host signals to detect exceptions,
we we forward to it some signals */
if (host_signum == SIGSEGV || host_signum ... | true | qemu | 773b93ee0684a9b9d1f0029a936a251411289027 | static void host_signal_handler(int host_signum, siginfo_t *info,
void *puc)
{
int sig;
target_siginfo_t tinfo;
if (host_signum == SIGSEGV || host_signum == SIGBUS) {
if (cpu_signal_handler(host_signum, info, puc))
return;
}
... | {
"code": [
"#if defined(DEBUG_SIGNAL)",
"#endif",
"#endif",
" dump_regs(puc);"
],
"line_no": [
35,
41,
41,
39
]
} | static void FUNC_0(int VAR_0, siginfo_t *VAR_1,
void *VAR_2)
{
int VAR_3;
target_siginfo_t tinfo;
if (VAR_0 == SIGSEGV || VAR_0 == SIGBUS) {
if (cpu_signal_handler(VAR_0, VAR_1, VAR_2))
return;
}
VAR_3 = host_to_target_s... | [
"static void FUNC_0(int VAR_0, siginfo_t *VAR_1,\nvoid *VAR_2)\n{",
"int VAR_3;",
"target_siginfo_t tinfo;",
"if (VAR_0 == SIGSEGV || VAR_0 == SIGBUS) {",
"if (cpu_signal_handler(VAR_0, VAR_1, VAR_2))\nreturn;",
"}",
"VAR_3 = host_to_target_signal(VAR_0);",
"if (VAR_3 < 1 || VAR_3 > TARGET_NSIG)\nretu... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
17
],
[
19,
21
],
[
23
],
[
29
],
[
31,
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
49
],
[
51
],
[
53
]
] |
8,444 | int ff_j2k_dwt_init(DWTContext *s, uint16_t border[2][2], int decomp_levels, int type)
{
int i, j, lev = decomp_levels, maxlen,
b[2][2];
if (decomp_levels >= FF_DWT_MAX_DECLVLS)
return AVERROR_INVALIDDATA;
s->ndeclevels = decomp_levels;
s->type = type;
for (i = 0; i < 2; ... | true | FFmpeg | 1f99939a6361e2e6d6788494dd7c682b051c6c34 | int ff_j2k_dwt_init(DWTContext *s, uint16_t border[2][2], int decomp_levels, int type)
{
int i, j, lev = decomp_levels, maxlen,
b[2][2];
if (decomp_levels >= FF_DWT_MAX_DECLVLS)
return AVERROR_INVALIDDATA;
s->ndeclevels = decomp_levels;
s->type = type;
for (i = 0; i < 2; ... | {
"code": [
" if (decomp_levels >= FF_DWT_MAX_DECLVLS)"
],
"line_no": [
11
]
} | int FUNC_0(DWTContext *VAR_0, uint16_t VAR_1[2][2], int VAR_2, int VAR_3)
{
int VAR_4, VAR_5, VAR_6 = VAR_2, VAR_7,
VAR_8[2][2];
if (VAR_2 >= FF_DWT_MAX_DECLVLS)
return AVERROR_INVALIDDATA;
VAR_0->ndeclevels = VAR_2;
VAR_0->VAR_3 = VAR_3;
for (VAR_4 = 0; VAR_4 < 2; VAR_4+... | [
"int FUNC_0(DWTContext *VAR_0, uint16_t VAR_1[2][2], int VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6 = VAR_2, VAR_7,\nVAR_8[2][2];",
"if (VAR_2 >= FF_DWT_MAX_DECLVLS)\nreturn AVERROR_INVALIDDATA;",
"VAR_0->ndeclevels = VAR_2;",
"VAR_0->VAR_3 = VAR_3;",
"for (VAR_4 = 0; VAR_4 < 2; VAR_4++)",
"for(VAR... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
11,
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51,
53... |
8,445 | static int read_block_types(AVCodecContext *avctx, GetBitContext *gb, Bundle *b)
{
int t, v;
int last = 0;
const uint8_t *dec_end;
CHECK_READ_VAL(gb, b, t);
dec_end = b->cur_dec + t;
if (dec_end > b->data_end) {
av_log(avctx, AV_LOG_ERROR, "Too many block type values\n");
... | true | FFmpeg | a00676e48e49a3d794d6d2063ceca539e945a4a4 | static int read_block_types(AVCodecContext *avctx, GetBitContext *gb, Bundle *b)
{
int t, v;
int last = 0;
const uint8_t *dec_end;
CHECK_READ_VAL(gb, b, t);
dec_end = b->cur_dec + t;
if (dec_end > b->data_end) {
av_log(avctx, AV_LOG_ERROR, "Too many block type values\n");
... | {
"code": [
" do {",
" } while (b->cur_dec < dec_end);",
" do {",
" } while (b->cur_dec < dec_end);"
],
"line_no": [
35,
57,
35,
57
]
} | static int FUNC_0(AVCodecContext *VAR_0, GetBitContext *VAR_1, Bundle *VAR_2)
{
int VAR_3, VAR_4;
int VAR_5 = 0;
const uint8_t *VAR_6;
CHECK_READ_VAL(VAR_1, VAR_2, VAR_3);
VAR_6 = VAR_2->cur_dec + VAR_3;
if (VAR_6 > VAR_2->data_end) {
av_log(VAR_0, AV_LOG_ERROR, "Too many block... | [
"static int FUNC_0(AVCodecContext *VAR_0, GetBitContext *VAR_1, Bundle *VAR_2)\n{",
"int VAR_3, VAR_4;",
"int VAR_5 = 0;",
"const uint8_t *VAR_6;",
"CHECK_READ_VAL(VAR_1, VAR_2, VAR_3);",
"VAR_6 = VAR_2->cur_dec + VAR_3;",
"if (VAR_6 > VAR_2->data_end) {",
"av_log(VAR_0, AV_LOG_ERROR, \"Too many block... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
8,446 | static int y41p_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt)
{
AVFrame *pic = data;
uint8_t *src = avpkt->data;
uint8_t *y, *u, *v;
int i, j, ret;
if (avpkt->size < 3LL * avctx->height * avctx->width / 2) {
av_log(avc... | true | FFmpeg | 3d8d3729475c7dce52d8fb9ffb280fd2ea62e1a2 | static int y41p_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt)
{
AVFrame *pic = data;
uint8_t *src = avpkt->data;
uint8_t *y, *u, *v;
int i, j, ret;
if (avpkt->size < 3LL * avctx->height * avctx->width / 2) {
av_log(avc... | {
"code": [
" if (avpkt->size < 3LL * avctx->height * avctx->width / 2) {"
],
"line_no": [
17
]
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
AVFrame *pic = VAR_1;
uint8_t *src = VAR_3->VAR_1;
uint8_t *y, *u, *v;
int VAR_4, VAR_5, VAR_6;
if (VAR_3->size < 3LL * VAR_0->height * VAR_0->width / 2) {
av_log(VAR_0... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"AVFrame *pic = VAR_1;",
"uint8_t *src = VAR_3->VAR_1;",
"uint8_t *y, *u, *v;",
"int VAR_4, VAR_5, VAR_6;",
"if (VAR_3->size < 3LL * VAR_0->height * VAR_0->width / 2) {",
"av_log(VAR_0, AV_LOG_ERROR, \"Insufficient... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
8,448 | static void gen_msgsnd(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
#else
if (unlikely(ctx->pr)) {
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
return;
}
gen_helper_msgsnd(cpu_gpr[rB(ctx->opcode)]);
#endif
}
| true | qemu | 9b2fadda3e0196ffd485adde4fe9cdd6fae35300 | static void gen_msgsnd(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
#else
if (unlikely(ctx->pr)) {
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
return;
}
gen_helper_msgsnd(cpu_gpr[rB(ctx->opcode)]);
#endif
}
| {
"code": [
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" if (unlikely(ctx->pr)) {",
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" if (unlikely(... | static void FUNC_0(DisasContext *VAR_0)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);
#else
if (unlikely(VAR_0->pr)) {
gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);
return;
}
gen_helper_msgsnd(cpu_gpr[rB(VAR_0->opcode)]);
#endif
}
| [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"#if defined(CONFIG_USER_ONLY)\ngen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);",
"#else\nif (unlikely(VAR_0->pr)) {",
"gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);",
"return;",
"}",
"gen_helper_msgsnd(cpu_gpr[rB(VAR_0->opcode)]);",
"#endif\n}"
] | [
0,
1,
1,
1,
0,
0,
0,
1
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25
]
] |
8,450 | int ff_MPV_common_frame_size_change(MpegEncContext *s)
{
int i, err = 0;
if (s->slice_context_count > 1) {
for (i = 0; i < s->slice_context_count; i++) {
free_duplicate_context(s->thread_context[i]);
}
for (i = 1; i < s->slice_context_count; i++) {
av_fr... | true | FFmpeg | 712ef25116b4db6dcb84bef6e1517028bc103858 | int ff_MPV_common_frame_size_change(MpegEncContext *s)
{
int i, err = 0;
if (s->slice_context_count > 1) {
for (i = 0; i < s->slice_context_count; i++) {
free_duplicate_context(s->thread_context[i]);
}
for (i = 1; i < s->slice_context_count; i++) {
av_fr... | {
"code": [
" if (init_duplicate_context(s) < 0)"
],
"line_no": [
117
]
} | int FUNC_0(MpegEncContext *VAR_0)
{
int VAR_1, VAR_2 = 0;
if (VAR_0->slice_context_count > 1) {
for (VAR_1 = 0; VAR_1 < VAR_0->slice_context_count; VAR_1++) {
free_duplicate_context(VAR_0->thread_context[VAR_1]);
}
for (VAR_1 = 1; VAR_1 < VAR_0->slice_context_count; ... | [
"int FUNC_0(MpegEncContext *VAR_0)\n{",
"int VAR_1, VAR_2 = 0;",
"if (VAR_0->slice_context_count > 1) {",
"for (VAR_1 = 0; VAR_1 < VAR_0->slice_context_count; VAR_1++) {",
"free_duplicate_context(VAR_0->thread_context[VAR_1]);",
"}",
"for (VAR_1 = 1; VAR_1 < VAR_0->slice_context_count; VAR_1++) {",
"a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
35,
37
],
[
39
],
[
41
],
[
45,
47,
49
],
[
55,
57
],
... |
8,452 | static void pc_isa_bios_init(MemoryRegion *rom_memory,
MemoryRegion *flash_mem,
int ram_size)
{
int isa_bios_size;
MemoryRegion *isa_bios;
uint64_t flash_size;
void *flash_ptr, *isa_bios_ptr;
flash_size = memory_region_size(flash_me... | true | qemu | 7f87af39dc786a979e7ebba338d0781e366060ed | static void pc_isa_bios_init(MemoryRegion *rom_memory,
MemoryRegion *flash_mem,
int ram_size)
{
int isa_bios_size;
MemoryRegion *isa_bios;
uint64_t flash_size;
void *flash_ptr, *isa_bios_ptr;
flash_size = memory_region_size(flash_me... | {
"code": [
" isa_bios_size = flash_size;",
" if (isa_bios_size > (128 * 1024)) {",
" isa_bios_size = 128 * 1024;"
],
"line_no": [
25,
27,
29
]
} | static void FUNC_0(MemoryRegion *VAR_0,
MemoryRegion *VAR_1,
int VAR_2)
{
int VAR_3;
MemoryRegion *isa_bios;
uint64_t flash_size;
void *VAR_4, *VAR_5;
flash_size = memory_region_size(VAR_1);
VAR_3 = flash_size;
if ... | [
"static void FUNC_0(MemoryRegion *VAR_0,\nMemoryRegion *VAR_1,\nint VAR_2)\n{",
"int VAR_3;",
"MemoryRegion *isa_bios;",
"uint64_t flash_size;",
"void *VAR_4, *VAR_5;",
"flash_size = memory_region_size(VAR_1);",
"VAR_3 = flash_size;",
"if (VAR_3 > (128 * 1024)) {",
"VAR_3 = 128 * 1024;",
"}",
"i... | [
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41,
43,
45
],
[
51
],
[
53
],
[
55,
57,... |
8,453 | static void gen_tlbivax_booke206(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
#else
TCGv t0;
if (unlikely(ctx->pr)) {
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
return;
}
t0 = tcg_temp_new();
gen_addr_reg_i... | true | qemu | 9b2fadda3e0196ffd485adde4fe9cdd6fae35300 | static void gen_tlbivax_booke206(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
#else
TCGv t0;
if (unlikely(ctx->pr)) {
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
return;
}
t0 = tcg_temp_new();
gen_addr_reg_i... | {
"code": [
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" if (unlikely(ctx->pr)) {",
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" if (unlikely(... | static void FUNC_0(DisasContext *VAR_0)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);
#else
TCGv t0;
if (unlikely(VAR_0->pr)) {
gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);
return;
}
t0 = tcg_temp_new();
gen_addr_reg_index(V... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"#if defined(CONFIG_USER_ONLY)\ngen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);",
"#else\nTCGv t0;",
"if (unlikely(VAR_0->pr)) {",
"gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);",
"return;",
"}",
"t0 = tcg_temp_new();",
"gen_addr_reg_index(VAR_0,... | [
0,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
1
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33,
35
]
] |
8,454 | void helper_ldf_asi(target_ulong addr, int asi, int size, int rd)
{
unsigned int i;
target_ulong val;
helper_check_align(addr, 3);
addr = asi_address_mask(env, asi, addr);
switch (asi) {
case 0xf0: // Block load primary
case 0xf1: // Block load secondary
case 0xf8: // Block load primary ... | true | qemu | 0e2fa9cab9c124788077de728f1e6744d1dd8bb2 | void helper_ldf_asi(target_ulong addr, int asi, int size, int rd)
{
unsigned int i;
target_ulong val;
helper_check_align(addr, 3);
addr = asi_address_mask(env, asi, addr);
switch (asi) {
case 0xf0:
case 0xf1:
case 0xf8: LE
case 0xf9: LE
*(uint32_t *)&env->fpr[rd++] = ... | {
"code": [],
"line_no": []
} | void FUNC_0(target_ulong VAR_0, int VAR_1, int VAR_2, int VAR_3)
{
unsigned int VAR_4;
target_ulong val;
helper_check_align(VAR_0, 3);
VAR_0 = asi_address_mask(env, VAR_1, VAR_0);
switch (VAR_1) {
case 0xf0:
case 0xf1:
case 0xf8: LE
case 0xf9: LE
*(uint32_t *)&env->fp... | [
"void FUNC_0(target_ulong VAR_0, int VAR_1, int VAR_2, int VAR_3)\n{",
"unsigned int VAR_4;",
"target_ulong val;",
"helper_check_align(VAR_0, 3);",
"VAR_0 = asi_address_mask(env, VAR_1, VAR_0);",
"switch (VAR_1) {",
"case 0xf0:\ncase 0xf1:\ncase 0xf8: LE\ncase 0xf9: LE\n*(uint32_t *)&env->fpr[VAR_3++]... | [
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,
26
]
] |
8,455 | static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss,
int se, int Ah, int Al)
{
int mb_x, mb_y;
int EOBRUN = 0;
int c = s->comp_index[0];
uint8_t *data = s->picture_ptr->data[c];
int linesize = s->linesize[c];
int last_sca... | true | FFmpeg | e31727bd53fc69ace0373deabf48360ac6af94ec | static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss,
int se, int Ah, int Al)
{
int mb_x, mb_y;
int EOBRUN = 0;
int c = s->comp_index[0];
uint8_t *data = s->picture_ptr->data[c];
int linesize = s->linesize[c];
int last_sca... | {
"code": [
" s->coefs_finished[c] |= (2LL << se) - (1LL << ss);"
],
"line_no": [
39
]
} | static int FUNC_0(MJpegDecodeContext *VAR_0, int VAR_1,
int VAR_2, int VAR_3, int VAR_4)
{
int VAR_5, VAR_6;
int VAR_7 = 0;
int VAR_8 = VAR_0->comp_index[0];
uint8_t *data = VAR_0->picture_ptr->data[VAR_8];
int VAR_9 = VAR_0->VAR_9[VAR_8];
int... | [
"static int FUNC_0(MJpegDecodeContext *VAR_0, int VAR_1,\nint VAR_2, int VAR_3, int VAR_4)\n{",
"int VAR_5, VAR_6;",
"int VAR_7 = 0;",
"int VAR_8 = VAR_0->comp_index[0];",
"uint8_t *data = VAR_0->picture_ptr->data[VAR_8];",
"int VAR_9 = VAR_0->VAR_9[VAR_8];",
"int VAR_10 = 0;",
"int16_t *quant_matrix... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47,
49
... |
8,458 | struct omap_dss_s *omap_dss_init(struct omap_target_agent_s *ta,
MemoryRegion *sysmem,
hwaddr l3_base,
qemu_irq irq, qemu_irq drq,
omap_clk fck1, omap_clk fck2, omap_clk ck54m,
omap_clk ick1, omap_clk ick2)
{
struct omap_dss_s *s... | true | qemu | b45c03f585ea9bb1af76c73e82195418c294919d | struct omap_dss_s *omap_dss_init(struct omap_target_agent_s *ta,
MemoryRegion *sysmem,
hwaddr l3_base,
qemu_irq irq, qemu_irq drq,
omap_clk fck1, omap_clk fck2, omap_clk ck54m,
omap_clk ick1, omap_clk ick2)
{
struct omap_dss_s *s... | {
"code": [
" struct omap_dss_s *s = (struct omap_dss_s *)",
" g_malloc0(sizeof(struct omap_dss_s));"
],
"line_no": [
15,
17
]
} | struct omap_dss_s *FUNC_0(struct omap_target_agent_s *VAR_0,
MemoryRegion *VAR_1,
hwaddr VAR_2,
qemu_irq VAR_3, qemu_irq VAR_4,
omap_clk VAR_5, omap_clk VAR_6, omap_clk VAR_7,
omap_clk VAR_8, omap_clk VAR_9)
{
struct omap_dss_s *... | [
"struct omap_dss_s *FUNC_0(struct omap_target_agent_s *VAR_0,\nMemoryRegion *VAR_1,\nhwaddr VAR_2,\nqemu_irq VAR_3, qemu_irq VAR_4,\nomap_clk VAR_5, omap_clk VAR_6, omap_clk VAR_7,\nomap_clk VAR_8, omap_clk VAR_9)\n{",
"struct omap_dss_s *VAR_10 = (struct omap_dss_s *)\ng_malloc0(sizeof(struct omap_dss_s));",
"... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
33,
35
],
[
37,
39
],
[
41,
43
],
[
45,
47
],
[
51
],
[
53
],
[
55
],
[
57
],
[... |
8,459 | int attribute_align_arg sws_scale(struct SwsContext *c,
const uint8_t * const srcSlice[],
const int srcStride[], int srcSliceY,
int srcSliceH, uint8_t *const dst[],
const int dstStride... | true | FFmpeg | 321e85e1769ca1fc1567025ae264760790ee7fc9 | int attribute_align_arg sws_scale(struct SwsContext *c,
const uint8_t * const srcSlice[],
const int srcStride[], int srcSliceY,
int srcSliceH, uint8_t *const dst[],
const int dstStride... | {
"code": [],
"line_no": []
} | int VAR_0 sws_scale(struct SwsContext *c,
const uint8_t * const srcSlice[],
const int srcStride[], int srcSliceY,
int srcSliceH, uint8_t *const dst[],
const int dstStride[])
{
int ... | [
"int VAR_0 sws_scale(struct SwsContext *c,\nconst uint8_t * const srcSlice[],\nconst int srcStride[], int srcSliceY,\nint srcSliceH, uint8_t *const dst[],\nconst int dstStride[])\n{",
"int i, ret;",
"const uint8_t *src2[4];",
"uint8_t *dst2[4];",
"uint8_t *rgb0_tmp = NULL;",
"if (!srcStride || !dstStride ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
2,
3,
4,
5,
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15,
16,
17
],
[
18,
19
],
[
20,
21
],
[
22,
23
],
[
24,
25
],
[
26
],... |
8,461 | static int select_voice(cst_voice **voice, const char *voice_name, void *log_ctx)
{
int i;
for (i = 0; i < FF_ARRAY_ELEMS(voice_entries); i++) {
struct voice_entry *entry = &voice_entries[i];
if (!strcmp(entry->name, voice_name)) {
*voice = entry->register_fn(NULL);
... | true | FFmpeg | 4ce87ecf2a8a8a9348f9bdbb420f3bee92e6513f | static int select_voice(cst_voice **voice, const char *voice_name, void *log_ctx)
{
int i;
for (i = 0; i < FF_ARRAY_ELEMS(voice_entries); i++) {
struct voice_entry *entry = &voice_entries[i];
if (!strcmp(entry->name, voice_name)) {
*voice = entry->register_fn(NULL);
... | {
"code": [
"static int select_voice(cst_voice **voice, const char *voice_name, void *log_ctx)",
" *voice = entry->register_fn(NULL);",
" if (!*voice) {"
],
"line_no": [
1,
15,
17
]
} | static int FUNC_0(cst_voice **VAR_0, const char *VAR_1, void *VAR_2)
{
int VAR_3;
for (VAR_3 = 0; VAR_3 < FF_ARRAY_ELEMS(voice_entries); VAR_3++) {
struct voice_entry *entry = &voice_entries[VAR_3];
if (!strcmp(entry->name, VAR_1)) {
*VAR_0 = entry->register_fn(NULL);
... | [
"static int FUNC_0(cst_voice **VAR_0, const char *VAR_1, void *VAR_2)\n{",
"int VAR_3;",
"for (VAR_3 = 0; VAR_3 < FF_ARRAY_ELEMS(voice_entries); VAR_3++) {",
"struct voice_entry *entry = &voice_entries[VAR_3];",
"if (!strcmp(entry->name, VAR_1)) {",
"*VAR_0 = entry->register_fn(NULL);",
"if (!*VAR_0) {"... | [
1,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
]
] |
8,462 | int bdrv_open(BlockDriverState *bs, const char *filename, QDict *options,
int flags, BlockDriver *drv)
{
int ret;
/* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */
char tmp_filename[PATH_MAX + 1];
BlockDriverState *file = NULL;
QDict *file_options = NULL;
... | true | qemu | 31ca6d077c24b7aaa322d8930e3e5debbdb4a047 | int bdrv_open(BlockDriverState *bs, const char *filename, QDict *options,
int flags, BlockDriver *drv)
{
int ret;
char tmp_filename[PATH_MAX + 1];
BlockDriverState *file = NULL;
QDict *file_options = NULL;
if (options == NULL) {
options = qdict_new();
... | {
"code": [
" ret = bdrv_open_backing_file(bs);"
],
"line_no": [
237
]
} | int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1, QDict *VAR_2,
int VAR_3, BlockDriver *VAR_4)
{
int VAR_5;
char VAR_6[PATH_MAX + 1];
BlockDriverState *file = NULL;
QDict *file_options = NULL;
if (VAR_2 == NULL) {
VAR_2 = qdict_new();
}
VA... | [
"int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1, QDict *VAR_2,\nint VAR_3, BlockDriver *VAR_4)\n{",
"int VAR_5;",
"char VAR_6[PATH_MAX + 1];",
"BlockDriverState *file = NULL;",
"QDict *file_options = NULL;",
"if (VAR_2 == NULL) {",
"VAR_2 = qdict_new();",
"}",
"VAR_0->VAR_2 = VAR_2;",
"VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
],
... |
8,463 | int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile,
int level)
{
VDPAUHWContext *hwctx = avctx->hwaccel_context;
VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data;
VdpVideoSurfaceQueryCapabilities *surface_query_caps;
VdpDecoderQueryCapabilities *de... | true | FFmpeg | 64ecb78b7179cab2dbdf835463104679dbb7c895 | int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile,
int level)
{
VDPAUHWContext *hwctx = avctx->hwaccel_context;
VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data;
VdpVideoSurfaceQueryCapabilities *surface_query_caps;
VdpDecoderQueryCapabilities *de... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0, VdpDecoderProfile VAR_1,
int VAR_2)
{
VDPAUHWContext *hwctx = VAR_0->hwaccel_context;
VDPAUContext *vdctx = VAR_0->internal->hwaccel_priv_data;
VdpVideoSurfaceQueryCapabilities *surface_query_caps;
VdpDecoderQueryCapabilities *decoder_query_caps... | [
"int FUNC_0(AVCodecContext *VAR_0, VdpDecoderProfile VAR_1,\nint VAR_2)\n{",
"VDPAUHWContext *hwctx = VAR_0->hwaccel_context;",
"VDPAUContext *vdctx = VAR_0->internal->hwaccel_priv_data;",
"VdpVideoSurfaceQueryCapabilities *surface_query_caps;",
"VdpDecoderQueryCapabilities *decoder_query_caps;",
"VdpDeco... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],... |
8,464 | int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
MigrationState *s = NULL;
const char *p;
int detach = qdict_get_try_bool(qdict, "detach", 0);
int blk = qdict_get_try_bool(qdict, "blk", 0);
int inc = qdict_get_try_bool(qdict, "inc", 0);
const char *uri = qdict_get_str(qdict... | true | qemu | dc9121210eaf34e768901ffc6992dd13062c743a | int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
MigrationState *s = NULL;
const char *p;
int detach = qdict_get_try_bool(qdict, "detach", 0);
int blk = qdict_get_try_bool(qdict, "blk", 0);
int inc = qdict_get_try_bool(qdict, "inc", 0);
const char *uri = qdict_get_str(qdict... | {
"code": [
" return 0;"
],
"line_no": [
33
]
} | int FUNC_0(Monitor *VAR_0, const QDict *VAR_1, QObject **VAR_2)
{
MigrationState *s = NULL;
const char *VAR_3;
int VAR_4 = qdict_get_try_bool(VAR_1, "VAR_4", 0);
int VAR_5 = qdict_get_try_bool(VAR_1, "VAR_5", 0);
int VAR_6 = qdict_get_try_bool(VAR_1, "VAR_6", 0);
const char *VAR_7 = qdict_get_st... | [
"int FUNC_0(Monitor *VAR_0, const QDict *VAR_1, QObject **VAR_2)\n{",
"MigrationState *s = NULL;",
"const char *VAR_3;",
"int VAR_4 = qdict_get_try_bool(VAR_1, \"VAR_4\", 0);",
"int VAR_5 = qdict_get_try_bool(VAR_1, \"VAR_5\", 0);",
"int VAR_6 = qdict_get_try_bool(VAR_1, \"VAR_6\", 0);",
"const char *VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9,
10
],
[
11
],
[
12
],
[
13,
14
],
[
15,
16
],
[
17,
18
],
[
19
],
[
20,
21
],
[
22
],
[
23,
24
],... |
8,465 | static void init_custom_qm(VC2EncContext *s)
{
int level, orientation;
if (s->quant_matrix == VC2_QM_DEF) {
for (level = 0; level < s->wavelet_depth; level++) {
for (orientation = 0; orientation < 4; orientation++) {
if (level <= 3)
s->quant[level... | true | FFmpeg | b88be742fac7a77a8095e8155ba8790db4b77568 | static void init_custom_qm(VC2EncContext *s)
{
int level, orientation;
if (s->quant_matrix == VC2_QM_DEF) {
for (level = 0; level < s->wavelet_depth; level++) {
for (orientation = 0; orientation < 4; orientation++) {
if (level <= 3)
s->quant[level... | {
"code": [
" } else {",
"static void init_custom_qm(VC2EncContext *s)",
" } else {",
" for (level = 0; level < s->wavelet_depth; level++) {",
" } else {"
],
"line_no": [
39,
1,
39,
11,
39
]
} | static void FUNC_0(VC2EncContext *VAR_0)
{
int VAR_1, VAR_2;
if (VAR_0->quant_matrix == VC2_QM_DEF) {
for (VAR_1 = 0; VAR_1 < VAR_0->wavelet_depth; VAR_1++) {
for (VAR_2 = 0; VAR_2 < 4; VAR_2++) {
if (VAR_1 <= 3)
VAR_0->quant[VAR_1][VAR_2] = ff_di... | [
"static void FUNC_0(VC2EncContext *VAR_0)\n{",
"int VAR_1, VAR_2;",
"if (VAR_0->quant_matrix == VC2_QM_DEF) {",
"for (VAR_1 = 0; VAR_1 < VAR_0->wavelet_depth; VAR_1++) {",
"for (VAR_2 = 0; VAR_2 < 4; VAR_2++) {",
"if (VAR_1 <= 3)\nVAR_0->quant[VAR_1][VAR_2] = ff_dirac_default_qmat[VAR_0->wavelet_idx][VAR_... | [
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15,
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45... |
8,467 | void bareetraxfs_init (ram_addr_t ram_size,
const char *boot_device,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
DeviceState *dev;
SysBusDevice *s;
CPUState *env;
... | true | qemu | e23a1b33b53d25510320b26d9f154e19c6c99725 | void bareetraxfs_init (ram_addr_t ram_size,
const char *boot_device,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
DeviceState *dev;
SysBusDevice *s;
CPUState *env;
... | {
"code": [
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" ... | void FUNC_0 (ram_addr_t VAR_0,
const char *VAR_1,
const char *VAR_2, const char *VAR_3,
const char *VAR_4, const char *VAR_5)
{
DeviceState *dev;
SysBusDevice *s;
CPUState *env;
qemu_irq irq[30], nmi[2], *cpu_irq;
void *V... | [
"void FUNC_0 (ram_addr_t VAR_0,\nconst char *VAR_1,\nconst char *VAR_2, const char *VAR_3,\nconst char *VAR_4, const char *VAR_5)\n{",
"DeviceState *dev;",
"SysBusDevice *s;",
"CPUState *env;",
"qemu_irq irq[30], nmi[2], *cpu_irq;",
"void *VAR_6;",
"struct etraxfs_dma_client *VAR_7[2] = {NULL, NULL};",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
8,468 | envlist_to_environ(const envlist_t *envlist, size_t *count)
{
struct envlist_entry *entry;
char **env, **penv;
penv = env = malloc((envlist->el_count + 1) * sizeof (char *));
if (env == NULL)
return (NULL);
for (entry = envlist->el_entries.lh_first; entry != NULL;
entry = entry->ev_link.le_next)... | true | qemu | ec45bbe5f1921c6553fbf9c0c76b358b0403c22d | envlist_to_environ(const envlist_t *envlist, size_t *count)
{
struct envlist_entry *entry;
char **env, **penv;
penv = env = malloc((envlist->el_count + 1) * sizeof (char *));
if (env == NULL)
return (NULL);
for (entry = envlist->el_entries.lh_first; entry != NULL;
entry = entry->ev_link.le_next)... | {
"code": [
"\t\treturn (NULL);",
"\tpenv = env = malloc((envlist->el_count + 1) * sizeof (char *));",
"\tif (env == NULL)",
"\t\treturn (NULL);",
"\t\t*(penv++) = strdup(entry->ev_var);"
],
"line_no": [
15,
11,
13,
15,
23
]
} | FUNC_0(const envlist_t *VAR_0, size_t *VAR_1)
{
struct envlist_entry *VAR_2;
char **VAR_3, **VAR_4;
VAR_4 = VAR_3 = malloc((VAR_0->el_count + 1) * sizeof (char *));
if (VAR_3 == NULL)
return (NULL);
for (VAR_2 = VAR_0->el_entries.lh_first; VAR_2 != NULL;
VAR_2 = VAR_2->ev_link.le_next) {
*(VA... | [
"FUNC_0(const envlist_t *VAR_0, size_t *VAR_1)\n{",
"struct envlist_entry *VAR_2;",
"char **VAR_3, **VAR_4;",
"VAR_4 = VAR_3 = malloc((VAR_0->el_count + 1) * sizeof (char *));",
"if (VAR_3 == NULL)\nreturn (NULL);",
"for (VAR_2 = VAR_0->el_entries.lh_first; VAR_2 != NULL;",
"VAR_2 = VAR_2->ev_link.le_ne... | [
0,
0,
0,
1,
1,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
37
],
[
39
]
] |
8,470 | void monitor_flush(Monitor *mon)
{
int rc;
size_t len;
const char *buf;
if (mon->skip_flush) {
return;
}
buf = qstring_get_str(mon->outbuf);
len = qstring_get_length(mon->outbuf);
if (len && !mon->mux_out) {
rc = qemu_chr_fe_write(mon->chr, (const uint8_t... | true | qemu | 056f49ff2cf645dc484956b00b65a3aa18a1a9a3 | void monitor_flush(Monitor *mon)
{
int rc;
size_t len;
const char *buf;
if (mon->skip_flush) {
return;
}
buf = qstring_get_str(mon->outbuf);
len = qstring_get_length(mon->outbuf);
if (len && !mon->mux_out) {
rc = qemu_chr_fe_write(mon->chr, (const uint8_t... | {
"code": [
" if (rc == len) {"
],
"line_no": [
31
]
} | void FUNC_0(Monitor *VAR_0)
{
int VAR_1;
size_t len;
const char *VAR_2;
if (VAR_0->skip_flush) {
return;
}
VAR_2 = qstring_get_str(VAR_0->outbuf);
len = qstring_get_length(VAR_0->outbuf);
if (len && !VAR_0->mux_out) {
VAR_1 = qemu_chr_fe_write(VAR_0->chr,... | [
"void FUNC_0(Monitor *VAR_0)\n{",
"int VAR_1;",
"size_t len;",
"const char *VAR_2;",
"if (VAR_0->skip_flush) {",
"return;",
"}",
"VAR_2 = qstring_get_str(VAR_0->outbuf);",
"len = qstring_get_length(VAR_0->outbuf);",
"if (len && !VAR_0->mux_out) {",
"VAR_1 = qemu_chr_fe_write(VAR_0->chr, (const u... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
... |
8,471 | static ssize_t sdp_attr_get(struct bt_l2cap_sdp_state_s *sdp,
uint8_t *rsp, const uint8_t *req, ssize_t len)
{
ssize_t seqlen;
int i, start, end, max;
int32_t handle;
struct sdp_service_record_s *record;
uint8_t *lst;
/* Perform the search */
if (len < 7)
... | true | qemu | 374ec0669a1aa3affac7850a16c6cad18221c439 | static ssize_t sdp_attr_get(struct bt_l2cap_sdp_state_s *sdp,
uint8_t *rsp, const uint8_t *req, ssize_t len)
{
ssize_t seqlen;
int i, start, end, max;
int32_t handle;
struct sdp_service_record_s *record;
uint8_t *lst;
if (len < 7)
return -SDP_INVALID_SYNT... | {
"code": [
" return -SDP_INVALID_SYNTAX;",
" } else if (sdp_attr_match(record, &req, &seqlen))",
" return -SDP_INVALID_SYNTAX;",
" return -SDP_INVALID_SYNTAX;",
" return -SDP_INVALID_SYNTAX;"
],
"line_no": [
23,
77,
23,
23,
23
]
} | static ssize_t FUNC_0(struct bt_l2cap_sdp_state_s *sdp,
uint8_t *rsp, const uint8_t *req, ssize_t len)
{
ssize_t seqlen;
int VAR_0, VAR_1, VAR_2, VAR_3;
int32_t handle;
struct sdp_service_record_s *VAR_4;
uint8_t *lst;
if (len < 7)
return -SDP_INVALID_SYN... | [
"static ssize_t FUNC_0(struct bt_l2cap_sdp_state_s *sdp,\nuint8_t *rsp, const uint8_t *req, ssize_t len)\n{",
"ssize_t seqlen;",
"int VAR_0, VAR_1, VAR_2, VAR_3;",
"int32_t handle;",
"struct sdp_service_record_s *VAR_4;",
"uint8_t *lst;",
"if (len < 7)\nreturn -SDP_INVALID_SYNTAX;",
"memcpy(&handle, r... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
33,
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53,
55
... |
8,472 | static void virtio_pci_device_plugged(DeviceState *d)
{
VirtIOPCIProxy *proxy = VIRTIO_PCI(d);
VirtioBusState *bus = &proxy->bus;
uint8_t *config;
uint32_t size;
VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
config = proxy->pci_dev.config;
if (proxy->class_code) {
... | true | qemu | e83980455c8c7eb066405de512be7c4bace3ac4d | static void virtio_pci_device_plugged(DeviceState *d)
{
VirtIOPCIProxy *proxy = VIRTIO_PCI(d);
VirtioBusState *bus = &proxy->bus;
uint8_t *config;
uint32_t size;
VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
config = proxy->pci_dev.config;
if (proxy->class_code) {
... | {
"code": [
"static void virtio_pci_device_plugged(DeviceState *d)"
],
"line_no": [
1
]
} | static void FUNC_0(DeviceState *VAR_0)
{
VirtIOPCIProxy *proxy = VIRTIO_PCI(VAR_0);
VirtioBusState *bus = &proxy->bus;
uint8_t *config;
uint32_t size;
VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
config = proxy->pci_dev.config;
if (proxy->class_code) {
pci_conf... | [
"static void FUNC_0(DeviceState *VAR_0)\n{",
"VirtIOPCIProxy *proxy = VIRTIO_PCI(VAR_0);",
"VirtioBusState *bus = &proxy->bus;",
"uint8_t *config;",
"uint32_t size;",
"VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);",
"config = proxy->pci_dev.config;",
"if (proxy->class_code) {",
"pci_confi... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
35,
37
],
[
39,
41
],
[
43
],
[
45
],
[
49
],
[... |
8,473 | static void vc1_decode_b_mb_intfi(VC1Context *v)
{
MpegEncContext *s = &v->s;
GetBitContext *gb = &s->gb;
int i, j;
int mb_pos = s->mb_x + s->mb_y * s->mb_stride;
int cbp = 0; /* cbp decoding stuff */
int mqdiff, mquant; /* MB quantization */
int ttmb = v->ttfrm; /* MB Transform type... | true | FFmpeg | ebe8c7fe520145243ad46ac839dffe8a32278582 | static void vc1_decode_b_mb_intfi(VC1Context *v)
{
MpegEncContext *s = &v->s;
GetBitContext *gb = &s->gb;
int i, j;
int mb_pos = s->mb_x + s->mb_y * s->mb_stride;
int cbp = 0;
int mqdiff, mquant;
int ttmb = v->ttfrm;
int mb_has_coeffs = 0;
int val;
int first_block... | {
"code": [
" int av_uninit(interpmvp);",
" if (bmvtype == BMV_TYPE_INTERPOLATED && interpmvp) {"
],
"line_no": [
35,
185
]
} | static void FUNC_0(VC1Context *VAR_0)
{
MpegEncContext *s = &VAR_0->s;
GetBitContext *gb = &s->gb;
int VAR_1, VAR_2;
int VAR_3 = s->mb_x + s->mb_y * s->mb_stride;
int VAR_4 = 0;
int VAR_5, VAR_6;
int VAR_7 = VAR_0->ttfrm;
int VAR_8 = 0;
int VAR_9;
int VAR_10 = 1;
... | [
"static void FUNC_0(VC1Context *VAR_0)\n{",
"MpegEncContext *s = &VAR_0->s;",
"GetBitContext *gb = &s->gb;",
"int VAR_1, VAR_2;",
"int VAR_3 = s->mb_x + s->mb_y * s->mb_stride;",
"int VAR_4 = 0;",
"int VAR_5, VAR_6;",
"int VAR_7 = VAR_0->ttfrm;",
"int VAR_8 = 0;",
"int VAR_9;",
"int VAR_10 = 1;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.