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
less-633#ch_prep#ch_setbufspace.c
less-633
ch.c
ch_setbufspace
12
void ch_setbufspace(int bufspace) { if (bufspace < 0) maxbufs = -1; else { int lbufk = 8192 / 1024; maxbufs = bufspace / lbufk + (bufspace % lbufk != 0); if (maxbufs < 1) maxbufs = 1; } }
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
units-2.22#units_prep#freefunction.c
units-2.22
units.c
freefunction
19
void freefunction(struct func *funcentry) { if (funcentry->table){ free(funcentry->table); free(funcentry->tableunit); } else { free(funcentry->forward.param); free(funcentry->forward.def); if (funcentry->forward.domain_min) free(funcentry->forward.domain_min); if (funcentry->forward.domain_...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 9, "memory_management": 12, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0...
transcoder-set#MAXIMUM_SUM_BITONIC_SUBARRAY_prep#main.c
transcoder-set
MAXIMUM_SUM_BITONIC_SUBARRAY.c
main
25
int main(void) { int n_success = 0; int param0_0[] = {7,12,16,23,26,27,39,39,40,44,57,58,77,78,81,82,84,86,91,94,94,95,97}; int param0_1[] = {72,38,-60,98,-52,-38,-2,94,34,56,90,46,6,-2,30,-96,-76,-96,-76,32,68,64,-32,-4,72,-62,58,20,-84,0,-96,70,-22,-56,70,-74,-90,-86,-14,82,-90,40,-64,94}; int param0_2[] = {0...
{ "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,...
findutils-4.9.0#pred_prep#pred_newer.c
findutils-4.9.0
pred.c
pred_newer
7
_Bool pred_newer (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) { (void) pathname; ((void) sizeof ((COMP_GT == pred_ptr->args.reftime.kind) ? 1 : 0), __extension__ ({ if (COMP_GT == pred_ptr->args.reftime.kind) ; else __assert_fail ("COMP_GT == pred_ptr->args.reftime.kind", "pred.c", 621,...
{ "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": 2,...
uucp-1.07#buffer_prep#zbufcpy.c
uucp-1.07
buffer.c
zbufcpy
13
char * zbufcpy (z) const char *z; { size_t csize; char *zret; if (z == ((void *)0)) return ((void *)0); csize = strlen (z) + 1; zret = zbufalc (csize); memcpy (zret, z, csize); return zret; }
{ "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": 1, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
transcoder-set#SWAP_BITS_IN_A_GIVEN_NUMBER_prep#cmpfunc.c
transcoder-set
SWAP_BITS_IN_A_GIVEN_NUMBER.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,...
transcoder-set#FIND_MINIMUM_NUMBER_OF_COINS_THAT_MAKE_A_CHANGE_1_prep#f_gold.c
transcoder-set
FIND_MINIMUM_NUMBER_OF_COINS_THAT_MAKE_A_CHANGE_1.c
f_gold
18
int f_gold ( int coins [ ], int m, int V ) { int table [ V + 1 ]; table [ 0 ] = 0; for ( int i = 1; i <= V; i ++ ) table [ i ] = 0x7fffffff; for ( int i = 1; i <= V; i ++ ) { for ( int j = 0; j < m; j ++ ) if ( coins [ j ] <= i ) { int sub_res = table [ i - coins [ j ] ]; if ( su...
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 3, "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": 0,...
transcoder-set#DISTRIBUTING_M_ITEMS_CIRCLE_SIZE_N_STARTING_K_TH_POSITION_prep#f_filled.c
transcoder-set
DISTRIBUTING_M_ITEMS_CIRCLE_SIZE_N_STARTING_K_TH_POSITION.c
f_filled
1
int f_filled ( int n, int m, int k ) {}
{ "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,...
mcsim-6.2.0#simo_prep#NextOutputTime.c
mcsim-6.2.0
simo.c
NextOutputTime
11
void NextOutputTime (PEXPERIMENT pexp, PDOUBLE pdTout, PINT piOut) { if (pexp->dTime < pexp->dTfinal) { if (++*piOut < pexp->os.cDistinctTimes) { *pdTout = pexp->os.rgdDistinctTimes[*piOut]; } else { *pdTout = pexp->dTfinal; } } }
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
make-4.4.1#file_prep#file_timestamp_sprintf.c
make-4.4.1
file.c
file_timestamp_sprintf
24
void file_timestamp_sprintf (char *p, uintmax_t ts) { time_t t = (((ts) - (2 + 1)) >> (1 ? 30 : 0)); struct tm *tm = localtime (&t); if (tm) { intmax_t year = tm->tm_year; sprintf (p, "%04" "l" "d" "-%02d-%02d %02d:%02d:%02d", year + 1900, tm->tm_mon + 1, tm->tm_mday, ...
{ "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": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 1,...
transcoder-set#COUNT_PALINDROME_SUB_STRINGS_STRING_prep#len.c
transcoder-set
COUNT_PALINDROME_SUB_STRINGS_STRING.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,...
pth-2.0.7#pth_ring_prep#__pth_ring_pop.c
pth-2.0.7
pth_ring.c
__pth_ring_pop
8
pth_ringnode_t *__pth_ring_pop(pth_ring_t *r) { pth_ringnode_t *rn; rn = ((r) == ((void *)0) ? ((void *)0) : (r)->r_hook); if (rn != ((void *)0)) __pth_ring_delete(r, rn); return rn; }
{ "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": 0, "switch_statement": 0, "type_casting": 2,...
mtools-4.0.43#file_prep#OpenRoot.c
mtools-4.0.43
file.c
OpenRoot
21
Stream_t *OpenRoot(Stream_t *Dir) { unsigned int num; direntry_t entry; uint32_t size; Stream_t *file; memset(&entry, 0, sizeof(direntry_t)); num = fat32RootCluster(Dir); entry.entry = -3; entry.name[0] = '\0'; mk_entry_from_base("/", 0x10, num, 0, 0, &entry.dir); if(num) size = countBytes(Dir, num); else ...
{ "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": 1, "pointer_type": 2, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#libxml2-py_prep#libxml_xmlUCSIsKannada.c
libxml2
libxml2-py.c
libxml_xmlUCSIsKannada
13
PyObject * libxml_xmlUCSIsKannada(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsKannada") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSIsKannada", &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,...
buffer-0.4.0#buffer_prep#buffer_resize.c
buffer-0.4.0
buffer.c
buffer_resize
9
int buffer_resize(buffer_t *self, size_t n) { n = (((n) + ((1024) - 1)) & ~((1024) - 1)); self->len = n; self->alloc = self->data = realloc(self->alloc, n + 1); if (!self->alloc) return -1; self->alloc[n] = '\0'; return 0; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 1, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#PYTHAGOREAN_QUADRUPLE_prep#len.c
transcoder-set
PYTHAGOREAN_QUADRUPLE.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,...
tmux#status_prep#status_message_clear.c
tmux
status.c
status_message_clear
12
void status_message_clear(struct client *c) { if (c->message_string == ((void *)0)) return; free(c->message_string); c->message_string = ((void *)0); if (c->prompt_string == ((void *)0)) c->tty.flags &= ~(0x1|0x2); c->flags |= 0x8; screen_reinit(&c->status.status); }
{ "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": 1, "switch_statement": 0, "type_casting": 3,...
transcoder-set#EVEN_FIBONACCI_NUMBERS_SUM_prep#cmpfunc.c
transcoder-set
EVEN_FIBONACCI_NUMBERS_SUM.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,...
brotli-1.0.9#memory_prep#BrotliWipeOutMemoryManager.c
brotli-1.0.9
memory.c
BrotliWipeOutMemoryManager
3
void BrotliWipeOutMemoryManager(MemoryManager* m) { (void)(m); }
{ "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#PROGRAM_CIRCUMFERENCE_PARALLELOGRAM_prep#min.c
transcoder-set
PROGRAM_CIRCUMFERENCE_PARALLELOGRAM.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,...
binn-3.0#binn_prep#binn_create_map.c
binn-3.0
binn.c
binn_create_map
3
BOOL binn_create_map(binn *map) { return binn_create(map, 0xE1, 0, ((void *)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_uri_prep#osip_uri_get_port.c
libosip2-5.3.1
osip_uri.c
osip_uri_get_port
5
char *osip_uri_get_port(osip_uri_t *url) { if (url == ((void *)0)) return ((void *)0); return url->port; }
{ "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,...
patch-2.7.6#quotearg_prep#quotearg_custom_mem.c
patch-2.7.6
quotearg.c
quotearg_custom_mem
7
char * quotearg_custom_mem (char const *left_quote, char const *right_quote, char const *arg, size_t argsize) { return quotearg_n_custom_mem (0, left_quote, right_quote, arg, argsize); }
{ "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,...
gawk-5.2.2#builtin_prep#do_sprintf.c
gawk-5.2.2
builtin.c
do_sprintf
11
NODE * do_sprintf(int nargs) { NODE *r; if (nargs == 0) (*(set_loc("builtin.c", 1767), r_fatal))(gettext("sprintf: no arguments")); r = printf_common(nargs); if (r == ((void *)0)) gawk_exit(2); return r; }
{ "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": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libxml2#parser_prep#xmlParseEndTag.c
libxml2
parser.c
xmlParseEndTag
4
void xmlParseEndTag(xmlParserCtxtPtr ctxt) { xmlParseEndTag1(ctxt, 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,...
gprolog-1.5.0#term_inl_c_prep#Pl_Blt_Term_Lte.c
gprolog-1.5.0
term_inl_c.c
Pl_Blt_Term_Lte
5
Bool Pl_Blt_Term_Lte(WamWord x, WamWord y) { return Pl_Term_Compare(x, y) <= 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": 0,...
libxml2#xmlmemory_prep#xmlMemRealloc.c
libxml2
xmlmemory.c
xmlMemRealloc
30
void * xmlMemRealloc(void *ptr, size_t size) { MEMHDR *p, *tmp; size_t oldSize; if (ptr == ((void *)0)) return(xmlMemMalloc(size)); xmlInitParser(); if (size > (((size_t)-1) - (((sizeof(MEMHDR) + sizeof(double) - 1) / sizeof(double) ) * sizeof(double)))) return(((void *)0)); p = ...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 1, "memory_operation": 0, "pointer_type": 2, "return_statement": 5, "struct_type": 0, "switch_statement": 0, "type_casting": 8,...
transcoder-set#N_TH_TERM_SERIES_2_12_36_80_150_prep#min.c
transcoder-set
N_TH_TERM_SERIES_2_12_36_80_150.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,...
uucp-1.07#unknwn_prep#fsysdep_unknown_caller.c
uucp-1.07
unknwn.c
fsysdep_unknown_caller
24
boolean fsysdep_unknown_caller (zscript, zsystem) const char *zscript; const char *zsystem; { const char *azargs[3]; int aidescs[3]; pid_t ipid; azargs[0] = zscript; azargs[1] = zsystem; azargs[2] = ((void *)0); aidescs[0] = (-1); aidescs[1] = (-1); aidescs[2] = (-1); ipid = ixsspawn (azar...
{ "array_type": 2, "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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
transcoder-set#NUMBER_IS_DIVISIBLE_BY_29_OR_NOT_prep#main.c
transcoder-set
NUMBER_IS_DIVISIBLE_BY_29_OR_NOT.c
main
14
int main(void) { int n_success = 0; long param0[] = {50,11,65,32,8,54,7,44,34,63}; 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 0...
{ "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,...
libxml2#xmlunicode_prep#xmlUCSIsCJKCompatibility.c
libxml2
xmlunicode.c
xmlUCSIsCJKCompatibility
4
int xmlUCSIsCJKCompatibility(int code) { return(((code >= 0x3300) && (code <= 0x33FF))); }
{ "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_unquoted_keys_prep#json_value_as_object.c
json.h
allow_unquoted_keys.c
json_value_as_object
6
struct json_object_s *json_value_as_object(struct json_value_s *const value) { if (value->type != json_type_object) { return 0; } return (struct json_object_s *)value->payload; }
{ "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": 1, "switch_statement": 0, "type_casting": 1,...
nettle-3.9.1#gmp-glue_prep#_nettle_sec_zero_p.c
nettle-3.9.1
gmp-glue.c
_nettle_sec_zero_p
9
int _nettle_sec_zero_p (const mp_limb_t *ap, mp_size_t n) { volatile mp_limb_t w; mp_size_t i; for (i = 0, w = 0; i < n; i++) w |= ap[i]; return w == 0; }
{ "array_type": 1, "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#FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY_prep#cmpfunc.c
transcoder-set
FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY.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,...
transcoder-set#EVEN_FIBONACCI_NUMBERS_SUM_prep#f_gold.c
transcoder-set
EVEN_FIBONACCI_NUMBERS_SUM.c
f_gold
13
int f_gold ( int limit ) { if ( limit < 2 ) return 0; long long int ef1 = 0, ef2 = 2; long long int sum = ef1 + ef2; while ( ef2 <= limit ) { long long int ef3 = 4 * ef2 + ef1; if ( ef3 > limit ) break; ef1 = ef2; ef2 = ef3; sum += ef2; } return sum; }
{ "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": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
tar-1.34#warning_prep#set_warning_option.c
tar-1.34
warning.c
set_warning_option
21
void set_warning_option (const char *arg) { int negate = 0; int option; if (strcmp (arg, "none") == 0) { warning_option = 0; return; } if (strlen (arg) > 2 && memcmp (arg, "no-", 3) == 0) { negate = 1; arg += 3; } option = ((warning_types) [__xargmatch_internal ("--warn...
{ "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": 0,...
transcoder-set#NUMBER_WHICH_HAS_THE_MAXIMUM_NUMBER_OF_DISTINCT_PRIME_FACTORS_IN_RANGE_M_TO_N_prep#len.c
transcoder-set
NUMBER_WHICH_HAS_THE_MAXIMUM_NUMBER_OF_DISTINCT_PRIME_FACTORS_IN_RANGE_M_TO_N.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#CHECK_POSSIBLE_TRANSFORM_ONE_STRING_ANOTHER_prep#f_filled.c
transcoder-set
CHECK_POSSIBLE_TRANSFORM_ONE_STRING_ANOTHER.c
f_filled
1
_Bool f_filled ( char s1 [], char s2 [] ) {}
{ "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#LONGEST_PREFIX_ALSO_SUFFIX_1_prep#sort.c
transcoder-set
LONGEST_PREFIX_ALSO_SUFFIX_1.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,...
tmux#log_prep#log_open.c
tmux
log.c
log_open
15
void log_open(const char *name) { char *path; if (log_level == 0) return; log_close(); xasprintf(&path, "tmux-%s-%ld.log", name, (long)getpid()); log_file = fopen(path, "a"); free(path); if (log_file == ((void *)0)) return; setvbuf(log_file, ((void *)0), 1, 0); event_set_log_callback(log_event_cb); }
{ "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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
transcoder-set#MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_2_prep#f_filled.c
transcoder-set
MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_2.c
f_filled
1
int f_filled ( int a, int b, int c ) {}
{ "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,...
libxml2#parser_prep#namePush.c
libxml2
parser.c
namePush
22
int namePush(xmlParserCtxtPtr ctxt, const xmlChar * value) { if (ctxt == ((void *)0)) return (-1); if (ctxt->nameNr >= ctxt->nameMax) { const xmlChar * *tmp; tmp = (const xmlChar * *) xmlRealloc((xmlChar * *)ctxt->nameTab, ctxt->nameMax * 2 * ...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 1, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
transcoder-set#PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_2_prep#sort.c
transcoder-set
PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_2.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,...
libxml2#tree_prep#xmlNodeAddContent.c
libxml2
tree.c
xmlNodeAddContent
4
int xmlNodeAddContent(xmlNodePtr cur, const xmlChar *content) { return(xmlNodeAddContentLen(cur, content, xmlStrlen(content))); }
{ "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#entities_prep#xmlGetPredefinedEntity.c
libxml2
entities.c
xmlGetPredefinedEntity
27
xmlEntityPtr xmlGetPredefinedEntity(const xmlChar *name) { if (name == ((void *)0)) return(((void *)0)); switch (name[0]) { case 'l': if (xmlStrEqual(name, (xmlChar *) "lt")) return(&xmlEntityLt); break; case 'g': if (xmlStrEqual(name, (xmlChar *) "gt")) return(&...
{ "array_type": 1, "break_continue_statement": 5, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 7, "struct_type": 0, "switch_statement": 1, "type_casting": 2,...
json.h#allow_leading_plus_sign_prep#utest_run_allow_leading_plus_sign_read_write_pretty_read.c
json.h
allow_leading_plus_sign.c
utest_run_allow_leading_plus_sign_read_write_pretty_read
7
void utest_run_allow_leading_plus_sign_read_write_pretty_read(int *utest_result, struct allow_leading_plus_sign *utest_fixture) { size_t size = 0; void *json = json_write_pretty(utest_fixture->value, " ", "\n", &size); free(utest_fixture->value); utest_fixture->value = json_parse(json, size - 1); free(json);...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 2, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
tinycc#tccgen_prep#vrott.c
tinycc
tccgen.c
vrott
4
void vrott(int n) { vrote(vtop, 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#LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S_prep#cmpfunc.c
transcoder-set
LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S.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,...
transcoder-set#CASSINIS_IDENTITY_prep#max.c
transcoder-set
CASSINIS_IDENTITY.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,...
gawk-5.2.2#awkgram_prep#parse_program.c
gawk-5.2.2
awkgram.c
parse_program
42
int parse_program(INSTRUCTION **pcode, _Bool from_eval) { int ret; called_from_eval = from_eval; ip_end = bcalloc(Op_no_op, 1, 0); if (! in_main_context()) ip_newfile = ip_rec = ip_atexit = ip_beginfile = ip_endfile = ((void *)0); else { ip_endfile = bcalloc(Op_no_op, 1, 0); main_beginfile = ip_beginfile = b...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 1, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 7,...
transcoder-set#EQUILIBRIUM_INDEX_OF_AN_ARRAY_1_prep#sort.c
transcoder-set
EQUILIBRIUM_INDEX_OF_AN_ARRAY_1.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,...
nettle-3.9.1#aes-encrypt_prep#nettle_aes_encrypt.c
nettle-3.9.1
aes-encrypt.c
nettle_aes_encrypt
19
void nettle_aes_encrypt(const struct aes_ctx *ctx, size_t length, uint8_t *dst, const uint8_t *src) { switch (ctx->key_size) { default: abort(); case 16: nettle_aes128_encrypt(&ctx->u.ctx128, length, dst, src); break; case 24: nettle_aes192_encrypt(&ctx->u.ctx192, length, d...
{ "array_type": 0, "break_continue_statement": 3, "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": 1, "type_casting": 0,...
libxml2#libxml2-py_prep#libxml_xmlXPathModValues.c
libxml2
libxml2-py.c
libxml_xmlXPathModValues
11
PyObject * libxml_xmlXPathModValues(PyObject *self __attribute__ ((__unused__)), PyObject *args) { xmlXPathParserContextPtr ctxt; PyObject *pyobj_ctxt; if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlXPathModValues", &pyobj_ctxt)) return(((void *)0)); ctxt = (xmlXPathParserContextPtr) (((pyobj_...
{ "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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
wget-1.21.4#utils_prep#run_with_timeout.c
wget-1.21.4
utils.c
run_with_timeout
26
_Bool run_with_timeout (double timeout, void (*fun) (void *), void *arg) { int saved_errno; if (timeout == 0) { fun (arg); return 0; } if (__sigsetjmp (run_with_timeout_env, 1) != 0) { signal (14, ((__sighandler_t) 0)); return 1; } else { signal (14, abort_run_w...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 1, "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": 1,...
transcoder-set#COUNT_NUMBERS_THAT_DONT_CONTAIN_3_prep#min.c
transcoder-set
COUNT_NUMBERS_THAT_DONT_CONTAIN_3.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,...
tmux#tty-term_prep#tty_term_string2.c
tmux
tty-term.c
tty_term_string2
5
const char * tty_term_string2(struct tty_term *term, enum tty_code_code code, int a, int b) { return (tparm((char *) tty_term_string(term, code), a, b, 0, 0, 0, 0, 0, 0, 0)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 1, "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": 1,...
uucp-1.07#xqtsub_prep#fsysdep_lock_uuxqt_dir.c
uucp-1.07
xqtsub.c
fsysdep_lock_uuxqt_dir
22
boolean fsysdep_lock_uuxqt_dir (iseq) int iseq; { const char *zxqtdir; char abxqtdir[sizeof ".Xqtdir" + 4]; if (iseq == 0) zxqtdir = ".Xqtdir"; else { sprintf (abxqtdir, "%s%04d", ".Xqtdir", iseq); zxqtdir = abxqtdir; } if (mkdir (zxqtdir, (0400|0200|0100)) < 0 && (*__errno_...
{ "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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libosip2-5.3.1#osip_port_prep#osip_strn_append.c
libosip2-5.3.1
osip_port.c
osip_strn_append
6
char *osip_strn_append(char *dst, const char *src, size_t len) { memmove((void *) dst, (void *) src, len); dst += len; *dst = '\0'; return dst; }
{ "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": 1, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
gprolog-1.5.0#wam2ma_prep#Inst_Printf.c
gprolog-1.5.0
wam2ma.c
Inst_Printf
13
void Inst_Printf(char *op, char *operands, ...) { va_list arg_ptr; __builtin_va_start(arg_ptr,operands); fprintf(file_out, "\t%-10s ", op); if (operands) { vfprintf(file_out, operands, arg_ptr); fputc('\n', file_out); } __builtin_va_end(arg_ptr); }
{ "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,...
gawk-5.2.2#mpfr_prep#do_mpfr_sin.c
gawk-5.2.2
mpfr.c
do_mpfr_sin
5
NODE * do_mpfr_sin(int nargs) { NODE *result; result = do_mpfr_func("sin", mpfr_sin, nargs, 0); return result; }
{ "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": 0,...
libxml2#libxml2-py_prep#libxml_xmlUCSIsMalayalam.c
libxml2
libxml2-py.c
libxml_xmlUCSIsMalayalam
13
PyObject * libxml_xmlUCSIsMalayalam(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsMalayalam") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSIsMalayalam", &co...
{ "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,...
libxml2#xmlunicode_prep#xmlUCSIsLatin1Supplement.c
libxml2
xmlunicode.c
xmlUCSIsLatin1Supplement
4
int xmlUCSIsLatin1Supplement(int code) { return(((code >= 0x0080) && (code <= 0x00FF))); }
{ "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,...
less-633#filename_prep#dirfile.c
less-633
filename.c
dirfile
26
char * dirfile(char *dirname, char *filename, int must_exist) { char *pathname; int len; int f; if (dirname == ((void *)0) || *dirname == '\0') return (((void *)0)); len = (int) (strlen(dirname) + strlen(filename) + 2); pathname = (char *) calloc(len, sizeof(char)); if (pathname == ((void *)0)) return (((voi...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 2, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 7,...
libosip2-5.3.1#osip_uri_prep#osip_uri_set_host.c
libosip2-5.3.1
osip_uri.c
osip_uri_set_host
5
void osip_uri_set_host(osip_uri_t *url, char *host) { if (url == ((void *)0)) return; url->host = host; }
{ "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": 1,...
wget-1.21.4#utils_prep#accept_url.c
wget-1.21.4
utils.c
accept_url
9
_Bool accept_url (const char *s) { if (opt.acceptregex && !opt.regex_match_fun (opt.acceptregex, s)) return 0; if (opt.rejectregex && opt.regex_match_fun (opt.rejectregex, s)) return 0; return 1; }
{ "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": 0,...
libxml2#valid_prep#xmlValidateAttributeValue.c
libxml2
valid.c
xmlValidateAttributeValue
4
int xmlValidateAttributeValue(xmlAttributeType type, const xmlChar *value) { return(xmlValidateAttributeValueInternal(((void *)0), type, 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": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
nettle-3.9.1#sha3-512_prep#nettle_sha3_512_update.c
nettle-3.9.1
sha3-512.c
nettle_sha3_512_update
9
void nettle_sha3_512_update (struct sha3_512_ctx *ctx, size_t length, const uint8_t *data) { ctx->index = _nettle_sha3_update (&ctx->state, 72, ctx->block, ctx->index, length, data); }
{ "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#COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_prep#min.c
transcoder-set
COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X.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,...
gawk-5.2.2#profile_prep#redir2str.c
gawk-5.2.2
profile.c
redir2str
16
const char * redir2str(int redirtype) { static const char *const redirtab[] = { "", " > ", " >> ", " | ", " | ", " < ", " |& ", }; if (redirtype < 0 || redirtype > redirect_twoway) (*(set_loc("profile.c", 2052), r_fatal))(gettext("redir2str: unknown redirection type %d"), redirtype); return redirtab...
{ "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": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#SMALLEST_DIFFERENCE_PAIR_VALUES_TWO_UNSORTED_ARRAYS_prep#f_filled.c
transcoder-set
SMALLEST_DIFFERENCE_PAIR_VALUES_TWO_UNSORTED_ARRAYS.c
f_filled
1
int f_filled ( int A [ ], int B [ ], int m, 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,...
tulipindicators-0.9.1#tiamalgamation_prep#ti_wad.c
tulipindicators-0.9.1
tiamalgamation.c
ti_wad
24
int ti_wad(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]; (void)options; if (size <= ti_wad_start(options)) return 0; double *output = outputs[0]; double s...
{ "array_type": 5, "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": 4, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
indent-2.2.13#utils_prep#DieError.c
indent-2.2.13
utils.c
DieError
11
extern void DieError( int errval, const char * fmt, ...) { va_list ap; __builtin_va_start(ap,fmt); vfprintf(stderr, fmt, ap); __builtin_va_end(ap); do_exit(errval); }
{ "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#ema_prep#ti_ema.c
tulipindicators-0.9.1
ema.c
ti_ema
17
int ti_ema(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *input = inputs[0]; const int period = (int)options[0]; double *output = outputs[0]; if (period < 1) return 1; if (size <= ti_ema_start(options)) return 0; const double per = 2 / ((dou...
{ "array_type": 4, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
bc-1.07.1#numeric_prep#dc_math_init.c
bc-1.07.1
numeric.c
dc_math_init
5
void dc_math_init (void) { bc_init_numbers(); }
{ "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,...
heman#quaternion_prep#kmQuaternionRotationPitchYawRoll.c
heman
quaternion.c
kmQuaternionRotationPitchYawRoll
20
kmQuaternion* kmQuaternionRotationPitchYawRoll(kmQuaternion* pOut, float pitch, float yaw, float roll) { ((void) sizeof ((pitch <= 2*3.14159265358979323846f) ? 1 : 0), __extension__ ({ if (pitch <= 2*3.141592...
{ "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,...
cflow-1.7#basename-lgpl_prep#last_component.c
cflow-1.7
basename-lgpl.c
last_component
20
char * last_component (char const *name) { char const *base = name + ((void) (name), 0); char const *p; _Bool last_was_slash = 0; while (((*base) == '/')) base++; for (p = base; *p; p++) { if (((*p) == '/')) last_was_slash = 1; else if (last_was_slash) { base = p;...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
less-633#line_prep#prewind.c
less-633
line.c
prewind
30
void prewind(void) { int ax; linebuf.print = 6; linebuf.pfx_end = 0; for (linebuf.end = 0; linebuf.end < linebuf.print; linebuf.end++) { linebuf.buf[linebuf.end] = '\0'; linebuf.attr[linebuf.end] = 0; } end_column = 0; right_curr = 0; right_column = 0; cshift = 0; overstrike = 0; last_overstrike = (0); ...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "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,...
mtools-4.0.43#directory_prep#low_level_dir_write.c
mtools-4.0.43
directory.c
low_level_dir_write
6
void low_level_dir_write(direntry_t *entry) { force_pwrite(entry->Dir, (char *) (&entry->dir), (mt_off_t) entry->entry * 32, 32); }
{ "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#MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_2_prep#cmpfunc.c
transcoder-set
MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_2.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,...
heman#quaternion_prep#kmQuaternionMultiply.c
heman
quaternion.c
kmQuaternionMultiply
16
extern kmQuaternion* kmQuaternionMultiply(kmQuaternion* pOut, const kmQuaternion* qu1, const kmQuaternion* qu2) { kmQuaternion tmp1, tmp2; kmQuaternionAssign(&tmp1, qu1); kmQuaternionAssign(&tmp2, qu2); kmQuaternion* q1 = &tmp1; kmQua...
{ "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,...
nettle-3.9.1#output_prep#sexp_output_hash_init.c
nettle-3.9.1
output.c
sexp_output_hash_init
8
void sexp_output_hash_init(struct sexp_output *output, const struct nettle_hash *hash, void *ctx) { output->hash = hash; output->ctx = ctx; hash->init(ctx); }
{ "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": 2, "switch_statement": 0, "type_casting": 0,...
nettle-3.9.1#pss-mgf1_prep#nettle_pss_mgf1.c
nettle-3.9.1
pss-mgf1.c
nettle_pss_mgf1
24
void nettle_pss_mgf1(const void *seed, const struct nettle_hash *hash, size_t length, uint8_t *mask) { uint8_t *h; void *state; size_t i; uint8_t c[4]; (h = __builtin_alloca (sizeof (*h) * (hash->digest_size))); (state = __builtin_alloca (hash->context_size)); for (i = 0;; i++, mask += hash->dige...
{ "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": 1, "pointer_type": 2, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
libxml2#xmlreader_prep#xmlTextReaderRelaxNGValidateCtxt.c
libxml2
xmlreader.c
xmlTextReaderRelaxNGValidateCtxt
7
int xmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader, xmlRelaxNGValidCtxtPtr ctxt, int options) { return(xmlTextReaderRelaxNGValidateInternal(reader, ((void *)0), ctxt, options)); }
{ "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,...
screen-4.9.0#list_generic_prep#glist_abort.c
screen-4.9.0
list_generic.c
glist_abort
4
void glist_abort(void) { ListAbort(); }
{ "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,...
tmux#window_prep#windows_RB_PREV.c
tmux
window.c
windows_RB_PREV
1
struct window * windows_RB_PREV(struct window *elm) { if ((elm)->entry.rbe_left) { elm = (elm)->entry.rbe_left; while ((elm)->entry.rbe_right) elm = (elm)->entry.rbe_right; } else { if ((elm)->entry.rbe_parent && (elm == ((elm)->entry.rbe_parent)->entry.rbe_right)) elm = (elm)->entry.rbe_parent; else { while ((elm)->en...
{ "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": 0,...
gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Fast_Popcount.c
gprolog-1.5.0
arith_inl_c.c
Pl_Fct_Fast_Popcount
6
WamWord Pl_Fct_Fast_Popcount(WamWord x) { PlLong vx = ((PlLong) ((x) << 0) >> 3); return (((PlULong) ((__builtin_popcountl(vx))) << 3) | (PlULong)0x7); }
{ "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,...
transcoder-set#FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY_1_prep#len.c
transcoder-set
FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_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#FIND_EQUAL_POINT_STRING_BRACKETS_prep#main.c
transcoder-set
FIND_EQUAL_POINT_STRING_BRACKETS.c
main
14
int main(void) { int n_success = 0; char param0[][100] = {"(())))(","))","((","))(()(()()(",")((()(()","))(()","()))","()","1100110","dhfSnebD"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } break; } print...
{ "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,...
libxml2#libxml2-py_prep#libxml_xmlCleanupCharEncodingHandlers.c
libxml2
libxml2-py.c
libxml_xmlCleanupCharEncodingHandlers
8
PyObject * libxml_xmlCleanupCharEncodingHandlers(PyObject *self __attribute__ ((__unused__)), PyObject *args __attribute__ ((__unused__))) { if (libxml_deprecationWarning("xmlCleanupCharEncodingHandlers") == -1) return(((void *)0)); xmlCleanupCharEncodingHandlers(); _Py_INCREF(((PyObject*)((&_Py_Non...
{ "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,...
json.h#allow_equals_in_object_prep#json_write_pretty.c
json.h
allow_equals_in_object.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,...
tmux#grid-view_prep#grid_view_scroll_region_up.c
tmux
grid-view.c
grid_view_scroll_region_up
19
void grid_view_scroll_region_up(struct grid *gd, u_int rupper, u_int rlower, u_int bg) { if (gd->flags & 0x1) { grid_collect_history(gd); if (rupper == 0 && rlower == gd->sy - 1) grid_scroll_history(gd, bg); else { rupper = ((gd)->hsize + (rupper)); rlower = ((gd)->hsize + (rlower)); grid_scroll_...
{ "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": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
libosip2-5.3.1#sdp_accessor_prep#sdp_message_a_att_field_get.c
libosip2-5.3.1
sdp_accessor.c
sdp_message_a_att_field_get
6
char *sdp_message_a_att_field_get(sdp_message_t *sdp, int pos_media, int pos) { sdp_attribute_t *attr = sdp_message_attribute_get(sdp, pos_media, pos); if (attr == ((void *)0)) return ((void *)0); return attr->a_att_field; }
{ "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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
transcoder-set#C_PROGRAM_FACTORIAL_NUMBER_2_prep#max.c
transcoder-set
C_PROGRAM_FACTORIAL_NUMBER_2.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,...
json.h#allow_unquoted_keys_prep#json_extract_value_ex.c
json.h
allow_unquoted_keys.c
json_extract_value_ex
23
struct json_value_s *json_extract_value_ex(const struct json_value_s *value, void *(*alloc_func_ptr)(void *, size_t), void *user_data) { void *allocation; struct j...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 1, "goto_statement": 0, "if_statement": 2, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 1, "switch_statement": 0, "type_casting": 2,...
nettle-3.9.1#sha512_prep#nettle_sha512_256_init.c
nettle-3.9.1
sha512.c
nettle_sha512_256_init
14
void nettle_sha512_256_init(struct sha512_ctx *ctx) { static const uint64_t H0[8] = { 0x22312194fc2bf72cULL, 0x9f555fa3c84c64c2ULL, 0x2393b86b6f53b151ULL, 0x963877195940eabdULL, 0x96283ee2a88effe3ULL, 0xbe5e1e2553863992ULL, 0x2b0199fc2c85b8aaULL, 0x0eb72ddc81c52ca2ULL, }; memcpy(ctx-...
{ "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": 1, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
units-2.22#units_prep#compareproducts.c
units-2.22
units.c
compareproducts
22
int compareproducts(char **one, char **two, int (*isdimless)(char *name)) { int oneblank, twoblank; while (*one || *two) { oneblank = (*one==NULLUNIT) || isdimless(*one); twoblank = (*two==NULLUNIT) || isdimless(*two); if (!*one && !twoblank) return 1; if (!*two && !oneblank) ...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 1, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#valid_prep#xmlFreeDocElementContent.c
libxml2
valid.c
xmlFreeDocElementContent
53
void xmlFreeDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) { xmlDictPtr dict = ((void *)0); size_t depth = 0; if (cur == ((void *)0)) return; if (doc != ((void *)0)) dict = doc->dict; while (1) { xmlElementContentPtr parent; while ((cur->c1 != ((void *)0))...
{ "array_type": 0, "break_continue_statement": 2, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 10, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 1, "type_casting": 1...
transcoder-set#MEDIAN_OF_TWO_SORTED_ARRAYS_prep#main.c
transcoder-set
MEDIAN_OF_TWO_SORTED_ARRAYS.c
main
35
int main(void) { int n_success = 0; int param0_0[] = {2,6,18,21,23,27,44,44,69,72,78,88,90,98}; int param0_1[] = {90,54,24,-10,-84,-74,58,96,-28,-92,-18,90,70,-60,72,78,10,42,-2,-18,-38,-16,18,-86,40,-46,-38,66,20,-16,48}; int param0_2[] = {0,1,1}; int param0_3[] = {53,17,94,21,16,75,67,51,44,71,65,82}; int par...
{ "array_type": 3, "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": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
gawk-5.2.2#array_prep#array_vname.c
gawk-5.2.2
array.c
array_vname
52
const char * array_vname(const NODE *symbol) { static char *message = ((void *)0); static size_t msglen = 0; char *s; size_t len; int n; const NODE *save_symbol = symbol; const char *from = gettext("from %s"); const char *aname; if (symbol->type != Node_array_ref || symbol->sub.nodep.l.lptr->type != Node_va...
{ "array_type": 0, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "memory_management": 0, "memory_operation": 0, "pointer_type": 5, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 6,...
transcoder-set#COUNT_DIGITS_FACTORIAL_SET_1_prep#cmpfunc.c
transcoder-set
COUNT_DIGITS_FACTORIAL_SET_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,...