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
libxml2#libxml2-py_prep#libxml_xmlUCSIsCatS.c
libxml2
libxml2-py.c
libxml_xmlUCSIsCatS
13
PyObject * libxml_xmlUCSIsCatS(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsCatS") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSIsCatS", &code)) return(((void *)0)); c_retval = xmlUCSIsCatS(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 }
dap-3.10#sbstrans3_prep#logistictrans.c
dap-3.10
sbstrans3.c
logistictrans
48
void logistictrans(char *step, FILE *dapfile) { int s; char setname[127 + 1]; char outname[127 + 1]; if (!getoption(step, "data", setname, 1)) strcpy(setname, sbstmp); fprintf(dapfile, "logreg(\"%s\", \"", setname); if ((s = findstatement(step, "model"))) { s += putlines(step + s, dapfile, '\n') + 1; putc('/', dapfile); if (step[s] == '/') { s += 2; s += putlines(step + s, dapfile, '\n') + 1; } else putc('1', dapfile); if (step[s] == '=') { fputs("\", \"\", \"", dapfile); s += 2; s += putlines(step + s, dapfile, ';'); fputs("\", \"", dapfile); copylist(step, "by", dapfile); fputs("\", NULL, 0.95);\n", dapfile); } else { fprintf(stderr, "sbstrans: before %d: missing = in model statement in proc logistic.\n", sbslineno); exit(1); } } else { fprintf(stderr, "sbstrans: before %d: missing model statement in proc logistic.\n", sbslineno); exit(1); } if (getoption(step, "outest", outname, 1)) { fprintf(dapfile, "dataset(\"%s.cov\", \"%s\", \"RENAME\");\n", setname, outname); strcpy(sbstmp, outname); } }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "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#FIND_MINIMUM_NUMBER_OF_COINS_THAT_MAKE_A_CHANGE_1_prep#sort.c
transcoder-set
FIND_MINIMUM_NUMBER_OF_COINS_THAT_MAKE_A_CHANGE_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 }
transcoder-set#NON_REPEATING_ELEMENT_prep#f_gold.c
transcoder-set
NON_REPEATING_ELEMENT.c
f_gold
12
int f_gold ( int arr [ ], int n ) { for ( int i = 0; i < n; i ++ ) { int j; for ( j = 0; j < n; j ++ ) if ( i != j && arr [ i ] == arr [ j ] ) break; if ( j == n ) return arr [ i ]; } return - 1; }
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 2, "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": 0 }
rcs-5.10.1#b-feph_prep#init_ephemstuff.c
rcs-5.10.1
b-feph.c
init_ephemstuff
7
void init_ephemstuff (void) { (top->behavior. sff) = (zlloc (plexus, sizeof (struct sff) * (0 + 2))); (top->behavior. ephemstuff) = (zlloc (plexus, sizeof (struct ephemstuff) * 1)); ((top->behavior. ephemstuff)-> tpnames) = (zlloc (plexus, sizeof (struct sff) * 5)); }
{ "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": 4, "union_type": 0, "while_loop": 0 }