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 |
|---|---|---|---|---|---|---|---|---|---|---|
20,622 | int avfilter_default_query_formats(AVFilterContext *ctx)
{
enum AVMediaType type = ctx->inputs [0] ? ctx->inputs [0]->type :
ctx->outputs[0] ? ctx->outputs[0]->type :
AVMEDIA_TYPE_VIDEO;
avfilter_set_common_formats(ctx, avfilter_all_formats(type));
... | true | FFmpeg | 120119225a5363f89822addb472085631d2157bc | int avfilter_default_query_formats(AVFilterContext *ctx)
{
enum AVMediaType type = ctx->inputs [0] ? ctx->inputs [0]->type :
ctx->outputs[0] ? ctx->outputs[0]->type :
AVMEDIA_TYPE_VIDEO;
avfilter_set_common_formats(ctx, avfilter_all_formats(type));
... | {
"code": [
" enum AVMediaType type = ctx->inputs [0] ? ctx->inputs [0]->type :",
" ctx->outputs[0] ? ctx->outputs[0]->type :"
],
"line_no": [
5,
7
]
} | int FUNC_0(AVFilterContext *VAR_0)
{
enum AVMediaType VAR_1 = VAR_0->inputs [0] ? VAR_0->inputs [0]->VAR_1 :
VAR_0->outputs[0] ? VAR_0->outputs[0]->VAR_1 :
AVMEDIA_TYPE_VIDEO;
avfilter_set_common_formats(VAR_0, avfilter_all_formats(VAR_1));
ret... | [
"int FUNC_0(AVFilterContext *VAR_0)\n{",
"enum AVMediaType VAR_1 = VAR_0->inputs [0] ? VAR_0->inputs [0]->VAR_1 :\nVAR_0->outputs[0] ? VAR_0->outputs[0]->VAR_1 :\nAVMEDIA_TYPE_VIDEO;",
"avfilter_set_common_formats(VAR_0, avfilter_all_formats(VAR_1));",
"return 0;",
"}"
] | [
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5,
7,
9
],
[
13
],
[
15
],
[
17
]
] |
20,624 | static void vhost_log_sync(MemoryListener *listener,
MemoryRegionSection *section)
{
struct vhost_dev *dev = container_of(listener, struct vhost_dev,
memory_listener);
hwaddr start_addr = section->offset_within_address_space;
hwaddr en... | true | qemu | 6b37a23df98faa26391a93373930bfb15b943e00 | static void vhost_log_sync(MemoryListener *listener,
MemoryRegionSection *section)
{
struct vhost_dev *dev = container_of(listener, struct vhost_dev,
memory_listener);
hwaddr start_addr = section->offset_within_address_space;
hwaddr en... | {
"code": [
" hwaddr start_addr = section->offset_within_address_space;",
" hwaddr end_addr = start_addr + section->size;",
" vhost_sync_dirty_bitmap(dev, section, start_addr, end_addr);"
],
"line_no": [
11,
13,
17
]
} | static void FUNC_0(MemoryListener *VAR_0,
MemoryRegionSection *VAR_1)
{
struct vhost_dev *VAR_2 = container_of(VAR_0, struct vhost_dev,
memory_listener);
hwaddr start_addr = VAR_1->offset_within_address_space;
hwaddr end_addr = start_a... | [
"static void FUNC_0(MemoryListener *VAR_0,\nMemoryRegionSection *VAR_1)\n{",
"struct vhost_dev *VAR_2 = container_of(VAR_0, struct vhost_dev,\nmemory_listener);",
"hwaddr start_addr = VAR_1->offset_within_address_space;",
"hwaddr end_addr = start_addr + VAR_1->size;",
"vhost_sync_dirty_bitmap(VAR_2, VAR_1, ... | [
0,
0,
1,
1,
1,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
11
],
[
13
],
[
17
],
[
19
]
] |
20,625 | static void put_codebook_header(PutBitContext * pb, codebook_t * cb) {
int i;
int ordered = 0;
put_bits(pb, 24, 0x564342); //magic
put_bits(pb, 16, cb->ndimentions);
put_bits(pb, 24, cb->nentries);
for (i = 1; i < cb->nentries; i++) if (cb->entries[i].len < cb->entries[i-1].len) break;... | true | FFmpeg | 0e6fd0f12f90ba6a2edf79a398186293f2ab6334 | static void put_codebook_header(PutBitContext * pb, codebook_t * cb) {
int i;
int ordered = 0;
put_bits(pb, 24, 0x564342);
put_bits(pb, 16, cb->ndimentions);
put_bits(pb, 24, cb->nentries);
for (i = 1; i < cb->nentries; i++) if (cb->entries[i].len < cb->entries[i-1].len) break;
i... | {
"code": [
" put_bits(pb, 5, len);"
],
"line_no": [
29
]
} | static void FUNC_0(PutBitContext * VAR_0, codebook_t * VAR_1) {
int VAR_2;
int VAR_3 = 0;
put_bits(VAR_0, 24, 0x564342);
put_bits(VAR_0, 16, VAR_1->ndimentions);
put_bits(VAR_0, 24, VAR_1->nentries);
for (VAR_2 = 1; VAR_2 < VAR_1->nentries; VAR_2++) if (VAR_1->entries[VAR_2].VAR_4 < V... | [
"static void FUNC_0(PutBitContext * VAR_0, codebook_t * VAR_1) {",
"int VAR_2;",
"int VAR_3 = 0;",
"put_bits(VAR_0, 24, 0x564342);",
"put_bits(VAR_0, 16, VAR_1->ndimentions);",
"put_bits(VAR_0, 24, VAR_1->nentries);",
"for (VAR_2 = 1; VAR_2 < VAR_1->nentries; VAR_2++) if (VAR_1->entries[VAR_2].VAR_4 < V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
... |
20,626 | static int mig_save_device_dirty(QEMUFile *f, BlkMigDevState *bmds,
int is_async)
{
BlkMigBlock *blk;
int64_t total_sectors = bmds->total_sectors;
int64_t sector;
int nr_sectors;
int ret = -EIO;
for (sector = bmds->cur_dirty; sector < bmds->total_sector... | true | qemu | c4237dfa635900e4d1cdc6038d5efe3507f45f0c | static int mig_save_device_dirty(QEMUFile *f, BlkMigDevState *bmds,
int is_async)
{
BlkMigBlock *blk;
int64_t total_sectors = bmds->total_sectors;
int64_t sector;
int nr_sectors;
int ret = -EIO;
for (sector = bmds->cur_dirty; sector < bmds->total_sector... | {
"code": [
" bdrv_reset_dirty(bmds->bs, sector, nr_sectors);"
],
"line_no": [
107
]
} | static int FUNC_0(QEMUFile *VAR_0, BlkMigDevState *VAR_1,
int VAR_2)
{
BlkMigBlock *blk;
int64_t total_sectors = VAR_1->total_sectors;
int64_t sector;
int VAR_3;
int VAR_4 = -EIO;
for (sector = VAR_1->cur_dirty; sector < VAR_1->total_sectors;) {
... | [
"static int FUNC_0(QEMUFile *VAR_0, BlkMigDevState *VAR_1,\nint VAR_2)\n{",
"BlkMigBlock *blk;",
"int64_t total_sectors = VAR_1->total_sectors;",
"int64_t sector;",
"int VAR_3;",
"int VAR_4 = -EIO;",
"for (sector = VAR_1->cur_dirty; sector < VAR_1->total_sectors;) {",
"blk_mig_lock();",
"if (bmds_ai... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
20,627 | void qbus_free(BusState *bus)
{
DeviceState *dev;
while ((dev = QLIST_FIRST(&bus->children)) != NULL) {
qdev_free(dev);
}
if (bus->parent) {
QLIST_REMOVE(bus, sibling);
bus->parent->num_child_bus--;
}
if (bus->qdev_allocated) {
qemu_free(bus);
}... | true | qemu | e163ae7b8f80dc4eb38445956929409601a8321c | void qbus_free(BusState *bus)
{
DeviceState *dev;
while ((dev = QLIST_FIRST(&bus->children)) != NULL) {
qdev_free(dev);
}
if (bus->parent) {
QLIST_REMOVE(bus, sibling);
bus->parent->num_child_bus--;
}
if (bus->qdev_allocated) {
qemu_free(bus);
}... | {
"code": [],
"line_no": []
} | void FUNC_0(BusState *VAR_0)
{
DeviceState *dev;
while ((dev = QLIST_FIRST(&VAR_0->children)) != NULL) {
qdev_free(dev);
}
if (VAR_0->parent) {
QLIST_REMOVE(VAR_0, sibling);
VAR_0->parent->num_child_bus--;
}
if (VAR_0->qdev_allocated) {
qemu_free(VAR... | [
"void FUNC_0(BusState *VAR_0)\n{",
"DeviceState *dev;",
"while ((dev = QLIST_FIRST(&VAR_0->children)) != NULL) {",
"qdev_free(dev);",
"}",
"if (VAR_0->parent) {",
"QLIST_REMOVE(VAR_0, sibling);",
"VAR_0->parent->num_child_bus--;",
"}",
"if (VAR_0->qdev_allocated) {",
"qemu_free(VAR_0);",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
24
],
[
26
],
[
28
],
[
30
]
] |
20,628 | static void decode_v4_vector(CinepakEncContext *s, AVPicture *sub_pict, int *v4_vector, strip_info *info)
{
int i, x, y, entry_size = s->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;
for(i = y = 0; y < 4; y += 2) {
for(x = 0; x < 4; x += 2, i++) {
sub_pict->data[0][x + y*sub_pict->line... | true | FFmpeg | 7da9f4523159670d577a2808d4481e64008a8894 | static void decode_v4_vector(CinepakEncContext *s, AVPicture *sub_pict, int *v4_vector, strip_info *info)
{
int i, x, y, entry_size = s->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;
for(i = y = 0; y < 4; y += 2) {
for(x = 0; x < 4; x += 2, i++) {
sub_pict->data[0][x + y*sub_pict->line... | {
"code": [
" int i, x, y, entry_size = s->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;",
" if(s->pix_fmt == AV_PIX_FMT_YUV420P) {"
],
"line_no": [
5,
23
]
} | static void FUNC_0(CinepakEncContext *VAR_0, AVPicture *VAR_1, int *VAR_2, strip_info *VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7 = VAR_0->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;
for(VAR_4 = VAR_6 = 0; VAR_6 < 4; VAR_6 += 2) {
for(VAR_5 = 0; VAR_5 < 4; VAR_5 += 2, VAR_4++) {
VAR_1->data[0... | [
"static void FUNC_0(CinepakEncContext *VAR_0, AVPicture *VAR_1, int *VAR_2, strip_info *VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7 = VAR_0->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;",
"for(VAR_4 = VAR_6 = 0; VAR_6 < 4; VAR_6 += 2) {",
"for(VAR_5 = 0; VAR_5 < 4; VAR_5 += 2, VAR_4++) {",
"VAR_1->data[0][VAR_5 ... | [
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
20,629 | static const TPMDriverOps *tpm_driver_find_by_type(enum TpmType type)
{
int i;
for (i = 0; i < TPM_MAX_DRIVERS && be_drivers[i] != NULL; i++) {
if (be_drivers[i]->type == type) {
return be_drivers[i];
}
}
return NULL;
}
| true | qemu | a9a72aeefbd3ef8bcbbeeccaf174ee10db2978ac | static const TPMDriverOps *tpm_driver_find_by_type(enum TpmType type)
{
int i;
for (i = 0; i < TPM_MAX_DRIVERS && be_drivers[i] != NULL; i++) {
if (be_drivers[i]->type == type) {
return be_drivers[i];
}
}
return NULL;
}
| {
"code": [
" int i;",
" for (i = 0; i < TPM_MAX_DRIVERS && be_drivers[i] != NULL; i++) {",
" return be_drivers[i];",
" return NULL;",
" int i;",
" for (i = 0; i < TPM_MAX_DRIVERS && be_drivers[i] != NULL; i++) {",
" int i;",
" for (i = 0; i < TPM_MAX_DR... | static const TPMDriverOps *FUNC_0(enum TpmType type)
{
int VAR_0;
for (VAR_0 = 0; VAR_0 < TPM_MAX_DRIVERS && be_drivers[VAR_0] != NULL; VAR_0++) {
if (be_drivers[VAR_0]->type == type) {
return be_drivers[VAR_0];
}
}
return NULL;
}
| [
"static const TPMDriverOps *FUNC_0(enum TpmType type)\n{",
"int VAR_0;",
"for (VAR_0 = 0; VAR_0 < TPM_MAX_DRIVERS && be_drivers[VAR_0] != NULL; VAR_0++) {",
"if (be_drivers[VAR_0]->type == type) {",
"return be_drivers[VAR_0];",
"}",
"}",
"return NULL;",
"}"
] | [
0,
1,
1,
1,
1,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
20,630 | static int fic_decode_block(FICContext *ctx, GetBitContext *gb,
uint8_t *dst, int stride, int16_t *block, int *is_p)
{
int i, num_coeff;
/* Is it a skip block? */
if (get_bits1(gb)) {
*is_p = 1;
return 0;
}
memset(block, 0, sizeof(*block) * 64... | true | FFmpeg | 548459080b1bd698a2e475e5d177b6e7d2538537 | static int fic_decode_block(FICContext *ctx, GetBitContext *gb,
uint8_t *dst, int stride, int16_t *block, int *is_p)
{
int i, num_coeff;
if (get_bits1(gb)) {
*is_p = 1;
return 0;
}
memset(block, 0, sizeof(*block) * 64);
num_coeff = get... | {
"code": [
" for (i = 0; i < num_coeff; i++)",
" block[ff_zigzag_direct[i]] = get_se_golomb(gb) *"
],
"line_no": [
35,
37
]
} | static int FUNC_0(FICContext *VAR_0, GetBitContext *VAR_1,
uint8_t *VAR_2, int VAR_3, int16_t *VAR_4, int *VAR_5)
{
int VAR_6, VAR_7;
if (get_bits1(VAR_1)) {
*VAR_5 = 1;
return 0;
}
memset(VAR_4, 0, sizeof(*VAR_4) * 64);
VAR_7 = get_bi... | [
"static int FUNC_0(FICContext *VAR_0, GetBitContext *VAR_1,\nuint8_t *VAR_2, int VAR_3, int16_t *VAR_4, int *VAR_5)\n{",
"int VAR_6, VAR_7;",
"if (get_bits1(VAR_1)) {",
"*VAR_5 = 1;",
"return 0;",
"}",
"memset(VAR_4, 0, sizeof(*VAR_4) * 64);",
"VAR_7 = get_bits(VAR_1, 7);",
"if (VAR_7 > 64)\nreturn ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29,
31
],
[
35
],
[
37,
39
],
[
43
],
[
47
],
[
49
]
] |
20,632 | static inline void RENAME(yuv2yuv1)(int16_t *lumSrc, int16_t *chrSrc,
uint8_t *dest, uint8_t *uDest, uint8_t *vDest, long dstW, long chrDstW)
{
#ifdef HAVE_MMX
if(uDest != NULL)
{
asm volatile(
YSCALEYUV2YV121
:: "r" (chrSrc + chrDstW), "r" (uDest + chrDstW),
"g" (-chrDstW)
: "%"RE... | true | FFmpeg | 2da0d70d5eebe42f9fcd27ee554419ebe2a5da06 | static inline void RENAME(yuv2yuv1)(int16_t *lumSrc, int16_t *chrSrc,
uint8_t *dest, uint8_t *uDest, uint8_t *vDest, long dstW, long chrDstW)
{
#ifdef HAVE_MMX
if(uDest != NULL)
{
asm volatile(
YSCALEYUV2YV121
:: "r" (chrSrc + chrDstW), "r" (uDest + chrDstW),
"g" (-chrDstW)
: "%"RE... | {
"code": [
"\t\t\t\t uint8_t *dest, uint8_t *uDest, uint8_t *vDest, long dstW, long chrDstW)",
"\t\t\t\t uint8_t *dest, uint8_t *uDest, uint8_t *vDest, long dstW, long chrDstW)",
"\tif(uDest != NULL)",
"\t\tasm volatile(",
"\t\t\t\tYSCALEYUV2YV121",
"\t\t\t\t:: \"r\" (chrSrc + chrDstW),... | static inline void FUNC_0(yuv2yuv1)(int16_t *lumSrc, int16_t *chrSrc,
uint8_t *dest, uint8_t *uDest, uint8_t *vDest, long dstW, long chrDstW)
{
#ifdef HAVE_MMX
if(uDest != NULL)
{
asm volatile(
YSCALEYUV2YV121
:: "r" (chrSrc + chrDstW), "r" (uDest + chrDstW),
"g" (-chrDstW)
: "%"RE... | [
"static inline void FUNC_0(yuv2yuv1)(int16_t *lumSrc, int16_t *chrSrc,\nuint8_t *dest, uint8_t *uDest, uint8_t *vDest, long dstW, long chrDstW)\n{",
"#ifdef HAVE_MMX\nif(uDest != NULL)\n{",
"asm volatile(\nYSCALEYUV2YV121\n:: \"r\" (chrSrc + chrDstW), \"r\" (uDest + chrDstW),\n\"g\" (-chrDstW)\n: \"%\"REG_a\n);... | [
1,
1,
1,
1,
0,
1,
1,
1,
0,
1,
1,
1,
1,
0,
1,
0,
1,
0,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
0,
1
] | [
[
1,
3,
5
],
[
7,
9,
11
],
[
13,
15,
17,
19,
21,
23
],
[
27,
29,
31,
33,
35,
37
],
[
39
],
[
43,
45,
47,
49,
51,
53
],
[
55,
57
],
[
59
],
[
61
],
[
63
],
[... |
20,633 | static int xan_decode_frame_type0(AVCodecContext *avctx)
{
XanContext *s = avctx->priv_data;
uint8_t *ybuf, *prev_buf, *src = s->scratch_buffer;
unsigned chroma_off, corr_off;
int cur, last;
int i, j;
int ret;
chroma_off = bytestream2_get_le32(&s->gb);
corr_off = bytestream... | true | FFmpeg | 8a49d2bcbe7573bb4b765728b2578fac0d19763f | static int xan_decode_frame_type0(AVCodecContext *avctx)
{
XanContext *s = avctx->priv_data;
uint8_t *ybuf, *prev_buf, *src = s->scratch_buffer;
unsigned chroma_off, corr_off;
int cur, last;
int i, j;
int ret;
chroma_off = bytestream2_get_le32(&s->gb);
corr_off = bytestream... | {
"code": [
" dec_size = xan_unpack(s, s->scratch_buffer, s->buffer_size);"
],
"line_no": [
115
]
} | static int FUNC_0(AVCodecContext *VAR_0)
{
XanContext *s = VAR_0->priv_data;
uint8_t *ybuf, *prev_buf, *src = s->scratch_buffer;
unsigned VAR_1, VAR_2;
int VAR_3, VAR_4;
int VAR_5, VAR_6;
int VAR_7;
VAR_1 = bytestream2_get_le32(&s->gb);
VAR_2 = bytestream2_get_le32(&s->gb);... | [
"static int FUNC_0(AVCodecContext *VAR_0)\n{",
"XanContext *s = VAR_0->priv_data;",
"uint8_t *ybuf, *prev_buf, *src = s->scratch_buffer;",
"unsigned VAR_1, VAR_2;",
"int VAR_3, VAR_4;",
"int VAR_5, VAR_6;",
"int VAR_7;",
"VAR_1 = bytestream2_get_le32(&s->gb);",
"VAR_2 = bytestream2_get_le32(&s->g... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25,
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
20,634 | static int raw_pread(BlockDriverState *bs, int64_t offset,
uint8_t *buf, int count)
{
BDRVRawState *s = bs->opaque;
int size, ret, shift, sum;
sum = 0;
if (s->aligned_buf != NULL) {
if (offset & 0x1ff) {
/* align offset on a 512 bytes boundary */
... | true | qemu | 053965c7ff5b260672719884e644ce4117d01995 | static int raw_pread(BlockDriverState *bs, int64_t offset,
uint8_t *buf, int count)
{
BDRVRawState *s = bs->opaque;
int size, ret, shift, sum;
sum = 0;
if (s->aligned_buf != NULL) {
if (offset & 0x1ff) {
shift = offset & 0x1ff;
... | {
"code": [
" if (ret < 0)"
],
"line_no": [
91
]
} | static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,
uint8_t *VAR_2, int VAR_3)
{
BDRVRawState *s = VAR_0->opaque;
int VAR_4, VAR_5, VAR_6, VAR_7;
VAR_7 = 0;
if (s->aligned_buf != NULL) {
if (VAR_1 & 0x1ff) {
VAR_6 = VAR_1 & 0x... | [
"static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,\nuint8_t *VAR_2, int VAR_3)\n{",
"BDRVRawState *s = VAR_0->opaque;",
"int VAR_4, VAR_5, VAR_6, VAR_7;",
"VAR_7 = 0;",
"if (s->aligned_buf != NULL) {",
"if (VAR_1 & 0x1ff) {",
"VAR_6 = VAR_1 & 0x1ff;",
"VAR_4 = (VAR_6 + VAR_3 + 0x1ff) & ~0x1ff... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
21
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37,
39
],
[
43
],
[
45,
47
],
[
49
],
[
53
],
[
55
],
[
57
],
[
59
... |
20,635 | static av_always_inline int normal_limit(uint8_t *p, ptrdiff_t stride,
int E, int I)
{
LOAD_PIXELS
return simple_limit(p, stride, E) &&
FFABS(p3 - p2) <= I &&
FFABS(p2 - p1) <= I &&
FFABS(p1 - p0) <= I &&
FFABS(q3 - q2)... | true | FFmpeg | ac4b32df71bd932838043a4838b86d11e169707f | static av_always_inline int normal_limit(uint8_t *p, ptrdiff_t stride,
int E, int I)
{
LOAD_PIXELS
return simple_limit(p, stride, E) &&
FFABS(p3 - p2) <= I &&
FFABS(p2 - p1) <= I &&
FFABS(p1 - p0) <= I &&
FFABS(q3 - q2)... | {
"code": [
"static av_always_inline int normal_limit(uint8_t *p, ptrdiff_t stride,",
" int E, int I)",
" LOAD_PIXELS",
" return simple_limit(p, stride, E) &&",
" FFABS(p3 - p2) <= I &&",
" FFABS(p2 - p1) <= I &&",
" ... | static av_always_inline int FUNC_0(uint8_t *p, ptrdiff_t stride,
int E, int I)
{
LOAD_PIXELS
return simple_limit(p, stride, E) &&
FFABS(p3 - p2) <= I &&
FFABS(p2 - p1) <= I &&
FFABS(p1 - p0) <= I &&
FFABS(q3 - q2) <= I ... | [
"static av_always_inline int FUNC_0(uint8_t *p, ptrdiff_t stride,\nint E, int I)\n{",
"LOAD_PIXELS\nreturn simple_limit(p, stride, E) &&\nFFABS(p3 - p2) <= I &&\nFFABS(p2 - p1) <= I &&\nFFABS(p1 - p0) <= I &&\nFFABS(q3 - q2) <= I &&\nFFABS(q2 - q1) <= I &&\nFFABS(q1 - q0) <= I;",
"}"
] | [
1,
1,
0
] | [
[
1,
3,
5
],
[
7,
9,
11,
13,
15,
17,
19,
21
],
[
23
]
] |
20,636 | static int cmv_process_header(CmvContext *s, const uint8_t *buf, const uint8_t *buf_end)
{
int pal_start, pal_count, i, ret;
if(buf_end - buf < 16) {
av_log(s->avctx, AV_LOG_WARNING, "truncated header\n");
return AVERROR_INVALIDDATA;
}
s->width = AV_RL16(&buf[4]);
s->hei... | false | FFmpeg | 24057c83207d6ea8bfd824155ac37be8a33dfd0c | static int cmv_process_header(CmvContext *s, const uint8_t *buf, const uint8_t *buf_end)
{
int pal_start, pal_count, i, ret;
if(buf_end - buf < 16) {
av_log(s->avctx, AV_LOG_WARNING, "truncated header\n");
return AVERROR_INVALIDDATA;
}
s->width = AV_RL16(&buf[4]);
s->hei... | {
"code": [],
"line_no": []
} | static int FUNC_0(CmvContext *VAR_0, const uint8_t *VAR_1, const uint8_t *VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6;
if(VAR_2 - VAR_1 < 16) {
av_log(VAR_0->avctx, AV_LOG_WARNING, "truncated header\n");
return AVERROR_INVALIDDATA;
}
VAR_0->width = AV_RL16(&VAR_1[4]);
VAR_0-... | [
"static int FUNC_0(CmvContext *VAR_0, const uint8_t *VAR_1, const uint8_t *VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"if(VAR_2 - VAR_1 < 16) {",
"av_log(VAR_0->avctx, AV_LOG_WARNING, \"truncated header\\n\");",
"return AVERROR_INVALIDDATA;",
"}",
"VAR_0->width = AV_RL16(&VAR_1[4]);",
"VAR_0->hei... | [
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
],
[
25
],
[
27,
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
... |
20,637 | void avformat_free_context(AVFormatContext *s)
{
int i;
if (!s)
return;
av_opt_free(s);
if (s->iformat && s->iformat->priv_class && s->priv_data)
av_opt_free(s->priv_data);
if (s->oformat && s->oformat->priv_class && s->priv_data)
av_opt_free(s->priv_data);
... | true | FFmpeg | 609d5db8035c868be034892a33762779a40ab8b9 | void avformat_free_context(AVFormatContext *s)
{
int i;
if (!s)
return;
av_opt_free(s);
if (s->iformat && s->iformat->priv_class && s->priv_data)
av_opt_free(s->priv_data);
if (s->oformat && s->oformat->priv_class && s->priv_data)
av_opt_free(s->priv_data);
... | {
"code": [],
"line_no": []
} | void FUNC_0(AVFormatContext *VAR_0)
{
int VAR_1;
if (!VAR_0)
return;
av_opt_free(VAR_0);
if (VAR_0->iformat && VAR_0->iformat->priv_class && VAR_0->priv_data)
av_opt_free(VAR_0->priv_data);
if (VAR_0->oformat && VAR_0->oformat->priv_class && VAR_0->priv_data)
av_... | [
"void FUNC_0(AVFormatContext *VAR_0)\n{",
"int VAR_1;",
"if (!VAR_0)\nreturn;",
"av_opt_free(VAR_0);",
"if (VAR_0->iformat && VAR_0->iformat->priv_class && VAR_0->priv_data)\nav_opt_free(VAR_0->priv_data);",
"if (VAR_0->oformat && VAR_0->oformat->priv_class && VAR_0->priv_data)\nav_opt_free(VAR_0->priv_da... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
17,
19
],
[
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
... |
20,639 | static void get_sdr(IPMIBmcSim *ibs,
uint8_t *cmd, unsigned int cmd_len,
uint8_t *rsp, unsigned int *rsp_len,
unsigned int max_rsp_len)
{
unsigned int pos;
uint16_t nextrec;
struct ipmi_sdr_header *sdrh;
IPMI_CHECK_CMD_LEN(8);
if... | true | qemu | 4f298a4b2957b7833bc607c951ca27c458d98d88 | static void get_sdr(IPMIBmcSim *ibs,
uint8_t *cmd, unsigned int cmd_len,
uint8_t *rsp, unsigned int *rsp_len,
unsigned int max_rsp_len)
{
unsigned int pos;
uint16_t nextrec;
struct ipmi_sdr_header *sdrh;
IPMI_CHECK_CMD_LEN(8);
if... | {
"code": [
" IPMI_CHECK_CMD_LEN(8);",
" IPMI_CHECK_CMD_LEN(8);",
" IPMI_CHECK_CMD_LEN(8);",
" IPMI_CHECK_CMD_LEN(8);",
" IPMI_CHECK_CMD_LEN(8);"
],
"line_no": [
19,
19,
19,
19,
19
]
} | static void FUNC_0(IPMIBmcSim *VAR_0,
uint8_t *VAR_1, unsigned int VAR_2,
uint8_t *VAR_3, unsigned int *VAR_4,
unsigned int VAR_5)
{
unsigned int VAR_6;
uint16_t nextrec;
struct ipmi_sdr_header *VAR_7;
IPMI_CHECK_CMD_LEN(8);
if (... | [
"static void FUNC_0(IPMIBmcSim *VAR_0,\nuint8_t *VAR_1, unsigned int VAR_2,\nuint8_t *VAR_3, unsigned int *VAR_4,\nunsigned int VAR_5)\n{",
"unsigned int VAR_6;",
"uint16_t nextrec;",
"struct ipmi_sdr_header *VAR_7;",
"IPMI_CHECK_CMD_LEN(8);",
"if (VAR_1[6]) {",
"IPMI_CHECK_RESERVATION(2, VAR_0->sdr.res... | [
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
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
... |
20,640 | static float get_band_cost_NONE_mips(struct AACEncContext *s,
PutBitContext *pb, const float *in,
const float *scaled, int size, int scale_idx,
int cb, const float lambda, const float uplim,
... | true | FFmpeg | 01ecb7172b684f1c4b3e748f95c5a9a494ca36ec | static float get_band_cost_NONE_mips(struct AACEncContext *s,
PutBitContext *pb, const float *in,
const float *scaled, int size, int scale_idx,
int cb, const float lambda, const float uplim,
... | {
"code": [
" int *bits)",
" int *bits)"
],
"line_no": [
9,
9
]
} | static float FUNC_0(struct AACEncContext *VAR_0,
PutBitContext *VAR_1, const float *VAR_2,
const float *VAR_3, int VAR_4, int VAR_5,
int VAR_6, const float VAR_7, const float VAR_8,
... | [
"static float FUNC_0(struct AACEncContext *VAR_0,\nPutBitContext *VAR_1, const float *VAR_2,\nconst float *VAR_3, int VAR_4, int VAR_5,\nint VAR_6, const float VAR_7, const float VAR_8,\nint *VAR_9)\n{",
"av_assert0(0);",
"return 0;",
"}"
] | [
1,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
17
]
] |
20,641 | static int kvm_physical_sync_dirty_bitmap(MemoryRegionSection *section)
{
KVMState *s = kvm_state;
unsigned long size, allocated_size = 0;
KVMDirtyLog d;
KVMSlot *mem;
int ret = 0;
hwaddr start_addr = section->offset_within_address_space;
hwaddr end_addr = start_addr + int128_get64(s... | true | qemu | b533f658a98325d0e47b36113bd9f5bcc046fdae | static int kvm_physical_sync_dirty_bitmap(MemoryRegionSection *section)
{
KVMState *s = kvm_state;
unsigned long size, allocated_size = 0;
KVMDirtyLog d;
KVMSlot *mem;
int ret = 0;
hwaddr start_addr = section->offset_within_address_space;
hwaddr end_addr = start_addr + int128_get64(s... | {
"code": [
" if (kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d) == -1) {"
],
"line_no": [
83
]
} | static int FUNC_0(MemoryRegionSection *VAR_0)
{
KVMState *s = kvm_state;
unsigned long VAR_1, VAR_2 = 0;
KVMDirtyLog d;
KVMSlot *mem;
int VAR_3 = 0;
hwaddr start_addr = VAR_0->offset_within_address_space;
hwaddr end_addr = start_addr + int128_get64(VAR_0->VAR_1);
d.dirty_bitma... | [
"static int FUNC_0(MemoryRegionSection *VAR_0)\n{",
"KVMState *s = kvm_state;",
"unsigned long VAR_1, VAR_2 = 0;",
"KVMDirtyLog d;",
"KVMSlot *mem;",
"int VAR_3 = 0;",
"hwaddr start_addr = VAR_0->offset_within_address_space;",
"hwaddr end_addr = start_addr + int128_get64(VAR_0->VAR_1);",
"d.dirty_bi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
59,
61
],
[
63
],
[
65
],
[
67
],
[
69
],
[... |
20,645 | av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id,
const int bit_depth,
const int chroma_format_idc)
{
#undef FUNC
#undef FUNCC
#define FUNC(a, depth) a ## _ ## depth
#define FUNCC(a, depth) a ## _ ## depth ## _c
#define FUNCD(a) a ## _... | true | FFmpeg | ac4b32df71bd932838043a4838b86d11e169707f | av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id,
const int bit_depth,
const int chroma_format_idc)
{
#undef FUNC
#undef FUNCC
#define FUNC(a, depth) a ## _ ## depth
#define FUNCC(a, depth) a ## _ ## depth ## _c
#define FUNCD(a) a ## _... | {
"code": [
" if(codec_id == AV_CODEC_ID_VP8) {\\",
" if (codec_id == AV_CODEC_ID_VP8) {\\",
" if(codec_id != AV_CODEC_ID_VP8) {\\",
" h->pred4x4[DC_128_PRED ]= FUNCC(pred4x4_128_dc , depth);\\",
" if (codec_id != AV_CODEC_ID_VP8) {\\",
" if... | av_cold void FUNC_0(H264PredContext *h, int codec_id,
const int bit_depth,
const int chroma_format_idc)
{
#undef FUNC
#undef FUNCC
#define FUNC(a, depth) a ## _ ## depth
#define FUNCC(a, depth) a ## _ ## depth ## _c
#define FUNCD(a) a ## _c
#defin... | [
"av_cold void FUNC_0(H264PredContext *h, int codec_id,\nconst int bit_depth,\nconst int chroma_format_idc)\n{",
"#undef FUNC\n#undef FUNCC\n#define FUNC(a, depth) a ## _ ## depth\n#define FUNCC(a, depth) a ## _ ## depth ## _c\n#define FUNCD(a) a ## _c\n#define H264_PRED(depth) \\\nif(codec_id != AV_CODEC_ID_RV40)... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
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... | [
[
1,
3,
5,
7
],
[
9,
11,
13,
15,
17,
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45,
47
],
[
49
],
[
51
],
[
53
... |
20,646 | sigterm_handler(int sig)
{
received_sigterm = sig;
received_nb_signals++;
term_exit_sigsafe();
if(received_nb_signals > 3)
exit_program(123);
}
| true | FFmpeg | 9dca02ee541120de2a96c387faed9a4e033a60fd | sigterm_handler(int sig)
{
received_sigterm = sig;
received_nb_signals++;
term_exit_sigsafe();
if(received_nb_signals > 3)
exit_program(123);
}
| {
"code": [
" exit_program(123);"
],
"line_no": [
13
]
} | FUNC_0(int VAR_0)
{
received_sigterm = VAR_0;
received_nb_signals++;
term_exit_sigsafe();
if(received_nb_signals > 3)
exit_program(123);
}
| [
"FUNC_0(int VAR_0)\n{",
"received_sigterm = VAR_0;",
"received_nb_signals++;",
"term_exit_sigsafe();",
"if(received_nb_signals > 3)\nexit_program(123);",
"}"
] | [
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
]
] |
20,648 | static void pci_idx(void)
{
QVirtioPCIDevice *dev;
QPCIBus *bus;
QVirtQueuePCI *vqpci;
QGuestAllocator *alloc;
QVirtioBlkReq req;
void *addr;
uint64_t req_addr;
uint64_t capacity;
uint32_t features;
uint32_t free_head;
uint8_t status;
char *data;
bus =... | true | qemu | f1d3b99154138741161fc52f5a8c373bf71613c6 | static void pci_idx(void)
{
QVirtioPCIDevice *dev;
QPCIBus *bus;
QVirtQueuePCI *vqpci;
QGuestAllocator *alloc;
QVirtioBlkReq req;
void *addr;
uint64_t req_addr;
uint64_t capacity;
uint32_t features;
uint32_t free_head;
uint8_t status;
char *data;
bus =... | {
"code": [
" guest_free(alloc, vqpci->vq.desc);",
" guest_free(alloc, vqpci->vq.desc);",
" guest_free(alloc, vqpci->vq.desc);",
" guest_free(alloc, vqpci->vq.desc);"
],
"line_no": [
237,
237,
237,
237
]
} | static void FUNC_0(void)
{
QVirtioPCIDevice *dev;
QPCIBus *bus;
QVirtQueuePCI *vqpci;
QGuestAllocator *alloc;
QVirtioBlkReq req;
void *VAR_0;
uint64_t req_addr;
uint64_t capacity;
uint32_t features;
uint32_t free_head;
uint8_t status;
char *VAR_1;
bus ... | [
"static void FUNC_0(void)\n{",
"QVirtioPCIDevice *dev;",
"QPCIBus *bus;",
"QVirtQueuePCI *vqpci;",
"QGuestAllocator *alloc;",
"QVirtioBlkReq req;",
"void *VAR_0;",
"uint64_t req_addr;",
"uint64_t capacity;",
"uint32_t features;",
"uint32_t free_head;",
"uint8_t status;",
"char *VAR_1;",
"b... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
49
],
[
53,... |
20,649 | static void ref405ep_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->initrd_filename;
char *filename;
ppc4xx_bd_info_... | true | qemu | f8ed85ac992c48814d916d5df4d44f9a971c5de4 | static void ref405ep_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->initrd_filename;
char *filename;
ppc4xx_bd_info_... | {
"code": [
" &error_abort);",
" &error_abort);",
" &error_abort);",
" memory_region_init_ram(sram, NULL, \"ef405ep.sram\", sram_size, &error_abort);",
" &error_abort);",
... | static void FUNC_0(MachineState *VAR_0)
{
ram_addr_t ram_size = VAR_0->ram_size;
const char *VAR_1 = VAR_0->VAR_1;
const char *VAR_2 = VAR_0->VAR_2;
const char *VAR_3 = VAR_0->VAR_3;
char *VAR_4;
ppc4xx_bd_info_t bd;
CPUPPCState *env;
qemu_irq *pic;
MemoryRegion *bios;
... | [
"static void FUNC_0(MachineState *VAR_0)\n{",
"ram_addr_t ram_size = VAR_0->ram_size;",
"const char *VAR_1 = VAR_0->VAR_1;",
"const char *VAR_2 = VAR_0->VAR_2;",
"const char *VAR_3 = VAR_0->VAR_3;",
"char *VAR_4;",
"ppc4xx_bd_info_t bd;",
"CPUPPCState *env;",
"qemu_irq *pic;",
"MemoryRegion *bios;... | [
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
39
],
[
41
],
[
43
],
[
45
... |
20,650 | int bdrv_check(BlockDriverState *bs)
{
if (bs->drv->bdrv_check == NULL) {
return -ENOTSUP;
}
return bs->drv->bdrv_check(bs);
}
| true | qemu | e076f3383b08a563d76c8beb9a716788a3987df9 | int bdrv_check(BlockDriverState *bs)
{
if (bs->drv->bdrv_check == NULL) {
return -ENOTSUP;
}
return bs->drv->bdrv_check(bs);
}
| {
"code": [
"int bdrv_check(BlockDriverState *bs)",
" return bs->drv->bdrv_check(bs);"
],
"line_no": [
1,
13
]
} | int FUNC_0(BlockDriverState *VAR_0)
{
if (VAR_0->drv->FUNC_0 == NULL) {
return -ENOTSUP;
}
return VAR_0->drv->FUNC_0(VAR_0);
}
| [
"int FUNC_0(BlockDriverState *VAR_0)\n{",
"if (VAR_0->drv->FUNC_0 == NULL) {",
"return -ENOTSUP;",
"}",
"return VAR_0->drv->FUNC_0(VAR_0);",
"}"
] | [
1,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
]
] |
20,651 | static always_inline void gen_op_arith_add(DisasContext *ctx, TCGv ret, TCGv arg1, TCGv arg2,
int add_ca, int compute_ca, int compute_ov)
{
TCGv t0, t1;
if ((!compute_ca && !compute_ov) ||
(!TCGV_EQUAL(ret,arg1) && !TCGV_EQUAL(ret, arg2))) {
t0... | true | qemu | d2e9fd8f703203c2eeeed120b1ef6c3a6574e0ab | static always_inline void gen_op_arith_add(DisasContext *ctx, TCGv ret, TCGv arg1, TCGv arg2,
int add_ca, int compute_ca, int compute_ov)
{
TCGv t0, t1;
if ((!compute_ca && !compute_ov) ||
(!TCGV_EQUAL(ret,arg1) && !TCGV_EQUAL(ret, arg2))) {
t0... | {
"code": [],
"line_no": []
} | static always_inline void FUNC_0(DisasContext *ctx, TCGv ret, TCGv arg1, TCGv arg2,
int add_ca, int compute_ca, int compute_ov)
{
TCGv t0, t1;
if ((!compute_ca && !compute_ov) ||
(!TCGV_EQUAL(ret,arg1) && !TCGV_EQUAL(ret, arg2))) {
t0 = ret;
... | [
"static always_inline void FUNC_0(DisasContext *ctx, TCGv ret, TCGv arg1, TCGv arg2,\nint add_ca, int compute_ca, int compute_ov)\n{",
"TCGv t0, t1;",
"if ((!compute_ca && !compute_ov) ||\n(!TCGV_EQUAL(ret,arg1) && !TCGV_EQUAL(ret, arg2))) {",
"t0 = ret;",
"t0 = tcg_temp_local_new();",
"}",
"if (add_ca... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
18
],
[
20
],
[
24
],
[
26
],
[
28
],
[
30
],
[
34
],
[
38
],
[
42
],
[
44
],
[
48
],
[
50
],
[
54
],
[
56
],
[
60... |
20,652 | static void test_i440fx_pam(gconstpointer opaque)
{
const TestData *s = opaque;
QPCIBus *bus;
QPCIDevice *dev;
int i;
static struct {
uint32_t start;
uint32_t end;
} pam_area[] = {
{ 0, 0 }, /* Reserved */
{ 0xF0000, 0xFFFFF }, /* BIOS Area */
... | true | qemu | 1bab33ab4ab4702f53012551cad333beb270f30d | static void test_i440fx_pam(gconstpointer opaque)
{
const TestData *s = opaque;
QPCIBus *bus;
QPCIDevice *dev;
int i;
static struct {
uint32_t start;
uint32_t end;
} pam_area[] = {
{ 0, 0 },
{ 0xF0000, 0xFFFFF },
{ 0xC0000, 0xC3FFF },
... | {
"code": [],
"line_no": []
} | static void FUNC_0(gconstpointer VAR_0)
{
const TestData *VAR_1 = VAR_0;
QPCIBus *bus;
QPCIDevice *dev;
int VAR_2;
static struct {
uint32_t start;
uint32_t end;
} VAR_3[] = {
{ 0, 0 },
{ 0xF0000, 0xFFFFF },
{ 0xC0000, 0xC3FFF },
{ 0x... | [
"static void FUNC_0(gconstpointer VAR_0)\n{",
"const TestData *VAR_1 = VAR_0;",
"QPCIBus *bus;",
"QPCIDevice *dev;",
"int VAR_2;",
"static struct {",
"uint32_t start;",
"uint32_t end;",
"} VAR_3[] = {",
"{ 0, 0 },",
"{ 0xF0000, 0xFFFFF },",
"{ 0xC0000, 0xC3FFF },",
"{ 0xC4000, 0xC7FFF },",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],... |
20,653 | static uint64_t alloc_cluster_offset(BlockDriverState *bs,
uint64_t offset,
int n_start, int n_end,
int *num)
{
BDRVQcowState *s = bs->opaque;
int l2_index, ret;
uint64_t l2_offset, *l2_tabl... | true | qemu | e976c6a1e40ad74d616a186d3b48b0ad8f5eb970 | static uint64_t alloc_cluster_offset(BlockDriverState *bs,
uint64_t offset,
int n_start, int n_end,
int *num)
{
BDRVQcowState *s = bs->opaque;
int l2_index, ret;
uint64_t l2_offset, *l2_tabl... | {
"code": [
" int *num)",
" int nb_available, nb_clusters, i = 0;",
" uint64_t start_sect;",
" if (nb_clusters > s->l2_size - l2_index)",
" nb_clusters = s->l2_size - l2_index;",
" nb_available = nb_clusters << (s->cluster_bits - 9... | static uint64_t FUNC_0(BlockDriverState *bs,
uint64_t offset,
int n_start, int n_end,
int *num)
{
BDRVQcowState *s = bs->opaque;
int VAR_0, VAR_1;
uint64_t l2_offset, *l2_table, cluster_offs... | [
"static uint64_t FUNC_0(BlockDriverState *bs,\nuint64_t offset,\nint n_start, int n_end,\nint *num)\n{",
"BDRVQcowState *s = bs->opaque;",
"int VAR_0, VAR_1;",
"uint64_t l2_offset, *l2_table, cluster_offset;",
"int VAR_2, VAR_3, VAR_4 = 0;",
"uint64_t start_sect;",
"VAR_1 = get_cluster_table(bs, offset,... | [
1,
0,
0,
0,
1,
1,
0,
1,
0,
1,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
0,
0,
1,
1,
1,
1,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
31
],
[
35,
37
],
[
41
],
[
49
],
[
51,
53
],
[
57
],
[
59,
61
],
[
65
],
[... |
20,654 | void bdrv_io_limits_enable(BlockDriverState *bs)
{
assert(!bs->io_limits_enabled);
throttle_init(&bs->throttle_state,
bdrv_get_aio_context(bs),
QEMU_CLOCK_VIRTUAL,
bdrv_throttle_read_timer_cb,
bdrv_throttle_write_timer_cb,
... | true | qemu | de50a20a4cc368d241d67c600f8c0f667186a8b5 | void bdrv_io_limits_enable(BlockDriverState *bs)
{
assert(!bs->io_limits_enabled);
throttle_init(&bs->throttle_state,
bdrv_get_aio_context(bs),
QEMU_CLOCK_VIRTUAL,
bdrv_throttle_read_timer_cb,
bdrv_throttle_write_timer_cb,
... | {
"code": [
" QEMU_CLOCK_VIRTUAL,"
],
"line_no": [
11
]
} | void FUNC_0(BlockDriverState *VAR_0)
{
assert(!VAR_0->io_limits_enabled);
throttle_init(&VAR_0->throttle_state,
bdrv_get_aio_context(VAR_0),
QEMU_CLOCK_VIRTUAL,
bdrv_throttle_read_timer_cb,
bdrv_throttle_write_timer_cb,
... | [
"void FUNC_0(BlockDriverState *VAR_0)\n{",
"assert(!VAR_0->io_limits_enabled);",
"throttle_init(&VAR_0->throttle_state,\nbdrv_get_aio_context(VAR_0),\nQEMU_CLOCK_VIRTUAL,\nbdrv_throttle_read_timer_cb,\nbdrv_throttle_write_timer_cb,\nVAR_0);",
"VAR_0->io_limits_enabled = true;",
"}"
] | [
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9,
11,
13,
15,
17
],
[
19
],
[
21
]
] |
20,655 | static int tta_read_packet(AVFormatContext *s, AVPacket *pkt)
{
TTAContext *c = s->priv_data;
AVStream *st = s->streams[0];
int size, ret;
// FIXME!
if (c->currentframe > c->totalframes)
return -1;
size = st->index_entries[c->currentframe].size;
ret = av_get_packet(s->... | true | FFmpeg | d8b33a99897f1faa8036fbdb6a6d48af9c10730f | static int tta_read_packet(AVFormatContext *s, AVPacket *pkt)
{
TTAContext *c = s->priv_data;
AVStream *st = s->streams[0];
int size, ret;
if (c->currentframe > c->totalframes)
return -1;
size = st->index_entries[c->currentframe].size;
ret = av_get_packet(s->pb, pkt, ... | {
"code": [
" if (c->currentframe > c->totalframes)"
],
"line_no": [
15
]
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
TTAContext *c = VAR_0->priv_data;
AVStream *st = VAR_0->streams[0];
int VAR_2, VAR_3;
if (c->currentframe > c->totalframes)
return -1;
VAR_2 = st->index_entries[c->currentframe].VAR_2;
VAR_3 = av_get_packet(... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"TTAContext *c = VAR_0->priv_data;",
"AVStream *st = VAR_0->streams[0];",
"int VAR_2, VAR_3;",
"if (c->currentframe > c->totalframes)\nreturn -1;",
"VAR_2 = st->index_entries[c->currentframe].VAR_2;",
"VAR_3 = av_get_packet(VAR_0->pb, VAR_... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15,
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
20,656 | static void stream_seek(VideoState *is, int64_t pos, int rel)
{
is->seek_pos = pos;
is->seek_req = 1;
is->seek_flags = rel < 0 ? AVSEEK_FLAG_BACKWARD : 0;
}
| true | FFmpeg | 687fae2b42f247e537afdb5b8d86e991d3fbb2db | static void stream_seek(VideoState *is, int64_t pos, int rel)
{
is->seek_pos = pos;
is->seek_req = 1;
is->seek_flags = rel < 0 ? AVSEEK_FLAG_BACKWARD : 0;
}
| {
"code": [
" is->seek_pos = pos;",
" is->seek_req = 1;",
" is->seek_flags = rel < 0 ? AVSEEK_FLAG_BACKWARD : 0;"
],
"line_no": [
5,
7,
9
]
} | static void FUNC_0(VideoState *VAR_0, int64_t VAR_1, int VAR_2)
{
VAR_0->seek_pos = VAR_1;
VAR_0->seek_req = 1;
VAR_0->seek_flags = VAR_2 < 0 ? AVSEEK_FLAG_BACKWARD : 0;
}
| [
"static void FUNC_0(VideoState *VAR_0, int64_t VAR_1, int VAR_2)\n{",
"VAR_0->seek_pos = VAR_1;",
"VAR_0->seek_req = 1;",
"VAR_0->seek_flags = VAR_2 < 0 ? AVSEEK_FLAG_BACKWARD : 0;",
"}"
] | [
0,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
20,658 | void ram_control_before_iterate(QEMUFile *f, uint64_t flags)
{
int ret = 0;
if (f->ops->before_ram_iterate) {
ret = f->ops->before_ram_iterate(f, f->opaque, flags);
if (ret < 0) {
qemu_file_set_error(f, ret);
}
}
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | void ram_control_before_iterate(QEMUFile *f, uint64_t flags)
{
int ret = 0;
if (f->ops->before_ram_iterate) {
ret = f->ops->before_ram_iterate(f, f->opaque, flags);
if (ret < 0) {
qemu_file_set_error(f, ret);
}
}
}
| {
"code": [],
"line_no": []
} | void FUNC_0(QEMUFile *VAR_0, uint64_t VAR_1)
{
int VAR_2 = 0;
if (VAR_0->ops->before_ram_iterate) {
VAR_2 = VAR_0->ops->before_ram_iterate(VAR_0, VAR_0->opaque, VAR_1);
if (VAR_2 < 0) {
qemu_file_set_error(VAR_0, VAR_2);
}
}
}
| [
"void FUNC_0(QEMUFile *VAR_0, uint64_t VAR_1)\n{",
"int VAR_2 = 0;",
"if (VAR_0->ops->before_ram_iterate) {",
"VAR_2 = VAR_0->ops->before_ram_iterate(VAR_0, VAR_0->opaque, VAR_1);",
"if (VAR_2 < 0) {",
"qemu_file_set_error(VAR_0, VAR_2);",
"}",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
20,660 | static void spapr_tce_reset(DeviceState *dev)
{
sPAPRTCETable *tcet = SPAPR_TCE_TABLE(dev);
size_t table_size = tcet->nb_table * sizeof(uint64_t);
memset(tcet->table, 0, table_size);
}
| true | qemu | 57c0eb1e0d6d8f01550d10cf08747f25cd537777 | static void spapr_tce_reset(DeviceState *dev)
{
sPAPRTCETable *tcet = SPAPR_TCE_TABLE(dev);
size_t table_size = tcet->nb_table * sizeof(uint64_t);
memset(tcet->table, 0, table_size);
}
| {
"code": [
" memset(tcet->table, 0, table_size);"
],
"line_no": [
11
]
} | static void FUNC_0(DeviceState *VAR_0)
{
sPAPRTCETable *tcet = SPAPR_TCE_TABLE(VAR_0);
size_t table_size = tcet->nb_table * sizeof(uint64_t);
memset(tcet->table, 0, table_size);
}
| [
"static void FUNC_0(DeviceState *VAR_0)\n{",
"sPAPRTCETable *tcet = SPAPR_TCE_TABLE(VAR_0);",
"size_t table_size = tcet->nb_table * sizeof(uint64_t);",
"memset(tcet->table, 0, table_size);",
"}"
] | [
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
]
] |
20,661 | static int mjpeg_decode_app(MJpegDecodeContext *s)
{
int len, id, i;
len = get_bits(&s->gb, 16);
if (len < 5)
return AVERROR_INVALIDDATA;
if (8 * len > get_bits_left(&s->gb))
return AVERROR_INVALIDDATA;
id = get_bits_long(&s->gb, 32);
id = av_be2ne32(id);
le... | false | FFmpeg | d885cc41e526284a1534e8c689175fe6ffba60e0 | static int mjpeg_decode_app(MJpegDecodeContext *s)
{
int len, id, i;
len = get_bits(&s->gb, 16);
if (len < 5)
return AVERROR_INVALIDDATA;
if (8 * len > get_bits_left(&s->gb))
return AVERROR_INVALIDDATA;
id = get_bits_long(&s->gb, 32);
id = av_be2ne32(id);
le... | {
"code": [],
"line_no": []
} | static int FUNC_0(MJpegDecodeContext *VAR_0)
{
int VAR_1, VAR_2, VAR_3;
VAR_1 = get_bits(&VAR_0->gb, 16);
if (VAR_1 < 5)
return AVERROR_INVALIDDATA;
if (8 * VAR_1 > get_bits_left(&VAR_0->gb))
return AVERROR_INVALIDDATA;
VAR_2 = get_bits_long(&VAR_0->gb, 32);
VAR_2 ... | [
"static int FUNC_0(MJpegDecodeContext *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3;",
"VAR_1 = get_bits(&VAR_0->gb, 16);",
"if (VAR_1 < 5)\nreturn AVERROR_INVALIDDATA;",
"if (8 * VAR_1 > get_bits_left(&VAR_0->gb))\nreturn AVERROR_INVALIDDATA;",
"VAR_2 = get_bits_long(&VAR_0->gb, 32);",
"VAR_2 = av_be2ne32(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
41
],
[
57
],
[
59
],
[
61
],
[
63,
65
],
[
67
],
[
69
],
[
71
],
[
73... |
20,663 | static int draw_text(AVFilterContext *ctx, AVFilterBufferRef *picref,
int width, int height)
{
DrawTextContext *dtext = ctx->priv;
uint32_t code = 0, prev_code = 0;
int x = 0, y = 0, i = 0, ret;
int text_height;
char *text = dtext->text;
uint8_t *p;
int str_w = ... | false | FFmpeg | 163854bca0e0c1b43831de7463ffa3ff9e6595ca | static int draw_text(AVFilterContext *ctx, AVFilterBufferRef *picref,
int width, int height)
{
DrawTextContext *dtext = ctx->priv;
uint32_t code = 0, prev_code = 0;
int x = 0, y = 0, i = 0, ret;
int text_height;
char *text = dtext->text;
uint8_t *p;
int str_w = ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFilterContext *VAR_0, AVFilterBufferRef *VAR_1,
int VAR_2, int VAR_3)
{
DrawTextContext *dtext = VAR_0->priv;
uint32_t code = 0, prev_code = 0;
int VAR_4 = 0, VAR_5 = 0, VAR_6 = 0, VAR_7;
int VAR_8;
char *VAR_9 = dtext->VAR_9;
uint8_t *p;
int... | [
"static int FUNC_0(AVFilterContext *VAR_0, AVFilterBufferRef *VAR_1,\nint VAR_2, int VAR_3)\n{",
"DrawTextContext *dtext = VAR_0->priv;",
"uint32_t code = 0, prev_code = 0;",
"int VAR_4 = 0, VAR_5 = 0, VAR_6 = 0, VAR_7;",
"int VAR_8;",
"char *VAR_9 = dtext->VAR_9;",
"uint8_t *p;",
"int VAR_10 = 0, VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41,
43
],
[
47
],
[
49
... |
20,664 | void OPPROTO op_subfme_64 (void)
{
T0 = ~T0 + xer_ca - 1;
if (likely((uint64_t)T0 != (uint64_t)-1))
xer_ca = 1;
RETURN();
}
| true | qemu | c3e10c7b4377c1cbc0a4fbc12312c2cf41c0cda7 | void OPPROTO op_subfme_64 (void)
{
T0 = ~T0 + xer_ca - 1;
if (likely((uint64_t)T0 != (uint64_t)-1))
xer_ca = 1;
RETURN();
}
| {
"code": [
" RETURN();",
" RETURN();",
" if (likely((uint64_t)T0 != (uint64_t)-1))",
" RETURN();"
],
"line_no": [
11,
11,
7,
11
]
} | void VAR_0 op_subfme_64 (void)
{
T0 = ~T0 + xer_ca - 1;
if (likely((uint64_t)T0 != (uint64_t)-1))
xer_ca = 1;
RETURN();
}
| [
"void VAR_0 op_subfme_64 (void)\n{",
"T0 = ~T0 + xer_ca - 1;",
"if (likely((uint64_t)T0 != (uint64_t)-1))\nxer_ca = 1;",
"RETURN();",
"}"
] | [
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
]
] |
20,665 | void qmp_block_set_io_throttle(const char *device, int64_t bps, int64_t bps_rd,
int64_t bps_wr, int64_t iops, int64_t iops_rd,
int64_t iops_wr, Error **errp)
{
ThrottleConfig cfg;
BlockDriverState *bs;
bs = bdrv_find(device);
if (!bs... | true | qemu | 3e9fab690d59ac15956c3733fe0794ce1ae4c4af | void qmp_block_set_io_throttle(const char *device, int64_t bps, int64_t bps_rd,
int64_t bps_wr, int64_t iops, int64_t iops_rd,
int64_t iops_wr, Error **errp)
{
ThrottleConfig cfg;
BlockDriverState *bs;
bs = bdrv_find(device);
if (!bs... | {
"code": [
" cfg.buckets[THROTTLE_BPS_TOTAL].max = 0;",
" cfg.buckets[THROTTLE_BPS_READ].max = 0;",
" cfg.buckets[THROTTLE_BPS_WRITE].max = 0;",
" cfg.buckets[THROTTLE_OPS_TOTAL].max = 0;",
" cfg.buckets[THROTTLE_OPS_READ].max = 0;",
" cfg.buckets[THROTTLE_OPS_WRITE].max =... | void FUNC_0(const char *VAR_0, int64_t VAR_1, int64_t VAR_2,
int64_t VAR_3, int64_t VAR_4, int64_t VAR_5,
int64_t VAR_6, Error **VAR_7)
{
ThrottleConfig cfg;
BlockDriverState *bs;
bs = bdrv_find(VAR_0);
if (!bs) {
error_set(... | [
"void FUNC_0(const char *VAR_0, int64_t VAR_1, int64_t VAR_2,\nint64_t VAR_3, int64_t VAR_4, int64_t VAR_5,\nint64_t VAR_6, Error **VAR_7)\n{",
"ThrottleConfig cfg;",
"BlockDriverState *bs;",
"bs = bdrv_find(VAR_0);",
"if (!bs) {",
"error_set(VAR_7, QERR_DEVICE_NOT_FOUND, VAR_0);",
"return;",
"}",
"... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
... |
20,666 | static inline void dxt3_block_internal(uint8_t *dst, ptrdiff_t stride,
const uint8_t *block)
{
int x, y;
uint32_t colors[4];
uint16_t color0 = AV_RL16(block + 8);
uint16_t color1 = AV_RL16(block + 10);
uint32_t code = AV_RL32(block + 12);
extra... | true | FFmpeg | f225003d17364cd38fd28f268ae2b29abd8e5024 | static inline void dxt3_block_internal(uint8_t *dst, ptrdiff_t stride,
const uint8_t *block)
{
int x, y;
uint32_t colors[4];
uint16_t color0 = AV_RL16(block + 8);
uint16_t color1 = AV_RL16(block + 10);
uint32_t code = AV_RL32(block + 12);
extra... | {
"code": [
" uint32_t pixel = colors[code & 3] | (alpha << 24);"
],
"line_no": [
45
]
} | static inline void FUNC_0(uint8_t *VAR_0, ptrdiff_t VAR_1,
const uint8_t *VAR_2)
{
int VAR_3, VAR_4;
uint32_t colors[4];
uint16_t color0 = AV_RL16(VAR_2 + 8);
uint16_t color1 = AV_RL16(VAR_2 + 10);
uint32_t code = AV_RL32(VAR_2 + 12);
extract_c... | [
"static inline void FUNC_0(uint8_t *VAR_0, ptrdiff_t VAR_1,\nconst uint8_t *VAR_2)\n{",
"int VAR_3, VAR_4;",
"uint32_t colors[4];",
"uint16_t color0 = AV_RL16(VAR_2 + 8);",
"uint16_t color1 = AV_RL16(VAR_2 + 10);",
"uint32_t code = AV_RL32(VAR_2 + 12);",
"extract_color(colors, color0, color1, 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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[... |
20,667 | void tcg_func_start(TCGContext *s)
{
tcg_pool_reset(s);
s->nb_temps = s->nb_globals;
/* No temps have been previously allocated for size or locality. */
memset(s->free_temps, 0, sizeof(s->free_temps));
s->nb_labels = 0;
s->current_frame_offset = s->frame_start;
#ifdef CONFIG_DEBUG... | true | qemu | 15fa08f8451babc88d733bd411d4c94976f9d0f8 | void tcg_func_start(TCGContext *s)
{
tcg_pool_reset(s);
s->nb_temps = s->nb_globals;
memset(s->free_temps, 0, sizeof(s->free_temps));
s->nb_labels = 0;
s->current_frame_offset = s->frame_start;
#ifdef CONFIG_DEBUG_TCG
s->goto_tb_issue_mask = 0;
#endif
s->gen_op_buf[0]... | {
"code": [
"#endif",
" s->gen_op_buf[0].next = 1;",
" s->gen_op_buf[0].prev = 0;",
" s->gen_next_op_idx = 1;"
],
"line_no": [
27,
31,
33,
35
]
} | void FUNC_0(TCGContext *VAR_0)
{
tcg_pool_reset(VAR_0);
VAR_0->nb_temps = VAR_0->nb_globals;
memset(VAR_0->free_temps, 0, sizeof(VAR_0->free_temps));
VAR_0->nb_labels = 0;
VAR_0->current_frame_offset = VAR_0->frame_start;
#ifdef CONFIG_DEBUG_TCG
VAR_0->goto_tb_issue_mask = 0;... | [
"void FUNC_0(TCGContext *VAR_0)\n{",
"tcg_pool_reset(VAR_0);",
"VAR_0->nb_temps = VAR_0->nb_globals;",
"memset(VAR_0->free_temps, 0, sizeof(VAR_0->free_temps));",
"VAR_0->nb_labels = 0;",
"VAR_0->current_frame_offset = VAR_0->frame_start;",
"#ifdef CONFIG_DEBUG_TCG\nVAR_0->goto_tb_issue_mask = 0;",
"#... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
17
],
[
19
],
[
23,
25
],
[
27,
31
],
[
33
],
[
35
],
[
37
]
] |
20,668 | static int find_unused_picture(MpegEncContext *s, int shared)
{
int i;
if (shared) {
for (i = 0; i < MAX_PICTURE_COUNT; i++) {
if (s->picture[i].f.data[0] == NULL)
return i;
}
} else {
for (i = 0; i < MAX_PICTURE_COUNT; i++) {
if (p... | true | FFmpeg | 9e73f6d1f9a242ea0b2fdb3bf22890d2a4422be0 | static int find_unused_picture(MpegEncContext *s, int shared)
{
int i;
if (shared) {
for (i = 0; i < MAX_PICTURE_COUNT; i++) {
if (s->picture[i].f.data[0] == NULL)
return i;
}
} else {
for (i = 0; i < MAX_PICTURE_COUNT; i++) {
if (p... | {
"code": [
" if (s->picture[i].f.data[0] == NULL)"
],
"line_no": [
13
]
} | static int FUNC_0(MpegEncContext *VAR_0, int VAR_1)
{
int VAR_2;
if (VAR_1) {
for (VAR_2 = 0; VAR_2 < MAX_PICTURE_COUNT; VAR_2++) {
if (VAR_0->picture[VAR_2].f.data[0] == NULL)
return VAR_2;
}
} else {
for (VAR_2 = 0; VAR_2 < MAX_PICTURE_COUNT; ... | [
"static int FUNC_0(MpegEncContext *VAR_0, int VAR_1)\n{",
"int VAR_2;",
"if (VAR_1) {",
"for (VAR_2 = 0; VAR_2 < MAX_PICTURE_COUNT; VAR_2++) {",
"if (VAR_0->picture[VAR_2].f.data[0] == NULL)\nreturn VAR_2;",
"}",
"} else {",
"for (VAR_2 = 0; VAR_2 < MAX_PICTURE_COUNT; VAR_2++) {",
"if (pic_is_unused... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
33,
35
],
[
59
],
[
61
],
[
63
]
] |
20,669 | static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *picture, int *got_packet)
{
int xerr, i, ret, user_packet = !!pkt->data;
struct xvid_context *x = avctx->priv_data;
AVFrame *p = avctx->coded_frame;
int mb_width = (avctx->wi... | true | FFmpeg | e00499eb4c80752b2c464f3a98bf0b6ce7b1e212 | static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *picture, int *got_packet)
{
int xerr, i, ret, user_packet = !!pkt->data;
struct xvid_context *x = avctx->priv_data;
AVFrame *p = avctx->coded_frame;
int mb_width = (avctx->wi... | {
"code": [
" if ((ret = ff_alloc_packet2(avctx, pkt, mb_width*mb_height*MAX_MB_BYTES + FF_MIN_BUFFER_SIZE)) < 0)"
],
"line_no": [
27
]
} | static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,
const AVFrame *VAR_2, int *VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7 = !!VAR_1->data;
struct xvid_context *VAR_8 = VAR_0->priv_data;
AVFrame *p = VAR_0->coded_frame;
int VAR_9 = (VAR_0->width + 15) /... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7 = !!VAR_1->data;",
"struct xvid_context *VAR_8 = VAR_0->priv_data;",
"AVFrame *p = VAR_0->coded_frame;",
"int VAR_9 = (VAR_0->width + 15) / 16;",
"int VAR_10 = (... | [
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
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27,
29
],
[
35
],
[
37
],
[
43
],
[
45
],
[
51
],
[
53,
55
],
[
57
],
[
59
],
[... |
20,671 | static void fdctrl_write_data (fdctrl_t *fdctrl, uint32_t value)
{
fdrive_t *cur_drv;
int pos;
/* Reset mode */
if (!(fdctrl->dor & FD_DOR_nRESET)) {
FLOPPY_DPRINTF("Floppy controller in RESET state !\n");
return;
}
if (!(fdctrl->msr & FD_MSR_RQM) || (fdctrl->msr & FD_... | true | qemu | b3bc154098f211db7014de151c79b4234ae5029b | static void fdctrl_write_data (fdctrl_t *fdctrl, uint32_t value)
{
fdrive_t *cur_drv;
int pos;
if (!(fdctrl->dor & FD_DOR_nRESET)) {
FLOPPY_DPRINTF("Floppy controller in RESET state !\n");
return;
}
if (!(fdctrl->msr & FD_MSR_RQM) || (fdctrl->msr & FD_MSR_DIO)) {
... | {
"code": [
" fdctrl->fifo[fdctrl->data_pos++] = value;",
" if (fdctrl->data_pos % FD_SECTOR_LEN == (FD_SECTOR_LEN - 1) ||"
],
"line_no": [
37,
39
]
} | static void FUNC_0 (fdctrl_t *VAR_0, uint32_t VAR_1)
{
fdrive_t *cur_drv;
int VAR_2;
if (!(VAR_0->dor & FD_DOR_nRESET)) {
FLOPPY_DPRINTF("Floppy controller in RESET state !\n");
return;
}
if (!(VAR_0->msr & FD_MSR_RQM) || (VAR_0->msr & FD_MSR_DIO)) {
FLOPPY_E... | [
"static void FUNC_0 (fdctrl_t *VAR_0, uint32_t VAR_1)\n{",
"fdrive_t *cur_drv;",
"int VAR_2;",
"if (!(VAR_0->dor & FD_DOR_nRESET)) {",
"FLOPPY_DPRINTF(\"Floppy controller in RESET state !\\n\");",
"return;",
"}",
"if (!(VAR_0->msr & FD_MSR_RQM) || (VAR_0->msr & FD_MSR_DIO)) {",
"FLOPPY_ERROR(\"contr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
... |
20,672 | void ff_avg_h264_qpel16_mc32_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride)
{
avc_luma_midh_qrt_and_aver_dst_16w_msa(src - (2 * stride) - 2,
stride, dst, stride, 16, 1);
}
| false | FFmpeg | 72dbc610be3272ba36603f78a39cc2d2d8fe0cc3 | void ff_avg_h264_qpel16_mc32_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride)
{
avc_luma_midh_qrt_and_aver_dst_16w_msa(src - (2 * stride) - 2,
stride, dst, stride, 16, 1);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1,
ptrdiff_t VAR_2)
{
avc_luma_midh_qrt_and_aver_dst_16w_msa(VAR_1 - (2 * VAR_2) - 2,
VAR_2, VAR_0, VAR_2, 16, 1);
}
| [
"void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1,\nptrdiff_t VAR_2)\n{",
"avc_luma_midh_qrt_and_aver_dst_16w_msa(VAR_1 - (2 * VAR_2) - 2,\nVAR_2, VAR_0, VAR_2, 16, 1);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
11
]
] |
20,673 | static int vhdx_create_new_region_table(BlockDriverState *bs,
uint64_t image_size,
uint32_t block_size,
uint32_t sector_size,
uint32_t log_size,
... | true | qemu | 5839e53bbc0fec56021d758aab7610df421ed8c8 | static int vhdx_create_new_region_table(BlockDriverState *bs,
uint64_t image_size,
uint32_t block_size,
uint32_t sector_size,
uint32_t log_size,
... | {
"code": [
" s = g_malloc0(sizeof(BDRVVHDXState));"
],
"line_no": [
47
]
} | static int FUNC_0(BlockDriverState *VAR_0,
uint64_t VAR_1,
uint32_t VAR_2,
uint32_t VAR_3,
uint32_t VAR_4,
bool VAR... | [
"static int FUNC_0(BlockDriverState *VAR_0,\nuint64_t VAR_1,\nuint32_t VAR_2,\nuint32_t VAR_3,\nuint32_t VAR_4,\nbool VAR_5,\nVHDXImageType VAR_6,\nuint64_t *VAR_7)\n{",
"int VAR_8 = 0;",
"uint32_t offset = 0;",
"void *VAR_9 = NULL;",
"uint64_t bat_file_offset;",
"uint32_t bat_length;",
"BDRVVHDXState *... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13,
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
47
],
[
51,
53
],
[
57
],
[
59
],
[
61
... |
20,674 | iscsi_unmap_cb(struct iscsi_context *iscsi, int status,
void *command_data, void *opaque)
{
IscsiAIOCB *acb = opaque;
if (acb->canceled != 0) {
qemu_aio_release(acb);
scsi_free_scsi_task(acb->task);
acb->task = NULL;
return;
}
acb->statu... | true | qemu | 1bd075f29ea6d11853475c7c42734595720c3ac6 | iscsi_unmap_cb(struct iscsi_context *iscsi, int status,
void *command_data, void *opaque)
{
IscsiAIOCB *acb = opaque;
if (acb->canceled != 0) {
qemu_aio_release(acb);
scsi_free_scsi_task(acb->task);
acb->task = NULL;
return;
}
acb->statu... | {
"code": [
" qemu_aio_release(acb);",
" scsi_free_scsi_task(acb->task);",
" acb->task = NULL;",
" scsi_free_scsi_task(acb->task);",
" acb->task = NULL;",
" qemu_aio_release(acb);",
" scsi_free_scsi_task(acb->task);",
" acb->task = NULL;"... | FUNC_0(struct iscsi_context *VAR_0, int VAR_1,
void *VAR_2, void *VAR_3)
{
IscsiAIOCB *acb = VAR_3;
if (acb->canceled != 0) {
qemu_aio_release(acb);
scsi_free_scsi_task(acb->task);
acb->task = NULL;
return;
}
acb->VAR_1 = 0;
if (VAR... | [
"FUNC_0(struct iscsi_context *VAR_0, int VAR_1,\nvoid *VAR_2, void *VAR_3)\n{",
"IscsiAIOCB *acb = VAR_3;",
"if (acb->canceled != 0) {",
"qemu_aio_release(acb);",
"scsi_free_scsi_task(acb->task);",
"acb->task = NULL;",
"return;",
"}",
"acb->VAR_1 = 0;",
"if (VAR_1 < 0) {",
"error_report(\"Failed... | [
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
20,675 | static void gen_wsr_prid(DisasContext *dc, uint32_t sr, TCGv_i32 v)
{
}
| true | qemu | 53593e90d13264dc88b3281ddf75ceaa641df05a | static void gen_wsr_prid(DisasContext *dc, uint32_t sr, TCGv_i32 v)
{
}
| {
"code": [
"static void gen_wsr_prid(DisasContext *dc, uint32_t sr, TCGv_i32 v)"
],
"line_no": [
1
]
} | static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1, TCGv_i32 VAR_2)
{
}
| [
"static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1, TCGv_i32 VAR_2)\n{",
"}"
] | [
1,
0
] | [
[
1,
3
],
[
5
]
] |
20,677 | int ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number)
{
int time_incr;
int time_div, time_mod;
if (s->pict_type == AV_PICTURE_TYPE_I) {
if (!(s->avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER)) {
if (s->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT) // HACK, ... | true | FFmpeg | f502583663eb2cacfd7f5bb29b39420a970d4fb4 | int ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number)
{
int time_incr;
int time_div, time_mod;
if (s->pict_type == AV_PICTURE_TYPE_I) {
if (!(s->avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER)) {
if (s->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT)
... | {
"code": [
" int time_incr;",
" int time_div, time_mod;",
" av_assert0(time_incr >= 0);",
" av_log(s->avctx, AV_LOG_ERROR, \"time_incr %d too large\\n\", time_incr);"
],
"line_no": [
5,
7,
51,
59
]
} | int FUNC_0(MpegEncContext *VAR_0, int VAR_1)
{
int VAR_2;
int VAR_3, VAR_4;
if (VAR_0->pict_type == AV_PICTURE_TYPE_I) {
if (!(VAR_0->avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER)) {
if (VAR_0->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT)
mpeg4_encode_visua... | [
"int FUNC_0(MpegEncContext *VAR_0, int VAR_1)\n{",
"int VAR_2;",
"int VAR_3, VAR_4;",
"if (VAR_0->pict_type == AV_PICTURE_TYPE_I) {",
"if (!(VAR_0->avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER)) {",
"if (VAR_0->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT)\nmpeg4_encode_visual_object_header(VAR_0);",
... | [
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
... |
20,678 | static int read_quant_table(RangeCoder *c, int16_t *quant_table, int scale){
int v;
int i=0;
uint8_t state[CONTEXT_SIZE];
memset(state, 128, sizeof(state));
for(v=0; i<128 ; v++){
int len= get_symbol(c, state, 0) + 1;
if(len + i > 128) return -1;
while(len--){... | true | FFmpeg | 9ebe6e391071690dbee79a645c51b14bd55c2ff4 | static int read_quant_table(RangeCoder *c, int16_t *quant_table, int scale){
int v;
int i=0;
uint8_t state[CONTEXT_SIZE];
memset(state, 128, sizeof(state));
for(v=0; i<128 ; v++){
int len= get_symbol(c, state, 0) + 1;
if(len + i > 128) return -1;
while(len--){... | {
"code": [
" int len= get_symbol(c, state, 0) + 1;",
" if(len + i > 128) return -1;"
],
"line_no": [
17,
21
]
} | static int FUNC_0(RangeCoder *VAR_0, int16_t *VAR_1, int VAR_2){
int VAR_3;
int VAR_4=0;
uint8_t state[CONTEXT_SIZE];
memset(state, 128, sizeof(state));
for(VAR_3=0; VAR_4<128 ; VAR_3++){
int VAR_5= get_symbol(VAR_0, state, 0) + 1;
if(VAR_5 + VAR_4 > 128) return -1;
... | [
"static int FUNC_0(RangeCoder *VAR_0, int16_t *VAR_1, int VAR_2){",
"int VAR_3;",
"int VAR_4=0;",
"uint8_t state[CONTEXT_SIZE];",
"memset(state, 128, sizeof(state));",
"for(VAR_3=0; VAR_4<128 ; VAR_3++){",
"int VAR_5= get_symbol(VAR_0, state, 0) + 1;",
"if(VAR_5 + VAR_4 > 128) return -1;",
"while(VA... | [
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
]
] |
20,679 | static int parse_read_intervals(const char *intervals_spec)
{
int ret, n, i;
char *p, *spec = av_strdup(intervals_spec);
if (!spec)
return AVERROR(ENOMEM);
/* preparse specification, get number of intervals */
for (n = 0, p = spec; *p; p++)
if (*p == ',')
n++;
... | false | FFmpeg | ddaf33f5bba59f013a4191a4b22ba83c420cce38 | static int parse_read_intervals(const char *intervals_spec)
{
int ret, n, i;
char *p, *spec = av_strdup(intervals_spec);
if (!spec)
return AVERROR(ENOMEM);
for (n = 0, p = spec; *p; p++)
if (*p == ',')
n++;
n++;
read_intervals = av_malloc(n * sizeo... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0)
{
int VAR_1, VAR_2, VAR_3;
char *VAR_4, *VAR_5 = av_strdup(VAR_0);
if (!VAR_5)
return AVERROR(ENOMEM);
for (VAR_2 = 0, VAR_4 = VAR_5; *VAR_4; VAR_4++)
if (*VAR_4 == ',')
VAR_2++;
VAR_2++;
read_intervals = av_mal... | [
"static int FUNC_0(const char *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3;",
"char *VAR_4, *VAR_5 = av_strdup(VAR_0);",
"if (!VAR_5)\nreturn AVERROR(ENOMEM);",
"for (VAR_2 = 0, VAR_4 = VAR_5; *VAR_4; VAR_4++)",
"if (*VAR_4 == ',')\nVAR_2++;",
"VAR_2++;",
"read_intervals = av_malloc(VAR_2 * sizeof(*read_inte... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
17
],
[
19,
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
],
[
49,
51
],
[
55
],
[... |
20,680 | static void piix4_pm_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
k->no_hotplug = 1;
k->init = piix4_pm_initfn;
k->config_write = pm_write_config;
k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = ... | true | qemu | efec3dd631d94160288392721a5f9c39e50fb2bc | static void piix4_pm_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
k->no_hotplug = 1;
k->init = piix4_pm_initfn;
k->config_write = pm_write_config;
k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = ... | {
"code": [
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;"... | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
PCIDeviceClass *k = PCI_DEVICE_CLASS(VAR_0);
k->no_hotplug = 1;
k->init = piix4_pm_initfn;
k->config_write = pm_write_config;
k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = PCI_DEVICE_I... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"PCIDeviceClass *k = PCI_DEVICE_CLASS(VAR_0);",
"k->no_hotplug = 1;",
"k->init = piix4_pm_initfn;",
"k->config_write = pm_write_config;",
"k->vendor_id = PCI_VENDOR_ID_INTEL;",
"k->device_id = PCI_DEVIC... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
20,681 | static void setup_rt_frame_v1(int usig, struct target_sigaction *ka,
target_siginfo_t *info,
target_sigset_t *set, CPUARMState *env)
{
struct rt_sigframe_v1 *frame;
abi_ulong frame_addr = get_sigframe(ka, env, sizeof(*frame));
struct target_sigaltstac... | true | qemu | 0188fadb7fe460d8c4c743372b1f7b25773e183e | static void setup_rt_frame_v1(int usig, struct target_sigaction *ka,
target_siginfo_t *info,
target_sigset_t *set, CPUARMState *env)
{
struct rt_sigframe_v1 *frame;
abi_ulong frame_addr = get_sigframe(ka, env, sizeof(*frame));
struct target_sigaltstac... | {
"code": [
" for(i = 0; i < TARGET_NSIG_WORDS; i++) {",
" if (__put_user(set->sig[i], &frame->uc.tuc_sigmask.sig[i]))",
"\tunlock_user_struct(frame, frame_addr, 1);",
" goto end;",
"end:",
" if (__put_user(set->sig[i], &frame->uc.tuc_sigmask.sig[i])... | static void FUNC_0(int VAR_0, struct target_sigaction *VAR_1,
target_siginfo_t *VAR_2,
target_sigset_t *VAR_3, CPUARMState *VAR_4)
{
struct rt_sigframe_v1 *VAR_5;
abi_ulong frame_addr = get_sigframe(VAR_1, VAR_4, sizeof(*VAR_5));
struct target_sigalts... | [
"static void FUNC_0(int VAR_0, struct target_sigaction *VAR_1,\ntarget_siginfo_t *VAR_2,\ntarget_sigset_t *VAR_3, CPUARMState *VAR_4)\n{",
"struct rt_sigframe_v1 *VAR_5;",
"abi_ulong frame_addr = get_sigframe(VAR_1, VAR_4, sizeof(*VAR_5));",
"struct target_sigaltstack VAR_6;",
"int VAR_7;",
"abi_ulong inf... | [
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,
1,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[... |
20,682 | static int alac_decode_frame(AVCodecContext *avctx,
void *outbuffer, int *outputsize,
AVPacket *avpkt)
{
const uint8_t *inbuffer = avpkt->data;
int input_buffer_size = avpkt->size;
ALACContext *alac = avctx->priv_data;
int channels;
... | false | FFmpeg | 30f3e7b524cc31155db7a1b0057f651312f6341e | static int alac_decode_frame(AVCodecContext *avctx,
void *outbuffer, int *outputsize,
AVPacket *avpkt)
{
const uint8_t *inbuffer = avpkt->data;
int input_buffer_size = avpkt->size;
ALACContext *alac = avctx->priv_data;
int channels;
... | {
"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->data;
int VAR_5 = VAR_3->size;
ALACContext *alac = VAR_0->priv_data;
int VAR_6;
unsigned int VAR_7;
int VAR_8;
... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->data;",
"int VAR_5 = VAR_3->size;",
"ALACContext *alac = VAR_0->priv_data;",
"int VAR_6;",
"unsigned int VAR_7;",
"int VAR_8;",
"unsigned int VAR_9;",
"int VAR_10;",
"uint8_t 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
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
37,
39
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[... |
20,683 | static int do_co_pwrite_zeroes(BlockBackend *blk, int64_t offset,
int64_t count, int flags, int64_t *total)
{
Coroutine *co;
CoWriteZeroes data = {
.blk = blk,
.offset = offset,
.count = count,
.total = total,
.flags = flags,
... | true | qemu | 0b8b8753e4d94901627b3e86431230f2319215c4 | static int do_co_pwrite_zeroes(BlockBackend *blk, int64_t offset,
int64_t count, int flags, int64_t *total)
{
Coroutine *co;
CoWriteZeroes data = {
.blk = blk,
.offset = offset,
.count = count,
.total = total,
.flags = flags,
... | {
"code": [
" qemu_coroutine_enter(co, &data);",
" qemu_coroutine_enter(co, &data);",
" co = qemu_coroutine_create(co_pwrite_zeroes_entry);",
" qemu_coroutine_enter(co, &data);",
" qemu_coroutine_enter(co, &data);"
],
"line_no": [
37,
37,
35,
37,
37
]
} | static int FUNC_0(BlockBackend *VAR_0, int64_t VAR_1,
int64_t VAR_2, int VAR_3, int64_t *VAR_4)
{
Coroutine *co;
CoWriteZeroes data = {
.VAR_0 = VAR_0,
.VAR_1 = VAR_1,
.VAR_2 = VAR_2,
.VAR_4 = VAR_4,
.VAR_3 = VAR_3,
.... | [
"static int FUNC_0(BlockBackend *VAR_0, int64_t VAR_1,\nint64_t VAR_2, int VAR_3, int64_t *VAR_4)\n{",
"Coroutine *co;",
"CoWriteZeroes data = {",
".VAR_0 = VAR_0,\n.VAR_1 = VAR_1,\n.VAR_2 = VAR_2,\n.VAR_4 = VAR_4,\n.VAR_3 = VAR_3,\n.done = false,\n};",
"if (VAR_2 >> BDRV_SECTOR_BITS > INT_MAX) {",
... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11,
13,
15,
17,
19,
21,
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
20,684 | static void idreg_init(target_phys_addr_t addr)
{
DeviceState *dev;
SysBusDevice *s;
dev = qdev_create(NULL, "macio_idreg");
qdev_init(dev);
s = sysbus_from_qdev(dev);
sysbus_mmio_map(s, 0, addr);
cpu_physical_memory_write_rom(addr, idreg_data, sizeof(idreg_data));
}
| true | qemu | e23a1b33b53d25510320b26d9f154e19c6c99725 | static void idreg_init(target_phys_addr_t addr)
{
DeviceState *dev;
SysBusDevice *s;
dev = qdev_create(NULL, "macio_idreg");
qdev_init(dev);
s = sysbus_from_qdev(dev);
sysbus_mmio_map(s, 0, addr);
cpu_physical_memory_write_rom(addr, idreg_data, sizeof(idreg_data));
}
| {
"code": [
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" qdev_init(dev);",
" ... | static void FUNC_0(target_phys_addr_t VAR_0)
{
DeviceState *dev;
SysBusDevice *s;
dev = qdev_create(NULL, "macio_idreg");
qdev_init(dev);
s = sysbus_from_qdev(dev);
sysbus_mmio_map(s, 0, VAR_0);
cpu_physical_memory_write_rom(VAR_0, idreg_data, sizeof(idreg_data));
}
| [
"static void FUNC_0(target_phys_addr_t VAR_0)\n{",
"DeviceState *dev;",
"SysBusDevice *s;",
"dev = qdev_create(NULL, \"macio_idreg\");",
"qdev_init(dev);",
"s = sysbus_from_qdev(dev);",
"sysbus_mmio_map(s, 0, VAR_0);",
"cpu_physical_memory_write_rom(VAR_0, idreg_data, sizeof(idreg_data));",
"}"
] | [
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
]
] |
20,685 | static void fdctrl_start_transfer (fdctrl_t *fdctrl, int direction)
{
fdrive_t *cur_drv;
uint8_t kh, kt, ks;
int did_seek;
fdctrl->cur_drv = fdctrl->fifo[1] & 1;
cur_drv = get_cur_drv(fdctrl);
kt = fdctrl->fifo[2];
kh = fdctrl->fifo[3];
ks = fdctrl->fifo[4];
FLOPPY_DPRINT... | true | qemu | 3bcb80f1af107c25bf8c255f3ca88ac467f27a1a | static void fdctrl_start_transfer (fdctrl_t *fdctrl, int direction)
{
fdrive_t *cur_drv;
uint8_t kh, kt, ks;
int did_seek;
fdctrl->cur_drv = fdctrl->fifo[1] & 1;
cur_drv = get_cur_drv(fdctrl);
kt = fdctrl->fifo[2];
kh = fdctrl->fifo[3];
ks = fdctrl->fifo[4];
FLOPPY_DPRINT... | {
"code": [
" fdctrl->data_len = 128 << fdctrl->fifo[5];"
],
"line_no": [
119
]
} | static void FUNC_0 (fdctrl_t *VAR_0, int VAR_1)
{
fdrive_t *cur_drv;
uint8_t kh, kt, ks;
int VAR_2;
VAR_0->cur_drv = VAR_0->fifo[1] & 1;
cur_drv = get_cur_drv(VAR_0);
kt = VAR_0->fifo[2];
kh = VAR_0->fifo[3];
ks = VAR_0->fifo[4];
FLOPPY_DPRINTF("Start transfer at %d %d %0... | [
"static void FUNC_0 (fdctrl_t *VAR_0, int VAR_1)\n{",
"fdrive_t *cur_drv;",
"uint8_t kh, kt, ks;",
"int VAR_2;",
"VAR_0->cur_drv = VAR_0->fifo[1] & 1;",
"cur_drv = get_cur_drv(VAR_0);",
"kt = VAR_0->fifo[2];",
"kh = VAR_0->fifo[3];",
"ks = VAR_0->fifo[4];",
"FLOPPY_DPRINTF(\"Start transfer at %d %... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25,
27
],
[
29
],
[
31
],
[
33,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
51
... |
20,686 | int qemu_chr_open_msmouse(QemuOpts *opts, CharDriverState **_chr)
{
CharDriverState *chr;
chr = g_malloc0(sizeof(CharDriverState));
chr->chr_write = msmouse_chr_write;
chr->chr_close = msmouse_chr_close;
qemu_add_mouse_event_handler(msmouse_event, chr, 0, "QEMU Microsoft Mouse");
*_... | true | qemu | 1f51470d044852592922f91000e741c381582cdc | int qemu_chr_open_msmouse(QemuOpts *opts, CharDriverState **_chr)
{
CharDriverState *chr;
chr = g_malloc0(sizeof(CharDriverState));
chr->chr_write = msmouse_chr_write;
chr->chr_close = msmouse_chr_close;
qemu_add_mouse_event_handler(msmouse_event, chr, 0, "QEMU Microsoft Mouse");
*_... | {
"code": [
" *_chr = chr;",
" return 0;",
" *_chr = chr;",
" return 0;",
"int qemu_chr_open_msmouse(QemuOpts *opts, CharDriverState **_chr)",
" *_chr = chr;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" *_chr = chr;",
" re... | int FUNC_0(QemuOpts *VAR_0, CharDriverState **VAR_1)
{
CharDriverState *chr;
chr = g_malloc0(sizeof(CharDriverState));
chr->chr_write = msmouse_chr_write;
chr->chr_close = msmouse_chr_close;
qemu_add_mouse_event_handler(msmouse_event, chr, 0, "QEMU Microsoft Mouse");
*VAR_1 = chr;
... | [
"int FUNC_0(QemuOpts *VAR_0, CharDriverState **VAR_1)\n{",
"CharDriverState *chr;",
"chr = g_malloc0(sizeof(CharDriverState));",
"chr->chr_write = msmouse_chr_write;",
"chr->chr_close = msmouse_chr_close;",
"qemu_add_mouse_event_handler(msmouse_event, chr, 0, \"QEMU Microsoft Mouse\");",
"*VAR_1 = chr;"... | [
1,
0,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
]
] |
20,687 | static char *var_read_string(AVIOContext *pb, int size)
{
int n;
char *str = av_malloc(size + 1);
if (!str)
return NULL;
n = avio_get_str(pb, size, str, size + 1);
if (n < size)
avio_skip(pb, size - n);
return str;
}
| false | FFmpeg | 86e574928536ee5249d9cf4da9f5d8714611d706 | static char *var_read_string(AVIOContext *pb, int size)
{
int n;
char *str = av_malloc(size + 1);
if (!str)
return NULL;
n = avio_get_str(pb, size, str, size + 1);
if (n < size)
avio_skip(pb, size - n);
return str;
}
| {
"code": [],
"line_no": []
} | static char *FUNC_0(AVIOContext *VAR_0, int VAR_1)
{
int VAR_2;
char *VAR_3 = av_malloc(VAR_1 + 1);
if (!VAR_3)
return NULL;
VAR_2 = avio_get_str(VAR_0, VAR_1, VAR_3, VAR_1 + 1);
if (VAR_2 < VAR_1)
avio_skip(VAR_0, VAR_1 - VAR_2);
return VAR_3;
}
| [
"static char *FUNC_0(AVIOContext *VAR_0, int VAR_1)\n{",
"int VAR_2;",
"char *VAR_3 = av_malloc(VAR_1 + 1);",
"if (!VAR_3)\nreturn NULL;",
"VAR_2 = avio_get_str(VAR_0, VAR_1, VAR_3, VAR_1 + 1);",
"if (VAR_2 < VAR_1)\navio_skip(VAR_0, VAR_1 - VAR_2);",
"return VAR_3;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
]
] |
20,688 | static char *ctime1(char *buf2, int buf_size)
{
time_t ti;
char *p;
ti = time(NULL);
p = ctime(&ti);
av_strlcpy(buf2, p, buf_size);
p = buf2 + strlen(p) - 1;
if (*p == '\n')
*p = '\0';
return buf2;
}
| false | FFmpeg | 6c2dbff7f08ccbf69adb23ada48bb36ba796e772 | static char *ctime1(char *buf2, int buf_size)
{
time_t ti;
char *p;
ti = time(NULL);
p = ctime(&ti);
av_strlcpy(buf2, p, buf_size);
p = buf2 + strlen(p) - 1;
if (*p == '\n')
*p = '\0';
return buf2;
}
| {
"code": [],
"line_no": []
} | static char *FUNC_0(char *VAR_0, int VAR_1)
{
time_t ti;
char *VAR_2;
ti = time(NULL);
VAR_2 = ctime(&ti);
av_strlcpy(VAR_0, VAR_2, VAR_1);
VAR_2 = VAR_0 + strlen(VAR_2) - 1;
if (*VAR_2 == '\n')
*VAR_2 = '\0';
return VAR_0;
}
| [
"static char *FUNC_0(char *VAR_0, int VAR_1)\n{",
"time_t ti;",
"char *VAR_2;",
"ti = time(NULL);",
"VAR_2 = ctime(&ti);",
"av_strlcpy(VAR_0, VAR_2, VAR_1);",
"VAR_2 = VAR_0 + strlen(VAR_2) - 1;",
"if (*VAR_2 == '\\n')\n*VAR_2 = '\\0';",
"return VAR_0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
]
] |
20,689 | void ff_convert_matrix(MpegEncContext *s, int (*qmat)[64],
uint16_t (*qmat16)[2][64],
const uint16_t *quant_matrix,
int bias, int qmin, int qmax, int intra)
{
FDCTDSPContext *fdsp = &s->fdsp;
int qscale;
int shift = 0;
for (q... | true | FFmpeg | 3be27e07d3c5239f6d53b86aebcd201f722df4d0 | void ff_convert_matrix(MpegEncContext *s, int (*qmat)[64],
uint16_t (*qmat16)[2][64],
const uint16_t *quant_matrix,
int bias, int qmin, int qmax, int intra)
{
FDCTDSPContext *fdsp = &s->fdsp;
int qscale;
int shift = 0;
for (q... | {
"code": [
" ROUNDED_DIV(bias << (16 - QUANT_BIAS_SHIFT),"
],
"line_no": [
125
]
} | void FUNC_0(MpegEncContext *VAR_0, int (*VAR_1)[64],
VAR_2 (*qmat16)[2][64],
const VAR_2 *VAR_3,
int VAR_4, int VAR_5, int VAR_6, int VAR_7)
{
FDCTDSPContext *fdsp = &VAR_0->fdsp;
int VAR_8;
int VAR_9 = 0;
for (VAR_8 = VAR_5;... | [
"void FUNC_0(MpegEncContext *VAR_0, int (*VAR_1)[64],\nVAR_2 (*qmat16)[2][64],\nconst VAR_2 *VAR_3,\nint VAR_4, int VAR_5, int VAR_6, int VAR_7)\n{",
"FDCTDSPContext *fdsp = &VAR_0->fdsp;",
"int VAR_8;",
"int VAR_9 = 0;",
"for (VAR_8 = VAR_5; VAR_8 <= VAR_6; VAR_8++) {",
"int VAR_10;",
"int 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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33,
35,
37,
39,
41
],
[
43
],
[
45
],
[
47
],
[
61
],
[
63
],
[
65
],
[... |
20,690 | static void __attribute__((constructor)) coroutine_init(void)
{
if (!g_thread_supported()) {
g_thread_init(NULL);
}
coroutine_cond = g_cond_new();
} | true | qemu | 42ed3727536ccf80c87942b3f04e7378fe90f107 | static void __attribute__((constructor)) coroutine_init(void)
{
if (!g_thread_supported()) {
g_thread_init(NULL);
}
coroutine_cond = g_cond_new();
} | {
"code": [],
"line_no": []
} | static void __attribute__((constructor)) FUNC_0(void)
{
if (!g_thread_supported()) {
g_thread_init(NULL);
}
coroutine_cond = g_cond_new();
} | [
"static void __attribute__((constructor)) FUNC_0(void)\n{",
"if (!g_thread_supported()) {",
"g_thread_init(NULL);",
"}",
"coroutine_cond = g_cond_new();",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
8
],
[
14
],
[
18
],
[
20
]
] |
20,691 | static void loadvm_postcopy_handle_run_bh(void *opaque)
{
Error *local_err = NULL;
MigrationIncomingState *mis = opaque;
/* TODO we should move all of this lot into postcopy_ram.c or a shared code
* in migration.c
*/
cpu_synchronize_all_post_init();
qemu_announce_self();
... | true | qemu | 864699227911909ef1e33ecf91bf3c900715a9b1 | static void loadvm_postcopy_handle_run_bh(void *opaque)
{
Error *local_err = NULL;
MigrationIncomingState *mis = opaque;
cpu_synchronize_all_post_init();
qemu_announce_self();
bdrv_invalidate_cache_all(&local_err);
if (local_err) {
error_report_err(local_err... | {
"code": [
" MigrationIncomingState *mis = opaque;",
" qemu_bh_delete(mis->bh);"
],
"line_no": [
7,
63
]
} | static void FUNC_0(void *VAR_0)
{
Error *local_err = NULL;
MigrationIncomingState *mis = VAR_0;
cpu_synchronize_all_post_init();
qemu_announce_self();
bdrv_invalidate_cache_all(&local_err);
if (local_err) {
error_report_err(local_err);
}
trace_lo... | [
"static void FUNC_0(void *VAR_0)\n{",
"Error *local_err = NULL;",
"MigrationIncomingState *mis = VAR_0;",
"cpu_synchronize_all_post_init();",
"qemu_announce_self();",
"bdrv_invalidate_cache_all(&local_err);",
"if (local_err) {",
"error_report_err(local_err);",
"}",
"trace_loadvm_postcopy_handle_ru... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
17
],
[
21
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
47
],
[
51
],
[
53
],
[
57
],
[
59
],
[
63
],
[
65
]
] |
20,693 | static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs,
int64_t sector_num,
QEMUIOVector *qiov,
int nb_sectors,
BlockDriverComplet... | true | qemu | 857d4f46c31d2f4d57d2f0fad9dfb584262bf9b9 | static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs,
int64_t sector_num,
QEMUIOVector *qiov,
int nb_sectors,
BlockDriverComplet... | {
"code": [
" acb->bounce = qemu_blockalign(bs, qiov->size);",
" if (is_write) {"
],
"line_no": [
29,
35
]
} | static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs,
int64_t sector_num,
QEMUIOVector *qiov,
int nb_sectors,
BlockDriverCompletionFunc *cb,... | [
"static BlockDriverAIOCB *FUNC_0(BlockDriverState *bs,\nint64_t sector_num,\nQEMUIOVector *qiov,\nint nb_sectors,\nBlockDriverCompletionFunc *cb,\nvoid *opaque,\nint is_write)\n{",
"BlockDriverAIOCBSync *acb;",
"acb = qemu_aio_get(&bdrv_em_aiocb_info, bs, cb, opaque);",
"acb->is_write = is_write;",
"acb->qi... | [
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13,
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
53
],
[
55
]
] |
20,694 | static int vnc_display_listen_addr(VncDisplay *vd,
SocketAddress *addr,
const char *name,
QIOChannelSocket ***lsock,
guint **lsock_tag,
size... | true | qemu | 7bc4f0846f5e15dad5a54490290241243b5a4416 | static int vnc_display_listen_addr(VncDisplay *vd,
SocketAddress *addr,
const char *name,
QIOChannelSocket ***lsock,
guint **lsock_tag,
size... | {
"code": [],
"line_no": []
} | static int FUNC_0(VncDisplay *VAR_0,
SocketAddress *VAR_1,
const char *VAR_2,
QIOChannelSocket ***VAR_3,
guint **VAR_4,
size_t *VAR_5,
... | [
"static int FUNC_0(VncDisplay *VAR_0,\nSocketAddress *VAR_1,\nconst char *VAR_2,\nQIOChannelSocket ***VAR_3,\nguint **VAR_4,\nsize_t *VAR_5,\nError **VAR_6)\n{",
"QIODNSResolver *resolver = qio_dns_resolver_get_instance();",
"SocketAddress **rawaddrs = NULL;",
"size_t nrawaddrs = 0;",
"Error *listenerr = NU... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49,
51
],
[
54
],
[
56
... |
20,695 | static av_cold int cook_decode_init(AVCodecContext *avctx)
{
COOKContext *q = avctx->priv_data;
const uint8_t *edata_ptr = avctx->extradata;
const uint8_t *edata_ptr_end = edata_ptr + avctx->extradata_size;
int extradata_size = avctx->extradata_size;
int s = 0;
unsigned int channel_mask =... | true | FFmpeg | 409d1cd2c955485798f8b0b0147c2b899b9144ec | static av_cold int cook_decode_init(AVCodecContext *avctx)
{
COOKContext *q = avctx->priv_data;
const uint8_t *edata_ptr = avctx->extradata;
const uint8_t *edata_ptr_end = edata_ptr + avctx->extradata_size;
int extradata_size = avctx->extradata_size;
int s = 0;
unsigned int channel_mask =... | {
"code": [
" const uint8_t *edata_ptr = avctx->extradata;",
" const uint8_t *edata_ptr_end = edata_ptr + avctx->extradata_size;",
" int extradata_size = avctx->extradata_size;",
" if (extradata_size < 8) {",
" while (edata_ptr < edata_ptr_end) {",
" if (extradata_size >=... | static av_cold int FUNC_0(AVCodecContext *avctx)
{
COOKContext *q = avctx->priv_data;
const uint8_t *VAR_0 = avctx->extradata;
const uint8_t *VAR_1 = VAR_0 + avctx->VAR_2;
int VAR_2 = avctx->VAR_2;
int VAR_3 = 0;
unsigned int VAR_4 = 0;
int VAR_5;
int VAR_6;
q->avctx = avct... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"COOKContext *q = avctx->priv_data;",
"const uint8_t *VAR_0 = avctx->extradata;",
"const uint8_t *VAR_1 = VAR_0 + avctx->VAR_2;",
"int VAR_2 = avctx->VAR_2;",
"int VAR_3 = 0;",
"unsigned int VAR_4 = 0;",
"int VAR_5;",
"int VAR_6;",
"q->avctx =... | [
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
41
],
[
43
],
[
45
],
[
47
],
[
53
... |
20,696 | static void pc_cpu_pre_plug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
int idx;
CPUState *cs;
CPUArchId *cpu_slot;
X86CPUTopoInfo topo;
X86CPU *cpu = X86_CPU(dev);
PCMachineState *pcms = PC_MACHINE(hotplug_dev);
/* if APIC ID is not set, set it... | true | qemu | 6970c5ff13a47df7ce41b901a4459c587a03d16b | static void pc_cpu_pre_plug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
int idx;
CPUState *cs;
CPUArchId *cpu_slot;
X86CPUTopoInfo topo;
X86CPU *cpu = X86_CPU(dev);
PCMachineState *pcms = PC_MACHINE(hotplug_dev);
if (cpu->apic_id == UNASSIG... | {
"code": [],
"line_no": []
} | static void FUNC_0(HotplugHandler *VAR_0,
DeviceState *VAR_1, Error **VAR_2)
{
int VAR_3;
CPUState *cs;
CPUArchId *cpu_slot;
X86CPUTopoInfo topo;
X86CPU *cpu = X86_CPU(VAR_1);
PCMachineState *pcms = PC_MACHINE(VAR_0);
if (cpu->apic_id == UNASSIGNED_APIC_ID) {... | [
"static void FUNC_0(HotplugHandler *VAR_0,\nDeviceState *VAR_1, Error **VAR_2)\n{",
"int VAR_3;",
"CPUState *cs;",
"CPUArchId *cpu_slot;",
"X86CPUTopoInfo topo;",
"X86CPU *cpu = X86_CPU(VAR_1);",
"PCMachineState *pcms = PC_MACHINE(VAR_0);",
"if (cpu->apic_id == UNASSIGNED_APIC_ID) {",
"int VAR_4 = (... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16,
17
],
[
18
],
[
19
],
[
20
],
[
21,
22
],
[
23
],
[
... |
20,699 | void cpu_reset(CPUARMState *env)
{
uint32_t id;
id = env->cp15.c0_cpuid;
memset(env, 0, offsetof(CPUARMState, breakpoints));
if (id)
cpu_reset_model_id(env, id);
#if defined (CONFIG_USER_ONLY)
env->uncached_cpsr = ARM_CPU_MODE_USR;
env->vfp.xregs[ARM_VFP_FPEXC] = 1 << 30;
#else
/* SV... | true | qemu | eca1bdf415c454093dfc7eb983cd49287c043967 | void cpu_reset(CPUARMState *env)
{
uint32_t id;
id = env->cp15.c0_cpuid;
memset(env, 0, offsetof(CPUARMState, breakpoints));
if (id)
cpu_reset_model_id(env, id);
#if defined (CONFIG_USER_ONLY)
env->uncached_cpsr = ARM_CPU_MODE_USR;
env->vfp.xregs[ARM_VFP_FPEXC] = 1 << 30;
#else
... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUARMState *VAR_0)
{
uint32_t id;
id = VAR_0->cp15.c0_cpuid;
memset(VAR_0, 0, offsetof(CPUARMState, breakpoints));
if (id)
cpu_reset_model_id(VAR_0, id);
#if defined (CONFIG_USER_ONLY)
VAR_0->uncached_cpsr = ARM_CPU_MODE_USR;
VAR_0->vfp.xregs[ARM_VFP_FPEXC] = 1 << 30;
#else
... | [
"void FUNC_0(CPUARMState *VAR_0)\n{",
"uint32_t id;",
"id = VAR_0->cp15.c0_cpuid;",
"memset(VAR_0, 0, offsetof(CPUARMState, breakpoints));",
"if (id)\ncpu_reset_model_id(VAR_0, id);",
"#if defined (CONFIG_USER_ONLY)\nVAR_0->uncached_cpsr = ARM_CPU_MODE_USR;",
"VAR_0->vfp.xregs[ARM_VFP_FPEXC] = 1 << 30;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6,
7
],
[
8,
9
],
[
10
],
[
11,
13
],
[
16,
17
],
[
18
],
[
19
],
[
20,
21
],
[
22
]
] |
20,700 | static int coroutine_fn bdrv_co_do_readv(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, QEMUIOVector *qiov)
{
BlockDriver *drv = bs->drv;
BdrvTrackedRequest req;
int ret;
if (!drv) {
return -ENOMEDIUM;
if (bdrv_check_request(bs, sector_num, nb_sectors)) {
return -EIO;
... | true | qemu | f4658285f99473367dbbc34ce6970ec4637c2388 | static int coroutine_fn bdrv_co_do_readv(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, QEMUIOVector *qiov)
{
BlockDriver *drv = bs->drv;
BdrvTrackedRequest req;
int ret;
if (!drv) {
return -ENOMEDIUM;
if (bdrv_check_request(bs, sector_num, nb_sectors)) {
return -EIO;
... | {
"code": [],
"line_no": []
} | static int VAR_0 bdrv_co_do_readv(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, QEMUIOVector *qiov)
{
BlockDriver *drv = bs->drv;
BdrvTrackedRequest req;
int ret;
if (!drv) {
return -ENOMEDIUM;
if (bdrv_check_request(bs, sector_num, nb_sectors)) {
return -EIO;
... | [
"static int VAR_0 bdrv_co_do_readv(BlockDriverState *bs,\nint64_t sector_num, int nb_sectors, QEMUIOVector *qiov)\n{",
"BlockDriver *drv = bs->drv;",
"BdrvTrackedRequest req;",
"int ret;",
"if (!drv) {",
"return -ENOMEDIUM;",
"if (bdrv_check_request(bs, sector_num, nb_sectors)) {",
"return -EIO;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
]
] |
20,701 | static inline void cris_ftag_i(unsigned int x)
{
register unsigned int v asm("$r10") = x;
asm ("ftagi\t[%0]\n" : : "r" (v) );
}
| true | qemu | 21ce148c7ec71ee32834061355a5ecfd1a11f90f | static inline void cris_ftag_i(unsigned int x)
{
register unsigned int v asm("$r10") = x;
asm ("ftagi\t[%0]\n" : : "r" (v) );
}
| {
"code": [
"static inline void cris_ftag_i(unsigned int x)"
],
"line_no": [
1
]
} | static inline void FUNC_0(unsigned int VAR_0)
{
register unsigned int VAR_1 asm("$r10") = VAR_0;
asm ("ftagi\t[%0]\n" : : "r" (VAR_1) );
}
| [
"static inline void FUNC_0(unsigned int VAR_0)\n{",
"register unsigned int VAR_1 asm(\"$r10\") = VAR_0;",
"asm (\"ftagi\\t[%0]\\n\" : : \"r\" (VAR_1) );",
"}"
] | [
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
20,702 | abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
int flags, int fd, abi_ulong offset)
{
abi_ulong ret, end, real_start, real_end, retaddr, host_offset, host_len;
mmap_lock();
#ifdef DEBUG_MMAP
{
printf("mmap: start=0x" TARGET_ABI_FMT_lx
" l... | true | qemu | 35f2fd04ce8bd3eaad4b7790abb19fa2a56d7314 | abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
int flags, int fd, abi_ulong offset)
{
abi_ulong ret, end, real_start, real_end, retaddr, host_offset, host_len;
mmap_lock();
#ifdef DEBUG_MMAP
{
printf("mmap: start=0x" TARGET_ABI_FMT_lx
" l... | {
"code": [
" if ((qemu_real_host_page_size < TARGET_PAGE_SIZE)",
" && !(flags & MAP_ANONYMOUS)) {",
" struct stat sb;"
],
"line_no": [
137,
139,
141
]
} | abi_long FUNC_0(abi_ulong start, abi_ulong len, int prot,
int flags, int fd, abi_ulong offset)
{
abi_ulong ret, end, real_start, real_end, retaddr, host_offset, host_len;
mmap_lock();
#ifdef DEBUG_MMAP
{
printf("mmap: start=0x" TARGET_ABI_FMT_lx
" len=0x... | [
"abi_long FUNC_0(abi_ulong start, abi_ulong len, int prot,\nint flags, int fd, abi_ulong offset)\n{",
"abi_ulong ret, end, real_start, real_end, retaddr, host_offset, host_len;",
"mmap_lock();",
"#ifdef DEBUG_MMAP\n{",
"printf(\"mmap: start=0x\" TARGET_ABI_FMT_lx\n\" len=0x\" TARGET_ABI_FMT_lx \" prot=%c%c%... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
11
],
[
13,
15
],
[
17,
19,
21,
23,
25,
27
],
[
29,
31
],
[
33,
35
],
[
37
],
[
39,
41
],
[
43
],
[
45,
47
],
[
49
],
[
51,
53
],
[
55... |
20,703 | int kvm_arch_insert_sw_breakpoint(CPUState *cpu, struct kvm_sw_breakpoint *bp)
{
return -EINVAL;
}
| true | qemu | 8a0548f94edecb96acb9b7fb9106ccc821c4996f | int kvm_arch_insert_sw_breakpoint(CPUState *cpu, struct kvm_sw_breakpoint *bp)
{
return -EINVAL;
}
| {
"code": [
"int kvm_arch_insert_sw_breakpoint(CPUState *cpu, struct kvm_sw_breakpoint *bp)",
" return -EINVAL;",
" return -EINVAL;"
],
"line_no": [
1,
5,
5
]
} | int FUNC_0(CPUState *VAR_0, struct kvm_sw_breakpoint *VAR_1)
{
return -EINVAL;
}
| [
"int FUNC_0(CPUState *VAR_0, struct kvm_sw_breakpoint *VAR_1)\n{",
"return -EINVAL;",
"}"
] | [
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
20,704 | static bool remove_objects(BDRVSheepdogState *s)
{
int fd, i = 0, nr_objs = 0;
Error *local_err = NULL;
int ret = 0;
bool result = true;
SheepdogInode *inode = &s->inode;
fd = connect_to_sdog(s, &local_err);
if (fd < 0) {
error_report_err(local_err);
return false;... | true | qemu | e25cad6921ef78c8e2b7a4f59b03545bd675a9ad | static bool remove_objects(BDRVSheepdogState *s)
{
int fd, i = 0, nr_objs = 0;
Error *local_err = NULL;
int ret = 0;
bool result = true;
SheepdogInode *inode = &s->inode;
fd = connect_to_sdog(s, &local_err);
if (fd < 0) {
error_report_err(local_err);
return false;... | {
"code": [
"static bool remove_objects(BDRVSheepdogState *s)",
" Error *local_err = NULL;",
" int ret = 0;",
" bool result = true;",
" fd = connect_to_sdog(s, &local_err);",
" error_report_err(local_err);",
" return false;",
" error_report(\"failed... | static bool FUNC_0(BDRVSheepdogState *s)
{
int VAR_0, VAR_1 = 0, VAR_2 = 0;
Error *local_err = NULL;
int VAR_3 = 0;
bool result = true;
SheepdogInode *inode = &s->inode;
VAR_0 = connect_to_sdog(s, &local_err);
if (VAR_0 < 0) {
error_report_err(local_err);
return f... | [
"static bool FUNC_0(BDRVSheepdogState *s)\n{",
"int VAR_0, VAR_1 = 0, VAR_2 = 0;",
"Error *local_err = NULL;",
"int VAR_3 = 0;",
"bool result = true;",
"SheepdogInode *inode = &s->inode;",
"VAR_0 = connect_to_sdog(s, &local_err);",
"if (VAR_0 < 0) {",
"error_report_err(local_err);",
"return false;... | [
1,
0,
1,
1,
1,
0,
1,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
... |
20,705 | static int vfio_populate_device(VFIODevice *vbasedev)
{
VFIOINTp *intp, *tmp;
int i, ret = -1;
VFIOPlatformDevice *vdev =
container_of(vbasedev, VFIOPlatformDevice, vbasedev);
if (!(vbasedev->flags & VFIO_DEVICE_FLAGS_PLATFORM)) {
error_report("vfio: Um, this isn't a platform de... | true | qemu | bdd81addf4033ce26e6cd180b060f63095f3ded9 | static int vfio_populate_device(VFIODevice *vbasedev)
{
VFIOINTp *intp, *tmp;
int i, ret = -1;
VFIOPlatformDevice *vdev =
container_of(vbasedev, VFIOPlatformDevice, vbasedev);
if (!(vbasedev->flags & VFIO_DEVICE_FLAGS_PLATFORM)) {
error_report("vfio: Um, this isn't a platform de... | {
"code": [
" vdev->regions[i] = g_malloc0(sizeof(VFIORegion));"
],
"line_no": [
37
]
} | static int FUNC_0(VFIODevice *VAR_0)
{
VFIOINTp *intp, *tmp;
int VAR_1, VAR_2 = -1;
VFIOPlatformDevice *vdev =
container_of(VAR_0, VFIOPlatformDevice, VAR_0);
if (!(VAR_0->flags & VFIO_DEVICE_FLAGS_PLATFORM)) {
error_report("vfio: Um, this isn't a platform device");
ret... | [
"static int FUNC_0(VFIODevice *VAR_0)\n{",
"VFIOINTp *intp, *tmp;",
"int VAR_1, VAR_2 = -1;",
"VFIOPlatformDevice *vdev =\ncontainer_of(VAR_0, VFIOPlatformDevice, VAR_0);",
"if (!(VAR_0->flags & VFIO_DEVICE_FLAGS_PLATFORM)) {",
"error_report(\"vfio: Um, this isn't a platform device\");",
"return VAR_2;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
20,706 | static int execute_decode_slices(H264Context *h, int context_count)
{
MpegEncContext *const s = &h->s;
AVCodecContext *const avctx = s->avctx;
H264Context *hx;
int i;
if (s->avctx->hwaccel ||
s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)
return 0;
if (co... | true | FFmpeg | cdc48860a8cbb0080acc0732b2e1c689cea03777 | static int execute_decode_slices(H264Context *h, int context_count)
{
MpegEncContext *const s = &h->s;
AVCodecContext *const avctx = s->avctx;
H264Context *hx;
int i;
if (s->avctx->hwaccel ||
s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)
return 0;
if (co... | {
"code": [],
"line_no": []
} | static int FUNC_0(H264Context *VAR_0, int VAR_1)
{
MpegEncContext *const s = &VAR_0->s;
AVCodecContext *const avctx = s->avctx;
H264Context *hx;
int VAR_2;
if (s->avctx->hwaccel ||
s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)
return 0;
if (VAR_1 == 1) {... | [
"static int FUNC_0(H264Context *VAR_0, int VAR_1)\n{",
"MpegEncContext *const s = &VAR_0->s;",
"AVCodecContext *const avctx = s->avctx;",
"H264Context *hx;",
"int VAR_2;",
"if (s->avctx->hwaccel ||\ns->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)\nreturn 0;",
"if (VAR_1 == 1) {",
"return ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17,
19
],
[
21
],
[
23
],
[
25
],
[
28
],
[
30
],
[
32
],
[
34
],
[
36
],
[
38
],
[
42,
44
],
[
50
],
[
52
],
[... |
20,707 | void pcmcia_socket_register(PCMCIASocket *socket)
{
struct pcmcia_socket_entry_s *entry;
entry = g_malloc(sizeof(struct pcmcia_socket_entry_s));
entry->socket = socket;
entry->next = pcmcia_sockets;
pcmcia_sockets = entry;
}
| true | qemu | 7797a73947d5c0e63dd5552b348cf66c384b4555 | void pcmcia_socket_register(PCMCIASocket *socket)
{
struct pcmcia_socket_entry_s *entry;
entry = g_malloc(sizeof(struct pcmcia_socket_entry_s));
entry->socket = socket;
entry->next = pcmcia_sockets;
pcmcia_sockets = entry;
}
| {
"code": [
"void pcmcia_socket_register(PCMCIASocket *socket)",
" struct pcmcia_socket_entry_s *entry;",
" entry = g_malloc(sizeof(struct pcmcia_socket_entry_s));",
" entry->socket = socket;",
" entry->next = pcmcia_sockets;",
" pcmcia_sockets = entry;"
],
"line_no": [
... | void FUNC_0(PCMCIASocket *VAR_0)
{
struct pcmcia_socket_entry_s *VAR_1;
VAR_1 = g_malloc(sizeof(struct pcmcia_socket_entry_s));
VAR_1->VAR_0 = VAR_0;
VAR_1->next = pcmcia_sockets;
pcmcia_sockets = VAR_1;
}
| [
"void FUNC_0(PCMCIASocket *VAR_0)\n{",
"struct pcmcia_socket_entry_s *VAR_1;",
"VAR_1 = g_malloc(sizeof(struct pcmcia_socket_entry_s));",
"VAR_1->VAR_0 = VAR_0;",
"VAR_1->next = pcmcia_sockets;",
"pcmcia_sockets = VAR_1;",
"}"
] | [
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
20,708 | static void encode_subband(SnowContext *s, SubBand *b, DWTELEM *src, DWTELEM *parent, int stride, int orientation){
// encode_subband_qtree(s, b, src, parent, stride, orientation);
// encode_subband_z0run(s, b, src, parent, stride, orientation);
encode_subband_c0run(s, b, src, parent, stride, orientati... | true | FFmpeg | 0ecca7a49f8e254c12a3a1de048d738bfbb614c6 | static void encode_subband(SnowContext *s, SubBand *b, DWTELEM *src, DWTELEM *parent, int stride, int orientation){
encode_subband_c0run(s, b, src, parent, stride, orientation);
}
| {
"code": [
"static void encode_subband(SnowContext *s, SubBand *b, DWTELEM *src, DWTELEM *parent, int stride, int orientation){ ",
" encode_subband_c0run(s, b, src, parent, stride, orientation);"
],
"line_no": [
1,
7
]
} | static void FUNC_0(SnowContext *VAR_0, SubBand *VAR_1, DWTELEM *VAR_2, DWTELEM *VAR_3, int VAR_4, int VAR_5){
encode_subband_c0run(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);
}
| [
"static void FUNC_0(SnowContext *VAR_0, SubBand *VAR_1, DWTELEM *VAR_2, DWTELEM *VAR_3, int VAR_4, int VAR_5){",
"encode_subband_c0run(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5);",
"}"
] | [
1,
1,
0
] | [
[
1
],
[
7
],
[
11
]
] |
20,709 | static void handle_s_without_atn(ESPState *s)
{
uint8_t buf[32];
int len;
if (s->dma && !s->dma_enabled) {
s->dma_cb = handle_s_without_atn;
return;
}
len = get_cmd(s, buf);
if (len) {
do_busid_cmd(s, buf, 0);
}
}
| true | qemu | 6c1fef6b59563cc415f21e03f81539ed4b33ad90 | static void handle_s_without_atn(ESPState *s)
{
uint8_t buf[32];
int len;
if (s->dma && !s->dma_enabled) {
s->dma_cb = handle_s_without_atn;
return;
}
len = get_cmd(s, buf);
if (len) {
do_busid_cmd(s, buf, 0);
}
}
| {
"code": [
" len = get_cmd(s, buf);",
" len = get_cmd(s, buf);"
],
"line_no": [
19,
19
]
} | static void FUNC_0(ESPState *VAR_0)
{
uint8_t buf[32];
int VAR_1;
if (VAR_0->dma && !VAR_0->dma_enabled) {
VAR_0->dma_cb = FUNC_0;
return;
}
VAR_1 = get_cmd(VAR_0, buf);
if (VAR_1) {
do_busid_cmd(VAR_0, buf, 0);
}
}
| [
"static void FUNC_0(ESPState *VAR_0)\n{",
"uint8_t buf[32];",
"int VAR_1;",
"if (VAR_0->dma && !VAR_0->dma_enabled) {",
"VAR_0->dma_cb = FUNC_0;",
"return;",
"}",
"VAR_1 = get_cmd(VAR_0, buf);",
"if (VAR_1) {",
"do_busid_cmd(VAR_0, buf, 0);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
20,710 | static void spapr_memory_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
uint32_t node, Error **errp)
{
Error *local_err = NULL;
sPAPRMachineState *ms = SPAPR_MACHINE(hotplug_dev);
PCDIMMDevice *dimm = PC_DIMM(dev);
PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm)... | true | qemu | 79b78a6bd47722ce23bc74287cd6322756698f09 | static void spapr_memory_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
uint32_t node, Error **errp)
{
Error *local_err = NULL;
sPAPRMachineState *ms = SPAPR_MACHINE(hotplug_dev);
PCDIMMDevice *dimm = PC_DIMM(dev);
PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm)... | {
"code": [
" spapr_add_lmbs(dev, addr, size, node, &error_abort);"
],
"line_no": [
59
]
} | static void FUNC_0(HotplugHandler *VAR_0, DeviceState *VAR_1,
uint32_t VAR_2, Error **VAR_3)
{
Error *local_err = NULL;
sPAPRMachineState *ms = SPAPR_MACHINE(VAR_0);
PCDIMMDevice *dimm = PC_DIMM(VAR_1);
PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm);
MemoryRegi... | [
"static void FUNC_0(HotplugHandler *VAR_0, DeviceState *VAR_1,\nuint32_t VAR_2, Error **VAR_3)\n{",
"Error *local_err = NULL;",
"sPAPRMachineState *ms = SPAPR_MACHINE(VAR_0);",
"PCDIMMDevice *dimm = PC_DIMM(VAR_1);",
"PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm);",
"MemoryRegion *mr = ddc->get_memory_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
... |
20,711 | static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pict, int *got_packet)
{
A64Context *c = avctx->priv_data;
AVFrame *const p = (AVFrame *) & c->picture;
int frame;
int x, y;
int b_height;
int b_width;
int req_... | true | FFmpeg | 3d3b603f7f834dad919a3334506a1e5414d7368a | static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pict, int *got_packet)
{
A64Context *c = avctx->priv_data;
AVFrame *const p = (AVFrame *) & c->picture;
int frame;
int x, y;
int b_height;
int b_width;
int req_... | {
"code": [
" uint8_t *buf;"
],
"line_no": [
25
]
} | static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,
const AVFrame *VAR_2, int *VAR_3)
{
A64Context *c = VAR_0->priv_data;
AVFrame *const p = (AVFrame *) & c->picture;
int VAR_4;
int VAR_5, VAR_6;
int VAR_7;
int VAR_8;
int VAR_9, VAR_10;
... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{",
"A64Context *c = VAR_0->priv_data;",
"AVFrame *const p = (AVFrame *) & c->picture;",
"int VAR_4;",
"int VAR_5, VAR_6;",
"int VAR_7;",
"int VAR_8;",
"int VAR_9, VAR_10;",
"uint8_t *buf;",
"int *VAR_11... | [
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,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[... |
20,713 | static av_always_inline void MPV_motion_internal(MpegEncContext *s,
uint8_t *dest_y, uint8_t *dest_cb,
uint8_t *dest_cr, int dir,
uint8_t **ref_picture,
op_pixels_func (*pix_op)[4],
... | true | FFmpeg | 23daee0dcc57b647b9d62d4c905e94acf0c6b8e0 | static av_always_inline void MPV_motion_internal(MpegEncContext *s,
uint8_t *dest_y, uint8_t *dest_cb,
uint8_t *dest_cr, int dir,
uint8_t **ref_picture,
op_pixels_func (*pix_op)[4],
... | {
"code": [
" if(s->picture_structure != s->field_select[dir][0] + 1 && s->pict_type != AV_PICTURE_TYPE_B && !s->first_field){"
],
"line_no": [
379
]
} | static av_always_inline void FUNC_0(MpegEncContext *s,
uint8_t *dest_y, uint8_t *dest_cb,
uint8_t *dest_cr, int dir,
uint8_t **ref_picture,
op_pixels_func (*pix_op)[4],
... | [
"static av_always_inline void FUNC_0(MpegEncContext *s,\nuint8_t *dest_y, uint8_t *dest_cb,\nuint8_t *dest_cr, int dir,\nuint8_t **ref_picture,\nop_pixels_func (*pix_op)[4],\nqpel_mc_func (*qpix_op)[16], int is_mpeg12)\n{",
"int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;",
"int VAR_7, VAR_8, VAR_9;",
"u... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
51
],
[
53
],
[
57
],
[... |
20,714 | void ppc_store_sr (CPUPPCState *env, int srnum, target_ulong value)
{
LOG_MMU("%s: reg=%d " TARGET_FMT_lx " " TARGET_FMT_lx "\n", __func__,
srnum, value, env->sr[srnum]);
#if defined(TARGET_PPC64)
if (env->mmu_model & POWERPC_MMU_64) {
uint64_t rb = 0, rs = 0;
/* ESID = srnu... | true | qemu | decb471488dd9e7e7ab9957f120cb501c4489f63 | void ppc_store_sr (CPUPPCState *env, int srnum, target_ulong value)
{
LOG_MMU("%s: reg=%d " TARGET_FMT_lx " " TARGET_FMT_lx "\n", __func__,
srnum, value, env->sr[srnum]);
#if defined(TARGET_PPC64)
if (env->mmu_model & POWERPC_MMU_64) {
uint64_t rb = 0, rs = 0;
rb |... | {
"code": [
" rs |= ((value >> 27) & 0xf) << 9;"
],
"line_no": [
37
]
} | void FUNC_0 (CPUPPCState *VAR_0, int VAR_1, target_ulong VAR_2)
{
LOG_MMU("%s: reg=%d " TARGET_FMT_lx " " TARGET_FMT_lx "\n", __func__,
VAR_1, VAR_2, VAR_0->sr[VAR_1]);
#if defined(TARGET_PPC64)
if (VAR_0->mmu_model & POWERPC_MMU_64) {
uint64_t rb = 0, rs = 0;
rb |... | [
"void FUNC_0 (CPUPPCState *VAR_0, int VAR_1, target_ulong VAR_2)\n{",
"LOG_MMU(\"%s: reg=%d \" TARGET_FMT_lx \" \" TARGET_FMT_lx \"\\n\", __func__,\nVAR_1, VAR_2, VAR_0->sr[VAR_1]);",
"#if defined(TARGET_PPC64)\nif (VAR_0->mmu_model & POWERPC_MMU_64) {",
"uint64_t rb = 0, rs = 0;",
"rb |= ((uint32_t)VAR_1 &... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
],
[
19
],
[
23
],
[
27
],
[
33
],
[
37
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
55,
57
],
[
59
],
[
63
],
[
65
],
[
67
... |
20,715 | int ff_h264_decode_mb_cabac(H264Context *h) {
MpegEncContext * const s = &h->s;
int mb_xy;
int mb_type, partition_count, cbp = 0;
int dct8x8_allowed= h->pps.transform_8x8_mode;
int decode_chroma = h->sps.chroma_format_idc == 1 || h->sps.chroma_format_idc == 2;
const int pixel_shift = h->pi... | true | FFmpeg | d1604b3de96575195b219028e2c4f08b2259aa7d | int ff_h264_decode_mb_cabac(H264Context *h) {
MpegEncContext * const s = &h->s;
int mb_xy;
int mb_type, partition_count, cbp = 0;
int dct8x8_allowed= h->pps.transform_8x8_mode;
int decode_chroma = h->sps.chroma_format_idc == 1 || h->sps.chroma_format_idc == 2;
const int pixel_shift = h->pi... | {
"code": [],
"line_no": []
} | int FUNC_0(H264Context *VAR_0) {
MpegEncContext * const s = &VAR_0->s;
int VAR_1;
int VAR_2, VAR_3, VAR_4 = 0;
int VAR_5= VAR_0->pps.transform_8x8_mode;
int VAR_6 = VAR_0->sps.chroma_format_idc == 1 || VAR_0->sps.chroma_format_idc == 2;
const int VAR_7 = VAR_0->VAR_7;
VAR_1 = VAR_0-... | [
"int FUNC_0(H264Context *VAR_0) {",
"MpegEncContext * const s = &VAR_0->s;",
"int VAR_1;",
"int VAR_2, VAR_3, VAR_4 = 0;",
"int VAR_5= VAR_0->pps.transform_8x8_mode;",
"int VAR_6 = VAR_0->sps.chroma_format_idc == 1 || VAR_0->sps.chroma_format_idc == 2;",
"const int VAR_7 = VAR_0->VAR_7;",
"VAR_1 = VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
33,
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51
... |
20,717 | static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, unsigned src_size)
{
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
mm_end = end - 15;
#if 1 //is faster only if multiplie... | true | FFmpeg | 7f526efd17973ec6d2204f7a47b6923e2be31363 | static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, unsigned src_size)
{
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
mm_end = end - 15;
#if 1
asm volatile(
"movq %3,... | {
"code": [
"static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, unsigned src_size)"
],
"line_no": [
1
]
} | static inline void FUNC_0(rgb32to15)(const uint8_t *VAR_2, uint8_t *dst, unsigned src_size)
{
const uint8_t *VAR_0 = VAR_2;
const uint8_t *VAR_1;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
VAR_1 = VAR_0 + src_size;
#ifdef HAVE_MMX
mm_end = VAR_1 - 15;
#if 1
asm vola... | [
"static inline void FUNC_0(rgb32to15)(const uint8_t *VAR_2, uint8_t *dst, unsigned src_size)\n{",
"const uint8_t *VAR_0 = VAR_2;",
"const uint8_t *VAR_1;",
"#ifdef HAVE_MMX\nconst uint8_t *mm_end;",
"#endif\nuint16_t *d = (uint16_t *)dst;",
"VAR_1 = VAR_0 + src_size;",
"#ifdef HAVE_MMX\nmm_end = VAR_1 -... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13,
15
],
[
17
],
[
19,
21
],
[
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,
63,
65,... |
20,718 | static int mov_write_trailer(AVFormatContext *s)
{
MOVMuxContext *mov = s->priv_data;
AVIOContext *pb = s->pb;
int res = 0;
int i;
int64_t moov_pos = avio_tell(pb);
if (!(mov->flags & FF_MOV_FLAG_FRAGMENT)) {
/* Write size of mdat tag */
if (mov->mdat_size + 8 <= UIN... | true | FFmpeg | bc426827492f6c741608af37e2eaab6c8072815d | static int mov_write_trailer(AVFormatContext *s)
{
MOVMuxContext *mov = s->priv_data;
AVIOContext *pb = s->pb;
int res = 0;
int i;
int64_t moov_pos = avio_tell(pb);
if (!(mov->flags & FF_MOV_FLAG_FRAGMENT)) {
if (mov->mdat_size + 8 <= UINT32_MAX) {
avio... | {
"code": [
" else if (mov->tracks[i].tag == MKTAG('t','m','c','d'))"
],
"line_no": [
99
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
MOVMuxContext *mov = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
int VAR_1 = 0;
int VAR_2;
int64_t moov_pos = avio_tell(pb);
if (!(mov->flags & FF_MOV_FLAG_FRAGMENT)) {
if (mov->mdat_size + 8 <= UINT32_MAX) {
... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"MOVMuxContext *mov = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"int VAR_1 = 0;",
"int VAR_2;",
"int64_t moov_pos = avio_tell(pb);",
"if (!(mov->flags & FF_MOV_FLAG_FRAGMENT)) {",
"if (mov->mdat_size + 8 <= UINT32_MAX) {",
"avio_seek(pb, mov-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
... |
20,719 | static void dvbsub_parse_region_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
DVBSubContext *ctx = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
int region_id, object_id;
int av_unused version;
DVBSubRegion *region;
... | true | FFmpeg | ebe3a41ea3b93579379b0460338ff511f9749602 | static void dvbsub_parse_region_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
DVBSubContext *ctx = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
int region_id, object_id;
int av_unused version;
DVBSubRegion *region;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVCodecContext *VAR_0,
const uint8_t *VAR_1, int VAR_2)
{
DVBSubContext *ctx = VAR_0->priv_data;
const uint8_t *VAR_3 = VAR_1 + VAR_2;
int VAR_4, VAR_5;
int VAR_6 version;
DVBSubRegion *region;
DVBSubObject *object;
DVBSub... | [
"static void FUNC_0(AVCodecContext *VAR_0,\nconst uint8_t *VAR_1, int VAR_2)\n{",
"DVBSubContext *ctx = VAR_0->priv_data;",
"const uint8_t *VAR_3 = VAR_1 + VAR_2;",
"int VAR_4, VAR_5;",
"int VAR_6 version;",
"DVBSubRegion *region;",
"DVBSubObject *object;",
"DVBSubObjectDisplay *display;",
"int VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
32
],
[
36
],
[
40
],
[
42
],
[
48
],
[
50
],
[
54
],
[
56
],
[
58
],
[
62... |
20,721 | static int local_link(FsContext *ctx, V9fsPath *oldpath,
V9fsPath *dirpath, const char *name)
{
int ret;
V9fsString newpath;
char *buffer, *buffer1;
int serrno;
v9fs_string_init(&newpath);
v9fs_string_sprintf(&newpath, "%s/%s", dirpath->data, name);
buffer ... | true | qemu | ad0b46e6ac769b187cb4dcf0065675ef8a198a5e | static int local_link(FsContext *ctx, V9fsPath *oldpath,
V9fsPath *dirpath, const char *name)
{
int ret;
V9fsString newpath;
char *buffer, *buffer1;
int serrno;
v9fs_string_init(&newpath);
v9fs_string_sprintf(&newpath, "%s/%s", dirpath->data, name);
buffer ... | {
"code": [
" int ret;",
" V9fsString newpath;",
" char *buffer, *buffer1;",
" int serrno;",
" v9fs_string_init(&newpath);",
" v9fs_string_sprintf(&newpath, \"%s/%s\", dirpath->data, name);",
" buffer = rpath(ctx, oldpath->data);",
" buffer1 = rpath(ctx, newpath... | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
V9fsPath *VAR_2, const char *VAR_3)
{
int VAR_4;
V9fsString newpath;
char *VAR_5, *VAR_6;
int VAR_7;
v9fs_string_init(&newpath);
v9fs_string_sprintf(&newpath, "%s/%s", VAR_2->data, VAR_3);
VAR_5 = rpath(V... | [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,\nV9fsPath *VAR_2, const char *VAR_3)\n{",
"int VAR_4;",
"V9fsString newpath;",
"char *VAR_5, *VAR_6;",
"int VAR_7;",
"v9fs_string_init(&newpath);",
"v9fs_string_sprintf(&newpath, \"%s/%s\", VAR_2->data, VAR_3);",
"VAR_5 = rpath(VAR_0, VAR_1->data);... | [
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
41
],
[
43
],
[
49
],
[
51
],
[
53
],
[... |
20,723 | static int parse_str(StringInputVisitor *siv, const char *name, Error **errp)
{
char *str = (char *) siv->string;
long long start, end;
Range *cur;
char *endptr;
if (siv->ranges) {
return 0;
}
do {
errno = 0;
start = strtoll(str, &endptr, 0);
i... | true | qemu | 7c47959d0cb05db43014141a156ada0b6d53a750 | static int parse_str(StringInputVisitor *siv, const char *name, Error **errp)
{
char *str = (char *) siv->string;
long long start, end;
Range *cur;
char *endptr;
if (siv->ranges) {
return 0;
}
do {
errno = 0;
start = strtoll(str, &endptr, 0);
i... | {
"code": [
" return 0;",
" siv->ranges = g_list_insert_sorted_merged(siv->ranges, cur,",
" range_compare);",
" siv->ranges =",
" g_list_insert_sorted_merged(siv->ranges... | static int FUNC_0(StringInputVisitor *VAR_0, const char *VAR_1, Error **VAR_2)
{
char *VAR_3 = (char *) VAR_0->string;
long long VAR_4, VAR_5;
Range *cur;
char *VAR_6;
if (VAR_0->ranges) {
return 0;
}
do {
errno = 0;
VAR_4 = strtoll(VAR_3, &VAR_6, 0);
... | [
"static int FUNC_0(StringInputVisitor *VAR_0, const char *VAR_1, Error **VAR_2)\n{",
"char *VAR_3 = (char *) VAR_0->string;",
"long long VAR_4, VAR_5;",
"Range *cur;",
"char *VAR_6;",
"if (VAR_0->ranges) {",
"return 0;",
"}",
"do {",
"errno = 0;",
"VAR_4 = strtoll(VAR_3, &VAR_6, 0);",
"if (err... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[... |
20,724 | static av_cold int adpcm_encode_init(AVCodecContext *avctx)
{
ADPCMEncodeContext *s = avctx->priv_data;
uint8_t *extradata;
int i;
if (avctx->channels > 2)
return -1; /* only stereo or mono =) */
if (avctx->trellis && (unsigned)avctx->trellis > 16U) {
av_log(avctx, AV_LOG_E... | false | FFmpeg | 82c252972b494402818aa07df5bdbac16111c09d | static av_cold int adpcm_encode_init(AVCodecContext *avctx)
{
ADPCMEncodeContext *s = avctx->priv_data;
uint8_t *extradata;
int i;
if (avctx->channels > 2)
return -1;
if (avctx->trellis && (unsigned)avctx->trellis > 16U) {
av_log(avctx, AV_LOG_ERROR, "invalid trellis size\... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
ADPCMEncodeContext *s = avctx->priv_data;
uint8_t *extradata;
int VAR_0;
if (avctx->channels > 2)
return -1;
if (avctx->trellis && (unsigned)avctx->trellis > 16U) {
av_log(avctx, AV_LOG_ERROR, "invalid trellis size\n");
... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"ADPCMEncodeContext *s = avctx->priv_data;",
"uint8_t *extradata;",
"int VAR_0;",
"if (avctx->channels > 2)\nreturn -1;",
"if (avctx->trellis && (unsigned)avctx->trellis > 16U) {",
"av_log(avctx, AV_LOG_ERROR, \"invalid trellis size\\n\");",
"retu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
37,
39
],
[
41,
43
],
[
45,
47
],
[
49
],
[... |
20,727 | void *etraxfs_dmac_init(target_phys_addr_t base, int nr_channels)
{
struct fs_dma_ctrl *ctrl = NULL;
ctrl = g_malloc0(sizeof *ctrl);
ctrl->bh = qemu_bh_new(DMA_run, ctrl);
ctrl->nr_channels = nr_channels;
ctrl->channels = g_malloc0(sizeof ctrl->channels[0] * nr_channels);
memory_region_init_... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | void *etraxfs_dmac_init(target_phys_addr_t base, int nr_channels)
{
struct fs_dma_ctrl *ctrl = NULL;
ctrl = g_malloc0(sizeof *ctrl);
ctrl->bh = qemu_bh_new(DMA_run, ctrl);
ctrl->nr_channels = nr_channels;
ctrl->channels = g_malloc0(sizeof ctrl->channels[0] * nr_channels);
memory_region_init_... | {
"code": [],
"line_no": []
} | void *FUNC_0(target_phys_addr_t VAR_0, int VAR_1)
{
struct fs_dma_ctrl *VAR_2 = NULL;
VAR_2 = g_malloc0(sizeof *VAR_2);
VAR_2->bh = qemu_bh_new(DMA_run, VAR_2);
VAR_2->VAR_1 = VAR_1;
VAR_2->channels = g_malloc0(sizeof VAR_2->channels[0] * VAR_1);
memory_region_init_io(&VAR_2->mmio, &dma_ops,... | [
"void *FUNC_0(target_phys_addr_t VAR_0, int VAR_1)\n{",
"struct fs_dma_ctrl *VAR_2 = NULL;",
"VAR_2 = g_malloc0(sizeof *VAR_2);",
"VAR_2->bh = qemu_bh_new(DMA_run, VAR_2);",
"VAR_2->VAR_1 = VAR_1;",
"VAR_2->channels = g_malloc0(sizeof VAR_2->channels[0] * VAR_1);",
"memory_region_init_io(&VAR_2->mmio, &... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
17
],
[
19
],
[
23,
25
],
[
27
],
[
31
],
[
33
]
] |
20,729 | static inline void gen_cond_branch(DisasContext *dc, int cond)
{
int l1;
l1 = gen_new_label();
tcg_gen_brcond_tl(cond, cpu_R[dc->r0], cpu_R[dc->r1], l1);
gen_goto_tb(dc, 0, dc->pc + 4);
gen_set_label(l1);
gen_goto_tb(dc, 1, dc->pc + (sign_extend(dc->imm16 << 2, 16)));
dc->is_jmp = ... | false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static inline void gen_cond_branch(DisasContext *dc, int cond)
{
int l1;
l1 = gen_new_label();
tcg_gen_brcond_tl(cond, cpu_R[dc->r0], cpu_R[dc->r1], l1);
gen_goto_tb(dc, 0, dc->pc + 4);
gen_set_label(l1);
gen_goto_tb(dc, 1, dc->pc + (sign_extend(dc->imm16 << 2, 16)));
dc->is_jmp = ... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(DisasContext *VAR_0, int VAR_1)
{
int VAR_2;
VAR_2 = gen_new_label();
tcg_gen_brcond_tl(VAR_1, cpu_R[VAR_0->r0], cpu_R[VAR_0->r1], VAR_2);
gen_goto_tb(VAR_0, 0, VAR_0->pc + 4);
gen_set_label(VAR_2);
gen_goto_tb(VAR_0, 1, VAR_0->pc + (sign_extend(VAR_0->imm16 <<... | [
"static inline void FUNC_0(DisasContext *VAR_0, int VAR_1)\n{",
"int VAR_2;",
"VAR_2 = gen_new_label();",
"tcg_gen_brcond_tl(VAR_1, cpu_R[VAR_0->r0], cpu_R[VAR_0->r1], VAR_2);",
"gen_goto_tb(VAR_0, 0, VAR_0->pc + 4);",
"gen_set_label(VAR_2);",
"gen_goto_tb(VAR_0, 1, VAR_0->pc + (sign_extend(VAR_0->imm16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
20,730 | static void RENAME(sws_init_swScale)(SwsContext *c)
{
enum PixelFormat srcFormat = c->srcFormat;
if (!(c->flags & SWS_BITEXACT)) {
if (c->flags & SWS_ACCURATE_RND) {
c->yuv2yuv1 = RENAME(yuv2yuv1_ar );
c->yuv2yuvX = RENAME(yuv2yuvX_ar );
switch ... | false | FFmpeg | ba91bf58cd8bab4de55ec31ffcdf6cc71f7e5e42 | static void RENAME(sws_init_swScale)(SwsContext *c)
{
enum PixelFormat srcFormat = c->srcFormat;
if (!(c->flags & SWS_BITEXACT)) {
if (c->flags & SWS_ACCURATE_RND) {
c->yuv2yuv1 = RENAME(yuv2yuv1_ar );
c->yuv2yuvX = RENAME(yuv2yuvX_ar );
switch ... | {
"code": [],
"line_no": []
} | static void FUNC_0(sws_init_swScale)(SwsContext *c)
{
enum PixelFormat VAR_0 = c->VAR_0;
if (!(c->flags & SWS_BITEXACT)) {
if (c->flags & SWS_ACCURATE_RND) {
c->yuv2yuv1 = FUNC_0(yuv2yuv1_ar );
c->yuv2yuvX = FUNC_0(yuv2yuvX_ar );
switch (c->dstF... | [
"static void FUNC_0(sws_init_swScale)(SwsContext *c)\n{",
"enum PixelFormat VAR_0 = c->VAR_0;",
"if (!(c->flags & SWS_BITEXACT)) {",
"if (c->flags & SWS_ACCURATE_RND) {",
"c->yuv2yuv1 = FUNC_0(yuv2yuv1_ar );",
"c->yuv2yuvX = FUNC_0(yuv2yuvX_ar );",
"switch (c->dstFormat) {",
"case PIX_FM... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
20,731 | static void tftp_handle_rrq(struct tftp_t *tp, int pktlen)
{
struct tftp_session *spt;
int s, k, n;
u_int8_t *src, *dst;
s = tftp_session_allocate(tp);
if (s < 0) {
return;
}
spt = &tftp_sessions[s];
src = tp->x.tp_buf;
dst = spt->filename;
n = pktlen - ((uint8_t *)&tp->x.tp_... | false | qemu | f8e3cbd3b5d1c76ec295cfc8858fd696188c270d | static void tftp_handle_rrq(struct tftp_t *tp, int pktlen)
{
struct tftp_session *spt;
int s, k, n;
u_int8_t *src, *dst;
s = tftp_session_allocate(tp);
if (s < 0) {
return;
}
spt = &tftp_sessions[s];
src = tp->x.tp_buf;
dst = spt->filename;
n = pktlen - ((uint8_t *)&tp->x.tp_... | {
"code": [],
"line_no": []
} | static void FUNC_0(struct tftp_t *VAR_0, int VAR_1)
{
struct tftp_session *VAR_2;
int VAR_3, VAR_4, VAR_5;
u_int8_t *src, *dst;
VAR_3 = tftp_session_allocate(VAR_0);
if (VAR_3 < 0) {
return;
}
VAR_2 = &tftp_sessions[VAR_3];
src = VAR_0->x.tp_buf;
dst = VAR_2->filename;
VAR_5 ... | [
"static void FUNC_0(struct tftp_t *VAR_0, int VAR_1)\n{",
"struct tftp_session *VAR_2;",
"int VAR_3, VAR_4, VAR_5;",
"u_int8_t *src, *dst;",
"VAR_3 = tftp_session_allocate(VAR_0);",
"if (VAR_3 < 0) {",
"return;",
"}",
"VAR_2 = &tftp_sessions[VAR_3];",
"src = VAR_0->x.tp_buf;",
"dst = VAR_2->file... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
33
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
57
... |
20,732 | static int waveformat_to_audio_settings (WAVEFORMATEX *wfx, audsettings_t *as)
{
if (wfx->wFormatTag != WAVE_FORMAT_PCM) {
dolog ("Invalid wave format, tag is not PCM, but %d\n",
wfx->wFormatTag);
return -1;
}
if (!wfx->nSamplesPerSec) {
dolog ("Invalid wave ... | false | qemu | 1ea879e5580f63414693655fcf0328559cdce138 | static int waveformat_to_audio_settings (WAVEFORMATEX *wfx, audsettings_t *as)
{
if (wfx->wFormatTag != WAVE_FORMAT_PCM) {
dolog ("Invalid wave format, tag is not PCM, but %d\n",
wfx->wFormatTag);
return -1;
}
if (!wfx->nSamplesPerSec) {
dolog ("Invalid wave ... | {
"code": [],
"line_no": []
} | static int FUNC_0 (WAVEFORMATEX *VAR_0, audsettings_t *VAR_1)
{
if (VAR_0->wFormatTag != WAVE_FORMAT_PCM) {
dolog ("Invalid wave format, tag is not PCM, but %d\n",
VAR_0->wFormatTag);
return -1;
}
if (!VAR_0->nSamplesPerSec) {
dolog ("Invalid wave format, fre... | [
"static int FUNC_0 (WAVEFORMATEX *VAR_0, audsettings_t *VAR_1)\n{",
"if (VAR_0->wFormatTag != WAVE_FORMAT_PCM) {",
"dolog (\"Invalid wave format, tag is not PCM, but %d\\n\",\nVAR_0->wFormatTag);",
"return -1;",
"}",
"if (!VAR_0->nSamplesPerSec) {",
"dolog (\"Invalid wave format, frequency is zero\\n\")... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31,
33
],
[
35
],
[
39,
41
],
[
43
],
[
47,
49,
51,
53,
55
],
[... |
20,733 | void css_queue_crw(uint8_t rsc, uint8_t erc, int chain, uint16_t rsid)
{
CrwContainer *crw_cont;
trace_css_crw(rsc, erc, rsid, chain ? "(chained)" : "");
/* TODO: Maybe use a static crw pool? */
crw_cont = g_try_malloc0(sizeof(CrwContainer));
if (!crw_cont) {
channel_subsys.crws_los... | false | qemu | 5c8d6f008c0555b54cf10550fa86199a2cfabbca | void css_queue_crw(uint8_t rsc, uint8_t erc, int chain, uint16_t rsid)
{
CrwContainer *crw_cont;
trace_css_crw(rsc, erc, rsid, chain ? "(chained)" : "");
crw_cont = g_try_malloc0(sizeof(CrwContainer));
if (!crw_cont) {
channel_subsys.crws_lost = true;
return;
}
c... | {
"code": [],
"line_no": []
} | void FUNC_0(uint8_t VAR_0, uint8_t VAR_1, int VAR_2, uint16_t VAR_3)
{
CrwContainer *crw_cont;
trace_css_crw(VAR_0, VAR_1, VAR_3, VAR_2 ? "(chained)" : "");
crw_cont = g_try_malloc0(sizeof(CrwContainer));
if (!crw_cont) {
channel_subsys.crws_lost = true;
return;
}
... | [
"void FUNC_0(uint8_t VAR_0, uint8_t VAR_1, int VAR_2, uint16_t VAR_3)\n{",
"CrwContainer *crw_cont;",
"trace_css_crw(VAR_0, VAR_1, VAR_3, VAR_2 ? \"(chained)\" : \"\");",
"crw_cont = g_try_malloc0(sizeof(CrwContainer));",
"if (!crw_cont) {",
"channel_subsys.crws_lost = true;",
"return;",
"}",
"crw_c... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49... |
20,734 | static int buffered_get_fd(void *opaque)
{
QEMUFileBuffered *s = opaque;
return qemu_get_fd(s->file);
}
| false | qemu | 0d82d0e8b98cf0ea03a45f8542d835ebd3a84cd3 | static int buffered_get_fd(void *opaque)
{
QEMUFileBuffered *s = opaque;
return qemu_get_fd(s->file);
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0)
{
QEMUFileBuffered *s = VAR_0;
return qemu_get_fd(s->file);
}
| [
"static int FUNC_0(void *VAR_0)\n{",
"QEMUFileBuffered *s = VAR_0;",
"return qemu_get_fd(s->file);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
20,735 | size_t qemu_file_get_rate_limit(QEMUFile *f)
{
if (f->get_rate_limit)
return f->get_rate_limit(f->opaque);
return 0;
}
| false | qemu | 3d002df33eb034757d98e1ae529318f57df78f91 | size_t qemu_file_get_rate_limit(QEMUFile *f)
{
if (f->get_rate_limit)
return f->get_rate_limit(f->opaque);
return 0;
}
| {
"code": [],
"line_no": []
} | size_t FUNC_0(QEMUFile *f)
{
if (f->get_rate_limit)
return f->get_rate_limit(f->opaque);
return 0;
}
| [
"size_t FUNC_0(QEMUFile *f)\n{",
"if (f->get_rate_limit)\nreturn f->get_rate_limit(f->opaque);",
"return 0;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
11
],
[
13
]
] |
20,736 | static uint8_t *csrhci_out_packet(struct csrhci_s *s, int len)
{
int off = s->out_start + s->out_len;
/* TODO: do the padding here, i.e. align len */
s->out_len += len;
if (off < FIFO_LEN) {
if (off + len > FIFO_LEN && (s->out_size = off + len) > FIFO_LEN * 2) {
fprintf(st... | false | qemu | bf937a7965c1d1a6dce4f615d0ead2e2ab505004 | static uint8_t *csrhci_out_packet(struct csrhci_s *s, int len)
{
int off = s->out_start + s->out_len;
s->out_len += len;
if (off < FIFO_LEN) {
if (off + len > FIFO_LEN && (s->out_size = off + len) > FIFO_LEN * 2) {
fprintf(stderr, "%s: can't alloc %i bytes\n", __func__, l... | {
"code": [],
"line_no": []
} | static uint8_t *FUNC_0(struct csrhci_s *s, int len)
{
int VAR_0 = s->out_start + s->out_len;
s->out_len += len;
if (VAR_0 < FIFO_LEN) {
if (VAR_0 + len > FIFO_LEN && (s->out_size = VAR_0 + len) > FIFO_LEN * 2) {
fprintf(stderr, "%s: can't alloc %i bytes\n", __func__, len)... | [
"static uint8_t *FUNC_0(struct csrhci_s *s, int len)\n{",
"int VAR_0 = s->out_start + s->out_len;",
"s->out_len += len;",
"if (VAR_0 < FIFO_LEN) {",
"if (VAR_0 + len > FIFO_LEN && (s->out_size = VAR_0 + len) > FIFO_LEN * 2) {",
"fprintf(stderr, \"%s: can't alloc %i bytes\\n\", __func__, len);",
"exit(-1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
]
] |
20,737 | 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_... | false | qemu | c645d5acee0ae022534cb609184277ec2b4a8577 | 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_... | {
"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_obje... | [
"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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13,
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
77
... |
20,739 | static void musicpal_init(ram_addr_t ram_size, int vga_ram_size,
const char *boot_device, DisplayState *ds,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
CPUState *env;
qemu_irq *pic;
int ind... | false | qemu | c8256f9d23bba4fac3b0b6a9e6e3dc12362cbe0b | static void musicpal_init(ram_addr_t ram_size, int vga_ram_size,
const char *boot_device, DisplayState *ds,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
CPUState *env;
qemu_irq *pic;
int ind... | {
"code": [],
"line_no": []
} | static void FUNC_0(ram_addr_t VAR_0, int VAR_1,
const char *VAR_2, DisplayState *VAR_3,
const char *VAR_4, const char *VAR_5,
const char *VAR_6, const char *VAR_7)
{
CPUState *env;
qemu_irq *pic;
int VAR_8;
int VAR_9;
unsigned long VAR_10;
... | [
"static void FUNC_0(ram_addr_t VAR_0, int VAR_1,\nconst char *VAR_2, DisplayState *VAR_3,\nconst char *VAR_4, const char *VAR_5,\nconst char *VAR_6, const char *VAR_7)\n{",
"CPUState *env;",
"qemu_irq *pic;",
"int VAR_8;",
"int VAR_9;",
"unsigned long VAR_10;",
"if (!VAR_7)\nVAR_7 = \"arm926\";",
"env... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
45,
47
],
[
51
],
[
53
],
[
59,
61
... |
20,740 | void helper_sysenter(CPUX86State *env)
{
if (env->sysenter_cs == 0) {
raise_exception_err(env, EXCP0D_GPF, 0);
}
env->eflags &= ~(VM_MASK | IF_MASK | RF_MASK);
cpu_x86_set_cpl(env, 0);
#ifdef TARGET_X86_64
if (env->hflags & HF_LMA_MASK) {
cpu_x86_load_seg_cache(env, R_CS, ... | false | qemu | 7848c8d19f8556666df25044bbd5d8b29439c368 | void helper_sysenter(CPUX86State *env)
{
if (env->sysenter_cs == 0) {
raise_exception_err(env, EXCP0D_GPF, 0);
}
env->eflags &= ~(VM_MASK | IF_MASK | RF_MASK);
cpu_x86_set_cpl(env, 0);
#ifdef TARGET_X86_64
if (env->hflags & HF_LMA_MASK) {
cpu_x86_load_seg_cache(env, R_CS, ... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUX86State *VAR_0)
{
if (VAR_0->sysenter_cs == 0) {
raise_exception_err(VAR_0, EXCP0D_GPF, 0);
}
VAR_0->eflags &= ~(VM_MASK | IF_MASK | RF_MASK);
cpu_x86_set_cpl(VAR_0, 0);
#ifdef TARGET_X86_64
if (VAR_0->hflags & HF_LMA_MASK) {
cpu_x86_load_seg_cache(VAR_0, R... | [
"void FUNC_0(CPUX86State *VAR_0)\n{",
"if (VAR_0->sysenter_cs == 0) {",
"raise_exception_err(VAR_0, EXCP0D_GPF, 0);",
"}",
"VAR_0->eflags &= ~(VM_MASK | IF_MASK | RF_MASK);",
"cpu_x86_set_cpl(VAR_0, 0);",
"#ifdef TARGET_X86_64\nif (VAR_0->hflags & HF_LMA_MASK) {",
"cpu_x86_load_seg_cache(VAR_0, R_CS, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
21,
23,
25,
27,
29,
31
],
[
33
],
[
35,
37
],
[
39,
41,
43,
45,
47
],
[
49
],
[
51,
53,
55,
57,... |
20,742 | int bdrv_snapshot_load_tmp_by_id_or_name(BlockDriverState *bs,
const char *id_or_name,
Error **errp)
{
int ret;
Error *local_err = NULL;
ret = bdrv_snapshot_load_tmp(bs, id_or_name, NULL, &local_err);
if (ret == -... | false | qemu | 621ff94d5074d88253a5818c6b9c4db718fbfc65 | int bdrv_snapshot_load_tmp_by_id_or_name(BlockDriverState *bs,
const char *id_or_name,
Error **errp)
{
int ret;
Error *local_err = NULL;
ret = bdrv_snapshot_load_tmp(bs, id_or_name, NULL, &local_err);
if (ret == -... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0,
const char *VAR_1,
Error **VAR_2)
{
int VAR_3;
Error *local_err = NULL;
VAR_3 = bdrv_snapshot_load_tmp(VAR_0, VAR_1, NULL, &local_err);
if (VAR_3 == -ENOENT || VAR_3 == -EINVAL)... | [
"int FUNC_0(BlockDriverState *VAR_0,\nconst char *VAR_1,\nError **VAR_2)\n{",
"int VAR_3;",
"Error *local_err = NULL;",
"VAR_3 = bdrv_snapshot_load_tmp(VAR_0, VAR_1, NULL, &local_err);",
"if (VAR_3 == -ENOENT || VAR_3 == -EINVAL) {",
"error_free(local_err);",
"local_err = NULL;",
"VAR_3 = bdrv_snapsho... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
]
] |
20,745 | void vnc_init_state(VncState *vs)
{
vs->initialized = true;
VncDisplay *vd = vs->vd;
bool first_client = QTAILQ_EMPTY(&vd->clients);
vs->last_x = -1;
vs->last_y = -1;
vs->as.freq = 44100;
vs->as.nchannels = 2;
vs->as.fmt = AUD_FMT_S16;
vs->as.endianness = 0;
qemu... | false | qemu | 2df2041036ee63ff9116631c6214e3ffb5f4bf45 | void vnc_init_state(VncState *vs)
{
vs->initialized = true;
VncDisplay *vd = vs->vd;
bool first_client = QTAILQ_EMPTY(&vd->clients);
vs->last_x = -1;
vs->last_y = -1;
vs->as.freq = 44100;
vs->as.nchannels = 2;
vs->as.fmt = AUD_FMT_S16;
vs->as.endianness = 0;
qemu... | {
"code": [],
"line_no": []
} | void FUNC_0(VncState *VAR_0)
{
VAR_0->initialized = true;
VncDisplay *vd = VAR_0->vd;
bool first_client = QTAILQ_EMPTY(&vd->clients);
VAR_0->last_x = -1;
VAR_0->last_y = -1;
VAR_0->as.freq = 44100;
VAR_0->as.nchannels = 2;
VAR_0->as.fmt = AUD_FMT_S16;
VAR_0->as.endianne... | [
"void FUNC_0(VncState *VAR_0)\n{",
"VAR_0->initialized = true;",
"VncDisplay *vd = VAR_0->vd;",
"bool first_client = QTAILQ_EMPTY(&vd->clients);",
"VAR_0->last_x = -1;",
"VAR_0->last_y = -1;",
"VAR_0->as.freq = 44100;",
"VAR_0->as.nchannels = 2;",
"VAR_0->as.fmt = AUD_FMT_S16;",
"VAR_0->as.endiann... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
49
],
[
51
],
[
53
... |
20,746 | void migrate_fd_error(MigrationState *s, const Error *error)
{
trace_migrate_fd_error(error ? error_get_pretty(error) : "");
assert(s->to_dst_file == NULL);
migrate_set_state(&s->state, MIGRATION_STATUS_SETUP,
MIGRATION_STATUS_FAILED);
if (!s->error) {
s->error = err... | false | qemu | 25174055f428254427e7541139037eb9a34fc109 | void migrate_fd_error(MigrationState *s, const Error *error)
{
trace_migrate_fd_error(error ? error_get_pretty(error) : "");
assert(s->to_dst_file == NULL);
migrate_set_state(&s->state, MIGRATION_STATUS_SETUP,
MIGRATION_STATUS_FAILED);
if (!s->error) {
s->error = err... | {
"code": [],
"line_no": []
} | void FUNC_0(MigrationState *VAR_0, const Error *VAR_1)
{
trace_migrate_fd_error(VAR_1 ? error_get_pretty(VAR_1) : "");
assert(VAR_0->to_dst_file == NULL);
migrate_set_state(&VAR_0->state, MIGRATION_STATUS_SETUP,
MIGRATION_STATUS_FAILED);
if (!VAR_0->VAR_1) {
VAR_0->V... | [
"void FUNC_0(MigrationState *VAR_0, const Error *VAR_1)\n{",
"trace_migrate_fd_error(VAR_1 ? error_get_pretty(VAR_1) : \"\");",
"assert(VAR_0->to_dst_file == NULL);",
"migrate_set_state(&VAR_0->state, MIGRATION_STATUS_SETUP,\nMIGRATION_STATUS_FAILED);",
"if (!VAR_0->VAR_1) {",
"VAR_0->VAR_1 = error_copy(V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
20,747 | get_field (const unsigned char *data, enum floatformat_byteorders order,
unsigned int total_len, unsigned int start, unsigned int len)
{
unsigned long result;
unsigned int cur_byte;
int cur_bitshift;
/* Start at the least significant part of the field. */
cur_byte = (start + len) / FLOATF... | false | qemu | 2e3883d03df167b15f2acc5345eb9a7e0150a062 | get_field (const unsigned char *data, enum floatformat_byteorders order,
unsigned int total_len, unsigned int start, unsigned int len)
{
unsigned long result;
unsigned int cur_byte;
int cur_bitshift;
cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT;
if (order == floatformat_little)
... | {
"code": [],
"line_no": []
} | FUNC_0 (const unsigned char *VAR_0, enum floatformat_byteorders VAR_1,
unsigned int VAR_2, unsigned int VAR_3, unsigned int VAR_4)
{
unsigned long VAR_5;
unsigned int VAR_6;
int VAR_7;
VAR_6 = (VAR_3 + VAR_4) / FLOATFORMAT_CHAR_BIT;
if (VAR_1 == floatformat_little)
VAR_6 = (VAR_2 ... | [
"FUNC_0 (const unsigned char *VAR_0, enum floatformat_byteorders VAR_1,\nunsigned int VAR_2, unsigned int VAR_3, unsigned int VAR_4)\n{",
"unsigned long VAR_5;",
"unsigned int VAR_6;",
"int VAR_7;",
"VAR_6 = (VAR_3 + VAR_4) / FLOATFORMAT_CHAR_BIT;",
"if (VAR_1 == floatformat_little)\nVAR_6 = (VAR_2 / FLOA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19,
21
],
[
23,
25
],
[
27
],
[
29
],
[
31,
33
],
[
35,
37
],
[
43,
45
],
[
47,
53,
55,
57
],
[
59,
61
],
[
63
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.