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, "union_type": 0, "while_loop": 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_max) free(funcentry->forward.domain_max); if (funcentry->inverse.domain_min) free(funcentry->inverse.domain_min); if (funcentry->inverse.domain_max) free(funcentry->inverse.domain_max); if (funcentry->forward.dimen) free(funcentry->forward.dimen); if (funcentry->inverse.dimen) free(funcentry->inverse.dimen); if (funcentry->inverse.def) free(funcentry->inverse.def); if (funcentry->inverse.param) free(funcentry->inverse.param); } }
{ "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, "union_type": 0, "while_loop": 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,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,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {69,31,85,84,28,28}; int param0_4[] = {-80,-74,-24,-22,-22,4,20,28,30,32,36,58,58,68,92,94,98}; int param0_5[] = {1,1,0,0,0,1,0,1,1,1,1}; int param0_6[] = {2,2,2,4,6,7,8,10,15,17,19,20,21,27,28,29,32,32,40,44,46,47,49,50,50,52,55,56,58,59,64,69,73,74,74,77,80,80,84,89,91,95,96,96,97,98,98,99}; int param0_7[] = {26,-86,8,64,-40,64,60,-16,54,-42,-86,14,-48,-20,-42,-4,-34,-52,-74,22,10}; int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_9[] = {8,5,5,56,5,38}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {13,37,33,5,16,10,46,18,27,3}; 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; } printf("#Results:", " ", n_success, ", ", len(param0)); return 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, "union_type": 0, "while_loop": 0 }
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, __extension__ __PRETTY_FUNCTION__); })); return compare_ts (get_stat_mtime(stat_buf), pred_ptr->args.reftime.ts) > 0; }
{ "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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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 ( sub_res != 0x7fffffff && sub_res + 1 < table [ i ] ) table [ i ] = sub_res + 1; } } return table [ V ]; }
{ "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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 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, tm->tm_hour, tm->tm_min, tm->tm_sec); } else if (t < 0) sprintf (p, "%" "l" "d", (intmax_t) t); else sprintf (p, "%" "l" "u", (uintmax_t) t); p += strlen (p); sprintf (p, ".%09d", ((int) (((ts) - (2 + 1)) & ((1 << (1 ? 30 : 0)) - 1)))); p += strlen (p) - 1; while (*p == '0') p--; p += *p != '.'; *p = '\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": 1, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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 { Fs_t *Fs = (Fs_t *) GetFs(Dir); size = Fs->dir_len * Fs->sector_size; } file = _internalFileOpen(Dir, num, size, &entry); bufferize(&file); return file; }
{ "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, "union_type": 0, "while_loop": 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)) return(((void *)0)); c_retval = xmlUCSIsKannada(code); py_retval = libxml_intWrap((int) c_retval); return(py_retval); }
{ "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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 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 = ((void *) (((char *) (ptr)) - (((sizeof(MEMHDR) + sizeof(double) - 1) / sizeof(double) ) * sizeof(double)))); if (p->mh_tag != 0x5aa5U) { xmlPrintErrorMessage("xmlMemRealloc: Tag error\n"); return(((void *)0)); } oldSize = p->mh_size; p->mh_tag = ~0x5aa5U; tmp = (MEMHDR *) realloc(p, (((sizeof(MEMHDR) + sizeof(double) - 1) / sizeof(double) ) * sizeof(double)) + size); if (!tmp) { p->mh_tag = 0x5aa5U; return(((void *)0)); } p = tmp; p->mh_tag = 0x5aa5U; p->mh_size = size; xmlMutexLock(&xmlMemMutex); debugMemSize -= oldSize; debugMemSize += size; xmlMutexUnlock(&xmlMemMutex); return(((void *) (((char *) (p)) + (((sizeof(MEMHDR) + sizeof(double) - 1) / sizeof(double) ) * sizeof(double))))); }
{ "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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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 (azargs, aidescs, (1), (1), (const char *) ((void *)0), (0), (1), (const char *) ((void *)0), (const char *) ((void *)0), (const char *) ((void *)0)); if (ipid < 0) { ulog (LOG_ERROR, "ixsspawn: %s", strerror ((*__errno_location ()))); return (0); } return ixswait ((unsigned long) ipid, (const char *) ((void *)0)) != 0; }
{ "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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 1 }
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 ("--warning", arg, warning_args, (void const *) (warning_types), sizeof *(warning_types), argmatch_die)]); if (negate) warning_option &= ~option; else warning_option |= option; }
{ "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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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 * sizeof(ctxt->nameTab[0])); if (tmp == ((void *)0)) { goto mem_error; } ctxt->nameTab = tmp; ctxt->nameMax *= 2; } ctxt->nameTab[ctxt->nameNr] = value; ctxt->name = value; return (ctxt->nameNr++); mem_error: xmlErrMemory(ctxt); return (-1); }
{ "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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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(&xmlEntityGt); break; case 'a': if (xmlStrEqual(name, (xmlChar *) "amp")) return(&xmlEntityAmp); if (xmlStrEqual(name, (xmlChar *) "apos")) return(&xmlEntityApos); break; case 'q': if (xmlStrEqual(name, (xmlChar *) "quot")) return(&xmlEntityQuot); break; default: break; } return(((void *)0)); }
{ "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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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 = bcalloc(Op_no_op, 1, 0); ip_rec = bcalloc(Op_get_record, 1, 0); ip_newfile = bcalloc(Op_newfile, 2, 0); ip_newfile->d.di = ip_end; ip_newfile->x.xi = ip_endfile; (ip_newfile + 1)->x.xi = ip_rec; ip_rec->d.di = ip_newfile; ip_atexit = bcalloc(Op_atexit, 1, 0); } for (sourcefile = srcfiles->next; sourcefile->stype == SRC_EXTLIB; sourcefile = sourcefile->next) ; lexeof = 0; lexptr = ((void *)0); lasttok = 0; memset(rule_block, 0, sizeof(rule_block)); errcount = 0; tok = tokstart != ((void *)0) ? tokstart : tokexpand(); ret = yyparse(); *pcode = mk_program(); source = ((void *)0); sourceline = 0; if (ret == 0) check_funcs(); if ((do_flags & DO_POSIX) && ! check_param_names()) errcount++; if (args_array == ((void *)0)) (void) (args_array = (NODE **) emalloc_real((size_t)((max_args + 2) * sizeof(NODE *)), "parse_program", "args_array", "awkgram.y", 2819)); else (void) (args_array = (NODE **) erealloc_real((void *) args_array, (size_t)((max_args + 2) * sizeof(NODE *)), "parse_program", "args_array", "awkgram.y", 2821)); return (ret || errcount); }
{ "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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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, dst, src); break; case 32: nettle_aes256_encrypt(&ctx->u.ctx256, length, dst, src); break; } }
{ "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, "union_type": 0, "while_loop": 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_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlXPathParserContext_Object *)(pyobj_ctxt))->obj)); xmlXPathModValues(ctxt); _Py_INCREF(((PyObject*)((&_Py_NoneStruct)))); return((&_Py_NoneStruct)); }
{ "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, "union_type": 0, "while_loop": 0 }
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_with_timeout); } alarm_set (timeout); fun (arg); saved_errno = (*__errno_location ()); alarm_cancel (); signal (14, ((__sighandler_t) 0)); (*__errno_location ()) = saved_errno; return 0; }
{ "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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 0 }
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_location ()) != 17 && (*__errno_location ()) != 21) { ulog (LOG_ERROR, "mkdir (%s): %s", zxqtdir, strerror ((*__errno_location ()))); return (0); } return fclean_uuxqt_dir (zxqtdir); }
{ "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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 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", &code)) return(((void *)0)); c_retval = xmlUCSIsMalayalam(code); py_retval = libxml_intWrap((int) c_retval); return(py_retval); }
{ "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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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 (((void *)0)); snprintf((pathname), (len), ("%s%s%s"), (dirname), ("/"), (filename)); if (must_exist) { f = open(pathname, (00)); if (f < 0) { free(pathname); pathname = ((void *)0); } else { close(f); } } return (pathname); }
{ "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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 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[redirtype]; }
{ "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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 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 sum = 0; double yc = close[0]; int i; for (i = 1; i < size; ++i) { const double c = close[i]; if (c > yc) { sum += c - ((yc)<(low[i])?(yc):(low[i])); } else if (c < yc) { sum += c - ((yc)>(high[i])?(yc):(high[i])); } else { } *output++ = sum; yc = close[i]; } ((void) sizeof ((output - outputs[0] == size - ti_wad_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_wad_start(options)) ; else __assert_fail ("output - outputs[0] == size - ti_wad_start(options)", "tiamalgamation.c", 4185, __extension__ __PRETTY_FUNCTION__); })); return 0; }
{ "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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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 / ((double)period + 1); double val = input[0]; *output++ = val; int i; for (i = 1; i < size; ++i) { val = (input[i]-val) * per + val; *output++ = val; } ((void) sizeof ((output - outputs[0] == size - ti_ema_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_ema_start(options)) ; else __assert_fail ("output - outputs[0] == size - ti_ema_start(options)", "indicators/ema.c", 54, __extension__ __PRETTY_FUNCTION__); })); return 0; }
{ "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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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.14159265358979323846f) ; else __assert_fail ("pitch <= 2*kmPI", "/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/heman/kazmath/quaternion.c", 334, __extension__ __PRETTY_FUNCTION__); })); ((void) sizeof ((yaw <= 2*3.14159265358979323846f) ? 1 : 0), __extension__ ({ if (yaw <= 2*3.14159265358979323846f) ; else __assert_fail ("yaw <= 2*kmPI", "/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/heman/kazmath/quaternion.c", 335, __extension__ __PRETTY_FUNCTION__); })); ((void) sizeof ((roll <= 2*3.14159265358979323846f) ? 1 : 0), __extension__ ({ if (roll <= 2*3.14159265358979323846f) ; else __assert_fail ("roll <= 2*kmPI", "/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/heman/kazmath/quaternion.c", 336, __extension__ __PRETTY_FUNCTION__); })); float sY = sinf(yaw * 0.5); float cY = cosf(yaw * 0.5); float sZ = sinf(roll * 0.5); float cZ = cosf(roll * 0.5); float sX = sinf(pitch * 0.5); float cX = cosf(pitch * 0.5); pOut->w = cY * cZ * cX - sY * sZ * sX; pOut->x = sY * sZ * cX + cY * cZ * sX; pOut->y = sY * cZ * cX + cY * sZ * sX; pOut->z = cY * sZ * cX - sY * cZ * sX; return pOut; }
{ "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, "union_type": 0, "while_loop": 0 }
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; last_was_slash = 0; } } return (char *) base; }
{ "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, "union_type": 0, "while_loop": 1 }
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); mbc_buf_len = 0; is_null_line = 0; pendc = '\0'; in_hilite = 0; ansi_in_line = 0; hlink_in_line = 0; line_mark_attr = 0; line_pos = ((POSITION)(-1)); xbuf_reset(&shifted_ansi); xbuf_reset(&last_ansi); for (ax = 0; ax < 3; ax++) xbuf_reset(&last_ansis[ax]); curr_last_ansi = 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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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; kmQuaternion* q2 = &tmp2; pOut->x = q1->w * q2->x + q1->x * q2->w + q1->y * q2->z - q1->z * q2->y; pOut->y = q1->w * q2->y + q1->y * q2->w + q1->z * q2->x - q1->x * q2->z; pOut->z = q1->w * q2->z + q1->z * q2->w + q1->x * q2->y - q1->y * q2->x; pOut->w = q1->w * q2->w - q1->x * q2->x - q1->y * q2->y - q1->z * q2->z; return pOut; }
{ "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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 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->digest_size, length -= hash->digest_size) { do { (c)[0] = ((i) >> 24) & 0xff; (c)[1] = ((i) >> 16) & 0xff; (c)[2] = ((i) >> 8) & 0xff; (c)[3] = (i) & 0xff; } while(0); memcpy(state, seed, hash->context_size); hash->update(state, 4, c); if (length <= hash->digest_size) { hash->digest(state, length, mask); return; } hash->digest(state, hash->digest_size, mask); } }
{ "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, "union_type": 0, "while_loop": 1 }
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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 0 }
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)->entry.rbe_parent && (elm == ((elm)->entry.rbe_parent)->entry.rbe_left)) elm = (elm)->entry.rbe_parent; elm = (elm)->entry.rbe_parent; } } return (elm); }
{ "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, "union_type": 0, "while_loop": 1 }
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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 0 }
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; } 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, "union_type": 0, "while_loop": 0 }
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_NoneStruct)))); return((&_Py_NoneStruct)); }
{ "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, "union_type": 0, "while_loop": 0 }
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) { indent = " "; } if (0 == newline) { newline = "\n"; } while ('\0' != indent[indent_size]) { ++indent_size; } while ('\0' != newline[newline_size]) { ++newline_size; } if (json_write_pretty_get_value_size(value, 0, indent_size, newline_size, &size)) { return 0; } size += 1; data = (char *)malloc(size); if (0 == data) { return 0; } data_end = json_write_pretty_value(value, 0, indent, newline, data); if (0 == data_end) { free(data); return 0; } *data_end = '\0'; if (0 != out_size) { *out_size = size; } return data; }
{ "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, "union_type": 0, "while_loop": 2 }
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_history_region(gd, rupper, rlower, bg); } } else { rupper = ((gd)->hsize + (rupper)); rlower = ((gd)->hsize + (rlower)); grid_move_lines(gd, rupper, rupper + 1, rlower - rupper, bg); } }
{ "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, "union_type": 0, "while_loop": 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, "union_type": 0, "while_loop": 0 }
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, "union_type": 0, "while_loop": 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 json_extract_result_s result; struct json_extract_state_s state; size_t total_size; if (0 == value) { return 0; } result = json_extract_get_value_size(value); total_size = result.dom_size + result.data_size; if (0 == alloc_func_ptr) { allocation = malloc(total_size); } else { allocation = alloc_func_ptr(user_data, total_size); } state.dom = (char *)allocation; state.data = state.dom + result.dom_size; json_extract_copy_value(&state, value); return (struct json_value_s *)allocation; }
{ "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, "union_type": 0, "while_loop": 0 }
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->state, H0, sizeof(H0)); ctx->count_low = ctx->count_high = 0; ctx->index = 0; }
{ "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, "union_type": 0, "while_loop": 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) return 1; if (oneblank) one++; else if (twoblank) two++; else if (strcmp(*one, *two)) return 1; else one++, two++; } return 0; }
{ "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, "union_type": 0, "while_loop": 1 }
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)) || (cur->c2 != ((void *)0))) { cur = (cur->c1 != ((void *)0)) ? cur->c1 : cur->c2; depth += 1; } switch (cur->type) { case XML_ELEMENT_CONTENT_PCDATA: case XML_ELEMENT_CONTENT_ELEMENT: case XML_ELEMENT_CONTENT_SEQ: case XML_ELEMENT_CONTENT_OR: break; default: xmlErrValid(((void *)0), XML_ERR_INTERNAL_ERROR, "Internal: ELEMENT content corrupted invalid type\n", ((void *)0)); return; } if (dict) { if ((cur->name != ((void *)0)) && (!xmlDictOwns(dict, cur->name))) xmlFree((xmlChar *) cur->name); if ((cur->prefix != ((void *)0)) && (!xmlDictOwns(dict, cur->prefix))) xmlFree((xmlChar *) cur->prefix); } else { if (cur->name != ((void *)0)) xmlFree((xmlChar *) cur->name); if (cur->prefix != ((void *)0)) xmlFree((xmlChar *) cur->prefix); } parent = cur->parent; if ((depth == 0) || (parent == ((void *)0))) { xmlFree(cur); break; } if (cur == parent->c1) parent->c1 = ((void *)0); else parent->c2 = ((void *)0); xmlFree(cur); if (parent->c2 != ((void *)0)) { cur = parent->c2; } else { depth -= 1; cur = parent; } } }
{ "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": 15, "union_type": 0, "while_loop": 2 }
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 param0_4[] = {-96,-92,-80,-68,-64,-64,-60,-56,-52,-50,-50,-22,-20,-4,-2,0,6,20,22,28,38,40,48,50,56,58,64,64,80,82,90,92,92,92}; int param0_5[] = {0,0,0,1,0,0,0,0,0,1,1,0,1,1,0,0,1,1,0,0,1,1,1,1,0,1,0,0,0,0,0,0,0,1,0,1,1,1,0,1,1,1,1}; int param0_6[] = {8,15,17,19,21,32,34,38,41,41,49,49,51,54,54,56,56,57,59,63,70,74,79,79,84,84,86,88,89,93,98}; int param0_7[] = {96,-42,-94,-46,-68,76,8,16,-54,-94,76,24,94,10,34,78,-30,0,-52,80,98,-58,92,12,26,64}; int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}; int param0_9[] = {61,69,66,3}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1_0[] = {6,12,16,18,26,34,48,48,49,56,61,79,81,89}; int param1_1[] = {-72,-62,14,-58,70,54,88,-40,-94,4,60,-16,-38,-98,-70,-46,66,42,26,36,56,-4,32,30,-46,-42,-72,44,16,4,24}; int param1_2[] = {0,1,1}; int param1_3[] = {98,50,8,11,80,41,59,24,94,41,75,78}; int param1_4[] = {-88,-72,-72,-58,-54,-50,-48,-34,-24,-14,-14,-14,-10,-6,4,12,16,18,26,30,32,34,40,46,52,54,58,62,62,72,82,82,92,98}; int param1_5[] = {1,1,1,1,0,0,0,1,1,1,0,0,0,1,0,1,1,0,0,1,0,1,0,0,0,1,1,0,0,1,1,0,1,0,1,1,0,1,0,0,0,0,1}; int param1_6[] = {5,6,17,18,22,29,32,33,36,44,45,47,59,59,60,65,67,68,69,71,72,76,78,81,84,85,85,86,86,87,92}; int param1_7[] = {88,78,-26,10,84,34,56,-8,-30,46,48,20,26,-78,96,44,92,-44,-86,24,-58,-96,-86,-12,-98,18}; int param1_8[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}; int param1_9[] = {39,84,97,15}; int *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9}; int param2[] = {12,16,2,10,25,40,29,17,17,3}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "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, "union_type": 0, "while_loop": 0 }
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_var_array ) { if (symbol->type != Node_var_array || symbol->sub.nodep.x.extra == ((void *)0)) return symbol->sub.nodep.name; return make_aname(symbol); } len = 2; n = 0; while (symbol->type == Node_array_ref) { len += strlen(symbol->sub.nodep.name); n++; symbol = symbol->sub.nodep.r.rptr; } if (symbol->sub.nodep.x.extra == ((void *)0)) aname = symbol->sub.nodep.name; else aname = make_aname(symbol); len += strlen(aname); len += n * strlen(from); if (message == ((void *)0)) { (void) (message = (char *) emalloc_real((size_t)(len), "array_vname", "message", "array.c", 285)); msglen = len; } else if (len > msglen) { (void) (message = (char *) erealloc_real((void *) message, (size_t)(len), "array_vname", "message", "array.c", 288)); msglen = len; } symbol = save_symbol; s = message; s += sprintf(s, "%s (", symbol->sub.nodep.name); for (;;) { symbol = symbol->sub.nodep.r.rptr; if (symbol->type != Node_array_ref) break; s += sprintf(s, from, symbol->sub.nodep.name); s += sprintf(s, ", "); } s += sprintf(s, from, aname); strcpy(s, ")"); return message; }
{ "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, "union_type": 0, "while_loop": 1 }
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, "union_type": 0, "while_loop": 0 }