id
stringlengths
21
132
codebase
stringclasses
57 values
c_file
stringlengths
3
108
function
stringlengths
3
74
sloc
stringclasses
134 values
c_code
stringlengths
25
52.1k
c_constructs
dict
transcoder-set#MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_1_prep#main.c
transcoder-set
MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_1.c
main
16
int main(void) { int n_success = 0; int param0[] = {43,76,57,10,59,92,49,16,33,66}; int param1[] = {24,54,5,13,47,14,62,95,41,63}; int param2[] = {7,66,40,4,56,50,65,12,90,46}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i]...
{ "array_type": 3, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#CIRCLE_LATTICE_POINTS_prep#len.c
transcoder-set
CIRCLE_LATTICE_POINTS.c
len
1
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libosip2-5.3.1#osip_authentication_info_prep#osip_message_set_authentication_info.c
libosip2-5.3.1
osip_authentication_info.c
osip_message_set_authentication_info
19
int osip_message_set_authentication_info(osip_message_t *sip, const char *hvalue) { osip_authentication_info_t *authentication_info; int i; if (hvalue == ((void *)0) || hvalue[0] == '\0') return 0; if (sip == ((void *)0)) return -2; i = osip_authentication_info_init(&authentication_info); if (i != 0...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 5, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
robotfindskitten#robotfindskitten_prep#draw.c
robotfindskitten
robotfindskitten.c
draw
1
void draw(screen_object o) { full_draw(o,0); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
json.h#allow_global_object_prep#json_get_key_size.c
json.h
allow_global_object.c
json_get_key_size
31
int json_get_key_size(struct json_parse_state_s *state) { const size_t flags_bitset = state->flags_bitset; if (json_parse_flags_allow_unquoted_keys & flags_bitset) { size_t offset = state->offset; const size_t size = state->size; const char *const src = state->src; size_t data_size = state->data_siz...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 4, "struct_type": 1, "switch_statement": 0, "type_casting": 2,...
gawk-5.2.2#profile_prep#pp_string_fp.c
gawk-5.2.2
profile.c
pp_string_fp
18
void pp_string_fp(Func_print print_func, FILE *fp, const char *in_str, size_t len, int delim, _Bool breaklines) { char *s = pp_string(in_str, len, delim); int count; size_t slen; const char *str = (const char *) s; slen = strlen(str); for (count = 0; slen > 0; slen--, str++) { print_func(fp, "%c", *str); if...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#COUNT_DISTINCT_NON_NEGATIVE_PAIRS_X_Y_SATISFY_INEQUALITY_XX_YY_N_2_1_prep#f_gold.c
transcoder-set
COUNT_DISTINCT_NON_NEGATIVE_PAIRS_X_Y_SATISFY_INEQUALITY_XX_YY_N_2_1.c
f_gold
12
int f_gold ( int n ) { int x = 0, yCount, res = 0; for ( yCount = 0; yCount * yCount < n; yCount ++ ); while ( yCount != 0 ) { res += yCount; x ++; while ( yCount != 0 && ( x * x + ( yCount - 1 ) * ( yCount - 1 ) >= n ) ) yCount --; } return res; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#SMALLEST_OF_THREE_INTEGERS_WITHOUT_COMPARISON_OPERATORS_prep#f_filled.c
transcoder-set
SMALLEST_OF_THREE_INTEGERS_WITHOUT_COMPARISON_OPERATORS.c
f_filled
1
int f_filled ( int x, int y, int z ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
nettle-3.9.1#ecc-gostdsa-verify_prep#nettle_ecc_gostdsa_verify_itch.c
nettle-3.9.1
ecc-gostdsa-verify.c
nettle_ecc_gostdsa_verify_itch
5
mp_size_t nettle_ecc_gostdsa_verify_itch (const struct ecc_curve *ecc) { return 5*ecc->p.size + (((3 << 4) + 8) * (ecc->p.size)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
gprolog-1.5.0#atom_prep#Pl_Find_Next_Atom.c
gprolog-1.5.0
atom.c
Pl_Find_Next_Atom
10
int Pl_Find_Next_Atom(int last_atom) { while ((PlULong) ++last_atom < pl_max_atom) { if (pl_atom_tbl[last_atom].name) return last_atom; } return -1; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
heman#mat4_prep#kmMat4ExtractPlane.c
heman
mat4.c
kmMat4ExtractPlane
52
kmPlane* kmMat4ExtractPlane(kmPlane* pOut, const kmMat4* pIn, const unsigned int plane) { float t = 1.0f; switch(plane) { case 1: pOut->a = pIn->mat[3] - pIn->mat[0]; pOut->b = pIn->mat[7] - pIn->mat[4]; pOut->c = pIn->mat[11] - pIn->mat[8]; pOut->d = pIn-...
{ "array_type": 1, "break_continue_statement": 6, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 1, "type_casting": 1,...
patch-2.7.6#pch_prep#pch_rename.c
patch-2.7.6
pch.c
pch_rename
4
_Bool pch_rename (void) { return p_rename[OLD] && p_rename[NEW]; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libxml2#xmlsave_prep#xmlSaveToFd.c
libxml2
xmlsave.c
xmlSaveToFd
13
xmlSaveCtxtPtr xmlSaveToFd(int fd, const char *encoding, int options) { xmlSaveCtxtPtr ret; ret = xmlNewSaveCtxt(encoding, options); if (ret == ((void *)0)) return(((void *)0)); ret->buf = xmlOutputBufferCreateFd(fd, ret->handler); if (ret->buf == ((void *)0)) { xmlFreeSaveCtxt(ret); return(((void...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
nano-7.2#global_prep#backwards_void.c
nano-7.2
global.c
backwards_void
1
void backwards_void(void) {;}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY_1_prep#len.c
transcoder-set
MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY_1.c
len
1
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#HYPERCUBE_GRAPH_prep#main.c
transcoder-set
HYPERCUBE_GRAPH.c
main
14
int main(void) { int n_success = 0; int param0[] = {72,28,45,41,94,97,97,36,91,84}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } break; } printf("#Results:", " ", n_success, ", ", len(param0)); return ...
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
gprolog-1.5.0#g_var_inl_c_prep#Pl_Blt_G_Link.c
gprolog-1.5.0
g_var_inl_c.c
Pl_Blt_G_Link
7
void Pl_Blt_G_Link(WamWord x, WamWord y) { Pl_Set_C_Bip_Name("g_link", 2); G_Assign(x, y, 1, 0); Pl_Unset_C_Bip_Name(); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
optipng-0.7.8#compress_prep#compress.c
optipng-0.7.8
compress.c
compress
4
int compress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen) { return compress2(dest, destLen, source, sourceLen, (-1)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
bc-1.07.1#scan_prep#yypop_buffer_state.c
bc-1.07.1
scan.c
yypop_buffer_state
13
void yypop_buffer_state (void) { if (!( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0))) return; yy_delete_buffer(( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)) ); (yy_buffer_stack)[(yy_buffer_stack_top)] = ((void *)0); if ((yy_buffer_stack_top) > 0) ...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
transcoder-set#FINDING_POWER_PRIME_NUMBER_P_N_prep#f_gold.c
transcoder-set
FINDING_POWER_PRIME_NUMBER_P_N.c
f_gold
9
int f_gold ( int n, int p ) { int ans = 0; int temp = p; while ( temp <= n ) { ans += n / temp; temp = temp * p; } return ans; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
gprolog-1.5.0#const_io_c_prep#Pl_Display_To_String.c
gprolog-1.5.0
const_io_c.c
Pl_Display_To_String
7
char * Pl_Display_To_String(WamWord term_word) { char *ret_str; { int stm; WamWord stm_word; char *str; stm = Pl_Add_Str_Stream(((void *)0), 1); stm_word = Pl_Make_Stream_Tagged_Word(stm); { Pl_Display_2(stm_word, term_word); } str = Pl_Term_Write_Str_Stream(stm); { ret_str = Pl_Strdup_Check(str, "const_io_c.c", 18...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
dap-3.10#machdep_prep#dap_putdouble.c
dap-3.10
machdep.c
dap_putdouble
50
void dap_putdouble(DFILE *dfp) { unsigned int ix[2]; unsigned int sign; unsigned int e; char dstr[13]; int d; d = 0; ix[0] = *(((unsigned int *) &dap_double) + dap_dbllow); ix[1] = *(((unsigned int *) &dap_double) + dap_dblhigh); if (!(ix[0] & 0x7fffffff) && !ix[1]) { dstr[d++] = 'A'; for (e = 0; e < 11; e++) dstr...
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 4, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
wget-1.21.4#css__prep#yy_delete_buffer.c
wget-1.21.4
css_.c
yy_delete_buffer
10
void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)) ) (yy_buffer_stack)[(yy_buffer_stack_top)] = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yyfree( (void *) b->yy_ch_buf ); yyfree( (void *) b ); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
optipng-0.7.8#pngerror_prep#png_app_error.c
optipng-0.7.8
pngerror.c
png_app_error
8
void png_app_error(png_const_structrp png_ptr, png_const_charp error_message) { if ((png_ptr->flags & 0x400000U) != 0) png_warning(png_ptr, error_message); else png_error(png_ptr, error_message); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
tar-1.34#malloca_prep#freea.c
tar-1.34
malloca.c
freea
13
void freea (void *p) { if ((uintptr_t) p & (sa_alignment_max - 1)) { abort (); } if ((uintptr_t) p & sa_alignment_max) { void *mem = (char *) p - ((small_t *) p)[-1]; free (mem); } }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
tmux#proc_prep#proc_toggle_log.c
tmux
proc.c
proc_toggle_log
5
void proc_toggle_log(struct tmuxproc *tp) { log_toggle(tp->name); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
nettle-3.9.1#output_prep#sexp_put_char.c
nettle-3.9.1
output.c
sexp_put_char
25
void sexp_put_char(struct sexp_output *output, uint8_t c) { if (output->coding) { char encoded[2]; unsigned done; unsigned i; done = output->coding->encode_update(&output->base64, encoded, 1, &c); ((void) sizeof ((done <= sizeof(encoded)) ? 1 : 0), __extension__ ({ if (done <...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 1,...
gprolog-1.5.0#error_supp_prep#Pl_Err_Evaluation.c
gprolog-1.5.0
error_supp.c
Pl_Err_Evaluation
7
void Pl_Err_Evaluation(int pl_atom_error) { Update_Cur_From_C_Bip(); (pl_reg_bank[0]) = (((PlLong) (pl_atom_error) << 3) + ((PlULong)0x3)); Pl_Execute_A_Continuation(X1_24706C5F6572725F6576616C756174696F6E__a1); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
wget-1.21.4#iri_prep#idn_decode.c
wget-1.21.4
iri.c
idn_decode
5
char * idn_decode (const char *host) { return xstrdup(host); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#libxml2-py_prep#libxml_xmlNodeSetContentLen.c
libxml2
libxml2-py.c
libxml_xmlNodeSetContentLen
15
PyObject * libxml_xmlNodeSetContentLen(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; xmlNodePtr cur; PyObject *pyobj_cur; xmlChar * content; int len; if (!_PyArg_ParseTuple_SizeT(args, (char *)"Ozi:xmlNodeSetContentLen", &pyobj_cur, &conten...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
tmux#imsg-buffer_prep#ibuf_size.c
tmux
imsg-buffer.c
ibuf_size
5
size_t ibuf_size(struct ibuf *buf) { return (buf->wpos); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
transcoder-set#MAXIMUM_SUM_SUBARRAY_REMOVING_ONE_ELEMENT_prep#max.c
transcoder-set
MAXIMUM_SUM_SUBARRAY_REMOVING_ONE_ELEMENT.c
max
1
int max(int x, int y) { return (x > y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
tulipindicators-0.9.1#tiamalgamation_prep#ti_cosh.c
tulipindicators-0.9.1
tiamalgamation.c
ti_cosh
1
int ti_cosh(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *in1 = inputs[0]; (void)options; double *output = outputs[0]; int i; for (i = 0; i < size; ++i) { output[i] = (cosh(in1[i])); } return 0; }
{ "array_type": 4, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 3, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#FINDING_POWER_PRIME_NUMBER_P_N_prep#sort.c
transcoder-set
FINDING_POWER_PRIME_NUMBER_P_N.c
sort
1
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
gprolog-1.5.0#control_c_prep#Pl_Between_Alt_0.c
gprolog-1.5.0
control_c.c
Pl_Between_Alt_0
17
void Pl_Between_Alt_0(void) { PlLong l, u; WamWord i_word; Pl_Update_Choice_Point((CodePtr) X1_246265747765656E5F616C74__a0, 0); l = (*(WamWord *) &(B[-9 - (0)])); u = (*(WamWord *) &(B[-9 - (1)])); i_word = (*(WamWord *) &(B[-9 - (2)])); if (l == u) (B = ((*(WamWord **) &(B[-5]))), (((WamWordP *) pl_...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
json.h#allow_inf_and_nan_prep#json_extract_get_array_size.c
json.h
allow_inf_and_nan.c
json_extract_get_array_size
17
struct json_extract_result_s json_extract_get_array_size(const struct json_array_s *const array) { struct json_extract_result_s result; size_t i; const struct json_array_element_s *element = array->start; result.dom_size = sizeof(struct json_array_s) + (sizeof(struct json_array_element_s) * ...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 2, "switch_statement": 0, "type_casting": 2,...
bc-1.07.1#number_prep#bc_new_num.c
bc-1.07.1
number.c
bc_new_num
21
bc_num bc_new_num (int length, int scale) { bc_num temp; if (_bc_Free_list != ((void *)0)) { temp = _bc_Free_list; _bc_Free_list = temp->n_next; } else { temp = (bc_num) malloc (sizeof(bc_struct)); if (temp == ((void *)0)) out_of_memory (); } temp->n_sign = PLUS; temp->n_len = length; temp...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 2, "memory_operation": 1, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
transcoder-set#DOUBLE_FACTORIAL_1_prep#cmpfunc.c
transcoder-set
DOUBLE_FACTORIAL_1.c
cmpfunc
1
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
tar-1.34#regex_prep#rpl_regerror.c
tar-1.34
regex.c
rpl_regerror
23
size_t rpl_regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf, size_t errbuf_size) { const char *msg; size_t msg_size; int nerrcodes = sizeof __re_error_msgid_idx / sizeof __re_error_msgid_idx[0]; if (__builtin_expect ((errcode < 0 || errcode >= nerrcodes), 0)) abort (); msg...
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 1, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
tmux#environ_prep#environ_RB_FIND.c
tmux
environ.c
environ_RB_FIND
1
struct environ_entry * environ_RB_FIND(struct environ *head, struct environ_entry *elm) { struct environ_entry *tmp = (head)->rbh_root; int comp; while (tmp) { comp = environ_cmp(elm, tmp); if (comp < 0) tmp = (tmp)->entry.rbe_left; else if (comp > 0) tmp = (tmp)->entry.rbe_right; else return (tmp); } return (((void *)...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 1,...
binn-3.0#binn_prep#binn_object_str.c
binn-3.0
binn.c
binn_object_str
5
char * binn_object_str(void *obj, const char *key) { char *value; binn_object_get(obj, key, 0xA0, &value, ((void *)0)); return value; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
cflow-1.7#posix_prep#posix_output_handler.c
cflow-1.7
posix.c
posix_output_handler
27
int posix_output_handler(cflow_output_command cmd, FILE *outfile, int line, void *data, void *handler_data) { switch (cmd) { case cflow_output_init: if (emacs_option) error(3, 0, gettext("--format=posix is not compatible with --emacs")); brief_listing = print_line_numbers = ...
{ "array_type": 0, "break_continue_statement": 4, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 1, "type_casting": 1,...
optipng-0.7.8#pnmin_prep#pnm_fget_values.c
optipng-0.7.8
pnmin.c
pnm_fget_values
115
int pnm_fget_values(const pnm_struct *pnm_ptr, unsigned int *sample_values, unsigned int num_rows, FILE *stream) { unsigned int format = pnm_ptr->format; unsigned int depth = pnm_ptr->depth; unsigned int width = pnm_ptr->width; unsigned int max...
{ "array_type": 1, "break_continue_statement": 11, "enum_type": 0, "for_loop": 7, "function_pointer": 0, "goto_statement": 0, "if_statement": 12, "memory_management": 0, "memory_operation": 1, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 1, "type_casting": ...
optipng-0.7.8#png_prep#png_reset_zstream.c
optipng-0.7.8
png.c
png_reset_zstream
7
int png_reset_zstream(png_structrp png_ptr) { if (png_ptr == ((void *)0)) return (-2); return (inflateReset(&png_ptr->zstream)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#GCD_ELEMENTS_GIVEN_RANGE_prep#main.c
transcoder-set
GCD_ELEMENTS_GIVEN_RANGE.c
main
15
int main(void) { int n_success = 0; int param0[] = {57,22,17,74,93,56,5,5,9,98}; int param1[] = {57,22,17,74,22,54,33,68,75,21}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } break; } ...
{ "array_type": 2, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
bc-1.07.1#util_prep#insert_id_rec.c
bc-1.07.1
util.c
insert_id_rec
111
int insert_id_rec (id_rec **root, id_rec *new_id) { id_rec *A, *B; if (*root == ((void *)0)) { *root = new_id; new_id->left = ((void *)0); new_id->right = ((void *)0); new_id->balance = 0; return (1); } if (strcmp (new_id->id, (*root)->id) < 0) { if (insert_id_rec (...
{ "array_type": 0, "break_continue_statement": 6, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 6, "struct_type": 0, "switch_statement": 4, "type_casting": 3,...
wget-1.21.4#ftp-basic_prep#ftp_rest.c
wget-1.21.4
ftp-basic.c
ftp_rest
25
uerr_t ftp_rest (int csock, wgint offset) { char *request, *respline; int nwritten; uerr_t err; request = ftp_request ("REST", number_to_static_string (offset)); nwritten = fd_write (csock, request, strlen (request), -1); if (nwritten < 0) { do { free ((void *) (request)); request = ((void *)0); }...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 4, "memory_operation": 0, "pointer_type": 2, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
less-633#optfunc_prep#set_tabs.c
less-633
optfunc.c
set_tabs
27
void set_tabs(char *s, int len) { int i; char *es = s + len; for (i = 1; i < 128; ) { int n = 0; int v = 0; while (s < es && *s == ' ') s++; for (; s < es && *s >= '0' && *s <= '9'; s++) { v |= help_ckd_mul(&n, n, 10, sizeof *(&n), ((1 ? 0 : *(&n)) - 1 < 0)); v |= help_ckd_add(&n, n, *s - '0', si...
{ "array_type": 0, "break_continue_statement": 1, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY_prep#main.c
transcoder-set
MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY.c
main
25
int main(void) { int n_success = 0; int param0_0[] = {11,12,16,26,29,40,54,59,65,70,71,73,78,81,87,87,88,90,95,97}; int param0_1[] = {-46,-32,54,96,-72,-58,-36,-44,26,-2,-68,42,90,26,-92,-96,88,-42,-18,46,-70,24,0,24,34,34,-52,50,94,-60,64,58}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1...
{ "array_type": 2, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libxml2#libxml2-py_prep#libxml_xmlGetDocEntity.c
libxml2
libxml2-py.c
libxml_xmlGetDocEntity
14
PyObject * libxml_xmlGetDocEntity(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; xmlEntityPtr c_retval; xmlDoc * doc; PyObject *pyobj_doc; xmlChar * name; if (!_PyArg_ParseTuple_SizeT(args, (char *)"Oz:xmlGetDocEntity", &pyobj_doc, &name)) return(((vo...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
transcoder-set#PROGRAM_CIRCUMFERENCE_PARALLELOGRAM_prep#f_filled.c
transcoder-set
PROGRAM_CIRCUMFERENCE_PARALLELOGRAM.c
f_filled
1
float f_filled ( float a, float b ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
tulipindicators-0.9.1#di_prep#ti_di.c
tulipindicators-0.9.1
di.c
ti_di
40
int ti_di(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *high = inputs[0]; const double *low = inputs[1]; const double *close = inputs[2]; const int period = (int)options[0]; double *plus_di = outputs[0]; double *minus_di = outputs[1]; i...
{ "array_type": 5, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 8, "memory_management": 0, "memory_operation": 0, "pointer_type": 5, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
libxml2#xmlunicode_prep#xmlUCSIsSpacingModifierLetters.c
libxml2
xmlunicode.c
xmlUCSIsSpacingModifierLetters
4
int xmlUCSIsSpacingModifierLetters(int code) { return(((code >= 0x02B0) && (code <= 0x02FF))); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
json.h#allow_equals_in_object_prep#json_get_string_size.c
json.h
allow_equals_in_object.c
json_get_string_size
126
int json_get_string_size(struct json_parse_state_s *state, size_t is_key) { size_t offset = state->offset; const size_t size = state->size; size_t data_size = 0; const char *const src = state->src; const int is_single_quote = '\'' == src[offset]; const char quote_to_use = is_single_quote ? '\'' : '"'; con...
{ "array_type": 1, "break_continue_statement": 3, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 17, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 12, "struct_type": 1, "switch_statement": 2, "type_casting": ...
tmux#layout_prep#layout_spread_out.c
tmux
layout.c
layout_spread_out
16
void layout_spread_out(struct window_pane *wp) { struct layout_cell *parent; struct window *w = wp->window; parent = wp->layout_cell->parent; if (parent == ((void *)0)) return; do { if (layout_spread_cell(w, parent)) { layout_fix_offsets(parent); layout_fix_panes(w, w->sx, w->sy); break; } } while ...
{ "array_type": 0, "break_continue_statement": 1, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 1, "struct_type": 3, "switch_statement": 0, "type_casting": 2,...
transcoder-set#TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS_1_prep#min.c
transcoder-set
TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS_1.c
min
1
int min(int x, int y) { return (x < y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
cflow-1.7#parser_prep#skip_balanced.c
cflow-1.7
parser.c
skip_balanced
25
int skip_balanced(int open_tok, int close_tok, int level) { if (level == 0) { if (nexttoken() != open_tok) { return 1; } level++; } while (nexttoken()) { if (tok.type == LBRACE0 && open_tok == '{') tok.type = '{'; else if (tok.type == RBRACE0 && close_tok == '}') to...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 7, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#CHECK_STRING_FOLLOWS_ANBN_PATTERN_NOT_prep#min.c
transcoder-set
CHECK_STRING_FOLLOWS_ANBN_PATTERN_NOT.c
min
1
int min(int x, int y) { return (x < y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
wget-1.21.4#init_prep#wgetrc_user_file_name.c
wget-1.21.4
init.c
wgetrc_user_file_name
16
char * wgetrc_user_file_name (void) { char *file = ((void *)0); if (opt.homedir) { file = ajoin_dir_file(opt.homedir, ".wgetrc"); } if (!file) return ((void *)0); if (!file_exists_p (file, ((void *)0))) { do { free ((void *) (file)); file = ((void *)0); } while (0); return ((void *)0);...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 6,...
transcoder-set#CEILING_IN_A_SORTED_ARRAY_prep#len.c
transcoder-set
CEILING_IN_A_SORTED_ARRAY.c
len
1
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libxml2#xmlstring_prep#xmlUTF8Strsub.c
libxml2
xmlstring.c
xmlUTF8Strsub
22
xmlChar * xmlUTF8Strsub(const xmlChar *utf, int start, int len) { int i; int ch; if (utf == ((void *)0)) return(((void *)0)); if (start < 0) return(((void *)0)); if (len < 0) return(((void *)0)); for (i = 0; i < start; i++) { ch = *utf++; if (ch == 0) return(((void *)...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 6, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
transcoder-set#COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_prep#len.c
transcoder-set
COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X.c
len
1
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_1_prep#f_filled.c
transcoder-set
FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_1.c
f_filled
1
_Bool f_filled ( unsigned int n ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
less-633#edit_prep#save_curr_ifile.c
less-633
edit.c
save_curr_ifile
6
void* save_curr_ifile(void) { if (curr_ifile != ((void*)((void *)0))) hold_ifile(curr_ifile, 1); return (curr_ifile); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
nettle-3.9.1#eax_prep#nettle_eax_set_key.c
nettle-3.9.1
eax.c
nettle_eax_set_key
9
void nettle_eax_set_key (struct eax_key *key, const void *cipher, nettle_cipher_func *f) { static const union nettle_block16 zero_block; f (cipher, 16, key->pad_block.b, zero_block.b); block16_mulx_be (&key->pad_block, &key->pad_block); block16_mulx_be (&key->pad_partial, &key->pad_block); block16_xor (&key->...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
transcoder-set#CHECK_WHETHER_TRIANGLE_VALID_NOT_SIDES_GIVEN_prep#sort.c
transcoder-set
CHECK_WHETHER_TRIANGLE_VALID_NOT_SIDES_GIVEN.c
sort
1
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libosip2-5.3.1#sdp_message_prep#sdp_message_clone.c
libosip2-5.3.1
sdp_message.c
sdp_message_clone
18
int sdp_message_clone(sdp_message_t *sdp, sdp_message_t **dest) { int i; char *body; i = sdp_message_init(dest); if (i != 0) return -1; i = sdp_message_to_str(sdp, &body); if (i != 0) goto error_sc1; i = sdp_message_parse(*dest, body); { if (body != ((void *)0)) { if (osip_free_func) osip_free_f...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 2, "if_statement": 4, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#COUNT_MINIMUM_NUMBER_SUBSETS_SUBSEQUENCES_CONSECUTIVE_NUMBERS_prep#f_gold.c
transcoder-set
COUNT_MINIMUM_NUMBER_SUBSETS_SUBSEQUENCES_CONSECUTIVE_NUMBERS.c
f_gold
10
int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); int count = 1; for ( int i = 0; i < n - 1; i ++ ) { if ( arr [ i ] + 1 != arr [ i + 1 ] ) count ++; } return count; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#DETECT_IF_TWO_INTEGERS_HAVE_OPPOSITE_SIGNS_prep#sort.c
transcoder-set
DETECT_IF_TWO_INTEGERS_HAVE_OPPOSITE_SIGNS.c
sort
1
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
nano-7.2#winio_prep#convert_SS3_sequence.c
nano-7.2
winio.c
convert_SS3_sequence
116
int convert_SS3_sequence(const int *seq, size_t length, int *consumed) { switch (seq[0]) { case '1': if (length > 3 && seq[1] == ';') { *consumed = 4; switch (seq[2]) { case '2': if ('A' <= seq[3] && seq[3] <= 'D') { shift_held = 1; return arrow_from_ABCD(seq[3]); } br...
{ "array_type": 1, "break_continue_statement": 4, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 37, "struct_type": 0, "switch_statement": 4, "type_casting": 0...
units-2.22#units_prep#initializeunit.c
units-2.22
units.c
initializeunit
6
void initializeunit(struct unittype *theunit) { theunit->factor = 1.0; theunit->numerator[0] = theunit->denominator[0] = ((void *)0); }
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 1,...
libxml2#xmlreader_prep#xmlTextReaderGetParserLineNumber.c
libxml2
xmlreader.c
xmlTextReaderGetParserLineNumber
9
int xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader) { if ((reader == ((void *)0)) || (reader->ctxt == ((void *)0)) || (reader->ctxt->input == ((void *)0))) { return (0); } return (reader->ctxt->input->line); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
gzip-1.12#bits_prep#bi_reverse.c
gzip-1.12
bits.c
bi_reverse
11
unsigned bi_reverse(code, len) unsigned code; int len; { register unsigned res = 0; do { res |= code & 1; code >>= 1, res <<= 1; } while (--len > 0); return res >> 1; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
mtools-4.0.43#stream_prep#pwrite_pass_through.c
mtools-4.0.43
stream.c
pwrite_pass_through
5
ssize_t pwrite_pass_through(Stream_t *Stream, char *buf, mt_off_t start, size_t len) { return ((Stream->Next)->Class->pwrite)( (Stream->Next), (char *) (buf), (start), (len) ); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
indent-2.2.13#output_prep#close_output.c
indent-2.2.13
output.c
close_output
25
extern void close_output( struct stat * file_stats, const char * filename) { if (output != stdout) { if (fclose(output) != 0) { fatal(gettext("Can't close output file %s"), filename); } else { if (file_stats != ((void *)0) && filename) ...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
gawk-5.2.2#symbol_prep#release_symbols.c
gawk-5.2.2
symbol.c
release_symbols
13
void release_symbols(NODE *symlist, int keep_globals) { NODE *p, *next; for (p = symlist->sub.nodep.r.rptr; p != ((void *)0); p = next) { if (! keep_globals) { destroy_symbol(p->sub.nodep.l.lptr); } next = p->sub.nodep.r.rptr; (void) (((struct block_item *) p)->freep = nextfree[BLOCK_NODE].freep, nextfree[...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
optipng-0.7.8#pngrtran_prep#png_do_read_transformations.c
optipng-0.7.8
pngrtran.c
png_do_read_transformations
17
void png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info) { ((void)0); if (png_ptr->row_buf == ((void *)0)) { png_error(png_ptr, "NULL row buffer"); } if ((png_ptr->flags & 0x4000U) != 0 && (png_ptr->flags & 0x0040U) == 0) { png_error(png_ptr, "Uninitialized row...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
tulipindicators-0.9.1#ppo_prep#ti_ppo.c
tulipindicators-0.9.1
ppo.c
ti_ppo
23
int ti_ppo(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *input = inputs[0]; double *ppo = outputs[0]; const int short_period = (int)options[0]; const int long_period = (int)options[1]; if (short_period < 1) return 1; if (long_period < 2) re...
{ "array_type": 4, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 5, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
transcoder-set#BIN_PACKING_PROBLEM_MINIMIZE_NUMBER_OF_USED_BINS_prep#len.c
transcoder-set
BIN_PACKING_PROBLEM_MINIMIZE_NUMBER_OF_USED_BINS.c
len
1
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
tulipindicators-0.9.1#bop_prep#ti_bop.c
tulipindicators-0.9.1
bop.c
ti_bop
18
int ti_bop(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *open = inputs[0]; const double *high = inputs[1]; const double *low = inputs[2]; const double *close = inputs[3]; (void)options; double *output = outputs[0]; int i; for (i = 0...
{ "array_type": 7, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 5, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
json.h#allow_multi_line_strings_prep#json_write_pretty.c
json.h
allow_multi_line_strings.c
json_write_pretty
42
void *json_write_pretty(const struct json_value_s *value, const char *indent, const char *newline, size_t *out_size) { size_t size = 0; size_t indent_size = 0; size_t newline_size = 0; char *data = 0; char *data_end = 0; if (0 == value) { return 0; } if (0 == indent) { in...
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 7, "memory_management": 2, "memory_operation": 0, "pointer_type": 2, "return_statement": 5, "struct_type": 1, "switch_statement": 0, "type_casting": 1,...
gprolog-1.5.0#bc_supp_prep#Pl_BC_Start_Emit_0.c
gprolog-1.5.0
bc_supp.c
Pl_BC_Start_Emit_0
5
void Pl_BC_Start_Emit_0(void) { bc_sp = bc; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#SUM_PAIRWISE_PRODUCTS_2_prep#main.c
transcoder-set
SUM_PAIRWISE_PRODUCTS_2.c
main
15
int main(void) { int n_success = 0; int param0[] = {57, 18, 97, 9, 42, 67, 71, 66, 69, 18}; for (int i = 0; i < len(param0); ++i) { if (f_filled(param0[i]) == f_gold(param0[i])) { n_success += 1; } break; } printf("#Results:", " ", n_success, ", ", len...
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libosip2-5.3.1#osip_dialog_prep#osip_dialog_update_osip_cseq_as_uas.c
libosip2-5.3.1
osip_dialog.c
osip_dialog_update_osip_cseq_as_uas
8
int osip_dialog_update_osip_cseq_as_uas(osip_dialog_t *dialog, osip_message_t *invite) { if (dialog == ((void *)0)) return -2; if (invite == ((void *)0) || invite->cseq == ((void *)0) || invite->cseq->number == ((void *)0)) return -2; dialog->remote_cseq = osip_atoi(invite->cseq->number); return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
libxml2#libxml2-py_prep#libxml_xmlUCSIsHiragana.c
libxml2
libxml2-py.c
libxml_xmlUCSIsHiragana
13
PyObject * libxml_xmlUCSIsHiragana(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsHiragana") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSIsHiragana", &code)...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
transcoder-set#HOW_TO_BEGIN_WITH_COMPETITIVE_PROGRAMMING_prep#min.c
transcoder-set
HOW_TO_BEGIN_WITH_COMPETITIVE_PROGRAMMING.c
min
1
int min(int x, int y) { return (x < y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libosip2-5.3.1#port_fifo_prep#osip_fifo_free.c
libosip2-5.3.1
port_fifo.c
osip_fifo_free
7
void osip_fifo_free(osip_fifo_t *ff) { if (ff == ((void *)0)) return; osip_mutex_destroy(ff->qislocked); osip_sem_destroy(ff->qisempty); { if (ff != ((void *)0)) { if (osip_free_func) osip_free_func(ff); else free(ff); } }; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 1, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
nano-7.2#files_prep#do_writeout.c
nano-7.2
files.c
do_writeout
5
void do_writeout(void) { if (write_it_out(0, 1) == 2) close_and_go(); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
nano-7.2#color_prep#found_in_list.c
nano-7.2
color.c
found_in_list
7
_Bool found_in_list(regexlisttype *head, const char *shibboleth) { for (regexlisttype *item = head; item != ((void *)0); item = item->next) if (regexec(item->one_rgx, shibboleth, 0, ((void *)0), 0) == 0) return 1; return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
transcoder-set#HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP_prep#len.c
transcoder-set
HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP.c
len
1
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
json-c#json_object_prep#json_object_object_length.c
json-c
json_object.c
json_object_object_length
5
int json_object_object_length(const struct json_object *jso) { ((void) sizeof ((json_object_get_type(jso) == json_type_object) ? 1 : 0), __extension__ ({ if (json_object_get_type(jso) == json_type_object) ; else __assert_fail ("json_object_get_type(jso) == json_type_object", "/home/melih/storage/Transpiler/Dataset/pro...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 1,...
transcoder-set#MAKING_ELEMENTS_OF_TWO_ARRAYS_SAME_WITH_MINIMUM_INCREMENTDECREMENT_prep#f_filled.c
transcoder-set
MAKING_ELEMENTS_OF_TWO_ARRAYS_SAME_WITH_MINIMUM_INCREMENTDECREMENT.c
f_filled
1
int f_filled ( int a [ ], int b [ ], int n ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#PRIMALITY_TEST_SET_1_INTRODUCTION_AND_SCHOOL_METHOD_1_prep#cmpfunc.c
transcoder-set
PRIMALITY_TEST_SET_1_INTRODUCTION_AND_SCHOOL_METHOD_1.c
cmpfunc
1
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
patch-2.7.6#verror_prep#verror_at_line.c
patch-2.7.6
verror.c
verror_at_line
19
void verror_at_line (int status, int errnum, const char *file, unsigned int line_number, const char *format, va_list args) { char *message = xvasprintf (format, args); if (message) { if (file) error_at_line (status, errnum, file, line_number, "%s", message); else erro...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#MAXIMUM_PRODUCT_SUBSET_ARRAY_prep#sort.c
transcoder-set
MAXIMUM_PRODUCT_SUBSET_ARRAY.c
sort
1
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
tar-1.34#misc_prep#blocking_read.c
tar-1.34
misc.c
blocking_read
13
size_t blocking_read (int fd, void *buf, size_t count) { size_t bytes = safe_read (fd, buf, count); if (bytes == ((size_t) -1) && (*__errno_location ()) == 11) { int flags = rpl_fcntl (fd, 3); if (0 <= flags && flags & 04000 && rpl_fcntl (fd, 4, flags & ~04000) != -1) bytes = safe_read (fd, buf,...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
cpio-2.14#paxerror_prep#truncate_error.c
cpio-2.14
paxerror.c
truncate_error
5
void truncate_error (char const *name) { call_arg_error ("truncate", name); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
cflow-1.7#symbol_prep#delete_autos.c
cflow-1.7
symbol.c
delete_autos
6
void delete_autos(int level) { linked_list_iterate(&auto_symbol_list, delete_level_autos, &level); linked_list_iterate(&static_symbol_list, delete_level_statics, &level); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#QUICK_WAY_CHECK_CHARACTERS_STRING_prep#main.c
transcoder-set
QUICK_WAY_CHECK_CHARACTERS_STRING.c
main
14
int main(void) { int n_success = 0; char param0[][100] = {"","ggg","11","KoYIHns","232","10111000011101","DDDD","11","11111","ewJvixQzu"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } break; } printf("#Res...
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#AREA_OF_THE_CIRCLE_THAT_HAS_A_SQUARE_AND_A_CIRCLE_INSCRIBED_IN_IT_prep#main.c
transcoder-set
AREA_OF_THE_CIRCLE_THAT_HAS_A_SQUARE_AND_A_CIRCLE_INSCRIBED_IN_IT.c
main
14
int main(void) { int n_success = 0; int param0[] = {669,18,83,39,68,28,71,14,21,73}; for(int i = 0; i < len(param0); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001F) { n_success+=1; } break; } printf("#Re...
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...