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 |
|---|---|---|---|---|---|---|---|---|---|---|
22,239 | static int rv40_h_loop_filter_strength(uint8_t *src, int stride,
int beta, int beta2, int edge,
int *p1, int *q1)
{
return rv40_loop_filter_strength(src, stride, 1, beta, beta2, edge, p1, q1);
}
| true | FFmpeg | 3ab9a2a5577d445252724af4067d2a7c8a378efa | static int rv40_h_loop_filter_strength(uint8_t *src, int stride,
int beta, int beta2, int edge,
int *p1, int *q1)
{
return rv40_loop_filter_strength(src, stride, 1, beta, beta2, edge, p1, q1);
}
| {
"code": [
"static int rv40_h_loop_filter_strength(uint8_t *src, int stride,"
],
"line_no": [
1
]
} | static int FUNC_0(uint8_t *VAR_0, int VAR_1,
int VAR_2, int VAR_3, int VAR_4,
int *VAR_5, int *VAR_6)
{
return rv40_loop_filter_strength(VAR_0, VAR_1, 1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6);
}
| [
"static int FUNC_0(uint8_t *VAR_0, int VAR_1,\nint VAR_2, int VAR_3, int VAR_4,\nint *VAR_5, int *VAR_6)\n{",
"return rv40_loop_filter_strength(VAR_0, VAR_1, 1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6);",
"}"
] | [
1,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
]
] |
22,240 | static int decode_pic(AVSContext *h) {
MpegEncContext *s = &h->s;
int skip_count;
enum cavs_mb mb_type;
if (!s->context_initialized) {
s->avctx->idct_algo = FF_IDCT_CAVS;
if (MPV_common_init(s) < 0)
return -1;
ff_init_scantable(s->dsp.idct_permutation,&h->sc... | false | FFmpeg | 88db5551cf1ced4ea3e5e8bd5b684d2dc74b1ed2 | static int decode_pic(AVSContext *h) {
MpegEncContext *s = &h->s;
int skip_count;
enum cavs_mb mb_type;
if (!s->context_initialized) {
s->avctx->idct_algo = FF_IDCT_CAVS;
if (MPV_common_init(s) < 0)
return -1;
ff_init_scantable(s->dsp.idct_permutation,&h->sc... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVSContext *VAR_0) {
MpegEncContext *s = &VAR_0->s;
int VAR_1;
enum cavs_mb VAR_2;
if (!s->context_initialized) {
s->avctx->idct_algo = FF_IDCT_CAVS;
if (MPV_common_init(s) < 0)
return -1;
ff_init_scantable(s->dsp.idct_permutation,&VAR_0->s... | [
"static int FUNC_0(AVSContext *VAR_0) {",
"MpegEncContext *s = &VAR_0->s;",
"int VAR_1;",
"enum cavs_mb VAR_2;",
"if (!s->context_initialized) {",
"s->avctx->idct_algo = FF_IDCT_CAVS;",
"if (MPV_common_init(s) < 0)\nreturn -1;",
"ff_init_scantable(s->dsp.idct_permutation,&VAR_0->scantable,ff_zigzag_di... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
39,
41,
43
],
[
45
],
[
47... |
22,241 | static int gxf_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush)
{
GXFContext *gxf = s->priv_data;
AVPacket new_pkt;
int i;
for (i = 0; i < s->nb_streams; i++) {
if (s->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO) {
GXFStreamContext *sc = &... | false | FFmpeg | 6a287fd7ce5ea69f4eeadda6a049d669eb8efb46 | static int gxf_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush)
{
GXFContext *gxf = s->priv_data;
AVPacket new_pkt;
int i;
for (i = 0; i < s->nb_streams; i++) {
if (s->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO) {
GXFStreamContext *sc = &... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1, AVPacket *VAR_2, int VAR_3)
{
GXFContext *gxf = VAR_0->priv_data;
AVPacket new_pkt;
int VAR_4;
for (VAR_4 = 0; VAR_4 < VAR_0->nb_streams; VAR_4++) {
if (VAR_0->streams[VAR_4]->codec->codec_type == CODEC_TYPE_AUDIO) {
... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1, AVPacket *VAR_2, int VAR_3)\n{",
"GXFContext *gxf = VAR_0->priv_data;",
"AVPacket new_pkt;",
"int VAR_4;",
"for (VAR_4 = 0; VAR_4 < VAR_0->nb_streams; VAR_4++) {",
"if (VAR_0->streams[VAR_4]->codec->codec_type == CODEC_TYPE_AUDIO) {",
"GXFStrea... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
22,242 | int ff_nvdec_decode_init(AVCodecContext *avctx)
{
NVDECContext *ctx = avctx->internal->hwaccel_priv_data;
NVDECFramePool *pool;
AVHWFramesContext *frames_ctx;
const AVPixFmtDescriptor *sw_desc;
CUVIDDECODECREATEINFO params = { 0 };
int cuvid_codec_type, cuvid_chroma_format;
... | false | FFmpeg | 538de4354dcd6c57154c5a5dec0744dcaa06b874 | int ff_nvdec_decode_init(AVCodecContext *avctx)
{
NVDECContext *ctx = avctx->internal->hwaccel_priv_data;
NVDECFramePool *pool;
AVHWFramesContext *frames_ctx;
const AVPixFmtDescriptor *sw_desc;
CUVIDDECODECREATEINFO params = { 0 };
int cuvid_codec_type, cuvid_chroma_format;
... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0)
{
NVDECContext *ctx = VAR_0->internal->hwaccel_priv_data;
NVDECFramePool *pool;
AVHWFramesContext *frames_ctx;
const AVPixFmtDescriptor *VAR_1;
CUVIDDECODECREATEINFO params = { 0 };
int VAR_2, VAR_3;
int VAR_4 = 0;
VAR_1 = av_pix_... | [
"int FUNC_0(AVCodecContext *VAR_0)\n{",
"NVDECContext *ctx = VAR_0->internal->hwaccel_priv_data;",
"NVDECFramePool *pool;",
"AVHWFramesContext *frames_ctx;",
"const AVPixFmtDescriptor *VAR_1;",
"CUVIDDECODECREATEINFO params = { 0 };",
"int VAR_2, VAR_3;",
"int VAR_4 = 0;",
"VAR_1 = av_pix_fmt... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
... |
22,243 | static void versatile_init(ram_addr_t ram_size,
const char *boot_device,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model,
int board_id)
{
CPUState *env;
ram_addr... | true | qemu | e6b3c8ca0222f6633516c0461a713e7bddc4f076 | static void versatile_init(ram_addr_t ram_size,
const char *boot_device,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model,
int board_id)
{
CPUState *env;
ram_addr... | {
"code": [
" if ((!nd->model && !done_smc) || strcmp(nd->model, \"smc91c111\") == 0) {"
],
"line_no": [
109
]
} | static void FUNC_0(ram_addr_t VAR_0,
const char *VAR_1,
const char *VAR_2, const char *VAR_3,
const char *VAR_4, const char *VAR_5,
int VAR_6)
{
CPUState *env;
ram_addr_t ram_offset;
qemu_irq *cpu_pic;
qemu_irq ... | [
"static void FUNC_0(ram_addr_t VAR_0,\nconst char *VAR_1,\nconst char *VAR_2, const char *VAR_3,\nconst char *VAR_4, const char *VAR_5,\nint VAR_6)\n{",
"CPUState *env;",
"ram_addr_t ram_offset;",
"qemu_irq *cpu_pic;",
"qemu_irq pic[32];",
"qemu_irq sic[32];",
"DeviceState *dev;",
"PCIBus *pci_bus;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
22,245 | static void kvm_mem_ioeventfd_add(MemoryListener *listener,
MemoryRegionSection *section,
bool match_data, uint64_t data,
EventNotifier *e)
{
int fd = event_notifier_get_fd(e);
int r;
r = kvm_set_i... | true | qemu | fa4ba923bd539647ace9d70d226a848bd6a89dac | static void kvm_mem_ioeventfd_add(MemoryListener *listener,
MemoryRegionSection *section,
bool match_data, uint64_t data,
EventNotifier *e)
{
int fd = event_notifier_get_fd(e);
int r;
r = kvm_set_i... | {
"code": [],
"line_no": []
} | static void FUNC_0(MemoryListener *VAR_0,
MemoryRegionSection *VAR_1,
bool VAR_2, uint64_t VAR_3,
EventNotifier *VAR_4)
{
int VAR_5 = event_notifier_get_fd(VAR_4);
int VAR_6;
VAR_6 = kvm_set_ioeven... | [
"static void FUNC_0(MemoryListener *VAR_0,\nMemoryRegionSection *VAR_1,\nbool VAR_2, uint64_t VAR_3,\nEventNotifier *VAR_4)\n{",
"int VAR_5 = event_notifier_get_fd(VAR_4);",
"int VAR_6;",
"VAR_6 = kvm_set_ioeventfd_mmio(VAR_5, VAR_1->offset_within_address_space,\nVAR_3, true, int128_get64(VAR_1->size),\nVAR_2... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
17,
19,
21
],
[
23
],
[
27
],
[
29
],
[
31
]
] |
22,246 | static void vfio_probe_rtl8168_bar2_window_quirk(VFIOPCIDevice *vdev, int nr)
{
PCIDevice *pdev = &vdev->pdev;
VFIOQuirk *quirk;
if (pci_get_word(pdev->config + PCI_VENDOR_ID) != PCI_VENDOR_ID_REALTEK ||
pci_get_word(pdev->config + PCI_DEVICE_ID) != 0x8168 || nr != 2) {
return;
... | true | qemu | d451008e0fdf7fb817c791397e7999d5f3687e58 | static void vfio_probe_rtl8168_bar2_window_quirk(VFIOPCIDevice *vdev, int nr)
{
PCIDevice *pdev = &vdev->pdev;
VFIOQuirk *quirk;
if (pci_get_word(pdev->config + PCI_VENDOR_ID) != PCI_VENDOR_ID_REALTEK ||
pci_get_word(pdev->config + PCI_DEVICE_ID) != 0x8168 || nr != 2) {
return;
... | {
"code": [
" trace_vfio_probe_rtl8168_bar2_window_quirk(vdev->vbasedev.name);"
],
"line_no": [
43
]
} | static void FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1)
{
PCIDevice *pdev = &VAR_0->pdev;
VFIOQuirk *quirk;
if (pci_get_word(pdev->config + PCI_VENDOR_ID) != PCI_VENDOR_ID_REALTEK ||
pci_get_word(pdev->config + PCI_DEVICE_ID) != 0x8168 || VAR_1 != 2) {
return;
}
quirk = g_mal... | [
"static void FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1)\n{",
"PCIDevice *pdev = &VAR_0->pdev;",
"VFIOQuirk *quirk;",
"if (pci_get_word(pdev->config + PCI_VENDOR_ID) != PCI_VENDOR_ID_REALTEK ||\npci_get_word(pdev->config + PCI_DEVICE_ID) != 0x8168 || VAR_1 != 2) {",
"return;",
"}",
"quirk = g_malloc0(sizeof... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
33,
35
],
[
39
],
[
43
],
[
45
]
] |
22,247 | tcp_listen(Slirp *slirp, u_int32_t haddr, u_int hport, u_int32_t laddr,
u_int lport, int flags)
{
struct sockaddr_in addr;
struct socket *so;
int s, opt = 1;
socklen_t addrlen = sizeof(addr);
DEBUG_CALL("tcp_listen");
DEBUG_ARG("haddr = %x", haddr);
DEBUG_ARG("hport = %d", hport);
DEBUG_A... | true | qemu | 40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4 | tcp_listen(Slirp *slirp, u_int32_t haddr, u_int hport, u_int32_t laddr,
u_int lport, int flags)
{
struct sockaddr_in addr;
struct socket *so;
int s, opt = 1;
socklen_t addrlen = sizeof(addr);
DEBUG_CALL("tcp_listen");
DEBUG_ARG("haddr = %x", haddr);
DEBUG_ARG("hport = %d", hport);
DEBUG_A... | {
"code": [
"\tif (((s = socket(AF_INET,SOCK_STREAM,0)) < 0) ||"
],
"line_no": [
85
]
} | FUNC_0(Slirp *VAR_0, u_int32_t VAR_1, u_int VAR_2, u_int32_t VAR_3,
u_int VAR_4, int VAR_5)
{
struct sockaddr_in VAR_6;
struct socket *VAR_7;
int VAR_8, VAR_9 = 1;
socklen_t addrlen = sizeof(VAR_6);
DEBUG_CALL("FUNC_0");
DEBUG_ARG("VAR_1 = %x", VAR_1);
DEBUG_ARG("VAR_2 = %d", VAR_2);
DEBU... | [
"FUNC_0(Slirp *VAR_0, u_int32_t VAR_1, u_int VAR_2, u_int32_t VAR_3,\nu_int VAR_4, int VAR_5)\n{",
"struct sockaddr_in VAR_6;",
"struct socket *VAR_7;",
"int VAR_8, VAR_9 = 1;",
"socklen_t addrlen = sizeof(VAR_6);",
"DEBUG_CALL(\"FUNC_0\");",
"DEBUG_ARG(\"VAR_1 = %x\", VAR_1);",
"DEBUG_ARG(\"VAR_2 = %... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
22,248 | static void test_dummy_createcmdl(void)
{
QemuOpts *opts;
DummyObject *dobj;
Error *err = NULL;
const char *params = TYPE_DUMMY \
",id=dev0," \
"bv=yes,sv=Hiss hiss hiss,av=platypus";
qemu_add_opts(&qemu_object_opts);
opts = qemu_opts_parse(&qemu... | true | qemu | 80792eb9257588d9a554605f3411cbc7ed51e9bc | static void test_dummy_createcmdl(void)
{
QemuOpts *opts;
DummyObject *dobj;
Error *err = NULL;
const char *params = TYPE_DUMMY \
",id=dev0," \
"bv=yes,sv=Hiss hiss hiss,av=platypus";
qemu_add_opts(&qemu_object_opts);
opts = qemu_opts_parse(&qemu... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
QemuOpts *opts;
DummyObject *dobj;
Error *err = NULL;
const char *VAR_0 = TYPE_DUMMY \
",id=dev0," \
"bv=yes,sv=Hiss hiss hiss,av=platypus";
qemu_add_opts(&qemu_object_opts);
opts = qemu_opts_parse(&qemu_object_opts, VA... | [
"static void FUNC_0(void)\n{",
"QemuOpts *opts;",
"DummyObject *dobj;",
"Error *err = NULL;",
"const char *VAR_0 = TYPE_DUMMY \\\n\",id=dev0,\" \\\n\"bv=yes,sv=Hiss hiss hiss,av=platypus\";",
"qemu_add_opts(&qemu_object_opts);",
"opts = qemu_opts_parse(&qemu_object_opts, VAR_0, true, &err);",
"g_asser... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6,
7,
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
34
],... |
22,249 | static int thp_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
ThpDemuxContext *thp = s->priv_data;
AVIOContext *pb = s->pb;
unsigned int size;
int ret;
if (thp->audiosize == 0) {
/* Terminate when last frame is reached. */
if (thp->frame >= t... | true | FFmpeg | dc3c3758ce6368aa2f0a9a9b544bce2e130cc4e1 | static int thp_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
ThpDemuxContext *thp = s->priv_data;
AVIOContext *pb = s->pb;
unsigned int size;
int ret;
if (thp->audiosize == 0) {
if (thp->frame >= thp->framecnt)
return AVERROR_EO... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
AVPacket *VAR_1)
{
ThpDemuxContext *thp = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
unsigned int VAR_2;
int VAR_3;
if (thp->audiosize == 0) {
if (thp->frame >= thp->framecnt)
return AV... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nAVPacket *VAR_1)\n{",
"ThpDemuxContext *thp = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"unsigned int VAR_2;",
"int VAR_3;",
"if (thp->audiosize == 0) {",
"if (thp->frame >= thp->framecnt)\nreturn AVERROR_EOF;",
"avio_seek(pb, thp->next_frame, SEEK... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21,
23
],
[
27
],
[
33
],
[
35
],
[
39
],
[
41
],
[
49,
51
],
[
53,
55
],
[
59
],
[
63
],
[
65
],
[
67
... |
22,251 | static int RENAME(resample_common)(ResampleContext *c,
DELEM *dst, const DELEM *src,
int n, int update_ctx)
{
int dst_index;
int index= c->index;
int frac= c->frac;
int sample_index = index >> c->phase_shift;
index &= c-... | false | FFmpeg | 857cd1f33bcf86005529af2a77f861f884327be5 | static int RENAME(resample_common)(ResampleContext *c,
DELEM *dst, const DELEM *src,
int n, int update_ctx)
{
int dst_index;
int index= c->index;
int frac= c->frac;
int sample_index = index >> c->phase_shift;
index &= c-... | {
"code": [],
"line_no": []
} | static int FUNC_0(resample_common)(ResampleContext *c,
DELEM *dst, const DELEM *src,
int n, int update_ctx)
{
int VAR_0;
int VAR_1= c->VAR_1;
int VAR_2= c->VAR_2;
int VAR_3 = VAR_1 >> c->phase_shift;
VAR_1 &= c->phase_ma... | [
"static int FUNC_0(resample_common)(ResampleContext *c,\nDELEM *dst, const DELEM *src,\nint n, int update_ctx)\n{",
"int VAR_0;",
"int VAR_1= c->VAR_1;",
"int VAR_2= c->VAR_2;",
"int VAR_3 = VAR_1 >> c->phase_shift;",
"VAR_1 &= c->phase_mask;",
"for (VAR_0 = 0; VAR_0 < n; VAR_0++) {",
"FELEM *filter =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
22,252 | static int send_status(int sockfd, struct iovec *iovec, int status)
{
ProxyHeader header;
int retval, msg_size;
if (status < 0) {
header.type = T_ERROR;
} else {
header.type = T_SUCCESS;
header.size = sizeof(status);
/*
* marshal the return status. We don't chec... | true | qemu | 821c447675728ca06c8d2e4ac8a0e7a1adf775b8 | static int send_status(int sockfd, struct iovec *iovec, int status)
{
ProxyHeader header;
int retval, msg_size;
if (status < 0) {
header.type = T_ERROR;
} else {
header.type = T_SUCCESS;
header.size = sizeof(status);
msg_size = proxy_marshal(iovec, 0, "ddd... | {
"code": [],
"line_no": []
} | static int FUNC_0(int VAR_0, struct VAR_1 *VAR_1, int VAR_2)
{
ProxyHeader header;
int VAR_3, VAR_4;
if (VAR_2 < 0) {
header.type = T_ERROR;
} else {
header.type = T_SUCCESS;
header.size = sizeof(VAR_2);
VAR_4 = proxy_marshal(VAR_1, 0, "ddd", header.type,
... | [
"static int FUNC_0(int VAR_0, struct VAR_1 *VAR_1, int VAR_2)\n{",
"ProxyHeader header;",
"int VAR_3, VAR_4;",
"if (VAR_2 < 0) {",
"header.type = T_ERROR;",
"} else {",
"header.type = T_SUCCESS;",
"header.size = sizeof(VAR_2);",
"VAR_4 = proxy_marshal(VAR_1, 0, \"ddd\", header.type,\nheader.size, VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
20
],
[
30,
32
],
[
37
],
[
39
],
[
41
],
[
44
]
] |
22,253 | int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height,
uint8_t *ptr, const int linesizes[4])
{
int i, total_size, size[4], has_plane[4];
const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt];
memset(data , 0, sizeof(data[0])*4);
... | true | FFmpeg | 38d553322891c8e47182f05199d19888422167dc | int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height,
uint8_t *ptr, const int linesizes[4])
{
int i, total_size, size[4], has_plane[4];
const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt];
memset(data , 0, sizeof(data[0])*4);
... | {
"code": [
" if (desc->flags & PIX_FMT_PAL) {",
" if (desc->flags & PIX_FMT_PAL) {"
],
"line_no": [
37,
37
]
} | int FUNC_0(uint8_t *VAR_0[4], enum PixelFormat VAR_1, int VAR_2,
uint8_t *VAR_3, const int VAR_4[4])
{
int VAR_5, VAR_6, VAR_7[4], VAR_8[4];
const AVPixFmtDescriptor *VAR_9 = &av_pix_fmt_descriptors[VAR_1];
memset(VAR_0 , 0, sizeof(VAR_0[0])*4);
memset(VAR_7 , ... | [
"int FUNC_0(uint8_t *VAR_0[4], enum PixelFormat VAR_1, int VAR_2,\nuint8_t *VAR_3, const int VAR_4[4])\n{",
"int VAR_5, VAR_6, VAR_7[4], VAR_8[4];",
"const AVPixFmtDescriptor *VAR_9 = &av_pix_fmt_descriptors[VAR_1];",
"memset(VAR_0 , 0, sizeof(VAR_0[0])*4);",
"memset(VAR_7 , 0, sizeof(VAR_7));",
"... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
27
],
[
29,
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
55
],
... |
22,254 | int64_t qmp_query_migrate_cache_size(Error **errp)
{
return migrate_xbzrle_cache_size();
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | int64_t qmp_query_migrate_cache_size(Error **errp)
{
return migrate_xbzrle_cache_size();
}
| {
"code": [],
"line_no": []
} | int64_t FUNC_0(Error **errp)
{
return migrate_xbzrle_cache_size();
}
| [
"int64_t FUNC_0(Error **errp)\n{",
"return migrate_xbzrle_cache_size();",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
22,255 | av_cold int MPV_common_init(MpegEncContext *s)
{
int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y, threads;
if(s->codec_id == CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
s->mb_height = (s->height + 31) / 32 * 2;
else
s->mb_height = (s->height + 15) / 16;
... | true | FFmpeg | 79042a6eb150e5d80a0e7bf242d9945d1246703b | av_cold int MPV_common_init(MpegEncContext *s)
{
int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y, threads;
if(s->codec_id == CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
s->mb_height = (s->height + 31) / 32 * 2;
else
s->mb_height = (s->height + 15) / 16;
... | {
"code": [
" FF_ALLOCZ_OR_GOTO(s->avctx, s->ac_val_base, yc_size * sizeof(int16_t) * 16, fail);",
" s->ac_val[0] = s->ac_val_base + s->b8_stride + 1;",
" s->ac_val[1] = s->ac_val_base + y_size + s->mb_stride + 1;",
" s->ac_val[2] = s->ac_val[1] + c_size;"
],
"line_no":... | av_cold int FUNC_0(MpegEncContext *s)
{
int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
if(s->codec_id == CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
s->mb_height = (s->height + 31) / 32 * 2;
else
s->mb_height = (s->height + 15) / 16;
if(s->avctx->pix_f... | [
"av_cold int FUNC_0(MpegEncContext *s)\n{",
"int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"if(s->codec_id == CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)\ns->mb_height = (s->height + 31) / 32 * 2;",
"else\ns->mb_height = (s->height + 15) / 16;",
"if(s->avctx->pix_fmt == PIX_FMT_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,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39,
41
],
[
45
],
[
47
],
[
51
],
[
53
],
[
57
],
... |
22,256 | static av_cold int aac_decode_init(AVCodecContext *avctx)
{
AACContext *ac = avctx->priv_data;
int ret;
ac->avctx = avctx;
ac->oc[1].m4ac.sample_rate = avctx->sample_rate;
aacdec_init(ac);
#if USE_FIXED
avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
#else
avctx->sample_fmt = AV_SAMPLE... | true | FFmpeg | 7f46a641bf2540b8cf1293d5e50c0c0e34264254 | static av_cold int aac_decode_init(AVCodecContext *avctx)
{
AACContext *ac = avctx->priv_data;
int ret;
ac->avctx = avctx;
ac->oc[1].m4ac.sample_rate = avctx->sample_rate;
aacdec_init(ac);
#if USE_FIXED
avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
#else
avctx->sample_fmt = AV_SAMPLE... | {
"code": [
" avctx->extradata_size * 8,"
],
"line_no": [
37
]
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
AACContext *ac = avctx->priv_data;
int VAR_4;
ac->avctx = avctx;
ac->oc[1].m4ac.sample_rate = avctx->sample_rate;
aacdec_init(ac);
#if USE_FIXED
avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
#else
avctx->sample_fmt = AV_SAMPLE_FMT_FL... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"AACContext *ac = avctx->priv_data;",
"int VAR_4;",
"ac->avctx = avctx;",
"ac->oc[1].m4ac.sample_rate = avctx->sample_rate;",
"aacdec_init(ac);",
"#if USE_FIXED\navctx->sample_fmt = AV_SAMPLE_FMT_S32P;",
"#else\navctx->sample_fmt = AV_SAMPLE_FMT_F... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23,
25
],
[
27,
31
],
[
33,
35,
37,
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
],
... |
22,257 | PPC_OP(addic)
{
T1 = T0;
T0 += PARAM(1);
if (T0 < T1) {
xer_ca = 1;
} else {
xer_ca = 0;
}
RETURN();
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | PPC_OP(addic)
{
T1 = T0;
T0 += PARAM(1);
if (T0 < T1) {
xer_ca = 1;
} else {
xer_ca = 0;
}
RETURN();
}
| {
"code": [
" RETURN();",
" xer_ca = 1;",
"PPC_OP(addic)",
" T1 = T0;",
" T0 += PARAM(1);",
" if (T0 < T1) {",
" } else {",
" xer_ca = 0;",
" T1 = T0;",
" T1 = T0;",
" if (T0 < T1) {",
" xer_ca = 1;",
" } else {",
... | FUNC_0(VAR_0)
{
T1 = T0;
T0 += PARAM(1);
if (T0 < T1) {
xer_ca = 1;
} else {
xer_ca = 0;
}
RETURN();
}
| [
"FUNC_0(VAR_0)\n{",
"T1 = T0;",
"T0 += PARAM(1);",
"if (T0 < T1) {",
"xer_ca = 1;",
"} else {",
"xer_ca = 0;",
"}",
"RETURN();",
"}"
] | [
1,
1,
1,
1,
1,
0,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
22,258 | void qemu_update_position(QEMUFile *f, size_t size)
{
f->pos += size;
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | void qemu_update_position(QEMUFile *f, size_t size)
{
f->pos += size;
}
| {
"code": [],
"line_no": []
} | void FUNC_0(QEMUFile *VAR_0, size_t VAR_1)
{
VAR_0->pos += VAR_1;
}
| [
"void FUNC_0(QEMUFile *VAR_0, size_t VAR_1)\n{",
"VAR_0->pos += VAR_1;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
22,259 | static ExitStatus translate_one(DisasContext *ctx, uint32_t insn)
{
int32_t disp21, disp16, disp12 __attribute__((unused));
uint16_t fn11;
uint8_t opc, ra, rb, rc, fpfn, fn7, lit;
bool islit;
TCGv va, vb, vc, tmp;
TCGv_i32 t32;
ExitStatus ret;
/* Decode all instruction fields ... | true | qemu | 4d1628e832dfc6ec02b0d196f6cc250aaa7bf3b3 | static ExitStatus translate_one(DisasContext *ctx, uint32_t insn)
{
int32_t disp21, disp16, disp12 __attribute__((unused));
uint16_t fn11;
uint8_t opc, ra, rb, rc, fpfn, fn7, lit;
bool islit;
TCGv va, vb, vc, tmp;
TCGv_i32 t32;
ExitStatus ret;
opc = extract32(insn, 26, 6... | {
"code": [
" TCGv va, vb, vc, tmp;",
" gen_helper_addlv(vc, cpu_env, va, vb);",
" gen_helper_sublv(vc, cpu_env, va, vb);",
" gen_helper_addqv(vc, cpu_env, va, vb);",
" gen_helper_subqv(vc, cpu_env, va, vb);",
" gen_helper_mullv(vc, cpu... | static ExitStatus FUNC_0(DisasContext *ctx, uint32_t insn)
{
int32_t disp21, disp16, disp12 __attribute__((unused));
uint16_t fn11;
uint8_t opc, ra, rb, rc, fpfn, fn7, lit;
bool islit;
TCGv va, vb, vc, tmp;
TCGv_i32 t32;
ExitStatus ret;
opc = extract32(insn, 26, 6);
... | [
"static ExitStatus FUNC_0(DisasContext *ctx, uint32_t insn)\n{",
"int32_t disp21, disp16, disp12 __attribute__((unused));",
"uint16_t fn11;",
"uint8_t opc, ra, rb, rc, fpfn, fn7, lit;",
"bool islit;",
"TCGv va, vb, vc, tmp;",
"TCGv_i32 t32;",
"ExitStatus ret;",
"opc = extract32(insn, 26, 6);",
"ra... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
... |
22,260 | CPUMIPSState *cpu_mips_init (const char *cpu_model)
{
CPUMIPSState *env;
const mips_def_t *def;
def = cpu_mips_find_by_name(cpu_model);
if (!def)
return NULL;
env = qemu_mallocz(sizeof(CPUMIPSState));
env->cpu_model = def;
cpu_exec_init(env);
env->cpu_model_str = cp... | true | qemu | 51cc2e783af5586b2e742ce9e5b2762dc50ad325 | CPUMIPSState *cpu_mips_init (const char *cpu_model)
{
CPUMIPSState *env;
const mips_def_t *def;
def = cpu_mips_find_by_name(cpu_model);
if (!def)
return NULL;
env = qemu_mallocz(sizeof(CPUMIPSState));
env->cpu_model = def;
cpu_exec_init(env);
env->cpu_model_str = cp... | {
"code": [
" env->cpu_model_str = cpu_model;"
],
"line_no": [
25
]
} | CPUMIPSState *FUNC_0 (const char *cpu_model)
{
CPUMIPSState *env;
const mips_def_t *VAR_0;
VAR_0 = cpu_mips_find_by_name(cpu_model);
if (!VAR_0)
return NULL;
env = qemu_mallocz(sizeof(CPUMIPSState));
env->cpu_model = VAR_0;
cpu_exec_init(env);
env->cpu_model_str = c... | [
"CPUMIPSState *FUNC_0 (const char *cpu_model)\n{",
"CPUMIPSState *env;",
"const mips_def_t *VAR_0;",
"VAR_0 = cpu_mips_find_by_name(cpu_model);",
"if (!VAR_0)\nreturn NULL;",
"env = qemu_mallocz(sizeof(CPUMIPSState));",
"env->cpu_model = VAR_0;",
"cpu_exec_init(env);",
"env->cpu_model_str = cpu_mode... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
22,262 | static void *qpa_thread_out (void *arg)
{
PAVoiceOut *pa = arg;
HWVoiceOut *hw = &pa->hw;
int threshold;
threshold = conf.divisor ? hw->samples / conf.divisor : 0;
if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) {
return NULL;
}
for (;;) {
int decr, to_mix, rpos;
... | true | qemu | fd5723b385557bc77b93dfe5ab591813407686c0 | static void *qpa_thread_out (void *arg)
{
PAVoiceOut *pa = arg;
HWVoiceOut *hw = &pa->hw;
int threshold;
threshold = conf.divisor ? hw->samples / conf.divisor : 0;
if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) {
return NULL;
}
for (;;) {
int decr, to_mix, rpos;
... | {
"code": [
" pa->live -= decr;"
],
"line_no": [
117
]
} | static void *FUNC_0 (void *VAR_0)
{
PAVoiceOut *pa = VAR_0;
HWVoiceOut *hw = &pa->hw;
int VAR_1;
VAR_1 = conf.divisor ? hw->samples / conf.divisor : 0;
if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) {
return NULL;
}
for (;;) {
int VAR_2, VAR_3, VAR_4;
for... | [
"static void *FUNC_0 (void *VAR_0)\n{",
"PAVoiceOut *pa = VAR_0;",
"HWVoiceOut *hw = &pa->hw;",
"int VAR_1;",
"VAR_1 = conf.divisor ? hw->samples / conf.divisor : 0;",
"if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) {",
"return NULL;",
"}",
"for (;;) {",
"int VAR_2, VAR_3, VAR_4;",
"for (;;) {",
"if... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
... |
22,263 | static void complete_collecting_data(Flash *s)
{
int i;
s->cur_addr = 0;
for (i = 0; i < get_addr_length(s); ++i) {
s->cur_addr <<= 8;
s->cur_addr |= s->data[i];
}
if (get_addr_length(s) == 3) {
s->cur_addr += s->ear * MAX_3BYTES_SIZE;
}
s->state = ... | true | qemu | b68cb06093a36bd6fbd4d06cd62c08629fea2242 | static void complete_collecting_data(Flash *s)
{
int i;
s->cur_addr = 0;
for (i = 0; i < get_addr_length(s); ++i) {
s->cur_addr <<= 8;
s->cur_addr |= s->data[i];
}
if (get_addr_length(s) == 3) {
s->cur_addr += s->ear * MAX_3BYTES_SIZE;
}
s->state = ... | {
"code": [
" int i;",
" s->cur_addr = 0;",
" for (i = 0; i < get_addr_length(s); ++i) {",
" if (get_addr_length(s) == 3) {",
" s->cur_addr += s->ear * MAX_3BYTES_SIZE;"
],
"line_no": [
5,
9,
13,
23,
25
]
} | static void FUNC_0(Flash *VAR_0)
{
int VAR_1;
VAR_0->cur_addr = 0;
for (VAR_1 = 0; VAR_1 < get_addr_length(VAR_0); ++VAR_1) {
VAR_0->cur_addr <<= 8;
VAR_0->cur_addr |= VAR_0->data[VAR_1];
}
if (get_addr_length(VAR_0) == 3) {
VAR_0->cur_addr += VAR_0->ear * MAX_... | [
"static void FUNC_0(Flash *VAR_0)\n{",
"int VAR_1;",
"VAR_0->cur_addr = 0;",
"for (VAR_1 = 0; VAR_1 < get_addr_length(VAR_0); ++VAR_1) {",
"VAR_0->cur_addr <<= 8;",
"VAR_0->cur_addr |= VAR_0->data[VAR_1];",
"}",
"if (get_addr_length(VAR_0) == 3) {",
"VAR_0->cur_addr += VAR_0->ear * MAX_3BYTES_SIZE;"... | [
0,
1,
1,
1,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37,
39,
41,
43,
45,
47
],
[
49
],
[
51,
53,
55,
57,
59,
61... |
22,264 | static inline void gen_op_fpexception_im(int fsr_flags)
{
TCGv r_const;
tcg_gen_andi_tl(cpu_fsr, cpu_fsr, ~FSR_FTT_MASK);
tcg_gen_ori_tl(cpu_fsr, cpu_fsr, fsr_flags);
r_const = tcg_const_i32(TT_FP_EXCP);
tcg_gen_helper_0_1(raise_exception, r_const);
tcg_temp_free(r_const);
}
| true | qemu | 47ad35f16ae4b6b93cbfa238d51d4edc7dea90b5 | static inline void gen_op_fpexception_im(int fsr_flags)
{
TCGv r_const;
tcg_gen_andi_tl(cpu_fsr, cpu_fsr, ~FSR_FTT_MASK);
tcg_gen_ori_tl(cpu_fsr, cpu_fsr, fsr_flags);
r_const = tcg_const_i32(TT_FP_EXCP);
tcg_gen_helper_0_1(raise_exception, r_const);
tcg_temp_free(r_const);
}
| {
"code": [
" tcg_gen_andi_tl(cpu_fsr, cpu_fsr, ~FSR_FTT_MASK);"
],
"line_no": [
9
]
} | static inline void FUNC_0(int VAR_0)
{
TCGv r_const;
tcg_gen_andi_tl(cpu_fsr, cpu_fsr, ~FSR_FTT_MASK);
tcg_gen_ori_tl(cpu_fsr, cpu_fsr, VAR_0);
r_const = tcg_const_i32(TT_FP_EXCP);
tcg_gen_helper_0_1(raise_exception, r_const);
tcg_temp_free(r_const);
}
| [
"static inline void FUNC_0(int VAR_0)\n{",
"TCGv r_const;",
"tcg_gen_andi_tl(cpu_fsr, cpu_fsr, ~FSR_FTT_MASK);",
"tcg_gen_ori_tl(cpu_fsr, cpu_fsr, VAR_0);",
"r_const = tcg_const_i32(TT_FP_EXCP);",
"tcg_gen_helper_0_1(raise_exception, r_const);",
"tcg_temp_free(r_const);",
"}"
] | [
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
22,266 | static int msf_probe(AVProbeData *p)
{
if (memcmp(p->buf, "MSF", 3))
return 0;
if (AV_RB32(p->buf+8) <= 0)
return 0;
if (AV_RB32(p->buf+16) <= 0)
return 0;
return AVPROBE_SCORE_MAX / 3 * 2;
} | true | FFmpeg | a6cd817a544e4e526f18391bd2c7112dc12d2f94 | static int msf_probe(AVProbeData *p)
{
if (memcmp(p->buf, "MSF", 3))
return 0;
if (AV_RB32(p->buf+8) <= 0)
return 0;
if (AV_RB32(p->buf+16) <= 0)
return 0;
return AVPROBE_SCORE_MAX / 3 * 2;
} | {
"code": [],
"line_no": []
} | static int FUNC_0(AVProbeData *VAR_0)
{
if (memcmp(VAR_0->buf, "MSF", 3))
return 0;
if (AV_RB32(VAR_0->buf+8) <= 0)
return 0;
if (AV_RB32(VAR_0->buf+16) <= 0)
return 0;
return AVPROBE_SCORE_MAX / 3 * 2;
} | [
"static int FUNC_0(AVProbeData *VAR_0)\n{",
"if (memcmp(VAR_0->buf, \"MSF\", 3))\nreturn 0;",
"if (AV_RB32(VAR_0->buf+8) <= 0)\nreturn 0;",
"if (AV_RB32(VAR_0->buf+16) <= 0)\nreturn 0;",
"return AVPROBE_SCORE_MAX / 3 * 2;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3,
4
],
[
5,
6
],
[
7,
8
],
[
9
],
[
10
]
] |
22,267 | static void check_exception(PowerPCCPU *cpu, sPAPREnvironment *spapr,
uint32_t token, uint32_t nargs,
target_ulong args,
uint32_t nret, target_ulong rets)
{
uint32_t mask, buf, len, event_len;
uint64_t xinfo;
sPAPREve... | false | qemu | 79853e18d904b0a4bcef62701d48559688007c93 | static void check_exception(PowerPCCPU *cpu, sPAPREnvironment *spapr,
uint32_t token, uint32_t nargs,
target_ulong args,
uint32_t nret, target_ulong rets)
{
uint32_t mask, buf, len, event_len;
uint64_t xinfo;
sPAPREve... | {
"code": [],
"line_no": []
} | static void FUNC_0(PowerPCCPU *VAR_0, sPAPREnvironment *VAR_1,
uint32_t VAR_2, uint32_t VAR_3,
target_ulong VAR_4,
uint32_t VAR_5, target_ulong VAR_6)
{
uint32_t mask, buf, len, event_len;
uint64_t xinfo;
sPAPREventLo... | [
"static void FUNC_0(PowerPCCPU *VAR_0, sPAPREnvironment *VAR_1,\nuint32_t VAR_2, uint32_t VAR_3,\ntarget_ulong VAR_4,\nuint32_t VAR_5, target_ulong VAR_6)\n{",
"uint32_t mask, buf, len, event_len;",
"uint64_t xinfo;",
"sPAPREventLogEntry *event;",
"struct rtas_error_log *VAR_7;",
"if ((VAR_3 < 6) || (VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[... |
22,268 | static void raw_fd_pool_put(RawAIOCB *acb)
{
BDRVRawState *s = acb->common.bs->opaque;
int i;
for (i = 0; i < RAW_FD_POOL_SIZE; i++) {
if (s->fd_pool[i] == acb->fd) {
close(s->fd_pool[i]);
s->fd_pool[i] = -1;
}
}
}
| false | qemu | 3c529d935923a70519557d420db1d5a09a65086a | static void raw_fd_pool_put(RawAIOCB *acb)
{
BDRVRawState *s = acb->common.bs->opaque;
int i;
for (i = 0; i < RAW_FD_POOL_SIZE; i++) {
if (s->fd_pool[i] == acb->fd) {
close(s->fd_pool[i]);
s->fd_pool[i] = -1;
}
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(RawAIOCB *VAR_0)
{
BDRVRawState *s = VAR_0->common.bs->opaque;
int VAR_1;
for (VAR_1 = 0; VAR_1 < RAW_FD_POOL_SIZE; VAR_1++) {
if (s->fd_pool[VAR_1] == VAR_0->fd) {
close(s->fd_pool[VAR_1]);
s->fd_pool[VAR_1] = -1;
}
}
}
| [
"static void FUNC_0(RawAIOCB *VAR_0)\n{",
"BDRVRawState *s = VAR_0->common.bs->opaque;",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < RAW_FD_POOL_SIZE; VAR_1++) {",
"if (s->fd_pool[VAR_1] == VAR_0->fd) {",
"close(s->fd_pool[VAR_1]);",
"s->fd_pool[VAR_1] = -1;",
"}",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
22,271 | static void test_redirector_rx(void)
{
int backend_sock[2], send_sock;
char *cmdline;
uint32_t ret = 0, len = 0;
char send_buf[] = "Hello!!";
char sock_path0[] = "filter-redirector0.XXXXXX";
char sock_path1[] = "filter-redirector1.XXXXXX";
char *recv_buf;
uint32_t size = sizeof(... | false | qemu | ea5bef49eadd240c7924f287f2da1bb457a3f92c | static void test_redirector_rx(void)
{
int backend_sock[2], send_sock;
char *cmdline;
uint32_t ret = 0, len = 0;
char send_buf[] = "Hello!!";
char sock_path0[] = "filter-redirector0.XXXXXX";
char sock_path1[] = "filter-redirector1.XXXXXX";
char *recv_buf;
uint32_t size = sizeof(... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
int VAR_0[2], VAR_1;
char *VAR_2;
uint32_t ret = 0, len = 0;
char VAR_3[] = "Hello!!";
char VAR_4[] = "filter-redirector0.XXXXXX";
char VAR_5[] = "filter-redirector1.XXXXXX";
char *VAR_6;
uint32_t size = sizeof(VAR_3);
size = htonl(size);
r... | [
"static void FUNC_0(void)\n{",
"int VAR_0[2], VAR_1;",
"char *VAR_2;",
"uint32_t ret = 0, len = 0;",
"char VAR_3[] = \"Hello!!\";",
"char VAR_4[] = \"filter-redirector0.XXXXXX\";",
"char VAR_5[] = \"filter-redirector1.XXXXXX\";",
"char *VAR_6;",
"uint32_t size = sizeof(VAR_3);",
"size = htonl(size... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
37
],
[
41,
43,
45,
47,
49,
51,
53,... |
22,272 | static void cpu_openrisc_load_kernel(ram_addr_t ram_size,
const char *kernel_filename,
OpenRISCCPU *cpu)
{
long kernel_size;
uint64_t elf_entry;
hwaddr entry;
if (kernel_filename && !qtest_enabled()) {
kernel_siz... | false | qemu | 13f1c773640171efa8175b1ba6dcd624c1ad68c1 | static void cpu_openrisc_load_kernel(ram_addr_t ram_size,
const char *kernel_filename,
OpenRISCCPU *cpu)
{
long kernel_size;
uint64_t elf_entry;
hwaddr entry;
if (kernel_filename && !qtest_enabled()) {
kernel_siz... | {
"code": [],
"line_no": []
} | static void FUNC_0(ram_addr_t VAR_0,
const char *VAR_1,
OpenRISCCPU *VAR_2)
{
long VAR_3;
uint64_t elf_entry;
hwaddr entry;
if (VAR_1 && !qtest_enabled()) {
VAR_3 = load_elf(VAR_1, NULL, NULL,
... | [
"static void FUNC_0(ram_addr_t VAR_0,\nconst char *VAR_1,\nOpenRISCCPU *VAR_2)\n{",
"long VAR_3;",
"uint64_t elf_entry;",
"hwaddr entry;",
"if (VAR_1 && !qtest_enabled()) {",
"VAR_3 = load_elf(VAR_1, NULL, NULL,\n&elf_entry, NULL, NULL, 1, EM_OPENRISC,\n1, 0);",
"entry = elf_entry;",
"if (VAR_3 < 0) {... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19,
21,
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37,
39,
41
],
[
43
],
[
45
],
[
49
],
[
51,
53
... |
22,274 | static void configure_rtc_date_offset(const char *startdate, int legacy)
{
time_t rtc_start_date;
struct tm tm;
if (!strcmp(startdate, "now") && legacy) {
rtc_date_offset = -1;
} else {
if (sscanf(startdate, "%d-%d-%dT%d:%d:%d",
&tm.tm_year,
... | false | qemu | 2ed1ebcf65edf6757d8904000889ce52cc0a9d1b | static void configure_rtc_date_offset(const char *startdate, int legacy)
{
time_t rtc_start_date;
struct tm tm;
if (!strcmp(startdate, "now") && legacy) {
rtc_date_offset = -1;
} else {
if (sscanf(startdate, "%d-%d-%dT%d:%d:%d",
&tm.tm_year,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(const char *VAR_0, int VAR_1)
{
time_t rtc_start_date;
struct VAR_2 VAR_2;
if (!strcmp(VAR_0, "now") && VAR_1) {
rtc_date_offset = -1;
} else {
if (sscanf(VAR_0, "%d-%d-%dT%d:%d:%d",
&VAR_2.tm_year,
&VAR_2.tm_mon,
... | [
"static void FUNC_0(const char *VAR_0, int VAR_1)\n{",
"time_t rtc_start_date;",
"struct VAR_2 VAR_2;",
"if (!strcmp(VAR_0, \"now\") && VAR_1) {",
"rtc_date_offset = -1;",
"} else {",
"if (sscanf(VAR_0, \"%d-%d-%dT%d:%d:%d\",\n&VAR_2.tm_year,\n&VAR_2.tm_mon,\n&VAR_2.tm_mday,\n&VAR_2.tm_hour,\n&VAR_2.tm_... | [
0,
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
],
[
33
],
[
35,
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53... |
22,275 | void ppc_slb_invalidate_all (CPUPPCState *env)
{
/* XXX: TODO */
tlb_flush(env, 1);
}
| false | qemu | eacc324914c2dc7aecec3b4ea920252b685b5c8e | void ppc_slb_invalidate_all (CPUPPCState *env)
{
tlb_flush(env, 1);
}
| {
"code": [],
"line_no": []
} | void FUNC_0 (CPUPPCState *VAR_0)
{
tlb_flush(VAR_0, 1);
}
| [
"void FUNC_0 (CPUPPCState *VAR_0)\n{",
"tlb_flush(VAR_0, 1);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
]
] |
22,277 | int load_image_targphys(const char *filename,
target_phys_addr_t addr, int max_sz)
{
FILE *f;
size_t got;
f = fopen(filename, "rb");
if (!f) return -1;
got = fread_targphys(addr, max_sz, f);
if (ferror(f)) { fclose(f); return -1; }
fclose(f);
return got;
}
| false | qemu | 45a50b1668822c23afc2a89f724654e176518bc4 | int load_image_targphys(const char *filename,
target_phys_addr_t addr, int max_sz)
{
FILE *f;
size_t got;
f = fopen(filename, "rb");
if (!f) return -1;
got = fread_targphys(addr, max_sz, f);
if (ferror(f)) { fclose(f); return -1; }
fclose(f);
return got;
}
| {
"code": [],
"line_no": []
} | int FUNC_0(const char *VAR_0,
target_phys_addr_t VAR_1, int VAR_2)
{
FILE *f;
size_t got;
f = fopen(VAR_0, "rb");
if (!f) return -1;
got = fread_targphys(VAR_1, VAR_2, f);
if (ferror(f)) { fclose(f); return -1; }
fclose(f);
return got;
}
| [
"int FUNC_0(const char *VAR_0,\ntarget_phys_addr_t VAR_1, int VAR_2)\n{",
"FILE *f;",
"size_t got;",
"f = fopen(VAR_0, \"rb\");",
"if (!f) return -1;",
"got = fread_targphys(VAR_1, VAR_2, f);",
"if (ferror(f)) { fclose(f); return -1; }",
"fclose(f);",
"return got;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
]
] |
22,278 | int gdbserver_start(int port)
{
gdbserver_fd = gdbserver_open(port);
if (gdbserver_fd < 0)
return -1;
/* accept connections */
gdb_accept (NULL);
return 0;
}
| false | qemu | 880a7578381d1c7ed4d41c7599ae3cc06567a824 | int gdbserver_start(int port)
{
gdbserver_fd = gdbserver_open(port);
if (gdbserver_fd < 0)
return -1;
gdb_accept (NULL);
return 0;
}
| {
"code": [],
"line_no": []
} | int FUNC_0(int VAR_0)
{
gdbserver_fd = gdbserver_open(VAR_0);
if (gdbserver_fd < 0)
return -1;
gdb_accept (NULL);
return 0;
}
| [
"int FUNC_0(int VAR_0)\n{",
"gdbserver_fd = gdbserver_open(VAR_0);",
"if (gdbserver_fd < 0)\nreturn -1;",
"gdb_accept (NULL);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
13
],
[
15
],
[
17
]
] |
22,281 | CaptureVoiceOut *AUD_add_capture (
AudioState *s,
audsettings_t *as,
struct audio_capture_ops *ops,
void *cb_opaque
)
{
CaptureVoiceOut *cap;
struct capture_callback *cb;
if (!s) {
/* XXX suppress */
s = &glob_audio_state;
}
if (audio_validate_set... | false | qemu | 1ea879e5580f63414693655fcf0328559cdce138 | CaptureVoiceOut *AUD_add_capture (
AudioState *s,
audsettings_t *as,
struct audio_capture_ops *ops,
void *cb_opaque
)
{
CaptureVoiceOut *cap;
struct capture_callback *cb;
if (!s) {
s = &glob_audio_state;
}
if (audio_validate_settings (as)) {
... | {
"code": [],
"line_no": []
} | CaptureVoiceOut *FUNC_0 (
AudioState *s,
audsettings_t *as,
struct audio_capture_ops *ops,
void *cb_opaque
)
{
CaptureVoiceOut *cap;
struct capture_callback *VAR_0;
if (!s) {
s = &glob_audio_state;
}
if (audio_validate_settings (as)) {
d... | [
"CaptureVoiceOut *FUNC_0 (\nAudioState *s,\naudsettings_t *as,\nstruct audio_capture_ops *ops,\nvoid *cb_opaque\n)\n{",
"CaptureVoiceOut *cap;",
"struct capture_callback *VAR_0;",
"if (!s) {",
"s = &glob_audio_state;",
"}",
"if (audio_validate_settings (as)) {",
"dolog (\"Invalid settings were passed ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47,
49
],
[
51
],
[
53
],
[
55
... |
22,282 | static int nbd_co_writev(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
BDRVNBDState *s = bs->opaque;
return nbd_client_session_co_writev(&s->client, sector_num,
nb_sectors, qiov);
}
| false | qemu | f53a829bb9ef14be800556cbc02d8b20fc1050a7 | static int nbd_co_writev(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
BDRVNBDState *s = bs->opaque;
return nbd_client_session_co_writev(&s->client, sector_num,
nb_sectors, qiov);
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,
int VAR_2, QEMUIOVector *VAR_3)
{
BDRVNBDState *s = VAR_0->opaque;
return nbd_client_session_co_writev(&s->client, VAR_1,
VAR_2, VAR_3);
}
| [
"static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,\nint VAR_2, QEMUIOVector *VAR_3)\n{",
"BDRVNBDState *s = VAR_0->opaque;",
"return nbd_client_session_co_writev(&s->client, VAR_1,\nVAR_2, VAR_3);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11,
13
],
[
15
]
] |
22,283 | static void megasas_mmio_write(void *opaque, target_phys_addr_t addr,
uint64_t val, unsigned size)
{
MegasasState *s = opaque;
uint64_t frame_addr;
uint32_t frame_count;
int i;
trace_megasas_mmio_writel(addr, val);
switch (addr) {
case MFI_IDB:
... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void megasas_mmio_write(void *opaque, target_phys_addr_t addr,
uint64_t val, unsigned size)
{
MegasasState *s = opaque;
uint64_t frame_addr;
uint32_t frame_count;
int i;
trace_megasas_mmio_writel(addr, val);
switch (addr) {
case MFI_IDB:
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
MegasasState *s = VAR_0;
uint64_t frame_addr;
uint32_t frame_count;
int VAR_4;
trace_megasas_mmio_writel(VAR_1, VAR_2);
switch (VAR_1) {
case MFI_IDB:
... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"MegasasState *s = VAR_0;",
"uint64_t frame_addr;",
"uint32_t frame_count;",
"int VAR_4;",
"trace_megasas_mmio_writel(VAR_1, VAR_2);",
"switch (VAR_1) {",
"case MFI_IDB:\nif (VAR_2 & MFI_FWINIT_ABORT) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51,... |
22,284 | static int mpjpeg_read_packet(AVFormatContext *s, AVPacket *pkt)
{
int size;
int ret;
MPJPEGDemuxContext *mpjpeg = s->priv_data;
if (mpjpeg->boundary == NULL) {
mpjpeg->boundary = av_strdup("--");
mpjpeg->searchstr = av_strdup("\r\n--");
if (!mpjpeg->boundary || !mpjpeg... | false | FFmpeg | 259c71c199e9b4ea89bf4cb90ed0e207ddc9dff7 | static int mpjpeg_read_packet(AVFormatContext *s, AVPacket *pkt)
{
int size;
int ret;
MPJPEGDemuxContext *mpjpeg = s->priv_data;
if (mpjpeg->boundary == NULL) {
mpjpeg->boundary = av_strdup("--");
mpjpeg->searchstr = av_strdup("\r\n--");
if (!mpjpeg->boundary || !mpjpeg... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
int VAR_2;
int VAR_3;
MPJPEGDemuxContext *mpjpeg = VAR_0->priv_data;
if (mpjpeg->boundary == NULL) {
mpjpeg->boundary = av_strdup("--");
mpjpeg->searchstr = av_strdup("\r\n--");
if (!mpjpeg->boundary || !mpjpe... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"int VAR_2;",
"int VAR_3;",
"MPJPEGDemuxContext *mpjpeg = VAR_0->priv_data;",
"if (mpjpeg->boundary == NULL) {",
"mpjpeg->boundary = av_strdup(\"--\");",
"mpjpeg->searchstr = av_strdup(\"\\r\\n--\");",
"if (!mpjpeg->boundary || !mpjpeg->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
41,
43
],
[
47
],
[
51
],
[
53
],
... |
22,285 | static void gen_flt3_arith (DisasContext *ctx, uint32_t opc,
int fd, int fr, int fs, int ft)
{
const char *opn = "flt3_arith";
switch (opc) {
case OPC_ALNV_PS:
check_cp1_64bitmode(ctx);
{
TCGv t0 = tcg_temp_local_new();
TCGv_i32 ... | false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static void gen_flt3_arith (DisasContext *ctx, uint32_t opc,
int fd, int fr, int fs, int ft)
{
const char *opn = "flt3_arith";
switch (opc) {
case OPC_ALNV_PS:
check_cp1_64bitmode(ctx);
{
TCGv t0 = tcg_temp_local_new();
TCGv_i32 ... | {
"code": [],
"line_no": []
} | static void FUNC_0 (DisasContext *VAR_0, uint32_t VAR_1,
int VAR_2, int VAR_3, int VAR_4, int VAR_5)
{
const char *VAR_6 = "flt3_arith";
switch (VAR_1) {
case OPC_ALNV_PS:
check_cp1_64bitmode(VAR_0);
{
TCGv t0 = tcg_temp_local_new();
... | [
"static void FUNC_0 (DisasContext *VAR_0, uint32_t VAR_1,\nint VAR_2, int VAR_3, int VAR_4, int VAR_5)\n{",
"const char *VAR_6 = \"flt3_arith\";",
"switch (VAR_1) {",
"case OPC_ALNV_PS:\ncheck_cp1_64bitmode(VAR_0);",
"{",
"TCGv t0 = tcg_temp_local_new();",
"TCGv_i32 fp = tcg_temp_new_i32();",
"TCGv_i3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49... |
22,286 | static void pc_compat_2_1(MachineState *machine)
{
PCMachineState *pcms = PC_MACHINE(machine);
pc_compat_2_2(machine);
pcms->enforce_aligned_dimm = false;
smbios_uuid_encoded = false;
x86_cpu_change_kvm_default("svm", NULL);
}
| false | qemu | 7102fa7073b2cefb33ab4012a11f15fbf297a74b | static void pc_compat_2_1(MachineState *machine)
{
PCMachineState *pcms = PC_MACHINE(machine);
pc_compat_2_2(machine);
pcms->enforce_aligned_dimm = false;
smbios_uuid_encoded = false;
x86_cpu_change_kvm_default("svm", NULL);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(MachineState *VAR_0)
{
PCMachineState *pcms = PC_MACHINE(VAR_0);
pc_compat_2_2(VAR_0);
pcms->enforce_aligned_dimm = false;
smbios_uuid_encoded = false;
x86_cpu_change_kvm_default("svm", NULL);
}
| [
"static void FUNC_0(MachineState *VAR_0)\n{",
"PCMachineState *pcms = PC_MACHINE(VAR_0);",
"pc_compat_2_2(VAR_0);",
"pcms->enforce_aligned_dimm = false;",
"smbios_uuid_encoded = false;",
"x86_cpu_change_kvm_default(\"svm\", NULL);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
22,287 | qemu_irq *openpic_init (MemoryRegion **pmem, int nb_cpus,
qemu_irq **irqs, qemu_irq irq_out)
{
openpic_t *opp;
int i, m;
struct {
const char *name;
MemoryRegionOps const *ops;
hwaddr start_addr;
ram_addr_t size;
... | false | qemu | 5861a33898bbddfd1a80c2e202cb9352e3b1ba62 | qemu_irq *openpic_init (MemoryRegion **pmem, int nb_cpus,
qemu_irq **irqs, qemu_irq irq_out)
{
openpic_t *opp;
int i, m;
struct {
const char *name;
MemoryRegionOps const *ops;
hwaddr start_addr;
ram_addr_t size;
... | {
"code": [],
"line_no": []
} | qemu_irq *FUNC_0 (MemoryRegion **pmem, int nb_cpus,
qemu_irq **irqs, qemu_irq irq_out)
{
openpic_t *opp;
int VAR_0, VAR_1;
struct {
const char *name;
MemoryRegionOps const *ops;
hwaddr start_addr;
ram_addr_t size... | [
"qemu_irq *FUNC_0 (MemoryRegion **pmem, int nb_cpus,\nqemu_irq **irqs, qemu_irq irq_out)\n{",
"openpic_t *opp;",
"int VAR_0, VAR_1;",
"struct {",
"const char *name;",
"MemoryRegionOps const *ops;",
"hwaddr start_addr;",
"ram_addr_t size;",
"} const VAR_2[] = {",
"{\"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
37,
39
],
[
41
],
[
45
],
[
49
],
[
53,... |
22,288 | void do_interrupt(CPUARMState *env)
{
uint32_t addr;
uint32_t mask;
int new_mode;
uint32_t offset;
if (IS_M(env)) {
do_interrupt_v7m(env);
return;
}
/* TODO: Vectored interrupt controller. */
switch (env->exception_index) {
case EXCP_UDEF:
new_... | false | qemu | be5e7a76010bd14d09f74504ed6368782e701888 | void do_interrupt(CPUARMState *env)
{
uint32_t addr;
uint32_t mask;
int new_mode;
uint32_t offset;
if (IS_M(env)) {
do_interrupt_v7m(env);
return;
}
switch (env->exception_index) {
case EXCP_UDEF:
new_mode = ARM_CPU_MODE_UND;
addr = 0x... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUARMState *VAR_0)
{
uint32_t addr;
uint32_t mask;
int VAR_1;
uint32_t offset;
if (IS_M(VAR_0)) {
do_interrupt_v7m(VAR_0);
return;
}
switch (VAR_0->exception_index) {
case EXCP_UDEF:
VAR_1 = ARM_CPU_MODE_UND;
addr = 0x04;
... | [
"void FUNC_0(CPUARMState *VAR_0)\n{",
"uint32_t addr;",
"uint32_t mask;",
"int VAR_1;",
"uint32_t offset;",
"if (IS_M(VAR_0)) {",
"do_interrupt_v7m(VAR_0);",
"return;",
"}",
"switch (VAR_0->exception_index) {",
"case EXCP_UDEF:\nVAR_1 = ARM_CPU_MODE_UND;",
"addr = 0x04;",
"mask = CPSR_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
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35,
37
],
[
39,
41
],
[
43
],
[
45,
47
],
[
51
... |
22,289 | int stpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar)
{
CPUS390XState *env = &cpu->env;
uint32_t fh;
ZpciFib fib;
S390PCIBusDevice *pbdev;
uint32_t data;
uint64_t cc = ZPCI_PCI_LS_OK;
if (env->psw.mask & PSW_MASK_PSTATE) {
program_interrupt(env, PGM... | false | qemu | 5d1abf234462d13bef3617cc2c55b6815703ddf2 | int stpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar)
{
CPUS390XState *env = &cpu->env;
uint32_t fh;
ZpciFib fib;
S390PCIBusDevice *pbdev;
uint32_t data;
uint64_t cc = ZPCI_PCI_LS_OK;
if (env->psw.mask & PSW_MASK_PSTATE) {
program_interrupt(env, PGM... | {
"code": [],
"line_no": []
} | int FUNC_0(S390CPU *VAR_0, uint8_t VAR_1, uint64_t VAR_2, uint8_t VAR_3)
{
CPUS390XState *env = &VAR_0->env;
uint32_t fh;
ZpciFib fib;
S390PCIBusDevice *pbdev;
uint32_t data;
uint64_t cc = ZPCI_PCI_LS_OK;
if (env->psw.mask & PSW_MASK_PSTATE) {
program_interrupt(env, PGM_PR... | [
"int FUNC_0(S390CPU *VAR_0, uint8_t VAR_1, uint64_t VAR_2, uint8_t VAR_3)\n{",
"CPUS390XState *env = &VAR_0->env;",
"uint32_t fh;",
"ZpciFib fib;",
"S390PCIBusDevice *pbdev;",
"uint32_t data;",
"uint64_t cc = ZPCI_PCI_LS_OK;",
"if (env->psw.mask & PSW_MASK_PSTATE) {",
"program_interrupt(env, PGM_PRI... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
... |
22,290 | static void mv88w8618_wlan_write(void *opaque, target_phys_addr_t offset,
uint64_t value, unsigned size)
{
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void mv88w8618_wlan_write(void *opaque, target_phys_addr_t offset,
uint64_t value, unsigned size)
{
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
}
| [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"}"
] | [
0,
0
] | [
[
1,
3,
5
],
[
7
]
] |
22,292 | START_TEST(qint_from_int_test)
{
QInt *qi;
const int value = -42;
qi = qint_from_int(value);
fail_unless(qi != NULL);
fail_unless(qi->value == value);
fail_unless(qi->base.refcnt == 1);
fail_unless(qobject_type(QOBJECT(qi)) == QTYPE_QINT);
// destroy doesn't exit yet
g_... | false | qemu | 65cdadd2e2de76f7db3bf6b7d8dd8c67abff9659 | START_TEST(qint_from_int_test)
{
QInt *qi;
const int value = -42;
qi = qint_from_int(value);
fail_unless(qi != NULL);
fail_unless(qi->value == value);
fail_unless(qi->base.refcnt == 1);
fail_unless(qobject_type(QOBJECT(qi)) == QTYPE_QINT);
g_free(qi);
}
| {
"code": [],
"line_no": []
} | FUNC_0(VAR_0)
{
QInt *qi;
const int VAR_1 = -42;
qi = qint_from_int(VAR_1);
fail_unless(qi != NULL);
fail_unless(qi->VAR_1 == VAR_1);
fail_unless(qi->base.refcnt == 1);
fail_unless(qobject_type(QOBJECT(qi)) == QTYPE_QINT);
g_free(qi);
}
| [
"FUNC_0(VAR_0)\n{",
"QInt *qi;",
"const int VAR_1 = -42;",
"qi = qint_from_int(VAR_1);",
"fail_unless(qi != NULL);",
"fail_unless(qi->VAR_1 == VAR_1);",
"fail_unless(qi->base.refcnt == 1);",
"fail_unless(qobject_type(QOBJECT(qi)) == QTYPE_QINT);",
"g_free(qi);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
25
],
[
27
]
] |
22,293 | static int kvm_s390_store_adtl_status(S390CPU *cpu, hwaddr addr)
{
void *mem;
hwaddr len = ADTL_SAVE_AREA_SIZE;
mem = cpu_physical_memory_map(addr, &len, 1);
if (!mem) {
return -EFAULT;
}
if (len != ADTL_SAVE_AREA_SIZE) {
cpu_physical_memory_unmap(mem, len, 1, 0);
... | false | qemu | 62deb62d999cf9e2be61272c6b720104f764bd6a | static int kvm_s390_store_adtl_status(S390CPU *cpu, hwaddr addr)
{
void *mem;
hwaddr len = ADTL_SAVE_AREA_SIZE;
mem = cpu_physical_memory_map(addr, &len, 1);
if (!mem) {
return -EFAULT;
}
if (len != ADTL_SAVE_AREA_SIZE) {
cpu_physical_memory_unmap(mem, len, 1, 0);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(S390CPU *VAR_0, hwaddr VAR_1)
{
void *VAR_2;
hwaddr len = ADTL_SAVE_AREA_SIZE;
VAR_2 = cpu_physical_memory_map(VAR_1, &len, 1);
if (!VAR_2) {
return -EFAULT;
}
if (len != ADTL_SAVE_AREA_SIZE) {
cpu_physical_memory_unmap(VAR_2, len, 1, 0);
ret... | [
"static int FUNC_0(S390CPU *VAR_0, hwaddr VAR_1)\n{",
"void *VAR_2;",
"hwaddr len = ADTL_SAVE_AREA_SIZE;",
"VAR_2 = cpu_physical_memory_map(VAR_1, &len, 1);",
"if (!VAR_2) {",
"return -EFAULT;",
"}",
"if (len != ADTL_SAVE_AREA_SIZE) {",
"cpu_physical_memory_unmap(VAR_2, len, 1, 0);",
"return -EFAU... | [
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
],
[
33
],
[
37
],
[
39
]
] |
22,294 | int page_unprotect(target_ulong address, unsigned long pc, void *puc)
{
unsigned int page_index, prot, pindex;
PageDesc *p, *p1;
target_ulong host_start, host_end, addr;
/* Technically this isn't safe inside a signal handler. However we
know this only ever happens in a synchronous SEGV h... | false | qemu | 45d679d64350c44df93d918ddacd6ae0c6da9dbb | int page_unprotect(target_ulong address, unsigned long pc, void *puc)
{
unsigned int page_index, prot, pindex;
PageDesc *p, *p1;
target_ulong host_start, host_end, addr;
mmap_lock();
host_start = address & qemu_host_page_mask;
page_index = host_start >> TARGET_PAGE_BITS;
... | {
"code": [],
"line_no": []
} | int FUNC_0(target_ulong VAR_0, unsigned long VAR_1, void *VAR_2)
{
unsigned int VAR_3, VAR_4, VAR_5;
PageDesc *p, *p1;
target_ulong host_start, host_end, addr;
mmap_lock();
host_start = VAR_0 & qemu_host_page_mask;
VAR_3 = host_start >> TARGET_PAGE_BITS;
p1 = page_find(... | [
"int FUNC_0(target_ulong VAR_0, unsigned long VAR_1, void *VAR_2)\n{",
"unsigned int VAR_3, VAR_4, VAR_5;",
"PageDesc *p, *p1;",
"target_ulong host_start, host_end, addr;",
"mmap_lock();",
"host_start = VAR_0 & qemu_host_page_mask;",
"VAR_3 = host_start >> TARGET_PAGE_BITS;",
"p1 = page_find(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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
55
... |
22,295 | static int mov_read_enda(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
{
AVStream *st = c->fc->streams[c->fc->nb_streams-1];
int little_endian = get_be16(pb);
dprintf(c->fc, "enda %d\n", little_endian);
if (little_endian == 1) {
switch (st->codec->codec_id) {
case CODEC_ID_PCM... | false | FFmpeg | 6a63ff19b6a7fe3bc32c7fb4a62fca8f65786432 | static int mov_read_enda(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
{
AVStream *st = c->fc->streams[c->fc->nb_streams-1];
int little_endian = get_be16(pb);
dprintf(c->fc, "enda %d\n", little_endian);
if (little_endian == 1) {
switch (st->codec->codec_id) {
case CODEC_ID_PCM... | {
"code": [],
"line_no": []
} | static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2)
{
AVStream *st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];
int VAR_3 = get_be16(VAR_1);
dprintf(VAR_0->fc, "enda %d\n", VAR_3);
if (VAR_3 == 1) {
switch (st->codec->codec_id) {
case CODEC_ID_PCM_S24BE:
... | [
"static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2)\n{",
"AVStream *st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];",
"int VAR_3 = get_be16(VAR_1);",
"dprintf(VAR_0->fc, \"enda %d\\n\", VAR_3);",
"if (VAR_3 == 1) {",
"switch (st->codec->codec_id) {",
"case CODEC_ID_PCM_S24BE:\ns... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
... |
22,296 | static inline int decode_scalar(GetBitContext *gb, int k, int limit, int readsamplesize){
int x = get_unary_0_9(gb);
if (x > 8) { /* RICE THRESHOLD */
/* use alternative encoding */
x = get_bits(gb, readsamplesize);
} else {
if (k >= limit)
k = limit;
... | false | FFmpeg | d9837434a91dbb3632df335414aad538e5b0a6e9 | static inline int decode_scalar(GetBitContext *gb, int k, int limit, int readsamplesize){
int x = get_unary_0_9(gb);
if (x > 8) {
x = get_bits(gb, readsamplesize);
} else {
if (k >= limit)
k = limit;
if (k != 1) {
int extrabits = show_bi... | {
"code": [],
"line_no": []
} | static inline int FUNC_0(GetBitContext *VAR_0, int VAR_1, int VAR_2, int VAR_3){
int VAR_4 = get_unary_0_9(VAR_0);
if (VAR_4 > 8) {
VAR_4 = get_bits(VAR_0, VAR_3);
} else {
if (VAR_1 >= VAR_2)
VAR_1 = VAR_2;
if (VAR_1 != 1) {
int VAR_5 =... | [
"static inline int FUNC_0(GetBitContext *VAR_0, int VAR_1, int VAR_2, int VAR_3){",
"int VAR_4 = get_unary_0_9(VAR_0);",
"if (VAR_4 > 8) {",
"VAR_4 = get_bits(VAR_0, VAR_3);",
"} else {",
"if (VAR_1 >= VAR_2)\nVAR_1 = VAR_2;",
"if (VAR_1 != 1) {",
"int VAR_5 = show_bits(VAR_0, VAR_1);",
"VAR_4 = (VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
7
],
[
11
],
[
13
],
[
15,
17
],
[
21
],
[
23
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
]
] |
22,297 | static void opt_b_frames(const char *arg)
{
b_frames = atoi(arg);
if (b_frames > FF_MAX_B_FRAMES) {
fprintf(stderr, "\nCannot have more than %d B frames, increase FF_MAX_B_FRAMES.\n", FF_MAX_B_FRAMES);
exit(1);
} else if (b_frames < 1) {
fprintf(stderr, "\nNumber of B frames m... | false | FFmpeg | 315b0f974252120cfacb0346954a2d817dff279a | static void opt_b_frames(const char *arg)
{
b_frames = atoi(arg);
if (b_frames > FF_MAX_B_FRAMES) {
fprintf(stderr, "\nCannot have more than %d B frames, increase FF_MAX_B_FRAMES.\n", FF_MAX_B_FRAMES);
exit(1);
} else if (b_frames < 1) {
fprintf(stderr, "\nNumber of B frames m... | {
"code": [],
"line_no": []
} | static void FUNC_0(const char *VAR_0)
{
b_frames = atoi(VAR_0);
if (b_frames > FF_MAX_B_FRAMES) {
fprintf(stderr, "\nCannot have more than %d B frames, increase FF_MAX_B_FRAMES.\n", FF_MAX_B_FRAMES);
exit(1);
} else if (b_frames < 1) {
fprintf(stderr, "\nNumber of B frames mus... | [
"static void FUNC_0(const char *VAR_0)\n{",
"b_frames = atoi(VAR_0);",
"if (b_frames > FF_MAX_B_FRAMES) {",
"fprintf(stderr, \"\\nCannot have more than %d B frames, increase FF_MAX_B_FRAMES.\\n\", FF_MAX_B_FRAMES);",
"exit(1);",
"} else if (b_frames < 1) {",
"fprintf(stderr, \"\\nNumber of B frames must... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
22,298 | static av_cold int encode_init(AVCodecContext* avc_context)
{
theora_info t_info;
theora_comment t_comment;
ogg_packet o_packet;
unsigned int offset;
TheoraContext *h = avc_context->priv_data;
/* Set up the theora_info struct */
theora_info_init( &t_info );
t_info.width = FFAL... | true | FFmpeg | 870ee6f71579f2f3f20dee93d6246d12871c280d | static av_cold int encode_init(AVCodecContext* avc_context)
{
theora_info t_info;
theora_comment t_comment;
ogg_packet o_packet;
unsigned int offset;
TheoraContext *h = avc_context->priv_data;
theora_info_init( &t_info );
t_info.width = FFALIGN(avc_context->width, 16);
t... | {
"code": [
" theora_comment_clear( &t_comment );"
],
"line_no": [
163
]
} | static av_cold int FUNC_0(AVCodecContext* avc_context)
{
theora_info t_info;
theora_comment t_comment;
ogg_packet o_packet;
unsigned int VAR_0;
TheoraContext *h = avc_context->priv_data;
theora_info_init( &t_info );
t_info.width = FFALIGN(avc_context->width, 16);
t_info.... | [
"static av_cold int FUNC_0(AVCodecContext* avc_context)\n{",
"theora_info t_info;",
"theora_comment t_comment;",
"ogg_packet o_packet;",
"unsigned int VAR_0;",
"TheoraContext *h = avc_context->priv_data;",
"theora_info_init( &t_info );",
"t_info.width = FFALIGN(avc_context->width, 16);",
"t_info.hei... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
22,299 | static int frame_thread_init(AVCodecContext *avctx)
{
int thread_count = avctx->thread_count;
AVCodec *codec = avctx->codec;
AVCodecContext *src = avctx;
FrameThreadContext *fctx;
int i, err = 0;
if (thread_count <= 1) {
avctx->active_thread_type = 0;
return 0;
}
... | true | FFmpeg | 2bb79b23fe106a45eab6ff80d7ef7519d542d1f7 | static int frame_thread_init(AVCodecContext *avctx)
{
int thread_count = avctx->thread_count;
AVCodec *codec = avctx->codec;
AVCodecContext *src = avctx;
FrameThreadContext *fctx;
int i, err = 0;
if (thread_count <= 1) {
avctx->active_thread_type = 0;
return 0;
}
... | {
"code": [
" pthread_create(&p->thread, NULL, frame_worker_thread, p);"
],
"line_no": [
139
]
} | static int FUNC_0(AVCodecContext *VAR_0)
{
int VAR_1 = VAR_0->VAR_1;
AVCodec *codec = VAR_0->codec;
AVCodecContext *src = VAR_0;
FrameThreadContext *fctx;
int VAR_2, VAR_3 = 0;
if (VAR_1 <= 1) {
VAR_0->active_thread_type = 0;
return 0;
}
VAR_0->thread_opaqu... | [
"static int FUNC_0(AVCodecContext *VAR_0)\n{",
"int VAR_1 = VAR_0->VAR_1;",
"AVCodec *codec = VAR_0->codec;",
"AVCodecContext *src = VAR_0;",
"FrameThreadContext *fctx;",
"int VAR_2, VAR_3 = 0;",
"if (VAR_1 <= 1) {",
"VAR_0->active_thread_type = 0;",
"return 0;",
"}",
"VAR_0->thread_opaque = fct... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
... |
22,301 | static char *shorts2str(int16_t *sp, int count, const char *sep)
{
int i;
char *ap, *ap0;
if (!sep) sep = ", ";
ap = av_malloc((5 + strlen(sep)) * count);
if (!ap)
return NULL;
ap0 = ap;
ap[0] = '\0';
for (i = 0; i < count; i++) {
int l = snprintf(ap, 5 + str... | false | FFmpeg | e1219cdaf9fb4bc8cea410e1caf802373c1bfe51 | static char *shorts2str(int16_t *sp, int count, const char *sep)
{
int i;
char *ap, *ap0;
if (!sep) sep = ", ";
ap = av_malloc((5 + strlen(sep)) * count);
if (!ap)
return NULL;
ap0 = ap;
ap[0] = '\0';
for (i = 0; i < count; i++) {
int l = snprintf(ap, 5 + str... | {
"code": [],
"line_no": []
} | static char *FUNC_0(int16_t *VAR_0, int VAR_1, const char *VAR_2)
{
int VAR_3;
char *VAR_4, *VAR_5;
if (!VAR_2) VAR_2 = ", ";
VAR_4 = av_malloc((5 + strlen(VAR_2)) * VAR_1);
if (!VAR_4)
return NULL;
VAR_5 = VAR_4;
VAR_4[0] = '\0';
for (VAR_3 = 0; VAR_3 < VAR_1; VAR_3+... | [
"static char *FUNC_0(int16_t *VAR_0, int VAR_1, const char *VAR_2)\n{",
"int VAR_3;",
"char *VAR_4, *VAR_5;",
"if (!VAR_2) VAR_2 = \", \";",
"VAR_4 = av_malloc((5 + strlen(VAR_2)) * VAR_1);",
"if (!VAR_4)\nreturn NULL;",
"VAR_5 = VAR_4;",
"VAR_4[0] = '\\0';",
"for (VAR_3 = 0; VAR_3 < VAR_1; VAR_3+... | [
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
]
] |
22,302 | static int h264_set_parameter_from_sps(H264Context *h)
{
if (h->flags & CODEC_FLAG_LOW_DELAY ||
(h->sps.bitstream_restriction_flag &&
!h->sps.num_reorder_frames)) {
if (h->avctx->has_b_frames > 1 || h->delayed_pic[0])
av_log(h->avctx, AV_LOG_WARNING, "Delayed frames seen. "
... | true | FFmpeg | 4987faee78b9869f8f4646b8dd971d459df218a5 | static int h264_set_parameter_from_sps(H264Context *h)
{
if (h->flags & CODEC_FLAG_LOW_DELAY ||
(h->sps.bitstream_restriction_flag &&
!h->sps.num_reorder_frames)) {
if (h->avctx->has_b_frames > 1 || h->delayed_pic[0])
av_log(h->avctx, AV_LOG_WARNING, "Delayed frames seen. "
... | {
"code": [],
"line_no": []
} | static int FUNC_0(H264Context *VAR_0)
{
if (VAR_0->flags & CODEC_FLAG_LOW_DELAY ||
(VAR_0->sps.bitstream_restriction_flag &&
!VAR_0->sps.num_reorder_frames)) {
if (VAR_0->avctx->has_b_frames > 1 || VAR_0->delayed_pic[0])
av_log(VAR_0->avctx, AV_LOG_WARNING, "Delayed frames seen.... | [
"static int FUNC_0(H264Context *VAR_0)\n{",
"if (VAR_0->flags & CODEC_FLAG_LOW_DELAY ||\n(VAR_0->sps.bitstream_restriction_flag &&\n!VAR_0->sps.num_reorder_frames)) {",
"if (VAR_0->avctx->has_b_frames > 1 || VAR_0->delayed_pic[0])\nav_log(VAR_0->avctx, AV_LOG_WARNING, \"Delayed frames seen. \"\n\"Reenabling low... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3,
4,
5
],
[
6,
7,
8
],
[
9,
10
],
[
11,
12
],
[
13,
14
],
[
15,
16,
17
],
[
18,
19
],
[
20
],
[
21
],
[
22
],
[
23
],
[
24
],
[
25,
26
],
[
... |
22,303 | static inline int array_roll(array_t* array,int index_to,int index_from,int count)
{
char* buf;
char* from;
char* to;
int is;
if(!array ||
index_to<0 || index_to>=array->next ||
index_from<0 || index_from>=array->next)
return -1;
if(index_to==index_from)
return 0;
... | true | qemu | ce137829e7e58fcdc5ba63b5e256f972e80be438 | static inline int array_roll(array_t* array,int index_to,int index_from,int count)
{
char* buf;
char* from;
char* to;
int is;
if(!array ||
index_to<0 || index_to>=array->next ||
index_from<0 || index_from>=array->next)
return -1;
if(index_to==index_from)
return 0;
... | {
"code": [
" free(buf);"
],
"line_no": [
57
]
} | static inline int FUNC_0(array_t* VAR_0,int VAR_1,int VAR_2,int VAR_3)
{
char* VAR_4;
char* VAR_5;
char* VAR_6;
int VAR_7;
if(!VAR_0 ||
VAR_1<0 || VAR_1>=VAR_0->next ||
VAR_2<0 || VAR_2>=VAR_0->next)
return -1;
if(VAR_1==VAR_2)
return 0;
VAR_7=VAR_0->item_size;
... | [
"static inline int FUNC_0(array_t* VAR_0,int VAR_1,int VAR_2,int VAR_3)\n{",
"char* VAR_4;",
"char* VAR_5;",
"char* VAR_6;",
"int VAR_7;",
"if(!VAR_0 ||\nVAR_1<0 || VAR_1>=VAR_0->next ||\nVAR_2<0 || VAR_2>=VAR_0->next)\nreturn -1;",
"if(VAR_1==VAR_2)\nreturn 0;",
"VAR_7=VAR_0->item_size;",
"VAR_5=VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17,
19,
21
],
[
25,
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43,
45
],
[
47,
49
],
[
53
],
[
57
],
[
61
... |
22,304 | int ff_raw_video_read_header(AVFormatContext *s)
{
AVStream *st;
FFRawVideoDemuxerContext *s1 = s->priv_data;
AVRational framerate;
int ret = 0;
st = avformat_new_stream(s, NULL);
if (!st) {
ret = AVERROR(ENOMEM);
goto fail;
}
st->codec->codec_type = AVME... | true | FFmpeg | aba232cfa9b193604ed98f3fa505378d006b1b3b | int ff_raw_video_read_header(AVFormatContext *s)
{
AVStream *st;
FFRawVideoDemuxerContext *s1 = s->priv_data;
AVRational framerate;
int ret = 0;
st = avformat_new_stream(s, NULL);
if (!st) {
ret = AVERROR(ENOMEM);
goto fail;
}
st->codec->codec_type = AVME... | {
"code": [
" st->r_frame_rate = st->avg_frame_rate = framerate;"
],
"line_no": [
47
]
} | int FUNC_0(AVFormatContext *VAR_0)
{
AVStream *st;
FFRawVideoDemuxerContext *s1 = VAR_0->priv_data;
AVRational framerate;
int VAR_1 = 0;
st = avformat_new_stream(VAR_0, NULL);
if (!st) {
VAR_1 = AVERROR(ENOMEM);
goto fail;
}
st->codec->codec_type = AVMEDI... | [
"int FUNC_0(AVFormatContext *VAR_0)\n{",
"AVStream *st;",
"FFRawVideoDemuxerContext *s1 = VAR_0->priv_data;",
"AVRational framerate;",
"int VAR_1 = 0;",
"st = avformat_new_stream(VAR_0, NULL);",
"if (!st) {",
"VAR_1 = AVERROR(ENOMEM);",
"goto fail;",
"}",
"st->codec->codec_type = AVMEDIA_TYPE_VI... | [
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
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
53,... |
22,305 | static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
{
MOVContext *mov = s->priv_data;
MOVStreamContext *sc;
AVIndexEntry *sample;
AVStream *st = NULL;
int ret;
mov->fc = s;
retry:
sample = mov_find_next_sample(s, &st);
if (!sample) {
mov->found_mdat = 0;
if (!m... | true | FFmpeg | b1d61eb7aaaef84391130b6f5e83942cc829a8c8 | static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
{
MOVContext *mov = s->priv_data;
MOVStreamContext *sc;
AVIndexEntry *sample;
AVStream *st = NULL;
int ret;
mov->fc = s;
retry:
sample = mov_find_next_sample(s, &st);
if (!sample) {
mov->found_mdat = 0;
if (!m... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
MOVContext *mov = VAR_0->priv_data;
MOVStreamContext *sc;
AVIndexEntry *sample;
AVStream *st = NULL;
int VAR_2;
mov->fc = VAR_0;
retry:
sample = mov_find_next_sample(VAR_0, &st);
if (!sample) {
mov->found_mdat = 0;
... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"MOVContext *mov = VAR_0->priv_data;",
"MOVStreamContext *sc;",
"AVIndexEntry *sample;",
"AVStream *st = NULL;",
"int VAR_2;",
"mov->fc = VAR_0;",
"retry:\nsample = mov_find_next_sample(VAR_0, &st);",
"if (!sample) {",
"mov->found_md... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9,
10
],
[
11
],
[
12
],
[
13,
14
],
[
15
],
[
16
],
[
17
],
[
18,
19
],
[
20
],
[
21
],
[
22
],
[
... |
22,306 | QEMUSizedBuffer *qsb_create(const uint8_t *buffer, size_t len)
{
QEMUSizedBuffer *qsb;
size_t alloc_len, num_chunks, i, to_copy;
size_t chunk_size = (len > QSB_MAX_CHUNK_SIZE)
? QSB_MAX_CHUNK_SIZE
: QSB_CHUNK_SIZE;
num_chunks = DIV_ROUND_UP(len ? ... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | QEMUSizedBuffer *qsb_create(const uint8_t *buffer, size_t len)
{
QEMUSizedBuffer *qsb;
size_t alloc_len, num_chunks, i, to_copy;
size_t chunk_size = (len > QSB_MAX_CHUNK_SIZE)
? QSB_MAX_CHUNK_SIZE
: QSB_CHUNK_SIZE;
num_chunks = DIV_ROUND_UP(len ? ... | {
"code": [],
"line_no": []
} | QEMUSizedBuffer *FUNC_0(const uint8_t *buffer, size_t len)
{
QEMUSizedBuffer *qsb;
size_t alloc_len, num_chunks, i, to_copy;
size_t chunk_size = (len > QSB_MAX_CHUNK_SIZE)
? QSB_MAX_CHUNK_SIZE
: QSB_CHUNK_SIZE;
num_chunks = DIV_ROUND_UP(len ? len ... | [
"QEMUSizedBuffer *FUNC_0(const uint8_t *buffer, size_t len)\n{",
"QEMUSizedBuffer *qsb;",
"size_t alloc_len, num_chunks, i, to_copy;",
"size_t chunk_size = (len > QSB_MAX_CHUNK_SIZE)\n? QSB_MAX_CHUNK_SIZE\n: QSB_CHUNK_SIZE;",
"num_chunks = DIV_ROUND_UP(len ? len : QSB_CHUNK_SIZE, chunk_size);",
"alloc_len... | [
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
49
],
[
51
],
[
53
... |
22,307 | static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
{
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->notify) {
k->notify(qbus->parent, vector); | true | qemu | f5ed36635d8fa73feb66fe12b3b9c2ed90a1adbe | static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
{
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->notify) {
k->notify(qbus->parent, vector); | {
"code": [],
"line_no": []
} | static void FUNC_0(VirtIODevice *VAR_0, uint16_t VAR_1)
{
BusState *qbus = qdev_get_parent_bus(DEVICE(VAR_0));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
if (k->notify) {
k->notify(qbus->parent, VAR_1); | [
"static void FUNC_0(VirtIODevice *VAR_0, uint16_t VAR_1)\n{",
"BusState *qbus = qdev_get_parent_bus(DEVICE(VAR_0));",
"VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);",
"if (k->notify) {",
"k->notify(qbus->parent, VAR_1);"
] | [
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
]
] |
22,308 | static int svq1_motion_inter_4v_block(DSPContext *dsp, 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[4];
... | true | FFmpeg | ecff5acb5a738fcb4f9e206a12070dac4bf259b3 | static int svq1_motion_inter_4v_block(DSPContext *dsp, 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[4];
... | {
"code": [
" int pitch, svq1_pmv *motion, int x, int y)",
" if (y + (mvy >> 1) < 0)",
" mvy = 0;",
" if (x + (mvx >> 1) < 0)",
" mvx = 0;"
],
"line_no": [
5,
125,
127,
129,
131
]
} | static int FUNC_0(DSPContext *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[4];
int VAR_8, VAR... | [
"static int FUNC_0(DSPContext *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[4];",
"int VAR_8, VAR_9;",
"pmv[0] = &VAR_5[0];",
"if (VAR_7 == 0) {",
"pmv[1] =\npmv[... | [
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,
1,
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
],
[
53
],
[
55
],
[
57,... |
22,309 | CPUState *cpu_create(const char *typename)
{
Error *err = NULL;
CPUState *cpu = CPU(object_new(typename));
object_property_set_bool(OBJECT(cpu), true, "realized", &err);
if (err != NULL) {
error_report_err(err);
object_unref(OBJECT(cpu));
return NULL;
}
return c... | true | qemu | 4482e05cbbb7e50e476f6a9500cf0b38913bd939 | CPUState *cpu_create(const char *typename)
{
Error *err = NULL;
CPUState *cpu = CPU(object_new(typename));
object_property_set_bool(OBJECT(cpu), true, "realized", &err);
if (err != NULL) {
error_report_err(err);
object_unref(OBJECT(cpu));
return NULL;
}
return c... | {
"code": [
" return NULL;",
" Error *err = NULL;",
" return NULL;",
" if (err != NULL) {",
" error_report_err(err);",
" return NULL;"
],
"line_no": [
17,
5,
17,
11,
13,
17
]
} | CPUState *FUNC_0(const char *typename)
{
Error *err = NULL;
CPUState *cpu = CPU(object_new(typename));
object_property_set_bool(OBJECT(cpu), true, "realized", &err);
if (err != NULL) {
error_report_err(err);
object_unref(OBJECT(cpu));
return NULL;
}
return cpu;
... | [
"CPUState *FUNC_0(const char *typename)\n{",
"Error *err = NULL;",
"CPUState *cpu = CPU(object_new(typename));",
"object_property_set_bool(OBJECT(cpu), true, \"realized\", &err);",
"if (err != NULL) {",
"error_report_err(err);",
"object_unref(OBJECT(cpu));",
"return NULL;",
"}",
"return cpu;",
"... | [
0,
1,
0,
0,
1,
1,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
22,310 | static int qio_channel_socket_connect_worker(QIOTask *task,
Error **errp,
gpointer opaque)
{
QIOChannelSocket *ioc = QIO_CHANNEL_SOCKET(qio_task_get_source(task));
SocketAddress *addr = opaque;
int ret;
re... | true | qemu | 937470bb5470825e781ae50e92ff973a6b54d80f | static int qio_channel_socket_connect_worker(QIOTask *task,
Error **errp,
gpointer opaque)
{
QIOChannelSocket *ioc = QIO_CHANNEL_SOCKET(qio_task_get_source(task));
SocketAddress *addr = opaque;
int ret;
re... | {
"code": [
" object_unref(OBJECT(ioc));",
" object_unref(OBJECT(ioc));",
" object_unref(OBJECT(ioc));"
],
"line_no": [
25,
25,
25
]
} | static int FUNC_0(QIOTask *VAR_0,
Error **VAR_1,
gpointer VAR_2)
{
QIOChannelSocket *ioc = QIO_CHANNEL_SOCKET(qio_task_get_source(VAR_0));
SocketAddress *addr = VAR_2;
int VAR_3;
VAR_3 = qio_channel_socket... | [
"static int FUNC_0(QIOTask *VAR_0,\nError **VAR_1,\ngpointer VAR_2)\n{",
"QIOChannelSocket *ioc = QIO_CHANNEL_SOCKET(qio_task_get_source(VAR_0));",
"SocketAddress *addr = VAR_2;",
"int VAR_3;",
"VAR_3 = qio_channel_socket_connect_sync(ioc,\naddr,\nVAR_1);",
"object_unref(OBJECT(ioc));",
"return VAR_3;",... | [
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17,
19,
21
],
[
25
],
[
27
],
[
29
]
] |
22,311 | static const void *boston_kernel_filter(void *opaque, const void *kernel,
hwaddr *load_addr, hwaddr *entry_addr)
{
BostonState *s = BOSTON(opaque);
s->kernel_entry = *entry_addr;
return kernel;
}
| true | qemu | 2d896b454a0e19ec4c1ddbb0e0b65b7e54fcedf3 | static const void *boston_kernel_filter(void *opaque, const void *kernel,
hwaddr *load_addr, hwaddr *entry_addr)
{
BostonState *s = BOSTON(opaque);
s->kernel_entry = *entry_addr;
return kernel;
}
| {
"code": [
" BostonState *s = BOSTON(opaque);",
"static const void *boston_kernel_filter(void *opaque, const void *kernel,",
" hwaddr *load_addr, hwaddr *entry_addr)",
" BostonState *s = BOSTON(opaque);",
" s->kernel_entry = *entry_addr;",
" ... | static const void *FUNC_0(void *VAR_0, const void *VAR_1,
hwaddr *VAR_2, hwaddr *VAR_3)
{
BostonState *s = BOSTON(VAR_0);
s->kernel_entry = *VAR_3;
return VAR_1;
}
| [
"static const void *FUNC_0(void *VAR_0, const void *VAR_1,\nhwaddr *VAR_2, hwaddr *VAR_3)\n{",
"BostonState *s = BOSTON(VAR_0);",
"s->kernel_entry = *VAR_3;",
"return VAR_1;",
"}"
] | [
1,
1,
1,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
15
],
[
17
]
] |
22,312 | static av_always_inline void idct_mb(VP8Context *s, uint8_t *dst[3], VP8Macroblock *mb)
{
int x, y, ch;
if (mb->mode != MODE_I4x4) {
uint8_t *y_dst = dst[0];
for (y = 0; y < 4; y++) {
uint32_t nnz4 = AV_RL32(s->non_zero_count_cache[y]);
if (nnz4) {
... | false | FFmpeg | 628b48db85dae7ad212a63dafcd6a3bf8d8e93f3 | static av_always_inline void idct_mb(VP8Context *s, uint8_t *dst[3], VP8Macroblock *mb)
{
int x, y, ch;
if (mb->mode != MODE_I4x4) {
uint8_t *y_dst = dst[0];
for (y = 0; y < 4; y++) {
uint32_t nnz4 = AV_RL32(s->non_zero_count_cache[y]);
if (nnz4) {
... | {
"code": [],
"line_no": []
} | static av_always_inline void FUNC_0(VP8Context *s, uint8_t *dst[3], VP8Macroblock *mb)
{
int VAR_0, VAR_1, VAR_2;
if (mb->mode != MODE_I4x4) {
uint8_t *y_dst = dst[0];
for (VAR_1 = 0; VAR_1 < 4; VAR_1++) {
uint32_t nnz4 = AV_RL32(s->non_zero_count_cache[VAR_1]);
... | [
"static av_always_inline void FUNC_0(VP8Context *s, uint8_t *dst[3], VP8Macroblock *mb)\n{",
"int VAR_0, VAR_1, VAR_2;",
"if (mb->mode != MODE_I4x4) {",
"uint8_t *y_dst = dst[0];",
"for (VAR_1 = 0; VAR_1 < 4; VAR_1++) {",
"uint32_t nnz4 = AV_RL32(s->non_zero_count_cache[VAR_1]);",
"if (nnz4) {",
"if (... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
... |
22,314 | PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
{
VirtIONet *n;
static int virtio_net_id;
n = (VirtIONet *)virtio_init_pci(bus, "virtio-net",
PCI_VENDOR_ID_REDHAT_QUMRANET,
PCI_DEVICE_ID_VIRTIO_NET,
... | true | qemu | b946a1533209f61a93e34898aebb5b43154b99c3 | PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
{
VirtIONet *n;
static int virtio_net_id;
n = (VirtIONet *)virtio_init_pci(bus, "virtio-net",
PCI_VENDOR_ID_REDHAT_QUMRANET,
PCI_DEVICE_ID_VIRTIO_NET,
... | {
"code": [
" virtio_net_receive, virtio_net_can_receive, n);"
],
"line_no": [
57
]
} | PCIDevice *FUNC_0(PCIBus *bus, NICInfo *nd, int devfn)
{
VirtIONet *n;
static int VAR_0;
n = (VirtIONet *)virtio_init_pci(bus, "virtio-net",
PCI_VENDOR_ID_REDHAT_QUMRANET,
PCI_DEVICE_ID_VIRTIO_NET,
... | [
"PCIDevice *FUNC_0(PCIBus *bus, NICInfo *nd, int devfn)\n{",
"VirtIONet *n;",
"static int VAR_0;",
"n = (VirtIONet *)virtio_init_pci(bus, \"virtio-net\",\nPCI_VENDOR_ID_REDHAT_QUMRANET,\nPCI_DEVICE_ID_VIRTIO_NET,\nPCI_VENDOR_ID_REDHAT_QUMRANET,\nVIRTIO_ID_NET,\nPCI_CLASS_NETWORK_ETHERNET, 0x00,\nsizeof(struct... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13,
15,
17,
19,
21,
23,
25
],
[
27,
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53... |
22,317 | static inline void RENAME(rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size)
{
register const uint8_t* s=src;
register uint8_t* d=dst;
register const uint8_t *end;
const uint8_t *mm_end;
end = s + src_size;
__asm__ volatile(PREFETCH" %0"::"m"(*s));
__asm__ volatile("movq ... | true | FFmpeg | 90540c2d5ace46a1e9789c75fde0b1f7dbb12a9b | static inline void RENAME(rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size)
{
register const uint8_t* s=src;
register uint8_t* d=dst;
register const uint8_t *end;
const uint8_t *mm_end;
end = s + src_size;
__asm__ volatile(PREFETCH" %0"::"m"(*s));
__asm__ volatile("movq ... | {
"code": [
" :\"m\"(*s)",
" :\"m\"(*s)",
" PREFETCH\" 32%1 \\n\\t\"",
" \"movq %1, %%mm0 \\n\\t\"",
" \"movq 8%1, %%mm2 \\n\\t\"",
" MOVNTQ\" %%mm0, %0 \\n\\t\"",
" MOVNTQ\" %%mm2,... | static inline void FUNC_0(rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size)
{
register const uint8_t* VAR_0=src;
register uint8_t* VAR_1=dst;
register const uint8_t *VAR_2;
const uint8_t *VAR_3;
VAR_2 = VAR_0 + src_size;
__asm__ volatile(PREFETCH" %0"::"m"(*VAR_0));
__asm... | [
"static inline void FUNC_0(rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size)\n{",
"register const uint8_t* VAR_0=src;",
"register uint8_t* VAR_1=dst;",
"register const uint8_t *VAR_2;",
"const uint8_t *VAR_3;",
"VAR_2 = VAR_0 + src_size;",
"__asm__ volatile(PREFETCH\" %0\"::\"m\"(*VAR_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
] | [
[
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
... |
22,318 | static inline void RENAME(rgb15to32)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
#ifdef HAVE_MMX
const uint16_t *mm_end;
#endif
uint8_t *d = (uint8_t *)dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*s... | true | FFmpeg | 6e42e6c4b410dbef8b593c2d796a5dad95f89ee4 | static inline void RENAME(rgb15to32)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
#ifdef HAVE_MMX
const uint16_t *mm_end;
#endif
uint8_t *d = (uint8_t *)dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*s... | {
"code": [
"\tconst uint16_t *end;",
"\tuint8_t *d = (uint8_t *)dst;",
"\tend = s + src_size/2;",
"\twhile(s < end)",
"\t\tregister uint16_t bgr;",
"\t\tbgr = *s++;",
"\tconst uint16_t *end;",
"\tuint8_t *d = (uint8_t *)dst;",
"\tconst uint16_t *s = (const uint16_t *)src;",
"\... | static inline void FUNC_0(rgb15to32)(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *VAR_0;
#ifdef HAVE_MMX
const uint16_t *mm_end;
#endif
uint8_t *d = (uint8_t *)dst;
const uint16_t *VAR_1 = (const uint16_t *)src;
VAR_0 = VAR_1 + src_size/2;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH"... | [
"static inline void FUNC_0(rgb15to32)(const uint8_t *src, uint8_t *dst, long src_size)\n{",
"const uint16_t *VAR_0;",
"#ifdef HAVE_MMX\nconst uint16_t *mm_end;",
"#endif\nuint8_t *d = (uint8_t *)dst;",
"const uint16_t *VAR_1 = (const uint16_t *)src;",
"VAR_0 = VAR_1 + src_size/2;",
"#ifdef HAVE_MMX\n__a... | [
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27,
29
],
[
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,... |
22,319 | static void tap_send(void *opaque)
{
TAPState *s = opaque;
int size;
do {
uint8_t *buf = s->buf;
size = tap_read_packet(s->fd, s->buf, sizeof(s->buf));
if (size <= 0) {
break;
}
if (s->host_vnet_hdr_len && !s->using_vnet_hdr) {
... | true | qemu | 68e5ec64009812dbaa03ed9cfded9344986f5304 | static void tap_send(void *opaque)
{
TAPState *s = opaque;
int size;
do {
uint8_t *buf = s->buf;
size = tap_read_packet(s->fd, s->buf, sizeof(s->buf));
if (size <= 0) {
break;
}
if (s->host_vnet_hdr_len && !s->using_vnet_hdr) {
... | {
"code": [
" do {",
" } while (size > 0 && qemu_can_send_packet(&s->nc));"
],
"line_no": [
11,
45
]
} | static void FUNC_0(void *VAR_0)
{
TAPState *s = VAR_0;
int VAR_1;
do {
uint8_t *buf = s->buf;
VAR_1 = tap_read_packet(s->fd, s->buf, sizeof(s->buf));
if (VAR_1 <= 0) {
break;
}
if (s->host_vnet_hdr_len && !s->using_vnet_hdr) {
... | [
"static void FUNC_0(void *VAR_0)\n{",
"TAPState *s = VAR_0;",
"int VAR_1;",
"do {",
"uint8_t *buf = s->buf;",
"VAR_1 = tap_read_packet(s->fd, s->buf, sizeof(s->buf));",
"if (VAR_1 <= 0) {",
"break;",
"}",
"if (s->host_vnet_hdr_len && !s->using_vnet_hdr) {",
"buf += s->host_vnet_hdr_len;",
"VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
]
] |
22,320 | int decode_splitmvs(VP8Context *s, VP56RangeCoder *c, VP8Macroblock *mb, int layout)
{
int part_idx;
int n, num;
VP8Macroblock *top_mb;
VP8Macroblock *left_mb = &mb[-1];
const uint8_t *mbsplits_left = vp8_mbsplits[left_mb->partitioning];
const uint8_t *mbsplits_top, *mbsplits_cur, *firsti... | true | FFmpeg | ac4b32df71bd932838043a4838b86d11e169707f | int decode_splitmvs(VP8Context *s, VP56RangeCoder *c, VP8Macroblock *mb, int layout)
{
int part_idx;
int n, num;
VP8Macroblock *top_mb;
VP8Macroblock *left_mb = &mb[-1];
const uint8_t *mbsplits_left = vp8_mbsplits[left_mb->partitioning];
const uint8_t *mbsplits_top, *mbsplits_cur, *firsti... | {
"code": [
"int decode_splitmvs(VP8Context *s, VP56RangeCoder *c, VP8Macroblock *mb, int layout)",
" submv_prob = get_submv_prob(left, above);",
" mb->bmv[n].y = mb->mv.y + read_mv_component(c, s->prob->mvc[0]);",
" mb->bmv[n].x = mb->mv.x + read_mv_compon... | int FUNC_0(VP8Context *VAR_0, VP56RangeCoder *VAR_1, VP8Macroblock *VAR_2, int VAR_3)
{
int VAR_4;
int VAR_5, VAR_6;
VP8Macroblock *top_mb;
VP8Macroblock *left_mb = &VAR_2[-1];
const uint8_t *VAR_7 = vp8_mbsplits[left_mb->partitioning];
const uint8_t *VAR_8, *mbsplits_cur, *firstidx;
... | [
"int FUNC_0(VP8Context *VAR_0, VP56RangeCoder *VAR_1, VP8Macroblock *VAR_2, int VAR_3)\n{",
"int VAR_4;",
"int VAR_5, VAR_6;",
"VP8Macroblock *top_mb;",
"VP8Macroblock *left_mb = &VAR_2[-1];",
"const uint8_t *VAR_7 = vp8_mbsplits[left_mb->partitioning];",
"const uint8_t *VAR_8, *mbsplits_cur, *firstidx;... | [
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,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
29,
31
],
[
33
],
[
35
],
[
39
],
[
41,
43
],
[
45,
47
],
[
49
... |
22,321 | static inline void FUNC(idctSparseColPut)(pixel *dest, int line_size,
DCTELEM *col)
{
int a0, a1, a2, a3, b0, b1, b2, b3;
INIT_CLIP;
IDCT_COLS;
dest[0] = CLIP((a0 + b0) >> COL_SHIFT);
dest += line_size;
dest[0] = CLIP((a1 + b1) >> COL_SHIFT);... | true | FFmpeg | c23acbaed40101c677dfcfbbfe0d2c230a8e8f44 | static inline void FUNC(idctSparseColPut)(pixel *dest, int line_size,
DCTELEM *col)
{
int a0, a1, a2, a3, b0, b1, b2, b3;
INIT_CLIP;
IDCT_COLS;
dest[0] = CLIP((a0 + b0) >> COL_SHIFT);
dest += line_size;
dest[0] = CLIP((a1 + b1) >> COL_SHIFT);... | {
"code": [
" INIT_CLIP;",
" dest[0] = CLIP((a0 + b0) >> COL_SHIFT);",
" dest[0] = CLIP((a1 + b1) >> COL_SHIFT);",
" dest[0] = CLIP((a2 + b2) >> COL_SHIFT);",
" dest[0] = CLIP((a3 + b3) >> COL_SHIFT);",
" dest[0] = CLIP((a3 - b3) >> COL_SHIFT);",
" dest[0] = CLIP((a2 -... | static inline void FUNC_0(idctSparseColPut)(pixel *dest, int line_size,
DCTELEM *col)
{
int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;
INIT_CLIP;
IDCT_COLS;
dest[0] = CLIP((VAR_0 + VAR_4) >> COL_SHIFT);
dest += line_size;
dest[0]... | [
"static inline void FUNC_0(idctSparseColPut)(pixel *dest, int line_size,\nDCTELEM *col)\n{",
"int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;",
"INIT_CLIP;",
"IDCT_COLS;",
"dest[0] = CLIP((VAR_0 + VAR_4) >> COL_SHIFT);",
"dest += line_size;",
"dest[0] = CLIP((VAR_1 + VAR_5) >> COL_SHIFT);",
... | [
0,
0,
1,
0,
1,
0,
1,
0,
1,
0,
1,
0,
1,
0,
1,
0,
1,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
22,322 | void hbitmap_reset(HBitmap *hb, uint64_t start, uint64_t count)
{
/* Compute range in the last layer. */
uint64_t last = start + count - 1;
trace_hbitmap_reset(hb, start, count,
start >> hb->granularity, last >> hb->granularity);
start >>= hb->granularity;
last >>... | true | qemu | 0e321191224c8cd137eef41da3257e096965c3d6 | void hbitmap_reset(HBitmap *hb, uint64_t start, uint64_t count)
{
uint64_t last = start + count - 1;
trace_hbitmap_reset(hb, start, count,
start >> hb->granularity, last >> hb->granularity);
start >>= hb->granularity;
last >>= hb->granularity;
hb->count -=... | {
"code": [],
"line_no": []
} | void FUNC_0(HBitmap *VAR_0, uint64_t VAR_1, uint64_t VAR_2)
{
uint64_t last = VAR_1 + VAR_2 - 1;
trace_hbitmap_reset(VAR_0, VAR_1, VAR_2,
VAR_1 >> VAR_0->granularity, last >> VAR_0->granularity);
VAR_1 >>= VAR_0->granularity;
last >>= VAR_0->granularity;
V... | [
"void FUNC_0(HBitmap *VAR_0, uint64_t VAR_1, uint64_t VAR_2)\n{",
"uint64_t last = VAR_1 + VAR_2 - 1;",
"trace_hbitmap_reset(VAR_0, VAR_1, VAR_2,\nVAR_1 >> VAR_0->granularity, last >> VAR_0->granularity);",
"VAR_1 >>= VAR_0->granularity;",
"last >>= VAR_0->granularity;",
"VAR_0->VAR_2 -= hb_count_between(... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
11,
13
],
[
17
],
[
19
],
[
24
],
[
26
],
[
28
]
] |
22,323 | static int raw_create(const char *filename, QemuOpts *opts, Error **errp)
{
int fd;
int result = 0;
int64_t total_size = 0;
bool nocow = false;
PreallocMode prealloc;
char *buf = NULL;
Error *local_err = NULL;
strstart(filename, "file:", &filename);
/* Read out options ... | true | qemu | f6a7240442727cefe000a5b4fdee4d844ddd6bfe | static int raw_create(const char *filename, QemuOpts *opts, Error **errp)
{
int fd;
int result = 0;
int64_t total_size = 0;
bool nocow = false;
PreallocMode prealloc;
char *buf = NULL;
Error *local_err = NULL;
strstart(filename, "file:", &filename);
total_size = R... | {
"code": [
" if (ftruncate(fd, total_size) != 0) {",
" result = -errno;",
" error_setg_errno(errp, -result, \"Could not resize file\");",
" goto out_close;",
"out_close:"
],
"line_no": [
101,
61,
105,
107,
207
]
} | static int FUNC_0(const char *VAR_0, QemuOpts *VAR_1, Error **VAR_2)
{
int VAR_3;
int VAR_4 = 0;
int64_t total_size = 0;
bool nocow = false;
PreallocMode prealloc;
char *VAR_5 = NULL;
Error *local_err = NULL;
strstart(VAR_0, "file:", &VAR_0);
total_size = ROUND_UP... | [
"static int FUNC_0(const char *VAR_0, QemuOpts *VAR_1, Error **VAR_2)\n{",
"int VAR_3;",
"int VAR_4 = 0;",
"int64_t total_size = 0;",
"bool nocow = false;",
"PreallocMode prealloc;",
"char *VAR_5 = NULL;",
"Error *local_err = NULL;",
"strstart(VAR_0, \"file:\", &VAR_0);",
"total_size = ROUND_UP(qe... | [
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,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
27,
29
],
[
31
],
[
33
],
[
35,
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
22,324 | static int aasc_decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AascContext *s = avctx->priv_data;
int compr, i, stride, ret;
... | true | FFmpeg | 62b1e3b1031e901105d78e831120de8e4c3e0013 | static int aasc_decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AascContext *s = avctx->priv_data;
int compr, i, stride, ret;
... | {
"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;
AascContext *s = VAR_0->priv_data;
int VAR_6, VAR_7, VAR_8, VAR_9;
if (VA... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"AascContext *s = VAR_0->priv_data;",
"int VAR_6, VAR_7, VAR_8, VAR_9;",
"if (VAR_5 < 4)\nif ((VAR_9 = ff_reget_buffer(VAR_0, s->frame)) ... | [
0,
0,
0,
0,
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,
24
],
[
26
],
[
28
],
[
30
],
[
34
],
[
36
],
[
38
],
[
40
],
[
42,
44
],
[
48
],
[
50
],
[
52
],
[
54
... |
22,325 | void mips_malta_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
ram_addr_t ram_low_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_file... | false | qemu | 6e7d82497dc8da7d420c8fa6632d759e08a18bc3 | void mips_malta_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
ram_addr_t ram_low_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_file... | {
"code": [],
"line_no": []
} | void FUNC_0(MachineState *VAR_0)
{
ram_addr_t ram_size = VAR_0->ram_size;
ram_addr_t ram_low_size;
const char *VAR_1 = VAR_0->VAR_1;
const char *VAR_2 = VAR_0->VAR_2;
const char *VAR_3 = VAR_0->VAR_3;
const char *VAR_4 = VAR_0->VAR_4;
char *VAR_5;
pflash_t *fl;
MemoryRegion... | [
"void FUNC_0(MachineState *VAR_0)\n{",
"ram_addr_t ram_size = VAR_0->ram_size;",
"ram_addr_t ram_low_size;",
"const char *VAR_1 = VAR_0->VAR_1;",
"const char *VAR_2 = VAR_0->VAR_2;",
"const char *VAR_3 = VAR_0->VAR_3;",
"const char *VAR_4 = VAR_0->VAR_4;",
"char *VAR_5;",
"pflash_t *fl;",
"MemoryR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
... |
22,326 | static int vmdk_parse_extents(const char *desc, BlockDriverState *bs,
const char *desc_file_path, QDict *options,
Error **errp)
{
int ret;
int matches;
char access[11];
char type[11];
char fname[512];
const char *p = desc;
... | false | qemu | e4937694b66d1468aec3cd95e90888f291c3f599 | static int vmdk_parse_extents(const char *desc, BlockDriverState *bs,
const char *desc_file_path, QDict *options,
Error **errp)
{
int ret;
int matches;
char access[11];
char type[11];
char fname[512];
const char *p = desc;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, BlockDriverState *VAR_1,
const char *VAR_2, QDict *VAR_3,
Error **VAR_4)
{
int VAR_5;
int VAR_6;
char VAR_7[11];
char VAR_8[11];
char VAR_9[512];
const char *VAR_10 = VAR_0;
int64_t sec... | [
"static int FUNC_0(const char *VAR_0, BlockDriverState *VAR_1,\nconst char *VAR_2, QDict *VAR_3,\nError **VAR_4)\n{",
"int VAR_5;",
"int VAR_6;",
"char VAR_7[11];",
"char VAR_8[11];",
"char VAR_9[512];",
"const char *VAR_10 = VAR_0;",
"int64_t sectors = 0;",
"int64_t flat_offset;",
"char *VAR_11;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
55
],
[
57,
59
],
[... |
22,327 | static void external_snapshot_prepare(BlkTransactionState *common,
Error **errp)
{
BlockDriver *drv;
int flags, ret;
QDict *options = NULL;
Error *local_err = NULL;
bool has_device = false;
const char *device;
bool has_node_name = false;
co... | false | qemu | 3718d8ab65f68de2acccbe6a315907805f54e3cc | static void external_snapshot_prepare(BlkTransactionState *common,
Error **errp)
{
BlockDriver *drv;
int flags, ret;
QDict *options = NULL;
Error *local_err = NULL;
bool has_device = false;
const char *device;
bool has_node_name = false;
co... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlkTransactionState *VAR_0,
Error **VAR_1)
{
BlockDriver *drv;
int VAR_2, VAR_3;
QDict *options = NULL;
Error *local_err = NULL;
bool has_device = false;
const char *VAR_4;
bool has_node_name = false;
const char *VAR_5;
... | [
"static void FUNC_0(BlkTransactionState *VAR_0,\nError **VAR_1)\n{",
"BlockDriver *drv;",
"int VAR_2, VAR_3;",
"QDict *options = NULL;",
"Error *local_err = NULL;",
"bool has_device = false;",
"const char *VAR_4;",
"bool has_node_name = false;",
"const char *VAR_5;",
"bool has_snapshot_node_name =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
43
],
[
47
],
[
49
... |
22,328 | static void t_gen_lsl(TCGv d, TCGv a, TCGv b)
{
TCGv t0, t_31;
t0 = tcg_temp_new(TCG_TYPE_TL);
t_31 = tcg_const_tl(31);
tcg_gen_shl_tl(d, a, b);
tcg_gen_sub_tl(t0, t_31, b);
tcg_gen_sar_tl(t0, t0, t_31);
tcg_gen_and_tl(t0, t0, d);
tcg_gen_xor_tl(d, d, t0);
tcg_temp_free(t0);
tcg_temp_free(t_31)... | false | qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | static void t_gen_lsl(TCGv d, TCGv a, TCGv b)
{
TCGv t0, t_31;
t0 = tcg_temp_new(TCG_TYPE_TL);
t_31 = tcg_const_tl(31);
tcg_gen_shl_tl(d, a, b);
tcg_gen_sub_tl(t0, t_31, b);
tcg_gen_sar_tl(t0, t0, t_31);
tcg_gen_and_tl(t0, t0, d);
tcg_gen_xor_tl(d, d, t0);
tcg_temp_free(t0);
tcg_temp_free(t_31)... | {
"code": [],
"line_no": []
} | static void FUNC_0(TCGv VAR_0, TCGv VAR_1, TCGv VAR_2)
{
TCGv t0, t_31;
t0 = tcg_temp_new(TCG_TYPE_TL);
t_31 = tcg_const_tl(31);
tcg_gen_shl_tl(VAR_0, VAR_1, VAR_2);
tcg_gen_sub_tl(t0, t_31, VAR_2);
tcg_gen_sar_tl(t0, t0, t_31);
tcg_gen_and_tl(t0, t0, VAR_0);
tcg_gen_xor_tl(VAR_0, VAR_0, t0);
tcg... | [
"static void FUNC_0(TCGv VAR_0, TCGv VAR_1, TCGv VAR_2)\n{",
"TCGv t0, t_31;",
"t0 = tcg_temp_new(TCG_TYPE_TL);",
"t_31 = tcg_const_tl(31);",
"tcg_gen_shl_tl(VAR_0, VAR_1, VAR_2);",
"tcg_gen_sub_tl(t0, t_31, VAR_2);",
"tcg_gen_sar_tl(t0, t0, t_31);",
"tcg_gen_and_tl(t0, t0, VAR_0);",
"tcg_gen_xor_tl... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
22,329 | int unix_listen_opts(QemuOpts *opts, Error **errp)
{
struct sockaddr_un un;
const char *path = qemu_opt_get(opts, "path");
int sock, fd;
sock = qemu_socket(PF_UNIX, SOCK_STREAM, 0);
if (sock < 0) {
error_setg_errno(errp, errno, "Failed to create socket");
return -1;
}
... | false | qemu | b658c53d2b87c1e9e0ade887a70ecb0de1474a7b | int unix_listen_opts(QemuOpts *opts, Error **errp)
{
struct sockaddr_un un;
const char *path = qemu_opt_get(opts, "path");
int sock, fd;
sock = qemu_socket(PF_UNIX, SOCK_STREAM, 0);
if (sock < 0) {
error_setg_errno(errp, errno, "Failed to create socket");
return -1;
}
... | {
"code": [],
"line_no": []
} | int FUNC_0(QemuOpts *VAR_0, Error **VAR_1)
{
struct sockaddr_un VAR_2;
const char *VAR_3 = qemu_opt_get(VAR_0, "VAR_3");
int VAR_4, VAR_5;
VAR_4 = qemu_socket(PF_UNIX, SOCK_STREAM, 0);
if (VAR_4 < 0) {
error_setg_errno(VAR_1, errno, "Failed to create socket");
return -1;
... | [
"int FUNC_0(QemuOpts *VAR_0, Error **VAR_1)\n{",
"struct sockaddr_un VAR_2;",
"const char *VAR_3 = qemu_opt_get(VAR_0, \"VAR_3\");",
"int VAR_4, VAR_5;",
"VAR_4 = qemu_socket(PF_UNIX, SOCK_STREAM, 0);",
"if (VAR_4 < 0) {",
"error_setg_errno(VAR_1, errno, \"Failed to create socket\");",
"return -1;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
55
],
[
57
],
[
59
],
[... |
22,332 | int check_codec_match(AVCodecContext *ccf, AVCodecContext *ccs, int stream)
{
int matches = 1;
#define CHECK_CODEC(x) (ccf->x != ccs->x)
if (CHECK_CODEC(codec_id) || CHECK_CODEC(codec_type)) {
http_log("Codecs do not match for stream %d\n", stream);
matches = 0;
} else if (CHECK_CO... | false | FFmpeg | 311107a65d0105044d1691b5e85d6f30879b0eb4 | int check_codec_match(AVCodecContext *ccf, AVCodecContext *ccs, int stream)
{
int matches = 1;
#define CHECK_CODEC(x) (ccf->x != ccs->x)
if (CHECK_CODEC(codec_id) || CHECK_CODEC(codec_type)) {
http_log("Codecs do not match for stream %d\n", stream);
matches = 0;
} else if (CHECK_CO... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0, AVCodecContext *VAR_1, int VAR_2)
{
int VAR_3 = 1;
#define CHECK_CODEC(x) (VAR_0->x != VAR_1->x)
if (CHECK_CODEC(codec_id) || CHECK_CODEC(codec_type)) {
http_log("Codecs do not match for VAR_2 %d\n", VAR_2);
VAR_3 = 0;
} else if (CHECK_CODEC(bit_ra... | [
"int FUNC_0(AVCodecContext *VAR_0, AVCodecContext *VAR_1, int VAR_2)\n{",
"int VAR_3 = 1;",
"#define CHECK_CODEC(x) (VAR_0->x != VAR_1->x)\nif (CHECK_CODEC(codec_id) || CHECK_CODEC(codec_type)) {",
"http_log(\"Codecs do not match for VAR_2 %d\\n\", VAR_2);",
"VAR_3 = 0;",
"} else if (CHECK_CODEC(bit_rate... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27,
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43,
45
],
[
47
],
[
49... |
22,335 | void memory_region_add_subregion(MemoryRegion *mr,
hwaddr offset,
MemoryRegion *subregion)
{
subregion->may_overlap = false;
subregion->priority = 0;
memory_region_add_subregion_common(mr, offset, subregion);
}
| false | qemu | b61359781958759317ee6fd1a45b59be0b7dbbe1 | void memory_region_add_subregion(MemoryRegion *mr,
hwaddr offset,
MemoryRegion *subregion)
{
subregion->may_overlap = false;
subregion->priority = 0;
memory_region_add_subregion_common(mr, offset, subregion);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(MemoryRegion *VAR_0,
hwaddr VAR_1,
MemoryRegion *VAR_2)
{
VAR_2->may_overlap = false;
VAR_2->priority = 0;
memory_region_add_subregion_common(VAR_0, VAR_1, VAR_2);
}
| [
"void FUNC_0(MemoryRegion *VAR_0,\nhwaddr VAR_1,\nMemoryRegion *VAR_2)\n{",
"VAR_2->may_overlap = false;",
"VAR_2->priority = 0;",
"memory_region_add_subregion_common(VAR_0, VAR_1, VAR_2);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
22,336 | static void xen_be_evtchn_event(void *opaque)
{
struct XenDevice *xendev = opaque;
evtchn_port_t port;
port = xc_evtchn_pending(xendev->evtchndev);
if (port != xendev->local_port) {
xen_be_printf(xendev, 0, "xc_evtchn_pending returned %d (expected %d)\n",
port, xen... | false | qemu | a2db2a1edd06a50b8a862c654cf993368cf9f1d9 | static void xen_be_evtchn_event(void *opaque)
{
struct XenDevice *xendev = opaque;
evtchn_port_t port;
port = xc_evtchn_pending(xendev->evtchndev);
if (port != xendev->local_port) {
xen_be_printf(xendev, 0, "xc_evtchn_pending returned %d (expected %d)\n",
port, xen... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
struct XenDevice *VAR_1 = VAR_0;
evtchn_port_t port;
port = xc_evtchn_pending(VAR_1->evtchndev);
if (port != VAR_1->local_port) {
xen_be_printf(VAR_1, 0, "xc_evtchn_pending returned %d (expected %d)\n",
port, VAR_1->local_port);
... | [
"static void FUNC_0(void *VAR_0)\n{",
"struct XenDevice *VAR_1 = VAR_0;",
"evtchn_port_t port;",
"port = xc_evtchn_pending(VAR_1->evtchndev);",
"if (port != VAR_1->local_port) {",
"xen_be_printf(VAR_1, 0, \"xc_evtchn_pending returned %d (expected %d)\\n\",\nport, VAR_1->local_port);",
"return;",
"}",
... | [
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
]
] |
22,337 | static void qpi_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
{
CPUState *env;
env = cpu_single_env;
if (!env)
return;
env->eflags = (env->eflags & ~(IF_MASK | IOPL_MASK)) |
(val & (IF_MASK | IOPL_MASK));
}
| false | qemu | 4a1418e07bdcfaa3177739e04707ecaec75d89e1 | static void qpi_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
{
CPUState *env;
env = cpu_single_env;
if (!env)
return;
env->eflags = (env->eflags & ~(IF_MASK | IOPL_MASK)) |
(val & (IF_MASK | IOPL_MASK));
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2)
{
CPUState *env;
env = cpu_single_env;
if (!env)
return;
env->eflags = (env->eflags & ~(IF_MASK | IOPL_MASK)) |
(VAR_2 & (IF_MASK | IOPL_MASK));
}
| [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2)\n{",
"CPUState *env;",
"env = cpu_single_env;",
"if (!env)\nreturn;",
"env->eflags = (env->eflags & ~(IF_MASK | IOPL_MASK)) |\n(VAR_2 & (IF_MASK | IOPL_MASK));",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15,
17
],
[
19
]
] |
22,338 | static int pci_apb_map_irq(PCIDevice *pci_dev, int irq_num)
{
return ((pci_dev->devfn & 0x18) >> 1) + irq_num;
}
| false | qemu | 6864fa38972081833f79b39df74b9c08cc94f6cc | static int pci_apb_map_irq(PCIDevice *pci_dev, int irq_num)
{
return ((pci_dev->devfn & 0x18) >> 1) + irq_num;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(PCIDevice *VAR_0, int VAR_1)
{
return ((VAR_0->devfn & 0x18) >> 1) + VAR_1;
}
| [
"static int FUNC_0(PCIDevice *VAR_0, int VAR_1)\n{",
"return ((VAR_0->devfn & 0x18) >> 1) + VAR_1;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
22,339 | static void mirror_read_complete(void *opaque, int ret)
{
MirrorOp *op = opaque;
MirrorBlockJob *s = op->s;
aio_context_acquire(blk_get_aio_context(s->common.blk));
if (ret < 0) {
BlockErrorAction action;
bdrv_set_dirty_bitmap(s->dirty_bitmap, op->sector_num, op->nb_sectors);
... | false | qemu | b436982f04fb33bb29fcdea190bd1fdc97dc65ef | static void mirror_read_complete(void *opaque, int ret)
{
MirrorOp *op = opaque;
MirrorBlockJob *s = op->s;
aio_context_acquire(blk_get_aio_context(s->common.blk));
if (ret < 0) {
BlockErrorAction action;
bdrv_set_dirty_bitmap(s->dirty_bitmap, op->sector_num, op->nb_sectors);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1)
{
MirrorOp *op = VAR_0;
MirrorBlockJob *s = op->s;
aio_context_acquire(blk_get_aio_context(s->common.blk));
if (VAR_1 < 0) {
BlockErrorAction action;
bdrv_set_dirty_bitmap(s->dirty_bitmap, op->sector_num, op->nb_sectors);
act... | [
"static void FUNC_0(void *VAR_0, int VAR_1)\n{",
"MirrorOp *op = VAR_0;",
"MirrorBlockJob *s = op->s;",
"aio_context_acquire(blk_get_aio_context(s->common.blk));",
"if (VAR_1 < 0) {",
"BlockErrorAction action;",
"bdrv_set_dirty_bitmap(s->dirty_bitmap, op->sector_num, op->nb_sectors);",
"action = mirro... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
]
] |
22,340 | static struct omap_mpu_timer_s *omap_mpu_timer_init(MemoryRegion *system_memory,
target_phys_addr_t base,
qemu_irq irq, omap_clk clk)
{
struct omap_mpu_timer_s *s = (struct omap_mpu_timer_s *)
g_malloc0(sizeof(struct omap_mpu_timer_s));
s->irq = irq;
s->c... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static struct omap_mpu_timer_s *omap_mpu_timer_init(MemoryRegion *system_memory,
target_phys_addr_t base,
qemu_irq irq, omap_clk clk)
{
struct omap_mpu_timer_s *s = (struct omap_mpu_timer_s *)
g_malloc0(sizeof(struct omap_mpu_timer_s));
s->irq = irq;
s->c... | {
"code": [],
"line_no": []
} | static struct omap_mpu_timer_s *FUNC_0(MemoryRegion *VAR_0,
target_phys_addr_t VAR_1,
qemu_irq VAR_2, omap_clk VAR_3)
{
struct omap_mpu_timer_s *VAR_4 = (struct omap_mpu_timer_s *)
g_malloc0(sizeof(struct omap_mpu_timer_s));
VAR_4->VAR_2 = VAR_2;
VAR_4->V... | [
"static struct omap_mpu_timer_s *FUNC_0(MemoryRegion *VAR_0,\ntarget_phys_addr_t VAR_1,\nqemu_irq VAR_2, omap_clk VAR_3)\n{",
"struct omap_mpu_timer_s *VAR_4 = (struct omap_mpu_timer_s *)\ng_malloc0(sizeof(struct omap_mpu_timer_s));",
"VAR_4->VAR_2 = VAR_2;",
"VAR_4->VAR_3 = VAR_3;",
"VAR_4->timer = qemu_ne... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9,
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
35
],
[
39
],
[
41
]
] |
22,341 | static void arm_cpu_reset(CPUState *s)
{
ARMCPU *cpu = ARM_CPU(s);
ARMCPUClass *acc = ARM_CPU_GET_CLASS(cpu);
CPUARMState *env = &cpu->env;
acc->parent_reset(s);
memset(env, 0, offsetof(CPUARMState, end_reset_fields));
g_hash_table_foreach(cpu->cp_regs, cp_reg_reset, cpu);
g_ha... | false | qemu | 9d40cd8a68cfc7606f4548cc9e812bab15c6dc28 | static void arm_cpu_reset(CPUState *s)
{
ARMCPU *cpu = ARM_CPU(s);
ARMCPUClass *acc = ARM_CPU_GET_CLASS(cpu);
CPUARMState *env = &cpu->env;
acc->parent_reset(s);
memset(env, 0, offsetof(CPUARMState, end_reset_fields));
g_hash_table_foreach(cpu->cp_regs, cp_reg_reset, cpu);
g_ha... | {
"code": [],
"line_no": []
} | static void FUNC_0(CPUState *VAR_0)
{
ARMCPU *cpu = ARM_CPU(VAR_0);
ARMCPUClass *acc = ARM_CPU_GET_CLASS(cpu);
CPUARMState *env = &cpu->env;
acc->parent_reset(VAR_0);
memset(env, 0, offsetof(CPUARMState, end_reset_fields));
g_hash_table_foreach(cpu->cp_regs, cp_reg_reset, cpu);
... | [
"static void FUNC_0(CPUState *VAR_0)\n{",
"ARMCPU *cpu = ARM_CPU(VAR_0);",
"ARMCPUClass *acc = ARM_CPU_GET_CLASS(cpu);",
"CPUARMState *env = &cpu->env;",
"acc->parent_reset(VAR_0);",
"memset(env, 0, offsetof(CPUARMState, end_reset_fields));",
"g_hash_table_foreach(cpu->cp_regs, cp_reg_reset, cpu);",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
51
],
[
55
],
[
57,... |
22,342 | void json_start_array(QJSON *json, const char *name)
{
json_emit_element(json, name);
qstring_append(json->str, "[ ");
json->omit_comma = true;
}
| false | qemu | 17b74b98676aee5bc470b173b1e528d2fce2cf18 | void json_start_array(QJSON *json, const char *name)
{
json_emit_element(json, name);
qstring_append(json->str, "[ ");
json->omit_comma = true;
}
| {
"code": [],
"line_no": []
} | void FUNC_0(QJSON *VAR_0, const char *VAR_1)
{
json_emit_element(VAR_0, VAR_1);
qstring_append(VAR_0->str, "[ ");
VAR_0->omit_comma = true;
}
| [
"void FUNC_0(QJSON *VAR_0, const char *VAR_1)\n{",
"json_emit_element(VAR_0, VAR_1);",
"qstring_append(VAR_0->str, \"[ \");",
"VAR_0->omit_comma = true;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
22,343 | vreader_get_reader_by_id(vreader_id_t id)
{
VReader *reader = NULL;
VReaderListEntry *current_entry = NULL;
if (id == (vreader_id_t) -1) {
return NULL;
}
vreader_list_lock();
for (current_entry = vreader_list_get_first(vreader_list); current_entry;
current_entry ... | false | qemu | 1687a089f103f9b7a1b4a1555068054cb46ee9e9 | vreader_get_reader_by_id(vreader_id_t id)
{
VReader *reader = NULL;
VReaderListEntry *current_entry = NULL;
if (id == (vreader_id_t) -1) {
return NULL;
}
vreader_list_lock();
for (current_entry = vreader_list_get_first(vreader_list); current_entry;
current_entry ... | {
"code": [],
"line_no": []
} | FUNC_0(vreader_id_t VAR_0)
{
VReader *reader = NULL;
VReaderListEntry *current_entry = NULL;
if (VAR_0 == (vreader_id_t) -1) {
return NULL;
}
vreader_list_lock();
for (current_entry = vreader_list_get_first(vreader_list); current_entry;
current_entry = vreader_li... | [
"FUNC_0(vreader_id_t VAR_0)\n{",
"VReader *reader = NULL;",
"VReaderListEntry *current_entry = NULL;",
"if (VAR_0 == (vreader_id_t) -1) {",
"return NULL;",
"}",
"vreader_list_lock();",
"for (current_entry = vreader_list_get_first(vreader_list); current_entry;",
"current_entry = vreader_list_get_next... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
22,344 | AVFilter **av_filter_next(AVFilter **filter)
{
return filter ? ++filter : ®istered_avfilters[0];
}
| false | FFmpeg | fa2a34cd40d124161c748bb0f430dc63c94dd0da | AVFilter **av_filter_next(AVFilter **filter)
{
return filter ? ++filter : ®istered_avfilters[0];
}
| {
"code": [],
"line_no": []
} | AVFilter **FUNC_0(AVFilter **filter)
{
return filter ? ++filter : ®istered_avfilters[0];
}
| [
"AVFilter **FUNC_0(AVFilter **filter)\n{",
"return filter ? ++filter : ®istered_avfilters[0];",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
22,345 | static void gem_cleanup(NetClientState *nc)
{
GemState *s = qemu_get_nic_opaque(nc);
DB_PRINT("\n");
s->nic = NULL;
}
| false | qemu | 57407ea44cc0a3d630b9b89a2be011f1955ce5c1 | static void gem_cleanup(NetClientState *nc)
{
GemState *s = qemu_get_nic_opaque(nc);
DB_PRINT("\n");
s->nic = NULL;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(NetClientState *VAR_0)
{
GemState *s = qemu_get_nic_opaque(VAR_0);
DB_PRINT("\n");
s->nic = NULL;
}
| [
"static void FUNC_0(NetClientState *VAR_0)\n{",
"GemState *s = qemu_get_nic_opaque(VAR_0);",
"DB_PRINT(\"\\n\");",
"s->nic = NULL;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
]
] |
22,346 | void qxl_render_cursor(PCIQXLDevice *qxl, QXLCommandExt *ext)
{
QXLCursorCmd *cmd = qxl_phys2virt(qxl, ext->cmd.data, ext->group_id);
QXLCursor *cursor;
QEMUCursor *c;
if (!qxl->ssd.ds->mouse_set || !qxl->ssd.ds->cursor_define) {
return;
}
if (qxl->debug > 1 && cmd->type != Q... | false | qemu | fae2afb10e3fdceab612c62a2b1e8b944ff578d9 | void qxl_render_cursor(PCIQXLDevice *qxl, QXLCommandExt *ext)
{
QXLCursorCmd *cmd = qxl_phys2virt(qxl, ext->cmd.data, ext->group_id);
QXLCursor *cursor;
QEMUCursor *c;
if (!qxl->ssd.ds->mouse_set || !qxl->ssd.ds->cursor_define) {
return;
}
if (qxl->debug > 1 && cmd->type != Q... | {
"code": [],
"line_no": []
} | void FUNC_0(PCIQXLDevice *VAR_0, QXLCommandExt *VAR_1)
{
QXLCursorCmd *cmd = qxl_phys2virt(VAR_0, VAR_1->cmd.data, VAR_1->group_id);
QXLCursor *cursor;
QEMUCursor *c;
if (!VAR_0->ssd.ds->mouse_set || !VAR_0->ssd.ds->cursor_define) {
return;
}
if (VAR_0->debug > 1 && cmd->type... | [
"void FUNC_0(PCIQXLDevice *VAR_0, QXLCommandExt *VAR_1)\n{",
"QXLCursorCmd *cmd = qxl_phys2virt(VAR_0, VAR_1->cmd.data, VAR_1->group_id);",
"QXLCursor *cursor;",
"QEMUCursor *c;",
"if (!VAR_0->ssd.ds->mouse_set || !VAR_0->ssd.ds->cursor_define) {",
"return;",
"}",
"if (VAR_0->debug > 1 && cmd->type !=... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
22,347 | static uint64_t qemu_opt_get_number_helper(QemuOpts *opts, const char *name,
uint64_t defval, bool del)
{
QemuOpt *opt = qemu_opt_find(opts, name);
uint64_t ret = defval;
if (opt == NULL) {
const QemuOptDesc *desc = find_desc_by_name(opts->list->des... | false | qemu | 435db4cf29b88b6612e30acda01cd18788dff458 | static uint64_t qemu_opt_get_number_helper(QemuOpts *opts, const char *name,
uint64_t defval, bool del)
{
QemuOpt *opt = qemu_opt_find(opts, name);
uint64_t ret = defval;
if (opt == NULL) {
const QemuOptDesc *desc = find_desc_by_name(opts->list->des... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(QemuOpts *opts, const char *name,
uint64_t defval, bool del)
{
QemuOpt *opt = qemu_opt_find(opts, name);
uint64_t ret = defval;
if (opt == NULL) {
const QemuOptDesc *VAR_0 = find_desc_by_name(opts->list->VAR_0, name);
... | [
"static uint64_t FUNC_0(QemuOpts *opts, const char *name,\nuint64_t defval, bool del)\n{",
"QemuOpt *opt = qemu_opt_find(opts, name);",
"uint64_t ret = defval;",
"if (opt == NULL) {",
"const QemuOptDesc *VAR_0 = find_desc_by_name(opts->list->VAR_0, name);",
"if (VAR_0 && VAR_0->def_value_str) {",
"parse... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
22,348 | void helper_unlock(void)
{
spin_unlock(&global_cpu_lock);
}
| false | qemu | 677ef6230b603571ae05125db469f7b4c8912a77 | void helper_unlock(void)
{
spin_unlock(&global_cpu_lock);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
spin_unlock(&global_cpu_lock);
}
| [
"void FUNC_0(void)\n{",
"spin_unlock(&global_cpu_lock);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
22,349 | static void vmsvga_screen_dump(void *opaque, const char *filename, bool cswitch,
Error **errp)
{
struct vmsvga_state_s *s = opaque;
DisplaySurface *surface = qemu_console_surface(s->vga.con);
if (!s->enable) {
s->vga.screen_dump(&s->vga, filename, cswitch, errp... | false | qemu | 2c62f08ddbf3fa80dc7202eb9a2ea60ae44e2cc5 | static void vmsvga_screen_dump(void *opaque, const char *filename, bool cswitch,
Error **errp)
{
struct vmsvga_state_s *s = opaque;
DisplaySurface *surface = qemu_console_surface(s->vga.con);
if (!s->enable) {
s->vga.screen_dump(&s->vga, filename, cswitch, errp... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, const char *VAR_1, bool VAR_2,
Error **VAR_3)
{
struct vmsvga_state_s *VAR_4 = VAR_0;
DisplaySurface *surface = qemu_console_surface(VAR_4->vga.con);
if (!VAR_4->enable) {
VAR_4->vga.screen_dump(&VAR_4->vga, VAR_1, VAR_2, VAR_3);... | [
"static void FUNC_0(void *VAR_0, const char *VAR_1, bool VAR_2,\nError **VAR_3)\n{",
"struct vmsvga_state_s *VAR_4 = VAR_0;",
"DisplaySurface *surface = qemu_console_surface(VAR_4->vga.con);",
"if (!VAR_4->enable) {",
"VAR_4->vga.screen_dump(&VAR_4->vga, VAR_1, VAR_2, VAR_3);",
"return;",
"}",
"if (su... | [
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
],
[
41
],
[
43
]
] |
22,351 | static void get_tag(AVFormatContext *s, const char *key, int type, int len, int type2_size)
{
char *value;
int64_t off = avio_tell(s->pb);
if ((unsigned)len >= (UINT_MAX - 1) / 2)
return;
value = av_malloc(2 * len + 1);
if (!value)
goto finish;
if (type == 0) { ... | true | FFmpeg | d9293648147013403de729958ea4c19a5b6c40e4 | static void get_tag(AVFormatContext *s, const char *key, int type, int len, int type2_size)
{
char *value;
int64_t off = avio_tell(s->pb);
if ((unsigned)len >= (UINT_MAX - 1) / 2)
return;
value = av_malloc(2 * len + 1);
if (!value)
goto finish;
if (type == 0) { ... | {
"code": [
" if ((unsigned)len >= (UINT_MAX - 1) / 2)",
" value = av_malloc(2 * len + 1);",
" snprintf(value, len, \"%\"PRIu64, num);"
],
"line_no": [
11,
17,
57
]
} | static void FUNC_0(AVFormatContext *VAR_0, const char *VAR_1, int VAR_2, int VAR_3, int VAR_4)
{
char *VAR_5;
int64_t off = avio_tell(VAR_0->pb);
if ((unsigned)VAR_3 >= (UINT_MAX - 1) / 2)
return;
VAR_5 = av_malloc(2 * VAR_3 + 1);
if (!VAR_5)
goto finish;
if (VAR_2... | [
"static void FUNC_0(AVFormatContext *VAR_0, const char *VAR_1, int VAR_2, int VAR_3, int VAR_4)\n{",
"char *VAR_5;",
"int64_t off = avio_tell(VAR_0->pb);",
"if ((unsigned)VAR_3 >= (UINT_MAX - 1) / 2)\nreturn;",
"VAR_5 = av_malloc(2 * VAR_3 + 1);",
"if (!VAR_5)\ngoto finish;",
"if (VAR_2 == 0) {",
"avi... | [
0,
0,
0,
1,
1,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49... |
22,352 | void sth_tce(VIOsPAPRDevice *dev, uint64_t taddr, uint16_t val)
{
val = tswap16(val);
spapr_tce_dma_write(dev, taddr, &val, sizeof(val));
}
| true | qemu | ad0ebb91cd8b5fdc4a583b03645677771f420a46 | void sth_tce(VIOsPAPRDevice *dev, uint64_t taddr, uint16_t val)
{
val = tswap16(val);
spapr_tce_dma_write(dev, taddr, &val, sizeof(val));
}
| {
"code": [
" spapr_tce_dma_write(dev, taddr, &val, sizeof(val));",
"void sth_tce(VIOsPAPRDevice *dev, uint64_t taddr, uint16_t val)",
" val = tswap16(val);",
" spapr_tce_dma_write(dev, taddr, &val, sizeof(val));",
" spapr_tce_dma_write(dev, taddr, &val, sizeof(val));",
" spapr_... | void FUNC_0(VIOsPAPRDevice *VAR_0, uint64_t VAR_1, uint16_t VAR_2)
{
VAR_2 = tswap16(VAR_2);
spapr_tce_dma_write(VAR_0, VAR_1, &VAR_2, sizeof(VAR_2));
}
| [
"void FUNC_0(VIOsPAPRDevice *VAR_0, uint64_t VAR_1, uint16_t VAR_2)\n{",
"VAR_2 = tswap16(VAR_2);",
"spapr_tce_dma_write(VAR_0, VAR_1, &VAR_2, sizeof(VAR_2));",
"}"
] | [
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
22,353 | av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], int fullRange,
int brightness, int contrast, int saturation)
{
const int isRgb = c->dstFormat==PIX_FMT_RGB32
|| c->dstFormat==PIX_FMT_RGB32_1
|| ... | true | FFmpeg | 6ed000c8e6e8a5f55433b2d67e21bcba2ebc4b5d | av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], int fullRange,
int brightness, int contrast, int saturation)
{
const int isRgb = c->dstFormat==PIX_FMT_RGB32
|| c->dstFormat==PIX_FMT_RGB32_1
|| ... | {
"code": [
" int i, base, rbase, gbase, bbase, abase, needAlpha;"
],
"line_no": [
53
]
} | av_cold int FUNC_0(SwsContext *c, const int inv_table[4], int fullRange,
int brightness, int contrast, int saturation)
{
const int VAR_0 = c->dstFormat==PIX_FMT_RGB32
|| c->dstFormat==PIX_FMT_RGB32_1
|| c->dstFormat==PIX_... | [
"av_cold int FUNC_0(SwsContext *c, const int inv_table[4], int fullRange,\nint brightness, int contrast, int saturation)\n{",
"const int VAR_0 = c->dstFormat==PIX_FMT_RGB32\n|| c->dstFormat==PIX_FMT_RGB32_1\n|| c->dstFormat==PIX_FMT_BGR24\n|| c->dstFormat==PIX_FMT_RGB565BE\n|| c->dstFormat==PIX_FMT_RGB565LE\... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
59
],
[
61
... |
22,354 | static inline int opsize_bytes(int opsize)
{
switch (opsize) {
case OS_BYTE: return 1;
case OS_WORD: return 2;
case OS_LONG: return 4;
case OS_SINGLE: return 4;
case OS_DOUBLE: return 8;
default:
qemu_assert(0, "bad operand size");
return 0;
}
}
| true | qemu | 7372c2b926200db295412efbb53f93773b7f1754 | static inline int opsize_bytes(int opsize)
{
switch (opsize) {
case OS_BYTE: return 1;
case OS_WORD: return 2;
case OS_LONG: return 4;
case OS_SINGLE: return 4;
case OS_DOUBLE: return 8;
default:
qemu_assert(0, "bad operand size");
return 0;
}
}
| {
"code": [
" qemu_assert(0, \"bad operand size\");",
" return 0;"
],
"line_no": [
19,
21
]
} | static inline int FUNC_0(int VAR_0)
{
switch (VAR_0) {
case OS_BYTE: return 1;
case OS_WORD: return 2;
case OS_LONG: return 4;
case OS_SINGLE: return 4;
case OS_DOUBLE: return 8;
default:
qemu_assert(0, "bad operand size");
return 0;
}
}
| [
"static inline int FUNC_0(int VAR_0)\n{",
"switch (VAR_0) {",
"case OS_BYTE: return 1;",
"case OS_WORD: return 2;",
"case OS_LONG: return 4;",
"case OS_SINGLE: return 4;",
"case OS_DOUBLE: return 8;",
"default:\nqemu_assert(0, \"bad operand size\");",
"return 0;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
]
] |
22,355 | static int config_input_ref(AVFilterLink *inlink)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
AVFilterContext *ctx = inlink->dst;
PSNRContext *s = ctx->priv;
unsigned sum;
int j;
s->nb_components = desc->nb_components;
if (ctx->inputs[0]->w != ctx->inpu... | true | FFmpeg | ae4c9ddebc32eaacbd62681d776881e59ca6e6f7 | static int config_input_ref(AVFilterLink *inlink)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
AVFilterContext *ctx = inlink->dst;
PSNRContext *s = ctx->priv;
unsigned sum;
int j;
s->nb_components = desc->nb_components;
if (ctx->inputs[0]->w != ctx->inpu... | {
"code": [
" s->compute_mse = desc->comp[0].depth_minus1 > 7 ? compute_images_mse_16bit : compute_images_mse;"
],
"line_no": [
85
]
} | static int FUNC_0(AVFilterLink *VAR_0)
{
const AVPixFmtDescriptor *VAR_1 = av_pix_fmt_desc_get(VAR_0->format);
AVFilterContext *ctx = VAR_0->dst;
PSNRContext *s = ctx->priv;
unsigned VAR_2;
int VAR_3;
s->nb_components = VAR_1->nb_components;
if (ctx->inputs[0]->w != ctx->inputs[1]... | [
"static int FUNC_0(AVFilterLink *VAR_0)\n{",
"const AVPixFmtDescriptor *VAR_1 = av_pix_fmt_desc_get(VAR_0->format);",
"AVFilterContext *ctx = VAR_0->dst;",
"PSNRContext *s = ctx->priv;",
"unsigned VAR_2;",
"int VAR_3;",
"s->nb_components = VAR_1->nb_components;",
"if (ctx->inputs[0]->w != ctx->inputs... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
22,356 | int dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
uint8_t* buf, int buf_size)
{
int size, i;
uint8_t *ppcm[4] = {0};
if (buf_size < DV_PROFILE_BYTES ||
!(c->sys = dv_frame_profile(buf)) ||
buf_size < c->sys->frame_size) {
return -1; /* Broken... | true | FFmpeg | d509c743b78da198af385fea362b632292cd00ad | int dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
uint8_t* buf, int buf_size)
{
int size, i;
uint8_t *ppcm[4] = {0};
if (buf_size < DV_PROFILE_BYTES ||
!(c->sys = dv_frame_profile(buf)) ||
buf_size < c->sys->frame_size) {
return -1;
}
... | {
"code": [
" !(c->sys = dv_frame_profile(buf)) ||"
],
"line_no": [
15
]
} | int FUNC_0(DVDemuxContext *VAR_0, AVPacket *VAR_1,
uint8_t* VAR_2, int VAR_3)
{
int VAR_4, VAR_5;
uint8_t *ppcm[4] = {0};
if (VAR_3 < DV_PROFILE_BYTES ||
!(VAR_0->sys = dv_frame_profile(VAR_2)) ||
VAR_3 < VAR_0->sys->frame_size) {
return -1;
... | [
"int FUNC_0(DVDemuxContext *VAR_0, AVPacket *VAR_1,\nuint8_t* VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5;",
"uint8_t *ppcm[4] = {0};",
"if (VAR_3 < DV_PROFILE_BYTES ||\n!(VAR_0->sys = dv_frame_profile(VAR_2)) ||\nVAR_3 < VAR_0->sys->frame_size) {",
"return -1;",
"}",
"VAR_4 = dv_extract_audio_info(VAR_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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13,
15,
17
],
[
19
],
[
21
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
51
],
[
53,
55
],
[
57,
59
],
[... |
22,357 | int ff_rtmp_packet_create(RTMPPacket *pkt, int channel_id, RTMPPacketType type,
int timestamp, int size)
{
pkt->data = av_malloc(size);
if (!pkt->data)
return AVERROR(ENOMEM);
pkt->data_size = size;
pkt->channel_id = channel_id;
pkt->type = type;
... | true | FFmpeg | 271c869cc3285dac2b6f2663a87c70bf3ba2b04f | int ff_rtmp_packet_create(RTMPPacket *pkt, int channel_id, RTMPPacketType type,
int timestamp, int size)
{
pkt->data = av_malloc(size);
if (!pkt->data)
return AVERROR(ENOMEM);
pkt->data_size = size;
pkt->channel_id = channel_id;
pkt->type = type;
... | {
"code": [],
"line_no": []
} | int FUNC_0(RTMPPacket *VAR_0, int VAR_1, RTMPPacketType VAR_2,
int VAR_3, int VAR_4)
{
VAR_0->data = av_malloc(VAR_4);
if (!VAR_0->data)
return AVERROR(ENOMEM);
VAR_0->data_size = VAR_4;
VAR_0->VAR_1 = VAR_1;
VAR_0->VAR_2 = VAR_2;
VAR_0->VAR_3 ... | [
"int FUNC_0(RTMPPacket *VAR_0, int VAR_1, RTMPPacketType VAR_2,\nint VAR_3, int VAR_4)\n{",
"VAR_0->data = av_malloc(VAR_4);",
"if (!VAR_0->data)\nreturn AVERROR(ENOMEM);",
"VAR_0->data_size = VAR_4;",
"VAR_0->VAR_1 = VAR_1;",
"VAR_0->VAR_2 = VAR_2;",
"VAR_0->VAR_3 = VAR_3;",
"VAR_0->extra ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
8
],
[
10,
12
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
]
] |
22,358 | static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AC3DecodeContext *s = avctx->priv_data;
int16_t *out_samples = (int16_t *)data;
int blk, ch, err;
c... | false | FFmpeg | 008f872f614e6646c5b1fc8888e40bea4796eb5f | static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AC3DecodeContext *s = avctx->priv_data;
int16_t *out_samples = (int16_t *)data;
int blk, ch, err;
c... | {
"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;
AC3DecodeContext *s = VAR_0->priv_data;
int16_t *out_samples = (int16_t *)VAR_1;
int VAR_6, VAR_7, VAR_8;
const ... | [
"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;",
"AC3DecodeContext *s = VAR_0->priv_data;",
"int16_t *out_samples = (int16_t *)VAR_1;",
"int VAR_6, VAR_7, VAR_8;",
"const uint8_t *VAR_9;",
"co... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
25
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
45
],
[
47
],
[
53
],
[
55
],
[
57
],
[... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.