id int32 0 27.3k | func stringlengths 26 142k | target bool 2
classes | project stringclasses 2
values | commit_id stringlengths 40 40 | func_clean stringlengths 26 131k | vul_lines dict | normalized_func stringlengths 24 132k | lines listlengths 1 2.8k | label listlengths 1 2.8k | line_no listlengths 1 2.8k |
|---|---|---|---|---|---|---|---|---|---|---|
3,797 | AioContext *bdrv_get_aio_context(BlockDriverState *bs)
{
/* Currently BlockDriverState always uses the main loop AioContext */
return qemu_get_aio_context();
}
| false | qemu | dcd042282d855edf70df90b7d61d33b515320b7a | AioContext *bdrv_get_aio_context(BlockDriverState *bs)
{
return qemu_get_aio_context();
}
| {
"code": [],
"line_no": []
} | AioContext *FUNC_0(BlockDriverState *bs)
{
return qemu_get_aio_context();
}
| [
"AioContext *FUNC_0(BlockDriverState *bs)\n{",
"return qemu_get_aio_context();",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
]
] |
3,798 | static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
{
FramePool *pool = s->internal->pool;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pic->format);
int i;
if (pic->data[0]) {
av_log(s, AV_LOG_ERROR, "pic->data[0]!=NULL in avcodec_default_get_buffer\n");
return... | false | FFmpeg | bdf7093bd0cb78d39df8a32cfdc9188d7a960278 | static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
{
FramePool *pool = s->internal->pool;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pic->format);
int i;
if (pic->data[0]) {
av_log(s, AV_LOG_ERROR, "pic->data[0]!=NULL in avcodec_default_get_buffer\n");
return... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1)
{
FramePool *pool = VAR_0->internal->pool;
const AVPixFmtDescriptor *VAR_2 = av_pix_fmt_desc_get(VAR_1->format);
int VAR_3;
if (VAR_1->data[0]) {
av_log(VAR_0, AV_LOG_ERROR, "VAR_1->data[0]!=NULL in avcodec_default_get_buffer\n");
... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1)\n{",
"FramePool *pool = VAR_0->internal->pool;",
"const AVPixFmtDescriptor *VAR_2 = av_pix_fmt_desc_get(VAR_1->format);",
"int VAR_3;",
"if (VAR_1->data[0]) {",
"av_log(VAR_0, AV_LOG_ERROR, \"VAR_1->data[0]!=NULL in avcodec_default_get_buffer\\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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[
51,
53
],
[... |
3,801 | static int qio_dns_resolver_lookup_sync_nop(QIODNSResolver *resolver,
SocketAddress *addr,
size_t *naddrs,
SocketAddress ***addrs,
Error **e... | false | qemu | dfd100f242370886bb6732f70f1f7cbd8eb9fedc | static int qio_dns_resolver_lookup_sync_nop(QIODNSResolver *resolver,
SocketAddress *addr,
size_t *naddrs,
SocketAddress ***addrs,
Error **e... | {
"code": [],
"line_no": []
} | static int FUNC_0(QIODNSResolver *VAR_0,
SocketAddress *VAR_1,
size_t *VAR_2,
SocketAddress ***VAR_3,
Error **VAR_4)
{
*VAR_2 = 1;
... | [
"static int FUNC_0(QIODNSResolver *VAR_0,\nSocketAddress *VAR_1,\nsize_t *VAR_2,\nSocketAddress ***VAR_3,\nError **VAR_4)\n{",
"*VAR_2 = 1;",
"*VAR_3 = g_new0(SocketAddress *, 1);",
"(*VAR_3)[0] = QAPI_CLONE(SocketAddress, VAR_1);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
3,802 | static int nvdimm_plugged_device_list(Object *obj, void *opaque)
{
GSList **list = opaque;
if (object_dynamic_cast(obj, TYPE_NVDIMM)) {
*list = g_slist_append(*list, DEVICE(obj));
}
object_child_foreach(obj, nvdimm_plugged_device_list, opaque);
return 0;
}
| false | qemu | cf7c0ff521b0710079aa28f21937fb7dbb3f5224 | static int nvdimm_plugged_device_list(Object *obj, void *opaque)
{
GSList **list = opaque;
if (object_dynamic_cast(obj, TYPE_NVDIMM)) {
*list = g_slist_append(*list, DEVICE(obj));
}
object_child_foreach(obj, nvdimm_plugged_device_list, opaque);
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(Object *VAR_0, void *VAR_1)
{
GSList **list = VAR_1;
if (object_dynamic_cast(VAR_0, TYPE_NVDIMM)) {
*list = g_slist_append(*list, DEVICE(VAR_0));
}
object_child_foreach(VAR_0, FUNC_0, VAR_1);
return 0;
}
| [
"static int FUNC_0(Object *VAR_0, void *VAR_1)\n{",
"GSList **list = VAR_1;",
"if (object_dynamic_cast(VAR_0, TYPE_NVDIMM)) {",
"*list = g_slist_append(*list, DEVICE(VAR_0));",
"}",
"object_child_foreach(VAR_0, FUNC_0, VAR_1);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
]
] |
3,803 | AddfdInfo *qmp_add_fd(bool has_fdset_id, int64_t fdset_id, bool has_opaque,
const char *opaque, Error **errp)
{
int fd;
Monitor *mon = cur_mon;
MonFdset *mon_fdset = NULL;
MonFdsetFd *mon_fdset_fd;
AddfdInfo *fdinfo;
fd = qemu_chr_fe_get_msgfd(mon->chr);
if (... | false | qemu | e446f70d54b4920e8ca5af509271b69eab86e37b | AddfdInfo *qmp_add_fd(bool has_fdset_id, int64_t fdset_id, bool has_opaque,
const char *opaque, Error **errp)
{
int fd;
Monitor *mon = cur_mon;
MonFdset *mon_fdset = NULL;
MonFdsetFd *mon_fdset_fd;
AddfdInfo *fdinfo;
fd = qemu_chr_fe_get_msgfd(mon->chr);
if (... | {
"code": [],
"line_no": []
} | AddfdInfo *FUNC_0(bool has_fdset_id, int64_t fdset_id, bool has_opaque,
const char *opaque, Error **errp)
{
int VAR_0;
Monitor *mon = cur_mon;
MonFdset *mon_fdset = NULL;
MonFdsetFd *mon_fdset_fd;
AddfdInfo *fdinfo;
VAR_0 = qemu_chr_fe_get_msgfd(mon->chr);
if... | [
"AddfdInfo *FUNC_0(bool has_fdset_id, int64_t fdset_id, bool has_opaque,\nconst char *opaque, Error **errp)\n{",
"int VAR_0;",
"Monitor *mon = cur_mon;",
"MonFdset *mon_fdset = NULL;",
"MonFdsetFd *mon_fdset_fd;",
"AddfdInfo *fdinfo;",
"VAR_0 = qemu_chr_fe_get_msgfd(mon->chr);",
"if (VAR_0 == -1) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
3,804 | static BlockDriverAIOCB *paio_ioctl(BlockDriverState *bs, int fd,
unsigned long int req, void *buf,
BlockDriverCompletionFunc *cb, void *opaque)
{
RawPosixAIOData *acb = g_slice_new(RawPosixAIOData);
acb->bs = bs;
acb->aio_type = QEMU_AIO_IOCTL;
acb->aio_fildes = fd;
acb->a... | false | qemu | c208e8c2d88eea2bbafc2850d8856525637e495d | static BlockDriverAIOCB *paio_ioctl(BlockDriverState *bs, int fd,
unsigned long int req, void *buf,
BlockDriverCompletionFunc *cb, void *opaque)
{
RawPosixAIOData *acb = g_slice_new(RawPosixAIOData);
acb->bs = bs;
acb->aio_type = QEMU_AIO_IOCTL;
acb->aio_fildes = fd;
acb->a... | {
"code": [],
"line_no": []
} | static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs, int fd,
unsigned long int req, void *buf,
BlockDriverCompletionFunc *cb, void *opaque)
{
RawPosixAIOData *acb = g_slice_new(RawPosixAIOData);
acb->bs = bs;
acb->aio_type = QEMU_AIO_IOCTL;
acb->aio_fildes = fd;
acb->aio_o... | [
"static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs, int fd,\nunsigned long int req, void *buf,\nBlockDriverCompletionFunc *cb, void *opaque)\n{",
"RawPosixAIOData *acb = g_slice_new(RawPosixAIOData);",
"acb->bs = bs;",
"acb->aio_type = QEMU_AIO_IOCTL;",
"acb->aio_fildes = fd;",
"acb->aio_offset = 0;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
]
] |
3,805 | static int readv_f(BlockBackend *blk, int argc, char **argv)
{
struct timeval t1, t2;
int Cflag = 0, qflag = 0, vflag = 0;
int c, cnt;
char *buf;
int64_t offset;
/* Some compilers get confused and warn if this is not initialized. */
int total = 0;
int nr_iov;
QEMUIOVector ... | false | qemu | b062ad86dcd33ab39be5060b0655d8e13834b167 | static int readv_f(BlockBackend *blk, int argc, char **argv)
{
struct timeval t1, t2;
int Cflag = 0, qflag = 0, vflag = 0;
int c, cnt;
char *buf;
int64_t offset;
int total = 0;
int nr_iov;
QEMUIOVector qiov;
int pattern = 0;
int Pflag = 0;
while ((c = geto... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockBackend *VAR_0, int VAR_1, char **VAR_2)
{
struct timeval VAR_3, VAR_4;
int VAR_5 = 0, VAR_6 = 0, VAR_7 = 0;
int VAR_8, VAR_9;
char *VAR_10;
int64_t offset;
int VAR_11 = 0;
int VAR_12;
QEMUIOVector qiov;
int VAR_13 = 0;
int VAR_14 = 0;
... | [
"static int FUNC_0(BlockBackend *VAR_0, int VAR_1, char **VAR_2)\n{",
"struct timeval VAR_3, VAR_4;",
"int VAR_5 = 0, VAR_6 = 0, VAR_7 = 0;",
"int VAR_8, VAR_9;",
"char *VAR_10;",
"int64_t offset;",
"int VAR_11 = 0;",
"int VAR_12;",
"QEMUIOVector qiov;",
"int VAR_13 = 0;",
"int VAR_14 = 0;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
... |
3,806 | static void iter_func(QObject *obj, void *opaque)
{
QInt *qi;
fail_unless(opaque == NULL);
qi = qobject_to_qint(obj);
fail_unless(qi != NULL);
fail_unless((qint_get_int(qi) >= 0) && (qint_get_int(qi) <= iter_max));
iter_called++;
}
| false | qemu | 91479dd0b5bd3b087b92ddd7bc3f2c54982cfe17 | static void iter_func(QObject *obj, void *opaque)
{
QInt *qi;
fail_unless(opaque == NULL);
qi = qobject_to_qint(obj);
fail_unless(qi != NULL);
fail_unless((qint_get_int(qi) >= 0) && (qint_get_int(qi) <= iter_max));
iter_called++;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(QObject *VAR_0, void *VAR_1)
{
QInt *qi;
fail_unless(VAR_1 == NULL);
qi = qobject_to_qint(VAR_0);
fail_unless(qi != NULL);
fail_unless((qint_get_int(qi) >= 0) && (qint_get_int(qi) <= iter_max));
iter_called++;
}
| [
"static void FUNC_0(QObject *VAR_0, void *VAR_1)\n{",
"QInt *qi;",
"fail_unless(VAR_1 == NULL);",
"qi = qobject_to_qint(VAR_0);",
"fail_unless(qi != NULL);",
"fail_unless((qint_get_int(qi) >= 0) && (qint_get_int(qi) <= iter_max));",
"iter_called++;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
3,807 | int avfilter_init_str(AVFilterContext *filter, const char *args)
{
return avfilter_init_filter(filter, args, NULL);
}
| false | FFmpeg | 0acf7e268b2f873379cd854b4d5aaba6f9c1f0b5 | int avfilter_init_str(AVFilterContext *filter, const char *args)
{
return avfilter_init_filter(filter, args, NULL);
}
| {
"code": [],
"line_no": []
} | int FUNC_0(AVFilterContext *VAR_0, const char *VAR_1)
{
return avfilter_init_filter(VAR_0, VAR_1, NULL);
}
| [
"int FUNC_0(AVFilterContext *VAR_0, const char *VAR_1)\n{",
"return avfilter_init_filter(VAR_0, VAR_1, NULL);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
3,808 | SerialState *serial_mm_init(MemoryRegion *address_space,
hwaddr base, int it_shift,
qemu_irq irq, int baudbase,
CharDriverState *chr, enum device_endian end)
{
SerialState *s;
Error *err = NULL;
s = g_malloc0(sizeof... | false | qemu | a30cf8760f4a59797fc060c3c5a13b7749551d0c | SerialState *serial_mm_init(MemoryRegion *address_space,
hwaddr base, int it_shift,
qemu_irq irq, int baudbase,
CharDriverState *chr, enum device_endian end)
{
SerialState *s;
Error *err = NULL;
s = g_malloc0(sizeof... | {
"code": [],
"line_no": []
} | SerialState *FUNC_0(MemoryRegion *address_space,
hwaddr base, int it_shift,
qemu_irq irq, int baudbase,
CharDriverState *chr, enum device_endian end)
{
SerialState *s;
Error *err = NULL;
s = g_malloc0(sizeof(SerialS... | [
"SerialState *FUNC_0(MemoryRegion *address_space,\nhwaddr base, int it_shift,\nqemu_irq irq, int baudbase,\nCharDriverState *chr, enum device_endian end)\n{",
"SerialState *s;",
"Error *err = NULL;",
"s = g_malloc0(sizeof(SerialState));",
"s->it_shift = it_shift;",
"s->irq = irq;",
"s->baudbase = baudba... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47,
49
],
[
51
],
[
55
... |
3,809 | static void virtio_net_save_device(VirtIODevice *vdev, QEMUFile *f)
{
VirtIONet *n = VIRTIO_NET(vdev);
int i;
qemu_put_buffer(f, n->mac, ETH_ALEN);
qemu_put_be32(f, n->vqs[0].tx_waiting);
qemu_put_be32(f, n->mergeable_rx_bufs);
qemu_put_be16(f, n->status);
qemu_put_byte(f, n->promi... | false | qemu | 95129d6fc9ead97155627a4ca0cfd37282883658 | static void virtio_net_save_device(VirtIODevice *vdev, QEMUFile *f)
{
VirtIONet *n = VIRTIO_NET(vdev);
int i;
qemu_put_buffer(f, n->mac, ETH_ALEN);
qemu_put_be32(f, n->vqs[0].tx_waiting);
qemu_put_be32(f, n->mergeable_rx_bufs);
qemu_put_be16(f, n->status);
qemu_put_byte(f, n->promi... | {
"code": [],
"line_no": []
} | static void FUNC_0(VirtIODevice *VAR_0, QEMUFile *VAR_1)
{
VirtIONet *n = VIRTIO_NET(VAR_0);
int VAR_2;
qemu_put_buffer(VAR_1, n->mac, ETH_ALEN);
qemu_put_be32(VAR_1, n->vqs[0].tx_waiting);
qemu_put_be32(VAR_1, n->mergeable_rx_bufs);
qemu_put_be16(VAR_1, n->status);
qemu_put_byte(V... | [
"static void FUNC_0(VirtIODevice *VAR_0, QEMUFile *VAR_1)\n{",
"VirtIONet *n = VIRTIO_NET(VAR_0);",
"int VAR_2;",
"qemu_put_buffer(VAR_1, n->mac, ETH_ALEN);",
"qemu_put_be32(VAR_1, n->vqs[0].tx_waiting);",
"qemu_put_be32(VAR_1, n->mergeable_rx_bufs);",
"qemu_put_be16(VAR_1, n->status);",
"qemu_put_byt... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
3,810 | udp_listen(port, laddr, lport, flags)
u_int port;
u_int32_t laddr;
u_int lport;
int flags;
{
struct sockaddr_in addr;
struct socket *so;
int addrlen = sizeof(struct sockaddr_in), opt = 1;
if ((so = socreate()) == NULL) {
free(so);
return NULL;
}
so->s = socket(AF_INET,SOCK_DGRAM,0);
so->s... | false | qemu | 242acf3af4605adce933906bdc053b2414181ec7 | udp_listen(port, laddr, lport, flags)
u_int port;
u_int32_t laddr;
u_int lport;
int flags;
{
struct sockaddr_in addr;
struct socket *so;
int addrlen = sizeof(struct sockaddr_in), opt = 1;
if ((so = socreate()) == NULL) {
free(so);
return NULL;
}
so->s = socket(AF_INET,SOCK_DGRAM,0);
so->s... | {
"code": [],
"line_no": []
} | udp_listen(port, VAR_0, VAR_1, VAR_2)
u_int port;
u_int32_t VAR_0;
u_int VAR_1;
int VAR_2;
{
struct sockaddr_in addr;
struct socket *so;
int addrlen = sizeof(struct sockaddr_in), opt = 1;
if ((so = socreate()) == NULL) {
free(so);
return NULL;
}
so->s = socket(AF_INET,SOCK_DGRAM,0);
so->s... | [
"udp_listen(port, VAR_0, VAR_1, VAR_2)\nu_int port;",
"u_int32_t VAR_0;",
"u_int VAR_1;",
"int VAR_2;",
"{",
"struct sockaddr_in addr;",
"struct socket *so;",
"int addrlen = sizeof(struct sockaddr_in), opt = 1;",
"if ((so = socreate()) == NULL) {",
"free(so);",
"return NULL;",
"}",
"so->s = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
... |
3,812 | void cpu_x86_inject_mce(Monitor *mon, CPUState *cenv, int bank,
uint64_t status, uint64_t mcg_status, uint64_t addr,
uint64_t misc, int flags)
{
unsigned bank_num = cenv->mcg_cap & 0xff;
CPUState *env;
int flag = 0;
if (!cenv->mcg_cap) {
... | false | qemu | d5bfda334adf9af62df5709cdac38f523f815f47 | void cpu_x86_inject_mce(Monitor *mon, CPUState *cenv, int bank,
uint64_t status, uint64_t mcg_status, uint64_t addr,
uint64_t misc, int flags)
{
unsigned bank_num = cenv->mcg_cap & 0xff;
CPUState *env;
int flag = 0;
if (!cenv->mcg_cap) {
... | {
"code": [],
"line_no": []
} | void FUNC_0(Monitor *VAR_0, CPUState *VAR_1, int VAR_2,
uint64_t VAR_3, uint64_t VAR_4, uint64_t VAR_5,
uint64_t VAR_6, int VAR_7)
{
unsigned VAR_8 = VAR_1->mcg_cap & 0xff;
CPUState *env;
int VAR_9 = 0;
if (!VAR_1->mcg_cap) {
monitor_prin... | [
"void FUNC_0(Monitor *VAR_0, CPUState *VAR_1, int VAR_2,\nuint64_t VAR_3, uint64_t VAR_4, uint64_t VAR_5,\nuint64_t VAR_6, int VAR_7)\n{",
"unsigned VAR_8 = VAR_1->mcg_cap & 0xff;",
"CPUState *env;",
"int VAR_9 = 0;",
"if (!VAR_1->mcg_cap) {",
"monitor_printf(VAR_0, \"MCE injection not supported\\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,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[... |
3,813 | static void piix3_set_irq(void *opaque, int irq_num, int level)
{
int i, pic_irq, pic_level;
PIIX3State *piix3 = opaque;
/* now we change the pic irq level according to the piix irq mappings */
/* XXX: optimize */
pic_irq = piix3->dev.config[0x60 + irq_num];
if (pic_irq < 16) {
... | false | qemu | ab431c283e7055bcd6fb622f212bb29e84a6a134 | static void piix3_set_irq(void *opaque, int irq_num, int level)
{
int i, pic_irq, pic_level;
PIIX3State *piix3 = opaque;
pic_irq = piix3->dev.config[0x60 + irq_num];
if (pic_irq < 16) {
pic_level = 0;
for (i = 0; i < 4; i++) {
if (pic_irq == ... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)
{
int VAR_3, VAR_4, VAR_5;
PIIX3State *piix3 = VAR_0;
VAR_4 = piix3->dev.config[0x60 + VAR_1];
if (VAR_4 < 16) {
VAR_5 = 0;
for (VAR_3 = 0; VAR_3 < 4; VAR_3++) {
if (VAR_4 == piix3->dev.co... | [
"static void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5;",
"PIIX3State *piix3 = VAR_0;",
"VAR_4 = piix3->dev.config[0x60 + VAR_1];",
"if (VAR_4 < 16) {",
"VAR_5 = 0;",
"for (VAR_3 = 0; VAR_3 < 4; VAR_3++) {",
"if (VAR_4 == piix3->dev.config[0x60 + VAR_3]) {",
"VAR_5 |= p... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
3,816 | static void mirror_iteration_done(MirrorOp *op, int ret)
{
MirrorBlockJob *s = op->s;
struct iovec *iov;
int64_t chunk_num;
int i, nb_chunks, sectors_per_chunk;
trace_mirror_iteration_done(s, op->sector_num * BDRV_SECTOR_SIZE,
op->nb_sectors * BDRV_SECTOR_SIZ... | false | qemu | b436982f04fb33bb29fcdea190bd1fdc97dc65ef | static void mirror_iteration_done(MirrorOp *op, int ret)
{
MirrorBlockJob *s = op->s;
struct iovec *iov;
int64_t chunk_num;
int i, nb_chunks, sectors_per_chunk;
trace_mirror_iteration_done(s, op->sector_num * BDRV_SECTOR_SIZE,
op->nb_sectors * BDRV_SECTOR_SIZ... | {
"code": [],
"line_no": []
} | static void FUNC_0(MirrorOp *VAR_0, int VAR_1)
{
MirrorBlockJob *s = VAR_0->s;
struct iovec *VAR_2;
int64_t chunk_num;
int VAR_3, VAR_4, VAR_5;
trace_mirror_iteration_done(s, VAR_0->sector_num * BDRV_SECTOR_SIZE,
VAR_0->nb_sectors * BDRV_SECTOR_SIZE, VAR_1);
... | [
"static void FUNC_0(MirrorOp *VAR_0, int VAR_1)\n{",
"MirrorBlockJob *s = VAR_0->s;",
"struct iovec *VAR_2;",
"int64_t chunk_num;",
"int VAR_3, VAR_4, VAR_5;",
"trace_mirror_iteration_done(s, VAR_0->sector_num * BDRV_SECTOR_SIZE,\nVAR_0->nb_sectors * BDRV_SECTOR_SIZE, VAR_1);",
"s->in_flight--;",
"s->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
3,817 | static ssize_t spapr_vlan_receive(NetClientState *nc, const uint8_t *buf,
size_t size)
{
VIOsPAPRDevice *sdev = DO_UPCAST(NICState, nc, nc)->opaque;
VIOsPAPRVLANDevice *dev = (VIOsPAPRVLANDevice *)sdev;
vlan_bd_t rxq_bd = vio_ldq(sdev, dev->buf_list + VLAN_RXQ_BD_OFF);... | false | qemu | a307d59434ba78b97544b42b8cfd24a1b62e39a6 | static ssize_t spapr_vlan_receive(NetClientState *nc, const uint8_t *buf,
size_t size)
{
VIOsPAPRDevice *sdev = DO_UPCAST(NICState, nc, nc)->opaque;
VIOsPAPRVLANDevice *dev = (VIOsPAPRVLANDevice *)sdev;
vlan_bd_t rxq_bd = vio_ldq(sdev, dev->buf_list + VLAN_RXQ_BD_OFF);... | {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(NetClientState *nc, const uint8_t *buf,
size_t size)
{
VIOsPAPRDevice *sdev = DO_UPCAST(NICState, nc, nc)->opaque;
VIOsPAPRVLANDevice *dev = (VIOsPAPRVLANDevice *)sdev;
vlan_bd_t rxq_bd = vio_ldq(sdev, dev->buf_list + VLAN_RXQ_BD_OFF);
vlan_b... | [
"static ssize_t FUNC_0(NetClientState *nc, const uint8_t *buf,\nsize_t size)\n{",
"VIOsPAPRDevice *sdev = DO_UPCAST(NICState, nc, nc)->opaque;",
"VIOsPAPRVLANDevice *dev = (VIOsPAPRVLANDevice *)sdev;",
"vlan_bd_t rxq_bd = vio_ldq(sdev, dev->buf_list + VLAN_RXQ_BD_OFF);",
"vlan_bd_t bd;",
"int VAR_0 = dev-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
... |
3,818 | int av_write_frame(AVFormatContext *s, AVPacket *pkt)
{
int ret = compute_pkt_fields2(s, s->streams[pkt->stream_index], pkt);
if(ret<0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
return ret;
ret= s->oformat->write_packet(s, pkt);
if(!ret)
ret= url_ferror(s->pb);
return ... | false | FFmpeg | 75b9ed04b977bfd467816f7e60c6511ef89b8a2b | int av_write_frame(AVFormatContext *s, AVPacket *pkt)
{
int ret = compute_pkt_fields2(s, s->streams[pkt->stream_index], pkt);
if(ret<0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
return ret;
ret= s->oformat->write_packet(s, pkt);
if(!ret)
ret= url_ferror(s->pb);
return ... | {
"code": [],
"line_no": []
} | int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
int VAR_2 = compute_pkt_fields2(VAR_0, VAR_0->streams[VAR_1->stream_index], VAR_1);
if(VAR_2<0 && !(VAR_0->oformat->flags & AVFMT_NOTIMESTAMPS))
return VAR_2;
VAR_2= VAR_0->oformat->write_packet(VAR_0, VAR_1);
if(!VAR_2)
VA... | [
"int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"int VAR_2 = compute_pkt_fields2(VAR_0, VAR_0->streams[VAR_1->stream_index], VAR_1);",
"if(VAR_2<0 && !(VAR_0->oformat->flags & AVFMT_NOTIMESTAMPS))\nreturn VAR_2;",
"VAR_2= VAR_0->oformat->write_packet(VAR_0, VAR_1);",
"if(!VAR_2)\nVAR_2= url_ferror... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
17,
19
],
[
21
],
[
23
]
] |
3,821 | av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
{
int i, j, n;
if (nbits < 2 || nbits > 16)
goto fail;
s->nbits = nbits;
n = 1 << nbits;
s->revtab = av_malloc(n * sizeof(uint16_t));
if (!s->revtab)
goto fail;
s->tmp_buf = av_malloc(n * sizeof(FFTC... | false | FFmpeg | e6b1ed693ae4098e6b9eabf938fc31ec0b09b120 | av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
{
int i, j, n;
if (nbits < 2 || nbits > 16)
goto fail;
s->nbits = nbits;
n = 1 << nbits;
s->revtab = av_malloc(n * sizeof(uint16_t));
if (!s->revtab)
goto fail;
s->tmp_buf = av_malloc(n * sizeof(FFTC... | {
"code": [],
"line_no": []
} | av_cold int FUNC_0(FFTContext *s, int nbits, int inverse)
{
int VAR_0, VAR_1, VAR_2;
if (nbits < 2 || nbits > 16)
goto fail;
s->nbits = nbits;
VAR_2 = 1 << nbits;
s->revtab = av_malloc(VAR_2 * sizeof(uint16_t));
if (!s->revtab)
goto fail;
s->tmp_buf = av_malloc(... | [
"av_cold int FUNC_0(FFTContext *s, int nbits, int inverse)\n{",
"int VAR_0, VAR_1, VAR_2;",
"if (nbits < 2 || nbits > 16)\ngoto fail;",
"s->nbits = nbits;",
"VAR_2 = 1 << nbits;",
"s->revtab = av_malloc(VAR_2 * sizeof(uint16_t));",
"if (!s->revtab)\ngoto fail;",
"s->tmp_buf = av_malloc(VAR_2 * sizeof(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
25
],
[
27,
29
],
[
31
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47,
51
],
[
53
],
... |
3,822 | DisplaySurface *qemu_create_displaysurface_guestmem(int width, int height,
pixman_format_code_t format,
int linesize, uint64_t addr)
{
DisplaySurface *surface;
hwaddr size;
void *data;
if (li... | true | qemu | f76b84a04b75e98eee56e8dc277564d0fbb99018 | DisplaySurface *qemu_create_displaysurface_guestmem(int width, int height,
pixman_format_code_t format,
int linesize, uint64_t addr)
{
DisplaySurface *surface;
hwaddr size;
void *data;
if (li... | {
"code": [
" size = linesize * height;",
" if (size != linesize * height) {"
],
"line_no": [
25,
29
]
} | DisplaySurface *FUNC_0(int width, int height,
pixman_format_code_t format,
int linesize, uint64_t addr)
{
DisplaySurface *surface;
hwaddr size;
void *VAR_0;
if (linesize == 0) {
line... | [
"DisplaySurface *FUNC_0(int width, int height,\npixman_format_code_t format,\nint linesize, uint64_t addr)\n{",
"DisplaySurface *surface;",
"hwaddr size;",
"void *VAR_0;",
"if (linesize == 0) {",
"linesize = width * PIXMAN_FORMAT_BPP(format) / 8;",
"}",
"size = linesize * height;",
"VAR_0 = cpu_phys... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39,
41
],
[
43,
45
],
[
49
],
[
51
]
] |
3,823 | static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
{
AVFilterBufferRef *outpicref = avfilter_ref_buffer(inpicref, ~0);
AVFilterContext *ctx = inlink->dst;
OverlayContext *over = ctx->priv;
av_unused AVFilterLink *outlink = ctx->outputs[0];
inlink->dst->outputs[0]->out... | true | FFmpeg | 06bf6d3bc04979bd39ecdc7311d0daf8aee7e10f | static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
{
AVFilterBufferRef *outpicref = avfilter_ref_buffer(inpicref, ~0);
AVFilterContext *ctx = inlink->dst;
OverlayContext *over = ctx->priv;
av_unused AVFilterLink *outlink = ctx->outputs[0];
inlink->dst->outputs[0]->out... | {
"code": [
"static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)",
" AVFilterBufferRef *outpicref = avfilter_ref_buffer(inpicref, ~0);",
" AVFilterContext *ctx = inlink->dst;",
" OverlayContext *over = ctx->priv;",
" av_unused AVFilterLink *outlink = ctx->outputs... | static void FUNC_0(AVFilterLink *VAR_0, AVFilterBufferRef *VAR_1)
{
AVFilterBufferRef *outpicref = avfilter_ref_buffer(VAR_1, ~0);
AVFilterContext *ctx = VAR_0->dst;
OverlayContext *over = ctx->priv;
av_unused AVFilterLink *outlink = ctx->outputs[0];
VAR_0->dst->outputs[0]->out_buf = outpicr... | [
"static void FUNC_0(AVFilterLink *VAR_0, AVFilterBufferRef *VAR_1)\n{",
"AVFilterBufferRef *outpicref = avfilter_ref_buffer(VAR_1, ~0);",
"AVFilterContext *ctx = VAR_0->dst;",
"OverlayContext *over = ctx->priv;",
"av_unused AVFilterLink *outlink = ctx->outputs[0];",
"VAR_0->dst->outputs[0]->out_buf = outp... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
23
],
[
25,
27
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47,
49
],
[
51,
53,
55
... |
3,825 | static void monitor_puts(Monitor *mon, const char *str)
{
char c;
for(;;) {
assert(mon->outbuf_index < sizeof(mon->outbuf) - 1);
c = *str++;
if (c == '\0')
break;
if (c == '\n')
mon->outbuf[mon->outbuf_index++] = '\r';
mon->outbuf[mon->... | true | qemu | e1f2641b5926d20f63d36f0de45206be774da8da | static void monitor_puts(Monitor *mon, const char *str)
{
char c;
for(;;) {
assert(mon->outbuf_index < sizeof(mon->outbuf) - 1);
c = *str++;
if (c == '\0')
break;
if (c == '\n')
mon->outbuf[mon->outbuf_index++] = '\r';
mon->outbuf[mon->... | {
"code": [
" assert(mon->outbuf_index < sizeof(mon->outbuf) - 1);",
" if (c == '\\n')",
" mon->outbuf[mon->outbuf_index++] = '\\r';",
" mon->outbuf[mon->outbuf_index++] = c;",
" if (mon->outbuf_index >= (sizeof(mon->outbuf) - 1)",
" || c == '\... | static void FUNC_0(Monitor *VAR_0, const char *VAR_1)
{
char VAR_2;
for(;;) {
assert(VAR_0->outbuf_index < sizeof(VAR_0->outbuf) - 1);
VAR_2 = *VAR_1++;
if (VAR_2 == '\0')
break;
if (VAR_2 == '\n')
VAR_0->outbuf[VAR_0->outbuf_index++] = '\r';
... | [
"static void FUNC_0(Monitor *VAR_0, const char *VAR_1)\n{",
"char VAR_2;",
"for(;;) {",
"assert(VAR_0->outbuf_index < sizeof(VAR_0->outbuf) - 1);",
"VAR_2 = *VAR_1++;",
"if (VAR_2 == '\\0')\nbreak;",
"if (VAR_2 == '\\n')\nVAR_0->outbuf[VAR_0->outbuf_index++] = '\\r';",
"VAR_0->outbuf[VAR_0->outbuf_ind... | [
0,
0,
0,
1,
0,
0,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15,
17
],
[
19,
21
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33
]
] |
3,826 | void timer_del(QEMUTimer *ts)
{
QEMUTimerList *timer_list = ts->timer_list;
qemu_mutex_lock(&timer_list->active_timers_lock);
timer_del_locked(timer_list, ts);
qemu_mutex_unlock(&timer_list->active_timers_lock);
}
| true | qemu | cd1bd53a669c88f219ca47b538889cd918605fea | void timer_del(QEMUTimer *ts)
{
QEMUTimerList *timer_list = ts->timer_list;
qemu_mutex_lock(&timer_list->active_timers_lock);
timer_del_locked(timer_list, ts);
qemu_mutex_unlock(&timer_list->active_timers_lock);
}
| {
"code": [
" qemu_mutex_lock(&timer_list->active_timers_lock);",
" timer_del_locked(timer_list, ts);",
" qemu_mutex_unlock(&timer_list->active_timers_lock);"
],
"line_no": [
9,
11,
13
]
} | void FUNC_0(QEMUTimer *VAR_0)
{
QEMUTimerList *timer_list = VAR_0->timer_list;
qemu_mutex_lock(&timer_list->active_timers_lock);
timer_del_locked(timer_list, VAR_0);
qemu_mutex_unlock(&timer_list->active_timers_lock);
}
| [
"void FUNC_0(QEMUTimer *VAR_0)\n{",
"QEMUTimerList *timer_list = VAR_0->timer_list;",
"qemu_mutex_lock(&timer_list->active_timers_lock);",
"timer_del_locked(timer_list, VAR_0);",
"qemu_mutex_unlock(&timer_list->active_timers_lock);",
"}"
] | [
0,
0,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
3,827 | static void put_bitmap(QEMUFile *f, void *pv, size_t size)
{
unsigned long *bmp = pv;
int i, idx = 0;
for (i = 0; i < BITS_TO_U64S(size); i++) {
uint64_t w = bmp[idx++];
if (sizeof(unsigned long) == 4 && idx < BITS_TO_LONGS(size)) {
w |= ((uint64_t)bmp[idx++]) << 32;
... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static void put_bitmap(QEMUFile *f, void *pv, size_t size)
{
unsigned long *bmp = pv;
int i, idx = 0;
for (i = 0; i < BITS_TO_U64S(size); i++) {
uint64_t w = bmp[idx++];
if (sizeof(unsigned long) == 4 && idx < BITS_TO_LONGS(size)) {
w |= ((uint64_t)bmp[idx++]) << 32;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2)
{
unsigned long *VAR_3 = VAR_1;
int VAR_4, VAR_5 = 0;
for (VAR_4 = 0; VAR_4 < BITS_TO_U64S(VAR_2); VAR_4++) {
uint64_t w = VAR_3[VAR_5++];
if (sizeof(unsigned long) == 4 && VAR_5 < BITS_TO_LONGS(VAR_2)) {
w |= ... | [
"static void FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2)\n{",
"unsigned long *VAR_3 = VAR_1;",
"int VAR_4, VAR_5 = 0;",
"for (VAR_4 = 0; VAR_4 < BITS_TO_U64S(VAR_2); VAR_4++) {",
"uint64_t w = VAR_3[VAR_5++];",
"if (sizeof(unsigned long) == 4 && VAR_5 < BITS_TO_LONGS(VAR_2)) {",
"w |= ((uint64_t)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
3,828 | void run_on_cpu(CPUState *env, void (*func)(void *data), void *data)
{
func(data);
}
| true | qemu | 12d4536f7d911b6d87a766ad7300482ea663cea2 | void run_on_cpu(CPUState *env, void (*func)(void *data), void *data)
{
func(data);
}
| {
"code": [
"void run_on_cpu(CPUState *env, void (*func)(void *data), void *data)",
" func(data);"
],
"line_no": [
1,
5
]
} | void FUNC_0(CPUState *VAR_0, void (*VAR_1)(void *VAR_3), void *VAR_3)
{
VAR_1(VAR_3);
}
| [
"void FUNC_0(CPUState *VAR_0, void (*VAR_1)(void *VAR_3), void *VAR_3)\n{",
"VAR_1(VAR_3);",
"}"
] | [
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
3,829 | static int dirac_decode_picture_header(DiracContext *s)
{
unsigned retire, picnum;
int i, j, ret;
int64_t refdist, refnum;
GetBitContext *gb = &s->gb;
/* [DIRAC_STD] 11.1.1 Picture Header. picture_header() PICTURE_NUM */
picnum = s->current_picture->avframe->display_picture_number = get... | true | FFmpeg | db79dedb1ae5dd38432eee3f09155e26f3f2d95a | static int dirac_decode_picture_header(DiracContext *s)
{
unsigned retire, picnum;
int i, j, ret;
int64_t refdist, refnum;
GetBitContext *gb = &s->gb;
picnum = s->current_picture->avframe->display_picture_number = get_bits_long(gb, 32);
av_log(s->avctx,AV_LOG_DEBUG,"PICTURE_NU... | {
"code": [
" get_buffer_with_edge(s->avctx, s->ref_pics[i]->avframe, AV_GET_BUFFER_FLAG_REF);"
],
"line_no": [
81
]
} | static int FUNC_0(DiracContext *VAR_0)
{
unsigned VAR_1, VAR_2;
int VAR_3, VAR_4, VAR_5;
int64_t refdist, refnum;
GetBitContext *gb = &VAR_0->gb;
VAR_2 = VAR_0->current_picture->avframe->display_picture_number = get_bits_long(gb, 32);
av_log(VAR_0->avctx,AV_LOG_DEBUG,"PICTURE_... | [
"static int FUNC_0(DiracContext *VAR_0)\n{",
"unsigned VAR_1, VAR_2;",
"int VAR_3, VAR_4, VAR_5;",
"int64_t refdist, refnum;",
"GetBitContext *gb = &VAR_0->gb;",
"VAR_2 = VAR_0->current_picture->avframe->display_picture_number = get_bits_long(gb, 32);",
"av_log(VAR_0->avctx,AV_LOG_DEBUG,\"PICTURE_NUM: %... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
23
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
51
],
[
53,
55
],
[
57
],
[
59
],
[
61
],
[
65,
67
],
[... |
3,830 | static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eof)
{
int ret = 0, i;
int got_output = 0;
AVPacket avpkt;
if (!ist->saw_first_ts) {
ist->dts = ist->st->avg_frame_rate.num ? - ist->dec_ctx->has_b_frames * AV_TIME_BASE / av_q2d(ist->st->avg_frame_rate) : 0;
... | true | FFmpeg | 8f6f2322285fc14f8f16377db50355864019a757 | static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eof)
{
int ret = 0, i;
int got_output = 0;
AVPacket avpkt;
if (!ist->saw_first_ts) {
ist->dts = ist->st->avg_frame_rate.num ? - ist->dec_ctx->has_b_frames * AV_TIME_BASE / av_q2d(ist->st->avg_frame_rate) : 0;
... | {
"code": [
" int got_output = 0;",
" goto handle_eof;",
" if (pkt->dts != AV_NOPTS_VALUE) {",
" while (ist->decoding_needed && (avpkt.size > 0 || (!pkt && got_output))) {",
" int duration;",
" handle_eof:",
" ret = decode_audio (ist, &avpkt, &got_ou... | static int FUNC_0(InputStream *VAR_0, const AVPacket *VAR_1, int VAR_2)
{
int VAR_8 = 0, VAR_4;
int VAR_5 = 0;
AVPacket avpkt;
if (!VAR_0->saw_first_ts) {
VAR_0->dts = VAR_0->st->avg_frame_rate.num ? - VAR_0->dec_ctx->has_b_frames * AV_TIME_BASE / av_q2d(VAR_0->st->avg_frame_rate) : 0;
... | [
"static int FUNC_0(InputStream *VAR_0, const AVPacket *VAR_1, int VAR_2)\n{",
"int VAR_8 = 0, VAR_4;",
"int VAR_5 = 0;",
"AVPacket avpkt;",
"if (!VAR_0->saw_first_ts) {",
"VAR_0->dts = VAR_0->st->avg_frame_rate.num ? - VAR_0->dec_ctx->has_b_frames * AV_TIME_BASE / av_q2d(VAR_0->st->avg_frame_rate) : 0;",
... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
1,
1,
1,
0,
0,
1,
0,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
0,
1... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33,
35
],
[
37,
39
],
[
43
],
[
47
],
[
49
],
[
51... |
3,831 | static int interleave_new_audio_packet(AVFormatContext *s, AVPacket *pkt,
int stream_index, int flush)
{
AVStream *st = s->streams[stream_index];
AudioInterleaveContext *aic = st->priv_data;
int size = FFMIN(av_fifo_size(aic->fifo), *aic->samples * aic->sample_s... | false | FFmpeg | 1967cd4e4c1cd96dfa195ce14e4b212ddb70586d | static int interleave_new_audio_packet(AVFormatContext *s, AVPacket *pkt,
int stream_index, int flush)
{
AVStream *st = s->streams[stream_index];
AudioInterleaveContext *aic = st->priv_data;
int size = FFMIN(av_fifo_size(aic->fifo), *aic->samples * aic->sample_s... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1,
int VAR_2, int VAR_3)
{
AVStream *st = VAR_0->streams[VAR_2];
AudioInterleaveContext *aic = st->priv_data;
int VAR_4 = FFMIN(av_fifo_size(aic->fifo), *aic->samples * aic->sample_size);
if (!VAR_4 ||... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1,\nint VAR_2, int VAR_3)\n{",
"AVStream *st = VAR_0->streams[VAR_2];",
"AudioInterleaveContext *aic = st->priv_data;",
"int VAR_4 = FFMIN(av_fifo_size(aic->fifo), *aic->samples * aic->sample_size);",
"if (!VAR_4 || (!VAR_3 && VAR_4 == av_fifo_size(ai... | [
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
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39,
41
],
[
45
],
[
47
]
] |
3,833 | static void memcard_write(void *opaque, target_phys_addr_t addr, uint64_t value,
unsigned size)
{
MilkymistMemcardState *s = opaque;
trace_milkymist_memcard_memory_write(addr, value);
addr >>= 2;
switch (addr) {
case R_PENDING:
/* clear rx pending bits *... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void memcard_write(void *opaque, target_phys_addr_t addr, uint64_t value,
unsigned size)
{
MilkymistMemcardState *s = opaque;
trace_milkymist_memcard_memory_write(addr, value);
addr >>= 2;
switch (addr) {
case R_PENDING:
s->regs[R_PENDIN... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint64_t VAR_2,
unsigned VAR_3)
{
MilkymistMemcardState *s = VAR_0;
trace_milkymist_memcard_memory_write(VAR_1, VAR_2);
VAR_1 >>= 2;
switch (VAR_1) {
case R_PENDING:
s->regs[R_PENDING] &... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint64_t VAR_2,\nunsigned VAR_3)\n{",
"MilkymistMemcardState *s = VAR_0;",
"trace_milkymist_memcard_memory_write(VAR_1, VAR_2);",
"VAR_1 >>= 2;",
"switch (VAR_1) {",
"case R_PENDING:\ns->regs[R_PENDING] &= ~(VAR_2 & (PENDING_CMD_RX | PENDING_DAT_R... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19,
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
... |
3,835 | static uint32_t arm_v7m_load_vector(ARMCPU *cpu)
{
CPUState *cs = CPU(cpu);
CPUARMState *env = &cpu->env;
MemTxResult result;
hwaddr vec = env->v7m.vecbase + env->v7m.exception * 4;
uint32_t addr;
addr = address_space_ldl(cs->as, vec,
MEMTXATTRS_UNSPECIFIED... | false | qemu | 45db7ba681ede57113a67499840e69ee586bcdf2 | static uint32_t arm_v7m_load_vector(ARMCPU *cpu)
{
CPUState *cs = CPU(cpu);
CPUARMState *env = &cpu->env;
MemTxResult result;
hwaddr vec = env->v7m.vecbase + env->v7m.exception * 4;
uint32_t addr;
addr = address_space_ldl(cs->as, vec,
MEMTXATTRS_UNSPECIFIED... | {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(ARMCPU *cpu)
{
CPUState *cs = CPU(cpu);
CPUARMState *env = &cpu->env;
MemTxResult result;
hwaddr vec = env->v7m.vecbase + env->v7m.exception * 4;
uint32_t addr;
addr = address_space_ldl(cs->as, vec,
MEMTXATTRS_UNSPECIFIED, &result);
... | [
"static uint32_t FUNC_0(ARMCPU *cpu)\n{",
"CPUState *cs = CPU(cpu);",
"CPUARMState *env = &cpu->env;",
"MemTxResult result;",
"hwaddr vec = env->v7m.vecbase + env->v7m.exception * 4;",
"uint32_t addr;",
"addr = address_space_ldl(cs->as, vec,\nMEMTXATTRS_UNSPECIFIED, &result);",
"if (result != MEMTX_OK... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
21
],
[
35,
37
],
[
39
],
[
41
],
[
43
]
] |
3,836 | static gboolean serial_xmit(GIOChannel *chan, GIOCondition cond, void *opaque)
{
SerialState *s = opaque;
if (s->tsr_retry <= 0) {
if (s->fcr & UART_FCR_FE) {
s->tsr = fifo8_is_full(&s->xmit_fifo) ?
0 : fifo8_pop(&s->xmit_fifo);
if (!s->xmit_fifo.... | false | qemu | 88c1ee73d3231c74ff90bcfc084a7589670ec244 | static gboolean serial_xmit(GIOChannel *chan, GIOCondition cond, void *opaque)
{
SerialState *s = opaque;
if (s->tsr_retry <= 0) {
if (s->fcr & UART_FCR_FE) {
s->tsr = fifo8_is_full(&s->xmit_fifo) ?
0 : fifo8_pop(&s->xmit_fifo);
if (!s->xmit_fifo.... | {
"code": [],
"line_no": []
} | static gboolean FUNC_0(GIOChannel *chan, GIOCondition cond, void *opaque)
{
SerialState *s = opaque;
if (s->tsr_retry <= 0) {
if (s->fcr & UART_FCR_FE) {
s->tsr = fifo8_is_full(&s->xmit_fifo) ?
0 : fifo8_pop(&s->xmit_fifo);
if (!s->xmit_fifo.num) ... | [
"static gboolean FUNC_0(GIOChannel *chan, GIOCondition cond, void *opaque)\n{",
"SerialState *s = opaque;",
"if (s->tsr_retry <= 0) {",
"if (s->fcr & UART_FCR_FE) {",
"s->tsr = fifo8_is_full(&s->xmit_fifo) ?\n0 : fifo8_pop(&s->xmit_fifo);",
"if (!s->xmit_fifo.num) {",
"s->lsr |= UART_LSR_THRE;",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
... |
3,837 | ssize_t nbd_send_request(QIOChannel *ioc, NBDRequest *request)
{
uint8_t buf[NBD_REQUEST_SIZE];
TRACE("Sending request to server: "
"{ .from = %" PRIu64", .len = %" PRIu32 ", .handle = %" PRIu64
", .flags = %" PRIx16 ", .type = %" PRIu16 " }",
request->from, request->len, r... | false | qemu | d1fdf257d52822695f5ace6c586e059aa17d4b79 | ssize_t nbd_send_request(QIOChannel *ioc, NBDRequest *request)
{
uint8_t buf[NBD_REQUEST_SIZE];
TRACE("Sending request to server: "
"{ .from = %" PRIu64", .len = %" PRIu32 ", .handle = %" PRIu64
", .flags = %" PRIx16 ", .type = %" PRIu16 " }",
request->from, request->len, r... | {
"code": [],
"line_no": []
} | ssize_t FUNC_0(QIOChannel *ioc, NBDRequest *request)
{
uint8_t buf[NBD_REQUEST_SIZE];
TRACE("Sending request to server: "
"{ .from = %" PRIu64", .len = %" PRIu32 ", .handle = %" PRIu64
", .flags = %" PRIx16 ", .type = %" PRIu16 " }",
request->from, request->len, request->ha... | [
"ssize_t FUNC_0(QIOChannel *ioc, NBDRequest *request)\n{",
"uint8_t buf[NBD_REQUEST_SIZE];",
"TRACE(\"Sending request to server: \"\n\"{ .from = %\" PRIu64\", .len = %\" PRIu32 \", .handle = %\" PRIu64",
"\", .flags = %\" PRIx16 \", .type = %\" PRIu16 \" }\",",
"request->from, request->len, request->handle,... | [
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
],
[
29
],
[
31
],
[
35
],
[
37
]
] |
3,839 | static AVFilterContext *create_filter(AVFilterGraph *ctx, int index,
const char *name, const char *args,
AVClass *log_ctx)
{
AVFilterContext *filt;
AVFilter *filterdef;
char inst_name[30];
snprintf(inst_name, sizeof(i... | false | FFmpeg | 5e600185453e1a0ded70a59701f60a0022a88e42 | static AVFilterContext *create_filter(AVFilterGraph *ctx, int index,
const char *name, const char *args,
AVClass *log_ctx)
{
AVFilterContext *filt;
AVFilter *filterdef;
char inst_name[30];
snprintf(inst_name, sizeof(i... | {
"code": [],
"line_no": []
} | static AVFilterContext *FUNC_0(AVFilterGraph *ctx, int index,
const char *name, const char *args,
AVClass *log_ctx)
{
AVFilterContext *filt;
AVFilter *filterdef;
char VAR_0[30];
snprintf(VAR_0, sizeof(VAR_0), "Parsed ... | [
"static AVFilterContext *FUNC_0(AVFilterGraph *ctx, int index,\nconst char *name, const char *args,\nAVClass *log_ctx)\n{",
"AVFilterContext *filt;",
"AVFilter *filterdef;",
"char VAR_0[30];",
"snprintf(VAR_0, sizeof(VAR_0), \"Parsed filter %d\", index);",
"if(!(filterdef = avfilter_get_by_name(name))) {"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
47,
49
],
[
53
],
[
55,
57
],
[
59
... |
3,840 | static void scsi_dma_complete_noio(void *opaque, int ret)
{
SCSIDiskReq *r = (SCSIDiskReq *)opaque;
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
if (r->req.aiocb != NULL) {
r->req.aiocb = NULL;
block_acct_done(bdrv_get_stats(s->qdev.conf.bs), &r->acct);
}
... | false | qemu | 3df9caf88f5c0859ae380101fea47609ba1dbfbd | static void scsi_dma_complete_noio(void *opaque, int ret)
{
SCSIDiskReq *r = (SCSIDiskReq *)opaque;
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
if (r->req.aiocb != NULL) {
r->req.aiocb = NULL;
block_acct_done(bdrv_get_stats(s->qdev.conf.bs), &r->acct);
}
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1)
{
SCSIDiskReq *r = (SCSIDiskReq *)VAR_0;
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
if (r->req.aiocb != NULL) {
r->req.aiocb = NULL;
block_acct_done(bdrv_get_stats(s->qdev.conf.bs), &r->acct);
}
if (r->req.io_ca... | [
"static void FUNC_0(void *VAR_0, int VAR_1)\n{",
"SCSIDiskReq *r = (SCSIDiskReq *)VAR_0;",
"SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);",
"if (r->req.aiocb != NULL) {",
"r->req.aiocb = NULL;",
"block_acct_done(bdrv_get_stats(s->qdev.conf.bs), &r->acct);",
"}",
"if (r->req.io_cancele... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
3,841 | int vnc_display_password(DisplayState *ds, const char *password)
{
VncDisplay *vs = vnc_display;
if (!vs) {
return -EINVAL;
}
if (!password) {
/* This is not the intention of this interface but err on the side
of being safe */
return vnc_display_disable_lo... | false | qemu | cf864569cd9134ee503ad9eb6be2881001c0ed80 | int vnc_display_password(DisplayState *ds, const char *password)
{
VncDisplay *vs = vnc_display;
if (!vs) {
return -EINVAL;
}
if (!password) {
return vnc_display_disable_login(ds);
}
if (vs->password) {
g_free(vs->password);
vs->passwo... | {
"code": [],
"line_no": []
} | int FUNC_0(DisplayState *VAR_0, const char *VAR_1)
{
VncDisplay *vs = vnc_display;
if (!vs) {
return -EINVAL;
}
if (!VAR_1) {
return vnc_display_disable_login(VAR_0);
}
if (vs->VAR_1) {
g_free(vs->VAR_1);
vs->VAR_1 = NULL;
}
... | [
"int FUNC_0(DisplayState *VAR_0, const char *VAR_1)\n{",
"VncDisplay *vs = vnc_display;",
"if (!vs) {",
"return -EINVAL;",
"}",
"if (!VAR_1) {",
"return vnc_display_disable_login(VAR_0);",
"}",
"if (vs->VAR_1) {",
"g_free(vs->VAR_1);",
"vs->VAR_1 = NULL;",
"}",
"vs->VAR_1 = g_strdup(VAR_1);"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
]
] |
3,842 | START_TEST(qdict_get_str_test)
{
const char *p;
const char *key = "key";
const char *str = "string";
qdict_put(tests_dict, key, qstring_from_str(str));
p = qdict_get_str(tests_dict, key);
fail_unless(p != NULL);
fail_unless(strcmp(p, str) == 0);
}
| false | qemu | ac531cb6e542b1e61d668604adf9dc5306a948c0 | START_TEST(qdict_get_str_test)
{
const char *p;
const char *key = "key";
const char *str = "string";
qdict_put(tests_dict, key, qstring_from_str(str));
p = qdict_get_str(tests_dict, key);
fail_unless(p != NULL);
fail_unless(strcmp(p, str) == 0);
}
| {
"code": [],
"line_no": []
} | FUNC_0(VAR_0)
{
const char *VAR_1;
const char *VAR_2 = "VAR_2";
const char *VAR_3 = "string";
qdict_put(tests_dict, VAR_2, qstring_from_str(VAR_3));
VAR_1 = qdict_get_str(tests_dict, VAR_2);
fail_unless(VAR_1 != NULL);
fail_unless(strcmp(VAR_1, VAR_3) == 0);
}
| [
"FUNC_0(VAR_0)\n{",
"const char *VAR_1;",
"const char *VAR_2 = \"VAR_2\";",
"const char *VAR_3 = \"string\";",
"qdict_put(tests_dict, VAR_2, qstring_from_str(VAR_3));",
"VAR_1 = qdict_get_str(tests_dict, VAR_2);",
"fail_unless(VAR_1 != NULL);",
"fail_unless(strcmp(VAR_1, VAR_3) == 0);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
3,843 | static void rtas_set_tce_bypass(sPAPREnvironment *spapr, uint32_t token,
uint32_t nargs, target_ulong args,
uint32_t nret, target_ulong rets)
{
VIOsPAPRBus *bus = spapr->vio_bus;
VIOsPAPRDevice *dev;
uint32_t unit, enable;
if (narg... | false | qemu | 210b580b106fa798149e28aa13c66b325a43204e | static void rtas_set_tce_bypass(sPAPREnvironment *spapr, uint32_t token,
uint32_t nargs, target_ulong args,
uint32_t nret, target_ulong rets)
{
VIOsPAPRBus *bus = spapr->vio_bus;
VIOsPAPRDevice *dev;
uint32_t unit, enable;
if (narg... | {
"code": [],
"line_no": []
} | static void FUNC_0(sPAPREnvironment *VAR_0, uint32_t VAR_1,
uint32_t VAR_2, target_ulong VAR_3,
uint32_t VAR_4, target_ulong VAR_5)
{
VIOsPAPRBus *bus = VAR_0->vio_bus;
VIOsPAPRDevice *dev;
uint32_t unit, enable;
if (VAR_2 != 2) {
... | [
"static void FUNC_0(sPAPREnvironment *VAR_0, uint32_t VAR_1,\nuint32_t VAR_2, target_ulong VAR_3,\nuint32_t VAR_4, target_ulong VAR_5)\n{",
"VIOsPAPRBus *bus = VAR_0->vio_bus;",
"VIOsPAPRDevice *dev;",
"uint32_t unit, enable;",
"if (VAR_2 != 2) {",
"rtas_st(VAR_5, 0, -3);",
"return;",
"}",
"unit = r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
... |
3,844 | void uuid_generate(uuid_t out)
{
memset(out, 0, sizeof(uuid_t));
}
| false | qemu | 8ba2aae32c40f544def6be7ae82be9bcb781e01d | void uuid_generate(uuid_t out)
{
memset(out, 0, sizeof(uuid_t));
}
| {
"code": [],
"line_no": []
} | void FUNC_0(uuid_t VAR_0)
{
memset(VAR_0, 0, sizeof(uuid_t));
}
| [
"void FUNC_0(uuid_t VAR_0)\n{",
"memset(VAR_0, 0, sizeof(uuid_t));",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
3,846 | static void test_unaligned_write_same(void)
{
QVirtIOSCSI *vs;
uint8_t buf[512] = { 0 };
const uint8_t write_same_cdb[CDB_SIZE] = { 0x41, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x02, 0x00 };
qvirtio_scsi_start("-drive file=blkdebug::null-co://,if... | false | qemu | 4bb7b0daf8ea34bcc582642d35a2e4902f7841db | static void test_unaligned_write_same(void)
{
QVirtIOSCSI *vs;
uint8_t buf[512] = { 0 };
const uint8_t write_same_cdb[CDB_SIZE] = { 0x41, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x02, 0x00 };
qvirtio_scsi_start("-drive file=blkdebug::null-co:
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
QVirtIOSCSI *vs;
uint8_t buf[512] = { 0 };
const uint8_t VAR_0[CDB_SIZE] = { 0x41, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x02, 0x00 };
qvirtio_scsi_start("-drive file=blkdebug::null-co:
",format... | [
"static void FUNC_0(void)\n{",
"QVirtIOSCSI *vs;",
"uint8_t buf[512] = { 0 };",
"const uint8_t VAR_0[CDB_SIZE] = { 0x41, 0x00, 0x00, 0x00, 0x00,",
"0x01, 0x00, 0x00, 0x02, 0x00 };",
"qvirtio_scsi_start(\"-drive file=blkdebug::null-co:\n\",format=raw,file.align=4k \"\n\"-device scsi-disk,drive=dr1,lun=0,sc... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17,
19
],
[
21
],
[
25,
27
],
[
31
],
[
33
],
[
35
]
] |
3,847 | static void *spapr_build_fdt(sPAPRMachineState *spapr,
hwaddr rtas_addr,
hwaddr rtas_size)
{
MachineState *machine = MACHINE(qdev_get_machine());
MachineClass *mc = MACHINE_GET_CLASS(machine);
sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(ma... | false | qemu | ffbb1705a33df8e2fb12b24d96663d63b22eaf8b | static void *spapr_build_fdt(sPAPRMachineState *spapr,
hwaddr rtas_addr,
hwaddr rtas_size)
{
MachineState *machine = MACHINE(qdev_get_machine());
MachineClass *mc = MACHINE_GET_CLASS(machine);
sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(ma... | {
"code": [],
"line_no": []
} | static void *FUNC_0(sPAPRMachineState *VAR_0,
hwaddr VAR_1,
hwaddr VAR_2)
{
MachineState *machine = MACHINE(qdev_get_machine());
MachineClass *mc = MACHINE_GET_CLASS(machine);
sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(machine);
int ... | [
"static void *FUNC_0(sPAPRMachineState *VAR_0,\nhwaddr VAR_1,\nhwaddr VAR_2)\n{",
"MachineState *machine = MACHINE(qdev_get_machine());",
"MachineClass *mc = MACHINE_GET_CLASS(machine);",
"sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(machine);",
"int VAR_3;",
"void *VAR_4;",
"sPAPRPHBState *phb;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35
],
[
37
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[
59
... |
3,848 | static void cpu_unlink_tb(CPUState *env)
{
#if defined(CONFIG_USE_NPTL)
/* FIXME: TB unchaining isn't SMP safe. For now just ignore the
problem and hope the cpu will stop of its own accord. For userspace
emulation this often isn't actually as bad as it sounds. Often
signals are used pr... | false | qemu | f76cfe56d9bc281685c5120bf765d29d9323756f | static void cpu_unlink_tb(CPUState *env)
{
#if defined(CONFIG_USE_NPTL)
#else
TranslationBlock *tb;
static spinlock_t interrupt_lock = SPIN_LOCK_UNLOCKED;
tb = env->current_tb;
if (tb && !testandset(&interrupt_lock)) {
env->current_tb = NULL;
tb_reset_jump_... | {
"code": [],
"line_no": []
} | static void FUNC_0(CPUState *VAR_0)
{
#if defined(CONFIG_USE_NPTL)
#else
TranslationBlock *tb;
static spinlock_t VAR_1 = SPIN_LOCK_UNLOCKED;
tb = VAR_0->current_tb;
if (tb && !testandset(&VAR_1)) {
VAR_0->current_tb = NULL;
tb_reset_jump_recursive(tb);
... | [
"static void FUNC_0(CPUState *VAR_0)\n{",
"#if defined(CONFIG_USE_NPTL)\n#else\nTranslationBlock *tb;",
"static spinlock_t VAR_1 = SPIN_LOCK_UNLOCKED;",
"tb = VAR_0->current_tb;",
"if (tb && !testandset(&VAR_1)) {",
"VAR_0->current_tb = NULL;",
"tb_reset_jump_recursive(tb);",
"resetlock(&VAR_1);",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
15,
17
],
[
19
],
[
23
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
]
] |
3,849 | void ppc_hash64_store_hpte(PowerPCCPU *cpu, hwaddr ptex,
uint64_t pte0, uint64_t pte1)
{
CPUPPCState *env = &cpu->env;
hwaddr offset = ptex * HASH_PTE_SIZE_64;
if (env->external_htab == MMU_HASH64_KVM_MANAGED_HPT) {
kvmppc_write_hpte(ptex, pte0, pte1);
ret... | false | qemu | e57ca75ce3b2bd33102573a8c0555d62e1bcfceb | void ppc_hash64_store_hpte(PowerPCCPU *cpu, hwaddr ptex,
uint64_t pte0, uint64_t pte1)
{
CPUPPCState *env = &cpu->env;
hwaddr offset = ptex * HASH_PTE_SIZE_64;
if (env->external_htab == MMU_HASH64_KVM_MANAGED_HPT) {
kvmppc_write_hpte(ptex, pte0, pte1);
ret... | {
"code": [],
"line_no": []
} | void FUNC_0(PowerPCCPU *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, uint64_t VAR_3)
{
CPUPPCState *env = &VAR_0->env;
hwaddr offset = VAR_1 * HASH_PTE_SIZE_64;
if (env->external_htab == MMU_HASH64_KVM_MANAGED_HPT) {
kvmppc_write_hpte(VAR_1, VAR_2, VAR_3);
return;... | [
"void FUNC_0(PowerPCCPU *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, uint64_t VAR_3)\n{",
"CPUPPCState *env = &VAR_0->env;",
"hwaddr offset = VAR_1 * HASH_PTE_SIZE_64;",
"if (env->external_htab == MMU_HASH64_KVM_MANAGED_HPT) {",
"kvmppc_write_hpte(VAR_1, VAR_2, VAR_3);",
"return;",
"}",
"if (env->external_h... | [
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
],
[
39
]
] |
3,850 | static int get_last_needed_nal(H264Context *h)
{
int nals_needed = 0;
int i;
for (i = 0; i < h->pkt.nb_nals; i++) {
H2645NAL *nal = &h->pkt.nals[i];
GetBitContext gb;
/* packets can sometimes contain multiple PPS/SPS,
* e.g. two PAFF field pictures in one packet,... | false | FFmpeg | 5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c | static int get_last_needed_nal(H264Context *h)
{
int nals_needed = 0;
int i;
for (i = 0; i < h->pkt.nb_nals; i++) {
H2645NAL *nal = &h->pkt.nals[i];
GetBitContext gb;
switch (nal->type) {
case NAL_SPS:
case NAL_PPS:
nals_neede... | {
"code": [],
"line_no": []
} | static int FUNC_0(H264Context *VAR_0)
{
int VAR_1 = 0;
int VAR_2;
for (VAR_2 = 0; VAR_2 < VAR_0->pkt.nb_nals; VAR_2++) {
H2645NAL *nal = &VAR_0->pkt.nals[VAR_2];
GetBitContext gb;
switch (nal->type) {
case NAL_SPS:
case NAL_PPS:
... | [
"static int FUNC_0(H264Context *VAR_0)\n{",
"int VAR_1 = 0;",
"int VAR_2;",
"for (VAR_2 = 0; VAR_2 < VAR_0->pkt.nb_nals; VAR_2++) {",
"H2645NAL *nal = &VAR_0->pkt.nals[VAR_2];",
"GetBitContext gb;",
"switch (nal->type) {",
"case NAL_SPS:\ncase NAL_PPS:\nVAR_1 = VAR_2;",
"break;",
"case NAL_DPA:\nc... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37,
39,
41,
43
],
[
45,
47
],
[
49
],
[
51
],
[
55
],
[
57
]
] |
3,851 | static void *qemu_tcg_rr_cpu_thread_fn(void *arg)
{
CPUState *cpu = arg;
rcu_register_thread();
qemu_mutex_lock_iothread();
qemu_thread_get_self(cpu->thread);
CPU_FOREACH(cpu) {
cpu->thread_id = qemu_get_thread_id();
cpu->created = true;
cpu->can_do_io = 1;
... | false | qemu | 6b8f0187a4d7c263e356302f8d308655372a4b5b | static void *qemu_tcg_rr_cpu_thread_fn(void *arg)
{
CPUState *cpu = arg;
rcu_register_thread();
qemu_mutex_lock_iothread();
qemu_thread_get_self(cpu->thread);
CPU_FOREACH(cpu) {
cpu->thread_id = qemu_get_thread_id();
cpu->created = true;
cpu->can_do_io = 1;
... | {
"code": [],
"line_no": []
} | static void *FUNC_0(void *VAR_0)
{
CPUState *cpu = VAR_0;
rcu_register_thread();
qemu_mutex_lock_iothread();
qemu_thread_get_self(cpu->thread);
CPU_FOREACH(cpu) {
cpu->thread_id = qemu_get_thread_id();
cpu->created = true;
cpu->can_do_io = 1;
}
qemu_c... | [
"static void *FUNC_0(void *VAR_0)\n{",
"CPUState *cpu = VAR_0;",
"rcu_register_thread();",
"qemu_mutex_lock_iothread();",
"qemu_thread_get_self(cpu->thread);",
"CPU_FOREACH(cpu) {",
"cpu->thread_id = qemu_get_thread_id();",
"cpu->created = true;",
"cpu->can_do_io = 1;",
"}",
"qemu_cond_signal(&q... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
59... |
3,852 | static QPCIDevice *start_ahci_device(QPCIDevice *ahci, void **hba_base)
{
/* Map AHCI's ABAR (BAR5) */
*hba_base = qpci_iomap(ahci, 5, NULL);
/* turns on pci.cmd.iose, pci.cmd.mse and pci.cmd.bme */
qpci_device_enable(ahci);
return ahci;
}
| false | qemu | c2f3029fbc5e7beb4cfb7ac264e10838fada524e | static QPCIDevice *start_ahci_device(QPCIDevice *ahci, void **hba_base)
{
*hba_base = qpci_iomap(ahci, 5, NULL);
qpci_device_enable(ahci);
return ahci;
}
| {
"code": [],
"line_no": []
} | static QPCIDevice *FUNC_0(QPCIDevice *ahci, void **hba_base)
{
*hba_base = qpci_iomap(ahci, 5, NULL);
qpci_device_enable(ahci);
return ahci;
}
| [
"static QPCIDevice *FUNC_0(QPCIDevice *ahci, void **hba_base)\n{",
"*hba_base = qpci_iomap(ahci, 5, NULL);",
"qpci_device_enable(ahci);",
"return ahci;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
13
],
[
17
],
[
19
]
] |
3,853 | static DriveInfo *blockdev_init(const char *file, QDict *bs_opts,
BlockInterfaceType type,
Error **errp)
{
const char *buf;
const char *serial;
int ro = 0;
int bdrv_flags = 0;
int on_read_error, on_write_error;
DriveInfo *d... | false | qemu | ee13ed1cbc5f7f848e417f587c93ca1f36d83eb0 | static DriveInfo *blockdev_init(const char *file, QDict *bs_opts,
BlockInterfaceType type,
Error **errp)
{
const char *buf;
const char *serial;
int ro = 0;
int bdrv_flags = 0;
int on_read_error, on_write_error;
DriveInfo *d... | {
"code": [],
"line_no": []
} | static DriveInfo *FUNC_0(const char *file, QDict *bs_opts,
BlockInterfaceType type,
Error **errp)
{
const char *VAR_0;
const char *VAR_1;
int VAR_2 = 0;
int VAR_3 = 0;
int VAR_4, VAR_5;
DriveInfo *dinfo;
ThrottleConfig... | [
"static DriveInfo *FUNC_0(const char *file, QDict *bs_opts,\nBlockInterfaceType type,\nError **errp)\n{",
"const char *VAR_0;",
"const char *VAR_1;",
"int VAR_2 = 0;",
"int VAR_3 = 0;",
"int VAR_4, VAR_5;",
"DriveInfo *dinfo;",
"ThrottleConfig cfg;",
"int VAR_6 = 0;",
"bool copy_on_read;",
"int ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
45
],
[
47
],
[
49
... |
3,854 | static void tcp_chr_connect(void *opaque)
{
CharDriverState *chr = opaque;
TCPCharDriver *s = chr->opaque;
struct sockaddr_storage ss, ps;
socklen_t ss_len = sizeof(ss), ps_len = sizeof(ps);
memset(&ss, 0, ss_len);
if (getsockname(s->fd, (struct sockaddr *) &ss, &ss_len) != 0) {
... | false | qemu | 0ff0fad23d3693ecf7a0c462cdb48f0e60f93808 | static void tcp_chr_connect(void *opaque)
{
CharDriverState *chr = opaque;
TCPCharDriver *s = chr->opaque;
struct sockaddr_storage ss, ps;
socklen_t ss_len = sizeof(ss), ps_len = sizeof(ps);
memset(&ss, 0, ss_len);
if (getsockname(s->fd, (struct sockaddr *) &ss, &ss_len) != 0) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
CharDriverState *chr = VAR_0;
TCPCharDriver *s = chr->VAR_0;
struct sockaddr_storage VAR_1, VAR_2;
socklen_t ss_len = sizeof(VAR_1), ps_len = sizeof(VAR_2);
memset(&VAR_1, 0, ss_len);
if (getsockname(s->fd, (struct sockaddr *) &VAR_1, &ss_len) != 0) {
... | [
"static void FUNC_0(void *VAR_0)\n{",
"CharDriverState *chr = VAR_0;",
"TCPCharDriver *s = chr->VAR_0;",
"struct sockaddr_storage VAR_1, VAR_2;",
"socklen_t ss_len = sizeof(VAR_1), ps_len = sizeof(VAR_2);",
"memset(&VAR_1, 0, ss_len);",
"if (getsockname(s->fd, (struct sockaddr *) &VAR_1, &ss_len) != 0) ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
31,
33,
35
],
[
37
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[... |
3,855 | static inline int get_bat(CPUPPCState *env, mmu_ctx_t *ctx,
target_ulong virtual, int rw, int type)
{
target_ulong *BATlt, *BATut, *BATu, *BATl;
target_ulong BEPIl, BEPIu, bl;
int i, valid, prot;
int ret = -1;
LOG_BATS("%s: %cBAT v " TARGET_FMT_lx "\n", __func__,
... | false | qemu | 629bd516fda67c95ba1c7d1393bacb9e68ea0712 | static inline int get_bat(CPUPPCState *env, mmu_ctx_t *ctx,
target_ulong virtual, int rw, int type)
{
target_ulong *BATlt, *BATut, *BATu, *BATl;
target_ulong BEPIl, BEPIu, bl;
int i, valid, prot;
int ret = -1;
LOG_BATS("%s: %cBAT v " TARGET_FMT_lx "\n", __func__,
... | {
"code": [],
"line_no": []
} | static inline int FUNC_0(CPUPPCState *VAR_0, mmu_ctx_t *VAR_1,
target_ulong VAR_2, int VAR_3, int VAR_4)
{
target_ulong *BATlt, *BATut, *BATu, *BATl;
target_ulong BEPIl, BEPIu, bl;
int VAR_5, VAR_6, VAR_7;
int VAR_8 = -1;
LOG_BATS("%s: %cBAT v " TARGET_FMT_lx "\n",... | [
"static inline int FUNC_0(CPUPPCState *VAR_0, mmu_ctx_t *VAR_1,\ntarget_ulong VAR_2, int VAR_3, int VAR_4)\n{",
"target_ulong *BATlt, *BATut, *BATu, *BATl;",
"target_ulong BEPIl, BEPIu, bl;",
"int VAR_5, VAR_6, VAR_7;",
"int VAR_8 = -1;",
"LOG_BATS(\"%s: %cBAT v \" TARGET_FMT_lx \"\\n\", __func__,\nVAR_4 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
3,856 | static void ehci_flush_qh(EHCIQueue *q)
{
uint32_t *qh = (uint32_t *) &q->qh;
uint32_t dwords = sizeof(EHCIqh) >> 2;
uint32_t addr = NLPTR_GET(q->qhaddr);
put_dwords(addr + 3 * sizeof(uint32_t), qh + 3, dwords - 3);
}
| false | qemu | 68d553587c0aa271c3eb2902921b503740d775b6 | static void ehci_flush_qh(EHCIQueue *q)
{
uint32_t *qh = (uint32_t *) &q->qh;
uint32_t dwords = sizeof(EHCIqh) >> 2;
uint32_t addr = NLPTR_GET(q->qhaddr);
put_dwords(addr + 3 * sizeof(uint32_t), qh + 3, dwords - 3);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(EHCIQueue *VAR_0)
{
uint32_t *qh = (uint32_t *) &VAR_0->qh;
uint32_t dwords = sizeof(EHCIqh) >> 2;
uint32_t addr = NLPTR_GET(VAR_0->qhaddr);
put_dwords(addr + 3 * sizeof(uint32_t), qh + 3, dwords - 3);
}
| [
"static void FUNC_0(EHCIQueue *VAR_0)\n{",
"uint32_t *qh = (uint32_t *) &VAR_0->qh;",
"uint32_t dwords = sizeof(EHCIqh) >> 2;",
"uint32_t addr = NLPTR_GET(VAR_0->qhaddr);",
"put_dwords(addr + 3 * sizeof(uint32_t), qh + 3, dwords - 3);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
]
] |
3,857 | static void v9fs_statfs(void *opaque)
{
int32_t fid;
ssize_t retval = 0;
size_t offset = 7;
V9fsFidState *fidp;
struct statfs stbuf;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "d", &fid);
fidp = get_fid(pdu, fid);
if (fidp == NULL) {
... | false | qemu | ddca7f86ac022289840e0200fd4050b2b58e9176 | static void v9fs_statfs(void *opaque)
{
int32_t fid;
ssize_t retval = 0;
size_t offset = 7;
V9fsFidState *fidp;
struct statfs stbuf;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "d", &fid);
fidp = get_fid(pdu, fid);
if (fidp == NULL) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
int32_t fid;
ssize_t retval = 0;
size_t offset = 7;
V9fsFidState *fidp;
struct statfs VAR_1;
V9fsPDU *pdu = VAR_0;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "d", &fid);
fidp = get_fid(pdu, fid);
if (fidp == NULL) {
r... | [
"static void FUNC_0(void *VAR_0)\n{",
"int32_t fid;",
"ssize_t retval = 0;",
"size_t offset = 7;",
"V9fsFidState *fidp;",
"struct statfs VAR_1;",
"V9fsPDU *pdu = VAR_0;",
"V9fsState *s = pdu->s;",
"pdu_unmarshal(pdu, offset, \"d\", &fid);",
"fidp = get_fid(pdu, fid);",
"if (fidp == 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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
3,860 | static enum AVPixelFormat get_chroma_format(SchroChromaFormat schro_pix_fmt)
{
int num_formats = sizeof(schro_pixel_format_map) /
sizeof(schro_pixel_format_map[0]);
int idx;
for (idx = 0; idx < num_formats; ++idx)
if (schro_pixel_format_map[idx].schro_pix_fmt == schro_p... | true | FFmpeg | 220b24c7c97dc033ceab1510549f66d0e7b52ef1 | static enum AVPixelFormat get_chroma_format(SchroChromaFormat schro_pix_fmt)
{
int num_formats = sizeof(schro_pixel_format_map) /
sizeof(schro_pixel_format_map[0]);
int idx;
for (idx = 0; idx < num_formats; ++idx)
if (schro_pixel_format_map[idx].schro_pix_fmt == schro_p... | {
"code": [
" int idx;",
"static enum AVPixelFormat get_chroma_format(SchroChromaFormat schro_pix_fmt)",
" int num_formats = sizeof(schro_pixel_format_map) /",
" sizeof(schro_pixel_format_map[0]);",
" int idx;",
" for (idx = 0; idx < num_formats; ++idx)",
"... | static enum AVPixelFormat FUNC_0(SchroChromaFormat VAR_0)
{
int VAR_1 = sizeof(schro_pixel_format_map) /
sizeof(schro_pixel_format_map[0]);
int VAR_2;
for (VAR_2 = 0; VAR_2 < VAR_1; ++VAR_2)
if (schro_pixel_format_map[VAR_2].VAR_0 == VAR_0)
return schro_pix... | [
"static enum AVPixelFormat FUNC_0(SchroChromaFormat VAR_0)\n{",
"int VAR_1 = sizeof(schro_pixel_format_map) /\nsizeof(schro_pixel_format_map[0]);",
"int VAR_2;",
"for (VAR_2 = 0; VAR_2 < VAR_1; ++VAR_2)",
"if (schro_pixel_format_map[VAR_2].VAR_0 == VAR_0)\nreturn schro_pixel_format_map[VAR_2].ff_pix_fmt;",
... | [
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
]
] |
3,861 | static void disas_uncond_b_reg(DisasContext *s, uint32_t insn)
{
unsigned int opc, op2, op3, rn, op4;
opc = extract32(insn, 21, 4);
op2 = extract32(insn, 16, 5);
op3 = extract32(insn, 10, 6);
rn = extract32(insn, 5, 5);
op4 = extract32(insn, 0, 5);
if (op4 != 0x0 || op3 != 0x0 ||... | true | qemu | 52e60cdd342dc48116edb81b443ba8c0a0c6f1a3 | static void disas_uncond_b_reg(DisasContext *s, uint32_t insn)
{
unsigned int opc, op2, op3, rn, op4;
opc = extract32(insn, 21, 4);
op2 = extract32(insn, 16, 5);
op3 = extract32(insn, 10, 6);
rn = extract32(insn, 5, 5);
op4 = extract32(insn, 0, 5);
if (op4 != 0x0 || op3 != 0x0 ||... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1)
{
unsigned int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;
VAR_2 = extract32(VAR_1, 21, 4);
VAR_3 = extract32(VAR_1, 16, 5);
VAR_4 = extract32(VAR_1, 10, 6);
VAR_5 = extract32(VAR_1, 5, 5);
VAR_6 = extract32(VAR_1, 0, 5);
if (VAR_6 !... | [
"static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1)\n{",
"unsigned int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;",
"VAR_2 = extract32(VAR_1, 21, 4);",
"VAR_3 = extract32(VAR_1, 16, 5);",
"VAR_4 = extract32(VAR_1, 10, 6);",
"VAR_5 = extract32(VAR_1, 5, 5);",
"VAR_6 = extract32(VAR_1, 0, 5);",
"if (VAR_6 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
26
],
[
30
],
[
32,
34,
36
],
[
38,
40
],
[
42
],
[
44,
49,
51
],
[
53
],
[
55
],
... |
3,862 | static uint32_t openpic_cpu_read_internal(void *opaque, hwaddr addr,
int idx)
{
OpenPICState *opp = opaque;
IRQ_src_t *src;
IRQ_dst_t *dst;
uint32_t retval;
int n_IRQ;
DPRINTF("%s: cpu %d addr " TARGET_FMT_plx "\n", __func__, idx, addr);
r... | true | qemu | af7e9e74c6a62a5bcd911726a9e88d28b61490e0 | static uint32_t openpic_cpu_read_internal(void *opaque, hwaddr addr,
int idx)
{
OpenPICState *opp = opaque;
IRQ_src_t *src;
IRQ_dst_t *dst;
uint32_t retval;
int n_IRQ;
DPRINTF("%s: cpu %d addr " TARGET_FMT_plx "\n", __func__, idx, addr);
r... | {
"code": [
" IRQ_dst_t *dst;",
" IRQ_src_t *src;",
" IRQ_src_t *src;",
" IRQ_src_t *src;",
" IRQ_dst_t *dst;",
" if (addr & 0xF)",
" if (addr & 0xF)",
" if (addr & 0xF)",
" if (addr & 0xF)",
" if (addr & 0xF)",
" IRQ_src_t *src;",
" ... | static uint32_t FUNC_0(void *opaque, hwaddr addr,
int idx)
{
OpenPICState *opp = opaque;
IRQ_src_t *src;
IRQ_dst_t *dst;
uint32_t retval;
int VAR_0;
DPRINTF("%s: cpu %d addr " TARGET_FMT_plx "\n", __func__, idx, addr);
retval = 0xFFFFFFFF;... | [
"static uint32_t FUNC_0(void *opaque, hwaddr addr,\nint idx)\n{",
"OpenPICState *opp = opaque;",
"IRQ_src_t *src;",
"IRQ_dst_t *dst;",
"uint32_t retval;",
"int VAR_0;",
"DPRINTF(\"%s: cpu %d addr \" TARGET_FMT_plx \"\\n\", __func__, idx, addr);",
"retval = 0xFFFFFFFF;",
"if (idx < 0) {",
"return r... | [
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49,
51
... |
3,863 | static const unsigned char *seq_decode_op3(SeqVideoContext *seq, const unsigned char *src, unsigned char *dst)
{
int pos, offset;
do {
pos = *src++;
offset = ((pos >> 3) & 7) * seq->frame.linesize[0] + (pos & 7);
dst[offset] = *src++;
} while (!(pos & 0x80));
return s... | true | FFmpeg | 5d7e3d71673d64a16b58430a0027afadb6b3a54e | static const unsigned char *seq_decode_op3(SeqVideoContext *seq, const unsigned char *src, unsigned char *dst)
{
int pos, offset;
do {
pos = *src++;
offset = ((pos >> 3) & 7) * seq->frame.linesize[0] + (pos & 7);
dst[offset] = *src++;
} while (!(pos & 0x80));
return s... | {
"code": [
"static const unsigned char *seq_decode_op3(SeqVideoContext *seq, const unsigned char *src, unsigned char *dst)"
],
"line_no": [
1
]
} | static const unsigned char *FUNC_0(SeqVideoContext *VAR_0, const unsigned char *VAR_1, unsigned char *VAR_2)
{
int VAR_3, VAR_4;
do {
VAR_3 = *VAR_1++;
VAR_4 = ((VAR_3 >> 3) & 7) * VAR_0->frame.linesize[0] + (VAR_3 & 7);
VAR_2[VAR_4] = *VAR_1++;
} while (!(VAR_3 & 0x80));
... | [
"static const unsigned char *FUNC_0(SeqVideoContext *VAR_0, const unsigned char *VAR_1, unsigned char *VAR_2)\n{",
"int VAR_3, VAR_4;",
"do {",
"VAR_3 = *VAR_1++;",
"VAR_4 = ((VAR_3 >> 3) & 7) * VAR_0->frame.linesize[0] + (VAR_3 & 7);",
"VAR_2[VAR_4] = *VAR_1++;",
"} while (!(VAR_3 & 0x80));",
"return... | [
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
3,864 | static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
{
Vp3DecodeContext *s = avctx->priv_data;
int visible_width, visible_height, colorspace;
int offset_x = 0, offset_y = 0;
AVRational fps, aspect;
s->theora = get_bits_long(gb, 24);
av_log(avctx, AV_LOG_DEBUG, "Theo... | true | FFmpeg | a56d963f111b1a192cdabb05500f8083bd77ca93 | static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
{
Vp3DecodeContext *s = avctx->priv_data;
int visible_width, visible_height, colorspace;
int offset_x = 0, offset_y = 0;
AVRational fps, aspect;
s->theora = get_bits_long(gb, 24);
av_log(avctx, AV_LOG_DEBUG, "Theo... | {
"code": [
" if (fps.num && fps.den) {"
],
"line_no": [
75
]
} | static int FUNC_0(AVCodecContext *VAR_0, GetBitContext *VAR_1)
{
Vp3DecodeContext *s = VAR_0->priv_data;
int VAR_2, VAR_3, VAR_4;
int VAR_5 = 0, VAR_6 = 0;
AVRational fps, aspect;
s->theora = get_bits_long(VAR_1, 24);
av_log(VAR_0, AV_LOG_DEBUG, "Theora bitstream version %X\n", s->theor... | [
"static int FUNC_0(AVCodecContext *VAR_0, GetBitContext *VAR_1)\n{",
"Vp3DecodeContext *s = VAR_0->priv_data;",
"int VAR_2, VAR_3, VAR_4;",
"int VAR_5 = 0, VAR_6 = 0;",
"AVRational fps, aspect;",
"s->theora = get_bits_long(VAR_1, 24);",
"av_log(VAR_0, AV_LOG_DEBUG, \"Theora bitstream version %X\\n\", s-... | [
0,
0,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[... |
3,865 | static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt)
{
CDXLDemuxContext *cdxl = s->priv_data;
AVIOContext *pb = s->pb;
uint32_t current_size, video_size, image_size;
uint16_t audio_size, palette_size, width, height;
int64_t pos;
int ret;
if (pb->eof_reached)
... | true | FFmpeg | d7804de351da059bf0c41c2bc2bbc02dbb755c0f | static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt)
{
CDXLDemuxContext *cdxl = s->priv_data;
AVIOContext *pb = s->pb;
uint32_t current_size, video_size, image_size;
uint16_t audio_size, palette_size, width, height;
int64_t pos;
int ret;
if (pb->eof_reached)
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
CDXLDemuxContext *cdxl = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
uint32_t current_size, video_size, image_size;
uint16_t audio_size, palette_size, width, height;
int64_t pos;
int VAR_2;
if (pb->eof_reached)
... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"CDXLDemuxContext *cdxl = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"uint32_t current_size, video_size, image_size;",
"uint16_t audio_size, palette_size, width, height;",
"int64_t pos;",
"int VAR_2;",
"if (pb->eof_reached... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
3,866 | static ssize_t gem_receive(NetClientState *nc, const uint8_t *buf, size_t size)
{
CadenceGEMState *s;
unsigned rxbufsize, bytes_to_copy;
unsigned rxbuf_offset;
uint8_t rxbuf[2048];
uint8_t *rxbuf_ptr;
bool first_desc = true;
int maf;
s = qemu_get_nic_opaque(nc);
... | true | qemu | 244381ec19ce1412b474f41b5f30fe1da846451b | static ssize_t gem_receive(NetClientState *nc, const uint8_t *buf, size_t size)
{
CadenceGEMState *s;
unsigned rxbufsize, bytes_to_copy;
unsigned rxbuf_offset;
uint8_t rxbuf[2048];
uint8_t *rxbuf_ptr;
bool first_desc = true;
int maf;
s = qemu_get_nic_opaque(nc);
... | {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(NetClientState *nc, const uint8_t *buf, size_t size)
{
CadenceGEMState *s;
unsigned VAR_0, VAR_1;
unsigned VAR_2;
uint8_t rxbuf[2048];
uint8_t *rxbuf_ptr;
bool first_desc = true;
int VAR_3;
s = qemu_get_nic_opaque(nc);
VAR_3 = gem_ma... | [
"static ssize_t FUNC_0(NetClientState *nc, const uint8_t *buf, size_t size)\n{",
"CadenceGEMState *s;",
"unsigned VAR_0, VAR_1;",
"unsigned VAR_2;",
"uint8_t rxbuf[2048];",
"uint8_t *rxbuf_ptr;",
"bool first_desc = true;",
"int VAR_3;",
"s = qemu_get_nic_opaque(nc);",
"VAR_3 = gem_mac_add... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29
],
[
31
],
[
38
],
[
40
],
[
46
],
[
50
],
[
52
],
[
56
],
[
69,
71
],
[... |
3,867 | static int mpegts_read_close(AVFormatContext *s)
{
MpegTSContext *ts = s->priv_data;
int i;
clear_programs(ts);
for(i=0;i<NB_PID_MAX;i++)
if (ts->pids[i]) mpegts_close_filter(ts, ts->pids[i]);
return 0;
}
| true | FFmpeg | a717f9904227d7979473bad40c50eb40af41d01d | static int mpegts_read_close(AVFormatContext *s)
{
MpegTSContext *ts = s->priv_data;
int i;
clear_programs(ts);
for(i=0;i<NB_PID_MAX;i++)
if (ts->pids[i]) mpegts_close_filter(ts, ts->pids[i]);
return 0;
}
| {
"code": [
"static int mpegts_read_close(AVFormatContext *s)",
" MpegTSContext *ts = s->priv_data;",
" int i;",
" for(i=0;i<NB_PID_MAX;i++)"
],
"line_no": [
1,
5,
7,
15
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
MpegTSContext *ts = VAR_0->priv_data;
int VAR_1;
clear_programs(ts);
for(VAR_1=0;VAR_1<NB_PID_MAX;VAR_1++)
if (ts->pids[VAR_1]) mpegts_close_filter(ts, ts->pids[VAR_1]);
return 0;
}
| [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"MpegTSContext *ts = VAR_0->priv_data;",
"int VAR_1;",
"clear_programs(ts);",
"for(VAR_1=0;VAR_1<NB_PID_MAX;VAR_1++)",
"if (ts->pids[VAR_1]) mpegts_close_filter(ts, ts->pids[VAR_1]);",
"return 0;",
"}"
] | [
1,
1,
1,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
3,868 | int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
enum AVSampleFormat sample_fmt, int align)
{
int line_size;
int sample_size = av_get_bytes_per_sample(sample_fmt);
int planar = av_sample_fmt_is_planar(sample_fmt);
/* validate para... | true | FFmpeg | 0e830094ad0dc251613a0aa3234d9c5c397e02e6 | int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
enum AVSampleFormat sample_fmt, int align)
{
int line_size;
int sample_size = av_get_bytes_per_sample(sample_fmt);
int planar = av_sample_fmt_is_planar(sample_fmt);
if (!sampl... | {
"code": [],
"line_no": []
} | int FUNC_0(int *VAR_0, int VAR_1, int VAR_2,
enum AVSampleFormat VAR_3, int VAR_4)
{
int VAR_5;
int VAR_6 = av_get_bytes_per_sample(VAR_3);
int VAR_7 = av_sample_fmt_is_planar(VAR_3);
if (!VAR_6 || VAR_2 <= 0 || VAR_1 <= 0)
if (!VAR_4) {
... | [
"int FUNC_0(int *VAR_0, int VAR_1, int VAR_2,\nenum AVSampleFormat VAR_3, int VAR_4)\n{",
"int VAR_5;",
"int VAR_6 = av_get_bytes_per_sample(VAR_3);",
"int VAR_7 = av_sample_fmt_is_planar(VAR_3);",
"if (!VAR_6 || VAR_2 <= 0 || VAR_1 <= 0)\nif (!VAR_4) {",
"VAR_4 = 1;",
"VAR_2 = FFALIGN(VAR_2, 32);"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
17,
24
],
[
28
],
[
30
],
[
32
],
[
38,
40,
45,
47
],
[
49,
51
],
[
55
],
[
57
]
] |
3,869 | int pt_setxattr(FsContext *ctx, const char *path, const char *name, void *value,
size_t size, int flags)
{
char *buffer;
int ret;
buffer = rpath(ctx, path);
ret = lsetxattr(buffer, name, value, size, flags);
g_free(buffer);
return ret;
}
| true | qemu | 3e36aba757f76673007a80b3cd56a4062c2e3462 | int pt_setxattr(FsContext *ctx, const char *path, const char *name, void *value,
size_t size, int flags)
{
char *buffer;
int ret;
buffer = rpath(ctx, path);
ret = lsetxattr(buffer, name, value, size, flags);
g_free(buffer);
return ret;
}
| {
"code": [
" char *buffer;",
" int ret;",
" buffer = rpath(ctx, path);",
" g_free(buffer);",
" return ret;",
" char *buffer;",
" int ret;",
" buffer = rpath(ctx, path);",
" g_free(buffer);",
" return ret;",
" char *buffer;",
" int re... | int FUNC_0(FsContext *VAR_0, const char *VAR_1, const char *VAR_2, void *VAR_3,
size_t VAR_4, int VAR_5)
{
char *VAR_6;
int VAR_7;
VAR_6 = rpath(VAR_0, VAR_1);
VAR_7 = lsetxattr(VAR_6, VAR_2, VAR_3, VAR_4, VAR_5);
g_free(VAR_6);
return VAR_7;
}
| [
"int FUNC_0(FsContext *VAR_0, const char *VAR_1, const char *VAR_2, void *VAR_3,\nsize_t VAR_4, int VAR_5)\n{",
"char *VAR_6;",
"int VAR_7;",
"VAR_6 = rpath(VAR_0, VAR_1);",
"VAR_7 = lsetxattr(VAR_6, VAR_2, VAR_3, VAR_4, VAR_5);",
"g_free(VAR_6);",
"return VAR_7;",
"}"
] | [
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
3,870 | static void gen_b(DisasContext *ctx)
{
target_ulong li, target;
ctx->exception = POWERPC_EXCP_BRANCH;
/* sign extend LI */
#if defined(TARGET_PPC64)
if (ctx->sf_mode)
li = ((int64_t)LI(ctx->opcode) << 38) >> 38;
else
#endif
li = ((int32_t)LI(ctx->opcode) << 6) >> 6;
... | true | qemu | 697ab892786d47008807a49f57b2fd86adfcd098 | static void gen_b(DisasContext *ctx)
{
target_ulong li, target;
ctx->exception = POWERPC_EXCP_BRANCH;
#if defined(TARGET_PPC64)
if (ctx->sf_mode)
li = ((int64_t)LI(ctx->opcode) << 38) >> 38;
else
#endif
li = ((int32_t)LI(ctx->opcode) << 6) >> 6;
if (likely(AA(ctx->o... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0)
{
target_ulong li, target;
VAR_0->exception = POWERPC_EXCP_BRANCH;
#if defined(TARGET_PPC64)
if (VAR_0->sf_mode)
li = ((int64_t)LI(VAR_0->opcode) << 38) >> 38;
else
#endif
li = ((int32_t)LI(VAR_0->opcode) << 6) >> 6;
if (likel... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"target_ulong li, target;",
"VAR_0->exception = POWERPC_EXCP_BRANCH;",
"#if defined(TARGET_PPC64)\nif (VAR_0->sf_mode)\nli = ((int64_t)LI(VAR_0->opcode) << 38) >> 38;",
"else\n#endif\nli = ((int32_t)LI(VAR_0->opcode) << 6) >> 6;",
"if (likely(AA(VAR_0->opcode)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13,
15,
17
],
[
19,
21,
23
],
[
25,
27
],
[
29,
31
],
[
33,
35
],
[
38
],
[
40
]
] |
3,871 | bool qdict_get_bool(const QDict *qdict, const char *key)
{
QObject *obj = qdict_get_obj(qdict, key, QTYPE_QBOOL);
return qbool_get_bool(qobject_to_qbool(obj));
}
| true | qemu | 14b6160099f0caf5dc9d62e637b007bc5d719a96 | bool qdict_get_bool(const QDict *qdict, const char *key)
{
QObject *obj = qdict_get_obj(qdict, key, QTYPE_QBOOL);
return qbool_get_bool(qobject_to_qbool(obj));
}
| {
"code": [
" QObject *obj = qdict_get_obj(qdict, key, QTYPE_QBOOL);",
" return qbool_get_bool(qobject_to_qbool(obj));",
" return qbool_get_bool(qobject_to_qbool(obj));"
],
"line_no": [
5,
7,
7
]
} | bool FUNC_0(const QDict *qdict, const char *key)
{
QObject *obj = qdict_get_obj(qdict, key, QTYPE_QBOOL);
return qbool_get_bool(qobject_to_qbool(obj));
}
| [
"bool FUNC_0(const QDict *qdict, const char *key)\n{",
"QObject *obj = qdict_get_obj(qdict, key, QTYPE_QBOOL);",
"return qbool_get_bool(qobject_to_qbool(obj));",
"}"
] | [
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
3,872 | static void adx_encode(unsigned char *adx,const short *wav,
ADXChannelState *prev)
{
int scale;
int i;
int s0,s1,s2,d;
int max=0;
int min=0;
int data[32];
s1 = prev->s1;
s2 = prev->s2;
for(i=0;i<32;i++) {
s0 = wav[i];
d = ((s0<<14... | true | FFmpeg | 954d94dd5e13ba7a5e9e049d0f980bddced9644c | static void adx_encode(unsigned char *adx,const short *wav,
ADXChannelState *prev)
{
int scale;
int i;
int s0,s1,s2,d;
int max=0;
int min=0;
int data[32];
s1 = prev->s1;
s2 = prev->s2;
for(i=0;i<32;i++) {
s0 = wav[i];
d = ((s0<<14... | {
"code": [
" d = ((s0<<14) - SCALE1*s1 + SCALE2*s2)/BASEVOL;"
],
"line_no": [
29
]
} | static void FUNC_0(unsigned char *VAR_0,const short *VAR_1,
ADXChannelState *VAR_2)
{
int VAR_3;
int VAR_4;
int VAR_5,VAR_6,VAR_7,VAR_8;
int VAR_9=0;
int VAR_10=0;
int VAR_11[32];
VAR_6 = VAR_2->VAR_6;
VAR_7 = VAR_2->VAR_7;
for(VAR_4=0;VAR_4<32;VAR... | [
"static void FUNC_0(unsigned char *VAR_0,const short *VAR_1,\nADXChannelState *VAR_2)\n{",
"int VAR_3;",
"int VAR_4;",
"int VAR_5,VAR_6,VAR_7,VAR_8;",
"int VAR_9=0;",
"int VAR_10=0;",
"int VAR_11[32];",
"VAR_6 = VAR_2->VAR_6;",
"VAR_7 = VAR_2->VAR_7;",
"for(VAR_4=0;VAR_4<32;VAR_4++) {",
"VAR_5 =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
3,874 | static int coroutine_fn bdrv_aligned_pwritev(BlockDriverState *bs,
BdrvTrackedRequest *req, int64_t offset, unsigned int bytes,
int64_t align, QEMUIOVector *qiov, int flags)
{
BlockDriver *drv = bs->drv;
bool waited;
int ret;
int64_t start_sector = offset >> BDRV_SECTOR_BITS;
int64... | true | qemu | 3ff2f67a7c24183fcbcfe1332e5223ac6f96438c | static int coroutine_fn bdrv_aligned_pwritev(BlockDriverState *bs,
BdrvTrackedRequest *req, int64_t offset, unsigned int bytes,
int64_t align, QEMUIOVector *qiov, int flags)
{
BlockDriver *drv = bs->drv;
bool waited;
int ret;
int64_t start_sector = offset >> BDRV_SECTOR_BITS;
int64... | {
"code": [],
"line_no": []
} | static int VAR_0 bdrv_aligned_pwritev(BlockDriverState *bs,
BdrvTrackedRequest *req, int64_t offset, unsigned int bytes,
int64_t align, QEMUIOVector *qiov, int flags)
{
BlockDriver *drv = bs->drv;
bool waited;
int ret;
int64_t start_sector = offset >> BDRV_SECTOR_BITS;
int64_t end_... | [
"static int VAR_0 bdrv_aligned_pwritev(BlockDriverState *bs,\nBdrvTrackedRequest *req, int64_t offset, unsigned int bytes,\nint64_t align, QEMUIOVector *qiov, int flags)\n{",
"BlockDriver *drv = bs->drv;",
"bool waited;",
"int ret;",
"int64_t start_sector = offset >> BDRV_SECTOR_BITS;",
"int64_t end_secto... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
51,
53,
55
... |
3,875 | int ff_dxva2_common_end_frame(AVCodecContext *avctx, AVFrame *frame,
const void *pp, unsigned pp_size,
const void *qm, unsigned qm_size,
int (*commit_bs_si)(AVCodecContext *,
D... | false | FFmpeg | 70143a3954e1c4412efb2bf1a3a818adea2d3abf | int ff_dxva2_common_end_frame(AVCodecContext *avctx, AVFrame *frame,
const void *pp, unsigned pp_size,
const void *qm, unsigned qm_size,
int (*commit_bs_si)(AVCodecContext *,
D... | {
"code": [],
"line_no": []
} | VAR_7intVAR_7 VAR_7ff_dxva2_common_end_frameVAR_7(VAR_7AVCodecContextVAR_7 *VAR_7VAR_0VAR_7, VAR_7AVFrameVAR_7 *VAR_7VAR_1VAR_7,
VAR_7constVAR_7 VAR_7voidVAR_7 *VAR_7VAR_2VAR_7, VAR_7unsignedVAR_7 VAR_7VAR_3VAR_7,
VAR_7constVAR_7 VAR_7voidVAR_7 *VAR_7VAR_4VA... | [
"VAR_7intVAR_7 VAR_7ff_dxva2_common_end_frameVAR_7(VAR_7AVCodecContextVAR_7 *VAR_7VAR_0VAR_7, VAR_7AVFrameVAR_7 *VAR_7VAR_1VAR_7,\nVAR_7constVAR_7 VAR_7voidVAR_7 *VAR_7VAR_2VAR_7, VAR_7unsignedVAR_7 VAR_7VAR_3VAR_7,\nVAR_7constVAR_7 VAR_7voidVAR_7 *VAR_7VAR_4VAR_7, VAR_7unsignedVAR_7 VAR_7VAR_5VAR_7,\nVAR_7intVAR_7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
41
],
[
43
],
[
45,
47,
49,
51,
53
],
[
55,
57,... |
3,876 | static void put_no_rnd_pixels_x2_mmx( UINT8 *block, const UINT8 *pixels, int line_size, int h)
{
UINT8 *p;
const UINT8 *pix;
p = block;
pix = pixels;
MOVQ_ZERO(mm7);
do {
__asm __volatile(
"movq %1, %%mm0\n\t"
"movq 1%1, %%mm1\n\t"
"movq %%mm0, %%mm2\n\t"
"movq %%mm1, %%mm3\n\t"
"p... | false | FFmpeg | 91abb473fb8432226918da4fe03365ebaf688978 | static void put_no_rnd_pixels_x2_mmx( UINT8 *block, const UINT8 *pixels, int line_size, int h)
{
UINT8 *p;
const UINT8 *pix;
p = block;
pix = pixels;
MOVQ_ZERO(mm7);
do {
__asm __volatile(
"movq %1, %%mm0\n\t"
"movq 1%1, %%mm1\n\t"
"movq %%mm0, %%mm2\n\t"
"movq %%mm1, %%mm3\n\t"
"p... | {
"code": [],
"line_no": []
} | static void FUNC_0( UINT8 *VAR_0, const UINT8 *VAR_1, int VAR_2, int VAR_3)
{
UINT8 *p;
const UINT8 *VAR_4;
p = VAR_0;
VAR_4 = VAR_1;
MOVQ_ZERO(mm7);
do {
__asm __volatile(
"movq %1, %%mm0\n\t"
"movq 1%1, %%mm1\n\t"
"movq %%mm0, %%mm2\n\t"
"movq %%mm1, %%mm3\n\t"
"punpcklbw %%mm7, ... | [
"static void FUNC_0( UINT8 *VAR_0, const UINT8 *VAR_1, int VAR_2, int VAR_3)\n{",
"UINT8 *p;",
"const UINT8 *VAR_4;",
"p = VAR_0;",
"VAR_4 = VAR_1;",
"MOVQ_ZERO(mm7);",
"do {",
"__asm __volatile(\n\"movq\t%1, %%mm0\\n\\t\"\n\"movq\t1%1, %%mm1\\n\\t\"\n\"movq\t%%mm0, %%mm2\\n\\t\"\n\"movq\t%%mm1, %... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17,
19,
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51
],
[
53
],
[
55
],
[
57
],
[... |
3,877 | static int attribute_align_arg av_buffersrc_add_frame_internal(AVFilterContext *ctx,
AVFrame *frame, int flags)
{
BufferSourceContext *s = ctx->priv;
AVFrame *copy;
int ret;
if (!frame) {
s->eof = 1;
return 0;
... | false | FFmpeg | f29c28a884c01ea63559fd6bc2250a6b5f78cbb0 | static int attribute_align_arg av_buffersrc_add_frame_internal(AVFilterContext *ctx,
AVFrame *frame, int flags)
{
BufferSourceContext *s = ctx->priv;
AVFrame *copy;
int ret;
if (!frame) {
s->eof = 1;
return 0;
... | {
"code": [],
"line_no": []
} | static int VAR_0 av_buffersrc_add_frame_internal(AVFilterContext *ctx,
AVFrame *frame, int flags)
{
BufferSourceContext *s = ctx->priv;
AVFrame *copy;
int ret;
if (!frame) {
s->eof = 1;
return 0;
} else if (s->... | [
"static int VAR_0 av_buffersrc_add_frame_internal(AVFilterContext *ctx,\nAVFrame *frame, int flags)\n{",
"BufferSourceContext *s = ctx->priv;",
"AVFrame *copy;",
"int ret;",
"if (!frame) {",
"s->eof = 1;",
"return 0;",
"} else if (s->eof)",
"return AVERROR(EINVAL);",
"if (!(flags & AV_BUFFERSRC_FL... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33,
35,
37
],
[
39
],
[
41,
45,
47
],
[
49,
51
],
[
53
],
[
55,... |
3,878 | static void av_estimate_timings_from_pts(AVFormatContext *ic, offset_t old_offset)
{
AVPacket pkt1, *pkt = &pkt1;
AVStream *st;
int read_size, i, ret;
int64_t end_time;
int64_t filesize, offset, duration;
/* free previous packet */
if (ic->cur_st && ic->cur_st->parser)
av_... | true | FFmpeg | cc5297e871f2a30b62b972c6479ab1d4fdc14132 | static void av_estimate_timings_from_pts(AVFormatContext *ic, offset_t old_offset)
{
AVPacket pkt1, *pkt = &pkt1;
AVStream *st;
int read_size, i, ret;
int64_t end_time;
int64_t filesize, offset, duration;
if (ic->cur_st && ic->cur_st->parser)
av_free_packet(&ic->cur_pkt);... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVFormatContext *VAR_0, offset_t VAR_1)
{
AVPacket pkt1, *pkt = &pkt1;
AVStream *st;
int VAR_2, VAR_3, VAR_4;
int64_t end_time;
int64_t filesize, offset, duration;
if (VAR_0->cur_st && VAR_0->cur_st->parser)
av_free_packet(&VAR_0->cur_pkt);
VAR_0->... | [
"static void FUNC_0(AVFormatContext *VAR_0, offset_t VAR_1)\n{",
"AVPacket pkt1, *pkt = &pkt1;",
"AVStream *st;",
"int VAR_2, VAR_3, VAR_4;",
"int64_t end_time;",
"int64_t filesize, offset, duration;",
"if (VAR_0->cur_st && VAR_0->cur_st->parser)\nav_free_packet(&VAR_0->cur_pkt);",
"VAR_0->cur_st = NU... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
19,
21
],
[
23
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
53
],
[
55
],
[
57
],
[... |
3,879 | static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
int size, int64_t pos, uint64_t cluster_time,
uint64_t block_duration, int is_keyframe,
int64_t cluster_pos)
{
uint64_t timecode = AV_NO... | true | FFmpeg | 25a80a931a3829f9d730971dbd269aa39cc273f6 | static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
int size, int64_t pos, uint64_t cluster_time,
uint64_t block_duration, int is_keyframe,
int64_t cluster_pos)
{
uint64_t timecode = AV_NO... | {
"code": [
" res = matroska_parse_rm_audio(matroska, track, st, data, size,",
" size -= lace_size[n];"
],
"line_no": [
167,
199
]
} | static int FUNC_0(MatroskaDemuxContext *VAR_0, uint8_t *VAR_1,
int VAR_2, int64_t VAR_3, uint64_t VAR_4,
uint64_t VAR_5, int VAR_6,
int64_t VAR_7)
{
uint64_t timecode = AV_NOPTS_VALUE;
MatroskaTrack *track;
... | [
"static int FUNC_0(MatroskaDemuxContext *VAR_0, uint8_t *VAR_1,\nint VAR_2, int64_t VAR_3, uint64_t VAR_4,\nuint64_t VAR_5, int VAR_6,\nint64_t VAR_7)\n{",
"uint64_t timecode = AV_NOPTS_VALUE;",
"MatroskaTrack *track;",
"int VAR_8 = 0;",
"AVStream *st;",
"int16_t block_time;",
"uint32_t *lace_size = NUL... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47,
49
... |
3,880 | GAChannel *ga_channel_new(GAChannelMethod method, const gchar *path,
GAChannelCallback cb, gpointer opaque)
{
GAChannel *c = g_malloc0(sizeof(GAChannel));
SECURITY_ATTRIBUTES sec_attrs;
if (!ga_channel_open(c, method, path)) {
g_critical("error opening channel");
... | true | qemu | f3a06403b82c7f036564e4caf18b52ce6885fcfb | GAChannel *ga_channel_new(GAChannelMethod method, const gchar *path,
GAChannelCallback cb, gpointer opaque)
{
GAChannel *c = g_malloc0(sizeof(GAChannel));
SECURITY_ATTRIBUTES sec_attrs;
if (!ga_channel_open(c, method, path)) {
g_critical("error opening channel");
... | {
"code": [
" GAChannel *c = g_malloc0(sizeof(GAChannel));",
" GAChannel *c = g_malloc0(sizeof(GAChannel));"
],
"line_no": [
7,
7
]
} | GAChannel *FUNC_0(GAChannelMethod method, const gchar *path,
GAChannelCallback cb, gpointer opaque)
{
GAChannel *c = g_malloc0(sizeof(GAChannel));
SECURITY_ATTRIBUTES sec_attrs;
if (!ga_channel_open(c, method, path)) {
g_critical("error opening channel");
g... | [
"GAChannel *FUNC_0(GAChannelMethod method, const gchar *path,\nGAChannelCallback cb, gpointer opaque)\n{",
"GAChannel *c = g_malloc0(sizeof(GAChannel));",
"SECURITY_ATTRIBUTES sec_attrs;",
"if (!ga_channel_open(c, method, path)) {",
"g_critical(\"error opening channel\");",
"g_free(c);",
"return NULL;",... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[... |
3,881 | static void coroutine_fn verify_entered_step_2(void *opaque)
{
Coroutine *caller = (Coroutine *)opaque;
g_assert(qemu_coroutine_entered(caller));
g_assert(qemu_coroutine_entered(qemu_coroutine_self()));
qemu_coroutine_yield();
/* Once more to check it still works after yielding */
g_a... | true | qemu | 6b2fef739127ee6135d5ccc2da0bf1f3bebf66b7 | static void coroutine_fn verify_entered_step_2(void *opaque)
{
Coroutine *caller = (Coroutine *)opaque;
g_assert(qemu_coroutine_entered(caller));
g_assert(qemu_coroutine_entered(qemu_coroutine_self()));
qemu_coroutine_yield();
g_assert(qemu_coroutine_entered(caller));
g_assert(q... | {
"code": [
" qemu_coroutine_yield();"
],
"line_no": [
13
]
} | static void VAR_0 verify_entered_step_2(void *opaque)
{
Coroutine *caller = (Coroutine *)opaque;
g_assert(qemu_coroutine_entered(caller));
g_assert(qemu_coroutine_entered(qemu_coroutine_self()));
qemu_coroutine_yield();
g_assert(qemu_coroutine_entered(caller));
g_assert(qemu_cor... | [
"static void VAR_0 verify_entered_step_2(void *opaque)\n{",
"Coroutine *caller = (Coroutine *)opaque;",
"g_assert(qemu_coroutine_entered(caller));",
"g_assert(qemu_coroutine_entered(qemu_coroutine_self()));",
"qemu_coroutine_yield();",
"g_assert(qemu_coroutine_entered(caller));",
"g_assert(qemu_coroutin... | [
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
3,882 | static void mirror_complete(BlockJob *job, Error **errp)
{
MirrorBlockJob *s = container_of(job, MirrorBlockJob, common);
int ret;
ret = bdrv_open_backing_file(s->target);
if (ret < 0) {
char backing_filename[PATH_MAX];
bdrv_get_full_backing_filename(s->target, backing_filename,... | true | qemu | 31ca6d077c24b7aaa322d8930e3e5debbdb4a047 | static void mirror_complete(BlockJob *job, Error **errp)
{
MirrorBlockJob *s = container_of(job, MirrorBlockJob, common);
int ret;
ret = bdrv_open_backing_file(s->target);
if (ret < 0) {
char backing_filename[PATH_MAX];
bdrv_get_full_backing_filename(s->target, backing_filename,... | {
"code": [
" ret = bdrv_open_backing_file(s->target);"
],
"line_no": [
11
]
} | static void FUNC_0(BlockJob *VAR_0, Error **VAR_1)
{
MirrorBlockJob *s = container_of(VAR_0, MirrorBlockJob, common);
int VAR_2;
VAR_2 = bdrv_open_backing_file(s->target);
if (VAR_2 < 0) {
char VAR_3[PATH_MAX];
bdrv_get_full_backing_filename(s->target, VAR_3,
... | [
"static void FUNC_0(BlockJob *VAR_0, Error **VAR_1)\n{",
"MirrorBlockJob *s = container_of(VAR_0, MirrorBlockJob, common);",
"int VAR_2;",
"VAR_2 = bdrv_open_backing_file(s->target);",
"if (VAR_2 < 0) {",
"char VAR_3[PATH_MAX];",
"bdrv_get_full_backing_filename(s->target, VAR_3,\nsizeof(VAR_3));",
"er... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
]
] |
3,883 | decode_cabac_residual_internal(const H264Context *h, H264SliceContext *sl,
int16_t *block,
int cat, int n, const uint8_t *scantable,
const uint32_t *qmul, int max_coeff,
int is_dc, int chroma4... | true | FFmpeg | a3a408259912e6d9337837c5d63c4b826778530f | decode_cabac_residual_internal(const H264Context *h, H264SliceContext *sl,
int16_t *block,
int cat, int n, const uint8_t *scantable,
const uint32_t *qmul, int max_coeff,
int is_dc, int chroma4... | {
"code": [
" int coeff_abs = 2; \\"
],
"line_no": [
291
]
} | FUNC_0(const H264Context *VAR_0, H264SliceContext *VAR_1,
int16_t *VAR_2,
int VAR_3, int VAR_4, const uint8_t *VAR_5,
const uint32_t *VAR_6, int VAR_7,
int VAR_8, int VAR_9)
{
static con... | [
"FUNC_0(const H264Context *VAR_0, H264SliceContext *VAR_1,\nint16_t *VAR_2,\nint VAR_3, int VAR_4, const uint8_t *VAR_5,\nconst uint32_t *VAR_6, int VAR_7,\nint VAR_8, int VAR_9)\n{",
"static const int VAR_10[2][14] = {",
"{ 105+0, 105+15, 105+29, 105+44, 105+47, 402, 484+0, 484+15, 484+29, 660, 528+0, 528+15, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39,
41,
43
],
[
45
],
[
47,
49,... |
3,884 | static int opus_header(AVFormatContext *avf, int idx)
{
struct ogg *ogg = avf->priv_data;
struct ogg_stream *os = &ogg->streams[idx];
AVStream *st = avf->streams[idx];
struct oggopus_private *priv = os->private;
uint8_t *packet = os->buf + os->p... | true | FFmpeg | a3a0b5bd0aaae314619d5b41fb918aacd908a5ae | static int opus_header(AVFormatContext *avf, int idx)
{
struct ogg *ogg = avf->priv_data;
struct ogg_stream *os = &ogg->streams[idx];
AVStream *st = avf->streams[idx];
struct oggopus_private *priv = os->private;
uint8_t *packet = os->buf + os->p... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)
{
struct VAR_2 *VAR_2 = VAR_0->priv_data;
struct ogg_stream *VAR_3 = &VAR_2->streams[VAR_1];
AVStream *st = VAR_0->streams[VAR_1];
struct oggopus_private *VAR_4 = VAR_3->private;
uint8_t *packet ... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1)\n{",
"struct VAR_2 *VAR_2 = VAR_0->priv_data;",
"struct ogg_stream *VAR_3 = &VAR_2->streams[VAR_1];",
"AVStream *st = VAR_0->streams[VAR_1];",
"struct oggopus_private *VAR_4 = VAR_3->private;",
"uint8_t *packet ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
56,
58
],
[... |
3,885 | av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
SwsFilter *dstFilter)
{
int i;
int usesVFilter, usesHFilter;
int unscaled;
SwsFilter dummyFilter = { NULL, NULL, NULL, NULL };
int srcW = c->srcW;
int srcH = c->srcH;
... | true | FFmpeg | 5e3f6dc70198426fe0741e3017826b8bf3ee5ad8 | av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
SwsFilter *dstFilter)
{
int i;
int usesVFilter, usesHFilter;
int unscaled;
SwsFilter dummyFilter = { NULL, NULL, NULL, NULL };
int srcW = c->srcW;
int srcH = c->srcH;
... | {
"code": [
"#define USE_MMAP (HAVE_MMAP && HAVE_MPROTECT && defined MAP_ANONYMOUS)"
],
"line_no": [
433
]
} | av_cold int FUNC_0(SwsContext *c, SwsFilter *srcFilter,
SwsFilter *dstFilter)
{
int VAR_0;
int VAR_1, VAR_2;
int VAR_3;
SwsFilter dummyFilter = { NULL, NULL, NULL, NULL };
int VAR_4 = c->VAR_4;
int VAR_5 = c->VAR_5;
int VAR_6 ... | [
"av_cold int FUNC_0(SwsContext *c, SwsFilter *srcFilter,\nSwsFilter *dstFilter)\n{",
"int VAR_0;",
"int VAR_1, VAR_2;",
"int VAR_3;",
"SwsFilter dummyFilter = { NULL, NULL, NULL, NULL };",
"int VAR_4 = c->VAR_4;",
"int VAR_5 = c->VAR_5;",
"int VAR_6 = c->VAR_6;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[... |
3,886 | static int spapr_vio_busdev_init(DeviceState *qdev)
{
VIOsPAPRDevice *dev = (VIOsPAPRDevice *)qdev;
VIOsPAPRDeviceClass *pc = VIO_SPAPR_DEVICE_GET_CLASS(dev);
char *id;
if (dev->reg != -1) {
/*
* Explicitly assigned address, just verify that no-one else
* is using it.... | true | qemu | ad0ebb91cd8b5fdc4a583b03645677771f420a46 | static int spapr_vio_busdev_init(DeviceState *qdev)
{
VIOsPAPRDevice *dev = (VIOsPAPRDevice *)qdev;
VIOsPAPRDeviceClass *pc = VIO_SPAPR_DEVICE_GET_CLASS(dev);
char *id;
if (dev->reg != -1) {
VIOsPAPRDevice *other = reg_conflict(dev);
if (other) {
... | {
"code": [
" return -1;",
" rtce_init(dev);"
],
"line_no": [
41,
91
]
} | static int FUNC_0(DeviceState *VAR_0)
{
VIOsPAPRDevice *dev = (VIOsPAPRDevice *)VAR_0;
VIOsPAPRDeviceClass *pc = VIO_SPAPR_DEVICE_GET_CLASS(dev);
char *VAR_1;
if (dev->reg != -1) {
VIOsPAPRDevice *other = reg_conflict(dev);
if (other) {
fprintf... | [
"static int FUNC_0(DeviceState *VAR_0)\n{",
"VIOsPAPRDevice *dev = (VIOsPAPRDevice *)VAR_0;",
"VIOsPAPRDeviceClass *pc = VIO_SPAPR_DEVICE_GET_CLASS(dev);",
"char *VAR_1;",
"if (dev->reg != -1) {",
"VIOsPAPRDevice *other = reg_conflict(dev);",
"if (other) {",
"fprintf(stderr, \"vio: %s and %s devices c... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
27
],
[
31
],
[
33,
35,
37,
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
53
],
[
55
],
[
57
],
[
59
],
[
65
],
[
67
],
[... |
3,887 | static void generate_joint_tables(HYuvContext *s)
{
uint16_t symbols[1 << VLC_BITS];
uint16_t bits[1 << VLC_BITS];
uint8_t len[1 << VLC_BITS];
if (s->bitstream_bpp < 24) {
int p, i, y, u;
for (p = 0; p < 3; p++) {
for (i = y = 0; y < 256; y++) {
int l... | true | FFmpeg | d0393d79bc3d61c9f2ff832c0e273b7774ff0269 | static void generate_joint_tables(HYuvContext *s)
{
uint16_t symbols[1 << VLC_BITS];
uint16_t bits[1 << VLC_BITS];
uint8_t len[1 << VLC_BITS];
if (s->bitstream_bpp < 24) {
int p, i, y, u;
for (p = 0; p < 3; p++) {
for (i = y = 0; y < 256; y++) {
int l... | {
"code": [
"static void generate_joint_tables(HYuvContext *s)",
" ff_init_vlc_sparse(&s->vlc[3 + p], VLC_BITS, i, len, 1, 1,",
" bits, 2, 2, symbols, 2, 2, 0);",
" init_vlc(&s->vlc[3], VLC_BITS, i, len, 1, 1, bits, 2, 2, 0);"
],
"line_no": [
1,
... | static void FUNC_0(HYuvContext *VAR_0)
{
uint16_t symbols[1 << VLC_BITS];
uint16_t bits[1 << VLC_BITS];
uint8_t len[1 << VLC_BITS];
if (VAR_0->bitstream_bpp < 24) {
int VAR_1, VAR_8, VAR_3, VAR_4;
for (VAR_1 = 0; VAR_1 < 3; VAR_1++) {
for (VAR_8 = VAR_3 = 0; VAR_3 < 2... | [
"static void FUNC_0(HYuvContext *VAR_0)\n{",
"uint16_t symbols[1 << VLC_BITS];",
"uint16_t bits[1 << VLC_BITS];",
"uint8_t len[1 << VLC_BITS];",
"if (VAR_0->bitstream_bpp < 24) {",
"int VAR_1, VAR_8, VAR_3, VAR_4;",
"for (VAR_1 = 0; VAR_1 < 3; VAR_1++) {",
"for (VAR_8 = VAR_3 = 0; VAR_3 < 256; VAR_3++... | [
1,
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,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[... |
3,888 | static DeviceState *slavio_intctl_init(target_phys_addr_t addr,
target_phys_addr_t addrg,
qemu_irq **parent_irq)
{
DeviceState *dev;
SysBusDevice *s;
unsigned int i, j;
dev = qdev_create(NULL, "slavio_intctl");
q... | true | qemu | e23a1b33b53d25510320b26d9f154e19c6c99725 | static DeviceState *slavio_intctl_init(target_phys_addr_t addr,
target_phys_addr_t addrg,
qemu_irq **parent_irq)
{
DeviceState *dev;
SysBusDevice *s;
unsigned int i, j;
dev = qdev_create(NULL, "slavio_intctl");
q... | {
"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);",
" ... | static DeviceState *FUNC_0(target_phys_addr_t addr,
target_phys_addr_t addrg,
qemu_irq **parent_irq)
{
DeviceState *dev;
SysBusDevice *s;
unsigned int VAR_0, VAR_1;
dev = qdev_create(NULL, "slavio_intctl");
qdev_... | [
"static DeviceState *FUNC_0(target_phys_addr_t addr,\ntarget_phys_addr_t addrg,\nqemu_irq **parent_irq)\n{",
"DeviceState *dev;",
"SysBusDevice *s;",
"unsigned int VAR_0, VAR_1;",
"dev = qdev_create(NULL, \"slavio_intctl\");",
"qdev_init(dev);",
"s = sysbus_from_qdev(dev);",
"for (VAR_0 = 0; VAR_0 < M... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
]
] |
3,889 | static int stellaris_enet_load(QEMUFile *f, void *opaque, int version_id)
{
stellaris_enet_state *s = (stellaris_enet_state *)opaque;
int i;
if (version_id != 1)
return -EINVAL;
s->ris = qemu_get_be32(f);
s->im = qemu_get_be32(f);
s->rctl = qemu_get_be32(f);
s->tctl = qe... | true | qemu | 2e1198672759eda6e122ff38fcf6df06f27e0fe2 | static int stellaris_enet_load(QEMUFile *f, void *opaque, int version_id)
{
stellaris_enet_state *s = (stellaris_enet_state *)opaque;
int i;
if (version_id != 1)
return -EINVAL;
s->ris = qemu_get_be32(f);
s->im = qemu_get_be32(f);
s->rctl = qemu_get_be32(f);
s->tctl = qe... | {
"code": [
" stellaris_enet_state *s = (stellaris_enet_state *)opaque;",
" int i;",
" for (i = 0; i < 31; i++) {",
"static int stellaris_enet_load(QEMUFile *f, void *opaque, int version_id)",
" stellaris_enet_state *s = (stellaris_enet_state *)opaque;",
" int i;",
" if (... | static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, int VAR_2)
{
stellaris_enet_state *s = (stellaris_enet_state *)VAR_1;
int VAR_3;
if (VAR_2 != 1)
return -EINVAL;
s->ris = qemu_get_be32(VAR_0);
s->im = qemu_get_be32(VAR_0);
s->rctl = qemu_get_be32(VAR_0);
s->tctl = qemu_ge... | [
"static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, int VAR_2)\n{",
"stellaris_enet_state *s = (stellaris_enet_state *)VAR_1;",
"int VAR_3;",
"if (VAR_2 != 1)\nreturn -EINVAL;",
"s->ris = qemu_get_be32(VAR_0);",
"s->im = qemu_get_be32(VAR_0);",
"s->rctl = qemu_get_be32(VAR_0);",
"s->tctl = qemu_get_be32(... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
... |
3,890 | AudioState *AUD_init (void)
{
size_t i;
int done = 0;
const char *drvname;
AudioState *s = &glob_audio_state;
LIST_INIT (&s->hw_head_out);
LIST_INIT (&s->hw_head_in);
LIST_INIT (&s->cap_head);
atexit (audio_atexit);
s->ts = qemu_new_timer (vm_clock, audio_timer, s);
... | true | qemu | 0d9acba8fddbf970c7353083e6a60b47017ce3e4 | AudioState *AUD_init (void)
{
size_t i;
int done = 0;
const char *drvname;
AudioState *s = &glob_audio_state;
LIST_INIT (&s->hw_head_out);
LIST_INIT (&s->hw_head_in);
LIST_INIT (&s->cap_head);
atexit (audio_atexit);
s->ts = qemu_new_timer (vm_clock, audio_timer, s);
... | {
"code": [
" dolog (\"Could not create audio timer\\n\");",
" return NULL;",
" dolog (\"Could not initialize audio subsystem\\n\");",
" if (done) {",
" VMChangeStateEntry *e;",
" if (conf.period.hertz <= 0) {",
" if (conf.period.hertz <... | AudioState *FUNC_0 (void)
{
size_t i;
int VAR_0 = 0;
const char *VAR_1;
AudioState *s = &glob_audio_state;
LIST_INIT (&s->hw_head_out);
LIST_INIT (&s->hw_head_in);
LIST_INIT (&s->cap_head);
atexit (audio_atexit);
s->ts = qemu_new_timer (vm_clock, audio_timer, s);
i... | [
"AudioState *FUNC_0 (void)\n{",
"size_t i;",
"int VAR_0 = 0;",
"const char *VAR_1;",
"AudioState *s = &glob_audio_state;",
"LIST_INIT (&s->hw_head_out);",
"LIST_INIT (&s->hw_head_in);",
"LIST_INIT (&s->cap_head);",
"atexit (audio_atexit);",
"s->ts = qemu_new_timer (vm_clock, audio_timer, s);",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49,
51
],
[... |
3,891 | static void s390_cpu_model_initfn(Object *obj)
{ | true | qemu | ad5afd07b628cd0610ea322ad60b5ad03aa250c8 | static void s390_cpu_model_initfn(Object *obj)
{ | {
"code": [],
"line_no": []
} | static void FUNC_0(Object *VAR_0)
{ | [
"static void FUNC_0(Object *VAR_0)\n{"
] | [
0
] | [
[
1,
2
]
] |
3,892 | static void spapr_finalize_fdt(sPAPREnvironment *spapr,
target_phys_addr_t fdt_addr,
target_phys_addr_t rtas_addr,
target_phys_addr_t rtas_size)
{
int ret;
void *fdt;
sPAPRPHBState *phb;
fdt = g_malloc... | true | qemu | 7f763a5d994bbddb50705d2e50decdf52937521f | static void spapr_finalize_fdt(sPAPREnvironment *spapr,
target_phys_addr_t fdt_addr,
target_phys_addr_t rtas_addr,
target_phys_addr_t rtas_size)
{
int ret;
void *fdt;
sPAPRPHBState *phb;
fdt = g_malloc... | {
"code": [
" if (nb_numa_nodes > 1) {",
" ret = spapr_set_associativity(fdt, spapr);",
" if (ret < 0) {",
" fprintf(stderr, \"Couldn't set up NUMA device tree properties\\n\");"
],
"line_no": [
73,
75,
77,
79
]
} | static void FUNC_0(sPAPREnvironment *VAR_0,
target_phys_addr_t VAR_1,
target_phys_addr_t VAR_2,
target_phys_addr_t VAR_3)
{
int VAR_4;
void *VAR_5;
sPAPRPHBState *phb;
VAR_5 = g_malloc(FDT_MAX_SIZE);
... | [
"static void FUNC_0(sPAPREnvironment *VAR_0,\ntarget_phys_addr_t VAR_1,\ntarget_phys_addr_t VAR_2,\ntarget_phys_addr_t VAR_3)\n{",
"int VAR_4;",
"void *VAR_5;",
"sPAPRPHBState *phb;",
"VAR_5 = g_malloc(FDT_MAX_SIZE);",
"_FDT((fdt_open_into(VAR_0->fdt_skel, VAR_5, FDT_MAX_SIZE)));",
"VAR_4 = spapr_popula... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
],
[
55
],
[... |
3,893 | void ff_check_pixfmt_descriptors(void){
int i, j;
for (i=0; i<FF_ARRAY_ELEMS(av_pix_fmt_descriptors); i++) {
const AVPixFmtDescriptor *d = &av_pix_fmt_descriptors[i];
uint8_t fill[4][8+6+3] = {{0}};
uint8_t *data[4] = {fill[0], fill[1], fill[2], fill[3]};
int linesize[4] ... | true | FFmpeg | f3ba91a3f1d9e99aebfe22278b0633f996e3fbe1 | void ff_check_pixfmt_descriptors(void){
int i, j;
for (i=0; i<FF_ARRAY_ELEMS(av_pix_fmt_descriptors); i++) {
const AVPixFmtDescriptor *d = &av_pix_fmt_descriptors[i];
uint8_t fill[4][8+6+3] = {{0}};
uint8_t *data[4] = {fill[0], fill[1], fill[2], fill[3]};
int linesize[4] ... | {
"code": [
" av_read_image_line(tmp, (void*)data, linesize, d, 0, 0, j, 2, 0);"
],
"line_no": [
63
]
} | void FUNC_0(void){
int VAR_0, VAR_1;
for (VAR_0=0; VAR_0<FF_ARRAY_ELEMS(av_pix_fmt_descriptors); VAR_0++) {
const AVPixFmtDescriptor *d = &av_pix_fmt_descriptors[VAR_0];
uint8_t fill[4][8+6+3] = {{0}};
uint8_t *data[4] = {fill[0], fill[1], fill[2], fill[3]};
int linesize[... | [
"void FUNC_0(void){",
"int VAR_0, VAR_1;",
"for (VAR_0=0; VAR_0<FF_ARRAY_ELEMS(av_pix_fmt_descriptors); VAR_0++) {",
"const AVPixFmtDescriptor *d = &av_pix_fmt_descriptors[VAR_0];",
"uint8_t fill[4][8+6+3] = {{0}};",
"uint8_t *data[4] = {fill[0], fill[1], fill[2], fill[3]};",
"int linesize[4] = {0,0,0,0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49... |
3,894 | static void disas_thumb_insn(CPUState *env, DisasContext *s)
{
uint32_t val, insn, op, rm, rn, rd, shift, cond;
int32_t offset;
int i;
TCGv tmp;
TCGv tmp2;
TCGv addr;
if (s->condexec_mask) {
cond = s->condexec_cond;
if (cond != 0x0e) { /* Skip conditional when... | true | qemu | 7d1b0095bff7157e856d1d0e6c4295641ced2752 | static void disas_thumb_insn(CPUState *env, DisasContext *s)
{
uint32_t val, insn, op, rm, rn, rd, shift, cond;
int32_t offset;
int i;
TCGv tmp;
TCGv tmp2;
TCGv addr;
if (s->condexec_mask) {
cond = s->condexec_cond;
if (cond != 0x0e) {
s->condlabel... | {
"code": [
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(tmp);",
" dead_tmp(addr);",
" dead_tmp(tmp);",
" ... | static void FUNC_0(CPUState *VAR_0, DisasContext *VAR_1)
{
uint32_t val, insn, op, rm, rn, rd, shift, cond;
int32_t offset;
int VAR_2;
TCGv tmp;
TCGv tmp2;
TCGv addr;
if (VAR_1->condexec_mask) {
cond = VAR_1->condexec_cond;
if (cond != 0x0e) {
VAR_... | [
"static void FUNC_0(CPUState *VAR_0, DisasContext *VAR_1)\n{",
"uint32_t val, insn, op, rm, rn, rd, shift, cond;",
"int32_t offset;",
"int VAR_2;",
"TCGv tmp;",
"TCGv tmp2;",
"TCGv addr;",
"if (VAR_1->condexec_mask) {",
"cond = VAR_1->condexec_cond;",
"if (cond != 0x0e) {",
"VAR_1->condlabel = g... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
1,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45,
49
],
[... |
3,895 | int qcow2_snapshot_goto(BlockDriverState *bs, const char *snapshot_id)
{
BDRVQcowState *s = bs->opaque;
QCowSnapshot *sn;
int i, snapshot_index, l1_size2;
snapshot_index = find_snapshot_by_id_or_name(bs, snapshot_id);
if (snapshot_index < 0)
return -ENOENT;
sn = &s->snapshots[s... | true | qemu | 8b3b720620a1137a1b794fc3ed64734236f94e06 | int qcow2_snapshot_goto(BlockDriverState *bs, const char *snapshot_id)
{
BDRVQcowState *s = bs->opaque;
QCowSnapshot *sn;
int i, snapshot_index, l1_size2;
snapshot_index = find_snapshot_by_id_or_name(bs, snapshot_id);
if (snapshot_index < 0)
return -ENOENT;
sn = &s->snapshots[s... | {
"code": [
" if (bdrv_pwrite(bs->file, s->l1_table_offset,",
" s->l1_table, l1_size2) != l1_size2)"
],
"line_no": [
47,
49
]
} | int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1)
{
BDRVQcowState *s = VAR_0->opaque;
QCowSnapshot *sn;
int VAR_2, VAR_3, VAR_4;
VAR_3 = find_snapshot_by_id_or_name(VAR_0, VAR_1);
if (VAR_3 < 0)
return -ENOENT;
sn = &s->snapshots[VAR_3];
if (qcow2_update_snapshot_re... | [
"int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"QCowSnapshot *sn;",
"int VAR_2, VAR_3, VAR_4;",
"VAR_3 = find_snapshot_by_id_or_name(VAR_0, VAR_1);",
"if (VAR_3 < 0)\nreturn -ENOENT;",
"sn = &s->snapshots[VAR_3];",
"if (qcow2_update_snapshot_refcount(... | [
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
],
[
13
],
[
15,
17
],
[
19
],
[
23,
25
],
[
29,
31
],
[
35
],
[
37
],
[
41,
43,
45
],
[
47,
49,
51
],
[
53
],
[
55
],
[
57
],
[... |
3,896 | static int xenstore_scan(const char *type, int dom, struct XenDevOps *ops)
{
struct XenDevice *xendev;
char path[XEN_BUFSIZE], token[XEN_BUFSIZE];
char **dev = NULL, *dom0;
unsigned int cdev, j;
/* setup watch */
dom0 = xs_get_domain_path(xenstore, 0);
snprintf(token, sizeof(token)... | true | qemu | 33876dfad64bc481f59c5e9ccf60db78624c4b93 | static int xenstore_scan(const char *type, int dom, struct XenDevOps *ops)
{
struct XenDevice *xendev;
char path[XEN_BUFSIZE], token[XEN_BUFSIZE];
char **dev = NULL, *dom0;
unsigned int cdev, j;
dom0 = xs_get_domain_path(xenstore, 0);
snprintf(token, sizeof(token), "be:%p:%d:%p", ... | {
"code": [
" dom0 = xs_get_domain_path(xenstore, 0);",
" free(dom0);",
" char **dev = NULL, *dom0;",
" dom0 = xs_get_domain_path(xenstore, 0);",
" snprintf(path, sizeof(path), \"%s/backend/%s/%d\", dom0, type, dom);",
" free(dom0);",
" dom0 = xs_get_domain_path(xensto... | static int FUNC_0(const char *VAR_0, int VAR_1, struct XenDevOps *VAR_2)
{
struct XenDevice *VAR_3;
char VAR_4[XEN_BUFSIZE], token[XEN_BUFSIZE];
char **VAR_5 = NULL, *VAR_6;
unsigned int VAR_7, VAR_8;
VAR_6 = xs_get_domain_path(xenstore, 0);
snprintf(token, sizeof(token), "be:%p:%... | [
"static int FUNC_0(const char *VAR_0, int VAR_1, struct XenDevOps *VAR_2)\n{",
"struct XenDevice *VAR_3;",
"char VAR_4[XEN_BUFSIZE], token[XEN_BUFSIZE];",
"char **VAR_5 = NULL, *VAR_6;",
"unsigned int VAR_7, VAR_8;",
"VAR_6 = xs_get_domain_path(xenstore, 0);",
"snprintf(token, sizeof(token), \"be:%p:%d:... | [
0,
0,
0,
1,
0,
1,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
3,897 | static int ljpeg_decode_yuv_scan(MJpegDecodeContext *s, int predictor,
int point_transform, int nb_components)
{
int i, mb_x, mb_y, mask;
int bits= (s->bits+7)&~7;
int resync_mb_y = 0;
int resync_mb_x = 0;
point_transform += bits - s->bits;
mask = ((1 <... | true | FFmpeg | 4b72d5cd6f9341dcafdbc1b9030166aa987b8304 | static int ljpeg_decode_yuv_scan(MJpegDecodeContext *s, int predictor,
int point_transform, int nb_components)
{
int i, mb_x, mb_y, mask;
int bits= (s->bits+7)&~7;
int resync_mb_y = 0;
int resync_mb_x = 0;
point_transform += bits - s->bits;
mask = ((1 <... | {
"code": [
" *ptr16= pred + (dc << point_transform);"
],
"line_no": [
181
]
} | static int FUNC_0(MJpegDecodeContext *VAR_0, int VAR_1,
int VAR_2, int VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7;
int VAR_8= (VAR_0->VAR_8+7)&~7;
int VAR_9 = 0;
int VAR_10 = 0;
VAR_2 += VAR_8 - VAR_0->VAR_8;
VAR_7 = ((1 << VAR_0->VAR_8) - 1) << VAR_2;
... | [
"static int FUNC_0(MJpegDecodeContext *VAR_0, int VAR_1,\nint VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7;",
"int VAR_8= (VAR_0->VAR_8+7)&~7;",
"int VAR_9 = 0;",
"int VAR_10 = 0;",
"VAR_2 += VAR_8 - VAR_0->VAR_8;",
"VAR_7 = ((1 << VAR_0->VAR_8) - 1) << VAR_2;",
"av_assert0(VAR_3>=1 && 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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
3,898 | inline static int push_frame(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
AVFilterLink *inlink = ctx->inputs[0];
ShowWavesContext *showwaves = outlink->src->priv;
int nb_channels = inlink->channels;
int ret, i;
if ((ret = ff_filter_frame(outlink, showwaves->outpicref)) ... | true | FFmpeg | 86476c510ebd14d33ed02289d71bae874f8707a4 | inline static int push_frame(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
AVFilterLink *inlink = ctx->inputs[0];
ShowWavesContext *showwaves = outlink->src->priv;
int nb_channels = inlink->channels;
int ret, i;
if ((ret = ff_filter_frame(outlink, showwaves->outpicref)) ... | {
"code": [
" for (i = 0; i <= nb_channels; i++)"
],
"line_no": [
25
]
} | inline static int FUNC_0(AVFilterLink *VAR_0)
{
AVFilterContext *ctx = VAR_0->src;
AVFilterLink *inlink = ctx->inputs[0];
ShowWavesContext *showwaves = VAR_0->src->priv;
int VAR_1 = inlink->channels;
int VAR_2, VAR_3;
if ((VAR_2 = ff_filter_frame(VAR_0, showwaves->outpicref)) >= 0)
... | [
"inline static int FUNC_0(AVFilterLink *VAR_0)\n{",
"AVFilterContext *ctx = VAR_0->src;",
"AVFilterLink *inlink = ctx->inputs[0];",
"ShowWavesContext *showwaves = VAR_0->src->priv;",
"int VAR_1 = inlink->channels;",
"int VAR_2, VAR_3;",
"if ((VAR_2 = ff_filter_frame(VAR_0, showwaves->outpicref)) >= 0)\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
3,899 | static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
{
int status;
status = virtio_blk_handle_scsi_req(req->dev, req->elem);
virtio_blk_req_complete(req, status);
virtio_blk_free_request(req);
}
| true | qemu | f897bf751fbd95e4015b95d202c706548586813a | static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
{
int status;
status = virtio_blk_handle_scsi_req(req->dev, req->elem);
virtio_blk_req_complete(req, status);
virtio_blk_free_request(req);
}
| {
"code": [
" status = virtio_blk_handle_scsi_req(req->dev, req->elem);"
],
"line_no": [
9
]
} | static void FUNC_0(VirtIOBlockReq *VAR_0)
{
int VAR_1;
VAR_1 = virtio_blk_handle_scsi_req(VAR_0->dev, VAR_0->elem);
virtio_blk_req_complete(VAR_0, VAR_1);
virtio_blk_free_request(VAR_0);
}
| [
"static void FUNC_0(VirtIOBlockReq *VAR_0)\n{",
"int VAR_1;",
"VAR_1 = virtio_blk_handle_scsi_req(VAR_0->dev, VAR_0->elem);",
"virtio_blk_req_complete(VAR_0, VAR_1);",
"virtio_blk_free_request(VAR_0);",
"}"
] | [
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
3,900 | static int generate_fake_vps(QSVEncContext *q, AVCodecContext *avctx)
{
GetByteContext gbc;
PutByteContext pbc;
GetBitContext gb;
H2645NAL sps_nal = { NULL };
HEVCSPS sps = { 0 };
HEVCVPS vps = { 0 };
uint8_t vps_buf[128], vps_rbsp_buf[128];
uint8_t *new_extradata;
unsign... | false | FFmpeg | cc13bc8c4f0f4afa30d0b94c3f3a369ccd2aaf0b | static int generate_fake_vps(QSVEncContext *q, AVCodecContext *avctx)
{
GetByteContext gbc;
PutByteContext pbc;
GetBitContext gb;
H2645NAL sps_nal = { NULL };
HEVCSPS sps = { 0 };
HEVCVPS vps = { 0 };
uint8_t vps_buf[128], vps_rbsp_buf[128];
uint8_t *new_extradata;
unsign... | {
"code": [],
"line_no": []
} | static int FUNC_0(QSVEncContext *VAR_0, AVCodecContext *VAR_1)
{
GetByteContext gbc;
PutByteContext pbc;
GetBitContext gb;
H2645NAL sps_nal = { NULL };
HEVCSPS sps = { 0 };
HEVCVPS vps = { 0 };
uint8_t vps_buf[128], vps_rbsp_buf[128];
uint8_t *new_extradata;
unsigned int ... | [
"static int FUNC_0(QSVEncContext *VAR_0, AVCodecContext *VAR_1)\n{",
"GetByteContext gbc;",
"PutByteContext pbc;",
"GetBitContext gb;",
"H2645NAL sps_nal = { NULL };",
"HEVCSPS sps = { 0 };",
"HEVCVPS vps = { 0 };",
"uint8_t vps_buf[128], vps_rbsp_buf[128];",
"uint8_t *new_extradata;",
"unsigned i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49... |
3,902 | static int qcelp_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
QCELPContext *q = avctx->priv_data;
float *outbuffer = data;
int i;
float quantized_lspf[10], ... | false | FFmpeg | e43dd3d2a8e106169e707484090a2d973ece2184 | static int qcelp_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
QCELPContext *q = avctx->priv_data;
float *outbuffer = data;
int i;
float quantized_lspf[10], ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
QCELPContext *q = VAR_0->priv_data;
float *VAR_6 = VAR_1;
int VAR_7;
float VAR_8[10], VAR_9[10];
float V... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"QCELPContext *q = VAR_0->priv_data;",
"float *VAR_6 = VAR_1;",
"int VAR_7;",
"float VAR_8[10], VAR_9[10];",
"float VAR_10[16];",
"float *VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
37,
39,
41
],
[
43
],
[
45
],
[
47
],
[
51,... |
3,903 | int avio_read(AVIOContext *s, unsigned char *buf, int size)
{
int len, size1;
size1 = size;
while (size > 0) {
len = FFMIN(s->buf_end - s->buf_ptr, size);
if (len == 0 || s->write_flag) {
if((s->direct || size > s->buffer_size) && !s->update_checksum) {
... | false | FFmpeg | a606f27f4c610708fa96e35eed7b7537d3d8f712 | int avio_read(AVIOContext *s, unsigned char *buf, int size)
{
int len, size1;
size1 = size;
while (size > 0) {
len = FFMIN(s->buf_end - s->buf_ptr, size);
if (len == 0 || s->write_flag) {
if((s->direct || size > s->buffer_size) && !s->update_checksum) {
... | {
"code": [],
"line_no": []
} | int FUNC_0(AVIOContext *VAR_0, unsigned char *VAR_1, int VAR_2)
{
int VAR_3, VAR_4;
VAR_4 = VAR_2;
while (VAR_2 > 0) {
VAR_3 = FFMIN(VAR_0->buf_end - VAR_0->buf_ptr, VAR_2);
if (VAR_3 == 0 || VAR_0->write_flag) {
if((VAR_0->direct || VAR_2 > VAR_0->buffer_size) && !VAR_0... | [
"int FUNC_0(AVIOContext *VAR_0, unsigned char *VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4;",
"VAR_4 = VAR_2;",
"while (VAR_2 > 0) {",
"VAR_3 = FFMIN(VAR_0->buf_end - VAR_0->buf_ptr, VAR_2);",
"if (VAR_3 == 0 || VAR_0->write_flag) {",
"if((VAR_0->direct || VAR_2 > VAR_0->buffer_size) && !VAR_0->update_chec... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21,
23
],
[
25,
27
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51... |
3,904 | static int hls_probe(AVProbeData *p)
{
/* Require #EXTM3U at the start, and either one of the ones below
* somewhere for a proper match. */
if (strncmp(p->buf, "#EXTM3U", 7))
return 0;
if (p->filename && !av_match_ext(p->filename, "m3u8,m3u"))
return 0;
if (strstr(p->buf... | false | FFmpeg | cde57eee98d2e26daeeb1ba0cdd1f3d3acb3eb8a | static int hls_probe(AVProbeData *p)
{
if (strncmp(p->buf, "#EXTM3U", 7))
return 0;
if (p->filename && !av_match_ext(p->filename, "m3u8,m3u"))
return 0;
if (strstr(p->buf, "#EXT-X-STREAM-INF:") ||
strstr(p->buf, "#EXT-X-TARGETDURATION:") ||
strstr(p->b... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVProbeData *VAR_0)
{
if (strncmp(VAR_0->buf, "#EXTM3U", 7))
return 0;
if (VAR_0->filename && !av_match_ext(VAR_0->filename, "m3u8,m3u"))
return 0;
if (strstr(VAR_0->buf, "#EXT-X-STREAM-INF:") ||
strstr(VAR_0->buf, "#EXT-X-TARGETDURATION:") ||... | [
"static int FUNC_0(AVProbeData *VAR_0)\n{",
"if (strncmp(VAR_0->buf, \"#EXTM3U\", 7))\nreturn 0;",
"if (VAR_0->filename && !av_match_ext(VAR_0->filename, \"m3u8,m3u\"))\nreturn 0;",
"if (strstr(VAR_0->buf, \"#EXT-X-STREAM-INF:\") ||\nstrstr(VAR_0->buf, \"#EXT-X-TARGETDURATION:\") ||\nstrstr(VAR_0->buf, \"... | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
9,
11
],
[
15,
17
],
[
21,
23,
25,
27
],
[
29
],
[
31
]
] |
3,905 | static int svq1_motion_inter_block(MpegEncContext *s, GetBitContext *bitbuf,
uint8_t *current, uint8_t *previous,
int pitch, svq1_pmv *motion, int x, int y)
{
uint8_t *src;
uint8_t *dst;
svq1_pmv mv;
svq1_pmv *pmv[3];
int ... | false | FFmpeg | 7b9fc769e40a7709fa59a54e2a810f76364eee4b | static int svq1_motion_inter_block(MpegEncContext *s, GetBitContext *bitbuf,
uint8_t *current, uint8_t *previous,
int pitch, svq1_pmv *motion, int x, int y)
{
uint8_t *src;
uint8_t *dst;
svq1_pmv mv;
svq1_pmv *pmv[3];
int ... | {
"code": [],
"line_no": []
} | static int FUNC_0(MpegEncContext *VAR_0, GetBitContext *VAR_1,
uint8_t *VAR_2, uint8_t *VAR_3,
int VAR_4, svq1_pmv *VAR_5, int VAR_6, int VAR_7)
{
uint8_t *src;
uint8_t *dst;
svq1_pmv mv;
svq1_pmv *pmv[3];
int VAR_8;
... | [
"static int FUNC_0(MpegEncContext *VAR_0, GetBitContext *VAR_1,\nuint8_t *VAR_2, uint8_t *VAR_3,\nint VAR_4, svq1_pmv *VAR_5, int VAR_6, int VAR_7)\n{",
"uint8_t *src;",
"uint8_t *dst;",
"svq1_pmv mv;",
"svq1_pmv *pmv[3];",
"int VAR_8;",
"pmv[0] = &VAR_5[0];",
"if (VAR_7 == 0) {",
"pmv[1] =\npmv[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
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45,
47
],
[
51,
53,
55
],
[
57,... |
3,906 | int opt_default(void *optctx, const char *opt, const char *arg)
{
const AVOption *o;
int consumed = 0;
char opt_stripped[128];
const char *p;
const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class();
#if CONFIG_AVRESAMPLE
const AVClass *rc = avresample_get_class();
#endif
... | false | FFmpeg | 254c64c574dfc427721942fa84e4d24d6b6cc4c2 | int opt_default(void *optctx, const char *opt, const char *arg)
{
const AVOption *o;
int consumed = 0;
char opt_stripped[128];
const char *p;
const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class();
#if CONFIG_AVRESAMPLE
const AVClass *rc = avresample_get_class();
#endif
... | {
"code": [],
"line_no": []
} | int FUNC_0(void *VAR_0, const char *VAR_1, const char *VAR_2)
{
const AVOption *VAR_3;
int VAR_4 = 0;
char VAR_5[128];
const char *VAR_6;
const AVClass *VAR_7 = avcodec_get_class(), *fc = avformat_get_class();
#if CONFIG_AVRESAMPLE
const AVClass *rc = avresample_get_class();
#endif
... | [
"int FUNC_0(void *VAR_0, const char *VAR_1, const char *VAR_2)\n{",
"const AVOption *VAR_3;",
"int VAR_4 = 0;",
"char VAR_5[128];",
"const char *VAR_6;",
"const AVClass *VAR_7 = avcodec_get_class(), *fc = avformat_get_class();",
"#if CONFIG_AVRESAMPLE\nconst AVClass *rc = avresample_get_class();",
"#e... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31,
33
],
[
35
],
[
39,
41,
43,
45
],
[
47
],
[
49
],
[
51
],
[
53,
55
... |
3,908 | static void usb_xhci_realize(struct PCIDevice *dev, Error **errp)
{
int i, ret;
Error *err = NULL;
XHCIState *xhci = XHCI(dev);
dev->config[PCI_CLASS_PROG] = 0x30; /* xHCI */
dev->config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin 1 */
dev->config[PCI_CACHE_LINE_SIZE] = 0x10;
... | true | qemu | 20729dbd0109b9d9065447dba354f10bcf78d0d6 | static void usb_xhci_realize(struct PCIDevice *dev, Error **errp)
{
int i, ret;
Error *err = NULL;
XHCIState *xhci = XHCI(dev);
dev->config[PCI_CLASS_PROG] = 0x30;
dev->config[PCI_INTERRUPT_PIN] = 0x01;
dev->config[PCI_CACHE_LINE_SIZE] = 0x10;
dev->config[0x60] = 0x30;
... | {
"code": [
" usb_xhci_init(xhci);",
" if (xhci->msi != ON_OFF_AUTO_OFF) {",
" ret = msi_init(dev, 0x70, xhci->numintrs, true, false, &err);",
" assert(!ret || ret == -ENOTSUP);",
" if (ret && xhci->msi == ON_OFF_AUTO_ON) {",
" error_append_hint(&err, \"Yo... | static void FUNC_0(struct PCIDevice *VAR_0, Error **VAR_1)
{
int VAR_2, VAR_3;
Error *err = NULL;
XHCIState *xhci = XHCI(VAR_0);
VAR_0->config[PCI_CLASS_PROG] = 0x30;
VAR_0->config[PCI_INTERRUPT_PIN] = 0x01;
VAR_0->config[PCI_CACHE_LINE_SIZE] = 0x10;
VAR_0->config[0x60] = 0x... | [
"static void FUNC_0(struct PCIDevice *VAR_0, Error **VAR_1)\n{",
"int VAR_2, VAR_3;",
"Error *err = NULL;",
"XHCIState *xhci = XHCI(VAR_0);",
"VAR_0->config[PCI_CLASS_PROG] = 0x30;",
"VAR_0->config[PCI_INTERRUPT_PIN] = 0x01;",
"VAR_0->config[PCI_CACHE_LINE_SIZE] = 0x10;",
"VAR_0->config[0x60] = 0x30;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
37
],
[
39
],
[
43,
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
57
],
... |
3,910 | int 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, (ui... | true | qemu | 4cad3867b6df2c0826ae508a9fe15dd0b9d8936a | int 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, (ui... | {
"code": [
" return 0;",
" return 1;",
" return 0;",
" return 0;",
" return 1;",
"int fw_cfg_add_file(FWCfgState *s, const char *filename, uint8_t *data,",
" uint32_t len)",
" if (index == FW_CFG_FILE_SLOTS) {",
" fprintf(st... | int 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_FI... | [
"int 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->file... | [
1,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51... |
3,911 | static void *postcopy_ram_fault_thread(void *opaque)
{
MigrationIncomingState *mis = opaque;
struct uffd_msg msg;
int ret;
RAMBlock *rb = NULL;
RAMBlock *last_rb = NULL; /* last RAMBlock we sent part of */
trace_postcopy_ram_fault_thread_entry();
qemu_sem_post(&mis->fault_thread_se... | true | qemu | 3be98be4e9f59055afb5f2b27f9296c7093b4e75 | static void *postcopy_ram_fault_thread(void *opaque)
{
MigrationIncomingState *mis = opaque;
struct uffd_msg msg;
int ret;
RAMBlock *rb = NULL;
RAMBlock *last_rb = NULL;
trace_postcopy_ram_fault_thread_entry();
qemu_sem_post(&mis->fault_thread_sem);
while (true) {
... | {
"code": [
" rb_offset);"
],
"line_no": [
149
]
} | static void *FUNC_0(void *VAR_0)
{
MigrationIncomingState *mis = VAR_0;
struct uffd_msg VAR_1;
int VAR_2;
RAMBlock *rb = NULL;
RAMBlock *last_rb = NULL;
trace_postcopy_ram_fault_thread_entry();
qemu_sem_post(&mis->fault_thread_sem);
while (true) {
ram_addr_t rb_off... | [
"static void *FUNC_0(void *VAR_0)\n{",
"MigrationIncomingState *mis = VAR_0;",
"struct uffd_msg VAR_1;",
"int VAR_2;",
"RAMBlock *rb = NULL;",
"RAMBlock *last_rb = NULL;",
"trace_postcopy_ram_fault_thread_entry();",
"qemu_sem_post(&mis->fault_thread_sem);",
"while (true) {",
"ram_addr_t rb_offset;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57
],
[
59
... |
3,912 | static ssize_t qio_channel_websock_decode_header(QIOChannelWebsock *ioc,
Error **errp)
{
unsigned char opcode, fin, has_mask;
size_t header_size;
size_t payload_len;
QIOChannelWebsockHeader *header =
(QIOChannelWebsockHeader *)ioc->encinput... | true | qemu | eefa3d8ef649f9055611361e2201cca49f8c3433 | static ssize_t qio_channel_websock_decode_header(QIOChannelWebsock *ioc,
Error **errp)
{
unsigned char opcode, fin, has_mask;
size_t header_size;
size_t payload_len;
QIOChannelWebsockHeader *header =
(QIOChannelWebsockHeader *)ioc->encinput... | {
"code": [
"static ssize_t qio_channel_websock_decode_header(QIOChannelWebsock *ioc,",
" Error **errp)",
" fin = (header->b0 & QIO_CHANNEL_WEBSOCK_HEADER_FIELD_FIN) >>",
" QIO_CHANNEL_WEBSOCK_HEADER_SHIFT_FIN;",
" has_mask = (header->b1... | static ssize_t FUNC_0(QIOChannelWebsock *ioc,
Error **errp)
{
unsigned char VAR_0, VAR_1, VAR_2;
size_t header_size;
size_t payload_len;
QIOChannelWebsockHeader *header =
(QIOChannelWebsockHeader *)ioc->encinput.buffer;
if (ioc->payl... | [
"static ssize_t FUNC_0(QIOChannelWebsock *ioc,\nError **errp)\n{",
"unsigned char VAR_0, VAR_1, VAR_2;",
"size_t header_size;",
"size_t payload_len;",
"QIOChannelWebsockHeader *header =\n(QIOChannelWebsockHeader *)ioc->encinput.buffer;",
"if (ioc->payload_remain) {",
"error_setg(errp,\n\"Decoding header... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
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
],
[
35
],
[
37
],
[
41,
43
],
[
45
],
[
47,
49
],
[
51
],
[
55
... |
3,914 | static int vscsi_send_iu(VSCSIState *s, vscsi_req *req,
uint64_t length, uint8_t format)
{
long rc, rc1;
/* First copy the SRP */
rc = spapr_vio_dma_write(&s->vdev, req->crq.s.IU_data_ptr,
&req->iu, length);
if (rc) {
fprintf(stderr... | true | qemu | 22956a3755749b9cf6375ad024d58c1d277100bf | static int vscsi_send_iu(VSCSIState *s, vscsi_req *req,
uint64_t length, uint8_t format)
{
long rc, rc1;
rc = spapr_vio_dma_write(&s->vdev, req->crq.s.IU_data_ptr,
&req->iu, length);
if (rc) {
fprintf(stderr, "vscsi_send_iu: DMA wr... | {
"code": [
" req->crq.s.status = 0x00;"
],
"line_no": [
45
]
} | static int FUNC_0(VSCSIState *VAR_0, vscsi_req *VAR_1,
uint64_t VAR_2, uint8_t VAR_3)
{
long VAR_4, VAR_5;
VAR_4 = spapr_vio_dma_write(&VAR_0->vdev, VAR_1->crq.VAR_0.IU_data_ptr,
&VAR_1->iu, VAR_2);
if (VAR_4) {
fprintf(stderr, "FU... | [
"static int FUNC_0(VSCSIState *VAR_0, vscsi_req *VAR_1,\nuint64_t VAR_2, uint8_t VAR_3)\n{",
"long VAR_4, VAR_5;",
"VAR_4 = spapr_vio_dma_write(&VAR_0->vdev, VAR_1->crq.VAR_0.IU_data_ptr,\n&VAR_1->iu, VAR_2);",
"if (VAR_4) {",
"fprintf(stderr, \"FUNC_0: DMA write failure !\\n\");",
"}",
"VAR_1->crq.VAR_... | [
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
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53... |
3,915 | static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom)
{
AVStream *st = s->streams[1];
int av_unused tmp, tmp2;
int samples, size;
uint64_t pos = avio_tell(s->pb);
unsigned dts;
int ret;
dts = avio_rb32(s->pb);
st->codec->sample_rate = avio_rb32(s->pb);
... | true | FFmpeg | df92ac18528bac4566fc4f5ba4d607c1265791ea | static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom)
{
AVStream *st = s->streams[1];
int av_unused tmp, tmp2;
int samples, size;
uint64_t pos = avio_tell(s->pb);
unsigned dts;
int ret;
dts = avio_rb32(s->pb);
st->codec->sample_rate = avio_rb32(s->pb);
... | {
"code": [
" pkt->duration = av_rescale(samples, st->time_base.den, st->codec->sample_rate);"
],
"line_no": [
79
]
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1, Atom *VAR_2)
{
AVStream *st = VAR_0->streams[1];
int VAR_3 tmp, tmp2;
int VAR_4, VAR_5;
uint64_t pos = avio_tell(VAR_0->pb);
unsigned VAR_6;
int VAR_7;
VAR_6 = avio_rb32(VAR_0->pb);
st->codec->sample_rate = avio_rb32... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1, Atom *VAR_2)\n{",
"AVStream *st = VAR_0->streams[1];",
"int VAR_3 tmp, tmp2;",
"int VAR_4, VAR_5;",
"uint64_t pos = avio_tell(VAR_0->pb);",
"unsigned VAR_6;",
"int VAR_7;",
"VAR_6 = avio_rb32(VAR_0->pb);",
"st->codec->sample_rate = avio_rb3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
57
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.