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
13,591
static void do_help(int argc, const char **argv) { help_cmd(argv[1]); }
false
qemu
9307c4c1d93939db9b04117b654253af5113dc21
static void do_help(int argc, const char **argv) { help_cmd(argv[1]); }
{ "code": [], "line_no": [] }
static void FUNC_0(int VAR_0, const char **VAR_1) { help_cmd(VAR_1[1]); }
[ "static void FUNC_0(int VAR_0, const char **VAR_1)\n{", "help_cmd(VAR_1[1]);", "}" ]
[ 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ] ]
13,593
int main(int argc, char **argv, char **envp) { const char *gdbstub_dev = NULL; int i; int snapshot, linux_boot; const char *icount_option = NULL; const char *initrd_filename; const char *kernel_filename, *kernel_cmdline; char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM...
false
qemu
99519f0a776797db8fbdbf828240333e5181a612
int main(int argc, char **argv, char **envp) { const char *gdbstub_dev = NULL; int i; int snapshot, linux_boot; const char *icount_option = NULL; const char *initrd_filename; const char *kernel_filename, *kernel_cmdline; char boot_devices[33] = "cad"; DisplayState *ds; Dis...
{ "code": [], "line_no": [] }
int FUNC_0(int VAR_0, char **VAR_1, char **VAR_2) { const char *VAR_3 = NULL; int VAR_41; int VAR_5, VAR_6; const char *VAR_7 = NULL; const char *VAR_8; const char *VAR_9, *VAR_10; char VAR_11[33] = "cad"; DisplayState *ds; DisplayChangeListener *dcl; int VAR_12, VAR_...
[ "int FUNC_0(int VAR_0, char **VAR_1, char **VAR_2)\n{", "const char *VAR_3 = NULL;", "int VAR_41;", "int VAR_5, VAR_6;", "const char *VAR_7 = NULL;", "const char *VAR_8;", "const char *VAR_9, *VAR_10;", "char VAR_11[33] = \"cad\";", "DisplayState *ds;", "DisplayChangeListener *dcl;", "int VAR_12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ...
13,594
static int tcp_read(URLContext *h, uint8_t *buf, int size) { TCPContext *s = h->priv_data; int size1, len, fd_max; fd_set rfds; struct timeval tv; size1 = size; while (size > 0) { if (url_interrupt_cb()) return -EINTR; fd_max = s->fd; FD_ZERO(&rfd...
false
FFmpeg
9eef2b77b29189606148e1fdf5d6c8d7b52b08b0
static int tcp_read(URLContext *h, uint8_t *buf, int size) { TCPContext *s = h->priv_data; int size1, len, fd_max; fd_set rfds; struct timeval tv; size1 = size; while (size > 0) { if (url_interrupt_cb()) return -EINTR; fd_max = s->fd; FD_ZERO(&rfd...
{ "code": [], "line_no": [] }
static int FUNC_0(URLContext *VAR_0, uint8_t *VAR_1, int VAR_2) { TCPContext *s = VAR_0->priv_data; int VAR_3, VAR_4, VAR_5; fd_set rfds; struct timeval VAR_6; VAR_3 = VAR_2; while (VAR_2 > 0) { if (url_interrupt_cb()) return -EINTR; VAR_5 = s->fd; ...
[ "static int FUNC_0(URLContext *VAR_0, uint8_t *VAR_1, int VAR_2)\n{", "TCPContext *s = VAR_0->priv_data;", "int VAR_3, VAR_4, VAR_5;", "fd_set rfds;", "struct timeval VAR_6;", "VAR_3 = VAR_2;", "while (VAR_2 > 0) {", "if (url_interrupt_cb())\nreturn -EINTR;", "VAR_5 = s->fd;", "FD_ZERO(&rfds);", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19, 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35, 37 ], [ 39, 41 ], [ 43, 45 ], [ 47,...
13,596
static int hda_codec_dev_exit(DeviceState *qdev) { HDACodecDevice *dev = HDA_CODEC_DEVICE(qdev); HDACodecDeviceClass *cdc = HDA_CODEC_DEVICE_GET_CLASS(dev); if (cdc->exit) { cdc->exit(dev); } return 0; }
false
qemu
8ac55351459055f2faee585d9ba2f84707741815
static int hda_codec_dev_exit(DeviceState *qdev) { HDACodecDevice *dev = HDA_CODEC_DEVICE(qdev); HDACodecDeviceClass *cdc = HDA_CODEC_DEVICE_GET_CLASS(dev); if (cdc->exit) { cdc->exit(dev); } return 0; }
{ "code": [], "line_no": [] }
static int FUNC_0(DeviceState *VAR_0) { HDACodecDevice *dev = HDA_CODEC_DEVICE(VAR_0); HDACodecDeviceClass *cdc = HDA_CODEC_DEVICE_GET_CLASS(dev); if (cdc->exit) { cdc->exit(dev); } return 0; }
[ "static int FUNC_0(DeviceState *VAR_0)\n{", "HDACodecDevice *dev = HDA_CODEC_DEVICE(VAR_0);", "HDACodecDeviceClass *cdc = HDA_CODEC_DEVICE_GET_CLASS(dev);", "if (cdc->exit) {", "cdc->exit(dev);", "}", "return 0;", "}" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ] ]
13,597
static bool virtqueue_map_desc(VirtIODevice *vdev, unsigned int *p_num_sg, hwaddr *addr, struct iovec *iov, unsigned int max_num_sg, bool is_write, hwaddr pa, size_t sz) { bool ok = false; unsigned num_sg = *p_num...
false
qemu
8607f5c3072caeebbe0217df28651fffd3a79fd9
static bool virtqueue_map_desc(VirtIODevice *vdev, unsigned int *p_num_sg, hwaddr *addr, struct iovec *iov, unsigned int max_num_sg, bool is_write, hwaddr pa, size_t sz) { bool ok = false; unsigned num_sg = *p_num...
{ "code": [], "line_no": [] }
static bool FUNC_0(VirtIODevice *vdev, unsigned int *p_num_sg, hwaddr *addr, struct iovec *iov, unsigned int max_num_sg, bool is_write, hwaddr pa, size_t sz) { bool ok = false; unsigned VAR_0 = *p_num_sg; ass...
[ "static bool FUNC_0(VirtIODevice *vdev, unsigned int *p_num_sg,\nhwaddr *addr, struct iovec *iov,\nunsigned int max_num_sg, bool is_write,\nhwaddr pa, size_t sz)\n{", "bool ok = false;", "unsigned VAR_0 = *p_num_sg;", "assert(VAR_0 <= max_num_sg);", "if (!sz) {", "virtio_error(vdev, \"virtio: zero sized b...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7, 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 29 ], [ 31 ], [ 35 ], [ 37, 39 ], [ 41 ], [ 43 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ...
13,598
void i8042_setup_a20_line(ISADevice *dev, qemu_irq *a20_out) { ISAKBDState *isa = I8042(dev); KBDState *s = &isa->kbd; s->a20_out = a20_out; }
false
qemu
3115b9e2d286188a54d6f415186ae556046b68a3
void i8042_setup_a20_line(ISADevice *dev, qemu_irq *a20_out) { ISAKBDState *isa = I8042(dev); KBDState *s = &isa->kbd; s->a20_out = a20_out; }
{ "code": [], "line_no": [] }
void FUNC_0(ISADevice *VAR_0, qemu_irq *VAR_1) { ISAKBDState *isa = I8042(VAR_0); KBDState *s = &isa->kbd; s->VAR_1 = VAR_1; }
[ "void FUNC_0(ISADevice *VAR_0, qemu_irq *VAR_1)\n{", "ISAKBDState *isa = I8042(VAR_0);", "KBDState *s = &isa->kbd;", "s->VAR_1 = VAR_1;", "}" ]
[ 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ] ]
13,599
static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap) { SWFContext *swf = 0; ByteIOContext *pb = &s->pb; int nbits, len, frame_rate, tag, v; offset_t firstTagOff; AVStream *ast = 0; AVStream *vst = 0; swf = av_malloc(sizeof(SWFContext)); if (!swf) ret...
false
FFmpeg
fa73604f61e9f067feb24078128a4a3f915d628c
static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap) { SWFContext *swf = 0; ByteIOContext *pb = &s->pb; int nbits, len, frame_rate, tag, v; offset_t firstTagOff; AVStream *ast = 0; AVStream *vst = 0; swf = av_malloc(sizeof(SWFContext)); if (!swf) ret...
{ "code": [], "line_no": [] }
static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1) { SWFContext *swf = 0; ByteIOContext *pb = &VAR_0->pb; int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6; offset_t firstTagOff; AVStream *ast = 0; AVStream *vst = 0; swf = av_malloc(sizeof(SWFContext)); if (!swf) ...
[ "static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1)\n{", "SWFContext *swf = 0;", "ByteIOContext *pb = &VAR_0->pb;", "int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;", "offset_t firstTagOff;", "AVStream *ast = 0;", "AVStream *vst = 0;", "swf = av_malloc(sizeof(SWFContext));", "if (!swf)\nret...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21, 23 ], [ 25 ], [ 29 ], [ 33, 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43, 45 ], [ 47 ], [ 51 ], [...
13,600
void ff_weight_h264_pixels16_8_msa(uint8_t *src, int stride, int height, int log2_denom, int weight_src, int offset) { avc_wgt_16width_msa(src, stride, height, log2_denom, weight_src, offset); }
false
FFmpeg
bcd7bf7eeb09a395cc01698842d1b8be9af483fc
void ff_weight_h264_pixels16_8_msa(uint8_t *src, int stride, int height, int log2_denom, int weight_src, int offset) { avc_wgt_16width_msa(src, stride, height, log2_denom, weight_src, offset); }
{ "code": [], "line_no": [] }
void FUNC_0(uint8_t *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5) { avc_wgt_16width_msa(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5); }
[ "void FUNC_0(uint8_t *VAR_0, int VAR_1,\nint VAR_2, int VAR_3,\nint VAR_4, int VAR_5)\n{", "avc_wgt_16width_msa(VAR_0, VAR_1,\nVAR_2, VAR_3, VAR_4, VAR_5);", "}" ]
[ 0, 0, 0 ]
[ [ 1, 3, 5, 7 ], [ 9, 11 ], [ 13 ] ]
13,601
static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, const uint8_t *buf, int buf_size) { int cmd_pos, pos, cmd, x1, y1, x2, y2, offset1, offset2, next_cmd_pos; int big_offsets, offset_size, is_8bit = 0; const uint8_t *yuv_palette = 0; uint8_t ...
false
FFmpeg
f929ab0569ff31ed5a59b0b0adb7ce09df3fca39
static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, const uint8_t *buf, int buf_size) { int cmd_pos, pos, cmd, x1, y1, x2, y2, offset1, offset2, next_cmd_pos; int big_offsets, offset_size, is_8bit = 0; const uint8_t *yuv_palette = 0; uint8_t ...
{ "code": [], "line_no": [] }
static int FUNC_0(DVDSubContext *VAR_0, AVSubtitle *VAR_1, const uint8_t *VAR_2, int VAR_3) { int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13; int VAR_14, VAR_15, VAR_16 = 0; const uint8_t *VAR_17 = 0; uint8_t colormap[4] = { 0 }, alpha[...
[ "static int FUNC_0(DVDSubContext *VAR_0, AVSubtitle *VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{", "int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13;", "int VAR_14, VAR_15, VAR_16 = 0;", "const uint8_t *VAR_17 = 0;", "uint8_t colormap[4] = { 0 }, alpha[256] = { 0 };", "int VAR_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 23, 25 ], [ 27 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ...
13,602
static int format_name(char *buf, int buf_len, int index) { const char *proto, *dir; char *orig_buf_dup = NULL, *mod_buf_dup = NULL; int ret = 0; if (!av_stristr(buf, "%v")) return ret; orig_buf_dup = av_strdup(buf); if (!orig_buf_dup) { ret = AVERROR(ENOMEM); ...
false
FFmpeg
dc5d1515681b57a257443ba72bb81fb3e6e6621b
static int format_name(char *buf, int buf_len, int index) { const char *proto, *dir; char *orig_buf_dup = NULL, *mod_buf_dup = NULL; int ret = 0; if (!av_stristr(buf, "%v")) return ret; orig_buf_dup = av_strdup(buf); if (!orig_buf_dup) { ret = AVERROR(ENOMEM); ...
{ "code": [], "line_no": [] }
static int FUNC_0(char *VAR_0, int VAR_1, int VAR_2) { const char *VAR_3, *VAR_4; char *VAR_5 = NULL, *VAR_6 = NULL; int VAR_7 = 0; if (!av_stristr(VAR_0, "%v")) return VAR_7; VAR_5 = av_strdup(VAR_0); if (!VAR_5) { VAR_7 = AVERROR(ENOMEM); goto fail; }...
[ "static int FUNC_0(char *VAR_0, int VAR_1, int VAR_2)\n{", "const char *VAR_3, *VAR_4;", "char *VAR_5 = NULL, *VAR_6 = NULL;", "int VAR_7 = 0;", "if (!av_stristr(VAR_0, \"%v\"))\nreturn VAR_7;", "VAR_5 = av_strdup(VAR_0);", "if (!VAR_5) {", "VAR_7 = AVERROR(ENOMEM);", "goto fail;", "}", "if (rep...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13, 15 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 43 ], [ 49 ], [ 51 ], [ 53 ], [...
13,603
void cpu_reset(CPUSPARCState *env) { if (qemu_loglevel_mask(CPU_LOG_RESET)) { qemu_log("CPU Reset (CPU %d)\n", env->cpu_index); log_cpu_state(env, 0); } tlb_flush(env, 1); env->cwp = 0; #ifndef TARGET_SPARC64 env->wim = 1; #endif env->regwptr = env->regbase + (env->c...
true
qemu
8194f35a0c71a3bf169459bf715bea53b7bbc904
void cpu_reset(CPUSPARCState *env) { if (qemu_loglevel_mask(CPU_LOG_RESET)) { qemu_log("CPU Reset (CPU %d)\n", env->cpu_index); log_cpu_state(env, 0); } tlb_flush(env, 1); env->cwp = 0; #ifndef TARGET_SPARC64 env->wim = 1; #endif env->regwptr = env->regbase + (env->c...
{ "code": [ " env->pstate = PS_PRIV;", " env->tsptr = &env->ts[env->tl & MAXTL_MASK];", " env->tsptr = &env->ts[env->tl & MAXTL_MASK];", " env->tsptr = &env->ts[env->tl & MAXTL_MASK];", " env->tsptr = &env->ts[env->tl & MAXTL_MASK];", " env->tsptr = &env->ts[env->tl & MAXTL_M...
void FUNC_0(CPUSPARCState *VAR_0) { if (qemu_loglevel_mask(CPU_LOG_RESET)) { qemu_log("CPU Reset (CPU %d)\n", VAR_0->cpu_index); log_cpu_state(VAR_0, 0); } tlb_flush(VAR_0, 1); VAR_0->cwp = 0; #ifndef TARGET_SPARC64 VAR_0->wim = 1; #endif VAR_0->regwptr = VAR_0->regb...
[ "void FUNC_0(CPUSPARCState *VAR_0)\n{", "if (qemu_loglevel_mask(CPU_LOG_RESET)) {", "qemu_log(\"CPU Reset (CPU %d)\\n\", VAR_0->cpu_index);", "log_cpu_state(VAR_0, 0);", "}", "tlb_flush(VAR_0, 1);", "VAR_0->cwp = 0;", "#ifndef TARGET_SPARC64\nVAR_0->wim = 1;", "#endif\nVAR_0->regwptr = VAR_0->regbas...
[ 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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19, 21 ], [ 23, 25 ], [ 27, 29, 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39, 41, 43, 45 ], [ 47, 49 ], [ 51 ...
13,606
net_rx_pkt_pull_data(struct NetRxPkt *pkt, const struct iovec *iov, int iovcnt, size_t ploff) { if (pkt->vlan_stripped) { net_rx_pkt_iovec_realloc(pkt, iovcnt + 1); pkt->vec[0].iov_base = pkt->ehdr_buf; pkt->vec[0].iov_len = sizeof(pkt...
true
qemu
df8bf7a7fe75eb5d5caffa55f5cd4292b757aea6
net_rx_pkt_pull_data(struct NetRxPkt *pkt, const struct iovec *iov, int iovcnt, size_t ploff) { if (pkt->vlan_stripped) { net_rx_pkt_iovec_realloc(pkt, iovcnt + 1); pkt->vec[0].iov_base = pkt->ehdr_buf; pkt->vec[0].iov_len = sizeof(pkt...
{ "code": [ " if (pkt->vlan_stripped) {", " pkt->vec[0].iov_len = sizeof(pkt->ehdr_buf);", " pkt->tot_len =", " iov_size(iov, iovcnt) - ploff + sizeof(struct eth_header);" ], "line_no": [ 9, 17, 21, 23 ] }
FUNC_0(struct NetRxPkt *VAR_0, const struct iovec *VAR_1, int VAR_2, size_t VAR_3) { if (VAR_0->vlan_stripped) { net_rx_pkt_iovec_realloc(VAR_0, VAR_2 + 1); VAR_0->vec[0].iov_base = VAR_0->ehdr_buf; VAR_0->vec[0].iov_len = sizeof(VAR_0...
[ "FUNC_0(struct NetRxPkt *VAR_0,\nconst struct iovec *VAR_1, int VAR_2,\nsize_t VAR_3)\n{", "if (VAR_0->vlan_stripped) {", "net_rx_pkt_iovec_realloc(VAR_0, VAR_2 + 1);", "VAR_0->vec[0].iov_base = VAR_0->ehdr_buf;", "VAR_0->vec[0].iov_len = sizeof(VAR_0->ehdr_buf);", "VAR_0->tot_len =\niov_size(VAR_1, VAR_2...
[ 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 21, 23 ], [ 27, 29 ], [ 31 ], [ 33 ], [ 37 ], [ 39, 41 ], [ 43 ], [ 47, 49, 51, 53 ], [ 57, 59 ], [ 61 ] ]
13,607
MigrationState *tcp_start_outgoing_migration(Monitor *mon, const char *host_port, int64_t bandwidth_limit, int detach, int blk, int inc) { struct sockaddr...
true
qemu
40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4
MigrationState *tcp_start_outgoing_migration(Monitor *mon, const char *host_port, int64_t bandwidth_limit, int detach, int blk, int inc) { struct sockaddr...
{ "code": [ " s->fd = socket(PF_INET, SOCK_STREAM, 0);" ], "line_no": [ 59 ] }
MigrationState *FUNC_0(Monitor *mon, const char *host_port, int64_t bandwidth_limit, int detach, int blk, int inc) { struct sockaddr_in VAR_0; FdMigr...
[ "MigrationState *FUNC_0(Monitor *mon,\nconst char *host_port,\nint64_t bandwidth_limit,\nint detach,\nint blk,\nint inc)\n{", "struct sockaddr_in VAR_0;", "FdMigrationState *s;", "int VAR_1;", "if (parse_host_port(&VAR_0, host_port) < 0)\nreturn NULL;", "s = qemu_mallocz(sizeof(*s));", "s->get_error = s...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7, 9, 11, 13 ], [ 15 ], [ 17 ], [ 19 ], [ 23, 25 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 47 ], [ 49 ], [ 53 ], [ 55 ], [ 57 ...
13,608
int main_loop(void *opaque) { struct pollfd ufds[2], *pf, *serial_ufd, *net_ufd, *gdb_ufd; int ret, n, timeout; uint8_t ch; CPUState *env = global_env; if (!term_inited) { /* initialize terminal only there so that the user has a chance to stop QEMU with Ctrl-C before the...
true
qemu
27c3f2cb9bf2112b82edac898094e0a39e6efca1
int main_loop(void *opaque) { struct pollfd ufds[2], *pf, *serial_ufd, *net_ufd, *gdb_ufd; int ret, n, timeout; uint8_t ch; CPUState *env = global_env; if (!term_inited) { term_inited = 1; term_init(); } for(;;) { ret = cpu_x86_exec(env); ...
{ "code": [ " struct pollfd ufds[2], *pf, *serial_ufd, *net_ufd, *gdb_ufd;", " int ret, n, timeout;", " if (!(serial_ports[0].lsr & UART_LSR_DR)) {" ], "line_no": [ 5, 7, 59 ] }
int FUNC_0(void *VAR_0) { struct pollfd VAR_1[2], *pf, *serial_ufd, *net_ufd, *gdb_ufd; int VAR_2, VAR_3, VAR_4; uint8_t ch; CPUState *env = global_env; if (!term_inited) { term_inited = 1; term_init(); } for(;;) { VAR_2 = cpu_x86_exec(env...
[ "int FUNC_0(void *VAR_0)\n{", "struct pollfd VAR_1[2], *pf, *serial_ufd, *net_ufd, *gdb_ufd;", "int VAR_2, VAR_3, VAR_4;", "uint8_t ch;", "CPUState *env = global_env;", "if (!term_inited) {", "term_inited = 1;", "term_init();", "}", "for(;;) {", "VAR_2 = cpu_x86_exec(env);", "if (reset_request...
[ 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 33 ], [ 35, 37 ], [ 39, 41 ], [ 45, 47 ], [ 49, 51 ], [ 55 ], [ 57 ], [ 59 ...
13,609
static int ehci_state_executing(EHCIQueue *q) { EHCIPacket *p = QTAILQ_FIRST(&q->packets); assert(p != NULL); assert(p->qtdaddr == q->qtdaddr); ehci_execute_complete(q); // 4.10.3 if (!q->async) { int transactCtr = get_field(q->qh.epcap, QH_EPCAP_MULT); transactCtr...
true
qemu
cae5d3f4b3fbe9b681c0c4046008af424bd1d6a5
static int ehci_state_executing(EHCIQueue *q) { EHCIPacket *p = QTAILQ_FIRST(&q->packets); assert(p != NULL); assert(p->qtdaddr == q->qtdaddr); ehci_execute_complete(q); if (!q->async) { int transactCtr = get_field(q->qh.epcap, QH_EPCAP_MULT); transactCtr--; ...
{ "code": [ " if (!q->async) {", " int transactCtr = get_field(q->qh.epcap, QH_EPCAP_MULT);", " if (!q->async) {", " int transactCtr = get_field(q->qh.epcap, QH_EPCAP_MULT);", " transactCtr--;", " set_field(&q->qh.epcap, transactCtr, QH_EPCAP_MULT);" ], "l...
static int FUNC_0(EHCIQueue *VAR_0) { EHCIPacket *p = QTAILQ_FIRST(&VAR_0->packets); assert(p != NULL); assert(p->qtdaddr == VAR_0->qtdaddr); ehci_execute_complete(VAR_0); if (!VAR_0->async) { int VAR_1 = get_field(VAR_0->qh.epcap, QH_EPCAP_MULT); VAR_1--; ...
[ "static int FUNC_0(EHCIQueue *VAR_0)\n{", "EHCIPacket *p = QTAILQ_FIRST(&VAR_0->packets);", "assert(p != NULL);", "assert(p->qtdaddr == VAR_0->qtdaddr);", "ehci_execute_complete(VAR_0);", "if (!VAR_0->async) {", "int VAR_1 = get_field(VAR_0->qh.epcap, QH_EPCAP_MULT);", "VAR_1--;", "set_field(&VAR_0-...
[ 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 15 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29, 33 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 51 ], [ 53 ], [ 55 ] ]
13,610
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe) { int y, x, plane, cur_row = 0; for(plane = 0; plane < 3; plane++) { const int is_chroma = !!plane; const int qscale = av_clip(10000-quality,is_chroma?1000:2000,10000)<<2; const in...
true
FFmpeg
80387f0e2568746dce4a68e2217297029a053dae
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe) { int y, x, plane, cur_row = 0; for(plane = 0; plane < 3; plane++) { const int is_chroma = !!plane; const int qscale = av_clip(10000-quality,is_chroma?1000:2000,10000)<<2; const in...
{ "code": [ " ff_thread_await_progress(&ctx->buf_ptrs[index], cur_row, 0);", " if(p) {" ], "line_no": [ 69, 71 ] }
static int FUNC_0(MimicContext *VAR_0, int VAR_1, int VAR_2, int VAR_3) { int VAR_4, VAR_5, VAR_6, VAR_7 = 0; for(VAR_6 = 0; VAR_6 < 3; VAR_6++) { const int VAR_8 = !!VAR_6; const int VAR_9 = av_clip(10000-VAR_1,VAR_8?1000:2000,10000)<<2; const int VAR_10 = VAR...
[ "static int FUNC_0(MimicContext *VAR_0, int VAR_1, int VAR_2,\nint VAR_3)\n{", "int VAR_4, VAR_5, VAR_6, VAR_7 = 0;", "for(VAR_6 = 0; VAR_6 < 3; VAR_6++) {", "const int VAR_8 = !!VAR_6;", "const int VAR_9 = av_clip(10000-VAR_1,VAR_8?1000:2000,10000)<<2;", "const int VAR_10 = VAR_0->flipped_ptrs[VAR_0->cur...
[ 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 ]
[ [ 1, 3, 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 25 ], [ 27 ], [ 39 ], [ 49 ], [ 53, 55 ], [ 57 ], [ 59 ], [ 61 ], [ 63 ], [ 65 ], [ 69...
13,611
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) { UnsharpContext *unsharp = ctx->priv; int lmsize_x = 5, cmsize_x = 0; int lmsize_y = 5, cmsize_y = 0; double lamount = 1.0f, camount = 0.0f; if (args) sscanf(args, "%d:%d:%lf:%d:%d:%lf", &lmsize_x, &lmsiz...
true
FFmpeg
6fae8c5443d4fa40fe65f67138f4dbb731f23d72
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) { UnsharpContext *unsharp = ctx->priv; int lmsize_x = 5, cmsize_x = 0; int lmsize_y = 5, cmsize_y = 0; double lamount = 1.0f, camount = 0.0f; if (args) sscanf(args, "%d:%d:%lf:%d:%d:%lf", &lmsize_x, &lmsiz...
{ "code": [ " if (lmsize_x < 2 || lmsize_y < 2 || cmsize_x < 2 || cmsize_y < 2) {" ], "line_no": [ 23 ] }
static av_cold int FUNC_0(AVFilterContext *ctx, const char *args, void *opaque) { UnsharpContext *unsharp = ctx->priv; int VAR_0 = 5, VAR_1 = 0; int VAR_2 = 5, VAR_3 = 0; double VAR_4 = 1.0f, VAR_5 = 0.0f; if (args) sscanf(args, "%d:%d:%lf:%d:%d:%lf", &VAR_0, &VAR_2, &VAR_4, ...
[ "static av_cold int FUNC_0(AVFilterContext *ctx, const char *args, void *opaque)\n{", "UnsharpContext *unsharp = ctx->priv;", "int VAR_0 = 5, VAR_1 = 0;", "int VAR_2 = 5, VAR_3 = 0;", "double VAR_4 = 1.0f, VAR_5 = 0.0f;", "if (args)\nsscanf(args, \"%d:%d:%lf:%d:%d:%lf\", &VAR_0, &VAR_2, &VAR_4,\n&VAR_1, &...
[ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15, 17, 19 ], [ 23 ], [ 25, 27, 29 ], [ 31 ], [ 33 ], [ 37 ], [ 39 ], [ 43 ], [ 45 ] ]
13,613
static int mxf_decrypt_triplet(AVFormatContext *s, AVPacket *pkt, KLVPacket *klv) { static const uint8_t checkv[16] = {0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b}; MXFContext *mxf = s->priv_data; AVIOContext *pb = s->pb; int64_t end = avio_tell(pb...
false
FFmpeg
735e601be1b7731d256a41e942b31a96255a6bec
static int mxf_decrypt_triplet(AVFormatContext *s, AVPacket *pkt, KLVPacket *klv) { static const uint8_t checkv[16] = {0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b}; MXFContext *mxf = s->priv_data; AVIOContext *pb = s->pb; int64_t end = avio_tell(pb...
{ "code": [], "line_no": [] }
static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1, KLVPacket *VAR_2) { static const uint8_t VAR_3[16] = {0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b}; MXFContext *mxf = VAR_0->priv_data; AVIOContext *pb = VAR_0->pb; int64_t end = avio_tell(...
[ "static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1, KLVPacket *VAR_2)\n{", "static const uint8_t VAR_3[16] = {0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b};", "MXFContext *mxf = VAR_0->priv_data;", "AVIOContext *pb = VAR_0->pb;", "int64_t end = avio_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 27 ], [ 29 ], [ 31, 33 ], [ 35 ], [ 37 ], [ 41 ], [ 45 ], [ 47 ], [...
13,614
static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pic, int *got_packet) { libx265Context *ctx = avctx->priv_data; x265_picture x265pic; x265_picture x265pic_out = { { 0 } }; x265_nal *nal; uint8_t *dst; int payload = 0; int n...
true
FFmpeg
41836c4e306e572ecf80d5a714aaec532c7ece60
static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pic, int *got_packet) { libx265Context *ctx = avctx->priv_data; x265_picture x265pic; x265_picture x265pic_out = { { 0 } }; x265_nal *nal; uint8_t *dst; int payload = 0; int n...
{ "code": [], "line_no": [] }
static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1, const AVFrame *VAR_2, int *VAR_3) { libx265Context *ctx = VAR_0->priv_data; x265_picture x265pic; x265_picture x265pic_out = { { 0 } }; x265_nal *nal; uint8_t *dst; int VAR_4 = 0; int VAR_5; int VAR...
[ "static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{", "libx265Context *ctx = VAR_0->priv_data;", "x265_picture x265pic;", "x265_picture x265pic_out = { { 0 } };", "x265_nal *nal;", "uint8_t *dst;", "int VAR_4 = 0;", "int VAR_5;", "int VAR_6;", "int VAR_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 2, 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ], [ 11 ], [ 12 ], [ 13 ], [ 14 ], [ 15 ], [ 16 ], [ 17 ], [ 18 ], [ 19 ], [ 20, 21 ], [ 22, ...
13,615
static inline TCGv gen_ld16u(TCGv addr, int index) { TCGv tmp = new_tmp(); tcg_gen_qemu_ld16u(tmp, addr, index); return tmp; }
true
qemu
7d1b0095bff7157e856d1d0e6c4295641ced2752
static inline TCGv gen_ld16u(TCGv addr, int index) { TCGv tmp = new_tmp(); tcg_gen_qemu_ld16u(tmp, addr, index); return tmp; }
{ "code": [ " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " TCGv tmp = new_tmp();", " ...
static inline TCGv FUNC_0(TCGv addr, int index) { TCGv tmp = new_tmp(); tcg_gen_qemu_ld16u(tmp, addr, index); return tmp; }
[ "static inline TCGv FUNC_0(TCGv addr, int index)\n{", "TCGv tmp = new_tmp();", "tcg_gen_qemu_ld16u(tmp, addr, index);", "return tmp;", "}" ]
[ 0, 1, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ] ]
13,616
static int opus_decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) { OpusContext *c = avctx->priv_data; AVFrame *frame = data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; int coded_samples = 0; ...
true
FFmpeg
1973079417e8701b52ba810a72cb6c7c6f7f9a56
static int opus_decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) { OpusContext *c = avctx->priv_data; AVFrame *frame = data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; int coded_samples = 0; ...
{ "code": [], "line_no": [] }
static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2, AVPacket *VAR_3) { OpusContext *c = VAR_0->priv_data; AVFrame *frame = VAR_1; const uint8_t *VAR_4 = VAR_3->VAR_1; int VAR_5 = VAR_3->size; int VAR_6 = 0; int VAR_7 = 0; int VA...
[ "static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{", "OpusContext *c = VAR_0->priv_data;", "AVFrame *frame = VAR_1;", "const uint8_t *VAR_4 = VAR_3->VAR_1;", "int VAR_5 = VAR_3->size;", "int VAR_6 = 0;", "int VAR_7 = 0;", "int VAR_8, VAR_9;", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 12 ], [ 13 ], [ 14 ], [ 15 ], [ 16 ], [ 17 ], [ 18 ], [ 19 ], [ 20 ], [ 22 ], [ 23 ], [ ...
13,617
int page_check_range(target_ulong start, target_ulong len, int flags) { PageDesc *p; target_ulong end; target_ulong addr; /* This function should never be called with addresses outside the guest address space. If this assert fires, it probably indicates a missing call to h2g_vali...
true
qemu
cd7ccc83512a0cba5aa0c778e7507f267cfb1b16
int page_check_range(target_ulong start, target_ulong len, int flags) { PageDesc *p; target_ulong end; target_ulong addr; #if TARGET_ABI_BITS > L1_MAP_ADDR_SPACE_BITS assert(start < ((abi_ulong)1 << L1_MAP_ADDR_SPACE_BITS)); #endif if (len == 0) { return 0; } ...
{ "code": [ " return 0;" ], "line_no": [ 101 ] }
int FUNC_0(target_ulong VAR_0, target_ulong VAR_1, int VAR_2) { PageDesc *p; target_ulong end; target_ulong addr; #if TARGET_ABI_BITS > L1_MAP_ADDR_SPACE_BITS assert(VAR_0 < ((abi_ulong)1 << L1_MAP_ADDR_SPACE_BITS)); #endif if (VAR_1 == 0) { return 0; } if (V...
[ "int FUNC_0(target_ulong VAR_0, target_ulong VAR_1, int VAR_2)\n{", "PageDesc *p;", "target_ulong end;", "target_ulong addr;", "#if TARGET_ABI_BITS > L1_MAP_ADDR_SPACE_BITS\nassert(VAR_0 < ((abi_ulong)1 << L1_MAP_ADDR_SPACE_BITS));", "#endif\nif (VAR_1 == 0) {", "return 0;", "}", "if (VAR_0 + 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, 1, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 19, 21 ], [ 23, 27 ], [ 29 ], [ 31 ], [ 33 ], [ 37 ], [ 39 ], [ 45 ], [ 47 ], [ 51 ], [ 53 ], [ 55 ], [ 57 ], [ 59 ], [ 61 ...
13,618
static int add_file(AVFormatContext *avf, char *filename, ConcatFile **rfile, unsigned *nb_files_alloc) { ConcatContext *cat = avf->priv_data; ConcatFile *file; char *url; size_t url_len; if (cat->safe > 0 && !safe_filename(filename)) { av_log(avf, AV_LOG_ERROR,...
true
FFmpeg
de1568a452d8348917fee533fe17517131dccf95
static int add_file(AVFormatContext *avf, char *filename, ConcatFile **rfile, unsigned *nb_files_alloc) { ConcatContext *cat = avf->priv_data; ConcatFile *file; char *url; size_t url_len; if (cat->safe > 0 && !safe_filename(filename)) { av_log(avf, AV_LOG_ERROR,...
{ "code": [ " char *url;", " return AVERROR(EPERM);", " return AVERROR(ENOMEM);", " av_free(filename);", " return AVERROR(ENOMEM);" ], "line_no": [ 11, 21, 29, 33, 47 ] }
static int FUNC_0(AVFormatContext *VAR_0, char *VAR_1, ConcatFile **VAR_2, unsigned *VAR_3) { ConcatContext *cat = VAR_0->priv_data; ConcatFile *file; char *VAR_4; size_t url_len; if (cat->safe > 0 && !safe_filename(VAR_1)) { av_log(VAR_0, AV_LOG_ERROR, "Unsafe ...
[ "static int FUNC_0(AVFormatContext *VAR_0, char *VAR_1, ConcatFile **VAR_2,\nunsigned *VAR_3)\n{", "ConcatContext *cat = VAR_0->priv_data;", "ConcatFile *file;", "char *VAR_4;", "size_t url_len;", "if (cat->safe > 0 && !safe_filename(VAR_1)) {", "av_log(VAR_0, AV_LOG_ERROR, \"Unsafe file name '%s'\\n\",...
[ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27, 29 ], [ 31 ], [ 33 ], [ 37 ], [ 39 ], [ 41 ], [ 43, 45, 47 ], [ 49 ...
13,619
void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src) { // copy common properties dst->pts = src->pts; dst->pos = src->pos; switch (src->type) { case AVMEDIA_TYPE_VIDEO: { if (dst->video->qp_table) av_freep(&dst->video->qp_tab...
true
FFmpeg
6fb2fd895e858ab93f46e656a322778ee181c307
void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src) { dst->pts = src->pts; dst->pos = src->pos; switch (src->type) { case AVMEDIA_TYPE_VIDEO: { if (dst->video->qp_table) av_freep(&dst->video->qp_table); copy_video_p...
{ "code": [], "line_no": [] }
void FUNC_0(AVFilterBufferRef *VAR_0, AVFilterBufferRef *VAR_1) { VAR_0->pts = VAR_1->pts; VAR_0->pos = VAR_1->pos; switch (VAR_1->type) { case AVMEDIA_TYPE_VIDEO: { if (VAR_0->video->qp_table) av_freep(&VAR_0->video->qp_table); copy_video_props(V...
[ "void FUNC_0(AVFilterBufferRef *VAR_0, AVFilterBufferRef *VAR_1)\n{", "VAR_0->pts = VAR_1->pts;", "VAR_0->pos = VAR_1->pos;", "switch (VAR_1->type) {", "case AVMEDIA_TYPE_VIDEO: {", "if (VAR_0->video->qp_table)\nav_freep(&VAR_0->video->qp_table);", "copy_video_props(VAR_0->video,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 2 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8, 9 ], [ 10 ], [ 11 ], [ 12 ], [ 13 ], [ 14 ], [ 15 ], [ 16 ] ]
13,620
static void test_validate_fail_list(TestInputVisitorData *data, const void *unused) { UserDefOneList *head = NULL; Error *err = NULL; Visitor *v; v = validate_test_init(data, "[ { 'string': 'string0', 'integer': 42 }, { 'string': 'string1', 'integer': 43 }, {...
true
qemu
a12a5a1a0132527afe87c079e4aae4aad372bd94
static void test_validate_fail_list(TestInputVisitorData *data, const void *unused) { UserDefOneList *head = NULL; Error *err = NULL; Visitor *v; v = validate_test_init(data, "[ { 'string': 'string0', 'integer': 42 }, { 'string': 'string1', 'integer': 43 }, {...
{ "code": [ " error_free(err);", " g_assert(err);", " error_free(err);", " g_assert(err);", " error_free(err);", " g_assert(err);", " error_free(err);", " g_assert(err);", " error_free(err);", " g_assert(err);", " error_free(err);", " ...
static void FUNC_0(TestInputVisitorData *VAR_0, const void *VAR_1) { UserDefOneList *head = NULL; Error *err = NULL; Visitor *v; v = validate_test_init(VAR_0, "[ { 'string': 'string0', 'integer': 42 }, { 'string': 'string1', 'integer': 43 }, { 'string': 'stri...
[ "static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{", "UserDefOneList *head = NULL;", "Error *err = NULL;", "Visitor *v;", "v = validate_test_init(VAR_0, \"[ { 'string': 'string0', 'integer': 42 }, { 'string': 'string1', 'integer': 43 }, { 'string': 'string2', 'integer': 44, 'extra': 'gg...
[ 0, 0, 0, 0, 0, 0, 1, 1, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ] ]
13,621
int ff_find_unused_picture(MpegEncContext *s, int shared){ int i; if(shared){ for(i=0; i<MAX_PICTURE_COUNT; i++){ if(s->picture[i].data[0]==NULL && s->picture[i].type==0) return i; } }else{ for(i=0; i<MAX_PICTURE_COUNT; i++){ if(s->picture[i].data[0]...
true
FFmpeg
3c11a27b440e27c3796592aa8fb7fed966386a21
int ff_find_unused_picture(MpegEncContext *s, int shared){ int i; if(shared){ for(i=0; i<MAX_PICTURE_COUNT; i++){ if(s->picture[i].data[0]==NULL && s->picture[i].type==0) return i; } }else{ for(i=0; i<MAX_PICTURE_COUNT; i++){ if(s->picture[i].data[0]...
{ "code": [ " assert(0);" ], "line_no": [ 33 ] }
int FUNC_0(MpegEncContext *VAR_0, int VAR_1){ int VAR_2; if(VAR_1){ for(VAR_2=0; VAR_2<MAX_PICTURE_COUNT; VAR_2++){ if(VAR_0->picture[VAR_2].data[0]==NULL && VAR_0->picture[VAR_2].type==0) return VAR_2; } }else{ for(VAR_2=0; VAR_2<MAX_PICTURE_COUNT; VAR_2++){ ...
[ "int FUNC_0(MpegEncContext *VAR_0, int VAR_1){", "int VAR_2;", "if(VAR_1){", "for(VAR_2=0; VAR_2<MAX_PICTURE_COUNT; VAR_2++){", "if(VAR_0->picture[VAR_2].data[0]==NULL && VAR_0->picture[VAR_2].type==0) return VAR_2;", "}", "}else{", "for(VAR_2=0; VAR_2<MAX_PICTURE_COUNT; VAR_2++){", "if(VAR_0->pictu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ]
[ [ 1 ], [ 3 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ] ]
13,622
static void audio_init (PCIBus *pci_bus, qemu_irq *pic) { struct soundhw *c; int audio_enabled = 0; for (c = soundhw; !audio_enabled && c->name; ++c) { audio_enabled = c->enabled; } if (audio_enabled) { AudioState *s; s = AUD_init (); if (s) { ...
true
qemu
0d9acba8fddbf970c7353083e6a60b47017ce3e4
static void audio_init (PCIBus *pci_bus, qemu_irq *pic) { struct soundhw *c; int audio_enabled = 0; for (c = soundhw; !audio_enabled && c->name; ++c) { audio_enabled = c->enabled; } if (audio_enabled) { AudioState *s; s = AUD_init (); if (s) { ...
{ "code": [ " if (s) {", " for (c = soundhw; c->name; ++c) {", " if (c->enabled) {", " if (c->isa) {", " if (s) {", " for (c = soundhw; c->name; ++c) {", " if (s) {", " for (c = soundhw; c->name; ++...
static void FUNC_0 (PCIBus *VAR_0, qemu_irq *VAR_1) { struct soundhw *VAR_2; int VAR_3 = 0; for (VAR_2 = soundhw; !VAR_3 && VAR_2->name; ++VAR_2) { VAR_3 = VAR_2->enabled; } if (VAR_3) { AudioState *s; s = AUD_init (); if (s) { for (VAR_2 ...
[ "static void FUNC_0 (PCIBus *VAR_0, qemu_irq *VAR_1)\n{", "struct soundhw *VAR_2;", "int VAR_3 = 0;", "for (VAR_2 = soundhw; !VAR_3 && VAR_2->name; ++VAR_2) {", "VAR_3 = VAR_2->enabled;", "}", "if (VAR_3) {", "AudioState *s;", "s = AUD_init ();", "if (s) {", "for (VAR_2 = soundhw; VAR_2->name; +...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47...
13,624
static void destroy_buffers(VADisplay display, VABufferID *buffers, unsigned int n_buffers) { unsigned int i; for (i = 0; i < n_buffers; i++) { if (buffers[i]) { vaDestroyBuffer(display, buffers[i]); buffers[i] = 0; } } }
false
FFmpeg
8813d55fa5978660d9f4e7dbe1f50da9922be08d
static void destroy_buffers(VADisplay display, VABufferID *buffers, unsigned int n_buffers) { unsigned int i; for (i = 0; i < n_buffers; i++) { if (buffers[i]) { vaDestroyBuffer(display, buffers[i]); buffers[i] = 0; } } }
{ "code": [], "line_no": [] }
static void FUNC_0(VADisplay VAR_0, VABufferID *VAR_1, unsigned int VAR_2) { unsigned int VAR_3; for (VAR_3 = 0; VAR_3 < VAR_2; VAR_3++) { if (VAR_1[VAR_3]) { vaDestroyBuffer(VAR_0, VAR_1[VAR_3]); VAR_1[VAR_3] = 0; } } }
[ "static void FUNC_0(VADisplay VAR_0, VABufferID *VAR_1, unsigned int VAR_2)\n{", "unsigned int VAR_3;", "for (VAR_3 = 0; VAR_3 < VAR_2; VAR_3++) {", "if (VAR_1[VAR_3]) {", "vaDestroyBuffer(VAR_0, VAR_1[VAR_3]);", "VAR_1[VAR_3] = 0;", "}", "}", "}" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ] ]
13,625
static void vmxnet3_activate_device(VMXNET3State *s) { int i; static const uint32_t VMXNET3_DEF_TX_THRESHOLD = 1; hwaddr qdescr_table_pa; uint64_t pa; uint32_t size; /* Verify configuration consistency */ if (!vmxnet3_verify_driver_magic(s->drv_shmem)) { VMW_ERPRN("Device ...
true
qemu
c508277335e3b6b20cf18e6ea3a35c1fa835c64a
static void vmxnet3_activate_device(VMXNET3State *s) { int i; static const uint32_t VMXNET3_DEF_TX_THRESHOLD = 1; hwaddr qdescr_table_pa; uint64_t pa; uint32_t size; if (!vmxnet3_verify_driver_magic(s->drv_shmem)) { VMW_ERPRN("Device configuration received from driver is ...
{ "code": [ " if (!vmxnet3_verify_driver_magic(s->drv_shmem)) {", " s->mtu = VMXNET3_READ_DRV_SHARED32(s->drv_shmem, devRead.misc.mtu);", " VMXNET3_READ_DRV_SHARED16(s->drv_shmem, devRead.misc.maxNumRxSG);", " VMXNET3_READ_DRV_SHARED8(s->drv_shmem, devRead.intrConf.eventIntrIdx);",...
static void FUNC_0(VMXNET3State *VAR_0) { int VAR_1; static const uint32_t VAR_2 = 1; hwaddr qdescr_table_pa; uint64_t pa; uint32_t size; if (!vmxnet3_verify_driver_magic(VAR_0->drv_shmem)) { VMW_ERPRN("Device configuration received from driver is invalid"); retu...
[ "static void FUNC_0(VMXNET3State *VAR_0)\n{", "int VAR_1;", "static const uint32_t VAR_2 = 1;", "hwaddr qdescr_table_pa;", "uint64_t pa;", "uint32_t size;", "if (!vmxnet3_verify_driver_magic(VAR_0->drv_shmem)) {", "VMW_ERPRN(\"Device configuration received from driver is invalid\");", "return;", "...
[ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 51 ], [ 53 ...
13,626
bool object_property_get_bool(Object *obj, const char *name, Error **errp) { QObject *ret = object_property_get_qobject(obj, name, errp); QBool *qbool; bool retval; if (!ret) { return false; } qbool = qobject_to_qbool(ret); if (!qbool) { ...
true
qemu
560f19f162529d691619ac69ed032321c7f5f1fb
bool object_property_get_bool(Object *obj, const char *name, Error **errp) { QObject *ret = object_property_get_qobject(obj, name, errp); QBool *qbool; bool retval; if (!ret) { return false; } qbool = qobject_to_qbool(ret); if (!qbool) { ...
{ "code": [ " QDECREF(qbool);" ], "line_no": [ 37 ] }
bool FUNC_0(Object *obj, const char *name, Error **errp) { QObject *ret = object_property_get_qobject(obj, name, errp); QBool *qbool; bool retval; if (!ret) { return false; } qbool = qobject_to_qbool(ret); if (!qbool) { error_setg(er...
[ "bool FUNC_0(Object *obj, const char *name,\nError **errp)\n{", "QObject *ret = object_property_get_qobject(obj, name, errp);", "QBool *qbool;", "bool retval;", "if (!ret) {", "return false;", "}", "qbool = qobject_to_qbool(ret);", "if (!qbool) {", "error_setg(errp, QERR_INVALID_PARAMETER_TYPE, na...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 37 ], [ 39 ], [ 41 ] ]
13,627
static void mpegts_insert_pcr_only(AVFormatContext *s, AVStream *st) { MpegTSWrite *ts = s->priv_data; MpegTSWriteStream *ts_st = st->priv_data; uint8_t *q; uint8_t buf[TS_PACKET_SIZE]; q = buf; *q++ = 0x47; *q++ = ts_st->pid >> 8; *q++ = ts_st->pid; *q++ = 0x20 | ts_s...
true
FFmpeg
a566c952f905639456966413fee0b5701867ddcd
static void mpegts_insert_pcr_only(AVFormatContext *s, AVStream *st) { MpegTSWrite *ts = s->priv_data; MpegTSWriteStream *ts_st = st->priv_data; uint8_t *q; uint8_t buf[TS_PACKET_SIZE]; q = buf; *q++ = 0x47; *q++ = ts_st->pid >> 8; *q++ = ts_st->pid; *q++ = 0x20 | ts_s...
{ "code": [], "line_no": [] }
static void FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1) { MpegTSWrite *ts = VAR_0->priv_data; MpegTSWriteStream *ts_st = VAR_1->priv_data; uint8_t *q; uint8_t buf[TS_PACKET_SIZE]; q = buf; *q++ = 0x47; *q++ = ts_st->pid >> 8; *q++ = ts_st->pid; *q++ = 0x20 | ts_st-...
[ "static void FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1)\n{", "MpegTSWrite *ts = VAR_0->priv_data;", "MpegTSWriteStream *ts_st = VAR_1->priv_data;", "uint8_t *q;", "uint8_t buf[TS_PACKET_SIZE];", "q = buf;", "*q++ = 0x47;", "*q++ = ts_st->pid >> 8;", "*q++ = ts_st->pid;", "*q++ = 0x20 | ts_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ], [ 39 ], [ 45 ], [ 47 ], [ 49 ] ]
13,628
static void disas_extract(DisasContext *s, uint32_t insn) { unsupported_encoding(s, insn); }
true
qemu
e801de93d0155c0c14d6b4dea1b3577ca36e214b
static void disas_extract(DisasContext *s, uint32_t insn) { unsupported_encoding(s, insn); }
{ "code": [ " unsupported_encoding(s, insn);" ], "line_no": [ 5 ] }
static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1) { unsupported_encoding(VAR_0, VAR_1); }
[ "static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1)\n{", "unsupported_encoding(VAR_0, VAR_1);", "}" ]
[ 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ] ]
13,629
static int dxva2_mpeg2_end_frame(AVCodecContext *avctx) { struct MpegEncContext *s = avctx->priv_data; struct dxva2_picture_context *ctx_pic = s->current_picture_ptr->hwaccel_picture_private; int ret; if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0) return -1; ...
true
FFmpeg
f6774f905fb3cfdc319523ac640be30b14c1bc55
static int dxva2_mpeg2_end_frame(AVCodecContext *avctx) { struct MpegEncContext *s = avctx->priv_data; struct dxva2_picture_context *ctx_pic = s->current_picture_ptr->hwaccel_picture_private; int ret; if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0) return -1; ...
{ "code": [ " ret = ff_dxva2_common_end_frame(avctx, &s->current_picture_ptr->f," ], "line_no": [ 19 ] }
static int FUNC_0(AVCodecContext *VAR_0) { struct MpegEncContext *VAR_1 = VAR_0->priv_data; struct dxva2_picture_context *VAR_2 = VAR_1->current_picture_ptr->hwaccel_picture_private; int VAR_3; if (VAR_2->slice_count <= 0 || VAR_2->bitstream_size <= 0) return -1; VAR_3 = ff...
[ "static int FUNC_0(AVCodecContext *VAR_0)\n{", "struct MpegEncContext *VAR_1 = VAR_0->priv_data;", "struct dxva2_picture_context *VAR_2 =\nVAR_1->current_picture_ptr->hwaccel_picture_private;", "int VAR_3;", "if (VAR_2->slice_count <= 0 || VAR_2->bitstream_size <= 0)\nreturn -1;", "VAR_3 = ff_dxva2_common...
[ 0, 0, 0, 0, 0, 1, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7, 9 ], [ 11 ], [ 15, 17 ], [ 19, 21, 23, 25 ], [ 27, 29 ], [ 31 ], [ 33 ] ]
13,630
static int au_read_header(AVFormatContext *s) { int size; unsigned int tag; AVIOContext *pb = s->pb; unsigned int id, channels, rate; int bps; enum AVCodecID codec; AVStream *st; /* check ".snd" header */ tag = avio_rl32(pb); if (tag != MKTAG('.', 's', 'n', 'd')) ...
true
FFmpeg
fb48f825e33c15146b8ce4e5258332ebc4a9b5ea
static int au_read_header(AVFormatContext *s) { int size; unsigned int tag; AVIOContext *pb = s->pb; unsigned int id, channels, rate; int bps; enum AVCodecID codec; AVStream *st; tag = avio_rl32(pb); if (tag != MKTAG('.', 's', 'n', 'd')) return -1; siz...
{ "code": [ " if (channels == 0 || channels > 64) {" ], "line_no": [ 69 ] }
static int FUNC_0(AVFormatContext *VAR_0) { int VAR_1; unsigned int VAR_2; AVIOContext *pb = VAR_0->pb; unsigned int VAR_3, VAR_4, VAR_5; int VAR_6; enum AVCodecID VAR_7; AVStream *st; VAR_2 = avio_rl32(pb); if (VAR_2 != MKTAG('.', 'VAR_0', 'n', 'd')) retur...
[ "static int FUNC_0(AVFormatContext *VAR_0)\n{", "int VAR_1;", "unsigned int VAR_2;", "AVIOContext *pb = VAR_0->pb;", "unsigned int VAR_3, VAR_4, VAR_5;", "int VAR_6;", "enum AVCodecID VAR_7;", "AVStream *st;", "VAR_2 = avio_rl32(pb);", "if (VAR_2 != MKTAG('.', 'VAR_0', 'n', 'd'))\nreturn -1;", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 23 ], [ 25, 27 ], [ 29 ], [ 31 ], [ 35 ], [ 37 ], [ 39 ], [ 43 ], [ 47 ], [ 49 ], [ 51 ], [...
13,631
static inline void bink_idct_col(DCTELEM *dest, const DCTELEM *src) { if ((src[8]|src[16]|src[24]|src[32]|src[40]|src[48]|src[56])==0) { dest[0] = dest[8] = dest[16] = dest[24] = dest[32] = dest[40] = dest[48] = dest[56] = src[0]; } el...
true
FFmpeg
c3afa4db913668e50ac8ffc0bc66621664adc1f4
static inline void bink_idct_col(DCTELEM *dest, const DCTELEM *src) { if ((src[8]|src[16]|src[24]|src[32]|src[40]|src[48]|src[56])==0) { dest[0] = dest[8] = dest[16] = dest[24] = dest[32] = dest[40] = dest[48] = dest[56] = src[0]; } el...
{ "code": [ "static inline void bink_idct_col(DCTELEM *dest, const DCTELEM *src)" ], "line_no": [ 1 ] }
static inline void FUNC_0(DCTELEM *VAR_0, const DCTELEM *VAR_1) { if ((VAR_1[8]|VAR_1[16]|VAR_1[24]|VAR_1[32]|VAR_1[40]|VAR_1[48]|VAR_1[56])==0) { VAR_0[0] = VAR_0[8] = VAR_0[16] = VAR_0[24] = VAR_0[32] = VAR_0[40] = VAR_0[48] = VAR_0[56] =...
[ "static inline void FUNC_0(DCTELEM *VAR_0, const DCTELEM *VAR_1)\n{", "if ((VAR_1[8]|VAR_1[16]|VAR_1[24]|VAR_1[32]|VAR_1[40]|VAR_1[48]|VAR_1[56])==0) {", "VAR_0[0] =\nVAR_0[8] =\nVAR_0[16] =\nVAR_0[24] =\nVAR_0[32] =\nVAR_0[40] =\nVAR_0[48] =\nVAR_0[56] = VAR_1[0];", "} else {", "IDCT_COL(VAR_0, VAR_1);",...
[ 1, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7, 9, 11, 13, 15, 17, 19, 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ] ]
13,632
static int decode_info_header(NUTContext *nut) { AVFormatContext *s = nut->avf; AVIOContext *bc = s->pb; uint64_t tmp, chapter_start, chapter_len; unsigned int stream_id_plus1, count; int chapter_id, i; int64_t value, end; char name[256], str_value[1024], type_str[256]; const...
true
FFmpeg
96bfb677478514db73d1b63b4213c97ad4269e8f
static int decode_info_header(NUTContext *nut) { AVFormatContext *s = nut->avf; AVIOContext *bc = s->pb; uint64_t tmp, chapter_start, chapter_len; unsigned int stream_id_plus1, count; int chapter_id, i; int64_t value, end; char name[256], str_value[1024], type_str[256]; const...
{ "code": [ " int *event_flags;", " *event_flags |= metadata_flag;" ], "line_no": [ 21, 157 ] }
static int FUNC_0(NUTContext *VAR_0) { AVFormatContext *s = VAR_0->avf; AVIOContext *bc = s->pb; uint64_t tmp, chapter_start, chapter_len; unsigned int VAR_1, VAR_2; int VAR_3, VAR_4; int64_t value, end; char VAR_5[256], VAR_6[1024], VAR_7[256]; const char *VAR_8; int *V...
[ "static int FUNC_0(NUTContext *VAR_0)\n{", "AVFormatContext *s = VAR_0->avf;", "AVIOContext *bc = s->pb;", "uint64_t tmp, chapter_start, chapter_len;", "unsigned int VAR_1, VAR_2;", "int VAR_3, VAR_4;", "int64_t value, end;", "char VAR_5[256], VAR_6[1024], VAR_7[256];", "const char *VAR_8;", "i...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ...
13,633
static void vhost_client_set_memory(CPUPhysMemoryClient *client, target_phys_addr_t start_addr, ram_addr_t size, ram_addr_t phys_offset, bool log_dirty) { struct vhos...
true
qemu
04097f7c5957273c578f72b9bd603ba6b1d69e33
static void vhost_client_set_memory(CPUPhysMemoryClient *client, target_phys_addr_t start_addr, ram_addr_t size, ram_addr_t phys_offset, bool log_dirty) { struct vhos...
{ "code": [ " struct vhost_dev *dev = container_of(client, struct vhost_dev, client);", "static void vhost_client_set_memory(CPUPhysMemoryClient *client,", " target_phys_addr_t start_addr,", " ram_addr_t size,", " ...
static void FUNC_0(CPUPhysMemoryClient *VAR_0, target_phys_addr_t VAR_1, ram_addr_t VAR_2, ram_addr_t VAR_3, bool VAR_4) { struct vhost_dev *VAR_5 = container_of(VAR_...
[ "static void FUNC_0(CPUPhysMemoryClient *VAR_0,\ntarget_phys_addr_t VAR_1,\nram_addr_t VAR_2,\nram_addr_t VAR_3,\nbool VAR_4)\n{", "struct vhost_dev *VAR_5 = container_of(VAR_0, struct vhost_dev, VAR_0);", "ram_addr_t flags = VAR_3 & ~TARGET_PAGE_MASK;", "int VAR_6 = offsetof(struct vhost_memory, regions) +\n...
[ 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7, 9, 11 ], [ 13 ], [ 15 ], [ 17, 19 ], [ 21 ], [ 23 ], [ 27 ], [ 31 ], [ 33 ], [ 35 ], [ 39 ], [ 45 ], [ 47, 49 ], [ 53 ], [ 55 ], [ 57 ], [ 59 ...
13,634
static int quant_psnr8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, ptrdiff_t stride, int h) { LOCAL_ALIGNED_16(int16_t, temp, [64 * 2]); int16_t *const bak = temp + 64; int sum = 0, i; av_assert2(h == 8); s->mb_intra = 0; s->pdsp.diff_pixels(temp, ...
true
FFmpeg
bc488ec28aec4bc91ba47283c49c9f7f25696eaa
static int quant_psnr8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, ptrdiff_t stride, int h) { LOCAL_ALIGNED_16(int16_t, temp, [64 * 2]); int16_t *const bak = temp + 64; int sum = 0, i; av_assert2(h == 8); s->mb_intra = 0; s->pdsp.diff_pixels(temp, ...
{ "code": [ " s->pdsp.diff_pixels(temp, src1, src2, stride);", " s->pdsp.diff_pixels(temp, src1, src2, stride);", " s->pdsp.diff_pixels(temp, src1, src2, stride);", " s->pdsp.diff_pixels(temp, src1, src2, stride);" ], "line_no": [ 21, 21, 21, 21 ] }
static int FUNC_0(MpegEncContext *VAR_0, uint8_t *VAR_1, uint8_t *VAR_2, ptrdiff_t VAR_3, int VAR_4) { LOCAL_ALIGNED_16(int16_t, temp, [64 * 2]); int16_t *const bak = temp + 64; int VAR_5 = 0, VAR_6; av_assert2(VAR_4 == 8); VAR_0->mb_intra = 0; VAR_0->pdsp....
[ "static int FUNC_0(MpegEncContext *VAR_0, uint8_t *VAR_1,\nuint8_t *VAR_2, ptrdiff_t VAR_3, int VAR_4)\n{", "LOCAL_ALIGNED_16(int16_t, temp, [64 * 2]);", "int16_t *const bak = temp + 64;", "int VAR_5 = 0, VAR_6;", "av_assert2(VAR_4 == 8);", "VAR_0->mb_intra = 0;", "VAR_0->pdsp.diff_pixels(temp, VAR_1, V...
[ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 21 ], [ 25 ], [ 29, 31 ], [ 33 ], [ 35 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ] ]
13,637
static int vhdx_parse_metadata(BlockDriverState *bs, BDRVVHDXState *s) { int ret = 0; uint8_t *buffer; int offset = 0; uint32_t i = 0; VHDXMetadataTableEntry md_entry; buffer = qemu_blockalign(bs, VHDX_METADATA_TABLE_MAX_SIZE); ret = bdrv_pread(bs->file, s->metadata_rt.file_offse...
true
qemu
1d7678dec4761acdc43439da6ceda41a703ba1a6
static int vhdx_parse_metadata(BlockDriverState *bs, BDRVVHDXState *s) { int ret = 0; uint8_t *buffer; int offset = 0; uint32_t i = 0; VHDXMetadataTableEntry md_entry; buffer = qemu_blockalign(bs, VHDX_METADATA_TABLE_MAX_SIZE); ret = bdrv_pread(bs->file, s->metadata_rt.file_offse...
{ "code": [ " if (s->logical_sector_size == 0 || s->params.block_size == 0) {" ], "line_no": [ 355 ] }
static int FUNC_0(BlockDriverState *VAR_0, BDRVVHDXState *VAR_1) { int VAR_2 = 0; uint8_t *buffer; int VAR_3 = 0; uint32_t i = 0; VHDXMetadataTableEntry md_entry; buffer = qemu_blockalign(VAR_0, VHDX_METADATA_TABLE_MAX_SIZE); VAR_2 = bdrv_pread(VAR_0->file, VAR_1->metadata_rt.fil...
[ "static int FUNC_0(BlockDriverState *VAR_0, BDRVVHDXState *VAR_1)\n{", "int VAR_2 = 0;", "uint8_t *buffer;", "int VAR_3 = 0;", "uint32_t i = 0;", "VHDXMetadataTableEntry md_entry;", "buffer = qemu_blockalign(VAR_0, VHDX_METADATA_TABLE_MAX_SIZE);", "VAR_2 = bdrv_pread(VAR_0->file, VAR_1->metadata_rt.fi...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 21, 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 37 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 51 ], [...
13,638
void virtio_scsi_handle_cmd_vq(VirtIOSCSI *s, VirtQueue *vq) { VirtIOSCSIReq *req, *next; QTAILQ_HEAD(, VirtIOSCSIReq) reqs = QTAILQ_HEAD_INITIALIZER(reqs); while ((req = virtio_scsi_pop_req(s, vq))) { if (virtio_scsi_handle_cmd_req_prepare(s, req)) { QTAILQ_INSERT_TAIL(&reqs, re...
true
qemu
661e32fb3cb71c7e019daee375be4bb487b9917c
void virtio_scsi_handle_cmd_vq(VirtIOSCSI *s, VirtQueue *vq) { VirtIOSCSIReq *req, *next; QTAILQ_HEAD(, VirtIOSCSIReq) reqs = QTAILQ_HEAD_INITIALIZER(reqs); while ((req = virtio_scsi_pop_req(s, vq))) { if (virtio_scsi_handle_cmd_req_prepare(s, req)) { QTAILQ_INSERT_TAIL(&reqs, re...
{ "code": [ " if (virtio_scsi_handle_cmd_req_prepare(s, req)) {" ], "line_no": [ 13 ] }
void FUNC_0(VirtIOSCSI *VAR_0, VirtQueue *VAR_1) { VirtIOSCSIReq *req, *next; QTAILQ_HEAD(, VirtIOSCSIReq) reqs = QTAILQ_HEAD_INITIALIZER(reqs); while ((req = virtio_scsi_pop_req(VAR_0, VAR_1))) { if (virtio_scsi_handle_cmd_req_prepare(VAR_0, req)) { QTAILQ_INSERT_TAIL(&reqs, req...
[ "void FUNC_0(VirtIOSCSI *VAR_0, VirtQueue *VAR_1)\n{", "VirtIOSCSIReq *req, *next;", "QTAILQ_HEAD(, VirtIOSCSIReq) reqs = QTAILQ_HEAD_INITIALIZER(reqs);", "while ((req = virtio_scsi_pop_req(VAR_0, VAR_1))) {", "if (virtio_scsi_handle_cmd_req_prepare(VAR_0, req)) {", "QTAILQ_INSERT_TAIL(&reqs, req, next);"...
[ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ] ]
13,639
static void mch_realize(PCIDevice *d, Error **errp) { int i; MCHPCIState *mch = MCH_PCI_DEVICE(d); /* setup pci memory mapping */ pc_pci_as_mapping_init(OBJECT(mch), mch->system_memory, mch->pci_address_space); /* smram */ cpu_smm_register(&mch_set_smm, mch...
true
qemu
8caff63699a9bd6b82556bd527ff023c443ada2d
static void mch_realize(PCIDevice *d, Error **errp) { int i; MCHPCIState *mch = MCH_PCI_DEVICE(d); pc_pci_as_mapping_init(OBJECT(mch), mch->system_memory, mch->pci_address_space); cpu_smm_register(&mch_set_smm, mch); memory_region_init_alias(&mch->sm...
{ "code": [ " if (qemu_opt_get_bool(qemu_get_machine_opts(), \"iommu\", false)) {" ], "line_no": [ 51 ] }
static void FUNC_0(PCIDevice *VAR_0, Error **VAR_1) { int VAR_2; MCHPCIState *mch = MCH_PCI_DEVICE(VAR_0); pc_pci_as_mapping_init(OBJECT(mch), mch->system_memory, mch->pci_address_space); cpu_smm_register(&mch_set_smm, mch); memory_region_init_alias(...
[ "static void FUNC_0(PCIDevice *VAR_0, Error **VAR_1)\n{", "int VAR_2;", "MCHPCIState *mch = MCH_PCI_DEVICE(VAR_0);", "pc_pci_as_mapping_init(OBJECT(mch), mch->system_memory,\nmch->pci_address_space);", "cpu_smm_register(&mch_set_smm, mch);", "memory_region_init_alias(&mch->smram_region, OBJECT(mch), \"smr...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 13, 15 ], [ 21 ], [ 23, 25 ], [ 27, 29 ], [ 31 ], [ 33, 35, 37 ], [ 39 ], [ 41, 43, 45 ], [ 47 ], [ 51 ], [ 53 ], [ 55 ], [ 57 ] ]
13,640
static uint64_t calc_rice_params(RiceContext *rc, int pmin, int pmax, int32_t *data, int n, int pred_order) { int i; uint64_t bits[MAX_PARTITION_ORDER+1]; int opt_porder; RiceContext tmp_rc; uint32_t *udata; uint64_t sums[MAX_PARTITION_ORDER + 1][MAX_PART...
false
FFmpeg
f5ba67ee1342b7741200ff637fc3ea3387b68a1b
static uint64_t calc_rice_params(RiceContext *rc, int pmin, int pmax, int32_t *data, int n, int pred_order) { int i; uint64_t bits[MAX_PARTITION_ORDER+1]; int opt_porder; RiceContext tmp_rc; uint32_t *udata; uint64_t sums[MAX_PARTITION_ORDER + 1][MAX_PART...
{ "code": [], "line_no": [] }
static uint64_t FUNC_0(RiceContext *rc, int pmin, int pmax, int32_t *data, int n, int pred_order) { int VAR_0; uint64_t bits[MAX_PARTITION_ORDER+1]; int VAR_1; RiceContext tmp_rc; uint32_t *udata; uint64_t sums[MAX_PARTITION_ORDER + 1][MAX_PARTITIONS] = {...
[ "static uint64_t FUNC_0(RiceContext *rc, int pmin, int pmax,\nint32_t *data, int n, int pred_order)\n{", "int VAR_0;", "uint64_t bits[MAX_PARTITION_ORDER+1];", "int VAR_1;", "RiceContext tmp_rc;", "uint32_t *udata;", "uint64_t sums[MAX_PARTITION_ORDER + 1][MAX_PARTITIONS] = { { 0 } };", "assert(pmin >...
[ 0, 0, 0, 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 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [...
13,641
static int handle_http(HTTPContext *c, long cur_time) { int len; switch(c->state) { case HTTPSTATE_WAIT_REQUEST: /* timeout ? */ if ((c->timeout - cur_time) < 0) return -1; if (c->poll_entry->revents & (POLLERR | POLLHUP)) return -1; ...
true
FFmpeg
5eb765ef341c3ec1bea31914c897750f88476ede
static int handle_http(HTTPContext *c, long cur_time) { int len; switch(c->state) { case HTTPSTATE_WAIT_REQUEST: if ((c->timeout - cur_time) < 0) return -1; if (c->poll_entry->revents & (POLLERR | POLLHUP)) return -1; if (!...
{ "code": [ "static int handle_http(HTTPContext *c, long cur_time)", " if (http_send_data(c, cur_time) < 0)" ], "line_no": [ 1, 155 ] }
static int FUNC_0(HTTPContext *VAR_0, long VAR_1) { int VAR_2; switch(VAR_0->state) { case HTTPSTATE_WAIT_REQUEST: if ((VAR_0->timeout - VAR_1) < 0) return -1; if (VAR_0->poll_entry->revents & (POLLERR | POLLHUP)) return -1; ...
[ "static int FUNC_0(HTTPContext *VAR_0, long VAR_1)\n{", "int VAR_2;", "switch(VAR_0->state) {", "case HTTPSTATE_WAIT_REQUEST:\nif ((VAR_0->timeout - VAR_1) < 0)\nreturn -1;", "if (VAR_0->poll_entry->revents & (POLLERR | POLLHUP))\nreturn -1;", "if (!(VAR_0->poll_entry->revents & POLLIN))\nreturn 0;", "V...
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11, 15, 17 ], [ 19, 21 ], [ 27, 29 ], [ 33 ], [ 35 ], [ 37, 39 ], [ 41 ], [ 43 ], [ 45 ], [ 49 ], [ 51 ], [ 53 ], [ 55, 57 ], [ 61...
13,642
static int bfi_read_header(AVFormatContext * s) { BFIContext *bfi = s->priv_data; AVIOContext *pb = s->pb; AVStream *vstream; AVStream *astream; int fps, chunk_header; /* Initialize the video codec... */ vstream = avformat_new_stream(s, NULL); if (!vstream) return AVE...
true
FFmpeg
ad5807f8aa883bee5431186dc1f24c5435d722d3
static int bfi_read_header(AVFormatContext * s) { BFIContext *bfi = s->priv_data; AVIOContext *pb = s->pb; AVStream *vstream; AVStream *astream; int fps, chunk_header; vstream = avformat_new_stream(s, NULL); if (!vstream) return AVERROR(ENOMEM); astream ...
{ "code": [ " astream->codecpar->sample_rate * astream->codecpar->bits_per_coded_sample;" ], "line_no": [ 121 ] }
static int FUNC_0(AVFormatContext * VAR_0) { BFIContext *bfi = VAR_0->priv_data; AVIOContext *pb = VAR_0->pb; AVStream *vstream; AVStream *astream; int VAR_1, VAR_2; vstream = avformat_new_stream(VAR_0, NULL); if (!vstream) return AVERROR(ENOMEM); astrea...
[ "static int FUNC_0(AVFormatContext * VAR_0)\n{", "BFIContext *bfi = VAR_0->priv_data;", "AVIOContext *pb = VAR_0->pb;", "AVStream *vstream;", "AVStream *astream;", "int VAR_1, VAR_2;", "vstream = avformat_new_stream(VAR_0, NULL);", "if (!vstream)\nreturn AVERROR(ENOMEM);", "astream = avformat_new_st...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 19 ], [ 21, 23 ], [ 29 ], [ 31, 33 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [ 55 ...
13,643
static int event_qdev_init(DeviceState *qdev) { SCLPEvent *event = DO_UPCAST(SCLPEvent, qdev, qdev); SCLPEventClass *child = SCLP_EVENT_GET_CLASS(event); return child->init(event); }
true
qemu
c804c2a71752dd1e150cde768d8c54b02fa8bad9
static int event_qdev_init(DeviceState *qdev) { SCLPEvent *event = DO_UPCAST(SCLPEvent, qdev, qdev); SCLPEventClass *child = SCLP_EVENT_GET_CLASS(event); return child->init(event); }
{ "code": [ "static int event_qdev_init(DeviceState *qdev)", " SCLPEvent *event = DO_UPCAST(SCLPEvent, qdev, qdev);", " return child->init(event);", " SCLPEvent *event = DO_UPCAST(SCLPEvent, qdev, qdev);" ], "line_no": [ 1, 5, 11, 5 ] }
static int FUNC_0(DeviceState *VAR_0) { SCLPEvent *event = DO_UPCAST(SCLPEvent, VAR_0, VAR_0); SCLPEventClass *child = SCLP_EVENT_GET_CLASS(event); return child->init(event); }
[ "static int FUNC_0(DeviceState *VAR_0)\n{", "SCLPEvent *event = DO_UPCAST(SCLPEvent, VAR_0, VAR_0);", "SCLPEventClass *child = SCLP_EVENT_GET_CLASS(event);", "return child->init(event);", "}" ]
[ 1, 1, 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ] ]
13,644
static void gen_rfid(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); #else /* Restore CPU state */ if (unlikely(!ctx->mem_idx)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); return; } gen_helper_rfid(); gen_sync...
true
qemu
697ab892786d47008807a49f57b2fd86adfcd098
static void gen_rfid(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); #else if (unlikely(!ctx->mem_idx)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); return; } gen_helper_rfid(); gen_sync_exception(ctx); #endi...
{ "code": [], "line_no": [] }
static void FUNC_0(DisasContext *VAR_0) { #if defined(CONFIG_USER_ONLY) gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC); #else if (unlikely(!VAR_0->mem_idx)) { gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC); return; } gen_helper_rfid(); gen_sync_exception(VAR_0)...
[ "static void FUNC_0(DisasContext *VAR_0)\n{", "#if defined(CONFIG_USER_ONLY)\ngen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);", "#else\nif (unlikely(!VAR_0->mem_idx)) {", "gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);", "return;", "}", "gen_helper_rfid();", "gen_sync_exception(VAR_0);", "#en...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5, 7 ], [ 9, 13 ], [ 15 ], [ 17 ], [ 19 ], [ 22 ], [ 24 ], [ 26, 28 ] ]
13,645
static void vga_update_text(void *opaque, console_ch_t *chardata) { VGACommonState *s = opaque; int graphic_mode, i, cursor_offset, cursor_visible; int cw, cheight, width, height, size, c_min, c_max; uint32_t *src; console_ch_t *dst, val; char msg_buffer[80]; int full_update = 0; if (!(...
true
qemu
e9a07334fb6ee08ddd61787c102d36e7e781efef
static void vga_update_text(void *opaque, console_ch_t *chardata) { VGACommonState *s = opaque; int graphic_mode, i, cursor_offset, cursor_visible; int cw, cheight, width, height, size, c_min, c_max; uint32_t *src; console_ch_t *dst, val; char msg_buffer[80]; int full_update = 0; if (!(...
{ "code": [], "line_no": [] }
static void FUNC_0(void *VAR_0, console_ch_t *VAR_1) { VGACommonState *s = VAR_0; int VAR_2, VAR_3, VAR_4, VAR_5; int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12; uint32_t *src; console_ch_t *dst, val; char VAR_13[80]; int VAR_14 = 0; if (!(s->ar_index & 0x20)) { VAR_2 = ...
[ "static void FUNC_0(void *VAR_0, console_ch_t *VAR_1)\n{", "VGACommonState *s = VAR_0;", "int VAR_2, VAR_3, VAR_4, VAR_5;", "int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;", "uint32_t *src;", "console_ch_t *dst, val;", "char VAR_13[80];", "int VAR_14 = 0;", "if (!(s->ar_index & 0x20)) {", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ],...
13,646
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *pkt) { SANMVideoContext *ctx = avctx->priv_data; int i, ret; bytestream2_init(&ctx->gb, pkt->data, pkt->size); if (ctx->output->data[0]) avctx->release_buffer(avctx, ctx->out...
true
FFmpeg
b12d92efd6c0d48665383a9baecc13e7ebbd8a22
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *pkt) { SANMVideoContext *ctx = avctx->priv_data; int i, ret; bytestream2_init(&ctx->gb, pkt->data, pkt->size); if (ctx->output->data[0]) avctx->release_buffer(avctx, ctx->out...
{ "code": [ " ctx->pal[i] = 0xFF << 24 | bytestream2_get_be24u(&ctx->gb);", " ctx->pal[i] = 0xFF << 24 | AV_RB24(tmp);", " ctx->pal[i] = 0xFF << 24 | bytestream2_get_be24u(&ctx->gb);" ], "line_no": [ 67, 103, 129 ] }
static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2, AVPacket *VAR_3) { SANMVideoContext *ctx = VAR_0->priv_data; int VAR_4, VAR_5; bytestream2_init(&ctx->gb, VAR_3->VAR_1, VAR_3->size); if (ctx->output->VAR_1[0]) VAR_0->release_buffer(VAR_0, ctx->ou...
[ "static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{", "SANMVideoContext *ctx = VAR_0->priv_data;", "int VAR_4, VAR_5;", "bytestream2_init(&ctx->gb, VAR_3->VAR_1, VAR_3->size);", "if (ctx->output->VAR_1[0])\nVAR_0->release_buffer(VAR_0, ctx->output);", "if (!ctx->version...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15, 17 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 35 ], [ 37 ], [ 39 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53,...
13,647
static RAMBlock *unqueue_page(RAMState *rs, ram_addr_t *offset, ram_addr_t *ram_addr_abs) { RAMBlock *block = NULL; qemu_mutex_lock(&rs->src_page_req_mutex); if (!QSIMPLEQ_EMPTY(&rs->src_page_requests)) { struct RAMSrcPageRequest *entry = ...
true
qemu
06b106889a09277617fc8c542397a9f595ee605a
static RAMBlock *unqueue_page(RAMState *rs, ram_addr_t *offset, ram_addr_t *ram_addr_abs) { RAMBlock *block = NULL; qemu_mutex_lock(&rs->src_page_req_mutex); if (!QSIMPLEQ_EMPTY(&rs->src_page_requests)) { struct RAMSrcPageRequest *entry = ...
{ "code": [ " ram_addr_t *ram_addr_abs)", " *ram_addr_abs = (entry->offset + entry->rb->offset) &", " TARGET_PAGE_MASK;" ], "line_no": [ 3, 23, 25 ] }
static RAMBlock *FUNC_0(RAMState *rs, ram_addr_t *offset, ram_addr_t *ram_addr_abs) { RAMBlock *block = NULL; qemu_mutex_lock(&rs->src_page_req_mutex); if (!QSIMPLEQ_EMPTY(&rs->src_page_requests)) { struct RAMSrcPageRequest *VAR_0 = ...
[ "static RAMBlock *FUNC_0(RAMState *rs, ram_addr_t *offset,\nram_addr_t *ram_addr_abs)\n{", "RAMBlock *block = NULL;", "qemu_mutex_lock(&rs->src_page_req_mutex);", "if (!QSIMPLEQ_EMPTY(&rs->src_page_requests)) {", "struct RAMSrcPageRequest *VAR_0 =\nQSIMPLEQ_FIRST(&rs->src_page_requests);", "block = VAR_0-...
[ 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15, 17 ], [ 19 ], [ 21 ], [ 23, 25 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], ...
13,650
static int bands_dist(OpusPsyContext *s, CeltFrame *f, float *total_dist) { int i, tdist = 0.0f; OpusRangeCoder dump; ff_opus_rc_enc_init(&dump); ff_celt_enc_bitalloc(f, &dump); for (i = 0; i < CELT_MAX_BANDS; i++) { float bits = 0.0f; float dist = f->pvq->band_cost(f->pv...
false
FFmpeg
7b46add7257628bffac96d3002308d1f9e1ed172
static int bands_dist(OpusPsyContext *s, CeltFrame *f, float *total_dist) { int i, tdist = 0.0f; OpusRangeCoder dump; ff_opus_rc_enc_init(&dump); ff_celt_enc_bitalloc(f, &dump); for (i = 0; i < CELT_MAX_BANDS; i++) { float bits = 0.0f; float dist = f->pvq->band_cost(f->pv...
{ "code": [], "line_no": [] }
static int FUNC_0(OpusPsyContext *VAR_0, CeltFrame *VAR_1, float *VAR_2) { int VAR_3, VAR_4 = 0.0f; OpusRangeCoder dump; ff_opus_rc_enc_init(&dump); ff_celt_enc_bitalloc(VAR_1, &dump); for (VAR_3 = 0; VAR_3 < CELT_MAX_BANDS; VAR_3++) { float bits = 0.0f; float dist = VAR_...
[ "static int FUNC_0(OpusPsyContext *VAR_0, CeltFrame *VAR_1, float *VAR_2)\n{", "int VAR_3, VAR_4 = 0.0f;", "OpusRangeCoder dump;", "ff_opus_rc_enc_init(&dump);", "ff_celt_enc_bitalloc(VAR_1, &dump);", "for (VAR_3 = 0; VAR_3 < CELT_MAX_BANDS; VAR_3++) {", "float bits = 0.0f;", "float dist = VAR_1->pvq-...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 29 ], [ 33 ], [ 35 ] ]
13,651
static inline void apply_motion_generic(RoqContext *ri, int x, int y, int deltax, int deltay, int sz) { int mx, my, cp; mx = x + deltax; my = y + deltay; /* check MV against frame boundaries */ if ((mx < 0) || (mx > ri->width - sz) || (my <...
false
FFmpeg
f929ab0569ff31ed5a59b0b0adb7ce09df3fca39
static inline void apply_motion_generic(RoqContext *ri, int x, int y, int deltax, int deltay, int sz) { int mx, my, cp; mx = x + deltax; my = y + deltay; if ((mx < 0) || (mx > ri->width - sz) || (my < 0) || (my > ri->height - sz)) { ...
{ "code": [], "line_no": [] }
static inline void FUNC_0(RoqContext *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5) { int VAR_6, VAR_7, VAR_8; VAR_6 = VAR_1 + VAR_3; VAR_7 = VAR_2 + VAR_4; if ((VAR_6 < 0) || (VAR_6 > VAR_0->width - VAR_5) || (VAR_7 < 0) |...
[ "static inline void FUNC_0(RoqContext *VAR_0, int VAR_1, int VAR_2, int VAR_3,\nint VAR_4, int VAR_5)\n{", "int VAR_6, VAR_7, VAR_8;", "VAR_6 = VAR_1 + VAR_3;", "VAR_7 = VAR_2 + VAR_4;", "if ((VAR_6 < 0) || (VAR_6 > VAR_0->width - VAR_5) ||\n(VAR_7 < 0) || (VAR_7 > VAR_0->height - VAR_5)) {", "av_log(VAR_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 11 ], [ 13 ], [ 19, 21 ], [ 23, 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 43 ], [ 45 ], [ 47 ], [ 49, 51, 53 ], [ 55 ], ...
13,652
QGuestAllocator *pc_alloc_init(void) { PCAlloc *s = g_malloc0(sizeof(*s)); uint64_t ram_size; QFWCFG *fw_cfg = pc_fw_cfg_init(); s->alloc.alloc = pc_alloc; s->alloc.free = pc_free; ram_size = qfw_cfg_get_u64(fw_cfg, FW_CFG_RAM_SIZE); /* Start at 1MB */ s->start = 1 << 20; /* Respect ...
true
qemu
f3cdcbaee16d32b52d5015a8b1e8ddf5a27f7089
QGuestAllocator *pc_alloc_init(void) { PCAlloc *s = g_malloc0(sizeof(*s)); uint64_t ram_size; QFWCFG *fw_cfg = pc_fw_cfg_init(); s->alloc.alloc = pc_alloc; s->alloc.free = pc_free; ram_size = qfw_cfg_get_u64(fw_cfg, FW_CFG_RAM_SIZE); s->start = 1 << 20; s->end = MIN(ram_size, 0...
{ "code": [], "line_no": [] }
QGuestAllocator *FUNC_0(void) { PCAlloc *s = g_malloc0(sizeof(*s)); uint64_t ram_size; QFWCFG *fw_cfg = pc_fw_cfg_init(); s->alloc.alloc = pc_alloc; s->alloc.free = pc_free; ram_size = qfw_cfg_get_u64(fw_cfg, FW_CFG_RAM_SIZE); s->start = 1 << 20; s->end = MIN(ram_size, 0xE00000...
[ "QGuestAllocator *FUNC_0(void)\n{", "PCAlloc *s = g_malloc0(sizeof(*s));", "uint64_t ram_size;", "QFWCFG *fw_cfg = pc_fw_cfg_init();", "s->alloc.alloc = pc_alloc;", "s->alloc.free = pc_free;", "ram_size = qfw_cfg_get_u64(fw_cfg, FW_CFG_RAM_SIZE);", "s->start = 1 << 20;", "s->end = MIN(ram_size, 0xE0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 10 ], [ 12 ], [ 13 ], [ 14 ] ]
13,653
static int update_error_limit(WavpackFrameContext *ctx) { int i, br[2], sl[2]; for (i = 0; i <= ctx->stereo_in; i++) { if (ctx->ch[i].bitrate_acc > UINT_MAX - ctx->ch[i].bitrate_delta) return AVERROR_INVALIDDATA; ctx->ch[i].bitrate_acc += ctx->ch[i].bitrate_delta; br...
true
FFmpeg
ea71a48c7e8a76ee447fa518cca087df9288288d
static int update_error_limit(WavpackFrameContext *ctx) { int i, br[2], sl[2]; for (i = 0; i <= ctx->stereo_in; i++) { if (ctx->ch[i].bitrate_acc > UINT_MAX - ctx->ch[i].bitrate_delta) return AVERROR_INVALIDDATA; ctx->ch[i].bitrate_acc += ctx->ch[i].bitrate_delta; br...
{ "code": [ " br[1] = br[0] << 1;", " br[0] <<= 1;" ], "line_no": [ 29, 35 ] }
static int 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++) { if (VAR_0->ch[VAR_1].bitrate_acc > UINT_MAX - VAR_0->ch[VAR_1].bitrate_delta) return AVERROR_INVALIDDATA; VAR_0->ch[VAR_1].bitrate_acc += VAR_0...
[ "static int 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++) {", "if (VAR_0->ch[VAR_1].bitrate_acc > UINT_MAX - VAR_0->ch[VAR_1].bitrate_delta)\nreturn AVERROR_INVALIDDATA;", "VAR_0->ch[VAR_1].bitrate_acc += VAR_0->ch[VAR_1].bitra...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 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 ], ...
13,654
static void bdrv_co_io_em_complete(void *opaque, int ret) { CoroutineIOCompletion *co = opaque; co->ret = ret; qemu_coroutine_enter(co->coroutine, NULL); }
true
qemu
0b8b8753e4d94901627b3e86431230f2319215c4
static void bdrv_co_io_em_complete(void *opaque, int ret) { CoroutineIOCompletion *co = opaque; co->ret = ret; qemu_coroutine_enter(co->coroutine, NULL); }
{ "code": [ " qemu_coroutine_enter(co->coroutine, NULL);" ], "line_no": [ 11 ] }
static void FUNC_0(void *VAR_0, int VAR_1) { CoroutineIOCompletion *co = VAR_0; co->VAR_1 = VAR_1; qemu_coroutine_enter(co->coroutine, NULL); }
[ "static void FUNC_0(void *VAR_0, int VAR_1)\n{", "CoroutineIOCompletion *co = VAR_0;", "co->VAR_1 = VAR_1;", "qemu_coroutine_enter(co->coroutine, NULL);", "}" ]
[ 0, 0, 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ] ]
13,655
void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num) { uint64_t r; switch (num) { case 0x500: /* KVM hypercall */ r = s390_virtio_hypercall(env); break; case 0x44: /* yield */ r = 0; break; case 0x308: ...
true
qemu
7337c6eb98786372cdbfe7ebe7affbd166fdc7ca
void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num) { uint64_t r; switch (num) { case 0x500: r = s390_virtio_hypercall(env); break; case 0x44: r = 0; break; case 0x308: handle_diag_308(env...
{ "code": [], "line_no": [] }
void FUNC_0(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num) { uint64_t r; switch (num) { case 0x500: r = s390_virtio_hypercall(env); break; case 0x44: r = 0; break; case 0x308: handle_diag_308(env...
[ "void FUNC_0(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num)\n{", "uint64_t r;", "switch (num) {", "case 0x500:\nr = s390_virtio_hypercall(env);", "break;", "case 0x44:\nr = 0;", "break;", "case 0x308:\nhandle_diag_308(env, r1, r3);", "r = 0;", "break;", "case 0x288:\nr = handl...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11, 16 ], [ 19 ], [ 21, 25 ], [ 27 ], [ 29, 34 ], [ 37 ], [ 39 ], [ 41, 45 ], [ 47 ], [ 49, 51 ], [ 53 ], [ 55 ], [ 59 ], [ 61 ], ...
13,656
static uint32_t fdctrl_read_data (fdctrl_t *fdctrl) { fdrive_t *cur_drv; uint32_t retval = 0; int pos, len; cur_drv = get_cur_drv(fdctrl); fdctrl->state &= ~FD_CTRL_SLEEP; if (FD_STATE(fdctrl->data_state) == FD_STATE_CMD) { FLOPPY_ERROR("can't read data in CMD state\n"); ...
true
qemu
d6c1a327a94437f0ed74ba970b97fd962462bc77
static uint32_t fdctrl_read_data (fdctrl_t *fdctrl) { fdrive_t *cur_drv; uint32_t retval = 0; int pos, len; cur_drv = get_cur_drv(fdctrl); fdctrl->state &= ~FD_CTRL_SLEEP; if (FD_STATE(fdctrl->data_state) == FD_STATE_CMD) { FLOPPY_ERROR("can't read data in CMD state\n"); ...
{ "code": [ " bdrv_read(cur_drv->bs, fd_sector(cur_drv),", " fdctrl->fifo, len);" ], "line_no": [ 39, 41 ] }
static uint32_t FUNC_0 (fdctrl_t *fdctrl) { fdrive_t *cur_drv; uint32_t retval = 0; int VAR_0, VAR_1; cur_drv = get_cur_drv(fdctrl); fdctrl->state &= ~FD_CTRL_SLEEP; if (FD_STATE(fdctrl->data_state) == FD_STATE_CMD) { FLOPPY_ERROR("can't read data in CMD state\n"); ret...
[ "static uint32_t FUNC_0 (fdctrl_t *fdctrl)\n{", "fdrive_t *cur_drv;", "uint32_t retval = 0;", "int VAR_0, VAR_1;", "cur_drv = get_cur_drv(fdctrl);", "fdctrl->state &= ~FD_CTRL_SLEEP;", "if (FD_STATE(fdctrl->data_state) == FD_STATE_CMD) {", "FLOPPY_ERROR(\"can't read data in CMD state\\n\");", "retur...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35, 37 ], [ 39, 41 ], [ 43 ], [ 45 ...
13,657
static void scsi_dma_complete(void *opaque, int ret) { SCSIDiskReq *r = (SCSIDiskReq *)opaque; SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev); if (r->req.aiocb != NULL) { r->req.aiocb = NULL; bdrv_acct_done(s->qdev.conf.bs, &r->acct); } if (ret < 0) { ...
true
qemu
46e3f30e3c81e23c07f16b2193dfb6928646c205
static void scsi_dma_complete(void *opaque, int ret) { SCSIDiskReq *r = (SCSIDiskReq *)opaque; SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev); if (r->req.aiocb != NULL) { r->req.aiocb = NULL; bdrv_acct_done(s->qdev.conf.bs, &r->acct); } if (ret < 0) { ...
{ "code": [ " if (r->req.aiocb != NULL) {", " r->req.aiocb = NULL;", " bdrv_acct_done(s->qdev.conf.bs, &r->acct);", " if (r->req.aiocb != NULL) {", " r->req.aiocb = NULL;", " bdrv_acct_done(s->qdev.conf.bs, &r->acct);" ], "line_no": [ 11, 13, 1...
static void FUNC_0(void *VAR_0, int VAR_1) { SCSIDiskReq *r = (SCSIDiskReq *)VAR_0; SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev); if (r->req.aiocb != NULL) { r->req.aiocb = NULL; bdrv_acct_done(s->qdev.conf.bs, &r->acct); } if (VAR_1 < 0) { if (s...
[ "static void FUNC_0(void *VAR_0, int VAR_1)\n{", "SCSIDiskReq *r = (SCSIDiskReq *)VAR_0;", "SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);", "if (r->req.aiocb != NULL) {", "r->req.aiocb = NULL;", "bdrv_acct_done(s->qdev.conf.bs, &r->acct);", "}", "if (VAR_1 < 0) {", "if (scsi_handle_...
[ 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47...
13,658
static inline void validate_seg(int seg_reg, int cpl) { int dpl; uint32_t e2; e2 = env->segs[seg_reg].flags; dpl = (e2 >> DESC_DPL_SHIFT) & 3; if (!(e2 & DESC_CS_MASK) || !(e2 & DESC_C_MASK)) { /* data or non conforming code segment */ if (dpl < cpl) { cpu_...
true
qemu
cd072e01d86b3d7adab35de03d242e3938e798df
static inline void validate_seg(int seg_reg, int cpl) { int dpl; uint32_t e2; e2 = env->segs[seg_reg].flags; dpl = (e2 >> DESC_DPL_SHIFT) & 3; if (!(e2 & DESC_CS_MASK) || !(e2 & DESC_C_MASK)) { if (dpl < cpl) { cpu_x86_load_seg_cache(env, seg_reg, 0, 0, 0,...
{ "code": [], "line_no": [] }
static inline void FUNC_0(int VAR_0, int VAR_1) { int VAR_2; uint32_t e2; e2 = env->segs[VAR_0].flags; VAR_2 = (e2 >> DESC_DPL_SHIFT) & 3; if (!(e2 & DESC_CS_MASK) || !(e2 & DESC_C_MASK)) { if (VAR_2 < VAR_1) { cpu_x86_load_seg_cache(env, VAR_0, 0, 0, 0, 0...
[ "static inline void FUNC_0(int VAR_0, int VAR_1)\n{", "int VAR_2;", "uint32_t e2;", "e2 = env->segs[VAR_0].flags;", "VAR_2 = (e2 >> DESC_DPL_SHIFT) & 3;", "if (!(e2 & DESC_CS_MASK) || !(e2 & DESC_C_MASK)) {", "if (VAR_2 < VAR_1) {", "cpu_x86_load_seg_cache(env, VAR_0, 0, 0, 0, 0);", "}", "}", "}...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ] ]
13,659
static void realize(DeviceState *d, Error **errp) { sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(d); sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc); Object *root_container; char link_name[256]; gchar *child_name; Error *err = NULL; DPRINTFN("drc realize: %x", drck->g...
true
qemu
586d2142a9f1aa5a1dceb0941e7b3f0953974a8b
static void realize(DeviceState *d, Error **errp) { sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(d); sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc); Object *root_container; char link_name[256]; gchar *child_name; Error *err = NULL; DPRINTFN("drc realize: %x", drck->g...
{ "code": [], "line_no": [] }
static void FUNC_0(DeviceState *VAR_0, Error **VAR_1) { sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(VAR_0); sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc); Object *root_container; char VAR_2[256]; gchar *child_name; Error *err = NULL; DPRINTFN("drc FUNC_0: %x", drck...
[ "static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{", "sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(VAR_0);", "sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);", "Object *root_container;", "char VAR_2[256];", "gchar *child_name;", "Error *err = NULL;", "DPRINTFN(\"drc FUNC_0: %x\",...
[ 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 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43, 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [ 55 ], [ 58 ], [...
13,661
connect_to_qemu( const char *host, const char *port ) { struct addrinfo hints; struct addrinfo *server; int ret, sock; sock = qemu_socket(AF_INET, SOCK_STREAM, 0); if (sock < 0) { /* Error */ fprintf(stderr, "Error opening socket!\n"); return -1; } ...
true
qemu
581fe784c3adf85dc167a47a4a60fd1245a98217
connect_to_qemu( const char *host, const char *port ) { struct addrinfo hints; struct addrinfo *server; int ret, sock; sock = qemu_socket(AF_INET, SOCK_STREAM, 0); if (sock < 0) { fprintf(stderr, "Error opening socket!\n"); return -1; } memse...
{ "code": [ " return -1;", " return -1;" ], "line_no": [ 25, 25 ] }
FUNC_0( const char *VAR_0, const char *VAR_1 ) { struct addrinfo VAR_2; struct addrinfo *VAR_3; int VAR_4, VAR_5; VAR_5 = qemu_socket(AF_INET, SOCK_STREAM, 0); if (VAR_5 < 0) { fprintf(stderr, "Error opening socket!\n"); return -1; } memset(&...
[ "FUNC_0(\nconst char *VAR_0,\nconst char *VAR_1\n) {", "struct addrinfo VAR_2;", "struct addrinfo *VAR_3;", "int VAR_4, VAR_5;", "VAR_5 = qemu_socket(AF_INET, SOCK_STREAM, 0);", "if (VAR_5 < 0) {", "fprintf(stderr, \"Error opening socket!\\n\");", "return -1;", "}", "memset(&VAR_2, 0, sizeof(struc...
[ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 43 ], [ 47 ], [ 51 ], [ 53 ], [ 55 ...
13,662
void ff_init_block_index(MpegEncContext *s){ //FIXME maybe rename const int linesize = s->current_picture.f.linesize[0]; //not s->linesize as this would be wrong for field pics const int uvlinesize = s->current_picture.f.linesize[1]; const int mb_size= 4; s->block_index[0]= s->b8_stride*(s->mb_y...
true
FFmpeg
f6774f905fb3cfdc319523ac640be30b14c1bc55
void ff_init_block_index(MpegEncContext *s){ const int linesize = s->current_picture.f.linesize[0]; const int uvlinesize = s->current_picture.f.linesize[1]; const int mb_size= 4; s->block_index[0]= s->b8_stride*(s->mb_y*2 ) - 2 + s->mb_x*2; s->block_index[1]= s->b8_stride*(s->mb_y*2 ...
{ "code": [ " const int uvlinesize = s->current_picture.f.linesize[1];", " const int uvlinesize = s->current_picture.f.linesize[1];", " s->dest[0] = s->current_picture.f.data[0] + ((s->mb_x - 1) << mb_size);", " s->dest[1] = s->current_picture.f.data[1] + ((s->mb_x - 1) << (mb_size - s->c...
void FUNC_0(MpegEncContext *VAR_0){ const int VAR_1 = VAR_0->current_picture.f.VAR_1[0]; const int VAR_2 = VAR_0->current_picture.f.VAR_1[1]; const int VAR_3= 4; VAR_0->block_index[0]= VAR_0->b8_stride*(VAR_0->mb_y*2 ) - 2 + VAR_0->mb_x*2; VAR_0->block_index[1]= VAR_0->b8_stride*(VAR_0...
[ "void FUNC_0(MpegEncContext *VAR_0){", "const int VAR_1 = VAR_0->current_picture.f.VAR_1[0];", "const int VAR_2 = VAR_0->current_picture.f.VAR_1[1];", "const int VAR_3= 4;", "VAR_0->block_index[0]= VAR_0->b8_stride*(VAR_0->mb_y*2 ) - 2 + VAR_0->mb_x*2;", "VAR_0->block_index[1]= VAR_0->b8_stride*(VAR_...
[ 0, 0, 1, 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 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 27 ], [ 29 ], [ 31 ], [ 35, 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49...
13,663
static void virtio_net_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass); dc->exit = virtio_net_device_exit; dc->props = virtio_net_properties; set_bit(DEVICE_CATEGORY_NETWORK, dc->categories); vdc->init...
true
qemu
3786cff5eb384d058395a2729af627fa3253d056
static void virtio_net_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass); dc->exit = virtio_net_device_exit; dc->props = virtio_net_properties; set_bit(DEVICE_CATEGORY_NETWORK, dc->categories); vdc->init...
{ "code": [ " dc->exit = virtio_net_device_exit;" ], "line_no": [ 9 ] }
static void FUNC_0(ObjectClass *VAR_0, void *VAR_1) { DeviceClass *dc = DEVICE_CLASS(VAR_0); VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(VAR_0); dc->exit = virtio_net_device_exit; dc->props = virtio_net_properties; set_bit(DEVICE_CATEGORY_NETWORK, dc->categories); vdc->init = virtio_net_...
[ "static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{", "DeviceClass *dc = DEVICE_CLASS(VAR_0);", "VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(VAR_0);", "dc->exit = virtio_net_device_exit;", "dc->props = virtio_net_properties;", "set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);", "vdc->init = virtio...
[ 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 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ] ]
13,664
static int decode_tile(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile) { int compno, reslevelno, bandno; int x, y; uint8_t *line; Jpeg2000T1Context t1; /* Loop on tile components */ for (compno = 0; compno < s->ncomponents; compno++) { Jpeg2000Component *comp = tile->comp + ...
true
FFmpeg
8bedbb82cee4463a43e60eb22674c8bf927280ef
static int decode_tile(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile) { int compno, reslevelno, bandno; int x, y; uint8_t *line; Jpeg2000T1Context t1; for (compno = 0; compno < s->ncomponents; compno++) { Jpeg2000Component *comp = tile->comp + compno; Jpeg2000Codi...
{ "code": [ " ff_dwt_decode(&comp->dwt, comp->data);", " float *datap = (float*)comp->data;", " int32_t *i_datap = (int32_t *) comp->data;", " float *datap = (float*)comp->data;", " int32_t *i_datap = (int32_t *) comp->data;", " ff_dwt_...
static int FUNC_0(Jpeg2000DecoderContext *VAR_0, Jpeg2000Tile *VAR_1) { int VAR_2, VAR_3, VAR_4; int VAR_5, VAR_6; uint8_t *line; Jpeg2000T1Context t1; for (VAR_2 = 0; VAR_2 < VAR_0->ncomponents; VAR_2++) { Jpeg2000Component *comp = VAR_1->comp + VAR_2; Jpeg2000Co...
[ "static int FUNC_0(Jpeg2000DecoderContext *VAR_0, Jpeg2000Tile *VAR_1)\n{", "int VAR_2, VAR_3, VAR_4;", "int VAR_5, VAR_6;", "uint8_t *line;", "Jpeg2000T1Context t1;", "for (VAR_2 = 0; VAR_2 < VAR_0->ncomponents; VAR_2++) {", "Jpeg2000Component *comp = VAR_1->comp + VAR_2;", "Jpeg2000CodingStyle *...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 17 ], [ 19 ], [ 21 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 43 ], [ 47, 49 ], [ 53 ], [ 57 ], [ 59 ], [...
13,665
int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num, const uint8_t *buf, int nb_sectors) { BlockDriver *drv = bs->drv; if (!drv) return -ENOMEDIUM; if (!drv->bdrv_write_compressed) return -ENOTSUP; if (bdrv_check_request(bs, sector_num, nb...
true
qemu
c6d2283068026035a6468aae9dcde953bd7521ac
int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num, const uint8_t *buf, int nb_sectors) { BlockDriver *drv = bs->drv; if (!drv) return -ENOMEDIUM; if (!drv->bdrv_write_compressed) return -ENOTSUP; if (bdrv_check_request(bs, sector_num, nb...
{ "code": [ " if (bs->dirty_tracking) {", " if (bs->dirty_tracking) {", " if (bs->dirty_tracking) {" ], "line_no": [ 23, 23, 23 ] }
int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1, const uint8_t *VAR_2, int VAR_3) { BlockDriver *drv = VAR_0->drv; if (!drv) return -ENOMEDIUM; if (!drv->FUNC_0) return -ENOTSUP; if (bdrv_check_request(VAR_0, VAR_1, VAR_3)) return -EIO; ...
[ "int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{", "BlockDriver *drv = VAR_0->drv;", "if (!drv)\nreturn -ENOMEDIUM;", "if (!drv->FUNC_0)\nreturn -ENOTSUP;", "if (bdrv_check_request(VAR_0, VAR_1, VAR_3))\nreturn -EIO;", "if (VAR_0->dirty_tracking) {", "set_dirty_bi...
[ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9, 11 ], [ 13, 15 ], [ 17, 19 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 33 ] ]
13,666
static void moxie_cpu_class_init(ObjectClass *oc, void *data) { DeviceClass *dc = DEVICE_CLASS(oc); CPUClass *cc = CPU_CLASS(oc); MoxieCPUClass *mcc = MOXIE_CPU_CLASS(oc); mcc->parent_realize = dc->realize; dc->realize = moxie_cpu_realizefn; mcc->parent_reset = cc->reset; cc->res...
true
qemu
ce5b1bbf624b977a55ff7f85bb3871682d03baff
static void moxie_cpu_class_init(ObjectClass *oc, void *data) { DeviceClass *dc = DEVICE_CLASS(oc); CPUClass *cc = CPU_CLASS(oc); MoxieCPUClass *mcc = MOXIE_CPU_CLASS(oc); mcc->parent_realize = dc->realize; dc->realize = moxie_cpu_realizefn; mcc->parent_reset = cc->reset; cc->res...
{ "code": [ " dc->cannot_destroy_with_object_finalize_yet = true;", " dc->cannot_destroy_with_object_finalize_yet = true;", " dc->cannot_destroy_with_object_finalize_yet = true;", " dc->cannot_destroy_with_object_finalize_yet = true;", " dc->cannot_destroy_with_object_finalize_yet =...
static void FUNC_0(ObjectClass *VAR_0, void *VAR_1) { DeviceClass *dc = DEVICE_CLASS(VAR_0); CPUClass *cc = CPU_CLASS(VAR_0); MoxieCPUClass *mcc = MOXIE_CPU_CLASS(VAR_0); mcc->parent_realize = dc->realize; dc->realize = moxie_cpu_realizefn; mcc->parent_reset = cc->reset; cc->rese...
[ "static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{", "DeviceClass *dc = DEVICE_CLASS(VAR_0);", "CPUClass *cc = CPU_CLASS(VAR_0);", "MoxieCPUClass *mcc = MOXIE_CPU_CLASS(VAR_0);", "mcc->parent_realize = dc->realize;", "dc->realize = moxie_cpu_realizefn;", "mcc->parent_reset = cc->reset;", "cc->res...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 25 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37, 39 ], [ 41, 43 ], [ 45 ], [ 47, 49 ], [ 63 ], [...
13,668
static int vc1_decode_sprites(VC1Context *v, GetBitContext* gb) { int ret; MpegEncContext *s = &v->s; AVCodecContext *avctx = s->avctx; SpriteData sd; memset(&sd, 0, sizeof(sd)); ret = vc1_parse_sprites(v, gb, &sd); if (ret < 0) return ret; if (!s->current_pic...
true
FFmpeg
30f680ee0a2707af9a649a0aa3fd951d18a25c05
static int vc1_decode_sprites(VC1Context *v, GetBitContext* gb) { int ret; MpegEncContext *s = &v->s; AVCodecContext *avctx = s->avctx; SpriteData sd; memset(&sd, 0, sizeof(sd)); ret = vc1_parse_sprites(v, gb, &sd); if (ret < 0) return ret; if (!s->current_pic...
{ "code": [ " if (!s->current_picture.f->data[0]) {" ], "line_no": [ 27 ] }
static int FUNC_0(VC1Context *VAR_0, GetBitContext* VAR_1) { int VAR_2; MpegEncContext *s = &VAR_0->s; AVCodecContext *avctx = s->avctx; SpriteData sd; memset(&sd, 0, sizeof(sd)); VAR_2 = vc1_parse_sprites(VAR_0, VAR_1, &sd); if (VAR_2 < 0) return VAR_2; if (!...
[ "static int FUNC_0(VC1Context *VAR_0, GetBitContext* VAR_1)\n{", "int VAR_2;", "MpegEncContext *s = &VAR_0->s;", "AVCodecContext *avctx = s->avctx;", "SpriteData sd;", "memset(&sd, 0, sizeof(sd));", "VAR_2 = vc1_parse_sprites(VAR_0, VAR_1, &sd);", "if (VAR_2 < 0)\nreturn VAR_2;", "if (!s->curren...
[ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 19 ], [ 21, 23 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 47 ], [ 49, 51 ], [ 55 ...
13,669
yuv2yuvX_altivec_real(int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW) { const vector signed int vini = {(1 << 18), (1 << 18), (1 << 18), (1 << 18)}; register i...
true
FFmpeg
6e42e6c4b410dbef8b593c2d796a5dad95f89ee4
yuv2yuvX_altivec_real(int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW) { const vector signed int vini = {(1 << 18), (1 << 18), (1 << 18), (1 << 18)}; register i...
{ "code": [ "\t\t int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,", "\t\t uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW)", " const vector signed int vini = {(1 << 18), (1 << 18), (1 << 18), (1 << 18)};", " register int i, j;", " int __attribute__ ((al...
FUNC_0(int16_t *VAR_0, int16_t **VAR_1, int VAR_2, int16_t *VAR_3, int16_t **VAR_4, int VAR_5, uint8_t *VAR_6, uint8_t *VAR_7, uint8_t *VAR_8, int VAR_9, int VAR_10) { const vector signed int VAR_11 = {(1 << 18), (1 << 18), (1 << 18), (1 << 18)}; register int VAR_12, VAR_13; { int __att...
[ "FUNC_0(int16_t *VAR_0, int16_t **VAR_1, int VAR_2,\nint16_t *VAR_3, int16_t **VAR_4, int VAR_5,\nuint8_t *VAR_6, uint8_t *VAR_7, uint8_t *VAR_8, int VAR_9, int VAR_10)\n{", "const vector signed int VAR_11 = {(1 << 18), (1 << 18), (1 << 18), (1 << 18)};", "register int VAR_12, VAR_13;", "{", "int __attribut...
[ 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1...
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ], [ 51 ...
13,670
static void m5206_mbar_writeb(void *opaque, target_phys_addr_t offset, uint32_t value) { m5206_mbar_state *s = (m5206_mbar_state *)opaque; int width; offset &= 0x3ff; if (offset > 0x200) { hw_error("Bad MBAR write offset 0x%x", (int)offset); } width...
true
qemu
a32354e206895400d17c3de9a8df1de96d3df289
static void m5206_mbar_writeb(void *opaque, target_phys_addr_t offset, uint32_t value) { m5206_mbar_state *s = (m5206_mbar_state *)opaque; int width; offset &= 0x3ff; if (offset > 0x200) { hw_error("Bad MBAR write offset 0x%x", (int)offset); } width...
{ "code": [ " if (offset > 0x200) {", " if (offset > 0x200) {", " if (offset > 0x200) {", " if (offset > 0x200) {", " if (offset > 0x200) {", " if (offset > 0x200) {" ], "line_no": [ 13, 13, 13, 13, 13, 13 ] }
static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2) { m5206_mbar_state *s = (m5206_mbar_state *)VAR_0; int VAR_3; VAR_1 &= 0x3ff; if (VAR_1 > 0x200) { hw_error("Bad MBAR write VAR_1 0x%x", (int)VAR_1); } VAR_3 = m5206_mbar_widt...
[ "static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint32_t VAR_2)\n{", "m5206_mbar_state *s = (m5206_mbar_state *)VAR_0;", "int VAR_3;", "VAR_1 &= 0x3ff;", "if (VAR_1 > 0x200) {", "hw_error(\"Bad MBAR write VAR_1 0x%x\", (int)VAR_1);", "}", "VAR_3 = m5206_mbar_width[VAR_1 >> 2];", "if (VAR...
[ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [...
13,671
static bool is_zero_sectors(BlockDriverState *bs, int64_t start, uint32_t count) { int nr; BlockDriverState *file; int64_t res; if (!count) { return true; res = bdrv_get_block_status_above(bs, NULL, start, count, &nr, &file); ...
true
qemu
fbaa6bb3d3b4be71b7e234e908cb3c6bd280a222
static bool is_zero_sectors(BlockDriverState *bs, int64_t start, uint32_t count) { int nr; BlockDriverState *file; int64_t res; if (!count) { return true; res = bdrv_get_block_status_above(bs, NULL, start, count, &nr, &file); ...
{ "code": [], "line_no": [] }
static bool FUNC_0(BlockDriverState *bs, int64_t start, uint32_t count) { int VAR_0; BlockDriverState *file; int64_t res; if (!count) { return true; res = bdrv_get_block_status_above(bs, NULL, start, count, &VAR_0, &file); ...
[ "static bool FUNC_0(BlockDriverState *bs, int64_t start,\nuint32_t count)\n{", "int VAR_0;", "BlockDriverState *file;", "int64_t res;", "if (!count) {", "return true;", "res = bdrv_get_block_status_above(bs, NULL, start, count,\n&VAR_0, &file);", "return res >= 0 && (res & BDRV_BLOCK_ZERO) && VAR_0 ==...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 2, 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9, 10 ], [ 11 ] ]
13,674
static void mxf_write_multi_descriptor(AVFormatContext *s) { MXFContext *mxf = s->priv_data; AVIOContext *pb = s->pb; const uint8_t *ul; int i; mxf_write_metadata_key(pb, 0x014400); PRINT_KEY(s, "multiple descriptor key", pb->buf_ptr - 16); klv_encode_ber_length(pb, 64 + 16 * s->nb...
true
FFmpeg
e3ba817b95bbdc7c8aaf83b4a6804d1b49eb4de4
static void mxf_write_multi_descriptor(AVFormatContext *s) { MXFContext *mxf = s->priv_data; AVIOContext *pb = s->pb; const uint8_t *ul; int i; mxf_write_metadata_key(pb, 0x014400); PRINT_KEY(s, "multiple descriptor key", pb->buf_ptr - 16); klv_encode_ber_length(pb, 64 + 16 * s->nb...
{ "code": [ " klv_encode_ber_length(pb, 64 + 16 * s->nb_streams);" ], "line_no": [ 19 ] }
static void FUNC_0(AVFormatContext *VAR_0) { MXFContext *mxf = VAR_0->priv_data; AVIOContext *pb = VAR_0->pb; const uint8_t *VAR_1; int VAR_2; mxf_write_metadata_key(pb, 0x014400); PRINT_KEY(VAR_0, "multiple descriptor key", pb->buf_ptr - 16); klv_encode_ber_length(pb, 64 + 16 * VA...
[ "static void FUNC_0(AVFormatContext *VAR_0)\n{", "MXFContext *mxf = VAR_0->priv_data;", "AVIOContext *pb = VAR_0->pb;", "const uint8_t *VAR_1;", "int VAR_2;", "mxf_write_metadata_key(pb, 0x014400);", "PRINT_KEY(VAR_0, \"multiple descriptor key\", pb->buf_ptr - 16);", "klv_encode_ber_length(pb, 64 + 16...
[ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ], [ 33 ], [ 35 ], [ 37 ], [ 43 ], [ 45, 47 ], [ 49 ], [ 51 ], [ 53 ], [...
13,675
BlockDeviceInfo *bdrv_block_device_info(BlockDriverState *bs) { BlockDeviceInfo *info = g_malloc0(sizeof(*info)); info->file = g_strdup(bs->filename); info->ro = bs->read_only; info->drv = g_strdup(bs->drv->format_name); info->encrypte...
true
qemu
d5a8ee60a0fbc20a2c2d02f3bda1bb1bd365f1ee
BlockDeviceInfo *bdrv_block_device_info(BlockDriverState *bs) { BlockDeviceInfo *info = g_malloc0(sizeof(*info)); info->file = g_strdup(bs->filename); info->ro = bs->read_only; info->drv = g_strdup(bs->drv->format_name); info->encrypte...
{ "code": [ "BlockDeviceInfo *bdrv_block_device_info(BlockDriverState *bs)" ], "line_no": [ 1 ] }
BlockDeviceInfo *FUNC_0(BlockDriverState *bs) { BlockDeviceInfo *info = g_malloc0(sizeof(*info)); info->file = g_strdup(bs->filename); info->ro = bs->read_only; info->drv = g_strdup(bs->drv->format_name); info->encrypted =...
[ "BlockDeviceInfo *FUNC_0(BlockDriverState *bs)\n{", "BlockDeviceInfo *info = g_malloc0(sizeof(*info));", "info->file = g_strdup(bs->filename);", "info->ro = bs->read_only;", "info->drv = g_strdup(bs->drv->format_name);", "info->encrypted ...
[ 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 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25, 27, 29, 31 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], ...
13,676
void gtk_display_init(DisplayState *ds, bool full_screen, bool grab_on_hover) { GtkDisplayState *s = g_malloc0(sizeof(*s)); char *filename; gtk_init(NULL, NULL); s->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); #if GTK_CHECK_VERSION(3, 2, 0) s->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,...
true
qemu
b310a2a6095ec927a42cc1aba520a316be0faf51
void gtk_display_init(DisplayState *ds, bool full_screen, bool grab_on_hover) { GtkDisplayState *s = g_malloc0(sizeof(*s)); char *filename; gtk_init(NULL, NULL); s->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); #if GTK_CHECK_VERSION(3, 2, 0) s->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,...
{ "code": [ " int i;", " for (i = 0; i < s->nb_vcs; i++) {", " VirtualConsole *vc = &s->vc[i];", " if (vc && vc->type == GD_VC_VTE && vc != cur) {", " gtk_widget_hide(vc->vte.terminal);", " gd_update_windowsize(cur);" ], "line_no": ...
void FUNC_0(DisplayState *VAR_0, bool VAR_1, bool VAR_2) { GtkDisplayState *s = g_malloc0(sizeof(*s)); char *VAR_3; gtk_init(NULL, NULL); s->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); #if GTK_CHECK_VERSION(3, 2, 0) s->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); #else s->vbox...
[ "void FUNC_0(DisplayState *VAR_0, bool VAR_1, bool VAR_2)\n{", "GtkDisplayState *s = g_malloc0(sizeof(*s));", "char *VAR_3;", "gtk_init(NULL, NULL);", "s->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);", "#if GTK_CHECK_VERSION(3, 2, 0)\ns->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);", "#else\ns->vbo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 15 ], [ 17, 19 ], [ 21, 23 ], [ 25, 27 ], [ 29 ], [ 33 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 49 ], [ 51 ], [ 53 ], [ 57 ], ...
13,677
static int analyze(const uint8_t *buf, int size, int packet_size, int probe) { int stat[TS_MAX_PACKET_SIZE]; int stat_all = 0; int i; int best_score = 0; memset(stat, 0, packet_size * sizeof(*stat)); for (i = 0; i < size - 3; i++) { if (buf[i] == 0x47 && ...
false
FFmpeg
e01b19deceaafa2b7a9d59717484d8831b00cd71
static int analyze(const uint8_t *buf, int size, int packet_size, int probe) { int stat[TS_MAX_PACKET_SIZE]; int stat_all = 0; int i; int best_score = 0; memset(stat, 0, packet_size * sizeof(*stat)); for (i = 0; i < size - 3; i++) { if (buf[i] == 0x47 && ...
{ "code": [], "line_no": [] }
static int FUNC_0(const uint8_t *VAR_0, int VAR_1, int VAR_2, int VAR_3) { int VAR_4[TS_MAX_PACKET_SIZE]; int VAR_5 = 0; int VAR_6; int VAR_7 = 0; memset(VAR_4, 0, VAR_2 * sizeof(*VAR_4)); for (VAR_6 = 0; VAR_6 < VAR_1 - 3; VAR_6++) { if (VAR_0[VAR_6] == 0...
[ "static int FUNC_0(const uint8_t *VAR_0, int VAR_1, int VAR_2,\nint VAR_3)\n{", "int VAR_4[TS_MAX_PACKET_SIZE];", "int VAR_5 = 0;", "int VAR_6;", "int VAR_7 = 0;", "memset(VAR_4, 0, VAR_2 * sizeof(*VAR_4));", "for (VAR_6 = 0; VAR_6 < VAR_1 - 3; VAR_6++) {", "if (VAR_0[VAR_6] == 0x47 &&\n(!VAR_3 || (VA...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 21 ], [ 23, 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ] ]
13,679
static void get_tree_codes(uint32_t *bits, int16_t *lens, uint8_t *xlat, Node *nodes, int node, uint32_t pfx, int pl, int *pos) { int s; s = nodes[node].sym; if (s != -1) { bits[*pos] = (~pfx) & ((1U << FFMAX(pl, 1)) - 1); lens[...
true
FFmpeg
03a9e6ff303ad82e75b734edbe4917ca5fd60159
static void get_tree_codes(uint32_t *bits, int16_t *lens, uint8_t *xlat, Node *nodes, int node, uint32_t pfx, int pl, int *pos) { int s; s = nodes[node].sym; if (s != -1) { bits[*pos] = (~pfx) & ((1U << FFMAX(pl, 1)) - 1); lens[...
{ "code": [ " bits[*pos] = (~pfx) & ((1U << FFMAX(pl, 1)) - 1);" ], "line_no": [ 17 ] }
static void FUNC_0(uint32_t *VAR_0, int16_t *VAR_1, uint8_t *VAR_2, Node *VAR_3, int VAR_4, uint32_t VAR_5, int VAR_6, int *VAR_7) { int VAR_8; VAR_8 = VAR_3[VAR_4].sym; if (VAR_8 != -1) { VAR_0[*VAR_7] = (~VAR_5) & ((1U << FFMAX(VAR_6, ...
[ "static void FUNC_0(uint32_t *VAR_0, int16_t *VAR_1, uint8_t *VAR_2,\nNode *VAR_3, int VAR_4,\nuint32_t VAR_5, int VAR_6, int *VAR_7)\n{", "int VAR_8;", "VAR_8 = VAR_3[VAR_4].sym;", "if (VAR_8 != -1) {", "VAR_0[*VAR_7] = (~VAR_5) & ((1U << FFMAX(VAR_6, 1)) - 1);", "VAR_1[*VAR_7] = FFMAX(VAR_6, 1);", "VA...
[ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31, 33 ], [ 35 ], [ 37, 39 ], [ 41 ], [ 43 ] ]
13,680
static int nprobe(AVFormatContext *s, uint8_t *enc_header, unsigned size, const uint8_t *n_val) { OMAContext *oc = s->priv_data; uint64_t pos; uint32_t taglen, datalen; struct AVDES av_des; if (!enc_header || !n_val || size < OMA_ENC_HEADER_SIZE + oc->k_size + 4) ...
false
FFmpeg
fb45de779c8db142b44bf7b00c535ea2eee4f148
static int nprobe(AVFormatContext *s, uint8_t *enc_header, unsigned size, const uint8_t *n_val) { OMAContext *oc = s->priv_data; uint64_t pos; uint32_t taglen, datalen; struct AVDES av_des; if (!enc_header || !n_val || size < OMA_ENC_HEADER_SIZE + oc->k_size + 4) ...
{ "code": [], "line_no": [] }
static int FUNC_0(AVFormatContext *VAR_0, uint8_t *VAR_1, unsigned VAR_2, const uint8_t *VAR_3) { OMAContext *oc = VAR_0->priv_data; uint64_t pos; uint32_t taglen, datalen; struct AVDES VAR_4; if (!VAR_1 || !VAR_3 || VAR_2 < OMA_ENC_HEADER_SIZE + oc->k_size + 4) ...
[ "static int FUNC_0(AVFormatContext *VAR_0, uint8_t *VAR_1, unsigned VAR_2,\nconst uint8_t *VAR_3)\n{", "OMAContext *oc = VAR_0->priv_data;", "uint64_t pos;", "uint32_t taglen, datalen;", "struct AVDES VAR_4;", "if (!VAR_1 || !VAR_3 ||\nVAR_2 < OMA_ENC_HEADER_SIZE + oc->k_size + 4)\nreturn -1;", "pos = O...
[ 0, 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 ], [ 25 ], [ 27, 29 ], [ 33, 35 ], [ 39, 41 ], [ 45 ], [ 47 ], [ 51 ], [ 53, 55 ], [ 59 ], [ 63, 65 ...
13,681
static void fill_block(uint16_t *pdest, uint16_t color, int block_size, int pitch) { int x, y; pitch -= block_size; for (y = 0; y != block_size; y++, pdest += pitch) for (x = 0; x != block_size; x++) *pdest++ = color; }
false
FFmpeg
3b9dd906d18f4cd801ceedd20d800a7e53074be9
static void fill_block(uint16_t *pdest, uint16_t color, int block_size, int pitch) { int x, y; pitch -= block_size; for (y = 0; y != block_size; y++, pdest += pitch) for (x = 0; x != block_size; x++) *pdest++ = color; }
{ "code": [], "line_no": [] }
static void FUNC_0(uint16_t *VAR_0, uint16_t VAR_1, int VAR_2, int VAR_3) { int VAR_4, VAR_5; VAR_3 -= VAR_2; for (VAR_5 = 0; VAR_5 != VAR_2; VAR_5++, VAR_0 += VAR_3) for (VAR_4 = 0; VAR_4 != VAR_2; VAR_4++) *VAR_0++ = VAR_1; }
[ "static void FUNC_0(uint16_t *VAR_0, uint16_t VAR_1, int VAR_2, int VAR_3)\n{", "int VAR_4, VAR_5;", "VAR_3 -= VAR_2;", "for (VAR_5 = 0; VAR_5 != VAR_2; VAR_5++, VAR_0 += VAR_3)", "for (VAR_4 = 0; VAR_4 != VAR_2; VAR_4++)", "*VAR_0++ = VAR_1;", "}" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ] ]
13,682
static void ini_print_section_header(WriterContext *wctx) { INIContext *ini = wctx->priv; AVBPrint buf; int i; const struct section *section = wctx->section[wctx->level]; const struct section *parent_section = wctx->level ? wctx->section[wctx->level-1] : NULL; av_bprint_init(&b...
false
FFmpeg
74bd0cf49c9c0bee8d4f3d3a98a7343c2ff5b94c
static void ini_print_section_header(WriterContext *wctx) { INIContext *ini = wctx->priv; AVBPrint buf; int i; const struct section *section = wctx->section[wctx->level]; const struct section *parent_section = wctx->level ? wctx->section[wctx->level-1] : NULL; av_bprint_init(&b...
{ "code": [], "line_no": [] }
static void FUNC_0(WriterContext *VAR_0) { INIContext *ini = VAR_0->priv; AVBPrint buf; int VAR_1; const struct VAR_2 *VAR_2 = VAR_0->VAR_2[VAR_0->level]; const struct VAR_2 *VAR_3 = VAR_0->level ? VAR_0->VAR_2[VAR_0->level-1] : NULL; av_bprint_init(&buf, 1, AV_BPRINT_SIZE_UNLI...
[ "static void FUNC_0(WriterContext *VAR_0)\n{", "INIContext *ini = VAR_0->priv;", "AVBPrint buf;", "int VAR_1;", "const struct VAR_2 *VAR_2 = VAR_0->VAR_2[VAR_0->level];", "const struct VAR_2 *VAR_3 = VAR_0->level ?\nVAR_0->VAR_2[VAR_0->level-1] : NULL;", "av_bprint_init(&buf, 1, AV_BPRINT_SIZE_UNLIMITED...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13, 15 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 31, 33 ], [ 37 ], [ 39, 41, 43 ], [ 45 ], [ 49 ], [ 51, 53 ], [...
13,684
static int vtd_interrupt_remap_msi(IntelIOMMUState *iommu, MSIMessage *origin, MSIMessage *translated) { int ret = 0; VTD_IR_MSIAddress addr; uint16_t index; VTDIrq irq = {0}; assert(origin && translated); if (!io...
true
qemu
09cd058a2cf77bb7a3b10ff93c1f80ed88bca364
static int vtd_interrupt_remap_msi(IntelIOMMUState *iommu, MSIMessage *origin, MSIMessage *translated) { int ret = 0; VTD_IR_MSIAddress addr; uint16_t index; VTDIrq irq = {0}; assert(origin && translated); if (!io...
{ "code": [ " VTDIrq irq = {0};" ], "line_no": [ 15 ] }
static int FUNC_0(IntelIOMMUState *VAR_0, MSIMessage *VAR_1, MSIMessage *VAR_2) { int VAR_3 = 0; VTD_IR_MSIAddress addr; uint16_t index; VTDIrq irq = {0}; assert(VAR_1 && VAR_2); if (!VAR_0 || !VAR_0->intr_enabled...
[ "static int FUNC_0(IntelIOMMUState *VAR_0,\nMSIMessage *VAR_1,\nMSIMessage *VAR_2)\n{", "int VAR_3 = 0;", "VTD_IR_MSIAddress addr;", "uint16_t index;", "VTDIrq irq = {0};", "assert(VAR_1 && VAR_2);", "if (!VAR_0 || !VAR_0->intr_enabled) {", "goto do_not_translate;", "}", "if (VAR_1->address & VTD_...
[ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 33, 35, 37, 39 ], [ 41 ], [ 43 ], [ 47 ], [ 49 ], [ 51, 53 ], [ 55 ...
13,685
static int decode_mb_cabac(H264Context *h) { MpegEncContext * const s = &h->s; const int mb_xy= s->mb_x + s->mb_y*s->mb_stride; int mb_type, partition_count, cbp = 0; int dct8x8_allowed= h->pps.transform_8x8_mode; s->dsp.clear_blocks(h->mb); //FIXME avoid if already clear (move after skip han...
true
FFmpeg
042ef4b720f5d3321d9b7eeeb2067c671d5aeefd
static int decode_mb_cabac(H264Context *h) { MpegEncContext * const s = &h->s; const int mb_xy= s->mb_x + s->mb_y*s->mb_stride; int mb_type, partition_count, cbp = 0; int dct8x8_allowed= h->pps.transform_8x8_mode; s->dsp.clear_blocks(h->mb); tprintf(s->avctx, "pic:%d mb:%d/%d\n", h->f...
{ "code": [ " h->chroma_qp = get_chroma_qp(h->pps.chroma_qp_index_offset, 0);", " h->chroma_qp = get_chroma_qp(h->pps.chroma_qp_index_offset, 0);", " h->chroma_qp = get_chroma_qp(h->pps.chroma_qp_index_offset, s->qscale);" ], "line_no": [ 253, 253, 805 ] }
static int FUNC_0(H264Context *VAR_0) { MpegEncContext * const s = &VAR_0->s; const int VAR_1= s->mb_x + s->mb_y*s->mb_stride; int VAR_2, VAR_3, VAR_4 = 0; int VAR_5= VAR_0->pps.transform_8x8_mode; s->dsp.clear_blocks(VAR_0->mb); tprintf(s->avctx, "pic:%d mb:%d/%d\n", VAR_0->frame_num...
[ "static int FUNC_0(H264Context *VAR_0) {", "MpegEncContext * const s = &VAR_0->s;", "const int VAR_1= s->mb_x + s->mb_y*s->mb_stride;", "int VAR_2, VAR_3, VAR_4 = 0;", "int VAR_5= VAR_0->pps.transform_8x8_mode;", "s->dsp.clear_blocks(VAR_0->mb);", "tprintf(s->avctx, \"pic:%d mb:%d/%d\\n\", VAR_0->frame_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1 ], [ 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 25, 27 ], [ 29, 31 ], [ 33, 35 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47, 49 ], [ 51, 53 ...
13,686
static int mjpegb_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MJpegDecodeContext *s = avctx->priv_data; const uint8_t *buf_end, *buf_ptr...
false
FFmpeg
74699ac8c8b562e9f8d26e21482b89585365774a
static int mjpegb_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MJpegDecodeContext *s = avctx->priv_data; const uint8_t *buf_end, *buf_ptr...
{ "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; MJpegDecodeContext *s = VAR_0->priv_data; const uint8_t *VAR_6, *buf_ptr; AVFrame *pi...
[ "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;", "MJpegDecodeContext *s = VAR_0->priv_data;", "const uint8_t *VAR_6, *buf_ptr;", "AVFrame *picture = VAR_1;", "GetBitContext hgb;", "uint32_t dq...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 27 ], [ 29 ], [ 33, 37 ], [ 39 ], [ 41 ], [ 45, 47 ], [ 51 ], [ 55 ], [ 59,...
13,687
static void test_ivshmem_single(void) { IVState state, *s; uint32_t data[1024]; int i; setup_vm(&state); s = &state; /* valid io */ out_reg(s, INTRMASK, 0); in_reg(s, INTRSTATUS); in_reg(s, IVPOSITION); out_reg(s, INTRMASK, 0xffffffff); g_assert_cmpuint(in_r...
true
qemu
1760048a5d21bacf0e4838da2f61b2d8db7d2866
static void test_ivshmem_single(void) { IVState state, *s; uint32_t data[1024]; int i; setup_vm(&state); s = &state; out_reg(s, INTRMASK, 0); in_reg(s, INTRSTATUS); in_reg(s, IVPOSITION); out_reg(s, INTRMASK, 0xffffffff); g_assert_cmpuint(in_reg(s, INTRMASK...
{ "code": [ " qtest_quit(s->qtest);" ], "line_no": [ 81 ] }
static void FUNC_0(void) { IVState state, *s; uint32_t data[1024]; int VAR_0; setup_vm(&state); s = &state; out_reg(s, INTRMASK, 0); in_reg(s, INTRSTATUS); in_reg(s, IVPOSITION); out_reg(s, INTRMASK, 0xffffffff); g_assert_cmpuint(in_reg(s, INTRMASK), ==, 0x...
[ "static void FUNC_0(void)\n{", "IVState state, *s;", "uint32_t data[1024];", "int VAR_0;", "setup_vm(&state);", "s = &state;", "out_reg(s, INTRMASK, 0);", "in_reg(s, INTRSTATUS);", "in_reg(s, IVPOSITION);", "out_reg(s, INTRMASK, 0xffffffff);", "g_assert_cmpuint(in_reg(s, INTRMASK), ==, 0xfffffff...
[ 0, 0, 0, 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, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15 ], [ 21 ], [ 23 ], [ 25 ], [ 29 ], [ 31 ], [ 33 ], [ 37 ], [ 43 ], [ 45 ], [ 49 ], [ 51 ], [ 53 ], [ 55 ], [ 59 ...
13,688
static int mov_read_stsz(MOVContext *c, ByteIOContext *pb, MOVAtom atom) { AVStream *st; MOVStreamContext *sc; unsigned int i, entries, sample_size, field_size, num_bytes; GetBitContext gb; unsigned char* buf; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc-...
true
FFmpeg
e4bc8af1e687efb2a2c41a469ac7b31f1c3d48cd
static int mov_read_stsz(MOVContext *c, ByteIOContext *pb, MOVAtom atom) { AVStream *st; MOVStreamContext *sc; unsigned int i, entries, sample_size, field_size, num_bytes; GetBitContext gb; unsigned char* buf; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc-...
{ "code": [ " if(entries >= UINT_MAX / sizeof(int))" ], "line_no": [ 79 ] }
static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2) { AVStream *st; MOVStreamContext *sc; unsigned int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7; GetBitContext gb; unsigned char* VAR_8; if (VAR_0->fc->nb_streams < 1) return 0; st = VAR_0->fc->streams[VAR_0->f...
[ "static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2)\n{", "AVStream *st;", "MOVStreamContext *sc;", "unsigned int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;", "GetBitContext gb;", "unsigned char* VAR_8;", "if (VAR_0->fc->nb_streams < 1)\nreturn 0;", "st = VAR_0->fc->streams[VAR_0->fc->nb...
[ 0, 0, 0, 0, 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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17, 19 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37, 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ...
13,689
static void init_band_stepsize(AVCodecContext *avctx, Jpeg2000Band *band, Jpeg2000CodingStyle *codsty, Jpeg2000QuantStyle *qntsty, int bandno, int gbandno, int reslevelno, ...
true
FFmpeg
42868ca569f33b91b0e61ecc3065e7199e9ca58a
static void init_band_stepsize(AVCodecContext *avctx, Jpeg2000Band *band, Jpeg2000CodingStyle *codsty, Jpeg2000QuantStyle *qntsty, int bandno, int gbandno, int reslevelno, ...
{ "code": [ " band->f_stepsize = pow(2.0, gain - qntsty->expn[gbandno]);" ], "line_no": [ 59 ] }
static void FUNC_0(AVCodecContext *VAR_0, Jpeg2000Band *VAR_1, Jpeg2000CodingStyle *VAR_2, Jpeg2000QuantStyle *VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7...
[ "static void FUNC_0(AVCodecContext *VAR_0,\nJpeg2000Band *VAR_1,\nJpeg2000CodingStyle *VAR_2,\nJpeg2000QuantStyle *VAR_3,\nint VAR_4, int VAR_5, int VAR_6,\nint VAR_7)\n{", "switch (VAR_3->quantsty) {", "uint8_t gain;", "case JPEG2000_QSTY_NONE:\nVAR_1->f_stepsize = 1;", "break;", "case JPEG2000_QSTY_SI:\...
[ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7, 9, 11, 13 ], [ 19 ], [ 21 ], [ 23, 27 ], [ 29 ], [ 31, 45, 57 ], [ 59 ], [ 61 ], [ 63 ], [ 65, 67 ], [ 69 ], [ 71 ], [ 73 ], [ 75 ], [ 77 ], [...
13,690
static int teletext_init_decoder(AVCodecContext *avctx) { TeletextContext *ctx = avctx->priv_data; unsigned int maj, min, rev; vbi_version(&maj, &min, &rev); if (!(maj > 0 || min > 2 || min == 2 && rev >= 26)) { av_log(avctx, AV_LOG_ERROR, "decoder needs zvbi version >= 0.2.26.\n"); ...
true
FFmpeg
085ca7dcdbf9ab6c23e3a5397b1f6d4aa23f763d
static int teletext_init_decoder(AVCodecContext *avctx) { TeletextContext *ctx = avctx->priv_data; unsigned int maj, min, rev; vbi_version(&maj, &min, &rev); if (!(maj > 0 || min > 2 || min == 2 && rev >= 26)) { av_log(avctx, AV_LOG_ERROR, "decoder needs zvbi version >= 0.2.26.\n"); ...
{ "code": [ " ctx->dx = NULL;", " ctx->dx = NULL;" ], "line_no": [ 33, 33 ] }
static int FUNC_0(AVCodecContext *VAR_0) { TeletextContext *ctx = VAR_0->priv_data; unsigned int VAR_1, VAR_2, VAR_3; vbi_version(&VAR_1, &VAR_2, &VAR_3); if (!(VAR_1 > 0 || VAR_2 > 2 || VAR_2 == 2 && VAR_3 >= 26)) { av_log(VAR_0, AV_LOG_ERROR, "decoder needs zvbi version >= 0.2.26.\n");...
[ "static int FUNC_0(AVCodecContext *VAR_0)\n{", "TeletextContext *ctx = VAR_0->priv_data;", "unsigned int VAR_1, VAR_2, VAR_3;", "vbi_version(&VAR_1, &VAR_2, &VAR_3);", "if (!(VAR_1 > 0 || VAR_2 > 2 || VAR_2 == 2 && VAR_3 >= 26)) {", "av_log(VAR_0, AV_LOG_ERROR, \"decoder needs zvbi version >= 0.2.26.\\n\"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 41, 43 ], [ 45 ], [ 47 ], [ 49 ], ...
13,691
static void block_job_ref(BlockJob *job) { ++job->refcnt; }
true
qemu
4172a00373b2c81374293becc02b16b7f8c76659
static void block_job_ref(BlockJob *job) { ++job->refcnt; }
{ "code": [ "static void block_job_ref(BlockJob *job)" ], "line_no": [ 1 ] }
static void FUNC_0(BlockJob *VAR_0) { ++VAR_0->refcnt; }
[ "static void FUNC_0(BlockJob *VAR_0)\n{", "++VAR_0->refcnt;", "}" ]
[ 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ] ]
13,692
static void empty_input(void) { const char *empty = ""; QObject *obj = qobject_from_json(empty, NULL); g_assert(obj == NULL); }
true
qemu
aec4b054ea36c53c8b887da99f20010133b84378
static void empty_input(void) { const char *empty = ""; QObject *obj = qobject_from_json(empty, NULL); g_assert(obj == NULL); }
{ "code": [ " QObject *obj = qobject_from_json(empty, NULL);" ], "line_no": [ 9 ] }
static void FUNC_0(void) { const char *VAR_0 = ""; QObject *obj = qobject_from_json(VAR_0, NULL); g_assert(obj == NULL); }
[ "static void FUNC_0(void)\n{", "const char *VAR_0 = \"\";", "QObject *obj = qobject_from_json(VAR_0, NULL);", "g_assert(obj == NULL);", "}" ]
[ 0, 0, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ] ]
13,693
static FlatRange *address_space_lookup(AddressSpace *as, AddrRange addr) { return bsearch(&addr, as->current_map.ranges, as->current_map.nr, sizeof(FlatRange), cmp_flatrange_addr); }
true
qemu
8786db7cb96f8ce5c75c6e1e074319c9dca8d356
static FlatRange *address_space_lookup(AddressSpace *as, AddrRange addr) { return bsearch(&addr, as->current_map.ranges, as->current_map.nr, sizeof(FlatRange), cmp_flatrange_addr); }
{ "code": [ " return bsearch(&addr, as->current_map.ranges, as->current_map.nr," ], "line_no": [ 5 ] }
static FlatRange *FUNC_0(AddressSpace *as, AddrRange addr) { return bsearch(&addr, as->current_map.ranges, as->current_map.nr, sizeof(FlatRange), cmp_flatrange_addr); }
[ "static FlatRange *FUNC_0(AddressSpace *as, AddrRange addr)\n{", "return bsearch(&addr, as->current_map.ranges, as->current_map.nr,\nsizeof(FlatRange), cmp_flatrange_addr);", "}" ]
[ 0, 1, 0 ]
[ [ 1, 3 ], [ 5, 7 ], [ 9 ] ]
13,694
void ff_get_guid(AVIOContext *s, ff_asf_guid *g) { assert(sizeof(*g) == 16); avio_read(s, *g, sizeof(*g)); }
true
FFmpeg
ea3abcd58f83673bf2fe28170339f19ddf683442
void ff_get_guid(AVIOContext *s, ff_asf_guid *g) { assert(sizeof(*g) == 16); avio_read(s, *g, sizeof(*g)); }
{ "code": [ " avio_read(s, *g, sizeof(*g));" ], "line_no": [ 7 ] }
void FUNC_0(AVIOContext *VAR_0, ff_asf_guid *VAR_1) { assert(sizeof(*VAR_1) == 16); avio_read(VAR_0, *VAR_1, sizeof(*VAR_1)); }
[ "void FUNC_0(AVIOContext *VAR_0, ff_asf_guid *VAR_1)\n{", "assert(sizeof(*VAR_1) == 16);", "avio_read(VAR_0, *VAR_1, sizeof(*VAR_1));", "}" ]
[ 0, 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ] ]
13,695
static int realloc_refcount_array(BDRVQcowState *s, uint16_t **array, int64_t *size, int64_t new_size) { size_t old_byte_size, new_byte_size; uint16_t *new_ptr; /* Round to clusters so the array can be directly written to disk */ old_byte_size = size_to_clusters...
true
qemu
7453c96b78c2b09aa72924f933bb9616e5474194
static int realloc_refcount_array(BDRVQcowState *s, uint16_t **array, int64_t *size, int64_t new_size) { size_t old_byte_size, new_byte_size; uint16_t *new_ptr; old_byte_size = size_to_clusters(s, refcount_array_byte_size(s, *size)) * s->cl...
{ "code": [ "static int realloc_refcount_array(BDRVQcowState *s, uint16_t **array,", " uint16_t *new_ptr;" ], "line_no": [ 1, 9 ] }
static int FUNC_0(BDRVQcowState *VAR_0, uint16_t **VAR_1, int64_t *VAR_2, int64_t VAR_3) { size_t old_byte_size, new_byte_size; uint16_t *new_ptr; old_byte_size = size_to_clusters(VAR_0, refcount_array_byte_size(VAR_0, *VAR_2)) * VAR_0->clu...
[ "static int FUNC_0(BDRVQcowState *VAR_0, uint16_t **VAR_1,\nint64_t *VAR_2, int64_t VAR_3)\n{", "size_t old_byte_size, new_byte_size;", "uint16_t *new_ptr;", "old_byte_size = size_to_clusters(VAR_0, refcount_array_byte_size(VAR_0, *VAR_2))\n* VAR_0->cluster_size;", "new_byte_size = size_to_clusters(VAR_0, r...
[ 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 15, 17 ], [ 19, 21 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 35 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 49 ], [ 51, 53 ], [ 55 ], [ 59 ...
13,696
static void imdct36(int *out, int *buf, int *in, int *win) { int i, j, t0, t1, t2, t3, s0, s1, s2, s3; int tmp[18], *tmp1, *in1; for(i=17;i>=1;i--) in[i] += in[i-1]; for(i=17;i>=3;i-=2) in[i] += in[i-2]; for(j=0;j<2;j++) { tmp1 = tmp + j; in1 = in + j; ...
true
FFmpeg
44f1698a3824836d32708ae93e78ac1f2310a07e
static void imdct36(int *out, int *buf, int *in, int *win) { int i, j, t0, t1, t2, t3, s0, s1, s2, s3; int tmp[18], *tmp1, *in1; for(i=17;i>=1;i--) in[i] += in[i-1]; for(i=17;i>=3;i-=2) in[i] += in[i-2]; for(j=0;j<2;j++) { tmp1 = tmp + j; in1 = in + j; ...
{ "code": [ " t0 = (s0 + s1) << 5;", " t1 = (s0 - s1) << 5;", " t0 = (s2 + s3) << 5;", " t1 = (s2 - s3) << 5;", " t0 = (s0 + s1) << 5;", " t1 = (s0 - s1) << 5;" ], "line_no": [ 165, 167, 179, 181, 201, 203 ] }
static void FUNC_0(int *VAR_0, int *VAR_1, int *VAR_2, int *VAR_3) { int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13; int VAR_14[18], *VAR_15, *VAR_16; for(VAR_4=17;VAR_4>=1;VAR_4--) VAR_2[VAR_4] += VAR_2[VAR_4-1]; for(VAR_4=17;VAR_4>=3;VAR_4-=2) VAR...
[ "static void FUNC_0(int *VAR_0, int *VAR_1, int *VAR_2, int *VAR_3)\n{", "int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13;", "int VAR_14[18], *VAR_15, *VAR_16;", "for(VAR_4=17;VAR_4>=1;VAR_4--)", "VAR_2[VAR_4] += VAR_2[VAR_4-1];", "for(VAR_4=17;VAR_4>=3;VAR_4-=2)", "VAR_2[VA...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27, 31 ], [ 33 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 47 ], [ 49 ], [ 51 ], ...
13,697
static void test_tco_second_timeout_none(void) { TestData td; const uint16_t ticks = TCO_SECS_TO_TICKS(256); QDict *ad; td.args = "-watchdog-action none"; td.noreboot = false; test_init(&td); stop_tco(&td); clear_tco_status(&td); reset_on_second_timeout(true); set_...
true
qemu
34779e8c3991f7fcd74b2045478abcef67dbeb15
static void test_tco_second_timeout_none(void) { TestData td; const uint16_t ticks = TCO_SECS_TO_TICKS(256); QDict *ad; td.args = "-watchdog-action none"; td.noreboot = false; test_init(&td); stop_tco(&td); clear_tco_status(&td); reset_on_second_timeout(true); set_...
{ "code": [ " qtest_end();", " qtest_end();", " qtest_end();", " qtest_end();", " qtest_end();", " qtest_end();", " qtest_end();", " qtest_end();", " qtest_end();", " qtest_end();", " qtest_end();" ], "line_no": [ 45, 45, 45,...
static void FUNC_0(void) { TestData td; const uint16_t VAR_0 = TCO_SECS_TO_TICKS(256); QDict *ad; td.args = "-watchdog-action none"; td.noreboot = false; test_init(&td); stop_tco(&td); clear_tco_status(&td); reset_on_second_timeout(true); set_tco_timeout(&td, VAR_0...
[ "static void FUNC_0(void)\n{", "TestData td;", "const uint16_t VAR_0 = TCO_SECS_TO_TICKS(256);", "QDict *ad;", "td.args = \"-watchdog-action none\";", "td.noreboot = false;", "test_init(&td);", "stop_tco(&td);", "clear_tco_status(&td);", "reset_on_second_timeout(true);", "set_tco_timeout(&td, VA...
[ 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 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 43 ], [ 45 ], [ 47 ...
13,698
static void pcx_palette(const uint8_t **src, uint32_t *dst, unsigned int pallen) { unsigned int i; for (i = 0; i < pallen; i++) *dst++ = bytestream_get_be24(src); if (pallen < 256) memset(dst, 0, (256 - pallen) * sizeof(*dst)); }
true
FFmpeg
09b23786b3986502ee88d4907356979127169bdd
static void pcx_palette(const uint8_t **src, uint32_t *dst, unsigned int pallen) { unsigned int i; for (i = 0; i < pallen; i++) *dst++ = bytestream_get_be24(src); if (pallen < 256) memset(dst, 0, (256 - pallen) * sizeof(*dst)); }
{ "code": [ "static void pcx_palette(const uint8_t **src, uint32_t *dst,", " *dst++ = bytestream_get_be24(src);" ], "line_no": [ 1, 13 ] }
static void FUNC_0(const uint8_t **VAR_0, uint32_t *VAR_1, unsigned int VAR_2) { unsigned int VAR_3; for (VAR_3 = 0; VAR_3 < VAR_2; VAR_3++) *VAR_1++ = bytestream_get_be24(VAR_0); if (VAR_2 < 256) memset(VAR_1, 0, (256 - VAR_2) * sizeof(*VAR_1)); }
[ "static void FUNC_0(const uint8_t **VAR_0, uint32_t *VAR_1,\nunsigned int VAR_2)\n{", "unsigned int VAR_3;", "for (VAR_3 = 0; VAR_3 < VAR_2; VAR_3++)", "*VAR_1++ = bytestream_get_be24(VAR_0);", "if (VAR_2 < 256)\nmemset(VAR_1, 0, (256 - VAR_2) * sizeof(*VAR_1));", "}" ]
[ 1, 0, 0, 1, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15, 17 ], [ 19 ] ]
13,699
int qemu_set_fd_handler2(int fd, IOCanReadHandler *fd_read_poll, IOHandler *fd_read, IOHandler *fd_write, void *opaque) { IOHandlerRecord *ioh; if (!fd_read && !fd_write) { QLIST_FOREACH(ioh, &io_handlers...
true
qemu
bbdd2ad0814ea0911076419ea21b7957505cf1cc
int qemu_set_fd_handler2(int fd, IOCanReadHandler *fd_read_poll, IOHandler *fd_read, IOHandler *fd_write, void *opaque) { IOHandlerRecord *ioh; if (!fd_read && !fd_write) { QLIST_FOREACH(ioh, &io_handlers...
{ "code": [], "line_no": [] }
int FUNC_0(int VAR_0, IOCanReadHandler *VAR_1, IOHandler *VAR_2, IOHandler *VAR_3, void *VAR_4) { IOHandlerRecord *ioh; if (!VAR_2 && !VAR_3) { QLIST_FOREACH(ioh, &io_handlers, next) { if (ioh...
[ "int FUNC_0(int VAR_0,\nIOCanReadHandler *VAR_1,\nIOHandler *VAR_2,\nIOHandler *VAR_3,\nvoid *VAR_4)\n{", "IOHandlerRecord *ioh;", "if (!VAR_2 && !VAR_3) {", "QLIST_FOREACH(ioh, &io_handlers, next) {", "if (ioh->VAR_0 == VAR_0) {", "ioh->deleted = 1;", "break;", "}", "}", "} else {", "QLIST_FORE...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 2, 3, 4, 5, 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ], [ 11 ], [ 12 ], [ 13 ], [ 14 ], [ 15 ], [ 16 ], [ 17, 18 ], [ 19 ], [ 20 ], [ 21 ], [ 22, 23 ], [ 24 ],...
13,700
static int bdrv_prwv_co(BdrvChild *child, int64_t offset, QEMUIOVector *qiov, bool is_write, BdrvRequestFlags flags) { Coroutine *co; RwCo rwco = { .child = child, .offset = offset, .qiov = qiov, .is_write = is_write, ...
true
qemu
0b8b8753e4d94901627b3e86431230f2319215c4
static int bdrv_prwv_co(BdrvChild *child, int64_t offset, QEMUIOVector *qiov, bool is_write, BdrvRequestFlags flags) { Coroutine *co; RwCo rwco = { .child = child, .offset = offset, .qiov = qiov, .is_write = is_write, ...
{ "code": [ " co = qemu_coroutine_create(bdrv_rw_co_entry);", " qemu_coroutine_enter(co, &rwco);", " qemu_coroutine_enter(co, &rwco);" ], "line_no": [ 41, 43, 43 ] }
static int FUNC_0(BdrvChild *VAR_0, int64_t VAR_1, QEMUIOVector *VAR_2, bool VAR_3, BdrvRequestFlags VAR_4) { Coroutine *co; RwCo rwco = { .VAR_0 = VAR_0, .VAR_1 = VAR_1, .VAR_2 = VAR_2, .VAR_3 = VAR_3, .ret = NOT_...
[ "static int FUNC_0(BdrvChild *VAR_0, int64_t VAR_1,\nQEMUIOVector *VAR_2, bool VAR_3,\nBdrvRequestFlags VAR_4)\n{", "Coroutine *co;", "RwCo rwco = {", ".VAR_0 = VAR_0,\n.VAR_1 = VAR_1,\n.VAR_2 = VAR_2,\n.VAR_3 = VAR_3,\n.ret = NOT_DONE,\n.VAR_4 = VAR_4,\n};", "if (qemu_in_coroutine()) {", "bdrv_rw_co_entr...
[ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 13, 15, 17, 19, 21, 23, 25 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [ 55 ...
13,701
static void setup_frame(int sig, struct target_sigaction *ka, target_sigset_t *set, CPUM68KState *env) { struct target_sigframe *frame; abi_ulong frame_addr; abi_ulong retcode_addr; abi_ulong sc_addr; int err = 0; int i; frame_addr = get_sigframe(ka, env, s...
true
qemu
0188fadb7fe460d8c4c743372b1f7b25773e183e
static void setup_frame(int sig, struct target_sigaction *ka, target_sigset_t *set, CPUM68KState *env) { struct target_sigframe *frame; abi_ulong frame_addr; abi_ulong retcode_addr; abi_ulong sc_addr; int err = 0; int i; frame_addr = get_sigframe(ka, env, s...
{ "code": [ " unlock_user_struct(frame, frame_addr, 1);", " int err = 0;", " if (err)", " if (__put_user(set->sig[i], &frame->extramask[i - 1]))", " if (err)", " unlock_user_struct(frame, frame_addr, 1);", " goto give_sigsegv;", " goto give_s...
static void FUNC_0(int VAR_0, struct target_sigaction *VAR_1, target_sigset_t *VAR_2, CPUM68KState *VAR_3) { struct target_sigframe *VAR_4; abi_ulong frame_addr; abi_ulong retcode_addr; abi_ulong sc_addr; int VAR_5 = 0; int VAR_6; frame_addr = get_sigframe(...
[ "static void FUNC_0(int VAR_0, struct target_sigaction *VAR_1,\ntarget_sigset_t *VAR_2, CPUM68KState *VAR_3)\n{", "struct target_sigframe *VAR_4;", "abi_ulong frame_addr;", "abi_ulong retcode_addr;", "abi_ulong sc_addr;", "int VAR_5 = 0;", "int VAR_6;", "frame_addr = get_sigframe(VAR_1, VAR_3, sizeof ...
[ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23, 25 ], [ 29 ], [ 33 ], [ 35 ], [ 39 ], [ 43 ], [ 45, 47 ], [ 49 ], [ 57 ], [ 59 ], [...
13,702
static void openrisc_cpu_realizefn(DeviceState *dev, Error **errp) { OpenRISCCPU *cpu = OPENRISC_CPU(dev); OpenRISCCPUClass *occ = OPENRISC_CPU_GET_CLASS(dev); cpu_reset(CPU(cpu)); occ->parent_realize(dev, errp); }
true
qemu
14a10fc39923b3af07c8c46d22cb20843bee3a72
static void openrisc_cpu_realizefn(DeviceState *dev, Error **errp) { OpenRISCCPU *cpu = OPENRISC_CPU(dev); OpenRISCCPUClass *occ = OPENRISC_CPU_GET_CLASS(dev); cpu_reset(CPU(cpu)); occ->parent_realize(dev, errp); }
{ "code": [ " cpu_reset(CPU(cpu));", " cpu_reset(CPU(cpu));", " cpu_reset(CPU(cpu));", " cpu_reset(CPU(cpu));", " cpu_reset(CPU(cpu));", " cpu_reset(CPU(cpu));", " cpu_reset(CPU(cpu));", " cpu_reset(CPU(cpu));", " OpenRISCCPU *cpu = OPENRISC_CPU(dev);", ...
static void FUNC_0(DeviceState *VAR_0, Error **VAR_1) { OpenRISCCPU *cpu = OPENRISC_CPU(VAR_0); OpenRISCCPUClass *occ = OPENRISC_CPU_GET_CLASS(VAR_0); cpu_reset(CPU(cpu)); occ->parent_realize(VAR_0, VAR_1); }
[ "static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{", "OpenRISCCPU *cpu = OPENRISC_CPU(VAR_0);", "OpenRISCCPUClass *occ = OPENRISC_CPU_GET_CLASS(VAR_0);", "cpu_reset(CPU(cpu));", "occ->parent_realize(VAR_0, VAR_1);", "}" ]
[ 0, 1, 0, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 15 ], [ 17 ] ]
13,703
void net_rx_pkt_attach_iovec(struct NetRxPkt *pkt, const struct iovec *iov, int iovcnt, size_t iovoff, bool strip_vlan) { uint16_t tci = 0; uint16_t ploff = iovoff; assert(pkt); pkt->vlan_stripped = false; if (strip_vlan) { ...
true
qemu
df8bf7a7fe75eb5d5caffa55f5cd4292b757aea6
void net_rx_pkt_attach_iovec(struct NetRxPkt *pkt, const struct iovec *iov, int iovcnt, size_t iovoff, bool strip_vlan) { uint16_t tci = 0; uint16_t ploff = iovoff; assert(pkt); pkt->vlan_stripped = false; if (strip_vlan) { ...
{ "code": [ " pkt->vlan_stripped = false;", " pkt->vlan_stripped = eth_strip_vlan(iov, iovcnt, iovoff, pkt->ehdr_buf,", " &ploff, &tci);", " pkt->vlan_stripped = false;" ], "line_no": [ 15, 21, 23, 15 ] }
void FUNC_0(struct NetRxPkt *VAR_0, const struct iovec *VAR_1, int VAR_2, size_t VAR_3, bool VAR_4) { uint16_t tci = 0; uint16_t ploff = VAR_3; assert(VAR_0); VAR_0->vlan_stripped = false; if (VAR_4) { VAR_0->vlan_str...
[ "void FUNC_0(struct NetRxPkt *VAR_0,\nconst struct iovec *VAR_1, int VAR_2,\nsize_t VAR_3, bool VAR_4)\n{", "uint16_t tci = 0;", "uint16_t ploff = VAR_3;", "assert(VAR_0);", "VAR_0->vlan_stripped = false;", "if (VAR_4) {", "VAR_0->vlan_stripped = eth_strip_vlan(VAR_1, VAR_2, VAR_3, VAR_0->ehdr_buf,\n&pl...
[ 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21, 23 ], [ 25 ], [ 29 ], [ 33 ], [ 35 ] ]
13,704
static inline void RENAME(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused) { #if COMPILE_TEMPLATE_MMX __asm__ volatile( "movq "MANGLE(bm01010101)", %%mm4 \n\t" "mov %0, %%"REG_a" \n\t" "1: ...
true
FFmpeg
c3ab0004ae4dffc32494ae84dd15cfaa909a7884
static inline void RENAME(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused) { #if COMPILE_TEMPLATE_MMX __asm__ volatile( "movq "MANGLE(bm01010101)", %%mm4 \n\t" "mov %0, %%"REG_a" \n\t" "1: ...
{ "code": [ "static inline void RENAME(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)" ], "line_no": [ 1 ] }
static inline void FUNC_0(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused) { #if COMPILE_TEMPLATE_MMX __asm__ volatile( "movq "MANGLE(bm01010101)", %%mm4 \n\t" "mov %0, %%"REG_a" \n\t" "1: ...
[ "static inline void FUNC_0(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)\n{", "#if COMPILE_TEMPLATE_MMX\n__asm__ volatile(\n\"movq \"MANGLE(bm01010101)\", %%mm4 \\n\\t\"\n\"mov %0, %%\"REG_a\" \\n\\t\"\n\"1: ...
[ 1, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47 ], [ 49, 51 ], [ 53 ], [ 55 ], [ 57 ], [ 59 ], [ 61, 63 ], [...
13,705
static void qemu_rbd_complete_aio(RADOSCB *rcb) { RBDAIOCB *acb = rcb->acb; int64_t r; r = rcb->ret; if (acb->cmd != RBD_AIO_READ) { if (r < 0) { acb->ret = r; acb->error = 1; } else if (!acb->error) { acb->ret = rcb->size; } ...
true
qemu
e04fb07fd1676e9facd7f3f878c1bbe03bccd26b
static void qemu_rbd_complete_aio(RADOSCB *rcb) { RBDAIOCB *acb = rcb->acb; int64_t r; r = rcb->ret; if (acb->cmd != RBD_AIO_READ) { if (r < 0) { acb->ret = r; acb->error = 1; } else if (!acb->error) { acb->ret = rcb->size; } ...
{ "code": [ " acb->bh = qemu_bh_new(rbd_aio_bh_cb, acb);", " qemu_bh_schedule(acb->bh);", " g_free(rcb);" ], "line_no": [ 59, 61, 63 ] }
static void FUNC_0(RADOSCB *VAR_0) { RBDAIOCB *acb = VAR_0->acb; int64_t r; r = VAR_0->ret; if (acb->cmd != RBD_AIO_READ) { if (r < 0) { acb->ret = r; acb->error = 1; } else if (!acb->error) { acb->ret = VAR_0->size; } } els...
[ "static void FUNC_0(RADOSCB *VAR_0)\n{", "RBDAIOCB *acb = VAR_0->acb;", "int64_t r;", "r = VAR_0->ret;", "if (acb->cmd != RBD_AIO_READ) {", "if (r < 0) {", "acb->ret = r;", "acb->error = 1;", "} else if (!acb->error) {", "acb->ret = VAR_0->size;", "}", "} else {", "if (r < 0) {", "memset(V...
[ 0, 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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45...
13,707
static void scsi_disk_set_sense(SCSIDiskState *s, uint8_t key) { s->sense.key = key; }
true
qemu
a1f0cce2ac0243572ff72aa561da67fe3766a395
static void scsi_disk_set_sense(SCSIDiskState *s, uint8_t key) { s->sense.key = key; }
{ "code": [ "static void scsi_disk_set_sense(SCSIDiskState *s, uint8_t key)", " s->sense.key = key;" ], "line_no": [ 1, 5 ] }
static void FUNC_0(SCSIDiskState *VAR_0, uint8_t VAR_1) { VAR_0->sense.VAR_1 = VAR_1; }
[ "static void FUNC_0(SCSIDiskState *VAR_0, uint8_t VAR_1)\n{", "VAR_0->sense.VAR_1 = VAR_1;", "}" ]
[ 1, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ] ]