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 |
|---|---|---|---|---|---|---|---|---|---|---|
7,589 | static QDictEntry *qdict_find(const QDict *qdict,
const char *key, unsigned int hash)
{
QDictEntry *entry;
LIST_FOREACH(entry, &qdict->table[hash], next)
if (!strcmp(entry->key, key))
return entry;
return NULL;
}
| false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | static QDictEntry *qdict_find(const QDict *qdict,
const char *key, unsigned int hash)
{
QDictEntry *entry;
LIST_FOREACH(entry, &qdict->table[hash], next)
if (!strcmp(entry->key, key))
return entry;
return NULL;
}
| {
"code": [],
"line_no": []
} | static QDictEntry *FUNC_0(const QDict *qdict,
const char *key, unsigned int hash)
{
QDictEntry *entry;
LIST_FOREACH(entry, &qdict->table[hash], next)
if (!strcmp(entry->key, key))
return entry;
return NULL;
}
| [
"static QDictEntry *FUNC_0(const QDict *qdict,\nconst char *key, unsigned int hash)\n{",
"QDictEntry *entry;",
"LIST_FOREACH(entry, &qdict->table[hash], next)\nif (!strcmp(entry->key, key))\nreturn entry;",
"return NULL;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11,
13,
15
],
[
19
],
[
21
]
] |
7,591 | int css_do_tsch(SubchDev *sch, IRB *target_irb)
{
SCSW *s = &sch->curr_status.scsw;
PMCW *p = &sch->curr_status.pmcw;
uint16_t stctl;
uint16_t fctl;
uint16_t actl;
IRB irb;
int ret;
if (!(p->flags & (PMCW_FLAGS_MASK_DNV | PMCW_FLAGS_MASK_ENA))) {
ret = 3;
got... | true | qemu | 8312976e73fce9689ab831c1da565ec413680cff | int css_do_tsch(SubchDev *sch, IRB *target_irb)
{
SCSW *s = &sch->curr_status.scsw;
PMCW *p = &sch->curr_status.pmcw;
uint16_t stctl;
uint16_t fctl;
uint16_t actl;
IRB irb;
int ret;
if (!(p->flags & (PMCW_FLAGS_MASK_DNV | PMCW_FLAGS_MASK_ENA))) {
ret = 3;
got... | {
"code": [
" irb.esw[1] = 0x02000000 | (sizeof(sch->sense_data) << 8);"
],
"line_no": [
77
]
} | int FUNC_0(SubchDev *VAR_0, IRB *VAR_1)
{
SCSW *s = &VAR_0->curr_status.scsw;
PMCW *p = &VAR_0->curr_status.pmcw;
uint16_t stctl;
uint16_t fctl;
uint16_t actl;
IRB irb;
int VAR_2;
if (!(p->flags & (PMCW_FLAGS_MASK_DNV | PMCW_FLAGS_MASK_ENA))) {
VAR_2 = 3;
got... | [
"int FUNC_0(SubchDev *VAR_0, IRB *VAR_1)\n{",
"SCSW *s = &VAR_0->curr_status.scsw;",
"PMCW *p = &VAR_0->curr_status.pmcw;",
"uint16_t stctl;",
"uint16_t fctl;",
"uint16_t actl;",
"IRB irb;",
"int VAR_2;",
"if (!(p->flags & (PMCW_FLAGS_MASK_DNV | PMCW_FLAGS_MASK_ENA))) {",
"VAR_2 = 3;",
"goto out... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
41
],
[
47
],
[
49
],
[
51,
53,
55
... |
7,592 | int ff_mpeg4_frame_end(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
{
Mpeg4DecContext *ctx = avctx->priv_data;
MpegEncContext *s = &ctx->m;
/* divx 5.01+ bitstream reorder stuff */
/* Since this clobbers the input buffer and hwaccel codecs still need the
* data during hwaccel... | true | FFmpeg | 21b25537fb8f77b098575e90d8b24556451badf3 | int ff_mpeg4_frame_end(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
{
Mpeg4DecContext *ctx = avctx->priv_data;
MpegEncContext *s = &ctx->m;
if (s->divx_packed) {
int current_pos = s->gb.buffer == s->bitstream_buffer ? 0 : (get_bits_count(&s->gb) >> 3);
... | {
"code": [
" av_fast_malloc(&s->bitstream_buffer,",
" buf_size - current_pos +",
" FF_INPUT_BUFFER_PADDING_SIZE);"
],
"line_no": [
55,
59,
61
]
} | int FUNC_0(AVCodecContext *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
Mpeg4DecContext *ctx = VAR_0->priv_data;
MpegEncContext *s = &ctx->m;
if (s->divx_packed) {
int VAR_3 = s->gb.buffer == s->bitstream_buffer ? 0 : (get_bits_count(&s->gb) >> 3);
int VAR_4 = 0;
... | [
"int FUNC_0(AVCodecContext *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"Mpeg4DecContext *ctx = VAR_0->priv_data;",
"MpegEncContext *s = &ctx->m;",
"if (s->divx_packed) {",
"int VAR_3 = s->gb.buffer == s->bitstream_buffer ? 0 : (get_bits_count(&s->gb) >> 3);",
"int VAR_4 = 0;",
"if (VAR_2 - VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
35,
37,
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55,
57,
59,
61
],
[
63... |
7,593 | static void pxb_host_class_init(ObjectClass *class, void *data)
{
DeviceClass *dc = DEVICE_CLASS(class);
SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(class);
PCIHostBridgeClass *hc = PCI_HOST_BRIDGE_CLASS(class);
dc->fw_name = "pci";
sbc->explicit_ofw_unit_address = pxb_host_ofw_unit_addr... | true | qemu | bf8d492405feaee2c1685b3b9d5e03228ed3e47f | static void pxb_host_class_init(ObjectClass *class, void *data)
{
DeviceClass *dc = DEVICE_CLASS(class);
SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(class);
PCIHostBridgeClass *hc = PCI_HOST_BRIDGE_CLASS(class);
dc->fw_name = "pci";
sbc->explicit_ofw_unit_address = pxb_host_ofw_unit_addr... | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(VAR_0);
PCIHostBridgeClass *hc = PCI_HOST_BRIDGE_CLASS(VAR_0);
dc->fw_name = "pci";
sbc->explicit_ofw_unit_address = pxb_host_ofw_unit_address;
hc... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(VAR_0);",
"PCIHostBridgeClass *hc = PCI_HOST_BRIDGE_CLASS(VAR_0);",
"dc->fw_name = \"pci\";",
"sbc->explicit_ofw_unit_address = pxb_host_ofw_unit_address;",
... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
]
] |
7,594 | static int vmsa_ttbcr_raw_write(CPUARMState *env, const ARMCPRegInfo *ri,
uint64_t value)
{
if (arm_feature(env, ARM_FEATURE_LPAE)) {
value &= ~((7 << 19) | (3 << 14) | (0xf << 3));
} else {
value &= 7;
}
/* Note that we always calculate c2_mask an... | true | qemu | 2ebcebe262e88111ff583f97bc5fe0aae64b8940 | static int vmsa_ttbcr_raw_write(CPUARMState *env, const ARMCPRegInfo *ri,
uint64_t value)
{
if (arm_feature(env, ARM_FEATURE_LPAE)) {
value &= ~((7 << 19) | (3 << 14) | (0xf << 3));
} else {
value &= 7;
}
env->cp15.c2_control = value;... | {
"code": [
" env->cp15.c2_mask = ~(((uint32_t)0xffffffffu) >> value);",
" env->cp15.c2_base_mask = ~((uint32_t)0x3fffu >> value);"
],
"line_no": [
29,
31
]
} | static int FUNC_0(CPUARMState *VAR_0, const ARMCPRegInfo *VAR_1,
uint64_t VAR_2)
{
if (arm_feature(VAR_0, ARM_FEATURE_LPAE)) {
VAR_2 &= ~((7 << 19) | (3 << 14) | (0xf << 3));
} else {
VAR_2 &= 7;
}
VAR_0->cp15.c2_control = VAR_2;
... | [
"static int FUNC_0(CPUARMState *VAR_0, const ARMCPRegInfo *VAR_1,\nuint64_t VAR_2)\n{",
"if (arm_feature(VAR_0, ARM_FEATURE_LPAE)) {",
"VAR_2 &= ~((7 << 19) | (3 << 14) | (0xf << 3));",
"} else {",
"VAR_2 &= 7;",
"}",
"VAR_0->cp15.c2_control = VAR_2;",
"VAR_0->cp15.c2_mask = ~(((uint32_t)0xffffffffu) ... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
7,595 | av_cold int ff_dcaadpcm_init(DCAADPCMEncContext *s)
{
if (!s)
return -1;
s->private_data = av_malloc(sizeof(premultiplied_coeffs) * DCA_ADPCM_VQCODEBOOK_SZ);
precalc(s->private_data);
return 0;
} | true | FFmpeg | 34fb84a97d112d85091369e9ef9ce177a05644e9 | av_cold int ff_dcaadpcm_init(DCAADPCMEncContext *s)
{
if (!s)
return -1;
s->private_data = av_malloc(sizeof(premultiplied_coeffs) * DCA_ADPCM_VQCODEBOOK_SZ);
precalc(s->private_data);
return 0;
} | {
"code": [],
"line_no": []
} | av_cold int FUNC_0(DCAADPCMEncContext *s)
{
if (!s)
return -1;
s->private_data = av_malloc(sizeof(premultiplied_coeffs) * DCA_ADPCM_VQCODEBOOK_SZ);
precalc(s->private_data);
return 0;
} | [
"av_cold int FUNC_0(DCAADPCMEncContext *s)\n{",
"if (!s)\nreturn -1;",
"s->private_data = av_malloc(sizeof(premultiplied_coeffs) * DCA_ADPCM_VQCODEBOOK_SZ);",
"precalc(s->private_data);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3,
4
],
[
5
],
[
6
],
[
7
],
[
8
]
] |
7,597 | static void null_draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) { }
| true | FFmpeg | 06bf6d3bc04979bd39ecdc7311d0daf8aee7e10f | static void null_draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) { }
| {
"code": [
"static void null_draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) { }"
],
"line_no": [
1
]
} | static void FUNC_0(AVFilterLink *VAR_0, int VAR_1, int VAR_2, int VAR_3) { }
| [
"static void FUNC_0(AVFilterLink *VAR_0, int VAR_1, int VAR_2, int VAR_3) { }"
] | [
1
] | [
[
1
]
] |
7,599 | static int dirac_unpack_idwt_params(DiracContext *s)
{
GetBitContext *gb = &s->gb;
int i, level;
unsigned tmp;
#define CHECKEDREAD(dst, cond, errmsg) \
tmp = svq3_get_ue_golomb(gb); \
if (cond) { \
av_log(s->avctx, AV_LOG_ERROR, errmsg); \
return -1; \
}\
dst = t... | false | FFmpeg | 5145d22b88b9835db81c4d286b931a78e08ab76a | static int dirac_unpack_idwt_params(DiracContext *s)
{
GetBitContext *gb = &s->gb;
int i, level;
unsigned tmp;
#define CHECKEDREAD(dst, cond, errmsg) \
tmp = svq3_get_ue_golomb(gb); \
if (cond) { \
av_log(s->avctx, AV_LOG_ERROR, errmsg); \
return -1; \
}\
dst = t... | {
"code": [],
"line_no": []
} | static int FUNC_0(DiracContext *VAR_0)
{
GetBitContext *gb = &VAR_0->gb;
int VAR_1, VAR_2;
unsigned VAR_3;
#define CHECKEDREAD(dst, cond, errmsg) \
VAR_3 = svq3_get_ue_golomb(gb); \
if (cond) { \
av_log(VAR_0->avctx, AV_LOG_ERROR, errmsg); \
return -1; \
}\
dst =... | [
"static int FUNC_0(DiracContext *VAR_0)\n{",
"GetBitContext *gb = &VAR_0->gb;",
"int VAR_1, VAR_2;",
"unsigned VAR_3;",
"#define CHECKEDREAD(dst, cond, errmsg) \\\nVAR_3 = svq3_get_ue_golomb(gb); \\",
"if (cond) { \\",
"av_log(VAR_0->avctx, AV_LOG_ERROR, errmsg); \\",
"return -1; \\",
"}\\",
"dst ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33
],
[
35,
37
],
[
43,
47,
51
],
[
55
],
[
57
],
[
59,
61,
63
... |
7,600 | static int yop_probe(AVProbeData *probe_packet)
{
if (AV_RB16(probe_packet->buf) == AV_RB16("YO") &&
probe_packet->buf[6] &&
probe_packet->buf[7] &&
!(probe_packet->buf[8] & 1) &&
!(probe_packet->buf[10] & 1))
... | false | FFmpeg | 76170f537304cc845d6d334d36daa0a0f16efb32 | static int yop_probe(AVProbeData *probe_packet)
{
if (AV_RB16(probe_packet->buf) == AV_RB16("YO") &&
probe_packet->buf[6] &&
probe_packet->buf[7] &&
!(probe_packet->buf[8] & 1) &&
!(probe_packet->buf[10] & 1))
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVProbeData *VAR_0)
{
if (AV_RB16(VAR_0->buf) == AV_RB16("YO") &&
VAR_0->buf[6] &&
VAR_0->buf[7] &&
!(VAR_0->buf[8] & 1) &&
!(VAR_0->buf[10] & 1))
return AVPROBE_SCORE_MAX * 3 / 4;
... | [
"static int FUNC_0(AVProbeData *VAR_0)\n{",
"if (AV_RB16(VAR_0->buf) == AV_RB16(\"YO\") &&\nVAR_0->buf[6] &&\nVAR_0->buf[7] &&\n!(VAR_0->buf[8] & 1) &&\n!(VAR_0->buf[10] & 1))\nreturn AVPROBE_SCORE_MAX * 3 / 4;",
"return 0;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7,
9,
11,
13,
15
],
[
19
],
[
21
]
] |
7,601 | av_cold int ff_vp8_decode_init(AVCodecContext *avctx)
{
VP8Context *s = avctx->priv_data;
int ret;
s->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
avctx->internal->allocate_progress = 1;
ff_videodsp_init(&s->vdsp, 8);
ff_h264_pred_init(&s->hpc, AV_CODEC_ID_VP8, 8, 1);
... | false | FFmpeg | b8664c929437d6d079e16979c496a2db40cf2324 | av_cold int ff_vp8_decode_init(AVCodecContext *avctx)
{
VP8Context *s = avctx->priv_data;
int ret;
s->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
avctx->internal->allocate_progress = 1;
ff_videodsp_init(&s->vdsp, 8);
ff_h264_pred_init(&s->hpc, AV_CODEC_ID_VP8, 8, 1);
... | {
"code": [],
"line_no": []
} | av_cold int FUNC_0(AVCodecContext *avctx)
{
VP8Context *s = avctx->priv_data;
int VAR_0;
s->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
avctx->internal->allocate_progress = 1;
ff_videodsp_init(&s->vdsp, 8);
ff_h264_pred_init(&s->hpc, AV_CODEC_ID_VP8, 8, 1);
ff_vp8dsp... | [
"av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"VP8Context *s = avctx->priv_data;",
"int VAR_0;",
"s->avctx = avctx;",
"avctx->pix_fmt = AV_PIX_FMT_YUV420P;",
"avctx->internal->allocate_progress = 1;",
"ff_videodsp_init(&s->vdsp, 8);",
"ff_h264_pred_init(&s->hpc, AV_CODEC_ID_VP8, 8, 1);",
"ff_vp8ds... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
]
] |
7,602 | static int decode_unk6(uint8_t *frame, int width, int height,
const uint8_t *src, const uint8_t *src_end)
{
return -1;
}
| true | FFmpeg | 29b0d94b43ac960cb442049a5d737a3386ff0337 | static int decode_unk6(uint8_t *frame, int width, int height,
const uint8_t *src, const uint8_t *src_end)
{
return -1;
}
| {
"code": [
" const uint8_t *src, const uint8_t *src_end)",
" const uint8_t *src, const uint8_t *src_end)",
" const uint8_t *src, const uint8_t *src_end)",
" const uint8_t *src, const uint8_t *src_end)",
" ... | static int FUNC_0(uint8_t *VAR_0, int VAR_1, int VAR_2,
const uint8_t *VAR_3, const uint8_t *VAR_4)
{
return -1;
}
| [
"static int FUNC_0(uint8_t *VAR_0, int VAR_1, int VAR_2,\nconst uint8_t *VAR_3, const uint8_t *VAR_4)\n{",
"return -1;",
"}"
] | [
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
7,603 | int ga_install_service(const char *path, const char *logfile,
const char *state_dir)
{
int ret = EXIT_FAILURE;
SC_HANDLE manager;
SC_HANDLE service;
TCHAR module_fname[MAX_PATH];
GString *cmdline;
SERVICE_DESCRIPTION desc = { (char *)QGA_SERVICE_DESCRIPTION };
... | true | qemu | 340d51df5592c5c11fc3885f7bdedbe581b87366 | int ga_install_service(const char *path, const char *logfile,
const char *state_dir)
{
int ret = EXIT_FAILURE;
SC_HANDLE manager;
SC_HANDLE service;
TCHAR module_fname[MAX_PATH];
GString *cmdline;
SERVICE_DESCRIPTION desc = { (char *)QGA_SERVICE_DESCRIPTION };
... | {
"code": [
" cmdline = g_string_new(module_fname);",
" g_string_append(cmdline, \" -d\");",
" g_string_append_printf(cmdline, \" -p %s\", path);",
" g_string_append_printf(cmdline, \" -l %s -v\", logfile);",
" g_string_append_printf(cmdline, \" -t %s\", state_dir);"
]... | int FUNC_0(const char *VAR_0, const char *VAR_1,
const char *VAR_2)
{
int VAR_3 = EXIT_FAILURE;
SC_HANDLE manager;
SC_HANDLE service;
TCHAR module_fname[MAX_PATH];
GString *cmdline;
SERVICE_DESCRIPTION desc = { (char *)QGA_SERVICE_DESCRIPTION };
if (GetModul... | [
"int FUNC_0(const char *VAR_0, const char *VAR_1,\nconst char *VAR_2)\n{",
"int VAR_3 = EXIT_FAILURE;",
"SC_HANDLE manager;",
"SC_HANDLE service;",
"TCHAR module_fname[MAX_PATH];",
"GString *cmdline;",
"SERVICE_DESCRIPTION desc = { (char *)QGA_SERVICE_DESCRIPTION };",
"if (GetModuleFileName(NULL, modu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
1,
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
7,604 | static size_t curl_read_cb(void *ptr, size_t size, size_t nmemb, void *opaque)
{
CURLState *s = ((CURLState*)opaque);
size_t realsize = size * nmemb;
int i;
DPRINTF("CURL: Just reading %zd bytes\n", realsize);
if (!s || !s->orig_buf)
goto read_end;
memcpy(s->orig_buf +... | true | qemu | 6d4b9e55fc625514a38d27cff4b9933f617fa7dc | static size_t curl_read_cb(void *ptr, size_t size, size_t nmemb, void *opaque)
{
CURLState *s = ((CURLState*)opaque);
size_t realsize = size * nmemb;
int i;
DPRINTF("CURL: Just reading %zd bytes\n", realsize);
if (!s || !s->orig_buf)
goto read_end;
memcpy(s->orig_buf +... | {
"code": [],
"line_no": []
} | static size_t FUNC_0(void *ptr, size_t size, size_t nmemb, void *opaque)
{
CURLState *s = ((CURLState*)opaque);
size_t realsize = size * nmemb;
int VAR_0;
DPRINTF("CURL: Just reading %zd bytes\n", realsize);
if (!s || !s->orig_buf)
goto read_end;
memcpy(s->orig_buf + s... | [
"static size_t FUNC_0(void *ptr, size_t size, size_t nmemb, void *opaque)\n{",
"CURLState *s = ((CURLState*)opaque);",
"size_t realsize = size * nmemb;",
"int VAR_0;",
"DPRINTF(\"CURL: Just reading %zd bytes\\n\", realsize);",
"if (!s || !s->orig_buf)\ngoto read_end;",
"memcpy(s->orig_buf + s->buf_off, ... | [
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
],
[
28
],
[
30
],
[
34
],
[
36
],
[
40,
42
],
[
46
],
[
48,
50
],
[
52
],
[
54
],
[
56
],
[
62,
64
]
] |
7,605 | void qemu_sem_post(QemuSemaphore *sem)
{
int rc;
#if defined(__APPLE__) || defined(__NetBSD__)
pthread_mutex_lock(&sem->lock);
if (sem->count == INT_MAX) {
rc = EINVAL;
} else if (sem->count++ < 0) {
rc = pthread_cond_signal(&sem->cond);
} else {
rc = 0;
}
... | true | qemu | 79761c6681f0d1cc1c027116fcb4382d41ed3ece | void qemu_sem_post(QemuSemaphore *sem)
{
int rc;
#if defined(__APPLE__) || defined(__NetBSD__)
pthread_mutex_lock(&sem->lock);
if (sem->count == INT_MAX) {
rc = EINVAL;
} else if (sem->count++ < 0) {
rc = pthread_cond_signal(&sem->cond);
} else {
rc = 0;
}
... | {
"code": [
" if (sem->count == INT_MAX) {",
" } else if (sem->count++ < 0) {",
" rc = pthread_cond_signal(&sem->cond);",
" rc = 0;",
" int rc;"
],
"line_no": [
13,
17,
19,
23,
5
]
} | void FUNC_0(QemuSemaphore *VAR_0)
{
int VAR_1;
#if defined(__APPLE__) || defined(__NetBSD__)
pthread_mutex_lock(&VAR_0->lock);
if (VAR_0->count == INT_MAX) {
VAR_1 = EINVAL;
} else if (VAR_0->count++ < 0) {
VAR_1 = pthread_cond_signal(&VAR_0->cond);
} else {
VAR_1... | [
"void FUNC_0(QemuSemaphore *VAR_0)\n{",
"int VAR_1;",
"#if defined(__APPLE__) || defined(__NetBSD__)\npthread_mutex_lock(&VAR_0->lock);",
"if (VAR_0->count == INT_MAX) {",
"VAR_1 = EINVAL;",
"} else if (VAR_0->count++ < 0) {",
"VAR_1 = pthread_cond_signal(&VAR_0->cond);",
"} else {",
"VAR_1 = 0;",
... | [
0,
1,
0,
1,
0,
1,
1,
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
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45... |
7,606 | int scsi_convert_sense(uint8_t *in_buf, int in_len,
uint8_t *buf, int len, bool fixed)
{
SCSISense sense;
bool fixed_in;
fixed_in = (in_buf[0] & 2) == 0;
if (in_len && fixed == fixed_in) {
memcpy(buf, in_buf, MIN(len, in_len));
return MIN(len, in_len);
... | true | qemu | 2770c90d432b571cab718e28f838097f0b2201ec | int scsi_convert_sense(uint8_t *in_buf, int in_len,
uint8_t *buf, int len, bool fixed)
{
SCSISense sense;
bool fixed_in;
fixed_in = (in_buf[0] & 2) == 0;
if (in_len && fixed == fixed_in) {
memcpy(buf, in_buf, MIN(len, in_len));
return MIN(len, in_len);
... | {
"code": [
" if (in_len && fixed == fixed_in) {",
" if (in_len == 0) {",
" sense = SENSE_CODE(NO_SENSE);",
" return scsi_build_sense_buf(buf, len, sense, fixed);"
],
"line_no": [
15,
25,
27,
35
]
} | int FUNC_0(uint8_t *VAR_0, int VAR_1,
uint8_t *VAR_2, int VAR_3, bool VAR_4)
{
SCSISense sense;
bool fixed_in;
fixed_in = (VAR_0[0] & 2) == 0;
if (VAR_1 && VAR_4 == fixed_in) {
memcpy(VAR_2, VAR_0, MIN(VAR_3, VAR_1));
return MIN(VAR_3, VAR_1);
}
... | [
"int FUNC_0(uint8_t *VAR_0, int VAR_1,\nuint8_t *VAR_2, int VAR_3, bool VAR_4)\n{",
"SCSISense sense;",
"bool fixed_in;",
"fixed_in = (VAR_0[0] & 2) == 0;",
"if (VAR_1 && VAR_4 == fixed_in) {",
"memcpy(VAR_2, VAR_0, MIN(VAR_3, VAR_1));",
"return MIN(VAR_3, VAR_1);",
"}",
"if (VAR_1 == 0) {",
"sens... | [
0,
0,
0,
0,
1,
0,
0,
0,
1,
1,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
7,607 | static int encode_codebook(CinepakEncContext *s, int *codebook, int size, int chunk_type_yuv, int chunk_type_gray, unsigned char *buf)
{
int x, y, ret, entry_size = s->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;
ret = write_chunk_header(buf, s->pix_fmt == AV_PIX_FMT_YUV420P ? chunk_type_yuv : chunk_type_gray, e... | true | FFmpeg | 7da9f4523159670d577a2808d4481e64008a8894 | static int encode_codebook(CinepakEncContext *s, int *codebook, int size, int chunk_type_yuv, int chunk_type_gray, unsigned char *buf)
{
int x, y, ret, entry_size = s->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;
ret = write_chunk_header(buf, s->pix_fmt == AV_PIX_FMT_YUV420P ? chunk_type_yuv : chunk_type_gray, e... | {
"code": [
" int x, y, ret, entry_size = s->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;",
" ret = write_chunk_header(buf, s->pix_fmt == AV_PIX_FMT_YUV420P ? chunk_type_yuv : chunk_type_gray, entry_size * size);",
" for(x = 0; x < size; x++)",
" for(y = 0; y < entry_size; y++)",
" ... | static int FUNC_0(CinepakEncContext *VAR_0, int *VAR_1, int VAR_2, int VAR_3, int VAR_4, unsigned char *VAR_5)
{
int VAR_6, VAR_7, VAR_8, VAR_9 = VAR_0->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;
VAR_8 = write_chunk_header(VAR_5, VAR_0->pix_fmt == AV_PIX_FMT_YUV420P ? VAR_3 : VAR_4, VAR_9 * VAR_2);
for(... | [
"static int FUNC_0(CinepakEncContext *VAR_0, int *VAR_1, int VAR_2, int VAR_3, int VAR_4, unsigned char *VAR_5)\n{",
"int VAR_6, VAR_7, VAR_8, VAR_9 = VAR_0->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;",
"VAR_8 = write_chunk_header(VAR_5, VAR_0->pix_fmt == AV_PIX_FMT_YUV420P ? VAR_3 : VAR_4, VAR_9 * VAR_2);",
"for... | [
0,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
7,608 | static int ir2_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
Ir2Context * const s = avctx->priv_data;
AVFrame *picture = data;
AVFrame * const p=... | false | FFmpeg | fd37eac4958a2544599d1b0fce1b153ebd7cd7da | static int ir2_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
Ir2Context * const s = avctx->priv_data;
AVFrame *picture = data;
AVFrame * const p=... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
Ir2Context * const s = VAR_0->priv_data;
AVFrame *picture = VAR_1;
AVFrame * const p= (AVFrame*)&... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"Ir2Context * const s = VAR_0->priv_data;",
"AVFrame *picture = VAR_1;",
"AVFrame * const p= (AVFrame*)&s->picture;",
"int VAR_6;",
"if(p->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
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
49,
51
],
[
53
],
[
55,... |
7,611 | void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, int height, INT64 pts)
{
ContextInfo *ci = (ContextInfo *) ctx;
AVPicture picture1;
Imlib_Image image;
DATA32 *data;
image = get_cached_image(ci, width, height);
if (!image) {
image = imlib_creat... | false | FFmpeg | 4be3147d0d2858ae5a242af2f86de3a810a9db77 | void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, int height, INT64 pts)
{
ContextInfo *ci = (ContextInfo *) ctx;
AVPicture picture1;
Imlib_Image image;
DATA32 *data;
image = get_cached_image(ci, width, height);
if (!image) {
image = imlib_creat... | {
"code": [],
"line_no": []
} | void FUNC_0(void *VAR_0, AVPicture *VAR_1, enum PixelFormat VAR_2, int VAR_3, int VAR_4, INT64 VAR_5)
{
ContextInfo *ci = (ContextInfo *) VAR_0;
AVPicture picture1;
Imlib_Image image;
DATA32 *data;
image = get_cached_image(ci, VAR_3, VAR_4);
if (!image) {
image = imlib_create... | [
"void FUNC_0(void *VAR_0, AVPicture *VAR_1, enum PixelFormat VAR_2, int VAR_3, int VAR_4, INT64 VAR_5)\n{",
"ContextInfo *ci = (ContextInfo *) VAR_0;",
"AVPicture picture1;",
"Imlib_Image image;",
"DATA32 *data;",
"image = get_cached_image(ci, VAR_3, VAR_4);",
"if (!image) {",
"image = imlib_create_im... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
7,612 | static void host_signal_handler(int host_signum, siginfo_t *info,
void *puc)
{
CPUArchState *env = thread_cpu->env_ptr;
int sig;
target_siginfo_t tinfo;
/* the CPU emulator uses some host signals to detect exceptions,
we forward to it some signals */
if ((host_... | true | qemu | 4d330cee37a21aabfc619a1948953559e66951a4 | static void host_signal_handler(int host_signum, siginfo_t *info,
void *puc)
{
CPUArchState *env = thread_cpu->env_ptr;
int sig;
target_siginfo_t tinfo;
if ((host_signum == SIGSEGV || host_signum == SIGBUS)
&& info->si_code > 0) {
if (cpu_signal_hand... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0, siginfo_t *VAR_1,
void *VAR_2)
{
CPUArchState *env = thread_cpu->env_ptr;
int VAR_3;
target_siginfo_t tinfo;
if ((VAR_0 == SIGSEGV || VAR_0 == SIGBUS)
&& VAR_1->si_code > 0) {
if (cpu_signal_handler(VAR_0, VAR_1, VAR_2))... | [
"static void FUNC_0(int VAR_0, siginfo_t *VAR_1,\nvoid *VAR_2)\n{",
"CPUArchState *env = thread_cpu->env_ptr;",
"int VAR_3;",
"target_siginfo_t tinfo;",
"if ((VAR_0 == SIGSEGV || VAR_0 == SIGBUS)\n&& VAR_1->si_code > 0) {",
"if (cpu_signal_handler(VAR_0, VAR_1, VAR_2))\nreturn;",
"}",
"VAR_3 = host_to... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
9,
10
],
[
11,
12
],
[
13
],
[
15
],
[
16,
17
],
[
18
],
[
19
],
[
20
],
[
22
],
[
23
],
[
24
]
] |
7,613 | void stellaris_gamepad_init(int n, qemu_irq *irq, const int *keycode)
{
gamepad_state *s;
int i;
s = (gamepad_state *)g_malloc0(sizeof (gamepad_state));
s->buttons = (gamepad_button *)g_malloc0(n * sizeof (gamepad_button));
for (i = 0; i < n; i++) {
s->buttons[i].irq = irq[i];
... | true | qemu | b45c03f585ea9bb1af76c73e82195418c294919d | void stellaris_gamepad_init(int n, qemu_irq *irq, const int *keycode)
{
gamepad_state *s;
int i;
s = (gamepad_state *)g_malloc0(sizeof (gamepad_state));
s->buttons = (gamepad_button *)g_malloc0(n * sizeof (gamepad_button));
for (i = 0; i < n; i++) {
s->buttons[i].irq = irq[i];
... | {
"code": [
" s = (gamepad_state *)g_malloc0(sizeof (gamepad_state));",
" s->buttons = (gamepad_button *)g_malloc0(n * sizeof (gamepad_button));"
],
"line_no": [
11,
13
]
} | void FUNC_0(int VAR_0, qemu_irq *VAR_1, const int *VAR_2)
{
gamepad_state *s;
int VAR_3;
s = (gamepad_state *)g_malloc0(sizeof (gamepad_state));
s->buttons = (gamepad_button *)g_malloc0(VAR_0 * sizeof (gamepad_button));
for (VAR_3 = 0; VAR_3 < VAR_0; VAR_3++) {
s->buttons[VAR_3].VAR... | [
"void FUNC_0(int VAR_0, qemu_irq *VAR_1, const int *VAR_2)\n{",
"gamepad_state *s;",
"int VAR_3;",
"s = (gamepad_state *)g_malloc0(sizeof (gamepad_state));",
"s->buttons = (gamepad_button *)g_malloc0(VAR_0 * sizeof (gamepad_button));",
"for (VAR_3 = 0; VAR_3 < VAR_0; VAR_3++) {",
"s->buttons[VAR_3].VAR_... | [
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
7,614 | static void arm_cpu_initfn(Object *obj)
{
CPUState *cs = CPU(obj);
ARMCPU *cpu = ARM_CPU(obj);
static bool inited;
uint32_t Aff1, Aff0;
cs->env_ptr = &cpu->env;
cpu_exec_init(cs, &error_abort);
cpu->cp_regs = g_hash_table_new_full(g_int_hash, g_int_equal,
... | true | qemu | ce5b1bbf624b977a55ff7f85bb3871682d03baff | static void arm_cpu_initfn(Object *obj)
{
CPUState *cs = CPU(obj);
ARMCPU *cpu = ARM_CPU(obj);
static bool inited;
uint32_t Aff1, Aff0;
cs->env_ptr = &cpu->env;
cpu_exec_init(cs, &error_abort);
cpu->cp_regs = g_hash_table_new_full(g_int_hash, g_int_equal,
... | {
"code": [
" cpu_exec_init(cs, &error_abort);",
" uint32_t Aff1, Aff0;",
" cpu_exec_init(cs, &error_abort);",
" Aff1 = cs->cpu_index / ARM_CPUS_PER_CLUSTER;",
" Aff0 = cs->cpu_index % ARM_CPUS_PER_CLUSTER;",
" cpu->mp_affinity = (Aff1 << ARM_AFF1_SHIFT) | Aff0;",
" cp... | static void FUNC_0(Object *VAR_0)
{
CPUState *cs = CPU(VAR_0);
ARMCPU *cpu = ARM_CPU(VAR_0);
static bool VAR_1;
uint32_t Aff1, Aff0;
cs->env_ptr = &cpu->env;
cpu_exec_init(cs, &error_abort);
cpu->cp_regs = g_hash_table_new_full(g_int_hash, g_int_equal,
... | [
"static void FUNC_0(Object *VAR_0)\n{",
"CPUState *cs = CPU(VAR_0);",
"ARMCPU *cpu = ARM_CPU(VAR_0);",
"static bool VAR_1;",
"uint32_t Aff1, Aff0;",
"cs->env_ptr = &cpu->env;",
"cpu_exec_init(cs, &error_abort);",
"cpu->cp_regs = g_hash_table_new_full(g_int_hash, g_int_equal,\ng_free, g_free);",
"Aff... | [
0,
0,
0,
0,
1,
0,
1,
0,
1,
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
],
[
15
],
[
17
],
[
19,
21
],
[
35
],
[
37
],
[
39
],
[
43,
47
],
[
55
],
[
57
],
[
59
],
[
61
],
[
65,
67
],
[
69,
71
... |
7,615 | static int vmdk_create(const char *filename, QEMUOptionParameter *options,
Error **errp)
{
int idx = 0;
BlockDriverState *new_bs = NULL;
Error *local_err;
char *desc = NULL;
int64_t total_size = 0, filesize;
const char *adapter_type = NULL;
const char *backing... | true | qemu | c13959c745a7e4965c94d19e3153d2c44459906d | static int vmdk_create(const char *filename, QEMUOptionParameter *options,
Error **errp)
{
int idx = 0;
BlockDriverState *new_bs = NULL;
Error *local_err;
char *desc = NULL;
int64_t total_size = 0, filesize;
const char *adapter_type = NULL;
const char *backing... | {
"code": [
" Error *local_err;",
" Error *local_err;",
" error_setg_errno(errp, -ret, \"Could not create image file\");",
" error_setg_errno(errp, -ret, \"Could not write description\");"
],
"line_no": [
11,
11,
373,
389
]
} | static int FUNC_0(const char *VAR_0, QEMUOptionParameter *VAR_1,
Error **VAR_2)
{
int VAR_3 = 0;
BlockDriverState *new_bs = NULL;
Error *local_err;
char *VAR_4 = NULL;
int64_t total_size = 0, filesize;
const char *VAR_5 = NULL;
const char *VAR_6 = NULL;
c... | [
"static int FUNC_0(const char *VAR_0, QEMUOptionParameter *VAR_1,\nError **VAR_2)\n{",
"int VAR_3 = 0;",
"BlockDriverState *new_bs = NULL;",
"Error *local_err;",
"char *VAR_4 = NULL;",
"int64_t total_size = 0, filesize;",
"const char *VAR_5 = NULL;",
"const char *VAR_6 = NULL;",
"const char *VAR_7 =... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
7,616 | int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
const VMStateDescription *vmsd,
void *opaque, int alias_id,
int required_for_version)
{
SaveStateEntry *se;
/* If this triggers, ... | true | qemu | 97f3ad35517e0d02c0149637d1bb10713c52b057 | int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
const VMStateDescription *vmsd,
void *opaque, int alias_id,
int required_for_version)
{
SaveStateEntry *se;
assert(alias_id... | {
"code": [
" se = g_malloc0(sizeof(SaveStateEntry));",
" se->compat = g_malloc0(sizeof(CompatEntry));",
" se = g_malloc0(sizeof(SaveStateEntry));",
" se->compat = g_malloc0(sizeof(CompatEntry));"
],
"line_no": [
21,
49,
21,
49
]
} | int FUNC_0(DeviceState *VAR_0, int VAR_1,
const VMStateDescription *VAR_2,
void *VAR_3, int VAR_4,
int VAR_5)
{
SaveStateEntry *se;
assert(VAR_4 == -1 || VAR_5 >= VAR_2->minimum_version_id);
... | [
"int FUNC_0(DeviceState *VAR_0, int VAR_1,\nconst VMStateDescription *VAR_2,\nvoid *VAR_3, int VAR_4,\nint VAR_5)\n{",
"SaveStateEntry *se;",
"assert(VAR_4 == -1 || VAR_5 >= VAR_2->minimum_version_id);",
"se = g_malloc0(sizeof(SaveStateEntry));",
"se->version_id = VAR_2->version_id;",
"se->section_id = sa... | [
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
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53,
55
... |
7,617 | void visit_start_alternate(Visitor *v, const char *name,
GenericAlternate **obj, size_t size,
bool promote_int, Error **errp)
{
Error *err = NULL;
assert(obj && size >= sizeof(GenericAlternate));
assert(v->type != VISITOR_OUTPUT || *obj);
if... | true | qemu | a15fcc3cf69ee3d408f60d6cc316488d2b0249b4 | void visit_start_alternate(Visitor *v, const char *name,
GenericAlternate **obj, size_t size,
bool promote_int, Error **errp)
{
Error *err = NULL;
assert(obj && size >= sizeof(GenericAlternate));
assert(v->type != VISITOR_OUTPUT || *obj);
if... | {
"code": [
" assert(v->type != VISITOR_OUTPUT || *obj);",
" if (v->type == VISITOR_INPUT) {",
" assert(v->type != VISITOR_OUTPUT || *obj);",
" if (v->type == VISITOR_INPUT) {",
" if (v->type == VISITOR_INPUT) {"
],
"line_no": [
15,
23,
15,
23,
23
]
} | void FUNC_0(Visitor *VAR_0, const char *VAR_1,
GenericAlternate **VAR_2, size_t VAR_3,
bool VAR_4, Error **VAR_5)
{
Error *err = NULL;
assert(VAR_2 && VAR_3 >= sizeof(GenericAlternate));
assert(VAR_0->type != VISITOR_OUTPUT || *VAR_2);
if (V... | [
"void FUNC_0(Visitor *VAR_0, const char *VAR_1,\nGenericAlternate **VAR_2, size_t VAR_3,\nbool VAR_4, Error **VAR_5)\n{",
"Error *err = NULL;",
"assert(VAR_2 && VAR_3 >= sizeof(GenericAlternate));",
"assert(VAR_0->type != VISITOR_OUTPUT || *VAR_2);",
"if (VAR_0->start_alternate) {",
"VAR_0->start_alternat... | [
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
7,618 | void kvm_ioapic_dump_state(Monitor *mon, const QDict *qdict)
{
IOAPICCommonState s;
kvm_ioapic_get(&s);
ioapic_print_redtbl(mon, &s);
}
| true | qemu | c6fcb0e201ad296a9c0f587486830d9508094efb | void kvm_ioapic_dump_state(Monitor *mon, const QDict *qdict)
{
IOAPICCommonState s;
kvm_ioapic_get(&s);
ioapic_print_redtbl(mon, &s);
}
| {
"code": [
" IOAPICCommonState s;",
" kvm_ioapic_get(&s);",
" ioapic_print_redtbl(mon, &s);"
],
"line_no": [
5,
9,
13
]
} | void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{
IOAPICCommonState s;
kvm_ioapic_get(&s);
ioapic_print_redtbl(VAR_0, &s);
}
| [
"void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)\n{",
"IOAPICCommonState s;",
"kvm_ioapic_get(&s);",
"ioapic_print_redtbl(VAR_0, &s);",
"}"
] | [
0,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
]
] |
7,619 | milkymist_init(MachineState *machine)
{
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->initrd_filename;
LM32CPU *cpu;
CPULM32State *env;
i... | true | qemu | 4482e05cbbb7e50e476f6a9500cf0b38913bd939 | milkymist_init(MachineState *machine)
{
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->initrd_filename;
LM32CPU *cpu;
CPULM32State *env;
i... | {
"code": [
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" exit(1);",
" if (cpu == NULL) {",
" fprintf(stderr, \"qemu: unable to find CPU '%s'\\n\", cpu_model);",... | FUNC_0(MachineState *VAR_0)
{
const char *VAR_1 = VAR_0->VAR_1;
const char *VAR_2 = VAR_0->VAR_2;
const char *VAR_3 = VAR_0->VAR_3;
const char *VAR_4 = VAR_0->VAR_4;
LM32CPU *cpu;
CPULM32State *env;
int VAR_5;
DriveInfo *dinfo;
MemoryRegion *address_space_mem = get_system_m... | [
"FUNC_0(MachineState *VAR_0)\n{",
"const char *VAR_1 = VAR_0->VAR_1;",
"const char *VAR_2 = VAR_0->VAR_2;",
"const char *VAR_3 = VAR_0->VAR_3;",
"const char *VAR_4 = VAR_0->VAR_4;",
"LM32CPU *cpu;",
"CPULM32State *env;",
"int VAR_5;",
"DriveInfo *dinfo;",
"MemoryRegion *address_space_mem = get_sys... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
7,620 | static int read_probe(AVProbeData *pd)
{
if (pd->buf[0] == 'J' && pd->buf[1] == 'V' && strlen(MAGIC) <= pd->buf_size - 4 &&
!memcmp(pd->buf + 4, MAGIC, strlen(MAGIC)))
return AVPROBE_SCORE_MAX;
return 0;
}
| true | FFmpeg | db374790c75fa4ef947abcb5019fcf21d0b2de85 | static int read_probe(AVProbeData *pd)
{
if (pd->buf[0] == 'J' && pd->buf[1] == 'V' && strlen(MAGIC) <= pd->buf_size - 4 &&
!memcmp(pd->buf + 4, MAGIC, strlen(MAGIC)))
return AVPROBE_SCORE_MAX;
return 0;
}
| {
"code": [
" if (pd->buf[0] == 'J' && pd->buf[1] == 'V' && strlen(MAGIC) <= pd->buf_size - 4 &&"
],
"line_no": [
5
]
} | static int FUNC_0(AVProbeData *VAR_0)
{
if (VAR_0->buf[0] == 'J' && VAR_0->buf[1] == 'V' && strlen(MAGIC) <= VAR_0->buf_size - 4 &&
!memcmp(VAR_0->buf + 4, MAGIC, strlen(MAGIC)))
return AVPROBE_SCORE_MAX;
return 0;
}
| [
"static int FUNC_0(AVProbeData *VAR_0)\n{",
"if (VAR_0->buf[0] == 'J' && VAR_0->buf[1] == 'V' && strlen(MAGIC) <= VAR_0->buf_size - 4 &&\n!memcmp(VAR_0->buf + 4, MAGIC, strlen(MAGIC)))\nreturn AVPROBE_SCORE_MAX;",
"return 0;",
"}"
] | [
0,
1,
0,
0
] | [
[
1,
3
],
[
5,
7,
9
],
[
11
],
[
13
]
] |
7,621 | static void ich9_lpc_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->reset = ich9_lpc_reset;
k->init = ich9_lpc_initfn;
dc->vmsd = &vmstate_ich9_lpc;
... | true | qemu | efec3dd631d94160288392721a5f9c39e50fb2bc | static void ich9_lpc_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->reset = ich9_lpc_reset;
k->init = ich9_lpc_initfn;
dc->vmsd = &vmstate_ich9_lpc;
... | {
"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);
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->reset = ich9_lpc_reset;
k->init = ich9_lpc_initfn;
dc->vmsd = &vmstate_ich9_lpc;
dc->no_use... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"PCIDeviceClass *k = PCI_DEVICE_CLASS(VAR_0);",
"set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);",
"dc->reset = ich9_lpc_reset;",
"k->init = ich9_lpc_initfn;",
"dc->vmsd = &vmstate_ich9_lpc;",
"dc->no_... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
]
] |
7,623 | hwaddr cpu_mips_translate_address(CPUMIPSState *env, target_ulong address, int rw)
{
hwaddr physical;
int prot;
int access_type;
int ret = 0;
/* data access */
access_type = ACCESS_INT;
ret = get_physical_address(env, &physical, &prot,
address, rw, a... | true | qemu | 9fbf4a58c90183b30bb2c8ad971ccce7e6716a16 | hwaddr cpu_mips_translate_address(CPUMIPSState *env, target_ulong address, int rw)
{
hwaddr physical;
int prot;
int access_type;
int ret = 0;
access_type = ACCESS_INT;
ret = get_physical_address(env, &physical, &prot,
address, rw, access_type);
... | {
"code": [
" address, rw, access_type);",
" ret = get_physical_address(env, &physical, &prot,",
" address, rw, access_type);"
],
"line_no": [
21,
19,
21
]
} | hwaddr FUNC_0(CPUMIPSState *env, target_ulong address, int rw)
{
hwaddr physical;
int VAR_0;
int VAR_1;
int VAR_2 = 0;
VAR_1 = ACCESS_INT;
VAR_2 = get_physical_address(env, &physical, &VAR_0,
address, rw, VAR_1);
if (VAR_2 != TLBRET_MATCH) {
... | [
"hwaddr FUNC_0(CPUMIPSState *env, target_ulong address, int rw)\n{",
"hwaddr physical;",
"int VAR_0;",
"int VAR_1;",
"int VAR_2 = 0;",
"VAR_1 = ACCESS_INT;",
"VAR_2 = get_physical_address(env, &physical, &VAR_0,\naddress, rw, VAR_1);",
"if (VAR_2 != TLBRET_MATCH) {",
"raise_mmu_exception(env, addres... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
7,624 | static int h263_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
UINT8 *buf, int buf_size)
{
MpegEncContext *s = avctx->priv_data;
int ret;
AVPicture *pict = data;
#ifdef DEBUG
printf("*****frame %d size=%d\n", avctx->f... | true | FFmpeg | d7e9533aa06f4073a27812349b35ba5fede11ca1 | static int h263_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
UINT8 *buf, int buf_size)
{
MpegEncContext *s = avctx->priv_data;
int ret;
AVPicture *pict = data;
#ifdef DEBUG
printf("*****frame %d size=%d\n", avctx->f... | {
"code": [
" if(s->h263_pred && s->bitstream_buffer_size==0){",
"#endif",
"#endif",
"#endif",
" } else {",
" } else {",
" } else {",
"#endif"
],
"line_no": [
303,
23,
23,
23,
65,
65,
205,
23
]
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
UINT8 *VAR_3, int VAR_4)
{
MpegEncContext *s = VAR_0->priv_data;
int VAR_5;
AVPicture *pict = VAR_1;
#ifdef DEBUG
printf("*****frame %d size=%d\n", VAR_0->frame_number,... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nUINT8 *VAR_3, int VAR_4)\n{",
"MpegEncContext *s = VAR_0->priv_data;",
"int VAR_5;",
"AVPicture *pict = VAR_1;",
"#ifdef DEBUG\nprintf(\"*****frame %d size=%d\\n\", VAR_0->frame_number, VAR_4);",
"printf(\"bytes=%x %x %x %x\\n\", VAR_3[0... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
21
],
[
23,
29
],
[
31
],
[
33
],
[
35
],
[
39,
41
],
[
43,
45
],
[
51
],
[
53
],
[
55
],
[
57
],
[
59
... |
7,625 | PPC_OP(setlr)
{
regs->lr = PARAM1;
RETURN();
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | PPC_OP(setlr)
{
regs->lr = PARAM1;
RETURN();
}
| {
"code": [
" regs->lr = PARAM1;",
" RETURN();",
" RETURN();"
],
"line_no": [
5,
7,
7
]
} | FUNC_0(VAR_0)
{
regs->lr = PARAM1;
RETURN();
}
| [
"FUNC_0(VAR_0)\n{",
"regs->lr = PARAM1;",
"RETURN();",
"}"
] | [
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
7,626 | static int mlib_YUV2ABGR420_32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){
if(c->srcFormat == PIX_FMT_YUV422P){
srcStride[1] *= 2;
srcStride[2] *= 2;
}
assert(srcStride[1] == srcStride[2]);
mlib_VideoColorYUV2A... | true | FFmpeg | 428098165de4c3edfe42c1b7f00627d287015863 | static int mlib_YUV2ABGR420_32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){
if(c->srcFormat == PIX_FMT_YUV422P){
srcStride[1] *= 2;
srcStride[2] *= 2;
}
assert(srcStride[1] == srcStride[2]);
mlib_VideoColorYUV2A... | {
"code": [
" int srcSliceH, uint8_t* dst[], int dstStride[]){",
"\tsrcStride[1] *= 2;",
"\tsrcStride[2] *= 2;",
"\t\t\t srcSliceH, dstStride[0], srcStride[0], srcStride[1]);",
" int srcSliceH, uint8_t* dst[], int dstStride[]){",
"\tsrcStride[1] *= 2;",
"\tsrcSt... | static int FUNC_0(SwsContext *VAR_0, uint8_t* VAR_1[], int VAR_2[], int VAR_3,
int VAR_4, uint8_t* VAR_5[], int VAR_6[]){
if(VAR_0->srcFormat == PIX_FMT_YUV422P){
VAR_2[1] *= 2;
VAR_2[2] *= 2;
}
assert(VAR_2[1] == VAR_2[2]);
mlib_VideoColorYUV2ABGR420(VAR_5[0]+VAR_3*VAR_6[0], V... | [
"static int FUNC_0(SwsContext *VAR_0, uint8_t* VAR_1[], int VAR_2[], int VAR_3,\nint VAR_4, uint8_t* VAR_5[], int VAR_6[]){",
"if(VAR_0->srcFormat == PIX_FMT_YUV422P){",
"VAR_2[1] *= 2;",
"VAR_2[2] *= 2;",
"}",
"assert(VAR_2[1] == VAR_2[2]);",
"mlib_VideoColorYUV2ABGR420(VAR_5[0]+VAR_3*VAR_6[0], VAR_1[0... | [
1,
0,
1,
1,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19,
21
],
[
23
],
[
25
]
] |
7,627 | BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num,
QEMUIOVector *iov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
return bdrv_aio_rw_vector(bs, sector_num, iov, nb_sectors,
cb, ... | true | qemu | 71d0770c4cec9f1dc04f4dadcbf7fd6c335030a9 | BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num,
QEMUIOVector *iov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
return bdrv_aio_rw_vector(bs, sector_num, iov, nb_sectors,
cb, ... | {
"code": [],
"line_no": []
} | BlockDriverAIOCB *FUNC_0(BlockDriverState *bs, int64_t sector_num,
QEMUIOVector *iov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
return bdrv_aio_rw_vector(bs, sector_num, iov, nb_sectors,
cb, opaque, ... | [
"BlockDriverAIOCB *FUNC_0(BlockDriverState *bs, int64_t sector_num,\nQEMUIOVector *iov, int nb_sectors,\nBlockDriverCompletionFunc *cb, void *opaque)\n{",
"return bdrv_aio_rw_vector(bs, sector_num, iov, nb_sectors,\ncb, opaque, 0);",
"}"
] | [
0,
0,
0
] | [
[
1,
2,
3,
4
],
[
5,
6
],
[
7
]
] |
7,628 | static int init(AVFilterContext *ctx, const char *args)
{
EvalContext *eval = ctx->priv;
char *args1 = av_strdup(args);
char *expr, *buf, *bufptr;
int ret, i;
eval->class = &aevalsrc_class;
av_opt_set_defaults(eval);
/* parse expressions */
buf = args1;
i = 0;
while (expr = av_st... | true | FFmpeg | 989c91b5042c19c9914a3b205b1ca6e1598c66ba | static int init(AVFilterContext *ctx, const char *args)
{
EvalContext *eval = ctx->priv;
char *args1 = av_strdup(args);
char *expr, *buf, *bufptr;
int ret, i;
eval->class = &aevalsrc_class;
av_opt_set_defaults(eval);
buf = args1;
i = 0;
while (expr = av_strtok(buf, ":", &bufptr)... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFilterContext *VAR_0, const char *VAR_1)
{
EvalContext *eval = VAR_0->priv;
char *VAR_2 = av_strdup(VAR_1);
char *VAR_3, *VAR_4, *VAR_5;
int VAR_6, VAR_7;
eval->class = &aevalsrc_class;
av_opt_set_defaults(eval);
VAR_4 = VAR_2;
VAR_7 = 0;
while (VAR_3 = av_st... | [
"static int FUNC_0(AVFilterContext *VAR_0, const char *VAR_1)\n{",
"EvalContext *eval = VAR_0->priv;",
"char *VAR_2 = av_strdup(VAR_1);",
"char *VAR_3, *VAR_4, *VAR_5;",
"int VAR_6, VAR_7;",
"eval->class = &aevalsrc_class;",
"av_opt_set_defaults(eval);",
"VAR_4 = VAR_2;",
"VAR_7 = 0;",
"while (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
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
10
],
[
11
],
[
12
],
[
13,
14
],
[
15,
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22,
23
],
[
... |
7,629 | BlockAIOCB *bdrv_aio_discard(BlockDriverState *bs,
int64_t sector_num, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
Coroutine *co;
BlockAIOCBCoroutine *acb;
trace_bdrv_aio_discard(bs, sector_num, nb_sectors, opaque);
acb = qemu_aio_get(&bdrv_em_co_aiocb_info, bs, c... | true | qemu | 0b8b8753e4d94901627b3e86431230f2319215c4 | BlockAIOCB *bdrv_aio_discard(BlockDriverState *bs,
int64_t sector_num, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
Coroutine *co;
BlockAIOCBCoroutine *acb;
trace_bdrv_aio_discard(bs, sector_num, nb_sectors, opaque);
acb = qemu_aio_get(&bdrv_em_co_aiocb_info, bs, c... | {
"code": [
" qemu_coroutine_enter(co, acb);",
" qemu_coroutine_enter(co, acb);",
" qemu_coroutine_enter(co, acb);",
" co = qemu_coroutine_create(bdrv_aio_discard_co_entry);",
" qemu_coroutine_enter(co, acb);",
" qemu_coroutine_enter(co, acb);"
],
"line_no": [
31,
... | BlockAIOCB *FUNC_0(BlockDriverState *bs,
int64_t sector_num, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
Coroutine *co;
BlockAIOCBCoroutine *acb;
trace_bdrv_aio_discard(bs, sector_num, nb_sectors, opaque);
acb = qemu_aio_get(&bdrv_em_co_aiocb_info, bs, cb, opaque)... | [
"BlockAIOCB *FUNC_0(BlockDriverState *bs,\nint64_t sector_num, int nb_sectors,\nBlockCompletionFunc *cb, void *opaque)\n{",
"Coroutine *co;",
"BlockAIOCBCoroutine *acb;",
"trace_bdrv_aio_discard(bs, sector_num, nb_sectors, opaque);",
"acb = qemu_aio_get(&bdrv_em_co_aiocb_info, bs, cb, opaque);",
"acb->nee... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
]
] |
7,630 | static int decode_frame(AVCodecContext *avctx,
void *data, int *got_frame, AVPacket *avpkt)
{
TiffContext *const s = avctx->priv_data;
AVFrame *const p = data;
ThreadFrame frame = { .f = data };
unsigned off;
int le, ret, plane, planes;
int i, j, entries, stride;
... | true | FFmpeg | 27f80ab0160d2e64007e1c9799ffd4504cc13eb5 | static int decode_frame(AVCodecContext *avctx,
void *data, int *got_frame, AVPacket *avpkt)
{
TiffContext *const s = avctx->priv_data;
AVFrame *const p = data;
ThreadFrame frame = { .f = data };
unsigned off;
int le, ret, plane, planes;
int i, j, entries, stride;
... | {
"code": [
" dst += s->rps * stride;"
],
"line_no": [
235
]
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2, AVPacket *VAR_3)
{
TiffContext *const s = VAR_0->priv_data;
AVFrame *const p = VAR_1;
ThreadFrame frame = { .f = VAR_1 };
unsigned VAR_4;
int VAR_5, VAR_6, VAR_7, VAR_8;
int VAR_9, VAR_10, VAR_11, V... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2, AVPacket *VAR_3)\n{",
"TiffContext *const s = VAR_0->priv_data;",
"AVFrame *const p = VAR_1;",
"ThreadFrame frame = { .f = VAR_1 };",
"unsigned VAR_4;",
"int VAR_5, VAR_6, VAR_7, VAR_8;",
"int VAR_9, VAR_10, VAR_11, VAR_12;",
"unsigne... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
7,631 | static int process_video_header_vp6(AVFormatContext *s)
{
EaDemuxContext *ea = s->priv_data;
AVIOContext *pb = s->pb;
avio_skip(pb, 8);
ea->nb_frames = avio_rl32(pb);
avio_skip(pb, 4);
ea->time_base.den = avio_rl32(pb);
ea->time_base.num = avio_rl32(pb);
ea->video_codec = ... | true | FFmpeg | 1831274ff1ef69d4b730993e03283430775e2eca | static int process_video_header_vp6(AVFormatContext *s)
{
EaDemuxContext *ea = s->priv_data;
AVIOContext *pb = s->pb;
avio_skip(pb, 8);
ea->nb_frames = avio_rl32(pb);
avio_skip(pb, 4);
ea->time_base.den = avio_rl32(pb);
ea->time_base.num = avio_rl32(pb);
ea->video_codec = ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
EaDemuxContext *ea = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
avio_skip(pb, 8);
ea->nb_frames = avio_rl32(pb);
avio_skip(pb, 4);
ea->time_base.den = avio_rl32(pb);
ea->time_base.num = avio_rl32(pb);
ea->video_codec = AV_COD... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"EaDemuxContext *ea = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"avio_skip(pb, 8);",
"ea->nb_frames = avio_rl32(pb);",
"avio_skip(pb, 4);",
"ea->time_base.den = avio_rl32(pb);",
"ea->time_base.num = avio_rl32(pb);",
"ea->video_codec = AV_CODE... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
25
],
[
29
]
] |
7,632 | void cpu_reset (CPUCRISState *env)
{
memset(env, 0, offsetof(CPUCRISState, breakpoints));
tlb_flush(env, 1);
env->pregs[PR_VR] = 32;
#if defined(CONFIG_USER_ONLY)
/* start in user mode with interrupts enabled. */
env->pregs[PR_CCS] |= U_FLAG | I_FLAG;
#else
env->pregs[PR_CCS] = 0;
#endif | true | qemu | eca1bdf415c454093dfc7eb983cd49287c043967 | void cpu_reset (CPUCRISState *env)
{
memset(env, 0, offsetof(CPUCRISState, breakpoints));
tlb_flush(env, 1);
env->pregs[PR_VR] = 32;
#if defined(CONFIG_USER_ONLY)
env->pregs[PR_CCS] |= U_FLAG | I_FLAG;
#else
env->pregs[PR_CCS] = 0;
#endif | {
"code": [],
"line_no": []
} | void FUNC_0 (CPUCRISState *VAR_0)
{
memset(VAR_0, 0, offsetof(CPUCRISState, breakpoints));
tlb_flush(VAR_0, 1);
VAR_0->pregs[PR_VR] = 32;
#if defined(CONFIG_USER_ONLY)
VAR_0->pregs[PR_CCS] |= U_FLAG | I_FLAG;
#else
VAR_0->pregs[PR_CCS] = 0;
#endif | [
"void FUNC_0 (CPUCRISState *VAR_0)\n{",
"memset(VAR_0, 0, offsetof(CPUCRISState, breakpoints));",
"tlb_flush(VAR_0, 1);",
"VAR_0->pregs[PR_VR] = 32;",
"#if defined(CONFIG_USER_ONLY)\nVAR_0->pregs[PR_CCS] |= U_FLAG | I_FLAG;",
"#else\nVAR_0->pregs[PR_CCS] = 0;"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6,
8
],
[
9,
10
]
] |
7,633 | static int coroutine_fn bdrv_co_do_readv(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, QEMUIOVector *qiov)
{
BlockDriver *drv = bs->drv;
if (!drv) {
return -ENOMEDIUM;
}
if (bdrv_check_request(bs, sector_num, nb_sectors)) {
return -EIO;
}
/* throttli... | true | qemu | dbffbdcfff69431b622866ac5ea78df74fdc02d4 | static int coroutine_fn bdrv_co_do_readv(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, QEMUIOVector *qiov)
{
BlockDriver *drv = bs->drv;
if (!drv) {
return -ENOMEDIUM;
}
if (bdrv_check_request(bs, sector_num, nb_sectors)) {
return -EIO;
}
if (b... | {
"code": [
" return drv->bdrv_co_readv(bs, sector_num, nb_sectors, qiov);"
],
"line_no": [
35
]
} | static int VAR_0 bdrv_co_do_readv(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, QEMUIOVector *qiov)
{
BlockDriver *drv = bs->drv;
if (!drv) {
return -ENOMEDIUM;
}
if (bdrv_check_request(bs, sector_num, nb_sectors)) {
return -EIO;
}
if (bs->io_l... | [
"static int VAR_0 bdrv_co_do_readv(BlockDriverState *bs,\nint64_t sector_num, int nb_sectors, QEMUIOVector *qiov)\n{",
"BlockDriver *drv = bs->drv;",
"if (!drv) {",
"return -ENOMEDIUM;",
"}",
"if (bdrv_check_request(bs, sector_num, nb_sectors)) {",
"return -EIO;",
"}",
"if (bs->io_limits_enabled) {"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
]
] |
7,634 | av_cold static int auto_matrix(SwrContext *s)
{
int i, j, out_i;
double matrix[NUM_NAMED_CHANNELS][NUM_NAMED_CHANNELS]={{0}};
int64_t unaccounted, in_ch_layout, out_ch_layout;
double maxcoef=0;
char buf[128];
const int matrix_encoding = s->matrix_encoding;
float maxval;
in_ch_... | true | FFmpeg | 2c5c37ade115b5efa3f77ce11bc2c4e46b384959 | av_cold static int auto_matrix(SwrContext *s)
{
int i, j, out_i;
double matrix[NUM_NAMED_CHANNELS][NUM_NAMED_CHANNELS]={{0}};
int64_t unaccounted, in_ch_layout, out_ch_layout;
double maxcoef=0;
char buf[128];
const int matrix_encoding = s->matrix_encoding;
float maxval;
in_ch_... | {
"code": [
" if(in_ch_layout & (1ULL<<j))",
" in_i++;",
" if(out_ch_layout & (1ULL<<i))",
" out_i++;"
],
"line_no": [
391,
393,
399,
401
]
} | av_cold static int FUNC_0(SwrContext *s)
{
int VAR_0, VAR_1, VAR_2;
double VAR_3[NUM_NAMED_CHANNELS][NUM_NAMED_CHANNELS]={{0}};
int64_t unaccounted, in_ch_layout, out_ch_layout;
double VAR_4=0;
char VAR_5[128];
const int VAR_6 = s->VAR_6;
float VAR_7;
in_ch_layout = clean_layo... | [
"av_cold static int FUNC_0(SwrContext *s)\n{",
"int VAR_0, VAR_1, VAR_2;",
"double VAR_3[NUM_NAMED_CHANNELS][NUM_NAMED_CHANNELS]={{0}};",
"int64_t unaccounted, in_ch_layout, out_ch_layout;",
"double VAR_4=0;",
"char VAR_5[128];",
"const int VAR_6 = s->VAR_6;",
"float VAR_7;",
"in_ch_layout = clean_l... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
31,
33
],
[
37,
39,
41,
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
7,635 | void av_thread_message_queue_set_err_recv(AVThreadMessageQueue *mq,
int err)
{
#if HAVE_THREADS
pthread_mutex_lock(&mq->lock);
mq->err_recv = err;
pthread_cond_broadcast(&mq->cond);
pthread_mutex_unlock(&mq->lock);
#endif /* HAVE_THREADS */
}
| true | FFmpeg | bd5c860fdbc33d19d2ff0f6d1f06de07c17560dd | void av_thread_message_queue_set_err_recv(AVThreadMessageQueue *mq,
int err)
{
#if HAVE_THREADS
pthread_mutex_lock(&mq->lock);
mq->err_recv = err;
pthread_cond_broadcast(&mq->cond);
pthread_mutex_unlock(&mq->lock);
#endif
}
| {
"code": [
" pthread_cond_broadcast(&mq->cond);",
" pthread_cond_broadcast(&mq->cond);",
" pthread_cond_broadcast(&mq->cond);"
],
"line_no": [
13,
13,
13
]
} | void FUNC_0(AVThreadMessageQueue *VAR_0,
int VAR_1)
{
#if HAVE_THREADS
pthread_mutex_lock(&VAR_0->lock);
VAR_0->err_recv = VAR_1;
pthread_cond_broadcast(&VAR_0->cond);
pthread_mutex_unlock(&VAR_0->lock);
#endif
}
| [
"void FUNC_0(AVThreadMessageQueue *VAR_0,\nint VAR_1)\n{",
"#if HAVE_THREADS\npthread_mutex_lock(&VAR_0->lock);",
"VAR_0->err_recv = VAR_1;",
"pthread_cond_broadcast(&VAR_0->cond);",
"pthread_mutex_unlock(&VAR_0->lock);",
"#endif\n}"
] | [
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
11
],
[
13
],
[
15
],
[
17,
19
]
] |
7,636 | static int local_renameat(FsContext *ctx, V9fsPath *olddir,
const char *old_name, V9fsPath *newdir,
const char *new_name)
{
int ret;
int odirfd, ndirfd;
odirfd = local_opendir_nofollow(ctx, olddir->data);
if (odirfd == -1) {
return -1... | true | qemu | 6dd4b1f1d026e478d9177b28169b377e212400f3 | static int local_renameat(FsContext *ctx, V9fsPath *olddir,
const char *old_name, V9fsPath *newdir,
const char *new_name)
{
int ret;
int odirfd, ndirfd;
odirfd = local_opendir_nofollow(ctx, olddir->data);
if (odirfd == -1) {
return -1... | {
"code": [
" omap_dirfd = openat(odirfd, VIRTFS_META_DIR,",
" O_RDONLY | O_DIRECTORY | O_NOFOLLOW);",
" nmap_dirfd = openat(ndirfd, VIRTFS_META_DIR,",
" O_RDONLY | O_DIRECTORY | O_NOFOLLOW);"
],
"line_no": [
63,
65,
7... | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
const char *VAR_2, V9fsPath *VAR_3,
const char *VAR_4)
{
int VAR_5;
int VAR_6, VAR_7;
VAR_6 = local_opendir_nofollow(VAR_0, VAR_1->data);
if (VAR_6 == -1) {
return -1;
}
... | [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,\nconst char *VAR_2, V9fsPath *VAR_3,\nconst char *VAR_4)\n{",
"int VAR_5;",
"int VAR_6, VAR_7;",
"VAR_6 = local_opendir_nofollow(VAR_0, VAR_1->data);",
"if (VAR_6 == -1) {",
"return -1;",
"}",
"VAR_7 = local_opendir_nofollow(VAR_0, VAR_3->data);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
53
... |
7,637 | static bool blit_is_unsafe(struct CirrusVGAState *s)
{
/* should be the case, see cirrus_bitblt_start */
assert(s->cirrus_blt_width > 0);
assert(s->cirrus_blt_height > 0);
if (blit_region_is_unsafe(s, s->cirrus_blt_dstpitch,
s->cirrus_blt_dstaddr & s->cirrus_addr_mask)) {
... | true | qemu | bf25983345ca44aec3dd92c57142be45452bd38a | static bool blit_is_unsafe(struct CirrusVGAState *s)
{
assert(s->cirrus_blt_width > 0);
assert(s->cirrus_blt_height > 0);
if (blit_region_is_unsafe(s, s->cirrus_blt_dstpitch,
s->cirrus_blt_dstaddr & s->cirrus_addr_mask)) {
if (blit_region_is_unsafe(s, s->cirrus_blt_src... | {
"code": [],
"line_no": []
} | static bool FUNC_0(struct CirrusVGAState *s)
{
assert(s->cirrus_blt_width > 0);
assert(s->cirrus_blt_height > 0);
if (blit_region_is_unsafe(s, s->cirrus_blt_dstpitch,
s->cirrus_blt_dstaddr & s->cirrus_addr_mask)) {
if (blit_region_is_unsafe(s, s->cirrus_blt_srcpitch,
... | [
"static bool FUNC_0(struct CirrusVGAState *s)\n{",
"assert(s->cirrus_blt_width > 0);",
"assert(s->cirrus_blt_height > 0);",
"if (blit_region_is_unsafe(s, s->cirrus_blt_dstpitch,\ns->cirrus_blt_dstaddr & s->cirrus_addr_mask)) {",
"if (blit_region_is_unsafe(s, s->cirrus_blt_srcpitch,\ns->cirrus_blt_srcaddr & ... | [
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
4
],
[
5
],
[
6,
7
],
[
8,
9
],
[
10
]
] |
7,638 | static void update_error_limit(WavpackFrameContext *ctx)
{
int i, br[2], sl[2];
for (i = 0; i <= ctx->stereo_in; i++) {
ctx->ch[i].bitrate_acc += ctx->ch[i].bitrate_delta;
br[i] = ctx->ch[i].bitrate_acc >> 16;
sl[i] = LEVEL_DECAY(ctx->ch[i].slo... | true | FFmpeg | d03d38616278bf209e6c860d8f9f564cbc6c1780 | static void update_error_limit(WavpackFrameContext *ctx)
{
int i, br[2], sl[2];
for (i = 0; i <= ctx->stereo_in; i++) {
ctx->ch[i].bitrate_acc += ctx->ch[i].bitrate_delta;
br[i] = ctx->ch[i].bitrate_acc >> 16;
sl[i] = LEVEL_DECAY(ctx->ch[i].slo... | {
"code": [
"static void update_error_limit(WavpackFrameContext *ctx)"
],
"line_no": [
1
]
} | static void FUNC_0(WavpackFrameContext *VAR_0)
{
int VAR_1, VAR_2[2], VAR_3[2];
for (VAR_1 = 0; VAR_1 <= VAR_0->stereo_in; VAR_1++) {
VAR_0->ch[VAR_1].bitrate_acc += VAR_0->ch[VAR_1].bitrate_delta;
VAR_2[VAR_1] = VAR_0->ch[VAR_1].bitrate_acc >> 16;
VAR_3[VAR_1] ... | [
"static void FUNC_0(WavpackFrameContext *VAR_0)\n{",
"int VAR_1, VAR_2[2], VAR_3[2];",
"for (VAR_1 = 0; VAR_1 <= VAR_0->stereo_in; VAR_1++) {",
"VAR_0->ch[VAR_1].bitrate_acc += VAR_0->ch[VAR_1].bitrate_delta;",
"VAR_2[VAR_1] = VAR_0->ch[VAR_1].bitrate_acc >> 16;",
"VAR_3[VAR_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
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
7,639 | static int do_token_setup(USBDevice *s, USBPacket *p)
{
int request, value, index;
int ret = 0;
if (p->len != 8)
memcpy(s->setup_buf, p->data, 8);
s->setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6];
s->setup_index = 0;
request = (s->setup_buf[0] << 8) | s->setup_buf[1]... | true | qemu | 19f3322379c25a235eb1ec6335676549109fa625 | static int do_token_setup(USBDevice *s, USBPacket *p)
{
int request, value, index;
int ret = 0;
if (p->len != 8)
memcpy(s->setup_buf, p->data, 8);
s->setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6];
s->setup_index = 0;
request = (s->setup_buf[0] << 8) | s->setup_buf[1]... | {
"code": [],
"line_no": []
} | static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)
{
int VAR_2, VAR_3, VAR_4;
int VAR_5 = 0;
if (VAR_1->len != 8)
memcpy(VAR_0->setup_buf, VAR_1->data, 8);
VAR_0->setup_len = (VAR_0->setup_buf[7] << 8) | VAR_0->setup_buf[6];
VAR_0->setup_index = 0;
VAR_2 = (VAR_0->setup_... | [
"static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4;",
"int VAR_5 = 0;",
"if (VAR_1->len != 8)\nmemcpy(VAR_0->setup_buf, VAR_1->data, 8);",
"VAR_0->setup_len = (VAR_0->setup_buf[7] << 8) | VAR_0->setup_buf[6];",
"VAR_0->setup_index = 0;",
"VAR_2 = (VAR_0->setup_buf[0] ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
16
],
[
18
],
[
20
],
[
24
],
[
26
],
[
28
],
[
32
],
[
34,
36
],
[
38,
40
],
[
44,
46
],
[
48
],
[
50
],
[
58,
60
],
[
62,
64... |
7,640 | static int colo_packet_compare_common(Packet *ppkt, Packet *spkt, int offset)
{
if (trace_event_get_state(TRACE_COLO_COMPARE_MISCOMPARE)) {
char pri_ip_src[20], pri_ip_dst[20], sec_ip_src[20], sec_ip_dst[20];
strcpy(pri_ip_src, inet_ntoa(ppkt->ip->ip_src));
strcpy(pri_ip_dst, inet_nto... | true | qemu | d87aa138039a4be6d705793fd3e397c69c52405a | static int colo_packet_compare_common(Packet *ppkt, Packet *spkt, int offset)
{
if (trace_event_get_state(TRACE_COLO_COMPARE_MISCOMPARE)) {
char pri_ip_src[20], pri_ip_dst[20], sec_ip_src[20], sec_ip_dst[20];
strcpy(pri_ip_src, inet_ntoa(ppkt->ip->ip_src));
strcpy(pri_ip_dst, inet_nto... | {
"code": [
" if (trace_event_get_state(TRACE_COLO_COMPARE_MISCOMPARE)) {",
" if (trace_event_get_state(TRACE_COLO_COMPARE_MISCOMPARE)) {"
],
"line_no": [
5,
5
]
} | static int FUNC_0(Packet *VAR_0, Packet *VAR_1, int VAR_2)
{
if (trace_event_get_state(TRACE_COLO_COMPARE_MISCOMPARE)) {
char VAR_3[20], VAR_4[20], VAR_5[20], VAR_6[20];
strcpy(VAR_3, inet_ntoa(VAR_0->ip->ip_src));
strcpy(VAR_4, inet_ntoa(VAR_0->ip->ip_dst));
strcpy(VAR_5, in... | [
"static int FUNC_0(Packet *VAR_0, Packet *VAR_1, int VAR_2)\n{",
"if (trace_event_get_state(TRACE_COLO_COMPARE_MISCOMPARE)) {",
"char VAR_3[20], VAR_4[20], VAR_5[20], VAR_6[20];",
"strcpy(VAR_3, inet_ntoa(VAR_0->ip->ip_src));",
"strcpy(VAR_4, inet_ntoa(VAR_0->ip->ip_dst));",
"strcpy(VAR_5, inet_ntoa(VAR_1... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23,
25
],
[
27
],
[
31
],
[
35
],
[
37,
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
]
] |
7,641 | static void nbd_coroutine_end(NbdClientSession *s,
struct nbd_request *request)
{
int i = HANDLE_TO_INDEX(s, request->handle);
s->recv_coroutine[i] = NULL;
if (s->in_flight-- == MAX_NBD_REQUESTS) {
qemu_co_mutex_unlock(&s->free_sema);
}
}
| true | qemu | 9bc9732faeff09828fe38c0ebe2401ee131a6fca | static void nbd_coroutine_end(NbdClientSession *s,
struct nbd_request *request)
{
int i = HANDLE_TO_INDEX(s, request->handle);
s->recv_coroutine[i] = NULL;
if (s->in_flight-- == MAX_NBD_REQUESTS) {
qemu_co_mutex_unlock(&s->free_sema);
}
}
| {
"code": [
" qemu_co_mutex_unlock(&s->free_sema);"
],
"line_no": [
13
]
} | static void FUNC_0(NbdClientSession *VAR_0,
struct nbd_request *VAR_1)
{
int VAR_2 = HANDLE_TO_INDEX(VAR_0, VAR_1->handle);
VAR_0->recv_coroutine[VAR_2] = NULL;
if (VAR_0->in_flight-- == MAX_NBD_REQUESTS) {
qemu_co_mutex_unlock(&VAR_0->free_sema);
}
}
| [
"static void FUNC_0(NbdClientSession *VAR_0,\nstruct nbd_request *VAR_1)\n{",
"int VAR_2 = HANDLE_TO_INDEX(VAR_0, VAR_1->handle);",
"VAR_0->recv_coroutine[VAR_2] = NULL;",
"if (VAR_0->in_flight-- == MAX_NBD_REQUESTS) {",
"qemu_co_mutex_unlock(&VAR_0->free_sema);",
"}",
"}"
] | [
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
7,642 | static char *read_splashfile(char *filename, int *file_sizep, int *file_typep)
{
GError *err = NULL;
gboolean res;
gchar *content;
int file_type = -1;
unsigned int filehead = 0;
int bmp_bpp;
res = g_file_get_contents(filename, &content, (gsize *)file_sizep, &err);
if (res == F... | true | qemu | d09acb9b5ef0bb4fa94d3d459919a6ebaf8804bc | static char *read_splashfile(char *filename, int *file_sizep, int *file_typep)
{
GError *err = NULL;
gboolean res;
gchar *content;
int file_type = -1;
unsigned int filehead = 0;
int bmp_bpp;
res = g_file_get_contents(filename, &content, (gsize *)file_sizep, &err);
if (res == F... | {
"code": [
"static char *read_splashfile(char *filename, int *file_sizep, int *file_typep)",
" res = g_file_get_contents(filename, &content, (gsize *)file_sizep, &err);"
],
"line_no": [
1,
19
]
} | static char *FUNC_0(char *VAR_0, int *VAR_1, int *VAR_2)
{
GError *err = NULL;
gboolean res;
gchar *content;
int VAR_3 = -1;
unsigned int VAR_4 = 0;
int VAR_5;
res = g_file_get_contents(VAR_0, &content, (gsize *)VAR_1, &err);
if (res == FALSE) {
error_report("failed t... | [
"static char *FUNC_0(char *VAR_0, int *VAR_1, int *VAR_2)\n{",
"GError *err = NULL;",
"gboolean res;",
"gchar *content;",
"int VAR_3 = -1;",
"unsigned int VAR_4 = 0;",
"int VAR_5;",
"res = g_file_get_contents(VAR_0, &content, (gsize *)VAR_1, &err);",
"if (res == FALSE) {",
"error_report(\"failed t... | [
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
35
],
[
37
],
[
39
],
[
45
],
[
47
],
[
49
],
[
51
... |
7,643 | int av_bsf_list_parse_str(const char *str, AVBSFContext **bsf_lst)
{
AVBSFList *lst;
char *bsf_str, *buf, *dup, *saveptr;
int ret;
if (!str)
return av_bsf_get_null_filter(bsf_lst);
lst = av_bsf_list_alloc();
if (!lst)
return AVERROR(ENOMEM);
if (!(dup = buf = ... | true | FFmpeg | d9c2cfd31675a6403ae4ac7c141a8185dadceb12 | int av_bsf_list_parse_str(const char *str, AVBSFContext **bsf_lst)
{
AVBSFList *lst;
char *bsf_str, *buf, *dup, *saveptr;
int ret;
if (!str)
return av_bsf_get_null_filter(bsf_lst);
lst = av_bsf_list_alloc();
if (!lst)
return AVERROR(ENOMEM);
if (!(dup = buf = ... | {
"code": [
" if (!(dup = buf = av_strdup(str)))",
" return AVERROR(ENOMEM);"
],
"line_no": [
27,
23
]
} | int FUNC_0(const char *VAR_0, AVBSFContext **VAR_1)
{
AVBSFList *lst;
char *VAR_2, *VAR_3, *VAR_4, *VAR_5;
int VAR_6;
if (!VAR_0)
return av_bsf_get_null_filter(VAR_1);
lst = av_bsf_list_alloc();
if (!lst)
return AVERROR(ENOMEM);
if (!(VAR_4 = VAR_3 = av_strdup... | [
"int FUNC_0(const char *VAR_0, AVBSFContext **VAR_1)\n{",
"AVBSFList *lst;",
"char *VAR_2, *VAR_3, *VAR_4, *VAR_5;",
"int VAR_6;",
"if (!VAR_0)\nreturn av_bsf_get_null_filter(VAR_1);",
"lst = av_bsf_list_alloc();",
"if (!lst)\nreturn AVERROR(ENOMEM);",
"if (!(VAR_4 = VAR_3 = av_strdup(VAR_0)))\nreturn... | [
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21,
23
],
[
27,
29
],
[
33
],
[
35
],
[
37,
39
],
[
43
],
[
45,
47
],
[
51
],
[
53
],
[
57
],
[
59,
61,... |
7,644 | static int decode_spectrum_and_dequant(AACContext * ac, float coef[1024], GetBitContext * gb, float sf[120],
int pulse_present, const Pulse * pulse, const IndividualChannelStream * ics, enum BandType band_type[120]) {
int i, k, g, idx = 0;
const int c = 1024/ics->num_windows;
const uint16_t * of... | true | FFmpeg | febcbd65fa3d00cfdfbfabd1c2a8fb8e659e1ca1 | static int decode_spectrum_and_dequant(AACContext * ac, float coef[1024], GetBitContext * gb, float sf[120],
int pulse_present, const Pulse * pulse, const IndividualChannelStream * ics, enum BandType band_type[120]) {
int i, k, g, idx = 0;
const int c = 1024/ics->num_windows;
const uint16_t * of... | {
"code": [
" float ico = co / sqrtf(sqrtf(fabsf(co))) + pulse->amp[i];"
],
"line_no": [
163
]
} | static int FUNC_0(AACContext * VAR_0, float VAR_1[1024], GetBitContext * VAR_2, float VAR_3[120],
int VAR_4, const Pulse * VAR_5, const IndividualChannelStream * VAR_6, enum BandType VAR_7[120]) {
int VAR_8, VAR_9, VAR_10, VAR_11 = 0;
const int VAR_12 = 1024/VAR_6->num_windows;
const uint16_t * ... | [
"static int FUNC_0(AACContext * VAR_0, float VAR_1[1024], GetBitContext * VAR_2, float VAR_3[120],\nint VAR_4, const Pulse * VAR_5, const IndividualChannelStream * VAR_6, enum BandType VAR_7[120]) {",
"int VAR_8, VAR_9, VAR_10, VAR_11 = 0;",
"const int VAR_12 = 1024/VAR_6->num_windows;",
"const uint16_t * 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
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
7,645 | struct pxa2xx_lcdc_s *pxa2xx_lcdc_init(target_phys_addr_t base, qemu_irq irq,
DisplayState *ds)
{
int iomemtype;
struct pxa2xx_lcdc_s *s;
s = (struct pxa2xx_lcdc_s *) qemu_mallocz(sizeof(struct pxa2xx_lcdc_s));
s->base = base;
s->invalidated = 1;
s->irq = irq;
s->d... | true | qemu | 187337f8b0ec0813dd3876d1efe37d415fb81c2e | struct pxa2xx_lcdc_s *pxa2xx_lcdc_init(target_phys_addr_t base, qemu_irq irq,
DisplayState *ds)
{
int iomemtype;
struct pxa2xx_lcdc_s *s;
s = (struct pxa2xx_lcdc_s *) qemu_mallocz(sizeof(struct pxa2xx_lcdc_s));
s->base = base;
s->invalidated = 1;
s->irq = irq;
s->d... | {
"code": [
" cpu_register_physical_memory(base, 0x000fffff, iomemtype);",
" cpu_register_physical_memory(base, 0x000fffff, iomemtype);",
" cpu_register_physical_memory(base, 0x000fffff, iomemtype);"
],
"line_no": [
33,
33,
33
]
} | struct pxa2xx_lcdc_s *FUNC_0(target_phys_addr_t VAR_0, qemu_irq VAR_1,
DisplayState *VAR_2)
{
int VAR_3;
struct pxa2xx_lcdc_s *VAR_4;
VAR_4 = (struct pxa2xx_lcdc_s *) qemu_mallocz(sizeof(struct pxa2xx_lcdc_s));
VAR_4->VAR_0 = VAR_0;
VAR_4->invalidated = 1;
VAR_4->VAR_1 ... | [
"struct pxa2xx_lcdc_s *FUNC_0(target_phys_addr_t VAR_0, qemu_irq VAR_1,\nDisplayState *VAR_2)\n{",
"int VAR_3;",
"struct pxa2xx_lcdc_s *VAR_4;",
"VAR_4 = (struct pxa2xx_lcdc_s *) qemu_mallocz(sizeof(struct pxa2xx_lcdc_s));",
"VAR_4->VAR_0 = VAR_0;",
"VAR_4->invalidated = 1;",
"VAR_4->VAR_1 = VAR_1;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29,
31
],
[
33
],
[
37,
39
],
[
43
],
[
45,
47
],
[
49
],
[
51,
53
],
[
55
],
[... |
7,646 | static int stdio_get_fd(void *opaque)
{
QEMUFileStdio *s = opaque;
return fileno(s->stdio_file);
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static int stdio_get_fd(void *opaque)
{
QEMUFileStdio *s = opaque;
return fileno(s->stdio_file);
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0)
{
QEMUFileStdio *s = VAR_0;
return fileno(s->stdio_file);
}
| [
"static int FUNC_0(void *VAR_0)\n{",
"QEMUFileStdio *s = VAR_0;",
"return fileno(s->stdio_file);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
7,647 | static inline void cris_fidx_d(unsigned int x)
{
register unsigned int v asm("$r10") = x;
asm ("fidxd\t[%0]\n" : : "r" (v) );
}
| true | qemu | 21ce148c7ec71ee32834061355a5ecfd1a11f90f | static inline void cris_fidx_d(unsigned int x)
{
register unsigned int v asm("$r10") = x;
asm ("fidxd\t[%0]\n" : : "r" (v) );
}
| {
"code": [
"static inline void cris_fidx_d(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 ("fidxd\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 (\"fidxd\\t[%0]\\n\" : : \"r\" (VAR_1) );",
"}"
] | [
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
7,648 | void *av_malloc(size_t size)
{
void *ptr = NULL;
#if CONFIG_MEMALIGN_HACK
long diff;
#endif
/* let's disallow possible ambiguous cases */
if (size > (max_alloc_size - 32))
return NULL;
#if CONFIG_MEMALIGN_HACK
ptr = malloc(size + ALIGN);
if (!ptr)
return ptr;
... | false | FFmpeg | 84be80698227366d970e045001e4b59e4f99f0a1 | void *av_malloc(size_t size)
{
void *ptr = NULL;
#if CONFIG_MEMALIGN_HACK
long diff;
#endif
if (size > (max_alloc_size - 32))
return NULL;
#if CONFIG_MEMALIGN_HACK
ptr = malloc(size + ALIGN);
if (!ptr)
return ptr;
diff = ((~(long)ptr)&(ALIGN - 1... | {
"code": [],
"line_no": []
} | void *FUNC_0(size_t VAR_0)
{
void *VAR_1 = NULL;
#if CONFIG_MEMALIGN_HACK
long diff;
#endif
if (VAR_0 > (max_alloc_size - 32))
return NULL;
#if CONFIG_MEMALIGN_HACK
VAR_1 = malloc(VAR_0 + ALIGN);
if (!VAR_1)
return VAR_1;
diff = ((~(long)VAR_1)&... | [
"void *FUNC_0(size_t VAR_0)\n{",
"void *VAR_1 = NULL;",
"#if CONFIG_MEMALIGN_HACK\nlong diff;",
"#endif\nif (VAR_0 > (max_alloc_size - 32))\nreturn NULL;",
"#if CONFIG_MEMALIGN_HACK\nVAR_1 = malloc(VAR_0 + ALIGN);",
"if (!VAR_1)\nreturn VAR_1;",
"diff = ((~(long)VAR_1)&(ALIGN - 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,
17,
19
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37,
39,
41,
43
],
[
45,
47
],
[
49,
51,
53
],
[
55,
57
],
[
59,... |
7,650 | static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track)
{
int64_t pos = avio_tell(pb);
int version = 0;
uint32_t tag = track->tag;
if (track->mode == MODE_MOV) {
if (track->timescale > UINT16_MAX) {
if (mov_get_lpcm_flags(track->enc->codec_id))
tag ... | false | FFmpeg | 60b433d905c582ed3656c120b3ffffd0119d5377 | static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track)
{
int64_t pos = avio_tell(pb);
int version = 0;
uint32_t tag = track->tag;
if (track->mode == MODE_MOV) {
if (track->timescale > UINT16_MAX) {
if (mov_get_lpcm_flags(track->enc->codec_id))
tag ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVIOContext *VAR_0, MOVTrack *VAR_1)
{
int64_t pos = avio_tell(VAR_0);
int VAR_2 = 0;
uint32_t tag = VAR_1->tag;
if (VAR_1->mode == MODE_MOV) {
if (VAR_1->timescale > UINT16_MAX) {
if (mov_get_lpcm_flags(VAR_1->enc->codec_id))
tag = AV_RL32... | [
"static int FUNC_0(AVIOContext *VAR_0, MOVTrack *VAR_1)\n{",
"int64_t pos = avio_tell(VAR_0);",
"int VAR_2 = 0;",
"uint32_t tag = VAR_1->tag;",
"if (VAR_1->mode == MODE_MOV) {",
"if (VAR_1->timescale > UINT16_MAX) {",
"if (mov_get_lpcm_flags(VAR_1->enc->codec_id))\ntag = AV_RL32(\"lpcm\");",
"VAR_2 = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
7,652 | static int metadata_parse(FLACContext *s)
{
int i, metadata_last, metadata_type, metadata_size;
int initial_pos= get_bits_count(&s->gb);
if (show_bits_long(&s->gb, 32) == MKBETAG('f','L','a','C')) {
skip_bits_long(&s->gb, 32);
do {
metadata_last = get_bits1(&s->gb);
... | false | FFmpeg | 55a727383bab266b757b642aabaa2b066c14e7c7 | static int metadata_parse(FLACContext *s)
{
int i, metadata_last, metadata_type, metadata_size;
int initial_pos= get_bits_count(&s->gb);
if (show_bits_long(&s->gb, 32) == MKBETAG('f','L','a','C')) {
skip_bits_long(&s->gb, 32);
do {
metadata_last = get_bits1(&s->gb);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(FLACContext *VAR_0)
{
int VAR_1, VAR_2, VAR_3, VAR_4;
int VAR_5= get_bits_count(&VAR_0->gb);
if (show_bits_long(&VAR_0->gb, 32) == MKBETAG('f','L','a','C')) {
skip_bits_long(&VAR_0->gb, 32);
do {
VAR_2 = get_bits1(&VAR_0->gb);
VAR_3 = get... | [
"static int FUNC_0(FLACContext *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3, VAR_4;",
"int VAR_5= get_bits_count(&VAR_0->gb);",
"if (show_bits_long(&VAR_0->gb, 32) == MKBETAG('f','L','a','C')) {",
"skip_bits_long(&VAR_0->gb, 32);",
"do {",
"VAR_2 = get_bits1(&VAR_0->gb);",
"VAR_3 = get_bits(&VAR_0->gb, 7);",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41,
43
],
[
45,
47
],
[
49
],
[
51... |
7,653 | static int coroutine_fn v9fs_complete_rename(V9fsPDU *pdu, V9fsFidState *fidp,
int32_t newdirfid,
V9fsString *name)
{
char *end;
int err = 0;
V9fsPath new_path;
V9fsFidState *tfidp;
V9fsState *s = pdu->... | true | qemu | 49dd946bb5419681c8668b09a6d10f42bc707b78 | static int coroutine_fn v9fs_complete_rename(V9fsPDU *pdu, V9fsFidState *fidp,
int32_t newdirfid,
V9fsString *name)
{
char *end;
int err = 0;
V9fsPath new_path;
V9fsFidState *tfidp;
V9fsState *s = pdu->... | {
"code": [
" BUG_ON(dirfidp->fid_type != P9_FID_NONE);"
],
"line_no": [
39
]
} | static int VAR_0 v9fs_complete_rename(V9fsPDU *pdu, V9fsFidState *fidp,
int32_t newdirfid,
V9fsString *name)
{
char *end;
int err = 0;
V9fsPath new_path;
V9fsFidState *tfidp;
V9fsState *s = pdu->s;
... | [
"static int VAR_0 v9fs_complete_rename(V9fsPDU *pdu, V9fsFidState *fidp,\nint32_t newdirfid,\nV9fsString *name)\n{",
"char *end;",
"int err = 0;",
"V9fsPath new_path;",
"V9fsFidState *tfidp;",
"V9fsState *s = pdu->s;",
"V9fsFidState *dirfidp = NULL;",
"char *old_name, *new_name;",
"v9fs_path_init(&n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
7,655 | static av_cold int alac_decode_close(AVCodecContext *avctx)
{
ALACContext *alac = avctx->priv_data;
int chan;
for (chan = 0; chan < alac->numchannels; chan++) {
av_freep(&alac->predicterror_buffer[chan]);
av_freep(&alac->outputsamples_buffer[chan]);
av_freep(&alac->wasted_bi... | true | FFmpeg | 53df079a730043cd0aa330c9aba7950034b1424f | static av_cold int alac_decode_close(AVCodecContext *avctx)
{
ALACContext *alac = avctx->priv_data;
int chan;
for (chan = 0; chan < alac->numchannels; chan++) {
av_freep(&alac->predicterror_buffer[chan]);
av_freep(&alac->outputsamples_buffer[chan]);
av_freep(&alac->wasted_bi... | {
"code": [
" int chan;",
" for (chan = 0; chan < alac->numchannels; chan++) {",
" return 0;",
" return 0;",
"static av_cold int alac_decode_close(AVCodecContext *avctx)",
" ALACContext *alac = avctx->priv_data;",
" int chan;",
" for (chan = 0; chan < alac->numchan... | static av_cold int FUNC_0(AVCodecContext *avctx)
{
ALACContext *alac = avctx->priv_data;
int VAR_0;
for (VAR_0 = 0; VAR_0 < alac->numchannels; VAR_0++) {
av_freep(&alac->predicterror_buffer[VAR_0]);
av_freep(&alac->outputsamples_buffer[VAR_0]);
av_freep(&alac->wasted_bits_bu... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"ALACContext *alac = avctx->priv_data;",
"int VAR_0;",
"for (VAR_0 = 0; VAR_0 < alac->numchannels; VAR_0++) {",
"av_freep(&alac->predicterror_buffer[VAR_0]);",
"av_freep(&alac->outputsamples_buffer[VAR_0]);",
"av_freep(&alac->wasted_bits_buffer[VAR_... | [
1,
1,
1,
1,
1,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
]
] |
7,656 | void OPPROTO op_fdiv_ST0_FT0(void)
{
ST0 /= FT0;
}
| true | qemu | 2ee73ac3a855fb0cfba3db91fdd1ecebdbc6f971 | void OPPROTO op_fdiv_ST0_FT0(void)
{
ST0 /= FT0;
}
| {
"code": [
" ST0 /= FT0;"
],
"line_no": [
5
]
} | void VAR_0 op_fdiv_ST0_FT0(void)
{
ST0 /= FT0;
}
| [
"void VAR_0 op_fdiv_ST0_FT0(void)\n{",
"ST0 /= FT0;",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
7,657 | static void ipmi_sim_handle_command(IPMIBmc *b,
uint8_t *cmd, unsigned int cmd_len,
unsigned int max_cmd_len,
uint8_t msg_id)
{
IPMIBmcSim *ibs = IPMI_BMC_SIMULATOR(b);
IPMIInterface *s = ibs->paren... | true | qemu | 4f298a4b2957b7833bc607c951ca27c458d98d88 | static void ipmi_sim_handle_command(IPMIBmc *b,
uint8_t *cmd, unsigned int cmd_len,
unsigned int max_cmd_len,
uint8_t msg_id)
{
IPMIBmcSim *ibs = IPMI_BMC_SIMULATOR(b);
IPMIInterface *s = ibs->paren... | {
"code": [
" unsigned int netfn;",
" netfn = cmd[0] >> 2;",
" if ((netfn & 1) || !ibs->netfns[netfn / 2] ||",
" (cmd[1] >= ibs->netfns[netfn / 2]->cmd_nums) ||",
" (!ibs->netfns[netfn / 2]->cmd_handlers[cmd[1]])) {",
" ibs->netfns[netf... | static void FUNC_0(IPMIBmc *VAR_0,
uint8_t *VAR_1, unsigned int VAR_2,
unsigned int VAR_3,
uint8_t VAR_4)
{
IPMIBmcSim *ibs = IPMI_BMC_SIMULATOR(VAR_0);
IPMIInterface *s = ibs->parent.intf;
IPM... | [
"static void FUNC_0(IPMIBmc *VAR_0,\nuint8_t *VAR_1, unsigned int VAR_2,\nunsigned int VAR_3,\nuint8_t VAR_4)\n{",
"IPMIBmcSim *ibs = IPMI_BMC_SIMULATOR(VAR_0);",
"IPMIInterface *s = ibs->parent.intf;",
"IPMIInterfaceClass *k = IPMI_INTERFACE_GET_CLASS(s);",
"unsigned int VAR_5;",
"uint8_t rsp[MAX_IPMI_MS... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
53
],
[
55
],
[... |
7,658 | void OPPROTO op_divw (void)
{
if (unlikely(((int32_t)T0 == INT32_MIN && (int32_t)T1 == -1) ||
(int32_t)T1 == 0)) {
T0 = (int32_t)((-1) * ((uint32_t)T0 >> 31));
} else {
T0 = (int32_t)T0 / (int32_t)T1;
}
RETURN();
}
| true | qemu | 6f2d8978728c48ca46f5c01835438508aace5c64 | void OPPROTO op_divw (void)
{
if (unlikely(((int32_t)T0 == INT32_MIN && (int32_t)T1 == -1) ||
(int32_t)T1 == 0)) {
T0 = (int32_t)((-1) * ((uint32_t)T0 >> 31));
} else {
T0 = (int32_t)T0 / (int32_t)T1;
}
RETURN();
}
| {
"code": [
" if (unlikely(((int32_t)T0 == INT32_MIN && (int32_t)T1 == -1) ||",
" T0 = (int32_t)((-1) * ((uint32_t)T0 >> 31));"
],
"line_no": [
5,
9
]
} | void VAR_0 op_divw (void)
{
if (unlikely(((int32_t)T0 == INT32_MIN && (int32_t)T1 == -1) ||
(int32_t)T1 == 0)) {
T0 = (int32_t)((-1) * ((uint32_t)T0 >> 31));
} else {
T0 = (int32_t)T0 / (int32_t)T1;
}
RETURN();
}
| [
"void VAR_0 op_divw (void)\n{",
"if (unlikely(((int32_t)T0 == INT32_MIN && (int32_t)T1 == -1) ||\n(int32_t)T1 == 0)) {",
"T0 = (int32_t)((-1) * ((uint32_t)T0 >> 31));",
"} else {",
"T0 = (int32_t)T0 / (int32_t)T1;",
"}",
"RETURN();",
"}"
] | [
0,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
7,660 | static void qed_read_backing_file(BDRVQEDState *s, uint64_t pos,
QEMUIOVector *qiov,
BlockDriverCompletionFunc *cb, void *opaque)
{
uint64_t backing_length = 0;
size_t size;
/* If there is a backing file, get its length. Treat the ... | true | qemu | f06ee3d4aa547df8d7d2317b2b6db7a88c1f3744 | static void qed_read_backing_file(BDRVQEDState *s, uint64_t pos,
QEMUIOVector *qiov,
BlockDriverCompletionFunc *cb, void *opaque)
{
uint64_t backing_length = 0;
size_t size;
if (s->bs->backing_hd) {
int64_t l = bd... | {
"code": [
" qiov, size / BDRV_SECTOR_SIZE, cb, opaque);"
],
"line_no": [
73
]
} | static void FUNC_0(BDRVQEDState *VAR_0, uint64_t VAR_1,
QEMUIOVector *VAR_2,
BlockDriverCompletionFunc *VAR_3, void *VAR_4)
{
uint64_t backing_length = 0;
size_t size;
if (VAR_0->bs->backing_hd) {
int64_t l = bdrv... | [
"static void FUNC_0(BDRVQEDState *VAR_0, uint64_t VAR_1,\nQEMUIOVector *VAR_2,\nBlockDriverCompletionFunc *VAR_3, void *VAR_4)\n{",
"uint64_t backing_length = 0;",
"size_t size;",
"if (VAR_0->bs->backing_hd) {",
"int64_t l = bdrv_getlength(VAR_0->bs->backing_hd);",
"if (l < 0) {",
"VAR_3(VAR_4, l);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
41,
43
],
[
45
],
[
47
],
[
53
],
[
55
],
[
57
],
[
59
],
[... |
7,661 | int av_parse_cpu_caps(unsigned *flags, const char *s)
{
static const AVOption cpuflags_opts[] = {
{ "flags" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = "flags" },
#if ARCH_PPC
{ "altivec" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ALTIVEC }, .un... | true | FFmpeg | 1e519b9d407fd35538b8d4dfdc723448355e9fe1 | int av_parse_cpu_caps(unsigned *flags, const char *s)
{
static const AVOption cpuflags_opts[] = {
{ "flags" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = "flags" },
#if ARCH_PPC
{ "altivec" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ALTIVEC }, .un... | {
"code": [],
"line_no": []
} | int FUNC_0(unsigned *VAR_0, const char *VAR_1)
{
static const AVOption VAR_2[] = {
{ "VAR_0" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = "VAR_0" },
#if ARCH_PPC
{ "altivec" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ALTIVEC }, .unit = "VAR_0" },... | [
"int FUNC_0(unsigned *VAR_0, const char *VAR_1)\n{",
"static const AVOption VAR_2[] = {",
"{ \"VAR_0\" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = \"VAR_0\" },",
"#if ARCH_PPC\n{ \"altivec\" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ALTIVEC }, .unit = \"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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
7,663 | static int nbd_handle_reply_err(QIOChannel *ioc, nbd_opt_reply *reply,
Error **errp)
{
char *msg = NULL;
int result = -1;
if (!(reply->type & (1 << 31))) {
return 1;
}
if (reply->length) {
if (reply->length > NBD_MAX_BUFFER_SIZE) {
... | true | qemu | 9a76bd783d0421962e8c65bb853a57eef4897720 | static int nbd_handle_reply_err(QIOChannel *ioc, nbd_opt_reply *reply,
Error **errp)
{
char *msg = NULL;
int result = -1;
if (!(reply->type & (1 << 31))) {
return 1;
}
if (reply->length) {
if (reply->length > NBD_MAX_BUFFER_SIZE) {
... | {
"code": [
" error_setg(errp, \"Requested export not available for option %\" PRIx32",
" \" (%s)\", reply->option, nbd_opt_lookup(reply->option));",
" error_append_hint(errp, \"%s\\n\", msg);"
],
"line_no": [
109,
101,
151
]
} | static int FUNC_0(QIOChannel *VAR_0, nbd_opt_reply *VAR_1,
Error **VAR_2)
{
char *VAR_3 = NULL;
int VAR_4 = -1;
if (!(VAR_1->type & (1 << 31))) {
return 1;
}
if (VAR_1->length) {
if (VAR_1->length > NBD_MAX_BUFFER_SIZE) {
erro... | [
"static int FUNC_0(QIOChannel *VAR_0, nbd_opt_reply *VAR_1,\nError **VAR_2)\n{",
"char *VAR_3 = NULL;",
"int VAR_4 = -1;",
"if (!(VAR_1->type & (1 << 31))) {",
"return 1;",
"}",
"if (VAR_1->length) {",
"if (VAR_1->length > NBD_MAX_BUFFER_SIZE) {",
"error_setg(VAR_2, \"server error 0x%\" PRIx32\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,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41,
43
],
[
45
],
[
47
],
[
49
],
[... |
7,664 | static int check_refcounts_l1(BlockDriverState *bs,
BdrvCheckResult *res,
uint16_t *refcount_table,
int refcount_table_size,
int64_t l1_table_offset, int l1_size,
in... | true | qemu | de82815db1c89da058b7fb941dab137d6d9ab738 | static int check_refcounts_l1(BlockDriverState *bs,
BdrvCheckResult *res,
uint16_t *refcount_table,
int refcount_table_size,
int64_t l1_table_offset, int l1_size,
in... | {
"code": [
" l1_table = g_malloc(l1_size2);"
],
"line_no": [
43
]
} | static int FUNC_0(BlockDriverState *VAR_0,
BdrvCheckResult *VAR_1,
uint16_t *VAR_2,
int VAR_3,
int64_t VAR_4, int VAR_5,
int VAR_6)
{
BDRVQcowState *s = VAR_0-... | [
"static int FUNC_0(BlockDriverState *VAR_0,\nBdrvCheckResult *VAR_1,\nuint16_t *VAR_2,\nint VAR_3,\nint64_t VAR_4, int VAR_5,\nint VAR_6)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"uint64_t *l1_table, l2_offset, l1_size2;",
"int VAR_7, VAR_8;",
"l1_size2 = VAR_5 * sizeof(uint64_t);",
"inc_refcounts(VAR_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
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
29,
31
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47,
49
],
[
51
],
[
53
],
[
55
],
[
61
],
[
63
... |
7,667 | static inline int mpeg2_decode_block_non_intra(MpegEncContext *s, int16_t *block, int n)
{
int level, i, j, run;
RLTable *rl = &ff_rl_mpeg1;
uint8_t * const scantable = s->intra_scantable.permutated;
const uint16_t *quant_matrix;
const int qscale = s->qscale;
int mismatch;
mismatch... | true | FFmpeg | 6d93307f8df81808f0dcdbc064b848054a6e83b3 | static inline int mpeg2_decode_block_non_intra(MpegEncContext *s, int16_t *block, int n)
{
int level, i, j, run;
RLTable *rl = &ff_rl_mpeg1;
uint8_t * const scantable = s->intra_scantable.permutated;
const uint16_t *quant_matrix;
const int qscale = s->qscale;
int mismatch;
mismatch... | {
"code": [
" if (i > 63) {",
" av_log(s->avctx, AV_LOG_ERROR, \"ac-tex damaged at %d %d\\n\", s->mb_x, s->mb_y);",
" return -1;",
" if (i > 63) {",
" av_log(s->avctx, AV_LOG_ERROR, \"ac-tex damaged at %d %d\\n\", s->mb_x, s->mb_y)... | static inline int FUNC_0(MpegEncContext *VAR_0, int16_t *VAR_1, int VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6;
RLTable *rl = &ff_rl_mpeg1;
uint8_t * const scantable = VAR_0->intra_scantable.permutated;
const uint16_t *VAR_7;
const int VAR_8 = VAR_0->VAR_8;
int VAR_9;
VAR_9 = 1;
... | [
"static inline int FUNC_0(MpegEncContext *VAR_0, int16_t *VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"RLTable *rl = &ff_rl_mpeg1;",
"uint8_t * const scantable = VAR_0->intra_scantable.permutated;",
"const uint16_t *VAR_7;",
"const int VAR_8 = VAR_0->VAR_8;",
"int VAR_9;",
"VAR_9 = 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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33,
35
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51
],
[... |
7,668 | static void channel_out_run(struct fs_dma_ctrl *ctrl, int c)
{
uint32_t len;
uint32_t saved_data_buf;
unsigned char buf[2 * 1024];
if (ctrl->channels[c].eol == 1)
return;
saved_data_buf = channel_reg(ctrl, c, RW_SAVED_DATA_BUF);
D(fprintf(logfile, "ch=%d buf=%x after=%x saved_data_buf=%x\n",
c... | true | qemu | 4487fd349baa6d2ae34ab86dea843642d20a036a | static void channel_out_run(struct fs_dma_ctrl *ctrl, int c)
{
uint32_t len;
uint32_t saved_data_buf;
unsigned char buf[2 * 1024];
if (ctrl->channels[c].eol == 1)
return;
saved_data_buf = channel_reg(ctrl, c, RW_SAVED_DATA_BUF);
D(fprintf(logfile, "ch=%d buf=%x after=%x saved_data_buf=%x\n",
c... | {
"code": [
"\tD(fprintf(logfile, \"ch=%d buf=%x after=%x saved_data_buf=%x\\n\","
],
"line_no": [
23
]
} | static void FUNC_0(struct fs_dma_ctrl *VAR_0, int VAR_1)
{
uint32_t len;
uint32_t saved_data_buf;
unsigned char VAR_2[2 * 1024];
if (VAR_0->channels[VAR_1].eol == 1)
return;
saved_data_buf = channel_reg(VAR_0, VAR_1, RW_SAVED_DATA_BUF);
D(fprintf(logfile, "ch=%d VAR_2=%x after=%x saved_data_buf=%x... | [
"static void FUNC_0(struct fs_dma_ctrl *VAR_0, int VAR_1)\n{",
"uint32_t len;",
"uint32_t saved_data_buf;",
"unsigned char VAR_2[2 * 1024];",
"if (VAR_0->channels[VAR_1].eol == 1)\nreturn;",
"saved_data_buf = channel_reg(VAR_0, VAR_1, RW_SAVED_DATA_BUF);",
"D(fprintf(logfile, \"ch=%d VAR_2=%x after=%x s... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
23,
25,
27,
29,
31
],
[
35
],
[
37
],
[
41,
43
],
[
45
],
[
49,
51
],
[
55,
57,
59
],
[
61,
63
],
[
67
... |
7,669 | static int 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;
DVBSubOb... | true | FFmpeg | 0075d9eced22839fa4f7a6eaa02155803ccae3e6 | static int 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;
DVBSubOb... | {
"code": [],
"line_no": []
} | static int 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;
DVBSubObjectDisplay... | [
"static int 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_7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13,
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19,
20
],
[
21
],
[
22
],
[
... |
7,671 | static void x86_cpu_parse_featurestr(CPUState *cs, char *features,
Error **errp)
{
X86CPU *cpu = X86_CPU(cs);
char *featurestr; /* Single 'key=value" string being parsed */
/* Features to be added */
FeatureWordArray plus_features = { 0 };
/* Features to b... | true | qemu | 6b1dd54b6a4652a3a1e15a4beacd3be554a9ade1 | static void x86_cpu_parse_featurestr(CPUState *cs, char *features,
Error **errp)
{
X86CPU *cpu = X86_CPU(cs);
char *featurestr;
FeatureWordArray plus_features = { 0 };
FeatureWordArray minus_features = { 0 };
uint32_t numvalue;
CPUX86Stat... | {
"code": [
" error_setg(&local_err, \"bad numerical value %s\", val);",
" goto out;",
" error_setg(&local_err, \"bad numerical value %s\", val);",
" goto out;",
" error_setg(&local_err, \"bad numerical ... | static void FUNC_0(CPUState *VAR_0, char *VAR_1,
Error **VAR_2)
{
X86CPU *cpu = X86_CPU(VAR_0);
char *VAR_3;
FeatureWordArray plus_features = { 0 };
FeatureWordArray minus_features = { 0 };
uint32_t numvalue;
CPUX86State *env = &cpu->env;... | [
"static void FUNC_0(CPUState *VAR_0, char *VAR_1,\nError **VAR_2)\n{",
"X86CPU *cpu = X86_CPU(VAR_0);",
"char *VAR_3;",
"FeatureWordArray plus_features = { 0 };",
"FeatureWordArray minus_features = { 0 };",
"uint32_t numvalue;",
"CPUX86State *env = &cpu->env;",
"Error *local_err = NULL;",
"VAR_3 = V... | [
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
7,672 | static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
int *data_size, AVPacket *avpkt)
{
int buf_size = avpkt->size;
FlashSVContext *s = avctx->priv_data;
int h_blocks, v_blocks, h_part, v_part, i, j;
GetBitContext gb;
/* no supplementary ... | true | FFmpeg | 5ae72f54532960cb9eae82a1c9e8d505106c022b | static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
int *data_size, AVPacket *avpkt)
{
int buf_size = avpkt->size;
FlashSVContext *s = avctx->priv_data;
int h_blocks, v_blocks, h_part, v_part, i, j;
GetBitContext gb;
if (buf_size =... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
int VAR_4 = VAR_3->VAR_17;
FlashSVContext *s = VAR_0->priv_data;
int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;
GetBitContext gb;
if (VAR_4 == 0)
return... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"int VAR_4 = VAR_3->VAR_17;",
"FlashSVContext *s = VAR_0->priv_data;",
"int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;",
"GetBitContext gb;",
"if (VAR_4 == 0)\nreturn 0;",
"if (VAR_4 < 4)\nreturn -1;",
"in... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
19,
21
],
[
23,
25
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
56
],
[... |
7,673 | static void setup_window(AVFormatContext *s)
{
XCBGrabContext *c = s->priv_data;
uint32_t mask = XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK;
uint32_t values[] = { 1,
XCB_EVENT_MASK_EXPOSURE |
XCB_EVENT_MASK_STRUCTURE_NOTIFY };
xcb_rectangl... | true | FFmpeg | 6a817ac1e9a0d2b747f71abc5345a54434ceb4a2 | static void setup_window(AVFormatContext *s)
{
XCBGrabContext *c = s->priv_data;
uint32_t mask = XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK;
uint32_t values[] = { 1,
XCB_EVENT_MASK_EXPOSURE |
XCB_EVENT_MASK_STRUCTURE_NOTIFY };
xcb_rectangl... | {
"code": [
" xcb_rectangle_t rect = { 0, 0, c->width, c->height };"
],
"line_no": [
15
]
} | static void FUNC_0(AVFormatContext *VAR_0)
{
XCBGrabContext *c = VAR_0->priv_data;
uint32_t mask = XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK;
uint32_t values[] = { 1,
XCB_EVENT_MASK_EXPOSURE |
XCB_EVENT_MASK_STRUCTURE_NOTIFY };
xcb_rectan... | [
"static void FUNC_0(AVFormatContext *VAR_0)\n{",
"XCBGrabContext *c = VAR_0->priv_data;",
"uint32_t mask = XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK;",
"uint32_t values[] = { 1,",
"XCB_EVENT_MASK_EXPOSURE |\nXCB_EVENT_MASK_STRUCTURE_NOTIFY };",
"xcb_rectangle_t rect = { 0, 0, c->width, c->height };... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
19
],
[
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43
],
[
47,
49,
51,
53,
55,
57
],
[
59,
63
],
[
67
],
[... |
7,674 | static inline void RENAME(rgb16to15)(const uint8_t *src, uint8_t *dst, int src_size)
{
register const uint8_t* s=src;
register uint8_t* d=dst;
register const uint8_t *end;
const uint8_t *mm_end;
end = s + src_size;
__asm__ volatile(PREFETCH" %0"::"m"(*s));
__asm__ volatile("movq ... | true | FFmpeg | 90540c2d5ace46a1e9789c75fde0b1f7dbb12a9b | static inline void RENAME(rgb16to15)(const uint8_t *src, uint8_t *dst, int src_size)
{
register const uint8_t* s=src;
register uint8_t* d=dst;
register const uint8_t *end;
const uint8_t *mm_end;
end = s + src_size;
__asm__ volatile(PREFETCH" %0"::"m"(*s));
__asm__ volatile("movq ... | {
"code": [
" :\"m\"(*s)",
" :\"m\"(*s)",
" PREFETCH\" 32%1 \\n\\t\"",
" \"movq %1, %%mm0 \\n\\t\"",
" \"movq 8%1, %%mm2 \\n\\t\"",
" MOVNTQ\" %%mm0, %0 \\n\\t\"",
" MOVNTQ\" %%mm2,... | static inline void FUNC_0(rgb16to15)(const uint8_t *src, uint8_t *dst, int src_size)
{
register const uint8_t* VAR_0=src;
register uint8_t* VAR_1=dst;
register const uint8_t *VAR_2;
const uint8_t *VAR_3;
VAR_2 = VAR_0 + src_size;
__asm__ volatile(PREFETCH" %0"::"m"(*VAR_0));
__asm... | [
"static inline void FUNC_0(rgb16to15)(const uint8_t *src, uint8_t *dst, int src_size)\n{",
"register const uint8_t* VAR_0=src;",
"register uint8_t* VAR_1=dst;",
"register const uint8_t *VAR_2;",
"const uint8_t *VAR_3;",
"VAR_2 = VAR_0 + src_size;",
"__asm__ volatile(PREFETCH\" %0\"::\"m\"(*VAR_0));",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,... |
7,675 | void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
const int dst_pitch, const int num_bands)
{
int x, y, indx;
int32_t p0, p1, p2, p3, tmp0, tmp1, tmp2;
int32_t b0_1, b0_2, b1_1, b1_2, b1_3, b2_1, b2_2, b2_3, b2_4, b2_5, b2_6;
int32... | true | FFmpeg | f9143d2407b38f33b85487fd597c9194f79adb20 | void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
const int dst_pitch, const int num_bands)
{
int x, y, indx;
int32_t p0, p1, p2, p3, tmp0, tmp1, tmp2;
int32_t b0_1, b0_2, b1_1, b1_2, b1_3, b2_1, b2_2, b2_3, b2_4, b2_5, b2_6;
int32... | {
"code": [
" b0_ptr += pitch;",
" b1_ptr += pitch;",
" b2_ptr += pitch;",
" b3_ptr += pitch;"
],
"line_no": [
285,
287,
289,
291
]
} | void FUNC_0(const IVIPlaneDesc *VAR_0, uint8_t *VAR_1,
const int VAR_2, const int VAR_3)
{
int VAR_4, VAR_5, VAR_6;
int32_t p0, p1, p2, p3, tmp0, tmp1, tmp2;
int32_t b0_1, b0_2, b1_1, b1_2, b1_3, b2_1, b2_2, b2_3, b2_4, b2_5, b2_6;
int32_t ... | [
"void FUNC_0(const IVIPlaneDesc *VAR_0, uint8_t *VAR_1,\nconst int VAR_2, const int VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6;",
"int32_t p0, p1, p2, p3, tmp0, tmp1, tmp2;",
"int32_t b0_1, b0_2, b1_1, b1_2, b1_3, b2_1, b2_2, b2_3, b2_4, b2_5, b2_6;",
"int32_t b3_1, b3_2, b3_3,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
49,
51
],
[
55
],
[
57
],
[
59
],
[
61
... |
7,676 | void select_soundhw(const char *optarg)
{
struct soundhw *c;
if (*optarg == '?') {
show_valid_cards:
printf("Valid sound card names (comma separated):\n");
for (c = soundhw; c->name; ++c) {
printf ("%-11s %s\n", c->name, c->descr);
}
printf("\n-soundh... | true | qemu | c8057f951d64de93bfd01569c0a725baa9f94372 | void select_soundhw(const char *optarg)
{
struct soundhw *c;
if (*optarg == '?') {
show_valid_cards:
printf("Valid sound card names (comma separated):\n");
for (c = soundhw; c->name; ++c) {
printf ("%-11s %s\n", c->name, c->descr);
}
printf("\n-soundh... | {
"code": [
" if (*optarg == '?') {",
" exit(*optarg != '?');"
],
"line_no": [
9,
25
]
} | void FUNC_0(const char *VAR_0)
{
struct soundhw *VAR_1;
if (*VAR_0 == '?') {
show_valid_cards:
printf("Valid sound card names (comma separated):\n");
for (VAR_1 = soundhw; VAR_1->name; ++VAR_1) {
printf ("%-11s %s\n", VAR_1->name, VAR_1->descr);
}
pri... | [
"void FUNC_0(const char *VAR_0)\n{",
"struct soundhw *VAR_1;",
"if (*VAR_0 == '?') {",
"show_valid_cards:\nprintf(\"Valid sound card names (comma separated):\\n\");",
"for (VAR_1 = soundhw; VAR_1->name; ++VAR_1) {",
"printf (\"%-11s %s\\n\", VAR_1->name, VAR_1->descr);",
"}",
"printf(\"\\n-soundhw all... | [
0,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
... |
7,677 | int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush){
AVPacketList *pktl;
int stream_count=0, noninterleaved_count=0;
int64_t delta_dts_max = 0;
int i;
if(pkt){
ff_interleave_add_packet(s, pkt, ff_interleave_compare_dts);
}
for(i=0... | true | FFmpeg | 4d7c71c36467331f1e0c0f17af9f371d33308a9c | int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush){
AVPacketList *pktl;
int stream_count=0, noninterleaved_count=0;
int64_t delta_dts_max = 0;
int i;
if(pkt){
ff_interleave_add_packet(s, pkt, ff_interleave_compare_dts);
}
for(i=0... | {
"code": [
" int i;",
" ff_interleave_add_packet(s, pkt, ff_interleave_compare_dts);"
],
"line_no": [
9,
15
]
} | int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1, AVPacket *VAR_2, int VAR_3){
AVPacketList *pktl;
int VAR_4=0, VAR_5=0;
int64_t delta_dts_max = 0;
int VAR_6;
if(VAR_2){
ff_interleave_add_packet(VAR_0, VAR_2, ff_interleave_compare_dts);
}
for(VAR_6=0; VAR_6 < VAR_0->nb_... | [
"int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1, AVPacket *VAR_2, int VAR_3){",
"AVPacketList *pktl;",
"int VAR_4=0, VAR_5=0;",
"int64_t delta_dts_max = 0;",
"int VAR_6;",
"if(VAR_2){",
"ff_interleave_add_packet(VAR_0, VAR_2, ff_interleave_compare_dts);",
"}",
"for(VAR_6=0; VAR_6 < VAR_0->nb_str... | [
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
7,679 | static int read_header(AVFormatContext *s)
{
WtvContext *wtv = s->priv_data;
int root_sector, root_size;
uint8_t root[WTV_SECTOR_SIZE];
AVIOContext *pb;
int64_t timeline_pos;
int64_t ret;
wtv->epoch =
wtv->pts =
wtv->last_valid_pts = AV_NOPTS_VALUE;
... | false | FFmpeg | cc5e5548df4af48674c7aef518e831b19e99f9fc | static int read_header(AVFormatContext *s)
{
WtvContext *wtv = s->priv_data;
int root_sector, root_size;
uint8_t root[WTV_SECTOR_SIZE];
AVIOContext *pb;
int64_t timeline_pos;
int64_t ret;
wtv->epoch =
wtv->pts =
wtv->last_valid_pts = AV_NOPTS_VALUE;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
WtvContext *wtv = VAR_0->priv_data;
int VAR_1, VAR_2;
uint8_t root[WTV_SECTOR_SIZE];
AVIOContext *pb;
int64_t timeline_pos;
int64_t ret;
wtv->epoch =
wtv->pts =
wtv->last_valid_pts = AV_NOPTS_VALUE;
... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"WtvContext *wtv = VAR_0->priv_data;",
"int VAR_1, VAR_2;",
"uint8_t root[WTV_SECTOR_SIZE];",
"AVIOContext *pb;",
"int64_t timeline_pos;",
"int64_t ret;",
"wtv->epoch =\nwtv->pts =\nwtv->last_valid_pts = AV_NOPTS_VALUE;",
"avio_skip... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49,
51
],
[... |
7,680 | SwsVector *sws_getGaussianVec(double variance, double quality)
{
const int length = (int)(variance * quality + 0.5) | 1;
int i;
double middle = (length - 1) * 0.5;
SwsVector *vec = sws_allocVec(length);
if (!vec)
return NULL;
for (i = 0; i < length; i++) {
double di... | false | FFmpeg | e823e7367754dd23de16a141c06471735a488f0d | SwsVector *sws_getGaussianVec(double variance, double quality)
{
const int length = (int)(variance * quality + 0.5) | 1;
int i;
double middle = (length - 1) * 0.5;
SwsVector *vec = sws_allocVec(length);
if (!vec)
return NULL;
for (i = 0; i < length; i++) {
double di... | {
"code": [],
"line_no": []
} | SwsVector *FUNC_0(double variance, double quality)
{
const int VAR_0 = (int)(variance * quality + 0.5) | 1;
int VAR_1;
double VAR_2 = (VAR_0 - 1) * 0.5;
SwsVector *vec = sws_allocVec(VAR_0);
if (!vec)
return NULL;
for (VAR_1 = 0; VAR_1 < VAR_0; VAR_1++) {
double VAR... | [
"SwsVector *FUNC_0(double variance, double quality)\n{",
"const int VAR_0 = (int)(variance * quality + 0.5) | 1;",
"int VAR_1;",
"double VAR_2 = (VAR_0 - 1) * 0.5;",
"SwsVector *vec = sws_allocVec(VAR_0);",
"if (!vec)\nreturn NULL;",
"for (VAR_1 = 0; VAR_1 < VAR_0; VAR_1++) {",
"double VAR_3 = VAR_1 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
33
],
[
37
],
[
39
]
] |
7,681 | static void h261_h_loop_filter_c(uint8_t *dest,uint8_t *src, int stride){
int i,j,xy,yz;
int res;
for(i=1; i<7; i++){
for(j=0; j<8; j++){
xy = j * stride + i;
yz = j * 8 + i;
res = (int)src[yz-1] + ((int)(src[yz]) *2) + (int)src[yz+1];
res+... | false | FFmpeg | fdbbf2e0fc1bb91a5d735a49f39337eb172e68a7 | static void h261_h_loop_filter_c(uint8_t *dest,uint8_t *src, int stride){
int i,j,xy,yz;
int res;
for(i=1; i<7; i++){
for(j=0; j<8; j++){
xy = j * stride + i;
yz = j * 8 + i;
res = (int)src[yz-1] + ((int)(src[yz]) *2) + (int)src[yz+1];
res+... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0,uint8_t *VAR_1, int VAR_2){
int VAR_3,VAR_4,VAR_5,VAR_6;
int VAR_7;
for(VAR_3=1; VAR_3<7; VAR_3++){
for(VAR_4=0; VAR_4<8; VAR_4++){
VAR_5 = VAR_4 * VAR_2 + VAR_3;
VAR_6 = VAR_4 * 8 + VAR_3;
VAR_7 = (int)VAR_1[VAR_6-1] +... | [
"static void FUNC_0(uint8_t *VAR_0,uint8_t *VAR_1, int VAR_2){",
"int VAR_3,VAR_4,VAR_5,VAR_6;",
"int VAR_7;",
"for(VAR_3=1; VAR_3<7; VAR_3++){",
"for(VAR_4=0; VAR_4<8; VAR_4++){",
"VAR_5 = VAR_4 * VAR_2 + VAR_3;",
"VAR_6 = VAR_4 * 8 + VAR_3;",
"VAR_7 = (int)VAR_1[VAR_6-1] + ((int)(VAR_1[VAR_6]) *2) +... | [
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
]
] |
7,682 | PcGuestInfo *pc_guest_info_init(ram_addr_t below_4g_mem_size,
ram_addr_t above_4g_mem_size)
{
PcGuestInfoState *guest_info_state = g_malloc0(sizeof *guest_info_state);
PcGuestInfo *guest_info = &guest_info_state->info;
guest_info->pci_info.w32.end = IO_APIC_DEFAULT_ADD... | true | qemu | 398489018183d613306ab022653552247d93919f | PcGuestInfo *pc_guest_info_init(ram_addr_t below_4g_mem_size,
ram_addr_t above_4g_mem_size)
{
PcGuestInfoState *guest_info_state = g_malloc0(sizeof *guest_info_state);
PcGuestInfo *guest_info = &guest_info_state->info;
guest_info->pci_info.w32.end = IO_APIC_DEFAULT_ADD... | {
"code": [
" guest_info->pci_info.w32.end = IO_APIC_DEFAULT_ADDRESS;",
" if (sizeof(hwaddr) == 4) {",
" guest_info->pci_info.w64.begin = 0;",
" guest_info->pci_info.w64.end = 0;",
" } else {",
" guest_info->pci_info.w64.begin =",
" ROUND_UP((0x1ULL... | PcGuestInfo *FUNC_0(ram_addr_t below_4g_mem_size,
ram_addr_t above_4g_mem_size)
{
PcGuestInfoState *guest_info_state = g_malloc0(sizeof *guest_info_state);
PcGuestInfo *guest_info = &guest_info_state->info;
guest_info->pci_info.w32.end = IO_APIC_DEFAULT_ADDRESS;
i... | [
"PcGuestInfo *FUNC_0(ram_addr_t below_4g_mem_size,\nram_addr_t above_4g_mem_size)\n{",
"PcGuestInfoState *guest_info_state = g_malloc0(sizeof *guest_info_state);",
"PcGuestInfo *guest_info = &guest_info_state->info;",
"guest_info->pci_info.w32.end = IO_APIC_DEFAULT_ADDRESS;",
"if (sizeof(hwaddr) == 4) {",
... | [
0,
0,
0,
1,
1,
1,
1,
0,
1,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
35,
37
],
[
39,
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
],
[
55
]
] |
7,683 | static void escaped_string(void)
{
int i;
struct {
const char *encoded;
const char *decoded;
int skip;
} test_cases[] = {
{ "\"\\b\"", "\b" },
{ "\"\\f\"", "\f" },
{ "\"\\n\"", "\n" },
{ "\"\\r\"", "\r" },
{ "\"\\t\"", "\t" },
... | true | qemu | aec4b054ea36c53c8b887da99f20010133b84378 | static void escaped_string(void)
{
int i;
struct {
const char *encoded;
const char *decoded;
int skip;
} test_cases[] = {
{ "\"\\b\"", "\b" },
{ "\"\\f\"", "\f" },
{ "\"\\n\"", "\n" },
{ "\"\\r\"", "\r" },
{ "\"\\t\"", "\t" },
... | {
"code": [
" obj = qobject_from_json(test_cases[i].encoded, NULL);",
" obj = qobject_from_json(test_cases[i].encoded, NULL);",
" obj = qobject_from_json(test_cases[i].encoded, NULL);",
" obj = qobject_from_json(test_cases[i].encoded, NULL);",
" obj = qobject_fro... | static void FUNC_0(void)
{
int VAR_0;
struct {
const char *encoded;
const char *decoded;
int skip;
} VAR_1[] = {
{ "\"\\b\"", "\b" },
{ "\"\\f\"", "\f" },
{ "\"\\n\"", "\n" },
{ "\"\\r\"", "\r" },
{ "\"\\t\"", "\t" },
{ "\"... | [
"static void FUNC_0(void)\n{",
"int VAR_0;",
"struct {",
"const char *encoded;",
"const char *decoded;",
"int skip;",
"} VAR_1[] = {",
"{ \"\\\"\\\\b\\\"\", \"\\b\" },",
"{ \"\\\"\\\\f\\\"\", \"\\f\" },",
"{ \"\\\"\\\\n\\\"\", \"\\n\" },",
"{ \"\\\"\\\\r\\\"\", \"\\r\" },",
"{ \"\\\"\\\\t\\\"\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
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
... |
7,684 | ogg_read_header (AVFormatContext * s, AVFormatParameters * ap)
{
struct ogg *ogg = s->priv_data;
ogg->curidx = -1;
//linear headers seek from start
if (ogg_get_headers (s) < 0){
return -1;
}
//linear granulepos seek from end
ogg_get_length (s);
//fill the extradata in the per cod... | true | FFmpeg | c9da676de43d778d62efb1cfa75544d770736d67 | ogg_read_header (AVFormatContext * s, AVFormatParameters * ap)
{
struct ogg *ogg = s->priv_data;
ogg->curidx = -1;
if (ogg_get_headers (s) < 0){
return -1;
}
ogg_get_length (s);
return 0;
} | {
"code": [],
"line_no": []
} | FUNC_0 (AVFormatContext * VAR_0, AVFormatParameters * VAR_1)
{
struct VAR_2 *VAR_2 = VAR_0->priv_data;
VAR_2->curidx = -1;
if (ogg_get_headers (VAR_0) < 0){
return -1;
}
ogg_get_length (VAR_0);
return 0;
} | [
"FUNC_0 (AVFormatContext * VAR_0, AVFormatParameters * VAR_1)\n{",
"struct VAR_2 *VAR_2 = VAR_0->priv_data;",
"VAR_2->curidx = -1;",
"if (ogg_get_headers (VAR_0) < 0){",
"return -1;",
"}",
"ogg_get_length (VAR_0);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
6
],
[
7
],
[
8
],
[
10
],
[
12
],
[
13
]
] |
7,685 | static void print_net_client(Monitor *mon, VLANClientState *vc)
{
monitor_printf(mon, "%s: type=%s,%s\n", vc->name,
net_client_types[vc->info->type].type, vc->info_str);
}
| true | qemu | 6687b79d636cd60ed9adb1177d0d946b58fa7717 | static void print_net_client(Monitor *mon, VLANClientState *vc)
{
monitor_printf(mon, "%s: type=%s,%s\n", vc->name,
net_client_types[vc->info->type].type, vc->info_str);
}
| {
"code": [
" net_client_types[vc->info->type].type, vc->info_str);"
],
"line_no": [
7
]
} | static void FUNC_0(Monitor *VAR_0, VLANClientState *VAR_1)
{
monitor_printf(VAR_0, "%s: type=%s,%s\n", VAR_1->name,
net_client_types[VAR_1->info->type].type, VAR_1->info_str);
}
| [
"static void FUNC_0(Monitor *VAR_0, VLANClientState *VAR_1)\n{",
"monitor_printf(VAR_0, \"%s: type=%s,%s\\n\", VAR_1->name,\nnet_client_types[VAR_1->info->type].type, VAR_1->info_str);",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
]
] |
7,686 | static int apng_read_close(AVFormatContext *s)
{
APNGDemuxContext *ctx = s->priv_data;
av_freep(&ctx->extra_data);
ctx->extra_data_size = 0;
return 0;
}
| true | FFmpeg | 16c429166ddf1736972b6ccce84bd3509ec16a34 | static int apng_read_close(AVFormatContext *s)
{
APNGDemuxContext *ctx = s->priv_data;
av_freep(&ctx->extra_data);
ctx->extra_data_size = 0;
return 0;
}
| {
"code": [
" return 0;",
"static int apng_read_close(AVFormatContext *s)",
" APNGDemuxContext *ctx = s->priv_data;",
" av_freep(&ctx->extra_data);",
" ctx->extra_data_size = 0;",
" return 0;"
],
"line_no": [
11,
1,
5,
7,
9,
11
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
APNGDemuxContext *ctx = VAR_0->priv_data;
av_freep(&ctx->extra_data);
ctx->extra_data_size = 0;
return 0;
}
| [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"APNGDemuxContext *ctx = VAR_0->priv_data;",
"av_freep(&ctx->extra_data);",
"ctx->extra_data_size = 0;",
"return 0;",
"}"
] | [
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
7,687 | static void br(DisasContext *dc, uint32_t code, uint32_t flags)
{
I_TYPE(instr, code);
gen_goto_tb(dc, 0, dc->pc + 4 + (instr.imm16s & -4));
dc->is_jmp = DISAS_TB_JUMP;
}
| true | qemu | 4ae4b609ee2d5bcc9df6c03c21dc1fed527aada1 | static void br(DisasContext *dc, uint32_t code, uint32_t flags)
{
I_TYPE(instr, code);
gen_goto_tb(dc, 0, dc->pc + 4 + (instr.imm16s & -4));
dc->is_jmp = DISAS_TB_JUMP;
}
| {
"code": [
" gen_goto_tb(dc, 0, dc->pc + 4 + (instr.imm16s & -4));"
],
"line_no": [
9
]
} | static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1, uint32_t VAR_2)
{
I_TYPE(instr, VAR_1);
gen_goto_tb(VAR_0, 0, VAR_0->pc + 4 + (instr.imm16s & -4));
VAR_0->is_jmp = DISAS_TB_JUMP;
}
| [
"static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1, uint32_t VAR_2)\n{",
"I_TYPE(instr, VAR_1);",
"gen_goto_tb(VAR_0, 0, VAR_0->pc + 4 + (instr.imm16s & -4));",
"VAR_0->is_jmp = DISAS_TB_JUMP;",
"}"
] | [
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
]
] |
7,688 | static int dnxhd_write_header(AVCodecContext *avctx, uint8_t *buf)
{
DNXHDEncContext *ctx = avctx->priv_data;
const uint8_t header_prefix[5] = { 0x00,0x00,0x02,0x80,0x01 };
memcpy(buf, header_prefix, 5);
buf[5] = ctx->interlaced ? ctx->cur_field+2 : 0x01;
buf[6] = 0x80; // crc flag off
buf[7] = ... | true | FFmpeg | 301a24de52f5baa09beff0958327af2c2a7005dc | static int dnxhd_write_header(AVCodecContext *avctx, uint8_t *buf)
{
DNXHDEncContext *ctx = avctx->priv_data;
const uint8_t header_prefix[5] = { 0x00,0x00,0x02,0x80,0x01 };
memcpy(buf, header_prefix, 5);
buf[5] = ctx->interlaced ? ctx->cur_field+2 : 0x01;
buf[6] = 0x80;
buf[7] = 0xa0;
AV_W... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, uint8_t *VAR_1)
{
DNXHDEncContext *ctx = VAR_0->priv_data;
const uint8_t VAR_2[5] = { 0x00,0x00,0x02,0x80,0x01 };
memcpy(VAR_1, VAR_2, 5);
VAR_1[5] = ctx->interlaced ? ctx->cur_field+2 : 0x01;
VAR_1[6] = 0x80;
VAR_1[7] = 0xa0;
AV_WB16(VAR_1 + 0x18, ... | [
"static int FUNC_0(AVCodecContext *VAR_0, uint8_t *VAR_1)\n{",
"DNXHDEncContext *ctx = VAR_0->priv_data;",
"const uint8_t VAR_2[5] = { 0x00,0x00,0x02,0x80,0x01 };",
"memcpy(VAR_1, VAR_2, 5);",
"VAR_1[5] = ctx->interlaced ? ctx->cur_field+2 : 0x01;",
"VAR_1[6] = 0x80;",
"VAR_1[7] = 0xa0;",
"AV_WB16(VAR... | [
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
],... |
7,691 | static int slirp_smb(SlirpState* s, const char *exported_dir,
struct in_addr vserver_addr)
{
static int instance;
char smb_conf[128];
char smb_cmdline[128];
FILE *f;
snprintf(s->smb_dir, sizeof(s->smb_dir), "/tmp/qemu-smb.%ld-%d",
(long)getpid(), instance+... | true | qemu | 276eda5735824dd6cf66e1f0951aa8af97354540 | static int slirp_smb(SlirpState* s, const char *exported_dir,
struct in_addr vserver_addr)
{
static int instance;
char smb_conf[128];
char smb_cmdline[128];
FILE *f;
snprintf(s->smb_dir, sizeof(s->smb_dir), "/tmp/qemu-smb.%ld-%d",
(long)getpid(), instance+... | {
"code": [],
"line_no": []
} | static int FUNC_0(SlirpState* VAR_0, const char *VAR_1,
struct in_addr VAR_2)
{
static int VAR_3;
char VAR_4[128];
char VAR_5[128];
FILE *f;
snprintf(VAR_0->smb_dir, sizeof(VAR_0->smb_dir), "/tmp/qemu-smb.%ld-%d",
(long)getpid(), VAR_3++);
if (mkdir(V... | [
"static int FUNC_0(SlirpState* VAR_0, const char *VAR_1,\nstruct in_addr VAR_2)\n{",
"static int VAR_3;",
"char VAR_4[128];",
"char VAR_5[128];",
"FILE *f;",
"snprintf(VAR_0->smb_dir, sizeof(VAR_0->smb_dir), \"/tmp/qemu-smb.%ld-%d\",\n(long)getpid(), VAR_3++);",
"if (mkdir(VAR_0->smb_dir, 0700) < 0) {",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47,
49,... |
7,692 | static int write_memory(DumpState *s, RAMBlock *block, ram_addr_t start,
int64_t size)
{
int64_t i;
int ret;
for (i = 0; i < size / TARGET_PAGE_SIZE; i++) {
ret = write_data(s, block->host + start + i * TARGET_PAGE_SIZE,
TARGET_PAGE_SIZE);
... | true | qemu | 56c4bfb3f07f3107894c00281276aea4f5e8834d | static int write_memory(DumpState *s, RAMBlock *block, ram_addr_t start,
int64_t size)
{
int64_t i;
int ret;
for (i = 0; i < size / TARGET_PAGE_SIZE; i++) {
ret = write_data(s, block->host + start + i * TARGET_PAGE_SIZE,
TARGET_PAGE_SIZE);
... | {
"code": [
"static int write_memory(DumpState *s, RAMBlock *block, ram_addr_t start,",
" ret = write_data(s, block->host + start + i * TARGET_PAGE_SIZE,",
" ret = write_data(s, block->host + start + i * TARGET_PAGE_SIZE,"
],
"line_no": [
1,
15,
15
]
} | static int FUNC_0(DumpState *VAR_0, RAMBlock *VAR_1, ram_addr_t VAR_2,
int64_t VAR_3)
{
int64_t i;
int VAR_4;
for (i = 0; i < VAR_3 / TARGET_PAGE_SIZE; i++) {
VAR_4 = write_data(VAR_0, VAR_1->host + VAR_2 + i * TARGET_PAGE_SIZE,
TARGET_PAGE_S... | [
"static int FUNC_0(DumpState *VAR_0, RAMBlock *VAR_1, ram_addr_t VAR_2,\nint64_t VAR_3)\n{",
"int64_t i;",
"int VAR_4;",
"for (i = 0; i < VAR_3 / TARGET_PAGE_SIZE; i++) {",
"VAR_4 = write_data(VAR_0, VAR_1->host + VAR_2 + i * TARGET_PAGE_SIZE,\nTARGET_PAGE_SIZE);",
"if (VAR_4 < 0) {",
"return VAR_4;",
... | [
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
]
] |
7,693 | static int rtmp_handshake(URLContext *s, RTMPContext *rt)
{
AVLFG rnd;
uint8_t tosend [RTMP_HANDSHAKE_PACKET_SIZE+1] = {
3, // unencrypted data
0, 0, 0, 0, // client uptime
RTMP_CLIENT_VER1,
RTMP_CLIENT_VER2,
RTMP_CLIENT_VER3,
RTMP_CLIENT_V... | true | FFmpeg | 635ac8e1be91e941908f85642e4bbb609e48193f | static int rtmp_handshake(URLContext *s, RTMPContext *rt)
{
AVLFG rnd;
uint8_t tosend [RTMP_HANDSHAKE_PACKET_SIZE+1] = {
3,
0, 0, 0, 0,
RTMP_CLIENT_VER1,
RTMP_CLIENT_VER2,
RTMP_CLIENT_VER3,
RTMP_CLIENT_VER4,
};
uint8_t clientdata[... | {
"code": [],
"line_no": []
} | static int FUNC_0(URLContext *VAR_0, RTMPContext *VAR_1)
{
AVLFG rnd;
uint8_t tosend [RTMP_HANDSHAKE_PACKET_SIZE+1] = {
3,
0, 0, 0, 0,
RTMP_CLIENT_VER1,
RTMP_CLIENT_VER2,
RTMP_CLIENT_VER3,
RTMP_CLIENT_VER4,
};
uint8_t clientdata[R... | [
"static int FUNC_0(URLContext *VAR_0, RTMPContext *VAR_1)\n{",
"AVLFG rnd;",
"uint8_t tosend [RTMP_HANDSHAKE_PACKET_SIZE+1] = {",
"3,\n0, 0, 0, 0,\nRTMP_CLIENT_VER1,\nRTMP_CLIENT_VER2,\nRTMP_CLIENT_VER3,\nRTMP_CLIENT_VER4,\n};",
"uint8_t clientdata[RTMP_HANDSHAKE_PACKET_SIZE];",
"uint8_t serverdata[RTM... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
22
],
[
23
],
[
27
],
[
28
],... |
7,694 | static int qemu_rdma_reg_control(RDMAContext *rdma, int idx)
{
rdma->wr_data[idx].control_mr = ibv_reg_mr(rdma->pd,
rdma->wr_data[idx].control, RDMA_CONTROL_MAX_BUFFER,
IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE);
if (rdma->wr_data[idx].control_mr) {
rdma->total_regis... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static int qemu_rdma_reg_control(RDMAContext *rdma, int idx)
{
rdma->wr_data[idx].control_mr = ibv_reg_mr(rdma->pd,
rdma->wr_data[idx].control, RDMA_CONTROL_MAX_BUFFER,
IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE);
if (rdma->wr_data[idx].control_mr) {
rdma->total_regis... | {
"code": [],
"line_no": []
} | static int FUNC_0(RDMAContext *VAR_0, int VAR_1)
{
VAR_0->wr_data[VAR_1].control_mr = ibv_reg_mr(VAR_0->pd,
VAR_0->wr_data[VAR_1].control, RDMA_CONTROL_MAX_BUFFER,
IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE);
if (VAR_0->wr_data[VAR_1].control_mr) {
VAR_0->total_regist... | [
"static int FUNC_0(RDMAContext *VAR_0, int VAR_1)\n{",
"VAR_0->wr_data[VAR_1].control_mr = ibv_reg_mr(VAR_0->pd,\nVAR_0->wr_data[VAR_1].control, RDMA_CONTROL_MAX_BUFFER,\nIBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE);",
"if (VAR_0->wr_data[VAR_1].control_mr) {",
"VAR_0->total_registrations++;",
"return ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
7,695 | static hwaddr ppc_hash64_pteg_search(PowerPCCPU *cpu, hwaddr hash,
ppc_slb_t *slb, bool secondary,
target_ulong ptem, ppc_hash_pte64_t *pte)
{
CPUPPCState *env = &cpu->env;
int i;
uint64_t token;
target_ulong pte0, pte1;
... | true | qemu | 073de86aa934d46d596a2367e7501da5500e5b86 | static hwaddr ppc_hash64_pteg_search(PowerPCCPU *cpu, hwaddr hash,
ppc_slb_t *slb, bool secondary,
target_ulong ptem, ppc_hash_pte64_t *pte)
{
CPUPPCState *env = &cpu->env;
int i;
uint64_t token;
target_ulong pte0, pte1;
... | {
"code": [
" ppc_slb_t *slb, bool secondary,",
" target_ulong ptem, ppc_hash_pte64_t *pte)",
" if ((pte0 & HPTE64_V_VALID)",
" && (secondary == !!(pte0 & HPTE64_V_SECONDARY))",
" && HPTE64_V_COMPA... | static hwaddr FUNC_0(PowerPCCPU *cpu, hwaddr hash,
ppc_slb_t *slb, bool secondary,
target_ulong ptem, ppc_hash_pte64_t *pte)
{
CPUPPCState *env = &cpu->env;
int VAR_0;
uint64_t token;
target_ulong pte0, pte1;
target_ul... | [
"static hwaddr FUNC_0(PowerPCCPU *cpu, hwaddr hash,\nppc_slb_t *slb, bool secondary,\ntarget_ulong ptem, ppc_hash_pte64_t *pte)\n{",
"CPUPPCState *env = &cpu->env;",
"int VAR_0;",
"uint64_t token;",
"target_ulong pte0, pte1;",
"target_ulong pte_index;",
"pte_index = (hash & env->htab_mask) * HPTES_PER_G... | [
1,
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
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39,
41,
43
],
[
45
],
[
61
],
[
63
... |
7,697 | static int vmdk_write_extent(VmdkExtent *extent, int64_t cluster_offset,
int64_t offset_in_cluster, const uint8_t *buf,
int nb_sectors, int64_t sector_num)
{
int ret;
VmdkGrainMarker *data = NULL;
uLongf buf_len;
const uint8_t *write_buf = b... | true | qemu | 5e82a31eb967db135fc4e688b134fb0972d62de3 | static int vmdk_write_extent(VmdkExtent *extent, int64_t cluster_offset,
int64_t offset_in_cluster, const uint8_t *buf,
int nb_sectors, int64_t sector_num)
{
int ret;
VmdkGrainMarker *data = NULL;
uLongf buf_len;
const uint8_t *write_buf = b... | {
"code": [
" ret = bdrv_pwrite(extent->file,",
" cluster_offset + offset_in_cluster,",
" write_buf,",
" write_len);"
],
"line_no": [
55,
57,
59,
61
]
} | static int FUNC_0(VmdkExtent *VAR_0, int64_t VAR_1,
int64_t VAR_2, const uint8_t *VAR_3,
int VAR_4, int64_t VAR_5)
{
int VAR_6;
VmdkGrainMarker *data = NULL;
uLongf buf_len;
const uint8_t *VAR_7 = VAR_3;
int VAR_8 = VAR_4 * 512;
... | [
"static int FUNC_0(VmdkExtent *VAR_0, int64_t VAR_1,\nint64_t VAR_2, const uint8_t *VAR_3,\nint VAR_4, int64_t VAR_5)\n{",
"int VAR_6;",
"VmdkGrainMarker *data = NULL;",
"uLongf buf_len;",
"const uint8_t *VAR_7 = VAR_3;",
"int VAR_8 = VAR_4 * 512;",
"if (VAR_0->compressed) {",
"if (!VAR_0->has_marker)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
7,698 | int ff_scale_eval_dimensions(void *log_ctx,
const char *w_expr, const char *h_expr,
AVFilterLink *inlink, AVFilterLink *outlink,
int *ret_w, int *ret_h)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
const AVPixFmtDescriptor *out_desc = av_pix_fmt_desc_get(outlink->for... | false | FFmpeg | 05feeeb813e9f71f69b6b3a7f33856c609237c06 | int ff_scale_eval_dimensions(void *log_ctx,
const char *w_expr, const char *h_expr,
AVFilterLink *inlink, AVFilterLink *outlink,
int *ret_w, int *ret_h)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
const AVPixFmtDescriptor *out_desc = av_pix_fmt_desc_get(outlink->for... | {
"code": [],
"line_no": []
} | int FUNC_0(void *VAR_0,
const char *VAR_1, const char *VAR_2,
AVFilterLink *VAR_3, AVFilterLink *VAR_4,
int *VAR_5, int *VAR_6)
{
const AVPixFmtDescriptor *VAR_7 = av_pix_fmt_desc_get(VAR_3->format);
const AVPixFmtDescriptor *VAR_8 = av_pix_fmt_desc_get(VAR_4->format);
const char *VAR_9;
... | [
"int FUNC_0(void *VAR_0,\nconst char *VAR_1, const char *VAR_2,\nAVFilterLink *VAR_3, AVFilterLink *VAR_4,\nint *VAR_5, int *VAR_6)\n{",
"const AVPixFmtDescriptor *VAR_7 = av_pix_fmt_desc_get(VAR_3->format);",
"const AVPixFmtDescriptor *VAR_8 = av_pix_fmt_desc_get(VAR_4->format);",
"const char *VAR_9;",
"in... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[... |
7,699 | static int adpcm_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
const uint8_t *buf, int buf_size)
{
ADPCMContext *c = avctx->priv_data;
ADPCMChannelStatus *cs;
int n, m, channel, i;
int block_predictor[2];
short *sample... | false | FFmpeg | 9ff8976dad1b2768857a6129daf9dac069ac5bee | static int adpcm_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
const uint8_t *buf, int buf_size)
{
ADPCMContext *c = avctx->priv_data;
ADPCMChannelStatus *cs;
int n, m, channel, i;
int block_predictor[2];
short *sample... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
const uint8_t *VAR_3, int VAR_4)
{
ADPCMContext *c = VAR_0->priv_data;
ADPCMChannelStatus *cs;
int VAR_5, VAR_6, VAR_23, VAR_8;
int VAR_9[2];
short *VAR_10;
short *V... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nconst uint8_t *VAR_3, int VAR_4)\n{",
"ADPCMContext *c = VAR_0->priv_data;",
"ADPCMChannelStatus *cs;",
"int VAR_5, VAR_6, VAR_23, VAR_8;",
"int VAR_9[2];",
"short *VAR_10;",
"short *VAR_11;",
"const uint8_t *VAR_12;",
"int VAR_13;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
35
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
7,700 | int tap_win32_init(VLANState *vlan, const char *model,
const char *name, const char *ifname)
{
TAPState *s;
s = qemu_mallocz(sizeof(TAPState));
if (!s)
return -1;
if (tap_win32_open(&s->handle, ifname) < 0) {
printf("tap: Could not open '%s'\n", ifname);
... | true | qemu | b946a1533209f61a93e34898aebb5b43154b99c3 | int tap_win32_init(VLANState *vlan, const char *model,
const char *name, const char *ifname)
{
TAPState *s;
s = qemu_mallocz(sizeof(TAPState));
if (!s)
return -1;
if (tap_win32_open(&s->handle, ifname) < 0) {
printf("tap: Could not open '%s'\n", ifname);
... | {
"code": [
" s->vc = qemu_new_vlan_client(vlan, model, name, tap_receive, NULL, s);",
" s->vc = qemu_new_vlan_client(vlan, model, name, tap_receive, NULL, s);"
],
"line_no": [
27,
27
]
} | int FUNC_0(VLANState *VAR_0, const char *VAR_1,
const char *VAR_2, const char *VAR_3)
{
TAPState *s;
s = qemu_mallocz(sizeof(TAPState));
if (!s)
return -1;
if (tap_win32_open(&s->handle, VAR_3) < 0) {
printf("tap: Could not open '%s'\n", VAR_3);
retu... | [
"int FUNC_0(VLANState *VAR_0, const char *VAR_1,\nconst char *VAR_2, const char *VAR_3)\n{",
"TAPState *s;",
"s = qemu_mallocz(sizeof(TAPState));",
"if (!s)\nreturn -1;",
"if (tap_win32_open(&s->handle, VAR_3) < 0) {",
"printf(\"tap: Could not open '%s'\\n\", VAR_3);",
"return -1;",
"}",
"s->vc = qe... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31,
33
],
[
37
],
[
39
],
[
41
]
] |
7,701 | static int parse_netdev(DeviceState *dev, const char *str, void **ptr)
{
NICPeers *peers_ptr = (NICPeers *)ptr;
NICConf *conf = container_of(peers_ptr, NICConf, peers);
NetClientState **ncs = peers_ptr->ncs;
NetClientState *peers[MAX_QUEUE_NUM];
int queues, i = 0;
int ret;
queues = qemu_find... | true | qemu | 30c367ed446b6ea53245589a5cf373578ac075d7 | static int parse_netdev(DeviceState *dev, const char *str, void **ptr)
{
NICPeers *peers_ptr = (NICPeers *)ptr;
NICConf *conf = container_of(peers_ptr, NICConf, peers);
NetClientState **ncs = peers_ptr->ncs;
NetClientState *peers[MAX_QUEUE_NUM];
int queues, i = 0;
int ret;
queues = qemu_find... | {
"code": [],
"line_no": []
} | static int FUNC_0(DeviceState *VAR_0, const char *VAR_1, void **VAR_2)
{
NICPeers *peers_ptr = (NICPeers *)VAR_2;
NICConf *conf = container_of(peers_ptr, NICConf, peers);
NetClientState **ncs = peers_ptr->ncs;
NetClientState *peers[MAX_QUEUE_NUM];
int VAR_3, VAR_4 = 0;
int VAR_5;
VAR_3 = qem... | [
"static int FUNC_0(DeviceState *VAR_0, const char *VAR_1, void **VAR_2)\n{",
"NICPeers *peers_ptr = (NICPeers *)VAR_2;",
"NICConf *conf = container_of(peers_ptr, NICConf, peers);",
"NetClientState **ncs = peers_ptr->ncs;",
"NetClientState *peers[MAX_QUEUE_NUM];",
"int VAR_3, VAR_4 = 0;",
"int VAR_5;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9,
10,
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],... |
7,702 | static void property_get_str(Object *obj, Visitor *v, void *opaque,
const char *name, Error **errp)
{
StringProperty *prop = opaque;
char *value;
value = prop->get(obj, errp);
if (value) {
visit_type_str(v, &value, name, errp);
g_free(value);
}... | true | qemu | e1c8237df5395f6a453f18109bd9dd33fb2a397c | static void property_get_str(Object *obj, Visitor *v, void *opaque,
const char *name, Error **errp)
{
StringProperty *prop = opaque;
char *value;
value = prop->get(obj, errp);
if (value) {
visit_type_str(v, &value, name, errp);
g_free(value);
}... | {
"code": [
" value = prop->get(obj, errp);",
" if (value) {",
" visit_type_str(v, &value, name, errp);",
" g_free(value);"
],
"line_no": [
13,
15,
17,
19
]
} | static void FUNC_0(Object *VAR_0, Visitor *VAR_1, void *VAR_2,
const char *VAR_3, Error **VAR_4)
{
StringProperty *prop = VAR_2;
char *VAR_5;
VAR_5 = prop->get(VAR_0, VAR_4);
if (VAR_5) {
visit_type_str(VAR_1, &VAR_5, VAR_3, VAR_4);
g_free(VAR_5);
... | [
"static void FUNC_0(Object *VAR_0, Visitor *VAR_1, void *VAR_2,\nconst char *VAR_3, Error **VAR_4)\n{",
"StringProperty *prop = VAR_2;",
"char *VAR_5;",
"VAR_5 = prop->get(VAR_0, VAR_4);",
"if (VAR_5) {",
"visit_type_str(VAR_1, &VAR_5, VAR_3, VAR_4);",
"g_free(VAR_5);",
"}",
"}"
] | [
0,
0,
0,
1,
1,
1,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
7,703 | static void setup_frame(int sig, struct target_sigaction *ka,
target_sigset_t *set, CPUCRISState *env)
{
struct target_signal_frame *frame;
abi_ulong frame_addr;
int err = 0;
int i;
frame_addr = get_sigframe(env, sizeof *frame);
if (!lock_user_struct(VERIFY_WRITE, frame, frame_ad... | true | qemu | 0188fadb7fe460d8c4c743372b1f7b25773e183e | static void setup_frame(int sig, struct target_sigaction *ka,
target_sigset_t *set, CPUCRISState *env)
{
struct target_signal_frame *frame;
abi_ulong frame_addr;
int err = 0;
int i;
frame_addr = get_sigframe(env, sizeof *frame);
if (!lock_user_struct(VERIFY_WRITE, frame, frame_ad... | {
"code": [
"\tif (err)",
"\tunlock_user_struct(frame, frame_addr, 1);",
"\tint err = 0;",
"\tif (err)",
"\t\tgoto badframe;",
"\tfor(i = 1; i < TARGET_NSIG_WORDS; i++) {",
"\t\tif (__put_user(set->sig[i], &frame->extramask[i - 1]))",
"\t\t\tgoto badframe;",
"\tunlock_user_struct(f... | static void FUNC_0(int VAR_0, struct target_sigaction *VAR_1,
target_sigset_t *VAR_2, CPUCRISState *VAR_3)
{
struct target_signal_frame *VAR_4;
abi_ulong frame_addr;
int VAR_5 = 0;
int VAR_6;
frame_addr = get_sigframe(VAR_3, sizeof *VAR_4);
if (!lock_user_struct(VERIFY_WRITE, VAR... | [
"static void FUNC_0(int VAR_0, struct target_sigaction *VAR_1,\ntarget_sigset_t *VAR_2, CPUCRISState *VAR_3)\n{",
"struct target_signal_frame *VAR_4;",
"abi_ulong frame_addr;",
"int VAR_5 = 0;",
"int VAR_6;",
"frame_addr = get_sigframe(VAR_3, sizeof *VAR_4);",
"if (!lock_user_struct(VERIFY_WRITE, VAR_4,... | [
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
39
],
[
41,
43
],
[
45
],
[
51
],
[
53,
55
],
[
59
],
[
61,
63
],
[
65
],
[
69
],
[
75
],
[... |
7,704 | static int filter_frame(AVFilterLink *link, AVFrame *in)
{
AVFilterContext *ctx = link->dst;
AVFilterLink *outlink = ctx->outputs[0];
ColorSpaceContext *s = ctx->priv;
// FIXME if yuv2yuv_passthrough, don't get a new buffer but use the
// input one if it is writable *OR* the actual literal val... | true | FFmpeg | 531ff7161d9d6b0cf8f71125319c1f5df5041637 | static int filter_frame(AVFilterLink *link, AVFrame *in)
{
AVFilterContext *ctx = link->dst;
AVFilterLink *outlink = ctx->outputs[0];
ColorSpaceContext *s = ctx->priv;
AVFrame *out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
int res;
ptrdiff_t rgb_stride = FF... | {
"code": [
" av_frame_copy(out, in);"
],
"line_no": [
191
]
} | static int FUNC_0(AVFilterLink *VAR_0, AVFrame *VAR_1)
{
AVFilterContext *ctx = VAR_0->dst;
AVFilterLink *outlink = ctx->outputs[0];
ColorSpaceContext *s = ctx->priv;
AVFrame *out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
int VAR_2;
ptrdiff_t rgb_stride = F... | [
"static int FUNC_0(AVFilterLink *VAR_0, AVFrame *VAR_1)\n{",
"AVFilterContext *ctx = VAR_0->dst;",
"AVFilterLink *outlink = ctx->outputs[0];",
"ColorSpaceContext *s = ctx->priv;",
"AVFrame *out = ff_get_video_buffer(outlink, outlink->w, outlink->h);",
"int VAR_2;",
"ptrdiff_t rgb_stride = FFALIGN(VAR_1-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41,
43
],
[
45
],
[
47
],
[
51
],
[
53,
55
... |
7,705 | static struct glfs *qemu_gluster_glfs_init(BlockdevOptionsGluster *gconf,
Error **errp)
{
struct glfs *glfs;
int ret;
int old_errno;
GlusterServerList *server;
glfs = glfs_new(gconf->volume);
if (!glfs) {
goto out;
}
for (... | true | qemu | e9db8ff38e539260a2cb5a7918d1155b7d92a264 | static struct glfs *qemu_gluster_glfs_init(BlockdevOptionsGluster *gconf,
Error **errp)
{
struct glfs *glfs;
int ret;
int old_errno;
GlusterServerList *server;
glfs = glfs_new(gconf->volume);
if (!glfs) {
goto out;
}
for (... | {
"code": [
" ret = glfs_set_logging(glfs, \"-\", gconf->debug_level);"
],
"line_no": [
61
]
} | static struct VAR_2 *FUNC_0(BlockdevOptionsGluster *VAR_0,
Error **VAR_1)
{
struct VAR_2 *VAR_2;
int VAR_3;
int VAR_4;
GlusterServerList *server;
VAR_2 = glfs_new(VAR_0->volume);
if (!VAR_2) {
goto out;
}
for (server = VAR... | [
"static struct VAR_2 *FUNC_0(BlockdevOptionsGluster *VAR_0,\nError **VAR_1)\n{",
"struct VAR_2 *VAR_2;",
"int VAR_3;",
"int VAR_4;",
"GlusterServerList *server;",
"VAR_2 = glfs_new(VAR_0->volume);",
"if (!VAR_2) {",
"goto out;",
"}",
"for (server = VAR_0->server; server; server = server->next) {",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31,
33,
35
],
[
37
],
[
39,
41,
43,
45
],
[
47
],
[
51
],
[
53
... |
7,707 | void virtio_queue_set_notification(VirtQueue *vq, int enable)
{
vq->notification = enable;
if (vq->vdev->guest_features & (1 << VIRTIO_RING_F_EVENT_IDX)) {
vring_avail_event(vq, vring_avail_idx(vq));
} else if (enable) {
vring_used_flags_unset_bit(vq, VRING_USED_F_NO_NOTIFY);
} el... | true | qemu | 92045d80badc43c9f95897aad675dc7ef17a3b3f | void virtio_queue_set_notification(VirtQueue *vq, int enable)
{
vq->notification = enable;
if (vq->vdev->guest_features & (1 << VIRTIO_RING_F_EVENT_IDX)) {
vring_avail_event(vq, vring_avail_idx(vq));
} else if (enable) {
vring_used_flags_unset_bit(vq, VRING_USED_F_NO_NOTIFY);
} el... | {
"code": [],
"line_no": []
} | void FUNC_0(VirtQueue *VAR_0, int VAR_1)
{
VAR_0->notification = VAR_1;
if (VAR_0->vdev->guest_features & (1 << VIRTIO_RING_F_EVENT_IDX)) {
vring_avail_event(VAR_0, vring_avail_idx(VAR_0));
} else if (VAR_1) {
vring_used_flags_unset_bit(VAR_0, VRING_USED_F_NO_NOTIFY);
} else {
... | [
"void FUNC_0(VirtQueue *VAR_0, int VAR_1)\n{",
"VAR_0->notification = VAR_1;",
"if (VAR_0->vdev->guest_features & (1 << VIRTIO_RING_F_EVENT_IDX)) {",
"vring_avail_event(VAR_0, vring_avail_idx(VAR_0));",
"} else if (VAR_1) {",
"vring_used_flags_unset_bit(VAR_0, VRING_USED_F_NO_NOTIFY);",
"} else {",
"v... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.