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#error_prep#xmlGetLastError.c
libxml2
error.c
xmlGetLastError
8
const xmlError * xmlGetLastError(void) { const xmlError *error = xmlGetLastErrorInternal(); if (error->code == XML_ERR_OK) return(((void *)0)); return(error); }
{ "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,...
tmux#session_prep#session_groups_RB_FIND.c
tmux
session.c
session_groups_RB_FIND
1
struct session_group * session_groups_RB_FIND(struct session_groups *head, struct session_group *elm) { struct session_group *tmp = (head)->rbh_root; int comp; while (tmp) { comp = session_group_cmp(elm, tmp); if (comp < 0) tmp = (tmp)->entry.rbe_left; else if (comp > 0) tmp = (tmp)->entry.rbe_right; else return (tmp);...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 1,...
transcoder-set#SUM_BINOMIAL_COEFFICIENTS_prep#max.c
transcoder-set
SUM_BINOMIAL_COEFFICIENTS.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,...
heman#gaussian_prep#generate_gaussian_row.c
heman
gaussian.c
generate_gaussian_row
20
void generate_gaussian_row(int* target, int fwidth) { ((void) sizeof ((fwidth > 0) ? 1 : 0), __extension__ ({ if (fwidth > 0) ; else __assert_fail ("fwidth > 0", "/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/heman/src/gaussian.c", 9, __extension__ __PRETTY_FUNCTION__); })); int nbytes = fwidth *...
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 4, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 2, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
tar-1.34#xvasprintf_prep#xvasprintf.c
tar-1.34
xvasprintf.c
xvasprintf
28
char * xvasprintf (const char *format, va_list args) { char *result; { size_t argcount = 0; const char *f; for (f = format;;) { if (*f == '\0') return xstrcat (argcount, args); if (*f != '%') break; f++; if (*f != 's') break; f+...
{ "array_type": 0, "break_continue_statement": 2, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
wget-1.21.4#host_prep#is_valid_ip_address.c
wget-1.21.4
host.c
is_valid_ip_address
11
_Bool is_valid_ip_address (const char *name) { const char *endp; endp = name + strlen(name); if (is_valid_ipv4_address (name, endp)) return 1; if (is_valid_ipv6_address (name, endp)) return 1; return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
nettle-3.9.1#base64-encode_prep#nettle_base64_encode_raw.c
nettle-3.9.1
base64-encode.c
nettle_base64_encode_raw
5
void nettle_base64_encode_raw(char *dst, size_t length, const uint8_t *src) { encode_raw(base64_encode_table, dst, length, src); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
json-c#test_json_pointer_prep#main.c
json-c
test_json_pointer.c
main
9
int main(int argc, char **argv) { test_example_get(); test_recursion_get(); test_wrong_inputs_get(); test_example_set(); test_wrong_inputs_set(); return 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,...
gawk-5.2.2#io_prep#register_output_wrapper.c
gawk-5.2.2
io.c
register_output_wrapper
13
void register_output_wrapper(awk_output_wrapper_t *wrapper) { if (wrapper == ((void *)0)) (*(set_loc("io.c", 3217), r_fatal))(gettext("register_output_wrapper: received NULL pointer")); wrapper->next = ((void *)0); if (op_head == ((void *)0)) { op_head = op_tail = wrapper; } else { op_tail->next = wrapper; ...
{ "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": 3,...
mtools-4.0.43#dirCache_prep#freeDirCache.c
mtools-4.0.43
dirCache.c
freeDirCache
14
void freeDirCache(Stream_t *Stream) { dirCache_t *cache, **dcp; dcp = getDirCacheP(Stream); cache = *dcp; if(cache) { int n; n=freeDirCacheRange(cache, 0, cache->nr_entries); if(n >= 0) low_level_dir_write_end(Stream, n); free(cache); *dcp = 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": 1, "memory_operation": 0, "pointer_type": 2, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#COUNT_SUBSTRINGS_WITH_SAME_FIRST_AND_LAST_CHARACTERS_prep#max.c
transcoder-set
COUNT_SUBSTRINGS_WITH_SAME_FIRST_AND_LAST_CHARACTERS.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,...
transcoder-set#SUM_BINOMIAL_COEFFICIENTS_prep#cmpfunc.c
transcoder-set
SUM_BINOMIAL_COEFFICIENTS.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_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_ARRAY_prep#cmpfunc.c
transcoder-set
FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_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,...
dap-3.10#ps_prep#nland.c
dap-3.10
ps.c
nland
18
void nland(pict *p, int nplots, int nperpage) { int pn; if (nplots % nperpage) { fprintf(dap_err, "(pict_nlandscape) Number of plots %d not a multiple of number per page %d\n", nplots, nperpage); exit(1); } pict_land(nplots / nperpage); for (pn = 0; pn < nplots; pn += nperpage)...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
screen-4.9.0#layout_prep#RenumberLayout.c
screen-4.9.0
layout.c
RenumberLayout
15
int RenumberLayout(struct layout *layout, int number) { int old; struct layout *lay; old = layout->lay_number; if (number < 0 || number >= 10) return 0; lay = laytab[number]; laytab[number] = layout; layout->lay_number = number; laytab[old] = lay; if (lay) lay->lay_number = old; return 1; }
{ "array_type": 1, "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": 2, "switch_statement": 0, "type_casting": 0,...
tulipindicators-0.9.1#tiamalgamation_prep#ti_adxr_start.c
tulipindicators-0.9.1
tiamalgamation.c
ti_adxr_start
3
int ti_adxr_start(double const *options) { return ((int)options[0]-1) * 3; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
optipng-0.7.8#tiffutil_prep#minitiff_init_info.c
optipng-0.7.8
tiffutil.c
minitiff_init_info
5
void minitiff_init_info(struct minitiff_info *info_ptr) { memset(info_ptr, 0, sizeof(*info_ptr)); info_ptr->photometric = (unsigned int)(-1); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 1, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
libxml2#xmlschemastypes_prep#xmlSchemaValidatePredefinedType.c
libxml2
xmlschemastypes.c
xmlSchemaValidatePredefinedType
5
int xmlSchemaValidatePredefinedType(xmlSchemaTypePtr type, const xmlChar *value, xmlSchemaValPtr *val) { return(xmlSchemaValPredefTypeNode(type, value, val, ((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,...
transcoder-set#MAXIMUM_SUM_BITONIC_SUBARRAY_prep#len.c
transcoder-set
MAXIMUM_SUM_BITONIC_SUBARRAY.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_IF_A_NUMBER_IS_JUMBLED_OR_NOT_prep#f_gold.c
transcoder-set
CHECK_IF_A_NUMBER_IS_JUMBLED_OR_NOT.c
f_gold
11
_Bool f_gold ( int num ) { if ( num / 10 == 0 ) return 1; while ( num != 0 ) { if ( num / 10 == 0 ) return 1; int digit1 = num % 10; int digit2 = ( num / 10 ) % 10; if ( abs ( digit2 - digit1 ) > 1 ) return 0; num = num / 10; } return 1; }
{ "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": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#libxml2-py_prep#libxml_xmlUCSIsCJKUnifiedIdeographsExtensionB.c
libxml2
libxml2-py.c
libxml_xmlUCSIsCJKUnifiedIdeographsExtensionB
13
PyObject * libxml_xmlUCSIsCJKUnifiedIdeographsExtensionB(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsCJKUnifiedIdeographsExtensionB") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_Size...
{ "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,...
tar-1.34#version-etc_prep#version_etc_ar.c
tar-1.34
version-etc.c
version_etc_ar
10
void version_etc_ar (FILE *stream, const char *command_name, const char *package, const char *version, const char * const * authors) { size_t n_authors; for (n_authors = 0; authors[n_authors]; n_authors++) ; version_etc_arn (stream, command_name, package, version, authors, n_au...
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
tmux#osdep-linux_prep#osdep_get_name.c
tmux
osdep-linux.c
osdep_get_name
29
char * osdep_get_name(int fd, __attribute__ ((__unused__)) char *tty) { FILE *f; char *path, *buf; size_t len; int ch; pid_t pgrp; if ((pgrp = tcgetpgrp(fd)) == -1) return (((void *)0)); xasprintf(&path, "/proc/%lld/cmdline", (long long) pgrp); if ((f = fopen(path, "r")) == ((void *)0)) { free(path); retu...
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 2, "memory_operation": 0, "pointer_type": 3, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
wget-1.21.4#connect_prep#fd_peek.c
wget-1.21.4
connect.c
fd_peek
11
int fd_peek (int fd, char *buf, int bufsize, double timeout) { struct transport_info *info; do { static struct transport_info *last_info; static int last_fd = -1; static unsigned int last_tick; if (!transport_map) info = ((void *)0); else if (last_fd == fd && last_tick == transport_map_modified_tick) info = last_in...
{ "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": 2, "return_statement": 3, "struct_type": 2, "switch_statement": 0, "type_casting": 1,...
enscript-1.6.6#strhash_prep#strhash_free.c
enscript-1.6.6
strhash.c
strhash_free
17
void strhash_free (StringHashPtr hash) { HashList *list, *list_next; int i; if (!hash) return; for (i = 0; i < 8192; i++) for (list = hash->hash_table[i]; list; list = list_next) { list_next = list->next; free (list->key); free (list); } free (hash->hash_table); free (hash); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 4, "memory_operation": 0, "pointer_type": 2, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#COUNT_FACTORIAL_NUMBERS_IN_A_GIVEN_RANGE_prep#sort.c
transcoder-set
COUNT_FACTORIAL_NUMBERS_IN_A_GIVEN_RANGE.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,...
transcoder-set#MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME_prep#main.c
transcoder-set
MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME.c
main
14
int main(void) { int n_success = 0; char param0[][100] = {"aadaa","2674377254","11","0011000","26382426486138","111010111010","abccba","5191","1110101101","abcdecbe"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; ...
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_prep#f_filled.c
transcoder-set
PROGRAM_FOR_FACTORIAL_OF_A_NUMBER.c
f_filled
1
unsigned int f_filled ( unsigned int n ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
lil#lil_prep#lil_parse_value.c
lil
lil.c
lil_parse_value
5
lil_value_t lil_parse_value(lil_t lil, lil_value_t val, int funclevel) { if (!val || !val->d || !val->l) return alloc_value(((void *)0)); return lil_parse(lil, val->d, val->l, funclevel); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#MAXIMUM_SUBSEQUENCE_SUM_SUCH_THAT_NO_THREE_ARE_CONSECUTIVE_prep#main.c
transcoder-set
MAXIMUM_SUBSEQUENCE_SUM_SUCH_THAT_NO_THREE_ARE_CONSECUTIVE.c
main
25
int main(void) { int n_success = 0; int param0_0[] = {5,6,8,9,10,10,16,17,17,20,21,22,23,28,29,32,36,37,40,41,42,43,47,47,48,48,49,49,52,52,53,59,61,64,65,79,79,81,87,91,92,98}; int param0_1[] = {98,76,-80,-30,82,52,-14,28,98,18,82,52,26,-62,-8}; int param0_2[] = {0,0,0,0,0,1,1,1,1}; int param0_3[] = {21,26,85,...
{ "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,...
optipng-0.7.8#deflate_prep#deflateSetHeader.c
optipng-0.7.8
deflate.c
deflateSetHeader
6
int deflateSetHeader(z_streamp strm, gz_headerp head) { if (deflateStateCheck(strm) || strm->state->wrap != 2) return (-2); strm->state->gzhead = head; return 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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#libxml2-py_prep#libxml_xmlCreateURLParserCtxt.c
libxml2
libxml2-py.c
libxml_xmlCreateURLParserCtxt
12
PyObject * libxml_xmlCreateURLParserCtxt(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; xmlParserCtxtPtr c_retval; char * filename; int options; if (!_PyArg_ParseTuple_SizeT(args, (char *)"zi:xmlCreateURLParserCtxt", &filename, &options)) return(((void *)...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
libxml2#libxml2-py_prep#libxml_xmlDebugDumpString.c
libxml2
libxml2-py.c
libxml_xmlDebugDumpString
13
PyObject * libxml_xmlDebugDumpString(PyObject *self __attribute__ ((__unused__)), PyObject *args) { FILE * output; PyObject *pyobj_output; xmlChar * str; if (!_PyArg_ParseTuple_SizeT(args, (char *)"Oz:xmlDebugDumpString", &pyobj_output, &str)) return(((void *)0)); output = (FILE *) (((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,...
tulipindicators-0.9.1#asin_prep#ti_asin.c
tulipindicators-0.9.1
asin.c
ti_asin
1
int ti_asin(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *in1 = inputs[0]; (void)options; double *output = outputs[0]; int i; for (i = 0; i < size; ++i) { output[i] = (asin(in1[i])); } return 0; }
{ "array_type": 4, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 3, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
gprolog-1.5.0#wam2ma_prep#F_unify_atom.c
gprolog-1.5.0
wam2ma.c
F_unify_atom
7
void F_unify_atom(ArgVal arg[]) { ArgVal *top = arg; BTNode *atom; char *str_atom; ((str_atom) = *((char * *) (top)) , (top)++); atom = BT_String_Add(&bt_tagged_atom, str_atom); Inst_Printf("call_c", "Pl_Unify_Atom_Tagged(ta(%d))", atom->no); Inst_Printf("fail_ret", ""); }
{ "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": 3, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
gawk-5.2.2#debug_prep#has_break_or_watch_point.c
gawk-5.2.2
debug.c
has_break_or_watch_point
37
int has_break_or_watch_point(int *pnum, _Bool any) { BREAKPOINT *b = ((void *)0); struct list_item *w = ((void *)0); if (any) { if (breakpoints.next != &breakpoints) b = breakpoints.next; if (watch_list.next != &watch_list) w = watch_list.next; if (! b && ! w) return 0; if (b && ! w) { *pnum = b-...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 9, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 8, "struct_type": 1, "switch_statement": 0, "type_casting": 2,...
dap-3.10#misc_prep#dap_numdate.c
dap-3.10
misc.c
dap_numdate
37
int dap_numdate(char date[]) { int d; int dday; int dyr; int mon; int day; int yr; int m; int y; int ndays; for (d = 0, mon = 0; d < 2 && '0' <= date[d] && date[d] <= '9'; d++) mon = 10 * mon + date[d] - '0'; if (date[d] == '/') d++; for (dday = d, day = 0; d < dday + 2 && '0' <= date[d]...
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 5, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS_prep#max.c
transcoder-set
FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS.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,...
libxml2#libxml2-py_prep#libxml_xmlThrDefGetWarningsDefaultValue.c
libxml2
libxml2-py.c
libxml_xmlThrDefGetWarningsDefaultValue
13
PyObject * libxml_xmlThrDefGetWarningsDefaultValue(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int v; if (libxml_deprecationWarning("xmlThrDefGetWarningsDefaultValue") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *...
{ "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#parser_prep#xmlCtxtResetPush.c
libxml2
parser.c
xmlCtxtResetPush
19
int xmlCtxtResetPush(xmlParserCtxtPtr ctxt, const char *chunk, int size, const char *filename, const char *encoding) { xmlParserInputPtr input; if (ctxt == ((void *)0)) return(1); xmlCtxtReset(ctxt); input = xmlNewPushInput(filename, chunk, size); if (input == ((void *)0)) ...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
libxml2#HTMLparser_prep#htmlParseDoc.c
libxml2
HTMLparser.c
htmlParseDoc
4
htmlDocPtr htmlParseDoc(const xmlChar *cur, const char *encoding) { return(htmlSAXParseDoc(cur, encoding, ((void *)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,...
tmux#window_prep#windows_RB_REMOVE_COLOR.c
tmux
window.c
windows_RB_REMOVE_COLOR
1
void windows_RB_REMOVE_COLOR(struct windows *head, struct window *parent, struct window *elm) { struct window *tmp; while ((elm == ((void *)0) || (elm)->entry.rbe_color == 0) && elm != (head)->rbh_root) { if ((parent)->entry.rbe_left == elm) { tmp = (parent)->entry.rbe_right; if ((tmp)->entry.rbe_color == 1) { do { (tm...
{ "array_type": 0, "break_continue_statement": 1, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 3, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 1,...
transcoder-set#MINIMUM_STEPS_MINIMIZE_N_PER_GIVEN_CONDITION_prep#len.c
transcoder-set
MINIMUM_STEPS_MINIMIZE_N_PER_GIVEN_CONDITION.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#MODULAR_EXPONENTIATION_POWER_IN_MODULAR_ARITHMETIC_prep#cmpfunc.c
transcoder-set
MODULAR_EXPONENTIATION_POWER_IN_MODULAR_ARITHMETIC.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,...
libxml2#xmlreader_prep#xmlTextReaderCurrentNode.c
libxml2
xmlreader.c
xmlTextReaderCurrentNode
8
xmlNodePtr xmlTextReaderCurrentNode(xmlTextReaderPtr reader) { if (reader == ((void *)0)) return(((void *)0)); if (reader->curnode != ((void *)0)) return(reader->curnode); return(reader->node); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
less-633#cvt_prep#cvt_length.c
less-633
cvt.c
cvt_length
6
int cvt_length(int len, int ops) { if (utf_mode) len *= 4; return (len + 1); }
{ "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": 0,...
nettle-3.9.1#streebog_prep#nettle_streebog256_init.c
nettle-3.9.1
streebog.c
nettle_streebog256_init
8
void nettle_streebog256_init(struct streebog512_ctx *ctx) { memset(ctx->state, 1, sizeof(ctx->state)); memset(ctx->count, 0, sizeof(ctx->count)); memset(ctx->sigma, 0, sizeof(ctx->sigma)); ctx->index = 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": 3, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
cflow-1.7#symbol_prep#install_target.c
cflow-1.7
symbol.c
install_target
9
Symbol * install_target(char *name) { Symbol *sp = install(name, 0); sp->flag = symbol_target; if (!data_in_list(sp, target_symbol_list)) linked_list_append(&target_symbol_list, sp); return sp; }
{ "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": 0,...
gawk-5.2.2#io_prep#nextfile.c
gawk-5.2.2
io.c
nextfile
93
int nextfile(IOBUF **curfile, _Bool skipping) { static long i = 1; static _Bool files = 0; NODE *arg, *tmp; const char *fname; int fd = (-1); int errcode = 0; IOBUF *iop = *curfile; if (skipping) { errcode = 0; if (iop != ((void *)0)) { errcode = iop->errcode; (void) iop_close(iop); } *curfile = (...
{ "array_type": 0, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 16, "memory_management": 0, "memory_operation": 0, "pointer_type": 4, "return_statement": 6, "struct_type": 0, "switch_statement": 0, "type_casting": 1...
ed-1.19#buffer_prep#path_max.c
ed-1.19
buffer.c
path_max
10
int path_max( const char * filename ) { long result; if( !filename ) filename = "/"; (*__errno_location ()) = 0; result = pathconf( filename, _PC_PATH_MAX ); if( result < 0 ) { if( (*__errno_location ()) ) result = 256; else result = 1024; } else if( result < 256 ) result = 256; return result; }
{ "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,...
json-c#test_parse_prep#main.c
json-c
test_parse.c
main
14
int main(void) { if (0) mc_set_debug(1); static const char separator[] = "=================================="; test_basic_parse(); puts(separator); test_utf8_parse(); puts(separator); test_verbose_parse(); puts(separator); test_incremental_parse(); puts(separator); return 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": 0, "switch_statement": 0, "type_casting": 1,...
gawk-5.2.2#stack_prep#stack_push.c
gawk-5.2.2
stack.c
stack_push
21
int stack_push(void *object) { void **new_stack; size_t new_size = 2 * size; if (stack == ((void *)0)) { stack = (void **) malloc(20 * sizeof(void *)); if (stack == ((void *)0)) return 0; size = 20; } else if (index + 1 >= size) { if (new_size < size) return 0; new_stack = realloc(stack, new_size * ...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 2, "memory_operation": 0, "pointer_type": 1, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
transcoder-set#AREA_OF_A_HEXAGON_prep#cmpfunc.c
transcoder-set
AREA_OF_A_HEXAGON.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,...
grep-3.11#inttostr_prep#inttostr.c
grep-3.11
inttostr.c
inttostr
20
__attribute__ ((__warn_unused_result__)) char * inttostr (int i, char *buf) { char *p = buf + (((((sizeof (int) * 8) - (! ((__typeof__ (int)) 0 < (__typeof__ (int)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (int)) 0 < (__typeof__ (int)) -1))); *p = 0; if (i < 0) { do *--p = '0' - i % 10; ...
{ "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": 1,...
optipng-0.7.8#pngrutil_prep#png_read_IDAT_data.c
optipng-0.7.8
pngrutil.c
png_read_IDAT_data
80
void png_read_IDAT_data(png_structrp png_ptr, png_bytep output, png_alloc_size_t avail_out) { png_ptr->zstream.next_out = output; png_ptr->zstream.avail_out = 0; if (output == ((void *)0)) avail_out = 0; do { int ret; png_byte tmpbuf[1024]; if (png_ptr->zstream.avail_in == 0) ...
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 13, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 6...
libxml2#xmlschemas_prep#xmlSchemaSetValidErrors.c
libxml2
xmlschemas.c
xmlSchemaSetValidErrors
13
void xmlSchemaSetValidErrors(xmlSchemaValidCtxtPtr ctxt, xmlSchemaValidityErrorFunc err, xmlSchemaValidityWarningFunc warn, void *ctx) { if (ctxt == ((void *)0)) return; ctxt->error = err; ctxt->warning = warn; ctxt->errCtxt = ctx; if (ctxt->pc...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
bzip2#bzlib_prep#BZ2_bzReadClose.c
bzip2
bzlib.c
BZ2_bzReadClose
12
void BZ2_bzReadClose ( int *bzerror, BZFILE *b ) { bzFile* bzf = (bzFile*)b; { if (bzerror != ((void *)0)) *bzerror = 0; if (bzf != ((void *)0)) bzf->lastErr = 0; }; if (bzf == ((void *)0)) { { if (bzerror != ((void *)0)) *bzerror = 0; if (bzf != ((void *)0)) bzf->lastErr = 0; }; return; }; if (bzf->w...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "memory_management": 1, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
json.h#allow_hexadecimal_numbers_prep#json_skip_c_style_comments.c
json.h
allow_hexadecimal_numbers.c
json_skip_c_style_comments
40
int json_skip_c_style_comments(struct json_parse_state_s *state) { if ((state->offset + 2) > state->size) { return 0; } if ('/' == state->src[state->offset]) { if ('/' == state->src[state->offset + 1]) { state->offset++; state->offset++; while (state->offset < state->size) { swit...
{ "array_type": 0, "break_continue_statement": 1, "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": 6, "struct_type": 1, "switch_statement": 1, "type_casting": 0,...
transcoder-set#NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES_prep#f_filled.c
transcoder-set
NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES.c
f_filled
1
int f_filled ( int n, 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,...
transcoder-set#SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_1_prep#f_filled.c
transcoder-set
SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_1.c
f_filled
1
int f_filled ( 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,...
dap-3.10#dapruns_prep#ecopy.c
dap-3.10
dapruns.c
ecopy
15
char *ecopy(char *e) { char *copy; if (e) { if (!(copy = malloc(strlen(e) + 1))) { perror("dap"); exit(1); } strcpy(copy, e); return copy; } return ((void *)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": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#BINARY_SEARCH_prep#f_gold.c
transcoder-set
BINARY_SEARCH.c
f_gold
9
int f_gold ( int arr [ ], int l, int r, int x ) { if ( r >= l ) { int mid = l + ( r - l ) / 2; if ( arr [ mid ] == x ) return mid; if ( arr [ mid ] > x ) return f_gold ( arr, l, mid - 1, x ); return f_gold ( arr, mid + 1, r, x ); } return - 1; }
{ "array_type": 1, "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": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
gawk-5.2.2#regex_prep#re_match_2.c
gawk-5.2.2
regex.c
re_match_2
8
regoff_t re_match_2 (struct re_pattern_buffer *bufp, const char *string1, Idx length1, const char *string2, Idx length2, Idx start, struct re_registers *regs, Idx stop) { return re_search_2_stub (bufp, string1, length1, string2, length2, start, 0, regs, stop, 1); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 2, "switch_statement": 0, "type_casting": 0,...
less-633#edit_prep#edit_prev.c
less-633
edit.c
edit_prev
4
int edit_prev(int n) { return edit_istep(curr_ifile, n, -1); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
heman#aabb2_prep#kmAABB2DiameterY.c
heman
aabb2.c
kmAABB2DiameterY
3
float kmAABB2DiameterY(const kmAABB2* aabb) { return aabb->max.y - aabb->min.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,...
transcoder-set#COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_prep#main.c
transcoder-set
COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X.c
main
38
int main(void) { int n_success = 0; int param0_0[] = {11,13,16,23,26,28,31,34,37,39,44,48,56,59,79,91,96,98}; int param0_1[] = {50,14,-98,14,90,36,66,44,10,-98,-24,-36,-32,-50}; int param0_2[] = {0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {88,14,29,87,86,58}; int param0_4[] = {-98,-92,-88,-86,-82,-76,-7...
{ "array_type": 5, "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": 2, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
json-c#json_object_prep#json_object_new_double.c
json-c
json_object.c
json_object_new_double
9
struct json_object *json_object_new_double(double d) { struct json_object_double *jso = (struct json_object_double *)json_object_new( json_type_double, sizeof(struct json_object_double), &json_object_double_to_json_string); if (!jso) return ((void *)0); jso->base._to_json_string = &json_object_double_to_json_strin...
{ "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": 2, "switch_statement": 0, "type_casting": 2,...
transcoder-set#FIBONACCI_MODULO_P_prep#main.c
transcoder-set
FIBONACCI_MODULO_P.c
main
14
int main(void) { int n_success = 0; int param0[] = {51,40,68,7,8,32,93,75,71,15}; 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,...
screen-4.9.0#tty_prep#SetMode.c
screen-4.9.0
tty.c
SetMode
32
void SetMode(struct mode *op, struct mode *np, int flow, int interrupt) { *np = *op; do {} while (0); np->tio.c_iflag &= ~0000400; np->tio.c_iflag &= ~0000040; np->tio.c_oflag &= ~0000004; np->tio.c_lflag &= ~(0000002 | 0000010); np->tio.c_lflag &= ~0100000; if (interrupt) np->tio.c_lflag |= 0000001...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
pth-2.0.7#pth_fork_prep#pth_fork.c
pth-2.0.7
pth_fork.c
pth_fork
22
pid_t pth_fork(void) { pid_t pid; int i; for (i = pth_atfork_idx-1; i >= 0; i--) if (pth_atfork_list[i].prepare != ((void *)0)) pth_atfork_list[i].prepare(pth_atfork_list[i].arg); if ((pid = fork()) == -1) return (0); if (pid != 0) { for (i = 0; i <= pth_atfork_id...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 3, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
transcoder-set#NUMBER_N_DIGITS_NON_DECREASING_INTEGERS_prep#sort.c
transcoder-set
NUMBER_N_DIGITS_NON_DECREASING_INTEGERS.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#libxml2-py_prep#libxml_xmlThrDefSaveNoEmptyTags.c
libxml2
libxml2-py.c
libxml_xmlThrDefSaveNoEmptyTags
13
PyObject * libxml_xmlThrDefSaveNoEmptyTags(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int v; if (libxml_deprecationWarning("xmlThrDefSaveNoEmptyTags") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlThrDefSav...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
transcoder-set#PROGRAM_CHECK_PLUS_PERFECT_NUMBER_prep#f_gold.c
transcoder-set
PROGRAM_CHECK_PLUS_PERFECT_NUMBER.c
f_gold
15
_Bool f_gold ( int x ) { int temp = x; int n = 0; while ( x != 0 ) { x /= 10; n ++; } x = temp; int sum = 0; while ( x != 0 ) { sum += pow ( x % 10, n ); x /= 10; } return ( sum == temp ); }
{ "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,...
tar-1.34#xheader_prep#xheader_string_add.c
tar-1.34
xheader.c
xheader_string_add
9
void xheader_string_add (struct xheader *xhdr, char const *s) { if (xhdr->buffer) return; xheader_init (xhdr); xhdr->string_length += strlen (s); x_obstack_grow (xhdr, s, strlen (s)); }
{ "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,...
uucp-1.07#uux_prep#main.c
uucp-1.07
uux.c
main
890
int main (argc, argv) int argc; char **argv; { const char *zrequestor = ((void *)0); boolean fretstdin = (0); boolean fcopy = (0); boolean fdontcopy = (0); const char *zconfig = ((void *)0); boolean fjobid = (0); boolean flink = (0); boolean fno_ack = (0); boolean fread_stdin = (0); boolea...
{ "array_type": 6, "break_continue_statement": 26, "enum_type": 0, "for_loop": 8, "function_pointer": 0, "goto_statement": 0, "if_statement": 140, "memory_management": 0, "memory_operation": 3, "pointer_type": 32, "return_statement": 1, "struct_type": 0, "switch_statement": 1, "type_casting"...
cflow-1.7#depmap_prep#depmap_set.c
cflow-1.7
depmap.c
depmap_set
6
void depmap_set(cflow_depmap_t dmap, size_t row, size_t col) { unsigned *rptr = depmap_rowptr(dmap, row); ((rptr)[(col)/(sizeof(unsigned)*8)] |= (1<<((col) % (sizeof(unsigned)*8)))); }
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
hello-2.12.1#strnlen1_prep#strnlen1.c
hello-2.12.1
strnlen1.c
strnlen1
9
size_t strnlen1 (const char *string, size_t maxlen) { const char *end = (const char *) memchr (string, '\0', maxlen); if (end != ((void *)0)) return end - string + 1; else return maxlen; }
{ "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": 1,...
transcoder-set#SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_prep#min.c
transcoder-set
SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N.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,...
dap-3.10#dapruns_prep#dappprun.c
dap-3.10
dapruns.c
dappprun
30
int dappprun(int argc, char **argv) { char **arg; int a; int status; pid_t pid; if (!(arg = (char **) malloc(sizeof(char *) * (argc + 1)))) { perror("dap"); exit(1); } arg[0] = dappp; for (a = 1; a < argc && strcmp(argv[a], "-a") && strcmp(argv[a], "--args"); a++) arg[a] = argv[a];...
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
transcoder-set#MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING_1_prep#cmpfunc.c
transcoder-set
MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING_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,...
transcoder-set#NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR_prep#max.c
transcoder-set
NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR.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,...
libosip2-5.3.1#osip_authentication_info_prep#osip_authentication_info_clone.c
libosip2-5.3.1
osip_authentication_info.c
osip_authentication_info_clone
34
int osip_authentication_info_clone(const osip_authentication_info_t *ainfo, osip_authentication_info_t **dest) { int i; osip_authentication_info_t *wa; *dest = ((void *)0); if (ainfo == ((void *)0)) return -2; i = osip_authentication_info_init(&wa); if (i != 0) return i; if (ainfo->auth_type != ((...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 13, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 1...
mcsim-6.2.0#simo_prep#WriteMCHeader.c
mcsim-6.2.0
simo.c
WriteMCHeader
18
void WriteMCHeader (PFILE pfileOut, PANALYSIS panal) { long i, j, k; PMONTECARLO pmc = &panal->mc; OUTSPEC *pos; fprintf (pfileOut, "Iter"); for (i = 0; i < pmc->nParms; i++) fprintf (pfileOut, "\t%s", GetVarName(pmc->rgpMCVar[i]->hvar)); for (i = 0; i < panal->expGlobal.iExp; i++) { pos = &panal->rg...
{ "array_type": 4, "break_continue_statement": 0, "enum_type": 0, "for_loop": 4, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP_1_prep#len.c
transcoder-set
HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP_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#COMPUTE_N_UNDER_MODULO_P_prep#cmpfunc.c
transcoder-set
COMPUTE_N_UNDER_MODULO_P.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#CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_1_prep#f_filled.c
transcoder-set
CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_1.c
f_filled
1
_Bool f_filled ( int x, int 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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
tmux#xchecks_prep#__c2rust_hash___mbstate_t_struct.c
tmux
xchecks.c
__c2rust_hash___mbstate_t_struct
3
uint64_t __c2rust_hash___mbstate_t_struct(void *l, size_t depth) { return 0xABCD0006; }
{ "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#window_prep#windows_RB_NEXT.c
tmux
window.c
windows_RB_NEXT
1
struct window * windows_RB_NEXT(struct window *elm) { if ((elm)->entry.rbe_right) { elm = (elm)->entry.rbe_right; while ((elm)->entry.rbe_left) elm = (elm)->entry.rbe_left; } else { if ((elm)->entry.rbe_parent && (elm == ((elm)->entry.rbe_parent)->entry.rbe_left)) elm = (elm)->entry.rbe_parent; else { while ((elm)->ent...
{ "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,...
mtools-4.0.43#scsi_prep#scsi_cmd.c
mtools-4.0.43
scsi.c
scsi_cmd
19
int scsi_cmd(int fd, unsigned char *cdb, uint8_t cmdlen, scsi_io_mode_t mode, void *data, uint32_t len, void *extra_data __attribute__ ((unused))) { struct sg_io_hdr my_scsi_cmd; memset(&my_scsi_cmd,0,sizeof(my_scsi_cmd)); my_scsi_cmd.interface_id = 'S'; my_scsi_cmd.dxfer_direction = (mode == SCSI_IO_READ)?(-...
{ "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": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#HARDY_RAMANUJAN_THEOREM_prep#f_filled.c
transcoder-set
HARDY_RAMANUJAN_THEOREM.c
f_filled
1
int f_filled ( 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,...
ed-1.19#buffer_prep#open_sbuf.c
ed-1.19
buffer.c
open_sbuf
12
bool open_sbuf( void ) { isbinary_ = false; reset_unterminated_line(); sfp = tmpfile(); if( !sfp ) { show_strerror( 0, (*__errno_location ()) ); set_error_msg( "Cannot open temp file" ); return false; } return true; }
{ "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,...
rcs-5.10.1#b-complain_prep#fatal_syntax.c
rcs-5.10.1
b-complain.c
fatal_syntax
10
void fatal_syntax (size_t lno, char const *fmt, ...) { complain ("%s: %s:", (top->program-> name), (top->repository. filename)); if (lno) complain ("%ld:", lno); complain (" "); do { va_list args; __builtin_va_start(args,fmt); vcomplain (fmt, args); __builtin_va_end(args); complain ("\n"); } while (0); di...
{ "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,...
units-2.22#units_prep#mymalloc.c
units-2.22
units.c
mymalloc
11
void * mymalloc(int bytes,const char *mesg) { void *pointer; pointer = malloc(bytes); if (!pointer){ fprintf(stderr, "%s: memory allocation error %s\n", progname, mesg); exit(1); } return pointer; }
{ "array_type": 0, "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": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
gprolog-1.5.0#write_c_prep#Pl_Write_Canonical_2.c
gprolog-1.5.0
write_c.c
Pl_Write_Canonical_2
8
void Pl_Write_Canonical_2(WamWord sora_word, WamWord term_word) { (pl_sys_var[0]) = 2 | 1; (pl_sys_var[1]) = -1; (pl_sys_var[2]) = 1200; Pl_Write_Term_2(sora_word, term_word); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
bc-1.07.1#storage_prep#clear_func.c
bc-1.07.1
storage.c
clear_func
25
void clear_func (int func) { bc_function *f; bc_label_group *lg; f = &functions[func]; f->f_defined = 0; f->f_code_size = 0; if (f->f_autos != ((void *)0)) { free_args (f->f_autos); f->f_autos = ((void *)0); } if (f->f_params != ((void *)0)) { free_args (f->f_params); f...
{ "array_type": 1, "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": 2, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
libosip2-5.3.1#osip_contact_prep#osip_message_get_contact.c
libosip2-5.3.1
osip_contact.c
osip_message_get_contact
9
int osip_message_get_contact(const osip_message_t *sip, int pos, osip_contact_t **dest) { *dest = ((void *)0); if (sip == ((void *)0)) return -2; if (osip_list_size(&sip->contacts) <= pos) return -1; *dest = (osip_contact_t *) osip_list_get(&sip->contacts, pos); return pos; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
uucp-1.07#conn_prep#uconn_free.c
uucp-1.07
conn.c
uconn_free
6
void uconn_free (qconn) struct sconnection *qconn; { (*qconn->qcmds->pufree) (qconn); }
{ "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,...
tmux#tty_prep#tty_cmd_clearendofline.c
tmux
tty.c
tty_cmd_clearendofline
9
void tty_cmd_clearendofline(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; u_int nx, py = ctx->yoff + ctx->ocy; tty_default_attributes(tty, wp, ctx->bg); nx = ((wp->screen)->grid->sx) - ctx->ocx; tty_clear_line(tty, wp, py, ctx->xoff + ctx->ocx, nx, ctx->bg); }
{ "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": 0, "struct_type": 2, "switch_statement": 0, "type_casting": 0,...
mcsim-6.2.0#yourcode_prep#TransformPred.c
mcsim-6.2.0
yourcode.c
TransformPred
4
void TransformPred (PANALYSIS panal, PMCPREDOUT pMCPredOut) { OutspecToLinearArray (panal, pMCPredOut); }
{ "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#MAXIMUM_PRODUCT_SUBARRAY_ADDED_NEGATIVE_PRODUCT_CASE_prep#max.c
transcoder-set
MAXIMUM_PRODUCT_SUBARRAY_ADDED_NEGATIVE_PRODUCT_CASE.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,...