[{"id": "optipng-0.7.8#png_prep#png_user_version_check.c", "codebase": "optipng-0.7.8", "c_file": "png.c", "function": "png_user_version_check", "sloc": "34", "c_code": "int\npng_user_version_check(png_structrp png_ptr, png_const_charp user_png_ver)\n{\n if (user_png_ver != ((void *)0))\n {\n int i = -1;\n int found_dots = 0;\n do\n {\n i++;\n if (user_png_ver[i] != \"1.6.40\"[i])\n png_ptr->flags |= 0x20000U;\n if (user_png_ver[i] == '.')\n found_dots++;\n } while (found_dots < 2 && user_png_ver[i] != 0 &&\n \"1.6.40\"[i] != 0);\n }\n else\n png_ptr->flags |= 0x20000U;\n if ((png_ptr->flags & 0x20000U) != 0)\n {\n size_t pos = 0;\n char m[128];\n pos = png_safecat(m, (sizeof m), pos,\n \"Application built with libpng-\");\n pos = png_safecat(m, (sizeof m), pos, user_png_ver);\n pos = png_safecat(m, (sizeof m), pos, \" but running with \");\n pos = png_safecat(m, (sizeof m), pos, \"1.6.40\");\n (void)pos;\n png_warning(png_ptr, m);\n return 0;\n }\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "uucp-1.07#protz_prep#fzsendcmd.c", "codebase": "uucp-1.07", "c_file": "protz.c", "function": "fzsendcmd", "sloc": "27", "c_code": "boolean\nfzsendcmd(qdaemon, z, ilocal, iremote)\nstruct sdaemon *qdaemon;\nconst char *z;\nint ilocal __attribute__ ((__unused__));\nint iremote __attribute__ ((__unused__));\n{\n size_t n,clen;\n long lredo;\n char *zbuf;\n clen = strlen (z) + 1;\n do { if (((iDebug & ((020))) != 0)) ulog (LOG_DEBUG, (\"fzsendcmd: sending command %s\"), (z)); } while (0);\n if (!fzstart_tx ())\n return (0);\n if ((zbuf = zzgetspace (qdaemon, &n)) == ((void *)0))\n return (0);\n if (clen > n)\n ulog (LOG_FATAL, \"fzsendcmd: clen > n\");\n strcpy (zbuf, z);\n do {\n if (!fzsend_data (qdaemon, zbuf, clen, (1)))\n return (0);\n if (!fzfinish_tx (qdaemon, &lredo))\n return (0);\n } while (lredo >= 0);\n return fzprocess (qdaemon);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "make-4.4.1#remote-stub_prep#remote_kill.c", "codebase": "make-4.4.1", "c_file": "remote-stub.c", "function": "remote_kill", "sloc": "5", "c_code": "int\nremote_kill (pid_t id __attribute__ ((unused)), int sig __attribute__ ((unused)))\n{\n return -1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#uri_prep#xmlCanonicPath.c", "codebase": "libxml2", "c_file": "uri.c", "function": "xmlCanonicPath", "sloc": "13", "c_code": "xmlChar *\nxmlCanonicPath(const xmlChar *path)\n{\n xmlChar *ret;\n if (path == ((void *)0))\n return(((void *)0));\n if (xmlStrstr(path, (xmlChar *) \"://\") != ((void *)0)) {\n ret = xmlURIEscapeStr(path, (xmlChar *) \":/?#[]@!$&()*+,;='%\");\n } else {\n ret = xmlStrdup((const xmlChar *) path);\n }\n return(ret);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#COMPUTE_N_UNDER_MODULO_P_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "COMPUTE_N_UNDER_MODULO_P.c", "function": "f_gold", "sloc": "8", "c_code": "int f_gold ( int n, int p ) {\n if ( n >= p ) return 0;\n int result = 1;\n for ( int i = 1;\n i <= n;\n i ++ ) result = ( result * i ) % p;\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathCastNodeSetToBoolean.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathCastNodeSetToBoolean", "sloc": "6", "c_code": "int\nxmlXPathCastNodeSetToBoolean (xmlNodeSetPtr ns) {\n if ((ns == ((void *)0)) || (ns->nodeNr == 0))\n return(0);\n return(1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_marketfi.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_marketfi", "sloc": "14", "c_code": "int ti_marketfi(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *high = inputs[0];\n const double *low = inputs[1];\n const double *volume = inputs[2];\n (void)options;\n double *output = outputs[0];\n if (size <= ti_marketfi_start(options)) return 0;\n int i;\n for (i = 0; i < size; ++i) {\n *output++ = (high[i] - low[i]) / volume[i];\n }\n ((void) sizeof ((output - outputs[0] == size - ti_marketfi_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_marketfi_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_marketfi_start(options)\", \"tiamalgamation.c\", 2797, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNTS_PATHS_POINT_REACH_ORIGIN_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "COUNTS_PATHS_POINT_REACH_ORIGIN_1.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n, int m ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_STRINGS_WITH_CONSECUTIVE_1S_prep#len.c", "codebase": "transcoder-set", "c_file": "COUNT_STRINGS_WITH_CONSECUTIVE_1S.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#xbuf_prep#xbuf_add_byte.c", "codebase": "less-633", "c_file": "xbuf.c", "function": "xbuf_add_byte", "sloc": "17", "c_code": "void xbuf_add_byte(struct xbuffer *xbuf, unsigned char b)\n{\n if (xbuf->end >= xbuf->size)\n {\n unsigned char *data;\n if (help_ckd_add(&xbuf->size, xbuf->size, xbuf->size ? xbuf->size : 16, sizeof *(&xbuf->size), ((1 ? 0 : *(&xbuf->size)) - 1 < 0)))\n out_of_memory();\n data = (unsigned char *) ecalloc(xbuf->size, sizeof(unsigned char));\n if (xbuf->data != ((void *)0))\n {\n memcpy(data, xbuf->data, xbuf->end);\n free(xbuf->data);\n }\n xbuf->data = data;\n }\n xbuf->data[xbuf->end++] = (unsigned char) b;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#layout_prep#layout_init.c", "codebase": "tmux", "c_file": "layout.c", "function": "layout_init", "sloc": "9", "c_code": "void\nlayout_init(struct window *w, struct window_pane *wp)\n{\n struct layout_cell *lc;\n lc = w->layout_root = layout_create_cell(((void *)0));\n layout_set_size(lc, w->sx, w->sy, 0, 0);\n layout_make_leaf(lc, wp);\n layout_fix_panes(w, w->sx, w->sy);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_IF_X_CAN_GIVE_CHANGE_TO_EVERY_PERSON_IN_THE_QUEUE_prep#main.c", "codebase": "transcoder-set", "c_file": "CHECK_IF_X_CAN_GIVE_CHANGE_TO_EVERY_PERSON_IN_THE_QUEUE.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {20};\nint param0_1[] = {5,5,5,20,10};\nint param0_2[] = {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,10,10,10,10,10,10,10,10,10,10,10,10,10};\nint param0_3[] = {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,18};\nint param0_4[] = {5,5,20};\nint param0_5[] = {10,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5};\nint param0_6[] = {5,10,20,5,5,5,5,5,5,5,5,5,5,5,5};\nint param0_7[] = {-82,-10,-78,-84,68,62,10,20,-86,-98,92,70,40,-12,-20,-36,8,-70,6,8,44,-24,8,-18,76,-54,-14,-94,-68,-62,-24,-36,-74,92,92,-80,48,56,94};\nint param0_8[] = {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5};\nint param0_9[] = {46,46,93,57,82,34,83,80,77,36,80,85,69,28,9,56,49,27,83,25,1,80,99,14,69,82,79,71,74,34};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {4,5,27,12,2,17,7,31,25,20};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#CHOCOLATE_DISTRIBUTION_PROBLEM_prep#len.c", "codebase": "transcoder-set", "c_file": "CHOCOLATE_DISTRIBUTION_PROBLEM.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_1_prep#min.c", "codebase": "transcoder-set", "c_file": "FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "make-4.4.1#remote-stub_prep#start_remote_job.c", "codebase": "make-4.4.1", "c_file": "remote-stub.c", "function": "start_remote_job", "sloc": "7", "c_code": "int\nstart_remote_job (char **argv __attribute__ ((unused)), char **envp __attribute__ ((unused)), int stdin_fd __attribute__ ((unused)),\n int *is_remote __attribute__ ((unused)), pid_t *id_ptr __attribute__ ((unused)),\n int *used_stdin __attribute__ ((unused)))\n{\n return -1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "diffutils-3.10#test-localcharset_prep#main.c", "codebase": "diffutils-3.10", "c_file": "test-localcharset.c", "function": "main", "sloc": "7", "c_code": "int\nmain (void)\n{\n setlocale (6, \"\");\n printf (\"%s\\n\", locale_charset ());\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#matutil_prep#InitlVector.c", "codebase": "mcsim-6.2.0", "c_file": "matutil.c", "function": "InitlVector", "sloc": "9", "c_code": "long *InitlVector (long cVectors)\n{\n if (cVectors == 0) {\n printf (\"Error: zero length array allocation in InitlVector - Exiting\\n\");\n exit (0);\n }\n else\n return (long *) malloc (cVectors * sizeof(long));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_authentication_info_prep#osip_authentication_info_set_srand.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authentication_info.c", "function": "osip_authentication_info_set_srand", "sloc": "3", "c_code": "void osip_authentication_info_set_srand(osip_authentication_info_t *authentication_info, char *srand) {\n authentication_info->srand = (char *) srand;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY_1_prep#main.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY_1.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {19,20,22,23,25,28,33,33,35,35,36,44,44,52,54,54,56,57,57,63,78,78,79,81,89,93,93,93,93,93,93,97};\nint param0_1[] = {-20,96,-32,-8,4,14,-26,-58,-68,-68,42,-12,-28,-68,-72,88,-94,-84,20,-58,-50,-78,-4,-22,-54,90,78,2,40,-78,98,52,-48,40,12,6,54,28,-96,-88,98,-34,-66,42,-18,4,-20,-34};\nint param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1};\nint param0_3[] = {21,50,15,2,59,79,52,55,78,55,73,9,1,58,48,13,71,1};\nint param0_4[] = {-98,-74,-68,-60,-58,-56,-42,-36,-36,-34,-30,-28,-18,-16,-16,-10,-8,-6,-4,0,2,2,10,16,18,30,34,34,36,38,42,46,60,60,62,76,78,88,96};\nint param0_5[] = {1};\nint param0_6[] = {6,6,6,9,10,11,14,19,19,21,23,23,24,29,30,43,45,46,55,55,63,69,71,78,80,81,85,86,87,97,98};\nint param0_7[] = {86,-14,-64,88,28,40,30,92,-2,-52,-14,-96,-30,-54,-88,-8,-48,32,-60,-68,-62,52,52,-28,58,82,68,30,-24,52,74,-20,-62,-98,26,58,-30,76,48,-14,88,58,-40,-20,-50,-70,-92,-84};\nint 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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};\nint param0_9[] = {36,12,61,15,31,7,76,79,27,60,81,2,3,83,96,29,23,30,78,86,86,25,89,96,67,38,24,58,80,13,51,30,45,65,85,48,51,44,16,87,17,28,66,97,16};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {23,47,13,16,37,0,19,32,29,36};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#CONVERT_STRICTLY_INCREASING_ARRAY_MINIMUM_CHANGES_prep#len.c", "codebase": "transcoder-set", "c_file": "CONVERT_STRICTLY_INCREASING_ARRAY_MINIMUM_CHANGES.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#sha3-256_prep#nettle_sha3_256_init.c", "codebase": "nettle-3.9.1", "c_file": "sha3-256.c", "function": "nettle_sha3_256_init", "sloc": "5", "c_code": "void\nnettle_sha3_256_init (struct sha3_256_ctx *ctx)\n{\n memset (ctx, 0, __builtin_offsetof (struct sha3_256_ctx, block));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_htmlReadFd.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_htmlReadFd", "sloc": "14", "c_code": "PyObject *\nlibxml_htmlReadFd(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n htmlDocPtr c_retval;\n int fd;\n char * url;\n char * encoding;\n int options;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"izzi:htmlReadFd\", &fd, &url, &encoding, &options))\n return(((void *)0));\n c_retval = htmlReadFd(fd, url, encoding, options);\n py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tmux#environ_prep#environ_next.c", "codebase": "tmux", "c_file": "environ.c", "function": "environ_next", "sloc": "5", "c_code": "struct environ_entry *\nenviron_next(struct environ_entry *envent)\n{\n return (environ_RB_NEXT(envent));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlInitGlobals.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlInitGlobals", "sloc": "8", "c_code": "PyObject *\nlibxml_xmlInitGlobals(PyObject *self __attribute__ ((__unused__)), PyObject *args __attribute__ ((__unused__))) {\n if (libxml_deprecationWarning(\"xmlInitGlobals\") == -1)\n return(((void *)0));\n xmlInitGlobals();\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#globals_prep#__xmlDeregisterNodeDefaultValue.c", "codebase": "libxml2", "c_file": "globals.c", "function": "__xmlDeregisterNodeDefaultValue", "sloc": "1", "c_code": "xmlDeregisterNodeFunc *__xmlDeregisterNodeDefaultValue(void) { return (&xmlGetThreadLocalStorage(0)->gs_xmlDeregisterNodeDefaultValue); }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "avl#avl_prep#leftRotate.c", "codebase": "avl", "c_file": "avl.c", "function": "leftRotate", "sloc": "10", "c_code": "struct Node *leftRotate(struct Node *x)\n{\n struct Node *y = x->right;\n struct Node *T2 = y->left;\n x->right = T2;\n x->height = max(height(x->left), height(x->right))+1;\n y->left = x;\n y->height = max(height(y->left), height(y->right))+1;\n return y;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_sma.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_sma", "sloc": "21", "c_code": "int ti_sma(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *input = inputs[0];\n const int period = (int)options[0];\n double *output = outputs[0];\n const double scale = 1.0 / period;\n if (period < 1) return 1;\n if (size <= ti_sma_start(options)) return 0;\n double sum = 0;\n int i;\n for (i = 0; i < period; ++i) {\n sum += input[i];\n }\n *output++ = sum * scale;\n for (i = period; i < size; ++i) {\n sum += input[i];\n sum -= input[i-period];\n *output++ = sum * scale;\n }\n ((void) sizeof ((output - outputs[0] == size - ti_sma_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_sma_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_sma_start(options)\", \"tiamalgamation.c\", 3371, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "bc-1.07.1#number_prep#bc_init_numbers.c", "codebase": "bc-1.07.1", "c_file": "number.c", "function": "bc_init_numbers", "sloc": "9", "c_code": "void\nbc_init_numbers (void)\n{\n _zero_ = bc_new_num (1,0);\n _one_ = bc_new_num (1,0);\n _one_->n_value[0] = 1;\n _two_ = bc_new_num (1,0);\n _two_->n_value[0] = 2;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlLoadCatalog.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlLoadCatalog", "sloc": "11", "c_code": "PyObject *\nlibxml_xmlLoadCatalog(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n char * filename;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"z:xmlLoadCatalog\", &filename))\n return(((void *)0));\n c_retval = xmlLoadCatalog(filename);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_NUMBERS_THAT_DONT_CONTAIN_3_prep#main.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBERS_THAT_DONT_CONTAIN_3.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {85,86,3,35,59,38,33,15,75,74};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "tar-1.34#hash_prep#hash_table_ok.c", "codebase": "tar-1.34", "c_file": "hash.c", "function": "hash_table_ok", "sloc": "21", "c_code": "_Bool\nhash_table_ok (const Hash_table *table)\n{\n struct hash_entry const *bucket;\n size_t n_buckets_used = 0;\n size_t n_entries = 0;\n for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)\n {\n if (bucket->data)\n {\n struct hash_entry const *cursor = bucket;\n n_buckets_used++;\n n_entries++;\n while (cursor = cursor->next, cursor)\n n_entries++;\n }\n }\n if (n_buckets_used == table->n_buckets_used && n_entries == table->n_entries)\n return 1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nano-7.2#history_prep#find_in_history.c", "codebase": "nano-7.2", "c_file": "history.c", "function": "find_in_history", "sloc": "10", "c_code": "linestruct *find_in_history(const linestruct *start, const linestruct *end,\n const char *text, size_t len)\n{\n const linestruct *item;\n for (item = start; item != end->prev && item != ((void *)0); item = item->prev) {\n if (strncmp(item->data, text, len) == 0)\n return (linestruct *)item;\n }\n return ((void *)0);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "wget-1.21.4#hash_prep#hash_table_iterate.c", "codebase": "wget-1.21.4", "c_file": "hash.c", "function": "hash_table_iterate", "sloc": "6", "c_code": "void\nhash_table_iterate (struct hash_table *ht, hash_table_iterator *iter)\n{\n iter->pos = ht->cells;\n iter->end = ht->cells + ht->size;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#list_prep#xmlListPushBack.c", "codebase": "libxml2", "c_file": "list.c", "function": "xmlListPushBack", "sloc": "17", "c_code": "int\nxmlListPushBack(xmlListPtr l, void *data)\n{\n xmlLinkPtr lkPlace, lkNew;\n if (l == ((void *)0))\n return(0);\n lkPlace = l->sentinel->prev;\n lkNew = (xmlLinkPtr)xmlMalloc(sizeof(xmlLink));\n if (lkNew == ((void *)0))\n return (0);\n lkNew->data = data;\n lkNew->next = lkPlace->next;\n (lkPlace->next)->prev = lkNew;\n lkPlace->next = lkNew;\n lkNew->prev = lkPlace;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#regex_prep#regexec.c", "codebase": "gawk-5.2.2", "c_file": "regex.c", "function": "regexec", "sloc": "29", "c_code": "int\nregexec (const regex_t *__restrict preg, const char *__restrict string,\n size_t nmatch, regmatch_t pmatch[nmatch], int eflags)\n{\n reg_errcode_t err;\n Idx start, length;\n re_dfa_t *dfa = preg->buffer;\n if (eflags & ~(1 | (1 << 1) | (1 << 2)))\n return _REG_BADPAT;\n if (eflags & (1 << 2))\n {\n start = pmatch[0].rm_so;\n length = pmatch[0].rm_eo;\n }\n else\n {\n start = 0;\n length = strlen (string);\n }\n ((void) dfa);\n if (preg->no_sub)\n err = re_search_internal (preg, string, length, start, length,\n length, 0, ((void *)0), eflags);\n else\n err = re_search_internal (preg, string, length, start, length,\n length, nmatch, pmatch, eflags);\n ((void) 0);\n return err != _REG_NOERROR;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "diffutils-3.10#ed_prep#pr_forward_ed_script.c", "codebase": "diffutils-3.10", "c_file": "ed.c", "function": "pr_forward_ed_script", "sloc": "5", "c_code": "void\npr_forward_ed_script (struct change *script)\n{\n print_script (script, find_change, pr_forward_ed_hunk);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "patch-2.7.6#hash_prep#hash_get_n_buckets.c", "codebase": "patch-2.7.6", "c_file": "hash.c", "function": "hash_get_n_buckets", "sloc": "5", "c_code": "size_t\nhash_get_n_buckets (const Hash_table *table)\n{\n return table->n_buckets;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_SERIES_12_32_52_2N_12_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SUM_SERIES_12_32_52_2N_12.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_TRIANGLES_N_MOVES_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "NUMBER_TRIANGLES_N_MOVES_1.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tinycc#tccrun_prep#rt_get_caller_pc.c", "codebase": "tinycc", "c_file": "tccrun.c", "function": "rt_get_caller_pc", "sloc": "18", "c_code": "int rt_get_caller_pc(Elf64_Addr *paddr, ucontext_t *uc, int level)\n{\n Elf64_Addr fp;\n int i;\n if (level == 0) {\n *paddr = uc->uc_mcontext.gregs[REG_RIP];\n return 0;\n } else {\n fp = uc->uc_mcontext.gregs[REG_RBP];\n for(i=1;isub.nodep.l.lptr);\n ERRNO_node->sub.nodep.l.lptr = make_str_node((cp), (strlen(cp)), 0);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "wget-1.21.4#utils_prep#match_tail.c", "codebase": "wget-1.21.4", "c_file": "utils.c", "function": "match_tail", "sloc": "11", "c_code": "_Bool\nmatch_tail (const char *string, const char *tail, _Bool fold_case)\n{\n int pos = (int) strlen (string) - (int) strlen (tail);\n if (pos < 0)\n return 0;\n if (!fold_case)\n return !strcmp (string + pos, tail);\n else\n return !strcasecmp (string + pos, tail);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#FLOOR_IN_A_SORTED_ARRAY_prep#max.c", "codebase": "transcoder-set", "c_file": "FLOOR_IN_A_SORTED_ARRAY.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_multi_line_strings_prep#json_write_minified_array.c", "codebase": "json.h", "c_file": "allow_multi_line_strings.c", "function": "json_write_minified_array", "sloc": "15", "c_code": "char *json_write_minified_array(const struct json_array_s *array, char *data) {\n struct json_array_element_s *element = 0;\n *data++ = '[';\n for (element = array->start; 0 != element; element = element->next) {\n if (element != array->start) {\n *data++ = ',';\n }\n data = json_write_minified_value(element->value, data);\n if (0 == data) {\n return 0;\n }\n }\n *data++ = ']';\n return data;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES.c", "function": "f_gold", "sloc": "5", "c_code": "int f_gold ( int n, int k ) {\n int p = 1;\n if ( k % 2 ) p = - 1;\n return ( pow ( n - 1, k ) + p * ( n - 1 ) ) / n;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#tccpp_prep#parse_comment.c", "codebase": "tinycc", "c_file": "tccpp.c", "function": "parse_comment", "sloc": "69", "c_code": "uint8_t *parse_comment(uint8_t *p)\n{\n int c;\n p++;\n for(;;) {\n for(;;) {\n c = *p;\n if (c == '\\n' || c == '*' || c == '\\\\')\n break;\n p++;\n c = *p;\n if (c == '\\n' || c == '*' || c == '\\\\')\n break;\n p++;\n }\n if (c == '\\n') {\n file->line_num++;\n p++;\n } else if (c == '*') {\n p++;\n for(;;) {\n c = *p;\n if (c == '*') {\n p++;\n } else if (c == '/') {\n goto end_of_comment;\n } else if (c == '\\\\') {\n file->buf_ptr = p;\n c = handle_eob();\n p = file->buf_ptr;\n if (c == (-1))\n tcc_error(\"unexpected end of file in comment\");\n if (c == '\\\\') {\n while (c == '\\\\') {\n { p++; c = *p; if (c == '\\\\') { file->buf_ptr = p; c = handle_eob(); p = file->buf_ptr; }};\n if (c == '\\n') {\n file->line_num++;\n { p++; c = *p; if (c == '\\\\') { file->buf_ptr = p; c = handle_eob(); p = file->buf_ptr; }};\n } else if (c == '\\r') {\n { p++; c = *p; if (c == '\\\\') { file->buf_ptr = p; c = handle_eob(); p = file->buf_ptr; }};\n if (c == '\\n') {\n file->line_num++;\n { p++; c = *p; if (c == '\\\\') { file->buf_ptr = p; c = handle_eob(); p = file->buf_ptr; }};\n }\n } else {\n goto after_star;\n }\n }\n }\n } else {\n break;\n }\n }\n after_star: ;\n } else {\n file->buf_ptr = p;\n c = handle_eob();\n p = file->buf_ptr;\n if (c == (-1)) {\n tcc_error(\"unexpected end of file in comment\");\n } else if (c == '\\\\') {\n p++;\n }\n }\n }\n end_of_comment:\n p++;\n return p;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 18, "for_loop": 3, "while_loop": 1, "switch_statement": 0, "goto_statement": 2, "return_statement": 1, "break_continue_statement": 3}}, {"id": "rcs-5.10.1#b-divvy_prep#brush_off.c", "codebase": "rcs-5.10.1", "c_file": "b-divvy.c", "function": "brush_off", "sloc": "6", "c_code": "void\nbrush_off (struct divvy *divvy, void *ptr)\n{\n divvy->count--;\n __extension__ ({ struct obstack *__o = (&divvy->space); void *__obj = (void *) (ptr); if (__obj > (void *) __o->chunk && __obj < (void *) __o->chunk_limit) __o->next_free = __o->object_base = (char *) __obj; else _obstack_free (__o, __obj); });\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlParsePEReference.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlParsePEReference", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlParsePEReference(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlParserCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n if (libxml_deprecationWarning(\"xmlParsePEReference\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlParsePEReference\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj));\n xmlParsePEReference(ctxt);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "PROGRAM_FOR_FACTORIAL_OF_A_NUMBER.c", "function": "f_gold", "sloc": "4", "c_code": "unsigned int f_gold ( unsigned int n ) {\n if ( n == 0 ) return 1;\n return n * f_gold ( n - 1 );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsHighPrivateUseSurrogates.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsHighPrivateUseSurrogates", "sloc": "4", "c_code": "int\nxmlUCSIsHighPrivateUseSurrogates(int code) {\n return(((code >= 0xDB80) && (code <= 0xDBFF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#tree_prep#xmlDOMWrapNewCtxt.c", "codebase": "libxml2", "c_file": "tree.c", "function": "xmlDOMWrapNewCtxt", "sloc": "10", "c_code": "xmlDOMWrapCtxtPtr\nxmlDOMWrapNewCtxt(void)\n{\n xmlDOMWrapCtxtPtr ret;\n ret = xmlMalloc(sizeof(xmlDOMWrapCtxt));\n if (ret == ((void *)0))\n return (((void *)0));\n memset(ret, 0, sizeof(xmlDOMWrapCtxt));\n return (ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "less-633#charset_prep#is_composing_char.c", "codebase": "less-633", "c_file": "charset.c", "function": "is_composing_char", "sloc": "7", "c_code": "int is_composing_char(LWCHAR ch)\n{\n if (is_in_table(ch, &user_prt_table)) return 0;\n return is_in_table(ch, &user_compose_table) ||\n is_in_table(ch, &compose_table) ||\n (bs_mode != 2 && is_in_table(ch, &fmt_table));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsBopomofoExtended.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsBopomofoExtended", "sloc": "4", "c_code": "int\nxmlUCSIsBopomofoExtended(int code) {\n return(((code >= 0x31A0) && (code <= 0x31BF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_port_prep#osip_build_random_number.c", "codebase": "libosip2-5.3.1", "c_file": "osip_port.c", "function": "osip_build_random_number", "sloc": "34", "c_code": "unsigned int osip_build_random_number()\n{\n if (!random_seed_set) {\n unsigned int ticks;\n struct timeval tv;\n int fd;\n gettimeofday(&tv, ((void *)0));\n ticks = (unsigned int) (tv.tv_sec + tv.tv_usec);\n fd = open(\"/dev/urandom\", 00);\n if (fd > 0) {\n unsigned int r;\n int i;\n for (i = 0; i < 512; i++) {\n read(fd, &r, sizeof(r));\n ticks += r;\n }\n close(fd);\n }\n srand48(ticks);\n random_seed_set = 1;\n }\n {\n int val = (int) lrand48();\n if (val == 0) {\n unsigned int ticks;\n struct timeval tv;\n gettimeofday(&tv, ((void *)0));\n ticks = (unsigned int) (tv.tv_sec + tv.tv_usec);\n srand48(ticks);\n return (unsigned int) lrand48();\n }\n return val;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#dict_prep#xmlRandom.c", "codebase": "libxml2", "c_file": "dict.c", "function": "xmlRandom", "sloc": "4", "c_code": "unsigned\nxmlRandom(void) {\n return(xoroshiro64ss(xmlGetLocalRngState()));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_SUM_PAIRS_SPECIFIC_DIFFERENCE_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_SUM_PAIRS_SPECIFIC_DIFFERENCE_1.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int N, int k ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#pred_prep#pred_inum.c", "codebase": "findutils-4.9.0", "c_file": "pred.c", "function": "pred_inum", "sloc": "21", "c_code": "_Bool\npred_inum (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)\n{\n (void) pathname;\n switch (pred_ptr->args.numinfo.kind)\n {\n case COMP_GT:\n if (stat_buf->st_ino > pred_ptr->args.numinfo.l_val)\n return (1);\n break;\n case COMP_LT:\n if (stat_buf->st_ino < pred_ptr->args.numinfo.l_val)\n return (1);\n break;\n case COMP_EQ:\n if (stat_buf->st_ino == pred_ptr->args.numinfo.l_val)\n return (1);\n break;\n }\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 3}}, {"id": "screen-4.9.0#process_prep#SwitchWindow.c", "codebase": "screen-4.9.0", "c_file": "process.c", "function": "SwitchWindow", "sloc": "34", "c_code": "void\nSwitchWindow(n)\nint n;\n{\n struct win *p;\n do {} while (0);\n if (n < 0 || n >= maxwin)\n {\n ShowWindows(-1);\n return;\n }\n if ((p = wtab[n]) == 0)\n {\n ShowWindows(n);\n return;\n }\n if (display == 0)\n {\n fore = p;\n return;\n }\n if (p == display->d_fore)\n {\n Msg(0, \"This IS window %d (%s).\", n, p->w_title);\n return;\n }\n if (AclCheckPermWin(display->d_user, 2, p))\n {\n Msg(0, \"Access to window %d denied.\", p->w_number);\n return;\n }\n SetForeWindow(p);\n Activate(fore->w_norefresh);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "libxml2#threads_prep#xmlInitRMutex.c", "codebase": "libxml2", "c_file": "threads.c", "function": "xmlInitRMutex", "sloc": "8", "c_code": "void\nxmlInitRMutex(xmlRMutexPtr tok) {\n (void) tok;\n pthread_mutex_init(&tok->lock, ((void *)0));\n tok->held = 0;\n tok->waiters = 0;\n pthread_cond_init(&tok->cv, ((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_leading_plus_sign_prep#json_get_key_size.c", "codebase": "json.h", "c_file": "allow_leading_plus_sign.c", "function": "json_get_key_size", "sloc": "31", "c_code": "int json_get_key_size(struct json_parse_state_s *state) {\n const size_t flags_bitset = state->flags_bitset;\n if (json_parse_flags_allow_unquoted_keys & flags_bitset) {\n size_t offset = state->offset;\n const size_t size = state->size;\n const char *const src = state->src;\n size_t data_size = state->data_size;\n if ('\"' == src[offset]) {\n return json_get_string_size(state, 1);\n } else if ((json_parse_flags_allow_single_quoted_strings & flags_bitset) &&\n ('\\'' == src[offset])) {\n return json_get_string_size(state, 1);\n } else {\n while ((offset < size) && is_valid_unquoted_key_char(src[offset])) {\n offset++;\n data_size++;\n }\n data_size++;\n if (json_parse_flags_allow_location_information & flags_bitset) {\n state->dom_size += sizeof(struct json_string_ex_s);\n } else {\n state->dom_size += sizeof(struct json_string_s);\n }\n state->offset = offset;\n state->data_size = data_size;\n return 0;\n }\n } else {\n return json_get_string_size(state, 1);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "heman#aabb3_prep#kmAABB3ExpandToContain.c", "codebase": "heman", "c_file": "aabb3.c", "function": "kmAABB3ExpandToContain", "sloc": "11", "c_code": "kmAABB3* kmAABB3ExpandToContain(kmAABB3* pOut, const kmAABB3* pIn, const kmAABB3* other) {\n kmAABB3 result;\n result.min.x = (pIn->min.x < other->min.x)?pIn->min.x:other->min.x;\n result.max.x = (pIn->max.x > other->max.x)?pIn->max.x:other->max.x;\n result.min.y = (pIn->min.y < other->min.y)?pIn->min.y:other->min.y;\n result.max.y = (pIn->max.y > other->max.y)?pIn->max.y:other->max.y;\n result.min.z = (pIn->min.z < other->min.z)?pIn->min.z:other->min.z;\n result.max.z = (pIn->max.z > other->max.z)?pIn->max.z:other->max.z;\n kmAABB3Assign(pOut, &result);\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#callinf_supp_prep#Pl_Load_Call_Info_Arg_1.c", "codebase": "gprolog-1.5.0", "c_file": "callinf_supp.c", "function": "Pl_Load_Call_Info_Arg_1", "sloc": "7", "c_code": "void\nPl_Load_Call_Info_Arg_1(WamWord arg_no_word)\n{\n int arg_no;\n arg_no = Pl_Rd_Integer(arg_no_word);\n (pl_reg_bank[arg_no]) = (((PlULong) (save_call_info) << 3) | (PlULong)0x7);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "wget-1.21.4#asnprintf_prep#asnprintf.c", "codebase": "wget-1.21.4", "c_file": "asnprintf.c", "function": "asnprintf", "sloc": "10", "c_code": "char *\nasnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)\n{\n va_list args;\n char *result;\n __builtin_va_start(args,format);\n result = vasnprintf (resultbuf, lengthp, format, args);\n __builtin_va_end(args);\n return result;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#save-cwd_prep#save_cwd.c", "codebase": "tar-1.34", "c_file": "save-cwd.c", "function": "save_cwd", "sloc": "14", "c_code": "int\nsave_cwd (struct saved_cwd *cwd)\n{\n cwd->name = ((void *)0);\n cwd->desc = open_safer (\".\", 00 | 02000000);\n if (!1)\n cwd->desc = fd_safer_flag (cwd->desc, 02000000);\n if (cwd->desc < 0)\n {\n cwd->name = getcwd (((void *)0), 0);\n return cwd->name ? 0 : -1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "less-633#forwback_prep#get_one_screen.c", "codebase": "less-633", "c_file": "forwback.c", "function": "get_one_screen", "sloc": "11", "c_code": "int get_one_screen(void)\n{\n int nlines;\n POSITION pos = ((POSITION)0);\n for (nlines = 0; nlines < sc_height; nlines++)\n {\n pos = forw_line(pos);\n if (pos == ((POSITION)(-1))) break;\n }\n return (nlines < sc_height);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "nano-7.2#move_prep#do_center.c", "codebase": "nano-7.2", "c_file": "move.c", "function": "do_center", "sloc": "6", "c_code": "void do_center(void)\n{\n adjust_viewport(CENTERING);\n draw_all_subwindows();\n full_refresh();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_SUBSET_SUM_PROBLEM_1_prep#min.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_SUBSET_SUM_PROBLEM_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_1_prep#len.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_TRIPLET_SUM_ARRAY_1_prep#len.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_TRIPLET_SUM_ARRAY_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#tty_prep#tty_region_off.c", "codebase": "tmux", "c_file": "tty.c", "function": "tty_region_off", "sloc": "5", "c_code": "void\ntty_region_off(struct tty *tty)\n{\n tty_region(tty, 0, tty->sy - 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#LONGEST_COMMON_SUBSTRING_SPACE_OPTIMIZED_DP_SOLUTION_prep#sort.c", "codebase": "transcoder-set", "c_file": "LONGEST_COMMON_SUBSTRING_SPACE_OPTIMIZED_DP_SOLUTION.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_hexadecimal_numbers_prep#json_parse_object.c", "codebase": "json.h", "c_file": "allow_hexadecimal_numbers.c", "function": "json_parse_object", "sloc": "89", "c_code": "void json_parse_object(struct json_parse_state_s *state, int is_global_object,\n struct json_object_s *object) {\n const size_t flags_bitset = state->flags_bitset;\n const size_t size = state->size;\n const char *const src = state->src;\n size_t elements = 0;\n int allow_comma = 0;\n struct json_object_element_s *previous = 0;\n if (is_global_object) {\n if ('{' == src[state->offset]) {\n is_global_object = 0;\n }\n }\n if (!is_global_object) {\n state->offset++;\n }\n (void)json_skip_all_skippables(state);\n elements = 0;\n while (state->offset < size) {\n struct json_object_element_s *element = 0;\n struct json_string_s *string = 0;\n struct json_value_s *value = 0;\n if (!is_global_object) {\n (void)json_skip_all_skippables(state);\n if ('}' == src[state->offset]) {\n state->offset++;\n break;\n }\n } else {\n if (json_skip_all_skippables(state)) {\n break;\n }\n }\n if (allow_comma) {\n if (',' == src[state->offset]) {\n state->offset++;\n allow_comma = 0;\n continue;\n }\n }\n element = (struct json_object_element_s *)state->dom;\n state->dom += sizeof(struct json_object_element_s);\n if (0 == previous) {\n object->start = element;\n } else {\n previous->next = element;\n }\n previous = element;\n if (json_parse_flags_allow_location_information & flags_bitset) {\n struct json_string_ex_s *string_ex =\n (struct json_string_ex_s *)state->dom;\n state->dom += sizeof(struct json_string_ex_s);\n string_ex->offset = state->offset;\n string_ex->line_no = state->line_no;\n string_ex->row_no = state->offset - state->line_offset;\n string = &(string_ex->string);\n } else {\n string = (struct json_string_s *)state->dom;\n state->dom += sizeof(struct json_string_s);\n }\n element->name = string;\n (void)json_parse_key(state, string);\n (void)json_skip_all_skippables(state);\n state->offset++;\n (void)json_skip_all_skippables(state);\n if (json_parse_flags_allow_location_information & flags_bitset) {\n struct json_value_ex_s *value_ex = (struct json_value_ex_s *)state->dom;\n state->dom += sizeof(struct json_value_ex_s);\n value_ex->offset = state->offset;\n value_ex->line_no = state->line_no;\n value_ex->row_no = state->offset - state->line_offset;\n value = &(value_ex->value);\n } else {\n value = (struct json_value_s *)state->dom;\n state->dom += sizeof(struct json_value_s);\n }\n element->value = value;\n json_parse_value(state, 0, value);\n elements++;\n allow_comma = 1;\n }\n if (previous) {\n previous->next = 0;\n }\n if (0 == elements) {\n object->start = 0;\n }\n object->length = elements;\n}\n", "c_constructs": {"pointer_type": 6, "array_type": 0, "struct_type": 8, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 15, "memory_management": 0, "memory_operation": 0, "if_statement": 13, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 3}}, {"id": "gawk-5.2.2#gawkfts_prep#gawk_fts_read.c", "codebase": "gawk-5.2.2", "c_file": "gawkfts.c", "function": "gawk_fts_read", "sloc": "124", "c_code": "FTSENT *\ngawk_fts_read(FTS *sp)\n{\n FTSENT *p, *tmp;\n int instr;\n char *t;\n int saved_errno;\n ;\n if (sp->fts_cur == ((void *)0) || (sp->fts_options & (0x200)))\n return (((void *)0));\n p = sp->fts_cur;\n instr = p->fts_instr;\n p->fts_instr = 3;\n if (instr == 1) {\n p->fts_info = fts_stat(sp, p, 0);\n return (p);\n }\n if (instr == 2 &&\n (p->fts_info == 12 || p->fts_info == 13)) {\n p->fts_info = fts_stat(sp, p, 1);\n if (p->fts_info == 1 && !(sp->fts_options & (0x004))) {\n if ((p->fts_symfd = open(\".\", 00 | 02000000, 0))\n == -1) {\n p->fts_errno = (*__errno_location ());\n p->fts_info = 7;\n } else\n p->fts_flags |= 0x02;\n }\n return (p);\n }\n if (p->fts_info == 1) {\n if (instr == 4 ||\n ((sp->fts_options & (0x040)) && p->fts_dev != sp->fts_dev)) {\n if (p->fts_flags & 0x02)\n (void)close(p->fts_symfd);\n if (sp->fts_child) {\n fts_lfree(sp->fts_child);\n sp->fts_child = ((void *)0);\n }\n p->fts_info = 6;\n return (p);\n }\n if (sp->fts_child && (sp->fts_options & (0x100))) {\n (sp->fts_options &= ~(0x100));\n fts_lfree(sp->fts_child);\n sp->fts_child = ((void *)0);\n }\n if (sp->fts_child) {\n if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) {\n p->fts_errno = (*__errno_location ());\n p->fts_flags |= 0x01;\n for (p = sp->fts_child; p; p = p->fts_link)\n p->fts_accpath =\n p->fts_parent->fts_accpath;\n }\n } else if ((sp->fts_child = fts_build(sp, 3)) == ((void *)0)) {\n if ((sp->fts_options & (0x200)))\n return (((void *)0));\n return (p);\n }\n p = sp->fts_child;\n sp->fts_child = ((void *)0);\n goto name;\n }\nnext: tmp = p;\n if ((p = p->fts_link) != ((void *)0)) {\n fts_free(tmp);\n if (p->fts_level == 0) {\n if ((!(sp->fts_options & (0x004)) && fchdir(sp->fts_rfd))) {\n (sp->fts_options |= (0x200));\n return (((void *)0));\n }\n fts_load(sp, p);\n return (sp->fts_cur = p);\n }\n if (p->fts_instr == 4)\n goto next;\n if (p->fts_instr == 2) {\n p->fts_info = fts_stat(sp, p, 1);\n if (p->fts_info == 1 && !(sp->fts_options & (0x004))) {\n if ((p->fts_symfd =\n open(\".\", 00 | 02000000, 0)) == -1) {\n p->fts_errno = (*__errno_location ());\n p->fts_info = 7;\n } else\n p->fts_flags |= 0x02;\n }\n p->fts_instr = 3;\n }\nname: t = sp->fts_path + (p->fts_parent->fts_path[p->fts_parent->fts_pathlen - 1] == '/' ? p->fts_parent->fts_pathlen - 1 : p->fts_parent->fts_pathlen);\n *t++ = '/';\n memmove(t, p->fts_name, (size_t)(p->fts_namelen + 1));\n return (sp->fts_cur = p);\n }\n p = tmp->fts_parent;\n fts_free(tmp);\n if (p->fts_level == -1) {\n fts_free(p);\n (*__errno_location ()) = 0;\n return (sp->fts_cur = ((void *)0));\n }\n sp->fts_path[p->fts_pathlen] = '\\0';\n if (p->fts_level == 0) {\n if ((!(sp->fts_options & (0x004)) && fchdir(sp->fts_rfd))) {\n (sp->fts_options |= (0x200));\n return (((void *)0));\n }\n } else if (p->fts_flags & 0x02) {\n if ((!(sp->fts_options & (0x004)) && fchdir(p->fts_symfd))) {\n saved_errno = (*__errno_location ());\n (void)close(p->fts_symfd);\n (*__errno_location ()) = saved_errno;\n (sp->fts_options |= (0x200));\n return (((void *)0));\n }\n (void)close(p->fts_symfd);\n } else if (!(p->fts_flags & 0x01) &&\n fts_safe_changedir(sp, p->fts_parent, -1, \"..\")) {\n (sp->fts_options |= (0x200));\n return (((void *)0));\n }\n p->fts_info = p->fts_errno ? 7 : 6;\n return (sp->fts_cur = p);\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 17, "memory_management": 0, "memory_operation": 1, "if_statement": 27, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 2, "return_statement": 14, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#candles_prep#tc_marubozu.c", "codebase": "tulipindicators-0.9.1", "c_file": "candles.c", "function": "tc_marubozu", "sloc": "5", "c_code": "int tc_marubozu(int size, TC_REAL const *const *inputs, tc_config const *options, tc_result *output) {\n const TC_REAL *open = inputs[0]; const TC_REAL *high = inputs[1]; const TC_REAL *low = inputs[2]; const TC_REAL *close = inputs[3]; const int period = options->period; const TC_REAL div = 1.0 / period; TC_REAL avg_body_sum = 0; TC_REAL avg_total_sum = 0; if (period < 1) return 1; if (size < period) return 0; int i; for (i = 0; i < period; ++i) { avg_body_sum += (fabs(open[(i)] - close[(i)])); avg_total_sum += (high[(i)] - low[(i)]); }\n while(i < size) { const TC_REAL top = (open[(i)] > close[(i)] ? open[(i)] : close[(i)]); const TC_REAL bottom = (open[(i)] < close[(i)] ? open[(i)] : close[(i)]); const TC_REAL body = (fabs(open[(i)] - close[(i)])); const TC_REAL total = (high[(i)] - low[(i)]); const TC_REAL upper = (high[(i)] - top); const TC_REAL lower = (bottom - low[(i)]); const TC_REAL avg_body = avg_body_sum * div; const TC_REAL avg_total = avg_total_sum * div; (void)top;(void)bottom;(void)body;(void)total; (void)upper;(void)lower;(void)avg_body;(void)avg_total; if (((fabs(open[(i)] - close[(i)])) > (options->body_long * avg_body)) && ((high[(i)] - top) < (options->wick_none * avg_total)) && ((bottom - low[(i)]) < (options->wick_none * avg_total))) { do { const tc_hit hit = {i, (1L<<17)}; const int r = tc_result_add(output, hit); if (r != 0) return r; } while (0); } avg_body_sum += body; avg_body_sum -= (fabs(open[(i-period)] - close[(i-period)])); avg_total_sum += total; avg_total_sum -= (high[(i-period)] - low[(i-period)]); ++i; };\n return 0;\n }\n", "c_constructs": {"pointer_type": 4, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#xinclude_prep#xmlXIncludeSetFlags.c", "codebase": "libxml2", "c_file": "xinclude.c", "function": "xmlXIncludeSetFlags", "sloc": "7", "c_code": "int\nxmlXIncludeSetFlags(xmlXIncludeCtxtPtr ctxt, int flags) {\n if (ctxt == ((void *)0))\n return(-1);\n ctxt->parseFlags = flags;\n return(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#dsa-sha256-sign_prep#nettle_dsa_sha256_sign_digest.c", "codebase": "nettle-3.9.1", "c_file": "dsa-sha256-sign.c", "function": "nettle_dsa_sha256_sign_digest", "sloc": "11", "c_code": "int\nnettle_dsa_sha256_sign_digest(const struct dsa_public_key *pub,\n const struct dsa_private_key *key,\n void *random_ctx, nettle_random_func *random,\n const uint8_t *digest,\n struct dsa_signature *signature)\n{\n return nettle_dsa_sign((const struct dsa_params *) pub, key->x,\n random_ctx, random,\n 32, digest, signature);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS_1_prep#len.c", "codebase": "transcoder-set", "c_file": "TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlNewTextReaderFilename.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlNewTextReaderFilename", "sloc": "15", "c_code": "xmlTextReaderPtr\nxmlNewTextReaderFilename(const char *URI) {\n xmlParserInputBufferPtr input;\n xmlTextReaderPtr ret;\n input = xmlParserInputBufferCreateFilename(URI, XML_CHAR_ENCODING_NONE);\n if (input == ((void *)0))\n return(((void *)0));\n ret = xmlNewTextReader(input, URI);\n if (ret == ((void *)0)) {\n xmlFreeParserInputBuffer(input);\n return(((void *)0));\n }\n ret->allocs |= 1;\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#dfa_prep#xmalloc.c", "codebase": "gawk-5.2.2", "c_file": "dfa.c", "function": "xmalloc", "sloc": "10", "c_code": "void *\nxmalloc(size_t bytes)\n{\n void *p;\n if (bytes == 0)\n bytes = 1;\n if ((p = pma_malloc(bytes)) == ((void *)0))\n xalloc_die ();\n return p;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_list_int16.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_list_int16", "sloc": "5", "c_code": "short binn_list_int16(void *list, int pos) {\n short value;\n binn_list_get(list, pos, 0x41, &value, ((void *)0));\n return value;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_HARMONIC_MEAN_USING_ARITHMETIC_MEAN_GEOMETRIC_MEAN_prep#main.c", "codebase": "transcoder-set", "c_file": "FIND_HARMONIC_MEAN_USING_ARITHMETIC_MEAN_GEOMETRIC_MEAN.c", "function": "main", "sloc": "15", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {54,42,63,19,41,7,39,11,96,15};\n int param1[] = {83,56,12,76,50,26,42,64,81,54};\n for(int i = 0; i < len(param0); ++i)\n {\n if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i])) )/ (abs(f_filled(param0[i],param1[i])) + 0.0000001)) < 0.001)\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#NEXT_POWER_OF_2_2_prep#len.c", "codebase": "transcoder-set", "c_file": "NEXT_POWER_OF_2_2.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#GIVEN_A_SORTED_AND_ROTATED_ARRAY_FIND_IF_THERE_IS_A_PAIR_WITH_A_GIVEN_SUM_prep#main.c", "codebase": "transcoder-set", "c_file": "GIVEN_A_SORTED_AND_ROTATED_ARRAY_FIND_IF_THERE_IS_A_PAIR_WITH_A_GIVEN_SUM.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {3,8,10,15,18,19,20,20,21,22,26,30,32,34,43,45,50,50,51,52,53,56,57,58,62,63,65,82,86,91,91,92,92,93,97};\nint param0_1[] = {30,-34,86,-30,-26,2,90,8,26,-8,-8,0,-86,68,22,72,-76,48,-24,90,-22,-58,-54,90,-12,-12,88,72,-58,68,84,22,60,66,-52,-38,-90,62,30,-26,88,-36,92,32,-32,-42,-90,-40,-10};\nint 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};\nint param0_3[] = {20,68,40,19,74,69};\nint param0_4[] = {-98,-94,-94,-94,-90,-88,-88,-78,-74,-70,-68,-66,-64,-62,-54,-50,-40,-40,-40,-40,-28,-22,-22,-18,-14,-12,0,6,6,8,12,20,22,26,28,36,42,44,48,52,56,60,68,84};\nint param0_5[] = {1,1,0};\nint param0_6[] = {12,22,38,76,80,86};\nint param0_7[] = {-36,-10,-26,34,-50,66,-2,-14,-62,60,-48,94,-70,6,-60,-90,28,-4,-20,-52,40,-76,-92,-14,54,4,-58,38,-74,-96,-88,86,-54,98,48,68,78,-28,-80,-46};\nint param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};\nint param0_9[] = {69,99,25,52,41,51,7,33,42,91,85,57,91,89,86,11,70,67,30,92,81,23,51,98,85,5,50,44};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {17,41,26,4,28,2,4,26,17,21};\n int param2[] = {30,10,1,88,-94,60,3,37,20,27};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE_prep#max.c", "codebase": "transcoder-set", "c_file": "DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#dirname-lgpl_prep#mdir_name.c", "codebase": "tar-1.34", "c_file": "dirname-lgpl.c", "function": "mdir_name", "sloc": "17", "c_code": "char *\nmdir_name (char const *file)\n{\n size_t length = dir_len (file);\n _Bool append_dot = (length == 0\n || (0\n && length == ((void) (file), 0)\n && file[2] != '\\0' && ! ((file[2]) == '/')));\n char *dir = malloc (length + append_dot + 1);\n if (!dir)\n return ((void *)0);\n memcpy (dir, file, length);\n if (append_dot)\n dir[length++] = '.';\n dir[length] = '\\0';\n return dir;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 1, "memory_operation": 1, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "buffer-0.4.0#buffer_prep#buffer_indexof.c", "codebase": "buffer-0.4.0", "c_file": "buffer.c", "function": "buffer_indexof", "sloc": "6", "c_code": "ssize_t\nbuffer_indexof(buffer_t *self, char *str) {\n char *sub = strstr(self->data, str);\n if (!sub) return -1;\n return sub - self->data;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#stream_supp_prep#Pl_Add_Mirror_To_Stream.c", "codebase": "gprolog-1.5.0", "c_file": "stream_supp.c", "function": "Pl_Add_Mirror_To_Stream", "sloc": "20", "c_code": "void\nPl_Add_Mirror_To_Stream(int stm, int m_stm)\n{\n StmInf *pstm = pl_stm_tbl[stm];\n StmInf *m_pstm = pl_stm_tbl[m_stm];\n StmLst *m;\n if (stm == m_stm)\n return;\n for(m = pstm->mirror; m ; m = m->next)\n if (m->stm == m_stm)\n return;\n m = (StmLst *) Pl_Malloc_Check(sizeof(StmLst), \"stream_supp.c\", 619);\n m->stm = m_stm;\n m->next = pstm->mirror;\n pstm->mirror = m;\n m = (StmLst *) Pl_Malloc_Check(sizeof(StmLst), \"stream_supp.c\", 624);\n m->stm = stm;\n m->next = m_pstm->mirror_of;\n m_pstm->mirror_of = m;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_PALINDROMIC_SUBSEQUENCE_GIVEN_STRING_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "COUNT_PALINDROMIC_SUBSEQUENCE_GIVEN_STRING.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( char str [] ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "cflow-1.7#c_prep#yyfree.c", "codebase": "cflow-1.7", "c_file": "c.c", "function": "yyfree", "sloc": "4", "c_code": "void yyfree (void * ptr )\n{\n free( (char *) ptr );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#chvalid_prep#xmlIsCombining.c", "codebase": "libxml2", "c_file": "chvalid.c", "function": "xmlIsCombining", "sloc": "4", "c_code": "int\nxmlIsCombining(unsigned int ch) {\n return((((ch) < 0x100) ? 0 : xmlCharInRange((ch), &xmlIsCombiningGroup)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#mod_prep#AnnounceProgram.c", "codebase": "mcsim-6.2.0", "c_file": "mod.c", "function": "AnnounceProgram", "sloc": "8", "c_code": "void AnnounceProgram (void)\n{\n printf (\"\\n________________________________________\\n\");\n printf (\"\\nMod \" \"v6.2.0\" \" - Model Generator for MCSim\\n\\n\");\n printf (\"MCSim and associated software comes with ABSOLUTELY NO WARRANTY;\\n\"\n \"This is free software, and you are welcome to redistribute it\\n\"\n \"under certain conditions; see the GNU General Public License.\\n\\n\");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#min_prep#ti_min_ref.c", "codebase": "tulipindicators-0.9.1", "c_file": "min.c", "function": "ti_min_ref", "sloc": "16", "c_code": "int ti_min_ref(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *input = inputs[0];\n const int period = (int)options[0];\n double *output = outputs[0];\n if (period < 1) return 1;\n if (size <= ti_min_start(options)) return 0;\n for (int i = period-1; i < size; ++i) {\n double min = input[i-period+1];\n for (int j = i-period+2; j <= i; ++j) {\n min = ((min) < (input[j]) ? (min) : (input[j]));\n }\n *output++ = min;\n }\n ((void) sizeof ((output - outputs[0] == size - ti_min_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_min_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_min_start(options)\", \"indicators/min.c\", 88, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#xmlwriter_prep#xmlTextWriterWriteBase64.c", "codebase": "libxml2", "c_file": "xmlwriter.c", "function": "xmlTextWriterWriteBase64", "sloc": "31", "c_code": "int\nxmlTextWriterWriteBase64(xmlTextWriterPtr writer, const char *data,\n int start, int len)\n{\n int count;\n int sum;\n xmlLinkPtr lk;\n xmlTextWriterStackEntry *p;\n if ((writer == ((void *)0)) || (data == ((void *)0)) || (start < 0) || (len < 0))\n return -1;\n sum = 0;\n lk = xmlListFront(writer->nodes);\n if (lk != 0) {\n p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);\n if (p != 0) {\n count = xmlTextWriterHandleStateDependencies(writer, p);\n if (count < 0)\n return -1;\n sum += count;\n }\n }\n if (writer->indent)\n writer->doindent = 0;\n count =\n xmlOutputBufferWriteBase64(writer->out, len,\n (unsigned char *) data + start);\n if (count < 0)\n return -1;\n sum += count;\n return sum;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#TRIANGULAR_MATCHSTICK_NUMBER_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "TRIANGULAR_MATCHSTICK_NUMBER.c", "function": "f_gold", "sloc": "3", "c_code": "int f_gold ( int x ) {\n return ( 3 * x * ( x + 1 ) ) / 2;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlwriter_prep#xmlTextWriterWriteVFormatElement.c", "codebase": "libxml2", "c_file": "xmlwriter.c", "function": "xmlTextWriterWriteVFormatElement", "sloc": "16", "c_code": "int\nxmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,\n const xmlChar * name, const char *format,\n va_list argptr)\n{\n int rc;\n xmlChar *buf;\n if (writer == ((void *)0))\n return -1;\n buf = xmlTextWriterVSprintf(format, argptr);\n if (buf == ((void *)0))\n return -1;\n rc = xmlTextWriterWriteElement(writer, name, buf);\n xmlFree(buf);\n return rc;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_SUM_ALTERNATING_SUBSEQUENCE_SUM_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_SUM_ALTERNATING_SUBSEQUENCE_SUM.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#matutil_prep#InitiVector.c", "codebase": "mcsim-6.2.0", "c_file": "matutil.c", "function": "InitiVector", "sloc": "9", "c_code": "int *InitiVector (long cVectors)\n{\n if (cVectors == 0) {\n printf (\"Error: zero length array allocation in InitiVector - Exiting\\n\");\n exit (0);\n }\n else\n return (int *) malloc (cVectors * sizeof(int));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlNextChar.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlNextChar", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlNextChar(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlParserCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n if (libxml_deprecationWarning(\"xmlNextChar\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlNextChar\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj));\n xmlNextChar(ctxt);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#error_prep#xmlGetLastError.c", "codebase": "libxml2", "c_file": "error.c", "function": "xmlGetLastError", "sloc": "8", "c_code": "const xmlError *\nxmlGetLastError(void)\n{\n const xmlError *error = xmlGetLastErrorInternal();\n if (error->code == XML_ERR_OK)\n return(((void *)0));\n return(error);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tmux#session_prep#session_groups_RB_FIND.c", "codebase": "tmux", "c_file": "session.c", "function": "session_groups_RB_FIND", "sloc": "1", "c_code": "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); } return (((void *)0)); }\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_BINOMIAL_COEFFICIENTS_prep#max.c", "codebase": "transcoder-set", "c_file": "SUM_BINOMIAL_COEFFICIENTS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "heman#gaussian_prep#generate_gaussian_row.c", "codebase": "heman", "c_file": "gaussian.c", "function": "generate_gaussian_row", "sloc": "20", "c_code": "void generate_gaussian_row(int* target, int fwidth)\n{\n ((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__); }));\n int nbytes = fwidth * sizeof(int);\n int* tmp = malloc(nbytes);\n target[0] = tmp[0] = 1;\n for (int col = 1; col < fwidth; col++) {\n target[col] = 0;\n tmp[col] = 0;\n }\n for (int row = 1; row < fwidth; row++) {\n for (int col = 1; col <= row; col++) {\n target[col] = tmp[col] + tmp[col - 1];\n }\n for (int col = 1; col <= row; col++) {\n tmp[col] = target[col];\n }\n }\n free(tmp);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 2, "memory_operation": 0, "if_statement": 1, "for_loop": 4, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#xvasprintf_prep#xvasprintf.c", "codebase": "tar-1.34", "c_file": "xvasprintf.c", "function": "xvasprintf", "sloc": "28", "c_code": "char *\nxvasprintf (const char *format, va_list args)\n{\n char *result;\n {\n size_t argcount = 0;\n const char *f;\n for (f = format;;)\n {\n if (*f == '\\0')\n return xstrcat (argcount, args);\n if (*f != '%')\n break;\n f++;\n if (*f != 's')\n break;\n f++;\n argcount++;\n }\n }\n if (vasprintf (&result, format, args) < 0)\n {\n if ((*__errno_location ()) == 12)\n xalloc_die ();\n return ((void *)0);\n }\n return result;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 2}}, {"id": "wget-1.21.4#host_prep#is_valid_ip_address.c", "codebase": "wget-1.21.4", "c_file": "host.c", "function": "is_valid_ip_address", "sloc": "11", "c_code": "_Bool\nis_valid_ip_address (const char *name)\n{\n const char *endp;\n endp = name + strlen(name);\n if (is_valid_ipv4_address (name, endp))\n return 1;\n if (is_valid_ipv6_address (name, endp))\n return 1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#base64-encode_prep#nettle_base64_encode_raw.c", "codebase": "nettle-3.9.1", "c_file": "base64-encode.c", "function": "nettle_base64_encode_raw", "sloc": "5", "c_code": "void\nnettle_base64_encode_raw(char *dst, size_t length, const uint8_t *src)\n{\n encode_raw(base64_encode_table, dst, length, src);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json-c#test_json_pointer_prep#main.c", "codebase": "json-c", "c_file": "test_json_pointer.c", "function": "main", "sloc": "9", "c_code": "int main(int argc, char **argv)\n{\n test_example_get();\n test_recursion_get();\n test_wrong_inputs_get();\n test_example_set();\n test_wrong_inputs_set();\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#io_prep#register_output_wrapper.c", "codebase": "gawk-5.2.2", "c_file": "io.c", "function": "register_output_wrapper", "sloc": "13", "c_code": "void\nregister_output_wrapper(awk_output_wrapper_t *wrapper)\n{\n if (wrapper == ((void *)0))\n (*(set_loc(\"io.c\", 3217), r_fatal))(gettext(\"register_output_wrapper: received NULL pointer\"));\n wrapper->next = ((void *)0);\n if (op_head == ((void *)0)) {\n op_head = op_tail = wrapper;\n } else {\n op_tail->next = wrapper;\n op_tail = op_tail->next;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#dirCache_prep#freeDirCache.c", "codebase": "mtools-4.0.43", "c_file": "dirCache.c", "function": "freeDirCache", "sloc": "14", "c_code": "void freeDirCache(Stream_t *Stream)\n{\n dirCache_t *cache, **dcp;\n dcp = getDirCacheP(Stream);\n cache = *dcp;\n if(cache) {\n int n;\n n=freeDirCacheRange(cache, 0, cache->nr_entries);\n if(n >= 0)\n low_level_dir_write_end(Stream, n);\n free(cache);\n *dcp = 0;\n }\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_SUBSTRINGS_WITH_SAME_FIRST_AND_LAST_CHARACTERS_prep#max.c", "codebase": "transcoder-set", "c_file": "COUNT_SUBSTRINGS_WITH_SAME_FIRST_AND_LAST_CHARACTERS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_BINOMIAL_COEFFICIENTS_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "SUM_BINOMIAL_COEFFICIENTS.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_ARRAY_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_ARRAY.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "dap-3.10#ps_prep#nland.c", "codebase": "dap-3.10", "c_file": "ps.c", "function": "nland", "sloc": "18", "c_code": "void nland(pict *p, int nplots, int nperpage)\n{\n int pn;\n if (nplots % nperpage)\n {\n fprintf(dap_err,\n \"(pict_nlandscape) Number of plots %d not a multiple of number per page %d\\n\",\n nplots, nperpage);\n exit(1);\n }\n pict_land(nplots / nperpage);\n for (pn = 0; pn < nplots; pn += nperpage)\n {\n pict_page();\n pict_show(p + pn);\n }\n pict_end();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "screen-4.9.0#layout_prep#RenumberLayout.c", "codebase": "screen-4.9.0", "c_file": "layout.c", "function": "RenumberLayout", "sloc": "15", "c_code": "int RenumberLayout(struct layout *layout, int number)\n{\n int old;\n struct layout *lay;\n old = layout->lay_number;\n if (number < 0 || number >= 10)\n return 0;\n lay = laytab[number];\n laytab[number] = layout;\n layout->lay_number = number;\n laytab[old] = lay;\n if (lay)\n lay->lay_number = old;\n return 1;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_adxr_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_adxr_start", "sloc": "3", "c_code": "int ti_adxr_start(double const *options) {\n return ((int)options[0]-1) * 3;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#tiffutil_prep#minitiff_init_info.c", "codebase": "optipng-0.7.8", "c_file": "tiffutil.c", "function": "minitiff_init_info", "sloc": "5", "c_code": "void minitiff_init_info(struct minitiff_info *info_ptr)\n{\n memset(info_ptr, 0, sizeof(*info_ptr));\n info_ptr->photometric = (unsigned int)(-1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlschemastypes_prep#xmlSchemaValidatePredefinedType.c", "codebase": "libxml2", "c_file": "xmlschemastypes.c", "function": "xmlSchemaValidatePredefinedType", "sloc": "5", "c_code": "int\nxmlSchemaValidatePredefinedType(xmlSchemaTypePtr type, const xmlChar *value,\n xmlSchemaValPtr *val) {\n return(xmlSchemaValPredefTypeNode(type, value, val, ((void *)0)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_SUM_BITONIC_SUBARRAY_prep#len.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_SUM_BITONIC_SUBARRAY.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_IF_A_NUMBER_IS_JUMBLED_OR_NOT_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "CHECK_IF_A_NUMBER_IS_JUMBLED_OR_NOT.c", "function": "f_gold", "sloc": "11", "c_code": "_Bool f_gold ( int num ) {\n if ( num / 10 == 0 ) return 1;\n while ( num != 0 ) {\n if ( num / 10 == 0 ) return 1;\n int digit1 = num % 10;\n int digit2 = ( num / 10 ) % 10;\n if ( abs ( digit2 - digit1 ) > 1 ) return 0;\n num = num / 10;\n }\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsCJKUnifiedIdeographsExtensionB.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsCJKUnifiedIdeographsExtensionB", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsCJKUnifiedIdeographsExtensionB(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsCJKUnifiedIdeographsExtensionB\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsCJKUnifiedIdeographsExtensionB\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsCJKUnifiedIdeographsExtensionB(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tar-1.34#version-etc_prep#version_etc_ar.c", "codebase": "tar-1.34", "c_file": "version-etc.c", "function": "version_etc_ar", "sloc": "10", "c_code": "void\nversion_etc_ar (FILE *stream,\n const char *command_name, const char *package,\n const char *version, const char * const * authors)\n{\n size_t n_authors;\n for (n_authors = 0; authors[n_authors]; n_authors++)\n ;\n version_etc_arn (stream, command_name, package, version, authors, n_authors);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#osdep-linux_prep#osdep_get_name.c", "codebase": "tmux", "c_file": "osdep-linux.c", "function": "osdep_get_name", "sloc": "29", "c_code": "char *\nosdep_get_name(int fd, __attribute__ ((__unused__)) char *tty)\n{\n FILE *f;\n char *path, *buf;\n size_t len;\n int ch;\n pid_t pgrp;\n if ((pgrp = tcgetpgrp(fd)) == -1)\n return (((void *)0));\n xasprintf(&path, \"/proc/%lld/cmdline\", (long long) pgrp);\n if ((f = fopen(path, \"r\")) == ((void *)0)) {\n free(path);\n return (((void *)0));\n }\n free(path);\n len = 0;\n buf = ((void *)0);\n while ((ch = fgetc(f)) != (-1)) {\n if (ch == '\\0')\n break;\n buf = xrealloc(buf, len + 2);\n buf[len++] = ch;\n }\n if (buf != ((void *)0))\n buf[len] = '\\0';\n fclose(f);\n return (buf);\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 2, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 1}}, {"id": "wget-1.21.4#connect_prep#fd_peek.c", "codebase": "wget-1.21.4", "c_file": "connect.c", "function": "fd_peek", "sloc": "11", "c_code": "int\nfd_peek (int fd, char *buf, int bufsize, double timeout)\n{\n struct transport_info *info;\n 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_info; else { info = hash_table_get (transport_map, (void *)(intptr_t) fd); last_fd = fd; last_info = info; last_tick = transport_map_modified_tick; } } while (0);\n if (info && info->imp->peeker)\n return info->imp->peeker (fd, buf, bufsize, info->ctx, timeout);\n if (!poll_internal (fd, info, WAIT_FOR_READ, timeout))\n return -1;\n return sock_peek (fd, buf, bufsize);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "enscript-1.6.6#strhash_prep#strhash_free.c", "codebase": "enscript-1.6.6", "c_file": "strhash.c", "function": "strhash_free", "sloc": "17", "c_code": "void\nstrhash_free (StringHashPtr hash)\n{\n HashList *list, *list_next;\n int i;\n if (!hash)\n return;\n for (i = 0; i < 8192; i++)\n for (list = hash->hash_table[i]; list; list = list_next)\n {\n list_next = list->next;\n free (list->key);\n free (list);\n }\n free (hash->hash_table);\n free (hash);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 4, "memory_operation": 0, "if_statement": 1, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_FACTORIAL_NUMBERS_IN_A_GIVEN_RANGE_prep#sort.c", "codebase": "transcoder-set", "c_file": "COUNT_FACTORIAL_NUMBERS_IN_A_GIVEN_RANGE.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME_prep#main.c", "codebase": "transcoder-set", "c_file": "MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n char param0[][100] = {\"aadaa\",\"2674377254\",\"11\",\"0011000\",\"26382426486138\",\"111010111010\",\"abccba\",\"5191\",\"1110101101\",\"abcdecbe\"};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "PROGRAM_FOR_FACTORIAL_OF_A_NUMBER.c", "function": "f_filled", "sloc": "1", "c_code": "unsigned int f_filled ( unsigned int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "lil#lil_prep#lil_parse_value.c", "codebase": "lil", "c_file": "lil.c", "function": "lil_parse_value", "sloc": "5", "c_code": "lil_value_t lil_parse_value(lil_t lil, lil_value_t val, int funclevel)\n{\n if (!val || !val->d || !val->l) return alloc_value(((void *)0));\n return lil_parse(lil, val->d, val->l, funclevel);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_SUBSEQUENCE_SUM_SUCH_THAT_NO_THREE_ARE_CONSECUTIVE_prep#main.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_SUBSEQUENCE_SUM_SUCH_THAT_NO_THREE_ARE_CONSECUTIVE.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n 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};\nint param0_1[] = {98,76,-80,-30,82,52,-14,28,98,18,82,52,26,-62,-8};\nint param0_2[] = {0,0,0,0,0,1,1,1,1};\nint param0_3[] = {21,26,85,73,47,10,54,9,11,70,42,95,44,91};\nint param0_4[] = {-94,-92,-90,-84,-76,-68,-60,-50,-34,-34,-20,-16,-6,18,50,54,66,70,96};\nint param0_5[] = {1,0,1,1,1,0,1,0,0,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1};\nint param0_6[] = {2,3,4,4,14,14,18,21,24,26,29,31,32,34,36,37,38,40,42,44,44,54,63,69,77,77,82,82,86,87,90,93,95};\nint param0_7[] = {-46,64,-44,88,-74,54,40,-2,-24,94,40,-44,56,-54,-60,-86,-58,48,-90,12,-76,-30,94,-34,14,12,80,-40,60};\nint param0_8[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1};\nint param0_9[] = {4,32,63,23,44,57,59,69,88,61,66,61,65,33,79,58,71,2,80,41,83,12,20,9,7,40,36,97,10,98,66,78,71,37,53};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {35,7,7,12,9,16,31,22,7,26};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "optipng-0.7.8#deflate_prep#deflateSetHeader.c", "codebase": "optipng-0.7.8", "c_file": "deflate.c", "function": "deflateSetHeader", "sloc": "6", "c_code": "int deflateSetHeader(z_streamp strm, gz_headerp head) {\n if (deflateStateCheck(strm) || strm->state->wrap != 2)\n return (-2);\n strm->state->gzhead = head;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlCreateURLParserCtxt.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlCreateURLParserCtxt", "sloc": "12", "c_code": "PyObject *\nlibxml_xmlCreateURLParserCtxt(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlParserCtxtPtr c_retval;\n char * filename;\n int options;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"zi:xmlCreateURLParserCtxt\", &filename, &options))\n return(((void *)0));\n c_retval = xmlCreateURLParserCtxt(filename, options);\n py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlDebugDumpString.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlDebugDumpString", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlDebugDumpString(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n FILE * output;\n PyObject *pyobj_output;\n xmlChar * str;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Oz:xmlDebugDumpString\", &pyobj_output, &str))\n return(((void *)0));\n output = (FILE *) (((pyobj_output) == (&_Py_NoneStruct)) ? ((void *)0) : libxml_PyFileGet(pyobj_output));\n xmlDebugDumpString(output, str);\n libxml_PyFileRelease(output);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#asin_prep#ti_asin.c", "codebase": "tulipindicators-0.9.1", "c_file": "asin.c", "function": "ti_asin", "sloc": "1", "c_code": "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; }\n", "c_constructs": {"pointer_type": 3, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#wam2ma_prep#F_unify_atom.c", "codebase": "gprolog-1.5.0", "c_file": "wam2ma.c", "function": "F_unify_atom", "sloc": "7", "c_code": "void\nF_unify_atom(ArgVal arg[])\n{\n ArgVal *top = arg; BTNode *atom; char *str_atom; ((str_atom) = *((char * *) (top)) , (top)++); atom = BT_String_Add(&bt_tagged_atom, str_atom);\n Inst_Printf(\"call_c\", \"Pl_Unify_Atom_Tagged(ta(%d))\", atom->no);\n Inst_Printf(\"fail_ret\", \"\");\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#debug_prep#has_break_or_watch_point.c", "codebase": "gawk-5.2.2", "c_file": "debug.c", "function": "has_break_or_watch_point", "sloc": "37", "c_code": "int\nhas_break_or_watch_point(int *pnum, _Bool any)\n{\n BREAKPOINT *b = ((void *)0);\n struct list_item *w = ((void *)0);\n if (any) {\n if (breakpoints.next != &breakpoints)\n b = breakpoints.next;\n if (watch_list.next != &watch_list)\n w = watch_list.next;\n if (! b && ! w)\n return 0;\n if (b && ! w) {\n *pnum = b->number;\n return D_break;\n }\n if (w && ! b) {\n *pnum = w->number;\n return D_watch;\n }\n if (w->number > b->number) {\n *pnum = w->number;\n return D_watch;\n }\n *pnum = b->number;\n return D_break;\n }\n for (b = breakpoints.next; b != &breakpoints; b = b->next) {\n if (b->number == *pnum)\n return D_break;\n }\n for (w = watch_list.next; w != &watch_list; w = w->next) {\n if (w->number == *pnum)\n return D_watch;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 9, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 8, "break_continue_statement": 0}}, {"id": "dap-3.10#misc_prep#dap_numdate.c", "codebase": "dap-3.10", "c_file": "misc.c", "function": "dap_numdate", "sloc": "37", "c_code": "int dap_numdate(char date[])\n{\n int d;\n int dday;\n int dyr;\n int mon;\n int day;\n int yr;\n int m;\n int y;\n int ndays;\n for (d = 0, mon = 0; d < 2 && '0' <= date[d] && date[d] <= '9'; d++)\n mon = 10 * mon + date[d] - '0';\n if (date[d] == '/')\n d++;\n for (dday = d, day = 0; d < dday + 2 && '0' <= date[d] && date[d] <= '9'; d++)\n day = 10 * day + date[d] - '0';\n if (date[d] == '/')\n d++;\n for (dyr = d, yr = 0; d < dyr + 4 && '0' <= date[d] && date[d] <= '9'; d++)\n yr = 10 * yr + date[d] - '0';\n if (d < dyr + 4)\n return -1;\n for (m = 1, ndays = day; m < mon; m++)\n ndays += mdays[m];\n if ((mon > 2) && !(yr % 4) && (yr % 100))\n ndays++;\n if (yr < 1752)\n return -1;\n for (y = 1752; y < yr; y++)\n {\n ndays += 365;\n if (!(y % 4) && ((y % 100) || !(y % 400)))\n ndays++;\n }\n return ndays;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 5, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS_prep#max.c", "codebase": "transcoder-set", "c_file": "FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlThrDefGetWarningsDefaultValue.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlThrDefGetWarningsDefaultValue", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlThrDefGetWarningsDefaultValue(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int v;\n if (libxml_deprecationWarning(\"xmlThrDefGetWarningsDefaultValue\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlThrDefGetWarningsDefaultValue\", &v))\n return(((void *)0));\n c_retval = xmlThrDefGetWarningsDefaultValue(v);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlCtxtResetPush.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlCtxtResetPush", "sloc": "19", "c_code": "int\nxmlCtxtResetPush(xmlParserCtxtPtr ctxt, const char *chunk,\n int size, const char *filename, const char *encoding)\n{\n xmlParserInputPtr input;\n if (ctxt == ((void *)0))\n return(1);\n xmlCtxtReset(ctxt);\n input = xmlNewPushInput(filename, chunk, size);\n if (input == ((void *)0))\n return(1);\n if (inputPush(ctxt, input) < 0) {\n xmlFreeInputStream(input);\n return(1);\n }\n if (encoding != ((void *)0))\n xmlSwitchEncodingName(ctxt, encoding);\n return(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libxml2#HTMLparser_prep#htmlParseDoc.c", "codebase": "libxml2", "c_file": "HTMLparser.c", "function": "htmlParseDoc", "sloc": "4", "c_code": "htmlDocPtr\nhtmlParseDoc(const xmlChar *cur, const char *encoding) {\n return(htmlSAXParseDoc(cur, encoding, ((void *)0), ((void *)0)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#window_prep#windows_RB_REMOVE_COLOR.c", "codebase": "tmux", "c_file": "window.c", "function": "windows_RB_REMOVE_COLOR", "sloc": "1", "c_code": "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 { (tmp)->entry.rbe_color = 0; (parent)->entry.rbe_color = 1; } while (0); do { (tmp) = (parent)->entry.rbe_right; if (((parent)->entry.rbe_right = (tmp)->entry.rbe_left)) { ((tmp)->entry.rbe_left)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_left = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_right; } if (((tmp)->entry.rbe_left == ((void *)0) || ((tmp)->entry.rbe_left)->entry.rbe_color == 0) && ((tmp)->entry.rbe_right == ((void *)0) || ((tmp)->entry.rbe_right)->entry.rbe_color == 0)) { (tmp)->entry.rbe_color = 1; elm = parent; parent = (elm)->entry.rbe_parent; } else { if ((tmp)->entry.rbe_right == ((void *)0) || ((tmp)->entry.rbe_right)->entry.rbe_color == 0) { struct window *oleft; if ((oleft = (tmp)->entry.rbe_left)) (oleft)->entry.rbe_color = 0; (tmp)->entry.rbe_color = 1; do { (oleft) = (tmp)->entry.rbe_left; if (((tmp)->entry.rbe_left = (oleft)->entry.rbe_right)) { ((oleft)->entry.rbe_right)->entry.rbe_parent = (tmp); } do {} while (0); if (((oleft)->entry.rbe_parent = (tmp)->entry.rbe_parent)) { if ((tmp) == ((tmp)->entry.rbe_parent)->entry.rbe_left) ((tmp)->entry.rbe_parent)->entry.rbe_left = (oleft); else ((tmp)->entry.rbe_parent)->entry.rbe_right = (oleft); } else (head)->rbh_root = (oleft); (oleft)->entry.rbe_right = (tmp); (tmp)->entry.rbe_parent = (oleft); do {} while (0); if (((oleft)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_right; } (tmp)->entry.rbe_color = (parent)->entry.rbe_color; (parent)->entry.rbe_color = 0; if ((tmp)->entry.rbe_right) ((tmp)->entry.rbe_right)->entry.rbe_color = 0; do { (tmp) = (parent)->entry.rbe_right; if (((parent)->entry.rbe_right = (tmp)->entry.rbe_left)) { ((tmp)->entry.rbe_left)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_left = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); elm = (head)->rbh_root; break; } } else { tmp = (parent)->entry.rbe_left; if ((tmp)->entry.rbe_color == 1) { do { (tmp)->entry.rbe_color = 0; (parent)->entry.rbe_color = 1; } while (0); do { (tmp) = (parent)->entry.rbe_left; if (((parent)->entry.rbe_left = (tmp)->entry.rbe_right)) { ((tmp)->entry.rbe_right)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_right = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_left; } if (((tmp)->entry.rbe_left == ((void *)0) || ((tmp)->entry.rbe_left)->entry.rbe_color == 0) && ((tmp)->entry.rbe_right == ((void *)0) || ((tmp)->entry.rbe_right)->entry.rbe_color == 0)) { (tmp)->entry.rbe_color = 1; elm = parent; parent = (elm)->entry.rbe_parent; } else { if ((tmp)->entry.rbe_left == ((void *)0) || ((tmp)->entry.rbe_left)->entry.rbe_color == 0) { struct window *oright; if ((oright = (tmp)->entry.rbe_right)) (oright)->entry.rbe_color = 0; (tmp)->entry.rbe_color = 1; do { (oright) = (tmp)->entry.rbe_right; if (((tmp)->entry.rbe_right = (oright)->entry.rbe_left)) { ((oright)->entry.rbe_left)->entry.rbe_parent = (tmp); } do {} while (0); if (((oright)->entry.rbe_parent = (tmp)->entry.rbe_parent)) { if ((tmp) == ((tmp)->entry.rbe_parent)->entry.rbe_left) ((tmp)->entry.rbe_parent)->entry.rbe_left = (oright); else ((tmp)->entry.rbe_parent)->entry.rbe_right = (oright); } else (head)->rbh_root = (oright); (oright)->entry.rbe_left = (tmp); (tmp)->entry.rbe_parent = (oright); do {} while (0); if (((oright)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_left; } (tmp)->entry.rbe_color = (parent)->entry.rbe_color; (parent)->entry.rbe_color = 0; if ((tmp)->entry.rbe_left) ((tmp)->entry.rbe_left)->entry.rbe_color = 0; do { (tmp) = (parent)->entry.rbe_left; if (((parent)->entry.rbe_left = (tmp)->entry.rbe_right)) { ((tmp)->entry.rbe_right)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_right = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); elm = (head)->rbh_root; break; } } } if (elm) (elm)->entry.rbe_color = 0; }\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "transcoder-set#MINIMUM_STEPS_MINIMIZE_N_PER_GIVEN_CONDITION_prep#len.c", "codebase": "transcoder-set", "c_file": "MINIMUM_STEPS_MINIMIZE_N_PER_GIVEN_CONDITION.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MODULAR_EXPONENTIATION_POWER_IN_MODULAR_ARITHMETIC_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "MODULAR_EXPONENTIATION_POWER_IN_MODULAR_ARITHMETIC.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderCurrentNode.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderCurrentNode", "sloc": "8", "c_code": "xmlNodePtr\nxmlTextReaderCurrentNode(xmlTextReaderPtr reader) {\n if (reader == ((void *)0))\n return(((void *)0));\n if (reader->curnode != ((void *)0))\n return(reader->curnode);\n return(reader->node);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "less-633#cvt_prep#cvt_length.c", "codebase": "less-633", "c_file": "cvt.c", "function": "cvt_length", "sloc": "6", "c_code": "int cvt_length(int len, int ops)\n{\n if (utf_mode)\n len *= 4;\n return (len + 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#streebog_prep#nettle_streebog256_init.c", "codebase": "nettle-3.9.1", "c_file": "streebog.c", "function": "nettle_streebog256_init", "sloc": "8", "c_code": "void\nnettle_streebog256_init(struct streebog512_ctx *ctx)\n{\n memset(ctx->state, 1, sizeof(ctx->state));\n memset(ctx->count, 0, sizeof(ctx->count));\n memset(ctx->sigma, 0, sizeof(ctx->sigma));\n ctx->index = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 3, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "cflow-1.7#symbol_prep#install_target.c", "codebase": "cflow-1.7", "c_file": "symbol.c", "function": "install_target", "sloc": "9", "c_code": "Symbol *\ninstall_target(char *name)\n{\n Symbol *sp = install(name, 0);\n sp->flag = symbol_target;\n if (!data_in_list(sp, target_symbol_list))\n linked_list_append(&target_symbol_list, sp);\n return sp;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#io_prep#nextfile.c", "codebase": "gawk-5.2.2", "c_file": "io.c", "function": "nextfile", "sloc": "93", "c_code": "int\nnextfile(IOBUF **curfile, _Bool skipping)\n{\n static long i = 1;\n static _Bool files = 0;\n NODE *arg, *tmp;\n const char *fname;\n int fd = (-1);\n int errcode = 0;\n IOBUF *iop = *curfile;\n if (skipping) {\n errcode = 0;\n if (iop != ((void *)0)) {\n errcode = iop->errcode;\n (void) iop_close(iop);\n }\n *curfile = ((void *)0);\n return (errcode == 0);\n }\n if (iop != ((void *)0)) {\n if ((((iop)->flag & IOP_AT_EOF) != 0)) {\n ((void) (0));\n (void) iop_close(iop);\n *curfile = ((void *)0);\n return 1;\n } else\n return 0;\n }\n for (; i < (!(((ARGC_node->sub.nodep.l.lptr))->flags & (MPFN|MPZN)) ? ((long) (ARGC_node->sub.nodep.l.lptr)->sub.val.nm.fltnum) : ((((ARGC_node->sub.nodep.l.lptr))->flags & MPFN) ? (mpfr_get_si((ARGC_node->sub.nodep.l.lptr)->sub.val.nm.mpnum, ROUND_MODE)) : (__gmpz_get_si((ARGC_node->sub.nodep.l.lptr)->sub.val.nm.mpi)))); i++) {\n tmp = make_number((double) i);\n (void) force_string_fmt((tmp), CONVFMT, CONVFMTidx);\n arg = in_array(ARGV_node, tmp);\n unref(tmp);\n if (arg == ((void *)0) || arg->sub.val.slen == 0)\n continue;\n arg = force_string_fmt((arg), CONVFMT, CONVFMTidx);\n if (! (do_flags & DO_TRADITIONAL)) {\n unref(ARGIND_node->sub.nodep.l.lptr);\n ARGIND_node->sub.nodep.l.lptr = make_number((double) i);\n }\n if (! arg_assign(arg->sub.val.sp, 0)) {\n files = 1;\n fname = arg->sub.val.sp;\n unref(FILENAME_node->sub.nodep.l.lptr);\n FILENAME_node->sub.nodep.l.lptr = dupnode(arg);\n if ((((FNR_node->sub.nodep.l.lptr)->flags & (MPZN|MPFN)) != 0))\n __gmpz_set_ui(MFNR, 0);\n FNR = 0;\n (*__errno_location ()) = 0;\n fd = devopen(fname, (\"r\"));\n if (fd == (-1) && (*__errno_location ()) == 24) {\n close_one();\n close_one();\n fd = devopen(fname, (\"r\"));\n }\n errcode = (*__errno_location ());\n if (! (do_flags & DO_TRADITIONAL))\n update_ERRNO_int((*__errno_location ()));\n iop = iop_alloc(fd, fname, errcode);\n *curfile = iop_finish(iop);\n if (iop->public.fd == (-1))\n iop->errcode = errcode;\n else if (iop->valid)\n iop->errcode = 0;\n if (! (do_flags & DO_TRADITIONAL) && iop->errcode != 0)\n update_ERRNO_int(iop->errcode);\n return ++i;\n }\n }\n if (files == 0) {\n files = 1;\n (*__errno_location ()) = 0;\n if (! (do_flags & DO_TRADITIONAL))\n update_ERRNO_int((*__errno_location ()));\n unref(FILENAME_node->sub.nodep.l.lptr);\n FILENAME_node->sub.nodep.l.lptr = make_str_node((\"-\"), (1), 0);\n FILENAME_node->sub.nodep.l.lptr->flags |= USER_INPUT;\n fname = \"-\";\n iop = iop_alloc(fileno(stdin), fname, 0);\n *curfile = iop_finish(iop);\n if (iop->public.fd == (-1)) {\n errcode = (*__errno_location ());\n (*__errno_location ()) = 0;\n update_ERRNO_int((*__errno_location ()));\n (void) iop_close(iop);\n *curfile = ((void *)0);\n (*(set_loc(\"io.c\", 523), r_fatal))(gettext(\"cannot open file `%s' for reading: %s\"),\n fname, strerror(errcode));\n }\n return ++i;\n }\n return -1;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 14, "memory_management": 0, "memory_operation": 0, "if_statement": 16, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 1}}, {"id": "ed-1.19#buffer_prep#path_max.c", "codebase": "ed-1.19", "c_file": "buffer.c", "function": "path_max", "sloc": "10", "c_code": "int path_max( const char * filename )\n {\n long result;\n if( !filename ) filename = \"/\";\n (*__errno_location ()) = 0;\n result = pathconf( filename, _PC_PATH_MAX );\n if( result < 0 ) { if( (*__errno_location ()) ) result = 256; else result = 1024; }\n else if( result < 256 ) result = 256;\n return result;\n }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json-c#test_parse_prep#main.c", "codebase": "json-c", "c_file": "test_parse.c", "function": "main", "sloc": "14", "c_code": "int main(void)\n{\n if (0) mc_set_debug(1);\n static const char separator[] = \"==================================\";\n test_basic_parse();\n puts(separator);\n test_utf8_parse();\n puts(separator);\n test_verbose_parse();\n puts(separator);\n test_incremental_parse();\n puts(separator);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#stack_prep#stack_push.c", "codebase": "gawk-5.2.2", "c_file": "stack.c", "function": "stack_push", "sloc": "21", "c_code": "int stack_push(void *object)\n{\n void **new_stack;\n size_t new_size = 2 * size;\n if (stack == ((void *)0)) {\n stack = (void **) malloc(20 * sizeof(void *));\n if (stack == ((void *)0))\n return 0;\n size = 20;\n } else if (index + 1 >= size) {\n if (new_size < size)\n return 0;\n new_stack = realloc(stack, new_size * sizeof(void *));\n if (new_stack == ((void *)0))\n return 0;\n size = new_size;\n stack = new_stack;\n }\n stack[++index] = object;\n return 1;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 2, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#AREA_OF_A_HEXAGON_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "AREA_OF_A_HEXAGON.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "grep-3.11#inttostr_prep#inttostr.c", "codebase": "grep-3.11", "c_file": "inttostr.c", "function": "inttostr", "sloc": "20", "c_code": "__attribute__ ((__warn_unused_result__)) char *\ninttostr (int i, char *buf)\n{\n char *p = buf + (((((sizeof (int) * 8) - (! ((__typeof__ (int)) 0 < (__typeof__ (int)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (int)) 0 < (__typeof__ (int)) -1)));\n *p = 0;\n if (i < 0)\n {\n do\n *--p = '0' - i % 10;\n while ((i /= 10) != 0);\n *--p = '-';\n }\n else\n {\n do\n *--p = '0' + i % 10;\n while ((i /= 10) != 0);\n }\n return p;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngrutil_prep#png_read_IDAT_data.c", "codebase": "optipng-0.7.8", "c_file": "pngrutil.c", "function": "png_read_IDAT_data", "sloc": "80", "c_code": "void\npng_read_IDAT_data(png_structrp png_ptr, png_bytep output,\n png_alloc_size_t avail_out)\n{\n png_ptr->zstream.next_out = output;\n png_ptr->zstream.avail_out = 0;\n if (output == ((void *)0))\n avail_out = 0;\n do\n {\n int ret;\n png_byte tmpbuf[1024];\n if (png_ptr->zstream.avail_in == 0)\n {\n uInt avail_in;\n png_bytep buffer;\n while (png_ptr->idat_size == 0)\n {\n png_crc_finish(png_ptr, 0);\n png_ptr->idat_size = png_read_chunk_header(png_ptr);\n if (png_ptr->chunk_name != (((png_uint_32)(73) << (24)) | ((png_uint_32)(68) << (16)) | ((png_uint_32)(65) << (8)) | ((png_uint_32)(84) << (0))))\n png_error(png_ptr, \"Not enough image data\");\n }\n avail_in = png_ptr->IDAT_read_size;\n if (avail_in > png_ptr->idat_size)\n avail_in = (uInt)png_ptr->idat_size;\n buffer = png_read_buffer(png_ptr, avail_in, 0 );\n png_crc_read(png_ptr, buffer, avail_in);\n png_ptr->idat_size -= avail_in;\n png_ptr->zstream.next_in = buffer;\n png_ptr->zstream.avail_in = avail_in;\n }\n if (output != ((void *)0))\n {\n uInt out = ((uInt)-1);\n if (out > avail_out)\n out = (uInt)avail_out;\n avail_out -= out;\n png_ptr->zstream.avail_out = out;\n }\n else\n {\n png_ptr->zstream.next_out = tmpbuf;\n png_ptr->zstream.avail_out = (sizeof tmpbuf);\n }\n ret = png_zlib_inflate(png_ptr, 0);\n if (output != ((void *)0))\n avail_out += png_ptr->zstream.avail_out;\n else\n avail_out += (sizeof tmpbuf) - png_ptr->zstream.avail_out;\n png_ptr->zstream.avail_out = 0;\n if (ret == 1)\n {\n png_ptr->zstream.next_out = ((void *)0);\n png_ptr->mode |= 0x08;\n png_ptr->flags |= 0x0008U;\n if (png_ptr->zstream.avail_in > 0 || png_ptr->idat_size > 0)\n png_chunk_benign_error(png_ptr, \"Extra compressed data\");\n break;\n }\n if (ret != 0)\n {\n png_zstream_error(png_ptr, ret);\n if (output != ((void *)0))\n png_chunk_error(png_ptr, png_ptr->zstream.msg);\n else\n {\n png_chunk_benign_error(png_ptr, png_ptr->zstream.msg);\n return;\n }\n }\n } while (avail_out > 0);\n if (avail_out > 0)\n {\n if (output != ((void *)0))\n png_error(png_ptr, \"Not enough image data\");\n else\n png_chunk_benign_error(png_ptr, \"Too much image data\");\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 13, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#xmlschemas_prep#xmlSchemaSetValidErrors.c", "codebase": "libxml2", "c_file": "xmlschemas.c", "function": "xmlSchemaSetValidErrors", "sloc": "13", "c_code": "void\nxmlSchemaSetValidErrors(xmlSchemaValidCtxtPtr ctxt,\n xmlSchemaValidityErrorFunc err,\n xmlSchemaValidityWarningFunc warn, void *ctx)\n{\n if (ctxt == ((void *)0))\n return;\n ctxt->error = err;\n ctxt->warning = warn;\n ctxt->errCtxt = ctx;\n if (ctxt->pctxt != ((void *)0))\n xmlSchemaSetParserErrors(ctxt->pctxt, err, warn, ctx);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bzip2#bzlib_prep#BZ2_bzReadClose.c", "codebase": "bzip2", "c_file": "bzlib.c", "function": "BZ2_bzReadClose", "sloc": "12", "c_code": "void BZ2_bzReadClose ( int *bzerror, BZFILE *b )\n{\n bzFile* bzf = (bzFile*)b;\n { if (bzerror != ((void *)0)) *bzerror = 0; if (bzf != ((void *)0)) bzf->lastErr = 0; };\n if (bzf == ((void *)0))\n { { if (bzerror != ((void *)0)) *bzerror = 0; if (bzf != ((void *)0)) bzf->lastErr = 0; }; return; };\n if (bzf->writing)\n { { if (bzerror != ((void *)0)) *bzerror = (-1); if (bzf != ((void *)0)) bzf->lastErr = (-1); }; return; };\n if (bzf->initialisedOk)\n (void)BZ2_bzDecompressEnd ( &(bzf->strm) );\n free ( bzf );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 1, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_hexadecimal_numbers_prep#json_skip_c_style_comments.c", "codebase": "json.h", "c_file": "allow_hexadecimal_numbers.c", "function": "json_skip_c_style_comments", "sloc": "40", "c_code": "int json_skip_c_style_comments(struct json_parse_state_s *state) {\n if ((state->offset + 2) > state->size) {\n return 0;\n }\n if ('/' == state->src[state->offset]) {\n if ('/' == state->src[state->offset + 1]) {\n state->offset++;\n state->offset++;\n while (state->offset < state->size) {\n switch (state->src[state->offset]) {\n default:\n state->offset++;\n break;\n case '\\n':\n state->offset++;\n state->line_no++;\n state->line_offset = state->offset;\n return 1;\n }\n }\n return 1;\n } else if ('*' == state->src[state->offset + 1]) {\n state->offset++;\n state->offset++;\n while (state->offset + 1 < state->size) {\n if (('*' == state->src[state->offset]) &&\n ('/' == state->src[state->offset + 1])) {\n state->offset += 2;\n return 1;\n } else if ('\\n' == state->src[state->offset]) {\n state->line_no++;\n state->line_offset = state->offset;\n }\n state->offset++;\n }\n return 1;\n }\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 2, "switch_statement": 1, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 1}}, {"id": "transcoder-set#NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n, int k ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_1.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#dapruns_prep#ecopy.c", "codebase": "dap-3.10", "c_file": "dapruns.c", "function": "ecopy", "sloc": "15", "c_code": "char *ecopy(char *e)\n{\n char *copy;\n if (e)\n {\n if (!(copy = malloc(strlen(e) + 1)))\n {\n perror(\"dap\");\n exit(1);\n }\n strcpy(copy, e);\n return copy;\n }\n return ((void *)0);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#BINARY_SEARCH_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "BINARY_SEARCH.c", "function": "f_gold", "sloc": "9", "c_code": "int f_gold ( int arr [ ], int l, int r, int x ) {\n if ( r >= l ) {\n int mid = l + ( r - l ) / 2;\n if ( arr [ mid ] == x ) return mid;\n if ( arr [ mid ] > x ) return f_gold ( arr, l, mid - 1, x );\n return f_gold ( arr, mid + 1, r, x );\n }\n return - 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#regex_prep#re_match_2.c", "codebase": "gawk-5.2.2", "c_file": "regex.c", "function": "re_match_2", "sloc": "8", "c_code": "regoff_t\nre_match_2 (struct re_pattern_buffer *bufp, const char *string1, Idx length1,\n const char *string2, Idx length2, Idx start,\n struct re_registers *regs, Idx stop)\n{\n return re_search_2_stub (bufp, string1, length1, string2, length2,\n start, 0, regs, stop, 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#edit_prep#edit_prev.c", "codebase": "less-633", "c_file": "edit.c", "function": "edit_prev", "sloc": "4", "c_code": "int edit_prev(int n)\n{\n return edit_istep(curr_ifile, n, -1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "heman#aabb2_prep#kmAABB2DiameterY.c", "codebase": "heman", "c_file": "aabb2.c", "function": "kmAABB2DiameterY", "sloc": "3", "c_code": "float kmAABB2DiameterY(const kmAABB2* aabb) {\n return aabb->max.y - aabb->min.y;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_prep#main.c", "codebase": "transcoder-set", "c_file": "COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X.c", "function": "main", "sloc": "38", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {11,13,16,23,26,28,31,34,37,39,44,48,56,59,79,91,96,98};\nint param0_1[] = {50,14,-98,14,90,36,66,44,10,-98,-24,-36,-32,-50};\nint param0_2[] = {0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1};\nint param0_3[] = {88,14,29,87,86,58};\nint param0_4[] = {-98,-92,-88,-86,-82,-76,-72,-66,-56,-48,-34,-28,-28,-26,-20,-18,-18,-16,-16,-12,-4,0,6,12,16,20,22,30,34,34,36,56,58,62,64,80,82,94};\nint param0_5[] = {1,1,1,1,0,1,1,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,0,1,1,1,0,0};\nint param0_6[] = {70,70,74};\nint param0_7[] = {-20,-12,-50,76,24,64,-22,-4,-68};\nint param0_8[] = {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};\nint param0_9[] = {68,75,51,45,73,95,48,53,70,41,65,47,46,43,79,29,50};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1_0[] = {1,1,9,14,17,23,26,31,33,36,53,60,71,75,76,84,87,88};\nint param1_1[] = {34,-6,-66,0,-6,82,60,-98,-8,60,-2,4,22,76};\nint param1_2[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};\nint param1_3[] = {91,95,64,4,63,35};\nint param1_4[] = {-94,-90,-88,-84,-82,-78,-76,-72,-70,-58,-58,-46,-42,-40,-40,-32,-22,-20,-18,-12,-8,-6,6,6,18,20,34,46,60,62,66,72,72,76,76,78,92,98};\nint param1_5[] = {1,0,1,1,0,0,1,0,1,0,1,0,1,0,0,0,1,1,0,1,1,0,1,1,1,0,1,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,0,1,0,0};\nint param1_6[] = {15,55,84};\nint param1_7[] = {18,98,-88,86,72,-44,82,94,58};\nint param1_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,1,1,1,1,1,1,1,1,1,1,1,1,1,1};\nint param1_9[] = {4,6,76,65,16,13,85,43,31,14,81,90,24,87,40,25,88};\nint *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9};\n int param2[] = {9,11,14,3,34,39,1,5,27,10};\n int param3[] = {15,12,9,5,32,26,1,4,26,10};\n int param4[] = {11,8,12,5,23,34,1,7,37,9};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i],param3[i],param4[i]) == f_gold(param0[i],param1[i],param2[i],param3[i],param4[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "json-c#json_object_prep#json_object_new_double.c", "codebase": "json-c", "c_file": "json_object.c", "function": "json_object_new_double", "sloc": "9", "c_code": "struct json_object *json_object_new_double(double d)\n{\n 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);\n if (!jso)\n return ((void *)0);\n jso->base._to_json_string = &json_object_double_to_json_string_default;\n jso->c_double = d;\n return &jso->base;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#FIBONACCI_MODULO_P_prep#main.c", "codebase": "transcoder-set", "c_file": "FIBONACCI_MODULO_P.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {51,40,68,7,8,32,93,75,71,15};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "screen-4.9.0#tty_prep#SetMode.c", "codebase": "screen-4.9.0", "c_file": "tty.c", "function": "SetMode", "sloc": "32", "c_code": "void SetMode(struct mode *op, struct mode *np, int flow, int interrupt)\n{\n *np = *op;\n do {} while (0);\n np->tio.c_iflag &= ~0000400;\n np->tio.c_iflag &= ~0000040;\n np->tio.c_oflag &= ~0000004;\n np->tio.c_lflag &= ~(0000002 | 0000010);\n np->tio.c_lflag &= ~0100000;\n if (interrupt)\n np->tio.c_lflag |= 0000001;\n else\n np->tio.c_lflag &= ~0000001;\n np->tio.c_cc[6] = 1;\n np->tio.c_cc[5] = 0;\n if (!interrupt || !flow)\n np->tio.c_cc[0] = '\\0';\n np->tio.c_cc[1] = '\\0';\n if (flow == 0)\n {\n np->tio.c_cc[8] = '\\0';\n np->tio.c_cc[9] = '\\0';\n np->tio.c_iflag &= ~0002000;\n }\n np->tio.c_cc[13] = '\\0';\n np->tio.c_cc[15] = '\\0';\n np->tio.c_cc[10] = '\\0';\n np->tio.c_cc[2] = 0x7f;\n np->tio.c_cc[3] = '\\0';\n np->tio.c_cc[12] = '\\0';\n np->tio.c_cc[14] = '\\0';\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_fork_prep#pth_fork.c", "codebase": "pth-2.0.7", "c_file": "pth_fork.c", "function": "pth_fork", "sloc": "22", "c_code": "pid_t pth_fork(void)\n{\n pid_t pid;\n int i;\n for (i = pth_atfork_idx-1; i >= 0; i--)\n if (pth_atfork_list[i].prepare != ((void *)0))\n pth_atfork_list[i].prepare(pth_atfork_list[i].arg);\n if ((pid = fork()) == -1)\n return (0);\n if (pid != 0) {\n for (i = 0; i <= pth_atfork_idx-1; i++)\n if (pth_atfork_list[i].parent != ((void *)0))\n pth_atfork_list[i].parent(pth_atfork_list[i].arg);\n }\n else {\n __pth_scheduler_drop();\n for (i = 0; i <= pth_atfork_idx-1; i++)\n if (pth_atfork_list[i].child != ((void *)0))\n pth_atfork_list[i].child(pth_atfork_list[i].arg);\n }\n return pid;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_N_DIGITS_NON_DECREASING_INTEGERS_prep#sort.c", "codebase": "transcoder-set", "c_file": "NUMBER_N_DIGITS_NON_DECREASING_INTEGERS.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlThrDefSaveNoEmptyTags.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlThrDefSaveNoEmptyTags", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlThrDefSaveNoEmptyTags(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int v;\n if (libxml_deprecationWarning(\"xmlThrDefSaveNoEmptyTags\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlThrDefSaveNoEmptyTags\", &v))\n return(((void *)0));\n c_retval = xmlThrDefSaveNoEmptyTags(v);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_CHECK_PLUS_PERFECT_NUMBER_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "PROGRAM_CHECK_PLUS_PERFECT_NUMBER.c", "function": "f_gold", "sloc": "15", "c_code": "_Bool f_gold ( int x ) {\n int temp = x;\n int n = 0;\n while ( x != 0 ) {\n x /= 10;\n n ++;\n }\n x = temp;\n int sum = 0;\n while ( x != 0 ) {\n sum += pow ( x % 10, n );\n x /= 10;\n }\n return ( sum == temp );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#xheader_prep#xheader_string_add.c", "codebase": "tar-1.34", "c_file": "xheader.c", "function": "xheader_string_add", "sloc": "9", "c_code": "void\nxheader_string_add (struct xheader *xhdr, char const *s)\n{\n if (xhdr->buffer)\n return;\n xheader_init (xhdr);\n xhdr->string_length += strlen (s);\n x_obstack_grow (xhdr, s, strlen (s));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#uux_prep#main.c", "codebase": "uucp-1.07", "c_file": "uux.c", "function": "main", "sloc": "890", "c_code": "int\nmain (argc, argv)\n int argc;\n char **argv;\n{\n const char *zrequestor = ((void *)0);\n boolean fretstdin = (0);\n boolean fcopy = (0);\n boolean fdontcopy = (0);\n const char *zconfig = ((void *)0);\n boolean fjobid = (0);\n boolean flink = (0);\n boolean fno_ack = (0);\n boolean fread_stdin = (0);\n boolean fuucico = (1);\n const char *zstatus_file = ((void *)0);\n boolean fexpand = (1);\n boolean ferror_ack = (0);\n int iopt;\n pointer puuconf;\n int iuuconf;\n const char *zlocalname;\n int i;\n size_t clen;\n char *zargs;\n char *zarg;\n char *zcmd;\n const char *zsys;\n char *zexclam;\n boolean fgetcwd;\n const char *zuser;\n char *zforward;\n char **pzargs;\n int calloc_args;\n int cargs;\n const char *zinput_from;\n const char *zinput_to;\n const char *zinput_temp;\n boolean finputcopied;\n char *zcall_system;\n boolean fcall_any;\n struct uuconf_system slocalsys;\n boolean fneedshell;\n char *zfullcmd;\n boolean fpoll;\n char aboptions[10];\n zProgram = argv[0];\n ulog_fatal_fn (uxfatal);\n gnu_opterr = 0;\n while (1)\n {\n while (getopt_long (argc, argv, \"+a:bcCg:I:jlnprs:Wvx:z\",\n asXlongopts, (int *) ((void *)0)) != (-1))\n ;\n if (gnu_optind >= argc || strcmp (argv[gnu_optind], \"-\") != 0)\n break;\n argv[gnu_optind] = zbufcpy (\"-p\");\n gnu_optind = 0;\n }\n gnu_opterr = 1;\n gnu_optind = 0;\n while ((iopt = getopt_long (argc, argv, \"+a:bcCg:I:jlnprs:Wvx:z\",\n asXlongopts, (int *) ((void *)0))) != (-1))\n {\n switch (iopt)\n {\n case 'a':\n zrequestor = gnu_optarg;\n break;\n case 'b':\n fretstdin = (1);\n break;\n case 'c':\n fcopy = (0);\n fdontcopy = (1);\n break;\n case 'C':\n fcopy = (1);\n break;\n case 'I':\n if (fsysdep_other_config (gnu_optarg))\n zconfig = gnu_optarg;\n break;\n case 'j':\n fjobid = (1);\n break;\n case 'g':\n bXgrade = gnu_optarg[0];\n break;\n case 'l':\n flink = (1);\n break;\n case 'n':\n fno_ack = (1);\n break;\n case 'p':\n fread_stdin = (1);\n break;\n case 'r':\n fuucico = (0);\n break;\n case 's':\n zstatus_file = gnu_optarg;\n break;\n case 'W':\n fexpand = (0);\n break;\n case 'x':\n iDebug |= idebug_parse (gnu_optarg);\n break;\n case 'z':\n ferror_ack = (1);\n break;\n case 2:\n if (*gnu_optarg == 't'\n || *gnu_optarg == 'T'\n || *gnu_optarg == 'y'\n || *gnu_optarg == 'Y'\n || *gnu_optarg == 'e'\n || *gnu_optarg == 'E')\n {\n ferror_ack = (1);\n fno_ack = (0);\n }\n else if (*gnu_optarg == 'f'\n || *gnu_optarg == 'F'\n || *gnu_optarg == 'n'\n || *gnu_optarg == 'N')\n {\n ferror_ack = (0);\n fno_ack = (1);\n }\n break;\n case 'v':\n printf (\"uux (Taylor UUCP) %s\\n\", \"1.07\");\n printf (\"Copyright (C) 1991, 92, 93, 94, 1995, 2002 Ian Lance Taylor\\n\");\n printf (\"This program is free software; you may redistribute it under the terms of\\n\");\n printf (\"the GNU General Public LIcense. This program has ABSOLUTELY NO WARRANTY.\\n\");\n exit (0);\n case 1:\n uxhelp ();\n exit (0);\n case 0:\n break;\n default:\n uxusage ();\n break;\n }\n }\n if (! (((*__ctype_b_loc ())[(int) ((((unsigned char) (bXgrade))))] & (unsigned short int) _ISalnum))\n || ((bXgrade < '0' || bXgrade > '9')\n && (bXgrade < 'a' || bXgrade > 'z')\n && (bXgrade < 'A' || bXgrade > 'Z')))\n {\n ulog (LOG_ERROR, \"Ignoring illegal grade\");\n bXgrade = ('N');\n }\n if ((zrequestor != ((void *)0)\n && zrequestor[strcspn (zrequestor, \" \\t\\n\")] != '\\0')\n || (zstatus_file != ((void *)0)\n && zstatus_file[strcspn (zstatus_file, \" \\t\\n\")] != '\\0'))\n fXquote = (1);\n if (gnu_optind == argc)\n uxusage ();\n iuuconf = uuconf_init (&puuconf, (const char *) ((void *)0), zconfig);\n if (iuuconf != (0))\n ulog_uuconf (LOG_FATAL, puuconf, iuuconf);\n {\n const char *zdebug;\n iuuconf = uuconf_debuglevel (puuconf, &zdebug);\n if (iuuconf != (0))\n ulog_uuconf (LOG_FATAL, puuconf, iuuconf);\n if (zdebug != ((void *)0))\n iDebug |= idebug_parse (zdebug);\n }\n clen = 1;\n for (i = gnu_optind; i < argc; i++)\n clen += strlen (argv[i]) + 1;\n zargs = zbufalc (clen);\n *zargs = '\\0';\n for (i = gnu_optind; i < argc; i++)\n {\n strcat (zargs, argv[i]);\n strcat (zargs, \" \");\n }\n clen = strcspn (zargs, \";&*|<> \\t\");\n zcmd = zbufalc (clen + 1);\n strncpy (zcmd, zargs, clen);\n zcmd[clen] = '\\0';\n zargs += clen;\n calloc_args = 10;\n pzargs = (char **) xmalloc (calloc_args * sizeof (char *));\n cargs = 0;\n for (zarg = strtok (zargs, \" \\t\");\n zarg != ((void *)0);\n zarg = strtok ((char *) ((void *)0), \" \\t\"))\n {\n while (*zarg != '\\0')\n {\n if (cargs + 1 >= calloc_args)\n {\n calloc_args += 10;\n pzargs = (char **) xrealloc ((pointer) pzargs,\n calloc_args * sizeof (char *));\n }\n if (*zarg == '(')\n clen = strlen (zarg);\n else\n clen = strcspn (zarg, \";&*|<> \\t\");\n if (clen > 0)\n {\n pzargs[cargs] = zbufalc (clen + 1);\n memcpy (pzargs[cargs], zarg, clen);\n pzargs[cargs][clen] = '\\0';\n ++cargs;\n zarg += clen;\n }\n if (*zarg != '\\0')\n {\n clen = strspn (zarg, \";&*| \\t\");\n if (clen == 0)\n clen = 1;\n pzargs[cargs] = zbufalc (clen + 1);\n memcpy (pzargs[cargs], zarg, clen);\n pzargs[cargs][clen] = '\\0';\n ++cargs;\n zarg += clen;\n }\n }\n }\n fgetcwd = (0);\n for (i = 0; i < cargs; i++)\n {\n if (pzargs[i][0] == '(')\n continue;\n zexclam = strrchr (pzargs[i], '!');\n if (zexclam != ((void *)0) && fsysdep_needs_cwd (zexclam + 1))\n {\n fgetcwd = (1);\n break;\n }\n if ((pzargs[i][0] == '<' || pzargs[i][0] == '>')\n && i + 1 < cargs\n && strchr (pzargs[i + 1], '!') == ((void *)0)\n && fsysdep_needs_cwd (pzargs[i + 1]))\n {\n fgetcwd = (1);\n break;\n }\n }\n usysdep_signal (2);\n usysdep_signal (1);\n usysdep_signal (3);\n usysdep_signal (15);\n usysdep_signal (13);\n usysdep_initialize (puuconf, (04) | (fgetcwd ? (01) : 0));\n zuser = zsysdep_login_name ();\n iuuconf = uuconf_localname (puuconf, &zlocalname);\n if (iuuconf == (1))\n {\n zlocalname = zsysdep_localname ();\n if (zlocalname == ((void *)0))\n exit (78);\n }\n else if (iuuconf != (0))\n ulog_uuconf (LOG_FATAL, puuconf, iuuconf);\n iuuconf = uuconf_system_info (puuconf, zlocalname, &slocalsys);\n if (iuuconf != (0))\n {\n if (iuuconf != (1))\n ulog_uuconf (LOG_FATAL, puuconf, iuuconf);\n iuuconf = uuconf_system_local (puuconf, &slocalsys);\n if (iuuconf != (0))\n ulog_uuconf (LOG_FATAL, puuconf, iuuconf);\n slocalsys.uuconf_zname = (char *) zlocalname;\n }\n zcmd = zremove_local_sys (&slocalsys, zcmd);\n zexclam = strchr (zcmd, '!');\n if (zexclam == ((void *)0))\n {\n zsys = zlocalname;\n fXxqtlocal = (1);\n zforward = ((void *)0);\n }\n else\n {\n *zexclam = '\\0';\n zsys = zcmd;\n zcmd = zexclam + 1;\n fXxqtlocal = (0);\n zexclam = strrchr (zcmd, '!');\n if (zexclam == ((void *)0))\n zforward = ((void *)0);\n else\n {\n clen = zexclam - zcmd;\n zforward = zbufalc (clen + 1);\n memcpy (zforward, zcmd, clen);\n zforward[clen] = '\\0';\n zcmd = zexclam + 1;\n }\n }\n if (fXxqtlocal)\n sXxqtsys = slocalsys;\n else\n {\n iuuconf = uuconf_system_info (puuconf, zsys, &sXxqtsys);\n if (iuuconf != (0))\n {\n if (iuuconf != (1))\n ulog_uuconf (LOG_FATAL, puuconf, iuuconf);\n if (! funknown_system (puuconf, zsys, &sXxqtsys))\n ulog (LOG_FATAL, \"%s: System not found\", zsys);\n }\n }\n zXxqtloc = sXxqtsys.uuconf_zlocalname;\n if (zXxqtloc == ((void *)0))\n zXxqtloc = zlocalname;\n zinput_from = ((void *)0);\n zinput_to = ((void *)0);\n zinput_temp = ((void *)0);\n finputcopied = (0);\n zcall_system = ((void *)0);\n fcall_any = (0);\n for (i = 0; i < cargs; i++)\n {\n const char *zsystem;\n char *zfile;\n char *zforw;\n boolean finput, foutput;\n boolean flocal, fonxqt;\n if (pzargs[i][0] == '(')\n {\n clen = strlen (pzargs[i]);\n if (pzargs[i][clen - 1] != ')')\n ulog (LOG_ERROR, \"Mismatched parentheses\");\n else\n pzargs[i][clen - 1] = '\\0';\n ++pzargs[i];\n continue;\n }\n finput = (0);\n foutput = (0);\n if (i + 1 < cargs)\n {\n if (pzargs[i][0] == '<')\n finput = (1);\n else if (pzargs[i][0] == '>')\n foutput = (1);\n if (finput || foutput)\n {\n pzargs[i] = ((void *)0);\n i++;\n }\n }\n zexclam = strchr (pzargs[i], '!');\n if (zexclam == ((void *)0) && ! finput && ! foutput)\n continue;\n if (zexclam != ((void *)0))\n {\n pzargs[i] = zremove_local_sys (&slocalsys, pzargs[i]);\n zexclam = strchr (pzargs[i], '!');\n }\n if (zexclam == ((void *)0))\n {\n zsystem = zlocalname;\n zfile = pzargs[i];\n flocal = (1);\n zforw = ((void *)0);\n }\n else\n {\n *zexclam = '\\0';\n zsystem = pzargs[i];\n zfile = zexclam + 1;\n flocal = (0);\n zexclam = strrchr (zfile, '!');\n if (zexclam == ((void *)0))\n zforw = ((void *)0);\n else\n {\n *zexclam = '\\0';\n zforw = zfile;\n zfile = zexclam + 1;\n }\n }\n if (flocal)\n fonxqt = fXxqtlocal;\n else if (fXxqtlocal)\n fonxqt = (0);\n else if (zforward == ((void *)0) ? zforw != ((void *)0) : zforw == ((void *)0))\n fonxqt = (0);\n else if (zforward != ((void *)0)\n && zforw != ((void *)0)\n && strcmp (zforward, zforw) != 0)\n fonxqt = (0);\n else if (strcmp (zsystem, sXxqtsys.uuconf_zname) == 0)\n fonxqt = (1);\n else if (sXxqtsys.uuconf_pzalias == ((void *)0))\n fonxqt = (0);\n else\n {\n char **pzal;\n fonxqt = (0);\n for (pzal = sXxqtsys.uuconf_pzalias; *pzal != ((void *)0); pzal++)\n {\n if (strcmp (zsystem, *pzal) == 0)\n {\n fonxqt = (1);\n break;\n }\n }\n }\n if (flocal)\n zfile = zsysdep_local_file_cwd (zfile, sXxqtsys.uuconf_zpubdir,\n (boolean *) ((void *)0));\n else if (fexpand)\n zfile = zsysdep_add_cwd (zfile);\n if (zfile == ((void *)0))\n uxabort (71);\n if (foutput)\n {\n if (flocal)\n {\n if (! fin_directory_list (zfile,\n sXxqtsys.uuconf_pzremote_receive,\n sXxqtsys.uuconf_zpubdir, (1),\n (0), (const char *) ((void *)0)))\n ulog (LOG_FATAL, \"Not permitted to create %s\", zfile);\n }\n if (zforward != ((void *)0) || zforw != ((void *)0))\n ulog (LOG_FATAL, \"May not forward standard output\");\n if (fonxqt)\n uxadd_xqt_line ('O', zfile, (const char *) ((void *)0));\n else if (flocal)\n uxadd_xqt_line ('O', zfile, zXxqtloc);\n else\n uxadd_xqt_line ('O', zfile, zsystem);\n pzargs[i] = ((void *)0);\n continue;\n }\n if (finput)\n {\n if (fread_stdin)\n ulog (LOG_FATAL, \"Standard input specified twice\");\n pzargs[i] = ((void *)0);\n }\n if (flocal)\n {\n char *zuse;\n char *zdata;\n char abtname[(15)];\n char abdname[(15)];\n if (! fsysdep_access (zfile))\n uxabort (66);\n zdata = zsysdep_data_file_name (&sXxqtsys, zXxqtloc, bXgrade, (0),\n abtname, abdname, (char *) ((void *)0));\n if (zdata == ((void *)0))\n uxabort (71);\n if (fcopy || flink || fXxqtlocal)\n {\n boolean fdid;\n uxrecord_file (zdata);\n fdid = (0);\n if (flink)\n {\n boolean fworked;\n if (! fsysdep_link (zfile, zdata, &fworked))\n uxabort (71);\n if (fworked)\n fdid = (1);\n else if (fdontcopy)\n ulog (LOG_FATAL, \"%s: Can't link to spool directory\",\n zfile);\n }\n if (! fdid)\n {\n openfile_t efile;\n efile = esysdep_user_fopen (zfile, (1), (1));\n if (! ((efile) != ((void *)0)))\n uxabort (66);\n if (! fcopy_open_file (efile, zdata, (0), (1), (1)))\n uxabort (73);\n (void) (fclose (efile) == 0);\n }\n zuse = abtname;\n }\n else\n {\n ubuffree (zdata);\n if (! fsysdep_daemon_access (zfile))\n uxabort (66);\n if (! fin_directory_list (zfile, sXxqtsys.uuconf_pzlocal_send,\n sXxqtsys.uuconf_zpubdir, (1),\n (1), zuser))\n ulog (LOG_FATAL, \"Not permitted to send from %s\",\n zfile);\n zuse = zfile;\n }\n if (fXxqtlocal)\n {\n if (finput)\n uxadd_xqt_line ('I', zuse, (char *) ((void *)0));\n else\n pzargs[i] = zuse;\n }\n else\n {\n finputcopied = fcopy || flink;\n if (finput)\n {\n zinput_from = zuse;\n zinput_to = zbufcpy (abdname);\n zinput_temp = zbufcpy (abtname);\n }\n else\n {\n char *zbase;\n uxadd_send_file (zuse, abdname,\n finputcopied ? \"C\" : \"c\",\n abtname, zforward);\n zbase = zsysdep_base_name (zfile);\n if (zbase == ((void *)0))\n uxabort (71);\n uxadd_xqt_line ('F', abdname, zbase);\n pzargs[i] = zbase;\n }\n }\n }\n else if (fonxqt)\n {\n if (finput)\n uxadd_xqt_line ('I', zfile, (const char *) ((void *)0));\n else\n pzargs[i] = zfile;\n }\n else\n {\n struct uuconf_system sfromsys;\n char abtname[(15)];\n struct scmd s;\n char *zjobid;\n iuuconf = uuconf_system_info (puuconf, zsystem, &sfromsys);\n if (iuuconf != (0))\n {\n if (iuuconf != (1))\n ulog_uuconf (LOG_FATAL, puuconf, iuuconf);\n if (! funknown_system (puuconf, zsystem, &sfromsys))\n ulog (LOG_FATAL, \"%s: System not found\", zsystem);\n }\n if (fonxqt)\n {\n if (finput)\n uxadd_xqt_line ('I', zfile, (const char *) ((void *)0));\n else\n pzargs[i] = zfile;\n }\n else\n {\n char *zdata;\n boolean ftemp;\n if (! sfromsys.uuconf_fcall_transfer\n && ! sfromsys.uuconf_fcalled_transfer)\n ulog (LOG_FATAL,\n \"Not permitted to transfer files to or from %s\",\n sfromsys.uuconf_zname);\n if (zforw != ((void *)0))\n {\n ulog (LOG_FATAL, \"File forwarding not supported\");\n }\n zdata = zsysdep_data_file_name (&slocalsys, zXxqtloc, bXgrade,\n (0), abtname, (char *) ((void *)0),\n (char *) ((void *)0));\n if (zdata == ((void *)0))\n uxabort (71);\n ubuffree (zdata);\n s.bcmd = 'R';\n s.bgrade = bXgrade;\n s.pseq = ((void *)0);\n s.zfrom = zfile;\n s.zto = zbufcpy (abtname);\n s.zuser = zuser;\n s.zoptions = \"9\";\n s.ztemp = \"\";\n s.imode = 0600;\n s.znotify = \"\";\n s.cbytes = -1;\n s.zcmd = ((void *)0);\n s.ipos = 0;\n zjobid = zsysdep_spool_commands (&sfromsys, bXgrade, 1, &s,\n &ftemp);\n if (zjobid == ((void *)0))\n uxabort (ftemp ? 75 : 65);\n if (fjobid)\n printf (\"%s\\n\", zjobid);\n ubuffree (zjobid);\n if (fcall_any)\n {\n ubuffree (zcall_system);\n zcall_system = ((void *)0);\n }\n else\n {\n fcall_any = (1);\n zcall_system = zbufcpy (sfromsys.uuconf_zname);\n }\n if (fXxqtlocal)\n {\n if (finput)\n {\n uxadd_xqt_line ('F', abtname, (char *) ((void *)0));\n uxadd_xqt_line ('I', abtname, (char *) ((void *)0));\n }\n else\n {\n char *zbase;\n zbase = zsysdep_base_name (zfile);\n if (zbase == ((void *)0))\n uxabort (71);\n uxadd_xqt_line ('F', abtname, zbase);\n pzargs[i] = zbase;\n }\n }\n else\n {\n char abxtname[(15)];\n char *zbase;\n char *zxqt;\n FILE *e;\n zdata = zsysdep_data_file_name (&sXxqtsys, zXxqtloc,\n bXgrade, (1), abxtname,\n (char *) ((void *)0),\n (char *) ((void *)0));\n if (zdata == ((void *)0))\n uxabort (71);\n ubuffree (zdata);\n zbase = zsysdep_base_name (zfile);\n if (zbase == ((void *)0))\n uxabort (71);\n zxqt = zsysdep_xqt_file_name ();\n if (zxqt == ((void *)0))\n uxabort (71);\n e = esysdep_fopen (zxqt, (0), (0), (1));\n if (e == ((void *)0))\n uxabort (71);\n uxrecord_file (zxqt);\n fprintf (e, \"U %s %s\\n\", zsysdep_login_name (),\n zlocalname);\n fprintf (e, \"F %s %s\\n\", abtname, zbase);\n fprintf (e, \"C uucp -C -W -d -g %c %s %s!\", bXgrade,\n zbase, sXxqtsys.uuconf_zname);\n if (zforward != ((void *)0))\n fprintf (e, \"%s!\", zforward);\n fprintf (e, \"%s\\n\", abxtname);\n if (! (fsysdep_sync (e, zxqt)))\n ulog (LOG_FATAL, \"fsync failed\");\n if (fclose (e) != 0)\n ulog (LOG_FATAL, \"fclose: %s\", strerror ((*__errno_location ())));\n if (finput)\n {\n uxadd_xqt_line ('F', abxtname, (char *) ((void *)0));\n uxadd_xqt_line ('I', abxtname, (char *) ((void *)0));\n ubuffree (zbase);\n }\n else\n {\n uxadd_xqt_line ('F', abxtname, zbase);\n pzargs[i] = zbase;\n }\n }\n }\n (void) uuconf_system_free (puuconf, &sfromsys);\n }\n }\n if (fread_stdin)\n {\n char *zdata;\n char abtname[(15)];\n char abdname[(15)];\n FILE *e;\n zdata = zsysdep_data_file_name (&sXxqtsys, zXxqtloc, bXgrade, (0),\n abtname, abdname, (char *) ((void *)0));\n if (zdata == ((void *)0))\n uxabort (71);\n e = esysdep_fopen (zdata, (0), (0), (1));\n if (e == ((void *)0))\n uxabort (71);\n eXclose = e;\n uxrecord_file (zdata);\n uxcopy_stdin (e);\n if (! (fsysdep_sync (e, zdata)))\n ulog (LOG_FATAL, \"fsync failed\");\n eXclose = ((void *)0);\n if (fclose (e) != 0)\n ulog (LOG_FATAL, \"fclose: %s\", strerror ((*__errno_location ())));\n if (fXxqtlocal)\n uxadd_xqt_line ('I', abtname, (const char *) ((void *)0));\n else\n {\n zinput_from = zbufcpy (abtname);\n zinput_to = zbufcpy (abdname);\n zinput_temp = zinput_from;\n finputcopied = (1);\n }\n }\n if (fretstdin)\n uxadd_xqt_line ('B', (const char *) ((void *)0), (const char *) ((void *)0));\n if (zstatus_file != ((void *)0))\n uxadd_xqt_line ('M', zstatus_file, (const char *) ((void *)0));\n fneedshell = (0);\n if (zcmd[strcspn (zcmd, \"\\\"'`*?[;&()|<>\\\\$\")] != '\\0')\n fneedshell = (1);\n clen = strlen (zcmd) + 1;\n for (i = 0; i < cargs; i++)\n {\n if (pzargs[i] != ((void *)0))\n {\n clen += strlen (pzargs[i]) + 1;\n if (pzargs[i][strcspn (pzargs[i], \"\\\"'`*?[;&()|<>\\\\$\")] != '\\0')\n fneedshell = (1);\n }\n }\n zfullcmd = zbufalc (clen);\n strcpy (zfullcmd, zcmd);\n for (i = 0; i < cargs; i++)\n {\n if (pzargs[i] != ((void *)0))\n {\n strcat (zfullcmd, \" \");\n strcat (zfullcmd, pzargs[i]);\n }\n }\n fpoll = (0);\n if (eXxqt_file == ((void *)0) && zinput_from != ((void *)0) && zforward == ((void *)0))\n {\n struct scmd s;\n char *zoptions;\n s.bcmd = 'E';\n s.bgrade = bXgrade;\n s.pseq = ((void *)0);\n s.zuser = zuser;\n s.zfrom = zinput_from;\n s.zto = zinput_to;\n s.zoptions = aboptions;\n zoptions = aboptions;\n *zoptions++ = finputcopied ? 'C' : 'c';\n if (fno_ack)\n *zoptions++ = 'N';\n if (ferror_ack)\n *zoptions++ = 'Z';\n if (zrequestor != ((void *)0))\n *zoptions++ = 'R';\n if (fneedshell)\n *zoptions++ = 'e';\n *zoptions = '\\0';\n s.ztemp = zinput_temp;\n s.imode = 0666;\n if (zrequestor == ((void *)0))\n zrequestor = \"\\\"\\\"\";\n s.znotify = zrequestor;\n s.cbytes = -1;\n s.zcmd = zfullcmd;\n s.ipos = 0;\n ++cXcmds;\n pasXcmds = (struct scmd *) xrealloc ((pointer) pasXcmds,\n cXcmds * sizeof (struct scmd));\n pasXcmds[cXcmds - 1] = s;\n uxadd_name (zinput_from);\n }\n else if (*zfullcmd == '\\0'\n && eXxqt_file == ((void *)0)\n && zinput_from == ((void *)0)\n && cXcmds == 0)\n {\n fpoll = (1);\n }\n else\n {\n uxadd_xqt_line ('U', zuser, zXxqtloc);\n if (zinput_from != ((void *)0))\n {\n uxadd_xqt_line ('F', zinput_to, (char *) ((void *)0));\n uxadd_xqt_line ('I', zinput_to, (char *) ((void *)0));\n uxadd_send_file (zinput_from, zinput_to,\n finputcopied ? \"C\" : \"c\",\n zinput_temp, zforward);\n }\n if (fno_ack)\n uxadd_xqt_line ('N', (const char *) ((void *)0), (const char *) ((void *)0));\n if (ferror_ack)\n uxadd_xqt_line ('Z', (const char *) ((void *)0), (const char *) ((void *)0));\n if (zrequestor != ((void *)0))\n uxadd_xqt_line ('R', zrequestor, (const char *) ((void *)0));\n if (fneedshell)\n uxadd_xqt_line ('e', (const char *) ((void *)0), (const char *) ((void *)0));\n uxadd_xqt_line ('C', zfullcmd, (const char *) ((void *)0));\n if (! (fsysdep_sync (eXxqt_file, \"execution file\")))\n ulog (LOG_FATAL, \"fsync failed\");\n if (fclose (eXxqt_file) != 0)\n ulog (LOG_FATAL, \"fclose: %s\", strerror ((*__errno_location ())));\n eXxqt_file = ((void *)0);\n if (! fXxqtlocal)\n uxadd_send_file (abXxqt_tname, abXxqt_xname, \"C\", abXxqt_tname,\n zforward);\n }\n if ((afSignal[(0)] || afSignal[(1)] || afSignal[(2)] || afSignal[(3)] || afSignal[(4)]))\n uxabort (71);\n if (cXcmds > 0 || fpoll)\n {\n char *zjobid;\n boolean ftemp;\n if (! fpoll\n && ! sXxqtsys.uuconf_fcall_transfer\n && ! sXxqtsys.uuconf_fcalled_transfer)\n ulog (LOG_FATAL, \"Not permitted to transfer files to or from %s\",\n sXxqtsys.uuconf_zname);\n zjobid = zsysdep_spool_commands (&sXxqtsys, bXgrade, cXcmds, pasXcmds,\n &ftemp);\n if (zjobid == ((void *)0))\n {\n ulog_close ();\n exit (ftemp ? 75 : 65);\n }\n if (fjobid)\n printf (\"%s\\n\", zjobid);\n ubuffree (zjobid);\n if (fcall_any)\n {\n ubuffree (zcall_system);\n zcall_system = ((void *)0);\n }\n else\n {\n fcall_any = (1);\n zcall_system = zbufcpy (sXxqtsys.uuconf_zname);\n }\n }\n if (! fpoll)\n {\n ulog_to_file (puuconf, (1));\n ulog_system (sXxqtsys.uuconf_zname);\n ulog_user (zuser);\n if (zXnames == ((void *)0))\n ulog (LOG_NORMAL, \"Queuing %s\", zfullcmd);\n else\n ulog (LOG_NORMAL, \"Queuing %s (%s)\", zfullcmd, zXnames);\n ulog_close ();\n }\n if (! fuucico\n || (zcall_system == ((void *)0) && ! fcall_any))\n {\n if (fXxqtlocal && fuucico)\n {\n char *zconfigarg;\n if (zconfig == ((void *)0))\n zconfigarg = ((void *)0);\n else\n {\n zconfigarg = zbufalc (sizeof \"-I\" + strlen (zconfig));\n sprintf (zconfigarg, \"-I%s\", zconfig);\n }\n (void) fsysdep_run ((0), \"uuxqt\", zconfigarg,\n (const char *) ((void *)0));\n }\n }\n else\n {\n const char *zcicoarg;\n char *zconfigarg;\n if (zcall_system == ((void *)0))\n zcicoarg = \"-r1\";\n else\n {\n char *z;\n z = zbufalc (sizeof \"-Cs\" + strlen (zcall_system));\n sprintf (z, \"-Cs%s\", zcall_system);\n zcicoarg = z;\n }\n if (zconfig == ((void *)0))\n zconfigarg = ((void *)0);\n else\n {\n zconfigarg = zbufalc (sizeof \"-I\" + strlen (zconfig));\n sprintf (zconfigarg, \"-I%s\", zconfig);\n }\n (void) fsysdep_run ((0), \"uucico\", zcicoarg, zconfigarg);\n }\n exit (0);\n return 0;\n}\n", "c_constructs": {"pointer_type": 32, "array_type": 6, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 115, "memory_management": 0, "memory_operation": 3, "if_statement": 140, "for_loop": 8, "while_loop": 4, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 26}}, {"id": "cflow-1.7#depmap_prep#depmap_set.c", "codebase": "cflow-1.7", "c_file": "depmap.c", "function": "depmap_set", "sloc": "6", "c_code": "void\ndepmap_set(cflow_depmap_t dmap, size_t row, size_t col)\n{\n unsigned *rptr = depmap_rowptr(dmap, row);\n ((rptr)[(col)/(sizeof(unsigned)*8)] |= (1<<((col) % (sizeof(unsigned)*8))));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "hello-2.12.1#strnlen1_prep#strnlen1.c", "codebase": "hello-2.12.1", "c_file": "strnlen1.c", "function": "strnlen1", "sloc": "9", "c_code": "size_t\nstrnlen1 (const char *string, size_t maxlen)\n{\n const char *end = (const char *) memchr (string, '\\0', maxlen);\n if (end != ((void *)0))\n return end - string + 1;\n else\n return maxlen;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_prep#min.c", "codebase": "transcoder-set", "c_file": "SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "dap-3.10#dapruns_prep#dappprun.c", "codebase": "dap-3.10", "c_file": "dapruns.c", "function": "dappprun", "sloc": "30", "c_code": "int dappprun(int argc, char **argv)\n{\n char **arg;\n int a;\n int status;\n pid_t pid;\n if (!(arg = (char **) malloc(sizeof(char *) * (argc + 1))))\n {\n perror(\"dap\");\n exit(1);\n }\n arg[0] = dappp;\n for (a = 1; a < argc && strcmp(argv[a], \"-a\") && strcmp(argv[a], \"--args\"); a++)\n arg[a] = argv[a];\n arg[a] = ((void *)0);\n if (!(pid = fork()))\n {\n fputs(\"Preprocessing...\\n\", stderr);\n execv(arg[0], arg);\n perror(arg[0]);\n exit(1);\n }\n else if (pid == -1)\n {\n perror(\"dap\");\n exit(1);\n }\n waitpid(pid, &status, 0);\n return status;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 1, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR_prep#max.c", "codebase": "transcoder-set", "c_file": "NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_authentication_info_prep#osip_authentication_info_clone.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authentication_info.c", "function": "osip_authentication_info_clone", "sloc": "34", "c_code": "int osip_authentication_info_clone(const osip_authentication_info_t *ainfo, osip_authentication_info_t **dest) {\n int i;\n osip_authentication_info_t *wa;\n *dest = ((void *)0);\n if (ainfo == ((void *)0))\n return -2;\n i = osip_authentication_info_init(&wa);\n if (i != 0)\n return i;\n if (ainfo->auth_type != ((void *)0))\n wa->auth_type = osip_strdup(ainfo->auth_type);\n if (ainfo->nextnonce != ((void *)0))\n wa->nextnonce = osip_strdup(ainfo->nextnonce);\n if (ainfo->cnonce != ((void *)0))\n wa->cnonce = osip_strdup(ainfo->cnonce);\n if (ainfo->rspauth != ((void *)0))\n wa->rspauth = osip_strdup(ainfo->rspauth);\n if (ainfo->nonce_count != ((void *)0))\n wa->nonce_count = osip_strdup(ainfo->nonce_count);\n if (ainfo->qop_options != ((void *)0))\n wa->qop_options = osip_strdup(ainfo->qop_options);\n if (ainfo->snum != ((void *)0))\n wa->snum = osip_strdup(ainfo->snum);\n if (ainfo->srand != ((void *)0))\n wa->srand = osip_strdup(ainfo->srand);\n if (ainfo->targetname != ((void *)0))\n wa->targetname = osip_strdup(ainfo->targetname);\n if (ainfo->realm != ((void *)0))\n wa->realm = osip_strdup(ainfo->realm);\n if (ainfo->opaque != ((void *)0))\n wa->opaque = osip_strdup(ainfo->opaque);\n *dest = wa;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 13, "memory_management": 0, "memory_operation": 0, "if_statement": 13, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#simo_prep#WriteMCHeader.c", "codebase": "mcsim-6.2.0", "c_file": "simo.c", "function": "WriteMCHeader", "sloc": "18", "c_code": "void WriteMCHeader (PFILE pfileOut, PANALYSIS panal)\n{\n long i, j, k;\n PMONTECARLO pmc = &panal->mc;\n OUTSPEC *pos;\n fprintf (pfileOut, \"Iter\");\n for (i = 0; i < pmc->nParms; i++)\n fprintf (pfileOut, \"\\t%s\", GetVarName(pmc->rgpMCVar[i]->hvar));\n for (i = 0; i < panal->expGlobal.iExp; i++) {\n pos = &panal->rgpExps[i]->os;\n for (j = 0; j < pos->nOutputs; j++) {\n for (k = 0; k < pos->pcOutputTimes[j]; k++)\n fprintf (pfileOut, \"\\t%s_%ld.%ld\", pos->pszOutputNames[j], i+1, k+1);\n }\n }\n fprintf (pfileOut, \"\\n\");\n fflush (pfileOut);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 4, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP_1_prep#len.c", "codebase": "transcoder-set", "c_file": "HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COMPUTE_N_UNDER_MODULO_P_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "COMPUTE_N_UNDER_MODULO_P.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_1.c", "function": "f_filled", "sloc": "1", "c_code": "_Bool f_filled ( int x, int y ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#xchecks_prep#__c2rust_hash___mbstate_t_struct.c", "codebase": "tmux", "c_file": "xchecks.c", "function": "__c2rust_hash___mbstate_t_struct", "sloc": "3", "c_code": "uint64_t __c2rust_hash___mbstate_t_struct(void *l, size_t depth) {\n return 0xABCD0006;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#window_prep#windows_RB_NEXT.c", "codebase": "tmux", "c_file": "window.c", "function": "windows_RB_NEXT", "sloc": "1", "c_code": "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)->entry.rbe_parent && (elm == ((elm)->entry.rbe_parent)->entry.rbe_right)) elm = (elm)->entry.rbe_parent; elm = (elm)->entry.rbe_parent; } } return (elm); }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#scsi_prep#scsi_cmd.c", "codebase": "mtools-4.0.43", "c_file": "scsi.c", "function": "scsi_cmd", "sloc": "19", "c_code": "int scsi_cmd(int fd, unsigned char *cdb, uint8_t cmdlen, scsi_io_mode_t mode,\n void *data, uint32_t len, void *extra_data __attribute__ ((unused)))\n{\n struct sg_io_hdr my_scsi_cmd;\n memset(&my_scsi_cmd,0,sizeof(my_scsi_cmd));\n my_scsi_cmd.interface_id = 'S';\n my_scsi_cmd.dxfer_direction = (mode == SCSI_IO_READ)?(-3):(-2);\n my_scsi_cmd.cmd_len = cmdlen;\n my_scsi_cmd.mx_sb_len = 0;\n my_scsi_cmd.dxfer_len = len;\n my_scsi_cmd.dxferp = data;\n my_scsi_cmd.cmdp = cdb;\n my_scsi_cmd.timeout = ~0u;\n if (ioctl(fd, 0x2285,&my_scsi_cmd) < 0) {\n perror(\"scsi_io\");\n return -1;\n }\n return my_scsi_cmd.status & 0x3e;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#HARDY_RAMANUJAN_THEOREM_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "HARDY_RAMANUJAN_THEOREM.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "ed-1.19#buffer_prep#open_sbuf.c", "codebase": "ed-1.19", "c_file": "buffer.c", "function": "open_sbuf", "sloc": "12", "c_code": "bool open_sbuf( void )\n {\n isbinary_ = false; reset_unterminated_line();\n sfp = tmpfile();\n if( !sfp )\n {\n show_strerror( 0, (*__errno_location ()) );\n set_error_msg( \"Cannot open temp file\" );\n return false;\n }\n return true;\n }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#b-complain_prep#fatal_syntax.c", "codebase": "rcs-5.10.1", "c_file": "b-complain.c", "function": "fatal_syntax", "sloc": "10", "c_code": "void\nfatal_syntax (size_t lno, char const *fmt, ...)\n{\n complain (\"%s: %s:\", (top->program-> name), (top->repository. filename));\n if (lno)\n complain (\"%ld:\", lno);\n complain (\" \");\n do { va_list args; __builtin_va_start(args,fmt); vcomplain (fmt, args); __builtin_va_end(args); complain (\"\\n\"); } while (0);\n die ();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "units-2.22#units_prep#mymalloc.c", "codebase": "units-2.22", "c_file": "units.c", "function": "mymalloc", "sloc": "11", "c_code": "void *\nmymalloc(int bytes,const char *mesg)\n{\n void *pointer;\n pointer = malloc(bytes);\n if (!pointer){\n fprintf(stderr, \"%s: memory allocation error %s\\n\", progname, mesg);\n exit(1);\n }\n return pointer;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#write_c_prep#Pl_Write_Canonical_2.c", "codebase": "gprolog-1.5.0", "c_file": "write_c.c", "function": "Pl_Write_Canonical_2", "sloc": "8", "c_code": "void\nPl_Write_Canonical_2(WamWord sora_word, WamWord term_word)\n{\n (pl_sys_var[0]) = 2 | 1;\n (pl_sys_var[1]) = -1;\n (pl_sys_var[2]) = 1200;\n Pl_Write_Term_2(sora_word, term_word);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "bc-1.07.1#storage_prep#clear_func.c", "codebase": "bc-1.07.1", "c_file": "storage.c", "function": "clear_func", "sloc": "25", "c_code": "void\nclear_func (int func)\n{\n bc_function *f;\n bc_label_group *lg;\n f = &functions[func];\n f->f_defined = 0;\n f->f_code_size = 0;\n if (f->f_autos != ((void *)0))\n {\n free_args (f->f_autos);\n f->f_autos = ((void *)0);\n }\n if (f->f_params != ((void *)0))\n {\n free_args (f->f_params);\n f->f_params = ((void *)0);\n }\n while (f->f_label != ((void *)0))\n {\n lg = f->f_label->l_next;\n free (f->f_label);\n f->f_label = lg;\n }\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_contact_prep#osip_message_get_contact.c", "codebase": "libosip2-5.3.1", "c_file": "osip_contact.c", "function": "osip_message_get_contact", "sloc": "9", "c_code": "int osip_message_get_contact(const osip_message_t *sip, int pos, osip_contact_t **dest) {\n *dest = ((void *)0);\n if (sip == ((void *)0))\n return -2;\n if (osip_list_size(&sip->contacts) <= pos)\n return -1;\n *dest = (osip_contact_t *) osip_list_get(&sip->contacts, pos);\n return pos;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "uucp-1.07#conn_prep#uconn_free.c", "codebase": "uucp-1.07", "c_file": "conn.c", "function": "uconn_free", "sloc": "6", "c_code": "void\nuconn_free (qconn)\n struct sconnection *qconn;\n{\n (*qconn->qcmds->pufree) (qconn);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#tty_prep#tty_cmd_clearendofline.c", "codebase": "tmux", "c_file": "tty.c", "function": "tty_cmd_clearendofline", "sloc": "9", "c_code": "void\ntty_cmd_clearendofline(struct tty *tty, const struct tty_ctx *ctx)\n{\n struct window_pane *wp = ctx->wp;\n u_int nx, py = ctx->yoff + ctx->ocy;\n tty_default_attributes(tty, wp, ctx->bg);\n nx = ((wp->screen)->grid->sx) - ctx->ocx;\n tty_clear_line(tty, wp, py, ctx->xoff + ctx->ocx, nx, ctx->bg);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#yourcode_prep#TransformPred.c", "codebase": "mcsim-6.2.0", "c_file": "yourcode.c", "function": "TransformPred", "sloc": "4", "c_code": "void TransformPred (PANALYSIS panal, PMCPREDOUT pMCPredOut)\n{\n OutspecToLinearArray (panal, pMCPredOut);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_PRODUCT_SUBARRAY_ADDED_NEGATIVE_PRODUCT_CASE_prep#max.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_PRODUCT_SUBARRAY_ADDED_NEGATIVE_PRODUCT_CASE.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#process_prep#AddWindowFlags.c", "codebase": "screen-4.9.0", "c_file": "process.c", "function": "AddWindowFlags", "sloc": "32", "c_code": "char *\nAddWindowFlags(buf, len, p)\nchar *buf;\nint len;\nstruct win *p;\n{\n char *s = buf;\n if (p == 0 || len < 12)\n {\n *s = 0;\n return s;\n }\n if (p->w_layer.l_cvlist && p->w_layer.l_cvlist->c_lnext)\n *s++ = '&';\n if (p->w_monitor == 3\n && display && (((p->w_mon_notify)[(display->d_user->u_id) >> 3]) & (0x80 >> ((display->d_user->u_id) & 7)))\n )\n *s++ = '@';\n if (p->w_bell == 2)\n *s++ = '!';\n if (p->w_slot != (slot_t) 0 && p->w_slot != (slot_t) -1)\n *s++ = '$';\n if (p->w_log != 0)\n {\n strcpy(s, \"(L)\");\n s += 3;\n }\n if (p->w_ptyfd < 0 && p->w_type != 3)\n *s++ = 'Z';\n *s = 0;\n return s;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#cint_array_prep#init_argv_array.c", "codebase": "gawk-5.2.2", "c_file": "cint_array.c", "function": "init_argv_array", "sloc": "8", "c_code": "void\ninit_argv_array(NODE *argv_node, NODE *shadow_node)\n{\n if (! (do_flags & DO_SANDBOX))\n return;\n argv_node->sub.nodep.l.lp = & argv_array_func;\n argv_shadow_array = shadow_node;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_SUM_EVEN_INDEX_BINOMIAL_COEFFICIENTS_prep#max.c", "codebase": "transcoder-set", "c_file": "FIND_SUM_EVEN_INDEX_BINOMIAL_COEFFICIENTS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bc-1.07.1#util_prep#set_genstr_size.c", "codebase": "bc-1.07.1", "c_file": "util.c", "function": "set_genstr_size", "sloc": "10", "c_code": "void\nset_genstr_size (int size)\n{\n if (size > genlen) {\n if (genstr != ((void *)0))\n free(genstr);\n genstr = bc_malloc (size);\n genlen = size;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tinycc#tccgen_prep#gvtst.c", "codebase": "tinycc", "c_file": "tccgen.c", "function": "gvtst", "sloc": "15", "c_code": "int gvtst(int inv, int t)\n{\n int v = vtop->r & 0x003f;\n if (v != 0x0033 && v != 0x0034 && v != 0x0035) {\n vpushi(0);\n gen_op(0x95);\n }\n if ((vtop->r & (0x003f | 0x0100 | 0x0200)) == 0x0030) {\n if ((vtop->c.i != 0) != inv)\n t = gjmp(t);\n vtop--;\n return t;\n }\n return gtst(inv, t);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "less-633#command_prep#peekcc.c", "codebase": "less-633", "c_file": "command.c", "function": "peekcc", "sloc": "6", "c_code": "LWCHAR peekcc(void)\n{\n LWCHAR c = getcc();\n ungetcc(c);\n return c;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#line_prep#gline.c", "codebase": "less-633", "c_file": "line.c", "function": "gline", "sloc": "25", "c_code": "int gline(int i, int *ap)\n{\n if (is_null_line)\n {\n if (twiddle)\n {\n if (i == 0)\n {\n *ap = (1 << 1);\n return '~';\n }\n --i;\n }\n *ap = (0);\n return i ? '\\0' : '\\n';\n }\n if (i < linebuf.pfx_end)\n {\n *ap = linebuf.pfx_attr[i];\n return linebuf.pfx[i];\n }\n i += linebuf.print - linebuf.pfx_end;\n *ap = linebuf.attr[i];\n return (linebuf.buf[i] & 0xFF);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlSchemaIsValid.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlSchemaIsValid", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlSchemaIsValid(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlSchemaValidCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlSchemaIsValid\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlSchemaValidCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PySchemaValidCtxt_Object *)(pyobj_ctxt))->obj));\n c_retval = xmlSchemaIsValid(ctxt);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json-c#json_object_prep#json_object_get_userdata.c", "codebase": "json-c", "c_file": "json_object.c", "function": "json_object_get_userdata", "sloc": "4", "c_code": "void *json_object_get_userdata(json_object *jso)\n{\n return jso ? jso->_userdata : ((void *)0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#hash_prep#Pl_Hash_Nb_Elements.c", "codebase": "gprolog-1.5.0", "c_file": "hash.c", "function": "Pl_Hash_Nb_Elements", "sloc": "5", "c_code": "int\nPl_Hash_Nb_Elements(char *tbl)\n{\n return (((int *)(tbl))[2]);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#umac96_prep#nettle_umac96_update.c", "codebase": "nettle-3.9.1", "c_file": "umac96.c", "function": "nettle_umac96_update", "sloc": "6", "c_code": "void\nnettle_umac96_update (struct umac96_ctx *ctx,\n size_t length, const uint8_t *data)\n{\n do { if ((ctx)->index) { unsigned __md_left = sizeof((ctx)->block) - (ctx)->index; if ((length) < __md_left) { memcpy((ctx)->block + (ctx)->index, (data), (length)); (ctx)->index += (length); goto __md_done; } else { memcpy((ctx)->block + (ctx)->index, (data), __md_left); do { uint64_t __umac96_y[3]; _nettle_umac_nh_n (__umac96_y, 3, (ctx)->l1_key, 1024, (ctx)->block); __umac96_y[0] += 8*1024; __umac96_y[1] += 8*1024; __umac96_y[2] += 8*1024; _nettle_umac_l2 ((ctx)->l2_key, (ctx)->l2_state, 3, (ctx)->count++, __umac96_y); } while (0); ((void)0); (data) += __md_left; (length) -= __md_left; } } while ((length) >= sizeof((ctx)->block)) { do { uint64_t __umac96_y[3]; _nettle_umac_nh_n (__umac96_y, 3, (ctx)->l1_key, 1024, (data)); __umac96_y[0] += 8*1024; __umac96_y[1] += 8*1024; __umac96_y[2] += 8*1024; _nettle_umac_l2 ((ctx)->l2_key, (ctx)->l2_state, 3, (ctx)->count++, __umac96_y); } while (0); ((void)0); (data) += sizeof((ctx)->block); (length) -= sizeof((ctx)->block); } memcpy ((ctx)->block, (data), (length)); (ctx)->index = (length); __md_done: ; } while (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 1, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#rcfile_prep#parse_argument.c", "codebase": "nano-7.2", "c_file": "rcfile.c", "function": "parse_argument", "sloc": "20", "c_code": "char *parse_argument(char *ptr)\n{\n const char *ptr_save = ptr;\n char *last_quote = ((void *)0);\n if (*ptr != '\"')\n return parse_next_word(ptr);\n while (*ptr != '\\0') {\n if (*++ptr == '\"')\n last_quote = ptr;\n }\n if (last_quote == ((void *)0)) {\n jot_error((\"Argument '%s' has an unterminated \\\"\"), ptr_save);\n return ((void *)0);\n }\n *last_quote = '\\0';\n ptr = last_quote + 1;\n while (((*__ctype_b_loc ())[(int) (((unsigned char)*ptr))] & (unsigned short int) _ISblank))\n ptr++;\n return ptr;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlTextReaderConstPrefix.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlTextReaderConstPrefix", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlTextReaderConstPrefix(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n const xmlChar * c_retval;\n xmlTextReaderPtr reader;\n PyObject *pyobj_reader;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlTextReaderConstPrefix\", &pyobj_reader))\n return(((void *)0));\n reader = (xmlTextReaderPtr) (((pyobj_reader) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlTextReader_Object *)(pyobj_reader))->obj));\n c_retval = xmlTextReaderConstPrefix(reader);\n py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_FIND_SMALLEST_DIFFERENCE_ANGLES_TWO_PARTS_GIVEN_CIRCLE_prep#max.c", "codebase": "transcoder-set", "c_file": "PROGRAM_FIND_SMALLEST_DIFFERENCE_ANGLES_TWO_PARTS_GIVEN_CIRCLE.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DISTRIBUTING_M_ITEMS_CIRCLE_SIZE_N_STARTING_K_TH_POSITION_prep#main.c", "codebase": "transcoder-set", "c_file": "DISTRIBUTING_M_ITEMS_CIRCLE_SIZE_N_STARTING_K_TH_POSITION.c", "function": "main", "sloc": "16", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {19,23,92,9,20,68,66,77,90,26};\n int param1[] = {14,51,10,50,67,25,30,22,1,34};\n int param2[] = {34,5,24,34,20,40,24,32,71,54};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlParseDoc.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlParseDoc", "sloc": "11", "c_code": "PyObject *\nlibxml_xmlParseDoc(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlDocPtr c_retval;\n xmlChar * cur;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"z:xmlParseDoc\", &cur))\n return(((void *)0));\n c_retval = xmlParseDoc(cur);\n py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_simplified_json_prep#json_skip_all_skippables.c", "codebase": "json.h", "c_file": "allow_simplified_json.c", "function": "json_skip_all_skippables", "sloc": "31", "c_code": "int json_skip_all_skippables(struct json_parse_state_s *state) {\n int did_consume = 0;\n const size_t size = state->size;\n if (json_parse_flags_allow_c_style_comments & state->flags_bitset) {\n do {\n if (state->offset == size) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n did_consume = json_skip_whitespace(state);\n if (state->offset >= size) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n did_consume |= json_skip_c_style_comments(state);\n } while (0 != did_consume);\n } else {\n do {\n if (state->offset == size) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n did_consume = json_skip_whitespace(state);\n } while (0 != did_consume);\n }\n if (state->offset == size) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "grep-3.11#uinttostr_prep#uinttostr.c", "codebase": "grep-3.11", "c_file": "uinttostr.c", "function": "uinttostr", "sloc": "20", "c_code": "__attribute__ ((__warn_unused_result__)) char *\nuinttostr (unsigned int i, char *buf)\n{\n char *p = buf + (((((sizeof (unsigned int) * 8) - (! ((__typeof__ (unsigned int)) 0 < (__typeof__ (unsigned int)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (unsigned int)) 0 < (__typeof__ (unsigned int)) -1)));\n *p = 0;\n if (i < 0)\n {\n do\n *--p = '0' - i % 10;\n while ((i /= 10) != 0);\n *--p = '-';\n }\n else\n {\n do\n *--p = '0' + i % 10;\n while ((i /= 10) != 0);\n }\n return p;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngget_prep#png_get_x_pixels_per_meter.c", "codebase": "optipng-0.7.8", "c_file": "pngget.c", "function": "png_get_x_pixels_per_meter", "sloc": "8", "c_code": "png_uint_32\npng_get_x_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp\n info_ptr)\n{\n (void)png_ptr;\n (void)info_ptr;\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_3_prep#max.c", "codebase": "transcoder-set", "c_file": "COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_3.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_allow_prep#osip_message_get_allow.c", "codebase": "libosip2-5.3.1", "c_file": "osip_allow.c", "function": "osip_message_get_allow", "sloc": "9", "c_code": "int osip_message_get_allow(const osip_message_t *sip, int pos, osip_allow_t **dest) {\n osip_allow_t *allow;\n *dest = ((void *)0);\n if (osip_list_size(&sip->allows) <= pos)\n return -1;\n allow = (osip_allow_t *) osip_list_get(&sip->allows, pos);\n *dest = allow;\n return pos;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#builtin_prep#do_index.c", "codebase": "gawk-5.2.2", "c_file": "builtin.c", "function": "do_index", "sloc": "88", "c_code": "NODE *\ndo_index(int nargs)\n{\n NODE *s1, *s2;\n const char *p1, *p2;\n size_t l1, l2;\n long ret;\n _Bool do_single_byte = 0;\n mbstate_t mbs1, mbs2;\n check_exact_args(nargs, \"index\", 2);\n if (gawk_mb_cur_max > 1) {\n memset(& mbs1, 0, sizeof(mbstate_t));\n memset(& mbs2, 0, sizeof(mbstate_t));\n }\n s2 = POP_SCALAR(); s1 = ((stack_ptr--)->rptr); do { if (s1->type == Node_var_array) { DEREF(s2); (*(set_loc(\"builtin.c\", 428), r_fatal))(gettext(\"attempt to use array `%s' in a scalar context\"), array_vname(s1)); }} while (0);\n if ((do_flags & (DO_LINT_INVALID|DO_LINT_ALL))) {\n if ((fixtype(s1)->flags & (STRING|USER_INPUT)) == 0)\n (*(set_loc(\"builtin.c\", 432),lintfunc))(gettext(\"%s: received non-string first argument\"), \"index\");\n if ((fixtype(s2)->flags & (STRING|USER_INPUT)) == 0)\n (*(set_loc(\"builtin.c\", 434),lintfunc))(gettext(\"%s: received non-string second argument\"), \"index\");\n }\n s1 = force_string_fmt((s1), CONVFMT, CONVFMTidx);\n s2 = force_string_fmt((s2), CONVFMT, CONVFMTidx);\n p1 = s1->sub.val.sp;\n p2 = s2->sub.val.sp;\n l1 = s1->sub.val.slen;\n l2 = s2->sub.val.slen;\n ret = 0;\n if (l2 == 0) {\n ret = 1;\n goto out;\n }\n if (gawk_mb_cur_max > 1) {\n s1 = str2wstr(s1, ((void *)0));\n s2 = str2wstr(s2, ((void *)0));\n do_single_byte = ((s1->sub.val.wslen == 0 && s1->sub.val.slen > 0)\n || (s2->sub.val.wslen == 0 && s2->sub.val.slen > 0));\n }\n if (IGNORECASE) {\n while (l1 > 0) {\n if (l2 > l1)\n break;\n if (! do_single_byte && gawk_mb_cur_max > 1) {\n const wchar_t *pos;\n pos = wcasestrstr(s1->sub.val.wsp, s1->sub.val.wslen, s2->sub.val.wsp, s2->sub.val.wslen);\n if (pos == ((void *)0))\n ret = 0;\n else\n ret = pos - s1->sub.val.wsp + 1;\n goto out;\n } else {\n if (casetable[(unsigned char)*p1] == casetable[(unsigned char)*p2]\n && (l2 == 1 || strncasecmp(p1, p2, l2) == 0)) {\n ret = 1 + s1->sub.val.slen - l1;\n break;\n }\n l1--;\n p1++;\n }\n }\n } else {\n while (l1 > 0) {\n if (l2 > l1)\n break;\n if (*p1 == *p2\n && (l2 == 1 || (l2 > 0 && memcmp(p1, p2, l2) == 0))) {\n ret = 1 + s1->sub.val.slen - l1;\n break;\n }\n if (! do_single_byte && gawk_mb_cur_max > 1) {\n const wchar_t *pos;\n pos = wstrstr(s1->sub.val.wsp, s1->sub.val.wslen, s2->sub.val.wsp, s2->sub.val.wslen);\n if (pos == ((void *)0))\n ret = 0;\n else\n ret = pos - s1->sub.val.wsp + 1;\n goto out;\n } else {\n l1--;\n p1++;\n }\n }\n }\nout:\n DEREF(s1);\n DEREF(s2);\n return make_number((double) ret);\n}\n", "c_constructs": {"pointer_type": 5, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 2, "if_statement": 16, "for_loop": 0, "while_loop": 3, "switch_statement": 0, "goto_statement": 3, "return_statement": 1, "break_continue_statement": 4}}, {"id": "dap-3.10#ps_prep#pict_port.c", "codebase": "dap-3.10", "c_file": "ps.c", "function": "pict_port", "sloc": "4", "c_code": "void pict_port(int npages)\n{\n pict_init('p', 0, 0, 612, 792, npages);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_event_prep#pth_event_concat.c", "codebase": "pth-2.0.7", "c_file": "pth_event.c", "function": "pth_event_concat", "sloc": "23", "c_code": "pth_event_t pth_event_concat(pth_event_t evf, ...)\n{\n pth_event_t evc;\n pth_event_t evn;\n pth_event_t evl;\n pth_event_t evt;\n va_list ap;\n if (evf == ((void *)0))\n return ((*__errno_location ()) = (22), ((pth_event_t)((void *)0)));\n __builtin_va_start(ap,evf);\n evc = evf;\n evl = evc->ev_next;\n while ((evn = __builtin_va_arg(ap,pth_event_t)) != ((void *)0)) {\n evc->ev_next = evn;\n evt = evn->ev_prev;\n evn->ev_prev = evc;\n evc = evt;\n }\n evc->ev_next = evl;\n evl->ev_prev = evc;\n __builtin_va_end(ap);\n return evf;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#sharefile_prep#sharefile_init.c", "codebase": "findutils-4.9.0", "c_file": "sharefile.c", "function": "sharefile_init", "sloc": "31", "c_code": "sharefile_handle\nsharefile_init (const char *mode)\n{\n struct Hash_tuning;\n struct sharefile *p = malloc (sizeof (struct sharefile));\n if (p)\n {\n p->mode = strdup (mode);\n if (p->mode)\n {\n p->table = hash_initialize (DefaultHashTableSize, ((void *)0),\n entry_hashfunc,\n entry_comparator,\n entry_free);\n if (p->table)\n {\n return p;\n }\n else\n {\n free (p->mode);\n free (p);\n }\n }\n else\n {\n free (p);\n }\n }\n return ((void *)0);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 4, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#serpent-set-key_prep#nettle_serpent256_set_key.c", "codebase": "nettle-3.9.1", "c_file": "serpent-set-key.c", "function": "nettle_serpent256_set_key", "sloc": "5", "c_code": "void\nnettle_serpent256_set_key (struct serpent_ctx *ctx, const uint8_t *key)\n{\n nettle_serpent_set_key (ctx, 32, key);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1_prep#len.c", "codebase": "transcoder-set", "c_file": "SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MINIMUM_RADIUS_ATLEAST_K_POINT_LIE_INSIDE_CIRCLE_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FIND_MINIMUM_RADIUS_ATLEAST_K_POINT_LIE_INSIDE_CIRCLE.c", "function": "f_gold", "sloc": "8", "c_code": "int f_gold ( int k, int x [ ], int y [ ], int n ) {\n int dis [ n ];\n for ( int i = 0;\n i < n;\n i ++ ) dis [ i ] = x [ i ] * x [ i ] + y [ i ] * y [ i ];\n sort ( dis, dis + n );\n return dis [ k - 1 ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "hello-2.12.1#dirname-lgpl_prep#mdir_name.c", "codebase": "hello-2.12.1", "c_file": "dirname-lgpl.c", "function": "mdir_name", "sloc": "17", "c_code": "char *\nmdir_name (char const *file)\n{\n size_t length = dir_len (file);\n _Bool append_dot = (length == 0\n || (0\n && length == ((void) (file), 0)\n && file[2] != '\\0' && ! ((file[2]) == '/')));\n char *dir = malloc (length + append_dot + 1);\n if (!dir)\n return ((void *)0);\n memcpy (dir, file, length);\n if (append_dot)\n dir[length++] = '.';\n dir[length] = '\\0';\n return dir;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 1, "memory_operation": 1, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#wad_prep#ti_wad.c", "codebase": "tulipindicators-0.9.1", "c_file": "wad.c", "function": "ti_wad", "sloc": "24", "c_code": "int ti_wad(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *high = inputs[0];\n const double *low = inputs[1];\n const double *close = inputs[2];\n (void)options;\n if (size <= ti_wad_start(options)) return 0;\n double *output = outputs[0];\n double sum = 0;\n double yc = close[0];\n int i;\n for (i = 1; i < size; ++i) {\n const double c = close[i];\n if (c > yc) {\n sum += c - ((yc)<(low[i])?(yc):(low[i]));\n } else if (c < yc) {\n sum += c - ((yc)>(high[i])?(yc):(high[i]));\n } else {\n }\n *output++ = sum;\n yc = close[i];\n }\n ((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)\", \"indicators/wad.c\", 66, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#parserInternals_prep#xmlNoNetExternalEntityLoader.c", "codebase": "libxml2", "c_file": "parserInternals.c", "function": "xmlNoNetExternalEntityLoader", "sloc": "14", "c_code": "xmlParserInputPtr\nxmlNoNetExternalEntityLoader(const char *URL, const char *ID,\n xmlParserCtxtPtr ctxt) {\n int oldOptions = 0;\n xmlParserInputPtr input;\n if (ctxt != ((void *)0)) {\n oldOptions = ctxt->options;\n ctxt->options |= XML_PARSE_NONET;\n }\n input = xmlDefaultExternalEntityLoader(URL, ID, ctxt);\n if (ctxt != ((void *)0))\n ctxt->options = oldOptions;\n return(input);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#cusub_prep#fsysdep_cu.c", "codebase": "uucp-1.07", "c_file": "cusub.c", "function": "fsysdep_cu", "sloc": "53", "c_code": "boolean\nfsysdep_cu (qconn, pbcmd, zlocalname)\n struct sconnection *qconn;\n char *pbcmd;\n const char *zlocalname;\n{\n boolean fstart;\n char b;\n int c;\n fstart = (1);\n while ((1))\n {\n if (((1)))\n ;\n else\n {\n ulog (LOG_ERROR, (const char *) ((void *)0));\n return (0);\n }\n c = read (0, &b, 1);\n ;\n if (c <= 0)\n break;\n if (fstart && b == *zCuvar_escape && b != '\\0')\n {\n c = cscu_escape (pbcmd, zlocalname);\n if (c <= 0)\n break;\n if (*pbcmd != b)\n {\n write (1, pbcmd, 1);\n if (*pbcmd == bSeof)\n *pbcmd = '.';\n if (*pbcmd == bStstp)\n *pbcmd = 'z';\n return (1);\n }\n }\n if (! fconn_write (qconn, &b, (size_t) 1))\n return (0);\n fstart = strchr (zCuvar_eol, b) != ((void *)0);\n }\n if (c < 0)\n {\n if ((*__errno_location ()) != 4)\n ulog (LOG_ERROR, \"read: %s\", strerror ((*__errno_location ())));\n else\n ulog (LOG_ERROR, (const char *) ((void *)0));\n return (0);\n }\n ulog (LOG_ERROR, \"End of file on terminal\");\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 10, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 2}}, {"id": "transcoder-set#CHECK_GIVEN_CIRCLE_LIES_COMPLETELY_INSIDE_RING_FORMED_TWO_CONCENTRIC_CIRCLES_prep#main.c", "codebase": "transcoder-set", "c_file": "CHECK_GIVEN_CIRCLE_LIES_COMPLETELY_INSIDE_RING_FORMED_TWO_CONCENTRIC_CIRCLES.c", "function": "main", "sloc": "18", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {8,400,1,61,60,88,60,26,33,70};\n int param1[] = {4,1,400,40,49,10,79,88,65,57};\n int param2[] = {2,10,10,2,68,69,92,75,57,77};\n int param3[] = {6,74,74,50,77,71,29,84,21,52};\n int param4[] = {0,38,38,0,71,26,38,10,61,87};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i],param3[i],param4[i]) == f_gold(param0[i],param1[i],param2[i],param3[i],param4[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#NUMBER_DIGITS_PRODUCT_TWO_NUMBERS_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "NUMBER_DIGITS_PRODUCT_TWO_NUMBERS.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CEILING_IN_A_SORTED_ARRAY_prep#main.c", "codebase": "transcoder-set", "c_file": "CEILING_IN_A_SORTED_ARRAY.c", "function": "main", "sloc": "27", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {2,3,4,6,8,9,9,10,11,16,19,20,21,21,21,24,24,25,28,30,30,30,32,34,35,39,41,42,49,52,57,59,61,62,66,68,71,73,76,79,83,84,85,86,87,87};\nint param0_1[] = {92,50,-84,60,32,-54,84,-82,-42,-72,-64,-28,-48,66,92,-42,42,-66,52,-30,48,42,36,-4,64,62,-16,0,20,26,78,78,12,-6,-30,-14,76,72,70,-34,98,32};\nint param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1};\nint param0_3[] = {26,68,73,76,14,19,56,80,17,7,15,64,99,98,21,21,72,12,14,10,44,82,25,42,46,86,79,43,91};\nint param0_4[] = {-90,-86,-84,-50,-30,-24,-12,-2,8,22,30,44,58,58,60,60,62,90};\nint param0_5[] = {0,0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,0,1,1};\nint param0_6[] = {2,2,29,31,34,39,48,50,56,61,66,66,69,73,88};\nint param0_7[] = {-98,48,-58,8,70,62,92,84,-58,-46,-26,-92,18,-88,40,-12,60,14,54,-64,88,52,-44,88,-46,-8,36,-22,28,-20,-50,58,-82,-44,-44,54,-86,40,10,0,-24,-84,-10,62,58,0,-88};\nint param0_8[] = {0,0,0,0,1,1};\nint param0_9[] = {56,30,33,5,67,35,22,54,36,55,94,89,40,65,29,76,17,14,14,49,40,44,35,69,63,2,81,78,19,67,12,14,68,30,82,85,12,2,94,33,85,75,97,31,69,31,85,26};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {23,36,11,23,9,12,9,40,5,46};\n int param2[] = {37,35,9,27,16,15,12,29,5,47};\n int param3[] = {44,34,13,26,10,18,10,24,5,47};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "gawk-5.2.2#main_prep#getenv_long.c", "codebase": "gawk-5.2.2", "c_file": "main.c", "function": "getenv_long", "sloc": "12", "c_code": "long\ngetenv_long(const char *name)\n{\n const char *val;\n long newval;\n if ((val = getenv(name)) != ((void *)0) && ((*__ctype_b_loc ())[(int) (((unsigned char) *val))] & (unsigned short int) _ISdigit)) {\n for (newval = 0; *val && ((*__ctype_b_loc ())[(int) (((unsigned char) *val))] & (unsigned short int) _ISdigit); val++)\n newval = (newval * 10) + *val - '0';\n return newval;\n }\n return -1;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_NUMBER_SUBSETS_DISTINCT_ELEMENTS_prep#main.c", "codebase": "transcoder-set", "c_file": "MINIMUM_NUMBER_SUBSETS_DISTINCT_ELEMENTS.c", "function": "main", "sloc": "24", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {1,2,5,8,16,21,21,22,23,26,26,27,27,29,31,33,36,37,37,38,42,45,47,50,57,58,60,60,62,63,66,66,76,84,84,88,96,99};\nint param0_1[] = {-30,-60,34,4,86,80,-96,-94,52,46,8,82,-94,-96,78,82,-22,-36,78,50,-46,-36,80,24,-14,94,-46,-38,82,4,-24,2,4,-82,-82,-18,-62,12,8,92,70,-10};\nint param0_2[] = {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,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};\nint param0_3[] = {38,47,84,49,48,62,48,41,38,48,92,16,99};\nint param0_4[] = {-88,-64,-40,-38,-38,-16,16,20,28,40,56,58,60,68,74,92};\nint param0_5[] = {1,1,0,1,0,0,1,0,1,0,0,1,1,0,1,0,1,1,1,1,0,0,0,1,0,1,0,0,1,0,0,0,1,0,0,0,0,0,1,1,1,1,1};\nint param0_6[] = {14,24,82,87,95};\nint param0_7[] = {-34,62,40,-84,52,-76,2,-58,94,22,2,-18,-88,62,-14,46,50,-58,-80,68,-64,90,-58,12,76,-40,40,-46,8,-80,4,-90,14,-10,64,-68};\nint param0_8[] = {0,1,1,1};\nint param0_9[] = {43,41,90,5,6,17,68,68,86,89};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {25,35,34,6,12,29,3,34,3,7};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#privileges_prep#closeExec.c", "codebase": "mtools-4.0.43", "c_file": "privileges.c", "function": "closeExec", "sloc": "4", "c_code": "void closeExec(int fd)\n{\n fcntl(fd, 2, 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#sha3-384_prep#nettle_sha3_384_digest.c", "codebase": "nettle-3.9.1", "c_file": "sha3-384.c", "function": "nettle_sha3_384_digest", "sloc": "9", "c_code": "void\nnettle_sha3_384_digest(struct sha3_384_ctx *ctx,\n size_t length,\n uint8_t *digest)\n{\n _nettle_sha3_pad (&ctx->state, 104, ctx->block, ctx->index, 6);\n _nettle_write_le64 (length, digest, ctx->state.a);\n nettle_sha3_384_init (ctx);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMIZE_SUM_CONSECUTIVE_DIFFERENCES_CIRCULAR_ARRAY_prep#min.c", "codebase": "transcoder-set", "c_file": "MAXIMIZE_SUM_CONSECUTIVE_DIFFERENCES_CIRCULAR_ARRAY.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_N_DIGIT_STEPPING_NUMBERS_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "NUMBER_N_DIGIT_STEPPING_NUMBERS.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "make-4.4.1#ar_prep#ar_member_date.c", "codebase": "make-4.4.1", "c_file": "ar.c", "function": "ar_member_date", "sloc": "19", "c_code": "time_t\nar_member_date (const char *name)\n{\n char *arname;\n char *memname;\n intmax_t val;\n ar_parse_name (name, &arname, &memname);\n {\n struct file *arfile;\n arfile = lookup_file (arname);\n if (arfile == 0 && file_exists_p (arname))\n arfile = enter_file (strcache_add (arname));\n if (arfile != 0)\n (void) f_mtime (arfile, 0);\n }\n val = ar_scan (arname, ar_member_date_1, memname);\n free (arname);\n return 0 < val && val <= ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1))) ? val : -1;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#valid_prep#xmlNewValidCtxt.c", "codebase": "libxml2", "c_file": "valid.c", "function": "xmlNewValidCtxt", "sloc": "8", "c_code": "xmlValidCtxtPtr xmlNewValidCtxt(void) {\n xmlValidCtxtPtr ret;\n ret = xmlMalloc(sizeof (xmlValidCtxt));\n if (ret == ((void *)0))\n return (((void *)0));\n (void) memset(ret, 0, sizeof (xmlValidCtxt));\n return (ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_authorization_prep#osip_authorization_get_gssapi_data.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authorization.c", "function": "osip_authorization_get_gssapi_data", "sloc": "3", "c_code": "char *osip_authorization_get_gssapi_data(osip_authorization_t *authorization) {\n return authorization->gssapi_data;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#bitset_prep#opng_bitset_count.c", "codebase": "optipng-0.7.8", "c_file": "bitset.c", "function": "opng_bitset_count", "sloc": "12", "c_code": "unsigned int\nopng_bitset_count(opng_bitset_t set)\n{\n unsigned int result;\n result = 0;\n while (set != 0)\n {\n set &= (set - 1);\n ++result;\n }\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#sdp_accessor_prep#sdp_message_i_info_set.c", "codebase": "libosip2-5.3.1", "c_file": "sdp_accessor.c", "function": "sdp_message_i_info_set", "sloc": "14", "c_code": "int sdp_message_i_info_set(sdp_message_t *sdp, int pos_media, char *info) {\n sdp_media_t *med;\n if (sdp == ((void *)0))\n return -2;\n if (pos_media == -1) {\n sdp->i_info = info;\n return 0;\n }\n med = osip_list_get(&sdp->m_medias, pos_media);\n if (med == ((void *)0))\n return -1;\n med->i_info = info;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "json.h#allow_location_information_prep#json_parse_key.c", "codebase": "json.h", "c_file": "allow_location_information.c", "function": "json_parse_key", "sloc": "23", "c_code": "void json_parse_key(struct json_parse_state_s *state,\n struct json_string_s *string) {\n if (json_parse_flags_allow_unquoted_keys & state->flags_bitset) {\n const char *const src = state->src;\n char *const data = state->data;\n size_t offset = state->offset;\n if (('\"' == src[offset]) || ('\\'' == src[offset])) {\n json_parse_string(state, string);\n } else {\n size_t size = 0;\n string->string = state->data;\n while (is_valid_unquoted_key_char(src[offset])) {\n data[size++] = src[offset++];\n }\n data[size] = '\\0';\n string->string_size = size++;\n state->data += size;\n state->offset = offset;\n }\n } else {\n json_parse_string(state, string);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#schematron_prep#xmlSchematronFreeParserCtxt.c", "codebase": "libxml2", "c_file": "schematron.c", "function": "xmlSchematronFreeParserCtxt", "sloc": "15", "c_code": "void\nxmlSchematronFreeParserCtxt(xmlSchematronParserCtxtPtr ctxt)\n{\n if (ctxt == ((void *)0))\n return;\n if (ctxt->doc != ((void *)0) && !ctxt->preserve)\n xmlFreeDoc(ctxt->doc);\n if (ctxt->xctxt != ((void *)0)) {\n xmlXPathFreeContext(ctxt->xctxt);\n }\n if (ctxt->namespaces != ((void *)0))\n xmlFree((char **) ctxt->namespaces);\n xmlDictFree(ctxt->dict);\n xmlFree(ctxt);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngmem_prep#png_free.c", "codebase": "optipng-0.7.8", "c_file": "pngmem.c", "function": "png_free", "sloc": "7", "c_code": "void\npng_free(png_const_structrp png_ptr, png_voidp ptr)\n{\n if (png_ptr == ((void *)0) || ptr == ((void *)0))\n return;\n free(ptr);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlPopInput.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlPopInput", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlPopInput(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlChar c_retval;\n xmlParserCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlPopInput\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj));\n c_retval = xmlPopInput(ctxt);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_location_information_prep#json_write_pretty_array.c", "codebase": "json.h", "c_file": "allow_location_information.c", "function": "json_write_pretty_array", "sloc": "41", "c_code": "char *json_write_pretty_array(const struct json_array_s *array, size_t depth,\n const char *indent, const char *newline,\n char *data) {\n size_t k, m;\n struct json_array_element_s *element;\n *data++ = '[';\n if (0 < array->length) {\n for (k = 0; '\\0' != newline[k]; k++) {\n *data++ = newline[k];\n }\n for (element = array->start; 0 != element;\n element = element->next) {\n if (element != array->start) {\n *data++ = ',';\n for (k = 0; '\\0' != newline[k]; k++) {\n *data++ = newline[k];\n }\n }\n for (k = 0; k < depth + 1; k++) {\n for (m = 0; '\\0' != indent[m]; m++) {\n *data++ = indent[m];\n }\n }\n data = json_write_pretty_value(element->value, depth + 1, indent, newline,\n data);\n if (0 == data) {\n return 0;\n }\n }\n for (k = 0; '\\0' != newline[k]; k++) {\n *data++ = newline[k];\n }\n for (k = 0; k < depth; k++) {\n for (m = 0; '\\0' != indent[m]; m++) {\n *data++ = indent[m];\n }\n }\n }\n *data++ = ']';\n return data;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 8, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_1_prep#max.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_1.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_transaction_prep#osip_transaction_get_reserved4.c", "codebase": "libosip2-5.3.1", "c_file": "osip_transaction.c", "function": "osip_transaction_get_reserved4", "sloc": "5", "c_code": "void *osip_transaction_get_reserved4(osip_transaction_t *transaction) {\n if (transaction == ((void *)0))\n return ((void *)0);\n return transaction->reserved4;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#WAYS_TO_WRITE_N_AS_SUM_OF_TWO_OR_MORE_POSITIVE_INTEGERS_prep#len.c", "codebase": "transcoder-set", "c_file": "WAYS_TO_WRITE_N_AS_SUM_OF_TWO_OR_MORE_POSITIVE_INTEGERS.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsMiscellaneousSymbolsandArrows.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsMiscellaneousSymbolsandArrows", "sloc": "4", "c_code": "int\nxmlUCSIsMiscellaneousSymbolsandArrows(int code) {\n return(((code >= 0x2B00) && (code <= 0x2BFF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "patch-2.7.6#pch_prep#pch_line_len.c", "codebase": "patch-2.7.6", "c_file": "pch.c", "function": "pch_line_len", "sloc": "5", "c_code": "size_t\npch_line_len (lin line)\n{\n return p_len[line];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SQUARE_ROOT_OF_AN_INTEGER_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "SQUARE_ROOT_OF_AN_INTEGER_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#cvt_prep#cvt_alloc_chpos.c", "codebase": "less-633", "c_file": "cvt.c", "function": "cvt_alloc_chpos", "sloc": "8", "c_code": "int * cvt_alloc_chpos(int len)\n{\n int i;\n int *chpos = (int *) ecalloc(sizeof(int), len);\n for (i = 0; i < len; i++)\n chpos[i] = -1;\n return (chpos);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "genann#genann_prep#genann_run.c", "codebase": "genann", "c_file": "genann.c", "function": "genann_run", "sloc": "47", "c_code": "double const *genann_run(genann const *ann, double const *inputs) {\n double const *w = ann->weight;\n double *o = ann->output + ann->inputs;\n double const *i = ann->output;\n memcpy(ann->output, inputs, sizeof(double) * ann->inputs);\n int h, j, k;\n if (!ann->hidden_layers) {\n double *ret = o;\n for (j = 0; j < ann->outputs; ++j) {\n double sum = *w++ * -1.0;\n for (k = 0; k < ann->inputs; ++k) {\n sum += *w++ * i[k];\n }\n *o++ = genann_act_output_indirect(ann, sum);\n }\n return ret;\n }\n for (j = 0; j < ann->hidden; ++j) {\n double sum = *w++ * -1.0;\n for (k = 0; k < ann->inputs; ++k) {\n sum += *w++ * i[k];\n }\n *o++ = genann_act_hidden_indirect(ann, sum);\n }\n i += ann->inputs;\n for (h = 1; h < ann->hidden_layers; ++h) {\n for (j = 0; j < ann->hidden; ++j) {\n double sum = *w++ * -1.0;\n for (k = 0; k < ann->hidden; ++k) {\n sum += *w++ * i[k];\n }\n *o++ = genann_act_hidden_indirect(ann, sum);\n }\n i += ann->hidden;\n }\n double const *ret = o;\n for (j = 0; j < ann->outputs; ++j) {\n double sum = *w++ * -1.0;\n for (k = 0; k < ann->hidden; ++k) {\n sum += *w++ * i[k];\n }\n *o++ = genann_act_output_indirect(ann, sum);\n }\n ((void) sizeof ((w - ann->weight == ann->total_weights) ? 1 : 0), __extension__ ({ if (w - ann->weight == ann->total_weights) ; else __assert_fail (\"w - ann->weight == ann->total_weights\", \"genann.c\", 271, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((o - ann->output == ann->total_neurons) ? 1 : 0), __extension__ ({ if (o - ann->output == ann->total_neurons) ; else __assert_fail (\"o - ann->output == ann->total_neurons\", \"genann.c\", 272, __extension__ __PRETTY_FUNCTION__); }));\n return ret;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 9, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "bc-1.07.1#string_prep#dc_makestring.c", "codebase": "bc-1.07.1", "c_file": "string.c", "function": "dc_makestring", "sloc": "17", "c_code": "dc_data\ndc_makestring (\n const char *s ,\n size_t len )\n{\n dc_data result;\n struct dc_string *string;\n string = dc_malloc(sizeof *string);\n string->s_ptr = dc_malloc(len+1);\n memcpy(string->s_ptr, s, len);\n string->s_ptr[len] = '\\0';\n string->s_len = len;\n string->s_refs = 1;\n result.v.string = string;\n result.dc_type = DC_STRING;\n return result;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#optfunc_prep#opt_linenum_width.c", "codebase": "less-633", "c_file": "optfunc.c", "function": "opt_linenum_width", "sloc": "18", "c_code": "void opt_linenum_width(int type, char *s)\n{\n PARG parg;\n switch (type)\n {\n case 0:\n case 2:\n if (linenum_width > 16)\n {\n parg.p_int = 16;\n error(\"Line number width must not be larger than %d\", &parg);\n linenum_width = 7;\n }\n break;\n case 1:\n break;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 2}}, {"id": "json.h#allow_hexadecimal_numbers_prep#json_write_number.c", "codebase": "json.h", "c_file": "allow_hexadecimal_numbers.c", "function": "json_write_number", "sloc": "115", "c_code": "char *json_write_number(const struct json_number_s *number, char *data) {\n uintmax_t parsed_number, backup;\n size_t i;\n if (number->number_size >= 2) {\n switch (number->number[1]) {\n default:\n break;\n case 'x':\n case 'X':\n parsed_number = strtoumax(number->number, 0, 0);\n backup = parsed_number;\n i = 0;\n while (0 != parsed_number) {\n parsed_number /= 10;\n i++;\n }\n parsed_number = backup;\n backup = i;\n do {\n *(data + i - 1) = '0' + (char)(parsed_number % 10);\n parsed_number /= 10;\n i--;\n } while (0 != parsed_number);\n data += backup;\n return data;\n }\n }\n i = 0;\n if ((i < number->number_size) &&\n (('+' == number->number[i]) || ('-' == number->number[i]))) {\n i++;\n }\n if ((i < number->number_size) && ('I' == number->number[i])) {\n const char *inf = \"Infinity\";\n size_t k;\n for (k = i; k < number->number_size; k++) {\n const char c = *inf++;\n if ('\\0' == c) {\n break;\n } else if (c != number->number[k]) {\n break;\n }\n }\n if ('\\0' == *inf++) {\n const char *dbl_max;\n if ('-' == number->number[0]) {\n *data++ = '-';\n }\n for (dbl_max = \"1.7976931348623158e308\"; '\\0' != *dbl_max; dbl_max++) {\n *data++ = *dbl_max;\n }\n return data;\n }\n }\n if ((i < number->number_size) && ('N' == number->number[i])) {\n const char *nan = \"NaN\";\n size_t k;\n for (k = i; k < number->number_size; k++) {\n const char c = *nan++;\n if ('\\0' == c) {\n break;\n } else if (c != number->number[k]) {\n break;\n }\n }\n if ('\\0' == *nan++) {\n *data++ = '0';\n return data;\n }\n }\n if ((i < number->number_size) && ('.' == number->number[i])) {\n i = 0;\n if ('+' == number->number[i]) {\n i++;\n }\n if ('-' == number->number[i]) {\n *data++ = '-';\n i++;\n }\n *data++ = '0';\n for (; i < number->number_size; i++) {\n *data++ = number->number[i];\n }\n return data;\n }\n for (; i < number->number_size; i++) {\n const char c = number->number[i];\n if (!('0' <= c && c <= '9')) {\n break;\n }\n }\n if ((i + 1 == number->number_size) && ('.' == number->number[i])) {\n i = 0;\n if ('+' == number->number[i]) {\n i++;\n }\n if ('-' == number->number[i]) {\n *data++ = '-';\n i++;\n }\n for (; i < number->number_size; i++) {\n *data++ = number->number[i];\n }\n *data++ = '0';\n return data;\n }\n i = 0;\n if ('+' == number->number[i]) {\n i++;\n }\n for (; i < number->number_size; i++) {\n *data++ = number->number[i];\n }\n return data;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 19, "for_loop": 7, "while_loop": 2, "switch_statement": 1, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 6}}, {"id": "gprolog-1.5.0#linedit_prep#Pl_LE_Compl_Add_Word.c", "codebase": "gprolog-1.5.0", "c_file": "linedit.c", "function": "Pl_LE_Compl_Add_Word", "sloc": "22", "c_code": "char *\nPl_LE_Compl_Add_Word(char *word, int word_length)\n{\n CompNode **p;\n CompNode *q;\n int cmp;\n for (p = &comp_start; *p; p = &(*p)->next)\n {\n cmp = strcmp((*p)->word, word);\n if (cmp == 0)\n return word;\n if (cmp > 0)\n break;\n }\n if ((q = (CompNode *) malloc(sizeof(CompNode))) == ((void *)0))\n exit(1);\n q->word = word;\n q->word_length = word_length;\n q->next = *p;\n *p = q;\n return word;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 1}}, {"id": "libosip2-5.3.1#osip_time_prep#add_gettimeofday.c", "codebase": "libosip2-5.3.1", "c_file": "osip_time.c", "function": "add_gettimeofday", "sloc": "12", "c_code": "void add_gettimeofday(struct timeval *atv, int ms) {\n int m;\n if (ms >= 1000000) {\n atv->tv_usec = 0;\n m = ms / 1000;\n } else {\n atv->tv_usec += ms * 1000;\n m = atv->tv_usec / 1000000;\n atv->tv_usec = atv->tv_usec % 1000000;\n }\n atv->tv_sec += m;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#profile_prep#pp_string_or_typed_regex.c", "codebase": "gawk-5.2.2", "c_file": "profile.c", "function": "pp_string_or_typed_regex", "sloc": "61", "c_code": "char *\npp_string_or_typed_regex(const char *in_str, size_t len, int delim, _Bool typed_regex)\n{\n static char str_escapes[] = \"\\a\\b\\f\\n\\r\\t\\v\\\\\";\n static char str_printables[] = \"abfnrtv\\\\\";\n static char re_escapes[] = \"\\a\\b\\f\\n\\r\\t\\v\";\n static char re_printables[] = \"abfnrtv\";\n char *escapes;\n char *printables;\n char *cp;\n int i;\n const unsigned char *str = (const unsigned char *) in_str;\n size_t ofre, osiz;\n char *obuf, *obufout;\n ((void) (0));\n if (delim == '/') {\n escapes = re_escapes;\n printables = re_printables;\n } else {\n escapes = str_escapes;\n printables = str_printables;\n }\n osiz = len + 3 + 1 + (typed_regex == 1);\n (void) (obuf = (char *) emalloc_real((size_t)(osiz), \"pp_string\", \"obuf\", \"profile.c\", 1700));\n obufout = obuf;\n ofre = osiz - 1;\n if (typed_regex)\n *obufout++ = '@';\n *obufout++ = delim;\n for (; len > 0; len--, str++) {\n if ((2) > ofre) { long olen = obufout - obuf; (void) (obuf = (char *) erealloc_real((void *) obuf, (size_t)(osiz * 2), \"pp_string\", \"obuf\", \"profile.c\", 1709)); obufout = obuf + olen; ofre += osiz; osiz *= 2; } ofre -= (2);\n if (delim != '/' && *str == delim) {\n *obufout++ = '\\\\';\n *obufout++ = delim;\n } else if (*str == '\\0') {\n *obufout++ = '\\\\';\n *obufout++ = '0';\n if ((2) > ofre) { long olen = obufout - obuf; (void) (obuf = (char *) erealloc_real((void *) obuf, (size_t)(osiz * 2), \"pp_string\", \"obuf\", \"profile.c\", 1716)); obufout = obuf + olen; ofre += osiz; osiz *= 2; } ofre -= (2);\n *obufout++ = '0';\n *obufout++ = '0';\n } else if ((cp = strchr(escapes, *str)) != ((void *)0)) {\n i = cp - escapes;\n *obufout++ = '\\\\';\n *obufout++ = printables[i];\n } else if ((((*str) & ~0x7f) == 0) && ((*__ctype_b_loc ())[(int) ((*str))] & (unsigned short int) _ISprint)) {\n *obufout++ = *str;\n ofre += 1;\n } else {\n size_t len;\n if ((8) > ofre) { long olen = obufout - obuf; (void) (obuf = (char *) erealloc_real((void *) obuf, (size_t)(osiz * 2), \"pp_string\", \"obuf\", \"profile.c\", 1730)); obufout = obuf + olen; ofre += osiz; osiz *= 2; } ofre -= (8);\n sprintf(obufout, \"\\\\%03o\", *str & 0xff);\n len = strlen(obufout);\n ofre += (10 - len);\n obufout += len;\n }\n }\n if ((2) > ofre) { long olen = obufout - obuf; (void) (obuf = (char *) erealloc_real((void *) obuf, (size_t)(osiz * 2), \"pp_string\", \"obuf\", \"profile.c\", 1738)); obufout = obuf + olen; ofre += osiz; osiz *= 2; } ofre -= (2);\n *obufout++ = delim;\n *obufout = '\\0';\n return obuf;\n}\n", "c_constructs": {"pointer_type": 6, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 8, "memory_management": 0, "memory_operation": 0, "if_statement": 10, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bc-1.07.1#stack_prep#dc_register_get.c", "codebase": "bc-1.07.1", "c_file": "stack.c", "function": "dc_register_get", "sloc": "19", "c_code": "int\ndc_register_get (\n int regid ,\n dc_data *result )\n{\n dc_list *r;\n regid = ((regid) & (((0x7f * 2 + 1)+1)-1));\n r = dc_register[regid];\n if (r==((void *)0)){\n *result = dc_int2data(0);\n }else if (r->value.dc_type==DC_UNINITIALIZED){\n fprintf(stderr, \"%s: BUG: register \", progname);\n dc_show_id(stderr, regid, \" exists but is uninitialized?\\n\");\n return 2;\n }else{\n *result = dc_dup(r->value);\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#WRITE_AN_EFFICIENT_METHOD_TO_CHECK_IF_A_NUMBER_IS_MULTIPLE_OF_3_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "WRITE_AN_EFFICIENT_METHOD_TO_CHECK_IF_A_NUMBER_IS_MULTIPLE_OF_3.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "lodepng#lodepng_prep#lodepng_save_file.c", "codebase": "lodepng", "c_file": "lodepng.c", "function": "lodepng_save_file", "sloc": "8", "c_code": "unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename) {\n FILE* file;\n file = fopen(filename, \"wb\" );\n if(!file) return 79;\n fwrite(buffer, 1, buffersize, file);\n fclose(file);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "diffutils-3.10#io_prep#read_files.c", "codebase": "diffutils-3.10", "c_file": "io.c", "function": "read_files", "sloc": "36", "c_code": "_Bool\nread_files (struct file_data filevec[], _Bool pretend_binary)\n{\n int i;\n _Bool skip_test = text | pretend_binary;\n _Bool appears_binary = pretend_binary | sip (&filevec[0], skip_test);\n if (filevec[0].desc != filevec[1].desc)\n appears_binary |= sip (&filevec[1], skip_test | appears_binary);\n else\n {\n filevec[1].buffer = filevec[0].buffer;\n filevec[1].bufsize = filevec[0].bufsize;\n filevec[1].buffered = filevec[0].buffered;\n }\n if (appears_binary)\n {\n set_binary_mode (filevec[0].desc, 0);\n set_binary_mode (filevec[1].desc, 0);\n return 1;\n }\n find_identical_ends (filevec);\n equivs_alloc = filevec[0].alloc_lines + filevec[1].alloc_lines + 1;\n equivs = xnmalloc (equivs_alloc, sizeof *equivs);\n equivs_index = 1;\n for (i = 9; (size_t) 1 << i < equivs_alloc / 3; i++)\n continue;\n nbuckets = ((size_t) 1 << i) - prime_offset[i];\n buckets = xcalloc (nbuckets + 1, sizeof *buckets);\n buckets++;\n for (i = 0; i < 2; i++)\n find_and_hash_each_line (&filevec[i]);\n filevec[0].equiv_max = filevec[1].equiv_max = equivs_index;\n free (equivs);\n free (buckets - 1);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 2, "memory_operation": 0, "if_statement": 2, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 1}}, {"id": "transcoder-set#CHOCOLATE_DISTRIBUTION_PROBLEM_prep#max.c", "codebase": "transcoder-set", "c_file": "CHOCOLATE_DISTRIBUTION_PROBLEM.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#session_prep#session_groups_RB_INSERT.c", "codebase": "tmux", "c_file": "session.c", "function": "session_groups_RB_INSERT", "sloc": "1", "c_code": "struct session_group * session_groups_RB_INSERT(struct session_groups *head, struct session_group *elm) { struct session_group *tmp; struct session_group *parent = ((void *)0); int comp = 0; tmp = (head)->rbh_root; while (tmp) { parent = tmp; comp = (session_group_cmp)(elm, parent); if (comp < 0) tmp = (tmp)->entry.rbe_left; else if (comp > 0) tmp = (tmp)->entry.rbe_right; else return (tmp); } do { (elm)->entry.rbe_parent = parent; (elm)->entry.rbe_left = (elm)->entry.rbe_right = ((void *)0); (elm)->entry.rbe_color = 1; } while (0); if (parent != ((void *)0)) { if (comp < 0) (parent)->entry.rbe_left = elm; else (parent)->entry.rbe_right = elm; do {} while (0); } else (head)->rbh_root = elm; session_groups_RB_INSERT_COLOR(head, elm); return (((void *)0)); }\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#b-divvy_prep#accf.c", "codebase": "rcs-5.10.1", "c_file": "b-divvy.c", "function": "accf", "sloc": "8", "c_code": "void\naccf (struct divvy *divvy, char const *fmt, ...)\n{\n va_list args;\n __builtin_va_start(args,fmt);\n obstack_vprintf (&divvy->space, fmt, args);\n __builtin_va_end(args);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "heman#mat3_prep#kmMat3Inverse.c", "codebase": "heman", "c_file": "mat3.c", "function": "kmMat3Inverse", "sloc": "14", "c_code": "kmMat3* kmMat3Inverse(kmMat3* pOut, const kmMat3* pM)\n{\n float determinate = kmMat3Determinant(pM);\n float detInv;\n kmMat3 adjugate;\n if(determinate == 0.0)\n {\n return ((void *)0);\n }\n detInv = 1.0 / determinate;\n kmMat3Adjugate(&adjugate, pM);\n kmMat3ScalarMultiply(pOut, &adjugate, detInv);\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_NUMBER_BINARY_STRINGS_WITHOUT_CONSECUTIVE_1S_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBER_BINARY_STRINGS_WITHOUT_CONSECUTIVE_1S.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#winio_prep#record_macro.c", "codebase": "nano-7.2", "c_file": "winio.c", "function": "record_macro", "sloc": "13", "c_code": "void record_macro(void)\n{\n recording = !recording;\n if (recording) {\n macro_length = 0;\n statusline(REMARK, gettext(\"Recording a macro...\"));\n } else {\n snip_last_keystroke();\n statusline(REMARK, gettext(\"Stopped recording\"));\n }\n if (((flags[((STATEFLAGS) / (sizeof(unsigned) * 8))] & ((unsigned)1 << ((STATEFLAGS) % (sizeof(unsigned) * 8)))) != 0))\n titlebar(((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#prob_prep#dap_simp.c", "codebase": "dap-3.10", "c_file": "prob.c", "function": "dap_simp", "sloc": "14", "c_code": "double dap_simp(double (*f)(), double a, double b, int n)\n{\n double h;\n double val;\n int i;\n h = (b - a) / ((double) n);\n val = 0.0;\n for (i = 1; i <= n - 1; i += 2)\n val += 4.0 * (*f)(a + ((double) i) * h);\n for (i = 2; i <= n - 2; i += 2)\n val += 2.0 * (*f)(a + ((double) i) * h);\n val += (*f)(a) + (*f)(b);\n return val * h / 3.0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 4, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_htmlNodeDumpFile.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_htmlNodeDumpFile", "sloc": "18", "c_code": "PyObject *\nlibxml_htmlNodeDumpFile(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n FILE * out;\n PyObject *pyobj_out;\n xmlDocPtr doc;\n PyObject *pyobj_doc;\n xmlNodePtr cur;\n PyObject *pyobj_cur;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"OOO:htmlNodeDumpFile\", &pyobj_out, &pyobj_doc, &pyobj_cur))\n return(((void *)0));\n out = (FILE *) (((pyobj_out) == (&_Py_NoneStruct)) ? ((void *)0) : libxml_PyFileGet(pyobj_out));\n doc = (xmlDocPtr) (((pyobj_doc) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_doc))->obj));\n cur = (xmlNodePtr) (((pyobj_cur) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_cur))->obj));\n htmlNodeDumpFile(out, doc, cur);\n libxml_PyFileRelease(out);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int m, int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#mformat_prep#setFsSectorSize.c", "codebase": "mtools-4.0.43", "c_file": "mformat.c", "function": "setFsSectorSize", "sloc": "15", "c_code": "void setFsSectorSize(Fs_t *Fs, struct device *dev, uint16_t msize) {\n unsigned int j;\n Fs->sector_size = 512;\n if( !(dev->use_2m & 0x7f)) {\n Fs->sector_size = (uint16_t) (128u << (dev->ssize & 0x7f));\n }\n if(msize)Fs->sector_size=msize;\n for(j = 0; j < 31; j++) {\n if (Fs->sector_size == (unsigned int) (1 << j)) {\n Fs->sectorShift = j;\n break;\n }\n }\n Fs->sectorMask = Fs->sector_size - 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "transcoder-set#FIND_N_TH_ELEMENT_FROM_STERNS_DIATOMIC_SERIES_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_N_TH_ELEMENT_FROM_STERNS_DIATOMIC_SERIES.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#hash_prep#xmlHashQLookup2.c", "codebase": "libxml2", "c_file": "hash.c", "function": "xmlHashQLookup2", "sloc": "6", "c_code": "void *\nxmlHashQLookup2(xmlHashTablePtr hash, const xmlChar *prefix,\n const xmlChar *name, const xmlChar *prefix2,\n const xmlChar *name2) {\n return(xmlHashQLookup3(hash, prefix, name, prefix2, name2, ((void *)0), ((void *)0)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#hash_prep#xmlHashUpdateEntry.c", "codebase": "libxml2", "c_file": "hash.c", "function": "xmlHashUpdateEntry", "sloc": "9", "c_code": "int\nxmlHashUpdateEntry(xmlHashTablePtr hash, const xmlChar *key,\n void *payload, xmlHashDeallocator dealloc) {\n int res = xmlHashUpdateInternal(hash, key, ((void *)0), ((void *)0), payload,\n dealloc, 1);\n if (res == 1)\n res = 0;\n return(res);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_skip_c_style_comments.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_skip_c_style_comments", "sloc": "40", "c_code": "int json_skip_c_style_comments(struct json_parse_state_s *state) {\n if ((state->offset + 2) > state->size) {\n return 0;\n }\n if ('/' == state->src[state->offset]) {\n if ('/' == state->src[state->offset + 1]) {\n state->offset++;\n state->offset++;\n while (state->offset < state->size) {\n switch (state->src[state->offset]) {\n default:\n state->offset++;\n break;\n case '\\n':\n state->offset++;\n state->line_no++;\n state->line_offset = state->offset;\n return 1;\n }\n }\n return 1;\n } else if ('*' == state->src[state->offset + 1]) {\n state->offset++;\n state->offset++;\n while (state->offset + 1 < state->size) {\n if (('*' == state->src[state->offset]) &&\n ('/' == state->src[state->offset + 1])) {\n state->offset += 2;\n return 1;\n } else if ('\\n' == state->src[state->offset]) {\n state->line_no++;\n state->line_offset = state->offset;\n }\n state->offset++;\n }\n return 1;\n }\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 2, "switch_statement": 1, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 1}}, {"id": "pexec-1.0rc8#fifo_prep#fifo_skip.c", "codebase": "pexec-1.0rc8", "c_file": "fifo.c", "function": "fifo_skip", "sloc": "4", "c_code": "size_t fifo_skip(fifo *f,size_t size)\n{\n return(fifo_read(f,((void *)0),size));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_MATRIX_ELEMENT_ELEMENT_INTEGER_DIVISION_ROW_COLUMN_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "SUM_MATRIX_ELEMENT_ELEMENT_INTEGER_DIVISION_ROW_COLUMN.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#log_prep#ustats_close.c", "codebase": "uucp-1.07", "c_file": "log.c", "function": "ustats_close", "sloc": "11", "c_code": "void\nustats_close ()\n{\n if (eLstats != ((void *)0))\n {\n if (fclose (eLstats) != 0)\n ulog (LOG_ERROR, \"fclose: %s\", strerror ((*__errno_location ())));\n eLstats = ((void *)0);\n fLstats_tried = (0);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "patch-2.7.6#tempname_prep#gen_tempname.c", "codebase": "patch-2.7.6", "c_file": "tempname.c", "function": "gen_tempname", "sloc": "21", "c_code": "int\ngen_tempname (char *tmpl, int suffixlen, int flags, int kind)\n{\n int (*tryfunc) (char *, void *);\n switch (kind)\n {\n case 0:\n tryfunc = try_file;\n break;\n case 1:\n tryfunc = try_dir;\n break;\n case 2:\n tryfunc = try_nocreate;\n break;\n default:\n ((void) sizeof ((! \"invalid KIND in __gen_tempname\") ? 1 : 0), __extension__ ({ if (! \"invalid KIND in __gen_tempname\") ; else __assert_fail (\"! \\\"invalid KIND in __gen_tempname\\\"\", \"tempname.c\", 319, __extension__ __PRETTY_FUNCTION__); }));\n abort ();\n }\n return try_tempname (tmpl, suffixlen, &flags, tryfunc);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 3}}, {"id": "wget-1.21.4#utils_prep#datetime_str.c", "codebase": "wget-1.21.4", "c_file": "utils.c", "function": "datetime_str", "sloc": "5", "c_code": "char *\ndatetime_str (time_t t)\n{\n return fmttime(t, \"%Y-%m-%d %H:%M:%S\");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#recep_prep#fsysdep_already_received.c", "codebase": "uucp-1.07", "c_file": "recep.c", "function": "fsysdep_already_received", "sloc": "25", "c_code": "boolean\nfsysdep_already_received (qsys, zto, ztemp)\n const struct uuconf_system *qsys;\n const char *zto __attribute__ ((__unused__));\n const char *ztemp;\n{\n char *zfile;\n struct stat s;\n boolean fret;\n zfile = zsreceived_name (qsys, ztemp);\n if (zfile == ((void *)0))\n return (0);\n if (stat (zfile, &s) < 0)\n {\n if ((*__errno_location ()) != 2)\n ulog (LOG_ERROR, \"stat (%s): %s\", zfile, strerror ((*__errno_location ())));\n ubuffree (zfile);\n return (0);\n }\n fret = s.st_mtim.tv_sec + ((long) 7 * (long) 24 * (long) 60 * (long) 60) >= time ((time_t *) ((void *)0));\n if (fret)\n do { if (((iDebug & ((0200))) != 0)) ulog (LOG_DEBUG, (\"fsysdep_already_received: Found %s\"), (zfile)); } while (0);\n ubuffree (zfile);\n return fret;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MEDIAN_OF_TWO_SORTED_ARRAYS_prep#sort.c", "codebase": "transcoder-set", "c_file": "MEDIAN_OF_TWO_SORTED_ARRAYS.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "wget-1.21.4#host_prep#address_list_contains.c", "codebase": "wget-1.21.4", "c_file": "host.c", "function": "address_list_contains", "sloc": "29", "c_code": "_Bool\naddress_list_contains (const struct address_list *al, const ip_address *ip)\n{\n int i;\n switch (ip->family)\n {\n case 2:\n for (i = 0; i < al->count; i++)\n {\n ip_address *cur = al->addresses + i;\n if (cur->family == 2\n && (cur->data.d4.s_addr == ip->data.d4.s_addr))\n return 1;\n }\n return 0;\n case 10:\n for (i = 0; i < al->count; i++)\n {\n ip_address *cur = al->addresses + i;\n if (cur->family == 10\n && cur->ipv6_scope == ip->ipv6_scope\n && (__extension__ ({ const struct in6_addr *__a = (const struct in6_addr *) (&cur->data.d6); const struct in6_addr *__b = (const struct in6_addr *) (&ip->data.d6); __a->__in6_u.__u6_addr32[0] == __b->__in6_u.__u6_addr32[0] && __a->__in6_u.__u6_addr32[1] == __b->__in6_u.__u6_addr32[1] && __a->__in6_u.__u6_addr32[2] == __b->__in6_u.__u6_addr32[2] && __a->__in6_u.__u6_addr32[3] == __b->__in6_u.__u6_addr32[3]; })))\n return 1;\n }\n return 0;\n default:\n abort ();\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 2, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libzahl-1.0#zcmp_prep#zcmp.c", "codebase": "libzahl-1.0", "c_file": "zcmp.c", "function": "zcmp", "sloc": "7", "c_code": "int\nzcmp(z_t a, z_t b)\n{\n if (zsignum(a) != zsignum(b))\n return zsignum(a) < zsignum(b) ? -1 : zsignum(a) > zsignum(b);\n return zsignum(a) * zcmpmag(a, b);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nano-7.2#chars_prep#mbstrcasestr.c", "codebase": "nano-7.2", "c_file": "chars.c", "function": "mbstrcasestr", "sloc": "13", "c_code": "char *mbstrcasestr(const char *haystack, const char *needle)\n{\n if (use_utf8) {\n size_t needle_len = mbstrlen(needle);\n while (*haystack != '\\0') {\n if (mbstrncasecmp(haystack, needle, needle_len) == 0)\n return (char *)haystack;\n haystack += char_length(haystack);\n }\n return ((void *)0);\n } else\n return (char *)strcasestr(haystack, needle);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngget_prep#png_get_x_offset_microns.c", "codebase": "optipng-0.7.8", "c_file": "pngget.c", "function": "png_get_x_offset_microns", "sloc": "7", "c_code": "png_int_32\npng_get_x_offset_microns(png_const_structrp png_ptr, png_const_inforp info_ptr)\n{\n (void)png_ptr;\n (void)info_ptr;\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_ring_prep#__pth_ring_favorite.c", "codebase": "pth-2.0.7", "c_file": "pth_ring.c", "function": "__pth_ring_favorite", "sloc": "12", "c_code": "int __pth_ring_favorite(pth_ring_t *r, pth_ringnode_t *rn)\n{\n if (r == ((void *)0))\n return (0);\n if (r->r_hook == ((void *)0))\n return (0);\n if (r->r_hook == rn)\n return (!(0));\n __pth_ring_delete(r, rn);\n __pth_ring_prepend(r, rn);\n return (!(0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "json.h#allow_equals_in_object_prep#json_write_minified_get_object_size.c", "codebase": "json.h", "c_file": "allow_equals_in_object.c", "function": "json_write_minified_get_object_size", "sloc": "18", "c_code": "int json_write_minified_get_object_size(const struct json_object_s *object,\n size_t *size) {\n struct json_object_element_s *element;\n *size += 2;\n *size += object->length;\n if (1 < object->length) {\n *size += object->length - 1;\n }\n for (element = object->start; 0 != element; element = element->next) {\n if (json_write_get_string_size(element->name, size)) {\n return 1;\n }\n if (json_write_minified_get_value_size(element->value, size)) {\n return 1;\n }\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "lil#lil_prep#lil_to_integer.c", "codebase": "lil", "c_file": "lil.c", "function": "lil_to_integer", "sloc": "4", "c_code": "lilint_t lil_to_integer(lil_value_t val)\n{\n return (lilint_t)atoll(lil_to_string(val));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_header_prep#osip_header_to_str.c", "codebase": "libosip2-5.3.1", "c_file": "osip_header.c", "function": "osip_header_to_str", "sloc": "20", "c_code": "int osip_header_to_str(const osip_header_t *header, char **dest) {\n size_t len, hlen;\n *dest = ((void *)0);\n if ((header == ((void *)0)) || (header->hname == ((void *)0)))\n return -2;\n len = 0;\n hlen = strlen(header->hname);\n if (header->hvalue != ((void *)0))\n len = strlen(header->hvalue);\n *dest = (char *) (osip_malloc_func ? osip_malloc_func(hlen + len + 3) : malloc(hlen + len + 3));\n if (*dest == ((void *)0))\n return -4;\n if (header->hvalue != ((void *)0))\n snprintf(*dest, hlen + len + 3, \"%s: %s\", header->hname, header->hvalue);\n else\n snprintf(*dest, hlen + len + 3, \"%s: \", header->hname);\n if (*dest[0] >= 'a' && *dest[0] <= 'z')\n *dest[0] = (*dest[0] - 32);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 1, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_SUBSEQUENCE_SUM_SUCH_THAT_NO_THREE_ARE_CONSECUTIVE_prep#max.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_SUBSEQUENCE_SUM_SUCH_THAT_NO_THREE_ARE_CONSECUTIVE.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json-c#json_object_prep#json_object_set_string_len.c", "codebase": "json-c", "c_file": "json_object.c", "function": "json_object_set_string_len", "sloc": "4", "c_code": "int json_object_set_string_len(json_object *jso, const char *s, int len)\n{\n return _json_object_set_string_len(jso, s, len);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_INSERTIONS_SORT_ARRAY_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "MINIMUM_INSERTIONS_SORT_ARRAY.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#parserInternals_prep#xmlIsLetter.c", "codebase": "libxml2", "c_file": "parserInternals.c", "function": "xmlIsLetter", "sloc": "4", "c_code": "int\nxmlIsLetter(int c) {\n return((((c) < 0x100) ? (((0x41 <= ((c))) && (((c)) <= 0x5a)) || ((0x61 <= ((c))) && (((c)) <= 0x7a)) || ((0xc0 <= ((c))) && (((c)) <= 0xd6)) || ((0xd8 <= ((c))) && (((c)) <= 0xf6)) || (0xf8 <= ((c)))) : xmlCharInRange((c), &xmlIsBaseCharGroup)) || (((c) < 0x100) ? 0 : (((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || ((c) == 0x3007) || ((0x3021 <= (c)) && ((c) <= 0x3029)))));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "ed-1.19#signal_prep#set_signals.c", "codebase": "ed-1.19", "c_file": "signal.c", "function": "set_signals", "sloc": "8", "c_code": "void set_signals( void )\n {\n sigwinch_handler( 28 );\n if( isatty( 0 ) ) set_signal( 28, sigwinch_handler );\n set_signal( 1, sighup_handler );\n set_signal( 3, ((__sighandler_t) 1) );\n set_signal( 2, sigint_handler );\n }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "brotli-1.0.9#metablock_prep#BrotliOptimizeHistograms.c", "codebase": "brotli-1.0.9", "c_file": "metablock.c", "function": "BrotliOptimizeHistograms", "sloc": "19", "c_code": "void BrotliOptimizeHistograms(uint32_t num_distance_codes,\n MetaBlockSplit* mb) {\n uint8_t good_for_rle[704];\n size_t i;\n for (i = 0; i < mb->literal_histograms_size; ++i) {\n BrotliOptimizeHuffmanCountsForRle(256, mb->literal_histograms[i].data_,\n good_for_rle);\n }\n for (i = 0; i < mb->command_histograms_size; ++i) {\n BrotliOptimizeHuffmanCountsForRle(704,\n mb->command_histograms[i].data_,\n good_for_rle);\n }\n for (i = 0; i < mb->distance_histograms_size; ++i) {\n BrotliOptimizeHuffmanCountsForRle(num_distance_codes,\n mb->distance_histograms[i].data_,\n good_for_rle);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SPLIT_N_MAXIMUM_COMPOSITE_NUMBERS_prep#max.c", "codebase": "transcoder-set", "c_file": "SPLIT_N_MAXIMUM_COMPOSITE_NUMBERS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_multi_line_strings_prep#utest_run_allow_multi_line_strings_read_write_pretty_read.c", "codebase": "json.h", "c_file": "allow_multi_line_strings.c", "function": "utest_run_allow_multi_line_strings_read_write_pretty_read", "sloc": "7", "c_code": "void utest_run_allow_multi_line_strings_read_write_pretty_read(int *utest_result, struct allow_multi_line_strings *utest_fixture) {\n size_t size = 0;\n void *json = json_write_pretty(utest_fixture->value, \" \", \"\\n\", &size);\n free(utest_fixture->value);\n utest_fixture->value = json_parse(json, size - 1);\n free(json);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 2, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#buffer_prep#buf_init.c", "codebase": "mtools-4.0.43", "c_file": "buffer.c", "function": "buf_init", "sloc": "37", "c_code": "Stream_t *buf_init(Stream_t *Next, size_t size,\n size_t cylinderSize,\n size_t sectorSize)\n{\n Buffer_t *Buffer;\n ((void) sizeof ((size != 0) ? 1 : 0), __extension__ ({ if (size != 0) ; else __assert_fail (\"size != 0\", \"buffer.c\", 364, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((cylinderSize != 0) ? 1 : 0), __extension__ ({ if (cylinderSize != 0) ; else __assert_fail (\"cylinderSize != 0\", \"buffer.c\", 365, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((sectorSize != 0) ? 1 : 0), __extension__ ({ if (sectorSize != 0) ; else __assert_fail (\"sectorSize != 0\", \"buffer.c\", 366, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((Next != ((void *)0)) ? 1 : 0), __extension__ ({ if (Next != ((void *)0)) ; else __assert_fail (\"Next != NULL\", \"buffer.c\", 367, __extension__ __PRETTY_FUNCTION__); }));\n if(size % cylinderSize != 0) {\n fprintf(stderr, \"size not multiple of cylinder size\\n\");\n exit(1);\n }\n if(cylinderSize % sectorSize != 0) {\n fprintf(stderr, \"cylinder size not multiple of sector size\\n\");\n exit(1);\n }\n Buffer = ((Buffer_t*)(calloc(1,sizeof(Buffer_t))));\n if(!Buffer)\n return 0;\n init_head(&Buffer->head, &BufferClass, Next);\n Buffer->buf = malloc(size);\n if ( !Buffer->buf){\n (free((char *)Buffer));\n return 0;\n }\n Buffer->size = size;\n Buffer->dirty = 0;\n Buffer->cylinderSize = cylinderSize;\n Buffer->sectorSize = sectorSize;\n Buffer->ever_dirty = 0;\n Buffer->dirty_pos = 0;\n Buffer->dirty_end = 0;\n Buffer->current = 0L;\n Buffer->cur_size = 0;\n return &Buffer->head;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 3, "memory_operation": 0, "if_statement": 8, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libzahl-1.0#zset_prep#zset.c", "codebase": "libzahl-1.0", "c_file": "zset.c", "function": "zset", "sloc": "12", "c_code": "void\nzset(z_t a, z_t b)\n{\n if (zzero(b)) {\n ((a)->sign = (0));\n } else {\n do { if ((a)->alloced < (b->used)) libzahl_realloc(a, (b->used)); } while (0);\n a->sign = b->sign;\n a->used = b->used;\n memcpy(a->chars, b->chars, (b->used) * sizeof(zahl_char_t));\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsEthiopic.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsEthiopic", "sloc": "4", "c_code": "int\nxmlUCSIsEthiopic(int code) {\n return(((code >= 0x1200) && (code <= 0x137F)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#tcc_prep#tcc_tool_cross.c", "codebase": "tinycc", "c_file": "tcc.c", "function": "tcc_tool_cross", "sloc": "13", "c_code": "void tcc_tool_cross(TCCState *s, char **argv, int target)\n{\n char program[4096];\n char *a0 = argv[0];\n int prefix = tcc_basename(a0) - a0;\n snprintf(program, sizeof program,\n \"%.*s%s\"\n \"-tcc\"\n , prefix, a0, target == 64 ? \"x86_64\" : \"i386\");\n if (strcmp(a0, program))\n execvp(argv[0] = program, argv);\n tcc_error(\"could not run '%s'\", program);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "screen-4.9.0#display_prep#SetAttr.c", "codebase": "screen-4.9.0", "c_file": "display.c", "function": "SetAttr", "sloc": "47", "c_code": "void\nSetAttr(new)\nregister int new;\n{\n register int i, j, old, typ;\n if (!display || (old = display->d_rend.attr) == new)\n return;\n display->d_col16change = (old ^ new) & ((1<<6) | (1<<7));\n new ^= display->d_col16change;\n if (old == new)\n return;\n display->d_rend.attr = new;\n typ = display->d_atyp;\n if ((new & old) != old)\n {\n if ((typ & (1<<2)))\n AddCStr((display->d_tcs[53].str));\n if ((typ & (1<<1)))\n AddCStr((display->d_tcs[54].str));\n if ((typ & (1<<0)))\n {\n AddCStr((display->d_tcs[55].str));\n if (display->d_hascolor)\n ((&display->d_rend)->color = 0, (&display->d_rend)->attr &= ~((1<<7)|(1<<6)));\n if (!(display->d_tcs[97].flg))\n {\n display->d_rend.font = 0;\n display->d_realfont = 0;\n }\n }\n old = 0;\n typ = 0;\n }\n old ^= new;\n for (i = 0, j = 1; old && i < 6; i++, j <<= 1)\n {\n if ((old & j) == 0)\n continue;\n old ^= j;\n if (display->d_attrtab[i])\n {\n AddCStr(display->d_attrtab[i]);\n typ |= display->d_attrtyp[i];\n }\n }\n display->d_atyp = typ;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 10, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 1}}, {"id": "transcoder-set#TRIANGULAR_NUMBERS_1_prep#min.c", "codebase": "transcoder-set", "c_file": "TRIANGULAR_NUMBERS_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_CALCULATE_VOLUME_OCTAHEDRON_prep#min.c", "codebase": "transcoder-set", "c_file": "PROGRAM_CALCULATE_VOLUME_OCTAHEDRON.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlTextReaderGetParserColumnNumber.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlTextReaderGetParserColumnNumber", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlTextReaderGetParserColumnNumber(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlTextReaderPtr reader;\n PyObject *pyobj_reader;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlTextReaderGetParserColumnNumber\", &pyobj_reader))\n return(((void *)0));\n reader = (xmlTextReaderPtr) (((pyobj_reader) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlTextReader_Object *)(pyobj_reader))->obj));\n c_retval = xmlTextReaderGetParserColumnNumber(reader);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_vhf.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_vhf", "sloc": "62", "c_code": "int ti_vhf(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *in = inputs[0];\n const int period = (int)options[0];\n double *output = outputs[0];\n if (period < 1) return 1;\n if (size <= ti_vhf_start(options)) return 0;\n int trail = 1, maxi = -1, mini = -1;\n double max = in[0], min = in[0];\n double bar;\n double sum = 0;\n int i, j;\n double yc = in[0];\n double c;\n for (i = 1; i < period; ++i) {\n c = in[i];\n sum += fabs(c - yc);\n yc = c;\n }\n for (i = period; i < size; ++i, ++trail) {\n c = in[i];\n sum += fabs(c - yc);\n yc = c;\n if (i > period) {\n sum -= fabs(in[i-period] - in[i-period-1]);\n }\n bar = c;\n if (maxi < trail) {\n maxi = trail;\n max = in[maxi];\n j = trail;\n while(++j <= i) {\n bar = in[j];\n if (bar >= max) {\n max = bar;\n maxi = j;\n }\n }\n } else if (bar >= max) {\n maxi = i;\n max = bar;\n }\n bar = c;\n if (mini < trail) {\n mini = trail;\n min = in[mini];\n j = trail;\n while(++j <= i) {\n bar = in[j];\n if (bar <= min) {\n min = bar;\n mini = j;\n }\n }\n } else if (bar <= min) {\n mini = i;\n min = bar;\n }\n *output++ = fabs(max - min) / sum;\n }\n ((void) sizeof ((output - outputs[0] == size - ti_vhf_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_vhf_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_vhf_start(options)\", \"tiamalgamation.c\", 3996, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 10, "for_loop": 2, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "json.h#test_prep#json_extract_get_string_size.c", "codebase": "json.h", "c_file": "test.c", "function": "json_extract_get_string_size", "sloc": "7", "c_code": "struct json_extract_result_s\njson_extract_get_string_size(const struct json_string_s *const string) {\n struct json_extract_result_s result;\n result.dom_size = sizeof(struct json_string_s);\n result.data_size = string->string_size + 1;\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#HTMLparser_prep#htmlParseChunk.c", "codebase": "libxml2", "c_file": "HTMLparser.c", "function": "htmlParseChunk", "sloc": "30", "c_code": "int\nhtmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,\n int terminate) {\n if ((ctxt == ((void *)0)) || (ctxt->input == ((void *)0)))\n return(XML_ERR_ARGUMENT);\n if (((ctxt)->disableSAX > 1) != 0)\n return(ctxt->errNo);\n if ((size > 0) && (chunk != ((void *)0)) && (ctxt->input != ((void *)0)) &&\n (ctxt->input->buf != ((void *)0))) {\n size_t pos = ctxt->input->cur - ctxt->input->base;\n int res;\n res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk);\n xmlBufUpdateInput(ctxt->input->buf->buffer, ctxt->input, pos);\n if (res < 0) {\n htmlParseErr(ctxt, ctxt->input->buf->error,\n \"xmlParserInputBufferPush failed\", ((void *)0), ((void *)0));\n xmlHaltParser(ctxt);\n return (ctxt->errNo);\n }\n }\n htmlParseTryOrFinish(ctxt, terminate);\n if (terminate) {\n if (ctxt->instate != XML_PARSER_EOF) {\n if ((ctxt->sax) && (ctxt->sax->endDocument != ((void *)0)))\n ctxt->sax->endDocument(ctxt->userData);\n }\n ctxt->instate = XML_PARSER_EOF;\n }\n return((xmlParserErrors) ctxt->errNo);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "grep-3.11#strerror_r_prep#rpl_strerror_r.c", "codebase": "grep-3.11", "c_file": "strerror_r.c", "function": "rpl_strerror_r", "sloc": "36", "c_code": "int\nrpl_strerror_r (int errnum, char *buf, size_t buflen)\n{\n if (buflen <= 1)\n {\n if (buflen)\n *buf = '\\0';\n return 34;\n }\n *buf = '\\0';\n {\n char const *msg = ((void *)0);\n if (msg)\n return safe_copy (buf, buflen, msg);\n }\n {\n int ret;\n int saved_errno = (*__errno_location ());\n {\n ret = 0;\n ret = __xpg_strerror_r (errnum, buf, buflen);\n if (!*buf)\n {\n char stackbuf[80];\n char *errstring = strerror_r (errnum, stackbuf, sizeof stackbuf);\n ret = errstring ? safe_copy (buf, buflen, errstring) : (*__errno_location ());\n }\n }\n if (ret == 22 && !*buf)\n {\n snprintf (buf, buflen, \"Unknown error %d\", errnum);\n }\n (*__errno_location ()) = saved_errno;\n return ret;\n }\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#ARRAY_ELEMENT_MOVED_K_USING_SINGLE_MOVES_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "ARRAY_ELEMENT_MOVED_K_USING_SINGLE_MOVES.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int a [ ], int n, int k ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#sbstrans1_prep#freqtrans.c", "codebase": "dap-3.10", "c_file": "sbstrans1.c", "function": "freqtrans", "sloc": "240", "c_code": "void freqtrans(char *step, FILE *dapfile)\n{\n int s;\n char setname[127 + 1];\n char outname[127 + 1];\n int tablesstart;\n int optionsstart;\n int nstats;\n char stat[127 + 1];\n int nofreq;\n int nopercent;\n int norow;\n int nocol;\n int noprint;\n int nvars;\n int newvar;\n int varn;\n noprint = 0;\n if (!getoption(step, \"data\", setname, 1))\n strcpy(setname, sbstmp);\n fprintf(dapfile, \"sort(\\\"%s\\\", \\\"\", setname);\n if ((s = findstatement(step, \"tables\")))\n {\n tablesstart = s;\n copylist(step, \"by\", dapfile);\n putc(' ', dapfile);\n while (step[s] && step[s] != '/' && step[s] != ';')\n {\n if (step[s] == '*')\n {\n putc(' ', dapfile);\n s++;\n }\n else if (step[s] != '\\n')\n putc(step[s], dapfile);\n s++;\n }\n }\n else\n {\n fprintf(stderr, \"sbstrans: before %d: missing tables statement in proc freq.\\n\",\n sbslineno);\n exit(1);\n }\n fputs(\"\\\", \\\"\\\");\\n\", dapfile);\n if (step[s] == '/')\n optionsstart = s + 2;\n else\n optionsstart = 0;\n fprintf(dapfile, \"freq(\\\"%s.srt\\\", \\\"\", setname);\n for (s = tablesstart, newvar = 1, nvars = 0;\n step[s] && step[s] != '/' && step[s] != ';'; s++)\n {\n if (step[s] == '*')\n {\n putc(' ', dapfile);\n s ++;\n newvar = 1;\n }\n else if (step[s] != '\\n')\n {\n if (newvar)\n {\n newvar = 0;\n nvars++;\n }\n putc(step[s], dapfile);\n }\n }\n if (!nvars)\n {\n fprintf(stderr, \"sbstrans: before %d: no variables in tables statement in proc freq.\\n\",\n sbslineno);\n exit(1);\n }\n if ((s = findstatement(step, \"weight\")))\n {\n putc('*', dapfile);\n while (step[s] && step[s] != '\\n')\n {\n putc(step[s], dapfile);\n s++;\n }\n s++;\n if (step[s] != ';')\n {\n fprintf(stderr, \"sbstrans: before %d: only one weight variable allowed in proc freq.\\n\",\n sbslineno);\n exit(1);\n }\n }\n fputs(\"\\\", \\\"\", dapfile);\n outname[0] = '\\0';\n nofreq = 0;\n nopercent = 0;\n norow = 0;\n nocol = 0;\n nstats = 4;\n for (s = optionsstart; step[s] && step[s] != ';'; s++)\n {\n if (!linecmp(step + s, \"noprint\"))\n {\n noprint = 1;\n s += 7;\n }\n else if (!linecmp(step + s, \"out\"))\n {\n s += 4;\n if (linecmp(step + s, \"=\"))\n {\n fprintf(stderr, \"sbstrans: before %d: missing = after out option in tables statement in proc freq.\\n\",\n sbslineno);\n exit(1);\n }\n s += 2;\n s += linecpy(outname, step + s);\n }\n else\n {\n s += linecpy(stat, step + s);\n upper(stat);\n if (!linecmp(stat, \"NOFREQ\"))\n {\n nofreq = 1;\n --nstats;\n }\n else if (!linecmp(stat, \"NOPERCENT\"))\n {\n nopercent = 1;\n --nstats;\n }\n else if (!linecmp(stat, \"NOROW\"))\n {\n norow = 1;\n --nstats;\n }\n else if (!linecmp(stat, \"NOCOL\"))\n {\n nocol = 1;\n --nstats;\n }\n else\n {\n if (!linecmp(stat, \"EXPECTED\"))\n nstats++;\n else if (!linecmp(stat, \"CHISQ\"))\n fputs(\" FISHER \", dapfile);\n else if (!linecmp(stat, \"MEASURES\"))\n {\n fputs(\" ODDSRAT \", dapfile);\n strcpy(stat, \"ORDINAL\");\n }\n fputs(stat, dapfile);\n }\n putc(' ', dapfile);\n }\n }\n if (step[s] != ';')\n {\n fprintf(stderr, \"sbstrans: before %d: missing ; at end of tables statement in proc freq.\\n\",\n sbslineno);\n exit(1);\n }\n if (!noprint)\n {\n if (!nofreq)\n fputs(\" COUNT\", dapfile);\n if (!nopercent)\n fputs(\" PERCENT\", dapfile);\n if (!norow)\n fputs(\" ROWPERC\", dapfile);\n if (!nocol)\n fputs(\" COLPERC\", dapfile);\n }\n fputs(\"\\\", \\\"\", dapfile);\n copylist(step, \"by\", dapfile);\n fputs(\"\\\");\\n\", dapfile);\n if (!noprint && nstats > 0)\n {\n if (nvars == 1)\n fprintf(dapfile, \"print(\\\"%s.srt.frq\\\", \\\"\\\");\\n\", setname);\n else\n {\n fprintf(dapfile, \"sort(\\\"%s.srt.frq\\\", \\\"\", setname);\n copylist(step, \"by\", dapfile);\n for (s = tablesstart, varn = 0; varn < nvars - 1; varn++)\n {\n while (step[s] && step[s] != '\\n')\n {\n putc(step[s], dapfile);\n s++;\n }\n putc(' ', dapfile);\n s += 3;\n }\n fputs(\" _type_ \", dapfile);\n while (step[s] && step[s] != '\\n')\n {\n putc(step[s], dapfile);\n s++;\n }\n fputs(\"\\\", \\\"\\\");\\n\", dapfile);\n fprintf(dapfile, \"table(\\\"%s.srt.frq.srt\\\", \\\"\", setname);\n for (s = tablesstart, varn = 0; varn < nvars - 2; varn++)\n {\n while (step[s] && step[s] != '\\n')\n s++;\n s += 3;\n }\n while (step[s] && step[s] != '\\n')\n {\n putc(step[s], dapfile);\n s++;\n }\n if (nstats > 1)\n fputs(\" _type_\", dapfile);\n fputs(\"\\\", \\\"\", dapfile);\n for (s += 3; step[s] && step[s] != '\\n'; s++)\n putc(step[s], dapfile);\n fputs(\" _cell_\\\", \\\"s12\\\", \\\"\", dapfile);\n copylist(step, \"by\", dapfile);\n for (s = tablesstart, varn = 0; varn < nvars - 2; varn++)\n {\n while (step[s] && step[s] != '\\n')\n {\n putc(step[s], dapfile);\n s++;\n }\n putc(' ', dapfile);\n s += 3;\n }\n fputs(\"\\\");\\n\", dapfile);\n }\n }\n if (outname[0])\n {\n fprintf(dapfile, \"dataset(\\\"%s.srt.frq\\\", \\\"%s\\\", \\\"RENAME\\\");\\n\", setname, outname);\n strcpy(sbstmp, outname);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 31, "for_loop": 6, "while_loop": 7, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_AREA_SQUARE_prep#len.c", "codebase": "transcoder-set", "c_file": "PROGRAM_AREA_SQUARE.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_equals_in_object_prep#json_write_pretty_get_object_size.c", "codebase": "json.h", "c_file": "allow_equals_in_object.c", "function": "json_write_pretty_get_object_size", "sloc": "26", "c_code": "int json_write_pretty_get_object_size(const struct json_object_s *object,\n size_t depth, size_t indent_size,\n size_t newline_size, size_t *size) {\n struct json_object_element_s *element;\n *size += 1;\n if (0 < object->length) {\n *size += newline_size;\n *size += object->length - 1;\n for (element = object->start; 0 != element;\n element = element->next) {\n *size += (depth + 1) * indent_size;\n *size += newline_size;\n if (json_write_get_string_size(element->name, size)) {\n return 1;\n }\n *size += 3;\n if (json_write_pretty_get_value_size(element->value, depth + 1,\n indent_size, newline_size, size)) {\n return 1;\n }\n }\n *size += depth * indent_size;\n }\n *size += 1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_header_prep#osip_header_set_value.c", "codebase": "libosip2-5.3.1", "c_file": "osip_header.c", "function": "osip_header_set_value", "sloc": "3", "c_code": "void osip_header_set_value(osip_header_t *header, char *value) {\n header->hvalue = value;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#profile_prep#pp_node.c", "codebase": "gawk-5.2.2", "c_file": "profile.c", "function": "pp_node", "sloc": "7", "c_code": "char *\npp_node(NODE *n)\n{\n if ((n->flags & NUMBER) != 0)\n return pp_number(n);\n return pp_string(n->sub.val.sp, n->sub.val.slen, '\"');\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_md5c_prep#osip_MD5Update.c", "codebase": "libosip2-5.3.1", "c_file": "osip_md5c.c", "function": "osip_MD5Update", "sloc": "20", "c_code": "void osip_MD5Update(osip_MD5_CTX *context,\n unsigned char *input,\n unsigned int inputLen\n) {\n unsigned int i, index, partLen;\n index = (unsigned int) ((context->count[0] >> 3) & 0x3F);\n if ((context->count[0] += ((UINT4) inputLen << 3)) < ((UINT4) inputLen << 3))\n context->count[1]++;\n context->count[1] += ((UINT4) inputLen >> 29);\n partLen = 64 - index;\n if (inputLen >= partLen) {\n osip_MD5_memcpy((POINTER) &context->buffer[index], (POINTER) input, partLen);\n osip_MD5Transform(context->state, context->buffer);\n for (i = partLen; i + 63 < inputLen; i += 64)\n osip_MD5Transform(context->state, &input[i]);\n index = 0;\n } else\n i = 0;\n osip_MD5_memcpy((POINTER) &context->buffer[index], (POINTER) &input[i], inputLen - i);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "bc-1.07.1#number_prep#bc_sub.c", "codebase": "bc-1.07.1", "c_file": "number.c", "function": "bc_sub", "sloc": "34", "c_code": "void\nbc_sub (bc_num n1, bc_num n2, bc_num *result, int scale_min)\n{\n bc_num diff = ((void *)0);\n int cmp_res;\n int res_scale;\n if (n1->n_sign != n2->n_sign)\n {\n diff = _bc_do_add (n1, n2, scale_min);\n diff->n_sign = n1->n_sign;\n }\n else\n {\n cmp_res = _bc_do_compare (n1, n2, 0, 0);\n switch (cmp_res)\n {\n case -1:\n diff = _bc_do_sub (n2, n1, scale_min);\n diff->n_sign = (n2->n_sign == PLUS ? MINUS : PLUS);\n break;\n case 0:\n res_scale = ((scale_min)>(((n1->n_scale)>(n2->n_scale)?(n1->n_scale):(n2->n_scale)))?(scale_min):(((n1->n_scale)>(n2->n_scale)?(n1->n_scale):(n2->n_scale))));\n diff = bc_new_num (1, res_scale);\n memset (diff->n_value, 0, res_scale+1);\n break;\n case 1:\n diff = _bc_do_sub (n1, n2, scale_min);\n diff->n_sign = n1->n_sign;\n break;\n }\n }\n bc_free_num (result);\n *result = diff;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 3}}, {"id": "libxml2#globals_prep#__xmlDoValidityCheckingDefaultValue.c", "codebase": "libxml2", "c_file": "globals.c", "function": "__xmlDoValidityCheckingDefaultValue", "sloc": "1", "c_code": "int *__xmlDoValidityCheckingDefaultValue(void) { return (&xmlGetThreadLocalStorage(0)->gs_xmlDoValidityCheckingDefaultValue); }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#HOW_TO_BEGIN_WITH_COMPETITIVE_PROGRAMMING_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "HOW_TO_BEGIN_WITH_COMPETITIVE_PROGRAMMING.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#session_prep#session_group_synchronize_to.c", "codebase": "tmux", "c_file": "session.c", "function": "session_group_synchronize_to", "sloc": "15", "c_code": "void\nsession_group_synchronize_to(struct session *s)\n{\n struct session_group *sg;\n struct session *target;\n if ((sg = session_group_contains(s)) == ((void *)0))\n return;\n target = ((void *)0);\n for((target) = ((&sg->sessions)->tqh_first); (target) != ((void *)0); (target) = ((target)->gentry.tqe_next)) {\n if (target != s)\n break;\n }\n if (target != ((void *)0))\n session_group_synchronize1(target, s);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_prep#sort.c", "codebase": "transcoder-set", "c_file": "CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlTextReaderClose.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlTextReaderClose", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlTextReaderClose(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlTextReaderPtr reader;\n PyObject *pyobj_reader;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlTextReaderClose\", &pyobj_reader))\n return(((void *)0));\n reader = (xmlTextReaderPtr) (((pyobj_reader) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlTextReader_Object *)(pyobj_reader))->obj));\n c_retval = xmlTextReaderClose(reader);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#candles_prep#tc_morning_star.c", "codebase": "tulipindicators-0.9.1", "c_file": "candles.c", "function": "tc_morning_star", "sloc": "5", "c_code": "int tc_morning_star(int size, TC_REAL const *const *inputs, tc_config const *options, tc_result *output) {\n const TC_REAL *open = inputs[0]; const TC_REAL *high = inputs[1]; const TC_REAL *low = inputs[2]; const TC_REAL *close = inputs[3]; const int period = options->period; const TC_REAL div = 1.0 / period; TC_REAL avg_body_sum = 0; TC_REAL avg_total_sum = 0; if (period < 1) return 1; if (size < period) return 0; int i; for (i = 0; i < period; ++i) { avg_body_sum += (fabs(open[(i)] - close[(i)])); avg_total_sum += (high[(i)] - low[(i)]); }\n while(i < size) { const TC_REAL top = (open[(i)] > close[(i)] ? open[(i)] : close[(i)]); const TC_REAL bottom = (open[(i)] < close[(i)] ? open[(i)] : close[(i)]); const TC_REAL body = (fabs(open[(i)] - close[(i)])); const TC_REAL total = (high[(i)] - low[(i)]); const TC_REAL upper = (high[(i)] - top); const TC_REAL lower = (bottom - low[(i)]); const TC_REAL avg_body = avg_body_sum * div; const TC_REAL avg_total = avg_total_sum * div; (void)top;(void)bottom;(void)body;(void)total; (void)upper;(void)lower;(void)avg_body;(void)avg_total; if (i>=2 && (open[i-2]>close[i-2]) && ((fabs(open[(i-2)] - close[(i-2)])) > (options->body_long * avg_body)) && ((open[(i-1)] > close[(i-1)] ? open[(i-1)] : close[(i-1)]) <= (open[((i-1)-1)] < close[((i-1)-1)] ? open[((i-1)-1)] : close[((i-1)-1)])) && ((fabs(open[(i-1)] - close[(i-1)])) < (options->body_short * avg_body)) && (open[i]= (open[((i)-1)] > close[((i)-1)] ? open[((i)-1)] : close[((i)-1)])) && (close[i] >= close[i-2])) { do { const tc_hit hit = {i, (1L<<19)}; const int r = tc_result_add(output, hit); if (r != 0) return r; } while (0); } avg_body_sum += body; avg_body_sum -= (fabs(open[(i-period)] - close[(i-period)])); avg_total_sum += total; avg_total_sum -= (high[(i-period)] - low[(i-period)]); ++i; };\n return 0;\n }\n", "c_constructs": {"pointer_type": 4, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP.c", "function": "f_gold", "sloc": "5", "c_code": "_Bool f_gold ( int arr [ ], int i, int n ) {\n if ( i > ( n - 2 ) / 2 ) return 1;\n if ( arr [ i ] >= arr [ 2 * i + 1 ] && arr [ i ] >= arr [ 2 * i + 2 ] && f_gold ( arr, 2 * i + 1, n ) && f_gold ( arr, 2 * i + 2, n ) ) return 1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlIsPubidChar.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlIsPubidChar", "sloc": "11", "c_code": "PyObject *\nlibxml_xmlIsPubidChar(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n unsigned int ch;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlIsPubidChar\", &ch))\n return(((void *)0));\n c_retval = xmlIsPubidChar(ch);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE_prep#main.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE.c", "function": "main", "sloc": "15", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {40,38,47,52,21,50,8,56,93,21};\n int param1[] = {74,35,71,29,9,33,82,80,5,90};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#xmlIO_prep#xmlNewInputBufferString.c", "codebase": "libxml2", "c_file": "xmlIO.c", "function": "xmlNewInputBufferString", "sloc": "16", "c_code": "xmlParserInputBufferPtr\nxmlNewInputBufferString(const char *str, int flags) {\n xmlParserInputBufferPtr ret;\n ret = xmlMalloc(sizeof(*ret));\n if (ret == ((void *)0))\n return(((void *)0));\n memset(ret, 0, sizeof(xmlParserInputBuffer));\n ret->compressed = -1;\n ret->buffer = xmlBufCreateMem((const xmlChar *) str, strlen(str),\n (flags & (1 << 1) ? 1 : 0));\n if (ret->buffer == ((void *)0)) {\n xmlFree(ret);\n return(((void *)0));\n }\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 1, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#HARDY_RAMANUJAN_THEOREM_prep#max.c", "codebase": "transcoder-set", "c_file": "HARDY_RAMANUJAN_THEOREM.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#modiSBML_prep#CountLines.c", "codebase": "mcsim-6.2.0", "c_file": "modiSBML.c", "function": "CountLines", "sloc": "13", "c_code": "long CountLines (PFILE pFileIn)\n{\n int nLines = 0;\n char szDummy[2];\n fscanf (pFileIn, \"%*[^\\n]\"); getc(pFileIn);\n while ( !(feof(pFileIn))) {\n if (fscanf (pFileIn, \"%1s\", szDummy) > 0)\n nLines++;\n fscanf (pFileIn, \"%*[^\\n]\"); getc(pFileIn);\n }\n rewind (pFileIn);\n return (nLines);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_prep#sort.c", "codebase": "transcoder-set", "c_file": "SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#map_prep#owner_map_read.c", "codebase": "tar-1.34", "c_file": "map.c", "function": "owner_map_read", "sloc": "5", "c_code": "void\nowner_map_read (char const *file)\n{\n map_read (&owner_map, file, name_to_uid, \"UID\", ((uid_t) (! (! ((uid_t) 0 < (uid_t) -1)) ? (uid_t) -1 : ((((uid_t) 1 << ((sizeof (uid_t) * 8) - 2)) - 1) * 2 + 1))));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_ARRAY_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_ARRAY.c", "function": "f_gold", "sloc": "15", "c_code": "int f_gold ( int arr [ ], int n ) {\n int ans = (-0x7fffffff - 1);\n for ( int i = 0;\n i < n;\n i ++ ) {\n int curr_xor = 0;\n for ( int j = i;\n j < n;\n j ++ ) {\n curr_xor = curr_xor ^ arr [ j ];\n ans = max ( ans, curr_xor );\n }\n }\n return ans;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "ed-1.19#buffer_prep#dec_addr.c", "codebase": "ed-1.19", "c_file": "buffer.c", "function": "dec_addr", "sloc": "2", "c_code": "int dec_addr( int addr )\n { if( --addr < 0 ) addr = last_addr_; return addr; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CONVERT_STRICTLY_INCREASING_ARRAY_MINIMUM_CHANGES_prep#main.c", "codebase": "transcoder-set", "c_file": "CONVERT_STRICTLY_INCREASING_ARRAY_MINIMUM_CHANGES.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {1,4,12,14,15,18,20,24,25,25,27,33,34,42,46,48,49,50,50,52,55,56,57,58,64,65,66,69,72,75,78,80,84,90,92,95,99};\nint param0_1[] = {-56,6,-74,-30,34,40,-76,-10,-12,-86,-76,36,-72,82,38,68,28,84,98,-84,6,16,-46,8,2,-18,-50,4,-96,88,-84,-38,-82,-54};\nint param0_2[] = {0,0,0,0,0,0,1,1,1,1,1,1};\nint param0_3[] = {68,79,87,44,3,99,80,6,46,67,72,40,11,18,73,48,18,72,10,38,3,39,26,76,47,15,85,69};\nint param0_4[] = {-96,-94,-94,-74,-68,-60,-58,-56,-56,-52,-52,-50,-44,-40,-26,-24,-10,-8,-6,-2,2,2,12,14,20,24,26,30,38,40,52,52,62,62,68,70,74,76,80,82,90,92};\nint param0_5[] = {1,1,1,0,1};\nint param0_6[] = {1,5,11,20,24,28,29,31,54,58,63,65,66,71,77,80,83,92,93,93};\nint param0_7[] = {-50,-46,-44,-90,2,-38,88,-26,60};\nint param0_8[] = {1,1};\nint param0_9[] = {2,1,19,26,65,47,3,65,9,12,84,59,74,59,30,83,73,67,13,5,64,83,81,92,80,14,58,84,92};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {21,22,6,15,31,3,12,7,1,16};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1.c", "function": "f_gold", "sloc": "16", "c_code": "int f_gold ( int m, int n ) {\n int T [ m + 1 ] [ n + 1 ];\n for ( int i = 0;\n i < m + 1;\n i ++ ) {\n for ( int j = 0;\n j < n + 1;\n j ++ ) {\n if ( i == 0 || j == 0 ) T [ i ] [ j ] = 0;\n else if ( i < j ) T [ i ] [ j ] = 0;\n else if ( j == 1 ) T [ i ] [ j ] = i;\n else T [ i ] [ j ] = T [ i - 1 ] [ j ] + T [ i / 2 ] [ j - 1 ];\n }\n }\n return T [ m ] [ n ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "buffer-0.4.0#buffer_prep#buffer_free.c", "codebase": "buffer-0.4.0", "c_file": "buffer.c", "function": "buffer_free", "sloc": "5", "c_code": "void\nbuffer_free(buffer_t *self) {\n free(self->alloc);\n free(self);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 2, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "make-4.4.1#main_prep#should_print_dir.c", "codebase": "make-4.4.1", "c_file": "main.c", "function": "should_print_dir", "sloc": "7", "c_code": "int\nshould_print_dir (void)\n{\n if (print_directory_flag >= 0)\n return print_directory_flag;\n return !silent_flag && (makelevel > 0 || directories != ((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsByzantineMusicalSymbols.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsByzantineMusicalSymbols", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsByzantineMusicalSymbols(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsByzantineMusicalSymbols\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsByzantineMusicalSymbols\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsByzantineMusicalSymbols(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#STEINS_ALGORITHM_FOR_FINDING_GCD_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "STEINS_ALGORITHM_FOR_FINDING_GCD_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "patch-2.7.6#hash_prep#hash_string.c", "codebase": "patch-2.7.6", "c_file": "hash.c", "function": "hash_string", "sloc": "9", "c_code": "size_t\nhash_string (const char *string, size_t n_buckets)\n{\n size_t value = 0;\n unsigned char ch;\n for (; (ch = *string); string++)\n value = (value * 31 + ch) % n_buckets;\n return value;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_NUMBER_OF_OCCURRENCES_OR_FREQUENCY_IN_A_SORTED_ARRAY_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBER_OF_OCCURRENCES_OR_FREQUENCY_IN_A_SORTED_ARRAY.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int n, int x ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_single_quoted_strings_prep#json_skip_c_style_comments.c", "codebase": "json.h", "c_file": "allow_single_quoted_strings.c", "function": "json_skip_c_style_comments", "sloc": "40", "c_code": "int json_skip_c_style_comments(struct json_parse_state_s *state) {\n if ((state->offset + 2) > state->size) {\n return 0;\n }\n if ('/' == state->src[state->offset]) {\n if ('/' == state->src[state->offset + 1]) {\n state->offset++;\n state->offset++;\n while (state->offset < state->size) {\n switch (state->src[state->offset]) {\n default:\n state->offset++;\n break;\n case '\\n':\n state->offset++;\n state->line_no++;\n state->line_offset = state->offset;\n return 1;\n }\n }\n return 1;\n } else if ('*' == state->src[state->offset + 1]) {\n state->offset++;\n state->offset++;\n while (state->offset + 1 < state->size) {\n if (('*' == state->src[state->offset]) &&\n ('/' == state->src[state->offset + 1])) {\n state->offset += 2;\n return 1;\n } else if ('\\n' == state->src[state->offset]) {\n state->line_no++;\n state->line_offset = state->offset;\n }\n state->offset++;\n }\n return 1;\n }\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 2, "switch_statement": 1, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 1}}, {"id": "transcoder-set#NUMBER_TRIANGLES_N_MOVES_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "NUMBER_TRIANGLES_N_MOVES_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlEncodeEntitiesReentrant.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlEncodeEntitiesReentrant", "sloc": "14", "c_code": "PyObject *\nlibxml_xmlEncodeEntitiesReentrant(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlChar * c_retval;\n xmlDocPtr doc;\n PyObject *pyobj_doc;\n xmlChar * input;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Oz:xmlEncodeEntitiesReentrant\", &pyobj_doc, &input))\n return(((void *)0));\n doc = (xmlDocPtr) (((pyobj_doc) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_doc))->obj));\n c_retval = xmlEncodeEntitiesReentrant(doc, input);\n py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tar-1.34#system_prep#sys_compare_uid.c", "codebase": "tar-1.34", "c_file": "system.c", "function": "sys_compare_uid", "sloc": "5", "c_code": "_Bool\nsys_compare_uid (struct stat *a, struct stat *b)\n{\n return a->st_uid == b->st_uid;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#xmalloc_prep#xmalloc.c", "codebase": "tar-1.34", "c_file": "xmalloc.c", "function": "xmalloc", "sloc": "8", "c_code": "void *\nxmalloc (size_t n)\n{\n void *p = malloc (n);\n if (!p && (HAVE_GNU_MALLOC || n))\n xalloc_die ();\n return p;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#catalog_prep#xmlCatalogCleanup.c", "codebase": "libxml2", "c_file": "catalog.c", "function": "xmlCatalogCleanup", "sloc": "16", "c_code": "void\nxmlCatalogCleanup(void) {\n xmlRMutexLock(&xmlCatalogMutex);\n if (xmlDebugCatalogs)\n xmlCatalogPrintDebug(\n \"Catalogs cleanup\\n\");\n if (xmlCatalogXMLFiles != ((void *)0))\n xmlHashFree(xmlCatalogXMLFiles, xmlFreeCatalogHashEntryList);\n xmlCatalogXMLFiles = ((void *)0);\n if (xmlDefaultCatalog != ((void *)0))\n xmlFreeCatalog(xmlDefaultCatalog);\n xmlDefaultCatalog = ((void *)0);\n xmlDebugCatalogs = 0;\n xmlCatalogInitialized = 0;\n xmlRMutexUnlock(&xmlCatalogMutex);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathConvertNumber.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathConvertNumber", "sloc": "11", "c_code": "xmlXPathObjectPtr\nxmlXPathConvertNumber(xmlXPathObjectPtr val) {\n xmlXPathObjectPtr ret;\n if (val == ((void *)0))\n return(xmlXPathNewFloat(0.0));\n if (val->type == XPATH_NUMBER)\n return(val);\n ret = xmlXPathNewFloat(xmlXPathCastToNumber(val));\n xmlXPathFreeObject(val);\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_AREA_SQUARE_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "PROGRAM_AREA_SQUARE.c", "function": "f_gold", "sloc": "4", "c_code": "int f_gold ( int side ) {\n int area = side * side;\n return area;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsMathematicalAlphanumericSymbols.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsMathematicalAlphanumericSymbols", "sloc": "4", "c_code": "int\nxmlUCSIsMathematicalAlphanumericSymbols(int code) {\n return(((code >= 0x1D400) && (code <= 0x1D7FF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bc-1.07.1#main_prep#main.c", "codebase": "bc-1.07.1", "c_file": "main.c", "function": "main", "sloc": "60", "c_code": "int\nmain (int argc, char **argv)\n{\n char *env_value;\n char *env_argv[30];\n int env_argc;\n if (isatty(0) && isatty(1))\n interactive = 1;\n (void) setvbuf(stdout, ((void *)0), 1, 0);\n env_value = getenv (\"BC_ENV_ARGS\");\n if (env_value != ((void *)0))\n {\n env_argc = 1;\n env_argv[0] = strdup(\"BC_ENV_ARGS\");\n while (*env_value != 0)\n {\n if (*env_value != ' ')\n {\n env_argv[env_argc++] = env_value;\n while (*env_value != ' ' && *env_value != 0)\n env_value++;\n if (*env_value != 0)\n {\n *env_value = 0;\n env_value++;\n }\n }\n else\n env_value++;\n }\n parse_args (env_argc, env_argv);\n }\n parse_args (argc, argv);\n if (getenv (\"POSIXLY_CORRECT\") != ((void *)0))\n std_only = 1;\n env_value = getenv (\"BC_LINE_LENGTH\");\n if (env_value != ((void *)0))\n {\n line_size = atoi (env_value);\n if (line_size < 3 && line_size != 0)\n line_size = 70;\n }\n else\n line_size = 70;\n init_storage();\n init_load();\n if (interactive)\n signal (2, use_quit);\n init_tree();\n init_gen ();\n is_std_in = 0;\n first_file = 1;\n if (!open_new_file ())\n bc_exit (1);\n yyparse ();\n if (compile_only)\n printf (\"\\n\");\n bc_exit (0);\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 10, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#tccelf_prep#set_elf_sym.c", "codebase": "tinycc", "c_file": "tccelf.c", "function": "set_elf_sym", "sloc": "65", "c_code": "int set_elf_sym(Section *s, Elf64_Addr value, unsigned long size,\n int info, int other, int shndx, const char *name)\n{\n Elf64_Sym *esym;\n int sym_bind, sym_index, sym_type, esym_bind;\n unsigned char sym_vis, esym_vis, new_vis;\n sym_bind = (((unsigned char) (info)) >> 4);\n sym_type = ((info) & 0xf);\n sym_vis = ((other) & 0x03);\n if (sym_bind != 0) {\n sym_index = find_elf_sym(s, name);\n if (!sym_index)\n goto do_def;\n esym = &((Elf64_Sym *)s->data)[sym_index];\n if (esym->st_value == value && esym->st_size == size && esym->st_info == info\n && esym->st_other == other && esym->st_shndx == shndx)\n return sym_index;\n if (esym->st_shndx != 0) {\n esym_bind = (((unsigned char) (esym->st_info)) >> 4);\n esym_vis = ((esym->st_other) & 0x03);\n if (esym_vis == 0) {\n new_vis = sym_vis;\n } else if (sym_vis == 0) {\n new_vis = esym_vis;\n } else {\n new_vis = (esym_vis < sym_vis) ? esym_vis : sym_vis;\n }\n esym->st_other = (esym->st_other & ~((-1) & 0x03))\n | new_vis;\n other = esym->st_other;\n if (shndx == 0) {\n } else if (sym_bind == 1 && esym_bind == 2) {\n goto do_patch;\n } else if (sym_bind == 2 && esym_bind == 1) {\n } else if (sym_bind == 2 && esym_bind == 2) {\n } else if (sym_vis == 2 || sym_vis == 1) {\n } else if ((esym->st_shndx == 0xfff2\n || esym->st_shndx == bss_section->sh_num)\n && (shndx < 0xff00\n && shndx != bss_section->sh_num)) {\n goto do_patch;\n } else if (shndx == 0xfff2 || shndx == bss_section->sh_num) {\n } else if (s->sh_flags & 0x40000000) {\n } else if (esym->st_other & 0x04) {\n goto do_patch;\n } else {\n tcc_error_noabort(\"'%s' defined twice\", name);\n }\n } else {\n do_patch:\n esym->st_info = ((((sym_bind)) << 4) + (((sym_type)) & 0xf));\n esym->st_shndx = shndx;\n new_undef_sym = 1;\n esym->st_value = value;\n esym->st_size = size;\n esym->st_other = other;\n }\n } else {\n do_def:\n sym_index = put_elf_sym(s, value, size,\n ((((sym_bind)) << 4) + (((sym_type)) & 0xf)), other,\n shndx, name);\n }\n return sym_index;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 15, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 4, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS_1_prep#main.c", "codebase": "transcoder-set", "c_file": "SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS_1.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {57,96,14,64,24,74,85,27,78,1};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#globals_prep#__xmlStructuredError.c", "codebase": "libxml2", "c_file": "globals.c", "function": "__xmlStructuredError", "sloc": "1", "c_code": "xmlStructuredErrorFunc *__xmlStructuredError(void) { return (&xmlGetThreadLocalStorage(0)->gs_xmlStructuredError); }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#encoding_prep#RecodeBuf.c", "codebase": "screen-4.9.0", "c_file": "encoding.c", "function": "RecodeBuf", "sloc": "22", "c_code": "int\nRecodeBuf(fbuf, flen, fenc, tenc, tbuf)\nunsigned char *fbuf;\nint flen;\nint fenc, tenc;\nunsigned char *tbuf;\n{\n int c, i, j;\n int decstate = 0, font = 0;\n for (i = j = 0; i < flen; i++)\n {\n c = fbuf[i];\n c = DecodeChar(c, fenc, &decstate);\n if (c == -2)\n i--;\n if (c < 0)\n continue;\n j += EncodeChar(tbuf ? (char *)tbuf + j : 0, c, tenc, &font);\n }\n j += EncodeChar(tbuf ? (char *)tbuf + j : 0, -1, tenc, &font);\n return j;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "tmux#layout_prep#layout_assign_pane.c", "codebase": "tmux", "c_file": "layout.c", "function": "layout_assign_pane", "sloc": "6", "c_code": "void\nlayout_assign_pane(struct layout_cell *lc, struct window_pane *wp)\n{\n layout_make_leaf(lc, wp);\n layout_fix_panes(wp->window, wp->window->sx, wp->window->sy);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#BELL_NUMBERS_NUMBER_OF_WAYS_TO_PARTITION_A_SET_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "BELL_NUMBERS_NUMBER_OF_WAYS_TO_PARTITION_A_SET.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "robotfindskitten#robotfindskitten_prep#finish.c", "codebase": "robotfindskitten", "c_file": "robotfindskitten.c", "function": "finish", "sloc": "6", "c_code": "void finish(int sig)\n{\n endwin();\n printf(\"%c%c%c\",27,'(','B');\n exit(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlParseURIReference.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlParseURIReference", "sloc": "14", "c_code": "PyObject *\nlibxml_xmlParseURIReference(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlURIPtr uri;\n PyObject *pyobj_uri;\n char * str;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Oz:xmlParseURIReference\", &pyobj_uri, &str))\n return(((void *)0));\n uri = (xmlURIPtr) (((pyobj_uri) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyURI_Object *)(pyobj_uri))->obj));\n c_retval = xmlParseURIReference(uri, str);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#eax-aes128_prep#nettle_eax_aes128_update.c", "codebase": "nettle-3.9.1", "c_file": "eax-aes128.c", "function": "nettle_eax_aes128_update", "sloc": "5", "c_code": "void\nnettle_eax_aes128_update(struct eax_aes128_ctx *ctx, size_t length, const uint8_t *data)\n{\n (0 ? (nettle_aes128_encrypt) (&(ctx)->cipher, ~(size_t) 0, (uint8_t *) 0, (const uint8_t *) 0) : nettle_eax_update (&(ctx)->eax, &(ctx)->key, &(ctx)->cipher, (nettle_cipher_func *) (nettle_aes128_encrypt), (length), (data)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#screen-write_prep#screen_write_cursordown.c", "codebase": "tmux", "c_file": "screen-write.c", "function": "screen_write_cursordown", "sloc": "19", "c_code": "void\nscreen_write_cursordown(struct screen_write_ctx *ctx, u_int ny)\n{\n struct screen *s = ctx->s;\n if (ny == 0)\n ny = 1;\n if (s->cy > s->rlower) {\n if (ny > ((s)->grid->sy) - 1 - s->cy)\n ny = ((s)->grid->sy) - 1 - s->cy;\n } else {\n if (ny > s->rlower - s->cy)\n ny = s->rlower - s->cy;\n }\n if (s->cx == ((s)->grid->sx))\n s->cx--;\n if (ny == 0)\n return;\n s->cy += ny;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#umac64_prep#nettle_umac64_set_nonce.c", "codebase": "nettle-3.9.1", "c_file": "umac64.c", "function": "nettle_umac64_set_nonce", "sloc": "12", "c_code": "void\nnettle_umac64_set_nonce (struct umac64_ctx *ctx,\n size_t nonce_length, const uint8_t *nonce)\n{\n ((void) sizeof ((nonce_length > 0) ? 1 : 0), __extension__ ({ if (nonce_length > 0) ; else __assert_fail (\"nonce_length > 0\", \"umac64.c\", 63, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((nonce_length <= 16) ? 1 : 0), __extension__ ({ if (nonce_length <= 16) ; else __assert_fail (\"nonce_length <= AES_BLOCK_SIZE\", \"umac64.c\", 64, __extension__ __PRETTY_FUNCTION__); }));\n memcpy (ctx->nonce, nonce, nonce_length);\n memset (ctx->nonce + nonce_length, 0, 16 - nonce_length);\n ctx->nonce_low = ctx->nonce[nonce_length - 1] & 1;\n ctx->nonce[nonce_length - 1] &= ~1;\n ctx->nonce_length = nonce_length;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 2, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_write_minified_object.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_write_minified_object", "sloc": "21", "c_code": "char *json_write_minified_object(const struct json_object_s *object,\n char *data) {\n struct json_object_element_s *element = 0;\n *data++ = '{';\n for (element = object->start; 0 != element; element = element->next) {\n if (element != object->start) {\n *data++ = ',';\n }\n data = json_write_string(element->name, data);\n if (0 == data) {\n return 0;\n }\n *data++ = ':';\n data = json_write_minified_value(element->value, data);\n if (0 == data) {\n return 0;\n }\n }\n *data++ = '}';\n return data;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#xmlstring_prep#xmlStrVPrintf.c", "codebase": "libxml2", "c_file": "xmlstring.c", "function": "xmlStrVPrintf", "sloc": "10", "c_code": "int\nxmlStrVPrintf(xmlChar *buf, int len, const char *msg, va_list ap) {\n int ret;\n if((buf == ((void *)0)) || (msg == ((void *)0))) {\n return(-1);\n }\n ret = vsnprintf((char *) buf, len, (const char *) msg, ap);\n buf[len - 1] = 0;\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Float_Integ_Part.c", "codebase": "gprolog-1.5.0", "c_file": "arith_inl_c.c", "function": "Pl_Fct_Float_Integ_Part", "sloc": "5", "c_code": "WamWord\nPl_Fct_Float_Integ_Part(WamWord x)\n{\n double d; if ((((PlLong) (x) & ((PlULong)0x7)) == (PlULong)0x7)) { Pl_Err_Type(pl_type_float, x); return x; } else d = Pl_Obtain_Float(((WamWord *) ((x) & (PlULong)0xfffffffffffffff8))); return Make_Tagged_Float((((d) > 0) ? floor(d) : ceil(d)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SQUARE_PYRAMIDAL_NUMBER_SUM_SQUARES_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SQUARE_PYRAMIDAL_NUMBER_SUM_SQUARES.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int s ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#window_prep#winlink_find_by_index.c", "codebase": "tmux", "c_file": "window.c", "function": "winlink_find_by_index", "sloc": "9", "c_code": "struct winlink *\nwinlink_find_by_index(struct winlinks *wwl, int idx)\n{\n struct winlink wl;\n if (idx < 0)\n fatalx(\"bad index\");\n wl.idx = idx;\n return (winlinks_RB_FIND(wwl, &wl));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cflow-1.7#parser_prep#tokpush.c", "codebase": "cflow-1.7", "c_file": "parser.c", "function": "tokpush", "sloc": "12", "c_code": "void\ntokpush(int type, int line, char *token)\n{\n token_stack[tos].type = type;\n token_stack[tos].token = token;\n token_stack[tos].line = line;\n if (++tos == token_stack_length) {\n token_stack_length += token_stack_increase;\n token_stack = xrealloc(token_stack,\n token_stack_length*sizeof(*token_stack));\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#SAX2_prep#xmlSAX2ElementDecl.c", "codebase": "libxml2", "c_file": "SAX2.c", "function": "xmlSAX2ElementDecl", "sloc": "28", "c_code": "void\nxmlSAX2ElementDecl(void *ctx, const xmlChar * name, int type,\n xmlElementContentPtr content)\n{\n xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;\n xmlElementPtr elem = ((void *)0);\n (void) elem;\n if ((ctxt == ((void *)0)) || (ctxt->myDoc == ((void *)0)))\n return;\n if (ctxt->inSubset == 1)\n elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->intSubset,\n name, (xmlElementTypeVal) type, content);\n else if (ctxt->inSubset == 2)\n elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->extSubset,\n name, (xmlElementTypeVal) type, content);\n else {\n xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,\n \"SAX.xmlSAX2ElementDecl(%s) called while not in subset\\n\",\n name, ((void *)0));\n return;\n }\n if (elem == ((void *)0))\n ctxt->valid = 0;\n if (ctxt->validate && ctxt->wellFormed &&\n ctxt->myDoc && ctxt->myDoc->intSubset)\n ctxt->valid &=\n xmlValidateElementDecl(&ctxt->vctxt, ctxt->myDoc, elem);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_PAIRWISE_PRODUCTS_2_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SUM_PAIRWISE_PRODUCTS_2.c", "function": "f_filled", "sloc": "1", "c_code": "long long int f_filled(int n) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#types_prep#libxml_xmlValidCtxtPtrWrap.c", "codebase": "libxml2", "c_file": "types.c", "function": "libxml_xmlValidCtxtPtrWrap", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlValidCtxtPtrWrap(xmlValidCtxtPtr valid)\n{\n PyObject *ret;\n if (valid == ((void *)0)) {\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return ((&_Py_NoneStruct));\n }\n ret =\n PyCapsule_New((void *) valid,\n (char *) \"xmlValidCtxtPtr\", ((void *)0));\n return (ret);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_PRODUCT_SUBSET_ARRAY_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_PRODUCT_SUBSET_ARRAY.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES_prep#max.c", "codebase": "transcoder-set", "c_file": "FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S.c", "function": "f_gold", "sloc": "21", "c_code": "int f_gold ( int arr [ ], int n ) {\n int sum = 0;\n int maxsize = - 1, startindex;\n for ( int i = 0;\n i < n - 1;\n i ++ ) {\n sum = ( arr [ i ] == 0 ) ? - 1 : 1;\n for ( int j = i + 1;\n j < n;\n j ++ ) {\n ( arr [ j ] == 0 ) ? ( sum += - 1 ) : ( sum += 1 );\n if ( sum == 0 && maxsize < j - i + 1 ) {\n maxsize = j - i + 1;\n startindex = i;\n }\n }\n }\n if ( maxsize == - 1 ) printf(\"No such subarray\");\n else printf(\"No such subarray\");\n return maxsize;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#util_prep#is_exec_in_local_dir.c", "codebase": "findutils-4.9.0", "c_file": "util.c", "function": "is_exec_in_local_dir", "sloc": "5", "c_code": "_Bool\nis_exec_in_local_dir (const PRED_FUNC pred_func)\n{\n return pred_execdir == pred_func || pred_okdir == pred_func;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_FIND_SLOPE_LINE_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "PROGRAM_FIND_SLOPE_LINE.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "dap-3.10#ps_prep#pict_circle.c", "codebase": "dap-3.10", "c_file": "ps.c", "function": "pict_circle", "sloc": "7", "c_code": "void pict_circle(pict *p, double cx, double cy, double r)\n{\n p->pict_npts = 1;\n strcpy(p->pict_type, \"CIRC\");\n p->pict_pt = pict_newpoint(cx, cy);\n p->pict_r = r;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#machine_prep#Pl_M_Is_Absolute_File_Name.c", "codebase": "gprolog-1.5.0", "c_file": "machine.c", "function": "Pl_M_Is_Absolute_File_Name", "sloc": "7", "c_code": "Bool\nPl_M_Is_Absolute_File_Name(char *path)\n{\n if (((*path) == '/' || (*path) == '/'))\n return 1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_ARRAY_prep#max.c", "codebase": "transcoder-set", "c_file": "COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_ARRAY.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUBSEQUENCES_SIZE_THREE_ARRAY_WHOSE_SUM_DIVISIBLE_M_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SUBSEQUENCES_SIZE_THREE_ARRAY_WHOSE_SUM_DIVISIBLE_M.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int A [ ], int N, int M ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#ma2asm_inst_prep#Move_Ret_To_Mem_L.c", "codebase": "gprolog-1.5.0", "c_file": "ma2asm_inst.c", "function": "Move_Ret_To_Mem_L", "sloc": "13", "c_code": "void\nMove_Ret_To_Mem_L(char *name, int index)\n{\n if (pic_code)\n {\n Inst_Printf(\"movq\", \"%s@GOTPCREL(%%rip), \" \"%%r10\", name);\n Inst_Printf(\"movq\", \"%%rax, \" \"%d(%%r10)\", index * 8);\n }\n else\n {\n Inst_Printf(\"movq\", \"%%rax, \" \"%s+%d(%%rip)\", name, index * 8);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#global_prep#flip_pipe.c", "codebase": "nano-7.2", "c_file": "global.c", "function": "flip_pipe", "sloc": "1", "c_code": "void flip_pipe(void) {;}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#sma_prep#ti_sma.c", "codebase": "tulipindicators-0.9.1", "c_file": "sma.c", "function": "ti_sma", "sloc": "21", "c_code": "int ti_sma(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *input = inputs[0];\n const int period = (int)options[0];\n double *output = outputs[0];\n const double scale = 1.0 / period;\n if (period < 1) return 1;\n if (size <= ti_sma_start(options)) return 0;\n double sum = 0;\n int i;\n for (i = 0; i < period; ++i) {\n sum += input[i];\n }\n *output++ = sum * scale;\n for (i = period; i < size; ++i) {\n sum += input[i];\n sum -= input[i-period];\n *output++ = sum * scale;\n }\n ((void) sizeof ((output - outputs[0] == size - ti_sma_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_sma_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_sma_start(options)\", \"indicators/sma.c\", 58, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_WHETHER_GIVEN_DEGREES_VERTICES_REPRESENT_GRAPH_TREE_prep#min.c", "codebase": "transcoder-set", "c_file": "CHECK_WHETHER_GIVEN_DEGREES_VERTICES_REPRESENT_GRAPH_TREE.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_value.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_value", "sloc": "34", "c_code": "binn * binn_value(int type, void *pvalue, int size, binn_mem_free freefn) {\n int storage_type;\n binn *item = binn_alloc_item();\n if (item) {\n item->type = type;\n binn_get_type_info(type, &storage_type, ((void *)0));\n switch (storage_type) {\n case 0x00:\n break;\n case 0xA0:\n if (size == 0) size = strlen((char*)pvalue) + 1;\n case 0xC0:\n case 0xE0:\n if (freefn == ((binn_mem_free)-1)) {\n item->ptr = binn_memdup(pvalue, size);\n if (item->ptr == ((void *)0)) {\n free_fn(item);\n return ((void *)0);\n }\n item->freefn = free_fn;\n if (storage_type == 0xA0) size--;\n } else {\n item->ptr = pvalue;\n item->freefn = freefn;\n }\n item->size = size;\n break;\n default:\n item->ptr = &item->vint32;\n copy_raw_value(pvalue, item->ptr, storage_type);\n }\n }\n return item;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 2}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderConstXmlVersion.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderConstXmlVersion", "sloc": "16", "c_code": "const xmlChar *\nxmlTextReaderConstXmlVersion(xmlTextReaderPtr reader) {\n xmlDocPtr doc = ((void *)0);\n if (reader == ((void *)0))\n return(((void *)0));\n if (reader->doc != ((void *)0))\n doc = reader->doc;\n else if (reader->ctxt != ((void *)0))\n doc = reader->ctxt->myDoc;\n if (doc == ((void *)0))\n return(((void *)0));\n if (doc->version == ((void *)0))\n return(((void *)0));\n else\n return(constString(reader, doc->version));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 9, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#CEILING_IN_A_SORTED_ARRAY_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "CEILING_IN_A_SORTED_ARRAY_1.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int low, int high, int x ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bc-1.07.1#dc_prep#main.c", "codebase": "bc-1.07.1", "c_file": "dc.c", "function": "main", "sloc": "54", "c_code": "int\nmain (\n int argc ,\n char **argv )\n{\n static struct option const long_opts[] = {\n {\"expression\", 1, ((void *)0), 'e'},\n {\"file\", 1, ((void *)0), 'f'},\n {\"help\", 0, ((void *)0), 'h'},\n {\"version\", 0, ((void *)0), 'V'},\n {((void *)0), 0, ((void *)0), 0}\n };\n int did_eval = 0;\n int c;\n progname = r1bindex(*argv, '/');\n dc_math_init();\n dc_string_init();\n dc_register_init();\n dc_array_init();\n while ((c = getopt_long(argc, argv, \"hVe:f:\", long_opts, (int *)0)) != (-1)) {\n switch (c) {\n case 'e':\n { dc_data string = dc_makestring(optarg, strlen(optarg));\n if (dc_evalstr(&string) != 0)\n return flush_okay();\n dc_free_str(&string.v.string);\n did_eval = 1;\n }\n break;\n case 'f':\n try_file(optarg);\n did_eval = 1;\n break;\n case 'h':\n usage(stdout);\n return flush_okay();\n case 'V':\n show_version();\n return flush_okay();\n default:\n usage(stderr);\n return 1;\n }\n }\n for (; optind < argc; ++optind) {\n try_file(argv[optind]);\n did_eval = 1;\n }\n if (did_eval == 0) {\n if (dc_evalfile(stdin) != 0)\n return 1;\n }\n return flush_okay();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 2}}, {"id": "json-c#json_object_prep#json_object_array_get_idx.c", "codebase": "json-c", "c_file": "json_object.c", "function": "json_object_array_get_idx", "sloc": "5", "c_code": "struct json_object *json_object_array_get_idx(const struct json_object *jso, size_t idx)\n{\n ((void) sizeof ((json_object_get_type(jso) == json_type_array) ? 1 : 0), __extension__ ({ if (json_object_get_type(jso) == json_type_array) ; else __assert_fail (\"json_object_get_type(jso) == json_type_array\", \"/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/json-c/json_object.c\", 1543, __extension__ __PRETTY_FUNCTION__); }));\n return (struct json_object *)array_list_get_idx(JC_ARRAY_C(jso)->c_array, idx);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_json5_prep#json_value_as_number.c", "codebase": "json.h", "c_file": "allow_json5.c", "function": "json_value_as_number", "sloc": "6", "c_code": "struct json_number_s *json_value_as_number(struct json_value_s *const value) {\n if (value->type != json_type_number) {\n return 0;\n }\n return (struct json_number_s *)value->payload;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bzip2#bzlib_prep#BZ2_bzWriteClose.c", "codebase": "bzip2", "c_file": "bzlib.c", "function": "BZ2_bzWriteClose", "sloc": "10", "c_code": "void BZ2_bzWriteClose\n ( int* bzerror,\n BZFILE* b,\n int abandon,\n unsigned int* nbytes_in,\n unsigned int* nbytes_out )\n{\n BZ2_bzWriteClose64 ( bzerror, b, abandon,\n nbytes_in, ((void *)0), nbytes_out, ((void *)0) );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#mode-tree_prep#mode_tree_free.c", "codebase": "tmux", "c_file": "mode-tree.c", "function": "mode_tree_free", "sloc": "14", "c_code": "void\nmode_tree_free(struct mode_tree_data *mtd)\n{\n struct window_pane *wp = mtd->wp;\n if (mtd->zoomed == 0)\n server_unzoom_window(wp->window);\n mode_tree_free_items(&mtd->children);\n mode_tree_clear_lines(mtd);\n screen_free(&mtd->screen);\n free(mtd->search);\n free(mtd->filter);\n mtd->dead = 1;\n mode_tree_remove_ref(mtd);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 2, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#modo_prep#VerifyEqns.c", "codebase": "mcsim-6.2.0", "c_file": "modo.c", "function": "VerifyEqns", "sloc": "8", "c_code": "void VerifyEqns (PVMMAPSTRCT pvmGlo, PVMMAPSTRCT pvmDyn)\n{\n BOOL bStatesOK;\n bStatesOK = (vnStates == ForAllVar(((void *)0), pvmGlo, &AssertExistsEqn,\n 0x10000, (PVOID) pvmDyn));\n if (!bStatesOK)\n ReportError(((void *)0), 0x8000, ((void *)0), \"State equations missing.\\n\");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#nist-keywrap_prep#nettle_aes256_keyunwrap.c", "codebase": "nettle-3.9.1", "c_file": "nist-keywrap.c", "function": "nettle_aes256_keyunwrap", "sloc": "8", "c_code": "int\nnettle_aes256_keyunwrap (struct aes256_ctx *ctx,\n const uint8_t *iv, size_t cleartext_length,\n uint8_t *cleartext, const uint8_t *ciphertext)\n{\n return nettle_nist_keyunwrap16 (ctx, (nettle_cipher_func *) & nettle_aes256_decrypt,\n iv, cleartext_length, cleartext, ciphertext);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "dap-3.10#dap1_prep#table.c", "codebase": "dap-3.10", "c_file": "dap1.c", "function": "table", "sloc": "169", "c_code": "void table(char *fname, char *rowvars, char *colvars, char *format, char *marks)\n{\n static int tabinit = 0;\n static char *prevmem;\n static char **prev;\n int r;\n int s;\n int c;\n int v;\n static int *markv;\n int nmark;\n int more;\n static char *nstring;\n if (!tabinit)\n {\n tabinit = 1;\n valsetmem = (int *) dap_malloc(dap_maxrows * dap_maxcols * sizeof(int), \"\");\n valset = (int **) dap_malloc(dap_maxrows * sizeof(int *), \"\");\n for (r = 0; r < dap_maxrows; r++)\n valset[r] = valsetmem + dap_maxcols * r;\n tabvalmem = (double *) dap_malloc(dap_maxrows * dap_maxcols * sizeof(double), \"\");\n tableval = (double **) dap_malloc(dap_maxrows * sizeof(double *), \"\");\n for (r = 0; r < dap_maxrows; r++)\n tableval[r] = tabvalmem + dap_maxcols * r;\n collabel = (labnode *) dap_malloc(dap_maxclab * sizeof(labnode), \"\");\n for (c = 0; c < dap_maxclab; c++)\n collabel[c].lab = dap_malloc(dap_lablen + 1, \"\");\n rowvar = (int *) dap_malloc(sizeof(int) * dap_maxvar, \"\");\n colvar = (int *) dap_malloc(sizeof(int) * dap_maxvar, \"\");\n rlabmem = dap_malloc(dap_maxrows * dap_maxrowv * (dap_lablen + 1), \"\");\n rlptrmem = (char **) dap_malloc(sizeof(char *) * dap_maxrows * dap_maxrowv, \"\");\n rowlabel = (char ***) dap_malloc(sizeof(char **) * dap_maxrows, \"\");\n for (r = 0; r < dap_maxrows; r++)\n {\n rowlabel[r] = rlptrmem + r * dap_maxrowv;\n for (v = 0; v < dap_maxrowv; v++)\n rowlabel[r][v] = rlabmem +\n r * (dap_maxrowv * (dap_lablen + 1)) +\n v * (dap_lablen + 1);\n }\n prevmem = dap_malloc(dap_maxrowv * (dap_lablen + 1), \"\");\n prev = (char **) dap_malloc(sizeof(char *) * dap_maxrowv, \"\");\n for (v = 0; v < dap_maxrowv; v++)\n prev[v] = prevmem + v * (dap_lablen + 1);\n markv = (int *) dap_malloc(sizeof(int) * dap_maxvar, \"\");\n nstring = dap_malloc(dap_strlen + 1, \"dap_strlen\");\n }\n if (!fname)\n {\n fputs(\"(table) no dataset name given\\n\", dap_err);\n exit(1);\n }\n inset(fname);\n tabform[0] = '\\0';\n rtitlesp = 8;\n if (!rowvars || !colvars)\n {\n fputs(\"(table) no row and/or column variables specified\\n\", dap_err);\n exit(1);\n }\n if (!format)\n {\n fputs(\"(table) no format given\\n\", dap_err);\n exit(1);\n }\n specparse(rowvars, colvars, format);\n nmark = dap_list(marks, markv, dap_maxvar);\n nextclab = 0;\n labroot = -1;\n ncols = 0;\n for (r = 0; r < nrowvar; r++)\n {\n prev[r][0] = '\\0';\n if (dap_obs[0].do_len[rowvar[r]] <= 0)\n {\n if (dap_obs[0].do_str[rowvar[r]])\n dap_free(dap_obs[0].do_str[rowvar[r]], \"\");\n dap_obs[0].do_str[rowvar[r]] = dap_malloc(rtitlesp + 1, \"\");\n }\n }\n for (c = 0; c < ncolvar - 1; c++)\n {\n if (dap_obs[0].do_len[colvar[c]] <= 0)\n {\n if (dap_obs[0].do_str[colvar[c]])\n dap_free(dap_obs[0].do_str[colvar[c]], \"\");\n dap_obs[0].do_str[colvar[c]] = dap_malloc(rtitlesp + 1, \"\");\n }\n }\n for (r = 0; r < dap_maxrows; r++)\n for (c = 0; c < dap_maxcols; c++)\n valset[r][c] = 0;\n for (nrows = -1, more = 1; more; )\n {\n more = step();\n if (dap_newpart(markv, nmark))\n {\n dap_swap();\n dap_head(markv, nmark);\n tablehead();\n tableprint();\n dap_swap();\n nextclab = 0;\n labroot = -1;\n ncols = 0;\n for (r = 0; r < nrowvar; r++)\n prev[r][0] = '\\0';\n for (r = 0; r < dap_maxrows; r++)\n for (c = 0; c < dap_maxcols; c++)\n valset[r][c] = 0;\n nrows = -1;\n }\n for (r = 0; r < nrowvar; r++)\n {\n if (dap_obs[0].do_len[rowvar[r]] == 0)\n {\n sprintf(nstring, \"%d\", dap_obs[0].do_int[rowvar[r]]);\n strncpy(dap_obs[0].do_str[rowvar[r]], nstring, rtitlesp);\n dap_obs[0].do_str[rowvar[r]][rtitlesp] = '\\0';\n }\n else if (dap_obs[0].do_len[rowvar[r]] == (-1))\n {\n sprintf(nstring, \"%g\", dap_obs[0].do_dbl[rowvar[r]]);\n strncpy(dap_obs[0].do_str[rowvar[r]], nstring, rtitlesp);\n dap_obs[0].do_str[rowvar[r]][rtitlesp] = '\\0';\n }\n }\n for (r = 0; r < nrowvar; r++)\n {\n if (strcmp(dap_obs[0].do_str[rowvar[r]], prev[r]))\n break;\n }\n if (r < nrowvar)\n {\n nrows++;\n for (s = 0; s < r; s++)\n rowlabel[nrows][s][0] = '\\0';\n for ( ; r < nrowvar; r++)\n {\n strcpy(prev[r], dap_obs[0].do_str[rowvar[r]]);\n strcpy(rowlabel[nrows][r],\n dap_obs[0].do_str[rowvar[r]]);\n }\n }\n if (nrows < 0)\n {\n fputs(\"(table) No rows.\\n\", dap_err);\n exit(1);\n }\n for (c = 0; c < ncolvar - 1; c++)\n {\n if (dap_obs[0].do_len[colvar[c]] == 0)\n {\n sprintf(nstring, \"%d\", dap_obs[0].do_int[colvar[c]]);\n strncpy(dap_obs[0].do_str[colvar[c]], nstring, rtitlesp);\n dap_obs[0].do_str[colvar[c]][rtitlesp] = '\\0';\n }\n else if (dap_obs[0].do_len[colvar[c]] == (-1))\n {\n sprintf(nstring, \"%g\", dap_obs[0].do_dbl[colvar[c]]);\n strncpy(dap_obs[0].do_str[colvar[c]], nstring, rtitlesp);\n dap_obs[0].do_str[colvar[c]][rtitlesp] = '\\0';\n }\n }\n c = findcol();\n tableval[nrows][c] = dap_obs[0].do_dbl[colvar[ncolvar - 1]];\n valset[nrows][c] = 1;\n }\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 9, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 9, "memory_management": 0, "memory_operation": 0, "if_statement": 16, "for_loop": 19, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "transcoder-set#K_TH_DIGIT_RAISED_POWER_B_prep#sort.c", "codebase": "transcoder-set", "c_file": "K_TH_DIGIT_RAISED_POWER_B.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_A_ROTATION_WITH_MAXIMUM_HAMMING_DISTANCE_prep#min.c", "codebase": "transcoder-set", "c_file": "FIND_A_ROTATION_WITH_MAXIMUM_HAMMING_DISTANCE.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#misc_prep#SaveStr.c", "codebase": "screen-4.9.0", "c_file": "misc.c", "function": "SaveStr", "sloc": "11", "c_code": "char *\nSaveStr(str)\nregister const char *str;\n{\n register char *cp;\n if ((cp = malloc(strlen(str) + 1)) == ((void *)0))\n Panic(0, \"%s\", strnomem);\n else\n strcpy(cp, str);\n return cp;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#nict_fsm_prep#osip_nict_timeout_k_event.c", "codebase": "libosip2-5.3.1", "c_file": "nict_fsm.c", "function": "osip_nict_timeout_k_event", "sloc": "6", "c_code": "void osip_nict_timeout_k_event(osip_transaction_t *nict, osip_event_t *evt) {\n nict->nict_context->timer_k_length = -1;\n nict->nict_context->timer_k_start.tv_sec = -1;\n __osip_transaction_set_state(nict, NICT_TERMINATED);\n __osip_kill_transaction_callback(OSIP_NICT_KILL_TRANSACTION, nict);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#LONGEST_COMMON_SUBSTRING_SPACE_OPTIMIZED_DP_SOLUTION_prep#main.c", "codebase": "transcoder-set", "c_file": "LONGEST_COMMON_SUBSTRING_SPACE_OPTIMIZED_DP_SOLUTION.c", "function": "main", "sloc": "15", "c_code": "int main(void) {\n int n_success = 0;\n char param0[][100] = {\"GeeksforGeeks\",\"333940\",\"1000\",\"Facebook\",\"2684247\",\"111\",\"abcdxyz\",\"625330958530\",\"01011000001111\",\"KXm\"};\n char param1[][100] = {\"GeeksQuiz\",\"390\",\"0\",\"nice book\",\"1\",\"10\",\"xyzabcd\",\"412511\",\"1001010001\",\"gF\"};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#types_prep#libxml_intWrap.c", "codebase": "libxml2", "c_file": "types.c", "function": "libxml_intWrap", "sloc": "7", "c_code": "PyObject *\nlibxml_intWrap(int val)\n{\n PyObject *ret;\n ret = PyLong_FromLong((long) val);\n return (ret);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#decay_prep#ti_decay_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "decay.c", "function": "ti_decay_start", "sloc": "4", "c_code": "int ti_decay_start(double const *options) {\n (void)options;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#names_prep#name_add_name.c", "codebase": "tar-1.34", "c_file": "names.c", "function": "name_add_name", "sloc": "18", "c_code": "void\nname_add_name (const char *name)\n{\n struct name_elt *ep = name_elt_alloc ();\n ep->type = NELT_NAME;\n ep->v.name = name;\n switch (filename_args)\n {\n case FILES_NONE:\n filename_args = FILES_ONE;\n break;\n case FILES_ONE:\n filename_args = FILES_MANY;\n break;\n default:\n break;\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 3}}, {"id": "heman#lighting_prep#heman_lighting_set_occlusion_scale.c", "codebase": "heman", "c_file": "lighting.c", "function": "heman_lighting_set_occlusion_scale", "sloc": "4", "c_code": "void heman_lighting_set_occlusion_scale(float s)\n{\n _occlusion_scale = s;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY_1_prep#main.c", "codebase": "transcoder-set", "c_file": "COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY_1.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {4,75,89};\nint param0_1[] = {84,-66,-52,34,-28,-6,20,22,-78,-26,14,24,-92,-18,32,-94,-64,-38,56,4,-10,58,-66,-58,-10,-8,-62,-60,-26};\nint param0_2[] = {0,0,0,1,1,1,1,1};\nint param0_3[] = {18,7,43,57,94,37,38,41,59,64,97,29,51,37,64,91,42,83,13,22,68};\nint param0_4[] = {-94,-86,-84,-84,-82,-66,-62,-58,-52,-48,-44,-40,-38,-32,-22,-22,-22,-14,-8,-6,-6,0,2,20,20,26,32,32,52,56,66,74,76,80,80,86,88,94};\nint param0_5[] = {0,1,1,0,0,0,0,0,1,0,0};\nint param0_6[] = {4,8,15,19,24,31,33,36,38,45,45,52,54,65,73,75,83,84,90,92,93};\nint param0_7[] = {80,-30,-44,76,-96,2,22,-30,36,-6,88,-60,-90,-52,78,90,-52};\nint param0_8[] = {0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};\nint param0_9[] = {74,71,28,45,14,31,17,10,82,27,45,73,93,87,57,58};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {1,26,7,17,34,9,19,10,7,10};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "patch-2.7.6#dup-safer-flag_prep#dup_safer_flag.c", "codebase": "patch-2.7.6", "c_file": "dup-safer-flag.c", "function": "dup_safer_flag", "sloc": "6", "c_code": "int\ndup_safer_flag (int fd, int flag)\n{\n return rpl_fcntl (fd, (flag & 02000000) ? 1030 : 0,\n 2 + 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#nist-keywrap_prep#nettle_aes128_keyunwrap.c", "codebase": "nettle-3.9.1", "c_file": "nist-keywrap.c", "function": "nettle_aes128_keyunwrap", "sloc": "8", "c_code": "int\nnettle_aes128_keyunwrap (struct aes128_ctx *ctx,\n const uint8_t *iv, size_t cleartext_length,\n uint8_t *cleartext, const uint8_t *ciphertext)\n{\n return nettle_nist_keyunwrap16 (ctx, (nettle_cipher_func *) & nettle_aes128_decrypt,\n iv, cleartext_length, cleartext, ciphertext);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_SUM_PRODUCT_TWO_ARRAYS_prep#len.c", "codebase": "transcoder-set", "c_file": "MINIMUM_SUM_PRODUCT_TWO_ARRAYS.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngwrite_prep#png_create_write_struct.c", "codebase": "optipng-0.7.8", "c_file": "pngwrite.c", "function": "png_create_write_struct", "sloc": "17", "c_code": "__attribute__((__malloc__)) png_structp png_create_write_struct (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)\n{\n png_structrp png_ptr = png_create_png_struct(user_png_ver, error_ptr,\n error_fn, warn_fn, ((void *)0), ((void *)0), ((void *)0));\n if (png_ptr != ((void *)0))\n {\n png_ptr->zbuffer_size = 8192;\n png_ptr->zlib_strategy = 1;\n png_ptr->zlib_level = (-1);\n png_ptr->zlib_mem_level = 8;\n png_ptr->zlib_window_bits = 15;\n png_ptr->zlib_method = 8;\n png_ptr->flags |= 0x200000U;\n png_set_write_fn(png_ptr, ((void *)0), ((void *)0), ((void *)0));\n }\n return png_ptr;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#dfa_prep#xpalloc.c", "codebase": "gawk-5.2.2", "c_file": "dfa.c", "function": "xpalloc", "sloc": "31", "c_code": "void *\nxpalloc (void *pa, idx_t *nitems, idx_t nitems_incr_min,\n ptrdiff_t nitems_max, idx_t item_size)\n{\n idx_t n0 = *nitems;\n enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 };\n idx_t n, nbytes;\n if (__builtin_add_overflow (n0, n0 >> 1, &n))\n n = (9223372036854775807L);\n if (0 <= nitems_max && nitems_max < n)\n n = nitems_max;\n idx_t adjusted_nbytes\n = ((__builtin_mul_overflow (n, item_size, &nbytes) || (18446744073709551615UL) < nbytes)\n ? (((9223372036854775807L)) < ((18446744073709551615UL)) ? ((9223372036854775807L)) : ((18446744073709551615UL)))\n : nbytes < DEFAULT_MXFAST ? DEFAULT_MXFAST : 0);\n if (adjusted_nbytes)\n {\n n = adjusted_nbytes / item_size;\n nbytes = adjusted_nbytes - adjusted_nbytes % item_size;\n }\n if (! pa)\n *nitems = 0;\n if (n - n0 < nitems_incr_min\n && (__builtin_add_overflow (n0, nitems_incr_min, &n)\n || (0 <= nitems_max && nitems_max < n)\n || __builtin_mul_overflow (n, item_size, &nbytes)))\n xalloc_die ();\n pa = xrealloc (pa, nbytes);\n *nitems = n;\n return pa;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#control_prep#control_write_buffer.c", "codebase": "tmux", "c_file": "control.c", "function": "control_write_buffer", "sloc": "7", "c_code": "void\ncontrol_write_buffer(struct client *c, struct evbuffer *buffer)\n{\n evbuffer_add_buffer(c->stdout_data, buffer);\n evbuffer_add(c->stdout_data, \"\\n\", 1);\n server_client_push_stdout(c);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "cpio-2.14#util_prep#delay_set_stat.c", "codebase": "cpio-2.14", "c_file": "util.c", "function": "delay_set_stat", "sloc": "9", "c_code": "void\ndelay_set_stat (char const *file_name, struct stat *st,\n mode_t invert_permissions)\n{\n struct cpio_file_stat fs;\n stat_to_cpio (&fs, st);\n fs.c_name = (char*) file_name;\n delay_cpio_set_stat (&fs, invert_permissions);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#dap0_prep#extractWords.c", "codebase": "dap-3.10", "c_file": "dap0.c", "function": "extractWords", "sloc": "40", "c_code": "CharList extractWords(char * buffer, long size,char *delimiter)\n{\n char * bufferWord= (char*) malloc (sizeof(char)*size+1);\n memset (bufferWord,'\\0',size+1);\n CharList list;\n list.word=((void *)0);\n list.next=((void *)0);\n CharList *current=&list;\n long i=0l;\n long sSize=0l;\n long sIndex=0l;\n for(i=0l;iword= (char*) malloc (sizeof(char)*sIndex+5);\n strcpy(current->word,bufferWord);\n current->next= (char*) malloc (sizeof(CharList));\n current=current->next;\n sSize=sIndex;\n sIndex=0;\n memset (bufferWord,'\\0',size+1);\n }\n else\n {\n bufferWord[sIndex]=buffer[i];\n sIndex++;\n }\n }\n if (sIndex>0)\n {\n current->word= (char*) malloc ((sizeof(char)*strlen(bufferWord))+1);\n strcpy(current->word,bufferWord);\n current->next= ((void *)0);\n }\n free(bufferWord);\n return list;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 5, "memory_operation": 2, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "gawk-5.2.2#mpfr_prep#do_mpfr_rand.c", "codebase": "gawk-5.2.2", "c_file": "mpfr.c", "function": "do_mpfr_rand", "sloc": "18", "c_code": "NODE *\ndo_mpfr_rand(int nargs __attribute__ ((__unused__)))\n{\n NODE *res;\n int tval;\n check_exact_args(nargs, \"rand\", 0);\n if (firstrand) {\n __gmp_randinit_mt(state);\n __gmpz_init(seed);\n __gmpz_set_ui(seed, 1);\n __gmp_randseed(state, seed);\n firstrand = 0;\n }\n res = mpg_node(MPFN);\n tval = mpfr_urandomb(res->sub.val.nm.mpnum, state);\n (void) (do_ieee_fmt && format_ieee(res->sub.val.nm.mpnum, tval));\n return res;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#wordsplit_prep#wordsplit_get_words.c", "codebase": "tar-1.34", "c_file": "wordsplit.c", "function": "wordsplit_get_words", "sloc": "14", "c_code": "int\nwordsplit_get_words (struct wordsplit *ws, size_t *wordc, char ***wordv)\n{\n char **p = realloc (ws->ws_wordv,\n (ws->ws_wordc + 1) * sizeof (ws->ws_wordv[0]));\n if (!p)\n return -1;\n *wordv = p;\n *wordc = ws->ws_wordc;\n ws->ws_wordv = ((void *)0);\n ws->ws_wordc = 0;\n ws->ws_wordn = 0;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_SERIES_ALTERNATE_SIGNED_SQUARES_AP_prep#max.c", "codebase": "transcoder-set", "c_file": "SUM_SERIES_ALTERNATE_SIGNED_SQUARES_AP.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#BINARY_SEARCH_prep#sort.c", "codebase": "transcoder-set", "c_file": "BINARY_SEARCH.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MAXIMUM_DOT_PRODUCT_TWO_ARRAYS_INSERTION_0S_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_MAXIMUM_DOT_PRODUCT_TWO_ARRAYS_INSERTION_0S.c", "function": "f_filled", "sloc": "1", "c_code": "long long int f_filled ( int A [ ], int B [ ], int m, int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "bc-1.07.1#number_prep#bc_is_neg.c", "codebase": "bc-1.07.1", "c_file": "number.c", "function": "bc_is_neg", "sloc": "5", "c_code": "char\nbc_is_neg (bc_num num)\n{\n return num->n_sign == MINUS;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#sdp_accessor_prep#sdp_message_k_keydata_get.c", "codebase": "libosip2-5.3.1", "c_file": "sdp_accessor.c", "function": "sdp_message_k_keydata_get", "sloc": "16", "c_code": "char *sdp_message_k_keydata_get(sdp_message_t *sdp, int pos_media) {\n sdp_media_t *med;\n if (sdp == ((void *)0))\n return ((void *)0);\n if (pos_media == -1) {\n if (sdp->k_key == ((void *)0))\n return ((void *)0);\n return sdp->k_key->k_keydata;\n }\n if ((pos_media != -1) && (osip_list_size(&sdp->m_medias) < pos_media + 1))\n return ((void *)0);\n med = (sdp_media_t *) osip_list_get(&sdp->m_medias, pos_media);\n if (med->k_key == ((void *)0))\n return ((void *)0);\n return med->k_key->k_keydata;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#misc_prep#werror.c", "codebase": "nettle-3.9.1", "c_file": "misc.c", "function": "werror", "sloc": "8", "c_code": "void\nwerror(const char *format, ...)\n{\n va_list args;\n __builtin_va_start(args,format);\n vfprintf(stderr, format, args);\n __builtin_va_end(args);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "make-4.4.1#loadapi_prep#gmk_add_function.c", "codebase": "make-4.4.1", "c_file": "loadapi.c", "function": "gmk_add_function", "sloc": "6", "c_code": "void\ngmk_add_function (const char *name, gmk_func_ptr func,\n unsigned int min, unsigned int max, unsigned int flags)\n{\n define_new_function (reading_file, name, min, max, flags, func);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_leading_or_trailing_decimal_point_prep#json_parse_ex.c", "codebase": "json.h", "c_file": "allow_leading_or_trailing_decimal_point.c", "function": "json_parse_ex", "sloc": "81", "c_code": "struct json_value_s *\njson_parse_ex(const void *src, size_t src_size, size_t flags_bitset,\n void *(*alloc_func_ptr)(void *user_data, size_t size),\n void *user_data, struct json_parse_result_s *result) {\n struct json_parse_state_s state;\n void *allocation;\n struct json_value_s *value;\n size_t total_size;\n int input_error;\n if (result) {\n result->error = json_parse_error_none;\n result->error_offset = 0;\n result->error_line_no = 0;\n result->error_row_no = 0;\n }\n if (0 == src) {\n return 0;\n }\n state.src = (const char *)src;\n state.size = src_size;\n state.offset = 0;\n state.line_no = 1;\n state.line_offset = 0;\n state.error = json_parse_error_none;\n state.dom_size = 0;\n state.data_size = 0;\n state.flags_bitset = flags_bitset;\n input_error = json_get_value_size(\n &state, (int)(json_parse_flags_allow_global_object & state.flags_bitset));\n if (0 == input_error) {\n json_skip_all_skippables(&state);\n if (state.offset != state.size) {\n state.error = json_parse_error_unexpected_trailing_characters;\n input_error = 1;\n }\n }\n if (input_error) {\n if (result) {\n result->error = state.error;\n result->error_offset = state.offset;\n result->error_line_no = state.line_no;\n result->error_row_no = state.offset - state.line_offset;\n }\n return 0;\n }\n total_size = state.dom_size + state.data_size;\n if (0 == alloc_func_ptr) {\n allocation = malloc(total_size);\n } else {\n allocation = alloc_func_ptr(user_data, total_size);\n }\n if (0 == allocation) {\n if (result) {\n result->error = json_parse_error_allocator_failed;\n result->error_offset = 0;\n result->error_line_no = 0;\n result->error_row_no = 0;\n }\n return 0;\n }\n state.offset = 0;\n state.line_no = 1;\n state.line_offset = 0;\n state.dom = (char *)allocation;\n state.data = state.dom + state.dom_size;\n if (json_parse_flags_allow_location_information & state.flags_bitset) {\n struct json_value_ex_s *value_ex = (struct json_value_ex_s *)state.dom;\n state.dom += sizeof(struct json_value_ex_s);\n value_ex->offset = state.offset;\n value_ex->line_no = state.line_no;\n value_ex->row_no = state.offset - state.line_offset;\n value = &(value_ex->value);\n } else {\n value = (struct json_value_s *)state.dom;\n state.dom += sizeof(struct json_value_s);\n }\n json_parse_value(\n &state, (int)(json_parse_flags_allow_global_object & state.flags_bitset),\n value);\n return (struct json_value_s *)allocation;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 8, "memory_management": 1, "memory_operation": 0, "if_statement": 10, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "screen-4.9.0#fileio_prep#secopen.c", "codebase": "screen-4.9.0", "c_file": "fileio.c", "function": "secopen", "sloc": "12", "c_code": "int\nsecopen(char *name, int flags, int mode)\n{\n int fd;\n do {} while (0);\n xseteuid(real_uid);\n xsetegid(real_gid);\n fd = open(name, flags, mode);\n xseteuid(eff_uid);\n xsetegid(eff_gid);\n return fd;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SIZE_SUBARRAY_MAXIMUM_SUM_prep#len.c", "codebase": "transcoder-set", "c_file": "SIZE_SUBARRAY_MAXIMUM_SUM.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#window_prep#winlink_stack_remove.c", "codebase": "tmux", "c_file": "window.c", "function": "winlink_stack_remove", "sloc": "13", "c_code": "void\nwinlink_stack_remove(struct winlink_stack *stack, struct winlink *wl)\n{\n struct winlink *wl2;\n if (wl == ((void *)0))\n return;\n for((wl2) = ((stack)->tqh_first); (wl2) != ((void *)0); (wl2) = ((wl2)->sentry.tqe_next)) {\n if (wl2 == wl) {\n do { if (((wl)->sentry.tqe_next) != ((void *)0)) (wl)->sentry.tqe_next->sentry.tqe_prev = (wl)->sentry.tqe_prev; else (stack)->tqh_last = (wl)->sentry.tqe_prev; *(wl)->sentry.tqe_prev = (wl)->sentry.tqe_next; ; ; } while (0);\n return;\n }\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "patch-2.7.6#quotearg_prep#quote_n_mem.c", "codebase": "patch-2.7.6", "c_file": "quotearg.c", "function": "quote_n_mem", "sloc": "5", "c_code": "char const *\nquote_n_mem (int n, char const *arg, size_t argsize)\n{\n return quotearg_n_options (n, arg, argsize, "e_quoting_options);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#position_prep#sindex_from_sline.c", "codebase": "less-633", "c_file": "position.c", "function": "sindex_from_sline", "sloc": "10", "c_code": "int sindex_from_sline(int sline)\n{\n if (sline < 0)\n sline += sc_height;\n if (sline <= 0)\n sline = 1;\n if (sline > sc_height)\n sline = sc_height;\n return (sline-1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#paxerror_prep#chdir_fatal.c", "codebase": "tar-1.34", "c_file": "paxerror.c", "function": "chdir_fatal", "sloc": "5", "c_code": "void\nchdir_fatal (char const *name)\n{\n call_arg_fatal (\"chdir\", name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#NON_REPEATING_ELEMENT_prep#min.c", "codebase": "transcoder-set", "c_file": "NON_REPEATING_ELEMENT.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "grep-3.11#kwset_prep#kwsincr.c", "codebase": "grep-3.11", "c_file": "kwset.c", "function": "kwsincr", "sloc": "117", "c_code": "void\nkwsincr (kwset_t kwset, char const *text, idx_t len)\n{\n ((0 <= len) ? (void) 0 : __builtin_unreachable ());\n struct trie *trie = kwset->trie;\n char const *trans = kwset->trans;\n _Bool reverse = kwset->kwsexec == bmexec;\n if (reverse)\n text += len;\n while (len--)\n {\n unsigned char uc = reverse ? *--text : *text++;\n unsigned char label = trans ? trans[uc] : uc;\n struct tree *cur = trie->links;\n struct tree *links[DEPTH_SIZE];\n enum { L, R } dirs[DEPTH_SIZE];\n links[0] = (struct tree *) &trie->links;\n dirs[0] = L;\n idx_t depth = 1;\n while (cur && label != cur->label)\n {\n links[depth] = cur;\n if (label < cur->label)\n dirs[depth++] = L, cur = cur->llink;\n else\n dirs[depth++] = R, cur = cur->rlink;\n }\n if (!cur)\n {\n cur = __extension__ ({ struct obstack *__h = (&kwset->obstack); __extension__ ({ struct obstack *__o = (__h); size_t __len = ((sizeof *cur)); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < __len) _obstack_newchunk (__o, __len); ((void) ((__o)->next_free += (__len))); }); __extension__ ({ struct obstack *__o1 = (__h); void *__value = (void *) __o1->object_base; if (__o1->next_free == __value) __o1->maybe_empty_object = 1; __o1->next_free = ((sizeof (ptrdiff_t) < sizeof (void *) ? (__o1->object_base) : (char *) 0) + (((__o1->next_free) - (sizeof (ptrdiff_t) < sizeof (void *) ? (__o1->object_base) : (char *) 0) + (__o1->alignment_mask)) & ~(__o1->alignment_mask))); if ((size_t) (__o1->next_free - (char *) __o1->chunk) > (size_t) (__o1->chunk_limit - (char *) __o1->chunk)) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; __value; }); });\n cur->llink = ((void *)0);\n cur->rlink = ((void *)0);\n cur->trie = __extension__ ({ struct obstack *__h = (&kwset->obstack); __extension__ ({ struct obstack *__o = (__h); size_t __len = ((sizeof *cur->trie)); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < __len) _obstack_newchunk (__o, __len); ((void) ((__o)->next_free += (__len))); }); __extension__ ({ struct obstack *__o1 = (__h); void *__value = (void *) __o1->object_base; if (__o1->next_free == __value) __o1->maybe_empty_object = 1; __o1->next_free = ((sizeof (ptrdiff_t) < sizeof (void *) ? (__o1->object_base) : (char *) 0) + (((__o1->next_free) - (sizeof (ptrdiff_t) < sizeof (void *) ? (__o1->object_base) : (char *) 0) + (__o1->alignment_mask)) & ~(__o1->alignment_mask))); if ((size_t) (__o1->next_free - (char *) __o1->chunk) > (size_t) (__o1->chunk_limit - (char *) __o1->chunk)) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; __value; }); });\n cur->trie->accepting = 0;\n cur->trie->links = ((void *)0);\n cur->trie->parent = trie;\n cur->trie->next = ((void *)0);\n cur->trie->fail = ((void *)0);\n cur->trie->depth = trie->depth + 1;\n cur->trie->shift = 0;\n cur->label = label;\n cur->balance = 0;\n if (dirs[--depth] == L)\n links[depth]->llink = cur;\n else\n links[depth]->rlink = cur;\n while (depth && !links[depth]->balance)\n {\n if (dirs[depth] == L)\n --links[depth]->balance;\n else\n ++links[depth]->balance;\n --depth;\n }\n if (depth && ((dirs[depth] == L && --links[depth]->balance)\n || (dirs[depth] == R && ++links[depth]->balance)))\n {\n struct tree *t, *r, *l, *rl, *lr;\n switch (links[depth]->balance)\n {\n case (char) -2:\n switch (dirs[depth + 1])\n {\n case L:\n r = links[depth], t = r->llink, rl = t->rlink;\n t->rlink = r, r->llink = rl;\n t->balance = r->balance = 0;\n break;\n case R:\n r = links[depth], l = r->llink, t = l->rlink;\n rl = t->rlink, lr = t->llink;\n t->llink = l, l->rlink = lr, t->rlink = r, r->llink = rl;\n l->balance = t->balance != 1 ? 0 : -1;\n r->balance = t->balance != (char) -1 ? 0 : 1;\n t->balance = 0;\n break;\n default:\n abort ();\n }\n break;\n case 2:\n switch (dirs[depth + 1])\n {\n case R:\n l = links[depth], t = l->rlink, lr = t->llink;\n t->llink = l, l->rlink = lr;\n t->balance = l->balance = 0;\n break;\n case L:\n l = links[depth], r = l->rlink, t = r->llink;\n lr = t->llink, rl = t->rlink;\n t->llink = l, l->rlink = lr, t->rlink = r, r->llink = rl;\n l->balance = t->balance != 1 ? 0 : -1;\n r->balance = t->balance != (char) -1 ? 0 : 1;\n t->balance = 0;\n break;\n default:\n abort ();\n }\n break;\n default:\n abort ();\n }\n if (dirs[depth - 1] == L)\n links[depth - 1]->llink = t;\n else\n links[depth - 1]->rlink = t;\n }\n }\n trie = cur->trie;\n }\n if (!trie->accepting)\n trie->accepting = 2 * kwset->words + 1;\n ++kwset->words;\n if (trie->depth < kwset->mind)\n kwset->mind = trie->depth;\n}\n", "c_constructs": {"pointer_type": 9, "array_type": 3, "struct_type": 6, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 12, "memory_management": 0, "memory_operation": 0, "if_statement": 11, "for_loop": 0, "while_loop": 3, "switch_statement": 3, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 6}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsSupplementaryPrivateUseAreaB.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsSupplementaryPrivateUseAreaB", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsSupplementaryPrivateUseAreaB(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsSupplementaryPrivateUseAreaB\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsSupplementaryPrivateUseAreaB\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsSupplementaryPrivateUseAreaB(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "wget-1.21.4#http_prep#ensure_extension.c", "codebase": "wget-1.21.4", "c_file": "http.c", "function": "ensure_extension", "sloc": "32", "c_code": "void\nensure_extension (struct http_stat *hs, const char *ext, int *dt)\n{\n char *last_period_in_local_filename = strrchr (hs->local_file, '.');\n char shortext[8];\n int len;\n shortext[0] = '\\0';\n len = strlen (ext);\n if (len == 5)\n {\n memcpy (shortext, ext, len - 1);\n shortext[len - 1] = '\\0';\n }\n if (last_period_in_local_filename == ((void *)0)\n || !(0 == strcasecmp (last_period_in_local_filename, shortext)\n || 0 == strcasecmp (last_period_in_local_filename, ext)))\n {\n int local_filename_len = strlen (hs->local_file);\n hs->local_file = xrealloc (hs->local_file,\n local_filename_len + 24 + len);\n strcpy (hs->local_file + local_filename_len, ext);\n if (!(opt.noclobber || opt.always_rest || opt.timestamping || opt.dirstruct || opt.output_document || opt.backups > 0) && file_exists_p (hs->local_file, ((void *)0)))\n {\n int ext_num = 1;\n do\n sprintf (hs->local_file + local_filename_len,\n \".%d%s\", ext_num++, ext);\n while (file_exists_p (hs->local_file, ((void *)0)));\n }\n *dt |= ADDED_HTML_EXTENSION;\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#g_var_inl_c_prep#Pl_Blt_G_Assign.c", "codebase": "gprolog-1.5.0", "c_file": "g_var_inl_c.c", "function": "Pl_Blt_G_Assign", "sloc": "7", "c_code": "void\nPl_Blt_G_Assign(WamWord x, WamWord y)\n{\n Pl_Set_C_Bip_Name(\"g_assign\", 2);\n G_Assign(x, y, 0, 1);\n Pl_Unset_C_Bip_Name();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#CALCULATE_MAXIMUM_VALUE_USING_SIGN_TWO_NUMBERS_STRING_prep#main.c", "codebase": "transcoder-set", "c_file": "CALCULATE_MAXIMUM_VALUE_USING_SIGN_TWO_NUMBERS_STRING.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n char param0[][100] = {\"pR\",\"9518\",\"1\",\"nNMCIXUCpRMmvO\",\"3170487\",\"0100101010\",\"Z rONcUqWb\",\"00419297\",\"00\",\"r\"};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "cflow-1.7#c_prep#yy_scan_bytes.c", "codebase": "cflow-1.7", "c_file": "c.c", "function": "yy_scan_bytes", "sloc": "19", "c_code": "YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len )\n{\n YY_BUFFER_STATE b;\n char *buf;\n yy_size_t n;\n yy_size_t i;\n n = _yybytes_len + 2;\n buf = (char *) yyalloc(n );\n if ( ! buf )\n yy_fatal_error( \"out of dynamic memory in yy_scan_bytes()\" );\n for ( i = 0; i < _yybytes_len; ++i )\n buf[i] = yybytes[i];\n buf[_yybytes_len] = buf[_yybytes_len+1] = 0;\n b = yy_scan_buffer(buf,n );\n if ( ! b )\n yy_fatal_error( \"bad buffer in yy_scan_bytes()\" );\n b->yy_is_our_buffer = 1;\n return b;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_VALUE_CHOICE_EITHER_DIVIDING_CONSIDERING_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_VALUE_CHOICE_EITHER_DIVIDING_CONSIDERING.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_location_information_prep#json_write_string.c", "codebase": "json.h", "c_file": "allow_location_information.c", "function": "json_write_string", "sloc": "41", "c_code": "char *json_write_string(const struct json_string_s *string, char *data) {\n size_t i;\n *data++ = '\"';\n for (i = 0; i < string->string_size; i++) {\n switch (string->string[i]) {\n case '\"':\n *data++ = '\\\\';\n *data++ = '\"';\n break;\n case '\\\\':\n *data++ = '\\\\';\n *data++ = '\\\\';\n break;\n case '\\b':\n *data++ = '\\\\';\n *data++ = 'b';\n break;\n case '\\f':\n *data++ = '\\\\';\n *data++ = 'f';\n break;\n case '\\n':\n *data++ = '\\\\';\n *data++ = 'n';\n break;\n case '\\r':\n *data++ = '\\\\';\n *data++ = 'r';\n break;\n case '\\t':\n *data++ = '\\\\';\n *data++ = 't';\n break;\n default:\n *data++ = string->string[i];\n break;\n }\n }\n *data++ = '\"';\n return data;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 8}}, {"id": "gzip-1.12#strerror_r_prep#rpl_strerror_r.c", "codebase": "gzip-1.12", "c_file": "strerror_r.c", "function": "rpl_strerror_r", "sloc": "37", "c_code": "int\nrpl_strerror_r (int errnum, char *buf, size_t buflen)\n{\n if (buflen <= 1)\n {\n if (buflen)\n *buf = '\\0';\n return 34;\n }\n *buf = '\\0';\n {\n char const *msg = ((void *)0);\n if (msg)\n return safe_copy (buf, buflen, msg);\n }\n {\n int ret;\n int saved_errno = (*__errno_location ());\n {\n ret = 0;\n ret = __xpg_strerror_r (errnum, buf, buflen);\n if (ret < 0)\n ret = (*__errno_location ());\n if (!*buf)\n {\n char *errstring = strerror_r (errnum, buf, buflen);\n ret = errstring ? safe_copy (buf, buflen, errstring) : (*__errno_location ());\n }\n }\n if (ret == 22 && !*buf)\n {\n snprintf (buf, buflen, \"Unknown error %d\", errnum);\n }\n (*__errno_location ()) = saved_errno;\n return ret;\n }\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsThaana.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsThaana", "sloc": "4", "c_code": "int\nxmlUCSIsThaana(int code) {\n return(((code >= 0x0780) && (code <= 0x07BF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathCastStringToNumber.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathCastStringToNumber", "sloc": "4", "c_code": "double\nxmlXPathCastStringToNumber(const xmlChar * val) {\n return(xmlXPathStringEvalNumber(val));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_TOTAL_SET_BITS_IN_ALL_NUMBERS_FROM_1_TO_N_prep#main.c", "codebase": "transcoder-set", "c_file": "COUNT_TOTAL_SET_BITS_IN_ALL_NUMBERS_FROM_1_TO_N.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {90,56,43,31,77,35,43,66,15,95};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#COUNT_NUMBER_WAYS_TILE_FLOOR_SIZE_N_X_M_USING_1_X_M_SIZE_TILES_prep#main.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBER_WAYS_TILE_FLOOR_SIZE_N_X_M_USING_1_X_M_SIZE_TILES.c", "function": "main", "sloc": "15", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {93,17,38,33,78,40,95,12,69,78};\n int param1[] = {54,4,39,64,35,61,6,8,60,21};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#SUM_FIBONACCI_NUMBERS_prep#main.c", "codebase": "transcoder-set", "c_file": "SUM_FIBONACCI_NUMBERS.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {9,50,7,21,21,91,11,25,62,4};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "optipng-0.7.8#zutil_prep#zlibCompileFlags.c", "codebase": "optipng-0.7.8", "c_file": "zutil.c", "function": "zlibCompileFlags", "sloc": "31", "c_code": "uLong zlibCompileFlags(void) {\n uLong flags;\n flags = 0;\n switch ((int)(sizeof(uInt))) {\n case 2: break;\n case 4: flags += 1; break;\n case 8: flags += 2; break;\n default: flags += 3;\n }\n switch ((int)(sizeof(uLong))) {\n case 2: break;\n case 4: flags += 1 << 2; break;\n case 8: flags += 2 << 2; break;\n default: flags += 3 << 2;\n }\n switch ((int)(sizeof(voidpf))) {\n case 2: break;\n case 4: flags += 1 << 4; break;\n case 8: flags += 2 << 4; break;\n default: flags += 3 << 4;\n }\n switch ((int)(sizeof(off_t))) {\n case 2: break;\n case 4: flags += 1 << 6; break;\n case 8: flags += 2 << 6; break;\n default: flags += 3 << 6;\n }\n flags += 1L << 16;\n flags += 1L << 17;\n return flags;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 4, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 12}}, {"id": "transcoder-set#SUM_SERIES_12_32_52_2N_12_1_prep#main.c", "codebase": "transcoder-set", "c_file": "SUM_SERIES_12_32_52_2N_12_1.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {84,74,91,34,36,28,70,7,24,47};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libosip2-5.3.1#osip_dialog_prep#osip_dialog_update_route_set_as_uas.c", "codebase": "libosip2-5.3.1", "c_file": "osip_dialog.c", "function": "osip_dialog_update_route_set_as_uas", "sloc": "21", "c_code": "int osip_dialog_update_route_set_as_uas(osip_dialog_t *dialog, osip_message_t *invite) {\n osip_contact_t *contact;\n int i;\n if (dialog == ((void *)0))\n return -2;\n if (invite == ((void *)0))\n return -2;\n if (osip_list_eol(&invite->contacts, 0)) {\n osip_trace(\"osip_dialog.c\", 44, TRACE_LEVEL3, ((void *)0), \"missing a contact in invite!\\n\");\n } else {\n if (dialog->remote_contact_uri != ((void *)0)) {\n osip_contact_free(dialog->remote_contact_uri);\n }\n dialog->remote_contact_uri = ((void *)0);\n contact = osip_list_get(&invite->contacts, 0);\n i = osip_contact_clone(contact, &(dialog->remote_contact_uri));\n if (i != 0)\n return i;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "nano-7.2#global_prep#first_sc_for.c", "codebase": "nano-7.2", "c_file": "global.c", "function": "first_sc_for", "sloc": "7", "c_code": "const keystruct *first_sc_for(int menu, void (*function)(void))\n{\n for (keystruct *sc = sclist; sc != ((void *)0); sc = sc->next)\n if ((sc->menus & menu) && sc->func == function && sc->keystr[0])\n return sc;\n return ((void *)0);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#SMALLEST_SUM_CONTIGUOUS_SUBARRAY_prep#max.c", "codebase": "transcoder-set", "c_file": "SMALLEST_SUM_CONTIGUOUS_SUBARRAY.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#hash_prep#hash_free.c", "codebase": "tar-1.34", "c_file": "hash.c", "function": "hash_free", "sloc": "33", "c_code": "void\nhash_free (Hash_table *table)\n{\n struct hash_entry *bucket;\n struct hash_entry *cursor;\n struct hash_entry *next;\n if (table->data_freer && table->n_entries)\n {\n for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)\n {\n if (bucket->data)\n {\n for (cursor = bucket; cursor; cursor = cursor->next)\n table->data_freer (cursor->data);\n }\n }\n }\n for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)\n {\n for (cursor = bucket->next; cursor; cursor = next)\n {\n next = cursor->next;\n free (cursor);\n }\n }\n for (cursor = table->free_entry_list; cursor; cursor = next)\n {\n next = cursor->next;\n free (cursor);\n }\n free (table->bucket);\n free (table);\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 4, "memory_operation": 0, "if_statement": 2, "for_loop": 5, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#b-fb_prep#Oerror.c", "codebase": "rcs-5.10.1", "c_file": "b-fb.c", "function": "Oerror", "sloc": "8", "c_code": "void\nOerror (void)\n{\n if ((top->behavior. Oerrloop))\n thank_you_and_goodnight ((top->program-> tyag));\n (top->behavior. Oerrloop) = 1;\n fatal_sys (\"output error\");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#hash_prep#hash_get_entries.c", "codebase": "tar-1.34", "c_file": "hash.c", "function": "hash_get_entries", "sloc": "21", "c_code": "size_t\nhash_get_entries (const Hash_table *table, void **buffer,\n size_t buffer_size)\n{\n size_t counter = 0;\n struct hash_entry const *bucket;\n struct hash_entry const *cursor;\n for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)\n {\n if (bucket->data)\n {\n for (cursor = bucket; cursor; cursor = cursor->next)\n {\n if (counter >= buffer_size)\n return counter;\n buffer[counter++] = cursor->data;\n }\n }\n }\n return counter;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "less-633#optfunc_prep#opt_intr.c", "codebase": "less-633", "c_file": "optfunc.c", "function": "opt_intr", "sloc": "17", "c_code": "void opt_intr(int type, char *s)\n{\n PARG p;\n switch (type)\n {\n case 0:\n case 2:\n intr_char = *s;\n if (intr_char == '^' && s[1] != '\\0')\n intr_char = ((s[1])&037);\n break;\n case 1: {\n p.p_string = prchar(intr_char);\n error(\"interrupt character is %s\", &p);\n break; }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 2}}, {"id": "transcoder-set#RECURSIVELY_BREAK_NUMBER_3_PARTS_GET_MAXIMUM_SUM_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "RECURSIVELY_BREAK_NUMBER_3_PARTS_GET_MAXIMUM_SUM.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_INSERTIONS_SORT_ARRAY_prep#len.c", "codebase": "transcoder-set", "c_file": "MINIMUM_INSERTIONS_SORT_ARRAY.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#terminal_prep#Pl_LE_Emit_Beep.c", "codebase": "gprolog-1.5.0", "c_file": "terminal.c", "function": "Pl_LE_Emit_Beep", "sloc": "5", "c_code": "void\nPl_LE_Emit_Beep(void)\n{\n Pl_LE_Put_Char('\\a');\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "make-4.4.1#file_prep#enter_file.c", "codebase": "make-4.4.1", "c_file": "file.c", "function": "enter_file", "sloc": "33", "c_code": "struct file *\nenter_file (const char *name)\n{\n struct file *f;\n struct file *new;\n struct file **file_slot;\n struct file file_key;\n ((void) (0));\n ((void) (0));\n file_key.hname = name;\n file_slot = (struct file **) hash_find_slot (&files, &file_key);\n f = *file_slot;\n if (! ((f) == 0 || (void *) (f) == hash_deleted_item) && !f->double_colon)\n {\n f->builtin = 0;\n return f;\n }\n new = xcalloc (sizeof (struct file));\n new->name = new->hname = name;\n new->update_status = us_none;\n if (((f) == 0 || (void *) (f) == hash_deleted_item))\n {\n new->last = new;\n hash_insert_at (&files, new, file_slot);\n }\n else\n {\n new->double_colon = f;\n f->last->prev = new;\n f->last = new;\n }\n return new;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Sinh.c", "codebase": "gprolog-1.5.0", "c_file": "arith_inl_c.c", "function": "Pl_Fct_Sinh", "sloc": "5", "c_code": "WamWord\nPl_Fct_Sinh(WamWord x)\n{\n return Make_Tagged_Float(sinh(To_Double(x)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Check_For_Un_List.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Check_For_Un_List", "sloc": "6", "c_code": "void\nPl_Check_For_Un_List(WamWord start_word)\n{\n if (!Pl_Blt_List_Or_Partial_List(start_word))\n Pl_Err_Type(pl_type_list, start_word);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tinycc#x86_64-gen_prep#gen_addr32.c", "codebase": "tinycc", "c_file": "x86_64-gen.c", "function": "gen_addr32", "sloc": "6", "c_code": "void gen_addr32(int r, Sym *sym, int c)\n{\n if (r & 0x0200)\n greloca(cur_text_section, sym, ind, 11, c), c=0;\n gen_le32(c);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ccm-aes128_prep#nettle_ccm_aes128_update.c", "codebase": "nettle-3.9.1", "c_file": "ccm-aes128.c", "function": "nettle_ccm_aes128_update", "sloc": "7", "c_code": "void\nnettle_ccm_aes128_update(struct ccm_aes128_ctx *ctx,\n size_t length, const uint8_t *data)\n{\n nettle_ccm_update(&ctx->ccm, &ctx->cipher, (nettle_cipher_func *) nettle_aes128_encrypt,\n length, data);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#decode_prep#lesskey.c", "codebase": "less-633", "c_file": "decode.c", "function": "lesskey", "sloc": "41", "c_code": "int lesskey(char *filename, int sysvar)\n{\n char *buf;\n POSITION len;\n long n;\n int f;\n if (secure)\n return (1);\n f = open(filename, (00));\n if (f < 0)\n return (1);\n len = filesize(f);\n if (len == ((POSITION)(-1)) || len < 3)\n {\n close(f);\n return (-1);\n }\n if ((buf = (char *) calloc((int)len, sizeof(char))) == ((void *)0))\n {\n close(f);\n return (-1);\n }\n if (lseek(f, (off_t)0, 0) == ((off_t)-1))\n {\n free(buf);\n close(f);\n return (-1);\n }\n n = read(f, buf, (unsigned int) len);\n close(f);\n if (n != len)\n {\n free(buf);\n return (-1);\n }\n if (len < 4 ||\n buf[0] != '\\0' || buf[1] != 'M' ||\n buf[2] != '+' || buf[3] != 'G')\n return (old_lesskey(buf, (int)len));\n return (new_lesskey(buf, (int)len, sysvar));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 3, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 8, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM_prep#max.c", "codebase": "transcoder-set", "c_file": "PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_1.c", "function": "f_gold", "sloc": "17", "c_code": "int f_gold ( int m, int n ) {\n int count [ m ] [ n ];\n for ( int i = 0;\n i < m;\n i ++ ) count [ i ] [ 0 ] = 1;\n for ( int j = 0;\n j < n;\n j ++ ) count [ 0 ] [ j ] = 1;\n for ( int i = 1;\n i < m;\n i ++ ) {\n for ( int j = 1;\n j < n;\n j ++ ) count [ i ] [ j ] = count [ i - 1 ] [ j ] + count [ i ] [ j - 1 ];\n }\n return count [ m - 1 ] [ n - 1 ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 4, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "indent-2.2.13#code_io_prep#current_column.c", "codebase": "indent-2.2.13", "c_file": "code_io.c", "function": "current_column", "sloc": "36", "c_code": "extern int current_column (void)\n{\n char *p;\n int column;\n if ((buf_ptr >= save_com.ptr) && (buf_ptr <= save_com.ptr + save_com.len))\n {\n p = save_com.ptr;\n column = save_com.start_column;\n }\n else\n {\n p = cur_line;\n column = 1;\n }\n while (p < buf_ptr)\n {\n switch (*p)\n {\n case '\\n':\n case 014:\n column = 1;\n break;\n case '\\t':\n column += settings.tabsize - (column - 1) % settings.tabsize;\n break;\n case '\\b':\n column--;\n break;\n default:\n column++;\n break;\n }\n p++;\n }\n return column;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 4}}, {"id": "optipng-0.7.8#pngwutil_prep#png_write_sBIT.c", "codebase": "optipng-0.7.8", "c_file": "pngwutil.c", "function": "png_write_sBIT", "sloc": "44", "c_code": "void\npng_write_sBIT(png_structrp png_ptr, png_const_color_8p sbit, int color_type)\n{\n png_byte buf[4];\n size_t size;\n ((void)0);\n if ((color_type & 2) != 0)\n {\n png_byte maxbits;\n maxbits = (png_byte)(color_type==(2 | 1) ? 8 :\n png_ptr->usr_bit_depth);\n if (sbit->red == 0 || sbit->red > maxbits ||\n sbit->green == 0 || sbit->green > maxbits ||\n sbit->blue == 0 || sbit->blue > maxbits)\n {\n png_warning(png_ptr, \"Invalid sBIT depth specified\");\n return;\n }\n buf[0] = sbit->red;\n buf[1] = sbit->green;\n buf[2] = sbit->blue;\n size = 3;\n }\n else\n {\n if (sbit->gray == 0 || sbit->gray > png_ptr->usr_bit_depth)\n {\n png_warning(png_ptr, \"Invalid sBIT depth specified\");\n return;\n }\n buf[0] = sbit->gray;\n size = 1;\n }\n if ((color_type & 4) != 0)\n {\n if (sbit->alpha == 0 || sbit->alpha > png_ptr->usr_bit_depth)\n {\n png_warning(png_ptr, \"Invalid sBIT depth specified\");\n return;\n }\n buf[size++] = sbit->alpha;\n }\n png_write_complete_chunk(png_ptr, (((png_uint_32)(115) << (24)) | ((png_uint_32)(66) << (16)) | ((png_uint_32)(73) << (8)) | ((png_uint_32)(84) << (0))), buf, size);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tar-1.34#argmatch_prep#argmatch_valid.c", "codebase": "tar-1.34", "c_file": "argmatch.c", "function": "argmatch_valid", "sloc": "20", "c_code": "void\nargmatch_valid (const char *const *arglist,\n const void *vallist, size_t valsize)\n{\n size_t i;\n const char *last_val = ((void *)0);\n fputs_unlocked (gettext (\"Valid arguments are:\"),stderr);\n for (i = 0; arglist[i]; i++)\n if ((i == 0)\n || memcmp (last_val, (char const *) vallist + valsize * i, valsize))\n {\n fprintf (stderr, \"\\n - %s\", quote (arglist[i]));\n last_val = (char const *) vallist + valsize * i;\n }\n else\n {\n fprintf (stderr, \", %s\", quote (arglist[i]));\n }\n putc_unlocked ('\\n',stderr);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlURISetScheme.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlURISetScheme", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlURISetScheme(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlURIPtr URI;\n PyObject *pyobj_URI;\n char * scheme;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Oz:xmlURISetScheme\", &pyobj_URI, &scheme))\n return(((void *)0));\n URI = (xmlURIPtr) (((pyobj_URI) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyURI_Object *)(pyobj_URI))->obj));\n if (URI->scheme != ((void *)0)) xmlFree(URI->scheme);\n URI->scheme = (char *)xmlStrdup((const xmlChar *)scheme);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_equals_in_object_prep#json_value_as_string.c", "codebase": "json.h", "c_file": "allow_equals_in_object.c", "function": "json_value_as_string", "sloc": "6", "c_code": "struct json_string_s *json_value_as_string(struct json_value_s *const value) {\n if (value->type != json_type_string) {\n return 0;\n }\n return (struct json_string_s *)value->payload;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_2_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_2.c", "function": "f_gold", "sloc": "6", "c_code": "int f_gold ( int n ) {\n int nthElement = 19 + ( n - 1 ) * 9;\n int outliersCount = ( int ) log10 ( nthElement ) - 1;\n nthElement += 9 * outliersCount;\n return nthElement;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#NEXT_POWER_OF_2_2_prep#main.c", "codebase": "transcoder-set", "c_file": "NEXT_POWER_OF_2_2.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {63,78,13,5,34,69,63,78,80,19};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#xpath_prep#xmlXPathStringEvalNumber.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathStringEvalNumber", "sloc": "72", "c_code": "double\nxmlXPathStringEvalNumber(const xmlChar *str) {\n const xmlChar *cur = str;\n double ret;\n int ok = 0;\n int isneg = 0;\n int exponent = 0;\n int is_exponent_negative = 0;\n unsigned long tmp = 0;\n double temp;\n if (cur == ((void *)0)) return(0);\n while ((((*cur) == 0x20) || ((0x9 <= (*cur)) && ((*cur) <= 0xa)) || ((*cur) == 0xd))) cur++;\n if (*cur == '-') {\n isneg = 1;\n cur++;\n }\n if ((*cur != '.') && ((*cur < '0') || (*cur > '9'))) {\n return(xmlXPathNAN);\n }\n ret = 0;\n while ((*cur >= '0') && (*cur <= '9')) {\n ret = ret * 10;\n tmp = (*cur - '0');\n ok = 1;\n cur++;\n temp = (double) tmp;\n ret = ret + temp;\n }\n if (*cur == '.') {\n int v, frac = 0, max;\n double fraction = 0;\n cur++;\n if (((*cur < '0') || (*cur > '9')) && (!ok)) {\n return(xmlXPathNAN);\n }\n while (*cur == '0') {\n frac = frac + 1;\n cur++;\n }\n max = frac + 20;\n while (((*cur >= '0') && (*cur <= '9')) && (frac < max)) {\n v = (*cur - '0');\n fraction = fraction * 10 + v;\n frac = frac + 1;\n cur++;\n }\n fraction /= pow(10.0, frac);\n ret = ret + fraction;\n while ((*cur >= '0') && (*cur <= '9'))\n cur++;\n }\n if ((*cur == 'e') || (*cur == 'E')) {\n cur++;\n if (*cur == '-') {\n is_exponent_negative = 1;\n cur++;\n } else if (*cur == '+') {\n cur++;\n }\n while ((*cur >= '0') && (*cur <= '9')) {\n if (exponent < 1000000)\n exponent = exponent * 10 + (*cur - '0');\n cur++;\n }\n }\n while ((((*cur) == 0x20) || ((0x9 <= (*cur)) && ((*cur) <= 0xa)) || ((*cur) == 0xd))) cur++;\n if (*cur != 0) return(xmlXPathNAN);\n if (isneg) ret = -ret;\n if (is_exponent_negative) exponent = -exponent;\n ret *= pow(10.0, (double)exponent);\n return(ret);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 12, "for_loop": 0, "while_loop": 7, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "tinycc#tccelf_prep#section_add.c", "codebase": "tinycc", "c_file": "tccelf.c", "function": "section_add", "sloc": "12", "c_code": "size_t section_add(Section *sec, Elf64_Addr size, int align)\n{\n size_t offset, offset1;\n offset = (sec->data_offset + align - 1) & -align;\n offset1 = offset + size;\n if (sec->sh_type != 8 && offset1 > sec->data_allocated)\n section_realloc(sec, offset1);\n sec->data_offset = offset1;\n if (align > sec->sh_addralign)\n sec->sh_addralign = align;\n return offset;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_WHETHER_GIVEN_DEGREES_VERTICES_REPRESENT_GRAPH_TREE_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "CHECK_WHETHER_GIVEN_DEGREES_VERTICES_REPRESENT_GRAPH_TREE.c", "function": "f_filled", "sloc": "1", "c_code": "_Bool f_filled ( int degree [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_ao_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_ao_start", "sloc": "4", "c_code": "int ti_ao_start(double const *options) {\n (void)options;\n return 33;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#utest_should_filter_test.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "utest_should_filter_test", "sloc": "42", "c_code": "__attribute__((weak)) int utest_should_filter_test(const char *filter,\n const char *testcase) {\n if (filter) {\n const char *filter_cur = filter;\n const char *testcase_cur = testcase;\n const char *filter_wildcard = 0;\n while (('\\0' != *filter_cur) && ('\\0' != *testcase_cur)) {\n if ('*' == *filter_cur) {\n filter_wildcard = filter_cur;\n filter_cur++;\n while (('\\0' != *filter_cur) && ('\\0' != *testcase_cur)) {\n if ('*' == *filter_cur) {\n break;\n } else if (*filter_cur != *testcase_cur) {\n filter_cur = filter_wildcard;\n }\n testcase_cur++;\n filter_cur++;\n }\n if (('\\0' == *filter_cur) && ('\\0' == *testcase_cur)) {\n return 0;\n }\n if ('\\0' == *testcase_cur) {\n return 1;\n }\n } else {\n if (*testcase_cur != *filter_cur) {\n return 1;\n } else {\n testcase_cur++;\n filter_cur++;\n }\n }\n }\n if (('\\0' != *filter_cur) ||\n (('\\0' != *testcase_cur) &&\n ((filter == filter_cur) || ('*' != filter_cur[-1])))) {\n return 1;\n }\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 8, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 1}}, {"id": "transcoder-set#MULTIPLY_AN_INTEGER_WITH_3_5_prep#min.c", "codebase": "transcoder-set", "c_file": "MULTIPLY_AN_INTEGER_WITH_3_5.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bc-1.07.1#util_prep#arg_str.c", "codebase": "bc-1.07.1", "c_file": "util.c", "function": "arg_str", "sloc": "9", "c_code": "char *\narg_str (arg_list *args)\n{\n if (arglist2 != ((void *)0))\n free (arglist2);\n arglist2 = arglist1;\n arglist1 = make_arg_str (args, 1);\n return (arglist1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#gcm-sm4_prep#nettle_gcm_sm4_update.c", "codebase": "nettle-3.9.1", "c_file": "gcm-sm4.c", "function": "nettle_gcm_sm4_update", "sloc": "6", "c_code": "void\nnettle_gcm_sm4_update(struct gcm_sm4_ctx *ctx,\n size_t length, const uint8_t *data)\n{\n nettle_gcm_update(&(ctx)->gcm, &(ctx)->key, (length), (data));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SEARCH_AN_ELEMENT_IN_A_SORTED_AND_PIVOTED_ARRAY_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SEARCH_AN_ELEMENT_IN_A_SORTED_AND_PIVOTED_ARRAY.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int l, int h, int key ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES_prep#sort.c", "codebase": "transcoder-set", "c_file": "NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "bc-1.07.1#numeric_prep#dc_num2int.c", "codebase": "bc-1.07.1", "c_file": "numeric.c", "function": "dc_num2int", "sloc": "16", "c_code": "int\ndc_num2int (\n dc_num value ,\n dc_discard discard_p )\n{\n long result;\n result = bc_num2long((value));\n if (result == 0 && !bc_is_zero((value))) {\n fprintf(stderr, \"%s: value overflows simple integer; punting...\\n\",\n progname);\n result = -1;\n }\n if (discard_p == DC_TOSS)\n dc_free_num(&value);\n return (int)result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#ma2asm_inst_prep#Dico_Long_Stop.c", "codebase": "gprolog-1.5.0", "c_file": "ma2asm_inst.c", "function": "Dico_Long_Stop", "sloc": "4", "c_code": "void\nDico_Long_Stop(int nb)\n{\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "heman#vec3_prep#kmVec3GetHorizontalAngle.c", "codebase": "heman", "c_file": "vec3.c", "function": "kmVec3GetHorizontalAngle", "sloc": "14", "c_code": "kmVec3* kmVec3GetHorizontalAngle(kmVec3* pOut, const kmVec3 *pIn) {\n const float z1 = sqrt(pIn->x * pIn->x + pIn->z * pIn->z);\n pOut->y = kmRadiansToDegrees(atan2(pIn->x, pIn->z));\n if (pOut->y < 0)\n pOut->y += 360;\n if (pOut->y >= 360)\n pOut->y -= 360;\n pOut->x = kmRadiansToDegrees(atan2(z1, pIn->y)) - 90.0;\n if (pOut->x < 0)\n pOut->x += 360;\n if (pOut->x >= 360)\n pOut->x -= 360;\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY_1.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr1 [ ], int arr2 [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SEARCH_INSERT_AND_DELETE_IN_AN_UNSORTED_ARRAY_prep#main.c", "codebase": "transcoder-set", "c_file": "SEARCH_INSERT_AND_DELETE_IN_AN_UNSORTED_ARRAY.c", "function": "main", "sloc": "26", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {4,8,11,23,55,57,73,74,77,79,93};\nint param0_1[] = {-88,12,-62,-66,-24,18,12,22,94,30,-50,-42,-94,18,76,-6,-48,-68,48,36,-78,52,-82,76,2,-44,-10,88};\nint param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};\nint param0_3[] = {33,9,93,70,81,70,56,66,72,81,74,32,71,72,3,81,70,22,82,2,75,18,90,29,48};\nint param0_4[] = {-98,-70,-62,-60,-60,-54,-48,-48,-46,-44,-34,-26,-18,-6,4,18,28,32,34,40,50,54,56,62,64,64,98};\nint param0_5[] = {1,1,1,1,0,0,0,0,1,0,0,1,0,0,1,1,0,1,1,0,0,1};\nint param0_6[] = {4,6,7,10,10,12,13,18,23,29,29,34,46,54,60,61,63,67,69,70,72,76,79,79,81,82,88,90,99};\nint param0_7[] = {94,34,-60,-74,86,80,68,-48,78,-62,-98,-44,-44,92,-94,-86,-36,12,84,-90,52,42,-42,-66,88,76,66};\nint param0_8[] = {0,0,0,1};\nint param0_9[] = {76,59,38,83,38,93,27,11,17,80,26,28,35,53,88,10,9,75};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {8,27,11,24,18,17,15,21,2,12};\n int param2[] = {11,12,0,72,23,16,28,16,3,13};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "less-633#position_prep#add_back_pos.c", "codebase": "less-633", "c_file": "position.c", "function": "add_back_pos", "sloc": "7", "c_code": "void add_back_pos(POSITION pos)\n{\n int i;\n for (i = sc_height - 1; i > 0; i--)\n table[i] = table[i-1];\n table[0] = pos;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#fdutimensat_prep#fdutimensat.c", "codebase": "tar-1.34", "c_file": "fdutimensat.c", "function": "fdutimensat", "sloc": "16", "c_code": "int\nfdutimensat (int fd, int dir, char const *file, struct timespec const ts[2],\n int atflag)\n{\n int result = 1;\n if (0 <= fd)\n result = futimens (fd, ts);\n if (file && (fd < 0 || (result == -1 && (*__errno_location ()) == 38)))\n result = utimensat (dir, file, ts, atflag);\n if (result == 1)\n {\n (*__errno_location ()) = 9;\n result = -1;\n }\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#inttostr_prep#inttostr.c", "codebase": "tar-1.34", "c_file": "inttostr.c", "function": "inttostr", "sloc": "20", "c_code": "char * __attribute__ ((__warn_unused_result__))\ninttostr (int i, char *buf)\n{\n char *p = buf + (((((sizeof (int) * 8) - (! ((__typeof__ (int)) 0 < (__typeof__ (int)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (int)) 0 < (__typeof__ (int)) -1)));\n *p = 0;\n if (i < 0)\n {\n do\n *--p = '0' - i % 10;\n while ((i /= 10) != 0);\n *--p = '-';\n }\n else\n {\n do\n *--p = '0' + i % 10;\n while ((i /= 10) != 0);\n }\n return p;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#layout_prep#layout_fix_panes.c", "codebase": "tmux", "c_file": "layout.c", "function": "layout_fix_panes", "sloc": "39", "c_code": "void\nlayout_fix_panes(struct window *w, u_int wsx, u_int wsy)\n{\n struct window_pane *wp;\n struct layout_cell *lc;\n u_int sx, sy;\n int shift, status, at_top;\n status = options_get_number(w->options, \"pane-border-status\");\n at_top = (status == 1);\n for((wp) = ((&w->panes)->tqh_first); (wp) != ((void *)0); (wp) = ((wp)->entry.tqe_next)) {\n if ((lc = wp->layout_cell) == ((void *)0))\n continue;\n if (status != 0)\n shift = layout_need_status(lc, at_top);\n else\n shift = 0;\n wp->xoff = lc->xoff;\n wp->yoff = lc->yoff;\n if (shift && at_top)\n wp->yoff += 1;\n if (lc->xoff >= wsx || lc->xoff + lc->sx < wsx)\n sx = lc->sx;\n else {\n sx = wsx - lc->xoff;\n if (sx < 1)\n sx = lc->sx;\n }\n if (lc->yoff >= wsy || lc->yoff + lc->sy < wsy)\n sy = lc->sy;\n else {\n sy = wsy - lc->yoff;\n if (sy < 2)\n sy = lc->sy;\n }\n if (shift)\n sy -= 1;\n window_pane_resize(wp, sx, sy);\n }\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 8, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "findutils-4.9.0#timespec-sub_prep#timespec_sub.c", "codebase": "findutils-4.9.0", "c_file": "timespec-sub.c", "function": "timespec_sub", "sloc": "34", "c_code": "struct timespec\ntimespec_sub (struct timespec a, struct timespec b)\n{\n time_t rs = a.tv_sec;\n time_t bs = b.tv_sec;\n int ns = a.tv_nsec - b.tv_nsec;\n int rns = ns;\n if (ns < 0)\n {\n rns = ns + TIMESPEC_HZ;\n time_t bs1;\n if (!__builtin_add_overflow (bs, 1, &bs1))\n bs = bs1;\n else if (- (! ((time_t) 0 < (time_t) -1)) < rs)\n rs--;\n else\n goto low_overflow;\n }\n if (__builtin_sub_overflow (rs, bs, &rs))\n {\n if (0 < bs)\n {\n low_overflow:\n rs = ((time_t) ~ ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1))));\n rns = 0;\n }\n else\n {\n rs = ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1)));\n rns = TIMESPEC_HZ - 1;\n }\n }\n return make_timespec (rs, rns);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 1, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#gifread_prep#GIFInitImage.c", "codebase": "optipng-0.7.8", "c_file": "gifread.c", "function": "GIFInitImage", "sloc": "6", "c_code": "void GIFInitImage(struct GIFImage *image,\n struct GIFScreen *screen, unsigned char **rows)\n{\n image->Screen = screen;\n image->Rows = rows;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "uucp-1.07#xqtsub_prep#fsysdep_unlock_uuxqt.c", "codebase": "uucp-1.07", "c_file": "xqtsub.c", "function": "fsysdep_unlock_uuxqt", "sloc": "22", "c_code": "boolean\nfsysdep_unlock_uuxqt (iseq, zcmd, cmaxuuxqts)\n int iseq;\n const char *zcmd;\n int cmaxuuxqts __attribute__ ((__unused__));\n{\n char ab[sizeof \"LCK.XQT.9999\"];\n boolean fret;\n fret = (1);\n sprintf (ab, \"LCK.XQT.%d\", iseq);\n if (! fsdo_unlock (ab, (1)))\n fret = (0);\n if (zcmd != ((void *)0))\n {\n char abcmd[sizeof \"LXQ.123456789\"];\n sprintf (abcmd, \"LXQ.%.9s\", zcmd);\n abcmd[strcspn (abcmd, \" \\t/\")] = '\\0';\n if (! fsdo_unlock (abcmd, (1)))\n fret = (0);\n }\n return fret;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "urlparser#gen_char_category_table_prep#main.c", "codebase": "urlparser", "c_file": "gen_char_category_table.c", "function": "main", "sloc": "16", "c_code": "int main()\n{\n fill( Scheme , alnum, \"+-.\");\n fill( Unreserved, alnum, unreserved);\n fill( GenDelim , alnum, \":/?#[]@\");\n fill( SubDelim , alnum, subdelim);\n fill( PCharSlash, alnum, \":@/%\");\n fill( PCharSlash, unreserved, subdelim);\n fill( HexDigit, \"0123456789\", \"abcdef\" \"ABCDEF\");\n fill( Query, alnum, \"/?:@%\");\n fill( Query, unreserved, subdelim);\n fill( Userinfo, alnum, \":%\");\n fill( Userinfo, unreserved, subdelim);\n fill( IPv6Char, \"0123456789\", \"abcdef\" \"ABCDEF\" \":\");\n print_table();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_uri_prep#__osip_uri_escape_header_param.c", "codebase": "libosip2-5.3.1", "c_file": "osip_uri.c", "function": "__osip_uri_escape_header_param", "sloc": "3", "c_code": "char *__osip_uri_escape_header_param(char *string) {\n return __osip_uri_escape_nonascii_and_nondef(string, header_param_def);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SMALLEST_OF_THREE_INTEGERS_WITHOUT_COMPARISON_OPERATORS_prep#sort.c", "codebase": "transcoder-set", "c_file": "SMALLEST_OF_THREE_INTEGERS_WITHOUT_COMPARISON_OPERATORS.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngget_prep#png_get_chunk_cache_max.c", "codebase": "optipng-0.7.8", "c_file": "pngget.c", "function": "png_get_chunk_cache_max", "sloc": "5", "c_code": "png_uint_32\npng_get_chunk_cache_max(png_const_structrp png_ptr)\n{\n return (png_ptr ? png_ptr->user_chunk_cache_max : 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#tccelf_prep#find_elf_sym.c", "codebase": "tinycc", "c_file": "tccelf.c", "function": "find_elf_sym", "sloc": "21", "c_code": "int find_elf_sym(Section *s, const char *name)\n{\n Elf64_Sym *sym;\n Section *hs;\n int nbuckets, sym_index, h;\n const char *name1;\n hs = s->hash;\n if (!hs)\n return 0;\n nbuckets = ((int *)hs->data)[0];\n h = elf_hash((unsigned char *) name) % nbuckets;\n sym_index = ((int *)hs->data)[2 + h];\n while (sym_index != 0) {\n sym = &((Elf64_Sym *)s->data)[sym_index];\n name1 = (char *) s->link->data + sym->st_name;\n if (!strcmp(name, name1))\n return sym_index;\n sym_index = ((int *)hs->data)[2 + nbuckets + sym_index];\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#buf_prep#xmlBufferLength.c", "codebase": "libxml2", "c_file": "buf.c", "function": "xmlBufferLength", "sloc": "7", "c_code": "int\nxmlBufferLength(const xmlBuffer *buf)\n{\n if(!buf)\n return 0;\n return buf->use;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#xmlwriter_prep#xmlNewTextWriterFilename.c", "codebase": "libxml2", "c_file": "xmlwriter.c", "function": "xmlNewTextWriterFilename", "sloc": "22", "c_code": "xmlTextWriterPtr\nxmlNewTextWriterFilename(const char *uri, int compression)\n{\n xmlTextWriterPtr ret;\n xmlOutputBufferPtr out;\n out = xmlOutputBufferCreateFilename(uri, ((void *)0), compression);\n if (out == ((void *)0)) {\n xmlWriterErrMsg(((void *)0), XML_IO_EIO,\n \"xmlNewTextWriterFilename : cannot open uri\\n\");\n return ((void *)0);\n }\n ret = xmlNewTextWriter(out);\n if (ret == ((void *)0)) {\n xmlWriterErrMsg(((void *)0), XML_ERR_NO_MEMORY,\n \"xmlNewTextWriterFilename : out of memory!\\n\");\n xmlOutputBufferClose(out);\n return ((void *)0);\n }\n ret->indent = 0;\n ret->doindent = 0;\n return ret;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#modelu_prep#ModelIndex.c", "codebase": "mcsim-6.2.0", "c_file": "modelu.c", "function": "ModelIndex", "sloc": "4", "c_code": "int ModelIndex (HVAR hvar)\n{\n return (IsModelVar(hvar) ? ((int) ((hvar) & 0x0FFFF)) : 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#direntry_prep#getEntryAsPos.c", "codebase": "mtools-4.0.43", "c_file": "direntry.c", "function": "getEntryAsPos", "sloc": "5", "c_code": "unsigned int getEntryAsPos(direntry_t *entry) {\n int pos = entry->entry;\n ((void) sizeof ((pos >= 0) ? 1 : 0), __extension__ ({ if (pos >= 0) ; else __assert_fail (\"pos >= 0\", \"direntry.c\", 57, __extension__ __PRETTY_FUNCTION__); }));\n return (unsigned int) pos;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_hexadecimal_numbers_prep#json_extract_get_string_size.c", "codebase": "json.h", "c_file": "allow_hexadecimal_numbers.c", "function": "json_extract_get_string_size", "sloc": "7", "c_code": "struct json_extract_result_s\njson_extract_get_string_size(const struct json_string_s *const string) {\n struct json_extract_result_s result;\n result.dom_size = sizeof(struct json_string_s);\n result.data_size = string->string_size + 1;\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#gcm-aes_prep#nettle_gcm_aes_set_iv.c", "codebase": "nettle-3.9.1", "c_file": "gcm-aes.c", "function": "nettle_gcm_aes_set_iv", "sloc": "6", "c_code": "void\nnettle_gcm_aes_set_iv(struct gcm_aes_ctx *ctx,\n size_t length, const uint8_t *iv)\n{\n nettle_gcm_set_iv(&(ctx)->gcm, &(ctx)->key, (length), (iv));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_UNIQUE_RECTANGLES_FORMED_USING_N_UNIT_SQUARES_prep#main.c", "codebase": "transcoder-set", "c_file": "NUMBER_UNIQUE_RECTANGLES_FORMED_USING_N_UNIT_SQUARES.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {34,49,41,17,67,38,59,64,61,58};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#parserInternals_prep#xmlCtxtNewInputFromMemory.c", "codebase": "libxml2", "c_file": "parserInternals.c", "function": "xmlCtxtNewInputFromMemory", "sloc": "16", "c_code": "xmlParserInputPtr\nxmlCtxtNewInputFromMemory(xmlParserCtxtPtr ctxt, const char *url,\n const void *mem, size_t size,\n const char *encoding, int flags) {\n xmlParserInputPtr input;\n if ((ctxt == ((void *)0)) || (mem == ((void *)0)))\n return(((void *)0));\n input = xmlNewInputFromMemory(url, mem, size, flags);\n if (input == ((void *)0)) {\n xmlCtxtErrMemory(ctxt);\n return(((void *)0));\n }\n if (encoding != ((void *)0))\n xmlSwitchInputEncodingName(ctxt, input, encoding);\n return(input);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_transaction_prep#osip_transaction_set_reserved2.c", "codebase": "libosip2-5.3.1", "c_file": "osip_transaction.c", "function": "osip_transaction_set_reserved2", "sloc": "6", "c_code": "int osip_transaction_set_reserved2(osip_transaction_t *transaction, void *ptr) {\n if (transaction == ((void *)0))\n return -2;\n transaction->reserved2 = ptr;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY_1.c", "function": "f_gold", "sloc": "19", "c_code": "int f_gold ( int arr [ ], int n ) {\n int cum_sum = 0;\n for ( int i = 0;\n i < n;\n i ++ ) cum_sum += arr [ i ];\n int curr_val = 0;\n for ( int i = 0;\n i < n;\n i ++ ) curr_val += i * arr [ i ];\n int res = curr_val;\n for ( int i = 1;\n i < n;\n i ++ ) {\n int next_val = curr_val - ( cum_sum - arr [ i - 1 ] ) + arr [ i - 1 ] * ( n - 1 );\n curr_val = next_val;\n res = max ( res, next_val );\n }\n return res;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_header_prep#osip_header_set_name.c", "codebase": "libosip2-5.3.1", "c_file": "osip_header.c", "function": "osip_header_set_name", "sloc": "3", "c_code": "void osip_header_set_name(osip_header_t *header, char *name) {\n header->hname = name;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#buffer_prep#xclose.c", "codebase": "tar-1.34", "c_file": "buffer.c", "function": "xclose", "sloc": "6", "c_code": "void\nxclose (int fd)\n{\n if (close (fd) != 0)\n close_error (gettext (\"(pipe)\"));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlstring_prep#xmlStrncasecmp.c", "codebase": "libxml2", "c_file": "xmlstring.c", "function": "xmlStrncasecmp", "sloc": "13", "c_code": "int\nxmlStrncasecmp(const xmlChar *str1, const xmlChar *str2, int len) {\n register int tmp;\n if (len <= 0) return(0);\n if (str1 == str2) return(0);\n if (str1 == ((void *)0)) return(-1);\n if (str2 == ((void *)0)) return(1);\n do {\n tmp = casemap[*str1++] - casemap[*str2];\n if (tmp != 0 || --len == 0) return(tmp);\n } while (*str2++ != 0);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#pred_prep#pred_type.c", "codebase": "findutils-4.9.0", "c_file": "pred.c", "function": "pred_type", "sloc": "44", "c_code": "_Bool\npred_type (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)\n{\n mode_t mode;\n enum file_type type = FTYPE_COUNT;\n ((void) sizeof ((state.have_type) ? 1 : 0), __extension__ ({ if (state.have_type) ; else __assert_fail (\"state.have_type\", \"pred.c\", 977, __extension__ __PRETTY_FUNCTION__); }));\n if (0 == state.type)\n {\n return 0;\n }\n (void) pathname;\n if (state.have_stat)\n mode = stat_buf->st_mode;\n else\n mode = state.type;\n switch (mode & 0170000)\n {\n case 0100000:\n type = FTYPE_REG;\n break;\n case 0040000:\n type = FTYPE_DIR;\n break;\n case 0120000:\n type = FTYPE_LNK;\n break;\n case 0060000:\n type = FTYPE_BLK;\n break;\n case 0020000:\n type = FTYPE_CHR;\n break;\n case 0140000:\n type = FTYPE_SOCK;\n break;\n case 0010000:\n type = FTYPE_FIFO;\n break;\n }\n if ((type != FTYPE_COUNT) && pred_ptr->args.types[type])\n return 1;\n else\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 1, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 7}}, {"id": "snudown#buffer_prep#buftruncate.c", "codebase": "snudown", "c_file": "buffer.c", "function": "buftruncate", "sloc": "10", "c_code": "int\nbuftruncate(struct buf *buf, size_t size)\n{\n if (buf->size < size || size < 0) {\n ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail (\"0\", \"buffer.c\", 186, __extension__ __PRETTY_FUNCTION__); }));\n return BUF_EINVALIDIDX;\n }\n buf->size = size;\n return BUF_OK;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "lodepng#lodepng_prep#lodepng_compress_settings_init.c", "codebase": "lodepng", "c_file": "lodepng.c", "function": "lodepng_compress_settings_init", "sloc": "11", "c_code": "void lodepng_compress_settings_init(LodePNGCompressSettings* settings) {\n settings->btype = 2;\n settings->use_lz77 = 1;\n settings->windowsize = 2048;\n settings->minmatch = 3;\n settings->nicematch = 128;\n settings->lazymatching = 1;\n settings->custom_zlib = 0;\n settings->custom_deflate = 0;\n settings->custom_context = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsTags.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsTags", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsTags(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsTags\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsTags\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsTags(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlReplaceNode.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlReplaceNode", "sloc": "16", "c_code": "PyObject *\nlibxml_xmlReplaceNode(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlNodePtr c_retval;\n xmlNodePtr old;\n PyObject *pyobj_old;\n xmlNodePtr cur;\n PyObject *pyobj_cur;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"OO:xmlReplaceNode\", &pyobj_old, &pyobj_cur))\n return(((void *)0));\n old = (xmlNodePtr) (((pyobj_old) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_old))->obj));\n cur = (xmlNodePtr) (((pyobj_cur) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_cur))->obj));\n c_retval = xmlReplaceNode(old, cur);\n py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_transaction_prep#osip_transaction_get_your_instance.c", "codebase": "libosip2-5.3.1", "c_file": "osip_transaction.c", "function": "osip_transaction_get_your_instance", "sloc": "5", "c_code": "void *osip_transaction_get_your_instance(osip_transaction_t *transaction) {\n if (transaction == ((void *)0))\n return ((void *)0);\n return transaction->reserved1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_unquoted_keys_prep#json_write_pretty_get_value_size.c", "codebase": "json.h", "c_file": "allow_unquoted_keys.c", "function": "json_write_pretty_get_value_size", "sloc": "31", "c_code": "int json_write_pretty_get_value_size(const struct json_value_s *value,\n size_t depth, size_t indent_size,\n size_t newline_size, size_t *size) {\n switch (value->type) {\n default:\n return 1;\n case json_type_number:\n return json_write_get_number_size((struct json_number_s *)value->payload,\n size);\n case json_type_string:\n return json_write_get_string_size((struct json_string_s *)value->payload,\n size);\n case json_type_array:\n return json_write_pretty_get_array_size(\n (struct json_array_s *)value->payload, depth, indent_size, newline_size,\n size);\n case json_type_object:\n return json_write_pretty_get_object_size(\n (struct json_object_s *)value->payload, depth, indent_size,\n newline_size, size);\n case json_type_true:\n *size += 4;\n return 0;\n case json_type_false:\n *size += 5;\n return 0;\n case json_type_null:\n *size += 4;\n return 0;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 8, "break_continue_statement": 0}}, {"id": "screen-4.9.0#misc_prep#Kill.c", "codebase": "screen-4.9.0", "c_file": "misc.c", "function": "Kill", "sloc": "8", "c_code": "void\nKill(pid, sig)\nint pid, sig;\n{\n if (pid < 2)\n return;\n (void) kill(pid, sig);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_high_prep#pth_sendto.c", "codebase": "pth-2.0.7", "c_file": "pth_high.c", "function": "pth_sendto", "sloc": "4", "c_code": "ssize_t pth_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen)\n{\n return pth_sendto_ev(s, buf, len, flags, to, tolen, ((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_authorization_prep#osip_authorization_init.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authorization.c", "function": "osip_authorization_init", "sloc": "7", "c_code": "int osip_authorization_init(osip_authorization_t **dest) {\n *dest = (osip_authorization_t *) (osip_malloc_func ? osip_malloc_func(sizeof(osip_authorization_t)) : malloc(sizeof(osip_authorization_t)));\n if (*dest == ((void *)0))\n return -4;\n memset(*dest, 0, sizeof(osip_authorization_t));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_json5_prep#json_write_minified_object.c", "codebase": "json.h", "c_file": "allow_json5.c", "function": "json_write_minified_object", "sloc": "21", "c_code": "char *json_write_minified_object(const struct json_object_s *object,\n char *data) {\n struct json_object_element_s *element = 0;\n *data++ = '{';\n for (element = object->start; 0 != element; element = element->next) {\n if (element != object->start) {\n *data++ = ',';\n }\n data = json_write_string(element->name, data);\n if (0 == data) {\n return 0;\n }\n *data++ = ':';\n data = json_write_minified_value(element->value, data);\n if (0 == data) {\n return 0;\n }\n }\n *data++ = '}';\n return data;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tmux#cmd-find_prep#cmd_find_from_session_window.c", "codebase": "tmux", "c_file": "cmd-find.c", "function": "cmd_find_from_session_window", "sloc": "15", "c_code": "int\ncmd_find_from_session_window(struct cmd_find_state *fs, struct session *s,\n struct window *w, int flags)\n{\n cmd_find_clear_state(fs, flags);\n fs->s = s;\n fs->w = w;\n if (cmd_find_best_winlink_with_window(fs) != 0) {\n cmd_find_clear_state(fs, flags);\n return (-1);\n }\n fs->wp = fs->w->active;\n cmd_find_log_state(__func__, fs);\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#sdp_accessor_prep#sdp_message_m_payload_get.c", "codebase": "libosip2-5.3.1", "c_file": "sdp_accessor.c", "function": "sdp_message_m_payload_get", "sloc": "6", "c_code": "char *sdp_message_m_payload_get(sdp_message_t *sdp, int pos_media, int pos) {\n sdp_media_t *med = osip_list_get(&sdp->m_medias, pos_media);\n if (med == ((void *)0))\n return ((void *)0);\n return (char *) osip_list_get(&med->m_payloads, pos);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_location_information_prep#json_get_key_size.c", "codebase": "json.h", "c_file": "allow_location_information.c", "function": "json_get_key_size", "sloc": "31", "c_code": "int json_get_key_size(struct json_parse_state_s *state) {\n const size_t flags_bitset = state->flags_bitset;\n if (json_parse_flags_allow_unquoted_keys & flags_bitset) {\n size_t offset = state->offset;\n const size_t size = state->size;\n const char *const src = state->src;\n size_t data_size = state->data_size;\n if ('\"' == src[offset]) {\n return json_get_string_size(state, 1);\n } else if ((json_parse_flags_allow_single_quoted_strings & flags_bitset) &&\n ('\\'' == src[offset])) {\n return json_get_string_size(state, 1);\n } else {\n while ((offset < size) && is_valid_unquoted_key_char(src[offset])) {\n offset++;\n data_size++;\n }\n data_size++;\n if (json_parse_flags_allow_location_information & flags_bitset) {\n state->dom_size += sizeof(struct json_string_ex_s);\n } else {\n state->dom_size += sizeof(struct json_string_s);\n }\n state->offset = offset;\n state->data_size = data_size;\n return 0;\n }\n } else {\n return json_get_string_size(state, 1);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlXPathGetContextSize.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlXPathGetContextSize", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlXPathGetContextSize(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlXPathContextPtr ctxt;\n PyObject *pyobj_ctxt;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlXPathGetContextSize\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlXPathContextPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlXPathContext_Object *)(pyobj_ctxt))->obj));\n c_retval = ctxt->contextSize;\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tmux#tty-term_prep#tty_term_ptr1.c", "codebase": "tmux", "c_file": "tty-term.c", "function": "tty_term_ptr1", "sloc": "5", "c_code": "const char *\ntty_term_ptr1(struct tty_term *term, enum tty_code_code code, const void *a)\n{\n return (tparm((char *) tty_term_string(term, code), a, 0, 0, 0, 0, 0, 0, 0, 0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 1, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlwriter_prep#xmlTextWriterWriteVFormatAttribute.c", "codebase": "libxml2", "c_file": "xmlwriter.c", "function": "xmlTextWriterWriteVFormatAttribute", "sloc": "16", "c_code": "int\nxmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,\n const xmlChar * name,\n const char *format, va_list argptr)\n{\n int rc;\n xmlChar *buf;\n if (writer == ((void *)0))\n return -1;\n buf = xmlTextWriterVSprintf(format, argptr);\n if (buf == ((void *)0))\n return -1;\n rc = xmlTextWriterWriteAttribute(writer, name, buf);\n xmlFree(buf);\n return rc;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#gmp-glue_prep#_nettle_mpz_set_n.c", "codebase": "nettle-3.9.1", "c_file": "gmp-glue.c", "function": "_nettle_mpz_set_n", "sloc": "6", "c_code": "void\n_nettle_mpz_set_n (mpz_t r, const mp_limb_t *xp, mp_size_t xn)\n{\n __gmpn_copyi (__gmpz_limbs_write (r, xn), xp, xn);\n __gmpz_limbs_finish (r, xn);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#dap0_prep#dap_name.c", "codebase": "dap-3.10", "c_file": "dap0.c", "function": "dap_name", "sloc": "25", "c_code": "void dap_name(char dname[], char *fname)\n{\n struct stat statbuf;\n if (!fname || !fname[0])\n {\n strcpy(dname, \"/dev/null\");\n return;\n }\n strcpy(dname, dap_setdir);\n if (stat(dname, &statbuf) < 0)\n {\n if (mkdir(dname, (mode_t) 0700) < 0)\n {\n perror(dap_dapname);\n exit(1);\n }\n }\n else if (!(statbuf.st_mode & 0040000))\n {\n fprintf(dap_err, \"%s: non-directory file exists: %s\\n\", dap_dapname, dname);\n exit(1);\n }\n strcat(dname, \"/\");\n strcat(dname, fname);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cpio-2.14#paxerror_prep#exec_fatal.c", "codebase": "cpio-2.14", "c_file": "paxerror.c", "function": "exec_fatal", "sloc": "5", "c_code": "void\nexec_fatal (char const *name)\n{\n call_arg_fatal (\"exec\", name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "screen-4.9.0#process_prep#ParseAttrColor.c", "codebase": "screen-4.9.0", "c_file": "process.c", "function": "ParseAttrColor", "sloc": "162", "c_code": "int\nParseAttrColor(s1, s2, msgok)\nchar *s1, *s2;\nint msgok;\n{\n int i, n;\n char *s, *ss;\n int r = 0;\n s = s1;\n while (*s == ' ')\n s++;\n ss = s;\n while (*ss && *ss != ' ')\n ss++;\n while (*ss == ' ')\n ss++;\n if (*s && (s2 || *ss || !((*s >= 'a' && *s <= 'z') || (*s >= 'A' && *s <= 'Z') || *s == '.')))\n {\n int mode = 0, n = 0;\n if (*s == '+')\n {\n mode = 1;\n s++;\n }\n else if (*s == '-')\n {\n mode = -1;\n s++;\n }\n else if (*s == '!')\n {\n mode = 2;\n s++;\n }\n else if (*s == '=')\n s++;\n if (*s >= '0' && *s <= '9')\n {\n n = *s++ - '0';\n if (*s >= '0' && *s <= '9')\n n = n * 16 + (*s++ - '0');\n else if (*s >= 'a' && *s <= 'f')\n n = n * 16 + (*s++ - ('a' - 10));\n else if (*s >= 'A' && *s <= 'F')\n n = n * 16 + (*s++ - ('A' - 10));\n else if (*s && *s != ' ')\n {\n if (msgok)\n Msg(0, \"Illegal attribute hexchar '%c'\", *s);\n return -1;\n }\n }\n else\n {\n while (*s && *s != ' ')\n {\n if (*s == 'd')\n n |= (1<<0);\n else if (*s == 'u')\n n |= (1<<1);\n else if (*s == 'b')\n n |= (1<<2);\n else if (*s == 'r')\n n |= (1<<3);\n else if (*s == 's')\n n |= (1<<4);\n else if (*s == 'B')\n n |= (1<<5);\n else\n {\n if (msgok)\n Msg(0, \"Illegal attribute specifier '%c'\", *s);\n return -1;\n }\n s++;\n }\n }\n if (*s && *s != ' ')\n {\n if (msgok)\n Msg(0, \"junk after attribute description: '%c'\", *s);\n return -1;\n }\n if (mode == -1)\n r = n << 8 | n;\n else if (mode == 1)\n r = n << 8;\n else if (mode == 2)\n r = n;\n else if (mode == 0)\n r = 0xffff ^ n;\n }\n while (*s && *s == ' ')\n s++;\n if (s2)\n {\n if (*s)\n {\n if (msgok)\n Msg(0, \"junk after description: '%c'\", *s);\n return -1;\n }\n s = s2;\n while (*s && *s == ' ')\n s++;\n }\n if (*s)\n {\n static char costr[] = \"krgybmcw d i.01234567 9 f FKRGYBMCW I \";\n int numco = 0, j;\n n = 0;\n if (*s == '.')\n {\n numco++;\n n = 0x0f;\n s++;\n }\n for (j = 0; j < 2 && *s && *s != ' '; j++)\n {\n for (i = 0; costr[i]; i++)\n if (*s == costr[i])\n break;\n if (!costr[i])\n {\n if (msgok)\n Msg(0, \"illegal color descriptor: '%c'\", *s);\n return -1;\n }\n numco++;\n n = n << 4 | (i & 15);\n if (i >= 48)\n n = (n & 0x20ff) | 0x200;\n s++;\n }\n if ((n & 0xf00) == 0xf00)\n n ^= 0xf00;\n if (n & 0x2000)\n n ^= 0x2400;\n if (numco == 1)\n n |= 0xf0;\n if (numco != 2 && n != 0xff)\n n |= 0x100;\n if (*s && *s != ' ')\n {\n if (msgok)\n Msg(0, \"junk after color description: '%c'\", *s);\n return -1;\n }\n n ^= 0xff;\n r |= n << 16;\n }\n while (*s && *s == ' ')\n s++;\n if (*s)\n {\n if (msgok)\n Msg(0, \"junk after description: '%c'\", *s);\n return -1;\n }\n do {} while (0);\n return r;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 41, "for_loop": 2, "while_loop": 8, "switch_statement": 0, "goto_statement": 0, "return_statement": 8, "break_continue_statement": 1}}, {"id": "transcoder-set#COMPUTE_N_UNDER_MODULO_P_prep#len.c", "codebase": "transcoder-set", "c_file": "COMPUTE_N_UNDER_MODULO_P.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsPrivateUse.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsPrivateUse", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsPrivateUse(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsPrivateUse\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsPrivateUse\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsPrivateUse(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_BINOMIAL_COEFFICIENT_TERM_VALUE_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_BINOMIAL_COEFFICIENT_TERM_VALUE.c", "function": "f_gold", "sloc": "18", "c_code": "int f_gold ( int n ) {\n int C [ n + 1 ] [ n + 1 ];\n for ( int i = 0;\n i <= n;\n i ++ ) {\n for ( int j = 0;\n j <= min ( i, n );\n j ++ ) {\n if ( j == 0 || j == i ) C [ i ] [ j ] = 1;\n else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ];\n }\n }\n int maxvalue = 0;\n for ( int i = 0;\n i <= n;\n i ++ ) maxvalue = max ( maxvalue, C [ n ] [ i ] );\n return maxvalue;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathEval.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathEval", "sloc": "23", "c_code": "xmlXPathObjectPtr\nxmlXPathEval(const xmlChar *str, xmlXPathContextPtr ctx) {\n xmlXPathParserContextPtr ctxt;\n xmlXPathObjectPtr res;\n if (ctx == ((void *)0))\n return(((void *)0));\n xmlInitParser();\n xmlResetError(&ctx->lastError);\n ctxt = xmlXPathNewParserContext(str, ctx);\n if (ctxt == ((void *)0))\n return ((void *)0);\n xmlXPathEvalExpr(ctxt);\n if (ctxt->error != XPATH_EXPRESSION_OK) {\n res = ((void *)0);\n } else if (ctxt->valueNr != 1) {\n xmlXPathErr(ctxt, XPATH_STACK_ERROR);\n res = ((void *)0);\n } else {\n res = valuePop(ctxt);\n }\n xmlXPathFreeParserContext(ctxt);\n return(res);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlReadFd.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlReadFd", "sloc": "14", "c_code": "PyObject *\nlibxml_xmlReadFd(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlDocPtr c_retval;\n int fd;\n char * URL;\n char * encoding;\n int options;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"izzi:xmlReadFd\", &fd, &URL, &encoding, &options))\n return(((void *)0));\n c_retval = xmlReadFd(fd, URL, encoding, options);\n py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_content_length_prep#osip_content_length_parse.c", "codebase": "libosip2-5.3.1", "c_file": "osip_content_length.c", "function": "osip_content_length_parse", "sloc": "13", "c_code": "int osip_content_length_parse(osip_content_length_t *content_length, const char *hvalue) {\n size_t len;\n if (hvalue == ((void *)0))\n return -2;\n len = strlen(hvalue);\n if (len + 1 < 2)\n return -5;\n content_length->value = (char *) (osip_malloc_func ? osip_malloc_func(len + 1) : malloc(len + 1));\n if (content_length->value == ((void *)0))\n return -4;\n osip_strncpy(content_length->value, hvalue, len);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 1, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "gzip-1.12#util_prep#copy.c", "codebase": "gzip-1.12", "c_file": "util.c", "function": "copy", "sloc": "16", "c_code": "int copy(in, out)\n int in, out;\n{\n int got;\n (*__errno_location ()) = 0;\n while (insize > inptr) {\n write_buf(out, (char*)inbuf + inptr, insize - inptr);\n got = read_buffer (in, (char *) inbuf, 0x40000);\n if (got == -1)\n read_error();\n bytes_in += got;\n insize = (unsigned)got;\n inptr = 0;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#ma2asm_prep#BT_String_Init.c", "codebase": "gprolog-1.5.0", "c_file": "ma2asm.c", "function": "BT_String_Init", "sloc": "6", "c_code": "void\nBT_String_Init(BTString *bt_str)\n{\n bt_str->tree = ((void *)0);\n bt_str->nb_elem = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SPACE_OPTIMIZED_DP_SOLUTION_0_1_KNAPSACK_PROBLEM_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "SPACE_OPTIMIZED_DP_SOLUTION_0_1_KNAPSACK_PROBLEM.c", "function": "f_gold", "sloc": "22", "c_code": "int f_gold ( int val [ ], int wt [ ], int n, int W ) {\n int mat [ 2 ] [ W + 1 ];\n memset ( mat, 0, sizeof ( mat ) );\n int i = 0;\n while ( i < n ) {\n int j = 0;\n if ( i % 2 != 0 ) {\n while ( ++ j <= W ) {\n if ( wt [ i ] <= j ) mat [ 1 ] [ j ] = max ( val [ i ] + mat [ 0 ] [ j - wt [ i ] ], mat [ 0 ] [ j ] );\n else mat [ 1 ] [ j ] = mat [ 0 ] [ j ];\n }\n }\n else {\n while ( ++ j <= W ) {\n if ( wt [ i ] <= j ) mat [ 0 ] [ j ] = max ( val [ i ] + mat [ 1 ] [ j - wt [ i ] ], mat [ 1 ] [ j ] );\n else mat [ 0 ] [ j ] = mat [ 1 ] [ j ];\n }\n }\n i ++;\n }\n return ( n % 2 != 0 ) ? mat [ 0 ] [ W ] : mat [ 1 ] [ W ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 3, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Rd_Compound.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Rd_Compound", "sloc": "22", "c_code": "WamWord *\nPl_Rd_Compound(WamWord start_word, int *func, int *arity)\n{\n WamWord word, tag_mask;\n WamWord *adr;\n do { WamWord deref_last_word; word = start_word; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0);\n if (tag_mask == (PlULong)0x1)\n {\n adr = ((WamWord *) ((word) & (PlULong)0xfffffffffffffff8));\n *func = ((int) (unsigned char) ('.'));\n *arity = 2;\n return &(((WamWord *) adr)[0]);\n }\n if (tag_mask == (PlULong)0x2)\n {\n adr = ((WamWord *) ((word) & (PlULong)0xfffffffffffffff8));\n *func = (((PlULong)((((WamWord *) (adr))[0])) & (((PlULong) 1 << (sizeof(PlULong) * 8 - 10)) - 1)));\n *arity = (((PlULong) ((((WamWord *) (adr))[0])) >> (sizeof(PlULong) * 8 - 10)));\n return &(((WamWord *) (adr))[1 +0]);\n }\n return ((void *)0);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 1}}, {"id": "uucp-1.07#log_prep#ulog_close.c", "codebase": "uucp-1.07", "c_file": "log.c", "function": "ulog_close", "sloc": "17", "c_code": "void\nulog_close ()\n{\n ulog (LOG_ERROR, (const char *) ((void *)0));\n if (eLlog != ((void *)0))\n {\n (void) fclose (eLlog);\n eLlog = ((void *)0);\n fLlog_tried = (0);\n }\n if (eLdebug != ((void *)0))\n {\n (void) fclose (eLdebug);\n eLdebug = ((void *)0);\n fLdebug_tried = (0);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsSupplementalMathematicalOperators.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsSupplementalMathematicalOperators", "sloc": "4", "c_code": "int\nxmlUCSIsSupplementalMathematicalOperators(int code) {\n return(((code >= 0x2A00) && (code <= 0x2AFF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "indent-2.2.13#indent_prep#main.c", "codebase": "indent-2.2.13", "c_file": "indent.c", "function": "main", "sloc": "44", "c_code": "int main(\n int argc,\n char ** argv)\n{\n char *tmp;\n char *profile_pathname = 0;\n BOOLEAN using_stdin = 0;\n exit_values_ty exit_status;\n bindtextdomain(\"indent\", \"/usr/local/share/locale\");\n textdomain(\"indent\");\n memset(&settings, 0, sizeof(settings));\n tmp = xmalloc(7);\n memcpy(tmp, \"size_t\", 7);\n addkey(tmp, rw_decl);\n tmp = xmalloc(8);\n memcpy(tmp, \"wchar_t\", 8);\n addkey(tmp, rw_decl);\n tmp = xmalloc(10);\n memcpy(tmp, \"ptrdiff_t\", 10);\n addkey(tmp, rw_decl);\n init_parser ();\n initialize_backups ();\n exit_status = total_success;\n input_files = 0;\n in_file_names = xmalloc(max_input_files * sizeof(char *));\n set_defaults();\n profile_pathname = handle_profile(argc, argv);\n exit_status = process_args(argc, argv, &using_stdin);\n if (exit_status == total_success)\n {\n if (settings.verbose && profile_pathname)\n {\n fprintf (stderr, gettext(\"Read profile %s\\n\"), profile_pathname);\n }\n set_defaults_after();\n exit_status = indent_all(using_stdin);\n }\n if (profile_pathname)\n xfree(profile_pathname);\n xfree(in_file_names);\n uninit_parser();\n cleanup_user_specials();\n return exit_status;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 4, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_message_prep#osip_message_set_status_code.c", "codebase": "libosip2-5.3.1", "c_file": "osip_message.c", "function": "osip_message_set_status_code", "sloc": "3", "c_code": "void osip_message_set_status_code(osip_message_t *sip, int status_code) {\n sip->status_code = status_code;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#list_prep#xmlListSize.c", "codebase": "libxml2", "c_file": "list.c", "function": "xmlListSize", "sloc": "10", "c_code": "int\nxmlListSize(xmlListPtr l)\n{\n xmlLinkPtr lk;\n int count=0;\n if (l == ((void *)0))\n return(-1);\n for(lk = l->sentinel->next; lk != l->sentinel; lk = lk->next, count++);\n return count;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ripemd160_prep#nettle_ripemd160_init.c", "codebase": "nettle-3.9.1", "c_file": "ripemd160.c", "function": "nettle_ripemd160_init", "sloc": "15", "c_code": "void\nnettle_ripemd160_init(struct ripemd160_ctx *ctx)\n{\n static const uint32_t iv[5] =\n {\n 0x67452301,\n 0xEFCDAB89,\n 0x98BADCFE,\n 0x10325476,\n 0xC3D2E1F0,\n };\n memcpy(ctx->state, iv, sizeof(ctx->state));\n ctx->count = 0;\n ctx->index = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#tar_prep#confirm.c", "codebase": "tar-1.34", "c_file": "tar.c", "function": "confirm", "sloc": "39", "c_code": "int\nconfirm (const char *message_action, const char *message_name)\n{\n static FILE *confirm_file;\n static int confirm_file_EOF;\n _Bool status = 0;\n if (!confirm_file)\n {\n if (archive == 0 || stdin_used_by)\n {\n confirm_file = fopen (\"/dev/tty\", \"r\");\n if (! confirm_file)\n open_fatal (\"/dev/tty\");\n }\n else\n {\n request_stdin (\"-w\");\n confirm_file = stdin;\n }\n }\n fprintf (stdlis, \"%s %s?\", message_action, quote (message_name));\n fflush_unlocked (stdlis);\n if (!confirm_file_EOF)\n {\n char *response = ((void *)0);\n size_t response_size = 0;\n if (getline (&response, &response_size, confirm_file) < 0)\n confirm_file_EOF = 1;\n else\n status = rpmatch (response) > 0;\n free (response);\n }\n if (confirm_file_EOF)\n {\n fputc_unlocked ('\\n',stdlis);\n fflush_unlocked (stdlis);\n }\n return status;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#xargs_prep#main.c", "codebase": "findutils-4.9.0", "c_file": "xargs.c", "function": "main", "sloc": "327", "c_code": "int\nmain (int argc, char **argv)\n{\n int optc, option_index;\n int show_limits = 0;\n int always_run_command = 1;\n const char *input_file = \"-\";\n char default_cmd[] = \"echo\";\n char *default_arglist[1];\n int (*read_args) (void) = read_line;\n void (*act_on_init_result)(void) = noop;\n enum BC_INIT_STATUS bcstatus;\n enum { XARGS_POSIX_HEADROOM = 2048u };\n struct sigaction sigact;\n (void) 1;\n if (argv[0])\n set_program_name (argv[0]);\n else\n set_program_name (\"xargs\");\n remember_non_cloexec_fds ();\n parent = getpid ();\n original_exit_value = 0;\n setlocale (6, \"\");\n bindtextdomain (\"findutils\", \"/usr/local/share/locale\");\n textdomain (\"findutils\");\n if (atexit (close_stdin) || atexit (wait_for_proc_all))\n {\n ((!!sizeof (struct { _Static_assert (1, \"verify_expr (\" \"1\" \", \" \"(error (1, (*__errno_location ()), gettext (\\\"The atexit library function failed\\\")), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (1, (*__errno_location ()), gettext (\"The atexit library function failed\")), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (1, (*__errno_location ()), gettext (\"The atexit library function failed\")), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n bcstatus = bc_init_controlinfo (&bc_ctl, XARGS_POSIX_HEADROOM);\n if (BC_INIT_ENV_TOO_BIG == bcstatus)\n {\n act_on_init_result = fail_due_to_env_size;\n }\n else if (BC_INIT_CANNOT_ACCOMODATE_HEADROOM == bcstatus)\n {\n act_on_init_result = fail_due_to_env_size;\n }\n else\n {\n long val;\n val = sysconf (_SC_ARG_MAX);\n if (val > 0)\n {\n ((void) sizeof ((val > XARGS_POSIX_HEADROOM) ? 1 : 0), __extension__ ({ if (val > XARGS_POSIX_HEADROOM) ; else __assert_fail (\"val > XARGS_POSIX_HEADROOM\", \"xargs.c\", 483, __extension__ __PRETTY_FUNCTION__); }));\n bc_ctl.arg_max = smaller_of (bc_ctl.arg_max,\n (size_t)val-XARGS_POSIX_HEADROOM);\n }\n else\n {\n }\n ((void) sizeof ((bc_ctl.arg_max >= 2048) ? 1 : 0), __extension__ ({ if (bc_ctl.arg_max >= 2048) ; else __assert_fail (\"bc_ctl.arg_max >= LINE_MAX\", \"xargs.c\", 511, __extension__ __PRETTY_FUNCTION__); }));\n bc_ctl.exec_callback = xargs_do_exec;\n bc_use_sensible_arg_max (&bc_ctl);\n }\n while ((optc = getopt_long (argc, argv, \"+0a:E:e::i::I:l::L:n:oprs:txP:d:\",\n longopts, &option_index)) != -1)\n {\n switch (optc)\n {\n case '0':\n read_args = read_string;\n input_delimiter = '\\0';\n break;\n case 'd':\n read_args = read_string;\n input_delimiter = get_input_delimiter (optarg);\n break;\n case 'E':\n case 'e':\n if (optarg && (strlen (optarg) > 0))\n eof_str = optarg;\n else\n eof_str = ((void *)0);\n break;\n case 'h':\n usage (0);\n case 'I':\n case 'i':\n if (optarg)\n bc_ctl.replace_pat = optarg;\n else\n bc_ctl.replace_pat = \"{}\";\n if (bc_ctl.args_per_exec != 0)\n {\n warn_mutually_exclusive (\"--replace/-I/-i\", \"--max-args\");\n bc_ctl.args_per_exec = 0;\n }\n if (bc_ctl.lines_per_exec != 0)\n {\n warn_mutually_exclusive (\"--replace/-I/-i\", \"--max-lines\");\n bc_ctl.lines_per_exec = 0;\n }\n break;\n case 'L':\n bc_ctl.lines_per_exec = parse_num (optarg, 'L', 1L, -1L, 1);\n if (bc_ctl.args_per_exec != 0)\n {\n warn_mutually_exclusive (\"-L\", \"--max-args\");\n bc_ctl.args_per_exec = 0;\n }\n if (bc_ctl.replace_pat != ((void *)0))\n {\n warn_mutually_exclusive (\"-L\", \"--replace\");\n bc_ctl.replace_pat = ((void *)0);\n }\n break;\n case 'l':\n if (optarg)\n bc_ctl.lines_per_exec = parse_num (optarg, 'l', 1L, -1L, 1);\n else\n bc_ctl.lines_per_exec = 1;\n if (bc_ctl.args_per_exec != 0)\n {\n warn_mutually_exclusive (\"--max-lines/-l\", \"--max-args\");\n bc_ctl.args_per_exec = 0;\n }\n if (bc_ctl.replace_pat != ((void *)0))\n {\n warn_mutually_exclusive (\"--max-lines/-l\", \"--replace\");\n bc_ctl.replace_pat = ((void *)0);\n }\n break;\n case 'n':\n bc_ctl.args_per_exec = parse_num (optarg, 'n', 1L, -1L, 1);\n if (bc_ctl.lines_per_exec != 0)\n {\n warn_mutually_exclusive (\"--max-args/-n\", \"--max-lines\");\n bc_ctl.lines_per_exec = 0;\n }\n if (bc_ctl.replace_pat != ((void *)0))\n {\n if (bc_ctl.args_per_exec == 1)\n {\n bc_ctl.args_per_exec = 0;\n }\n else\n {\n warn_mutually_exclusive (\"--max-args/-n\", \"--replace\");\n bc_ctl.replace_pat = ((void *)0);\n }\n }\n break;\n case 's':\n {\n size_t arg_size;\n act_on_init_result ();\n arg_size = parse_num (optarg, 's', 1L,\n bc_ctl.posix_arg_size_max, 0);\n if (arg_size > bc_ctl.posix_arg_size_max)\n {\n error (0, 0,\n gettext (\"warning: value %ld for -s option is too large, \" \"using %ld instead\"),\n (long) arg_size, (long) bc_ctl.posix_arg_size_max);\n arg_size = bc_ctl.posix_arg_size_max;\n }\n bc_ctl.arg_max = arg_size;\n }\n break;\n case 'S':\n show_limits = 1;\n break;\n case 't':\n print_command = 1;\n break;\n case 'x':\n bc_ctl.exit_if_size_exceeded = 1;\n break;\n case 'o':\n open_tty = 1;\n break;\n case 'p':\n query_before_executing = 1;\n print_command = 1;\n break;\n case 'r':\n always_run_command = 0;\n break;\n case 'P':\n proc_max = parse_num (optarg, 'P', 0L, (2147483647), 1);\n break;\n case 'a':\n input_file = optarg;\n break;\n case 'v':\n display_findutils_version (\"xargs\");\n return 0;\n case PROCESS_SLOT_VAR:\n if (strchr (optarg, '='))\n {\n ((!!sizeof (struct { _Static_assert (1, \"verify_expr (\" \"1\" \", \" \"(error (1, 0, gettext (\\\"option --%s may not be set to a value which includes `='\\\"), longopts[option_index].name), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (1, 0, gettext (\"option --%s may not be set to a value which includes `='\"), longopts[option_index].name), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (1, 0, gettext (\"option --%s may not be set to a value which includes `='\"), longopts[option_index].name), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n slot_var_name = optarg;\n if (0 != unsetenv (slot_var_name))\n {\n ((!!sizeof (struct { _Static_assert (1, \"verify_expr (\" \"1\" \", \" \"(error (1, (*__errno_location ()), gettext (\\\"failed to unset environment variable %s\\\"), slot_var_name), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (1, (*__errno_location ()), gettext (\"failed to unset environment variable %s\"), slot_var_name), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (1, (*__errno_location ()), gettext (\"failed to unset environment variable %s\"), slot_var_name), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n break;\n default:\n usage (1);\n }\n }\n if (eof_str && (read_args == read_string))\n {\n error (0, 0,\n gettext (\"warning: the -E option has no effect if -0 or -d is used.\\n\"));\n }\n act_on_init_result ();\n ((void) sizeof ((BC_INIT_OK == bcstatus) ? 1 : 0), __extension__ ({ if (BC_INIT_OK == bcstatus) ; else __assert_fail (\"BC_INIT_OK == bcstatus\", \"xargs.c\", 723, __extension__ __PRETTY_FUNCTION__); }));\n sigact.__sigaction_handler.sa_handler = increment_proc_max;\n sigemptyset(&sigact.sa_mask);\n sigact.sa_flags = 0;\n if (0 != sigaction (10, &sigact, (struct sigaction *)((void *)0)))\n error (0, (*__errno_location ()), gettext (\"Cannot set SIGUSR1 signal handler\"));\n sigact.__sigaction_handler.sa_handler = decrement_proc_max;\n sigemptyset(&sigact.sa_mask);\n sigact.sa_flags = 0;\n if (0 != sigaction (12, &sigact, (struct sigaction *)((void *)0)))\n error (0, (*__errno_location ()), gettext (\"Cannot set SIGUSR2 signal handler\"));\n if (0 == strcmp (input_file, \"-\"))\n {\n input_stream = stdin;\n }\n else\n {\n keep_stdin = 1;\n input_stream = fopen_cloexec_for_read_only (input_file);\n if (((void *)0) == input_stream)\n {\n ((!!sizeof (struct { _Static_assert (1, \"verify_expr (\" \"1\" \", \" \"(error (1, (*__errno_location ()), gettext (\\\"Cannot open input file %s\\\"), quotearg_n_style (0, locale_quoting_style, input_file)), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (1, (*__errno_location ()), gettext (\"Cannot open input file %s\"), quotearg_n_style (0, locale_quoting_style, input_file)), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (1, (*__errno_location ()), gettext (\"Cannot open input file %s\"), quotearg_n_style (0, locale_quoting_style, input_file)), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n }\n if (bc_ctl.replace_pat || bc_ctl.lines_per_exec)\n bc_ctl.exit_if_size_exceeded = 1;\n if (optind == argc)\n {\n optind = 0;\n argc = 1;\n default_arglist[0] = default_cmd;\n argv = default_arglist;\n }\n if (show_limits)\n {\n fprintf (stderr,\n gettext (\"Your environment variables take up %\" \"l\" \"u\" \" bytes\\n\"),\n (uintmax_t)bc_size_of_environment ());\n fprintf (stderr,\n gettext (\"POSIX upper limit on argument length (this system): %\" \"l\" \"u\" \"\\n\"),\n (uintmax_t)bc_ctl.posix_arg_size_max);\n fprintf (stderr,\n gettext (\"POSIX smallest allowable upper limit on argument length (all systems): %\" \"l\" \"u\" \"\\n\"),\n (uintmax_t)bc_ctl.posix_arg_size_min);\n fprintf (stderr,\n gettext (\"Maximum length of command we could actually use: %\" \"l\" \"u\" \"\\n\"),\n (uintmax_t)(bc_ctl.posix_arg_size_max - bc_size_of_environment ()));\n fprintf (stderr,\n gettext (\"Size of command buffer we are actually using: %\" \"l\" \"u\" \"\\n\"),\n (uintmax_t)bc_ctl.arg_max);\n fprintf (stderr,\n gettext (\"Maximum parallelism (--max-procs must be no greater): %\" \"l\" \"u\" \"\\n\"),\n (uintmax_t)(2147483647));\n if (isatty (0))\n {\n fprintf (stderr,\n gettext (\"\\n\" \"Execution of xargs will continue now, and it will \" \"try to read its input and run commands; if this is \" \"not what you wanted to happen, please type the \" \"end-of-file keystroke.\\n\"));\n if (always_run_command)\n {\n fprintf (stderr,\n gettext (\"Warning: %s will be run at least once. \" \"If you do not want that to happen, then press \" \"the interrupt keystroke.\\n\"),\n argv[optind]);\n }\n }\n }\n linebuf = xmalloc (bc_ctl.arg_max + 1);\n bc_state.argbuf = xmalloc (bc_ctl.arg_max + 1);\n signal (17, ((__sighandler_t) 0));\n if (!bc_ctl.replace_pat)\n {\n for (; optind < argc; optind++)\n bc_push_arg (&bc_ctl, &bc_state,\n argv[optind], strlen (argv[optind]) + 1,\n ((void *)0), 0,\n initial_args);\n initial_args = 0;\n bc_ctl.initial_argc = bc_state.cmd_argc;\n bc_state.cmd_initial_argv_chars = bc_state.cmd_argv_chars;\n bc_ctl.initial_argc = bc_state.cmd_argc;\n while ((*read_args) () != -1)\n if (bc_ctl.lines_per_exec && lineno >= bc_ctl.lines_per_exec)\n {\n bc_do_exec (&bc_ctl, &bc_state);\n lineno = 0;\n }\n if (bc_state.cmd_argc != bc_ctl.initial_argc\n || (always_run_command && procs_executed==0))\n bc_do_exec (&bc_ctl, &bc_state);\n }\n else\n {\n int i, args;\n size_t *arglen = xmalloc (sizeof (size_t) * argc);\n for (i = optind; i < argc; i++)\n arglen[i] = strlen (argv[i]);\n bc_ctl.rplen = strlen (bc_ctl.replace_pat);\n while ((args = (*read_args) ()) != -1)\n {\n size_t len = (size_t) args;\n bc_clear_args (&bc_ctl, &bc_state);\n bc_state.cmd_argv_chars = 0;\n bc_push_arg (&bc_ctl, &bc_state,\n argv[optind], arglen[optind] + 1,\n ((void *)0), 0,\n initial_args);\n len--;\n initial_args = 0;\n for (i = optind + 1; i < argc; i++)\n bc_do_insert (&bc_ctl, &bc_state,\n argv[i], arglen[i],\n ((void *)0), 0,\n linebuf, len,\n initial_args);\n bc_do_exec (&bc_ctl, &bc_state);\n }\n }\n original_exit_value = child_error;\n return child_error;\n}\n", "c_constructs": {"pointer_type": 5, "array_type": 4, "struct_type": 0, "enum_type": 1, "union_type": 0, "function_pointer": 4, "type_casting": 27, "memory_management": 0, "memory_operation": 0, "if_statement": 36, "for_loop": 3, "while_loop": 3, "switch_statement": 1, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 18}}, {"id": "nettle-3.9.1#aes256-encrypt_prep#_nettle_aes256_encrypt_c.c", "codebase": "nettle-3.9.1", "c_file": "aes256-encrypt.c", "function": "_nettle_aes256_encrypt_c", "sloc": "9", "c_code": "void\n_nettle_aes256_encrypt_c(const struct aes256_ctx *ctx,\n size_t length, uint8_t *dst,\n const uint8_t *src)\n{\n ((void) sizeof ((!(length % 16)) ? 1 : 0), __extension__ ({ if (!(length % 16)) ; else __assert_fail (\"!(length % AES_BLOCK_SIZE)\", \"aes256-encrypt.c\", 56, __extension__ __PRETTY_FUNCTION__); }));\n _nettle_aes_encrypt(14, ctx->keys, &_nettle_aes_encrypt_table,\n length, dst, src);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_DIGITS_PRODUCT_TWO_NUMBERS_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "NUMBER_DIGITS_PRODUCT_TWO_NUMBERS_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#modo_prep#WriteHeader.c", "codebase": "mcsim-6.2.0", "c_file": "modo.c", "function": "WriteHeader", "sloc": "7", "c_code": "void WriteHeader (PFILE pfile, PSTR szName, PVMMAPSTRCT pvmGlo)\n{\n time_t ttTime;\n time(&ttTime);\n if (fprintf(pfile, \"/* %s\\n\", szName) < 0)\n ReportError(((void *)0), 0x0003 | 0x8000,\n szName, \"...in WriteHeader ()\");\n fprintf(pfile, \" ___________________________________________________\\n\\n\");\n fprintf(pfile, \" Model File: %s\\n\\n\", vszModelFilename);\n fprintf(pfile, \" Date: %s\\n\", ctime(&ttTime));\n fprintf(pfile, \" Created by: \\\"%s %s\\\"\\n\", vszModGenName, \"v6.2.0\");\n fprintf(pfile, \" -- a model preprocessor by Don Maszle\\n\");\n fprintf(pfile, \" ___________________________________________________\\n\\n\");\n fprintf(pfile, \" \" \"Copyright (c) 1993-2020 Free Software Foundation, Inc.\" \"\\n\");\n fprintf(pfile, \"\\n Model calculations for compartmental model:\\n\\n\");\n if (vnStates == 1) fprintf(pfile, \" 1 State:\\n\");\n else fprintf(pfile, \" %d States:\\n\", vnStates);\n ForAllVar(pfile, pvmGlo, &WriteOneName, 0x10000, ((void *)0));\n if (vnOutputs == 1) fprintf(pfile, \"\\n 1 Output:\\n\");\n else fprintf(pfile, \"\\n %d Outputs:\\n\", vnOutputs);\n ForAllVar(pfile, pvmGlo, &WriteOneName, 0x30000, ((void *)0));\n if (vnInputs == 1) fprintf(pfile, \"\\n 1 Input:\\n\");\n else fprintf(pfile, \"\\n %d Inputs:\\n\", vnInputs);\n ForAllVar(pfile, pvmGlo, &WriteOneName, 0x20000, ((void *)0));\n if (vnParms == 1) fprintf(pfile, \"\\n 1 Parameter:\\n\");\n else fprintf(pfile, \"\\n %d Parameters:\\n\", vnParms);\n ForAllVar(pfile, pvmGlo, &WriteOneName, 0x40000, ((void *)0));\n fprintf(pfile, \"*/\\n\\n\");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#C_PROGRAM_FACTORIAL_NUMBER_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "C_PROGRAM_FACTORIAL_NUMBER_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "make-4.4.1#misc_prep#get_tmpfd.c", "codebase": "make-4.4.1", "c_file": "misc.c", "function": "get_tmpfd", "sloc": "36", "c_code": "int\nget_tmpfd (char **name)\n{\n int fd = -1;\n char *tmpnm;\n mode_t mask;\n if (name)\n *name = ((void *)0);\n else\n {\n fd = os_anontmp ();\n if (fd >= 0)\n return fd;\n }\n mask = umask (0077);\n tmpnm = get_tmptemplate ();\n while (((fd)=mkstemp (tmpnm))==-1 && (*__errno_location ())==4);\n if (fd < 0)\n {\n error((((floc *)0)), strlen (tmpnm) + strlen (strerror ((*__errno_location ()))), (gettext (\"cannot create temporary file %s: %s\")), (tmpnm), (strerror ((*__errno_location ()))));\n free (tmpnm);\n return -1;\n }\n if (name)\n *name = tmpnm;\n else\n {\n int r;\n while (((r)=unlink (tmpnm))==-1 && (*__errno_location ())==4);\n if (r < 0)\n error((((floc *)0)), strlen (tmpnm) + strlen (strerror ((*__errno_location ()))), (gettext (\"cannot unlink temporary file %s: %s\")), (tmpnm), (strerror ((*__errno_location ()))));\n free (tmpnm);\n }\n umask (mask);\n return fd;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 2, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_SMALLEST_VALUE_REPRESENTED_SUM_SUBSET_GIVEN_ARRAY_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FIND_SMALLEST_VALUE_REPRESENTED_SUM_SUBSET_GIVEN_ARRAY.c", "function": "f_gold", "sloc": "7", "c_code": "int f_gold ( int arr [ ], int n ) {\n int res = 1;\n for ( int i = 0;\n i < n && arr [ i ] <= res;\n i ++ ) res = res + arr [ i ];\n return res;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#aes192-set-decrypt-key_prep#nettle_aes192_invert_key.c", "codebase": "nettle-3.9.1", "c_file": "aes192-set-decrypt-key.c", "function": "nettle_aes192_invert_key", "sloc": "5", "c_code": "void\nnettle_aes192_invert_key (struct aes192_ctx *dst, const struct aes192_ctx *src)\n{\n _nettle_aes_invert (12, dst->keys, src->keys);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#ma2asm_inst_prep#Dico_String_Stop.c", "codebase": "gprolog-1.5.0", "c_file": "ma2asm_inst.c", "function": "Dico_String_Stop", "sloc": "4", "c_code": "void\nDico_String_Stop(int nb)\n{\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#device_prep#check_if_sectors_fit.c", "codebase": "mtools-4.0.43", "c_file": "device.c", "function": "check_if_sectors_fit", "sloc": "15", "c_code": "int check_if_sectors_fit(uint32_t tot_sectors,\n mt_off_t maxBytes,\n uint32_t sectorSize,\n char *errmsg)\n{\n if(!maxBytes)\n return 0;\n if(tot_sectors > (smt_off_t) maxBytes / (smt_off_t) sectorSize) {\n sprintf(errmsg,\n \"%d sectors too large for this platform\\n\",\n tot_sectors);\n return -1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int n, int x ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "units-2.22#units_prep#ignore_primitive.c", "codebase": "units-2.22", "c_file": "units.c", "function": "ignore_primitive", "sloc": "11", "c_code": "int\nignore_primitive(char *name)\n{\n struct unitlist *ul;\n if (!name)\n return 0;\n ul = ulookup(name);\n if (ul && strchr(ul->value, '!'))\n return 1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_1.c", "function": "f_gold", "sloc": "12", "c_code": "int f_gold ( int a, int b, int c ) {\n if ( a > b ) {\n if ( b > c ) return b;\n else if ( a > c ) return c;\n else return a;\n }\n else {\n if ( a > c ) return a;\n else if ( b > c ) return c;\n else return b;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_DIFFERENCE_MAX_MIN_K_SIZE_SUBSETS_prep#main.c", "codebase": "transcoder-set", "c_file": "MINIMUM_DIFFERENCE_MAX_MIN_K_SIZE_SUBSETS.c", "function": "main", "sloc": "26", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {1,1,4,18,21,35,37,39,76,81,86,92,96};\nint param0_1[] = {-8,-6,62,52,-86,2,-94,0,-48,-38,24,-48,34};\nint param0_2[] = {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};\nint param0_3[] = {23,36,43,50,74,81,94,13,30,57,30,71,10,99,66,94,83,39,37,3,89,34};\nint param0_4[] = {-96,-94,-92,-84,-80,-72,-24,-22,-18,-14,6,8,26,28,30,36,50,58,80,84,92,92};\nint param0_5[] = {0,0,0,0,0,0,1,1,0,1,1,1,1,0,1,0,0,1,1,0,0,1,1};\nint param0_6[] = {6,7,9,27,30,42,54,55,57,57,59,76,84,84,84};\nint param0_7[] = {88,44,-96,-72,-80,0,-64,-64,-68,4,38,4,-38,68,-54,92,-16,62,24,54,0,54,62,-70,80,-12,84,-16,-10,88,-30,-56,48,50,-24,94,40,28,-86,-12};\nint param0_8[] = {0,1};\nint param0_9[] = {89,18,7,54,67,93,10,61,59,59,69,63,98,8,78,55,6,1,56,97,75,88,10};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {7,9,16,17,21,21,13,31,1,22};\n int param2[] = {6,12,26,20,12,22,14,26,1,14};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "nettle-3.9.1#umac-l2_prep#_nettle_umac_l2_init.c", "codebase": "nettle-3.9.1", "c_file": "umac-l2.c", "function": "_nettle_umac_l2_init", "sloc": "11", "c_code": "void\n_nettle_umac_l2_init (unsigned size, uint32_t *k)\n{\n unsigned i;\n for (i = 0; i < size; i++)\n {\n uint32_t w = k[i];\n w = (((((w)<<(8)) | ((w)>>((-(8)&31)))) & 0x00FF00FFUL) | ((((w)<<(24)) | ((w)>>((-(24)&31)))) & 0xFF00FF00UL));\n k[i] = w & 0x01ffffffUL;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#sexp2dsa_prep#nettle_dsa_signature_from_sexp.c", "codebase": "nettle-3.9.1", "c_file": "sexp2dsa.c", "function": "nettle_dsa_signature_from_sexp", "sloc": "13", "c_code": "int\nnettle_dsa_signature_from_sexp(struct dsa_signature *rs,\n struct sexp_iterator *i,\n unsigned q_bits)\n{\n static const char * const names[2] = { \"r\", \"s\" };\n struct sexp_iterator values[2];\n if (!nettle_sexp_iterator_assoc(i, 2, names, values))\n return 0;\n do { if (!nettle_mpz_set_sexp((rs->r), (q_bits), (&values[0])) || ((rs->r)->_mp_size < 0 ? -1 : (rs->r)->_mp_size > 0) <= 0) return 0; } while(0);\n do { if (!nettle_mpz_set_sexp((rs->s), (q_bits), (&values[1])) || ((rs->s)->_mp_size < 0 ? -1 : (rs->s)->_mp_size > 0) <= 0) return 0; } while(0);\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_authorization_prep#osip_authorization_get_crand.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authorization.c", "function": "osip_authorization_get_crand", "sloc": "3", "c_code": "char *osip_authorization_get_crand(osip_authorization_t *authorization) {\n return authorization->crand;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#tty-term_prep#tty_term_number.c", "codebase": "tmux", "c_file": "tty-term.c", "function": "tty_term_number", "sloc": "9", "c_code": "int\ntty_term_number(struct tty_term *term, enum tty_code_code code)\n{\n if (!tty_term_has(term, code))\n return (0);\n if (term->codes[code].type != TTYCODE_NUMBER)\n fatalx(\"not a number: %d\", code);\n return (term->codes[code].value.number);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 1, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#wam2ma_prep#F_put_atom.c", "codebase": "gprolog-1.5.0", "c_file": "wam2ma.c", "function": "F_put_atom", "sloc": "7", "c_code": "void\nF_put_atom(ArgVal arg[])\n{\n ArgVal *top = arg; BTNode *atom; char *str_atom; PlLong a; ((str_atom) = *((char * *) (top)) , (top)++); atom = BT_String_Add(&bt_tagged_atom, str_atom); ((a) = *((PlLong *) (top)) , (top)++);\n Inst_Printf(\"call_c\", \"Pl_Put_Atom_Tagged(ta(%d))\", atom->no);\n Inst_Printf(\"move_ret\", \"X(%\" \"l\" \"d\" \")\", a);\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#parserInternals_prep#xmlPedanticParserDefault.c", "codebase": "libxml2", "c_file": "parserInternals.c", "function": "xmlPedanticParserDefault", "sloc": "6", "c_code": "int\nxmlPedanticParserDefault(int val) {\n int old = (*__xmlPedanticParserDefaultValue());\n (*__xmlPedanticParserDefaultValue()) = val;\n return(old);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MINIMUM_NUMBER_DIVIDED_MAKE_NUMBER_PERFECT_SQUARE_prep#max.c", "codebase": "transcoder-set", "c_file": "FIND_MINIMUM_NUMBER_DIVIDED_MAKE_NUMBER_PERFECT_SQUARE.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_hexadecimal_numbers_prep#json_write_string.c", "codebase": "json.h", "c_file": "allow_hexadecimal_numbers.c", "function": "json_write_string", "sloc": "41", "c_code": "char *json_write_string(const struct json_string_s *string, char *data) {\n size_t i;\n *data++ = '\"';\n for (i = 0; i < string->string_size; i++) {\n switch (string->string[i]) {\n case '\"':\n *data++ = '\\\\';\n *data++ = '\"';\n break;\n case '\\\\':\n *data++ = '\\\\';\n *data++ = '\\\\';\n break;\n case '\\b':\n *data++ = '\\\\';\n *data++ = 'b';\n break;\n case '\\f':\n *data++ = '\\\\';\n *data++ = 'f';\n break;\n case '\\n':\n *data++ = '\\\\';\n *data++ = 'n';\n break;\n case '\\r':\n *data++ = '\\\\';\n *data++ = 'r';\n break;\n case '\\t':\n *data++ = '\\\\';\n *data++ = 't';\n break;\n default:\n *data++ = string->string[i];\n break;\n }\n }\n *data++ = '\"';\n return data;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 8}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_mom_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_mom_start", "sloc": "3", "c_code": "int ti_mom_start(double const *options) {\n return (int)options[0];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bzip2#bzlib_prep#BZ2_bzWriteOpen.c", "codebase": "bzip2", "c_file": "bzlib.c", "function": "BZ2_bzWriteOpen", "sloc": "37", "c_code": "BZFILE* BZ2_bzWriteOpen\n ( int* bzerror,\n FILE* f,\n int blockSize100k,\n int verbosity,\n int workFactor )\n{\n Int32 ret;\n bzFile* bzf = ((void *)0);\n { if (bzerror != ((void *)0)) *bzerror = 0; if (bzf != ((void *)0)) bzf->lastErr = 0; };\n if (f == ((void *)0) ||\n (blockSize100k < 1 || blockSize100k > 9) ||\n (workFactor < 0 || workFactor > 250) ||\n (verbosity < 0 || verbosity > 4))\n { { if (bzerror != ((void *)0)) *bzerror = (-2); if (bzf != ((void *)0)) bzf->lastErr = (-2); }; return ((void *)0); };\n if (ferror(f))\n { { if (bzerror != ((void *)0)) *bzerror = (-6); if (bzf != ((void *)0)) bzf->lastErr = (-6); }; return ((void *)0); };\n bzf = malloc ( sizeof(bzFile) );\n if (bzf == ((void *)0))\n { { if (bzerror != ((void *)0)) *bzerror = (-3); if (bzf != ((void *)0)) bzf->lastErr = (-3); }; return ((void *)0); };\n { if (bzerror != ((void *)0)) *bzerror = 0; if (bzf != ((void *)0)) bzf->lastErr = 0; };\n bzf->initialisedOk = ((Bool)0);\n bzf->bufN = 0;\n bzf->handle = f;\n bzf->writing = ((Bool)1);\n bzf->strm.bzalloc = ((void *)0);\n bzf->strm.bzfree = ((void *)0);\n bzf->strm.opaque = ((void *)0);\n if (workFactor == 0) workFactor = 30;\n ret = BZ2_bzCompressInit ( &(bzf->strm), blockSize100k,\n verbosity, workFactor );\n if (ret != 0)\n { { if (bzerror != ((void *)0)) *bzerror = ret; if (bzf != ((void *)0)) bzf->lastErr = ret; }; free(bzf); return ((void *)0); };\n bzf->strm.avail_in = 0;\n bzf->initialisedOk = ((Bool)1);\n return bzf;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 12, "memory_management": 2, "memory_operation": 0, "if_statement": 11, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_authorization_prep#osip_authorization_set_version.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authorization.c", "function": "osip_authorization_set_version", "sloc": "3", "c_code": "void osip_authorization_set_version(osip_authorization_t *authorization, char *version) {\n authorization->version = (char *) version;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libcsv#libcsv_prep#csv_set_delim.c", "codebase": "libcsv", "c_file": "libcsv.c", "function": "csv_set_delim", "sloc": "5", "c_code": "void\ncsv_set_delim(struct csv_parser *p, unsigned char c)\n{\n if (p) p->delim_char = c;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#symbol_prep#install_params.c", "codebase": "gawk-5.2.2", "c_file": "symbol.c", "function": "install_params", "sloc": "14", "c_code": "void\ninstall_params(NODE *func)\n{\n int i, pcount;\n NODE *parms;\n if (func == ((void *)0))\n return;\n ((void) (0));\n if ( (pcount = func->sub.nodep.l.ll) <= 0\n || (parms = func->sub.nodep.rn) == ((void *)0))\n return;\n for (i = 0; i < pcount; i++)\n (void) install(parms[i].sub.nodep.name, parms + i, Node_param_list);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_hexadecimal_numbers_prep#json_parse_value.c", "codebase": "json.h", "c_file": "allow_hexadecimal_numbers.c", "function": "json_parse_value", "sloc": "95", "c_code": "void json_parse_value(struct json_parse_state_s *state, int is_global_object,\n struct json_value_s *value) {\n const size_t flags_bitset = state->flags_bitset;\n const char *const src = state->src;\n const size_t size = state->size;\n size_t offset;\n (void)json_skip_all_skippables(state);\n offset = state->offset;\n if (is_global_object) {\n value->type = json_type_object;\n value->payload = state->dom;\n state->dom += sizeof(struct json_object_s);\n json_parse_object(state, 1,\n (struct json_object_s *)value->payload);\n } else {\n switch (src[offset]) {\n case '\"':\n case '\\'':\n value->type = json_type_string;\n value->payload = state->dom;\n state->dom += sizeof(struct json_string_s);\n json_parse_string(state, (struct json_string_s *)value->payload);\n break;\n case '{':\n value->type = json_type_object;\n value->payload = state->dom;\n state->dom += sizeof(struct json_object_s);\n json_parse_object(state, 0,\n (struct json_object_s *)value->payload);\n break;\n case '[':\n value->type = json_type_array;\n value->payload = state->dom;\n state->dom += sizeof(struct json_array_s);\n json_parse_array(state, (struct json_array_s *)value->payload);\n break;\n case '-':\n case '+':\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n case '.':\n value->type = json_type_number;\n value->payload = state->dom;\n state->dom += sizeof(struct json_number_s);\n json_parse_number(state, (struct json_number_s *)value->payload);\n break;\n default:\n if ((offset + 4) <= size && 't' == src[offset + 0] &&\n 'r' == src[offset + 1] && 'u' == src[offset + 2] &&\n 'e' == src[offset + 3]) {\n value->type = json_type_true;\n value->payload = 0;\n state->offset += 4;\n } else if ((offset + 5) <= size && 'f' == src[offset + 0] &&\n 'a' == src[offset + 1] && 'l' == src[offset + 2] &&\n 's' == src[offset + 3] && 'e' == src[offset + 4]) {\n value->type = json_type_false;\n value->payload = 0;\n state->offset += 5;\n } else if ((offset + 4) <= size && 'n' == src[offset + 0] &&\n 'u' == src[offset + 1] && 'l' == src[offset + 2] &&\n 'l' == src[offset + 3]) {\n value->type = json_type_null;\n value->payload = 0;\n state->offset += 4;\n } else if ((json_parse_flags_allow_inf_and_nan & flags_bitset) &&\n (offset + 3) <= size && 'N' == src[offset + 0] &&\n 'a' == src[offset + 1] && 'N' == src[offset + 2]) {\n value->type = json_type_number;\n value->payload = state->dom;\n state->dom += sizeof(struct json_number_s);\n json_parse_number(state, (struct json_number_s *)value->payload);\n } else if ((json_parse_flags_allow_inf_and_nan & flags_bitset) &&\n (offset + 8) <= size && 'I' == src[offset + 0] &&\n 'n' == src[offset + 1] && 'f' == src[offset + 2] &&\n 'i' == src[offset + 3] && 'n' == src[offset + 4] &&\n 'i' == src[offset + 5] && 't' == src[offset + 6] &&\n 'y' == src[offset + 7]) {\n value->type = json_type_number;\n value->payload = state->dom;\n state->dom += sizeof(struct json_number_s);\n json_parse_number(state, (struct json_number_s *)value->payload);\n }\n break;\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 15, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 5}}, {"id": "transcoder-set#DICE_THROW_PROBLEM_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "DICE_THROW_PROBLEM.c", "function": "f_gold", "sloc": "15", "c_code": "int f_gold ( int m, int n, int x ) {\n int table [ n + 1 ] [ x + 1 ];\n memset ( table, 0, sizeof ( table ) );\n for ( int j = 1;\n j <= m && j <= x;\n j ++ ) table [ 1 ] [ j ] = 1;\n for ( int i = 2;\n i <= n;\n i ++ ) for ( int j = 1;\n j <= x;\n j ++ ) for ( int k = 1;\n k <= m && k < j;\n k ++ ) table [ i ] [ j ] += table [ i - 1 ] [ j - k ];\n return table [ n ] [ x ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 4, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#modo_prep#WriteOne_R_PIDefine.c", "codebase": "mcsim-6.2.0", "c_file": "modo.c", "function": "WriteOne_R_PIDefine", "sloc": "16", "c_code": "int WriteOne_R_PIDefine (PFILE pfile, PVMMAPSTRCT pvm, PVOID pInfo)\n{\n static long iParms = 0;\n static long iForcs = 0;\n ((void) sizeof (((pvm ? (pvm)->hType & 0xF0000 : 0x00000) != 0x30000) ? 1 : 0), __extension__ ({ if ((pvm ? (pvm)->hType & 0xF0000 : 0x00000) != 0x30000) ; else __assert_fail (\"TYPE(pvm) != ID_OUTPUT\", \"modo.c\", 1324, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof (((pvm ? (pvm)->hType & 0xF0000 : 0x00000) != 0x10000) ? 1 : 0), __extension__ ({ if ((pvm ? (pvm)->hType & 0xF0000 : 0x00000) != 0x10000) ; else __assert_fail (\"TYPE(pvm) != ID_STATE\", \"modo.c\", 1325, __extension__ __PRETTY_FUNCTION__); }));\n if ((pvm ? (pvm)->hType & 0xF0000 : 0x00000) == 0x40000) {\n fprintf(pfile, \"#define %s parms[%ld]\\n\", pvm->szName, iParms);\n iParms = iParms + 1;\n }\n else {\n fprintf(pfile, \"#define %s forc[%ld]\\n\", pvm->szName, iForcs);\n iForcs = iForcs + 1;\n }\n return(1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "heman#mat4_prep#kmMat4GetForwardVec3RH.c", "codebase": "heman", "c_file": "mat4.c", "function": "kmMat4GetForwardVec3RH", "sloc": "6", "c_code": "kmVec3* kmMat4GetForwardVec3RH(kmVec3* pOut, const kmMat4* pIn)\n{\n kmVec3MultiplyMat4(pOut, &KM_VEC3_NEG_Z, pIn);\n kmVec3Normalize(pOut, pOut);\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_parse_object.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_parse_object", "sloc": "89", "c_code": "void json_parse_object(struct json_parse_state_s *state, int is_global_object,\n struct json_object_s *object) {\n const size_t flags_bitset = state->flags_bitset;\n const size_t size = state->size;\n const char *const src = state->src;\n size_t elements = 0;\n int allow_comma = 0;\n struct json_object_element_s *previous = 0;\n if (is_global_object) {\n if ('{' == src[state->offset]) {\n is_global_object = 0;\n }\n }\n if (!is_global_object) {\n state->offset++;\n }\n (void)json_skip_all_skippables(state);\n elements = 0;\n while (state->offset < size) {\n struct json_object_element_s *element = 0;\n struct json_string_s *string = 0;\n struct json_value_s *value = 0;\n if (!is_global_object) {\n (void)json_skip_all_skippables(state);\n if ('}' == src[state->offset]) {\n state->offset++;\n break;\n }\n } else {\n if (json_skip_all_skippables(state)) {\n break;\n }\n }\n if (allow_comma) {\n if (',' == src[state->offset]) {\n state->offset++;\n allow_comma = 0;\n continue;\n }\n }\n element = (struct json_object_element_s *)state->dom;\n state->dom += sizeof(struct json_object_element_s);\n if (0 == previous) {\n object->start = element;\n } else {\n previous->next = element;\n }\n previous = element;\n if (json_parse_flags_allow_location_information & flags_bitset) {\n struct json_string_ex_s *string_ex =\n (struct json_string_ex_s *)state->dom;\n state->dom += sizeof(struct json_string_ex_s);\n string_ex->offset = state->offset;\n string_ex->line_no = state->line_no;\n string_ex->row_no = state->offset - state->line_offset;\n string = &(string_ex->string);\n } else {\n string = (struct json_string_s *)state->dom;\n state->dom += sizeof(struct json_string_s);\n }\n element->name = string;\n (void)json_parse_key(state, string);\n (void)json_skip_all_skippables(state);\n state->offset++;\n (void)json_skip_all_skippables(state);\n if (json_parse_flags_allow_location_information & flags_bitset) {\n struct json_value_ex_s *value_ex = (struct json_value_ex_s *)state->dom;\n state->dom += sizeof(struct json_value_ex_s);\n value_ex->offset = state->offset;\n value_ex->line_no = state->line_no;\n value_ex->row_no = state->offset - state->line_offset;\n value = &(value_ex->value);\n } else {\n value = (struct json_value_s *)state->dom;\n state->dom += sizeof(struct json_value_s);\n }\n element->value = value;\n json_parse_value(state, 0, value);\n elements++;\n allow_comma = 1;\n }\n if (previous) {\n previous->next = 0;\n }\n if (0 == elements) {\n object->start = 0;\n }\n object->length = elements;\n}\n", "c_constructs": {"pointer_type": 6, "array_type": 0, "struct_type": 8, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 15, "memory_management": 0, "memory_operation": 0, "if_statement": 13, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 3}}, {"id": "json.h#allow_simplified_json_prep#is_valid_unquoted_key_char.c", "codebase": "json.h", "c_file": "allow_simplified_json.c", "function": "is_valid_unquoted_key_char", "sloc": "4", "c_code": "int is_valid_unquoted_key_char(const char c) {\n return (('0' <= c && c <= '9') || ('a' <= c && c <= 'z') ||\n ('A' <= c && c <= 'Z') || ('_' == c));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#rcsgen_prep#format_assocs.c", "codebase": "rcs-5.10.1", "c_file": "rcsgen.c", "function": "format_assocs", "sloc": "9", "c_code": "void\nformat_assocs (FILE *out, char const *fmt)\n{\n for (struct link *ls = ((top->repository. r)-> symbols); ls; ls = ls->next)\n {\n struct symdef const *d = ls->entry;\n aprintf (out, fmt, d->meaningful, d->underlying);\n }\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_FOR_SURFACE_AREA_OF_OCTAHEDRON_prep#max.c", "codebase": "transcoder-set", "c_file": "PROGRAM_FOR_SURFACE_AREA_OF_OCTAHEDRON.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#png_prep#png_init_io.c", "codebase": "optipng-0.7.8", "c_file": "png.c", "function": "png_init_io", "sloc": "8", "c_code": "void\npng_init_io(png_structrp png_ptr, png_FILE_p fp)\n{\n ((void)0);\n if (png_ptr == ((void *)0))\n return;\n png_ptr->io_ptr = (png_voidp)fp;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsTibetan.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsTibetan", "sloc": "4", "c_code": "int\nxmlUCSIsTibetan(int code) {\n return(((code >= 0x0F00) && (code <= 0x0FFF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#logfile_prep#logfflush.c", "codebase": "screen-4.9.0", "c_file": "logfile.c", "function": "logfflush", "sloc": "19", "c_code": "int logfflush(struct logfile *l) {\n int r = 0;\n if (!l)\n for (l = logroot; l; l = l->next) {\n if (stolen_logfile(l) && lf_reopen_fn(l->name, fileno(l->fp), l))\n return -1;\n r |= fflush(l->fp);\n l->flushcount++;\n changed_logfile(l);\n }\n else {\n if (stolen_logfile(l) && lf_reopen_fn(l->name, fileno(l->fp), l))\n return -1;\n r = fflush(l->fp);\n l->flushcount++;\n changed_logfile(l);\n }\n return r;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_NODES_K_TH_LEVEL_TREE_REPRESENTED_STRING_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "SUM_NODES_K_TH_LEVEL_TREE_REPRESENTED_STRING.c", "function": "f_gold", "sloc": "15", "c_code": "int f_gold ( char tree [], int k ) {\n int level = - 1;\n int sum = 0;\n int n = strlen(tree);\n for ( int i = 0;\n i < n;\n i ++ ) {\n if ( tree [ i ] == '(' ) level ++;\n else if ( tree [ i ] == ')' ) level --;\n else {\n if ( level == k ) sum += ( tree [ i ] - '0' );\n }\n }\n return sum;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#error_prep#xmlParserValidityWarning.c", "codebase": "libxml2", "c_file": "error.c", "function": "xmlParserValidityWarning", "sloc": "8", "c_code": "void\nxmlParserValidityWarning(void *ctx, const char *msg __attribute__((unused)), ...)\n{\n va_list ap;\n __builtin_va_start(ap,msg);\n xmlVFormatLegacyError(ctx, \"validity warning\", msg, ap);\n __builtin_va_end(ap);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_IF_X_CAN_GIVE_CHANGE_TO_EVERY_PERSON_IN_THE_QUEUE_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "CHECK_IF_X_CAN_GIVE_CHANGE_TO_EVERY_PERSON_IN_THE_QUEUE.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int notes [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#gosthash94_prep#nettle_gosthash94cp_update.c", "codebase": "nettle-3.9.1", "c_file": "gosthash94.c", "function": "nettle_gosthash94cp_update", "sloc": "7", "c_code": "void\nnettle_gosthash94cp_update (struct gosthash94_ctx *ctx,\n size_t length, const uint8_t *msg)\n{\n gosthash94_update_int (ctx, length, msg,\n _nettle_gost28147_param_CryptoPro_3411.sbox);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngwutil_prep#png_save_uint_16.c", "codebase": "optipng-0.7.8", "c_file": "pngwutil.c", "function": "png_save_uint_16", "sloc": "6", "c_code": "void\npng_save_uint_16(png_bytep buf, unsigned int i)\n{\n buf[0] = (png_byte)((i >> 8) & 0xffU);\n buf[1] = (png_byte)( i & 0xffU);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#partime_prep#partime.c", "codebase": "rcs-5.10.1", "c_file": "partime.c", "function": "partime", "sloc": "19", "c_code": "char const*\npartime (char const *s, struct partime *t)\n{\n struct partime p;\n undefine (t);\n while (*s)\n {\n int i = 0;\n char const *s1;\n do\n {\n if (!(s1 = parse_prefix (s, &p, &i)))\n return s;\n }\n while ((0 > (merge_partime (t, &p))));\n s = s1;\n }\n return s;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#awkgram_prep#yyparse.c", "codebase": "gawk-5.2.2", "c_file": "awkgram.c", "function": "yyparse", "sloc": "1947", "c_code": "int\nyyparse (void)\n{\n yy_state_fast_t yystate = 0;\n int yyerrstatus = 0;\n long int yystacksize = 200;\n yy_state_t yyssa[200];\n yy_state_t *yyss = yyssa;\n yy_state_t *yyssp = yyss;\n INSTRUCTION * yyvsa[200];\n INSTRUCTION * *yyvs = yyvsa;\n INSTRUCTION * *yyvsp = yyvs;\n int yyn;\n int yyresult;\n yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;\n INSTRUCTION * yyval;\n int yylen = 0;\n ((void) 0);\n yychar = -2;\n goto yysetstate;\nyynewstate:\n yyssp++;\nyysetstate:\n ((void) 0);\n ((void) (0 && (0 <= yystate && yystate < 356)));\n \n *yyssp = ((yy_state_t) (yystate));\n \n ;\n if (yyss + yystacksize - 1 <= yyssp)\n {\n long int yysize = yyssp - yyss + 1;\n if (10000 <= yystacksize)\n goto yyexhaustedlab;\n yystacksize *= 2;\n if (10000 < yystacksize)\n yystacksize = 10000;\n {\n yy_state_t *yyss1 = yyss;\n union yyalloc *yyptr =\n ((union yyalloc *) (pma_malloc (((long unsigned int) (((yystacksize) * (((long int) (sizeof (yy_state_t))) + ((long int) (sizeof (INSTRUCTION *)))) + (((long int) (sizeof (union yyalloc))) - 1)))))));\n if (! yyptr)\n goto yyexhaustedlab;\n do { long int yynewbytes; __builtin_memcpy (&yyptr->yyss_alloc, yyss, ((long unsigned int) ((yysize))) * sizeof (*(yyss))); yyss = &yyptr->yyss_alloc; yynewbytes = yystacksize * ((long int) (sizeof (*yyss))) + (((long int) (sizeof (union yyalloc))) - 1); yyptr += yynewbytes / ((long int) (sizeof (*yyptr))); } while (0);\n do { long int yynewbytes; __builtin_memcpy (&yyptr->yyvs_alloc, yyvs, ((long unsigned int) ((yysize))) * sizeof (*(yyvs))); yyvs = &yyptr->yyvs_alloc; yynewbytes = yystacksize * ((long int) (sizeof (*yyvs))) + (((long int) (sizeof (union yyalloc))) - 1); yyptr += yynewbytes / ((long int) (sizeof (*yyptr))); } while (0);\n if (yyss1 != yyssa)\n pma_free (yyss1);\n }\n yyssp = yyss + yysize - 1;\n yyvsp = yyvs + yysize - 1;\n \n ((void) 0);\n \n if (yyss + yystacksize - 1 <= yyssp)\n goto yyabortlab;\n }\n if (yystate == 2)\n goto yyacceptlab;\n goto yybackup;\nyybackup:\n yyn = yypact[yystate];\n if (((yyn) == (-276)))\n goto yydefault;\n if (yychar == -2)\n {\n ((void) 0);\n yychar = yylex ();\n }\n if (yychar <= 0)\n {\n yychar = 0;\n yytoken = YYSYMBOL_YYEOF;\n ((void) 0);\n }\n else if (yychar == 256)\n {\n yychar = 257;\n yytoken = YYSYMBOL_YYerror;\n goto yyerrlab1;\n }\n else\n {\n yytoken = (0 <= (yychar) && (yychar) <= 310 ? ((yysymbol_kind_t) (yytranslate[yychar])) : YYSYMBOL_YYUNDEF);\n ;\n }\n yyn += yytoken;\n if (yyn < 0 || 1200 < yyn || yycheck[yyn] != yytoken)\n goto yydefault;\n yyn = yytable[yyn];\n if (yyn <= 0)\n {\n if (((yyn) == (-119)))\n goto yyerrlab;\n yyn = -yyn;\n goto yyreduce;\n }\n if (yyerrstatus)\n yyerrstatus--;\n ;\n yystate = yyn;\n \n#pragma GCC diagnostic push\n \n#pragma GCC diagnostic ignored \"-Wuninitialized\"\n \n#pragma GCC diagnostic ignored \"-Wmaybe-uninitialized\"\n \n *++yyvsp = yylval;\n \n#pragma GCC diagnostic pop\n \n yychar = -2;\n goto yynewstate;\nyydefault:\n yyn = yydefact[yystate];\n if (yyn == 0)\n goto yyerrlab;\n goto yyreduce;\nyyreduce:\n yylen = yyr2[yyn];\n yyval = yyvsp[1-yylen];\n ;\n switch (yyn)\n {\n case 2:\n { yyval = ((void *)0); }\n break;\n case 3:\n {\n rule = 0;\n (yyerrstatus = 0);\n }\n break;\n case 4:\n {\n if (yyvsp[0] != ((void *)0)) {\n if (yyvsp[-1] == ((void *)0))\n outer_comment = yyvsp[0];\n else\n interblock_comment = yyvsp[0];\n }\n yyval = yyvsp[-1];\n }\n break;\n case 5:\n {\n next_sourcefile();\n }\n break;\n case 6:\n {\n rule = 0;\n }\n break;\n case 7:\n {\n (void) append_rule(yyvsp[-1], yyvsp[0]);\n if (pending_comment != ((void *)0)) {\n interblock_comment = pending_comment;\n pending_comment = ((void *)0);\n }\n }\n break;\n case 8:\n {\n if (rule != Rule) {\n msg(gettext(\"%s blocks must have an action part\"), ruletab[rule]);\n errcount++;\n } else if (yyvsp[-1] == ((void *)0)) {\n msg(gettext(\"each rule must have a pattern or an action part\"));\n errcount++;\n } else {\n if (yyvsp[0] != ((void *)0))\n list_append(yyvsp[-1], yyvsp[0]);\n (void) append_rule(yyvsp[-1], ((void *)0));\n }\n }\n break;\n case 9:\n {\n in_function = 0;\n (void) mk_function(yyvsp[-1], yyvsp[0]);\n want_param_names = DONT_CHECK;\n if (pending_comment != ((void *)0)) {\n interblock_comment = pending_comment;\n pending_comment = ((void *)0);\n }\n (yyerrstatus = 0);\n }\n break;\n case 10:\n {\n want_source = 0;\n at_seen--;\n if (yyvsp[-1] != ((void *)0) && yyvsp[0] != ((void *)0)) {\n SRCFILE *s = (SRCFILE *) yyvsp[-1];\n s->comment = yyvsp[0];\n }\n (yyerrstatus = 0);\n }\n break;\n case 11:\n {\n want_source = 0;\n at_seen--;\n if (yyvsp[-1] != ((void *)0) && yyvsp[0] != ((void *)0)) {\n SRCFILE *s = (SRCFILE *) yyvsp[-1];\n s->comment = yyvsp[0];\n }\n (yyerrstatus = 0);\n }\n break;\n case 12:\n {\n want_source = 0;\n want_namespace = 0;\n at_seen--;\n set_namespace(yyvsp[-1], yyvsp[0]);\n (yyerrstatus = 0);\n }\n break;\n case 13:\n {\n void *srcfile = ((void *)0);\n if (! include_source(yyvsp[0], & srcfile))\n goto yyabortlab;\n pma_free(yyvsp[0]->d.name);\n bcfree(yyvsp[0]);\n yyval = (INSTRUCTION *) srcfile;\n }\n break;\n case 14:\n { yyval = ((void *)0); }\n break;\n case 15:\n { yyval = ((void *)0); }\n break;\n case 16:\n {\n void *srcfile;\n if (! load_library(yyvsp[0], & srcfile))\n goto yyabortlab;\n pma_free(yyvsp[0]->d.name);\n bcfree(yyvsp[0]);\n yyval = (INSTRUCTION *) srcfile;\n }\n break;\n case 17:\n { yyval = ((void *)0); }\n break;\n case 18:\n { yyval = ((void *)0); }\n break;\n case 19:\n { yyval = yyvsp[0]; }\n break;\n case 20:\n { yyval = ((void *)0); }\n break;\n case 21:\n { yyval = ((void *)0); }\n break;\n case 22:\n {\n rule = Rule;\n yyval = ((void *)0);\n }\n break;\n case 23:\n {\n rule = Rule;\n }\n break;\n case 24:\n {\n INSTRUCTION *tp;\n add_lint(yyvsp[-2], LINT_assign_in_cond);\n add_lint(yyvsp[0], LINT_assign_in_cond);\n tp = bcalloc(Op_no_op, 1, 0);\n list_prepend(yyvsp[-2], bcalloc(Op_line_range, !!(do_flags & DO_PRETTY_PRINT) + 1, 0));\n yyvsp[-2]->nexti->x.xl = 0;\n yyvsp[-2]->nexti->d.di = yyvsp[0]->nexti;\n list_append(yyvsp[-2], bcalloc(Op_cond_pair, 1, 0));\n yyvsp[-2]->d.di->x.xi = yyvsp[-2]->nexti;\n yyvsp[-2]->d.di->d.di = tp;\n list_append(yyvsp[0], bcalloc(Op_cond_pair, 1, 0));\n yyvsp[0]->d.di->x.xi = yyvsp[-2]->nexti;\n yyvsp[0]->d.di->d.di = tp;\n if ((do_flags & DO_PRETTY_PRINT)) {\n (yyvsp[-2]->nexti + 1)->d.di = yyvsp[-2]->d.di;\n (yyvsp[-2]->nexti + 1)->x.xi = yyvsp[0]->d.di;\n }\n if (yyvsp[-1] != ((void *)0))\n yyval = list_append(list_merge(list_prepend(yyvsp[-2], yyvsp[-1]), yyvsp[0]), tp);\n else\n yyval = list_append(list_merge(yyvsp[-2], yyvsp[0]), tp);\n rule = Rule;\n }\n break;\n case 25:\n {\n static int begin_seen = 0;\n if ((do_flags & DO_LINT_OLD) && ++begin_seen == 2)\n lintwarn_ln(yyvsp[0]->source_line,\n gettext(\"old awk does not support multiple `BEGIN' or `END' rules\"));\n yyvsp[0]->x.xl = rule = BEGIN;\n yyvsp[0]->d.name = source;\n yyval = yyvsp[0];\n }\n break;\n case 26:\n {\n static int end_seen = 0;\n if ((do_flags & DO_LINT_OLD) && ++end_seen == 2)\n lintwarn_ln(yyvsp[0]->source_line,\n gettext(\"old awk does not support multiple `BEGIN' or `END' rules\"));\n yyvsp[0]->x.xl = rule = END;\n yyvsp[0]->d.name = source;\n yyval = yyvsp[0];\n }\n break;\n case 27:\n {\n yyvsp[0]->x.xl = rule = BEGINFILE;\n yyvsp[0]->d.name = source;\n yyval = yyvsp[0];\n }\n break;\n case 28:\n {\n yyvsp[0]->x.xl = rule = ENDFILE;\n yyvsp[0]->d.name = source;\n yyval = yyvsp[0];\n }\n break;\n case 29:\n {\n INSTRUCTION *ip = make_braced_statements(yyvsp[-4], yyvsp[-3], yyvsp[-2]);\n if (yyvsp[-2] != ((void *)0) && yyvsp[0] != ((void *)0)) {\n merge_comments(yyvsp[-2], yyvsp[0]);\n pending_comment = yyvsp[-2];\n } else if (yyvsp[-2] != ((void *)0)) {\n pending_comment = yyvsp[-2];\n } else if (yyvsp[0] != ((void *)0)) {\n pending_comment = yyvsp[0];\n }\n yyval = ip;\n }\n break;\n case 31:\n {\n const char *name = yyvsp[0]->d.name;\n char *qname = qualify_name(name, strlen(name));\n if (qname != name) {\n pma_free((void *)name);\n yyvsp[0]->d.name = qname;\n }\n yyval = yyvsp[0];\n }\n break;\n case 32:\n {\n yyerror(gettext(\"`%s' is a built-in function, it cannot be redefined\"),\n tokstart);\n goto yyabortlab;\n }\n break;\n case 33:\n {\n yyval = yyvsp[0];\n at_seen--;\n }\n break;\n case 36:\n { want_param_names = FUNC_HEADER; }\n break;\n case 37:\n {\n INSTRUCTION *func_comment = ((void *)0);\n if (yyvsp[-2] != ((void *)0) && yyvsp[-2]->comment != ((void *)0)) {\n if (yyvsp[0] != ((void *)0)) {\n merge_comments(yyvsp[-2]->comment, yyvsp[0]);\n }\n func_comment = yyvsp[-2]->comment;\n } else if (yyvsp[0] != ((void *)0)) {\n func_comment = yyvsp[0];\n }\n yyvsp[-6]->d.name = source;\n yyvsp[-6]->comment = func_comment;\n if (install_function(yyvsp[-5]->d.name, yyvsp[-6], yyvsp[-2]) < 0)\n goto yyabortlab;\n in_function = 1;\n yyvsp[-5]->d.name = ((void *)0);\n bcfree(yyvsp[-5]);\n yyval = yyvsp[-6];\n want_param_names = FUNC_BODY;\n }\n break;\n case 38:\n { want_regexp = 1; }\n break;\n case 39:\n {\n NODE *n, *exp;\n char *re;\n size_t len;\n re = yyvsp[0]->d.name;\n yyvsp[0]->d.name = ((void *)0);\n len = strlen(re);\n if ((do_flags & (DO_LINT_INVALID|DO_LINT_ALL))) {\n if (len == 0)\n lintwarn_ln(yyvsp[0]->source_line,\n gettext(\"regexp constant `//' looks like a C++ comment, but is not\"));\n else if (re[0] == '*' && re[len-1] == '*')\n lintwarn_ln(yyvsp[0]->source_line,\n gettext(\"regexp constant `/%s/' looks like a C comment, but is not\"), re);\n }\n exp = make_str_node(re, len, 2);\n n = make_regnode(Node_regex, exp);\n if (n == ((void *)0)) {\n unref(exp);\n goto yyabortlab;\n }\n yyval = yyvsp[0];\n yyval->opcode = Op_match_rec;\n yyval->d.dn = n;\n }\n break;\n case 40:\n {\n char *re;\n size_t len;\n re = yyvsp[0]->d.name;\n yyvsp[0]->d.name = ((void *)0);\n len = strlen(re);\n yyval = yyvsp[0];\n yyval->opcode = Op_push_re;\n yyval->d.dn = make_typed_regex(re, len);\n }\n break;\n case 41:\n { bcfree(yyvsp[0]); }\n break;\n case 43:\n { yyval = ((void *)0); }\n break;\n case 44:\n {\n if (yyvsp[0] == ((void *)0)) {\n yyval = yyvsp[-1];\n } else {\n add_lint(yyvsp[0], LINT_no_effect);\n if (yyvsp[-1] == ((void *)0)) {\n yyval = yyvsp[0];\n } else {\n yyval = list_merge(yyvsp[-1], yyvsp[0]);\n }\n }\n if (trailing_comment != ((void *)0)) {\n yyval = list_append(yyval, trailing_comment);\n trailing_comment = ((void *)0);\n }\n (yyerrstatus = 0);\n }\n break;\n case 45:\n { yyval = ((void *)0); }\n break;\n case 46:\n { yyval = yyvsp[0]; }\n break;\n case 47:\n { yyval = yyvsp[0]; }\n break;\n case 48:\n {\n if (yyvsp[0] != ((void *)0)) {\n INSTRUCTION *ip;\n merge_comments(yyvsp[0], ((void *)0));\n ip = list_create(bcalloc(Op_no_op, 1, 0));\n yyval = list_append(ip, yyvsp[0]);\n } else\n yyval = ((void *)0);\n }\n break;\n case 49:\n {\n trailing_comment = yyvsp[0];\n yyval = make_braced_statements(yyvsp[-2], yyvsp[-1], yyvsp[0]);\n }\n break;\n case 50:\n {\n if ((do_flags & DO_PRETTY_PRINT))\n yyval = list_prepend(yyvsp[0], bcalloc(Op_exec_count, 1, 0));\n else\n yyval = yyvsp[0];\n }\n break;\n case 51:\n {\n INSTRUCTION *dflt, *curr = ((void *)0), *cexp, *cstmt;\n INSTRUCTION *ip, *nextc, *tbreak;\n const char **case_values = ((void *)0);\n int maxcount = 128;\n int case_count = 0;\n int i;\n tbreak = bcalloc(Op_no_op, 1, 0);\n cstmt = list_create(tbreak);\n cexp = list_create(bcalloc(Op_pop, 1, 0));\n dflt = bcalloc(Op_jmp, 1, 0);\n dflt->d.di = tbreak;\n if (yyvsp[-2] != ((void *)0)) {\n curr = yyvsp[-2]->nexti;\n bcfree(yyvsp[-2]);\n }\n for (; curr != ((void *)0); curr = nextc) {\n INSTRUCTION *caseexp = curr->d.di;\n INSTRUCTION *casestmt = curr->x.xi;\n nextc = curr->nexti;\n if (curr->opcode == Op_K_case) {\n if (caseexp->opcode == Op_push_i) {\n char *caseval;\n caseval = force_string_fmt((caseexp->d.dn), CONVFMT, CONVFMTidx)->sub.val.sp;\n for (i = 0; i < case_count; i++) {\n if (strcmp(caseval, case_values[i]) == 0)\n error_ln(curr->source_line,\n gettext(\"duplicate case values in switch body: %s\"), caseval);\n }\n if (case_values == ((void *)0))\n (void) (case_values = (const char **) emalloc_real((size_t)(sizeof(char *) * maxcount), \"statement\", \"case_values\", \"awkgram.y\", 699));\n else if (case_count >= maxcount) {\n maxcount += 128;\n (void) (case_values = (const char **) erealloc_real((void *) case_values, (size_t)(sizeof(char*) * maxcount), \"statement\", \"case_values\", \"awkgram.y\", 702));\n }\n case_values[case_count++] = caseval;\n } else {\n (curr + 1)->x.xl = 1;\n }\n curr->d.di = casestmt->nexti;\n curr->x.xi = casestmt->d.di;\n (void) list_prepend(cexp, curr);\n (void) list_prepend(cexp, caseexp);\n } else {\n if (dflt->d.di != tbreak)\n error_ln(curr->source_line,\n gettext(\"duplicate `default' detected in switch body\"));\n else\n dflt->d.di = casestmt->nexti;\n if ((do_flags & DO_PRETTY_PRINT)) {\n curr->d.di = casestmt->nexti;\n curr->x.xi = casestmt->d.di;\n (void) list_prepend(cexp, curr);\n } else\n bcfree(curr);\n }\n cstmt = list_merge(casestmt, cstmt);\n }\n if (case_values != ((void *)0))\n pma_free(case_values);\n ip = yyvsp[-6];\n if ((do_flags & DO_PRETTY_PRINT)) {\n INSTRUCTION *head_comment = ((void *)0);\n if (yyvsp[-4] != ((void *)0) && yyvsp[-3] != ((void *)0)) {\n merge_comments(yyvsp[-4], yyvsp[-3]);\n head_comment = yyvsp[-4];\n } else if (yyvsp[-4] != ((void *)0))\n head_comment = yyvsp[-4];\n else\n head_comment = yyvsp[-3];\n yyvsp[-8]->comment = head_comment;\n (void) list_prepend(ip, yyvsp[-8]);\n (void) list_prepend(ip, bcalloc(Op_exec_count, 1, 0));\n yyvsp[-8]->x.xi = tbreak;\n (yyvsp[-8] + 1)->d.di = cexp->nexti;\n (yyvsp[-8] + 1)->x.xi = cexp->d.di;\n (yyvsp[-8] + 1)->x.xi->comment = yyvsp[0];\n }\n (void) list_append(cexp, dflt);\n (void) list_merge(ip, cexp);\n if (yyvsp[-1] != ((void *)0))\n (void) list_append(cstmt, yyvsp[-1]);\n yyval = list_merge(ip, cstmt);\n break_allowed--;\n fix_break_continue(ip, tbreak, ((void *)0));\n }\n break;\n case 52:\n {\n INSTRUCTION *ip, *tbreak, *tcont;\n tbreak = bcalloc(Op_no_op, 1, 0);\n add_lint(yyvsp[-3], LINT_assign_in_cond);\n tcont = yyvsp[-3]->nexti;\n ip = list_append(yyvsp[-3], bcalloc(Op_jmp_false, 1, 0));\n ip->d.di->d.di = tbreak;\n if ((do_flags & DO_PRETTY_PRINT)) {\n (void) list_append(ip, bcalloc(Op_exec_count, 1, 0));\n yyvsp[-5]->x.xi = tbreak;\n yyvsp[-5]->d.di = tcont;\n (yyvsp[-5] + 1)->d.di = ip->d.di;\n (void) list_prepend(ip, yyvsp[-5]);\n }\n if (yyvsp[-1] != ((void *)0)) {\n if (yyvsp[0] == ((void *)0))\n yyvsp[0] = list_create(bcalloc(Op_no_op, 1, 0));\n yyvsp[-1]->d.dn->sub.val.comtype = BLOCK_COMMENT;\n yyvsp[0] = list_prepend(yyvsp[0], yyvsp[-1]);\n }\n if (yyvsp[0] != ((void *)0))\n (void) list_merge(ip, yyvsp[0]);\n (void) list_append(ip, bcalloc(Op_jmp, 1, 0));\n ip->d.di->d.di = tcont;\n yyval = list_append(ip, tbreak);\n break_allowed--;\n continue_allowed--;\n fix_break_continue(ip, tbreak, tcont);\n }\n break;\n case 53:\n {\n INSTRUCTION *ip, *tbreak, *tcont;\n tbreak = bcalloc(Op_no_op, 1, 0);\n tcont = yyvsp[-2]->nexti;\n add_lint(yyvsp[-2], LINT_assign_in_cond);\n if (yyvsp[-5] != ((void *)0))\n ip = list_merge(yyvsp[-5], yyvsp[-2]);\n else\n ip = list_prepend(yyvsp[-2], bcalloc(Op_no_op, 1, 0));\n if (yyvsp[-6] != ((void *)0))\n (void) list_prepend(ip, yyvsp[-6]);\n if ((do_flags & DO_PRETTY_PRINT))\n (void) list_prepend(ip, bcalloc(Op_exec_count, 1, 0));\n (void) list_append(ip, bcalloc(Op_jmp_true, 1, 0));\n ip->d.di->d.di = ip->nexti;\n yyval = list_append(ip, tbreak);\n break_allowed--;\n continue_allowed--;\n fix_break_continue(ip, tbreak, tcont);\n if ((do_flags & DO_PRETTY_PRINT)) {\n yyvsp[-7]->x.xi = tbreak;\n yyvsp[-7]->d.di = tcont;\n (yyvsp[-7] + 1)->d.di = tcont;\n yyval = list_prepend(ip, yyvsp[-7]);\n bcfree(yyvsp[-4]);\n if (yyvsp[0] != ((void *)0))\n yyvsp[-7]->comment = yyvsp[0];\n }\n }\n break;\n case 54:\n {\n INSTRUCTION *ip;\n char *var_name = yyvsp[-5]->d.name;\n if (yyvsp[0] != ((void *)0)\n && yyvsp[0]->d.di->opcode == Op_K_delete\n && yyvsp[0]->d.di->x.xl == 1\n && yyvsp[0]->nexti->opcode == Op_push\n && (yyvsp[0]->nexti->d.dn->type != Node_var || !(yyvsp[0]->nexti->d.dn->sub.nodep.r.uptr))\n && strcmp(yyvsp[0]->nexti->d.dn->sub.nodep.name, var_name) == 0\n ) {\n NODE *arr = ((void *)0);\n ip = yyvsp[0]->nexti->nexti;\n if (yyvsp[-3]->nexti->opcode == Op_push && yyvsp[-3]->d.di == yyvsp[-3]->nexti)\n arr = yyvsp[-3]->nexti->d.dn;\n if (arr != ((void *)0)\n && ip->opcode == Op_no_op\n && ip->nexti->opcode == Op_push_array\n && strcmp(ip->nexti->d.dn->sub.nodep.name, arr->sub.nodep.name) == 0\n && ip->nexti->nexti == yyvsp[0]->d.di\n ) {\n (void) make_assignable(yyvsp[0]->nexti);\n yyvsp[0]->d.di->opcode = Op_K_delete_loop;\n yyvsp[0]->d.di->x.xl = 0;\n if (yyvsp[-7] != ((void *)0))\n bcfree(yyvsp[-7]);\n pma_free(var_name);\n bcfree(yyvsp[-5]);\n bcfree(yyvsp[-4]);\n bcfree(yyvsp[-3]);\n if (yyvsp[-1] != ((void *)0)) {\n merge_comments(yyvsp[-1], ((void *)0));\n yyvsp[0] = list_prepend(yyvsp[0], yyvsp[-1]);\n }\n yyval = yyvsp[0];\n } else\n goto regular_loop;\n } else {\n INSTRUCTION *tbreak, *tcont;\nregular_loop:\n ip = yyvsp[-3];\n ip->nexti->opcode = Op_push_array;\n tbreak = bcalloc(Op_arrayfor_final, 1, 0);\n yyvsp[-4]->opcode = Op_arrayfor_incr;\n yyvsp[-4]->x.xn = variable(yyvsp[-5]->source_line, var_name, Node_var);\n yyvsp[-4]->d.di = tbreak;\n tcont = yyvsp[-4];\n yyvsp[-5]->opcode = Op_arrayfor_init;\n yyvsp[-5]->d.di = tbreak;\n (void) list_append(ip, yyvsp[-5]);\n if ((do_flags & DO_PRETTY_PRINT)) {\n yyvsp[-7]->opcode = Op_K_arrayfor;\n yyvsp[-7]->d.di = tcont;\n yyvsp[-7]->x.xi = tbreak;\n (void) list_append(ip, yyvsp[-7]);\n }\n if (yyvsp[-4]->x.xn->type == Node_var && yyvsp[-4]->x.xn->sub.nodep.r.uptr) {\n (void) list_append(ip, bcalloc(Op_var_update, 1, 0));\n ip->d.di->x.aptr = yyvsp[-4]->x.xn->sub.nodep.r.uptr;\n }\n (void) list_append(ip, yyvsp[-4]);\n if (yyvsp[-4]->x.xn->type == Node_var && yyvsp[-4]->x.xn->sub.nodep.x.aptr) {\n (void) list_append(ip, bcalloc(Op_var_assign, 1, 0));\n ip->d.di->x.aptr = yyvsp[-4]->x.xn->sub.nodep.x.aptr;\n }\n if ((do_flags & DO_PRETTY_PRINT)) {\n (void) list_append(ip, bcalloc(Op_exec_count, 1, 0));\n (yyvsp[-7] + 1)->d.di = yyvsp[-4];\n (yyvsp[-7] + 1)->x.xi = ip->d.di;\n }\n if (yyvsp[-1] != ((void *)0))\n merge_comments(yyvsp[-1], ((void *)0));\n if (yyvsp[0] != ((void *)0)) {\n if (yyvsp[-1] != ((void *)0))\n yyvsp[0] = list_prepend(yyvsp[0], yyvsp[-1]);\n (void) list_merge(ip, yyvsp[0]);\n } else if (yyvsp[-1] != ((void *)0))\n (void) list_append(ip, yyvsp[-1]);\n (void) list_append(ip, bcalloc(Op_jmp, 1, 0));\n ip->d.di->d.di = yyvsp[-4];\n yyval = list_append(ip, tbreak);\n fix_break_continue(ip, tbreak, tcont);\n }\n break_allowed--;\n continue_allowed--;\n }\n break;\n case 55:\n {\n if (yyvsp[-7] != ((void *)0)) {\n merge_comments(yyvsp[-7], ((void *)0));\n yyvsp[-11]->comment = yyvsp[-7];\n }\n if (yyvsp[-4] != ((void *)0)) {\n merge_comments(yyvsp[-4], ((void *)0));\n if (yyvsp[-11]->comment == ((void *)0)) {\n yyvsp[-4]->d.dn->sub.val.comtype = FOR_COMMENT;\n yyvsp[-11]->comment = yyvsp[-4];\n } else\n yyvsp[-11]->comment->comment = yyvsp[-4];\n }\n if (yyvsp[-1] != ((void *)0))\n yyvsp[0] = list_prepend(yyvsp[0], yyvsp[-1]);\n add_lint(yyvsp[-6], LINT_assign_in_cond);\n yyval = mk_for_loop(yyvsp[-11], yyvsp[-9], yyvsp[-6], yyvsp[-3], yyvsp[0]);\n break_allowed--;\n continue_allowed--;\n }\n break;\n case 56:\n {\n if (yyvsp[-6] != ((void *)0)) {\n merge_comments(yyvsp[-6], ((void *)0));\n yyvsp[-10]->comment = yyvsp[-6];\n }\n if (yyvsp[-4] != ((void *)0)) {\n merge_comments(yyvsp[-4], ((void *)0));\n if (yyvsp[-10]->comment == ((void *)0)) {\n yyvsp[-4]->d.dn->sub.val.comtype = FOR_COMMENT;\n yyvsp[-10]->comment = yyvsp[-4];\n } else\n yyvsp[-10]->comment->comment = yyvsp[-4];\n }\n if (yyvsp[-1] != ((void *)0))\n yyvsp[0] = list_prepend(yyvsp[0], yyvsp[-1]);\n yyval = mk_for_loop(yyvsp[-10], yyvsp[-8], (INSTRUCTION *) ((void *)0), yyvsp[-3], yyvsp[0]);\n break_allowed--;\n continue_allowed--;\n }\n break;\n case 57:\n {\n if ((do_flags & DO_PRETTY_PRINT))\n yyval = list_prepend(yyvsp[0], bcalloc(Op_exec_count, 1, 0));\n else\n yyval = yyvsp[0];\n }\n break;\n case 58:\n {\n if (! break_allowed)\n error_ln(yyvsp[-1]->source_line,\n gettext(\"`break' is not allowed outside a loop or switch\"));\n yyvsp[-1]->d.di = ((void *)0);\n yyval = list_create(yyvsp[-1]);\n if (yyvsp[0] != ((void *)0))\n yyval = list_append(yyval, yyvsp[0]);\n }\n break;\n case 59:\n {\n if (! continue_allowed)\n error_ln(yyvsp[-1]->source_line,\n gettext(\"`continue' is not allowed outside a loop\"));\n yyvsp[-1]->d.di = ((void *)0);\n yyval = list_create(yyvsp[-1]);\n if (yyvsp[0] != ((void *)0))\n yyval = list_append(yyval, yyvsp[0]);\n }\n break;\n case 60:\n {\n if (rule && rule != Rule)\n error_ln(yyvsp[-1]->source_line,\n gettext(\"`next' used in %s action\"), ruletab[rule]);\n yyvsp[-1]->d.di = ip_rec;\n yyval = list_create(yyvsp[-1]);\n if (yyvsp[0] != ((void *)0))\n yyval = list_append(yyval, yyvsp[0]);\n }\n break;\n case 61:\n {\n if (rule == BEGIN || rule == END || rule == ENDFILE)\n error_ln(yyvsp[-1]->source_line,\n gettext(\"`nextfile' used in %s action\"), ruletab[rule]);\n yyvsp[-1]->d.di = ip_newfile;\n yyvsp[-1]->x.xi = ip_endfile;\n yyval = list_create(yyvsp[-1]);\n if (yyvsp[0] != ((void *)0))\n yyval = list_append(yyval, yyvsp[0]);\n }\n break;\n case 62:\n {\n yyvsp[-2]->d.di = ip_end;\n yyvsp[-2]->x.xi = ip_atexit;\n if (yyvsp[-1] == ((void *)0)) {\n yyval = list_create(yyvsp[-2]);\n (void) list_prepend(yyval, bcalloc(Op_push_i, 1, 0));\n yyval->nexti->d.dn = dupnode(Nnull_string);\n } else\n yyval = list_append(yyvsp[-1], yyvsp[-2]);\n if (yyvsp[0] != ((void *)0))\n yyval = list_append(yyval, yyvsp[0]);\n }\n break;\n case 63:\n {\n if (! in_function)\n yyerror(gettext(\"`return' used outside function context\"));\n }\n break;\n case 64:\n {\n if (called_from_eval)\n yyvsp[-3]->opcode = Op_K_return_from_eval;\n if (yyvsp[-1] == ((void *)0)) {\n yyval = list_create(yyvsp[-3]);\n (void) list_prepend(yyval, bcalloc(Op_push_i, 1, 0));\n yyval->nexti->d.dn = dupnode(Nnull_string);\n } else\n yyval = list_append(yyvsp[-1], yyvsp[-3]);\n if (yyvsp[0] != ((void *)0))\n yyval = list_append(yyval, yyvsp[0]);\n }\n break;\n case 65:\n {\n if (yyvsp[0] != ((void *)0))\n yyval = list_append(yyvsp[-1], yyvsp[0]);\n else\n yyval = yyvsp[-1];\n }\n break;\n case 66:\n { in_print = 1; in_parens = 0; }\n break;\n case 67:\n {\n if (do_optimize && yyvsp[-3]->opcode == Op_K_print &&\n (yyvsp[-1] == ((void *)0)\n || (yyvsp[-1]->d.di->opcode == Op_field_spec\n && yyvsp[-1]->nexti->nexti->nexti == yyvsp[-1]->d.di\n && yyvsp[-1]->nexti->nexti->opcode == Op_push_i\n && yyvsp[-1]->nexti->nexti->d.dn->type == Node_val)\n )\n ) {\n static _Bool warned = 0;\n if (yyvsp[-1] != ((void *)0)) {\n NODE *n = yyvsp[-1]->nexti->nexti->d.dn;\n if ((n->flags & (STRING|STRCUR)) != 0 || ! (!(((n))->flags & (MPFN|MPZN)) ? (((n)->sub.val.nm.fltnum == 0.0)) : ((((n))->flags & MPFN) ? ((((mpfr_srcptr) (0 ? ((n)->sub.val.nm.mpnum) : (mpfr_srcptr) ((n)->sub.val.nm.mpnum)))->_mpfr_exp == (0 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))))) : (((((n)->sub.val.nm.mpi)->_mp_size < 0 ? -1 : ((n)->sub.val.nm.mpi)->_mp_size > 0) == 0)))))\n goto regular_print;\n bcfree(yyvsp[-1]->d.di);\n unref(n);\n bcfree(yyvsp[-1]->nexti->nexti);\n bcfree(yyvsp[-1]->nexti);\n bcfree(yyvsp[-1]);\n } else {\n if ((do_flags & (DO_LINT_INVALID|DO_LINT_ALL)) && (rule == BEGIN || rule == END) && ! warned) {\n warned = 1;\n lintwarn_ln(yyvsp[-3]->source_line,\n gettext(\"plain `print' in BEGIN or END rule should probably be `print \\\"\\\"'\"));\n }\n }\n yyvsp[-3]->x.xl = 0;\n yyvsp[-3]->opcode = Op_K_print_rec;\n if (yyvsp[0] == ((void *)0)) {\n yyvsp[-3]->d.dl = redirect_none;\n yyval = list_create(yyvsp[-3]);\n } else {\n INSTRUCTION *ip;\n ip = yyvsp[0]->nexti;\n yyvsp[-3]->d.dl = ip->d.dl;\n yyvsp[0]->nexti = ip->nexti;\n bcfree(ip);\n yyval = list_append(yyvsp[0], yyvsp[-3]);\n }\n } else {\nregular_print:\n if (yyvsp[0] == ((void *)0)) {\n if (yyvsp[-1] == ((void *)0)) {\n yyvsp[-3]->x.xl = 0;\n if (yyvsp[-3]->opcode == Op_K_print)\n yyvsp[-3]->opcode = Op_K_print_rec;\n yyvsp[-3]->d.dl = redirect_none;\n yyval = list_create(yyvsp[-3]);\n } else {\n INSTRUCTION *t = yyvsp[-1];\n yyvsp[-3]->x.xl = count_expressions(&t, 0);\n yyvsp[-3]->d.dl = redirect_none;\n yyval = list_append(t, yyvsp[-3]);\n }\n } else {\n INSTRUCTION *ip;\n ip = yyvsp[0]->nexti;\n yyvsp[-3]->d.dl = ip->d.dl;\n yyvsp[0]->nexti = ip->nexti;\n bcfree(ip);\n if (yyvsp[-1] == ((void *)0)) {\n yyvsp[-3]->x.xl = 0;\n if (yyvsp[-3]->opcode == Op_K_print)\n yyvsp[-3]->opcode = Op_K_print_rec;\n yyval = list_append(yyvsp[0], yyvsp[-3]);\n } else {\n INSTRUCTION *t = yyvsp[-1];\n yyvsp[-3]->x.xl = count_expressions(&t, 0);\n yyval = list_append(list_merge(yyvsp[0], t), yyvsp[-3]);\n }\n }\n }\n }\n break;\n case 68:\n { sub_counter = 0; }\n break;\n case 69:\n {\n char *arr = yyvsp[-2]->d.name;\n yyvsp[-2]->opcode = Op_push_array;\n yyvsp[-2]->d.dn = variable(yyvsp[-2]->source_line, arr, Node_var_new);\n if (! (do_flags & DO_POSIX) && ! (do_flags & DO_TRADITIONAL)) {\n if (yyvsp[-2]->d.dn == symbol_table)\n (*(set_loc(\"awkgram.y\", 1255), r_fatal))(gettext(\"`delete' is not allowed with SYMTAB\"));\n else if (yyvsp[-2]->d.dn == func_table)\n (*(set_loc(\"awkgram.y\", 1257), r_fatal))(gettext(\"`delete' is not allowed with FUNCTAB\"));\n }\n if (yyvsp[0] == ((void *)0)) {\n yyvsp[-3]->x.xl = 0;\n yyval = list_append(list_create(yyvsp[-2]), yyvsp[-3]);\n } else {\n yyvsp[-3]->x.xl = sub_counter;\n yyval = list_append(list_append(yyvsp[0], yyvsp[-2]), yyvsp[-3]);\n }\n }\n break;\n case 70:\n {\n static _Bool warned = 0;\n char *arr = yyvsp[-1]->d.name;\n if ((do_flags & (DO_LINT_INVALID|DO_LINT_ALL)) && ! warned) {\n warned = 1;\n lintwarn_ln(yyvsp[-3]->source_line,\n gettext(\"`delete(array)' is a non-portable tawk extension\"));\n }\n if ((do_flags & DO_TRADITIONAL)) {\n error_ln(yyvsp[-3]->source_line,\n gettext(\"`delete(array)' is a non-portable tawk extension\"));\n }\n yyvsp[-1]->d.dn = variable(yyvsp[-1]->source_line, arr, Node_var_new);\n yyvsp[-1]->opcode = Op_push_array;\n yyvsp[-3]->x.xl = 0;\n yyval = list_append(list_create(yyvsp[-1]), yyvsp[-3]);\n if (! (do_flags & DO_POSIX) && ! (do_flags & DO_TRADITIONAL)) {\n if (yyvsp[-1]->d.dn == symbol_table)\n (*(set_loc(\"awkgram.y\", 1304), r_fatal))(gettext(\"`delete' is not allowed with SYMTAB\"));\n else if (yyvsp[-1]->d.dn == func_table)\n (*(set_loc(\"awkgram.y\", 1306), r_fatal))(gettext(\"`delete' is not allowed with FUNCTAB\"));\n }\n }\n break;\n case 71:\n {\n yyval = optimize_assignment(yyvsp[0]);\n }\n break;\n case 72:\n { yyval = ((void *)0); }\n break;\n case 73:\n { yyval = yyvsp[0]; }\n break;\n case 74:\n { yyval = ((void *)0); }\n break;\n case 75:\n {\n if (yyvsp[-1] == ((void *)0))\n yyval = list_create(yyvsp[0]);\n else\n yyval = list_prepend(yyvsp[-1], yyvsp[0]);\n }\n break;\n case 76:\n { yyval = ((void *)0); }\n break;\n case 77:\n {\n INSTRUCTION *casestmt = yyvsp[0];\n if (yyvsp[0] == ((void *)0))\n casestmt = list_create(bcalloc(Op_no_op, 1, 0));\n if ((do_flags & DO_PRETTY_PRINT))\n (void) list_prepend(casestmt, bcalloc(Op_exec_count, 1, 0));\n yyvsp[-4]->d.di = yyvsp[-3];\n yyvsp[-4]->x.xi = casestmt;\n yyvsp[-4]->comment = yyvsp[-1];\n bcfree(yyvsp[-2]);\n yyval = yyvsp[-4];\n }\n break;\n case 78:\n {\n INSTRUCTION *casestmt = yyvsp[0];\n if (yyvsp[0] == ((void *)0))\n casestmt = list_create(bcalloc(Op_no_op, 1, 0));\n if ((do_flags & DO_PRETTY_PRINT))\n (void) list_prepend(casestmt, bcalloc(Op_exec_count, 1, 0));\n bcfree(yyvsp[-2]);\n yyvsp[-3]->x.xi = casestmt;\n yyvsp[-3]->comment = yyvsp[-1];\n yyval = yyvsp[-3];\n }\n break;\n case 79:\n { yyval = yyvsp[0]; }\n break;\n case 80:\n {\n NODE *n = yyvsp[0]->d.dn;\n (void) force_number(n);\n negate_num(n);\n bcfree(yyvsp[-1]);\n yyval = yyvsp[0];\n }\n break;\n case 81:\n {\n NODE *n = yyvsp[0]->d.di->d.dn;\n bcfree(yyvsp[-1]);\n add_sign_to_num(n, '+');\n yyval = yyvsp[0];\n }\n break;\n case 82:\n { yyval = yyvsp[0]; }\n break;\n case 83:\n {\n if (yyvsp[0]->d.dn->type == Node_regex)\n yyvsp[0]->opcode = Op_push_re;\n else\n yyvsp[0]->opcode = Op_push;\n yyval = yyvsp[0];\n }\n break;\n case 84:\n {\n ((void) (0));\n yyvsp[0]->opcode = Op_push_re;\n yyval = yyvsp[0];\n }\n break;\n case 85:\n { yyval = yyvsp[0]; }\n break;\n case 86:\n { yyval = yyvsp[0]; }\n break;\n case 88:\n {\n yyval = yyvsp[-1];\n }\n break;\n case 89:\n {\n in_print = 0;\n in_parens = 0;\n yyval = ((void *)0);\n }\n break;\n case 90:\n { in_print = 0; in_parens = 0; }\n break;\n case 91:\n {\n if (yyvsp[-2]->d.dl == redirect_twoway\n && yyvsp[0]->d.di->opcode == Op_K_getline_redir\n && yyvsp[0]->d.di->d.dl == redirect_twoway)\n yyerror(gettext(\"multistage two-way pipelines don't work\"));\n if ((do_flags & (DO_LINT_INVALID|DO_LINT_ALL)) && yyvsp[-2]->d.dl == redirect_output && yyvsp[0]->d.di->opcode == Op_concat)\n (*(set_loc(\"awkgram.y\", 1433),lintfunc))(gettext(\"concatenation as I/O `>' redirection target is ambiguous\"));\n yyval = list_prepend(yyvsp[0], yyvsp[-2]);\n }\n break;\n case 92:\n {\n if (yyvsp[-1] != ((void *)0))\n yyvsp[-5]->comment = yyvsp[-1];\n add_lint(yyvsp[-3], LINT_assign_in_cond);\n yyval = mk_condition(yyvsp[-3], yyvsp[-5], yyvsp[0], ((void *)0), ((void *)0));\n }\n break;\n case 93:\n {\n if (yyvsp[-4] != ((void *)0))\n yyvsp[-8]->comment = yyvsp[-4];\n if (yyvsp[-1] != ((void *)0))\n yyvsp[-2]->comment = yyvsp[-1];\n add_lint(yyvsp[-6], LINT_assign_in_cond);\n yyval = mk_condition(yyvsp[-6], yyvsp[-8], yyvsp[-3], yyvsp[-2], yyvsp[0]);\n }\n break;\n case 94:\n {\n yyval = yyvsp[0];\n }\n break;\n case 95:\n {\n if (yyvsp[-1] != ((void *)0) && yyvsp[0] != ((void *)0)) {\n if (yyvsp[-1]->d.dn->sub.val.comtype == EOL_COMMENT) {\n ((void) (0));\n yyvsp[-1]->comment = yyvsp[0];\n } else {\n merge_comments(yyvsp[-1], yyvsp[0]);\n }\n yyval = yyvsp[-1];\n } else if (yyvsp[-1] != ((void *)0)) {\n yyval = yyvsp[-1];\n } else if (yyvsp[0] != ((void *)0)) {\n yyval = yyvsp[0];\n } else\n yyval = ((void *)0);\n }\n break;\n case 96:\n { yyval = ((void *)0); }\n break;\n case 97:\n { yyval = yyvsp[0]; }\n break;\n case 98:\n { yyval = ((void *)0); }\n break;\n case 99:\n {\n bcfree(yyvsp[-1]);\n yyval = yyvsp[0];\n }\n break;\n case 100:\n { yyval = ((void *)0); }\n break;\n case 101:\n { yyval = yyvsp[0]; }\n break;\n case 102:\n {\n yyvsp[0]->x.xl = 0;\n yyval = list_create(yyvsp[0]);\n }\n break;\n case 103:\n {\n if (yyvsp[-2] != ((void *)0) && yyvsp[0] != ((void *)0)) {\n yyvsp[0]->x.xl = yyvsp[-2]->d.di->x.xl + 1;\n yyval = list_append(yyvsp[-2], yyvsp[0]);\n (yyerrstatus = 0);\n if (yyvsp[-1] != ((void *)0)) {\n if (yyvsp[-2]->comment != ((void *)0))\n merge_comments(yyvsp[-2]->comment, yyvsp[-1]);\n else\n yyvsp[-2]->comment = yyvsp[-1];\n }\n } else\n yyval = ((void *)0);\n }\n break;\n case 104:\n { yyval = ((void *)0); }\n break;\n case 105:\n { yyval = yyvsp[-1]; }\n break;\n case 106:\n { yyval = yyvsp[-2]; }\n break;\n case 107:\n { yyval = ((void *)0); }\n break;\n case 108:\n { yyval = yyvsp[0]; }\n break;\n case 109:\n { yyval = ((void *)0); }\n break;\n case 110:\n { yyval = yyvsp[0]; }\n break;\n case 111:\n { yyval = mk_expression_list(((void *)0), yyvsp[0]); }\n break;\n case 112:\n {\n if (yyvsp[-1] != ((void *)0))\n yyvsp[-2]->d.di->comment = yyvsp[-1];\n yyval = mk_expression_list(yyvsp[-2], yyvsp[0]);\n (yyerrstatus = 0);\n }\n break;\n case 113:\n { yyval = ((void *)0); }\n break;\n case 114:\n {\n yyval = yyvsp[-1];\n }\n break;\n case 115:\n {\n yyval = mk_expression_list(yyvsp[-2], yyvsp[0]);\n }\n break;\n case 116:\n {\n if (yyvsp[-1] != ((void *)0))\n yyvsp[-2]->d.di->comment = yyvsp[-1];\n yyval = yyvsp[-2];\n }\n break;\n case 117:\n { yyval = ((void *)0); }\n break;\n case 118:\n { yyval = yyvsp[0]; }\n break;\n case 119:\n { yyval = mk_expression_list(((void *)0), yyvsp[0]); }\n break;\n case 120:\n {\n if (yyvsp[-1] != ((void *)0))\n yyvsp[-2]->d.di->comment = yyvsp[-1];\n yyval = mk_expression_list(yyvsp[-2], yyvsp[0]);\n (yyerrstatus = 0);\n }\n break;\n case 121:\n { yyval = ((void *)0); }\n break;\n case 122:\n {\n yyval = yyvsp[-1];\n }\n break;\n case 123:\n {\n yyval = mk_expression_list(yyvsp[-2], yyvsp[0]);\n }\n break;\n case 124:\n {\n if (yyvsp[-1] != ((void *)0))\n yyvsp[-2]->comment = yyvsp[-1];\n yyval = yyvsp[-2];\n }\n break;\n case 125:\n { yyval = yyvsp[0]; }\n break;\n case 126:\n { yyval = list_create(yyvsp[0]); }\n break;\n case 127:\n { yyval = ((void *)0); }\n break;\n case 128:\n { yyval = yyvsp[0]; }\n break;\n case 129:\n {\n if ((do_flags & (DO_LINT_INVALID|DO_LINT_ALL)) && yyvsp[0]->d.di->opcode == Op_match_rec)\n lintwarn_ln(yyvsp[-1]->source_line,\n gettext(\"regular expression on right of assignment\"));\n yyval = mk_assignment(yyvsp[-2], yyvsp[0], yyvsp[-1]);\n }\n break;\n case 130:\n {\n yyval = mk_assignment(yyvsp[-2], list_create(yyvsp[0]), yyvsp[-1]);\n }\n break;\n case 131:\n { yyval = mk_boolean(yyvsp[-2], yyvsp[0], yyvsp[-1]); }\n break;\n case 132:\n { yyval = mk_boolean(yyvsp[-2], yyvsp[0], yyvsp[-1]); }\n break;\n case 133:\n {\n if (yyvsp[-2]->d.di->opcode == Op_match_rec)\n warning_ln(yyvsp[-1]->source_line,\n gettext(\"regular expression on left of `~' or `!~' operator\"));\n ((void) (0));\n yyvsp[-1]->d.dn = yyvsp[0]->d.dn;\n bcfree(yyvsp[0]);\n yyval = list_append(yyvsp[-2], yyvsp[-1]);\n }\n break;\n case 134:\n {\n if (yyvsp[-2]->d.di->opcode == Op_match_rec)\n warning_ln(yyvsp[-1]->source_line,\n gettext(\"regular expression on left of `~' or `!~' operator\"));\n if (yyvsp[0]->d.di == yyvsp[0]->nexti && yyvsp[0]->nexti->opcode == Op_match_rec) {\n yyvsp[-1]->d.dn = yyvsp[0]->nexti->d.dn;\n bcfree(yyvsp[0]->nexti);\n bcfree(yyvsp[0]);\n yyval = list_append(yyvsp[-2], yyvsp[-1]);\n } else {\n yyvsp[-1]->d.dn = make_regnode(Node_dynregex, ((void *)0));\n yyval = list_append(list_merge(yyvsp[-2], yyvsp[0]), yyvsp[-1]);\n }\n }\n break;\n case 135:\n {\n if ((do_flags & DO_LINT_OLD))\n lintwarn_ln(yyvsp[-1]->source_line,\n gettext(\"old awk does not support the keyword `in' except after `for'\"));\n yyvsp[0]->nexti->opcode = Op_push_array;\n yyvsp[-1]->opcode = Op_in_array;\n yyvsp[-1]->x.xl = 1;\n yyval = list_append(list_merge(yyvsp[-2], yyvsp[0]), yyvsp[-1]);\n }\n break;\n case 136:\n {\n if ((do_flags & (DO_LINT_INVALID|DO_LINT_ALL)) && yyvsp[0]->d.di->opcode == Op_match_rec)\n lintwarn_ln(yyvsp[-1]->source_line,\n gettext(\"regular expression on right of comparison\"));\n yyval = list_append(list_merge(yyvsp[-2], yyvsp[0]), yyvsp[-1]);\n }\n break;\n case 137:\n { yyval = mk_condition(yyvsp[-4], yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]); }\n break;\n case 138:\n { yyval = yyvsp[0]; }\n break;\n case 139:\n { yyval = yyvsp[0]; }\n break;\n case 140:\n { yyval = yyvsp[0]; }\n break;\n case 141:\n {\n yyvsp[0]->opcode = Op_assign_quotient;\n yyval = yyvsp[0];\n }\n break;\n case 142:\n { yyval = yyvsp[0]; }\n break;\n case 143:\n { yyval = yyvsp[0]; }\n break;\n case 144:\n { yyval = yyvsp[0]; }\n break;\n case 145:\n { yyval = yyvsp[0]; }\n break;\n case 146:\n { yyval = yyvsp[0]; }\n break;\n case 147:\n { yyval = yyvsp[0]; }\n break;\n case 148:\n {\n int count = 2;\n _Bool is_simple_var = 0;\n if (yyvsp[-1]->d.di->opcode == Op_concat) {\n is_simple_var = (yyvsp[-1]->d.di->d.dl & 2) != 0;\n count = yyvsp[-1]->d.di->x.xl + 1;\n yyvsp[-1]->d.di->opcode = Op_no_op;\n } else {\n is_simple_var = (yyvsp[-1]->nexti->opcode == Op_push\n && yyvsp[-1]->d.di == yyvsp[-1]->nexti);\n }\n if (do_optimize\n && yyvsp[-1]->nexti == yyvsp[-1]->d.di && yyvsp[-1]->nexti->opcode == Op_push_i\n && yyvsp[0]->nexti == yyvsp[0]->d.di && yyvsp[0]->nexti->opcode == Op_push_i\n ) {\n NODE *n1 = yyvsp[-1]->nexti->d.dn;\n NODE *n2 = yyvsp[0]->nexti->d.dn;\n size_t nlen;\n if ((n1->flags & (NUMBER|NUMINT|INTLSTR)) != 0 || (n2->flags & (NUMBER|NUMINT|INTLSTR)) != 0)\n goto plain_concat;\n n1 = force_string_fmt((n1), CONVFMT, CONVFMTidx);\n n2 = force_string_fmt((n2), CONVFMT, CONVFMTidx);\n nlen = n1->sub.val.slen + n2->sub.val.slen;\n (void) (n1->sub.val.sp = (char *) erealloc_real((void *) n1->sub.val.sp, (size_t)(nlen + 1), \"constant fold\", \"n1->stptr\", \"awkgram.y\", 1775));\n memcpy(n1->sub.val.sp + n1->sub.val.slen, n2->sub.val.sp, n2->sub.val.slen);\n n1->sub.val.slen = nlen;\n n1->sub.val.sp[nlen] = '\\0';\n n1->flags &= ~(NUMCUR|NUMBER|NUMINT);\n n1->flags |= (STRING|STRCUR);\n unref(n2);\n bcfree(yyvsp[0]->nexti);\n bcfree(yyvsp[0]);\n yyval = yyvsp[-1];\n } else {\n plain_concat:\n yyval = list_append(list_merge(yyvsp[-1], yyvsp[0]), bcalloc(Op_concat, 1, 0));\n yyval->d.di->d.dl = (is_simple_var ? 2 : 0);\n yyval->d.di->x.xl = count;\n if (count > max_args)\n max_args = count;\n }\n }\n break;\n case 150:\n { yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }\n break;\n case 151:\n { yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }\n break;\n case 152:\n { yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }\n break;\n case 153:\n { yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }\n break;\n case 154:\n { yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }\n break;\n case 155:\n { yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }\n break;\n case 156:\n {\n if ((rule == BEGINFILE || rule == ENDFILE) && yyvsp[0] == ((void *)0))\n error_ln(yyvsp[-2]->source_line,\n gettext(\"non-redirected `getline' invalid inside `%s' rule\"), ruletab[rule]);\n if ((do_flags & (DO_LINT_INVALID|DO_LINT_ALL)) && rule == END && yyvsp[0] == ((void *)0))\n lintwarn_ln(yyvsp[-2]->source_line,\n gettext(\"non-redirected `getline' undefined inside END action\"));\n yyval = mk_getline(yyvsp[-2], yyvsp[-1], yyvsp[0], redirect_input);\n }\n break;\n case 157:\n {\n yyvsp[0]->opcode = Op_postincrement;\n yyval = mk_assignment(yyvsp[-1], ((void *)0), yyvsp[0]);\n }\n break;\n case 158:\n {\n yyvsp[0]->opcode = Op_postdecrement;\n yyval = mk_assignment(yyvsp[-1], ((void *)0), yyvsp[0]);\n }\n break;\n case 159:\n {\n if ((do_flags & DO_LINT_OLD)) {\n warning_ln(yyvsp[-1]->source_line,\n gettext(\"old awk does not support the keyword `in' except after `for'\"));\n lintwarn_ln(yyvsp[-1]->source_line,\n gettext(\"old awk does not support multidimensional arrays\"));\n }\n yyvsp[0]->nexti->opcode = Op_push_array;\n yyvsp[-1]->opcode = Op_in_array;\n if (yyvsp[-3] == ((void *)0)) {\n errcount++;\n yyvsp[-1]->x.xl = 0;\n yyval = list_merge(yyvsp[0], yyvsp[-1]);\n } else {\n INSTRUCTION *t = yyvsp[-3];\n yyvsp[-1]->x.xl = count_expressions(&t, 0);\n yyval = list_append(list_merge(t, yyvsp[0]), yyvsp[-1]);\n }\n }\n break;\n case 160:\n {\n yyval = mk_getline(yyvsp[-1], yyvsp[0], yyvsp[-3], yyvsp[-2]->d.dl);\n bcfree(yyvsp[-2]);\n }\n break;\n case 161:\n { yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }\n break;\n case 162:\n { yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }\n break;\n case 163:\n { yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }\n break;\n case 164:\n { yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }\n break;\n case 165:\n { yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }\n break;\n case 166:\n { yyval = mk_binary(yyvsp[-2], yyvsp[0], yyvsp[-1]); }\n break;\n case 167:\n {\n yyval = list_create(yyvsp[0]);\n }\n break;\n case 168:\n {\n if (yyvsp[0]->opcode == Op_match_rec) {\n yyvsp[0]->opcode = Op_nomatch;\n yyvsp[-1]->opcode = Op_push_i;\n yyvsp[-1]->d.dn = set_profile_text(make_number(0.0), \"0\", 1);\n yyval = list_append(list_append(list_create(yyvsp[-1]),\n bcalloc(Op_field_spec, 1, 0)), yyvsp[0]);\n } else {\n if (do_optimize && yyvsp[0]->nexti == yyvsp[0]->d.di\n && yyvsp[0]->nexti->opcode == Op_push_i\n && (yyvsp[0]->nexti->d.dn->flags & (MPFN|MPZN|INTLSTR)) == 0\n ) {\n NODE *n = yyvsp[0]->nexti->d.dn;\n if ((n->flags & STRING) != 0) {\n n->sub.val.nm.fltnum = (double) (n->sub.val.slen == 0);\n n->flags &= ~(STRCUR|STRING);\n n->flags |= (NUMCUR|NUMBER);\n pma_free(n->sub.val.sp);\n n->sub.val.sp = ((void *)0);\n n->sub.val.slen = 0;\n } else\n n->sub.val.nm.fltnum = (double) (n->sub.val.nm.fltnum == 0.0);\n bcfree(yyvsp[-1]);\n yyval = yyvsp[0];\n } else {\n yyvsp[-1]->opcode = Op_not;\n add_lint(yyvsp[0], LINT_assign_in_cond);\n yyval = list_append(yyvsp[0], yyvsp[-1]);\n }\n }\n }\n break;\n case 169:\n {\n yyval = list_append(yyvsp[-1], bcalloc(Op_parens, 1, sourceline));\n }\n break;\n case 170:\n {\n yyval = snode(yyvsp[-1], yyvsp[-3]);\n if (yyval == ((void *)0))\n goto yyabortlab;\n }\n break;\n case 171:\n {\n yyval = snode(yyvsp[-1], yyvsp[-3]);\n if (yyval == ((void *)0))\n goto yyabortlab;\n }\n break;\n case 172:\n {\n static _Bool warned = 0;\n if ((do_flags & (DO_LINT_INVALID|DO_LINT_ALL)) && ! warned) {\n warned = 1;\n lintwarn_ln(yyvsp[0]->source_line,\n gettext(\"call of `length' without parentheses is not portable\"));\n }\n yyval = snode(((void *)0), yyvsp[0]);\n if (yyval == ((void *)0))\n goto yyabortlab;\n }\n break;\n case 175:\n {\n yyvsp[-1]->opcode = Op_preincrement;\n yyval = mk_assignment(yyvsp[0], ((void *)0), yyvsp[-1]);\n }\n break;\n case 176:\n {\n yyvsp[-1]->opcode = Op_predecrement;\n yyval = mk_assignment(yyvsp[0], ((void *)0), yyvsp[-1]);\n }\n break;\n case 177:\n {\n yyval = list_create(yyvsp[0]);\n }\n break;\n case 178:\n {\n yyval = list_create(yyvsp[0]);\n }\n break;\n case 179:\n {\n if (yyvsp[0]->d.di->opcode == Op_push_i\n && (yyvsp[0]->d.di->d.dn->flags & STRING) == 0\n ) {\n NODE *n = yyvsp[0]->d.di->d.dn;\n (void) force_number(n);\n negate_num(n);\n yyval = yyvsp[0];\n bcfree(yyvsp[-1]);\n } else {\n yyvsp[-1]->opcode = Op_unary_minus;\n yyval = list_append(yyvsp[0], yyvsp[-1]);\n }\n }\n break;\n case 180:\n {\n if (yyvsp[0]->d.di->opcode == Op_push_i\n && (yyvsp[0]->d.di->d.dn->flags & STRING) == 0\n && (yyvsp[0]->d.di->d.dn->flags & NUMCONSTSTR) != 0) {\n NODE *n = yyvsp[0]->d.di->d.dn;\n add_sign_to_num(n, '+');\n yyval = yyvsp[0];\n bcfree(yyvsp[-1]);\n } else {\n yyvsp[-1]->opcode = Op_unary_plus;\n yyval = list_append(yyvsp[0], yyvsp[-1]);\n }\n }\n break;\n case 181:\n {\n func_use(yyvsp[0]->d.di->d.name, FUNC_USE);\n yyval = yyvsp[0];\n }\n break;\n case 182:\n {\n INSTRUCTION *f, *t;\n char *name;\n NODE *indirect_var;\n static _Bool warned = 0;\n const char *msg = gettext(\"indirect function calls are a gawk extension\");\n if ((do_flags & DO_TRADITIONAL) || (do_flags & DO_POSIX))\n yyerror(\"%s\", msg);\n else if ((do_flags & DO_LINT_EXTENSIONS) && ! warned) {\n warned = 1;\n (*(set_loc(\"awkgram.y\", 2025),lintfunc))(\"%s\", msg);\n }\n f = yyvsp[0]->d.di;\n f->opcode = Op_indirect_func_call;\n name = estrdup(f->d.name, strlen(f->d.name));\n if (is_std_var(name))\n yyerror(gettext(\"cannot use special variable `%s' for indirect function call\"), name);\n indirect_var = variable(f->source_line, name, Node_var_new);\n t = bcalloc(Op_push, 1, 0);\n t->d.dn = indirect_var;\n yyval = list_prepend(yyvsp[0], t);\n at_seen--;\n }\n break;\n case 183:\n {\n NODE *n;\n char *name = yyvsp[-3]->d.name;\n char *qname = qualify_name(name, strlen(name));\n if (qname != name) {\n pma_free((char *) name);\n yyvsp[-3]->d.name = qname;\n }\n if (! at_seen) {\n n = lookup(yyvsp[-3]->d.name);\n if (n != ((void *)0) && n->type != Node_func\n && n->type != Node_ext_func) {\n error_ln(yyvsp[-3]->source_line,\n gettext(\"attempt to use non-function `%s' in function call\"),\n yyvsp[-3]->d.name);\n }\n }\n param_sanity(yyvsp[-1]);\n yyvsp[-3]->opcode = Op_func_call;\n yyvsp[-3]->x.xn = ((void *)0);\n if (yyvsp[-1] == ((void *)0)) {\n (yyvsp[-3] + 1)->x.xl = 0;\n yyval = list_create(yyvsp[-3]);\n } else {\n INSTRUCTION *t = yyvsp[-1];\n (yyvsp[-3] + 1)->x.xl = count_expressions(&t, 1);\n yyval = list_append(t, yyvsp[-3]);\n }\n }\n break;\n case 184:\n { yyval = ((void *)0); }\n break;\n case 185:\n { yyval = yyvsp[0]; }\n break;\n case 186:\n { yyval = ((void *)0); }\n break;\n case 187:\n { yyval = yyvsp[-1]; }\n break;\n case 188:\n { yyval = yyvsp[0]; }\n break;\n case 189:\n {\n yyval = list_merge(yyvsp[-1], yyvsp[0]);\n }\n break;\n case 190:\n {\n INSTRUCTION *ip = yyvsp[0]->d.di;\n int count = ip->d.dl;\n if (count > 1) {\n ip->opcode = Op_concat;\n ip->d.dl = 1;\n ip->x.xl = count;\n } else\n ip->opcode = Op_no_op;\n sub_counter++;\n yyval = yyvsp[0];\n }\n break;\n case 191:\n {\n INSTRUCTION *t = yyvsp[-1];\n if (yyvsp[-1] == ((void *)0)) {\n error_ln(yyvsp[0]->source_line,\n gettext(\"invalid subscript expression\"));\n t = list_create(bcalloc(Op_push_i, 1, 0));\n t->nexti->d.dn = dupnode(Nnull_string);\n yyvsp[0]->d.dl = 1;\n } else\n yyvsp[0]->d.dl = count_expressions(&t, 0);\n yyval = list_append(t, yyvsp[0]);\n }\n break;\n case 192:\n { yyval = yyvsp[0]; }\n break;\n case 193:\n {\n yyval = list_merge(yyvsp[-1], yyvsp[0]);\n }\n break;\n case 194:\n { yyval = yyvsp[-1]; }\n break;\n case 195:\n {\n yyvsp[0]->opcode = Op_push;\n yyvsp[0]->d.dn = variable(yyvsp[0]->source_line, yyvsp[0]->d.name, Node_var_new);\n yyval = list_create(yyvsp[0]);\n }\n break;\n case 196:\n {\n char *arr = yyvsp[-1]->d.name;\n yyvsp[-1]->d.dn = variable(yyvsp[-1]->source_line, arr, Node_var_new);\n yyvsp[-1]->opcode = Op_push_array;\n yyval = list_prepend(yyvsp[0], yyvsp[-1]);\n }\n break;\n case 197:\n {\n INSTRUCTION *ip = yyvsp[0]->nexti;\n if (ip->opcode == Op_push\n && ip->d.dn->type == Node_var\n && ip->d.dn->sub.nodep.r.uptr\n ) {\n yyval = list_prepend(yyvsp[0], bcalloc(Op_var_update, 1, 0));\n yyval->nexti->x.aptr = ip->d.dn->sub.nodep.r.uptr;\n } else\n yyval = yyvsp[0];\n }\n break;\n case 198:\n {\n yyval = list_append(yyvsp[-1], yyvsp[-2]);\n if (yyvsp[0] != ((void *)0))\n mk_assignment(yyvsp[-1], ((void *)0), yyvsp[0]);\n }\n break;\n case 199:\n {\n yyvsp[0]->opcode = Op_postincrement;\n }\n break;\n case 200:\n {\n yyvsp[0]->opcode = Op_postdecrement;\n }\n break;\n case 201:\n { yyval = ((void *)0); }\n break;\n case 202:\n { yyval = yyvsp[0]; }\n break;\n case 203:\n { yyval = yyvsp[0]; (yyerrstatus = 0); }\n break;\n case 204:\n { (yyerrstatus = 0); }\n break;\n case 205:\n { yyval = ((void *)0); }\n break;\n case 207:\n { (yyerrstatus = 0); }\n break;\n case 208:\n { yyval = yyvsp[0]; (yyerrstatus = 0); }\n break;\n case 209:\n { yyval = yyvsp[0]; (yyerrstatus = 0); }\n break;\n default: break;\n }\n ;\n (yyvsp -= (yylen), yyssp -= (yylen));\n yylen = 0;\n *++yyvsp = yyval;\n {\n const int yylhs = yyr1[yyn] - 77;\n const int yyi = yypgoto[yylhs] + *yyssp;\n yystate = (0 <= yyi && yyi <= 1200 && yycheck[yyi] == *yyssp\n ? yytable[yyi]\n : yydefgoto[yylhs]);\n }\n goto yynewstate;\nyyerrlab:\n yytoken = yychar == -2 ? YYSYMBOL_YYEMPTY : (0 <= (yychar) && (yychar) <= 310 ? ((yysymbol_kind_t) (yytranslate[yychar])) : YYSYMBOL_YYUNDEF);\n if (!yyerrstatus)\n {\n ++yynerrs;\n yyerror (\"syntax error\");\n }\n if (yyerrstatus == 3)\n {\n if (yychar <= 0)\n {\n if (yychar == 0)\n goto yyabortlab;\n }\n else\n {\n yydestruct (\"Error: discarding\",\n yytoken, &yylval);\n yychar = -2;\n }\n }\n goto yyerrlab1;\nyyerrorlab:\n if (0)\n goto yyerrorlab;\n ++yynerrs;\n (yyvsp -= (yylen), yyssp -= (yylen));\n yylen = 0;\n ;\n yystate = *yyssp;\n goto yyerrlab1;\nyyerrlab1:\n yyerrstatus = 3;\n for (;;)\n {\n yyn = yypact[yystate];\n if (!((yyn) == (-276)))\n {\n yyn += YYSYMBOL_YYerror;\n if (0 <= yyn && yyn <= 1200 && yycheck[yyn] == YYSYMBOL_YYerror)\n {\n yyn = yytable[yyn];\n if (0 < yyn)\n break;\n }\n }\n if (yyssp == yyss)\n goto yyabortlab;\n yydestruct (\"Error: popping\",\n ((yysymbol_kind_t) (yystos[yystate])), yyvsp);\n (yyvsp -= (1), yyssp -= (1));\n yystate = *yyssp;\n ;\n }\n \n#pragma GCC diagnostic push\n \n#pragma GCC diagnostic ignored \"-Wuninitialized\"\n \n#pragma GCC diagnostic ignored \"-Wmaybe-uninitialized\"\n \n *++yyvsp = yylval;\n \n#pragma GCC diagnostic pop\n \n ;\n yystate = yyn;\n goto yynewstate;\nyyacceptlab:\n yyresult = 0;\n goto yyreturnlab;\nyyabortlab:\n yyresult = 1;\n goto yyreturnlab;\nyyexhaustedlab:\n yyerror (\"memory exhausted\");\n yyresult = 2;\n goto yyreturnlab;\nyyreturnlab:\n if (yychar != -2)\n {\n yytoken = (0 <= (yychar) && (yychar) <= 310 ? ((yysymbol_kind_t) (yytranslate[yychar])) : YYSYMBOL_YYUNDEF);\n yydestruct (\"Cleanup: discarding lookahead\",\n yytoken, &yylval);\n }\n (yyvsp -= (yylen), yyssp -= (yylen));\n ;\n while (yyssp != yyss)\n {\n yydestruct (\"Cleanup: popping\",\n ((yysymbol_kind_t) (yystos[+*yyssp])), yyvsp);\n (yyvsp -= (1), yyssp -= (1));\n }\n if (yyss != yyssa)\n pma_free (yyss);\n return yyresult;\n}\n", "c_constructs": {"pointer_type": 36, "array_type": 17, "struct_type": 0, "enum_type": 0, "union_type": 4, "function_pointer": 0, "type_casting": 211, "memory_management": 0, "memory_operation": 1, "if_statement": 193, "for_loop": 3, "while_loop": 3, "switch_statement": 1, "goto_statement": 35, "return_statement": 2, "break_continue_statement": 203}}, {"id": "transcoder-set#WAYS_REMOVE_ONE_ELEMENT_BINARY_STRING_XOR_BECOMES_ZERO_prep#main.c", "codebase": "transcoder-set", "c_file": "WAYS_REMOVE_ONE_ELEMENT_BINARY_STRING_XOR_BECOMES_ZERO.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n char param0[][100] = {\"KfcTJNP\",\"05312505872\",\"100111\",\"tDEEhKxrQ\",\"50824233019\",\"10001110010\",\"T SEZaNm MYQ\",\"838415739\",\"01110100\",\"WYQiAey H\"};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "gprolog-1.5.0#obj_chain_prep#Pl_Find_Linked_Objects.c", "codebase": "gprolog-1.5.0", "c_file": "obj_chain.c", "function": "Pl_Find_Linked_Objects", "sloc": "23", "c_code": "void\nPl_Find_Linked_Objects(void)\n{\n int i;\n for(i = nb_obj; --i >= 0; )\n {\n if (obj_tbl[i].fct_obj_init != ((void *)0)) {\n (*(obj_tbl[i].fct_obj_init)) ();\n }\n }\n for(i = 0; i < nb_obj; i++)\n {\n if (obj_tbl[i].fct_exec_system != ((void *)0)) {\n (*(obj_tbl[i].fct_exec_system)) ();\n }\n }\n for(i = nb_obj; --i >= 0; )\n {\n if (obj_tbl[i].fct_exec_user != ((void *)0)) {\n (*(obj_tbl[i].fct_exec_user)) ();\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_map_blob.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_map_blob", "sloc": "5", "c_code": "void * binn_map_blob(void *map, int id, int *psize) {\n void *value;\n binn_map_get(map, id, 0xC0, &value, psize);\n return value;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#server-fn_prep#server_check_unattached.c", "codebase": "tmux", "c_file": "server-fn.c", "function": "server_check_unattached", "sloc": "11", "c_code": "void\nserver_check_unattached(void)\n{\n struct session *s;\n for ((s) = sessions_RB_MINMAX(&sessions, -1); (s) != ((void *)0); (s) = sessions_RB_NEXT(s)) {\n if (!(s->flags & 0x1))\n continue;\n if (options_get_number (s->options, \"destroy-unattached\"))\n session_destroy(s, __func__);\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "json.h#allow_leading_plus_sign_prep#json_hexadecimal_digit.c", "codebase": "json.h", "c_file": "allow_leading_plus_sign.c", "function": "json_hexadecimal_digit", "sloc": "12", "c_code": "int json_hexadecimal_digit(const char c) {\n if ('0' <= c && c <= '9') {\n return c - '0';\n }\n if ('a' <= c && c <= 'f') {\n return c - 'a' + 10;\n }\n if ('A' <= c && c <= 'F') {\n return c - 'A' + 10;\n }\n return -1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libxml2#HTMLparser_prep#htmlElementAllowedHere.c", "codebase": "libxml2", "c_file": "HTMLparser.c", "function": "htmlElementAllowedHere", "sloc": "10", "c_code": "int\nhtmlElementAllowedHere(const htmlElemDesc* parent, const xmlChar* elt) {\n const char** p ;\n if ( ! elt || ! parent || ! parent->subelts )\n return 0 ;\n for ( p = parent->subelts; *p; ++p )\n if ( !xmlStrcmp((const xmlChar *)*p, elt) )\n return 1 ;\n return 0 ;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_NUMBER_POWER_K_USING_BASE_CHANGING_METHOD_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "CHECK_NUMBER_POWER_K_USING_BASE_CHANGING_METHOD.c", "function": "f_gold", "sloc": "13", "c_code": "_Bool f_gold ( unsigned int n, unsigned int k ) {\n _Bool oneSeen = 0;\n while ( n > 0 ) {\n int digit = n % k;\n if ( digit > 1 ) return 0;\n if ( digit == 1 ) {\n if ( oneSeen ) return 0;\n oneSeen = 1;\n }\n n /= k;\n }\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsLetterlikeSymbols.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsLetterlikeSymbols", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsLetterlikeSymbols(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsLetterlikeSymbols\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsLetterlikeSymbols\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsLetterlikeSymbols(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#smoke_prep#test.c", "codebase": "tulipindicators-0.9.1", "c_file": "smoke.c", "function": "test", "sloc": "22", "c_code": "void test(const char *fname, int count) {\n printf(\"%s:\\n\", fname);\n FILE *fp = fopen(fname, \"r\");\n if (!fp) {\n do { ++ltests; if (!(0)) { ++lfails; printf(\"%s:%d error \\n\", \"smoke.c\", 315); }} while (0);\n return;\n }\n char *line;\n while ((line = next_line(fp))) {\n if (line[0] < 'a' || line[0] > 'z') {\n do { ++ltests; if (!(0)) { ++lfails; printf(\"%s:%d error \\n\", \"smoke.c\", 325); }} while (0);\n continue;\n }\n char *name = strtok(line, \" \\n\\r\");\n if (!strcmp(name, \"candle\")) {\n do { const int ts = ltests; const int fs = lfails; const clock_t start = clock(); printf(\"\\t%-16s\", name); test_candles(fp, count); printf(\"pass:%2d fail:%2d %4dms\\n\", (ltests-ts)-(lfails-fs), lfails-fs, (int)((clock() - start) * 1000 / ((__clock_t) 1000000)));} while (0);\n } else {\n do { const int ts = ltests; const int fs = lfails; const clock_t start = clock(); printf(\"\\t%-16s\", name); test_ind_name(fp, name, count); printf(\"pass:%2d fail:%2d %4dms\\n\", (ltests-ts)-(lfails-fs), lfails-fs, (int)((clock() - start) * 1000 / ((__clock_t) 1000000)));} while (0);\n }\n }\n fclose(fp);\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 5, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#SUM_MATRIX_ELEMENT_ELEMENT_INTEGER_DIVISION_ROW_COLUMN_1_prep#len.c", "codebase": "transcoder-set", "c_file": "SUM_MATRIX_ELEMENT_ELEMENT_INTEGER_DIVISION_ROW_COLUMN_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#misc_prep#must_be_dot_or_slash.c", "codebase": "tar-1.34", "c_file": "misc.c", "function": "must_be_dot_or_slash", "sloc": "26", "c_code": "_Bool\nmust_be_dot_or_slash (char const *file_name)\n{\n file_name += ((void) (file_name), 0);\n if (((file_name[0]) == '/'))\n {\n for (;;)\n if (((file_name[1]) == '/'))\n file_name++;\n else if (file_name[1] == '.'\n && ((file_name[2 + (file_name[2] == '.')]) == '/'))\n file_name += 2 + (file_name[2] == '.');\n else\n return ! file_name[1];\n }\n else\n {\n while (file_name[0] == '.' && ((file_name[1]) == '/'))\n {\n file_name += 2;\n while (((*file_name) == '/'))\n file_name++;\n }\n return ! file_name[0] || (file_name[0] == '.' && ! file_name[1]);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tinycc#tccpp_prep#define_push.c", "codebase": "tinycc", "c_file": "tccpp.c", "function": "define_push", "sloc": "11", "c_code": "void define_push(int v, int macro_type, int *str, Sym *first_arg)\n{\n Sym *s, *o;\n o = define_find(v);\n s = sym_push2(&define_stack, v, macro_type, 0);\n s->d = str;\n s->next = first_arg;\n table_ident[v - 256]->sym_define = s;\n if (o && !macro_is_equal(o->d, s->d))\n tcc_warning(\"%s redefined\", get_tok_str(v, ((void *)0)));\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_IF_X_CAN_GIVE_CHANGE_TO_EVERY_PERSON_IN_THE_QUEUE_prep#sort.c", "codebase": "transcoder-set", "c_file": "CHECK_IF_X_CAN_GIVE_CHANGE_TO_EVERY_PERSON_IN_THE_QUEUE.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#search_prep#tidy_up_after_search.c", "codebase": "nano-7.2", "c_file": "search.c", "function": "tidy_up_after_search", "sloc": "10", "c_code": "void tidy_up_after_search(void)\n{\n if (have_compiled_regexp) {\n regfree(&search_regexp);\n have_compiled_regexp = 0;\n }\n if (openfile->mark)\n refresh_needed = 1;\n recook |= perturbed;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xinclude_prep#xmlXIncludeSetStreamingMode.c", "codebase": "libxml2", "c_file": "xinclude.c", "function": "xmlXIncludeSetStreamingMode", "sloc": "7", "c_code": "int\nxmlXIncludeSetStreamingMode(xmlXIncludeCtxtPtr ctxt, int mode) {\n if (ctxt == ((void *)0))\n return(-1);\n ctxt->isStream = !!mode;\n return(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MULTIPLY_AN_INTEGER_WITH_3_5_prep#len.c", "codebase": "transcoder-set", "c_file": "MULTIPLY_AN_INTEGER_WITH_3_5.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "heman#vec4_prep#kmVec4Scale.c", "codebase": "heman", "c_file": "vec4.c", "function": "kmVec4Scale", "sloc": "8", "c_code": "kmVec4* kmVec4Scale(kmVec4* pOut, const kmVec4* pIn, const float s) {\n kmVec4Normalize(pOut, pIn);\n pOut->x *= s;\n pOut->y *= s;\n pOut->z *= s;\n pOut->w *= s;\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#cut_prep#do_delete.c", "codebase": "nano-7.2", "c_file": "cut.c", "function": "do_delete", "sloc": "12", "c_code": "void do_delete(void)\n{\n if (openfile->mark && ((flags[((LET_THEM_ZAP) / (sizeof(unsigned) * 8))] & ((unsigned)1 << ((LET_THEM_ZAP) % (sizeof(unsigned) * 8)))) != 0))\n zap_text();\n else\n {\n do_deletion(DEL);\n while (openfile->current->data[openfile->current_x] != '\\0' &&\n is_zerowidth(openfile->current->data + openfile->current_x))\n do_deletion(DEL);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_authorization_prep#osip_authorization_get_opaque.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authorization.c", "function": "osip_authorization_get_opaque", "sloc": "3", "c_code": "char *osip_authorization_get_opaque(osip_authorization_t *authorization) {\n return authorization->opaque;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_SET_BITS_IN_AN_INTEGER_prep#max.c", "codebase": "transcoder-set", "c_file": "COUNT_SET_BITS_IN_AN_INTEGER.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_map_read_pair.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_map_read_pair", "sloc": "7", "c_code": "void * binn_map_read_pair(void *ptr, int pos, int *pid, int *ptype, int *psize) {\n binn value;\n if (binn_map_get_pair(ptr, pos, pid, &value) == 0) return ((void *)0);\n if (ptype) *ptype = value.type;\n if (psize) *psize = value.size;\n return store_value(&value);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#tree_prep#xmlAddSibling.c", "codebase": "libxml2", "c_file": "tree.c", "function": "xmlAddSibling", "sloc": "17", "c_code": "xmlNodePtr\nxmlAddSibling(xmlNodePtr node, xmlNodePtr cur) {\n if ((node == ((void *)0)) || (node->type == XML_NAMESPACE_DECL) ||\n (cur == ((void *)0)) || (cur->type == XML_NAMESPACE_DECL) ||\n (cur == node))\n return(((void *)0));\n if ((node->type != XML_ATTRIBUTE_NODE) && (node->parent != ((void *)0))) {\n if (node->parent->last != ((void *)0))\n node = node->parent->last;\n } else {\n while (node->next != ((void *)0))\n node = node->next;\n }\n if (cur == node)\n return(cur);\n return(xmlInsertNode(node->doc, cur, node->parent, node, ((void *)0), 1));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "dap-3.10#ps_prep#pict_bhrect.c", "codebase": "dap-3.10", "c_file": "ps.c", "function": "pict_bhrect", "sloc": "45", "c_code": "void pict_bhrect(pict *p, double spacing, double x0, double y0, double xside, double yside)\n{\n int vlines, hlines;\n int linen;\n int ptn;\n double xl, xr, yb, yt;\n int even;\n vlines = (int) floor(yside / spacing);\n hlines = (int) floor(xside / spacing);\n pict_point(p, x0, y0);\n pict_point(p, x0 + xside, y0);\n pict_point(p, x0 + xside, y0 + yside);\n pict_point(p, x0, y0 + yside);\n pict_point(p, x0, y0);\n for (linen = -vlines, ptn = 0, even = 0; linen <= hlines;\n linen++, ptn += 2, even = 1 - even)\n {\n xl = x0 + ((double) linen) * spacing;\n yt = y0 + yside;\n xr = xl + yside;\n yb = y0;\n if (xl < x0)\n {\n yt -= x0 - xl;\n xl = x0;\n }\n if (xr > x0 + xside)\n {\n if (!even && xr < x0 + xside + spacing)\n pict_point(p, x0 + xside, y0);\n yb += xr - x0 - xside;\n xr = x0 + xside;\n }\n if (even)\n {\n pict_point(p, xl, yt);\n pict_point(p, xr, yb);\n }\n else\n {\n pict_point(p, xr, yb);\n pict_point(p, xl, yt);\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "enscript-1.6.6#main_prep#main.c", "codebase": "enscript-1.6.6", "c_file": "main.c", "function": "main", "sloc": "575", "c_code": "int\nmain (int argc, char *argv[])\n{\n InputStream is;\n time_t tim;\n struct tm *tm;\n int i, j, found;\n unsigned int ui;\n MediaEntry *mentry;\n AFMError afm_error;\n char *cp, *cp2;\n int retval = 0;\n Buffer buffer;\n buffer_init (&buffer);\n program = strrchr (argv[0], '/');\n if (program == ((void *)0))\n program = argv[0];\n else\n program++;\n argv[0] = program;\n toc_fmt_string = gettext (\"$3v $-40N $3% pages $4L lines $E $C\");\n setlocale (5, \"\");\n bindtextdomain (\"enscript\", \"/usr/local/share/locale\");\n textdomain (\"enscript\");\n tim = time (((void *)0));\n tm = localtime (&tim);\n memcpy (&run_tm, tm, sizeof (*tm));\n date_string = xstrdup (asctime (&run_tm));\n i = strlen (date_string);\n date_string[i - 1] = '\\0';\n passwd = getpwuid (getuid ());\n if (passwd == ((void *)0))\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"couldn't get passwd entry for uid=%d: %s\"), getuid (), strerror ((*__errno_location ()))); fprintf (stderr, \"\\n\"); fflush (stderr); exit (1); } while (0);\n media_name = xstrdup (\"A4\");\n encoding_name = xstrdup (\"88591\");\n npf_name = xstrdup (\"octal\");\n page_label_format = xstrdup (\"short\");\n ul_style_str = xstrdup (\"outline\");\n ul_position = xstrdup (\"+0-0\");\n spooler_command = xstrdup (\"lpr\");\n queue_param = xstrdup (\"-P\");\n no_job_header_switch = xstrdup (\"-h\");\n fancy_header_default = xstrdup (\"enscript\");\n output_first_line = xstrdup (\"%!PS-Adobe-3.0\");\n cp = getenv (\"ENSCRIPT_LIBRARY\");\n if (cp)\n enscript_library = cp;\n cp = getenv (\"HOME\");\n if (cp == ((void *)0))\n cp = passwd->pw_dir;\n buffer_clear (&buffer);\n buffer_append (&buffer, enscript_library);\n buffer_append (&buffer, \":\");\n buffer_append (&buffer, cp);\n buffer_append (&buffer, \"/.enscript\");\n libpath = buffer_copy (&buffer);\n states_binary = xstrdup (\"states\");\n buffer_clear (&buffer);\n buffer_append (&buffer, enscript_library);\n buffer_append (&buffer, \"/hl/enscript.st\");\n states_config_file = buffer_copy (&buffer);\n states_highlight_style = xstrdup (\"emacs\");\n buffer_clear (&buffer);\n buffer_append (&buffer, cp);\n buffer_append (&buffer, \"/.enscript\");\n buffer_append (&buffer, \":\");\n buffer_append (&buffer, enscript_library);\n buffer_append (&buffer, \"/hl\");\n states_path = buffer_copy (&buffer);\n res_fonts = strhash_init ();\n download_fonts = strhash_init ();\n pagedevice = strhash_init ();\n statusdict = strhash_init ();\n user_strings = strhash_init ();\n if (!read_config (\"/usr/local/etc\", \"enscript.cfg\"))\n {\n int saved_errno = (*__errno_location ());\n if (!read_config (enscript_library, \"enscript.cfg\"))\n {\n buffer_clear (&buffer);\n buffer_append (&buffer, enscript_library);\n buffer_append (&buffer, \"/../../etc\");\n if (!read_config (buffer_ptr (&buffer), \"enscript.cfg\"))\n {\n if (!read_config (\"../lib\", \"enscript.cfg\")\n && !read_config (\"../../lib\", \"enscript.cfg\"))\n {\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"couldn't read config file \\\"%s/%s\\\": %s\"), enscript_library, \"enscript.cfg\", strerror (saved_errno)); fprintf (stderr, \"\\n\"); fflush (stderr); } while (0);\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"I did also try the following directories:\")); fprintf (stderr, \"\\n\"); fflush (stderr); } while (0);\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"\\t%s\"), \"/usr/local/etc\"); fprintf (stderr, \"\\n\"); fflush (stderr); } while (0);\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"\\t%s\"), enscript_library); fprintf (stderr, \"\\n\"); fflush (stderr); } while (0);\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"\\t%s\"), buffer_ptr (&buffer)); fprintf (stderr, \"\\n\"); fflush (stderr); } while (0);\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"\\t../lib\")); fprintf (stderr, \"\\n\"); fflush (stderr); } while (0);\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"\\t../../lib\")); fprintf (stderr, \"\\n\"); fflush (stderr); } while (0);\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"This is probably an installation error. Please, try to rebuild:\")); fprintf (stderr, \"\\n\"); fflush (stderr); } while (0);\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"\\tmake distclean\")); fprintf (stderr, \"\\n\"); fflush (stderr); } while (0);\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"\\t./configure --prefix=PREFIX\")); fprintf (stderr, \"\\n\"); fflush (stderr); } while (0);\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"\\tmake\")); fprintf (stderr, \"\\n\"); fflush (stderr); } while (0);\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"\\tmake check\")); fprintf (stderr, \"\\n\"); fflush (stderr); } while (0);\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"\\tmake install\")); fprintf (stderr, \"\\n\"); fflush (stderr); } while (0);\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"or set the environment variable `ENSCRIPT_LIBRARY'\" \" to point to your library directory.\")); fprintf (stderr, \"\\n\"); fflush (stderr); } while (0);\n exit (1);\n }\n buffer_clear (&buffer);\n buffer_append (&buffer, libpath);\n buffer_append (&buffer, \":\");\n buffer_append (&buffer, \"../lib\");\n buffer_append (&buffer, \":\");\n buffer_append (&buffer, \"../../lib\");\n xfree (libpath);\n libpath = buffer_copy (&buffer);\n }\n }\n }\n read_config (\"/usr/local/etc\", \"enscriptsite.cfg\");\n read_config (cp, \".enscriptrc\");\n handle_env_options (\"ENSCRIPT\");\n handle_env_options (\"GENSCRIPT\");\n handle_options (argc, argv);\n default_escape_char = escape_char;\n found = 0;\n for (i = 0; !found && encodings[i].names[0]; i++)\n for (j = 0; j < 3; j++)\n if (encodings[i].names[j] != ((void *)0) && (strcmp (encodings[i].names[j], encoding_name) == 0))\n {\n encoding = encodings[i].encoding;\n xfree (encoding_name);\n encoding_name = xstrdup (encodings[i].names[0]);\n if (nl < 0)\n nl = encodings[i].nl;\n bs = encodings[i].bs;\n found = 1;\n break;\n }\n if (!found)\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"unknown encoding: %s\"), encoding_name); fprintf (stderr, \"\\n\"); fflush (stderr); exit (1); } while (0);\n if (!user_body_font_defined && landscape && num_columns > 1)\n Fpt.w = Fpt.h = 7.0;\n afm_cache = strhash_init ();\n afm_info_cache = strhash_init ();\n afm_error = afm_create (afm_path, verbose, &afm);\n if (afm_error != 0)\n {\n char buf[256];\n afm_error_to_string (afm_error, buf);\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"couldn't open AFM library: %s\"), buf); fprintf (stderr, \"\\n\"); fflush (stderr); exit (1); } while (0);\n }\n default_Fpt.w = Fpt.w;\n default_Fpt.h = Fpt.h;\n default_Fname = Fname;\n default_Fencoding = encoding;\n strhash_put (res_fonts, Fname, strlen (Fname) + 1, ((void *)0), ((void *)0));\n strhash_put (res_fonts, HFname, strlen (HFname) + 1, ((void *)0), ((void *)0));\n strhash_put (download_fonts, Fname, strlen (Fname) + 1, ((void *)0), ((void *)0));\n strhash_put (download_fonts, HFname, strlen (HFname) + 1, ((void *)0), ((void *)0));\n read_font_info ();\n line_indent = parse_float (line_indent_spec, 1, 1);\n if (list_media)\n {\n printf (gettext (\"known media:\\nname width\\theight\\tllx\\tlly\\turx\\tury\\n------------------------------------------------------------\\n\"));\n for (mentry = media_names; mentry; mentry = mentry->next)\n printf (\"%-16s %d\\t%d\\t%d\\t%d\\t%d\\t%d\\n\",\n mentry->name, mentry->w, mentry->h,\n mentry->llx, mentry->lly, mentry->urx, mentry->ury);\n exit (0);\n }\n for (mentry = media_names; mentry; mentry = mentry->next)\n if (strcmp (media_name, mentry->name) == 0)\n {\n media = mentry;\n break;\n }\n if (media == ((void *)0))\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"do not know anything about media \\\"%s\\\"\"), media_name); fprintf (stderr, \"\\n\"); fflush (stderr); exit (1); } while (0);\n if (margins_spec)\n {\n for (i = 0; i < 4; i++)\n {\n if (*margins_spec == '\\0')\n break;\n if (*margins_spec == ':')\n {\n margins_spec++;\n continue;\n }\n j = atoi (margins_spec);\n for (; *margins_spec != ':' && *margins_spec != '\\0'; margins_spec++)\n ;\n if (*margins_spec == ':')\n margins_spec++;\n switch (i)\n {\n case 0:\n media->llx = j;\n break;\n case 1:\n media->urx = media->w - j;\n break;\n case 2:\n media->ury = media->h - j;\n break;\n case 3:\n media->lly = j;\n break;\n }\n }\n do { if (!quiet && verbose >= (1)) fprintf (stderr, gettext (\"set new marginals for media `%s' (%dx%d): llx=%d, lly=%d, urx=%d, ury=%d\\n\"), media->name, media->w, media->h, media->llx, media->lly, media->urx, media->ury); } while (0);\n }\n if ((strcmp (page_label_format, \"short\") == 0))\n page_label = LABEL_SHORT;\n else if ((strcmp (page_label_format, \"long\") == 0))\n page_label = LABEL_LONG;\n else\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"illegal page label format \\\"%s\\\"\"), page_label_format); fprintf (stderr, \"\\n\"); fflush (stderr); exit (1); } while (0);\n if ((strcmp (npf_name, \"space\") == 0))\n non_printable_format = NPF_SPACE;\n else if ((strcmp (npf_name, \"questionmark\") == 0))\n non_printable_format = NPF_QUESTIONMARK;\n else if ((strcmp (npf_name, \"caret\") == 0))\n non_printable_format = NPF_CARET;\n else if ((strcmp (npf_name, \"octal\") == 0))\n non_printable_format = NPF_OCTAL;\n else\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"illegal non-printable format \\\"%s\\\"\"), npf_name); fprintf (stderr, \"\\n\"); fflush (stderr); exit (1); } while (0);\n if (mark_wrapped_lines_style_name)\n {\n if ((strcmp (mark_wrapped_lines_style_name, \"none\") == 0))\n mark_wrapped_lines_style = MWLS_NONE;\n else if ((strcmp (mark_wrapped_lines_style_name, \"plus\") == 0))\n mark_wrapped_lines_style = MWLS_PLUS;\n else if ((strcmp (mark_wrapped_lines_style_name, \"box\") == 0))\n mark_wrapped_lines_style = MWLS_BOX;\n else if ((strcmp (mark_wrapped_lines_style_name, \"arrow\") == 0))\n mark_wrapped_lines_style = MWLS_ARROW;\n else\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"illegal style for wrapped line marker: \\\"%s\\\"\"), mark_wrapped_lines_style_name); fprintf (stderr, \"\\n\"); fflush (stderr); exit (1); } while (0);\n }\n for (i = 0; ; i++)\n {\n ui = nup >> i;\n if (ui == 0)\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"illegal N-up argument: %d\"), nup); fprintf (stderr, \"\\n\"); fflush (stderr); exit (1); } while (0);\n if (ui & 0x1)\n {\n if (ui != 1)\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"N-up argument must be power of 2: %d\"), nup); fprintf (stderr, \"\\n\"); fflush (stderr); exit (1); } while (0);\n nup_exp = i;\n break;\n }\n }\n nup_rows = nup_exp / 2 * 2;\n if (nup_rows == 0)\n nup_rows = 1;\n nup_columns = (nup_exp + 1) / 2 * 2;\n if (nup_columns == 0)\n nup_columns = 1;\n nup_landscape = nup_exp & 0x1;\n if (landscape)\n {\n d_page_w = media->ury - media->lly;\n d_page_h = media->urx - media->llx;\n }\n else\n {\n d_page_w = media->urx - media->llx;\n d_page_h = media->ury - media->lly;\n }\n if (nup_landscape)\n {\n nup_width = media->ury - media->lly;\n nup_height = media->urx - media->llx;\n }\n else\n {\n nup_width = media->urx - media->llx;\n nup_height = media->ury - media->lly;\n }\n {\n double w, h;\n w = ((double) nup_width - (nup_columns - 1) * nup_xpad) / nup_columns;\n h = ((double) nup_height - (nup_rows - 1) * nup_ypad) / nup_rows;\n nup_width = w;\n nup_height = h;\n w = w / (media->urx - media->llx);\n h = h / (media->ury - media->lly);\n nup_scale = w < h ? w : h;\n }\n if (underlay != ((void *)0))\n {\n strhash_put (res_fonts, ul_font, strlen (ul_font) + 1, ((void *)0), ((void *)0));\n underlay = escape_string (underlay);\n }\n ul_x = strtod (ul_position, &cp);\n if (cp == ul_position)\n {\n malformed_position:\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"malformed underlay position: %s\"), ul_position); fprintf (stderr, \"\\n\"); fflush (stderr); exit (1); } while (0);\n }\n if (ul_position[0] == '-')\n ul_x += d_page_w;\n ul_y = strtod (cp, &cp2);\n if (cp2 == cp)\n goto malformed_position;\n if (cp[0] == '-')\n ul_y += d_page_h;\n if (!ul_angle_p)\n ul_angle = (atan2 (-d_page_h, d_page_w) / 3.14159265 * 180);\n if (strcmp (ul_style_str, \"outline\") == 0)\n ul_style = 0;\n else if (strcmp (ul_style_str, \"filled\") == 0)\n ul_style = 1;\n else\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"illegal underlay style: %s\"), ul_style_str); fprintf (stderr, \"\\n\"); fflush (stderr); exit (1); } while (0);\n d_header_w = d_page_w;\n switch (header)\n {\n case HDR_NONE:\n d_header_h = 0;\n break;\n case HDR_SIMPLE:\n d_header_h = HFpt.h * 1.5;\n break;\n case HDR_FANCY:\n d_header_h = 36;\n break;\n }\n if (help_highlight)\n {\n printf (gettext (\"Highlighting is supported for the following languages and file formats:\\n\\n\"));\n fflush (stdout);\n buffer_clear (&buffer);\n buffer_append (&buffer, states_binary);\n buffer_append (&buffer, \" -f \\\"\");\n buffer_append (&buffer, states_config_file);\n buffer_append (&buffer, \"\\\" -p \\\"\");\n buffer_append (&buffer, states_path);\n buffer_append (&buffer, \"\\\" -s describe_languages \");\n buffer_append (&buffer, enscript_library);\n buffer_append (&buffer, \"/hl/*.st\");\n system (buffer_ptr (&buffer));\n exit (0);\n }\n if (output_language_pass_through)\n {\n char *start_state;\n Buffer cmd;\n char intbuf[256];\n if (hl_start_state)\n start_state = hl_start_state;\n else if (highlight)\n start_state = ((void *)0);\n else\n start_state = \"passthrough\";\n buffer_init (&cmd);\n buffer_append (&cmd, states_binary);\n buffer_append (&cmd, \" -f \\\"\");\n buffer_append (&cmd, states_config_file);\n buffer_append (&cmd, \"\\\" -p \\\"\");\n buffer_append (&cmd, states_path);\n buffer_append (&cmd, \"\\\" \");\n if (verbose > 0)\n buffer_append (&cmd, \"-v \");\n if (start_state)\n {\n buffer_append (&cmd, \"-s\");\n buffer_append (&cmd, start_state);\n buffer_append (&cmd, \" \");\n }\n buffer_append (&cmd, \"-Dcolor=\");\n buffer_append (&cmd, states_color ? \"1\" : \"0\");\n buffer_append (&cmd, \" \");\n buffer_append (&cmd, \"-Dstyle=\");\n buffer_append (&cmd, states_highlight_style);\n buffer_append (&cmd, \" \");\n buffer_append (&cmd, \"-Dlanguage=\");\n buffer_append (&cmd, output_language);\n buffer_append (&cmd, \" \");\n buffer_append (&cmd, \"-Dnum_input_files=\");\n sprintf (intbuf, \"%d\", optind == argc ? 1 : argc - optind);\n buffer_append (&cmd, intbuf);\n buffer_append (&cmd, \" \");\n buffer_append (&cmd, \"-Ddocument_title=\\'\");\n if ((cp = shell_escape (title)) != ((void *)0))\n {\n buffer_append (&cmd, cp);\n free (cp);\n }\n buffer_append (&cmd, \"\\' \");\n buffer_append (&cmd, \"-Dtoc=\");\n buffer_append (&cmd, toc ? \"1\" : \"0\");\n if (helper_options['s'])\n {\n Buffer *opts = helper_options['s'];\n buffer_append (&cmd, \" \");\n buffer_append_len (&cmd, buffer_ptr (opts), buffer_len (opts));\n }\n for (i = optind; i < argc; i++)\n {\n char *cp;\n if ((cp = shell_escape (argv[i])) != ((void *)0))\n {\n buffer_append (&cmd, \" \\'\");\n buffer_append (&cmd, cp);\n buffer_append (&cmd, \"\\'\");\n free (cp);\n }\n }\n if (is_open (&is, stdin, ((void *)0), buffer_ptr (&cmd)))\n {\n open_output_file ();\n process_file (\"unused\", &is, 0);\n is_close (&is);\n }\n buffer_uninit (&cmd);\n }\n else\n {\n if (highlight)\n {\n char fbuf[256];\n buffer_clear (&buffer);\n buffer_append (&buffer, states_binary);\n buffer_append (&buffer, \" -f \\\"\");\n buffer_append (&buffer, states_config_file);\n buffer_append (&buffer, \"\\\" -p \\\"\");\n buffer_append (&buffer, states_path);\n buffer_append (&buffer, \"\\\"\");\n if (verbose > 0)\n buffer_append (&buffer, \" -v\");\n if (hl_start_state)\n {\n buffer_append (&buffer, \" -s \");\n buffer_append (&buffer, hl_start_state);\n }\n buffer_append (&buffer, \" -Dcolor=\");\n buffer_append (&buffer, states_color ? \"1\" : \"0\");\n buffer_append (&buffer, \" -Dstyle=\");\n buffer_append (&buffer, states_highlight_style);\n buffer_append (&buffer, \" -Dfont_spec=\");\n buffer_append (&buffer, Fname);\n sprintf (fbuf, \"@%g/%g\", Fpt.w, Fpt.h);\n buffer_append (&buffer, fbuf);\n if (helper_options['s'])\n {\n Buffer *opts = helper_options['s'];\n buffer_append (&buffer, \" \");\n buffer_append_len (&buffer,\n buffer_ptr (opts), buffer_len (opts));\n }\n buffer_append (&buffer, \" \\'%s\\'\");\n input_filter = buffer_copy (&buffer);\n input_filter_stdin = \"-\";\n }\n if (toc)\n {\n toc_fp = tmpfile ();\n if (toc_fp == ((void *)0))\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"couldn't create temporary toc file: %s\"), strerror ((*__errno_location ()))); fprintf (stderr, \"\\n\"); fflush (stderr); exit (1); } while (0);\n }\n if (optind == argc)\n {\n memcpy (&mod_tm, &run_tm, sizeof (run_tm));\n if (is_open (&is, stdin, ((void *)0), input_filter))\n {\n open_output_file ();\n process_file (title_given ? title : \"\", &is, 0);\n is_close (&is);\n }\n }\n else\n {\n for (; optind < argc; optind++)\n {\n if (is_open (&is, ((void *)0), argv[optind], input_filter))\n {\n struct stat stat_st;\n if (stat (argv[optind], &stat_st) == 0)\n {\n tim = stat_st.st_mtim.tv_sec;\n tm = localtime (&tim);\n memcpy (&mod_tm, tm, sizeof (*tm));\n open_output_file ();\n process_file (argv[optind], &is, 0);\n }\n else\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"couldn't stat input file \\\"%s\\\": %s\"), argv[optind], strerror ((*__errno_location ()))); fprintf (stderr, \"\\n\"); fflush (stderr); } while (0);\n is_close (&is);\n }\n }\n }\n if (toc)\n {\n toc = 0;\n special_escapes = 1;\n line_numbers = 0;\n if (fseek (toc_fp, 0, 0) != 0)\n do { fprintf (stderr, \"%s: \", program); fprintf (stderr, gettext (\"couldn't rewind toc file: %s\"), strerror ((*__errno_location ()))); fprintf (stderr, \"\\n\"); fflush (stderr); exit (1); } while (0);\n memcpy (&mod_tm, &run_tm, sizeof (run_tm));\n if (is_open (&is, toc_fp, ((void *)0), ((void *)0)))\n {\n process_file (gettext (\"Table of Contents\"), &is, 1);\n is_close (&is);\n }\n }\n dump_ps_trailer ();\n if (ofp != ((void *)0) && append_ctrl_D)\n fprintf (ofp, \"\\004\\n\");\n }\n close_output_file ();\n if (ofp == ((void *)0))\n {\n do { if (!quiet && verbose >= (0)) fprintf (stderr, gettext (\"no output generated\\n\")); } while (0);\n }\n else if (output_language_pass_through)\n {\n if (output_file == ((void *)0))\n do { if (!quiet && verbose >= (0)) fprintf (stderr, gettext (\"output sent to %s\\n\"), printer ? printer : gettext (\"printer\")); } while (0);\n else\n do { if (!quiet && verbose >= (0)) fprintf (stderr, gettext (\"output left in %s\\n\"), output_file == ((char *) 1) ? \"-\" : output_file); } while (0);\n }\n else\n {\n unsigned int real_total_pages;\n if (nup > 1)\n {\n if (total_pages > 0)\n real_total_pages = (total_pages - 1) / nup + 1;\n else\n real_total_pages = 0;\n }\n else\n real_total_pages = total_pages;\n char message[80];\n snprintf(message, sizeof message, \"%s%s%s%s%s\",\n \"[ \",\n ngettext(\"%d page\", \"%d pages\", real_total_pages),\n \" * \",\n ngettext(\"%d copy\", \"%d copies\", num_copies),\n \" ]\");\n do { if (!quiet && verbose >= (0)) fprintf (stderr, message, real_total_pages, num_copies); } while (0);\n if (output_file == ((void *)0))\n do { if (!quiet && verbose >= (0)) fprintf (stderr, gettext (\" sent to %s\\n\"), printer ? printer : gettext (\"printer\")); } while (0);\n else\n do { if (!quiet && verbose >= (0)) fprintf (stderr, gettext (\" left in %s\\n\"), output_file == ((char *) 1) ? \"-\" : output_file); } while (0);\n if (num_truncated_lines)\n {\n retval |= 2;\n do { if (!quiet && verbose >= (0)) fprintf (stderr, ngettext(\"%d line was %s\\n\", \"%d lines were %s\\n\", num_truncated_lines), num_truncated_lines, line_end == LE_TRUNCATE ? gettext (\"truncated\") : gettext (\"wrapped\")); } while (0);\n }\n if (num_missing_chars)\n {\n retval |= 4;\n do { if (!quiet && verbose >= (0)) fprintf (stderr, ngettext(\"%d character was missing\\n\", \"%d characters were missing\\n\", num_missing_chars), num_missing_chars); } while (0);\n if (list_missing_characters)\n {\n do { if (!quiet && verbose >= (0)) fprintf (stderr, gettext (\"missing character codes (decimal):\\n\")); } while (0);\n do_list_missing_characters (missing_chars);\n }\n }\n if (num_non_printable_chars)\n {\n retval |= 8;\n do { if (!quiet && verbose >= (0)) fprintf (stderr, ngettext(\"%d non-printable character\\n\", \"%d non-printable characters\\n\", num_non_printable_chars), num_non_printable_chars); } while (0);\n if (list_missing_characters)\n {\n do { if (!quiet && verbose >= (0)) fprintf (stderr, gettext (\"non-printable character codes (decimal):\\n\")); } while (0);\n do_list_missing_characters (non_printable_chars);\n }\n }\n }\n buffer_uninit (&buffer);\n if (!extended_return_values)\n retval = 0;\n return retval;\n}\n", "c_constructs": {"pointer_type": 6, "array_type": 9, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 28, "memory_management": 2, "memory_operation": 4, "if_statement": 94, "for_loop": 9, "while_loop": 40, "switch_statement": 2, "goto_statement": 1, "return_statement": 1, "break_continue_statement": 12}}, {"id": "nano-7.2#files_prep#close_buffer.c", "codebase": "nano-7.2", "c_file": "files.c", "function": "close_buffer", "sloc": "20", "c_code": "void close_buffer(void)\n{\n openfilestruct *orphan = openfile;\n if (orphan == startfile)\n startfile = startfile->next;\n orphan->prev->next = orphan->next;\n orphan->next->prev = orphan->prev;\n free(orphan->filename);\n free_lines(orphan->filetop);\n free(orphan->statinfo);\n free(orphan->lock_filename);\n discard_until(((void *)0));\n free(orphan->errormessage);\n openfile = orphan->prev;\n if (openfile == orphan)\n openfile = ((void *)0);\n free(orphan);\n if (openfile && openfile == openfile->next)\n exitfunc->tag = exit_tag;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 5, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_single_quoted_strings_prep#json_parse_string.c", "codebase": "json.h", "c_file": "allow_single_quoted_strings.c", "function": "json_parse_string", "sloc": "102", "c_code": "void json_parse_string(struct json_parse_state_s *state,\n struct json_string_s *string) {\n size_t offset = state->offset;\n size_t bytes_written = 0;\n const char *const src = state->src;\n const char quote_to_use = '\\'' == src[offset] ? '\\'' : '\"';\n char *data = state->data;\n unsigned long high_surrogate = 0;\n unsigned long codepoint;\n string->string = data;\n offset++;\n while (quote_to_use != src[offset]) {\n if ('\\\\' == src[offset]) {\n offset++;\n switch (src[offset++]) {\n default:\n return;\n case 'u': {\n codepoint = 0;\n if (!json_hexadecimal_value(&src[offset], 4, &codepoint)) {\n return;\n }\n offset += 4;\n if (codepoint <= 0x7fu) {\n data[bytes_written++] = (char)codepoint;\n } else if (codepoint <= 0x7ffu) {\n data[bytes_written++] =\n (char)(0xc0u | (codepoint >> 6));\n data[bytes_written++] =\n (char)(0x80u | (codepoint & 0x3fu));\n } else if (codepoint >= 0xd800 &&\n codepoint <= 0xdbff) {\n high_surrogate = codepoint;\n continue;\n } else if (codepoint >= 0xdc00 &&\n codepoint <= 0xdfff) {\n const unsigned long surrogate_offset =\n 0x10000u - (0xD800u << 10) - 0xDC00u;\n codepoint = (high_surrogate << 10) + codepoint + surrogate_offset;\n high_surrogate = 0;\n data[bytes_written++] =\n (char)(0xF0u | (codepoint >> 18));\n data[bytes_written++] =\n (char)(0x80u | ((codepoint >> 12) & 0x3fu));\n data[bytes_written++] =\n (char)(0x80u | ((codepoint >> 6) & 0x3fu));\n data[bytes_written++] =\n (char)(0x80u | (codepoint & 0x3fu));\n } else {\n data[bytes_written++] =\n (char)(0xe0u | (codepoint >> 12));\n data[bytes_written++] =\n (char)(0x80u | ((codepoint >> 6) & 0x3fu));\n data[bytes_written++] =\n (char)(0x80u | (codepoint & 0x3fu));\n }\n } break;\n case '\"':\n data[bytes_written++] = '\"';\n break;\n case '\\\\':\n data[bytes_written++] = '\\\\';\n break;\n case '/':\n data[bytes_written++] = '/';\n break;\n case 'b':\n data[bytes_written++] = '\\b';\n break;\n case 'f':\n data[bytes_written++] = '\\f';\n break;\n case 'n':\n data[bytes_written++] = '\\n';\n break;\n case 'r':\n data[bytes_written++] = '\\r';\n break;\n case 't':\n data[bytes_written++] = '\\t';\n break;\n case '\\r':\n data[bytes_written++] = '\\r';\n if ('\\n' == src[offset]) {\n data[bytes_written++] = '\\n';\n offset++;\n }\n break;\n case '\\n':\n data[bytes_written++] = '\\n';\n break;\n }\n } else {\n data[bytes_written++] = src[offset++];\n }\n }\n offset++;\n string->string_size = bytes_written;\n data[bytes_written++] = '\\0';\n state->data += bytes_written;\n state->offset = offset;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 10, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 12}}, {"id": "nettle-3.9.1#rsa-decrypt_prep#rsa_session_set_decrypt_key.c", "codebase": "nettle-3.9.1", "c_file": "rsa-decrypt.c", "function": "rsa_session_set_decrypt_key", "sloc": "11", "c_code": "void\nrsa_session_set_decrypt_key(struct rsa_session *ctx,\n const struct rsa_session_info *key)\n{\n const uint8_t *aes_key = ((key)->key + 4);\n const uint8_t *iv = ((key)->key + 4 + 32);\n const uint8_t *hmac_key = ((key)->key + 4 + 32 + 16);\n nettle_aes256_set_decrypt_key(&ctx->aes.ctx, aes_key);\n memcpy((&ctx->aes)->iv, (iv), sizeof((&ctx->aes)->iv));\n nettle_hmac_sha1_set_key(&ctx->hmac, 20, hmac_key);\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "xzoom#xzoom_prep#timeout_func.c", "codebase": "xzoom", "c_file": "xzoom.c", "function": "timeout_func", "sloc": "5", "c_code": "void\ntimeout_func(int signum) {\n set_title = 1;\n signum = signum;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "patch-2.7.6#utimens_prep#utimens.c", "codebase": "patch-2.7.6", "c_file": "utimens.c", "function": "utimens", "sloc": "5", "c_code": "int\nutimens (char const *file, struct timespec const timespec[2])\n{\n return fdutimens (-1, file, timespec);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_PATTERNS_101_GIVEN_STRING_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "FIND_PATTERNS_101_GIVEN_STRING.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_global_object_prep#json_value_is_null.c", "codebase": "json.h", "c_file": "allow_global_object.c", "function": "json_value_is_null", "sloc": "3", "c_code": "int json_value_is_null(const struct json_value_s *const value) {\n return value->type == json_type_null;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_fork_prep#pth_atfork_pop.c", "codebase": "pth-2.0.7", "c_file": "pth_fork.c", "function": "pth_atfork_pop", "sloc": "7", "c_code": "int pth_atfork_pop(void)\n{\n if (pth_atfork_idx <= 0)\n return (0);\n pth_atfork_idx--;\n return (!(0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#PAINTING_FENCE_ALGORITHM_prep#main.c", "codebase": "transcoder-set", "c_file": "PAINTING_FENCE_ALGORITHM.c", "function": "main", "sloc": "15", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {6,23,89,63,23,44,81,43,9,41};\n int param1[] = {30,87,31,36,68,66,18,73,42,98};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlCatalogDump.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlCatalogDump", "sloc": "12", "c_code": "PyObject *\nlibxml_xmlCatalogDump(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n FILE * out;\n PyObject *pyobj_out;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlCatalogDump\", &pyobj_out))\n return(((void *)0));\n out = (FILE *) (((pyobj_out) == (&_Py_NoneStruct)) ? ((void *)0) : libxml_PyFileGet(pyobj_out));\n xmlCatalogDump(out);\n libxml_PyFileRelease(out);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#xmlmemory_prep#xmlCleanupMemory.c", "codebase": "libxml2", "c_file": "xmlmemory.c", "function": "xmlCleanupMemory", "sloc": "3", "c_code": "void\nxmlCleanupMemory(void) {\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tinycc#tccgen_prep#sym_pop.c", "codebase": "tinycc", "c_file": "tccgen.c", "function": "sym_pop", "sloc": "24", "c_code": "void sym_pop(Sym **ptop, Sym *b, int keep)\n{\n Sym *s, *ss, **ps;\n TokenSym *ts;\n int v;\n s = *ptop;\n while(s != b) {\n ss = s->prev;\n v = s->v;\n if (!(v & 0x20000000) && (v & ~0x40000000) < 0x10000000) {\n ts = table_ident[(v & ~0x40000000) - 256];\n if (v & 0x40000000)\n ps = &ts->sym_struct;\n else\n ps = &ts->sym_identifier;\n *ps = s->prev_tok;\n }\n if (!keep)\n sym_free(s);\n s = ss;\n }\n if (!keep)\n *ptop = b;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_uri_prep#osip_uri_set_port.c", "codebase": "libosip2-5.3.1", "c_file": "osip_uri.c", "function": "osip_uri_set_port", "sloc": "5", "c_code": "void osip_uri_set_port(osip_uri_t *url, char *port) {\n if (url == ((void *)0))\n return;\n url->port = port;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#fsusg_prep#get_fs_usage.c", "codebase": "uucp-1.07", "c_file": "fsusg.c", "function": "get_fs_usage", "sloc": "15", "c_code": "int\nget_fs_usage (path, disk, fsp)\n char *path, *disk __attribute__ ((__unused__));\n struct fs_usage *fsp;\n{\n struct statvfs fsd;\n if (statvfs (path, &fsd) < 0)\n return -1;\n fsp->fsu_blocks = adjust_blocks ((fsd.f_blocks), fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize, 512);\n fsp->fsu_bfree = adjust_blocks ((fsd.f_bfree), fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize, 512);\n fsp->fsu_bavail = adjust_blocks ((fsd.f_bavail), fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize, 512);\n fsp->fsu_files = fsd.f_files;\n fsp->fsu_ffree = fsd.f_ffree;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#relaxng_prep#xmlRelaxNGNewDocParserCtxt.c", "codebase": "libxml2", "c_file": "relaxng.c", "function": "xmlRelaxNGNewDocParserCtxt", "sloc": "23", "c_code": "xmlRelaxNGParserCtxtPtr\nxmlRelaxNGNewDocParserCtxt(xmlDocPtr doc)\n{\n xmlRelaxNGParserCtxtPtr ret;\n xmlDocPtr copy;\n if (doc == ((void *)0))\n return (((void *)0));\n copy = xmlCopyDoc(doc, 1);\n if (copy == ((void *)0))\n return (((void *)0));\n ret =\n (xmlRelaxNGParserCtxtPtr) xmlMalloc(sizeof(xmlRelaxNGParserCtxt));\n if (ret == ((void *)0)) {\n xmlRngPErrMemory(((void *)0));\n xmlFreeDoc(copy);\n return (((void *)0));\n }\n memset(ret, 0, sizeof(xmlRelaxNGParserCtxt));\n ret->document = copy;\n ret->freedoc = 1;\n ret->userData = (*__xmlGenericErrorContext());\n return (ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#sdp_accessor_prep#sdp_message_c_addrtype_get.c", "codebase": "libosip2-5.3.1", "c_file": "sdp_accessor.c", "function": "sdp_message_c_addrtype_get", "sloc": "6", "c_code": "char *sdp_message_c_addrtype_get(sdp_message_t *sdp, int pos_media, int pos) {\n sdp_connection_t *conn = sdp_message_connection_get(sdp, pos_media, pos);\n if (conn == ((void *)0))\n return ((void *)0);\n return conn->c_addrtype;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#rsa-sha256-sign_prep#nettle_rsa_sha256_sign_digest.c", "codebase": "nettle-3.9.1", "c_file": "rsa-sha256-sign.c", "function": "nettle_rsa_sha256_sign_digest", "sloc": "16", "c_code": "int\nnettle_rsa_sha256_sign_digest(const struct rsa_private_key *key,\n const uint8_t *digest,\n mpz_t s)\n{\n if (nettle_pkcs1_rsa_sha256_encode_digest(s, key->size, digest))\n {\n nettle_rsa_compute_root(key, s, s);\n return 1;\n }\n else\n {\n __gmpz_set_ui(s, 0);\n return 0;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_STEPS_TO_DELETE_A_STRING_AFTER_REPEATED_DELETION_OF_PALINDROME_SUBSTRINGS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "MINIMUM_STEPS_TO_DELETE_A_STRING_AFTER_REPEATED_DELETION_OF_PALINDROME_SUBSTRINGS.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( char str [] ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_skip_whitespace.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_skip_whitespace", "sloc": "35", "c_code": "int json_skip_whitespace(struct json_parse_state_s *state) {\n size_t offset = state->offset;\n const size_t size = state->size;\n const char *const src = state->src;\n if (offset >= state->size) {\n return 0;\n }\n switch (src[offset]) {\n default:\n return 0;\n case ' ':\n case '\\r':\n case '\\t':\n case '\\n':\n break;\n }\n do {\n switch (src[offset]) {\n default:\n state->offset = offset;\n return 1;\n case ' ':\n case '\\r':\n case '\\t':\n break;\n case '\\n':\n state->line_no++;\n state->line_offset = offset;\n break;\n }\n offset++;\n } while (offset < size);\n state->offset = offset;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 2, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 3}}, {"id": "mcsim-6.2.0#matutil_prep#ColumnMeans.c", "codebase": "mcsim-6.2.0", "c_file": "matutil.c", "function": "ColumnMeans", "sloc": "8", "c_code": "void ColumnMeans (long cRows, long cCols, double **x, double *x_bar)\n{\n register long i, l;\n for (l = 0; l < cCols; l++) x_bar[l] = 0.0;\n for (i = 0; i < cRows; i++)\n for (l = 0; l < cCols; l++) x_bar[l] += x[i][l];\n for (l = 0; l < cCols; l++) x_bar[l] /= cRows;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 4, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4_prep#sort.c", "codebase": "transcoder-set", "c_file": "COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "patch-2.7.6#hard-locale_prep#hard_locale.c", "codebase": "patch-2.7.6", "c_file": "hard-locale.c", "function": "hard_locale", "sloc": "29", "c_code": "_Bool\nhard_locale (int category)\n{\n _Bool hard = 1;\n char const *p = setlocale (category, ((void *)0));\n if (p)\n {\n if (2 <= 2)\n {\n if (strcmp (p, \"C\") == 0 || strcmp (p, \"POSIX\") == 0)\n hard = 0;\n }\n else\n {\n char *locale = strdup (p);\n if (locale)\n {\n if (((p = setlocale (category, \"C\"))\n && strcmp (p, locale) == 0)\n || ((p = setlocale (category, \"POSIX\"))\n && strcmp (p, locale) == 0))\n hard = 0;\n setlocale (category, locale);\n free (locale);\n }\n }\n }\n return hard;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "heman#mat3_prep#kmMat3Translation.c", "codebase": "heman", "c_file": "mat3.c", "function": "kmMat3Translation", "sloc": "7", "c_code": "kmMat3* kmMat3Translation(kmMat3* pOut, const float x, const float y)\n{\n kmMat3Identity(pOut);\n pOut->mat[6] = x;\n pOut->mat[7] = y;\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#ma2asm_inst_prep#Pl_Ret.c", "codebase": "gprolog-1.5.0", "c_file": "ma2asm_inst.c", "function": "Pl_Ret", "sloc": "5", "c_code": "void\nPl_Ret(void)\n{\n Inst_Printf(\"jmp\", \"*%s\", asm_reg_cp);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#file_prep#getDirCacheP.c", "codebase": "mtools-4.0.43", "c_file": "file.c", "function": "getDirCacheP", "sloc": "4", "c_code": "struct dirCache_t **getDirCacheP(Stream_t *Stream)\n{\n return &getUnbufferedFile(Stream)->dcp;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_HIGH_EFFORT_VS_LOW_EFFORT_TASKS_PROBLEM_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_HIGH_EFFORT_VS_LOW_EFFORT_TASKS_PROBLEM.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int high [ ], int low [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#linedit_prep#Pl_LE_Compl_Del_Word.c", "codebase": "gprolog-1.5.0", "c_file": "linedit.c", "function": "Pl_LE_Compl_Del_Word", "sloc": "19", "c_code": "char *\nPl_LE_Compl_Del_Word(char *word)\n{\n CompNode **p;\n CompNode *q;\n int cmp;\n for (p = &comp_start; *p; p = &(*p)->next)\n {\n cmp = strcmp((*p)->word, word);\n if (cmp == 0)\n break;\n if (cmp > 0)\n return ((void *)0);\n }\n q = *p;\n *p = q->next;\n free(q);\n return word;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 1}}, {"id": "transcoder-set#COMPOSITE_NUMBER_prep#len.c", "codebase": "transcoder-set", "c_file": "COMPOSITE_NUMBER.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Fast_Div.c", "codebase": "gprolog-1.5.0", "c_file": "arith_inl_c.c", "function": "Pl_Fct_Fast_Div", "sloc": "9", "c_code": "WamWord\nPl_Fct_Fast_Div(WamWord x, WamWord y)\n{\n PlLong vx = ((PlLong) ((x) << 0) >> 3);\n PlLong vy = ((PlLong) ((y) << 0) >> 3);\n if (vy == 0)\n Pl_Err_Evaluation(pl_evaluation_zero_divisor);\n return (((PlULong) (vx / vy) << 3) | (PlULong)0x7);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_1_prep#len.c", "codebase": "transcoder-set", "c_file": "COUNT_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_PATTERNS_101_GIVEN_STRING_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_PATTERNS_101_GIVEN_STRING.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( char str [] ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "bc-1.07.1#load_prep#def_label.c", "codebase": "bc-1.07.1", "c_file": "load.c", "function": "def_label", "sloc": "26", "c_code": "void\ndef_label (unsigned long lab)\n{\n bc_label_group *temp;\n unsigned long group, offset, func;\n group = lab >> 6;\n offset = lab % 64;\n func = load_adr.pc_func;\n if (functions[func].f_label == ((void *)0))\n {\n functions[func].f_label = bc_malloc (sizeof(bc_label_group));\n functions[func].f_label->l_next = ((void *)0);\n }\n temp = functions[func].f_label;\n while (group > 0)\n {\n if (temp->l_next == ((void *)0))\n {\n temp->l_next = bc_malloc (sizeof(bc_label_group));\n temp->l_next->l_next = ((void *)0);\n }\n temp = temp->l_next;\n group --;\n }\n temp->l_adrs [offset] = load_adr.pc_addr;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "screen-4.9.0#socket_prep#SendErrorMsg.c", "codebase": "screen-4.9.0", "c_file": "socket.c", "function": "SendErrorMsg", "sloc": "23", "c_code": "int\nSendErrorMsg(tty, buf)\nchar *tty, *buf;\n{\n int s;\n struct msg m;\n _Bool is_socket;\n do {} while (0);\n strncpy(m.m.message, buf, sizeof(m.m.message) - 1);\n m.m.message[sizeof(m.m.message) - 1] = 0;\n is_socket = IsSocket(SockPath);\n s = MakeClientSocket(0, is_socket);\n if (s < 0)\n return -1;\n m.type = 1;\n strncpy(m.m_tty, tty, sizeof(m.m_tty) - 1);\n m.m_tty[sizeof(m.m_tty) - 1] = 0;\n m.protocol_revision = (('m'<<24) | ('s'<<16) | ('g'<<8) | 5);\n do {} while (0);\n (void) write(s, (char *) &m, sizeof m);\n close(s);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#ioctl_prep#rpl_ioctl.c", "codebase": "findutils-4.9.0", "c_file": "ioctl.c", "function": "rpl_ioctl", "sloc": "10", "c_code": "int\nrpl_ioctl (int fd, int request, ... )\n{\n void *buf;\n va_list args;\n __builtin_va_start(args,request);\n buf = __builtin_va_arg(args,void *);\n __builtin_va_end(args);\n return ioctl (fd, (unsigned int) request, buf);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#parserInternals_prep#xmlCtxtNewInputFromString.c", "codebase": "libxml2", "c_file": "parserInternals.c", "function": "xmlCtxtNewInputFromString", "sloc": "15", "c_code": "xmlParserInputPtr\nxmlCtxtNewInputFromString(xmlParserCtxtPtr ctxt, const char *url,\n const char *str, const char *encoding, int flags) {\n xmlParserInputPtr input;\n if ((ctxt == ((void *)0)) || (str == ((void *)0)))\n return(((void *)0));\n input = xmlNewInputFromString(url, str, flags);\n if (input == ((void *)0)) {\n xmlCtxtErrMemory(ctxt);\n return(((void *)0));\n }\n if (encoding != ((void *)0))\n xmlSwitchInputEncodingName(ctxt, input, encoding);\n return(input);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsKangxiRadicals.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsKangxiRadicals", "sloc": "4", "c_code": "int\nxmlUCSIsKangxiRadicals(int code) {\n return(((code >= 0x2F00) && (code <= 0x2FDF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#typprice_prep#ti_typprice_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "typprice.c", "function": "ti_typprice_start", "sloc": "4", "c_code": "int ti_typprice_start(double const *options) {\n (void)options;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Abs.c", "codebase": "gprolog-1.5.0", "c_file": "arith_inl_c.c", "function": "Pl_Fct_Abs", "sloc": "5", "c_code": "WamWord\nPl_Fct_Abs(WamWord x)\n{\n return ((((PlLong) (x) & ((PlULong)0x7)) == (PlULong)0x7)) ? Pl_Fct_Fast_Abs(x) : Make_Tagged_Float(fabs(To_Double(x)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#css__prep#yy_flush_buffer.c", "codebase": "wget-1.21.4", "c_file": "css_.c", "function": "yy_flush_buffer", "sloc": "13", "c_code": "void yy_flush_buffer (YY_BUFFER_STATE b )\n{\n if ( ! b )\n return;\n b->yy_n_chars = 0;\n b->yy_ch_buf[0] = 0;\n b->yy_ch_buf[1] = 0;\n b->yy_buf_pos = &b->yy_ch_buf[0];\n b->yy_at_bol = 1;\n b->yy_buffer_status = 0;\n if ( b == ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)) )\n yy_load_buffer_state( );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "ed-1.19#main_prep#traditional.c", "codebase": "ed-1.19", "c_file": "main.c", "function": "traditional", "sloc": "1", "c_code": "bool traditional( void ) { return traditional_; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#option_prep#getnum.c", "codebase": "less-633", "c_file": "option.c", "function": "getnum", "sloc": "23", "c_code": "int getnum(char **sp, char *printopt, int *errp)\n{\n char *s;\n int n;\n int neg;\n s = skipsp(*sp);\n neg = 0;\n if (*s == '-')\n {\n neg = 1;\n s++;\n }\n if (*s < '0' || *s > '9')\n return (num_error(printopt, errp, 0));\n n = lstrtoi(s, sp, 10);\n if (n < 0)\n return (num_error(printopt, errp, 1));\n if (errp != ((void *)0))\n *errp = 0;\n if (neg)\n n = -n;\n return (n);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "wget-1.21.4#css__prep#yyset_debug.c", "codebase": "wget-1.21.4", "c_file": "css_.c", "function": "yyset_debug", "sloc": "4", "c_code": "void yyset_debug (int _bdebug )\n{\n yy_flex_debug = _bdebug ;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_ONE_EXTRA_CHARACTER_STRING_1_prep#main.c", "codebase": "transcoder-set", "c_file": "FIND_ONE_EXTRA_CHARACTER_STRING_1.c", "function": "main", "sloc": "15", "c_code": "int main(void) {\n int n_success = 0;\n char param0[][100] = {\"obfLA mmMYvghH\",\"2941\",\"0111111\",\"oWvbFstI\",\"4937516500\",\"101110100\",\"hYZscJQFBE\",\"58443\",\"1100\",\"ZUdYuIBVNaeeb\"};\n char param1[][100] = {\"obfLA mmMYvghH\",\"23941\",\"01011111\",\"oWvsbFstI\",\"49376516500\",\"1011210100\",\"hYZscJQQFBE\",\"584443\",\"11000\",\"ZUdYVuIBVNaeeb\"};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#SUM_OF_ALL_ELEMENTS_UP_TO_NTH_ROW_IN_A_PASCALS_TRIANGLE_prep#min.c", "codebase": "transcoder-set", "c_file": "SUM_OF_ALL_ELEMENTS_UP_TO_NTH_ROW_IN_A_PASCALS_TRIANGLE.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngrio_prep#png_default_read_data.c", "codebase": "optipng-0.7.8", "c_file": "pngrio.c", "function": "png_default_read_data", "sloc": "10", "c_code": "void\npng_default_read_data(png_structp png_ptr, png_bytep data, size_t length)\n{\n size_t check;\n if (png_ptr == ((void *)0))\n return;\n check = fread(data, 1, length, (png_ptr->io_ptr));\n if (check != length)\n png_error(png_ptr, \"Read Error\");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_leading_plus_sign_prep#utest_main.c", "codebase": "json.h", "c_file": "allow_leading_plus_sign.c", "function": "utest_main", "sloc": "118", "c_code": "__attribute__((weak)) int utest_main(int argc, const char *const argv[]) {\n utest_uint64_t failed = 0;\n size_t index = 0;\n size_t *failed_testcases = 0;\n size_t failed_testcases_length = 0;\n const char *filter = 0;\n utest_uint64_t ran_tests = 0;\n enum colours { RESET, GREEN, RED };\n const int use_colours = (isatty(1));\n const char *colours[] = {\"\\033[0m\", \"\\033[32m\", \"\\033[31m\"};\n if (!use_colours) {\n for (index = 0; index < sizeof colours / sizeof colours[0]; index++) {\n colours[index] = \"\";\n }\n }\n for (index = 1; index < ((size_t)argc); index++) {\n const char help_str[] = \"--help\";\n const char list_str[] = \"--list-tests\";\n const char filter_str[] = \"--filter=\";\n const char output_str[] = \"--output=\";\n if (0 == utest_strncmp(argv[index], help_str, strlen(help_str))) {\n printf(\"utest.h - the single file unit testing solution for C/C++!\\n\"\n \"Command line Options:\\n\"\n \" --help Show this message and exit.\\n\"\n \" --filter= Filter the test cases to run (EG. MyTest*.a \"\n \"would run MyTestCase.a but not MyTestCase.b).\\n\"\n \" --list-tests List testnames, one per line. Output names \"\n \"can be passed to --filter.\\n\"\n \" --output= Output an xunit XML file to the file \"\n \"specified in .\\n\");\n goto cleanup;\n } else if (0 ==\n utest_strncmp(argv[index], filter_str, strlen(filter_str))) {\n filter = argv[index] + strlen(filter_str);\n } else if (0 ==\n utest_strncmp(argv[index], output_str, strlen(output_str))) {\n utest_state.output = utest_fopen(argv[index] + strlen(output_str), \"w+\");\n } else if (0 == utest_strncmp(argv[index], list_str, strlen(list_str))) {\n for (index = 0; index < utest_state.tests_length; index++) {\n if (utest_state.output) { fprintf(utest_state.output, \"%s\\n\", utest_state.tests[index].name); } printf(\"%s\\n\", utest_state.tests[index].name);\n }\n return 0;\n }\n }\n for (index = 0; index < utest_state.tests_length; index++) {\n if (utest_should_filter_test(filter, utest_state.tests[index].name)) {\n continue;\n }\n ran_tests++;\n }\n printf(\"%s[==========]%s Running %\" \"l\" \"u\" \" test cases.\\n\",\n colours[GREEN], colours[RESET], ((utest_uint64_t)ran_tests));\n if (utest_state.output) {\n fprintf(utest_state.output, \"\\n\");\n fprintf(utest_state.output,\n \"\\n\",\n ((utest_uint64_t)ran_tests));\n fprintf(utest_state.output,\n \"\\n\",\n ((utest_uint64_t)ran_tests));\n }\n for (index = 0; index < utest_state.tests_length; index++) {\n int result = 0;\n utest_int64_t ns = 0;\n if (utest_should_filter_test(filter, utest_state.tests[index].name)) {\n continue;\n }\n printf(\"%s[ RUN ]%s %s\\n\", colours[GREEN], colours[RESET],\n utest_state.tests[index].name);\n if (utest_state.output) {\n fprintf(utest_state.output, \"\",\n utest_state.tests[index].name);\n }\n ns = utest_ns();\n (*__errno_location ()) = 0;\n utest_state.tests[index].func(&result, utest_state.tests[index].index);\n ns = utest_ns() - ns;\n if (utest_state.output) {\n fprintf(utest_state.output, \"\\n\");\n }\n if (0 != result) {\n const size_t failed_testcase_index = failed_testcases_length++;\n failed_testcases = ((size_t *)realloc(((void *)failed_testcases), sizeof(size_t) * failed_testcases_length));\n failed_testcases[failed_testcase_index] = index;\n failed++;\n printf(\"%s[ FAILED ]%s %s (%\" \"l\" \"d\" \"ns)\\n\", colours[RED],\n colours[RESET], utest_state.tests[index].name, ns);\n } else {\n printf(\"%s[ OK ]%s %s (%\" \"l\" \"d\" \"ns)\\n\", colours[GREEN],\n colours[RESET], utest_state.tests[index].name, ns);\n }\n }\n printf(\"%s[==========]%s %\" \"l\" \"u\" \" test cases ran.\\n\", colours[GREEN],\n colours[RESET], ran_tests);\n printf(\"%s[ PASSED ]%s %\" \"l\" \"u\" \" tests.\\n\", colours[GREEN],\n colours[RESET], ran_tests - failed);\n if (0 != failed) {\n printf(\"%s[ FAILED ]%s %\" \"l\" \"u\" \" tests, listed below:\\n\",\n colours[RED], colours[RESET], failed);\n for (index = 0; index < failed_testcases_length; index++) {\n printf(\"%s[ FAILED ]%s %s\\n\", colours[RED], colours[RESET],\n utest_state.tests[failed_testcases[index]].name);\n }\n }\n if (utest_state.output) {\n fprintf(utest_state.output, \"\\n\\n\");\n }\ncleanup:\n for (index = 0; index < utest_state.tests_length; index++) {\n free(((void *)utest_state.tests[index].name));\n }\n free(((void *)failed_testcases));\n free(((void *)utest_state.tests));\n if (utest_state.output) {\n fclose(utest_state.output);\n }\n return ((int)failed);\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 4, "memory_operation": 0, "if_statement": 15, "for_loop": 7, "while_loop": 0, "switch_statement": 0, "goto_statement": 1, "return_statement": 2, "break_continue_statement": 2}}, {"id": "patch-2.7.6#quotearg_prep#quote.c", "codebase": "patch-2.7.6", "c_file": "quotearg.c", "function": "quote", "sloc": "5", "c_code": "char const *\nquote (char const *arg)\n{\n return quote_n (0, arg);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#getopt_prep#gnu_getopt.c", "codebase": "uucp-1.07", "c_file": "getopt.c", "function": "gnu_getopt", "sloc": "11", "c_code": "int\ngnu_getopt (argc, argv, optstring)\n int argc;\n char *const *argv;\n const char *optstring;\n{\n return _getopt_internal (argc, argv, optstring,\n (const struct option *) 0,\n (int *) 0,\n 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#machine_prep#Pl_M_Set_Working_Dir.c", "codebase": "gprolog-1.5.0", "c_file": "machine.c", "function": "Pl_M_Set_Working_Dir", "sloc": "6", "c_code": "Bool\nPl_M_Set_Working_Dir(char *path)\n{\n char *new_path = Pl_M_Absolute_Path_Name(path);\n return (new_path != ((void *)0) && chdir(new_path) == 0);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsNumberForms.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsNumberForms", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsNumberForms(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsNumberForms\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsNumberForms\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsNumberForms(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tar-1.34#xheader_prep#xheader_xhdr_name.c", "codebase": "tar-1.34", "c_file": "xheader.c", "function": "xheader_xhdr_name", "sloc": "7", "c_code": "char *\nxheader_xhdr_name (struct tar_stat_info *st)\n{\n if (!exthdr_name)\n assign_string (&exthdr_name, header_template[pax_file_header][posixly_correct]);\n return xheader_format_name (st, exthdr_name, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#init_prep#GetFs.c", "codebase": "mtools-4.0.43", "c_file": "init.c", "function": "GetFs", "sloc": "6", "c_code": "Stream_t *GetFs(Stream_t *Fs)\n{\n while(Fs && Fs->Class != &FsClass)\n Fs = Fs->Next;\n return Fs;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_location_information_prep#json_parse_array.c", "codebase": "json.h", "c_file": "allow_location_information.c", "function": "json_parse_array", "sloc": "57", "c_code": "void json_parse_array(struct json_parse_state_s *state,\n struct json_array_s *array) {\n const char *const src = state->src;\n const size_t size = state->size;\n size_t elements = 0;\n int allow_comma = 0;\n struct json_array_element_s *previous = 0;\n state->offset++;\n (void)json_skip_all_skippables(state);\n elements = 0;\n do {\n struct json_array_element_s *element = 0;\n struct json_value_s *value = 0;\n (void)json_skip_all_skippables(state);\n if (']' == src[state->offset]) {\n state->offset++;\n break;\n }\n if (allow_comma) {\n if (',' == src[state->offset]) {\n state->offset++;\n allow_comma = 0;\n continue;\n }\n }\n element = (struct json_array_element_s *)state->dom;\n state->dom += sizeof(struct json_array_element_s);\n if (0 == previous) {\n array->start = element;\n } else {\n previous->next = element;\n }\n previous = element;\n if (json_parse_flags_allow_location_information & state->flags_bitset) {\n struct json_value_ex_s *value_ex = (struct json_value_ex_s *)state->dom;\n state->dom += sizeof(struct json_value_ex_s);\n value_ex->offset = state->offset;\n value_ex->line_no = state->line_no;\n value_ex->row_no = state->offset - state->line_offset;\n value = &(value_ex->value);\n } else {\n value = (struct json_value_s *)state->dom;\n state->dom += sizeof(struct json_value_s);\n }\n element->value = value;\n json_parse_value(state, 0, value);\n elements++;\n allow_comma = 1;\n } while (state->offset < size);\n if (previous) {\n previous->next = 0;\n }\n if (0 == elements) {\n array->start = 0;\n }\n array->length = elements;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 0, "struct_type": 6, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 8, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 2}}, {"id": "transcoder-set#COUNT_PAIRS_DIFFERENCE_EQUAL_K_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "COUNT_PAIRS_DIFFERENCE_EQUAL_K.c", "function": "f_gold", "sloc": "11", "c_code": "int f_gold ( int arr [ ], int n, int k ) {\n int count = 0;\n for ( int i = 0;\n i < n;\n i ++ ) {\n for ( int j = i + 1;\n j < n;\n j ++ ) if ( arr [ i ] - arr [ j ] == k || arr [ j ] - arr [ i ] == k ) count ++;\n }\n return count;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlCheckLanguageID.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlCheckLanguageID", "sloc": "105", "c_code": "int\nxmlCheckLanguageID(const xmlChar * lang)\n{\n const xmlChar *cur = lang, *nxt;\n if (cur == ((void *)0))\n return (0);\n if (((cur[0] == 'i') && (cur[1] == '-')) ||\n ((cur[0] == 'I') && (cur[1] == '-')) ||\n ((cur[0] == 'x') && (cur[1] == '-')) ||\n ((cur[0] == 'X') && (cur[1] == '-'))) {\n cur += 2;\n while (((cur[0] >= 'A') && (cur[0] <= 'Z')) ||\n ((cur[0] >= 'a') && (cur[0] <= 'z')))\n cur++;\n return(cur[0] == 0);\n }\n nxt = cur;\n while (((nxt[0] >= 'A') && (nxt[0] <= 'Z')) ||\n ((nxt[0] >= 'a') && (nxt[0] <= 'z')))\n nxt++;\n if (nxt - cur >= 4) {\n if ((nxt - cur > 8) || (nxt[0] != 0))\n return(0);\n return(1);\n }\n if (nxt - cur < 2)\n return(0);\n if (nxt[0] == 0)\n return(1);\n if (nxt[0] != '-')\n return(0);\n nxt++;\n cur = nxt;\n if ((nxt[0] >= '0') && (nxt[0] <= '9'))\n goto region_m49;\n while (((nxt[0] >= 'A') && (nxt[0] <= 'Z')) ||\n ((nxt[0] >= 'a') && (nxt[0] <= 'z')))\n nxt++;\n if (nxt - cur == 4)\n goto script;\n if (nxt - cur == 2)\n goto region;\n if ((nxt - cur >= 5) && (nxt - cur <= 8))\n goto variant;\n if (nxt - cur != 3)\n return(0);\n if (nxt[0] == 0)\n return(1);\n if (nxt[0] != '-')\n return(0);\n nxt++;\n cur = nxt;\n if ((nxt[0] >= '0') && (nxt[0] <= '9'))\n goto region_m49;\n while (((nxt[0] >= 'A') && (nxt[0] <= 'Z')) ||\n ((nxt[0] >= 'a') && (nxt[0] <= 'z')))\n nxt++;\n if (nxt - cur == 2)\n goto region;\n if ((nxt - cur >= 5) && (nxt - cur <= 8))\n goto variant;\n if (nxt - cur != 4)\n return(0);\nscript:\n if (nxt[0] == 0)\n return(1);\n if (nxt[0] != '-')\n return(0);\n nxt++;\n cur = nxt;\n if ((nxt[0] >= '0') && (nxt[0] <= '9'))\n goto region_m49;\n while (((nxt[0] >= 'A') && (nxt[0] <= 'Z')) ||\n ((nxt[0] >= 'a') && (nxt[0] <= 'z')))\n nxt++;\n if ((nxt - cur >= 5) && (nxt - cur <= 8))\n goto variant;\n if (nxt - cur != 2)\n return(0);\nregion:\n if (nxt[0] == 0)\n return(1);\n if (nxt[0] != '-')\n return(0);\n nxt++;\n cur = nxt;\n while (((nxt[0] >= 'A') && (nxt[0] <= 'Z')) ||\n ((nxt[0] >= 'a') && (nxt[0] <= 'z')))\n nxt++;\n if ((nxt - cur < 5) || (nxt - cur > 8))\n return(0);\nvariant:\n if (nxt[0] == 0)\n return(1);\n if (nxt[0] != '-')\n return(0);\n return (1);\nregion_m49:\n if (((nxt[1] >= '0') && (nxt[1] <= '9')) &&\n ((nxt[2] >= '0') && (nxt[2] <= '9'))) {\n nxt += 3;\n goto region;\n }\n return(0);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 29, "for_loop": 0, "while_loop": 6, "switch_statement": 0, "goto_statement": 10, "return_statement": 21, "break_continue_statement": 0}}, {"id": "gzip-1.12#printf-args_prep#printf_fetchargs.c", "codebase": "gzip-1.12", "c_file": "printf-args.c", "function": "printf_fetchargs", "sloc": "95", "c_code": "int\nprintf_fetchargs (va_list args, arguments *a)\n{\n size_t i;\n argument *ap;\n for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)\n switch (ap->type)\n {\n case TYPE_SCHAR:\n ap->a.a_schar = __builtin_va_arg(args,int);\n break;\n case TYPE_UCHAR:\n ap->a.a_uchar = __builtin_va_arg(args,int);\n break;\n case TYPE_SHORT:\n ap->a.a_short = __builtin_va_arg(args,int);\n break;\n case TYPE_USHORT:\n ap->a.a_ushort = __builtin_va_arg(args,int);\n break;\n case TYPE_INT:\n ap->a.a_int = __builtin_va_arg(args,int);\n break;\n case TYPE_UINT:\n ap->a.a_uint = __builtin_va_arg(args,unsigned int);\n break;\n case TYPE_LONGINT:\n ap->a.a_longint = __builtin_va_arg(args,long int);\n break;\n case TYPE_ULONGINT:\n ap->a.a_ulongint = __builtin_va_arg(args,unsigned long int);\n break;\n case TYPE_LONGLONGINT:\n ap->a.a_longlongint = __builtin_va_arg(args,long long int);\n break;\n case TYPE_ULONGLONGINT:\n ap->a.a_ulonglongint = __builtin_va_arg(args,unsigned long long int);\n break;\n case TYPE_DOUBLE:\n ap->a.a_double = __builtin_va_arg(args,double);\n break;\n case TYPE_LONGDOUBLE:\n ap->a.a_longdouble = __builtin_va_arg(args,long double);\n break;\n case TYPE_CHAR:\n ap->a.a_char = __builtin_va_arg(args,int);\n break;\n case TYPE_WIDE_CHAR:\n ap->a.a_wide_char =\n (sizeof (wint_t) < sizeof (int)\n ? (wint_t) __builtin_va_arg(args,int)\n : __builtin_va_arg(args,wint_t));\n break;\n case TYPE_STRING:\n ap->a.a_string = __builtin_va_arg(args,const char *);\n if (ap->a.a_string == ((void *)0))\n ap->a.a_string = \"(NULL)\";\n break;\n case TYPE_WIDE_STRING:\n ap->a.a_wide_string = __builtin_va_arg(args,const wchar_t *);\n if (ap->a.a_wide_string == ((void *)0))\n {\n static const wchar_t wide_null_string[] =\n {\n (wchar_t)'(',\n (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L',\n (wchar_t)')',\n (wchar_t)0\n };\n ap->a.a_wide_string = wide_null_string;\n }\n break;\n case TYPE_POINTER:\n ap->a.a_pointer = __builtin_va_arg(args,void *);\n break;\n case TYPE_COUNT_SCHAR_POINTER:\n ap->a.a_count_schar_pointer = __builtin_va_arg(args,signed char *);\n break;\n case TYPE_COUNT_SHORT_POINTER:\n ap->a.a_count_short_pointer = __builtin_va_arg(args,short *);\n break;\n case TYPE_COUNT_INT_POINTER:\n ap->a.a_count_int_pointer = __builtin_va_arg(args,int *);\n break;\n case TYPE_COUNT_LONGINT_POINTER:\n ap->a.a_count_longint_pointer = __builtin_va_arg(args,long int *);\n break;\n case TYPE_COUNT_LONGLONGINT_POINTER:\n ap->a.a_count_longlongint_pointer = __builtin_va_arg(args,long long int *);\n break;\n default:\n return -1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 22}}, {"id": "libxml2#libxml2-py_prep#libxml_htmlParseCharRef.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_htmlParseCharRef", "sloc": "15", "c_code": "PyObject *\nlibxml_htmlParseCharRef(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n htmlParserCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n if (libxml_deprecationWarning(\"htmlParseCharRef\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:htmlParseCharRef\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (htmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj));\n c_retval = htmlParseCharRef(ctxt);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "json.h#allow_simplified_json_prep#json_value_is_false.c", "codebase": "json.h", "c_file": "allow_simplified_json.c", "function": "json_value_is_false", "sloc": "3", "c_code": "int json_value_is_false(const struct json_value_s *const value) {\n return value->type == json_type_false;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#BIRTHDAY_PARADOX_prep#len.c", "codebase": "transcoder-set", "c_file": "BIRTHDAY_PARADOX.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_global_object_prep#json_parse_key.c", "codebase": "json.h", "c_file": "allow_global_object.c", "function": "json_parse_key", "sloc": "23", "c_code": "void json_parse_key(struct json_parse_state_s *state,\n struct json_string_s *string) {\n if (json_parse_flags_allow_unquoted_keys & state->flags_bitset) {\n const char *const src = state->src;\n char *const data = state->data;\n size_t offset = state->offset;\n if (('\"' == src[offset]) || ('\\'' == src[offset])) {\n json_parse_string(state, string);\n } else {\n size_t size = 0;\n string->string = state->data;\n while (is_valid_unquoted_key_char(src[offset])) {\n data[size++] = src[offset++];\n }\n data[size] = '\\0';\n string->string_size = size++;\n state->data += size;\n state->offset = offset;\n }\n } else {\n json_parse_string(state, string);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "wget-1.21.4#ptimer_prep#ptimer_destroy.c", "codebase": "wget-1.21.4", "c_file": "ptimer.c", "function": "ptimer_destroy", "sloc": "5", "c_code": "void\nptimer_destroy (struct ptimer *pt)\n{\n do { free ((void *) (pt)); pt = ((void *)0); } while (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "bc-1.07.1#execute_prep#byte.c", "codebase": "bc-1.07.1", "c_file": "execute.c", "function": "byte", "sloc": "5", "c_code": "unsigned char\nbyte ( program_counter *p )\n{\n return (functions[p->pc_func].f_body[p->pc_addr++]);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#infback_prep#inflateBackInit_.c", "codebase": "optipng-0.7.8", "c_file": "infback.c", "function": "inflateBackInit_", "sloc": "30", "c_code": "int inflateBackInit_(z_streamp strm, int windowBits,\n unsigned char *window, const char *version,\n int stream_size) {\n struct inflate_state *state;\n if (version == 0 || version[0] != \"1.3-optipng\"[0] ||\n stream_size != (int)(sizeof(z_stream)))\n return (-6);\n if (strm == 0 || window == 0 ||\n windowBits < 8 || windowBits > 15)\n return (-2);\n strm->msg = 0;\n if (strm->zalloc == (alloc_func)0) {\n strm->zalloc = zcalloc;\n strm->opaque = (voidpf)0;\n }\n if (strm->zfree == (free_func)0)\n strm->zfree = zcfree;\n state = (struct inflate_state *)(*((strm)->zalloc))((strm)->opaque, (1), (sizeof(struct inflate_state)));\n if (state == 0) return (-4);\n ;\n strm->state = (struct internal_state *)state;\n state->dmax = 32768U;\n state->wbits = (uInt)windowBits;\n state->wsize = 1U << windowBits;\n state->window = window;\n state->wnext = 0;\n state->whave = 0;\n state->sane = 1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#HOW_TO_TURN_OFF_A_PARTICULAR_BIT_IN_A_NUMBER_prep#max.c", "codebase": "transcoder-set", "c_file": "HOW_TO_TURN_OFF_A_PARTICULAR_BIT_IN_A_NUMBER.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlInitXPathInternal.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlInitXPathInternal", "sloc": "7", "c_code": "__attribute__((no_sanitize(\"float-divide-by-zero\")))\nvoid\nxmlInitXPathInternal(void) {\n xmlXPathNAN = (__builtin_nanf (\"\"));\n xmlXPathPINF = (__builtin_inff ());\n xmlXPathNINF = -(__builtin_inff ());\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlIsBlankNode.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlIsBlankNode", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlIsBlankNode(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlNode * node;\n PyObject *pyobj_node;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlIsBlankNode\", &pyobj_node))\n return(((void *)0));\n node = (xmlNode *) (((pyobj_node) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_node))->obj));\n c_retval = xmlIsBlankNode(node);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tmux#window_prep#window_pane_tree_RB_PREV.c", "codebase": "tmux", "c_file": "window.c", "function": "window_pane_tree_RB_PREV", "sloc": "1", "c_code": "struct window_pane * window_pane_tree_RB_PREV(struct window_pane *elm) { if ((elm)->tree_entry.rbe_left) { elm = (elm)->tree_entry.rbe_left; while ((elm)->tree_entry.rbe_right) elm = (elm)->tree_entry.rbe_right; } else { if ((elm)->tree_entry.rbe_parent && (elm == ((elm)->tree_entry.rbe_parent)->tree_entry.rbe_right)) elm = (elm)->tree_entry.rbe_parent; else { while ((elm)->tree_entry.rbe_parent && (elm == ((elm)->tree_entry.rbe_parent)->tree_entry.rbe_left)) elm = (elm)->tree_entry.rbe_parent; elm = (elm)->tree_entry.rbe_parent; } } return (elm); }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#mark_prep#unmark.c", "codebase": "less-633", "c_file": "mark.c", "function": "unmark", "sloc": "7", "c_code": "void unmark(void* ifile)\n{\n int i;\n for (i = 0; i < ((2*26)+2); i++)\n if (marks[i].m_ifile == ifile)\n marks[i].m_scrpos.pos = ((POSITION)(-1));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#write_c_prep#Pl_Display_1.c", "codebase": "gprolog-1.5.0", "c_file": "write_c.c", "function": "Pl_Display_1", "sloc": "8", "c_code": "void\nPl_Display_1(WamWord term_word)\n{\n (pl_sys_var[0]) = 2;\n (pl_sys_var[1]) = -1;\n (pl_sys_var[2]) = 1200;\n Pl_Write_Term_2(((PlLong) (0) + ((PlULong)0)), term_word);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MAKING_ELEMENTS_OF_TWO_ARRAYS_SAME_WITH_MINIMUM_INCREMENTDECREMENT_prep#main.c", "codebase": "transcoder-set", "c_file": "MAKING_ELEMENTS_OF_TWO_ARRAYS_SAME_WITH_MINIMUM_INCREMENTDECREMENT.c", "function": "main", "sloc": "36", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {1,6,6,7,10,11,13,18,19,19,19,31,34,37,37,40,41,41,47,47,53,54,55,55,56,56,60,60,62,62,66,73,75,76,78,81,81,85,88,90,91,92,93,95,97,98};\nint param0_1[] = {-12,-6,78,62,86,-32};\nint param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1};\nint param0_3[] = {76,74};\nint param0_4[] = {-92,-90,-88,-84,-76,-54,-44,-42,-38,-30,34,42};\nint param0_5[] = {1,1,0,0,1,1,1,0,1,1,0,0,1,0,0,1,1,1};\nint param0_6[] = {4,5,6,13,16,24,36,40,40,44,47,52,58,58,59,63,66,67,69,70,74,77,81,88,89,90,94,96};\nint param0_7[] = {-16,66,-2,54,-8,10,44,-36,-54,50,92,84,-36,40,-12,98,36,22,-10};\nint 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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};\nint param0_9[] = {42,24,43,64,55,94,26,30,76,3,37,43,81,7,15,64,63,88,34,8,55,32,19,55};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1_0[] = {2,2,4,7,8,8,8,8,8,9,9,12,15,16,21,25,26,27,29,34,34,35,38,40,40,44,44,47,48,54,58,61,63,64,66,69,69,70,73,74,75,76,79,80,80,93};\nint param1_1[] = {-86,20,32,52,50,-60};\nint param1_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1};\nint param1_3[] = {16,98};\nint param1_4[] = {-80,-54,-34,12,14,16,16,46,50,64,84,92};\nint param1_5[] = {0,1,1,0,1,1,1,1,0,0,0,0,0,1,1,1,1,1};\nint param1_6[] = {1,7,10,17,21,22,22,27,36,37,39,46,52,53,56,59,65,67,70,75,78,78,79,89,89,94,96,97};\nint param1_7[] = {-76,-74,62,22,50,84,78,26,-62,-10,86,-10,-92,-10,86,-6,-58,-26,-18};\nint param1_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,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};\nint param1_9[] = {96,11,63,90,28,80,44,63,17,81,80,69,66,22,81,4,86,74,91,17,3,81,65,98};\nint *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9};\n int param2[] = {23,4,14,1,8,14,24,16,36,22};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#FIND_THE_MINIMUM_DISTANCE_BETWEEN_TWO_NUMBERS_prep#min.c", "codebase": "transcoder-set", "c_file": "FIND_THE_MINIMUM_DISTANCE_BETWEEN_TWO_NUMBERS.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#sdp_accessor_prep#sdp_message_m_port_get.c", "codebase": "libosip2-5.3.1", "c_file": "sdp_accessor.c", "function": "sdp_message_m_port_get", "sloc": "6", "c_code": "char *sdp_message_m_port_get(sdp_message_t *sdp, int pos_media) {\n sdp_media_t *med = osip_list_get(&sdp->m_medias, pos_media);\n if (med == ((void *)0))\n return ((void *)0);\n return med->m_port;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tar-1.34#getopt1_prep#rpl_getopt_long_only.c", "codebase": "tar-1.34", "c_file": "getopt1.c", "function": "rpl_getopt_long_only", "sloc": "8", "c_code": "int\nrpl_getopt_long_only (int argc, char *const *argv,\n const char *options,\n const struct rpl_option *long_options, int *opt_index)\n{\n return rpl_getopt_internal (argc, (char **) argv, options, long_options,\n opt_index, 1, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json-c#json_object_prep#json_object_get_boolean.c", "codebase": "json-c", "c_file": "json_object.c", "function": "json_object_get_boolean", "sloc": "19", "c_code": "json_bool json_object_get_boolean(const struct json_object *jso)\n{\n if (!jso)\n return 0;\n switch (jso->o_type)\n {\n case json_type_boolean: return JC_BOOL_C(jso)->c_boolean;\n case json_type_int:\n switch (JC_INT_C(jso)->cint_type)\n {\n case json_object_int_type_int64: return (JC_INT_C(jso)->cint.c_int64 != 0);\n case json_object_int_type_uint64: return (JC_INT_C(jso)->cint.c_uint64 != 0);\n default: json_abort(\"invalid cint_type\");\n }\n case json_type_double: return (JC_DOUBLE_C(jso)->c_double != 0);\n case json_type_string: return (JC_STRING_C(jso)->len != 0);\n default: return 0;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 2, "goto_statement": 0, "return_statement": 7, "break_continue_statement": 0}}, {"id": "libxml2#parserInternals_prep#xmlCtxtSetCatalogs.c", "codebase": "libxml2", "c_file": "parserInternals.c", "function": "xmlCtxtSetCatalogs", "sloc": "6", "c_code": "void\nxmlCtxtSetCatalogs(xmlParserCtxtPtr ctxt, void *catalogs) {\n if (ctxt == ((void *)0))\n return;\n ctxt->catalogs = catalogs;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cpio-2.14#defer_prep#free_deferment.c", "codebase": "cpio-2.14", "c_file": "defer.c", "function": "free_deferment", "sloc": "6", "c_code": "void\nfree_deferment (struct deferment *d)\n{\n free (d->header.c_name);\n free (d);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 2, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR_2_prep#len.c", "codebase": "transcoder-set", "c_file": "PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR_2.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MINIMUM_NUMBER_DIVIDED_MAKE_NUMBER_PERFECT_SQUARE_prep#sort.c", "codebase": "transcoder-set", "c_file": "FIND_MINIMUM_NUMBER_DIVIDED_MAKE_NUMBER_PERFECT_SQUARE.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#format_prep#format_create.c", "codebase": "tmux", "c_file": "format.c", "function": "format_create", "sloc": "30", "c_code": "struct format_tree *\nformat_create(struct client *c, struct cmdq_item *item, int tag, int flags)\n{\n struct format_tree *ft;\n if (!event_initialized(&format_job_event)) {\n event_set((&format_job_event), -1, 0, (format_job_timer), (((void *)0)));\n format_job_timer(-1, 0, ((void *)0));\n }\n ft = xcalloc(1, sizeof *ft);\n do { (&ft->tree)->rbh_root = ((void *)0); } while (0);\n if (c != ((void *)0)) {\n ft->client = c;\n ft->client->references++;\n }\n ft->tag = tag;\n ft->flags = flags;\n format_add(ft, \"version\", \"%s\", \"master\");\n format_add_cb(ft, \"host\", format_cb_host);\n format_add_cb(ft, \"host_short\", format_cb_host_short);\n format_add_cb(ft, \"pid\", format_cb_pid);\n format_add(ft, \"socket_path\", \"%s\", socket_path);\n format_add_tv(ft, \"start_time\", &start_time);\n if (item != ((void *)0)) {\n if (item->cmd != ((void *)0))\n format_add(ft, \"command\", \"%s\", item->cmd->entry->name);\n if (item->shared != ((void *)0) && item->shared->formats != ((void *)0))\n format_merge(ft, item->shared->formats);\n }\n return (ft);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#version-etc_prep#version_etc.c", "codebase": "tar-1.34", "c_file": "version-etc.c", "function": "version_etc", "sloc": "10", "c_code": "void\nversion_etc (FILE *stream,\n const char *command_name, const char *package,\n const char *version, ...)\n{\n va_list authors;\n __builtin_va_start(authors,version);\n version_etc_va (stream, command_name, package, version, authors);\n __builtin_va_end(authors);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SQUARE_ROOT_OF_AN_INTEGER_prep#sort.c", "codebase": "transcoder-set", "c_file": "SQUARE_ROOT_OF_AN_INTEGER.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#ma2asm_inst_prep#Fail_Ret.c", "codebase": "gprolog-1.5.0", "c_file": "ma2asm_inst.c", "function": "Fail_Ret", "sloc": "6", "c_code": "void\nFail_Ret(void)\n{\n Inst_Printf(\"test\", \"%%rax, %%rax\");\n Inst_Printf(\"je\", \"fail\");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_NUMBERS_THAT_DONT_CONTAIN_3_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBERS_THAT_DONT_CONTAIN_3.c", "function": "f_gold", "sloc": "9", "c_code": "int f_gold ( int n ) {\n if ( n < 3 ) return n;\n if ( n >= 3 && n < 10 ) return n - 1;\n int po = 1;\n while ( n / po > 9 ) po = po * 10;\n int msd = n / po;\n if ( msd != 3 ) return f_gold ( msd ) * f_gold ( po - 1 ) + f_gold ( msd ) + f_gold ( n % po );\n else return f_gold ( msd * po - 1 );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "json.h#allow_no_commas_prep#json_write_get_string_size.c", "codebase": "json.h", "c_file": "allow_no_commas.c", "function": "json_write_get_string_size", "sloc": "22", "c_code": "int json_write_get_string_size(const struct json_string_s *string,\n size_t *size) {\n size_t i;\n for (i = 0; i < string->string_size; i++) {\n switch (string->string[i]) {\n case '\"':\n case '\\\\':\n case '\\b':\n case '\\f':\n case '\\n':\n case '\\r':\n case '\\t':\n *size += 2;\n break;\n default:\n *size += 1;\n break;\n }\n }\n *size += 2;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 2}}, {"id": "nettle-3.9.1#eax_prep#nettle_eax_encrypt.c", "codebase": "nettle-3.9.1", "c_file": "eax.c", "function": "nettle_eax_encrypt", "sloc": "8", "c_code": "void\nnettle_eax_encrypt (struct eax_ctx *eax, const struct eax_key *key,\n const void *cipher, nettle_cipher_func *f,\n size_t length, uint8_t *dst, const uint8_t *src)\n{\n nettle_ctr_crypt (cipher, f, 16, eax->ctr.b, length, dst, src);\n omac_update (&eax->omac_message, key, cipher, f, length, dst);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#buildcmd_prep#bc_init_state.c", "codebase": "findutils-4.9.0", "c_file": "buildcmd.c", "function": "bc_init_state", "sloc": "18", "c_code": "void\nbc_init_state (const struct buildcmd_control *ctl,\n struct buildcmd_state *state,\n void *context)\n{\n state->cmd_argc = 0;\n state->cmd_argv_chars = 0;\n state->cmd_argv = ((void *)0);\n state->cmd_argv_alloc = 0;\n state->largest_successful_arg_count = 0;\n state->smallest_failed_arg_count = 0;\n ((void) sizeof ((ctl->arg_max <= (0x7fffffffffffffffL - 2048L)) ? 1 : 0), __extension__ ({ if (ctl->arg_max <= (0x7fffffffffffffffL - 2048L)) ; else __assert_fail (\"ctl->arg_max <= (LONG_MAX - 2048L)\", \"buildcmd.c\", 572, __extension__ __PRETTY_FUNCTION__); }));\n state->argbuf = xmalloc (ctl->arg_max + 1u);\n state->cmd_argv_chars = state->cmd_initial_argv_chars = 0;\n state->todo = 0;\n state->dir_fd = -1;\n state->usercontext = context;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THE_ELEMENT_BEFORE_WHICH_ALL_THE_ELEMENTS_ARE_SMALLER_THAN_IT_AND_AFTER_WHICH_ALL_ARE_GREATER_THAN_IT_prep#max.c", "codebase": "transcoder-set", "c_file": "FIND_THE_ELEMENT_BEFORE_WHICH_ALL_THE_ELEMENTS_ARE_SMALLER_THAN_IT_AND_AFTER_WHICH_ALL_ARE_GREATER_THAN_IT.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_hexadecimal_numbers_prep#json_get_array_size.c", "codebase": "json.h", "c_file": "allow_hexadecimal_numbers.c", "function": "json_get_array_size", "sloc": "49", "c_code": "int json_get_array_size(struct json_parse_state_s *state) {\n const size_t flags_bitset = state->flags_bitset;\n size_t elements = 0;\n int allow_comma = 0;\n const char *const src = state->src;\n const size_t size = state->size;\n if ('[' != src[state->offset]) {\n state->error = json_parse_error_unknown;\n return 1;\n }\n state->offset++;\n state->dom_size += sizeof(struct json_array_s);\n while (state->offset < size) {\n if (json_skip_all_skippables(state)) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n if (']' == src[state->offset]) {\n state->offset++;\n state->dom_size += sizeof(struct json_array_element_s) * elements;\n return 0;\n }\n if (allow_comma) {\n if (',' == src[state->offset]) {\n state->offset++;\n allow_comma = 0;\n } else if (!(json_parse_flags_allow_no_commas & flags_bitset)) {\n state->error = json_parse_error_expected_comma_or_closing_bracket;\n return 1;\n }\n if (json_parse_flags_allow_trailing_comma & flags_bitset) {\n allow_comma = 0;\n continue;\n } else {\n if (json_skip_all_skippables(state)) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n }\n }\n if (json_get_value_size(state, 0)) {\n return 1;\n }\n elements++;\n allow_comma = 1;\n }\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 9, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 7, "break_continue_statement": 1}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_SET_13_CUTTING_A_ROD_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_SET_13_CUTTING_A_ROD.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int price [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#pkcs1-decrypt_prep#nettle_pkcs1_decrypt.c", "codebase": "nettle-3.9.1", "c_file": "pkcs1-decrypt.c", "function": "nettle_pkcs1_decrypt", "sloc": "13", "c_code": "int\nnettle_pkcs1_decrypt (size_t key_size,\n const mpz_t m,\n size_t *length, uint8_t *message)\n{\n uint8_t *em; size_t tmp_em_size;\n int ret;\n do { tmp_em_size = (key_size); (em) = _nettle_gmp_alloc(sizeof (*em) * (key_size)); } while (0);\n nettle_mpz_get_str_256(key_size, em, m);\n ret = _nettle_pkcs1_sec_decrypt_variable (length, message, key_size, em);\n (_nettle_gmp_free(em, tmp_em_size));\n return ret;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_global_object_prep#json_write_minified_get_value_size.c", "codebase": "json.h", "c_file": "allow_global_object.c", "function": "json_write_minified_get_value_size", "sloc": "28", "c_code": "int json_write_minified_get_value_size(const struct json_value_s *value,\n size_t *size) {\n switch (value->type) {\n default:\n return 1;\n case json_type_number:\n return json_write_get_number_size((struct json_number_s *)value->payload,\n size);\n case json_type_string:\n return json_write_get_string_size((struct json_string_s *)value->payload,\n size);\n case json_type_array:\n return json_write_minified_get_array_size(\n (struct json_array_s *)value->payload, size);\n case json_type_object:\n return json_write_minified_get_object_size(\n (struct json_object_s *)value->payload, size);\n case json_type_true:\n *size += 4;\n return 0;\n case json_type_false:\n *size += 5;\n return 0;\n case json_type_null:\n *size += 4;\n return 0;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 8, "break_continue_statement": 0}}, {"id": "uucp-1.07#syssub_prep#_uuconf_uclear_system.c", "codebase": "uucp-1.07", "c_file": "syssub.c", "function": "_uuconf_uclear_system", "sloc": "15", "c_code": "void\n_uuconf_uclear_system (q)\n struct uuconf_system *q;\n{\n do { q->uuconf_zname = (char *) &_uuconf_unset; q->uuconf_zalternate = (char *) &_uuconf_unset; q->uuconf_zdebug = (char *) &_uuconf_unset; q->uuconf_zmax_remote_debug = (char *) &_uuconf_unset; q->uuconf_zphone = (char *) &_uuconf_unset; q->uuconf_zcall_login = (char *) &_uuconf_unset; q->uuconf_zcall_password = (char *) &_uuconf_unset; q->uuconf_zcalled_login = (char *) &_uuconf_unset; q->uuconf_zprotocols = (char *) &_uuconf_unset; q->uuconf_zpubdir = (char *) &_uuconf_unset; q->uuconf_zlocalname = (char *) &_uuconf_unset; } while (0);\n do { q->uuconf_pzalias = (char **) &_uuconf_unset; q->uuconf_pzlocal_send = (char **) &_uuconf_unset; q->uuconf_pzremote_send = (char **) &_uuconf_unset; q->uuconf_pzlocal_receive = (char **) &_uuconf_unset; q->uuconf_pzremote_receive = (char **) &_uuconf_unset; q->uuconf_pzpath = (char **) &_uuconf_unset; q->uuconf_pzcmds = (char **) &_uuconf_unset; q->uuconf_pzforward_from = (char **) &_uuconf_unset; q->uuconf_pzforward_to = (char **) &_uuconf_unset; q->uuconf_schat.uuconf_pzchat = (char **) &_uuconf_unset; q->uuconf_schat.uuconf_pzprogram = (char **) &_uuconf_unset; q->uuconf_schat.uuconf_pzfail = (char **) &_uuconf_unset; q->uuconf_scalled_chat.uuconf_pzchat = (char **) &_uuconf_unset; q->uuconf_scalled_chat.uuconf_pzprogram = (char **) &_uuconf_unset; q->uuconf_scalled_chat.uuconf_pzfail = (char **) &_uuconf_unset; } while (0);\n do { q->uuconf_qtimegrade = (struct uuconf_timespan *) &_uuconf_unset; q->uuconf_qcalltimegrade = (struct uuconf_timespan *) &_uuconf_unset; q->uuconf_qcalledtimegrade = (struct uuconf_timespan *) &_uuconf_unset; q->uuconf_qcall_local_size = (struct uuconf_timespan *) &_uuconf_unset; q->uuconf_qcall_remote_size = (struct uuconf_timespan *) &_uuconf_unset; q->uuconf_qcalled_local_size = (struct uuconf_timespan *) &_uuconf_unset; q->uuconf_qcalled_remote_size = (struct uuconf_timespan *) &_uuconf_unset; } while (0);\n do { q->uuconf_fcall = -1; q->uuconf_fcalled = -1; q->uuconf_fcallback = -1; q->uuconf_fsequence = -1; q->uuconf_fsend_request = -1; q->uuconf_frec_request = -1; q->uuconf_fcall_transfer = -1; q->uuconf_fcalled_transfer = -1; q->uuconf_schat.uuconf_fstrip = -1; q->uuconf_scalled_chat.uuconf_fstrip = -1; } while (0);\n do { q->uuconf_cmax_retries = -1; q->uuconf_csuccess_wait = -1; q->uuconf_ibaud = -1; q->uuconf_ihighbaud = -1; q->uuconf_cfree_space = -1; q->uuconf_schat.uuconf_ctimeout = -1; q->uuconf_scalled_chat.uuconf_ctimeout = -1; q->uuconf_cmax_file_time = -1; } while (0);\n q->uuconf_qalternate = ((void *)0);\n q->uuconf_zport = (char *) &_uuconf_unset;\n q->uuconf_qport = (struct uuconf_port *) &_uuconf_unset;\n q->uuconf_qproto_params = (struct uuconf_proto_param *) &_uuconf_unset;\n q->uuconf_palloc = ((void *)0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 5, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_SUBSTRINGS_STRING_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "NUMBER_SUBSTRINGS_STRING.c", "function": "f_gold", "sloc": "4", "c_code": "int f_gold ( char str [] ) {\n int n = strlen(str);\n return n * ( n + 1 ) / 2;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#hmac-gosthash94_prep#nettle_hmac_gosthash94_digest.c", "codebase": "nettle-3.9.1", "c_file": "hmac-gosthash94.c", "function": "nettle_hmac_gosthash94_digest", "sloc": "6", "c_code": "void\nnettle_hmac_gosthash94_digest(struct hmac_gosthash94_ctx *ctx,\n size_t length, uint8_t *digest)\n{\n nettle_hmac_digest( &(ctx)->outer, &(ctx)->inner, &(ctx)->state, (&nettle_gosthash94), (length), (digest) );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#rtapelib_prep#rmt_close__.c", "codebase": "tar-1.34", "c_file": "rtapelib.c", "function": "rmt_close__", "sloc": "10", "c_code": "int\nrmt_close__ (int handle)\n{\n long int status;\n if (do_command (handle, \"C\\n\") == -1)\n return -1;\n status = get_status (handle);\n _rmt_shutdown (handle, (*__errno_location ()));\n return status;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "cflow-1.7#basename-lgpl_prep#base_len.c", "codebase": "cflow-1.7", "c_file": "basename-lgpl.c", "function": "base_len", "sloc": "15", "c_code": "size_t\nbase_len (char const *name)\n{\n size_t len;\n size_t prefix_len = ((void) (name), 0);\n for (len = strlen (name); 1 < len && ((name[len - 1]) == '/'); len--)\n continue;\n if (0 && len == 1\n && ((name[0]) == '/') && ((name[1]) == '/') && ! name[2])\n return 2;\n if (0 && prefix_len\n && len == prefix_len && ((name[prefix_len]) == '/'))\n return prefix_len + 1;\n return len;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 1}}, {"id": "transcoder-set#K_TH_DISTINCT_OR_NON_REPEATING_ELEMENT_IN_AN_ARRAY_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "K_TH_DISTINCT_OR_NON_REPEATING_ELEMENT_IN_AN_ARRAY.c", "function": "f_gold", "sloc": "14", "c_code": "int f_gold ( int arr [ ], int n, int k ) {\n int dist_count = 0;\n for ( int i = 0;\n i < n;\n i ++ ) {\n int j;\n for ( j = 0;\n j < n;\n j ++ ) if ( i != j && arr [ j ] == arr [ i ] ) break;\n if ( j == n ) dist_count ++;\n if ( dist_count == k ) return arr [ i ];\n }\n return - 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 1}}, {"id": "rcs-5.10.1#rcsmap_prep#checksid.c", "codebase": "rcs-5.10.1", "c_file": "rcsmap.c", "function": "checksid", "sloc": "5", "c_code": "void\nchecksid (char const *id)\n{\n checkid (id, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "patch-2.7.6#filenamecat-lgpl_prep#mfile_name_concat.c", "codebase": "patch-2.7.6", "c_file": "filenamecat-lgpl.c", "function": "mfile_name_concat", "sloc": "30", "c_code": "char *\nmfile_name_concat (char const *dir, char const *base, char **base_in_result)\n{\n char const *dirbase = last_component (dir);\n size_t dirbaselen = base_len (dirbase);\n size_t dirlen = dirbase - dir + dirbaselen;\n size_t baselen = strlen (base);\n char sep = '\\0';\n if (dirbaselen)\n {\n if (! ((dir[dirlen - 1]) == '/') && ! ((*base) == '/'))\n sep = '/';\n }\n else if (((*base) == '/'))\n {\n sep = '.';\n }\n char *p_concat = malloc (dirlen + (sep != '\\0') + baselen + 1);\n char *p;\n if (p_concat == ((void *)0))\n return ((void *)0);\n p = mempcpy (p_concat, dir, dirlen);\n *p = sep;\n p += sep != '\\0';\n if (base_in_result)\n *base_in_result = p;\n p = mempcpy (p, base, baselen);\n *p = '\\0';\n return p_concat;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 1, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#trunc_prep#ti_trunc.c", "codebase": "tulipindicators-0.9.1", "c_file": "trunc.c", "function": "ti_trunc", "sloc": "1", "c_code": "int ti_trunc(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] = ((int)(in1[i])); } return 0; }\n", "c_constructs": {"pointer_type": 3, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json-c#json_object_prep#json_object_set_string.c", "codebase": "json-c", "c_file": "json_object.c", "function": "json_object_set_string", "sloc": "4", "c_code": "int json_object_set_string(json_object *jso, const char *s)\n{\n return _json_object_set_string_len(jso, s, strlen(s));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#suffix_prep#set_compression_program_by_suffix.c", "codebase": "tar-1.34", "c_file": "suffix.c", "function": "set_compression_program_by_suffix", "sloc": "7", "c_code": "void\nset_compression_program_by_suffix (const char *name, const char *defprog)\n{\n const char *program = find_compression_program (name, defprog);\n if (program)\n use_compress_program_option = program;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_global_object_prep#json_extract_get_number_size.c", "codebase": "json.h", "c_file": "allow_global_object.c", "function": "json_extract_get_number_size", "sloc": "7", "c_code": "struct json_extract_result_s\njson_extract_get_number_size(const struct json_number_s *const number) {\n struct json_extract_result_s result;\n result.dom_size = sizeof(struct json_number_s);\n result.data_size = number->number_size;\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlBuildURI.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlBuildURI", "sloc": "12", "c_code": "PyObject *\nlibxml_xmlBuildURI(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlChar * c_retval;\n xmlChar * URI;\n xmlChar * base;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"zz:xmlBuildURI\", &URI, &base))\n return(((void *)0));\n c_retval = xmlBuildURI(URI, base);\n py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MAXIMUM_HEIGHT_PYRAMID_FROM_THE_GIVEN_ARRAY_OF_OBJECTS_prep#sort.c", "codebase": "transcoder-set", "c_file": "FIND_MAXIMUM_HEIGHT_PYRAMID_FROM_THE_GIVEN_ARRAY_OF_OBJECTS.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_dema_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_dema_start", "sloc": "4", "c_code": "int ti_dema_start(double const *options) {\n const int period = (int)options[0];\n return (period-1) * 2;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "diffutils-3.10#time_prep#rpl_time.c", "codebase": "diffutils-3.10", "c_file": "time.c", "function": "rpl_time", "sloc": "12", "c_code": "time_t\nrpl_time (time_t *tp)\n{\n struct timeval tv;\n time_t tt;\n if (gettimeofday (&tv, ((void *)0)) < 0)\n abort ();\n tt = tv.tv_sec;\n if (tp)\n *tp = tt;\n return tt;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS_1.c", "function": "f_gold", "sloc": "3", "c_code": "int f_gold ( int k ) {\n return k * k * k;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlCatalogGetSystem.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlCatalogGetSystem", "sloc": "11", "c_code": "PyObject *\nlibxml_xmlCatalogGetSystem(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n const xmlChar * c_retval;\n xmlChar * sysID;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"z:xmlCatalogGetSystem\", &sysID))\n return(((void *)0));\n c_retval = xmlCatalogGetSystem(sysID);\n py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNTS_PATHS_POINT_REACH_ORIGIN_1_prep#main.c", "codebase": "transcoder-set", "c_file": "COUNTS_PATHS_POINT_REACH_ORIGIN_1.c", "function": "main", "sloc": "15", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {55,74,76,6,2,36,40,14,42,62};\n int param1[] = {30,15,57,90,64,1,71,56,4,12};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libosip2-5.3.1#osip_cseq_prep#osip_cseq_clone.c", "codebase": "libosip2-5.3.1", "c_file": "osip_cseq.c", "function": "osip_cseq_clone", "sloc": "20", "c_code": "int osip_cseq_clone(const osip_cseq_t *cseq, osip_cseq_t **dest) {\n int i;\n osip_cseq_t *cs;\n *dest = ((void *)0);\n if (cseq == ((void *)0))\n return -2;\n if (cseq->method == ((void *)0))\n return -2;\n if (cseq->number == ((void *)0))\n return -2;\n i = osip_cseq_init(&cs);\n if (i != 0) {\n osip_cseq_free(cs);\n return i;\n }\n cs->method = osip_strdup(cseq->method);\n cs->number = osip_strdup(cseq->number);\n *dest = cs;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "tar-1.34#savedir_prep#savedir.c", "codebase": "tar-1.34", "c_file": "savedir.c", "function": "savedir", "sloc": "19", "c_code": "char *\nsavedir (char const *dir, enum savedir_option option)\n{\n DIR *dirp = opendir_safer (dir);\n if (! dirp)\n return ((void *)0);\n else\n {\n char *name_space = streamsavedir (dirp, option);\n if (closedir (dirp) != 0)\n {\n int closedir_errno = (*__errno_location ());\n free (name_space);\n (*__errno_location ()) = closedir_errno;\n return ((void *)0);\n }\n return name_space;\n }\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 1, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_SUM_SUBSEQUENCE_LEAST_K_DISTANT_ELEMENTS_prep#sort.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_SUM_SUBSEQUENCE_LEAST_K_DISTANT_ELEMENTS.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#QUICK_WAY_CHECK_CHARACTERS_STRING_prep#max.c", "codebase": "transcoder-set", "c_file": "QUICK_WAY_CHECK_CHARACTERS_STRING.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlmemory_prep#xmlMemDisplay.c", "codebase": "libxml2", "c_file": "xmlmemory.c", "function": "xmlMemDisplay", "sloc": "4", "c_code": "void\nxmlMemDisplay(FILE *fp __attribute__((unused)))\n{\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PRIMALITY_TEST_SET_1_INTRODUCTION_AND_SCHOOL_METHOD_prep#min.c", "codebase": "transcoder-set", "c_file": "PRIMALITY_TEST_SET_1_INTRODUCTION_AND_SCHOOL_METHOD.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int arr_size ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_XOR_VALUE_PAIR_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "MINIMUM_XOR_VALUE_PAIR_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S_prep#sort.c", "codebase": "transcoder-set", "c_file": "LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_HARMONIC_MEAN_USING_ARITHMETIC_MEAN_GEOMETRIC_MEAN_prep#sort.c", "codebase": "transcoder-set", "c_file": "FIND_HARMONIC_MEAN_USING_ARITHMETIC_MEAN_GEOMETRIC_MEAN.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "brotli-1.0.9#decode_prep#BrotliDecoderGetErrorCode.c", "codebase": "brotli-1.0.9", "c_file": "decode.c", "function": "BrotliDecoderGetErrorCode", "sloc": "3", "c_code": "BrotliDecoderErrorCode BrotliDecoderGetErrorCode(const BrotliDecoderStateInternal* s) {\n return (BrotliDecoderErrorCode)s->error_code;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json-c#json_object_prep#json_object_new_double_s.c", "codebase": "json-c", "c_file": "json_object.c", "function": "json_object_new_double_s", "sloc": "17", "c_code": "struct json_object *json_object_new_double_s(double d, const char *ds)\n{\n char *new_ds;\n struct json_object *jso = json_object_new_double(d);\n if (!jso)\n return ((void *)0);\n new_ds = strdup(ds);\n if (!new_ds)\n {\n json_object_generic_delete(jso);\n (*__errno_location ()) = 12;\n return ((void *)0);\n }\n json_object_set_serializer(jso, _json_object_userdata_to_json_string, new_ds,\n json_object_free_userdata);\n return jso;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#regex_prep#re_set_registers.c", "codebase": "gawk-5.2.2", "c_file": "regex.c", "function": "re_set_registers", "sloc": "18", "c_code": "void\nre_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs,\n __re_size_t num_regs, regoff_t *starts, regoff_t *ends)\n{\n if (num_regs)\n {\n bufp->regs_allocated = 1;\n regs->num_regs = num_regs;\n regs->start = starts;\n regs->end = ends;\n }\n else\n {\n bufp->regs_allocated = 0;\n regs->num_regs = 0;\n regs->start = regs->end = ((void *)0);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_from_prep#osip_from_get_displayname.c", "codebase": "libosip2-5.3.1", "c_file": "osip_from.c", "function": "osip_from_get_displayname", "sloc": "5", "c_code": "char *osip_from_get_displayname(osip_from_t *from) {\n if (from == ((void *)0))\n return ((void *)0);\n return from->displayname;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlReaderForMemory.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlReaderForMemory", "sloc": "15", "c_code": "PyObject *\nlibxml_xmlReaderForMemory(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlTextReaderPtr c_retval;\n char * buffer;\n int size;\n char * URL;\n char * encoding;\n int options;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"zizzi:xmlReaderForMemory\", &buffer, &size, &URL, &encoding, &options))\n return(((void *)0));\n c_retval = xmlReaderForMemory(buffer, size, URL, encoding, options);\n py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_EVEN_LENGTH_BINARY_SEQUENCES_WITH_SAME_SUM_OF_FIRST_AND_SECOND_HALF_BITS_1_prep#min.c", "codebase": "transcoder-set", "c_file": "COUNT_EVEN_LENGTH_BINARY_SEQUENCES_WITH_SAME_SUM_OF_FIRST_AND_SECOND_HALF_BITS_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#tmpdir_prep#path_search.c", "codebase": "findutils-4.9.0", "c_file": "tmpdir.c", "function": "path_search", "sloc": "51", "c_code": "int\npath_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,\n _Bool try_tmpdir)\n{\n const char *d;\n size_t dlen, plen;\n _Bool add_slash;\n if (!pfx || !pfx[0])\n {\n pfx = \"file\";\n plen = 4;\n }\n else\n {\n plen = strlen (pfx);\n if (plen > 5)\n plen = 5;\n }\n if (try_tmpdir)\n {\n d = secure_getenv (\"TMPDIR\");\n if (d != ((void *)0) && direxists (d))\n dir = d;\n else if (dir != ((void *)0) && direxists (dir))\n ;\n else\n dir = ((void *)0);\n }\n if (dir == ((void *)0))\n {\n if (direxists (\"/tmp\"))\n dir = \"/tmp\";\n else if (strcmp (\"/tmp\", \"/tmp\") != 0 && direxists (\"/tmp\"))\n dir = \"/tmp\";\n else\n {\n (*__errno_location ()) = (2);\n return -1;\n }\n }\n dlen = strlen (dir);\n add_slash = dlen != 0 && !((dir[dlen - 1]) == '/');\n if (tmpl_len < dlen + add_slash + plen + 6 + 1)\n {\n (*__errno_location ()) = (22);\n return -1;\n }\n memcpy (tmpl, dir, dlen);\n sprintf (tmpl + dlen, &\"/%.*sXXXXXX\"[!add_slash], (int) plen, pfx);\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 1, "if_statement": 9, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_HEIGHT_OF_TRIANGULAR_ARRANGEMENT_OF_ARRAY_VALUES_1_prep#min.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_HEIGHT_OF_TRIANGULAR_ARRANGEMENT_OF_ARRAY_VALUES_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#ttyin_prep#getchr.c", "codebase": "less-633", "c_file": "ttyin.c", "function": "getchr", "sloc": "23", "c_code": "int getchr(void)\n{\n char c;\n int result;\n do\n {\n flush();\n {\n unsigned char uc;\n result = iread(tty, &uc, sizeof(char));\n c = (char) uc;\n }\n if (result == (-2))\n return ((-2));\n if (result < 0)\n {\n quit(1);\n }\n if (c == '\\0')\n c = '\\340';\n } while (result != 1);\n return (c & 0xFF);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMIZE_THE_SUM_OF_DIGITS_OF_A_AND_B_SUCH_THAT_A_B_N_prep#max.c", "codebase": "transcoder-set", "c_file": "MINIMIZE_THE_SUM_OF_DIGITS_OF_A_AND_B_SUCH_THAT_A_B_N.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#HTMLtree_prep#htmlSaveFileFormat.c", "codebase": "libxml2", "c_file": "HTMLtree.c", "function": "htmlSaveFileFormat", "sloc": "21", "c_code": "int\nhtmlSaveFileFormat(const char *filename, xmlDocPtr cur,\n const char *encoding, int format) {\n xmlOutputBufferPtr buf;\n xmlCharEncodingHandlerPtr handler = ((void *)0);\n int ret;\n if ((cur == ((void *)0)) || (filename == ((void *)0)))\n return(-1);\n xmlInitParser();\n handler = htmlFindOutputEncoder(encoding);\n if (handler != ((void *)0))\n htmlSetMetaEncoding(cur, (const xmlChar *) handler->name);\n else\n htmlSetMetaEncoding(cur, (const xmlChar *) \"UTF-8\");\n buf = xmlOutputBufferCreateFilename(filename, handler, 0);\n if (buf == ((void *)0))\n return(0);\n htmlDocContentDumpFormatOutput(buf, cur, encoding, format);\n ret = xmlOutputBufferClose(buf);\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "heman#mat4_prep#kmMat4Scaling.c", "codebase": "heman", "c_file": "mat4.c", "function": "kmMat4Scaling", "sloc": "10", "c_code": "kmMat4* kmMat4Scaling(kmMat4* pOut, const float x, const float y,\n float z)\n{\n memset(pOut->mat, 0, sizeof(float) * 16);\n pOut->mat[0] = x;\n pOut->mat[5] = y;\n pOut->mat[10] = z;\n pOut->mat[15] = 1.0f;\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json-c#json_util_prep#json_parse_uint64.c", "codebase": "json-c", "c_file": "json_util.c", "function": "json_parse_uint64", "sloc": "19", "c_code": "int json_parse_uint64(const char *buf, uint64_t *retval)\n{\n char *end = ((void *)0);\n uint64_t val;\n (*__errno_location ()) = 0;\n while (*buf == ' ')\n buf++;\n if (*buf == '-')\n return 1;\n val = strtoull(buf, &end, 10);\n if (end != buf)\n *retval = val;\n if ((val == 0 && (*__errno_location ()) != 0) || (end == buf))\n {\n (*__errno_location ()) = 22;\n return 1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_list_int8.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_list_int8", "sloc": "5", "c_code": "signed char binn_list_int8(void *list, int pos) {\n signed char value;\n binn_list_get(list, pos, 0x21, &value, ((void *)0));\n return value;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#LARGEST_SUM_CONTIGUOUS_SUBARRAY_2_prep#max.c", "codebase": "transcoder-set", "c_file": "LARGEST_SUM_CONTIGUOUS_SUBARRAY_2.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#plain_io_prep#SimpleFileOpen.c", "codebase": "mtools-4.0.43", "c_file": "plain_io.c", "function": "SimpleFileOpen", "sloc": "7", "c_code": "Stream_t *SimpleFileOpen(struct device *dev, struct device *orig_dev,\n const char *name, int mode, char *errmsg,\n int mode2, int locked, mt_off_t *maxSize) {\n return SimpleFileOpenWithLm(dev, orig_dev, name, mode,\n errmsg, mode2, locked, mode, maxSize,\n ((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_LARGE_NUMBER_DIVISIBLE_4_NOT_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "CHECK_LARGE_NUMBER_DIVISIBLE_4_NOT.c", "function": "f_gold", "sloc": "8", "c_code": "_Bool f_gold ( char str [] ) {\n int n = strlen(str);\n if ( n == 0 ) return 0;\n if ( n == 1 ) return ( ( str [ 0 ] - '0' ) % 4 == 0 );\n int last = str [ n - 1 ] - '0';\n int second_last = str [ n - 2 ] - '0';\n return ( ( second_last * 10 + last ) % 4 == 0 );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_LSB.c", "codebase": "gprolog-1.5.0", "c_file": "arith_inl_c.c", "function": "Pl_Fct_LSB", "sloc": "5", "c_code": "WamWord\nPl_Fct_LSB(WamWord x)\n{\n if ((((PlLong) (x) & ((PlULong)0x7)) == (PlULong)0x4)) Pl_Err_Type(pl_type_integer, x); return Pl_Fct_Fast_LSB(x);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#jobid_prep#zsfile_to_jobid.c", "codebase": "uucp-1.07", "c_file": "jobid.c", "function": "zsfile_to_jobid", "sloc": "25", "c_code": "char *\nzsfile_to_jobid (qsys, zfile, bgrade)\n const struct uuconf_system *qsys;\n const char *zfile;\n int bgrade __attribute__ ((__unused__));\n{\n size_t clen;\n char *zret;\n clen = strlen (qsys->uuconf_zname);\n {\n size_t cseqlen;\n zfile = strrchr (zfile, '/');\n if (zfile == ((void *)0)\n || zfile[1] != 'C'\n || zfile[2] != '.'\n || zfile[3] == '\\0')\n ulog (LOG_FATAL, \"zsfile_to_jobid: Can't happen\");\n zfile += 2;\n cseqlen = strlen (zfile);\n zret = zbufalc (clen + cseqlen + 1);\n memcpy (zret, qsys->uuconf_zname, clen);\n memcpy (zret + clen, zfile, cseqlen + 1);\n }\n return zret;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 2, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_single_quoted_strings_prep#json_hexadecimal_value.c", "codebase": "json.h", "c_file": "allow_single_quoted_strings.c", "function": "json_hexadecimal_value", "sloc": "18", "c_code": "int json_hexadecimal_value(const char *c, const unsigned long size,\n unsigned long *result) {\n const char *p;\n int digit;\n if (size > sizeof(unsigned long) * 2) {\n return 0;\n }\n *result = 0;\n for (p = c; (unsigned long)(p - c) < size; ++p) {\n *result <<= 4;\n digit = json_hexadecimal_digit(*p);\n if (digit < 0 || digit > 15) {\n return 0;\n }\n *result |= (unsigned char)digit;\n }\n return 1;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "less-633#xbuf_prep#xbuf_init.c", "codebase": "less-633", "c_file": "xbuf.c", "function": "xbuf_init", "sloc": "5", "c_code": "void xbuf_init(struct xbuffer *xbuf)\n{\n xbuf->data = ((void *)0);\n xbuf->size = xbuf->end = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MAKING_ELEMENTS_OF_TWO_ARRAYS_SAME_WITH_MINIMUM_INCREMENTDECREMENT_prep#min.c", "codebase": "transcoder-set", "c_file": "MAKING_ELEMENTS_OF_TWO_ARRAYS_SAME_WITH_MINIMUM_INCREMENTDECREMENT.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "grep-3.11#thread_prep#gl_thread_create.c", "codebase": "grep-3.11", "c_file": "thread.c", "function": "gl_thread_create", "sloc": "10", "c_code": "gl_thread_t\ngl_thread_create (void *(*func) (void *arg), void *arg)\n{\n gl_thread_t thread;\n int ret;\n ret = (1 ? pthread_create (&thread, ((void *)0), func, arg) : 38);\n if (ret != 0)\n abort ();\n return thread;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_simplified_json_prep#json_parse_array.c", "codebase": "json.h", "c_file": "allow_simplified_json.c", "function": "json_parse_array", "sloc": "57", "c_code": "void json_parse_array(struct json_parse_state_s *state,\n struct json_array_s *array) {\n const char *const src = state->src;\n const size_t size = state->size;\n size_t elements = 0;\n int allow_comma = 0;\n struct json_array_element_s *previous = 0;\n state->offset++;\n (void)json_skip_all_skippables(state);\n elements = 0;\n do {\n struct json_array_element_s *element = 0;\n struct json_value_s *value = 0;\n (void)json_skip_all_skippables(state);\n if (']' == src[state->offset]) {\n state->offset++;\n break;\n }\n if (allow_comma) {\n if (',' == src[state->offset]) {\n state->offset++;\n allow_comma = 0;\n continue;\n }\n }\n element = (struct json_array_element_s *)state->dom;\n state->dom += sizeof(struct json_array_element_s);\n if (0 == previous) {\n array->start = element;\n } else {\n previous->next = element;\n }\n previous = element;\n if (json_parse_flags_allow_location_information & state->flags_bitset) {\n struct json_value_ex_s *value_ex = (struct json_value_ex_s *)state->dom;\n state->dom += sizeof(struct json_value_ex_s);\n value_ex->offset = state->offset;\n value_ex->line_no = state->line_no;\n value_ex->row_no = state->offset - state->line_offset;\n value = &(value_ex->value);\n } else {\n value = (struct json_value_s *)state->dom;\n state->dom += sizeof(struct json_value_s);\n }\n element->value = value;\n json_parse_value(state, 0, value);\n elements++;\n allow_comma = 1;\n } while (state->offset < size);\n if (previous) {\n previous->next = 0;\n }\n if (0 == elements) {\n array->start = 0;\n }\n array->length = elements;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 0, "struct_type": 6, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 8, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 2}}, {"id": "transcoder-set#COUNT_FREQUENCY_K_MATRIX_SIZE_N_MATRIXI_J_IJ_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "COUNT_FREQUENCY_K_MATRIX_SIZE_N_MATRIXI_J_IJ.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n, int k ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_SET_8_MATRIX_CHAIN_MULTIPLICATION_prep#main.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_SET_8_MATRIX_CHAIN_MULTIPLICATION.c", "function": "main", "sloc": "26", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {6,12,16,30,31,31,33,34,45,48,57,63,81,83};\nint param0_1[] = {30,-78,42,-6,42,56,-38,28,-96,-96,84,-18,0,20,-56,-40,-58,-74,64,62,-22,78,10,-22,16,-48,2,14,82,-92,-64,-18,42,24,22,-50,12,-76,38,-30,-86,-58,-6,-4,10,28};\nint param0_2[] = {0,0,0,0,0,0,1,1,1,1,1,1,1};\nint param0_3[] = {54,46};\nint param0_4[] = {-80,-76,-68,-66,-54,-12,-10,-6,6,8,20,20,22,60,66,78,78,82,98};\nint param0_5[] = {0,0,1,0,0,1,0,1,1,1,0,0,1,1,0,1,1,1,0,1,0};\nint param0_6[] = {14,21,29,31,37,50,51,54,57,62,64,72,85,98};\nint param0_7[] = {-86,98,90,-20,90,68,70,-24,-10,-80,70,-42,14,56,-26,-42,2,-62,24,10,-46,-66,-82,-98,-84,-2,-52,-50,0,-18,90,-32,98,86};\nint param0_8[] = {0,0,1,1,1,1};\nint param0_9[] = {52,15,61,73,45,5,15,54,69,90,5,56,13,54,27,72,58,21,35,2,59,55,64,92,54,63,50,95,38,53,38,53,73,27,86,86,99,42,85,80,43,32,80,57,78};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {10,30,7,1,13,20,7,23,5,26};\n int param2[] = {9,27,7,1,10,17,11,26,4,42};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "lodepng#lodepng_prep#lodepng_compute_color_stats.c", "codebase": "lodepng", "c_file": "lodepng.c", "function": "lodepng_compute_color_stats", "sloc": "151", "c_code": "unsigned lodepng_compute_color_stats(LodePNGColorStats* stats,\n const unsigned char* in, unsigned w, unsigned h,\n const LodePNGColorMode* mode_in) {\n size_t i;\n ColorTree tree;\n size_t numpixels = (size_t)w * (size_t)h;\n unsigned error = 0;\n unsigned colored_done = lodepng_is_greyscale_type(mode_in) ? 1 : 0;\n unsigned alpha_done = lodepng_can_have_alpha(mode_in) ? 0 : 1;\n unsigned numcolors_done = 0;\n unsigned bpp = lodepng_get_bpp(mode_in);\n unsigned bits_done = (stats->bits == 1 && bpp == 1) ? 1 : 0;\n unsigned sixteen = 0;\n unsigned maxnumcolors = 257;\n if(bpp <= 8) maxnumcolors = (((257) < (stats->numcolors + (1u << bpp))) ? (257) : (stats->numcolors + (1u << bpp)));\n stats->numpixels += numpixels;\n if(!stats->allow_palette) numcolors_done = 1;\n color_tree_init(&tree);\n if(stats->alpha) alpha_done = 1;\n if(stats->colored) colored_done = 1;\n if(stats->bits == 16) numcolors_done = 1;\n if(stats->bits >= bpp) bits_done = 1;\n if(stats->numcolors >= maxnumcolors) numcolors_done = 1;\n if(!numcolors_done) {\n for(i = 0; i < stats->numcolors; i++) {\n const unsigned char* color = &stats->palette[i * 4];\n error = color_tree_add(&tree, color[0], color[1], color[2], color[3], i);\n if(error) goto cleanup;\n }\n }\n if(mode_in->bitdepth == 16 && !sixteen) {\n unsigned short r = 0, g = 0, b = 0, a = 0;\n for(i = 0; i != numpixels; ++i) {\n getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in);\n if((r & 255) != ((r >> 8) & 255) || (g & 255) != ((g >> 8) & 255) ||\n (b & 255) != ((b >> 8) & 255) || (a & 255) != ((a >> 8) & 255)) {\n stats->bits = 16;\n sixteen = 1;\n bits_done = 1;\n numcolors_done = 1;\n break;\n }\n }\n }\n if(sixteen) {\n unsigned short r = 0, g = 0, b = 0, a = 0;\n for(i = 0; i != numpixels; ++i) {\n getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in);\n if(!colored_done && (r != g || r != b)) {\n stats->colored = 1;\n colored_done = 1;\n }\n if(!alpha_done) {\n unsigned matchkey = (r == stats->key_r && g == stats->key_g && b == stats->key_b);\n if(a != 65535 && (a != 0 || (stats->key && !matchkey))) {\n stats->alpha = 1;\n stats->key = 0;\n alpha_done = 1;\n } else if(a == 0 && !stats->alpha && !stats->key) {\n stats->key = 1;\n stats->key_r = r;\n stats->key_g = g;\n stats->key_b = b;\n } else if(a == 65535 && stats->key && matchkey) {\n stats->alpha = 1;\n stats->key = 0;\n alpha_done = 1;\n }\n }\n if(alpha_done && numcolors_done && colored_done && bits_done) break;\n }\n if(stats->key && !stats->alpha) {\n for(i = 0; i != numpixels; ++i) {\n getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in);\n if(a != 0 && r == stats->key_r && g == stats->key_g && b == stats->key_b) {\n stats->alpha = 1;\n stats->key = 0;\n alpha_done = 1;\n }\n }\n }\n } else {\n unsigned char r = 0, g = 0, b = 0, a = 0;\n for(i = 0; i != numpixels; ++i) {\n getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in);\n if(!bits_done && stats->bits < 8) {\n unsigned bits = getValueRequiredBits(r);\n if(bits > stats->bits) stats->bits = bits;\n }\n bits_done = (stats->bits >= bpp);\n if(!colored_done && (r != g || r != b)) {\n stats->colored = 1;\n colored_done = 1;\n if(stats->bits < 8) stats->bits = 8;\n }\n if(!alpha_done) {\n unsigned matchkey = (r == stats->key_r && g == stats->key_g && b == stats->key_b);\n if(a != 255 && (a != 0 || (stats->key && !matchkey))) {\n stats->alpha = 1;\n stats->key = 0;\n alpha_done = 1;\n if(stats->bits < 8) stats->bits = 8;\n } else if(a == 0 && !stats->alpha && !stats->key) {\n stats->key = 1;\n stats->key_r = r;\n stats->key_g = g;\n stats->key_b = b;\n } else if(a == 255 && stats->key && matchkey) {\n stats->alpha = 1;\n stats->key = 0;\n alpha_done = 1;\n if(stats->bits < 8) stats->bits = 8;\n }\n }\n if(!numcolors_done) {\n if(!color_tree_has(&tree, r, g, b, a)) {\n error = color_tree_add(&tree, r, g, b, a, stats->numcolors);\n if(error) goto cleanup;\n if(stats->numcolors < 256) {\n unsigned char* p = stats->palette;\n unsigned n = stats->numcolors;\n p[n * 4 + 0] = r;\n p[n * 4 + 1] = g;\n p[n * 4 + 2] = b;\n p[n * 4 + 3] = a;\n }\n ++stats->numcolors;\n numcolors_done = stats->numcolors >= maxnumcolors;\n }\n }\n if(alpha_done && numcolors_done && colored_done && bits_done) break;\n }\n if(stats->key && !stats->alpha) {\n for(i = 0; i != numpixels; ++i) {\n getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in);\n if(a != 0 && r == stats->key_r && g == stats->key_g && b == stats->key_b) {\n stats->alpha = 1;\n stats->key = 0;\n alpha_done = 1;\n if(stats->bits < 8) stats->bits = 8;\n }\n }\n }\n stats->key_r += (stats->key_r << 8);\n stats->key_g += (stats->key_g << 8);\n stats->key_b += (stats->key_b << 8);\n }\ncleanup:\n color_tree_cleanup(&tree);\n return error;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 38, "for_loop": 6, "while_loop": 0, "switch_statement": 0, "goto_statement": 2, "return_statement": 1, "break_continue_statement": 3}}, {"id": "transcoder-set#PROGRAM_TO_CHECK_IF_A_GIVEN_NUMBER_IS_LUCKY_ALL_DIGITS_ARE_DIFFERENT_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "PROGRAM_TO_CHECK_IF_A_GIVEN_NUMBER_IS_LUCKY_ALL_DIGITS_ARE_DIFFERENT.c", "function": "f_filled", "sloc": "1", "c_code": "_Bool f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "heman#generate_prep#heman_generate_simplex_fbm.c", "codebase": "heman", "c_file": "generate.c", "function": "heman_generate_simplex_fbm", "sloc": "29", "c_code": "heman_image* heman_generate_simplex_fbm(int width, int height, float frequency,\n float amplitude, int octaves, float lacunarity, float gain, int seed)\n{\n struct osn_context* ctx;\n open_simplex_noise(seed, &ctx);\n heman_image* img = heman_image_create(width, height, 1);\n float* data = img->data;\n float invh = 1.0f / height;\n float invw = 1.0f / width;\n float ampl = amplitude;\n float freq = frequency;\n memset(data, 0, sizeof(float) * width * height);\n while (octaves--) {\n int y;\n#pragma omp parallel for\n for (y = 0; y < height; ++y) {\n float v = y * invh;\n float* dst = data + y * width;\n for (int x = 0; x < width; ++x) {\n float u = x * invw;\n *dst++ += ampl* open_simplex_noise2(ctx, u * freq, v * freq);\n }\n }\n ampl *= gain;\n freq *= lacunarity;\n }\n open_simplex_noise_free(ctx);\n return img;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 2, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_LARGE_NUMBER_DIVISIBLE_6_NOT_prep#min.c", "codebase": "transcoder-set", "c_file": "CHECK_LARGE_NUMBER_DIVISIBLE_6_NOT.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json-c#test_charcase_prep#main.c", "codebase": "json-c", "c_file": "test_charcase.c", "function": "main", "sloc": "6", "c_code": "int main(int argc, char **argv)\n{\n if (0) mc_set_debug(1);\n test_case_parse();\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#test_prep#json_value_as_object.c", "codebase": "json.h", "c_file": "test.c", "function": "json_value_as_object", "sloc": "6", "c_code": "struct json_object_s *json_value_as_object(struct json_value_s *const value) {\n if (value->type != json_type_object) {\n return 0;\n }\n return (struct json_object_s *)value->payload;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#siv-cmac-aes128_prep#nettle_siv_cmac_aes128_decrypt_message.c", "codebase": "nettle-3.9.1", "c_file": "siv-cmac-aes128.c", "function": "nettle_siv_cmac_aes128_decrypt_message", "sloc": "11", "c_code": "int\nnettle_siv_cmac_aes128_decrypt_message(const struct siv_cmac_aes128_ctx *ctx,\n size_t nlength, const uint8_t *nonce,\n size_t alength, const uint8_t *adata,\n size_t mlength, uint8_t *dst, const uint8_t *src)\n{\n return nettle_siv_cmac_decrypt_message(&ctx->cmac_key, &ctx->cmac_cipher,\n &nettle_aes128, &ctx->ctr_cipher,\n nlength, nonce, alength, adata,\n mlength, dst, src);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlValidateNMToken.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlValidateNMToken", "sloc": "12", "c_code": "PyObject *\nlibxml_xmlValidateNMToken(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlChar * value;\n int space;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"zi:xmlValidateNMToken\", &value, &space))\n return(((void *)0));\n c_retval = xmlValidateNMToken(value, space);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#LONGEST_REPEATING_SUBSEQUENCE_prep#min.c", "codebase": "transcoder-set", "c_file": "LONGEST_REPEATING_SUBSEQUENCE.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "lodepng#lodepng_prep#lodepng_decode24.c", "codebase": "lodepng", "c_file": "lodepng.c", "function": "lodepng_decode24", "sloc": "3", "c_code": "unsigned lodepng_decode24(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize) {\n return lodepng_decode_memory(out, w, h, in, insize, LCT_RGB, 8);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#tmpfil_prep#zstemp_file.c", "codebase": "uucp-1.07", "c_file": "tmpfil.c", "function": "zstemp_file", "sloc": "32", "c_code": "char *\nzstemp_file (qsys)\n const struct uuconf_system *qsys __attribute__ ((__unused__));\n{\n static unsigned int icount;\n const char *const zdigs = \"0123456789abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-\";\n char ab[14];\n pid_t ime;\n int iset;\n ab[0] = 'T';\n ab[1] = 'M';\n ab[2] = '.';\n ime = getpid ();\n iset = 3;\n while (ime > 0 && iset < 10)\n {\n ab[iset] = zdigs[ime % (sizeof \"0123456789abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-\" - 1)];\n ime /= (sizeof \"0123456789abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-\" - 1);\n ++iset;\n }\n ab[iset] = '.';\n ++iset;\n ab[iset] = zdigs[icount / (sizeof \"0123456789abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-\" - 1)];\n ++iset;\n ab[iset] = zdigs[icount % (sizeof \"0123456789abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-\" - 1)];\n ++iset;\n ab[iset] = '\\0';\n ++icount;\n if (icount >= (sizeof \"0123456789abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-\" - 1) * (sizeof \"0123456789abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-\" - 1))\n icount = 0;\n return zsysdep_in_dir (\".Temp\", ab);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#HTMLtree_prep#htmlSaveFileEnc.c", "codebase": "libxml2", "c_file": "HTMLtree.c", "function": "htmlSaveFileEnc", "sloc": "4", "c_code": "int\nhtmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) {\n return(htmlSaveFileFormat(filename, cur, encoding, 1));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "make-4.4.1#main_prep#main.c", "codebase": "make-4.4.1", "c_file": "main.c", "function": "main", "sloc": "803", "c_code": "int\nmain (int argc, char **argv, char **envp)\n{\n int makefile_status = 0;\n struct goaldep *read_files;\n char current_directory[4096 +1];\n unsigned int restarts = 0;\n unsigned int syncing = 0;\n int argv_slots;\n initialize_variable_output ();\n ;\n if ((((check_io_state ())&(0x0008)) != 0))\n atexit (close_stdout);\n output_init (&make_sync);\n initialize_stopchar_map();\n ;\n setlocale (6, \"\");\n (void)bindtextdomain (\"make\", \"/usr/local/share/locale\");\n (void)textdomain (\"make\");\n sigemptyset (&fatal_signal_set);\n if (bsd_signal (1, fatal_error_signal) == ((__sighandler_t) 1)) bsd_signal (1, ((__sighandler_t) 1)); else sigaddset (&fatal_signal_set, 1);;\n if (bsd_signal (3, fatal_error_signal) == ((__sighandler_t) 1)) bsd_signal (3, ((__sighandler_t) 1)); else sigaddset (&fatal_signal_set, 3);;\n if (bsd_signal (13, fatal_error_signal) == ((__sighandler_t) 1)) bsd_signal (13, ((__sighandler_t) 1)); else sigaddset (&fatal_signal_set, 13);;\n if (bsd_signal (2, fatal_error_signal) == ((__sighandler_t) 1)) bsd_signal (2, ((__sighandler_t) 1)); else sigaddset (&fatal_signal_set, 2);;\n if (bsd_signal (15, fatal_error_signal) == ((__sighandler_t) 1)) bsd_signal (15, ((__sighandler_t) 1)); else sigaddset (&fatal_signal_set, 15);;\n if (bsd_signal (24, fatal_error_signal) == ((__sighandler_t) 1)) bsd_signal (24, ((__sighandler_t) 1)); else sigaddset (&fatal_signal_set, 24);;\n if (bsd_signal (25, fatal_error_signal) == ((__sighandler_t) 1)) bsd_signal (25, ((__sighandler_t) 1)); else sigaddset (&fatal_signal_set, 25);;\n (void) bsd_signal (17, ((__sighandler_t) 0));\n output_init (((void *)0));\n if (argv[0] == 0)\n argv[0] = (char *)\"\";\n if (argv[0][0] == '\\0')\n program = \"make\";\n else\n {\n program = strrchr (argv[0], '/');\n if (program == 0)\n program = argv[0];\n else\n ++program;\n }\n initialize_global_hash_tables ();\n get_tmpdir ();\n if (getcwd (current_directory, 4096) == 0)\n {\n perror_with_name (\"getcwd\", \"\");\n current_directory[0] = '\\0';\n directory_before_chdir = 0;\n }\n else\n directory_before_chdir = xstrdup (current_directory);\n define_variable_in_set((\".VARIABLES\"),(sizeof (\".VARIABLES\") - 1),(\"\"),(o_default),(0), current_variable_set_list->set,((floc *)0))->special = 1;\n define_variable_in_set((\".RECIPEPREFIX\"),(sizeof (\".RECIPEPREFIX\") - 1),(\"\"),(o_default),(0), current_variable_set_list->set,((floc *)0))->special = 1;\n define_variable_in_set((\".SHELLFLAGS\"),(sizeof (\".SHELLFLAGS\") - 1),(\"-c\"),(o_default),(0), current_variable_set_list->set,((floc *)0));\n define_variable_in_set((\".LOADED\"),(sizeof (\".LOADED\") - 1),(\"\"),(o_default),(0), current_variable_set_list->set,((floc *)0));\n {\n const char *features = \"target-specific order-only second-expansion\"\n \" else-if shortest-stem undefine oneshell nocomment\"\n \" grouped-target extra-prereqs notintermediate\"\n \" shell-export\"\n \" archives\"\n \" jobserver\"\n \" jobserver-fifo\"\n \" output-sync\"\n \" check-symlink\"\n \" load\"\n ;\n define_variable_in_set((\".FEATURES\"),(sizeof (\".FEATURES\") - 1),(features),(o_default),(0), current_variable_set_list->set,((floc *)0));\n }\n guile_gmake_setup (((floc *)0));\n {\n unsigned int i;\n for (i = 0; envp[i] != 0; ++i)\n {\n struct variable *v;\n const char *ep = envp[i];\n enum variable_export export = v_export;\n size_t len;\n while (! (((stopchar_map[(unsigned char)(*ep)])&((0x0020|0x0001))) != 0))\n ++ep;\n if (*ep == '\\0')\n continue;\n len = ep++ - envp[i];\n if (len == 13 && memcmp (envp[i], \"MAKE_RESTARTS\", (sizeof (\"MAKE_RESTARTS\")-1)) == 0)\n {\n if (*ep == '-')\n {\n do{ stdio_traced = 1; }while(0);\n ++ep;\n }\n restarts = make_toui (ep, ((void *)0));\n export = v_noexport;\n }\n v = define_variable_in_set((envp[i]),(len),(ep),(o_env),(1), current_variable_set_list->set,((floc *)0));\n if (((v->name) == (\"SHELL\") || (*(v->name) == *(\"SHELL\") && (*(v->name) == '\\0' || !strcmp ((v->name) + 1, (\"SHELL\") + 1)))))\n {\n export = v_noexport;\n shell_var.name = xstrdup (\"SHELL\");\n shell_var.length = 5;\n shell_var.value = xstrdup (ep);\n }\n v->export = export;\n }\n }\n if (lookup_variable ((\"GNUMAKEFLAGS\"), (sizeof (\"GNUMAKEFLAGS\")-1)))\n {\n decode_env_switches ((\"GNUMAKEFLAGS\"), (sizeof (\"GNUMAKEFLAGS\")-1), o_command);\n define_variable_in_set((\"GNUMAKEFLAGS\"),(sizeof (\"GNUMAKEFLAGS\") - 1),(\"\"),(o_env),(0), current_variable_set_list->set,((floc *)0));\n }\n decode_env_switches ((\"MAKEFLAGS\"), (sizeof (\"MAKEFLAGS\")-1), o_command);\n syncing = make_sync.syncout = (output_sync == 1\n || output_sync == 2);\n do{ output_context = (&make_sync)->syncout ? (&make_sync) : ((void *)0); }while(0);\n {\n int env_slots = arg_job_slots;\n arg_job_slots = (-1);\n decode_switches (argc, (const char **)argv, o_command);\n argv_slots = arg_job_slots;\n if (arg_job_slots == (-1))\n arg_job_slots = env_slots;\n }\n if (print_usage_flag)\n print_usage (0);\n if (print_version_flag)\n {\n print_version ();\n die (0);\n }\n setvbuf (stdout, 0, 1, 8192);\n if (shuffle_mode)\n {\n const char *effective_mode;\n shuffle_set_mode (shuffle_mode);\n free (shuffle_mode);\n effective_mode = shuffle_get_mode ();\n if (effective_mode)\n shuffle_mode = xstrdup (effective_mode);\n else\n shuffle_mode = ((void *)0);\n }\n if (isatty (fileno (stdout)))\n if (! lookup_variable ((\"MAKE_TERMOUT\"), (sizeof (\"MAKE_TERMOUT\")-1)))\n {\n const char *tty = ttyname (fileno (stdout));\n define_variable_in_set((\"MAKE_TERMOUT\"),(sizeof (\"MAKE_TERMOUT\") - 1),(tty ? tty : \"true\"),(o_default),(0), current_variable_set_list->set,((floc *)0))->export = v_export;\n }\n if (isatty (fileno (stderr)))\n if (! lookup_variable ((\"MAKE_TERMERR\"), (sizeof (\"MAKE_TERMERR\")-1)))\n {\n const char *tty = ttyname (fileno (stderr));\n define_variable_in_set((\"MAKE_TERMERR\"),(sizeof (\"MAKE_TERMERR\") - 1),(tty ? tty : \"true\"),(o_default),(0), current_variable_set_list->set,((floc *)0))->export = v_export;\n }\n syncing = (output_sync == 1\n || output_sync == 2);\n if (make_sync.syncout && ! syncing)\n output_close (&make_sync);\n make_sync.syncout = syncing;\n do{ output_context = (&make_sync)->syncout ? (&make_sync) : ((void *)0); }while(0);\n {\n struct variable *v = lookup_variable ((\"MAKELEVEL\"), (sizeof (\"MAKELEVEL\")-1));\n if (v && v->value[0] != '\\0' && v->value[0] != '-')\n makelevel = make_toui (v->value, ((void *)0));\n else\n makelevel = 0;\n }\n always_make_flag = always_make_set && (restarts == 0);\n if (no_builtin_variables_flag)\n no_builtin_rules_flag = 1;\n if ((((0x001))&db_level))\n {\n print_version ();\n fflush (stdout);\n }\n if (current_directory[0] != '\\0'\n && argv[0] != 0 && argv[0][0] != '/' && strchr (argv[0], '/') != 0\n )\n argv[0] = xstrdup (concat (3, current_directory, \"/\", argv[0]));\n starting_directory = current_directory;\n if (directories != 0)\n {\n unsigned int i;\n for (i = 0; directories->list[i] != 0; ++i)\n {\n const char *dir = directories->list[i];\n if (chdir (dir) < 0)\n pfatal_with_name (dir);\n }\n }\n if (directories)\n {\n if (getcwd (current_directory, 4096) == 0)\n {\n perror_with_name (\"getcwd\", \"\");\n starting_directory = 0;\n }\n else\n starting_directory = current_directory;\n }\n define_variable_in_set((\"CURDIR\"),(sizeof (\"CURDIR\") - 1),(current_directory),(o_file),(0), current_variable_set_list->set,((floc *)0));\n construct_include_path (include_dirs ? include_dirs->list : ((void *)0));\n if (jobserver_auth)\n {\n if (argv_slots == (-1))\n {\n if (jobserver_parse_auth (jobserver_auth))\n goto job_setup_complete;\n error((((floc *)0)), 0, (gettext (\"warning: jobserver unavailable: using -j1. Add '+' to parent make rule.\")));\n arg_job_slots = 1;\n }\n else if (!restarts)\n error((((floc *)0)), (53 * sizeof(uintmax_t) / 22 + 3), (gettext (\"warning: -j%d forced in submake: resetting jobserver mode.\")), (argv_slots));\n reset_jobserver ();\n }\n job_setup_complete:\n define_variable_in_set((\"MAKE_COMMAND\"),(sizeof (\"MAKE_COMMAND\") - 1),(argv[0]),(o_default),(0), current_variable_set_list->set,((floc *)0));\n define_variable_in_set((\"MAKE\"),(sizeof (\"MAKE\") - 1),(\"$(MAKE_COMMAND)\"),(o_default),(1), current_variable_set_list->set,((floc *)0));\n if (command_variables != 0)\n {\n struct command_variable *cv;\n struct variable *v;\n size_t len = 0;\n char *value, *p;\n for (cv = command_variables; cv != 0; cv = cv->next)\n {\n v = cv->variable;\n len += 2 * strlen (v->name);\n if (! v->recursive)\n ++len;\n ++len;\n len += 2 * strlen (v->value);\n ++len;\n }\n p = value = __builtin_alloca (len);\n for (cv = command_variables; cv != 0; cv = cv->next)\n {\n v = cv->variable;\n p = quote_for_env (p, v->name);\n if (! v->recursive)\n *p++ = ':';\n *p++ = '=';\n p = quote_for_env (p, v->value);\n *p++ = ' ';\n }\n p[-1] = '\\0';\n define_variable_in_set((\"-*-command-variables-*-\"),(sizeof (\"-*-command-variables-*-\") - 1),(value),(o_automatic),(0), current_variable_set_list->set,((floc *)0));\n define_variable_in_set((\"MAKEOVERRIDES\"),(sizeof (\"MAKEOVERRIDES\") - 1),(\"${-*-command-variables-*-}\"),(o_default),(1), current_variable_set_list->set,((floc *)0));\n }\n if (makefiles != 0)\n {\n unsigned int i;\n for (i = 0; i < makefiles->idx; ++i)\n if (makefiles->list[i][0] == '-' && makefiles->list[i][1] == '\\0')\n {\n FILE *outfile;\n char *newnm;\n if (stdin_offset >= 0)\n fatal((((floc *)0)), 0, (gettext (\"Makefile from standard input specified twice\")));\n outfile = get_tmpfile (&newnm);\n if (!outfile)\n fatal((((floc *)0)), 0, (gettext (\"cannot store makefile from stdin to a temporary file\")));\n while (!feof (stdin) && ! ferror (stdin))\n {\n char buf[2048];\n size_t n = fread (buf, 1, sizeof (buf), stdin);\n if (n > 0 && fwrite (buf, 1, n, outfile) != n)\n fatal((((floc *)0)), strlen (newnm) + strlen (strerror ((*__errno_location ()))), (gettext (\"fwrite: temporary file %s: %s\")), (newnm), (strerror ((*__errno_location ()))));\n }\n fclose (outfile);\n makefiles->list[i] = strcache_add (newnm);\n stdin_offset = i;\n free (newnm);\n }\n }\n if (stdin_offset >= 0)\n {\n struct file *f = enter_file (makefiles->list[stdin_offset]);\n f->updated = 1;\n f->update_status = us_success;\n f->command_state = cs_finished;\n f->intermediate = 0;\n f->dontcare = 0;\n f->last_mtime = f->mtime_before_update = f_mtime (f, 0);\n }\n {\n bsd_signal (17, child_handler);\n }\n {\n sigset_t block;\n sigemptyset (&block);\n sigaddset (&block, 17);\n if (sigprocmask (2, &block, ((void *)0)) < 0)\n pfatal_with_name (\"sigprocmask(SIG_SETMASK, SIGCHLD)\");\n }\n bsd_signal (10, debug_signal_handler);\n set_default_suffixes ();\n define_automatic_variables ();\n define_makeflags (0)->export = v_export;\n define_default_variables ();\n default_file = enter_file (strcache_add (\".DEFAULT\"));\n default_goal_var = define_variable_in_set((\".DEFAULT_GOAL\"),(sizeof (\".DEFAULT_GOAL\") - 1),(\"\"),(o_file),(0), current_variable_set_list->set,((floc *)0));\n if (eval_strings)\n {\n char *p, *endp, *value;\n unsigned int i;\n size_t len = ((sizeof (\"--eval=\")-1) + 1) * eval_strings->idx;\n for (i = 0; i < eval_strings->idx; ++i)\n {\n p = xstrdup (eval_strings->list[i]);\n len += 2 * strlen (p);\n eval_buffer (p, ((void *)0));\n free (p);\n }\n p = endp = value = __builtin_alloca (len);\n for (i = 0; i < eval_strings->idx; ++i)\n {\n p = stpcpy (p, \"--eval=\");\n p = quote_for_env (p, eval_strings->list[i]);\n endp = p++;\n *endp = ' ';\n }\n *endp = '\\0';\n define_variable_in_set((\"-*-eval-flags-*-\"),(sizeof (\"-*-eval-flags-*-\") - 1),(value),(o_automatic),(0), current_variable_set_list->set,((floc *)0));\n }\n {\n int old_builtin_rules_flag = no_builtin_rules_flag;\n int old_builtin_variables_flag = no_builtin_variables_flag;\n int old_arg_job_slots = arg_job_slots;\n read_files = read_all_makefiles (makefiles == 0 ? 0 : makefiles->list);\n arg_job_slots = (-1);\n decode_env_switches ((\"GNUMAKEFLAGS\"), (sizeof (\"GNUMAKEFLAGS\")-1), o_env);\n define_variable_in_set((\"GNUMAKEFLAGS\"),(sizeof (\"GNUMAKEFLAGS\") - 1),(\"\"),(o_override),(0), current_variable_set_list->set,((floc *)0));\n decode_env_switches ((\"MAKEFLAGS\"), (sizeof (\"MAKEFLAGS\")-1), o_env);\n if (arg_job_slots == (-1) || argv_slots != (-1))\n arg_job_slots = old_arg_job_slots;\n else if (jobserver_auth && arg_job_slots != old_arg_job_slots)\n {\n if (!restarts)\n error((((floc *)0)), (53 * sizeof(uintmax_t) / 22 + 3), (gettext (\"warning: -j%d forced in makefile: resetting jobserver mode.\")), (arg_job_slots));\n reset_jobserver ();\n }\n syncing = (output_sync == 1\n || output_sync == 2);\n if (make_sync.syncout && ! syncing)\n output_close (&make_sync);\n make_sync.syncout = syncing;\n do{ output_context = (&make_sync)->syncout ? (&make_sync) : ((void *)0); }while(0);\n if (no_builtin_variables_flag)\n no_builtin_rules_flag = 1;\n if (no_builtin_rules_flag && ! old_builtin_rules_flag)\n {\n if (suffix_file->builtin)\n {\n free_ns_chain ((struct nameseq *)(suffix_file->deps));\n suffix_file->deps = 0;\n }\n define_variable_in_set((\"SUFFIXES\"),(sizeof (\"SUFFIXES\") - 1),(\"\"),(o_default),(0), current_variable_set_list->set,((floc *)0));\n }\n if (no_builtin_variables_flag && ! old_builtin_variables_flag)\n undefine_default_variables ();\n }\n if (jobserver_auth)\n job_slots = 0;\n else if (arg_job_slots == (-1))\n job_slots = 1;\n else\n job_slots = arg_job_slots;\n if (job_slots > 1 && jobserver_setup (job_slots - 1, jobserver_style))\n {\n jobserver_auth = jobserver_get_auth ();\n if (jobserver_auth)\n {\n master_job_slots = job_slots;\n job_slots = 0;\n }\n }\n if (syncing && job_slots == 1)\n {\n do{ output_context = ((void *)0); }while(0);\n output_close (&make_sync);\n syncing = 0;\n output_sync = 0;\n }\n if (syncing)\n {\n if (!sync_mutex)\n {\n osync_setup ();\n sync_mutex = osync_get_mutex ();\n }\n else if (!osync_parse_mutex (sync_mutex))\n {\n osync_clear ();\n free (sync_mutex);\n sync_mutex = ((void *)0);\n syncing = 0;\n }\n }\n if (jobserver_auth)\n do{ if((((0x002)|(0x004))&db_level)) {printf (gettext (\"Using jobserver controller %s\\n\"), jobserver_auth); fflush (stdout);} }while(0);\n if (sync_mutex)\n do{ if((((0x002))&db_level)) {printf (gettext (\"Using output-sync mutex %s\\n\"), sync_mutex); fflush (stdout);} }while(0);\n define_makeflags (0);\n snap_deps ();\n install_default_suffix_rules ();\n convert_to_pattern ();\n install_default_implicit_rules ();\n snap_implicit_rules ();\n build_vpath_lists ();\n if (old_files != 0)\n {\n const char **p;\n for (p = old_files->list; *p != 0; ++p)\n {\n struct file *f = enter_file (*p);\n f->last_mtime = f->mtime_before_update = 2;\n f->updated = 1;\n f->update_status = us_success;\n f->command_state = cs_finished;\n }\n }\n if (!restarts && new_files != 0)\n {\n const char **p;\n for (p = new_files->list; *p != 0; ++p)\n {\n struct file *f = enter_file (*p);\n f->last_mtime = f->mtime_before_update = (~ (uintmax_t) 0 - (! ((uintmax_t) -1 <= 0) ? (uintmax_t) 0 : ~ (uintmax_t) 0 << (sizeof (uintmax_t) * 8 - 1)));\n }\n }\n remote_setup ();\n do{ output_context = ((void *)0); }while(0);\n output_close (&make_sync);\n if (shuffle_mode)\n do{ if((((0x001))&db_level)) {printf (gettext (\"Enabled shuffle mode: %s\\n\"), shuffle_mode); fflush (stdout);} }while(0);\n if (read_files)\n {\n uintmax_t *makefile_mtimes;\n struct goaldep *skipped_makefiles = ((void *)0);\n const char **nargv = (const char **) argv;\n int any_failed = 0;\n enum update_status status;\n do{ if((((0x001))&db_level)) {printf (gettext (\"Updating makefiles....\\n\")); fflush (stdout);} }while(0);\n {\n unsigned int num_mkfiles = 0;\n struct goaldep *d = read_files;\n read_files = ((void *)0);\n while (d != ((void *)0))\n {\n struct goaldep *t = d;\n d = d->next;\n t->next = read_files;\n read_files = t;\n ++num_mkfiles;\n }\n makefile_mtimes = __builtin_alloca (num_mkfiles * sizeof (uintmax_t));\n }\n {\n struct goaldep *d = read_files;\n struct goaldep *last = ((void *)0);\n unsigned int mm_idx = 0;\n while (d != 0)\n {\n int skip = 0;\n struct file *f = d->file;\n if (f->phony)\n skip = 1;\n else\n for (f = f->double_colon; f != ((void *)0); f = f->prev)\n if (f->deps == ((void *)0) && f->cmds != ((void *)0))\n {\n skip = 1;\n break;\n }\n if (!skip)\n {\n makefile_mtimes[mm_idx++] = (((d->file))->last_mtime == 0 ? f_mtime (((d->file)), 0) : ((d->file))->last_mtime);\n last = d;\n d = d->next;\n }\n else\n {\n do{ if((((0x002))&db_level)) {printf (gettext (\"Makefile '%s' might loop; not remaking it.\\n\"), f->name); fflush (stdout);} }while(0);\n if (last)\n last->next = d->next;\n else\n read_files = d->next;\n if (d->error && ! (d->flags & (1 << 2)))\n {\n d->next = skipped_makefiles;\n skipped_makefiles = d;\n any_failed = 1;\n }\n else\n free (d);\n d = last ? last->next : read_files;\n }\n }\n }\n define_makeflags (1);\n {\n int orig_db_level = db_level;\n if (! (((0x100))&db_level))\n db_level = (0x000);\n rebuilding_makefiles = 1;\n status = update_goal_chain (read_files);\n rebuilding_makefiles = 0;\n db_level = orig_db_level;\n }\n while (skipped_makefiles != ((void *)0))\n {\n struct goaldep *d = skipped_makefiles;\n const char *err = strerror (d->error);\n error((&d->floc), strlen (((d)->name ? (d)->name : (d)->file->name)) + strlen (err), (gettext (\"%s: %s\")), (((d)->name ? (d)->name : (d)->file->name)), (err));\n skipped_makefiles = skipped_makefiles->next;\n free (d);\n }\n if (any_failed && status == us_success)\n status = us_none;\n switch (status)\n {\n case us_question:\n break;\n case us_none:\n {\n struct goaldep *d;\n for (d = read_files; d; d = d->next)\n if (d->file->unloaded)\n {\n struct file *f = d->file;\n if (load_file (&d->floc, f, 0) == 0)\n fatal((&d->floc), strlen (f->name), (gettext (\"%s: failed to load\")), (f->name));\n f->unloaded = 0;\n f->loaded = 1;\n }\n }\n if (0)\n {\n struct goaldep *d;\n for (d = read_files; d != 0; d = d->next)\n if (d->error && ! (d->flags & (1 << 2)))\n {\n const char *err = strerror (d->error);\n error((&d->floc), strlen (((d)->name ? (d)->name : (d)->file->name)) + strlen (err), (gettext (\"%s: %s\")), (((d)->name ? (d)->name : (d)->file->name)), (err));\n any_failed = 1;\n }\n }\n break;\n case us_failed:\n {\n int any_remade = 0;\n unsigned int i;\n struct goaldep *d;\n for (i = 0, d = read_files; d != 0; ++i, d = d->next)\n {\n if (d->file->updated)\n {\n if (d->file->update_status == us_success)\n any_remade |= ((((d->file))->last_mtime == 0 ? f_mtime (((d->file)), 0) : ((d->file))->last_mtime)\n != makefile_mtimes[i]);\n else if (! (d->flags & (1 << 2)))\n {\n uintmax_t mtime;\n error((&d->floc), strlen (d->file->name), (gettext (\"Failed to remake makefile '%s'.\")), (d->file->name));\n mtime = (((d->file))->last_mtime == 0 ? f_mtime (((d->file)), 0) : ((d->file))->last_mtime);\n any_remade |= (mtime != 1\n && mtime != makefile_mtimes[i]);\n makefile_status = 2;\n any_failed = 1;\n }\n }\n else if (! (d->flags & (1 << 2)))\n {\n const char *dnm = ((d)->name ? (d)->name : (d)->file->name);\n if (d->flags & (1 << 1))\n error((&d->floc), strlen (dnm), (gettext (\"Included makefile '%s' was not found.\")), (dnm));\n else\n {\n error((((floc *)0)), strlen (dnm), (gettext (\"Makefile '%s' was not found\")), (dnm));\n any_failed = 1;\n }\n }\n }\n if (any_remade)\n goto re_exec;\n break;\n }\n case us_success:\n re_exec:\n remove_intermediates (0);\n if (print_data_base_flag)\n print_data_base ();\n clean_jobserver (0);\n if (makefiles != 0)\n {\n int mfidx = 0;\n char** av = argv;\n const char** nv;\n nv = nargv = __builtin_alloca (sizeof (char*) * (argc + 1 + 1));\n *(nv++) = *(av++);\n for (; *av; ++av, ++nv)\n {\n char *f;\n char *a = *av;\n const char *mf = makefiles->list[mfidx];\n ((void) (0));\n *nv = a;\n if (a[0] != '-')\n continue;\n if (a[1] == '-')\n {\n if (strcmp (a, \"--file\") == 0 || strcmp (a, \"--makefile\") == 0)\n ++av;\n else if (!(strncmp ((a), (\"--file=\"), (7)) == 0)\n && !(strncmp ((a), (\"--makefile=\"), (11)) == 0))\n continue;\n if (mfidx == stdin_offset)\n {\n char *na = __builtin_alloca ((sizeof (\"--temp-stdin=\")-1)\n + strlen (mf) + 1);\n sprintf (na, \"--temp-stdin=%s\", mf);\n *nv = na;\n }\n else\n {\n char *na = __builtin_alloca (strlen (mf) + 3);\n sprintf (na, \"-f%s\", mf);\n *nv = na;\n }\n ++mfidx;\n continue;\n }\n f = strchr (a, 'f');\n if (!f)\n continue;\n if (f[1] == '\\0')\n ++av;\n if (mfidx == stdin_offset)\n {\n const size_t al = f - a;\n char *na;\n if (al > 1)\n {\n na = __builtin_alloca (al + 1);\n memcpy (na, a, al);\n na[al] = '\\0';\n *(nv++) = na;\n }\n na = __builtin_alloca ((sizeof (\"--temp-stdin=\")-1) + strlen (mf) + 1);\n sprintf (na, \"--temp-stdin=%s\", mf);\n *nv = na;\n }\n else if (f[1] == '\\0')\n *(++nv) = mf;\n else\n {\n const size_t al = f - a + 1;\n const size_t ml = strlen (mf) + 1;\n char *na = __builtin_alloca (al + ml);\n memcpy (na, a, al);\n memcpy (na + al, mf, ml);\n *nv = na;\n }\n ++mfidx;\n }\n *nv = ((void *)0);\n }\n if (directories != 0 && directories->idx > 0)\n {\n int bad = 1;\n if (directory_before_chdir != 0)\n {\n if (chdir (directory_before_chdir) < 0)\n perror_with_name (\"chdir\", \"\");\n else\n bad = 0;\n }\n if (bad)\n fatal((((floc *)0)), 0, (gettext (\"Couldn't change back to original directory\")));\n }\n ++restarts;\n if ((((0x001))&db_level))\n {\n const char **p;\n printf (gettext (\"Re-executing[%u]:\"), restarts);\n for (p = nargv; *p != 0; ++p)\n printf (\" %s\", *p);\n putchar ('\\n');\n fflush (stdout);\n }\n {\n char **p;\n for (p = environ; *p != 0; ++p)\n {\n if ((strncmp ((*p), (\"MAKELEVEL\" \"=\"), (((sizeof (\"MAKELEVEL\")-1))+1)) == 0))\n {\n *p = __builtin_alloca (40);\n sprintf (*p, \"%s=%u\", \"MAKELEVEL\", makelevel);\n }\n else if ((strncmp ((*p), (\"MAKE_RESTARTS=\"), ((sizeof (\"MAKE_RESTARTS=\")-1))) == 0))\n {\n *p = __builtin_alloca (40);\n sprintf (*p, \"MAKE_RESTARTS=%s%u\",\n (!!stdio_traced) ? \"-\" : \"\", restarts);\n restarts = 0;\n }\n }\n }\n if (restarts)\n {\n char *b = __builtin_alloca (40);\n sprintf (b, \"MAKE_RESTARTS=%s%u\",\n (!!stdio_traced) ? \"-\" : \"\", restarts);\n putenv (b);\n }\n fflush (stdout);\n fflush (stderr);\n osync_clear();\n jobserver_pre_child(1);\n exec_command ((char **)nargv, environ);\n jobserver_post_child(1);\n temp_stdin_unlink ();\n _exit (127);\n }\n if (any_failed)\n die (2);\n }\n define_makeflags (0);\n always_make_flag = always_make_set;\n if (restarts && new_files != 0)\n {\n const char **p;\n for (p = new_files->list; *p != 0; ++p)\n {\n struct file *f = enter_file (*p);\n f->last_mtime = f->mtime_before_update = (~ (uintmax_t) 0 - (! ((uintmax_t) -1 <= 0) ? (uintmax_t) 0 : ~ (uintmax_t) 0 << (sizeof (uintmax_t) * 8 - 1)));\n }\n }\n temp_stdin_unlink ();\n if (goals == 0)\n {\n char *p;\n if (default_goal_var->recursive)\n p = variable_expand (default_goal_var->value);\n else\n {\n p = variable_buffer_output (variable_buffer, default_goal_var->value,\n strlen (default_goal_var->value));\n *p = '\\0';\n p = variable_buffer;\n }\n if (*p != '\\0')\n {\n struct file *f = lookup_file (p);\n if (f == 0)\n {\n struct nameseq *ns;\n ns = (struct nameseq *)parse_file_seq ((&p),sizeof (struct nameseq),0x0001,((void *)0),0x0000);\n if (ns)\n {\n if (ns->next != 0)\n fatal((((floc *)0)), 0, (gettext (\".DEFAULT_GOAL contains more than one target\")));\n f = enter_file (strcache_add (ns->name));\n ns->name = 0;\n free_ns_chain (ns);\n }\n }\n if (f)\n {\n goals = xcalloc (sizeof (struct goaldep));\n goals->file = f;\n }\n }\n }\n else\n lastgoal->next = 0;\n if (!goals)\n {\n struct variable *v = lookup_variable ((\"MAKEFILE_LIST\"), (sizeof (\"MAKEFILE_LIST\")-1));\n if (v && v->value && v->value[0] != '\\0')\n fatal((((floc *)0)), 0, (gettext (\"No targets\")));\n fatal((((floc *)0)), 0, (gettext (\"No targets specified and no makefile found\")));\n }\n do{ shuffle_deps_recursive ((struct dep *)goals); } while(0);\n do{ if((((0x001))&db_level)) {printf (gettext (\"Updating goal targets....\\n\")); fflush (stdout);} }while(0);\n {\n switch (update_goal_chain (goals))\n {\n case us_none:\n case us_success:\n break;\n case us_question:\n makefile_status = 1;\n break;\n case us_failed:\n makefile_status = 2;\n break;\n }\n if (clock_skew_detected)\n error((((floc *)0)), 0, (gettext (\"warning: Clock skew detected. Your build may be incomplete.\")));\n die (makefile_status);\n }\n exit (0);\n}\n", "c_constructs": {"pointer_type": 27, "array_type": 10, "struct_type": 23, "enum_type": 2, "union_type": 0, "function_pointer": 0, "type_casting": 31, "memory_management": 6, "memory_operation": 3, "if_statement": 127, "for_loop": 17, "while_loop": 18, "switch_statement": 2, "goto_statement": 2, "return_statement": 0, "break_continue_statement": 12}}, {"id": "transcoder-set#FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#mtools_prep#helpFlag.c", "codebase": "mtools-4.0.43", "c_file": "mtools.c", "function": "helpFlag", "sloc": "3", "c_code": "int helpFlag(int argc, char **argv) {\n return (argc > 1 && !strcmp(argv[1], \"--help\"));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "make-4.4.1#commands_prep#delete_child_targets.c", "codebase": "make-4.4.1", "c_file": "commands.c", "function": "delete_child_targets", "sloc": "11", "c_code": "void\ndelete_child_targets (struct child *child)\n{\n struct dep *d;\n if (child->deleted || child->pid < 0)\n return;\n delete_target (child->file, ((void *)0));\n for (d = child->file->also_make; d != 0; d = d->next)\n delete_target (d->file, child->file->name);\n child->deleted = 1;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_SUM_MODULO_K_FIRST_N_NATURAL_NUMBER_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "FIND_SUM_MODULO_K_FIRST_N_NATURAL_NUMBER_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "make-4.4.1#posixos_prep#jobserver_post_child.c", "codebase": "make-4.4.1", "c_file": "posixos.c", "function": "jobserver_post_child", "sloc": "9", "c_code": "void\njobserver_post_child (int recursive)\n{\n if (recursive && js_type == js_pipe)\n {\n fd_noinherit (job_fds[0]);\n fd_noinherit (job_fds[1]);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#stream_c_prep#Pl_Open_Output_Term_Stream_1.c", "codebase": "gprolog-1.5.0", "c_file": "stream_c.c", "function": "Pl_Open_Output_Term_Stream_1", "sloc": "7", "c_code": "void\nPl_Open_Output_Term_Stream_1(WamWord stm_word)\n{\n int stm;\n stm = Pl_Add_Str_Stream(((void *)0), (pl_sys_var[0]));\n Pl_Get_Integer(stm, stm_word);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "less-633#lesskey_prep#lesskey_parse_error.c", "codebase": "less-633", "c_file": "lesskey.c", "function": "lesskey_parse_error", "sloc": "4", "c_code": "void lesskey_parse_error(char *s)\n{\n fprintf(stderr, \"%s\\n\", s);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "make-4.4.1#hash_prep#hash_delete_items.c", "codebase": "make-4.4.1", "c_file": "hash.c", "function": "hash_delete_items", "sloc": "13", "c_code": "void\nhash_delete_items (struct hash_table *ht)\n{\n void **vec = ht->ht_vec;\n void **end = &vec[ht->ht_size];\n for (; vec < end; vec++)\n *vec = 0;\n ht->ht_fill = 0;\n ht->ht_collisions = 0;\n ht->ht_lookups = 0;\n ht->ht_rehashes = 0;\n ht->ht_empty_slots = ht->ht_size;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_PROFIT_BY_BUYING_AND_SELLING_A_SHARE_AT_MOST_K_TIMES_prep#len.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_PROFIT_BY_BUYING_AND_SELLING_A_SHARE_AT_MOST_K_TIMES.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_N_DIGITS_NON_DECREASING_INTEGERS_prep#min.c", "codebase": "transcoder-set", "c_file": "NUMBER_N_DIGITS_NON_DECREASING_INTEGERS.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsCat.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsCat", "sloc": "8", "c_code": "int\nxmlUCSIsCat(int code, const char *cat) {\n xmlIntFunc *func;\n func = xmlUnicodeLookup(&xmlUnicodeCatTbl, cat);\n if (func == ((void *)0))\n return (-1);\n return (func(code));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#encoding_prep#xmlOpenCharEncodingHandler.c", "codebase": "libxml2", "c_file": "encoding.c", "function": "xmlOpenCharEncodingHandler", "sloc": "5", "c_code": "int\nxmlOpenCharEncodingHandler(const char *name, int output,\n xmlCharEncodingHandler **out) {\n return(xmlCreateCharEncodingHandler(name, output, ((void *)0), ((void *)0), out));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#rcsrev_prep#take.c", "codebase": "rcs-5.10.1", "c_file": "rcsrev.c", "function": "take", "sloc": "14", "c_code": "struct cbuf\ntake (size_t count, char const *ref)\n{\n struct cbuf rv;\n char const *end = ref;\n if (!count)\n count = -2 + (1U | (1 + countnumflds (ref)));\n while (count--)\n while (*end && '.' != *end++)\n continue;\n accumulate_range (single, ref, *end ? end - 1 : end);\n rv.string = finish_string (single, &rv.size);\n return rv;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#DIFFERENCE_MAXIMUM_SUM_MINIMUM_SUM_N_M_ELEMENTSIN_REVIEW_prep#min.c", "codebase": "transcoder-set", "c_file": "DIFFERENCE_MAXIMUM_SUM_MINIMUM_SUM_N_M_ELEMENTSIN_REVIEW.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#tccpp_prep#free_defines.c", "codebase": "tinycc", "c_file": "tccpp.c", "function": "free_defines", "sloc": "19", "c_code": "void free_defines(Sym *b)\n{\n while (define_stack != b) {\n Sym *top = define_stack;\n define_stack = top->prev;\n tok_str_free_str(top->d);\n define_undef(top);\n sym_free(top);\n }\n while (b) {\n int v = b->v;\n if (v >= 256 && v < tok_ident) {\n Sym **d = &table_ident[v - 256]->sym_define;\n if (!*d)\n *d = b;\n }\n b = b->prev;\n }\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libcsv#libcsv_prep#csv_set_term_func.c", "codebase": "libcsv", "c_file": "libcsv.c", "function": "csv_set_term_func", "sloc": "5", "c_code": "void\ncsv_set_term_func(struct csv_parser *p, int (*f)(unsigned char))\n{\n if (p) p->is_term = f;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_SUM_BITONIC_SUBARRAY_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_SUM_BITONIC_SUBARRAY.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#key-bindings_prep#key_tables_RB_FIND.c", "codebase": "tmux", "c_file": "key-bindings.c", "function": "key_tables_RB_FIND", "sloc": "1", "c_code": "struct key_table * key_tables_RB_FIND(struct key_tables *head, struct key_table *elm) { struct key_table *tmp = (head)->rbh_root; int comp; while (tmp) { comp = key_table_cmp(elm, tmp); if (comp < 0) tmp = (tmp)->entry.rbe_left; else if (comp > 0) tmp = (tmp)->entry.rbe_right; else return (tmp); } return (((void *)0)); }\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#simi_prep#FreeMCVar.c", "codebase": "mcsim-6.2.0", "c_file": "simi.c", "function": "FreeMCVar", "sloc": "7", "c_code": "int FreeMCVar (PVOID pData, PVOID pUserInfo)\n{\n PMCVAR pMCVar = (PMCVAR) pData;\n FreeList(&pMCVar->plistDependents, ((void *)0), 1);\n free(pMCVar->pszName);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SWAP_BITS_IN_A_GIVEN_NUMBER_prep#max.c", "codebase": "transcoder-set", "c_file": "SWAP_BITS_IN_A_GIVEN_NUMBER.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "dap-3.10#daprun_prep#ask.c", "codebase": "dap-3.10", "c_file": "daprun.c", "function": "ask", "sloc": "13", "c_code": "int ask(char *question)\n{\n int c;\n do {\n fprintf(stderr, \"%s? [y/q] \", question);\n c = getchar();\n while (getchar() != '\\n')\n ;\n if (c != 'y' && c != 'q')\n fprintf(stderr, \"Invalid response. \");\n } while (c != 'y' && c != 'q');\n return (c == 'y');\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#g_var_inl_c_prep#Pl_Blt_G_Dec.c", "codebase": "gprolog-1.5.0", "c_file": "g_var_inl_c.c", "function": "Pl_Blt_G_Dec", "sloc": "7", "c_code": "void\nPl_Blt_G_Dec(WamWord x)\n{\n Pl_Set_C_Bip_Name(\"g_dec\", 1);\n G_Inc_Dec(x, -1, ((PlLong) (0) + ((PlULong)0)), ((PlLong) (0) + ((PlULong)0)));\n Pl_Unset_C_Bip_Name();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#types_prep#libxml_xmlXPathObjectPtrWrap.c", "codebase": "libxml2", "c_file": "types.c", "function": "libxml_xmlXPathObjectPtrWrap", "sloc": "69", "c_code": "PyObject *\nlibxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj)\n{\n PyObject *ret;\n if (obj == ((void *)0)) {\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return ((&_Py_NoneStruct));\n }\n switch (obj->type) {\n case XPATH_XSLT_TREE: {\n if ((obj->nodesetval == ((void *)0)) ||\n (obj->nodesetval->nodeNr == 0) ||\n (obj->nodesetval->nodeTab == ((void *)0))) {\n ret = PyList_New(0);\n } else {\n int i, len = 0;\n xmlNodePtr node;\n node = obj->nodesetval->nodeTab[0]->children;\n while (node != ((void *)0)) {\n len++;\n node = node->next;\n }\n ret = PyList_New(len);\n node = obj->nodesetval->nodeTab[0]->children;\n for (i = 0;i < len;i++) {\n PyList_SetItem(ret, i, libxml_xmlNodePtrWrap(node));\n node = node->next;\n }\n }\n return (ret);\n }\n case XPATH_NODESET:\n if ((obj->nodesetval == ((void *)0))\n || (obj->nodesetval->nodeNr == 0)) {\n ret = PyList_New(0);\n } else {\n int i;\n xmlNodePtr node;\n ret = PyList_New(obj->nodesetval->nodeNr);\n for (i = 0; i < obj->nodesetval->nodeNr; i++) {\n node = obj->nodesetval->nodeTab[i];\n if (node->type == XML_NAMESPACE_DECL) {\n PyObject *ns = PyCapsule_New((void *) node,\n (char *) \"xmlNsPtr\",\n libxml_xmlXPathDestructNsNode);\n PyList_SetItem(ret, i, ns);\n obj->nodesetval->nodeTab[i] = ((void *)0);\n } else {\n PyList_SetItem(ret, i, libxml_xmlNodePtrWrap(node));\n }\n }\n }\n break;\n case XPATH_BOOLEAN:\n ret = PyLong_FromLong((long) obj->boolval);\n break;\n case XPATH_NUMBER:\n ret = PyFloat_FromDouble(obj->floatval);\n break;\n case XPATH_STRING:\n ret = PyUnicode_FromString((char *) obj->stringval);\n break;\n default:\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n ret = (&_Py_NoneStruct);\n }\n xmlXPathFreeObject(obj);\n return (ret);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 10, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 2, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 4}}, {"id": "tar-1.34#create_prep#finish_header.c", "codebase": "tar-1.34", "c_file": "create.c", "function": "finish_header", "sloc": "16", "c_code": "void\nfinish_header (struct tar_stat_info *st,\n union block *header, off_t block_ordinal)\n{\n if (verbose_option\n && header->header.typeflag != 'K'\n && header->header.typeflag != 'L'\n && header->header.typeflag != 'x'\n && header->header.typeflag != 'g')\n {\n current_format = archive_format;\n print_header (st, header, block_ordinal);\n }\n header = write_extended (0, st, header);\n simple_finish_header (header);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 1, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsHighSurrogates.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsHighSurrogates", "sloc": "4", "c_code": "int\nxmlUCSIsHighSurrogates(int code) {\n return(((code >= 0xD800) && (code <= 0xDB7F)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_object_get_pair.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_object_get_pair", "sloc": "3", "c_code": "BOOL binn_object_get_pair(void *ptr, int pos, char *pkey, binn *value) {\n return binn_read_pair(0xE2, ptr, pos, ((void *)0), pkey, value);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ecdsa-keygen_prep#nettle_ecdsa_generate_keypair.c", "codebase": "nettle-3.9.1", "c_file": "ecdsa-keygen.c", "function": "nettle_ecdsa_generate_keypair", "sloc": "15", "c_code": "void\nnettle_ecdsa_generate_keypair (struct ecc_point *pub,\n struct ecc_scalar *key,\n void *random_ctx, nettle_random_func *random)\n{\n mp_limb_t *p;\n const struct ecc_curve *ecc = pub->ecc;\n mp_size_t itch = 3*ecc->p.size + ecc->mul_g_itch;\n ((void) sizeof ((key->ecc == ecc) ? 1 : 0), __extension__ ({ if (key->ecc == ecc) ; else __assert_fail (\"key->ecc == ecc\", \"ecdsa-keygen.c\", 54, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((ecc->h_to_a_itch <= ecc->mul_g_itch) ? 1 : 0), __extension__ ({ if (ecc->h_to_a_itch <= ecc->mul_g_itch) ; else __assert_fail (\"ecc->h_to_a_itch <= ecc->mul_g_itch\", \"ecdsa-keygen.c\", 55, __extension__ __PRETTY_FUNCTION__); }));\n (p = __builtin_alloca (sizeof (*p) * (itch)));\n _nettle_ecc_mod_random (&ecc->q, key->p, random_ctx, random, p);\n ecc->mul_g (ecc, p, key->p, p + 3*ecc->p.size);\n ecc->h_to_a (ecc, 0, pub->p, p, p + 3*ecc->p.size);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_ARRAY_prep#sort.c", "codebase": "transcoder-set", "c_file": "COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_ARRAY.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#daprun_prep#main.c", "codebase": "dap-3.10", "c_file": "daprun.c", "function": "main", "sloc": "81", "c_code": "int main(int argc, char **argv)\n{\n int keep;\n int debug;\n int runstat;\n fputs(\"\\nDap, Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.\\n\",\n stderr);\n fputs(\"Dap comes with ABSOLUTELY NO WARRANTY;\\n\", stderr);\n fputs(\"for details see the GNU Public License.\\n\", stderr);\n fputs(\"This is free software, and you are welcome to\\n\", stderr);\n fputs(\"redistribute it under certain conditions; see\\n\", stderr);\n fputs(\"the GNU Public License for details.\\n\\n\", stderr);\n if (argc < 2)\n {\n fputs(\"dap: no files to process\\n\", stderr);\n exit(1);\n }\n keep = 0;\n debug = 0;\n while (argv[1][0] == '-')\n {\n --argc;\n argv++;\n if (!strcmp(argv[0], \"-k\") || !strcmp(argv[0], \"--keep\"))\n keep = -1;\n else if (!strcmp(argv[0], \"-d\") || !strcmp(argv[0], \"--debug\"))\n debug = 1;\n else if (!strcmp(argv[0], \"--help\"))\n {\n fputs(\"Usage:\\ndap [-k] [-d] FILE1.c [ FILE2.c ... ] [-a ARG1 ...]\\n\", stderr);\n fputs(\"dap [--keep] [--debug] FILE1.c [ FILE2.c ... ] [--args] ARG1 ...]\\n\", stderr);\n fputs(\"dap [-k] [-d] FILE1.sbs [ FILE2.c ... ]\\n\", stderr);\n fputs(\"dap [--keep] [--debug] FILE1.sbs [ FILE2.c ... ]\\n\", stderr);\n fputs(\"\\nReport bugs to \\n\", stderr);\n exit(1);\n }\n else if (!strcmp(argv[0], \"--version\") || !strcmp(argv[0], \"-v\"))\n {\n fputs(\"Dap 3.6\\n\", stderr);\n exit(1);\n }\n else\n {\n fprintf(stderr, \"dap: bad option: %s\\n\", argv[0]);\n exit(1);\n }\n }\n if (!(pager = ecopy(getenv(\"DAPPAGER\"))))\n pager = \"/bin/more\";\n if (!(pageopts = ecopy(getenv(\"DAPPAGEOPTS\"))))\n pageopts = ((void *)0);\n if (!(compiler = ecopy(getenv(\"DAPCOMPILER\"))))\n compiler = \"/usr/bin/gcc\";\n if (!(compopts = ecopy(getenv(\"DAPCOMPOPTS\"))))\n compopts = ((void *)0);\n if (!(viewer = ecopy(getenv(\"DAPVIEWER\"))))\n viewer = \"/usr/bin/X11/gv\";\n if (!(viewopts = ecopy(getenv(\"DAPVIEWOPTS\"))))\n viewopts = ((void *)0);\n if (!(dappp = ecopy(getenv(\"DAPPP\"))))\n dappp = \"/usr/local/bin/dappp\";\n if (!(incdir = ecopy(getenv(\"INCDIR\"))))\n incdir = \"/usr/local/include\";\n if (!(libdir = ecopy(getenv(\"LIBDIR\"))))\n libdir = \"/usr/local/lib\";\n if (!dappprun(argc, argv))\n {\n if (!gccrun(argc, argv, debug))\n {\n runstat = run(argc, argv, keep);\n view(argv[1], \".err\");\n if (!runstat)\n {\n if (keep == -1)\n keep = 1;\n showps(argv[1]);\n }\n }\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 18, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#K_TH_DISTINCT_OR_NON_REPEATING_ELEMENT_IN_AN_ARRAY_prep#len.c", "codebase": "transcoder-set", "c_file": "K_TH_DISTINCT_OR_NON_REPEATING_ELEMENT_IN_AN_ARRAY.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_cseq_prep#osip_cseq_get_number.c", "codebase": "libosip2-5.3.1", "c_file": "osip_cseq.c", "function": "osip_cseq_get_number", "sloc": "3", "c_code": "char *osip_cseq_get_number(osip_cseq_t *cseq) {\n return cseq->number;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#session_prep#session_select.c", "codebase": "tmux", "c_file": "session.c", "function": "session_select", "sloc": "7", "c_code": "int\nsession_select(struct session *s, int idx)\n{\n struct winlink *wl;\n wl = winlink_find_by_index(&s->windows, idx);\n return (session_set_current(s, wl));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#tccpp_prep#begin_macro.c", "codebase": "tinycc", "c_file": "tccpp.c", "function": "begin_macro", "sloc": "9", "c_code": "void begin_macro(TokenString *str, int alloc)\n{\n str->alloc = alloc;\n str->prev = macro_stack;\n str->prev_ptr = macro_ptr;\n str->save_line_num = file->line_num;\n macro_ptr = str->str;\n macro_stack = str;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathValueFlipSign.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathValueFlipSign", "sloc": "7", "c_code": "void\nxmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt) {\n if ((ctxt == ((void *)0)) || (ctxt->context == ((void *)0))) return;\n if ((ctxt->value != ((void *)0)) && (ctxt->value->type != XPATH_NUMBER)) xmlXPathNumberFunction(ctxt, 1);;\n if ((ctxt->value == ((void *)0)) || (ctxt->value->type != XPATH_NUMBER)) { xmlXPathErr(ctxt, XPATH_INVALID_TYPE); return; };\n ctxt->value->floatval = -ctxt->value->floatval;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "less-633#output_prep#linenumtoa.c", "codebase": "less-633", "c_file": "output.c", "function": "linenumtoa", "sloc": "1", "c_code": "void linenumtoa(LINENUM num, char *buf, int radix) { int neg = (num < 0); char tbuf[((sizeof(num) * 8 - 1) * 302 / 1000 + 1 + 1)+2]; char *s = tbuf + sizeof(tbuf); if (neg) num = -num; *--s = '\\0'; do { *--s = \"0123456789ABCDEF\"[num % radix]; } while ((num /= radix) != 0); if (neg) *--s = '-'; strcpy(buf, s); }\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#window_prep#window_pane_cmp.c", "codebase": "tmux", "c_file": "window.c", "function": "window_pane_cmp", "sloc": "5", "c_code": "int\nwindow_pane_cmp(struct window_pane *wp1, struct window_pane *wp2)\n{\n return (wp1->id - wp2->id);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#tccgen_prep#type_size.c", "codebase": "tinycc", "c_file": "tccgen.c", "function": "type_size", "sloc": "43", "c_code": "int type_size(CType *type, int *a)\n{\n Sym *s;\n int bt;\n bt = type->t & 0x000f;\n if (bt == 7) {\n s = type->ref;\n *a = s->r;\n return s->c;\n } else if (bt == 5) {\n if (type->t & 0x0040) {\n int ts;\n s = type->ref;\n ts = type_size(&s->type, a);\n if (ts < 0 && s->c < 0)\n ts = -ts;\n return ts * s->c;\n } else {\n *a = 8;\n return 8;\n }\n } else if (((type->t & (((1 << (6+6)) - 1) << 20 | 0x0080)) == (2 << 20)) && type->ref->c == -1) {\n return -1;\n } else if (bt == 10) {\n *a = 16;\n return 16;\n } else if (bt == 9 || bt == 4) {\n *a = 8;\n return 8;\n } else if (bt == 3 || bt == 8) {\n *a = 4;\n return 4;\n } else if (bt == 2) {\n *a = 2;\n return 2;\n } else if (bt == 13 || bt == 14) {\n *a = 8;\n return 16;\n } else {\n *a = 1;\n return 1;\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 10, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 10, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#simi_prep#McvFromLex.c", "codebase": "mcsim-6.2.0", "c_file": "simi.c", "function": "McvFromLex", "sloc": "36", "c_code": "int McvFromLex (PSTR szLex)\n{\n int ikwcode = GetKeywordCode(szLex, ((void *)0));\n int iReturn;\n iReturn = (ikwcode == 210 ? 0\n : ikwcode == 211 ? 1\n : ikwcode == 212 ? 2\n : ikwcode == 213 ? 3\n : ikwcode == 229 ? 19\n : ikwcode == 214 ? 4\n : ikwcode == 215 ? 5\n : ikwcode == 216 ? 6\n : ikwcode == 217 ? 7\n : ikwcode == 218 ? 8\n : ikwcode == 219 ? 9\n : ikwcode == 220 ? 10\n : ikwcode == 221 ? 11\n : ikwcode == 222 ? 12\n : ikwcode == 223 ? 13\n : ikwcode == 230 ? 20\n : ikwcode == 224 ? 14\n : ikwcode == 235 ? 25\n : ikwcode == 225 ? 15\n : ikwcode == 226 ? 16\n : ikwcode == 236 ? 26\n : ikwcode == 227? 17\n : ikwcode == 228 ? 18\n : ikwcode == 231 ? 21\n : ikwcode == 232 ? 22\n : ikwcode == 233 ? 23\n : ikwcode == 234 ? 24\n : ikwcode == 237 ? 27\n : ikwcode == 238 ? 28\n : (-1));\n return iReturn;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_port_prep#osip_clrncpy.c", "codebase": "libosip2-5.3.1", "c_file": "osip_port.c", "function": "osip_clrncpy", "sloc": "30", "c_code": "char *osip_clrncpy(char *dst, const char *src, size_t len) {\n const char *pbeg;\n const char *pend;\n char *p;\n size_t spaceless_length;\n if (src == ((void *)0) || len == 0) {\n *dst = '\\0';\n return ((void *)0);\n }\n pbeg = src;\n pbeg += strspn(pbeg, \" \\r\\n\\t\");\n pend = src + len - 1;\n while ((' ' == *pend) || ('\\r' == *pend) || ('\\n' == *pend) || ('\\t' == *pend)) {\n pend--;\n if (pend < pbeg) {\n *dst = '\\0';\n return dst;\n }\n }\n spaceless_length = pend - pbeg + 1;\n memmove(dst, pbeg, spaceless_length);\n p = dst + spaceless_length;\n *p = '\\0';\n if (__builtin_expect(++spaceless_length < len, 0)) {\n do\n *++p = '\\0';\n while (++spaceless_length < len);\n }\n return dst;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsCJKCompatibility.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsCJKCompatibility", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsCJKCompatibility(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsCJKCompatibility\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsCJKCompatibility\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsCJKCompatibility(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsHangulJamo.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsHangulJamo", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsHangulJamo(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsHangulJamo\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsHangulJamo\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsHangulJamo(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "cflow-1.7#hash_prep#hash_get_max_bucket_length.c", "codebase": "cflow-1.7", "c_file": "hash.c", "function": "hash_get_max_bucket_length", "sloc": "19", "c_code": "size_t\nhash_get_max_bucket_length (const Hash_table *table)\n{\n struct hash_entry const *bucket;\n size_t max_bucket_length = 0;\n for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)\n {\n if (bucket->data)\n {\n struct hash_entry const *cursor = bucket;\n size_t bucket_length = 1;\n while (cursor = cursor->next, cursor)\n bucket_length++;\n if (bucket_length > max_bucket_length)\n max_bucket_length = bucket_length;\n }\n }\n return max_bucket_length;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Check_For_Un_Number.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Check_For_Un_Number", "sloc": "5", "c_code": "void\nPl_Check_For_Un_Number(WamWord start_word)\n{\n WamWord word, tag_mask; do { WamWord deref_last_word; word = start_word; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0); if (tag_mask != (PlULong)0 && tag_mask != (PlULong)0x7 && tag_mask != (PlULong)0x4) Pl_Err_Type(pl_type_number, word);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "binn-3.0#binn_prep#binn_map.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_map", "sloc": "3", "c_code": "binn * binn_map() {\n return binn_new(0xE1, 0, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#buffer_prep#first_decompress_program.c", "codebase": "tar-1.34", "c_file": "buffer.c", "function": "first_decompress_program", "sloc": "12", "c_code": "const char *\nfirst_decompress_program (int *pstate)\n{\n struct zip_program const *zp;\n if (use_compress_program_option)\n return use_compress_program_option;\n if (archive_compression_type == ct_none)\n return ((void *)0);\n *pstate = 0;\n zp = find_zip_program (archive_compression_type, pstate);\n return zp ? zp->program : ((void *)0);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tmux#options_prep#options_array_assign.c", "codebase": "tmux", "c_file": "options.c", "function": "options_array_assign", "sloc": "23", "c_code": "void\noptions_array_assign(struct options_entry *o, const char *s)\n{\n const char *separator;\n char *copy, *next, *string;\n u_int i;\n separator = o->tableentry->separator;\n if (separator == ((void *)0))\n separator = \" ,\";\n copy = string = xstrdup(s);\n while ((next = strsep(&string, separator)) != ((void *)0)) {\n if (*next == '\\0')\n continue;\n for (i = 0; i < 1000; i++) {\n if (i >= o->arraysize || o->array[i] == ((void *)0))\n break;\n }\n if (i == 1000)\n break;\n options_array_set(o, i, next, 0);\n }\n free(copy);\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 1, "memory_operation": 0, "if_statement": 4, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 3}}, {"id": "tulipindicators-0.9.1#linreg_prep#ti_linreg_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "linreg.c", "function": "ti_linreg_start", "sloc": "3", "c_code": "int ti_linreg_start(double const *options) {\n return (int)options[0]-1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderLookupNamespace.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderLookupNamespace", "sloc": "17", "c_code": "xmlChar *\nxmlTextReaderLookupNamespace(xmlTextReaderPtr reader, const xmlChar *prefix) {\n xmlNsPtr ns;\n int result;\n if (reader == ((void *)0))\n return(((void *)0));\n if (reader->node == ((void *)0))\n return(((void *)0));\n result = xmlSearchNsSafe(reader->node, prefix, &ns);\n if (result < 0) {\n xmlTextReaderErrMemory(reader);\n return(((void *)0));\n }\n if (ns == ((void *)0))\n return(((void *)0));\n return(readerStrdup(reader, ns->href));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "libxml2#chvalid_prep#xmlIsIdeographic.c", "codebase": "libxml2", "c_file": "chvalid.c", "function": "xmlIsIdeographic", "sloc": "4", "c_code": "int\nxmlIsIdeographic(unsigned int ch) {\n return((((ch) < 0x100) ? 0 : (((0x4e00 <= (ch)) && ((ch) <= 0x9fa5)) || ((ch) == 0x3007) || ((0x3021 <= (ch)) && ((ch) <= 0x3029)))));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "snudown#stack_prep#stack_free.c", "codebase": "snudown", "c_file": "stack.c", "function": "stack_free", "sloc": "10", "c_code": "void\nstack_free(struct stack *st)\n{\n if (!st)\n return;\n free(st->item);\n st->item = ((void *)0);\n st->size = 0;\n st->asize = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#findutils-version_prep#display_findutils_version.c", "codebase": "findutils-4.9.0", "c_file": "findutils-version.c", "function": "display_findutils_version", "sloc": "11", "c_code": "void\ndisplay_findutils_version (const char *official_name)\n{\n rpl_fflush (stderr);\n version_etc (stdout,\n official_name, \"GNU findutils\", version_string,\n gettext (\"Eric B. Decker\"),\n gettext (\"James Youngman\"),\n gettext (\"Kevin Dalley\"),\n (const char*) ((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#ps_prep#pict_page.c", "codebase": "dap-3.10", "c_file": "ps.c", "function": "pict_page", "sloc": "13", "c_code": "void pict_page()\n{\n if (pageno)\n {\n fputs(\"gr\\n\", pict_out);\n fputs(\"showpage\\n\", pict_out);\n }\n pageno++;\n fprintf(pict_out, \"%%%%Page: %d %d\\n\", pageno, pageno);\n fputs(\"gs\\n\", pict_out);\n if (orient == 'l')\n fprintf(pict_out, \"%d %d tr 90 rot %d %d tr\\n\", bboxy0 + bboxx1, bboxy0, -bboxx0, -bboxy0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_json5_prep#json_parse_string.c", "codebase": "json.h", "c_file": "allow_json5.c", "function": "json_parse_string", "sloc": "102", "c_code": "void json_parse_string(struct json_parse_state_s *state,\n struct json_string_s *string) {\n size_t offset = state->offset;\n size_t bytes_written = 0;\n const char *const src = state->src;\n const char quote_to_use = '\\'' == src[offset] ? '\\'' : '\"';\n char *data = state->data;\n unsigned long high_surrogate = 0;\n unsigned long codepoint;\n string->string = data;\n offset++;\n while (quote_to_use != src[offset]) {\n if ('\\\\' == src[offset]) {\n offset++;\n switch (src[offset++]) {\n default:\n return;\n case 'u': {\n codepoint = 0;\n if (!json_hexadecimal_value(&src[offset], 4, &codepoint)) {\n return;\n }\n offset += 4;\n if (codepoint <= 0x7fu) {\n data[bytes_written++] = (char)codepoint;\n } else if (codepoint <= 0x7ffu) {\n data[bytes_written++] =\n (char)(0xc0u | (codepoint >> 6));\n data[bytes_written++] =\n (char)(0x80u | (codepoint & 0x3fu));\n } else if (codepoint >= 0xd800 &&\n codepoint <= 0xdbff) {\n high_surrogate = codepoint;\n continue;\n } else if (codepoint >= 0xdc00 &&\n codepoint <= 0xdfff) {\n const unsigned long surrogate_offset =\n 0x10000u - (0xD800u << 10) - 0xDC00u;\n codepoint = (high_surrogate << 10) + codepoint + surrogate_offset;\n high_surrogate = 0;\n data[bytes_written++] =\n (char)(0xF0u | (codepoint >> 18));\n data[bytes_written++] =\n (char)(0x80u | ((codepoint >> 12) & 0x3fu));\n data[bytes_written++] =\n (char)(0x80u | ((codepoint >> 6) & 0x3fu));\n data[bytes_written++] =\n (char)(0x80u | (codepoint & 0x3fu));\n } else {\n data[bytes_written++] =\n (char)(0xe0u | (codepoint >> 12));\n data[bytes_written++] =\n (char)(0x80u | ((codepoint >> 6) & 0x3fu));\n data[bytes_written++] =\n (char)(0x80u | (codepoint & 0x3fu));\n }\n } break;\n case '\"':\n data[bytes_written++] = '\"';\n break;\n case '\\\\':\n data[bytes_written++] = '\\\\';\n break;\n case '/':\n data[bytes_written++] = '/';\n break;\n case 'b':\n data[bytes_written++] = '\\b';\n break;\n case 'f':\n data[bytes_written++] = '\\f';\n break;\n case 'n':\n data[bytes_written++] = '\\n';\n break;\n case 'r':\n data[bytes_written++] = '\\r';\n break;\n case 't':\n data[bytes_written++] = '\\t';\n break;\n case '\\r':\n data[bytes_written++] = '\\r';\n if ('\\n' == src[offset]) {\n data[bytes_written++] = '\\n';\n offset++;\n }\n break;\n case '\\n':\n data[bytes_written++] = '\\n';\n break;\n }\n } else {\n data[bytes_written++] = src[offset++];\n }\n }\n offset++;\n string->string_size = bytes_written;\n data[bytes_written++] = '\\0';\n state->data += bytes_written;\n state->offset = offset;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 10, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 12}}, {"id": "libosip2-5.3.1#osip_authentication_info_prep#osip_authentication_info_init.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authentication_info.c", "function": "osip_authentication_info_init", "sloc": "7", "c_code": "int osip_authentication_info_init(osip_authentication_info_t **dest) {\n *dest = (osip_authentication_info_t *) (osip_malloc_func ? osip_malloc_func(sizeof(osip_authentication_info_t)) : malloc(sizeof(osip_authentication_info_t)));\n if (*dest == ((void *)0))\n return -4;\n memset(*dest, 0, sizeof(osip_authentication_info_t));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlXPathErr.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlXPathErr", "sloc": "12", "c_code": "PyObject *\nlibxml_xmlXPathErr(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlXPathParserContextPtr ctxt;\n PyObject *pyobj_ctxt;\n int code;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Oi:xmlXPathErr\", &pyobj_ctxt, &code))\n return(((void *)0));\n ctxt = (xmlXPathParserContextPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlXPathParserContext_Object *)(pyobj_ctxt))->obj));\n xmlXPathErr(ctxt, code);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_GIVEN_CIRCLE_LIES_COMPLETELY_INSIDE_RING_FORMED_TWO_CONCENTRIC_CIRCLES_prep#sort.c", "codebase": "transcoder-set", "c_file": "CHECK_GIVEN_CIRCLE_LIES_COMPLETELY_INSIDE_RING_FORMED_TWO_CONCENTRIC_CIRCLES.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#misc_prep#blocking_write.c", "codebase": "tar-1.34", "c_file": "misc.c", "function": "blocking_write", "sloc": "16", "c_code": "size_t\nblocking_write (int fd, void const *buf, size_t count)\n{\n size_t bytes = full_write (fd, buf, count);\n if (bytes < count && (*__errno_location ()) == 11)\n {\n int flags = rpl_fcntl (fd, 3);\n if (0 <= flags && flags & 04000\n && rpl_fcntl (fd, 4, flags & ~04000) != -1)\n {\n char const *buffer = buf;\n bytes += full_write (fd, buffer + bytes, count - bytes);\n }\n }\n return bytes;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlstring_prep#xmlStrcat.c", "codebase": "libxml2", "c_file": "xmlstring.c", "function": "xmlStrcat", "sloc": "9", "c_code": "xmlChar *\nxmlStrcat(xmlChar *cur, const xmlChar *add) {\n const xmlChar *p = add;\n if (add == ((void *)0)) return(cur);\n if (cur == ((void *)0))\n return(xmlStrdup(add));\n while (*p != 0) p++;\n return(xmlStrncat(cur, add, p - add));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "sed-4.9#nanosleep_prep#rpl_nanosleep.c", "codebase": "sed-4.9", "c_file": "nanosleep.c", "function": "rpl_nanosleep", "sloc": "33", "c_code": "int\nrpl_nanosleep (const struct timespec *requested_delay,\n struct timespec *remaining_delay)\n{\n if (requested_delay->tv_nsec < 0 || BILLION <= requested_delay->tv_nsec)\n {\n (*__errno_location ()) = 22;\n return -1;\n }\n {\n _Static_assert (((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1))) / 24 / 24 / 60 / 60);\n const time_t limit = 24 * 24 * 60 * 60;\n time_t seconds = requested_delay->tv_sec;\n struct timespec intermediate;\n intermediate.tv_nsec = requested_delay->tv_nsec;\n while (limit < seconds)\n {\n int result;\n intermediate.tv_sec = limit;\n result = nanosleep (&intermediate, remaining_delay);\n seconds -= limit;\n if (result)\n {\n if (remaining_delay)\n remaining_delay->tv_sec += seconds;\n return result;\n }\n intermediate.tv_nsec = 0;\n }\n intermediate.tv_sec = seconds;\n return nanosleep (&intermediate, remaining_delay);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "heman#vec2_prep#kmVec2Div.c", "codebase": "heman", "c_file": "vec2.c", "function": "kmVec2Div", "sloc": "7", "c_code": "kmVec2* kmVec2Div( kmVec2* pOut,const kmVec2* pV1, const kmVec2* pV2 ) {\n if ( pV2->x && pV2->y ){\n pOut->x = pV1->x / pV2->x;\n pOut->y = pV1->y / pV2->y;\n }\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_PALINDROMIC_SUBSEQUENCE_GIVEN_STRING_prep#max.c", "codebase": "transcoder-set", "c_file": "COUNT_PALINDROMIC_SUBSEQUENCE_GIVEN_STRING.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#stream_supp_prep#Pl_Stream_Puts.c", "codebase": "gprolog-1.5.0", "c_file": "stream_supp.c", "function": "Pl_Stream_Puts", "sloc": "13", "c_code": "int\nPl_Stream_Puts(char *str, StmInf *pstm)\n{\n char *p;\n int c;\n for (p = str; *p; p++)\n {\n c = *p;\n Basic_Call_Fct_Putc(c, pstm);\n if (c != (-1)) pstm->char_count++; if (c == '\\n') { pstm->line_count++; pstm->line_pos = 0; } else pstm->line_pos++;\n }\n return p - str;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_FIBONACCI_NUMBERS_prep#min.c", "codebase": "transcoder-set", "c_file": "SUM_FIBONACCI_NUMBERS.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE_prep#max.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_SET_10_0_1_KNAPSACK_PROBLEM_prep#len.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_SET_10_0_1_KNAPSACK_PROBLEM.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_htmlCreateMemoryParserCtxt.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_htmlCreateMemoryParserCtxt", "sloc": "13", "c_code": "PyObject *\nlibxml_htmlCreateMemoryParserCtxt(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n htmlParserCtxtPtr c_retval;\n char * buffer;\n Py_ssize_t py_buffsize0;\n int size;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"s#i:htmlCreateMemoryParserCtxt\", &buffer, &py_buffsize0, &size))\n return(((void *)0));\n c_retval = htmlCreateMemoryParserCtxt(buffer, size);\n py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_HEIGHT_OF_TRIANGULAR_ARRANGEMENT_OF_ARRAY_VALUES_prep#len.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_HEIGHT_OF_TRIANGULAR_ARRANGEMENT_OF_ARRAY_VALUES.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#privileges_prep#destroy_privs.c", "codebase": "mtools-4.0.43", "c_file": "privileges.c", "function": "destroy_privs", "sloc": "10", "c_code": "void destroy_privs(void)\n{\n if(euid == 0) {\n setuid(0);\n setuid(ruid);\n seteuid(ruid);\n }\n drop_privs();\n print_privs(\"destroy_privs, no uid should be zero \");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#pred_prep#pred_size.c", "codebase": "findutils-4.9.0", "c_file": "pred.c", "function": "pred_size", "sloc": "24", "c_code": "_Bool\npred_size (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)\n{\n uintmax_t f_val;\n (void) pathname;\n f_val = ((stat_buf->st_size / pred_ptr->args.size.blocksize)\n + (stat_buf->st_size % pred_ptr->args.size.blocksize != 0));\n switch (pred_ptr->args.size.kind)\n {\n case COMP_GT:\n if (f_val > pred_ptr->args.size.size)\n return (1);\n break;\n case COMP_LT:\n if (f_val < pred_ptr->args.size.size)\n return (1);\n break;\n case COMP_EQ:\n if (f_val == pred_ptr->args.size.size)\n return (1);\n break;\n }\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 3}}, {"id": "less-633#os_prep#supports_ctrl_x.c", "codebase": "less-633", "c_file": "os.c", "function": "supports_ctrl_x", "sloc": "4", "c_code": "int supports_ctrl_x(void)\n{\n return (use_poll);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlParserSetPedantic.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlParserSetPedantic", "sloc": "14", "c_code": "PyObject *\nlibxml_xmlParserSetPedantic(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlParserCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n int pedantic;\n if (libxml_deprecationWarning(\"xmlParserSetPedantic\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Oi:xmlParserSetPedantic\", &pyobj_ctxt, &pedantic))\n return(((void *)0));\n ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj));\n ctxt->pedantic = pedantic;\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "json.h#allow_leading_or_trailing_decimal_point_prep#json_write_minified_get_object_size.c", "codebase": "json.h", "c_file": "allow_leading_or_trailing_decimal_point.c", "function": "json_write_minified_get_object_size", "sloc": "18", "c_code": "int json_write_minified_get_object_size(const struct json_object_s *object,\n size_t *size) {\n struct json_object_element_s *element;\n *size += 2;\n *size += object->length;\n if (1 < object->length) {\n *size += object->length - 1;\n }\n for (element = object->start; 0 != element; element = element->next) {\n if (json_write_get_string_size(element->name, size)) {\n return 1;\n }\n if (json_write_minified_get_value_size(element->value, size)) {\n return 1;\n }\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_PERIMETER_N_BLOCKS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "MINIMUM_PERIMETER_N_BLOCKS.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pnmout_prep#pnm_fput_values.c", "codebase": "optipng-0.7.8", "c_file": "pnmout.c", "function": "pnm_fput_values", "sloc": "102", "c_code": "int pnm_fput_values(const pnm_struct *pnm_ptr,\n const unsigned int *sample_values,\n unsigned int num_rows,\n FILE *stream)\n{\n unsigned int format = pnm_ptr->format;\n unsigned int depth = pnm_ptr->depth;\n unsigned int width = pnm_ptr->width;\n unsigned int maxval = pnm_ptr->maxval;\n size_t row_length = (size_t)depth * (size_t)width;\n size_t num_samples = num_rows * row_length;\n int ch, mask;\n size_t i, j;\n switch (format)\n {\n case PNM_P1:\n for (i = j = 0; i < num_samples; ++i)\n {\n if (putc(((sample_values[i] != 0) ? '0' : '1'), stream) == (-1))\n break;\n if (++j == row_length)\n {\n j = 0;\n if (putc('\\n', stream) == (-1))\n break;\n }\n }\n break;\n case PNM_P2:\n case PNM_P3:\n for (i = j = 0; i < num_samples; ++i)\n {\n if (++j == row_length)\n j = 0;\n if (fprintf(stream,\n (j == 0) ? \"%u\\n\" : \"%u \", sample_values[i]) <= 0)\n break;\n }\n break;\n case PNM_P4:\n for (i = j = 0; i < num_samples; )\n {\n ch = 0;\n for (mask = 0x80; mask != 0; mask >>= 1)\n {\n if (sample_values[i++] == 0)\n ch |= mask;\n if (++j == row_length)\n {\n j = 0;\n break;\n }\n }\n if (putc(ch, stream) == (-1))\n break;\n }\n break;\n case PNM_P5:\n case PNM_P6:\n case PNM_P7:\n if (maxval <= 0xffU)\n {\n for (i = 0; i < num_samples; ++i)\n {\n if (putc(sample_values[i] & 0xff, stream) == (-1))\n break;\n }\n }\n else if (maxval <= 0xffffU)\n {\n for (i = 0; i < num_samples; ++i)\n {\n if (putc((sample_values[i] >> 8) & 0xff, stream) == (-1) ||\n putc((sample_values[i]) & 0xff, stream) == (-1))\n break;\n }\n }\n else if (maxval <= 0xffffffffU)\n {\n for (i = 0; i < num_samples; ++i)\n {\n if (maxval > 0xffffffU)\n if (putc((sample_values[i] >> 24) & 0xff, stream) == (-1))\n break;\n if (putc((sample_values[i] >> 16) & 0xff, stream) == (-1) ||\n putc((sample_values[i] >> 8) & 0xff, stream) == (-1) ||\n putc((sample_values[i]) & 0xff, stream) == (-1))\n break;\n }\n }\n else\n {\n (*__errno_location ()) = 22;\n return 0;\n }\n break;\n default:\n (*__errno_location ()) = 22;\n return 0;\n }\n return (i == num_samples) ? 1 : -1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 16, "for_loop": 7, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 13}}, {"id": "nettle-3.9.1#write-le64_prep#_nettle_write_le64.c", "codebase": "nettle-3.9.1", "c_file": "write-le64.c", "function": "_nettle_write_le64", "sloc": "23", "c_code": "void\n_nettle_write_le64(size_t length, uint8_t *dst,\n const uint64_t *src)\n{\n size_t i;\n size_t words;\n unsigned leftover;\n words = length / 8;\n leftover = length % 8;\n for (i = 0; i < words; i++, dst += 8)\n do { (dst)[7] = ((src[i]) >> 56) & 0xff; (dst)[6] = ((src[i]) >> 48) & 0xff; (dst)[5] = ((src[i]) >> 40) & 0xff; (dst)[4] = ((src[i]) >> 32) & 0xff; (dst)[3] = ((src[i]) >> 24) & 0xff; (dst)[2] = ((src[i]) >> 16) & 0xff; (dst)[1] = ((src[i]) >> 8) & 0xff; (dst)[0] = (src[i]) & 0xff; } while (0);\n if (leftover)\n {\n uint64_t word;\n word = src[i];\n do\n {\n *dst++ = word & 0xff;\n word >>= 8;\n }\n while (--leftover);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_kvo_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_kvo_start", "sloc": "4", "c_code": "int ti_kvo_start(double const *options) {\n (void)options;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "enscript-1.6.6#prt_lpr_prep#printer_open.c", "codebase": "enscript-1.6.6", "c_file": "prt_lpr.c", "function": "printer_open", "sloc": "24", "c_code": "FILE *\nprinter_open(char *cmd, char *options, char *queue_param, char *printer_name,\n void **context_return)\n{\n Buffer pipe_cmd;\n FILE *fp;\n buffer_init(&pipe_cmd);\n buffer_append(&pipe_cmd, cmd);\n buffer_append(&pipe_cmd, \" \");\n if (options)\n {\n buffer_append(&pipe_cmd, options);\n buffer_append(&pipe_cmd, \" \");\n }\n if (printer_name)\n {\n buffer_append(&pipe_cmd, queue_param);\n buffer_append(&pipe_cmd, printer_name);\n }\n fp = popen(buffer_ptr(&pipe_cmd), \"w\");\n buffer_uninit(&pipe_cmd);\n *context_return = fp;\n return fp;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_OF_ALL_ELEMENTS_UP_TO_NTH_ROW_IN_A_PASCALS_TRIANGLE_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "SUM_OF_ALL_ELEMENTS_UP_TO_NTH_ROW_IN_A_PASCALS_TRIANGLE_1.c", "function": "f_gold", "sloc": "5", "c_code": "long long int f_gold ( int n ) {\n long long int sum = 0;\n sum = 1 << n;\n return ( sum - 1 );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THE_LARGEST_SUBARRAY_WITH_0_SUM_prep#min.c", "codebase": "transcoder-set", "c_file": "FIND_THE_LARGEST_SUBARRAY_WITH_0_SUM.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "dap-3.10#dap5_prep#logreg.c", "codebase": "dap-3.10", "c_file": "dap5.c", "function": "logreg", "sloc": "164", "c_code": "void logreg(\n char *fname,\n char *yspec,\n char *x0list,\n char *x1list,\n char *marks,\n char *xname,\n double level\n )\n{\n char *regname;\n int *varv;\n int *xvarv;\n int nx0, nx1;\n int nx;\n int nxx;\n int *markv;\n int *xmarkv;\n int nmark;\n double *xmem;\n double **x;\n double *ymem;\n double *y[2];\n int v;\n int nobs;\n int more;\n char *covset;\n int param1n, param2n, covn;\n int paramlen1, paramlen;\n char paramstr[14];\n char *partstr;\n int *partv;\n if (!fname)\n {\n fputs(\"(logreg) No dataset name given.\\n\", dap_err);\n exit(1);\n }\n varv = (int *) dap_malloc(sizeof(int) * dap_maxvar, \"dap_maxvar\");\n xvarv = (int *) dap_malloc(sizeof(int) * dap_maxvar, \"dap_maxvar\");\n markv = (int *) dap_malloc(sizeof(int) * dap_maxvar, \"dap_maxvar\");\n xmarkv = (int *) dap_malloc(sizeof(int) * dap_maxvar, \"dap_maxvar\");\n partv = (int *) dap_malloc(sizeof(int) * dap_maxvar, \"dap_maxvar\");\n regname = dap_malloc(strlen(fname) + 5, \"\");\n dap_suffix(regname, fname, \".lgr\");\n inset(fname);\n dap_vd(\"_intercept_ -1\", 0);\n nx0 = dap_list(\"_intercept_\", varv, dap_maxvar);\n nx0 += dap_list(x0list, varv + 1, dap_maxvar);\n nx1 = dap_list(x1list, varv + nx0, dap_maxvar);\n nx = nx0 + nx1;\n dap_parsey(yspec, varv + nx);\n xmem = (double *) dap_malloc(sizeof(double) * nx * dap_maxval, \"dap_maxval\");\n x = (double **) dap_malloc(sizeof(double *) * nx, \"\");\n for (v = 0; v < nx; v++)\n x[v] = xmem + v * dap_maxval;\n ymem = (double *) dap_malloc(sizeof(double) * 2 * dap_maxval, \"dap_maxval\");\n y[0] = ymem;\n y[1] = ymem + dap_maxval;\n nmark = dap_list(marks, markv, dap_maxvar);\n covset = dap_malloc(strlen(fname) + 5, \"\");\n strcpy(covset, fname);\n strcat(covset, \".cov\");\n for (v = 1, paramlen = strlen(\"_intercept_\"); v < nx; v++)\n {\n paramlen1 = strlen(dap_obs[dap_ono].do_nam[varv[v]]);\n if (paramlen1 > paramlen)\n paramlen = paramlen1;\n }\n dap_ono = 2;\n dap_clearobs((char *) ((void *)0));\n sprintf(paramstr, \"_param1_ %d\", paramlen);\n param1n = dap_vd(paramstr, 0);\n sprintf(paramstr, \"_param2_ %d\", paramlen);\n param2n = dap_vd(paramstr, 0);\n covn = dap_vd(\"_cov_ -1\", 0);\n partstr = dap_malloc(strlen(marks) + 1, \"\");\n for (v = 0; v < nmark; v++)\n {\n strcpy(partstr, dap_obs[0].do_nam[markv[v]]);\n sprintf(partstr + strlen(partstr), \" %d\", dap_obs[0].do_len[markv[v]]);\n partv[v] = dap_vd(partstr, 1);\n }\n outset(covset, \"\");\n dap_ono = 1;\n if (xname && xname[0])\n {\n inset(xname);\n nxx = dap_list(x0list, xvarv, dap_maxvar);\n nxx += dap_list(x1list, xvarv + nxx, dap_maxvar);\n if (nxx != nx - 1)\n {\n fprintf(dap_err,\n \"(logreg) %s and %s have different numbers (%d and %d) of x-variables.\\n\",\n fname, xname, nx - 1, nxx);\n exit(1);\n }\n if (nmark)\n {\n for (v = 0; v < nmark; v++)\n {\n if ((xmarkv[v] = dap_varnum(dap_obs[0].do_nam[markv[v]])) < 0)\n {\n fprintf(dap_err,\n \"(logreg) Mark variable %s in %s not in %s.\\n\",\n dap_obs[0].do_nam[markv[v]], fname, xname);\n exit(1);\n }\n }\n }\n if (!step())\n {\n fprintf(dap_err, \"(logreg) No data in %s.\\n\",\n (xname[0] ? xname : fname));\n exit(1);\n }\n }\n else\n {\n xvarv[0] = -1;\n xmarkv[0] = -1;\n }\n dap_ono = 0;\n outset(regname, \"\");\n for (nobs = 0, dap_mark(), more = 1; more; nobs++)\n {\n more = step();\n if (dap_newpart(markv, nmark))\n {\n dap_swap();\n dap_head(markv, nmark);\n dap_swap();\n logreg1(y, x, nx0, nx, nobs, varv, xvarv, markv, xmarkv, nmark, level,\n param1n, param2n, covn, partv);\n nobs = 0;\n }\n if (nobs < dap_maxval)\n {\n x[0][nobs] = 1.0;\n for (v = 1; v < nx; v++)\n x[v][nobs] = dap_obs[dap_ono].do_dbl[varv[v]];\n y[0][nobs] = dap_obs[dap_ono].do_dbl[varv[nx]];\n if (varv[nx + 1] >= 0)\n y[1][nobs] = dap_obs[dap_ono].do_dbl[varv[nx + 1]];\n else\n y[1][nobs] = -(double) varv[nx + 1];\n }\n else\n {\n fputs(\"(logreg) Too many data.\\n\", dap_err);\n exit(1);\n }\n }\n dap_free(regname, \"\");\n dap_free(varv, \"\");\n dap_free(xvarv, \"\");\n dap_free(markv, \"\");\n dap_free(xmarkv, \"\");\n dap_free(xmem, \"\");\n dap_free(x, \"\");\n dap_free(ymem, \"\");\n dap_free(covset, \"\");\n dap_free(partstr, \"\");\n dap_free(partv, \"\");\n}\n", "c_constructs": {"pointer_type": 12, "array_type": 10, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 10, "memory_management": 0, "memory_operation": 0, "if_statement": 10, "for_loop": 6, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#mpfr_prep#mpg_node.c", "codebase": "gawk-5.2.2", "c_file": "mpfr.c", "function": "mpg_node", "sloc": "10", "c_code": "NODE *\nmpg_node(unsigned int flags)\n{\n NODE *r = make_number_node(flags);\n if (flags == MPFN)\n mpfr_init(r->sub.val.nm.mpnum);\n else\n __gmpz_init(r->sub.val.nm.mpi);\n return r;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#HORNERS_METHOD_POLYNOMIAL_EVALUATION_prep#sort.c", "codebase": "transcoder-set", "c_file": "HORNERS_METHOD_POLYNOMIAL_EVALUATION.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_2_prep#max.c", "codebase": "transcoder-set", "c_file": "MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_2.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "units-2.22#units_prep#hassubscript.c", "codebase": "units-2.22", "c_file": "units.c", "function": "hassubscript", "sloc": "13", "c_code": "int\nhassubscript(const char *str)\n{\n const char *ptr = &(*((str)+strlen(str)-1));\n while (ptr>str){\n if (!strchr(digits, *ptr))\n return 0;\n ptr--;\n if (*ptr=='_')\n return 1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_sin.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_sin", "sloc": "1", "c_code": "int ti_sin(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] = (sin(in1[i])); } return 0; }\n", "c_constructs": {"pointer_type": 3, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#src_rdr_c_prep#Pl_SR_Check_Descriptor_1.c", "codebase": "gprolog-1.5.0", "c_file": "src_rdr_c.c", "function": "Pl_SR_Check_Descriptor_1", "sloc": "5", "c_code": "void\nPl_SR_Check_Descriptor_1(WamWord desc_word)\n{\n Get_Descriptor(desc_word, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#mh_prep#PrintTemperatureDiagnostics.c", "codebase": "mcsim-6.2.0", "c_file": "mh.c", "function": "PrintTemperatureDiagnostics", "sloc": "26", "c_code": "void PrintTemperatureDiagnostics (PFILE fOut, PGIBBSDATA pgd)\n{\n register int i;\n fprintf (fOut, \"\\nPerks:\");\n for (i = pgd->startT; i <= pgd->endT; i++) {\n fprintf (fOut, \"\\t%g\", pgd->rgdPerks[i]);\n }\n fprintf (fOut, \"\\nCounts:\");\n for (i = pgd->startT; i <= pgd->endT; i++) {\n fprintf (fOut, \"\\t%ld\", pgd->rglCount[i]);\n }\n fprintf (fOut, \"\\nLnPi(i):\");\n for (i = pgd->startT; i <= pgd->endT; i++) {\n fprintf (fOut, \"\\t%g\", pgd->rgdlnPi[i]);\n }\n fprintf (fOut, \"\\nTried Jumps:\\t\");\n for (i = pgd->startT; i <= pgd->endT - 1; i++) {\n fprintf (fOut, \"\\t%ld\", pgd->rglTransAttempts[i]);\n }\n fprintf (fOut, \"\\nAccepted Jumps:\\t\");\n for (i = pgd->startT; i <= pgd->endT - 1; i++) {\n fprintf (fOut, \"\\t%ld\", pgd->rglTransAccepts[i]);\n }\n fprintf(fOut, \"\\n\\n\");\n fflush(fOut);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 5, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_simplified_json_prep#json_extract_get_number_size.c", "codebase": "json.h", "c_file": "allow_simplified_json.c", "function": "json_extract_get_number_size", "sloc": "7", "c_code": "struct json_extract_result_s\njson_extract_get_number_size(const struct json_number_s *const number) {\n struct json_extract_result_s result;\n result.dom_size = sizeof(struct json_number_s);\n result.data_size = number->number_size;\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_is_valid.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_is_valid", "sloc": "6", "c_code": "BOOL binn_is_valid(void *ptr, int *ptype, int *pcount, int *psize) {\n if (ptype) *ptype = 0;\n if (pcount) *pcount = 0;\n if (psize) *psize = 0;\n return binn_is_valid_ex(ptr, ptype, pcount, psize);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#oper_supp_prep#Pl_Full_Var_Power_2.c", "codebase": "gprolog-1.5.0", "c_file": "oper_supp.c", "function": "Pl_Full_Var_Power_2", "sloc": "39", "c_code": "void\nPl_Full_Var_Power_2(Range *y, Range *x)\n{\n unsigned x2;\n int i, vec_elem;\n x2 = x->min * x->min;\n do { y->vec = (Vector) (((WamWordP *) pl_reg_bank)[256 +3]); (((WamWordP *) pl_reg_bank)[256 +3]) += pl_vec_size; } while (0);\n if (x2 > (unsigned) pl_vec_max_integer)\n {\n y->extra_cstr = 1;\n (y)->max = (int)(1 << (sizeof(int) * 8 - 1));\n return;\n }\n Pl_Vector_Empty(y->vec);\n y->extra_cstr = 0;\n y->min = x2;\n if (((x)->vec == ((void *)0)))\n {\n for (i = x->min; i <= x->max; i++)\n {\n x2 = i * i;\n if (x2 > (unsigned) pl_vec_max_integer)\n goto end_loop;\n (y->vec[((VecWord) (x2) >> 6)] |= ((VecWord) 1 << ((x2) & (((VecWord) 1 << 6)-1))));\n }\n }\n else\n {\n y->extra_cstr = x->extra_cstr;\n { Vector enum_end = x->vec + pl_vec_size, enum_i = x->vec; int enum_j; VecWord enum_word; vec_elem = 0; do { enum_word = *enum_i; for (enum_j = 0; enum_j++ < (8 * 8); enum_word >>= 1, vec_elem++) { if (enum_word & 1) {;\n x2 = vec_elem * vec_elem;\n if (x2 > (unsigned) pl_vec_max_integer)\n goto end_loop;\n (y->vec[((VecWord) (x2) >> 6)] |= ((VecWord) 1 << ((x2) & (((VecWord) 1 << 6)-1))));\n } } } while (++enum_i < enum_end); };\n }\nend_loop:\n y->max = x2;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 2, "while_loop": 2, "switch_statement": 0, "goto_statement": 2, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathNsLookup.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathNsLookup", "sloc": "18", "c_code": "const xmlChar *\nxmlXPathNsLookup(xmlXPathContextPtr ctxt, const xmlChar *prefix) {\n if (ctxt == ((void *)0))\n return(((void *)0));\n if (prefix == ((void *)0))\n return(((void *)0));\n if (xmlStrEqual(prefix, (const xmlChar *) \"xml\"))\n return((const xmlChar *) \"http://www.w3.org/XML/1998/namespace\");\n if (ctxt->namespaces != ((void *)0)) {\n int i;\n for (i = 0;i < ctxt->nsNr;i++) {\n if ((ctxt->namespaces[i] != ((void *)0)) &&\n (xmlStrEqual(ctxt->namespaces[i]->prefix, prefix)))\n return(ctxt->namespaces[i]->href);\n }\n }\n return((const xmlChar *) xmlHashLookup(ctxt->nsHash, prefix));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "wget-1.21.4#ftp-basic_prep#ftp_cwd.c", "codebase": "wget-1.21.4", "c_file": "ftp-basic.c", "function": "ftp_cwd", "sloc": "30", "c_code": "uerr_t\nftp_cwd (int csock, const char *dir)\n{\n char *request, *respline;\n int nwritten;\n uerr_t err;\n request = ftp_request (\"CWD\", dir);\n nwritten = fd_write (csock, request, strlen (request), -1);\n if (nwritten < 0)\n {\n do { free ((void *) (request)); request = ((void *)0); } while (0);\n return WRITEFAILED;\n }\n do { free ((void *) (request)); request = ((void *)0); } while (0);\n err = ftp_response (csock, &respline);\n if (err != FTPOK)\n return err;\n if (*respline == '5')\n {\n do { free ((void *) (respline)); respline = ((void *)0); } while (0);\n return FTPNSFOD;\n }\n if (*respline != '2')\n {\n do { free ((void *) (respline)); respline = ((void *)0); } while (0);\n return FTPRERR;\n }\n do { free ((void *) (respline)); respline = ((void *)0); } while (0);\n return FTPOK;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 5, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 5, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_LENGTH_SUBSEQUENCE_DIFFERENCE_ADJACENT_ELEMENTS_EITHER_0_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_LENGTH_SUBSEQUENCE_DIFFERENCE_ADJACENT_ELEMENTS_EITHER_0_1.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#ict_fsm_prep#osip_ict_timeout_b_event.c", "codebase": "libosip2-5.3.1", "c_file": "ict_fsm.c", "function": "osip_ict_timeout_b_event", "sloc": "11", "c_code": "void osip_ict_timeout_b_event(osip_transaction_t *ict, osip_event_t *evt) {\n ict->ict_context->timer_b_length = -1;\n ict->ict_context->timer_b_start.tv_sec = -1;\n if (ict->out_socket == -999) {\n ict_handle_transport_error(ict, -1);\n } else {\n __osip_message_callback(OSIP_ICT_STATUS_TIMEOUT, ict, evt->sip);\n __osip_transaction_set_state(ict, ICT_TERMINATED);\n __osip_kill_transaction_callback(OSIP_ICT_KILL_TRANSACTION, ict);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#text_prep#copy_completion.c", "codebase": "nano-7.2", "c_file": "text.c", "function": "copy_completion", "sloc": "12", "c_code": "char *copy_completion(char *text)\n{\n char *word;\n size_t length = 0, index = 0;\n while (is_word_char(&text[length], 0))\n length = step_right(text, length);\n word = nmalloc(length + 1);\n while (index < length)\n word[index++] = *(text++);\n word[index] = '\\0';\n return word;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#gifread_prep#GIFGetColorTable.c", "codebase": "optipng-0.7.8", "c_file": "gifread.c", "function": "GIFGetColorTable", "sloc": "23", "c_code": "void GIFGetColorTable(unsigned char **colors, unsigned int *numColors,\n struct GIFImage *image)\n{\n struct GIFScreen *screen;\n if (image->LocalColorFlag)\n {\n ((void)0);\n *colors = image->LocalColorTable;\n *numColors = image->LocalNumColors;\n return;\n }\n screen = image->Screen;\n if (screen->GlobalColorFlag)\n {\n ((void)0);\n *colors = screen->GlobalColorTable;\n *numColors = screen->GlobalNumColors;\n return;\n }\n ((void)0);\n *colors = DefaultColorTable;\n *numColors = sizeof(DefaultColorTable) / 3;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "bc-1.07.1#scan_prep#yy_flush_buffer.c", "codebase": "bc-1.07.1", "c_file": "scan.c", "function": "yy_flush_buffer", "sloc": "13", "c_code": "void yy_flush_buffer (YY_BUFFER_STATE b )\n{\n if ( ! b )\n return;\n b->yy_n_chars = 0;\n b->yy_ch_buf[0] = 0;\n b->yy_ch_buf[1] = 0;\n b->yy_buf_pos = &b->yy_ch_buf[0];\n b->yy_at_bol = 1;\n b->yy_buffer_status = 0;\n if ( b == ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)) )\n yy_load_buffer_state( );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "make-4.4.1#job_prep#new_job.c", "codebase": "make-4.4.1", "c_file": "job.c", "function": "new_job", "sloc": "155", "c_code": "void\nnew_job (struct file *file)\n{\n struct commands *cmds = file->cmds;\n struct child *c;\n char **lines;\n unsigned int i;\n start_waiting_jobs ();\n reap_children (0, 0);\n chop_commands (cmds);\n c = xcalloc (sizeof (struct child));\n output_init (&c->output);\n c->file = file;\n c->sh_batch_file = ((void *)0);\n c->dontcare = file->dontcare;\n do{ output_context = (&c->output)->syncout ? (&c->output) : ((void *)0); }while(0);\n lines = xmalloc (cmds->ncommand_lines * sizeof (char *));\n for (i = 0; i < cmds->ncommand_lines; ++i)\n {\n char *in, *out, *ref;\n in = out = cmds->command_lines[i];\n while ((ref = strchr (in, '$')) != 0)\n {\n ++ref;\n if (out != in)\n memmove (out, in, ref - in);\n out += ref - in;\n in = ref;\n if (*ref == '(' || *ref == '{')\n {\n char openparen = *ref;\n char closeparen = openparen == '(' ? ')' : '}';\n char *outref;\n int count;\n char *p;\n *out++ = *in++;\n outref = out;\n count = 0;\n while (*in != '\\0')\n {\n if (*in == closeparen && --count < 0)\n break;\n else if (*in == '\\\\' && in[1] == '\\n')\n {\n int quoted = 0;\n for (p = in - 1; p > ref && *p == '\\\\'; --p)\n quoted = !quoted;\n if (quoted)\n *out++ = *in++;\n else\n {\n in += 2;\n while ((((stopchar_map[(unsigned char)((*(in)))])&(((0x0002|0x0004)))) != 0)) ++(in);\n while (out > outref && (((stopchar_map[(unsigned char)((out[-1]))])&((0x0002))) != 0))\n --out;\n *out++ = ' ';\n }\n }\n else\n {\n if (*in == openparen)\n ++count;\n *out++ = *in++;\n }\n }\n }\n }\n if (out != in)\n memmove (out, in, strlen (in) + 1);\n cmds->fileinfo.offset = i;\n lines[i] = allocated_variable_expand_for_file (cmds->command_lines[i],\n file);\n }\n cmds->fileinfo.offset = 0;\n c->command_lines = lines;\n job_next_command (c);\n if (job_slots != 0)\n while (job_slots_used == job_slots)\n reap_children (1, 0);\n else if (jobserver_enabled ())\n while (1)\n {\n int got_token;\n do{ if((((0x004))&db_level)) {printf (\"Need a job token; we %shave children\\n\", children ? \"\" : \"don't \"); fflush (stdout);} }while(0);\n if (!jobserver_tokens)\n break;\n jobserver_pre_acquire ();\n reap_children (0, 0);\n start_waiting_jobs ();\n if (!jobserver_tokens)\n break;\n if (!children)\n fatal((((floc *)0)), 0, (\"INTERNAL: no children as we go to sleep on read\"));\n got_token = jobserver_acquire (waiting_jobs != ((void *)0));\n if (got_token == 1)\n {\n do{ if((((0x004))&db_level)) {printf (gettext (\"Obtained token for child %p (%s).\\n\"), c, c->file->name); fflush (stdout);} }while(0);\n break;\n }\n }\n ++jobserver_tokens;\n if ((((0x020))&db_level))\n {\n const char *nm;\n if (! cmds->fileinfo.filenm)\n nm = gettext (\"\");\n else\n {\n char *n = __builtin_alloca (strlen (cmds->fileinfo.filenm) + 1 + 11 + 1);\n sprintf (n, \"%s:%lu\", cmds->fileinfo.filenm, cmds->fileinfo.lineno);\n nm = n;\n }\n if (c->file->phony)\n message((0), strlen (nm) + strlen (c->file->name), (gettext (\"%s: update target '%s' due to: target is .PHONY\")), (nm), (c->file->name));\n else if (c->file->last_mtime == 1)\n message((0), strlen (nm) + strlen (c->file->name), (gettext (\"%s: update target '%s' due to: target does not exist\")), (nm), (c->file->name));\n else\n {\n char *newer = allocated_variable_expand_for_file (\"$?\", c->file);\n if (newer[0] != '\\0')\n {\n message((0), strlen (nm) + strlen (c->file->name) + strlen (newer), (gettext (\"%s: update target '%s' due to: %s\")), (nm), (c->file->name), (newer));\n free (newer);\n }\n else\n {\n size_t len = 0;\n struct dep *d;\n for (d = c->file->deps; d != ((void *)0); d = d->next)\n if (d->file->last_mtime == 1)\n len += strlen (d->file->name) + 1;\n if (!len)\n message((0), strlen (nm) + strlen (c->file->name), (gettext (\"%s: update target '%s' due to: unknown reasons\")), (nm), (c->file->name));\n else\n {\n char *cp = newer = __builtin_alloca (len);\n for (d = c->file->deps; d != ((void *)0); d = d->next)\n if (d->file->last_mtime == 1)\n {\n if (cp > newer)\n *(cp++) = ' ';\n cp = stpcpy (cp, d->file->name);\n }\n message((0), strlen (nm) + strlen (c->file->name) + strlen (newer), (gettext (\"%s: update target '%s' due to: %s\")), (nm), (c->file->name), (newer));\n }\n }\n }\n }\n start_waiting_job (c);\n if (job_slots == 1 || not_parallel)\n while (file->command_state == cs_running)\n reap_children (1, 0);\n do{ output_context = ((void *)0); }while(0);\n return;\n}\n", "c_constructs": {"pointer_type": 13, "array_type": 4, "struct_type": 4, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 8, "memory_management": 1, "memory_operation": 2, "if_statement": 25, "for_loop": 4, "while_loop": 11, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 4}}, {"id": "cflow-1.7#symbol_prep#next_starter.c", "codebase": "cflow-1.7", "c_file": "symbol.c", "function": "next_starter", "sloc": "18", "c_code": "Symbol *\nnext_starter(void *itr)\n{\n struct linked_list_entry *p;\n if (!itr)\n return ((void *)0);\n p = *(void**)itr;\n while (p) {\n Symbol *sym = p->data;\n if (sym->type != SymUndefined) {\n *(void**)itr = p->next;\n return sym;\n }\n p = p->next;\n }\n *(void**)itr = ((void *)0);\n return ((void *)0);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_PAIRWISE_PRODUCTS_prep#min.c", "codebase": "transcoder-set", "c_file": "SUM_PAIRWISE_PRODUCTS.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMAL_OPERATIONS_MAKE_NUMBER_MAGICAL_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "MINIMAL_OPERATIONS_MAKE_NUMBER_MAGICAL.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#types_prep#libxml_doubleWrap.c", "codebase": "libxml2", "c_file": "types.c", "function": "libxml_doubleWrap", "sloc": "7", "c_code": "PyObject *\nlibxml_doubleWrap(double val)\n{\n PyObject *ret;\n ret = PyFloat_FromDouble((double) val);\n return (ret);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#x86_64-gen_prep#gen_addrpc32.c", "codebase": "tinycc", "c_file": "x86_64-gen.c", "function": "gen_addrpc32", "sloc": "6", "c_code": "void gen_addrpc32(int r, Sym *sym, int c)\n{\n if (r & 0x0200)\n greloca(cur_text_section, sym, ind, 2, c-4), c=4;\n gen_le32(c-4);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#sexp2dsa_prep#nettle_dsa_sha1_keypair_from_sexp.c", "codebase": "nettle-3.9.1", "c_file": "sexp2dsa.c", "function": "nettle_dsa_sha1_keypair_from_sexp", "sloc": "14", "c_code": "int\nnettle_dsa_sha1_keypair_from_sexp(struct dsa_params *params,\n mpz_t pub,\n mpz_t priv,\n unsigned p_max_bits,\n size_t length, const uint8_t *expr)\n{\n struct sexp_iterator i;\n return nettle_sexp_iterator_first(&i, length, expr)\n && nettle_sexp_iterator_check_type(&i, priv ? \"private-key\" : \"public-key\")\n && nettle_sexp_iterator_check_type(&i, \"dsa\")\n && nettle_dsa_keypair_from_sexp_alist(params, pub, priv,\n p_max_bits, 160, &i);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_valuePop.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_valuePop", "sloc": "13", "c_code": "PyObject *\nlibxml_valuePop(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlXPathObjectPtr c_retval;\n xmlXPathParserContextPtr ctxt;\n PyObject *pyobj_ctxt;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:valuePop\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlXPathParserContextPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlXPathParserContext_Object *)(pyobj_ctxt))->obj));\n c_retval = valuePop(ctxt);\n py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#lexfn_prep#GetNNumbers.c", "codebase": "mcsim-6.2.0", "c_file": "lexfn.c", "function": "GetNNumbers", "sloc": "12", "c_code": "BOOL GetNNumbers (PINPUTBUF pibIn, PSTR szLex, int nNumbers, PDOUBLE rgd)\n{\n BOOL bErr = 0;\n int i;\n for (i = 0; i < nNumbers && !bErr; i++) {\n if (i)\n GetOptPunct (pibIn, szLex, ',');\n if (!(bErr = ENextLex (pibIn, szLex, (0x0002 | 0x0004))))\n rgd[i] = atof(szLex);\n }\n return bErr;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#global_prep#dos_format.c", "codebase": "nano-7.2", "c_file": "global.c", "function": "dos_format", "sloc": "1", "c_code": "void dos_format(void) {;}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_POSSIBLE_WAYS_TO_CONSTRUCT_BUILDINGS_prep#main.c", "codebase": "transcoder-set", "c_file": "COUNT_POSSIBLE_WAYS_TO_CONSTRUCT_BUILDINGS.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {17,66,53,97,34,54,9,99,59,87};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlXPathIsInf.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlXPathIsInf", "sloc": "11", "c_code": "PyObject *\nlibxml_xmlXPathIsInf(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n double val;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"d:xmlXPathIsInf\", &val))\n return(((void *)0));\n c_retval = xmlXPathIsInf(val);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngrio_prep#png_set_read_fn.c", "codebase": "optipng-0.7.8", "c_file": "pngrio.c", "function": "png_set_read_fn", "sloc": "20", "c_code": "void\npng_set_read_fn(png_structrp png_ptr, png_voidp io_ptr,\n png_rw_ptr read_data_fn)\n{\n if (png_ptr == ((void *)0))\n return;\n png_ptr->io_ptr = io_ptr;\n if (read_data_fn != ((void *)0))\n png_ptr->read_data_fn = read_data_fn;\n else\n png_ptr->read_data_fn = png_default_read_data;\n if (png_ptr->write_data_fn != ((void *)0))\n {\n png_ptr->write_data_fn = ((void *)0);\n png_warning(png_ptr,\n \"Can't set both read_data_fn and write_data_fn in the\"\n \" same structure\");\n }\n png_ptr->output_flush_fn = ((void *)0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#modd_prep#SetEquation.c", "codebase": "mcsim-6.2.0", "c_file": "modd.c", "function": "SetEquation", "sloc": "8", "c_code": "void SetEquation (PVMMAPSTRCT pvm, PSTR szEqn)\n{\n if (!pvm || !szEqn)\n return;\n if (pvm->szEqn)\n free (pvm->szEqn);\n pvm->szEqn = CopyString (szEqn);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FINDING_POWER_PRIME_NUMBER_P_N_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "FINDING_POWER_PRIME_NUMBER_P_N_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_PRINT_SUM_GIVEN_NTH_TERM_1_prep#max.c", "codebase": "transcoder-set", "c_file": "PROGRAM_PRINT_SUM_GIVEN_NTH_TERM_1.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#valid_prep#xmlValidGetPotentialChildren.c", "codebase": "libxml2", "c_file": "valid.c", "function": "xmlValidGetPotentialChildren", "sloc": "30", "c_code": "int\nxmlValidGetPotentialChildren(xmlElementContent *ctree,\n const xmlChar **names,\n int *len, int max) {\n int i;\n if ((ctree == ((void *)0)) || (names == ((void *)0)) || (len == ((void *)0)))\n return(-1);\n if (*len >= max) return(*len);\n switch (ctree->type) {\n case XML_ELEMENT_CONTENT_PCDATA:\n for (i = 0; i < *len;i++)\n if (xmlStrEqual((xmlChar *) \"#PCDATA\", names[i])) return(*len);\n names[(*len)++] = (xmlChar *) \"#PCDATA\";\n break;\n case XML_ELEMENT_CONTENT_ELEMENT:\n for (i = 0; i < *len;i++)\n if (xmlStrEqual(ctree->name, names[i])) return(*len);\n names[(*len)++] = ctree->name;\n break;\n case XML_ELEMENT_CONTENT_SEQ:\n xmlValidGetPotentialChildren(ctree->c1, names, len, max);\n xmlValidGetPotentialChildren(ctree->c2, names, len, max);\n break;\n case XML_ELEMENT_CONTENT_OR:\n xmlValidGetPotentialChildren(ctree->c1, names, len, max);\n xmlValidGetPotentialChildren(ctree->c2, names, len, max);\n break;\n }\n return(*len);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 2, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 4}}, {"id": "cpio-2.14#paxerror_prep#readlink_error.c", "codebase": "cpio-2.14", "c_file": "paxerror.c", "function": "readlink_error", "sloc": "5", "c_code": "void\nreadlink_error (char const *name)\n{\n call_arg_error (\"readlink\", name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#variadic_prep#screen_write_strlen.c", "codebase": "tmux", "c_file": "variadic.c", "function": "screen_write_strlen", "sloc": "33", "c_code": "size_t\nscreen_write_strlen(const char *fmt, ...)\n{\n va_list ap;\n char *msg;\n struct utf8_data ud;\n u_char *ptr;\n size_t left, size = 0;\n enum utf8_state more;\n __builtin_va_start(ap,fmt);\n xvasprintf(&msg, fmt, ap);\n __builtin_va_end(ap);\n ptr = msg;\n while (*ptr != '\\0') {\n if (*ptr > 0x7f && utf8_open(&ud, *ptr) == UTF8_MORE) {\n ptr++;\n left = strlen(ptr);\n if (left < (size_t)ud.size - 1)\n break;\n while ((more = utf8_append(&ud, *ptr)) == UTF8_MORE)\n ptr++;\n ptr++;\n if (more == UTF8_DONE)\n size += ud.width;\n } else {\n if (*ptr > 0x1f && *ptr < 0x7f)\n size++;\n ptr++;\n }\n }\n free(msg);\n return (size);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 1, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "heman#aabb2_prep#kmAABB2Centre.c", "codebase": "heman", "c_file": "aabb2.c", "function": "kmAABB2Centre", "sloc": "5", "c_code": "kmVec2* kmAABB2Centre(const kmAABB2* aabb, kmVec2* pOut) {\n kmVec2Add(pOut, &aabb->min, &aabb->max);\n kmVec2Scale(pOut, pOut, 0.5);\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_call_id_prep#osip_call_id_set_host.c", "codebase": "libosip2-5.3.1", "c_file": "osip_call_id.c", "function": "osip_call_id_set_host", "sloc": "3", "c_code": "void osip_call_id_set_host(osip_call_id_t *callid, char *host) {\n callid->host = host;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_list_get.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_list_get", "sloc": "11", "c_code": "BOOL binn_list_get(void *ptr, int pos, int type, void *pvalue, int *psize) {\n binn value;\n int storage_type;\n storage_type = binn_get_read_storage(type);\n if ((storage_type != 0x00) && (pvalue == ((void *)0))) return 0;\n zero_value(pvalue, type);\n if (binn_list_get_value(ptr, pos, &value) == 0) return 0;\n if (copy_value(value.ptr, pvalue, value.type, type, storage_type) == 0) return 0;\n if (psize) *psize = value.size;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "less-633#charset_prep#utf_skip_to_lead.c", "codebase": "less-633", "c_file": "charset.c", "function": "utf_skip_to_lead", "sloc": "6", "c_code": "void utf_skip_to_lead(char **pp, char *limit)\n{\n do {\n ++(*pp);\n } while (*pp < limit && !((((*pp)[0] & 0377) & 0xC0) == 0xC0 && !((((*pp)[0] & 0377) & 0xFE) == 0xFE)) && !((((*pp)[0]) & 0x80) == 0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#strerror_r_prep#rpl_strerror_r.c", "codebase": "findutils-4.9.0", "c_file": "strerror_r.c", "function": "rpl_strerror_r", "sloc": "37", "c_code": "int\nrpl_strerror_r (int errnum, char *buf, size_t buflen)\n{\n if (buflen <= 1)\n {\n if (buflen)\n *buf = '\\0';\n return 34;\n }\n *buf = '\\0';\n {\n char const *msg = ((void *)0);\n if (msg)\n return safe_copy (buf, buflen, msg);\n }\n {\n int ret;\n int saved_errno = (*__errno_location ());\n {\n ret = 0;\n ret = __xpg_strerror_r (errnum, buf, buflen);\n if (ret < 0)\n ret = (*__errno_location ());\n if (!*buf)\n {\n char *errstring = strerror_r (errnum, buf, buflen);\n ret = errstring ? safe_copy (buf, buflen, errstring) : (*__errno_location ());\n }\n }\n if (ret == 22 && !*buf)\n {\n snprintf (buf, buflen, \"Unknown error %d\", errnum);\n }\n (*__errno_location ()) = saved_errno;\n return ret;\n }\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#tempname_prep#gen_tempname.c", "codebase": "findutils-4.9.0", "c_file": "tempname.c", "function": "gen_tempname", "sloc": "5", "c_code": "int\ngen_tempname (char *tmpl, int suffixlen, int flags, int kind)\n{\n return gen_tempname_len (tmpl, suffixlen, flags, kind, 6);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PROBABILITY_THREE_RANDOMLY_CHOSEN_NUMBERS_AP_prep#main.c", "codebase": "transcoder-set", "c_file": "PROBABILITY_THREE_RANDOMLY_CHOSEN_NUMBERS_AP.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {46,5,44,15,72,2,86,17,30,42};\n for(int i = 0; i < len(param0); ++i)\n {\n if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001)\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "optipng-0.7.8#pngrtran_prep#png_set_crc_action.c", "codebase": "optipng-0.7.8", "c_file": "pngrtran.c", "function": "png_set_crc_action", "sloc": "52", "c_code": "void\npng_set_crc_action(png_structrp png_ptr, int crit_action, int ancil_action)\n{\n ((void)0);\n if (png_ptr == ((void *)0))\n return;\n switch (crit_action)\n {\n case 5:\n break;\n case 3:\n png_ptr->flags &= ~(0x0400U | 0x0800U);\n png_ptr->flags |= 0x0400U;\n break;\n case 4:\n png_ptr->flags &= ~(0x0400U | 0x0800U);\n png_ptr->flags |= 0x0400U |\n 0x0800U;\n break;\n case 2:\n png_warning(png_ptr,\n \"Can't discard critical data on CRC error\");\n case 1:\n case 0:\n default:\n png_ptr->flags &= ~(0x0400U | 0x0800U);\n break;\n }\n switch (ancil_action)\n {\n case 5:\n break;\n case 3:\n png_ptr->flags &= ~(0x0100U | 0x0200U);\n png_ptr->flags |= 0x0100U;\n break;\n case 4:\n png_ptr->flags &= ~(0x0100U | 0x0200U);\n png_ptr->flags |= 0x0100U |\n 0x0200U;\n break;\n case 1:\n png_ptr->flags &= ~(0x0100U | 0x0200U);\n png_ptr->flags |= 0x0200U;\n break;\n case 2:\n case 0:\n default:\n png_ptr->flags &= ~(0x0100U | 0x0200U);\n break;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 2, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 9}}, {"id": "pexec-1.0rc8#linebuffer_prep#linebuffer_reset.c", "codebase": "pexec-1.0rc8", "c_file": "linebuffer.c", "function": "linebuffer_reset", "sloc": "6", "c_code": "int linebuffer_reset(linebuffer *lb)\n{\n lb->buffer=((void *)0);\n lb->length=0;\n return(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsCJKUnifiedIdeographsExtensionB.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsCJKUnifiedIdeographsExtensionB", "sloc": "4", "c_code": "int\nxmlUCSIsCJKUnifiedIdeographsExtensionB(int code) {\n return(((code >= 0x20000) && (code <= 0x2A6DF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#dict_prep#xmlGlobalRandom.c", "codebase": "libxml2", "c_file": "dict.c", "function": "xmlGlobalRandom", "sloc": "8", "c_code": "unsigned\nxmlGlobalRandom(void) {\n unsigned ret;\n xmlMutexLock(&xmlRngMutex);\n ret = xoroshiro64ss(globalRngState);\n xmlMutexUnlock(&xmlRngMutex);\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gzip-1.12#unpack_prep#unpack.c", "codebase": "gzip-1.12", "c_file": "unpack.c", "function": "unpack", "sloc": "41", "c_code": "int unpack(in, out)\n int in, out;\n{\n int len;\n unsigned eob;\n register unsigned peek;\n unsigned peek_mask;\n ifd = in;\n ofd = out;\n read_tree();\n build_tree();\n (valid = 0, bitbuf = 0);\n peek_mask = (1<> (valid-(peek_bits))) & (peek_mask); };\n len = outbuf[peek];\n if (len > 0) {\n peek >>= peek_bits - len;\n } else {\n ulg mask = peek_mask;\n len = peek_bits;\n while (peek < parents[len])\n {\n len++, mask = (mask<<1)+1;\n { while (valid < (len)) bitbuf = (bitbuf<<8) | read_byte(), valid += 8; peek = (bitbuf >> (valid-(len))) & (mask); };\n }\n }\n if (peek == eob && len == max_len)\n break;\n {window[outcnt++]=(uch)(literal[peek+lit_base[len]]); if (outcnt==0x8000) flush_window();};\n ;\n (valid -= (len));\n }\n flush_window();\n if (orig_len != (ulg)(bytes_out & 0xffffffff)) {\n gzip_error (\"invalid compressed data--length error\");\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 1, "while_loop": 3, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "units-2.22#units_prep#getprogramname.c", "codebase": "units-2.22", "c_file": "units.c", "function": "getprogramname", "sloc": "11", "c_code": "char *\ngetprogramname(char *path)\n{\n size_t proglen;\n char *p;\n path = pathend(path);\n proglen = strlen(path);\n if ((p = strrchr(path, '.')) && ((strlen(p) == 4) && (tolower(p[1]) == 'e') && (tolower(p[2]) == 'x') && (tolower(p[3]) == 'e')))\n proglen -= 4;\n return dupnstr(path, proglen);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_write_minified_get_value_size.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_write_minified_get_value_size", "sloc": "28", "c_code": "int json_write_minified_get_value_size(const struct json_value_s *value,\n size_t *size) {\n switch (value->type) {\n default:\n return 1;\n case json_type_number:\n return json_write_get_number_size((struct json_number_s *)value->payload,\n size);\n case json_type_string:\n return json_write_get_string_size((struct json_string_s *)value->payload,\n size);\n case json_type_array:\n return json_write_minified_get_array_size(\n (struct json_array_s *)value->payload, size);\n case json_type_object:\n return json_write_minified_get_object_size(\n (struct json_object_s *)value->payload, size);\n case json_type_true:\n *size += 4;\n return 0;\n case json_type_false:\n *size += 5;\n return 0;\n case json_type_null:\n *size += 4;\n return 0;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 8, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_FIBONACCI_NUMBERS_GIVEN_RANGE_LOG_TIME_prep#sort.c", "codebase": "transcoder-set", "c_file": "COUNT_FIBONACCI_NUMBERS_GIVEN_RANGE_LOG_TIME.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_simplified_json_prep#json_write_minified_get_value_size.c", "codebase": "json.h", "c_file": "allow_simplified_json.c", "function": "json_write_minified_get_value_size", "sloc": "28", "c_code": "int json_write_minified_get_value_size(const struct json_value_s *value,\n size_t *size) {\n switch (value->type) {\n default:\n return 1;\n case json_type_number:\n return json_write_get_number_size((struct json_number_s *)value->payload,\n size);\n case json_type_string:\n return json_write_get_string_size((struct json_string_s *)value->payload,\n size);\n case json_type_array:\n return json_write_minified_get_array_size(\n (struct json_array_s *)value->payload, size);\n case json_type_object:\n return json_write_minified_get_object_size(\n (struct json_object_s *)value->payload, size);\n case json_type_true:\n *size += 4;\n return 0;\n case json_type_false:\n *size += 5;\n return 0;\n case json_type_null:\n *size += 4;\n return 0;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 8, "break_continue_statement": 0}}, {"id": "transcoder-set#AREA_OF_A_HEXAGON_prep#min.c", "codebase": "transcoder-set", "c_file": "AREA_OF_A_HEXAGON.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#rsa-pkcs1-sign-tr_prep#nettle_rsa_pkcs1_sign_tr.c", "codebase": "nettle-3.9.1", "c_file": "rsa-pkcs1-sign-tr.c", "function": "nettle_rsa_pkcs1_sign_tr", "sloc": "16", "c_code": "int\nnettle_rsa_pkcs1_sign_tr(const struct rsa_public_key *pub,\n const struct rsa_private_key *key,\n void *random_ctx, nettle_random_func *random,\n size_t length, const uint8_t *digest_info,\n mpz_t s)\n{\n mpz_t m;\n int ret;\n __gmpz_init(m);\n ret = (nettle_pkcs1_rsa_digest_encode (m, key->size, length, digest_info)\n && nettle_rsa_compute_root_tr (pub, key, random_ctx, random,\n s, m));\n __gmpz_clear(m);\n return ret;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_PAIRWISE_PRODUCTS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SUM_PAIRWISE_PRODUCTS.c", "function": "f_filled", "sloc": "1", "c_code": "long long int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#move_prep#do_para_begin.c", "codebase": "nano-7.2", "c_file": "move.c", "function": "do_para_begin", "sloc": "7", "c_code": "void do_para_begin(linestruct **line)\n{\n if ((*line)->prev != ((void *)0))\n *line = (*line)->prev;\n while (!begpar(*line, 0))\n *line = (*line)->prev;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "less-633#filename_prep#fexpand.c", "codebase": "less-633", "c_file": "filename.c", "function": "fexpand", "sloc": "61", "c_code": "char * fexpand(char *s)\n{\n char *fr, *to;\n int n;\n char *e;\n void* ifile;\n n = 0;\n for (fr = s; *fr != '\\0'; fr++)\n {\n switch (*fr)\n {\n case '%':\n case '#':\n if (fr > s && fr[-1] == *fr)\n {\n n++;\n } else if (fr[1] != *fr)\n {\n ifile = ((*fr) == '%' ? curr_ifile : (*fr) == '#' ? old_ifile : ((void*)((void *)0)));\n if (ifile == ((void*)((void *)0)))\n n++;\n else\n n += (int) strlen(get_filename(ifile));\n }\n break;\n default:\n n++;\n break;\n }\n }\n e = (char *) ecalloc(n+1, sizeof(char));\n to = e;\n for (fr = s; *fr != '\\0'; fr++)\n {\n switch (*fr)\n {\n case '%':\n case '#':\n if (fr > s && fr[-1] == *fr)\n {\n *to++ = *fr;\n } else if (fr[1] != *fr)\n {\n ifile = ((*fr) == '%' ? curr_ifile : (*fr) == '#' ? old_ifile : ((void*)((void *)0)));\n if (ifile == ((void*)((void *)0)))\n *to++ = *fr;\n else\n {\n strcpy(to, get_filename(ifile));\n to += strlen(to);\n }\n }\n break;\n default:\n *to++ = *fr;\n break;\n }\n }\n *to = '\\0';\n return (e);\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 2, "while_loop": 0, "switch_statement": 2, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 4}}, {"id": "libxml2#xmlstring_prep#xmlStrndup.c", "codebase": "libxml2", "c_file": "xmlstring.c", "function": "xmlStrndup", "sloc": "12", "c_code": "xmlChar *\nxmlStrndup(const xmlChar *cur, int len) {\n xmlChar *ret;\n if ((cur == ((void *)0)) || (len < 0)) return(((void *)0));\n ret = xmlMalloc((size_t) len + 1);\n if (ret == ((void *)0)) {\n return(((void *)0));\n }\n memcpy(ret, cur, len);\n ret[len] = 0;\n return(ret);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 1, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "cpio-2.14#dstring_prep#ds_append.c", "codebase": "cpio-2.14", "c_file": "dstring.c", "function": "ds_append", "sloc": "12", "c_code": "void\nds_append (dynamic_string *s, int c)\n{\n ds_resize (s, 0);\n s->ds_string[s->ds_idx] = c;\n if (c)\n {\n s->ds_idx++;\n ds_resize (s, 0);\n s->ds_string[s->ds_idx] = 0;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_get_read_storage.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_get_read_storage", "sloc": "12", "c_code": "int binn_get_read_storage(int type) {\n int storage_type;\n switch (type) {\n case 0x80061:\n case 0x01:\n case 0x02:\n return 0x60;\n default:\n binn_get_type_info(type, &storage_type, ((void *)0));\n return storage_type;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#engine_prep#Pl_Reset_Prolog_In_Signal.c", "codebase": "gprolog-1.5.0", "c_file": "engine.c", "function": "Pl_Reset_Prolog_In_Signal", "sloc": "5", "c_code": "void\nPl_Reset_Prolog_In_Signal(void)\n{\n do { if (pl_buff_signal_reg[4]) { do { pl_reg_bank = (WamWordP) pl_buff_signal_reg[0]; TR = (WamWordP) pl_buff_signal_reg[1]; B = (WamWordP) pl_buff_signal_reg[2]; H = (WamWordP) pl_buff_signal_reg[3]; } while(0); pl_buff_signal_reg[4] = 0;; } pl_reg_bank = save_reg_bank; } while(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#chars_prep#mbstrchr.c", "codebase": "nano-7.2", "c_file": "chars.c", "function": "mbstrchr", "sloc": "25", "c_code": "char *mbstrchr(const char *string, const char *chr)\n{\n if (use_utf8) {\n _Bool bad_s = 0, bad_c = 0;\n wchar_t ws, wc;\n if (mbtowide(&wc, chr) < 0) {\n wc = (unsigned char)*chr;\n bad_c = 1;\n }\n while (*string != '\\0') {\n int symlen = mbtowide(&ws, string);\n if (symlen < 0) {\n ws = (unsigned char)*string;\n bad_s = 1;\n }\n if (ws == wc && bad_s == bad_c)\n break;\n string += symlen;\n }\n if (*string == '\\0')\n return ((void *)0);\n return (char *)string;\n } else\n return strchr(string, *chr);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 1}}, {"id": "tulipindicators-0.9.1#candles_prep#tc_big_black_candle.c", "codebase": "tulipindicators-0.9.1", "c_file": "candles.c", "function": "tc_big_black_candle", "sloc": "5", "c_code": "int tc_big_black_candle(int size, TC_REAL const *const *inputs, tc_config const *options, tc_result *output) {\n const TC_REAL *open = inputs[0]; const TC_REAL *high = inputs[1]; const TC_REAL *low = inputs[2]; const TC_REAL *close = inputs[3]; const int period = options->period; const TC_REAL div = 1.0 / period; TC_REAL avg_body_sum = 0; TC_REAL avg_total_sum = 0; if (period < 1) return 1; if (size < period) return 0; int i; for (i = 0; i < period; ++i) { avg_body_sum += (fabs(open[(i)] - close[(i)])); avg_total_sum += (high[(i)] - low[(i)]); }\n while(i < size) { const TC_REAL top = (open[(i)] > close[(i)] ? open[(i)] : close[(i)]); const TC_REAL bottom = (open[(i)] < close[(i)] ? open[(i)] : close[(i)]); const TC_REAL body = (fabs(open[(i)] - close[(i)])); const TC_REAL total = (high[(i)] - low[(i)]); const TC_REAL upper = (high[(i)] - top); const TC_REAL lower = (bottom - low[(i)]); const TC_REAL avg_body = avg_body_sum * div; const TC_REAL avg_total = avg_total_sum * div; (void)top;(void)bottom;(void)body;(void)total; (void)upper;(void)lower;(void)avg_body;(void)avg_total; if ((open[i]>close[i]) && ((fabs(open[(i)] - close[(i)])) > (options->body_long * avg_body))) { do { const tc_hit hit = {i, (1L<<2)}; const int r = tc_result_add(output, hit); if (r != 0) return r; } while (0); } avg_body_sum += body; avg_body_sum -= (fabs(open[(i-period)] - close[(i-period)])); avg_total_sum += total; avg_total_sum -= (high[(i-period)] - low[(i-period)]); ++i; };\n return 0;\n }\n", "c_constructs": {"pointer_type": 4, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#symbol_prep#lookup.c", "codebase": "gawk-5.2.2", "c_file": "symbol.c", "function": "lookup", "sloc": "28", "c_code": "NODE *\nlookup(const char *name)\n{\n NODE *n;\n NODE *tmp;\n NODE *tables[5];\n int i;\n tables[0] = param_table;\n tables[1] = global_table;\n tables[2] = func_table;\n tables[3] = symbol_table;\n tables[4] = ((void *)0);\n tmp = get_name_from_awk_ns(name);\n n = ((void *)0);\n for (i = 0; tables[i] != ((void *)0); i++) {\n if ((((tables[i])->sub.nodep.reflags) == 0))\n continue;\n if (((do_flags & DO_POSIX) || (do_flags & DO_TRADITIONAL)) && tables[i] == global_table)\n continue;\n n = in_array(tables[i], tmp);\n if (n != ((void *)0))\n break;\n }\n unref(tmp);\n if (n == ((void *)0) || n->type == Node_val)\n return ((void *)0);\n return n;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 3}}, {"id": "mtools-4.0.43#tty_prep#ask_confirmation.c", "codebase": "mtools-4.0.43", "c_file": "tty.c", "function": "ask_confirmation", "sloc": "29", "c_code": "int ask_confirmation(const char *format, ...)\n{\n char ans[10];\n va_list ap;\n if(!opentty(-1))\n return 0;\n while (1) {\n __builtin_va_start(ap,format);\n vfprintf(stderr, format, ap);\n __builtin_va_end(ap);\n fflush(stderr);\n fflush(opentty(-1));\n if (mtools_raw_tty) {\n int c = fgetc(opentty(1));\n if(c < 0)\n ans[0] = 'n';\n else\n ans[0] = (char) c;\n fputs(\"\\n\", stderr);\n } else {\n if(fgets(ans,9, opentty(0)) == ((void *)0))\n ans[0] = 'n';\n }\n if (ans[0] == 'y' || ans[0] == 'Y')\n return 0;\n if (ans[0] == 'n' || ans[0] == 'N')\n return -1;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#FLOOR_IN_A_SORTED_ARRAY_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "FLOOR_IN_A_SORTED_ARRAY.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_json5_prep#json_write_number.c", "codebase": "json.h", "c_file": "allow_json5.c", "function": "json_write_number", "sloc": "115", "c_code": "char *json_write_number(const struct json_number_s *number, char *data) {\n uintmax_t parsed_number, backup;\n size_t i;\n if (number->number_size >= 2) {\n switch (number->number[1]) {\n default:\n break;\n case 'x':\n case 'X':\n parsed_number = strtoumax(number->number, 0, 0);\n backup = parsed_number;\n i = 0;\n while (0 != parsed_number) {\n parsed_number /= 10;\n i++;\n }\n parsed_number = backup;\n backup = i;\n do {\n *(data + i - 1) = '0' + (char)(parsed_number % 10);\n parsed_number /= 10;\n i--;\n } while (0 != parsed_number);\n data += backup;\n return data;\n }\n }\n i = 0;\n if ((i < number->number_size) &&\n (('+' == number->number[i]) || ('-' == number->number[i]))) {\n i++;\n }\n if ((i < number->number_size) && ('I' == number->number[i])) {\n const char *inf = \"Infinity\";\n size_t k;\n for (k = i; k < number->number_size; k++) {\n const char c = *inf++;\n if ('\\0' == c) {\n break;\n } else if (c != number->number[k]) {\n break;\n }\n }\n if ('\\0' == *inf++) {\n const char *dbl_max;\n if ('-' == number->number[0]) {\n *data++ = '-';\n }\n for (dbl_max = \"1.7976931348623158e308\"; '\\0' != *dbl_max; dbl_max++) {\n *data++ = *dbl_max;\n }\n return data;\n }\n }\n if ((i < number->number_size) && ('N' == number->number[i])) {\n const char *nan = \"NaN\";\n size_t k;\n for (k = i; k < number->number_size; k++) {\n const char c = *nan++;\n if ('\\0' == c) {\n break;\n } else if (c != number->number[k]) {\n break;\n }\n }\n if ('\\0' == *nan++) {\n *data++ = '0';\n return data;\n }\n }\n if ((i < number->number_size) && ('.' == number->number[i])) {\n i = 0;\n if ('+' == number->number[i]) {\n i++;\n }\n if ('-' == number->number[i]) {\n *data++ = '-';\n i++;\n }\n *data++ = '0';\n for (; i < number->number_size; i++) {\n *data++ = number->number[i];\n }\n return data;\n }\n for (; i < number->number_size; i++) {\n const char c = number->number[i];\n if (!('0' <= c && c <= '9')) {\n break;\n }\n }\n if ((i + 1 == number->number_size) && ('.' == number->number[i])) {\n i = 0;\n if ('+' == number->number[i]) {\n i++;\n }\n if ('-' == number->number[i]) {\n *data++ = '-';\n i++;\n }\n for (; i < number->number_size; i++) {\n *data++ = number->number[i];\n }\n *data++ = '0';\n return data;\n }\n i = 0;\n if ('+' == number->number[i]) {\n i++;\n }\n for (; i < number->number_size; i++) {\n *data++ = number->number[i];\n }\n return data;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 19, "for_loop": 7, "while_loop": 2, "switch_statement": 1, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 6}}, {"id": "gprolog-1.5.0#foreign_supp_prep#Pl_Query_Begin.c", "codebase": "gprolog-1.5.0", "c_file": "foreign_supp.c", "function": "Pl_Query_Begin", "sloc": "9", "c_code": "void\nPl_Query_Begin(Bool recoverable)\n{\n if (query_stack_top - query_stack >= 128)\n Pl_Fatal_Error(\"too many nested Pl_Query_Start() (max: %d)\",\n 128);\n if (recoverable)\n Pl_Create_Choice_Point(X1_24706C5F71756572795F7265636F7665725F616C74__a0, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#session_prep#session_group_add.c", "codebase": "tmux", "c_file": "session.c", "function": "session_group_add", "sloc": "6", "c_code": "void\nsession_group_add(struct session_group *sg, struct session *s)\n{\n if (session_group_contains(s) == ((void *)0))\n do { (s)->gentry.tqe_next = ((void *)0); (s)->gentry.tqe_prev = (&sg->sessions)->tqh_last; *(&sg->sessions)->tqh_last = (s); (&sg->sessions)->tqh_last = &(s)->gentry.tqe_next; } while (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#mode-tree_prep#mode_tree_resize.c", "codebase": "tmux", "c_file": "mode-tree.c", "function": "mode_tree_resize", "sloc": "9", "c_code": "void\nmode_tree_resize(struct mode_tree_data *mtd, u_int sx, u_int sy)\n{\n struct screen *s = &mtd->screen;\n screen_resize(s, sx, sy, 0);\n mode_tree_build(mtd);\n mode_tree_draw(mtd);\n mtd->wp->flags |= 0x1;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#eval_prep#update_NF.c", "codebase": "gawk-5.2.2", "c_file": "eval.c", "function": "update_NF", "sloc": "12", "c_code": "void\nupdate_NF()\n{\n long l;\n l = (!(((NF_node->sub.nodep.l.lptr))->flags & (MPFN|MPZN)) ? ((long) (NF_node->sub.nodep.l.lptr)->sub.val.nm.fltnum) : ((((NF_node->sub.nodep.l.lptr))->flags & MPFN) ? (mpfr_get_si((NF_node->sub.nodep.l.lptr)->sub.val.nm.mpnum, ROUND_MODE)) : (__gmpz_get_si((NF_node->sub.nodep.l.lptr)->sub.val.nm.mpi))));\n if (NF == -1 || l != NF) {\n if (NF == -1)\n (void) get_field(0x7fffffffffffffffL - 1, ((void *)0));\n unref(NF_node->sub.nodep.l.lptr);\n NF_node->sub.nodep.l.lptr = make_number(NF);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#prompt_prep#put_cursor_at_end_of_answer.c", "codebase": "nano-7.2", "c_file": "prompt.c", "function": "put_cursor_at_end_of_answer", "sloc": "4", "c_code": "void put_cursor_at_end_of_answer(void)\n{\n typing_x = ((~(size_t)0) >> 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "brotli-1.0.9#entropy_encode_prep#BrotliOptimizeHuffmanCountsForRle.c", "codebase": "brotli-1.0.9", "c_file": "entropy_encode.c", "function": "BrotliOptimizeHuffmanCountsForRle", "sloc": "114", "c_code": "void BrotliOptimizeHuffmanCountsForRle(size_t length, uint32_t* counts,\n uint8_t* good_for_rle) {\n size_t nonzero_count = 0;\n size_t stride;\n size_t limit;\n size_t sum;\n const size_t streak_limit = 1240;\n size_t i;\n for (i = 0; i < length; i++) {\n if (counts[i]) {\n ++nonzero_count;\n }\n }\n if (nonzero_count < 16) {\n return;\n }\n while (length != 0 && counts[length - 1] == 0) {\n --length;\n }\n if (length == 0) {\n return;\n }\n {\n size_t nonzeros = 0;\n uint32_t smallest_nonzero = 1 << 30;\n for (i = 0; i < length; ++i) {\n if (counts[i] != 0) {\n ++nonzeros;\n if (smallest_nonzero > counts[i]) {\n smallest_nonzero = counts[i];\n }\n }\n }\n if (nonzeros < 5) {\n return;\n }\n if (smallest_nonzero < 4) {\n size_t zeros = length - nonzeros;\n if (zeros < 6) {\n for (i = 1; i < length - 1; ++i) {\n if (counts[i - 1] != 0 && counts[i] == 0 && counts[i + 1] != 0) {\n counts[i] = 1;\n }\n }\n }\n }\n if (nonzeros < 28) {\n return;\n }\n }\n memset(good_for_rle, 0, length);\n {\n uint32_t symbol = counts[0];\n size_t step = 0;\n for (i = 0; i <= length; ++i) {\n if (i == length || counts[i] != symbol) {\n if ((symbol == 0 && step >= 5) ||\n (symbol != 0 && step >= 7)) {\n size_t k;\n for (k = 0; k < step; ++k) {\n good_for_rle[i - k - 1] = 1;\n }\n }\n step = 1;\n if (i != length) {\n symbol = counts[i];\n }\n } else {\n ++step;\n }\n }\n }\n stride = 0;\n limit = 256 * (counts[0] + counts[1] + counts[2]) / 3 + 420;\n sum = 0;\n for (i = 0; i <= length; ++i) {\n if (i == length || good_for_rle[i] ||\n (i != 0 && good_for_rle[i - 1]) ||\n (256 * counts[i] - limit + streak_limit) >= 2 * streak_limit) {\n if (stride >= 4 || (stride >= 3 && sum == 0)) {\n size_t k;\n size_t count = (sum + stride / 2) / stride;\n if (count == 0) {\n count = 1;\n }\n if (sum == 0) {\n count = 0;\n }\n for (k = 0; k < stride; ++k) {\n counts[i - k - 1] = (uint32_t)count;\n }\n }\n stride = 0;\n sum = 0;\n if (i < length - 2) {\n limit = 256 * (counts[i] + counts[i + 1] + counts[i + 2]) / 3 + 420;\n } else if (i < length) {\n limit = 256 * counts[i];\n } else {\n limit = 0;\n }\n }\n ++stride;\n if (i != length) {\n sum += counts[i];\n if (stride >= 4) {\n limit = (256 * sum + stride / 2) / stride;\n }\n if (stride == 4) {\n limit += 120;\n }\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 22, "for_loop": 7, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libxml2#uri_prep#xmlURIEscape.c", "codebase": "libxml2", "c_file": "uri.c", "function": "xmlURIEscape", "sloc": "92", "c_code": "xmlChar *\nxmlURIEscape(const xmlChar * str)\n{\n xmlChar *ret, *segment = ((void *)0);\n xmlURIPtr uri;\n int ret2;\n if (str == ((void *)0))\n return (((void *)0));\n uri = xmlCreateURI();\n if (uri != ((void *)0)) {\n uri->cleanup = 1;\n ret2 = xmlParseURIReference(uri, (const char *)str);\n if (ret2) {\n xmlFreeURI(uri);\n return (((void *)0));\n }\n }\n if (!uri)\n return ((void *)0);\n ret = ((void *)0);\n if (uri->scheme) {\n segment = xmlURIEscapeStr((xmlChar *) uri->scheme, (xmlChar *) \"+-.\");\n if(!segment) { xmlFreeURI(uri); xmlFree(ret); return ((void *)0); }\n ret = xmlStrcat(ret, segment);\n ret = xmlStrcat(ret, (xmlChar *) \":\");\n xmlFree(segment);\n }\n if (uri->authority) {\n segment =\n xmlURIEscapeStr((xmlChar *) uri->authority, (xmlChar *) \"/?;:@\");\n if(!segment) { xmlFreeURI(uri); xmlFree(ret); return ((void *)0); }\n ret = xmlStrcat(ret, (xmlChar *) \"//\");\n ret = xmlStrcat(ret, segment);\n xmlFree(segment);\n }\n if (uri->user) {\n segment = xmlURIEscapeStr((xmlChar *) uri->user, (xmlChar *) \";:&=+$,\");\n if(!segment) { xmlFreeURI(uri); xmlFree(ret); return ((void *)0); }\n ret = xmlStrcat(ret,(xmlChar *) \"//\");\n ret = xmlStrcat(ret, segment);\n ret = xmlStrcat(ret, (xmlChar *) \"@\");\n xmlFree(segment);\n }\n if (uri->server) {\n segment = xmlURIEscapeStr((xmlChar *) uri->server, (xmlChar *) \"/?;:@\");\n if(!segment) { xmlFreeURI(uri); xmlFree(ret); return ((void *)0); }\n if (uri->user == ((void *)0))\n ret = xmlStrcat(ret, (xmlChar *) \"//\");\n ret = xmlStrcat(ret, segment);\n xmlFree(segment);\n }\n if (uri->port > 0) {\n xmlChar port[11];\n snprintf((char *) port, 11, \"%d\", uri->port);\n ret = xmlStrcat(ret, (xmlChar *) \":\");\n ret = xmlStrcat(ret, port);\n }\n if (uri->path) {\n segment =\n xmlURIEscapeStr((xmlChar *) uri->path, (xmlChar *) \":@&=+$,/?;\");\n if(!segment) { xmlFreeURI(uri); xmlFree(ret); return ((void *)0); }\n ret = xmlStrcat(ret, segment);\n xmlFree(segment);\n }\n if (uri->query_raw) {\n ret = xmlStrcat(ret, (xmlChar *) \"?\");\n ret = xmlStrcat(ret, (xmlChar *) uri->query_raw);\n }\n else if (uri->query) {\n segment =\n xmlURIEscapeStr((xmlChar *) uri->query, (xmlChar *) \";/?:@&=+,$\");\n if(!segment) { xmlFreeURI(uri); xmlFree(ret); return ((void *)0); }\n ret = xmlStrcat(ret, (xmlChar *) \"?\");\n ret = xmlStrcat(ret, segment);\n xmlFree(segment);\n }\n if (uri->opaque) {\n segment = xmlURIEscapeStr((xmlChar *) uri->opaque, (xmlChar *) \"\");\n if(!segment) { xmlFreeURI(uri); xmlFree(ret); return ((void *)0); }\n ret = xmlStrcat(ret, segment);\n xmlFree(segment);\n }\n if (uri->fragment) {\n segment = xmlURIEscapeStr((xmlChar *) uri->fragment, (xmlChar *) \"#\");\n if(!segment) { xmlFreeURI(uri); xmlFree(ret); return ((void *)0); }\n ret = xmlStrcat(ret, (xmlChar *) \"#\");\n ret = xmlStrcat(ret, segment);\n xmlFree(segment);\n }\n xmlFreeURI(uri);\n return (ret);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 17, "memory_management": 0, "memory_operation": 0, "if_statement": 23, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 12, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#aroon_prep#ti_aroon.c", "codebase": "tulipindicators-0.9.1", "c_file": "aroon.c", "function": "ti_aroon", "sloc": "54", "c_code": "int ti_aroon(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *high = inputs[0];\n const double *low = inputs[1];\n double *adown = outputs[0];\n double *aup = outputs[1];\n const int period = (int)options[0];\n if (period < 1) return 1;\n if (size <= ti_aroon_start(options)) return 0;\n const double scale = 100.0 / period;\n int trail = 0, maxi = -1, mini = -1;\n double max = high[0];\n double min = low[0];\n double bar;\n int i, j;\n for (i = period; i < size; ++i, ++trail) {\n bar = high[i];\n if (maxi < trail) {\n maxi = trail;\n max = high[maxi];\n j = trail;\n while(++j <= i) {\n bar = high[j];\n if (bar >= max) {\n max = bar;\n maxi = j;\n }\n }\n } else if (bar >= max) {\n maxi = i;\n max = bar;\n }\n bar = low[i];\n if (mini < trail) {\n mini = trail;\n min = low[mini];\n j = trail;\n while(++j <= i) {\n bar = low[j];\n if (bar <= min) {\n min = bar;\n mini = j;\n }\n }\n } else if (bar <= min) {\n mini = i;\n min = bar;\n }\n *adown++ = ((double)period - (i-mini)) * scale;\n *aup++ = ((double)period - (i-maxi)) * scale;\n }\n ((void) sizeof ((adown - outputs[0] == size - ti_aroon_start(options)) ? 1 : 0), __extension__ ({ if (adown - outputs[0] == size - ti_aroon_start(options)) ; else __assert_fail (\"adown - outputs[0] == size - ti_aroon_start(options)\", \"indicators/aroon.c\", 96, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((aup - outputs[1] == size - ti_aroon_start(options)) ? 1 : 0), __extension__ ({ if (aup - outputs[1] == size - ti_aroon_start(options)) ; else __assert_fail (\"aup - outputs[1] == size - ti_aroon_start(options)\", \"indicators/aroon.c\", 97, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 10, "for_loop": 1, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_prep#main.c", "codebase": "transcoder-set", "c_file": "SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {60,44,72,90,99,45,27,11,65,52};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "tinycc#tccpp_prep#cstr_reset.c", "codebase": "tinycc", "c_file": "tccpp.c", "function": "cstr_reset", "sloc": "4", "c_code": "void cstr_reset(CString *cstr)\n{\n cstr->size = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_no_commas_prep#json_write_pretty_get_object_size.c", "codebase": "json.h", "c_file": "allow_no_commas.c", "function": "json_write_pretty_get_object_size", "sloc": "26", "c_code": "int json_write_pretty_get_object_size(const struct json_object_s *object,\n size_t depth, size_t indent_size,\n size_t newline_size, size_t *size) {\n struct json_object_element_s *element;\n *size += 1;\n if (0 < object->length) {\n *size += newline_size;\n *size += object->length - 1;\n for (element = object->start; 0 != element;\n element = element->next) {\n *size += (depth + 1) * indent_size;\n *size += newline_size;\n if (json_write_get_string_size(element->name, size)) {\n return 1;\n }\n *size += 3;\n if (json_write_pretty_get_value_size(element->value, depth + 1,\n indent_size, newline_size, size)) {\n return 1;\n }\n }\n *size += depth * indent_size;\n }\n *size += 1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_LENGTH_SUBSEQUENCE_DIFFERENCE_ADJACENT_ELEMENTS_EITHER_0_1_prep#main.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_LENGTH_SUBSEQUENCE_DIFFERENCE_ADJACENT_ELEMENTS_EITHER_0_1.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {4,5,9,31,31,37,41,55,56,61,79,81,89,93};\nint param0_1[] = {-76,96,-68,-16,22,-24,-24,6,98,-82,54,-80,46,0,0,-50};\nint param0_2[] = {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};\nint param0_3[] = {97,93,43,51,15,33,13,96,39,89,78,25,45,6,64,54};\nint param0_4[] = {-98,-78,-72,-70,-68,-58,-56,-54,-46,-44,-38,-34,-30,-24,-18,-16,-14,-12,2,6,8,8,10,10,16,24,26,28,40,42,44,56,58,62,66,66,78,86};\nint param0_5[] = {1,1,0,1,0,0};\nint param0_6[] = {7,8,10,11,12,15,16,16,19,21,23,23,23,25,26,35,38,43,46,47,51,52,53,57,60,61,66,67,69,74,75,81,83,84,88,92,94,98,98,99};\nint param0_7[] = {14,-40};\nint param0_8[] = {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,1,1,1,1};\nint param0_9[] = {59,70,53};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {12,15,29,13,19,3,34,1,38,1};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#PROGRAM_FIND_REMAINDER_LARGE_NUMBER_DIVIDED_11_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "PROGRAM_FIND_REMAINDER_LARGE_NUMBER_DIVIDED_11.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( char str [] ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsKhmer.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsKhmer", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsKhmer(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsKhmer\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsKhmer\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsKhmer(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_VALUE_OF_Y_MOD_2_RAISED_TO_POWER_X_prep#min.c", "codebase": "transcoder-set", "c_file": "FIND_VALUE_OF_Y_MOD_2_RAISED_TO_POWER_X.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#dsa_prep#nettle_dsa_signature_clear.c", "codebase": "nettle-3.9.1", "c_file": "dsa.c", "function": "nettle_dsa_signature_clear", "sloc": "6", "c_code": "void\nnettle_dsa_signature_clear(struct dsa_signature *signature)\n{\n __gmpz_clear(signature->r);\n __gmpz_clear(signature->s);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "less-633#edit_prep#back_textlist.c", "codebase": "less-633", "c_file": "edit.c", "function": "back_textlist", "sloc": "17", "c_code": "char * back_textlist(struct textlist *tlist, char *prev)\n{\n char *s;\n if (prev == ((void *)0))\n s = tlist->endstring;\n else if (prev <= tlist->string)\n return (((void *)0));\n else\n s = prev - 1;\n while (*s == '\\0')\n s--;\n if (s <= tlist->string)\n return (((void *)0));\n while (s[-1] != '\\0' && s > tlist->string)\n s--;\n return (s);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#rcsgen_prep#buildrevision.c", "codebase": "rcs-5.10.1", "c_file": "rcsgen.c", "function": "buildrevision", "sloc": "38", "c_code": "char const *\nbuildrevision (struct wlink const *deltas, struct delta *target,\n FILE *outfile, _Bool expandflag)\n{\n struct editstuff *es = make_editstuff ();\n struct wlink *ls = ((top->repository. r)-> deltas);\n if (deltas->entry == target)\n {\n openfcopy (outfile);\n scandeltatext (es, &ls, target,\n expandflag ? expand : copy,\n 1);\n }\n else\n {\n scandeltatext (es, &ls, deltas->entry, enter, 0);\n while (ls = ls->next,\n (deltas = deltas->next)->next)\n {\n scandeltatext (es, &ls, deltas->entry, edit, 0);\n }\n if (expandflag || outfile)\n {\n finishedit (es, ((void *)0), outfile, 0);\n }\n scandeltatext (es, &ls, target,\n expandflag ? edit_expand : edit,\n 1);\n finishedit (es,\n expandflag ? target : ((void *)0),\n outfile, 1);\n }\n unmake_editstuff (es);\n if (outfile)\n return ((void *)0);\n Ozclose (&(top->flow. res));\n return (top->flow. result);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathPopNumber.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathPopNumber", "sloc": "16", "c_code": "double\nxmlXPathPopNumber (xmlXPathParserContextPtr ctxt) {\n xmlXPathObjectPtr obj;\n double ret;\n obj = valuePop(ctxt);\n if (obj == ((void *)0)) {\n { xmlXPatherror((ctxt), \"/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/libxml2/xpath.c\", 2038, (XPATH_INVALID_OPERAND)); if ((ctxt) != ((void *)0)) (ctxt)->error = (XPATH_INVALID_OPERAND); };\n return(0);\n }\n if (obj->type != XPATH_NUMBER)\n ret = xmlXPathCastToNumberInternal(ctxt, obj);\n else\n ret = obj->floatval;\n xmlXPathReleaseObject(ctxt->context, obj);\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#tiffutil_prep#minitiff_error.c", "codebase": "optipng-0.7.8", "c_file": "tiffutil.c", "function": "minitiff_error", "sloc": "8", "c_code": "void minitiff_error(const struct minitiff_info *info_ptr, const char *msg)\n{\n if (info_ptr->error_handler != ((void *)0))\n info_ptr->error_handler(msg);\n else\n default_error_handler(msg);\n abort();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MINIMUM_SUM_FACTORS_NUMBER_prep#len.c", "codebase": "transcoder-set", "c_file": "FIND_MINIMUM_SUM_FACTORS_NUMBER.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "grep-3.11#localename_prep#gl_locale_name_posix.c", "codebase": "grep-3.11", "c_file": "localename.c", "function": "gl_locale_name_posix", "sloc": "9", "c_code": "const char *\ngl_locale_name_posix (int category, __attribute__ ((__unused__)) const char *categoryname)\n{\n {\n const char *locname;\n locname = setlocale_null (category);\n return locname;\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#iri_prep#idn_encode.c", "codebase": "wget-1.21.4", "c_file": "iri.c", "function": "idn_encode", "sloc": "30", "c_code": "char *\nidn_encode (const struct iri *i, const char *host)\n{\n int ret;\n char *ascii_encoded;\n char *utf8_encoded = ((void *)0);\n const char *src;\n if (!i->utf8_encode)\n {\n if (!remote_to_utf8 (i, host, &utf8_encoded))\n return ((void *)0);\n src = utf8_encoded;\n }\n else\n src = host;\n ret = idn2_lookup_u8 ((uint8_t *) src, (uint8_t **) &ascii_encoded, IDN2_NONTRANSITIONAL);\n if (ret != IDN2_OK)\n ret = idn2_lookup_u8 ((uint8_t *) src, (uint8_t **) &ascii_encoded, IDN2_TRANSITIONAL);\n if (ret != IDN2_OK)\n logprintf (LOG_VERBOSE, gettext(\"idn_encode failed (%d): %s\\n\"), ret,\n quote (idn2_strerror (ret)));\n do { free ((void *) (utf8_encoded)); utf8_encoded = ((void *)0); } while (0);\n if (ret == IDN2_OK && ascii_encoded)\n {\n char *tmp = xstrdup (ascii_encoded);\n idn2_free (ascii_encoded);\n ascii_encoded = tmp;\n }\n return ret == IDN2_OK ? ascii_encoded : ((void *)0);\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 1, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tinycc#libtcc_prep#tcc_add_dll.c", "codebase": "tinycc", "c_file": "libtcc.c", "function": "tcc_add_dll", "sloc": "5", "c_code": "int tcc_add_dll(TCCState *s, const char *filename, int flags)\n{\n return tcc_add_library_internal(s, \"%s/%s\", filename, flags,\n s->library_paths, s->nb_library_paths);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#rcsutil_prep#str_save.c", "codebase": "rcs-5.10.1", "c_file": "rcsutil.c", "function": "str_save", "sloc": "5", "c_code": "char *\nstr_save (char const *s)\n{\n return intern (plexus, s, strlen (s));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#char_io_c_prep#Pl_Get_Key_No_Echo_1.c", "codebase": "gprolog-1.5.0", "c_file": "char_io_c.c", "function": "Pl_Get_Key_No_Echo_1", "sloc": "5", "c_code": "Bool\nPl_Get_Key_No_Echo_1(WamWord code_word)\n{\n return Pl_Get_Key_No_Echo_2(((PlLong) (0) + ((PlULong)0)), code_word);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_LARGEST_PRIME_FACTOR_NUMBER_LESS_EQUAL_N_prep#min.c", "codebase": "transcoder-set", "c_file": "SUM_LARGEST_PRIME_FACTOR_NUMBER_LESS_EQUAL_N.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#camellia-invert-key_prep#_nettle_camellia_invert_key.c", "codebase": "nettle-3.9.1", "c_file": "camellia-invert-key.c", "function": "_nettle_camellia_invert_key", "sloc": "12", "c_code": "void\n_nettle_camellia_invert_key(unsigned nkeys,\n uint64_t *dst, const uint64_t *src)\n{\n unsigned i;\n if (dst == src)\n for (i = 0; i < nkeys - 1 - i; i++)\n do { uint64_t t_swap = (dst[i]); (dst[i]) = (dst[nkeys - 1- i]); (dst[nkeys - 1- i]) = t_swap; } while(0);\n else\n for (i = 0; i < nkeys; i++)\n dst[i] = src[nkeys - 1 - i];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 2, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_via_prep#osip_via_set_comment.c", "codebase": "libosip2-5.3.1", "c_file": "osip_via.c", "function": "osip_via_set_comment", "sloc": "3", "c_code": "void osip_via_set_comment(osip_via_t *via, char *comment) {\n via->comment = comment;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "wget-1.21.4#css__prep#yyget_leng.c", "codebase": "wget-1.21.4", "c_file": "css_.c", "function": "yyget_leng", "sloc": "4", "c_code": "int yyget_leng (void)\n{\n return yyleng;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsCatMn.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsCatMn", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsCatMn(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsCatMn\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsCatMn\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsCatMn(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "screen-4.9.0#misc_prep#centerline.c", "codebase": "screen-4.9.0", "c_file": "misc.c", "function": "centerline", "sloc": "13", "c_code": "void\ncenterline(str, y)\nchar *str;\nint y;\n{\n int l, n;\n do {} while (0);\n n = strlen(str);\n if (n > flayer->l_width - 1)\n n = flayer->l_width - 1;\n l = (flayer->l_width - 1 - n) / 2;\n LPutStr(flayer, str, n, &mchar_blank, l, y);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlValidateNmtokenValue.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlValidateNmtokenValue", "sloc": "11", "c_code": "PyObject *\nlibxml_xmlValidateNmtokenValue(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlChar * value;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"z:xmlValidateNmtokenValue\", &value))\n return(((void *)0));\n c_retval = xmlValidateNmtokenValue(value);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tar-1.34#c-strcasecmp_prep#c_strcasecmp.c", "codebase": "tar-1.34", "c_file": "c-strcasecmp.c", "function": "c_strcasecmp", "sloc": "23", "c_code": "int\nc_strcasecmp (const char *s1, const char *s2)\n{\n register const unsigned char *p1 = (const unsigned char *) s1;\n register const unsigned char *p2 = (const unsigned char *) s2;\n unsigned char c1, c2;\n if (p1 == p2)\n return 0;\n do\n {\n c1 = c_tolower (*p1);\n c2 = c_tolower (*p2);\n if (c1 == '\\0')\n break;\n ++p1;\n ++p2;\n }\n while (c1 == c2);\n if ((0x7f * 2 + 1) <= 0x7fffffff)\n return c1 - c2;\n else\n return (((c1) > (c2)) - ((c1) < (c2)));\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 1}}, {"id": "gawk-5.2.2#debug_prep#do_condition.c", "codebase": "gawk-5.2.2", "c_file": "debug.c", "function": "do_condition", "sloc": "16", "c_code": "int\ndo_condition(CMDARG *arg, int cmd __attribute__ ((__unused__)))\n{\n int type, num;\n char *expr = ((void *)0);\n num = arg->value.lval;\n type = has_break_or_watch_point(&num, 0);\n if (! type)\n return 0;\n arg = arg->next;\n if (arg != ((void *)0))\n expr = arg->value.sval;\n if (parse_condition(type, num, expr) == 0 && arg != ((void *)0))\n arg->value.sval = ((void *)0);\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nano-7.2#chars_prep#is_zerowidth.c", "codebase": "nano-7.2", "c_file": "chars.c", "function": "is_zerowidth", "sloc": "9", "c_code": "_Bool is_zerowidth(const char *ch)\n{\n wchar_t wc;\n if ((unsigned char)*ch < 0xCC || !use_utf8)\n return 0;\n if (mbtowide(&wc, ch) < 0)\n return 0;\n return (wcwidth(wc) == 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_POSSIBLE_WAYS_TO_CONSTRUCT_BUILDINGS_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "COUNT_POSSIBLE_WAYS_TO_CONSTRUCT_BUILDINGS.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#awkgram_prep#getfname.c", "codebase": "gawk-5.2.2", "c_file": "awkgram.c", "function": "getfname", "sloc": "17", "c_code": "const char *\ngetfname(NODE *(*fptr)(int), _Bool prepend_awk)\n{\n int i, j;\n static char buf[100];\n j = sizeof(tokentab) / sizeof(tokentab[0]);\n for (i = 0; i < j; i++) {\n if (tokentab[i].ptr == fptr || tokentab[i].ptr2 == fptr) {\n if (prepend_awk && (tokentab[i].flags & 0x0400) != 0) {\n sprintf(buf, \"awk::%s\", tokentab[i].operator);\n return buf;\n }\n return tokentab[i].operator;\n }\n }\n return ((void *)0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "units-2.22#units_prep#unit2num.c", "codebase": "units-2.22", "c_file": "units.c", "function": "unit2num", "sloc": "13", "c_code": "int\nunit2num(struct unittype *input)\n{\n struct unittype one;\n int err;\n initializeunit(&one);\n if ((err=completereduce(input)))\n return err;\n if (compareunits(input,&one,ignore_nothing))\n return 5;\n freeunit(input);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_INSERTIONS_SORT_ARRAY_prep#main.c", "codebase": "transcoder-set", "c_file": "MINIMUM_INSERTIONS_SORT_ARRAY.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {4,7,20,22,23,31,33,36,47,61,63,63,71,74,82,91,95,99};\nint param0_1[] = {-84,12,-42,-78,22,72,56,70,28,-72};\nint param0_2[] = {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};\nint param0_3[] = {29,41,4,62,77,74,30,2,14,90,93,10,78,36,66,22,48,89,36,73,70,23,90};\nint param0_4[] = {-80,-72,-68,-66,-58,-50,-48,-32,-28,-24,-22,-18,0,2,6,10,12,14,14,18,24,24,24,28,28,28,34,38,42,42,46,46,46,58,80,82,82,84,84,86,88,90,92,96};\nint param0_5[] = {1,1,0,1,0,1,0,0,1,0};\nint param0_6[] = {26,36,58,64,69,72,79,82,82,87,89,90,95};\nint param0_7[] = {-52,-40,98,40,42,-50,60,-64,-92,36,-88,72,-72,38,-80,-52,68,70,16,22,-30,-74,56,-80,62,-54,-32,-22,-86,-70,88,-76,-46,28,40,-2,-84,68,-98,-16,90,36,-38,-86,20,-40,82,98,54};\nint param0_8[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};\nint param0_9[] = {36,62,58,24,99,12,46,3,4,40,54,97,48,94,98,7,17,5,3,36,3};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {15,7,16,13,36,8,8,41,10,16};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_build.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_build", "sloc": "1", "c_code": "long int ti_build(void) {return 1642469817;}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#imsg_prep#imsg_compose.c", "codebase": "tmux", "c_file": "imsg.c", "function": "imsg_compose", "sloc": "13", "c_code": "int\nimsg_compose(struct imsgbuf *ibuf, uint32_t type, uint32_t peerid, pid_t pid,\n int fd, const void *data, uint16_t datalen)\n{\n struct ibuf *wbuf;\n if ((wbuf = imsg_create(ibuf, type, peerid, pid, datalen)) == ((void *)0))\n return (-1);\n if (imsg_add(wbuf, data, datalen) == -1)\n return (-1);\n wbuf->fd = fd;\n imsg_close(ibuf, wbuf);\n return (1);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_TO_FIND_THE_AREA_OF_PENTAGON_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "PROGRAM_TO_FIND_THE_AREA_OF_PENTAGON.c", "function": "f_gold", "sloc": "5", "c_code": "float f_gold ( float a ) {\n float area;\n area = ( sqrt ( 5 * ( 5 + 2 * ( sqrt ( 5 ) ) ) ) * a * a ) / 4;\n return area;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "units-2.22#parse.tab_prep#factorial.c", "codebase": "units-2.22", "c_file": "parse.tab.c", "function": "factorial", "sloc": "5", "c_code": "double\nfactorial(double x)\n{\n return tgamma(x+1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#global_prep#back_it_up.c", "codebase": "nano-7.2", "c_file": "global.c", "function": "back_it_up", "sloc": "1", "c_code": "void back_it_up(void) {;}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngrio_prep#png_read_data.c", "codebase": "optipng-0.7.8", "c_file": "pngrio.c", "function": "png_read_data", "sloc": "9", "c_code": "void\npng_read_data(png_structrp png_ptr, png_bytep data, size_t length)\n{\n ((void)0);\n if (png_ptr->read_data_fn != ((void *)0))\n (*(png_ptr->read_data_fn))(png_ptr, data, length);\n else\n png_error(png_ptr, \"Call to NULL read function\");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "bc-1.07.1#storage_prep#push_num.c", "codebase": "bc-1.07.1", "c_file": "storage.c", "function": "push_num", "sloc": "9", "c_code": "void\npush_num (bc_num num)\n{\n estack_rec *temp;\n temp = bc_malloc (sizeof (estack_rec));\n temp->s_num = num;\n temp->s_next = ex_stack;\n ex_stack = temp;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_MINIMUM_NUMBER_SUBSETS_SUBSEQUENCES_CONSECUTIVE_NUMBERS_prep#main.c", "codebase": "transcoder-set", "c_file": "COUNT_MINIMUM_NUMBER_SUBSETS_SUBSEQUENCES_CONSECUTIVE_NUMBERS.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {3,7,7,11,14,14,14,16,17,17,21,22,24,27,27,27,31,33,35,36,36,37,38,43,45,49,52,54,57,59,59,60,67,73,74,74,74,75,75,79,83,87,90,93,97};\nint param0_1[] = {-28,72,60,62,40,64,50,-36,-24,40,-6,78,-80,-82,2,-30,70,94,-2,-30,92,12,-46,32,-96,-2,36,-40,-42,66,98};\nint param0_2[] = {1,1};\nint param0_3[] = {96,89,24,28,70,78,78,35,98,65,18,81,35,91,33,88,69,52,66,17,73,79,30,33,78,60,42,8,36,6,47,87,8,98,9,77,78,24,86,91,13,79,50,85,3,7,61,94,86};\nint param0_4[] = {-92,-92,-90,-84,-78,-66,-60,-60,-46,-42,-38,-32,-24,-20,-18,-16,-14,-10,0,4,6,12,24,32,34,44,48,50,50,64,66,68,80,84,86,86,88,90,90,90,92,94,96,98,98};\nint param0_5[] = {0,1,1,0,1,0,0,1,0,0,1,0,0,1,1,1,0,1,0,1,1,1,0,1,0,1,0,0,0,1,0,1,1,0,0,1,1,1,1,1,0,1,0,0,0};\nint param0_6[] = {8,12,13,14,16,20,20,21,23,23,24,27,29,29,29,29,35,35,38,39,40,46,50,52,60,62,62,65,65,65,70,71,72,73,75,76,80,81,82,83,85,91,95,97,98,98};\nint param0_7[] = {-84,92,70,-46,26,-94,-82,-26,-90,-62,52,62,-58,44,-14,-6,58,2,10,76,-34,42,-26,80,26,32,-82,38,2,72,68,44,24,84,-32,54,-96,-8,36,80,-82,32,98,-68};\nint param0_8[] = {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};\nint param0_9[] = {64,10,6,3,67,95,72,96,72,30,99,21,46,23,48,38,48,50,53,91,59,58,27,95,63,20,27,22,58,3,11,75,77,64,46,1,67,79,6,46,57,79,49,83,21,36,44};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {42,24,1,26,42,27,29,25,21,46};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_2_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_2.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#candles_prep#tc_gravestone_doji.c", "codebase": "tulipindicators-0.9.1", "c_file": "candles.c", "function": "tc_gravestone_doji", "sloc": "5", "c_code": "int tc_gravestone_doji(int size, TC_REAL const *const *inputs, tc_config const *options, tc_result *output) {\n const TC_REAL *open = inputs[0]; const TC_REAL *high = inputs[1]; const TC_REAL *low = inputs[2]; const TC_REAL *close = inputs[3]; const int period = options->period; const TC_REAL div = 1.0 / period; TC_REAL avg_body_sum = 0; TC_REAL avg_total_sum = 0; if (period < 1) return 1; if (size < period) return 0; int i; for (i = 0; i < period; ++i) { avg_body_sum += (fabs(open[(i)] - close[(i)])); avg_total_sum += (high[(i)] - low[(i)]); }\n while(i < size) { const TC_REAL top = (open[(i)] > close[(i)] ? open[(i)] : close[(i)]); const TC_REAL bottom = (open[(i)] < close[(i)] ? open[(i)] : close[(i)]); const TC_REAL body = (fabs(open[(i)] - close[(i)])); const TC_REAL total = (high[(i)] - low[(i)]); const TC_REAL upper = (high[(i)] - top); const TC_REAL lower = (bottom - low[(i)]); const TC_REAL avg_body = avg_body_sum * div; const TC_REAL avg_total = avg_total_sum * div; (void)top;(void)bottom;(void)body;(void)total; (void)upper;(void)lower;(void)avg_body;(void)avg_total; if (((fabs(open[(i)] - close[(i)])) < (options->body_none * avg_total)) && ((high[(i)] - top) > (options->wick_long * avg_body)) && ((bottom - low[(i)]) < (options->wick_none * avg_total))) { do { const tc_hit hit = {i, (1L<<12)}; const int r = tc_result_add(output, hit); if (r != 0) return r; } while (0); } avg_body_sum += body; avg_body_sum -= (fabs(open[(i-period)] - close[(i-period)])); avg_total_sum += total; avg_total_sum -= (high[(i-period)] - low[(i-period)]); ++i; };\n return 0;\n }\n", "c_constructs": {"pointer_type": 4, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_PRINT_SUM_GIVEN_NTH_TERM_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "PROGRAM_PRINT_SUM_GIVEN_NTH_TERM_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_equals_in_object_prep#json_write_minified_value.c", "codebase": "json.h", "c_file": "allow_equals_in_object.c", "function": "json_write_minified_value", "sloc": "35", "c_code": "char *json_write_minified_value(const struct json_value_s *value, char *data) {\n switch (value->type) {\n default:\n return 0;\n case json_type_number:\n return json_write_number((struct json_number_s *)value->payload, data);\n case json_type_string:\n return json_write_string((struct json_string_s *)value->payload, data);\n case json_type_array:\n return json_write_minified_array((struct json_array_s *)value->payload,\n data);\n case json_type_object:\n return json_write_minified_object((struct json_object_s *)value->payload,\n data);\n case json_type_true:\n data[0] = 't';\n data[1] = 'r';\n data[2] = 'u';\n data[3] = 'e';\n return data + 4;\n case json_type_false:\n data[0] = 'f';\n data[1] = 'a';\n data[2] = 'l';\n data[3] = 's';\n data[4] = 'e';\n return data + 5;\n case json_type_null:\n data[0] = 'n';\n data[1] = 'u';\n data[2] = 'l';\n data[3] = 'l';\n return data + 4;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 8, "break_continue_statement": 0}}, {"id": "libxml2#xmlschemas_prep#xmlSchemaSetValidOptions.c", "codebase": "libxml2", "c_file": "xmlschemas.c", "function": "xmlSchemaSetValidOptions", "sloc": "14", "c_code": "int\nxmlSchemaSetValidOptions(xmlSchemaValidCtxtPtr ctxt,\n int options)\n{\n int i;\n if (ctxt == ((void *)0))\n return (-1);\n for (i = 1; i < (int) sizeof(int) * 8; i++) {\n if (options & 1<options = options;\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_ONE_EXTRA_CHARACTER_STRING_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_ONE_EXTRA_CHARACTER_STRING_1.c", "function": "f_filled", "sloc": "1", "c_code": "char f_filled ( char strA [], char strB [] ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_CALCULATE_AREA_OCTAGON_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "PROGRAM_CALCULATE_AREA_OCTAGON.c", "function": "f_filled", "sloc": "1", "c_code": "double f_filled ( double side ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_ARRAY_REPRESENTS_INORDER_BINARY_SEARCH_TREE_NOT_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "CHECK_ARRAY_REPRESENTS_INORDER_BINARY_SEARCH_TREE_NOT.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "dap-3.10#dap_prep#suffix.c", "codebase": "dap-3.10", "c_file": "dap.c", "function": "suffix", "sloc": "20", "c_code": "void suffix(char name[], char suff[])\n{\n int n;\n n = strlen(name);\n if (n > 2 && !strcmp(name + n - 2, \".c\"))\n {\n name[n - 2] = '\\0';\n strcat(name, suff);\n }\n else if (n > 4 && !strcmp(name + n - 4, \".sbs\"))\n {\n name[n - 4] = '\\0';\n strcat(name, suff);\n }\n else\n {\n fprintf(stderr, \"dap: name must end in .c or .sbs: %s\\n\", name);\n exit(1);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlReaderNewDoc.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlReaderNewDoc", "sloc": "17", "c_code": "PyObject *\nlibxml_xmlReaderNewDoc(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlTextReaderPtr reader;\n PyObject *pyobj_reader;\n xmlChar * cur;\n char * URL;\n char * encoding;\n int options;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Ozzzi:xmlReaderNewDoc\", &pyobj_reader, &cur, &URL, &encoding, &options))\n return(((void *)0));\n reader = (xmlTextReaderPtr) (((pyobj_reader) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlTextReader_Object *)(pyobj_reader))->obj));\n c_retval = xmlReaderNewDoc(reader, cur, URL, encoding, options);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#WAYS_TRANSFORMING_ONE_STRING_REMOVING_0_CHARACTERS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "WAYS_TRANSFORMING_ONE_STRING_REMOVING_0_CHARACTERS.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( char a [], char b [] ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_lib_prep#__pth_thread_exists.c", "codebase": "pth-2.0.7", "c_file": "pth_lib.c", "function": "__pth_thread_exists", "sloc": "10", "c_code": "int __pth_thread_exists(pth_t t)\n{\n if (!__pth_pqueue_contains(&__pth_NQ, t))\n if (!__pth_pqueue_contains(&__pth_RQ, t))\n if (!__pth_pqueue_contains(&__pth_WQ, t))\n if (!__pth_pqueue_contains(&__pth_SQ, t))\n if (!__pth_pqueue_contains(&__pth_DQ, t))\n return ((*__errno_location ()) = (3), ((0)));\n return (!(0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tmux#arguments_prep#args_get.c", "codebase": "tmux", "c_file": "arguments.c", "function": "args_get", "sloc": "8", "c_code": "const char *\nargs_get(struct args *args, u_char ch)\n{\n struct args_entry *entry;\n if ((entry = args_find(args, ch)) == ((void *)0))\n return (((void *)0));\n return (entry->value);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_FIND_SLOPE_LINE_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "PROGRAM_FIND_SLOPE_LINE.c", "function": "f_gold", "sloc": "3", "c_code": "float f_gold ( float x1, float y1, float x2, float y2 ) {\n return ( y2 - y1 ) / ( x2 - x1 );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#ma2asm_prep#Invoke_Dico_Double.c", "codebase": "gprolog-1.5.0", "c_file": "ma2asm.c", "function": "Invoke_Dico_Double", "sloc": "8", "c_code": "void\nInvoke_Dico_Double(int no, char *str, void *info)\n{\n DoubleInf *d = (DoubleInf *) info;\n if (comment)\n Inst_Printf(\"\", \"%s %s\", mi.comment_prefix, d->cmt_str);\n Dico_Double(d);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "bc-1.07.1#scan_prep#yyrestart.c", "codebase": "bc-1.07.1", "c_file": "scan.c", "function": "yyrestart", "sloc": "10", "c_code": "void yyrestart (FILE * input_file )\n{\n if ( ! ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)) ){\n yyensure_buffer_stack ();\n (yy_buffer_stack)[(yy_buffer_stack_top)] =\n yy_create_buffer(yyin,16384 );\n }\n yy_init_buffer(( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)),input_file );\n yy_load_buffer_state( );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_CHARACTERS_STRING_DISTANCE_ENGLISH_ALPHABETS_prep#min.c", "codebase": "transcoder-set", "c_file": "COUNT_CHARACTERS_STRING_DISTANCE_ENGLISH_ALPHABETS.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libcsv#libcsv_prep#csv_set_space_func.c", "codebase": "libcsv", "c_file": "libcsv.c", "function": "csv_set_space_func", "sloc": "5", "c_code": "void\ncsv_set_space_func(struct csv_parser *p, int (*f)(unsigned char))\n{\n if (p) p->is_space = f;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#sbstrans3_prep#surveyselecttrans.c", "codebase": "dap-3.10", "c_file": "sbstrans3.c", "function": "surveyselecttrans", "sloc": "23", "c_code": "void surveyselecttrans(char *step, FILE *dapfile)\n{\n int s;\n int brace;\n int start;\n int resplen;\n int replace=0;\n static char nbtirage[127 + 1];\n static char setname[127 + 1];\n static char datafile[127 + 1];\n static char method[127 + 1];\n static char strreplace[127 + 1];\n static char getnames[4];\n if (!getoption(step, \"out\", setname, 1))\n strcpy(setname, sbstmp);\n if (!getoption(step, \"data\", datafile, 1))\n strcpy(datafile, sbstmp);\n if (!getoption(step, \"method\", method, 1))\n strcpy(method, sbstmp);\n if (!getoption(step, \"n\", nbtirage, 1))\n strcpy(nbtirage, \"1\");\n fprintf(dapfile, \" surveyselect(\\\"%s\\\", \\\"%s\\\" , \\\"%s\\\",%s);\\n\", datafile,setname,method,nbtirage);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#dap_prep#ecopy.c", "codebase": "dap-3.10", "c_file": "dap.c", "function": "ecopy", "sloc": "15", "c_code": "char *ecopy(char *e)\n{\n char *copy;\n if (e)\n {\n if (!(copy = malloc(strlen(e) + 1)))\n {\n perror(\"dap\");\n exit(1);\n }\n strcpy(copy, e);\n return copy;\n }\n return ((void *)0);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_VALUE_OF_Y_MOD_2_RAISED_TO_POWER_X_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FIND_VALUE_OF_Y_MOD_2_RAISED_TO_POWER_X.c", "function": "f_gold", "sloc": "5", "c_code": "long long int f_gold ( long long int y, long long int x ) {\n if ( log2 ( y ) < x ) return y;\n if ( x > 63 ) return y;\n return ( y % ( 1 << x ) );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP_1_prep#main.c", "codebase": "transcoder-set", "c_file": "HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP_1.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {2,2,2,7,10,14,24,38,42,50,59,60,72,73,79,83,89};\nint param0_1[] = {-48,98,96,-56,-2,58,52,-50,58,50,62,86,-26,-98,34,20,-28,56,-36};\nint param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1};\nint param0_3[] = {91,50,37};\nint param0_4[] = {-80,-26,0,0,6,14,22,76,82,88,98};\nint param0_5[] = {1,0};\nint param0_6[] = {9,24,24,33,48,50,55,61,69,79,83};\nint param0_7[] = {30,32,-82,-48,88,-24,74,2,90,98,68,82,32,-60,2,-94,18,14,46,50,-60,-74,-76,66,-76,-34,-20,82,-44,-62,34,48,-56,2,64,-78,-64,98,-10,-28,78,-42};\nint param0_8[] = {0,0,1,1,1,1,1,1,1,1,1,1};\nint param0_9[] = {38,74,99,75,44,75,24,70,78,74,60,59,34,27,7,23,19,95,4,35,38,22,46,1,44,20,52,1,96,57,5,76,49,1,37,35};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {9,9,20,2,10,1,8,27,6,31};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "wget-1.21.4#connect_prep#fd_close.c", "codebase": "wget-1.21.4", "c_file": "connect.c", "function": "fd_close", "sloc": "20", "c_code": "void\nfd_close (int fd)\n{\n struct transport_info *info;\n if (fd < 0)\n return;\n info = ((void *)0);\n if (transport_map)\n info = hash_table_get (transport_map, (void *)(intptr_t) fd);\n if (info && info->imp->closer)\n info->imp->closer (fd, info->ctx);\n else\n sock_close (fd);\n if (info)\n {\n hash_table_remove (transport_map, (void *)(intptr_t) fd);\n do { free ((void *) (info)); info = ((void *)0); } while (0);\n ++transport_map_modified_tick;\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 1, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#getopt_prep#rpl_getopt_internal.c", "codebase": "tar-1.34", "c_file": "getopt.c", "function": "rpl_getopt_internal", "sloc": "16", "c_code": "int\nrpl_getopt_internal (int argc, char **argv, const char *optstring,\n const struct rpl_option *longopts, int *longind, int long_only,\n int posixly_correct)\n{\n int result;\n getopt_data.rpl_optind = rpl_optind;\n getopt_data.rpl_opterr = rpl_opterr;\n result = _getopt_internal_r (argc, argv, optstring, longopts,\n longind, long_only, &getopt_data,\n posixly_correct);\n rpl_optind = getopt_data.rpl_optind;\n rpl_optarg = getopt_data.rpl_optarg;\n rpl_optopt = getopt_data.rpl_optopt;\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SCHEDULE_JOBS_SERVER_GETS_EQUAL_LOAD_prep#max.c", "codebase": "transcoder-set", "c_file": "SCHEDULE_JOBS_SERVER_GETS_EQUAL_LOAD.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cpio-2.14#util_prep#cpio_file_stat_free.c", "codebase": "cpio-2.14", "c_file": "util.c", "function": "cpio_file_stat_free", "sloc": "6", "c_code": "void\ncpio_file_stat_free (struct cpio_file_stat *file_hdr)\n{\n free (file_hdr->c_name);\n cpio_file_stat_init (file_hdr);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_LARGEST_PRIME_FACTOR_NUMBER_prep#main.c", "codebase": "transcoder-set", "c_file": "FIND_LARGEST_PRIME_FACTOR_NUMBER.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n long param0[] = {98,8,78,65,55,10,10,37,39,15};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "gprolog-1.5.0#bc_supp_prep#Pl_BC_Emulate_Cont_0.c", "codebase": "gprolog-1.5.0", "c_file": "bc_supp.c", "function": "Pl_BC_Emulate_Cont_0", "sloc": "10", "c_code": "WamCont\nPl_BC_Emulate_Cont_0(void)\n{\n WamCont codep;\n BCWord *bc;\n debug_call = (((WamWord *) pl_reg_bank)[256 +6]) & 1;\n bc = (BCWord *) (((((WamWord *) pl_reg_bank)[256 +6]) >> 1) << 1);\n codep = BC_Emulate_Byte_Code(bc);\n return (codep) ? codep : Pl_BC_Emulate_Pred(glob_func, glob_dyn);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Float_Fract_Part.c", "codebase": "gprolog-1.5.0", "c_file": "arith_inl_c.c", "function": "Pl_Fct_Float_Fract_Part", "sloc": "5", "c_code": "WamWord\nPl_Fct_Float_Fract_Part(WamWord x)\n{\n double d; if ((((PlLong) (x) & ((PlULong)0x7)) == (PlULong)0x7)) { Pl_Err_Type(pl_type_float, x); return x; } else d = Pl_Obtain_Float(((WamWord *) ((x) & (PlULong)0xfffffffffffffff8))); return Make_Tagged_Float(((d) - (((d) > 0) ? floor(d) : ceil(d))));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#list_prep#xmlListPopBack.c", "codebase": "libxml2", "c_file": "list.c", "function": "xmlListPopBack", "sloc": "6", "c_code": "void\nxmlListPopBack(xmlListPtr l)\n{\n if(!xmlListEmpty(l))\n xmlLinkDeallocator(l, l->sentinel->prev);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_PAIRS_DIFFERENCE_EQUAL_K_1_prep#main.c", "codebase": "transcoder-set", "c_file": "COUNT_PAIRS_DIFFERENCE_EQUAL_K_1.c", "function": "main", "sloc": "26", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {5,5,10,19,29,32,40,60,65,70,72,89,92};\nint param0_1[] = {-38,40,8,64,-38,56,4,8,84,60,-48,-78,-82,-88,-30,58,-58,62,-52,-98,24,22,14,68,-74,48,-56,-72,-90,26,-10,58,40,36,-80,68,58,-74,-46,-62,-12,74,-58};\nint param0_2[] = {0,0,1};\nint param0_3[] = {16,80,59,29,14,44,13,76,7,65,62,1,34,49,70,96,73,71,42,73,66,96};\nint param0_4[] = {-98,-88,-58,-56,-48,-34,-22,-18,-14,-14,-8,-4,-2,2,18,38,42,46,54,68,70,90,94,96,98};\nint param0_5[] = {0,1,1};\nint param0_6[] = {11,43,50,58,60,68,75};\nint param0_7[] = {86,94,-80,0,52,-56,42,88,-10,24,6,8};\nint param0_8[] = {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};\nint param0_9[] = {54,99,4,14,9,34,81,36,80,50,34,9,7};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {7,24,1,12,23,2,4,11,29,9};\n int param2[] = {12,36,1,16,22,1,4,9,30,8};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#BIN_PACKING_PROBLEM_MINIMIZE_NUMBER_OF_USED_BINS_prep#max.c", "codebase": "transcoder-set", "c_file": "BIN_PACKING_PROBLEM_MINIMIZE_NUMBER_OF_USED_BINS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#prompt_prep#do_statusbar_end.c", "codebase": "nano-7.2", "c_file": "prompt.c", "function": "do_statusbar_end", "sloc": "4", "c_code": "void do_statusbar_end(void)\n{\n typing_x = strlen(answer);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_1.c", "function": "f_gold", "sloc": "6", "c_code": "unsigned int f_gold ( unsigned int n ) {\n unsigned int p = 1;\n if ( n && ! ( n & ( n - 1 ) ) ) return n;\n while ( p < n ) p <<= 1;\n return p;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "cflow-1.7#symbol_prep#first_starter.c", "codebase": "cflow-1.7", "c_file": "symbol.c", "function": "first_starter", "sloc": "15", "c_code": "Symbol *\nfirst_starter(void *itr)\n{\n struct linked_list_entry *p = ((start_symbol_list) ? (start_symbol_list)->head : ((void *)0));\n while (p) {\n Symbol *sym = p->data;\n if (sym->type != SymUndefined) {\n *(void**)itr = p->next;\n return sym;\n }\n p = p->next;\n }\n *(void**)itr = ((void *)0);\n return ((void *)0);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME_prep#min.c", "codebase": "transcoder-set", "c_file": "FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_high_prep#pth_accept_ev.c", "codebase": "pth-2.0.7", "c_file": "pth_high.c", "function": "pth_accept_ev", "sloc": "39", "c_code": "int pth_accept_ev(int s, struct sockaddr *addr, socklen_t *addrlen, pth_event_t ev_extra)\n{\n pth_event_t ev;\n static pth_key_t ev_key = (-1);\n int fdmode;\n int rv;\n if (!__pth_initialized) pth_init();;\n ;\n if (!__pth_util_fd_valid(s))\n return ((*__errno_location ()) = (9), (-1));\n if ((fdmode = pth_fdmode(s, PTH_FDMODE_NONBLOCK)) == PTH_FDMODE_ERROR)\n return ((*__errno_location ()) = (9), (-1));\n ev = ((void *)0);\n while ((rv = accept(s, addr, addrlen)) == -1\n && ((*__errno_location ()) == 11 || (*__errno_location ()) == 11)\n && fdmode != PTH_FDMODE_NONBLOCK) {\n if (ev == ((void *)0)) {\n if ((ev = pth_event((1<<(1))|(1<<(12))|(1<<(22)), &ev_key, s)) == ((void *)0))\n return ((*__errno_location ()) = ((*__errno_location ())), (-1));\n if (ev_extra != ((void *)0))\n pth_event_concat(ev, ev_extra, ((void *)0));\n }\n pth_wait(ev);\n if (ev_extra != ((void *)0)) {\n pth_event_isolate(ev);\n if (pth_event_status(ev) != PTH_STATUS_OCCURRED) {\n pth_fdmode(s, fdmode);\n return ((*__errno_location ()) = (4), (-1));\n }\n }\n }\n for ( __pth_errno_storage = (*__errno_location ()), __pth_errno_flag = (!(0)); __pth_errno_flag; (*__errno_location ()) = __pth_errno_storage, __pth_errno_flag = (0) ) {\n pth_fdmode(s, fdmode);\n if (rv != -1)\n pth_fdmode(rv, fdmode);\n }\n ;\n return rv;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 9, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "indent-2.2.13#code_io_prep#skip_horiz_space.c", "codebase": "indent-2.2.13", "c_file": "code_io.c", "function": "skip_horiz_space", "sloc": "9", "c_code": "extern char * skip_horiz_space(\n const char * p)\n{\n while ((*p == ' ') || (*p == '\\t'))\n {\n p++;\n }\n return (char *)p;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlReconciliateNs.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlReconciliateNs", "sloc": "16", "c_code": "PyObject *\nlibxml_xmlReconciliateNs(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlDocPtr doc;\n PyObject *pyobj_doc;\n xmlNodePtr tree;\n PyObject *pyobj_tree;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"OO:xmlReconciliateNs\", &pyobj_doc, &pyobj_tree))\n return(((void *)0));\n doc = (xmlDocPtr) (((pyobj_doc) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_doc))->obj));\n tree = (xmlNodePtr) (((pyobj_tree) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_tree))->obj));\n c_retval = xmlReconciliateNs(doc, tree);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "patch-2.7.6#quotearg_prep#quote_mem.c", "codebase": "patch-2.7.6", "c_file": "quotearg.c", "function": "quote_mem", "sloc": "5", "c_code": "char const *\nquote_mem (char const *arg, size_t argsize)\n{\n return quote_n_mem (0, arg, argsize);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_PAIRS_DIFFERENCE_EQUAL_K_1_prep#len.c", "codebase": "transcoder-set", "c_file": "COUNT_PAIRS_DIFFERENCE_EQUAL_K_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#parserInternals_prep#xmlCtxtNewInputFromIO.c", "codebase": "libxml2", "c_file": "parserInternals.c", "function": "xmlCtxtNewInputFromIO", "sloc": "17", "c_code": "xmlParserInputPtr\nxmlCtxtNewInputFromIO(xmlParserCtxtPtr ctxt, const char *url,\n xmlInputReadCallback ioRead,\n xmlInputCloseCallback ioClose,\n void *ioCtxt, const char *encoding, int flags) {\n xmlParserInputPtr input;\n if ((ctxt == ((void *)0)) || (ioRead == ((void *)0)))\n return(((void *)0));\n input = xmlNewInputFromIO(url, ioRead, ioClose, ioCtxt, flags);\n if (input == ((void *)0)) {\n xmlCtxtErrMemory(ctxt);\n return(((void *)0));\n }\n if (encoding != ((void *)0))\n xmlSwitchInputEncodingName(ctxt, input, encoding);\n return(input);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tar-1.34#extract_prep#rename_directory.c", "codebase": "tar-1.34", "c_file": "extract.c", "function": "rename_directory", "sloc": "28", "c_code": "_Bool\nrename_directory (char *src, char *dst)\n{\n if (renameat (chdir_fd, src, chdir_fd, dst) == 0)\n fixup_delayed_set_stat (src, dst);\n else\n {\n int e = (*__errno_location ());\n _Bool interdir_made;\n switch (e)\n {\n case 2:\n if (make_directories (dst, &interdir_made) == 0)\n {\n if (renameat (chdir_fd, src, chdir_fd, dst) == 0)\n return 1;\n e = (*__errno_location ());\n }\n break;\n case 18:\n default:\n break;\n }\n do { if (error_hook) error_hook (); error (0, e, gettext (\"Cannot rename %s to %s\"), quote_n (0, src), quote_n (1, dst)); exit_status = 2; } while (0);\n return 0;\n }\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 2}}, {"id": "transcoder-set#PRIMALITY_TEST_SET_5USING_LUCAS_LEHMER_SERIES_prep#sort.c", "codebase": "transcoder-set", "c_file": "PRIMALITY_TEST_SET_5USING_LUCAS_LEHMER_SERIES.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pnmin_prep#pnm_fget_bytes.c", "codebase": "optipng-0.7.8", "c_file": "pnmin.c", "function": "pnm_fget_bytes", "sloc": "65", "c_code": "int pnm_fget_bytes(const pnm_struct *pnm_ptr,\n unsigned char *sample_bytes,\n size_t sample_size,\n unsigned int num_rows,\n FILE *stream)\n{\n unsigned int format = pnm_ptr->format;\n unsigned int depth = pnm_ptr->depth;\n unsigned int width = pnm_ptr->width;\n unsigned int maxval = pnm_ptr->maxval;\n size_t row_length = (size_t)depth * (size_t)width;\n size_t num_samples = num_rows * row_length;\n size_t raw_sample_size;\n int ch, mask;\n size_t i, j;\n if (maxval <= 0xffU)\n raw_sample_size = 1;\n else if (maxval <= 0xffffU)\n raw_sample_size = 2;\n else if (maxval <= 0xffffffU)\n raw_sample_size = 3;\n else if (maxval <= 0xffffffffU)\n raw_sample_size = 4;\n else\n raw_sample_size = !sample_size;\n if (raw_sample_size != sample_size)\n {\n (*__errno_location ()) = 22;\n return 0;\n }\n switch (format)\n {\n case PNM_P4:\n for (i = j = 0; i < num_samples; )\n {\n ch = getc(stream);\n if (ch == (-1))\n break;\n for (mask = 0x80; mask != 0; mask >>= 1)\n {\n sample_bytes[i++] = (unsigned char)((ch & mask) ? 0 : 1);\n if (++j == row_length)\n {\n j = 0;\n break;\n }\n }\n }\n break;\n case PNM_P5:\n case PNM_P6:\n case PNM_P7:\n i = fread(sample_bytes, sample_size, num_samples, stream);\n break;\n default:\n (*__errno_location ()) = 22;\n return 0;\n }\n if (i < num_samples)\n {\n memset(sample_bytes + i, 0, sample_size * num_samples - i);\n return -1;\n }\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 8, "for_loop": 2, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 4}}, {"id": "less-633#ch_prep#ch_length.c", "codebase": "less-633", "c_file": "ch.c", "function": "ch_length", "sloc": "12", "c_code": "POSITION ch_length(void)\n{\n if (thisfile == ((void *)0))\n return (((POSITION)(-1)));\n if (ignore_eoi)\n return (((POSITION)(-1)));\n if (thisfile->flags & 010)\n return (size_helpdata);\n if (thisfile->flags & 020)\n return (0);\n return (thisfile->fsize);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#hash_fct_prep#Pl_Hash_Incr_Init.c", "codebase": "gprolog-1.5.0", "c_file": "hash_fct.c", "function": "Pl_Hash_Incr_Init", "sloc": "6", "c_code": "void\nPl_Hash_Incr_Init(HashIncrInfo *hi)\n{\n hi->len = 0;\n hi->hash = Hash_Initialize();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#adosc_prep#ti_adosc.c", "codebase": "tulipindicators-0.9.1", "c_file": "adosc.c", "function": "ti_adosc", "sloc": "35", "c_code": "int ti_adosc(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *high = inputs[0];\n const double *low = inputs[1];\n const double *close = inputs[2];\n const double *volume = inputs[3];\n const int short_period = (int)options[0];\n const int long_period = (int)options[1];\n const int start = long_period - 1;\n if (short_period < 1) return 1;\n if (long_period < short_period) return 1;\n if (size <= ti_adosc_start(options)) return 0;\n const double short_per = 2 / ((double)short_period + 1);\n const double long_per = 2 / ((double)long_period + 1);\n double *output = outputs[0];\n double sum = 0, short_ema = 0, long_ema = 0;\n int i;\n for (i = 0; i < size; ++i) {\n const double hl = (high[i] - low[i]);\n if (hl != 0.0) {\n sum += (close[i] - low[i] - high[i] + close[i]) / hl * volume[i];\n }\n if (i == 0) {\n short_ema = sum;\n long_ema = sum;\n } else {\n short_ema = (sum-short_ema) * short_per + short_ema;\n long_ema = (sum-long_ema) * long_per + long_ema;\n }\n if (i >= start) {\n *output++ = short_ema - long_ema;\n }\n }\n ((void) sizeof ((output - outputs[0] == size - ti_adosc_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_adosc_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_adosc_start(options)\", \"indicators/adosc.c\", 73, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 5, "array_type": 7, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "cflow-1.7#symbol_prep#install_ident.c", "codebase": "cflow-1.7", "c_file": "symbol.c", "function": "install_ident", "sloc": "10", "c_code": "Symbol *\ninstall_ident(char *name, enum storage storage)\n{\n Symbol *sp;\n sp = install(name,\n storage != AutoStorage ?\n 0x02 : 0x00);\n init_ident(sp, storage);\n return sp;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 1, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#xchecks_prep#__c2rust_hash_event_base_struct.c", "codebase": "tmux", "c_file": "xchecks.c", "function": "__c2rust_hash_event_base_struct", "sloc": "3", "c_code": "uint64_t __c2rust_hash_event_base_struct(void *l, size_t depth) {\n return 0xABCD0005;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "snudown#buffer_prep#bufprefix.c", "codebase": "snudown", "c_file": "buffer.c", "function": "bufprefix", "sloc": "13", "c_code": "int\nbufprefix(const struct buf *buf, const char *prefix)\n{\n size_t i;\n ((void) sizeof ((buf && buf->unit) ? 1 : 0), __extension__ ({ if (buf && buf->unit) ; else __assert_fail (\"buf && buf->unit\", \"buffer.c\", 33, __extension__ __PRETTY_FUNCTION__); }));\n for (i = 0; i < buf->size; ++i) {\n if (prefix[i] == 0)\n return 0;\n if (buf->data[i] != prefix[i])\n return buf->data[i] - prefix[i];\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "heman#draw_prep#heman_draw_points.c", "codebase": "heman", "c_file": "draw.c", "function": "heman_draw_points", "sloc": "18", "c_code": "void heman_draw_points(heman_image* target, heman_points* pts, float val)\n{\n float* src = pts->data;\n for (int k = 0; k < pts->width; k++) {\n float x = src[0];\n float y = src[1];\n src += pts->nbands;\n int i = x * target->width;\n int j = y * target->height;\n if (i < 0 || i >= target->width || j < 0 || j >= target->height) {\n continue;\n }\n float* texel = heman_image_texel(target, i, j);\n for (int c = 0; c < target->nbands; c++) {\n *texel++ = val;\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "transcoder-set#COUNT_NUMBER_WAYS_REACH_GIVEN_SCORE_GAME_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBER_WAYS_REACH_GIVEN_SCORE_GAME.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#eax_prep#nettle_eax_set_nonce.c", "codebase": "nettle-3.9.1", "c_file": "eax.c", "function": "nettle_eax_set_nonce", "sloc": "12", "c_code": "void\nnettle_eax_set_nonce (struct eax_ctx *eax, const struct eax_key *key,\n const void *cipher, nettle_cipher_func *f,\n size_t nonce_length, const uint8_t *nonce)\n{\n omac_init (&eax->omac_nonce, 0);\n omac_update (&eax->omac_nonce, key, cipher, f, nonce_length, nonce);\n omac_final (&eax->omac_nonce, key, cipher, f);\n memcpy (eax->ctr.b, eax->omac_nonce.b, 16);\n omac_init (&eax->omac_data, 1);\n omac_init (&eax->omac_message, 2);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#tty_prep#tty_putn.c", "codebase": "tmux", "c_file": "tty.c", "function": "tty_putn", "sloc": "13", "c_code": "void\ntty_putn(struct tty *tty, const void *buf, size_t len, u_int width)\n{\n tty_add(tty, buf, len);\n if (tty->cx + width > tty->sx) {\n tty->cx = (tty->cx + width) - tty->sx;\n if (tty->cx <= tty->sx)\n tty->cy++;\n else\n tty->cx = tty->cy = (0x7fffffff * 2U + 1U);\n } else\n tty->cx += width;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#NEXT_POWER_OF_2_2_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "NEXT_POWER_OF_2_2.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#bitset_prep#opng_bitset_find_last.c", "codebase": "optipng-0.7.8", "c_file": "bitset.c", "function": "opng_bitset_find_last", "sloc": "11", "c_code": "int\nopng_bitset_find_last(opng_bitset_t set)\n{\n int i;\n for (i = OPNG_BITSET_ELT_MAX; i >= 0; --i)\n {\n if ((((set) & (1U << (i))) != 0))\n return i;\n }\n return -1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "cpio-2.14#paxexit_prep#pax_exit.c", "codebase": "cpio-2.14", "c_file": "paxexit.c", "function": "pax_exit", "sloc": "5", "c_code": "void\npax_exit ()\n{\n exit (exit_status);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "cpio-2.14#copypass_prep#link_to_maj_min_ino.c", "codebase": "cpio-2.14", "c_file": "copypass.c", "function": "link_to_maj_min_ino", "sloc": "18", "c_code": "int\nlink_to_maj_min_ino (char *file_name, int st_dev_maj, int st_dev_min,\n ino_t st_ino)\n{\n int link_res;\n char *link_name;\n link_res = -1;\n link_name = find_inode_file (st_ino,\n st_dev_maj,\n st_dev_min);\n if (link_name == ((void *)0))\n add_inode (st_ino, file_name,\n st_dev_maj,\n st_dev_min);\n else\n link_res = link_to_name (file_name, link_name);\n return link_res;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#progress_prep#progress_update.c", "codebase": "wget-1.21.4", "c_file": "progress.c", "function": "progress_update", "sloc": "12", "c_code": "void\nprogress_update (void *progress, wgint howmuch, double dltime)\n{\n if (dltime >= 0x7fffffff)\n dltime = 0x7fffffff - 1;\n else if (dltime < 0)\n dltime = 0;\n if (howmuch < 0)\n howmuch = 0;\n current_impl->update (progress, howmuch, dltime);\n current_impl->draw (progress);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#gcm-aes192_prep#nettle_gcm_aes192_digest.c", "codebase": "nettle-3.9.1", "c_file": "gcm-aes192.c", "function": "nettle_gcm_aes192_digest", "sloc": "6", "c_code": "void\nnettle_gcm_aes192_digest(struct gcm_aes192_ctx *ctx,\n size_t length, uint8_t *digest)\n{\n (0 ? (nettle_aes192_encrypt)(&(ctx)->cipher, ~(size_t) 0, (uint8_t *) 0, (const uint8_t *) 0) : nettle_gcm_digest(&(ctx)->gcm, &(ctx)->key, &(ctx)->cipher, (nettle_cipher_func *) (nettle_aes192_encrypt), (length), (digest)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_ppo_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_ppo_start", "sloc": "4", "c_code": "int ti_ppo_start(double const *options) {\n (void)options;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#wam_inst_prep#Pl_Put_Y_Variable.c", "codebase": "gprolog-1.5.0", "c_file": "wam_inst.c", "function": "Pl_Put_Y_Variable", "sloc": "5", "c_code": "WamWord\nPl_Put_Y_Variable(WamWord *y_adr)\n{\n return *y_adr = (((PlLong) (y_adr) + ((PlULong)0)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathFunctionLookupNS.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathFunctionLookupNS", "sloc": "24", "c_code": "xmlXPathFunction\nxmlXPathFunctionLookupNS(xmlXPathContextPtr ctxt, const xmlChar *name,\n const xmlChar *ns_uri) {\n xmlXPathFunction ret;\n if (ctxt == ((void *)0))\n return(((void *)0));\n if (name == ((void *)0))\n return(((void *)0));\n if (ctxt->funcLookupFunc != ((void *)0)) {\n xmlXPathFuncLookupFunc f;\n f = ctxt->funcLookupFunc;\n ret = f(ctxt->funcLookupData, name, ns_uri);\n if (ret != ((void *)0))\n return(ret);\n }\n if (ctxt->funcHash == ((void *)0))\n return(((void *)0));\n\n#pragma GCC diagnostic push\n\n#pragma GCC diagnostic ignored \"-Wpedantic\"\n\n#pragma GCC diagnostic ignored \"-Wcast-function-type\"\n\n ret = (xmlXPathFunction) xmlHashLookup2(ctxt->funcHash, name, ns_uri);\n\n#pragma GCC diagnostic pop\n\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 8, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlStringLenDecodeEntities.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlStringLenDecodeEntities", "sloc": "11", "c_code": "xmlChar *\nxmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,\n int what __attribute__((unused)),\n xmlChar end, xmlChar end2, xmlChar end3) {\n if ((ctxt == ((void *)0)) || (str == ((void *)0)) || (len < 0))\n return(((void *)0));\n if ((str[len] != 0) ||\n (end != 0) || (end2 != 0) || (end3 != 0))\n return(((void *)0));\n return(xmlExpandEntitiesInAttValue(ctxt, str, 0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#hash_prep#Pl_Hash_Table_Size.c", "codebase": "gprolog-1.5.0", "c_file": "hash.c", "function": "Pl_Hash_Table_Size", "sloc": "5", "c_code": "int\nPl_Hash_Table_Size(char *tbl)\n{\n return (((int *)(tbl))[0]);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_EQUAL_POINT_STRING_BRACKETS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_EQUAL_POINT_STRING_BRACKETS.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( char str [] ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME_1.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#pred_prep#pred_sanity_check.c", "codebase": "findutils-4.9.0", "c_file": "pred.c", "function": "pred_sanity_check", "sloc": "36", "c_code": "void\npred_sanity_check (const struct predicate *predicates)\n{\n const struct predicate *p;\n for (p=predicates; p != ((void *)0); p=p->pred_next)\n {\n ((void) sizeof ((p->pred_func != ((void *)0)) ? 1 : 0), __extension__ ({ if (p->pred_func != ((void *)0)) ; else __assert_fail (\"p->pred_func != NULL\", \"pred.c\", 1310, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((p->parser_entry != ((void *)0)) ? 1 : 0), __extension__ ({ if (p->parser_entry != ((void *)0)) ; else __assert_fail (\"p->parser_entry != NULL\", \"pred.c\", 1313, __extension__ __PRETTY_FUNCTION__); }));\n if (p->parser_entry->pred_func)\n {\n ((void) sizeof ((p->parser_entry->pred_func == p->pred_func) ? 1 : 0), __extension__ ({ if (p->parser_entry->pred_func == p->pred_func) ; else __assert_fail (\"p->parser_entry->pred_func == p->pred_func\", \"pred.c\", 1322, __extension__ __PRETTY_FUNCTION__); }));\n }\n switch (p->parser_entry->type)\n {\n case ARG_OPTION:\n case ARG_POSITIONAL_OPTION:\n ((void) sizeof ((p->parser_entry->type != ARG_OPTION) ? 1 : 0), __extension__ ({ if (p->parser_entry->type != ARG_OPTION) ; else __assert_fail (\"p->parser_entry->type != ARG_OPTION\", \"pred.c\", 1338, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((p->parser_entry->type != ARG_POSITIONAL_OPTION) ? 1 : 0), __extension__ ({ if (p->parser_entry->type != ARG_POSITIONAL_OPTION) ; else __assert_fail (\"p->parser_entry->type != ARG_POSITIONAL_OPTION\", \"pred.c\", 1339, __extension__ __PRETTY_FUNCTION__); }));\n break;\n case ARG_ACTION:\n ((void) sizeof ((p->side_effects) ? 1 : 0), __extension__ ({ if (p->side_effects) ; else __assert_fail (\"p->side_effects\", \"pred.c\", 1343, __extension__ __PRETTY_FUNCTION__); }));\n if (!( ((p)->pred_func) == (pred_prune) ) && !( ((p)->pred_func) == (pred_quit) ))\n {\n ((void) sizeof ((p->no_default_print) ? 1 : 0), __extension__ ({ if (p->no_default_print) ; else __assert_fail (\"p->no_default_print\", \"pred.c\", 1349, __extension__ __PRETTY_FUNCTION__); }));\n }\n break;\n case ARG_SPECIAL_PARSE:\n case ARG_TEST:\n case ARG_PUNCTUATION:\n case ARG_NOOP:\n ((void) sizeof ((!p->no_default_print) ? 1 : 0), __extension__ ({ if (!p->no_default_print) ; else __assert_fail (\"!p->no_default_print\", \"pred.c\", 1363, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((!p->side_effects) ? 1 : 0), __extension__ ({ if (!p->side_effects) ; else __assert_fail (\"!p->side_effects\", \"pred.c\", 1364, __extension__ __PRETTY_FUNCTION__); }));\n break;\n }\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 10, "memory_management": 0, "memory_operation": 0, "if_statement": 11, "for_loop": 1, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 3}}, {"id": "uucp-1.07#picksb_prep#fsysdep_uupick_init.c", "codebase": "uucp-1.07", "c_file": "picksb.c", "function": "fsysdep_uupick_init", "sloc": "21", "c_code": "boolean\nfsysdep_uupick_init (zsystem, zpubdir)\n const char *zsystem __attribute__ ((__unused__));\n const char *zpubdir;\n{\n const char *zuser;\n zuser = zsysdep_login_name ();\n zStopdir = (char *) xmalloc (strlen (zpubdir)\n + sizeof \"/receive/\"\n + strlen (zuser));\n sprintf (zStopdir, \"%s/receive/%s\", zpubdir, zuser);\n qStopdir = opendir (zStopdir);\n if (qStopdir == ((void *)0) && (*__errno_location ()) != 2)\n {\n ulog (LOG_ERROR, \"opendir (%s): %s\", zStopdir,\n strerror ((*__errno_location ())));\n return (0);\n }\n qSsysdir = ((void *)0);\n return (1);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MAXIMUM_DOT_PRODUCT_TWO_ARRAYS_INSERTION_0S_prep#main.c", "codebase": "transcoder-set", "c_file": "FIND_MAXIMUM_DOT_PRODUCT_TWO_ARRAYS_INSERTION_0S.c", "function": "main", "sloc": "37", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {7,9,22,68};\nint param0_1[] = {24,40,98,58,-24,24,76,48,-92,-16,-46,-48,-70,88,66,2,44,36,34,34,46,90,-80,-24,-58,68,72,-20,-62,-40};\nint param0_2[] = {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};\nint param0_3[] = {32,15,41,41,4,42,22,33,33,11,68,5,41,80,39,15,36,75,41,11,25,40,50,19,39,12,75,28,52,20,63,5,27,53,19,62,98,72,10,90,74,93,52,81,91,65,90,93};\nint param0_4[] = {-94,-76,-68,-50,-28,-20,18,24,30,54,74,84,98};\nint param0_5[] = {1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,0,0,1,1,0,1,1,1,0,0,0,0,1,0,0,0,0,1,0,0,1,1,1,0,1,0};\nint param0_6[] = {14,27,43,49};\nint param0_7[] = {78,-26,-12,38,-90};\nint param0_8[] = {0,1,1,1};\nint param0_9[] = {12,69,57,7,52,14,15,83,67,57,15,86,81,43,1,64,45,68,30,23,14,70,13,51,23,33,98,68,24,43,12,82,46};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1_0[] = {14,22,54,58};\nint param1_1[] = {30,-88,6,-26,-76,14,-80,-30,-58,76,40,-28,-54,38,-60,-60,88,-80,-22,90,50,-48,68,-26,26,-2,68,-16,88,-72};\nint param1_2[] = {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,1};\nint param1_3[] = {80,18,9,29,62,89,4,40,47,15,35,82,22,97,63,54,7,58,64,73,54,79,21,21,20,19,56,42,6,97,7,34,55,35,57,86,73,88,20,29,48,52,8,77,2,12,6,47};\nint param1_4[] = {-88,-80,-78,-68,-44,-38,42,50,62,68,70,80,92};\nint param1_5[] = {1,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0,0,1,0,1,1,0,1,0,1,1,0,1,0,0,1,0,0,1,0,1,0,1,0,1};\nint param1_6[] = {51,59,76,83};\nint param1_7[] = {14,50,-6,-38,80};\nint param1_8[] = {0,0,0,1};\nint param1_9[] = {12,48,57,40,47,36,22,50,68,98,77,78,39,55,87,75,65,27,33,27,70,34,67,71,84,33,7,61,3,9,67,92,60};\nint *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9};\n int param2[] = {3,22,22,30,11,21,2,3,3,17};\n int param3[] = {2,22,19,25,8,33,2,2,2,32};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "make-4.4.1#output_prep#pfatal_with_name.c", "codebase": "make-4.4.1", "c_file": "output.c", "function": "pfatal_with_name", "sloc": "6", "c_code": "void\npfatal_with_name (const char *name)\n{\n const char *err = strerror ((*__errno_location ()));\n fatal((((floc *)0)), strlen (name) + strlen (err), (gettext (\"%s: %s\")), (name), (err));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#session_prep#sessions_RB_NEXT.c", "codebase": "tmux", "c_file": "session.c", "function": "sessions_RB_NEXT", "sloc": "1", "c_code": "struct session * sessions_RB_NEXT(struct session *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)->entry.rbe_parent && (elm == ((elm)->entry.rbe_parent)->entry.rbe_right)) elm = (elm)->entry.rbe_parent; elm = (elm)->entry.rbe_parent; } } return (elm); }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#sdp_message_prep#sdp_time_descr_init.c", "codebase": "libosip2-5.3.1", "c_file": "sdp_message.c", "function": "sdp_time_descr_init", "sloc": "9", "c_code": "int sdp_time_descr_init(sdp_time_descr_t **td) {\n *td = (sdp_time_descr_t *) (osip_malloc_func ? osip_malloc_func(sizeof(sdp_time_descr_t)) : malloc(sizeof(sdp_time_descr_t)));\n if (*td == ((void *)0))\n return -4;\n (*td)->t_start_time = ((void *)0);\n (*td)->t_stop_time = ((void *)0);\n osip_list_init(&(*td)->r_repeats);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "cpio-2.14#util_prep#disk_buffered_write.c", "codebase": "cpio-2.14", "c_file": "util.c", "function": "disk_buffered_write", "sloc": "22", "c_code": "void\ndisk_buffered_write (char *in_buf, int out_des, off_t num_bytes)\n{\n off_t bytes_left = num_bytes;\n off_t space_left;\n while (bytes_left > 0)\n {\n space_left = 512 - output_size;\n if (space_left == 0)\n disk_empty_output_buffer (out_des, 0);\n else\n {\n if (bytes_left < space_left)\n space_left = bytes_left;\n memcpy (out_buff, in_buf, (unsigned) space_left);\n out_buff += space_left;\n output_size += space_left;\n in_buf += space_left;\n bytes_left -= space_left;\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "uucp-1.07#protg_prep#fvstart.c", "codebase": "uucp-1.07", "c_file": "protg.c", "function": "fvstart", "sloc": "9", "c_code": "boolean\nfvstart (qdaemon, pzlog)\n struct sdaemon *qdaemon;\n char **pzlog;\n{\n if (iGrequest_packsize == (64))\n iGrequest_packsize = 1024;\n return fgstart (qdaemon, pzlog);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MINIMUM_NUMBER_OF_COINS_THAT_MAKE_A_CHANGE_1_prep#min.c", "codebase": "transcoder-set", "c_file": "FIND_MINIMUM_NUMBER_OF_COINS_THAT_MAKE_A_CHANGE_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_SET_13_CUTTING_A_ROD_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_SET_13_CUTTING_A_ROD.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_acos_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_acos_start", "sloc": "1", "c_code": "int ti_acos_start(double const *options) { (void)options; return 0; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE_prep#len.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_OCCURRENCES_CHARACTER_APPEAR_TOGETHER_prep#max.c", "codebase": "transcoder-set", "c_file": "CHECK_OCCURRENCES_CHARACTER_APPEAR_TOGETHER.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#ceil_prep#ti_ceil_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "ceil.c", "function": "ti_ceil_start", "sloc": "1", "c_code": "int ti_ceil_start(double const *options) { (void)options; return 0; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderNext.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderNext", "sloc": "22", "c_code": "int\nxmlTextReaderNext(xmlTextReaderPtr reader) {\n int ret;\n xmlNodePtr cur;\n if (reader == ((void *)0))\n return(-1);\n if (reader->doc != ((void *)0))\n return(xmlTextReaderNextTree(reader));\n cur = reader->node;\n if ((cur == ((void *)0)) || (cur->type != XML_ELEMENT_NODE))\n return(xmlTextReaderRead(reader));\n if (reader->state == XML_TEXTREADER_END || reader->state == XML_TEXTREADER_BACKTRACK)\n return(xmlTextReaderRead(reader));\n if (cur->extra & 0x1)\n return(xmlTextReaderRead(reader));\n do {\n ret = xmlTextReaderRead(reader);\n if (ret != 1)\n return(ret);\n } while (reader->node != cur);\n return(xmlTextReaderRead(reader));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 7, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MINIMUM_NUMBER_OF_COINS_THAT_MAKE_A_CHANGE_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "FIND_MINIMUM_NUMBER_OF_COINS_THAT_MAKE_A_CHANGE_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#paste_prep#paste_make_sample.c", "codebase": "tmux", "c_file": "paste.c", "function": "paste_make_sample", "sloc": "16", "c_code": "char *\npaste_make_sample(struct paste_buffer *pb)\n{\n char *buf;\n size_t len, used;\n const int flags = 0x01|0x08|0x10;\n const size_t width = 200;\n len = pb->size;\n if (len > width)\n len = width;\n buf = xreallocarray(((void *)0), len, 4 + 4);\n used = utf8_strvis(buf, pb->data, len, flags);\n if (pb->size > width || used > width)\n strlcpy(buf + width, \"...\", 4);\n return (buf);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#css__prep#yypush_buffer_state.c", "codebase": "wget-1.21.4", "c_file": "css_.c", "function": "yypush_buffer_state", "sloc": "17", "c_code": "void yypush_buffer_state (YY_BUFFER_STATE new_buffer )\n{\n if (new_buffer == ((void *)0))\n return;\n yyensure_buffer_stack();\n if ( ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)) )\n {\n *(yy_c_buf_p) = (yy_hold_char);\n (yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_pos = (yy_c_buf_p);\n (yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars = (yy_n_chars);\n }\n if (( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)))\n (yy_buffer_stack_top)++;\n (yy_buffer_stack)[(yy_buffer_stack_top)] = new_buffer;\n yy_load_buffer_state( );\n (yy_did_buffer_switch_on_eof) = 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#HTMLtree_prep#htmlSaveFile.c", "codebase": "libxml2", "c_file": "HTMLtree.c", "function": "htmlSaveFile", "sloc": "18", "c_code": "int\nhtmlSaveFile(const char *filename, xmlDocPtr cur) {\n xmlOutputBufferPtr buf;\n xmlCharEncodingHandlerPtr handler = ((void *)0);\n const char *encoding;\n int ret;\n if ((cur == ((void *)0)) || (filename == ((void *)0)))\n return(-1);\n xmlInitParser();\n encoding = (const char *) htmlGetMetaEncoding(cur);\n handler = htmlFindOutputEncoder(encoding);\n buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression);\n if (buf == ((void *)0))\n return(0);\n htmlDocContentDumpOutput(buf, cur, ((void *)0));\n ret = xmlOutputBufferClose(buf);\n return(ret);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "bc-1.07.1#numeric_prep#dc_out_num.c", "codebase": "bc-1.07.1", "c_file": "numeric.c", "function": "dc_out_num", "sloc": "11", "c_code": "void\ndc_out_num (\n dc_num value ,\n int obase ,\n dc_discard discard_p )\n{\n out_char('\\0');\n bc_out_num((value), obase, out_char, 0);\n if (discard_p == DC_TOSS)\n dc_free_num(&value);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMIZE_ARRAY_ELEMENTS_UPTO_GIVEN_NUMBER_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "MAXIMIZE_ARRAY_ELEMENTS_UPTO_GIVEN_NUMBER.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#delays_prep#StoreDelayed.c", "codebase": "mcsim-6.2.0", "c_file": "delays.c", "function": "StoreDelayed", "sloc": "12", "c_code": "void StoreDelayed (double t)\n{\n int i;\n iCurrentTime++;\n if (iCurrentTime == 1000)\n iCurrentTime = 0;\n rgdTime[iCurrentTime] = t;\n for (i = 0; i < GetNModelVars(); i++)\n if (rgiVars[i]) {\n pdVar[i][iCurrentTime] = vrgModelVars[i];\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#io_prep#hash_file.c", "codebase": "nettle-3.9.1", "c_file": "io.c", "function": "hash_file", "sloc": "14", "c_code": "int\nhash_file(const struct nettle_hash *hash, void *ctx, FILE *f)\n{\n for (;;)\n {\n uint8_t buffer[1000];\n size_t res = fread(buffer, 1, sizeof(buffer), f);\n if (ferror(f))\n return 0;\n hash->update(ctx, res, buffer);\n if (feof(f))\n return 1;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#ADD_1_TO_A_GIVEN_NUMBER_prep#main.c", "codebase": "transcoder-set", "c_file": "ADD_1_TO_A_GIVEN_NUMBER.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {96,66,67,13,75,78,1,83,27,65};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "heman#plane_prep#kmPlaneFromNormalAndDistance.c", "codebase": "heman", "c_file": "plane.c", "function": "kmPlaneFromNormalAndDistance", "sloc": "7", "c_code": "kmPlane* kmPlaneFromNormalAndDistance(kmPlane* plane, const struct kmVec3* normal, const float dist) {\n plane->a = normal->x;\n plane->b = normal->y;\n plane->c = normal->z;\n plane->d = dist;\n return plane;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#buf_prep#xmlBufCreateMem.c", "codebase": "libxml2", "c_file": "buf.c", "function": "xmlBufCreateMem", "sloc": "32", "c_code": "xmlBufPtr\nxmlBufCreateMem(const xmlChar *mem, size_t size, int isStatic) {\n xmlBufPtr ret;\n if (mem == ((void *)0))\n return(((void *)0));\n ret = xmlMalloc(sizeof(*ret));\n if (ret == ((void *)0))\n return(((void *)0));\n if (isStatic) {\n if (mem[size] != 0) {\n xmlFree(ret);\n return(((void *)0));\n }\n ret->flags = (1u << 2);\n ret->mem = (xmlChar *) mem;\n } else {\n ret->flags = 0;\n ret->mem = xmlMalloc(size + 1);\n if (ret->mem == ((void *)0)) {\n xmlFree(ret);\n return(((void *)0));\n }\n memcpy(ret->mem, mem, size);\n ret->mem[size] = 0;\n }\n ret->use = size;\n ret->size = size;\n ret->maxSize = ((size_t) -1) - 1;\n ret->content = ret->mem;\n if (ret->size < 0x7fffffff) ret->compat_size = ret->size; else ret->compat_size = 0x7fffffff; if (ret->use < 0x7fffffff) ret->compat_use = ret->use; else ret->compat_use = 0x7fffffff;;\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 8, "memory_management": 0, "memory_operation": 1, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "nano-7.2#prompt_prep#do_prompt.c", "codebase": "nano-7.2", "c_file": "prompt.c", "function": "do_prompt", "sloc": "36", "c_code": "int do_prompt(int menu, const char *provided, linestruct **history_list,\n void (*refresh_func)(void), const char *msg, ...)\n{\n functionptrtype function = ((void *)0);\n _Bool listed = 0;\n va_list ap;\n int retval;\n size_t was_typing_x = typing_x;\n char *saved_prompt = prompt;\n bottombars(menu);\n if (answer != provided)\n answer = mallocstrcpy(answer, provided);\n redo_theprompt:\n prompt = nmalloc((COLS * 4) + 1);\n __builtin_va_start(ap,msg);\n vsnprintf(prompt, COLS * 4, msg, ap);\n __builtin_va_end(ap);\n prompt[actual_x(prompt, (COLS < 5) ? 0 : COLS - 5)] = '\\0';\n lastmessage = VACUUM;\n function = acquire_an_answer(&retval, &listed, history_list, refresh_func);\n free(prompt);\n if (retval == -2)\n goto redo_theprompt;\n prompt = saved_prompt;\n if (function == do_cancel || function == do_enter)\n typing_x = was_typing_x;\n if (function == do_cancel)\n retval = -1;\n else if (function == do_enter)\n retval = (*answer == '\\0') ? -2 : 0;\n if (lastmessage == VACUUM)\n wipe_statusbar();\n if (listed)\n refresh_func();\n return retval;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 2, "memory_management": 1, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 1, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#INTEGER_POSITIVE_VALUE_POSITIVE_NEGATIVE_VALUE_ARRAY_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "INTEGER_POSITIVE_VALUE_POSITIVE_NEGATIVE_VALUE_ARRAY_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_NUMBER_BINARY_STRINGS_WITHOUT_CONSECUTIVE_1S_prep#max.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBER_BINARY_STRINGS_WITHOUT_CONSECUTIVE_1S.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_authorization_prep#osip_authorization_set_cnonce.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authorization.c", "function": "osip_authorization_set_cnonce", "sloc": "3", "c_code": "void osip_authorization_set_cnonce(osip_authorization_t *authorization, char *cnonce) {\n authorization->cnonce = (char *) cnonce;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#fd_range_prep#Pl_Vector_Copy.c", "codebase": "gprolog-1.5.0", "c_file": "fd_range.c", "function": "Pl_Vector_Copy", "sloc": "8", "c_code": "void\nPl_Vector_Copy(Vector vec, Vector vec1)\n{\n Vector end = vec + pl_vec_size;\n do\n *vec++ = *vec1++;\n while (vec < end);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_leading_plus_sign_prep#json_extract_get_array_size.c", "codebase": "json.h", "c_file": "allow_leading_plus_sign.c", "function": "json_extract_get_array_size", "sloc": "17", "c_code": "struct json_extract_result_s\njson_extract_get_array_size(const struct json_array_s *const array) {\n struct json_extract_result_s result;\n size_t i;\n const struct json_array_element_s *element = array->start;\n result.dom_size = sizeof(struct json_array_s) +\n (sizeof(struct json_array_element_s) * array->length);\n result.data_size = 0;\n for (i = 0; i < array->length; i++) {\n const struct json_extract_result_s value_result =\n json_extract_get_value_size(element->value);\n result.dom_size += value_result.dom_size;\n result.data_size += value_result.data_size;\n element = element->next;\n }\n return result;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "genann#example4_prep#main.c", "codebase": "genann", "c_file": "example4.c", "function": "main", "sloc": "29", "c_code": "int main(int argc, char *argv[])\n{\n printf(\"GENANN example 4.\\n\");\n printf(\"Train an ANN on the IRIS dataset using backpropagation.\\n\");\n srand(time(0));\n load_data();\n genann *ann = genann_init(4, 1, 4, 3);\n int i, j;\n int loops = 5000;\n printf(\"Training for %d loops over data.\\n\", loops);\n for (i = 0; i < loops; ++i) {\n for (j = 0; j < samples; ++j) {\n genann_train(ann, input + j*4, class + j*3, .01);\n }\n }\n int correct = 0;\n for (j = 0; j < samples; ++j) {\n const double *guess = genann_run(ann, input + j*4);\n if (class[j*3+0] == 1.0) {if (guess[0] > guess[1] && guess[0] > guess[2]) ++correct;}\n else if (class[j*3+1] == 1.0) {if (guess[1] > guess[0] && guess[1] > guess[2]) ++correct;}\n else if (class[j*3+2] == 1.0) {if (guess[2] > guess[0] && guess[2] > guess[1]) ++correct;}\n else {printf(\"Logic error.\\n\"); exit(1);}\n }\n printf(\"%d/%d correct (%0.1f%%).\\n\", correct, samples, (double)correct / samples * 100.0);\n genann_free(ann);\n free(input);\n free(class);\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 2, "memory_operation": 0, "if_statement": 3, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cflow-1.7#parser_prep#reset_static_caller.c", "codebase": "cflow-1.7", "c_file": "parser.c", "function": "reset_static_caller", "sloc": "7", "c_code": "void\nreset_static_caller(void)\n{\n if (caller &&\n (caller->storage == StaticStorage || caller->flag == symbol_local))\n caller = ((void *)0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#types_prep#libxml_xmlOutputBufferPtrWrap.c", "codebase": "libxml2", "c_file": "types.c", "function": "libxml_xmlOutputBufferPtrWrap", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlOutputBufferPtrWrap(xmlOutputBufferPtr buffer)\n{\n PyObject *ret;\n if (buffer == ((void *)0)) {\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return ((&_Py_NoneStruct));\n }\n ret =\n PyCapsule_New((void *) buffer,\n (char *) \"xmlOutputBufferPtr\", ((void *)0));\n return (ret);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#parser_prep#set_follow_state.c", "codebase": "findutils-4.9.0", "c_file": "parser.c", "function": "set_follow_state", "sloc": "25", "c_code": "void\nset_follow_state (enum SymlinkOption opt)\n{\n switch (opt)\n {\n case SYMLINK_ALWAYS_DEREF:\n options.xstat = optionl_stat;\n options.x_getfilecon = optionl_getfilecon;\n options.no_leaf_check = 1;\n break;\n case SYMLINK_NEVER_DEREF:\n options.xstat = optionp_stat;\n options.x_getfilecon = optionp_getfilecon;\n break;\n case SYMLINK_DEREF_ARGSONLY:\n options.xstat = optionh_stat;\n options.x_getfilecon = optionh_getfilecon;\n options.no_leaf_check = 1;\n }\n options.symlink_handling = opt;\n if (options.debug_options & DebugStat)\n {\n options.xstat = debug_stat;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 1, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 2}}, {"id": "transcoder-set#N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_1_prep#max.c", "codebase": "transcoder-set", "c_file": "N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_1.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_NUMBER_OF_OCCURRENCES_OR_FREQUENCY_IN_A_SORTED_ARRAY_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBER_OF_OCCURRENCES_OR_FREQUENCY_IN_A_SORTED_ARRAY.c", "function": "f_gold", "sloc": "7", "c_code": "int f_gold ( int arr [ ], int n, int x ) {\n int res = 0;\n for ( int i = 0;\n i < n;\n i ++ ) if ( x == arr [ i ] ) res ++;\n return res;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DIFFERENT_WAYS_SUM_N_USING_NUMBERS_GREATER_EQUAL_M_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "DIFFERENT_WAYS_SUM_N_USING_NUMBERS_GREATER_EQUAL_M.c", "function": "f_gold", "sloc": "16", "c_code": "int f_gold ( int n, int m ) {\n int dp [ n + 2 ] [ n + 2 ];\n memset ( dp, 0, sizeof ( dp ) );\n dp [ 0 ] [ n + 1 ] = 1;\n for ( int k = n;\n k >= m;\n k -- ) {\n for ( int i = 0;\n i <= n;\n i ++ ) {\n dp [ i ] [ k ] = dp [ i ] [ k + 1 ];\n if ( i - k >= 0 ) dp [ i ] [ k ] = ( dp [ i ] [ k ] + dp [ i - k ] [ k ] );\n }\n }\n return dp [ n ] [ m ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#misc_prep#quote_n_colon.c", "codebase": "tar-1.34", "c_file": "misc.c", "function": "quote_n_colon", "sloc": "5", "c_code": "char const *\nquote_n_colon (int n, char const *arg)\n{\n return quotearg_n_style_colon (n, get_quoting_style (((void *)0)), arg);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_NUMBER_INCREASING_SUBSEQUENCES_SIZE_K_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBER_INCREASING_SUBSEQUENCES_SIZE_K.c", "function": "f_gold", "sloc": "25", "c_code": "int f_gold ( int arr [ ], int n, int k ) {\n int dp [ k ] [ n ], sum = 0;\n memset ( dp, 0, sizeof ( dp ) );\n for ( int i = 0;\n i < n;\n i ++ ) dp [ 0 ] [ i ] = 1;\n for ( int l = 1;\n l < k;\n l ++ ) {\n for ( int i = l;\n i < n;\n i ++ ) {\n dp [ l ] [ i ] = 0;\n for ( int j = l - 1;\n j < i;\n j ++ ) {\n if ( arr [ j ] < arr [ i ] ) dp [ l ] [ i ] += dp [ l - 1 ] [ j ];\n }\n }\n }\n for ( int i = k - 1;\n i < n;\n i ++ ) sum += dp [ k - 1 ] [ i ];\n return sum;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 5, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#relaxng_prep#xmlRelaxNGSetParserErrors.c", "codebase": "libxml2", "c_file": "relaxng.c", "function": "xmlRelaxNGSetParserErrors", "sloc": "12", "c_code": "void\nxmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,\n xmlRelaxNGValidityErrorFunc err,\n xmlRelaxNGValidityWarningFunc warn, void *ctx)\n{\n if (ctxt == ((void *)0))\n return;\n ctxt->error = err;\n ctxt->warning = warn;\n ctxt->serror = ((void *)0);\n ctxt->userData = ctx;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsKangxiRadicals.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsKangxiRadicals", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsKangxiRadicals(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsKangxiRadicals\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsKangxiRadicals\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsKangxiRadicals(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "nano-7.2#move_prep#to_para_begin.c", "codebase": "nano-7.2", "c_file": "move.c", "function": "to_para_begin", "sloc": "7", "c_code": "void to_para_begin(void)\n{\n linestruct *was_current = openfile->current;\n do_para_begin(&openfile->current);\n openfile->current_x = 0;\n edit_redraw(was_current, CENTERING);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_PAIR_WITH_GREATEST_PRODUCT_IN_ARRAY_prep#len.c", "codebase": "transcoder-set", "c_file": "FIND_PAIR_WITH_GREATEST_PRODUCT_IN_ARRAY.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PYTHAGOREAN_QUADRUPLE_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "PYTHAGOREAN_QUADRUPLE.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#GIVEN_A_SORTED_AND_ROTATED_ARRAY_FIND_IF_THERE_IS_A_PAIR_WITH_A_GIVEN_SUM_prep#len.c", "codebase": "transcoder-set", "c_file": "GIVEN_A_SORTED_AND_ROTATED_ARRAY_FIND_IF_THERE_IS_A_PAIR_WITH_A_GIVEN_SUM.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "ed-1.19#buffer_prep#isbinary.c", "codebase": "ed-1.19", "c_file": "buffer.c", "function": "isbinary", "sloc": "1", "c_code": "bool isbinary( void ) { return isbinary_; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#tty_prep#tty_raw.c", "codebase": "tmux", "c_file": "tty.c", "function": "tty_raw", "sloc": "18", "c_code": "void\ntty_raw(struct tty *tty, const char *s)\n{\n ssize_t n, slen;\n u_int i;\n slen = strlen(s);\n for (i = 0; i < 5; i++) {\n n = write(tty->fd, s, slen);\n if (n >= 0) {\n s += n;\n slen -= n;\n if (slen == 0)\n break;\n } else if (n == -1 && (*__errno_location ()) != 11)\n break;\n usleep(100);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 2}}, {"id": "transcoder-set#COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#willr_prep#ti_willr.c", "codebase": "tulipindicators-0.9.1", "c_file": "willr.c", "function": "ti_willr", "sloc": "53", "c_code": "int ti_willr(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *high = inputs[0];\n const double *low = inputs[1];\n const double *close = inputs[2];\n const int period = (int)options[0];\n double *output = outputs[0];\n if (period < 1) return 1;\n if (size <= ti_willr_start(options)) return 0;\n int trail = 0, maxi = -1, mini = -1;\n double max = high[0];\n double min = low[0];\n double bar;\n int i, j;\n for (i = period-1; i < size; ++i, ++trail) {\n bar = high[i];\n if (maxi < trail) {\n maxi = trail;\n max = high[maxi];\n j = trail;\n while(++j <= i) {\n bar = high[j];\n if (bar >= max) {\n max = bar;\n maxi = j;\n }\n }\n } else if (bar >= max) {\n maxi = i;\n max = bar;\n }\n bar = low[i];\n if (mini < trail) {\n mini = trail;\n min = low[mini];\n j = trail;\n while(++j <= i) {\n bar = low[j];\n if (bar <= min) {\n min = bar;\n mini = j;\n }\n }\n } else if (bar <= min) {\n mini = i;\n min = bar;\n }\n const double highlow = (max - min);\n const double r = highlow == 0.0 ? 0.0 : -100 * ((max - close[i]) / highlow);\n *output++ = r;\n }\n ((void) sizeof ((output - outputs[0] == size - ti_willr_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_willr_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_willr_start(options)\", \"indicators/willr.c\", 96, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 6, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 9, "for_loop": 1, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#PAIR_WITH_GIVEN_PRODUCT_SET_1_FIND_IF_ANY_PAIR_EXISTS_prep#max.c", "codebase": "transcoder-set", "c_file": "PAIR_WITH_GIVEN_PRODUCT_SET_1_FIND_IF_ANY_PAIR_EXISTS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#port_condv_prep#osip_cond_wait.c", "codebase": "libosip2-5.3.1", "c_file": "port_condv.c", "function": "osip_cond_wait", "sloc": "5", "c_code": "int osip_cond_wait(struct osip_cond *_cond, struct osip_mutex *_mut) {\n if (!_cond)\n return -2;\n return pthread_cond_wait(&_cond->cv, (pthread_mutex_t *) _mut);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#stream_c_prep#Pl_Set_Stream_Type_2.c", "codebase": "gprolog-1.5.0", "c_file": "stream_c.c", "function": "Pl_Set_Stream_Type_2", "sloc": "16", "c_code": "void\nPl_Set_Stream_Type_2(WamWord sora_word, WamWord is_text_word)\n{\n int stm;\n StmInf *pstm;\n int text;\n stm = Pl_Get_Stream_Or_Alias(sora_word, 1);\n pstm = pl_stm_tbl[stm];\n text = Pl_Rd_Integer_Check(is_text_word);\n if ((unsigned) text == pstm->prop.text)\n return;\n if (pstm->char_count)\n Pl_Err_Permission(pl_permission_operation_modify,\n pl_permission_type_stream, sora_word);\n pstm->prop.text = text;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_data_prep#pth_key_delete.c", "codebase": "pth-2.0.7", "c_file": "pth_data.c", "function": "pth_key_delete", "sloc": "9", "c_code": "int pth_key_delete(pth_key_t key)\n{\n if (key < 0 || key >= 256)\n return ((*__errno_location ()) = (22), ((0)));\n if (!pth_keytab[key].used)\n return ((*__errno_location ()) = (2), ((0)));\n pth_keytab[key].used = (0);\n return (!(0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "uucp-1.07#xqtfil_prep#usysdep_get_xqt_free.c", "codebase": "uucp-1.07", "c_file": "xqtfil.c", "function": "usysdep_get_xqt_free", "sloc": "20", "c_code": "void\nusysdep_get_xqt_free (zsystem)\n const char *zsystem __attribute__ ((__unused__));\n{\n if (qSxqt_topdir != ((void *)0))\n {\n (void) closedir (qSxqt_topdir);\n qSxqt_topdir = ((void *)0);\n }\n if (qSxqt_dir != ((void *)0))\n {\n (void) closedir (qSxqt_dir);\n qSxqt_dir = ((void *)0);\n }\n ubuffree (zSdir);\n zSdir = ((void *)0);\n ubuffree (zSsystem);\n zSsystem = ((void *)0);\n fSone_dir = (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 8, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libzahl-1.0#zmodsqr_prep#zmodsqr.c", "codebase": "libzahl-1.0", "c_file": "zmodsqr.c", "function": "zmodsqr", "sloc": "12", "c_code": "void\nzmodsqr(z_t a, z_t b, z_t c)\n{\n if (a == c) {\n zset(libzahl_tmp_modsqr, c);\n zsqr(a, b);\n zmod(a, a, libzahl_tmp_modsqr);\n } else {\n zsqr(a, b);\n zmod(a, a, c);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlParseEntity.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlParseEntity", "sloc": "4", "c_code": "xmlDocPtr\nxmlParseEntity(const char *filename) {\n return(xmlSAXParseEntity(((void *)0), filename));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#candles_prep#tc_three_black_crows.c", "codebase": "tulipindicators-0.9.1", "c_file": "candles.c", "function": "tc_three_black_crows", "sloc": "5", "c_code": "int tc_three_black_crows(int size, TC_REAL const *const *inputs, tc_config const *options, tc_result *output) {\n const TC_REAL *open = inputs[0]; const TC_REAL *high = inputs[1]; const TC_REAL *low = inputs[2]; const TC_REAL *close = inputs[3]; const int period = options->period; const TC_REAL div = 1.0 / period; TC_REAL avg_body_sum = 0; TC_REAL avg_total_sum = 0; if (period < 1) return 1; if (size < period) return 0; int i; for (i = 0; i < period; ++i) { avg_body_sum += (fabs(open[(i)] - close[(i)])); avg_total_sum += (high[(i)] - low[(i)]); }\n while(i < size) { const TC_REAL top = (open[(i)] > close[(i)] ? open[(i)] : close[(i)]); const TC_REAL bottom = (open[(i)] < close[(i)] ? open[(i)] : close[(i)]); const TC_REAL body = (fabs(open[(i)] - close[(i)])); const TC_REAL total = (high[(i)] - low[(i)]); const TC_REAL upper = (high[(i)] - top); const TC_REAL lower = (bottom - low[(i)]); const TC_REAL avg_body = avg_body_sum * div; const TC_REAL avg_total = avg_total_sum * div; (void)top;(void)bottom;(void)body;(void)total; (void)upper;(void)lower;(void)avg_body;(void)avg_total; if (i>=2 && (open[i-2]>close[i-2]) && (open[i-1]>close[i-1]) && (open[i]>close[i]) && (open[i-1] < (open[((i-1)-1)] > close[((i-1)-1)] ? open[((i-1)-1)] : close[((i-1)-1)]) && open[i-1] > (open[((i-1)-1)] < close[((i-1)-1)] ? open[((i-1)-1)] : close[((i-1)-1)])) && (open[i] < (open[((i)-1)] > close[((i)-1)] ? open[((i)-1)] : close[((i)-1)]) && open[i] > (open[((i)-1)] < close[((i)-1)] ? open[((i)-1)] : close[((i)-1)]))) { do { const tc_hit hit = {i, (1L<<22)}; const int r = tc_result_add(output, hit); if (r != 0) return r; } while (0); } avg_body_sum += body; avg_body_sum -= (fabs(open[(i-period)] - close[(i-period)])); avg_total_sum += total; avg_total_sum -= (high[(i-period)] - low[(i-period)]); ++i; };\n return 0;\n }\n", "c_constructs": {"pointer_type": 4, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#tree_prep#xmlGetProp.c", "codebase": "libxml2", "c_file": "tree.c", "function": "xmlGetProp", "sloc": "8", "c_code": "xmlChar *\nxmlGetProp(const xmlNode *node, const xmlChar *name) {\n xmlAttrPtr prop;\n prop = xmlHasProp(node, name);\n if (prop == ((void *)0))\n return(((void *)0));\n return(xmlGetPropNodeValueInternal(prop));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#di_prep#ti_di_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "di.c", "function": "ti_di_start", "sloc": "3", "c_code": "int ti_di_start(double const *options) {\n return (int)options[0]-1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#fd_range_prep#Pl_Range_Mul_Range.c", "codebase": "gprolog-1.5.0", "c_file": "fd_range.c", "function": "Pl_Range_Mul_Range", "sloc": "24", "c_code": "void\nPl_Range_Mul_Range(Range *range, Range *range1)\n{\n Range r;\n if (((range)->min > (range)->max))\n return;\n if (((range1)->min > (range1)->max))\n {\n (range)->max = (int)(1 << (sizeof(int) * 8 - 1));\n return;\n }\n if (((range)->vec == ((void *)0)))\n Pl_Range_Becomes_Sparse(range);\n if (((range1)->vec == ((void *)0)))\n {\n r.vec = ((void *)0);\n Pl_Range_Copy(&r, range1);\n range1 = &r;\n Pl_Range_Becomes_Sparse(range1);\n }\n Pl_Vector_Mul_Vector(range->vec, range1->vec);\n range->extra_cstr |= range1->extra_cstr;\n Pl_Range_From_Vector(range);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nano-7.2#move_prep#do_scroll_down.c", "codebase": "nano-7.2", "c_file": "move.c", "function": "do_scroll_down", "sloc": "10", "c_code": "void do_scroll_down(void)\n{\n if (openfile->current_y == 0)\n do_down();\n if (editwinrows > 1 && (openfile->edittop->next != ((void *)0)\n || (((flags[((SOFTWRAP) / (sizeof(unsigned) * 8))] & ((unsigned)1 << ((SOFTWRAP) % (sizeof(unsigned) * 8)))) != 0) && (extra_chunks_in(openfile->edittop) >\n chunk_for(openfile->firstcolumn, openfile->edittop)))\n ))\n edit_scroll(1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#screen-write_prep#screen_write_clearscreen.c", "codebase": "tmux", "c_file": "screen-write.c", "function": "screen_write_clearscreen", "sloc": "15", "c_code": "void\nscreen_write_clearscreen(struct screen_write_ctx *ctx, u_int bg)\n{\n struct screen *s = ctx->s;\n struct tty_ctx ttyctx;\n u_int sx = ((s)->grid->sx), sy = ((s)->grid->sy);\n screen_write_initctx(ctx, &ttyctx);\n ttyctx.bg = bg;\n if (s->grid->flags & 0x1)\n grid_view_clear_history(s->grid, bg);\n else\n grid_view_clear(s->grid, 0, 0, sx, sy, bg);\n screen_write_collect_clear(ctx, 0, sy);\n tty_write(tty_cmd_clearscreen, &ttyctx);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#util_prep#nonfatal_nontarget_file_error.c", "codebase": "findutils-4.9.0", "c_file": "util.c", "function": "nonfatal_nontarget_file_error", "sloc": "5", "c_code": "void\nnonfatal_nontarget_file_error (int errno_value, const char *name)\n{\n report_file_err (0, errno_value, 0, name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json-c#linkhash_prep#lh_table_free.c", "codebase": "json-c", "c_file": "linkhash.c", "function": "lh_table_free", "sloc": "11", "c_code": "void lh_table_free(struct lh_table *t)\n{\n struct lh_entry *c;\n if (t->free_fn)\n {\n for (c = t->head; c != ((void *)0); c = c->next)\n t->free_fn(c);\n }\n free(t->table);\n free(t);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 2, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "less-633#tags_prep#gettagtype.c", "codebase": "less-633", "c_file": "tags.c", "function": "gettagtype", "sloc": "21", "c_code": "int gettagtype(void)\n{\n int f;\n if (strcmp(tags, \"GTAGS\") == 0)\n return T_GTAGS;\n if (strcmp(tags, \"GRTAGS\") == 0)\n return T_GRTAGS;\n if (strcmp(tags, \"GSYMS\") == 0)\n return T_GSYMS;\n if (strcmp(tags, \"GPATH\") == 0)\n return T_GPATH;\n if (strcmp(tags, \"-\") == 0)\n return T_CTAGS_X;\n f = open(tags, (00));\n if (f >= 0)\n {\n close(f);\n return T_CTAGS;\n }\n return T_GTAGS;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 7, "break_continue_statement": 0}}, {"id": "units-2.22#units_prep#showdefinition.c", "codebase": "units-2.22", "c_file": "units.c", "function": "showdefinition", "sloc": "14", "c_code": "void\nshowdefinition(char *unitstr, struct unittype *theunit)\n{\n logputs(deftext);\n while((unitstr = lookupunit(unitstr,1))\n && strspn(unitstr,digits) != strlen(unitstr)\n && !strchr(unitstr,'!')) {\n tightprint(stdout,unitstr);\n if (logfile) tightprint(logfile,unitstr);\n logputs(\" = \");\n }\n showunit(theunit);\n logputchar('\\n');\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "patch-2.7.6#basename-lgpl_prep#base_len.c", "codebase": "patch-2.7.6", "c_file": "basename-lgpl.c", "function": "base_len", "sloc": "15", "c_code": "size_t\nbase_len (char const *name)\n{\n size_t len;\n size_t prefix_len = 0;\n for (len = strlen (name); 1 < len && ((name[len - 1]) == '/'); len--)\n continue;\n if (0 && len == 1\n && ((name[0]) == '/') && ((name[1]) == '/') && ! name[2])\n return 2;\n if (0 && prefix_len\n && len == prefix_len && ((name[prefix_len]) == '/'))\n return prefix_len + 1;\n return len;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 1}}, {"id": "mtools-4.0.43#mainloop_prep#main_loop.c", "codebase": "mtools-4.0.43", "c_file": "mainloop.c", "function": "main_loop", "sloc": "40", "c_code": "int main_loop(MainParam_t *mp, char **argv, int argc)\n{\n int i;\n int ret, Bret;\n Bret = 0;\n if(argc != 1 && mp->targetName) {\n fprintf(stderr,\n \"Several file names given, but last argument (%s) not a directory\\n\", mp->targetName);\n free_stream( (&mp->targetDir) );\n return 1;\n }\n for (i = 0; i < argc; i++) {\n if ( got_signal )\n break;\n mp->originalArg = argv[i];\n mp->basenameHasWildcard = strpbrk(_basename(mp->originalArg),\n \"*[?\") != 0;\n if (mp->unixcallback && (!argv[i][0]\n || argv[i][1] != ':' ))\n ret = unix_loop(0, mp, argv[i], 1);\n else\n ret = dos_loop(mp, argv[i]);\n if (! (ret & (4 | 16)) ) {\n fprintf(stderr, \"%s: File \\\"%s\\\" not found\\n\",\n progname, argv[i]);\n ret |= 16;\n }\n Bret |= ret;\n if(mp->fast_quit && (Bret & (2 | 16)))\n break;\n }\n free_stream( (&mp->targetDir) );\n if(Bret & 16)\n return 1;\n if ((Bret & 4) && ( Bret & 2))\n return 2;\n if (Bret & 2)\n return 1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 8, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 2}}, {"id": "json-c#json_util_prep#_json_c_set_last_err.c", "codebase": "json-c", "c_file": "json_util.c", "function": "_json_c_set_last_err", "sloc": "7", "c_code": "void _json_c_set_last_err(const char *err_fmt, ...)\n{\n va_list ap;\n __builtin_va_start(ap,err_fmt);\n (void)vsnprintf(_last_err, sizeof(_last_err), err_fmt, ap);\n __builtin_va_end(ap);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#HIGHWAY_BILLBOARD_PROBLEM_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "HIGHWAY_BILLBOARD_PROBLEM.c", "function": "f_gold", "sloc": "19", "c_code": "int f_gold ( int m, int x [ ], int revenue [ ], int n, int t ) {\n int maxRev [ m + 1 ];\n memset ( maxRev, 0, sizeof ( maxRev ) );\n int nxtbb = 0;\n for ( int i = 1;\n i <= m;\n i ++ ) {\n if ( nxtbb < n ) {\n if ( x [ nxtbb ] != i ) maxRev [ i ] = maxRev [ i - 1 ];\n else {\n if ( i <= t ) maxRev [ i ] = max ( maxRev [ i - 1 ], revenue [ nxtbb ] );\n else maxRev [ i ] = max ( maxRev [ i - t - 1 ] + revenue [ nxtbb ], maxRev [ i - 1 ] );\n nxtbb ++;\n }\n }\n else maxRev [ i ] = maxRev [ i - 1 ];\n }\n return maxRev [ m ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#misc_prep#zap_slashes.c", "codebase": "tar-1.34", "c_file": "misc.c", "function": "zap_slashes", "sloc": "11", "c_code": "char *\nzap_slashes (char *name)\n{\n char *q;\n if (!name || *name == 0)\n return name;\n q = name + strlen (name) - 1;\n while (q > name && ((*q) == '/'))\n *q-- = '\\0';\n return name;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "bc-1.07.1#number_prep#bc_divmod.c", "codebase": "bc-1.07.1", "c_file": "number.c", "function": "bc_divmod", "sloc": "22", "c_code": "int\nbc_divmod (bc_num num1, bc_num num2, bc_num *quot, bc_num *rem, int scale)\n{\n bc_num quotient = ((void *)0);\n bc_num temp;\n int rscale;\n if (bc_is_zero (num2)) return -1;\n rscale = ((num1->n_scale)>(num2->n_scale+scale)?(num1->n_scale):(num2->n_scale+scale));\n bc_init_num(&temp);\n bc_divide (num1, num2, &temp, scale);\n if (quot)\n quotient = bc_copy_num (temp);\n bc_multiply (temp, num2, &temp, rscale);\n bc_sub (num1, temp, rem, rscale);\n bc_free_num (&temp);\n if (quot)\n {\n bc_free_num (quot);\n *quot = quotient;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nano-7.2#utils_prep#mark_is_before_cursor.c", "codebase": "nano-7.2", "c_file": "utils.c", "function": "mark_is_before_cursor", "sloc": "6", "c_code": "_Bool mark_is_before_cursor(void)\n{\n return (openfile->mark->lineno < openfile->current->lineno ||\n (openfile->mark == openfile->current &&\n openfile->mark_x <= openfile->current_x));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_FIBONACCI_NUMBERS_prep#sort.c", "codebase": "transcoder-set", "c_file": "SUM_FIBONACCI_NUMBERS.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_transaction_prep#osip_transaction_set_srv_record.c", "codebase": "libosip2-5.3.1", "c_file": "osip_transaction.c", "function": "osip_transaction_set_srv_record", "sloc": "6", "c_code": "int osip_transaction_set_srv_record(osip_transaction_t *transaction, osip_srv_record_t *record) {\n if (transaction == ((void *)0))\n return -2;\n memcpy(&transaction->record, record, sizeof(osip_srv_record_t));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#HTMLparser_prep#UTF8ToHtml.c", "codebase": "libxml2", "c_file": "HTMLparser.c", "function": "UTF8ToHtml", "sloc": "63", "c_code": "int\nUTF8ToHtml(unsigned char* out, int *outlen,\n const unsigned char* in, int *inlen) {\n const unsigned char* instart = in;\n const unsigned char* inend;\n unsigned char* outstart = out;\n unsigned char* outend;\n int ret = XML_ENC_ERR_SPACE;\n if ((out == ((void *)0)) || (outlen == ((void *)0)) || (inlen == ((void *)0)))\n return(XML_ENC_ERR_INTERNAL);\n if (in == ((void *)0)) {\n *outlen = 0;\n *inlen = 0;\n return(XML_ENC_ERR_SUCCESS);\n }\n inend = in + *inlen;\n outend = out + *outlen;\n while (in < inend) {\n const htmlEntityDesc *ent;\n const char *cp;\n char nbuf[16];\n unsigned c, d;\n int seqlen, len, i;\n d = *in;\n if (d < 0x80) {\n if (out >= outend)\n goto done;\n *out++ = d;\n in += 1;\n continue;\n }\n if (d < 0xE0) { c = d & 0x1F; seqlen = 2; }\n else if (d < 0xF0) { c = d & 0x0F; seqlen = 3; }\n else { c = d & 0x07; seqlen = 4; }\n if (inend - in < seqlen)\n break;\n for (i = 1; i < seqlen; i++) {\n d = in[i];\n c <<= 6;\n c |= d & 0x3F;\n }\n ent = htmlEntityValueLookup(c);\n if (ent == ((void *)0)) {\n snprintf(nbuf, sizeof(nbuf), \"#%u\", c);\n cp = nbuf;\n } else {\n cp = ent->name;\n }\n len = strlen(cp);\n if (outend - out < len + 2)\n goto done;\n *out++ = '&';\n memcpy(out, cp, len);\n out += len;\n *out++ = ';';\n in += seqlen;\n }\n ret = out - outstart;\ndone:\n *outlen = out - outstart;\n *inlen = in - instart;\n return(ret);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 1, "if_statement": 9, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 2, "return_statement": 3, "break_continue_statement": 2}}, {"id": "libxml2#valid_prep#xmlFreeRefTable.c", "codebase": "libxml2", "c_file": "valid.c", "function": "xmlFreeRefTable", "sloc": "4", "c_code": "void\nxmlFreeRefTable(xmlRefTablePtr table) {\n xmlHashFree(table, xmlFreeRefTableEntry);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#dap0_prep#cleanAttributeList.c", "codebase": "dap-3.10", "c_file": "dap0.c", "function": "cleanAttributeList", "sloc": "19", "c_code": "void cleanAttributeList( AttributeList *list)\n{\n AttributeList *actualatt=list;\n do{\n actualatt=list;\n AttributeList *prev=list;\n AttributeList *prev2=list;\n do{\n prev2=prev;\n prev=actualatt;\n actualatt=actualatt->next;\n }while(actualatt!=((void *)0));\n if (prev!=list){\n free(prev->word);\n free(prev);\n }\n prev2->next=((void *)0);\n }while(list->next!=((void *)0));\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 2, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_multi_line_strings_prep#is_valid_unquoted_key_char.c", "codebase": "json.h", "c_file": "allow_multi_line_strings.c", "function": "is_valid_unquoted_key_char", "sloc": "4", "c_code": "int is_valid_unquoted_key_char(const char c) {\n return (('0' <= c && c <= '9') || ('a' <= c && c <= 'z') ||\n ('A' <= c && c <= 'Z') || ('_' == c));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderSetup.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderSetup", "sloc": "159", "c_code": "int\nxmlTextReaderSetup(xmlTextReaderPtr reader,\n xmlParserInputBufferPtr input, const char *URL,\n const char *encoding, int options)\n{\n if (reader == ((void *)0)) {\n if (input != ((void *)0))\n xmlFreeParserInputBuffer(input);\n return (-1);\n }\n options |= XML_PARSE_COMPACT;\n reader->doc = ((void *)0);\n reader->entNr = 0;\n reader->parserFlags = options;\n reader->validate = XML_TEXTREADER_NOT_VALIDATE;\n if ((input != ((void *)0)) && (reader->input != ((void *)0)) &&\n (reader->allocs & 1)) {\n xmlFreeParserInputBuffer(reader->input);\n reader->input = ((void *)0);\n reader->allocs -= 1;\n }\n if (input != ((void *)0)) {\n reader->input = input;\n reader->allocs |= 1;\n }\n if (reader->buffer == ((void *)0))\n reader->buffer = xmlBufCreate(50);\n if (reader->buffer == ((void *)0)) {\n return (-1);\n }\n if (reader->sax == ((void *)0))\n reader->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));\n if (reader->sax == ((void *)0)) {\n return (-1);\n }\n xmlSAXVersion(reader->sax, 2);\n reader->startElement = reader->sax->startElement;\n reader->sax->startElement = xmlTextReaderStartElement;\n reader->endElement = reader->sax->endElement;\n reader->sax->endElement = xmlTextReaderEndElement;\n if (reader->sax->initialized == 0xDEEDBEAF) {\n reader->startElementNs = reader->sax->startElementNs;\n reader->sax->startElementNs = xmlTextReaderStartElementNs;\n reader->endElementNs = reader->sax->endElementNs;\n reader->sax->endElementNs = xmlTextReaderEndElementNs;\n } else {\n reader->startElementNs = ((void *)0);\n reader->endElementNs = ((void *)0);\n }\n reader->characters = reader->sax->characters;\n reader->sax->characters = xmlTextReaderCharacters;\n reader->sax->ignorableWhitespace = xmlTextReaderCharacters;\n reader->cdataBlock = reader->sax->cdataBlock;\n reader->sax->cdataBlock = xmlTextReaderCDataBlock;\n reader->mode = XML_TEXTREADER_MODE_INITIAL;\n reader->node = ((void *)0);\n reader->curnode = ((void *)0);\n if (input != ((void *)0)) {\n if (xmlBufUse(reader->input->buffer) < 4) {\n xmlParserInputBufferRead(input, 4);\n }\n if (reader->ctxt == ((void *)0)) {\n if (xmlBufUse(reader->input->buffer) >= 4) {\n reader->ctxt = xmlCreatePushParserCtxt(reader->sax, ((void *)0),\n (const char *) xmlBufContent(reader->input->buffer),\n 4, URL);\n reader->base = 0;\n reader->cur = 4;\n } else {\n reader->ctxt =\n xmlCreatePushParserCtxt(reader->sax, ((void *)0), ((void *)0), 0, URL);\n reader->base = 0;\n reader->cur = 0;\n }\n if (reader->ctxt == ((void *)0)) {\n return (-1);\n }\n } else {\n xmlParserInputPtr inputStream;\n xmlParserInputBufferPtr buf;\n xmlCtxtReset(reader->ctxt);\n buf = xmlAllocParserInputBuffer(XML_CHAR_ENCODING_NONE);\n if (buf == ((void *)0)) return(-1);\n inputStream = xmlNewInputStream(reader->ctxt);\n if (inputStream == ((void *)0)) {\n xmlFreeParserInputBuffer(buf);\n return(-1);\n }\n if (URL == ((void *)0))\n inputStream->filename = ((void *)0);\n else\n inputStream->filename = (char *)\n xmlCanonicPath((const xmlChar *) URL);\n inputStream->buf = buf;\n xmlBufResetInput(buf->buffer, inputStream);\n if (inputPush(reader->ctxt, inputStream) < 0) {\n xmlFreeInputStream(inputStream);\n return(-1);\n }\n reader->cur = 0;\n }\n }\n if (reader->dict != ((void *)0)) {\n if (reader->ctxt->dict != ((void *)0)) {\n if (reader->dict != reader->ctxt->dict) {\n xmlDictFree(reader->dict);\n reader->dict = reader->ctxt->dict;\n }\n } else {\n reader->ctxt->dict = reader->dict;\n }\n } else {\n if (reader->ctxt->dict == ((void *)0))\n reader->ctxt->dict = xmlDictCreate();\n reader->dict = reader->ctxt->dict;\n }\n reader->ctxt->_private = reader;\n reader->ctxt->linenumbers = 1;\n reader->ctxt->dictNames = 1;\n reader->ctxt->parseMode = XML_PARSE_READER;\n if (reader->xincctxt != ((void *)0)) {\n xmlXIncludeFreeContext(reader->xincctxt);\n reader->xincctxt = ((void *)0);\n }\n if (options & XML_PARSE_XINCLUDE) {\n reader->xinclude = 1;\n reader->xinclude_name = xmlDictLookup(reader->dict, (const xmlChar *) \"include\", -1);\n if (reader->xinclude_name == ((void *)0))\n return(-1);\n options -= XML_PARSE_XINCLUDE;\n } else\n reader->xinclude = 0;\n reader->in_xinclude = 0;\n if (reader->patternTab == ((void *)0)) {\n reader->patternNr = 0;\n reader->patternMax = 0;\n }\n while (reader->patternNr > 0) {\n reader->patternNr--;\n if (reader->patternTab[reader->patternNr] != ((void *)0)) {\n xmlFreePattern(reader->patternTab[reader->patternNr]);\n reader->patternTab[reader->patternNr] = ((void *)0);\n }\n }\n if (options & XML_PARSE_DTDVALID)\n reader->validate = XML_TEXTREADER_VALIDATE_DTD;\n xmlCtxtUseOptions(reader->ctxt, options);\n if (encoding != ((void *)0))\n xmlSwitchEncodingName(reader->ctxt, encoding);\n if ((URL != ((void *)0)) && (reader->ctxt->input != ((void *)0)) &&\n (reader->ctxt->input->filename == ((void *)0))) {\n reader->ctxt->input->filename = (char *)\n xmlStrdup((const xmlChar *) URL);\n if (reader->ctxt->input->filename == ((void *)0))\n return(-1);\n }\n reader->doc = ((void *)0);\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 39, "memory_management": 0, "memory_operation": 0, "if_statement": 31, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 10, "break_continue_statement": 0}}, {"id": "transcoder-set#EULERIAN_NUMBER_1_prep#main.c", "codebase": "transcoder-set", "c_file": "EULERIAN_NUMBER_1.c", "function": "main", "sloc": "15", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {27,77,35,26,6,66,44,26,74,65};\n int param1[] = {7,34,22,20,10,47,29,33,86,97};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#SQUARE_PYRAMIDAL_NUMBER_SUM_SQUARES_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "SQUARE_PYRAMIDAL_NUMBER_SUM_SQUARES.c", "function": "f_gold", "sloc": "10", "c_code": "int f_gold ( int s ) {\n int sum = 0;\n for ( int n = 1;\n sum < s;\n n ++ ) {\n sum += n * n;\n if ( sum == s ) return n;\n }\n return - 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_HIGH_EFFORT_VS_LOW_EFFORT_TASKS_PROBLEM_prep#main.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_HIGH_EFFORT_VS_LOW_EFFORT_TASKS_PROBLEM.c", "function": "main", "sloc": "36", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {1,3,9,10,13,14,15,15,17,22,23,28,30,31,37,42,45,62,62,68,68,68,78,79,82,84,87,90,99};\nint param0_1[] = {-78,-12,26,80,50,4,-80,86,12,-2,18,-50,-90,56,-50,88,-62,96,-44,-82,56};\nint param0_2[] = {1};\nint param0_3[] = {21,28,13,48,26,49,16,70,81,35,74,12,97,61,10,84,94,78,40,30,30,84,41,4,95,79,38,29,9};\nint param0_4[] = {-80,-36,-32,-20,-14,-12,10,12,72};\nint param0_5[] = {1,1,0,1,0,0,0,0,0,1,1,0,1,0,0,1,0,0,1,0,0,0,0,0,1};\nint param0_6[] = {1,7,9,10,13,14,15,20,23,24,24,24,26,27,29,31,32,33,34,35,46,48,49,51,51,53,53,56,56,60,62,64,64,70,73,73,73,74,77,78,79,79,79,80,86,89,89,92,98};\nint param0_7[] = {56,48,40,-56,44,-86,-28,-32,-34,4,-94,-14,28,-74};\nint param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1};\nint param0_9[] = {85,13,35,57,8,48,65,54,88,7,66,30,47,51};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1_0[] = {5,10,11,14,16,22,24,30,34,35,37,37,39,41,42,42,43,55,57,63,71,76,83,83,85,90,91,97,99};\nint param1_1[] = {-44,-14,14,0,30,78,40,-12,-44,-16,60,-12,-50,-66,70,-98,-56,48,-82,94,14};\nint param1_2[] = {1};\nint param1_3[] = {49,88,25,93,24,56,47,44,33,27,86,57,21,25,64,44,37,99,36,54,17,29,37,17,26,43,61,27,21};\nint param1_4[] = {-76,-54,-50,-28,0,58,70,78,90};\nint param1_5[] = {0,0,1,1,1,0,0,1,1,0,1,1,1,1,0,1,1,1,0,1,1,0,0,0,1};\nint param1_6[] = {1,3,3,4,8,8,10,10,10,12,12,15,15,22,23,28,28,30,31,33,34,35,36,36,36,42,44,44,51,54,57,58,59,59,63,65,66,68,69,71,73,76,77,78,79,79,86,87,93};\nint param1_7[] = {82,-40,-16,-64,12,-6,60,48,-58,-4,42,-28,24,-58};\nint param1_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1};\nint param1_9[] = {1,42,42,89,3,21,49,98,4,59,26,85,53,34};\nint *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9};\n int param2[] = {18,16,0,25,4,24,31,8,16,8};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "tinycc#x86_64-gen_prep#gtst.c", "codebase": "tinycc", "c_file": "x86_64-gen.c", "function": "gtst", "sloc": "36", "c_code": "int gtst(int inv, int t)\n{\n int v = vtop->r & 0x003f;\n if (nocode_wanted) {\n ;\n } else if (v == 0x0033) {\n if (vtop->c.i & 0x100)\n {\n vtop->c.i &= ~0x100;\n if (inv == (vtop->c.i == 0x95))\n o(0x067a);\n else\n {\n g(0x0f);\n t = oad(0x8a,t);\n }\n }\n g(0x0f);\n t = oad((vtop->c.i - 16) ^ inv,t);\n } else if (v == 0x0034 || v == 0x0035) {\n if ((v & 1) == inv) {\n uint32_t n1, n = vtop->c.i;\n if (n) {\n while ((n1 = read32le(cur_text_section->data + n)))\n n = n1;\n write32le(cur_text_section->data + n, t);\n t = vtop->c.i;\n }\n } else {\n t = gjmp(t);\n gsym(vtop->c.i);\n }\n }\n vtop--;\n return t;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlSAXParseMemory.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlSAXParseMemory", "sloc": "5", "c_code": "xmlDocPtr\nxmlSAXParseMemory(xmlSAXHandlerPtr sax, const char *buffer,\n int size, int recovery) {\n return xmlSAXParseMemoryWithData(sax, buffer, size, recovery, ((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_EQUAL_POINT_STRING_BRACKETS_prep#len.c", "codebase": "transcoder-set", "c_file": "FIND_EQUAL_POINT_STRING_BRACKETS.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#fd_math_c_prep#Pl_Fd_Set_Full_Ac_Flag_1.c", "codebase": "gprolog-1.5.0", "c_file": "fd_math_c.c", "function": "Pl_Fd_Set_Full_Ac_Flag_1", "sloc": "5", "c_code": "void\nPl_Fd_Set_Full_Ac_Flag_1(WamWord full_ac_word)\n{\n pl_full_ac = Pl_Rd_Integer(full_ac_word);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_no_commas_prep#json_parse_key.c", "codebase": "json.h", "c_file": "allow_no_commas.c", "function": "json_parse_key", "sloc": "23", "c_code": "void json_parse_key(struct json_parse_state_s *state,\n struct json_string_s *string) {\n if (json_parse_flags_allow_unquoted_keys & state->flags_bitset) {\n const char *const src = state->src;\n char *const data = state->data;\n size_t offset = state->offset;\n if (('\"' == src[offset]) || ('\\'' == src[offset])) {\n json_parse_string(state, string);\n } else {\n size_t size = 0;\n string->string = state->data;\n while (is_valid_unquoted_key_char(src[offset])) {\n data[size++] = src[offset++];\n }\n data[size] = '\\0';\n string->string_size = size++;\n state->data += size;\n state->offset = offset;\n }\n } else {\n json_parse_string(state, string);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "cpio-2.14#util_prep#set_new_media_message.c", "codebase": "cpio-2.14", "c_file": "util.c", "function": "set_new_media_message", "sloc": "29", "c_code": "void\nset_new_media_message (char *message)\n{\n char *p;\n int prev_was_percent;\n p = message;\n prev_was_percent = 0;\n while (*p != '\\0')\n {\n if (*p == 'd' && prev_was_percent)\n break;\n prev_was_percent = (*p == '%');\n ++p;\n }\n if (*p == '\\0')\n {\n new_media_message = xstrdup (message);\n }\n else\n {\n int length = p - message - 1;\n new_media_message_with_number = xmalloc (length + 1);\n strncpy (new_media_message_with_number, message, length);\n new_media_message_with_number[length] = '\\0';\n length = strlen (p + 1);\n new_media_message_after_number = xmalloc (length + 1);\n strcpy (new_media_message_after_number, p + 1);\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "libxml2#xpath_prep#xmlXPathCastBooleanToString.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathCastBooleanToString", "sloc": "9", "c_code": "xmlChar *\nxmlXPathCastBooleanToString (int val) {\n xmlChar *ret;\n if (val)\n ret = xmlStrdup((const xmlChar *) \"true\");\n else\n ret = xmlStrdup((const xmlChar *) \"false\");\n return(ret);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#encoding_prep#xmlInitCharEncodingHandlers.c", "codebase": "libxml2", "c_file": "encoding.c", "function": "xmlInitCharEncodingHandlers", "sloc": "4", "c_code": "void\nxmlInitCharEncodingHandlers(void) {\n xmlInitParser();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#sbstrans_prep#iskeyword.c", "codebase": "dap-3.10", "c_file": "sbstrans.c", "function": "iskeyword", "sloc": "10", "c_code": "int iskeyword(char *str)\n{\n int k;\n for (k = 0; *keyword[k]; k++)\n {\n if (!linecmp(str, keyword[k]))\n return 1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#arith_inl_c_prep#Pl_Blt_Fast_Eq.c", "codebase": "gprolog-1.5.0", "c_file": "arith_inl_c.c", "function": "Pl_Blt_Fast_Eq", "sloc": "5", "c_code": "Bool\nPl_Blt_Fast_Eq(WamWord x, WamWord y)\n{\n return x == y;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#stream_c_prep#Pl_Close_Input_Term_Stream_1.c", "codebase": "gprolog-1.5.0", "c_file": "stream_c.c", "function": "Pl_Close_Input_Term_Stream_1", "sloc": "22", "c_code": "void\nPl_Close_Input_Term_Stream_1(WamWord sora_word)\n{\n int stm;\n StmInf *pstm;\n StrSInf *str_stream;\n int type;\n stm = Pl_Get_Stream_Or_Alias(sora_word, 1);\n pstm = pl_stm_tbl[stm];\n type = pstm->prop.other;\n if (type < 1 || type > 3)\n Pl_Err_Domain(pl_domain_term_stream_or_alias, sora_word);\n if (pstm->prop.output)\n Pl_Err_Permission(pl_permission_operation_close,\n pl_permission_type_stream, sora_word);\n if (type != 1)\n {\n str_stream = (StrSInf *) (pstm->file);\n free(str_stream->buff);\n }\n Pl_Delete_Str_Stream(stm);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngget_prep#png_get_unknown_chunks.c", "codebase": "optipng-0.7.8", "c_file": "pngget.c", "function": "png_get_unknown_chunks", "sloc": "11", "c_code": "int\npng_get_unknown_chunks(png_const_structrp png_ptr, png_inforp info_ptr,\n png_unknown_chunkpp unknowns)\n{\n if (png_ptr != ((void *)0) && info_ptr != ((void *)0) && unknowns != ((void *)0))\n {\n *unknowns = info_ptr->unknown_chunks;\n return info_ptr->unknown_chunks_num;\n }\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tinycc#tccasm_prep#tcc_assemble.c", "codebase": "tinycc", "c_file": "tccasm.c", "function": "tcc_assemble", "sloc": "12", "c_code": "int tcc_assemble(TCCState *s1, int do_preprocess)\n{\n int ret;\n tcc_debug_start(s1);\n cur_text_section = text_section;\n ind = cur_text_section->data_offset;\n nocode_wanted = 0;\n ret = tcc_assemble_internal(s1, do_preprocess, 1);\n cur_text_section->data_offset = ind;\n tcc_debug_end(s1);\n return ret;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_ema.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_ema", "sloc": "17", "c_code": "int ti_ema(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *input = inputs[0];\n const int period = (int)options[0];\n double *output = outputs[0];\n if (period < 1) return 1;\n if (size <= ti_ema_start(options)) return 0;\n const double per = 2 / ((double)period + 1);\n double val = input[0];\n *output++ = val;\n int i;\n for (i = 1; i < size; ++i) {\n val = (input[i]-val) * per + val;\n *output++ = val;\n }\n ((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)\", \"tiamalgamation.c\", 2432, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_DIGITS_FACTORIAL_SET_2_prep#min.c", "codebase": "transcoder-set", "c_file": "COUNT_DIGITS_FACTORIAL_SET_2.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "avl#avl_prep#height.c", "codebase": "avl", "c_file": "avl.c", "function": "height", "sloc": "6", "c_code": "int height(struct Node *N)\n{\n if (N == ((void *)0))\n return 0;\n return N->height;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_SUM_ALTERNATING_SUBSEQUENCE_SUM_prep#len.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_SUM_ALTERNATING_SUBSEQUENCE_SUM.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#HTMLtree_prep#htmlDocDumpMemory.c", "codebase": "libxml2", "c_file": "HTMLtree.c", "function": "htmlDocDumpMemory", "sloc": "4", "c_code": "void\nhtmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {\n htmlDocDumpMemoryFormat(cur, mem, size, 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_uri_prep#osip_uri_param_get_byname.c", "codebase": "libosip2-5.3.1", "c_file": "osip_uri.c", "function": "osip_uri_param_get_byname", "sloc": "22", "c_code": "int osip_uri_param_get_byname(osip_list_t *params, char *pname, osip_uri_param_t **url_param) {\n size_t pname_len;\n osip_uri_param_t *u_param;\n osip_list_iterator_t it;\n *url_param = ((void *)0);\n if (pname == ((void *)0))\n return -2;\n pname_len = strlen(pname);\n if (pname_len <= 0)\n return -2;\n u_param = (osip_uri_param_t *) osip_list_get_first(params, &it);\n while (u_param != 0) {\n size_t len;\n len = strlen(u_param->gname);\n if (pname_len == len && osip_strncasecmp(u_param->gname, pname, strlen(pname)) == 0) {\n *url_param = u_param;\n return 0;\n }\n u_param = (osip_uri_param_t *) osip_list_get_next(&it);\n }\n return -1;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#wam2ma_prep#F_get_current_choice.c", "codebase": "gprolog-1.5.0", "c_file": "wam2ma.c", "function": "F_get_current_choice", "sloc": "7", "c_code": "void\nF_get_current_choice(ArgVal arg[])\n{\n ArgVal *top = arg; PlLong xy; char c; ((xy) = *((PlLong *) (top)) , (top)++); if (xy < 5000) c = 'X'; else xy -= 5000, c='Y';\n Inst_Printf(\"call_c\", \"Pl_Get_Current_Choice()\");\n Inst_Printf(\"move_ret\", \"%c(%\" \"l\" \"d\" \")\", c, xy);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#stream_prep#get_data_pass_through.c", "codebase": "mtools-4.0.43", "c_file": "stream.c", "function": "get_data_pass_through", "sloc": "5", "c_code": "int get_data_pass_through(Stream_t *Stream, time_t *date, mt_off_t *size,\n int *type, uint32_t *address)\n{\n return (Stream->Next)->Class->get_data( (Stream->Next), (date), (size), (type), (address) );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_SERIES_23_45_67_89_UPTO_N_TERMS_prep#max.c", "codebase": "transcoder-set", "c_file": "SUM_SERIES_23_45_67_89_UPTO_N_TERMS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#access_prep#fsysdep_access.c", "codebase": "uucp-1.07", "c_file": "access.c", "function": "fsysdep_access", "sloc": "9", "c_code": "boolean\nfsysdep_access (zfile)\n const char *zfile;\n{\n if (access (zfile, 4) == 0)\n return (1);\n ulog (LOG_ERROR, \"%s: %s\", zfile, strerror ((*__errno_location ())));\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#LONGEST_COMMON_INCREASING_SUBSEQUENCE_LCS_LIS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "LONGEST_COMMON_INCREASING_SUBSEQUENCE_LCS_LIS.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr1 [ ], int n, int arr2 [ ], int m ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#write_c_prep#Pl_Write_1.c", "codebase": "gprolog-1.5.0", "c_file": "write_c.c", "function": "Pl_Write_1", "sloc": "8", "c_code": "void\nPl_Write_1(WamWord term_word)\n{\n (pl_sys_var[0]) = 4 | 8;\n (pl_sys_var[1]) = -1;\n (pl_sys_var[2]) = 1200;\n Pl_Write_Term_2(((PlLong) (0) + ((PlULong)0)), term_word);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FRIENDS_PAIRING_PROBLEM_prep#main.c", "codebase": "transcoder-set", "c_file": "FRIENDS_PAIRING_PROBLEM.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {99,62,87,87,61,88,73,62,98,57};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "cflow-1.7#c_prep#yy_create_buffer.c", "codebase": "cflow-1.7", "c_file": "c.c", "function": "yy_create_buffer", "sloc": "14", "c_code": "YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )\n{\n YY_BUFFER_STATE b;\n b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );\n if ( ! b )\n yy_fatal_error( \"out of dynamic memory in yy_create_buffer()\" );\n b->yy_buf_size = (yy_size_t)size;\n b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );\n if ( ! b->yy_ch_buf )\n yy_fatal_error( \"out of dynamic memory in yy_create_buffer()\" );\n b->yy_is_our_buffer = 1;\n yy_init_buffer(b,file );\n return b;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHOCOLATE_DISTRIBUTION_PROBLEM_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "CHOCOLATE_DISTRIBUTION_PROBLEM.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_TO_FIND_THE_AREA_OF_PENTAGON_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "PROGRAM_TO_FIND_THE_AREA_OF_PENTAGON.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ccm-aes128_prep#nettle_ccm_aes128_set_nonce.c", "codebase": "nettle-3.9.1", "c_file": "ccm-aes128.c", "function": "nettle_ccm_aes128_set_nonce", "sloc": "8", "c_code": "void\nnettle_ccm_aes128_set_nonce(struct ccm_aes128_ctx *ctx,\n size_t length, const uint8_t *nonce,\n size_t authlen, size_t msglen, size_t taglen)\n{\n nettle_ccm_set_nonce(&ctx->ccm, &ctx->cipher, (nettle_cipher_func *) nettle_aes128_encrypt,\n length, nonce, authlen, msglen, taglen);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#list_prep#xmlListReverseWalk.c", "codebase": "libxml2", "c_file": "list.c", "function": "xmlListReverseWalk", "sloc": "10", "c_code": "void\nxmlListReverseWalk(xmlListPtr l, xmlListWalker walker, void *user) {\n xmlLinkPtr lk;\n if ((l == ((void *)0)) || (walker == ((void *)0)))\n return;\n for(lk = l->sentinel->prev; lk != l->sentinel; lk = lk->prev) {\n if((walker(lk->data, user)) == 0)\n break;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "wget-1.21.4#retr_prep#set_local_file.c", "codebase": "wget-1.21.4", "c_file": "retr.c", "function": "set_local_file", "sloc": "11", "c_code": "void\nset_local_file (const char **file, const char *default_file)\n{\n if (opt.output_document)\n {\n if (output_stream_regular)\n *file = opt.output_document;\n }\n else\n *file = default_file;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_unquoted_keys_prep#json_write_string.c", "codebase": "json.h", "c_file": "allow_unquoted_keys.c", "function": "json_write_string", "sloc": "41", "c_code": "char *json_write_string(const struct json_string_s *string, char *data) {\n size_t i;\n *data++ = '\"';\n for (i = 0; i < string->string_size; i++) {\n switch (string->string[i]) {\n case '\"':\n *data++ = '\\\\';\n *data++ = '\"';\n break;\n case '\\\\':\n *data++ = '\\\\';\n *data++ = '\\\\';\n break;\n case '\\b':\n *data++ = '\\\\';\n *data++ = 'b';\n break;\n case '\\f':\n *data++ = '\\\\';\n *data++ = 'f';\n break;\n case '\\n':\n *data++ = '\\\\';\n *data++ = 'n';\n break;\n case '\\r':\n *data++ = '\\\\';\n *data++ = 'r';\n break;\n case '\\t':\n *data++ = '\\\\';\n *data++ = 't';\n break;\n default:\n *data++ = string->string[i];\n break;\n }\n }\n *data++ = '\"';\n return data;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 8}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsCatZl.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsCatZl", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsCatZl(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsCatZl\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsCatZl\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsCatZl(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlAddEncodingAlias.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlAddEncodingAlias", "sloc": "12", "c_code": "PyObject *\nlibxml_xmlAddEncodingAlias(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n char * name;\n char * alias;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"zz:xmlAddEncodingAlias\", &name, &alias))\n return(((void *)0));\n c_retval = xmlAddEncodingAlias(name, alias);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#cvi_prep#ti_cvi.c", "codebase": "tulipindicators-0.9.1", "c_file": "cvi.c", "function": "ti_cvi", "sloc": "25", "c_code": "int ti_cvi(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *high = inputs[0];\n const double *low = inputs[1];\n const int period = (int)options[0];\n double *output = outputs[0];\n if (period < 1) return 1;\n if (size <= ti_cvi_start(options)) return 0;\n const double per = 2 / ((double)period + 1);\n ti_buffer *lag = ti_buffer_new(period);\n double val = high[0]-low[0];\n int i;\n for (i = 1; i < period*2-1; ++i) {\n val = ((high[i]-low[i])-val) * per + val;\n do { (lag)->vals[(lag)->index] = (val); (lag)->index = ((lag)->index + 1); if ((lag)->index >= (lag)->size) (lag)->index = 0; } while (0);\n }\n for (i = period*2-1; i < size; ++i) {\n val = ((high[i]-low[i])-val) * per + val;\n const double old = lag->vals[lag->index];\n *output++ = 100.0 * (val - old) / old;\n do { (lag)->vals[(lag)->index] = (val); (lag)->index = ((lag)->index + 1); if ((lag)->index >= (lag)->size) (lag)->index = 0; } while (0);\n }\n ti_buffer_free(lag);\n ((void) sizeof ((output - outputs[0] == size - ti_cvi_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_cvi_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_cvi_start(options)\", \"indicators/cvi.c\", 66, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 2, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "nano-7.2#cut_prep#cut_text.c", "codebase": "nano-7.2", "c_file": "cut.c", "function": "cut_text", "sloc": "12", "c_code": "void cut_text(void)\n{\n if (!is_cuttable(((flags[((CUT_FROM_CURSOR) / (sizeof(unsigned) * 8))] & ((unsigned)1 << ((CUT_FROM_CURSOR) % (sizeof(unsigned) * 8)))) != 0) && openfile->mark == ((void *)0)))\n return;\n if (openfile->last_action != CUT || !keep_cutbuffer) {\n keep_cutbuffer = 0;\n add_undo(CUT, ((void *)0));\n }\n do_snip(openfile->mark != ((void *)0), 0, 0);\n update_undo(CUT);\n wipe_statusbar();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING.c", "function": "f_gold", "sloc": "21", "c_code": "char f_gold ( char str [] ) {\n int len = strlen(str);\n int count = 0;\n char res = str [ 0 ];\n for ( int i = 0;\n i < len;\n i ++ ) {\n int cur_count = 1;\n for ( int j = i + 1;\n j < len;\n j ++ ) {\n if ( str [ i ] != str [ j ] ) break;\n cur_count ++;\n }\n if ( cur_count > count ) {\n count = cur_count;\n res = str [ i ];\n }\n }\n return res;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#SUM_OF_ALL_ELEMENTS_UP_TO_NTH_ROW_IN_A_PASCALS_TRIANGLE_prep#sort.c", "codebase": "transcoder-set", "c_file": "SUM_OF_ALL_ELEMENTS_UP_TO_NTH_ROW_IN_A_PASCALS_TRIANGLE.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#lex_prep#GetNumber.c", "codebase": "mcsim-6.2.0", "c_file": "lex.c", "function": "GetNumber", "sloc": "80", "c_code": "void GetNumber (PINPUTBUF pibIn, PSTR szLex, PINT piLexType)\n{\n int i = 0;\n char c;\n BOOL bHasSign = 0;\n BOOL bLeadingDigits = 0;\n enum States\n {Start, Digits1, Point, Digits2, Exp, ExpSign, Digits3, End} eState;\n if (!pibIn || !szLex || !piLexType)\n return;\n eState = Start;\n *piLexType = 0x0000;\n while ((c = *pibIn->pbufCur)\n && i < 255 -1\n && eState != End) {\n switch (eState) {\n case Start:\n if (c == '.')\n eState = Point;\n else if (!bHasSign && ((c) == '+' || (c) == '-'))\n bHasSign = 1;\n else if (((*__ctype_b_loc ())[(int) ((*pibIn->pbufCur))] & (unsigned short int) _ISdigit)) {\n bLeadingDigits = *piLexType = 0x0002;\n eState = Digits1;\n }\n else\n eState = End;\n break;\n case Digits1:\n if (c == '.')\n eState = Point;\n else if (c == 'e' || c == 'E')\n eState = Exp;\n else if (!((*__ctype_b_loc ())[(int) ((c))] & (unsigned short int) _ISdigit))\n eState = End;\n break;\n case Point:\n *piLexType = 0x0004;\n if (bLeadingDigits && (c == 'e' || c == 'E'))\n eState = Exp;\n else if (((*__ctype_b_loc ())[(int) ((c))] & (unsigned short int) _ISdigit))\n eState = Digits2;\n else {\n if (!bLeadingDigits)\n *piLexType = 0x0000;\n eState = End;\n }\n break;\n case Digits2:\n if (c == 'e' || c == 'E')\n eState = Exp;\n else if (!((*__ctype_b_loc ())[(int) ((c))] & (unsigned short int) _ISdigit))\n eState = End;\n break;\n case Exp:\n *piLexType = 0x0004;\n if (((c) == '+' || (c) == '-')) {\n eState = ExpSign;\n break;\n }\n case ExpSign:\n if (((*__ctype_b_loc ())[(int) ((c))] & (unsigned short int) _ISdigit))\n eState = Digits3;\n else {\n *piLexType = 0x0000;\n eState = End;\n }\n break;\n case Digits3:\n if (!((*__ctype_b_loc ())[(int) ((c))] & (unsigned short int) _ISdigit))\n eState = End;\n break;\n case End:\n break;\n }\n if (eState != End)\n szLex[i++] = *pibIn->pbufCur++;\n }\n szLex[i] = '\\0';\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 16, "for_loop": 0, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 8}}, {"id": "mcsim-6.2.0#mod_prep#InitInfo.c", "codebase": "mcsim-6.2.0", "c_file": "mod.c", "function": "InitInfo", "sloc": "17", "c_code": "void InitInfo (PINPUTINFO pinfo, PSTR szModGenName)\n{\n pinfo->wContext = 0x0001;\n pinfo->bDelays = 0;\n pinfo->bforR = 0;\n pinfo->bTemplateInUse = 0;\n pinfo->szModGenName = szModGenName;\n pinfo->pvmGloVars = ((void *)0);\n pinfo->pvmDynEqns = ((void *)0);\n pinfo->pvmScaleEqns = ((void *)0);\n pinfo->pvmJacobEqns = ((void *)0);\n pinfo->pvmCalcOutEqns = ((void *)0);\n pinfo->pvmEventEqns = ((void *)0);\n pinfo->pvmRootEqns = ((void *)0);\n pinfo->pvmCpts = ((void *)0);\n pinfo->pvmLocalCpts = ((void *)0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 9, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#safe-atoi_prep#safe_atoi.c", "codebase": "findutils-4.9.0", "c_file": "safe-atoi.c", "function": "safe_atoi", "sloc": "33", "c_code": "int\nsafe_atoi (const char *s, enum quoting_style style)\n{\n long lval;\n char *end;\n (*__errno_location ()) = 0;\n lval = strtol (s, &end, 10);\n if ( (0x7fffffffffffffffL == lval) || ((-0x7fffffffffffffffL - 1L) == lval) )\n {\n if ((*__errno_location ()) == 34)\n {\n ((!!sizeof (struct { _Static_assert (1, \"verify_expr (\" \"1\" \", \" \"(error (1, (*__errno_location ()), \\\"%s\\\", s), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (1, (*__errno_location ()), \"%s\", s), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (1, (*__errno_location ()), \"%s\", s), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n else\n {\n ((!!sizeof (struct { _Static_assert (1, \"verify_expr (\" \"1\" \", \" \"(error (1, (*__errno_location ()), \\\"%s\\\", s), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (1, (*__errno_location ()), \"%s\", s), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (1, (*__errno_location ()), \"%s\", s), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n }\n if (lval > 0x7fffffff || lval < (-0x7fffffff - 1))\n {\n (*__errno_location ()) = 34;\n ((!!sizeof (struct { _Static_assert (1, \"verify_expr (\" \"1\" \", \" \"(error (1, (*__errno_location ()), \\\"%s\\\", s), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (1, (*__errno_location ()), \"%s\", s), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (1, (*__errno_location ()), \"%s\", s), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n else if (*end)\n {\n ((!!sizeof (struct { _Static_assert (1, \"verify_expr (\" \"1\" \", \" \"(error (1, (*__errno_location ()), gettext (\\\"Unexpected suffix %s on %s\\\"), quotearg_n_style (0, style, end), quotearg_n_style (1, style, s)), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (1, (*__errno_location ()), gettext (\"Unexpected suffix %s on %s\"), quotearg_n_style (0, style, end), quotearg_n_style (1, style, s)), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (1, (*__errno_location ()), gettext (\"Unexpected suffix %s on %s\"), quotearg_n_style (0, style, end), quotearg_n_style (1, style, s)), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n else if (end == s)\n {\n ((!!sizeof (struct { _Static_assert (1, \"verify_expr (\" \"1\" \", \" \"(error (1, (*__errno_location ()), gettext (\\\"Expected an integer: %s\\\"), quotearg_n_style (0, style, s)), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (1, (*__errno_location ()), gettext (\"Expected an integer: %s\"), quotearg_n_style (0, style, s)), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (1, (*__errno_location ()), gettext (\"Expected an integer: %s\"), quotearg_n_style (0, style, s)), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n return (int)lval;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 1, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_REMOVAL_FROM_ARRAY_WHEN_REMOVAL_TIME_WAITING_TIME_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_REMOVAL_FROM_ARRAY_WHEN_REMOVAL_TIME_WAITING_TIME.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "heman#mat3_prep#kmMat3Adjugate.c", "codebase": "heman", "c_file": "mat3.c", "function": "kmMat3Adjugate", "sloc": "13", "c_code": "kmMat3* kmMat3Adjugate(kmMat3* pOut, const kmMat3* pIn)\n{\n pOut->mat[0] = pIn->mat[4] * pIn->mat[8] - pIn->mat[5] * pIn->mat[7];\n pOut->mat[1] = pIn->mat[2] * pIn->mat[7] - pIn->mat[1] * pIn->mat[8];\n pOut->mat[2] = pIn->mat[1] * pIn->mat[5] - pIn->mat[2] * pIn->mat[4];\n pOut->mat[3] = pIn->mat[5] * pIn->mat[6] - pIn->mat[3] * pIn->mat[8];\n pOut->mat[4] = pIn->mat[0] * pIn->mat[8] - pIn->mat[2] * pIn->mat[6];\n pOut->mat[5] = pIn->mat[2] * pIn->mat[3] - pIn->mat[0] * pIn->mat[5];\n pOut->mat[6] = pIn->mat[3] * pIn->mat[7] - pIn->mat[4] * pIn->mat[6];\n pOut->mat[7] = pIn->mat[1] * pIn->mat[6] - pIn->mat[0] * pIn->mat[7];\n pOut->mat[8] = pIn->mat[0] * pIn->mat[4] - pIn->mat[1] * pIn->mat[3];\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlParseEntityRef.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlParseEntityRef", "sloc": "10", "c_code": "xmlEntityPtr\nxmlParseEntityRef(xmlParserCtxtPtr ctxt) {\n const xmlChar *name;\n if (ctxt == ((void *)0))\n return(((void *)0));\n name = xmlParseEntityRefInternal(ctxt);\n if (name == ((void *)0))\n return(((void *)0));\n return(xmlLookupGeneralEntity(ctxt, name, 0));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#tc_black_marubozu.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "tc_black_marubozu", "sloc": "5", "c_code": "int tc_black_marubozu(int size, TC_REAL const *const *inputs, tc_config const *options, tc_result *output) {\n const TC_REAL *open = inputs[0]; const TC_REAL *high = inputs[1]; const TC_REAL *low = inputs[2]; const TC_REAL *close = inputs[3]; const int period = options->period; const TC_REAL div = 1.0 / period; TC_REAL avg_body_sum = 0; TC_REAL avg_total_sum = 0; if (period < 1) return 1; if (size < period) return 0; int i; for (i = 0; i < period; ++i) { avg_body_sum += (fabs(open[(i)] - close[(i)])); avg_total_sum += (high[(i)] - low[(i)]); }\n while(i < size) { const TC_REAL top = (open[(i)] > close[(i)] ? open[(i)] : close[(i)]); const TC_REAL bottom = (open[(i)] < close[(i)] ? open[(i)] : close[(i)]); const TC_REAL body = (fabs(open[(i)] - close[(i)])); const TC_REAL total = (high[(i)] - low[(i)]); const TC_REAL upper = (high[(i)] - top); const TC_REAL lower = (bottom - low[(i)]); const TC_REAL avg_body = avg_body_sum * div; const TC_REAL avg_total = avg_total_sum * div; (void)top;(void)bottom;(void)body;(void)total; (void)upper;(void)lower;(void)avg_body;(void)avg_total; if (((fabs(open[(i)] - close[(i)])) > (options->body_long * avg_body)) && ((high[(i)] - top) < (options->wick_none * avg_total)) && ((bottom - low[(i)]) < (options->wick_none * avg_total)) && (open[i]>close[i])) { do { const tc_hit hit = {i, (1L<<4)}; const int r = tc_result_add(output, hit); if (r != 0) return r; } while (0); } avg_body_sum += body; avg_body_sum -= (fabs(open[(i-period)] - close[(i-period)])); avg_total_sum += total; avg_total_sum -= (high[(i-period)] - low[(i-period)]); ++i; };\n return 0;\n }\n", "c_constructs": {"pointer_type": 4, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsBengali.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsBengali", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsBengali(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsBengali\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsBengali\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsBengali(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_TIME_WRITE_CHARACTERS_USING_INSERT_DELETE_COPY_OPERATION_prep#len.c", "codebase": "transcoder-set", "c_file": "MINIMUM_TIME_WRITE_CHARACTERS_USING_INSERT_DELETE_COPY_OPERATION.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "pth-2.0.7#test_philo_prep#main.c", "codebase": "pth-2.0.7", "c_file": "test_philo.c", "function": "main", "sloc": "65", "c_code": "int main(int argc, char *argv[])\n{\n int i;\n sigset_t ss;\n int sig;\n pth_event_t ev;\n pth_init();\n printf(\"This is TEST_PHILO, a Pth test showing the Five Dining Philosophers\\n\");\n printf(\"\\n\");\n printf(\"This is a demonstration showing the famous concurrency problem of the\\n\");\n printf(\"Five Dining Philosophers as analysed 1965 by E.W.Dijkstra:\\n\");\n printf(\"\\n\");\n printf(\"Five philosophers are sitting around a round table, each with a bowl of\\n\");\n printf(\"Chinese food in front of him. Between periods of talking they may start\\n\");\n printf(\"eating whenever they want to, with their bowls being filled frequently.\\n\");\n printf(\"But there are only five chopsticks available, one each to the left of\\n\");\n printf(\"each bowl - and for eating Chinese food one needs two chopsticks. When\\n\");\n printf(\"a philosopher wants to start eating, he must pick up the chopstick to\\n\");\n printf(\"the left of his bowl and the chopstick to the right of his bowl. He\\n\");\n printf(\"may find, however, that either one (or even both) of the chopsticks is\\n\");\n printf(\"unavailable as it is being used by another philosopher sitting on his\\n\");\n printf(\"right or left, so he has to wait.\\n\");\n printf(\"\\n\");\n printf(\"This situation shows classical contention under concurrency (the\\n\");\n printf(\"philosophers want to grab the chopsticks) and the possibility of a\\n\");\n printf(\"deadlock (all philosophers wait that the chopstick to their left becomes\\n\");\n printf(\"available).\\n\");\n printf(\"\\n\");\n printf(\"The demonstration runs max. 60 seconds. To stop before, press CTRL-C.\\n\");\n printf(\"\\n\");\n printf(\"+----P1----+----P2----+----P3----+----P4----+----P5----+\\n\");\n tab = (table *)malloc(sizeof(table));\n if (!pth_mutex_init(&(tab->mutex))) {\n perror(\"pth_mutex_init\");\n exit(1);\n }\n for (i = 0; i < 5; i++) {\n (tab->self)[i] = i;\n (tab->status)[i] = thinking;\n if (!pth_cond_init(&((tab->condition)[i]))) {\n perror(\"pth_cond_init\");\n exit(1);\n }\n }\n for (i = 0; i < 5; i++) {\n if (((tab->tid)[i] =\n pth_spawn((pth_attr_t)(0), philosopher,\n &((tab->self)[i]))) == ((void *)0)) {\n perror(\"pth_spawn\");\n exit(1);\n }\n }\n sigemptyset(&ss);\n sigaddset(&ss, 2);\n ev = pth_event((1<<(4)), pth_timeout(60,0));\n pth_sigwait_ev(&ss, &sig, ev);\n pth_event_free(ev, PTH_FREE_ALL);\n for (i = 0; i < 5; i++)\n pth_cancel((tab->tid)[i]);\n while (pth_join(((void *)0), ((void *)0)));\n printf(\"+----------+----------+----------+----------+----------+\\n\");\n free(tab);\n pth_kill();\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 2, "memory_operation": 0, "if_statement": 3, "for_loop": 3, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_2_prep#sort.c", "codebase": "transcoder-set", "c_file": "SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_2.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#assert_c_prep#Pl_Assert_5.c", "codebase": "gprolog-1.5.0", "c_file": "assert_c.c", "function": "Pl_Assert_5", "sloc": "10", "c_code": "void\nPl_Assert_5(WamWord head_word, WamWord body_word,\n WamWord asserta_word, WamWord check_perm_word, WamWord pl_file_word)\n{\n Bool asserta = Pl_Rd_Integer(asserta_word);\n Bool check_perm = Pl_Rd_Integer(check_perm_word);\n int pl_file = Pl_Rd_Atom(pl_file_word);\n last_clause = Pl_Add_Dynamic_Clause(head_word, body_word, asserta,\n check_perm, pl_file);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#variadic_prep#fatalx.c", "codebase": "tmux", "c_file": "variadic.c", "function": "fatalx", "sloc": "12", "c_code": "__attribute__ ((__noreturn__)) void\nfatalx(const char *msg, ...)\n{\n char *fmt;\n va_list ap;\n __builtin_va_start(ap,msg);\n if (asprintf(&fmt, \"fatal: %s\", msg) == -1)\n exit(1);\n log_vwrite(fmt, ap);\n __builtin_va_end(ap);\n exit(1);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_SUM_SUBSEQUENCE_LEAST_ONE_EVERY_FOUR_CONSECUTIVE_ELEMENTS_PICKED_prep#len.c", "codebase": "transcoder-set", "c_file": "MINIMUM_SUM_SUBSEQUENCE_LEAST_ONE_EVERY_FOUR_CONSECUTIVE_ELEMENTS_PICKED.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_SERIES_0_6_0_06_0_006_0_0006_N_TERMS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SUM_SERIES_0_6_0_06_0_006_0_0006_N_TERMS.c", "function": "f_filled", "sloc": "1", "c_code": "float f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#nettle-hash_prep#main.c", "codebase": "nettle-3.9.1", "c_file": "nettle-hash.c", "function": "main", "sloc": "87", "c_code": "int\nmain (int argc, char **argv)\n{\n const char *alg_name = ((void *)0);\n const struct nettle_hash *alg;\n unsigned length = 0;\n int raw = 0;\n int c;\n enum { OPT_HELP = 0x300, OPT_RAW, OPT_LIST };\n static const struct option options[] =\n {\n { \"help\", 0, ((void *)0), OPT_HELP },\n { \"version\", 0, ((void *)0), 'V' },\n { \"algorithm\", 1, ((void *)0), 'a' },\n { \"length\", 1, ((void *)0), 'l' },\n { \"list\", 0, ((void *)0), OPT_LIST },\n { \"raw\", 0, ((void *)0), OPT_RAW },\n { ((void *)0), 0, ((void *)0), 0 }\n };\n while ( (c = getopt_long(argc, argv, \"Va:l:\", options, ((void *)0))) != -1)\n switch (c)\n {\n default:\n abort();\n case '?':\n usage (stderr);\n return 1;\n case OPT_HELP:\n usage (stdout);\n return 0;\n case 'V':\n printf(\"nettle-hash (\" \"nettle 3.9.1\" \")\\n\");\n return 0;\n case 'a':\n alg_name = optarg;\n break;\n case 'l':\n {\n int arg;\n arg = atoi (optarg);\n if (arg <= 0)\n die (\"Invalid length argument: `%s'\\n\", optarg);\n length = arg;\n }\n break;\n case OPT_RAW:\n raw = 1;\n break;\n case OPT_LIST:\n list_algorithms();\n return 0;\n }\n if (!alg_name)\n die(\"Algorithm argument (-a option) is mandatory.\\n\"\n \"See nettle-hash --help for further information.\\n\");\n alg = nettle_lookup_hash (alg_name);\n if (!alg)\n die(\"Hash algorithm `%s' not supported or .\\n\"\n \"Use nettle-hash --list to list available algorithms.\\n\",\n alg_name);\n if (length == 0)\n length = alg->digest_size;\n else if (length > alg->digest_size)\n die (\"Length argument %d too large for selected algorithm.\\n\",\n length);\n argv += optind;\n argc -= optind;\n if (argc == 0)\n digest_file (alg, length, raw, stdin);\n else\n {\n int i;\n for (i = 0; i < argc; i++)\n {\n FILE *f = fopen (argv[i], \"rb\");\n if (!f)\n die (\"Cannot open `%s': %s\\n\", argv[i], strerror((*__errno_location ())));\n printf(\"%s: \", argv[i]);\n if (!digest_file (alg, length, raw, f))\n die(\"Reading `%s' failed: %s\\n\", argv[i], strerror((*__errno_location ())));\n fclose(f);\n }\n }\n if (fflush(stdout) != 0 )\n die(\"Write failed: %s\\n\", strerror((*__errno_location ())));\n return 0;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 9, "memory_management": 0, "memory_operation": 0, "if_statement": 9, "for_loop": 1, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 3}}, {"id": "transcoder-set#WRITE_A_C_PROGRAM_TO_FIND_THE_PARITY_OF_AN_UNSIGNED_INTEGER_prep#min.c", "codebase": "transcoder-set", "c_file": "WRITE_A_C_PROGRAM_TO_FIND_THE_PARITY_OF_AN_UNSIGNED_INTEGER.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_NUMBER_PLATFORMS_REQUIRED_RAILWAYBUS_STATION_prep#min.c", "codebase": "transcoder-set", "c_file": "MINIMUM_NUMBER_PLATFORMS_REQUIRED_RAILWAYBUS_STATION.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsEnclosedAlphanumerics.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsEnclosedAlphanumerics", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsEnclosedAlphanumerics(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsEnclosedAlphanumerics\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsEnclosedAlphanumerics\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsEnclosedAlphanumerics(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_TRIPLET_SUM_ARRAY_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_TRIPLET_SUM_ARRAY.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#ps_prep#pict_rectangle.c", "codebase": "dap-3.10", "c_file": "ps.c", "function": "pict_rectangle", "sloc": "9", "c_code": "void pict_rectangle(pict *p, double llx, double lly, double sx, double sy)\n{\n strcpy(p->pict_type, \"LINE\");\n pict_point(p, llx, lly);\n pict_point(p, llx + sx, lly);\n pict_point(p, llx + sx, lly + sy);\n pict_point(p, llx, lly + sy);\n pict_point(p, llx, lly);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_get_key_size.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_get_key_size", "sloc": "31", "c_code": "int json_get_key_size(struct json_parse_state_s *state) {\n const size_t flags_bitset = state->flags_bitset;\n if (json_parse_flags_allow_unquoted_keys & flags_bitset) {\n size_t offset = state->offset;\n const size_t size = state->size;\n const char *const src = state->src;\n size_t data_size = state->data_size;\n if ('\"' == src[offset]) {\n return json_get_string_size(state, 1);\n } else if ((json_parse_flags_allow_single_quoted_strings & flags_bitset) &&\n ('\\'' == src[offset])) {\n return json_get_string_size(state, 1);\n } else {\n while ((offset < size) && is_valid_unquoted_key_char(src[offset])) {\n offset++;\n data_size++;\n }\n data_size++;\n if (json_parse_flags_allow_location_information & flags_bitset) {\n state->dom_size += sizeof(struct json_string_ex_s);\n } else {\n state->dom_size += sizeof(struct json_string_s);\n }\n state->offset = offset;\n state->data_size = data_size;\n return 0;\n }\n } else {\n return json_get_string_size(state, 1);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#hmac-gosthash94_prep#nettle_hmac_gosthash94_update.c", "codebase": "nettle-3.9.1", "c_file": "hmac-gosthash94.c", "function": "nettle_hmac_gosthash94_update", "sloc": "6", "c_code": "void\nnettle_hmac_gosthash94_update(struct hmac_gosthash94_ctx *ctx,\n size_t length, const uint8_t *data)\n{\n nettle_gosthash94_update(&ctx->state, length, data);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_PRINT_SUM_GIVEN_NTH_TERM_prep#min.c", "codebase": "transcoder-set", "c_file": "PROGRAM_PRINT_SUM_GIVEN_NTH_TERM.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_hexadecimal_numbers_prep#json_skip_all_skippables.c", "codebase": "json.h", "c_file": "allow_hexadecimal_numbers.c", "function": "json_skip_all_skippables", "sloc": "31", "c_code": "int json_skip_all_skippables(struct json_parse_state_s *state) {\n int did_consume = 0;\n const size_t size = state->size;\n if (json_parse_flags_allow_c_style_comments & state->flags_bitset) {\n do {\n if (state->offset == size) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n did_consume = json_skip_whitespace(state);\n if (state->offset >= size) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n did_consume |= json_skip_c_style_comments(state);\n } while (0 != did_consume);\n } else {\n do {\n if (state->offset == size) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n did_consume = json_skip_whitespace(state);\n } while (0 != did_consume);\n }\n if (state->offset == size) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "grep-3.11#grep_prep#main.c", "codebase": "grep-3.11", "c_file": "grep.c", "function": "main", "sloc": "441", "c_code": "int\nmain (int argc, char **argv)\n{\n char *keys = ((void *)0);\n idx_t keycc = 0, keyalloc = 0;\n int matcher = -1;\n int opt;\n int prev_optind, last_recursive;\n intmax_t default_context;\n FILE *fp;\n exit_failure = EXIT_TROUBLE;\n ;\n int filename_option = 0;\n eolbyte = '\\n';\n filename_mask = ~0;\n max_count = (9223372036854775807L);\n out_after = out_before = -1;\n default_context = -1;\n only_matching = 0;\n setlocale (6, \"\");\n bindtextdomain (\"grep\", \"/usr/local/share/locale\");\n textdomain (\"grep\");\n init_localeinfo (&localeinfo);\n atexit (clean_up_stdout);\n c_stack_action (((void *)0));\n last_recursive = 0;\n pattern_table = hash_initialize (0, 0, hash_pattern, compare_patterns, 0);\n if (!pattern_table)\n xalloc_die ();\n while (prev_optind = optind,\n (opt = get_nondigit_option (argc, argv, &default_context)) != -1)\n switch (opt)\n {\n case 'A':\n context_length_arg (optarg, &out_after);\n break;\n case 'B':\n context_length_arg (optarg, &out_before);\n break;\n case 'C':\n context_length_arg (optarg, &default_context);\n break;\n case 'D':\n if ((strcmp (optarg, \"read\") == 0))\n devices = READ_DEVICES;\n else if ((strcmp (optarg, \"skip\") == 0))\n devices = SKIP_DEVICES;\n else\n ((!!sizeof (struct { _Static_assert (EXIT_TROUBLE, \"verify_expr (\" \"EXIT_TROUBLE\" \", \" \"(error (EXIT_TROUBLE, 0, gettext(\\\"unknown devices method\\\")), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (EXIT_TROUBLE, 0, gettext(\"unknown devices method\")), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_TROUBLE, 0, gettext(\"unknown devices method\")), ((0) ? (void) 0 : __builtin_unreachable ()))));\n break;\n case 'E':\n matcher = setmatcher (\"egrep\", matcher);\n break;\n case 'F':\n matcher = setmatcher (\"fgrep\", matcher);\n break;\n case 'P':\n matcher = setmatcher (\"perl\", matcher);\n break;\n case 'G':\n matcher = setmatcher (\"grep\", matcher);\n break;\n case 'X':\n matcher = setmatcher (optarg, matcher);\n break;\n case 'H':\n filename_option = 1;\n break;\n case 'I':\n binary_files = WITHOUT_MATCH_BINARY_FILES;\n break;\n case 'T':\n align_tabs = 1;\n break;\n case 'U':\n if (0)\n binary = 1;\n break;\n case 'u':\n error (0, 0, gettext(\"warning: --unix-byte-offsets (-u) is obsolete\"));\n break;\n case 'V':\n show_version = 1;\n break;\n case 'a':\n binary_files = TEXT_BINARY_FILES;\n break;\n case 'b':\n out_byte = 1;\n break;\n case 'c':\n count_matches = 1;\n break;\n case 'd':\n directories = ((directories_types) [__xargmatch_internal (\"--directories\", optarg, directories_args, (void const *) (directories_types), sizeof *(directories_types), argmatch_die, 1)]);\n if (directories == RECURSE_DIRECTORIES)\n last_recursive = prev_optind;\n break;\n case 'e':\n {\n idx_t cc = strlen (optarg);\n ptrdiff_t shortage = keycc - keyalloc + cc + 1;\n if (0 < shortage)\n pattern_array = keys = xpalloc (keys, &keyalloc, shortage, -1, 1);\n char *keyend = mempcpy (keys + keycc, optarg, cc);\n *keyend = '\\n';\n keycc = update_patterns (keys, keycc, keycc + cc + 1, \"\");\n }\n break;\n case 'f':\n {\n if ((strcmp (optarg, \"-\") == 0))\n {\n if (binary)\n xset_binary_mode (0, 0);\n fp = stdin;\n }\n else\n {\n fp = rpl_fopen (optarg, binary ? \"rb\" : \"r\");\n if (!fp)\n ((!!sizeof (struct { _Static_assert (EXIT_TROUBLE, \"verify_expr (\" \"EXIT_TROUBLE\" \", \" \"(error (EXIT_TROUBLE, (*__errno_location ()), \\\"%s\\\", optarg), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (EXIT_TROUBLE, (*__errno_location ()), \"%s\", optarg), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_TROUBLE, (*__errno_location ()), \"%s\", optarg), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n idx_t newkeycc = keycc, cc;\n for (;; newkeycc += cc)\n {\n ptrdiff_t shortage = newkeycc - keyalloc + 2;\n if (0 < shortage)\n pattern_array = keys = xpalloc (keys, &keyalloc,\n shortage, -1, 1);\n cc = fread_unlocked (keys + newkeycc,1,keyalloc - (newkeycc + 1),fp);\n if (cc == 0)\n break;\n }\n int err = (*__errno_location ());\n if (!ferror_unlocked (fp))\n {\n err = 0;\n if (fp == stdin)\n clearerr_unlocked (fp);\n else if (fclose (fp) != 0)\n err = (*__errno_location ());\n }\n if (err)\n ((!!sizeof (struct { _Static_assert (EXIT_TROUBLE, \"verify_expr (\" \"EXIT_TROUBLE\" \", \" \"(error (EXIT_TROUBLE, err, \\\"%s\\\", optarg), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (EXIT_TROUBLE, err, \"%s\", optarg), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_TROUBLE, err, \"%s\", optarg), ((0) ? (void) 0 : __builtin_unreachable ()))));\n if (newkeycc != keycc && keys[newkeycc - 1] != '\\n')\n keys[newkeycc++] = '\\n';\n keycc = update_patterns (keys, keycc, newkeycc, optarg);\n }\n break;\n case 'h':\n filename_option = -1;\n break;\n case 'i':\n case 'y':\n match_icase = 1;\n break;\n case NO_IGNORE_CASE_OPTION:\n match_icase = 0;\n break;\n case 'L':\n list_files = LISTFILES_NONMATCHING;\n break;\n case 'l':\n list_files = LISTFILES_MATCHING;\n break;\n case 'm':\n switch (xstrtoimax (optarg, 0, 10, &max_count, \"\"))\n {\n case LONGINT_OK:\n case LONGINT_OVERFLOW:\n break;\n default:\n ((!!sizeof (struct { _Static_assert (EXIT_TROUBLE, \"verify_expr (\" \"EXIT_TROUBLE\" \", \" \"(error (EXIT_TROUBLE, 0, gettext(\\\"invalid max count\\\")), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (EXIT_TROUBLE, 0, gettext(\"invalid max count\")), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_TROUBLE, 0, gettext(\"invalid max count\")), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n break;\n case 'n':\n out_line = 1;\n break;\n case 'o':\n only_matching = 1;\n break;\n case 'q':\n exit_on_match = 1;\n exit_failure = 0;\n break;\n case 'R':\n fts_options = basic_fts_options | 0x0002;\n __attribute__ ((__fallthrough__));\n case 'r':\n directories = RECURSE_DIRECTORIES;\n last_recursive = prev_optind;\n break;\n case 's':\n suppress_errors = 1;\n break;\n case 'v':\n out_invert = 1;\n break;\n case 'w':\n wordinit ();\n match_words = 1;\n break;\n case 'x':\n match_lines = 1;\n break;\n case 'Z':\n filename_mask = 0;\n break;\n case 'z':\n eolbyte = '\\0';\n break;\n case BINARY_FILES_OPTION:\n if ((strcmp (optarg, \"binary\") == 0))\n binary_files = BINARY_BINARY_FILES;\n else if ((strcmp (optarg, \"text\") == 0))\n binary_files = TEXT_BINARY_FILES;\n else if ((strcmp (optarg, \"without-match\") == 0))\n binary_files = WITHOUT_MATCH_BINARY_FILES;\n else\n ((!!sizeof (struct { _Static_assert (EXIT_TROUBLE, \"verify_expr (\" \"EXIT_TROUBLE\" \", \" \"(error (EXIT_TROUBLE, 0, gettext(\\\"unknown binary-files type\\\")), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (EXIT_TROUBLE, 0, gettext(\"unknown binary-files type\")), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_TROUBLE, 0, gettext(\"unknown binary-files type\")), ((0) ? (void) 0 : __builtin_unreachable ()))));\n break;\n case COLOR_OPTION:\n if (optarg)\n {\n if (!c_strcasecmp (optarg, \"always\")\n || !c_strcasecmp (optarg, \"yes\")\n || !c_strcasecmp (optarg, \"force\"))\n color_option = 1;\n else if (!c_strcasecmp (optarg, \"never\")\n || !c_strcasecmp (optarg, \"no\")\n || !c_strcasecmp (optarg, \"none\"))\n color_option = 0;\n else if (!c_strcasecmp (optarg, \"auto\")\n || !c_strcasecmp (optarg, \"tty\")\n || !c_strcasecmp (optarg, \"if-tty\"))\n color_option = 2;\n else\n show_help = 1;\n }\n else\n color_option = 2;\n break;\n case EXCLUDE_OPTION:\n case INCLUDE_OPTION:\n for (int cmd = 0; cmd < 2; cmd++)\n {\n if (!excluded_patterns[cmd])\n excluded_patterns[cmd] = new_exclude ();\n add_exclude (excluded_patterns[cmd], optarg,\n ((opt == INCLUDE_OPTION ? (1 << 29) : 0)\n | exclude_options (cmd)));\n }\n break;\n case EXCLUDE_FROM_OPTION:\n for (int cmd = 0; cmd < 2; cmd++)\n {\n if (!excluded_patterns[cmd])\n excluded_patterns[cmd] = new_exclude ();\n if (add_exclude_file (add_exclude, excluded_patterns[cmd],\n optarg, exclude_options (cmd), '\\n')\n != 0)\n ((!!sizeof (struct { _Static_assert (EXIT_TROUBLE, \"verify_expr (\" \"EXIT_TROUBLE\" \", \" \"(error (EXIT_TROUBLE, (*__errno_location ()), \\\"%s\\\", optarg), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (EXIT_TROUBLE, (*__errno_location ()), \"%s\", optarg), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_TROUBLE, (*__errno_location ()), \"%s\", optarg), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n break;\n case EXCLUDE_DIRECTORY_OPTION:\n strip_trailing_slashes (optarg);\n for (int cmd = 0; cmd < 2; cmd++)\n {\n if (!excluded_directory_patterns[cmd])\n excluded_directory_patterns[cmd] = new_exclude ();\n add_exclude (excluded_directory_patterns[cmd], optarg,\n exclude_options (cmd));\n }\n break;\n case GROUP_SEPARATOR_OPTION:\n group_separator = optarg;\n break;\n case LINE_BUFFERED_OPTION:\n line_buffered = 1;\n break;\n case LABEL_OPTION:\n label = optarg;\n break;\n case 0:\n break;\n default:\n usage (EXIT_TROUBLE);\n break;\n }\n if (show_version)\n {\n version_etc (stdout, getprogname (), \"GNU grep\", \"3.11\",\n (char *) ((void *)0));\n puts (gettext(\"Written by Mike Haertel and others; see\\n\" \".\"));\n Pprint_version ();\n return 0;\n }\n if (show_help)\n usage (0);\n if (keys)\n {\n if (keycc == 0)\n {\n out_invert ^= 1;\n match_lines = match_words = 0;\n keys[keycc++] = '\\n';\n }\n }\n else if (optind < argc)\n {\n char const *pat = argv[optind++];\n _Bool skip_bs = (matcher != F_MATCHER_INDEX\n && pat[0] == '\\\\' && pat[1] == '-');\n pattern_array = keys = xstrdup (pat + skip_bs);\n idx_t patlen = strlen (keys);\n keys[patlen] = '\\n';\n keycc = update_patterns (keys, 0, patlen + 1, \"\");\n }\n else\n usage (EXIT_TROUBLE);\n keycc--;\n hash_free (pattern_table);\n _Bool possibly_tty = 0;\n struct stat tmp_stat;\n if (! exit_on_match && fstat (1, &tmp_stat) == 0)\n {\n if (((((tmp_stat.st_mode)) & 0170000) == (0100000)))\n out_stat = tmp_stat;\n else if (((((tmp_stat.st_mode)) & 0170000) == (0020000)))\n {\n struct stat null_stat;\n if (stat (\"/dev/null\", &null_stat) == 0\n && ((tmp_stat).st_ino == (null_stat).st_ino && (tmp_stat).st_dev == (null_stat).st_dev))\n dev_null_output = 1;\n else\n possibly_tty = 1;\n }\n }\n if (exit_on_match | dev_null_output)\n list_files = LISTFILES_NONE;\n if ((exit_on_match | dev_null_output) || list_files != LISTFILES_NONE)\n {\n count_matches = 0;\n done_on_match = 1;\n }\n out_quiet = count_matches | done_on_match;\n if (out_after < 0)\n out_after = default_context;\n if (out_before < 0)\n out_before = default_context;\n if ((max_count == 0\n || (keycc == 0 && out_invert && !match_lines && !match_words))\n && list_files != LISTFILES_NONMATCHING)\n return 1;\n if (color_option == 2)\n color_option = possibly_tty && should_colorize () && isatty (1);\n init_colorize ();\n if (color_option)\n {\n char *userval = getenv (\"GREP_COLOR\");\n if (userval != ((void *)0) && *userval != '\\0')\n for (char *q = userval; *q == ';' || c_isdigit (*q); q++)\n if (!q[1])\n {\n selected_match_color = context_match_color = userval;\n break;\n }\n parse_grep_colors ();\n if (selected_match_color == userval || context_match_color == userval)\n error (0, 0, gettext(\"warning: GREP_COLOR='%s' is deprecated;\" \" use GREP_COLORS='mt=%s'\"),\n userval, userval);\n }\n initialize_unibyte_mask ();\n if (matcher < 0)\n matcher = G_MATCHER_INDEX;\n if (matcher == F_MATCHER_INDEX\n || matcher == E_MATCHER_INDEX || matcher == G_MATCHER_INDEX)\n {\n if (match_icase)\n setup_ok_fold ();\n if (matcher == F_MATCHER_INDEX)\n {\n if (! localeinfo.multibyte\n ? n_patterns == 1 && match_words\n : (contains_encoding_error (keys, keycc)\n || (match_icase && !fgrep_icase_available (keys, keycc))))\n {\n fgrep_to_grep_pattern (&pattern_array, &keycc);\n keys = pattern_array;\n matcher = G_MATCHER_INDEX;\n }\n }\n else if (1 < n_patterns)\n matcher = try_fgrep_pattern (matcher, keys, &keycc);\n }\n execute = matchers[matcher].execute;\n compiled_pattern =\n matchers[matcher].compile (keys, keycc, matchers[matcher].syntax,\n only_matching | color_option);\n char eolbytes[3] = { 0, eolbyte, 0 };\n idx_t match_size;\n skip_empty_lines = ((execute (compiled_pattern, eolbytes + 1, 1,\n &match_size, ((void *)0)) == 0)\n == out_invert);\n int num_operands = argc - optind;\n out_file = (filename_option == 0 && num_operands <= 1\n ? - (directories == RECURSE_DIRECTORIES)\n : 0 <= filename_option);\n if (binary)\n xset_binary_mode (1, 0);\n long psize = sysconf (_SC_PAGESIZE);\n if (! (0 < psize && psize <= ((9223372036854775807L) - uword_size) / 2))\n abort ();\n pagesize = psize;\n bufalloc = ((uintptr_t) (INITIAL_BUFSIZE) % (pagesize) == 0 ? (INITIAL_BUFSIZE) : (INITIAL_BUFSIZE) + ((pagesize) - (uintptr_t) (INITIAL_BUFSIZE) % (pagesize))) + pagesize + uword_size;\n buffer = ximalloc (bufalloc);\n if (fts_options & 0x0002 && devices == READ_COMMAND_LINE_DEVICES)\n devices = READ_DEVICES;\n char *const *files;\n if (0 < num_operands)\n {\n files = argv + optind;\n }\n else if (directories == RECURSE_DIRECTORIES && 0 < last_recursive)\n {\n static char *const cwd_only[] = { (char *) \".\", ((void *)0) };\n files = cwd_only;\n omit_dot_slash = 1;\n }\n else\n {\n static char *const stdin_only[] = { (char *) \"-\", ((void *)0) };\n files = stdin_only;\n }\n _Bool status = 1;\n do\n status &= grep_command_line_arg (*files++);\n while (*files != ((void *)0));\n return errseen ? EXIT_TROUBLE : status;\n}\n", "c_constructs": {"pointer_type": 7, "array_type": 7, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 14, "memory_management": 0, "memory_operation": 0, "if_statement": 57, "for_loop": 5, "while_loop": 2, "switch_statement": 2, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 50}}, {"id": "nano-7.2#files_prep#input_tab.c", "codebase": "nano-7.2", "c_file": "files.c", "function": "input_tab", "sloc": "95", "c_code": "char *input_tab(char *morsel, size_t *place, void (*refresh_func)(void), _Bool *listed)\n{\n size_t num_matches = 0;\n char **matches = ((void *)0);\n if (morsel[*place] != '\\0') {\n beep();\n return morsel;\n }\n if (morsel[0] == '~' && strchr(morsel, '/') == ((void *)0))\n matches = username_completion(morsel, *place, &num_matches);\n if (matches == ((void *)0))\n matches = filename_completion(morsel, &num_matches);\n if (*listed && num_matches < 2) {\n refresh_func();\n *listed = 0;\n }\n if (matches == ((void *)0)) {\n beep();\n return morsel;\n }\n const char *lastslash = revstrstr(morsel, \"/\", morsel + *place);\n size_t length_of_path = (lastslash == ((void *)0)) ? 0 : lastslash - morsel + 1;\n size_t match, common_len = 0;\n char *shared, *glued;\n char char1[4], char2[4];\n int len1, len2;\n while (1) {\n len1 = collect_char(matches[0] + common_len, char1);\n for (match = 1; match < num_matches; match++) {\n len2 = collect_char(matches[match] + common_len, char2);\n if (len1 != len2 || strncmp(char1, char2, len2) != 0)\n break;\n }\n if (match < num_matches || matches[0][common_len] == '\\0')\n break;\n common_len += len1;\n }\n shared = nmalloc(length_of_path + common_len + 1);\n strncpy(shared, morsel, length_of_path);\n strncpy(shared + length_of_path, matches[0], common_len);\n common_len += length_of_path;\n shared[common_len] = '\\0';\n glued = nmalloc(strlen(present_path) + common_len + 1);\n sprintf(glued, \"%s%s\", present_path, shared);\n if (num_matches == 1 && (is_dir(shared) || is_dir(glued)))\n shared[common_len++] = '/';\n if (common_len != *place) {\n morsel = nrealloc(morsel, common_len + 1);\n strncpy(morsel, shared, common_len);\n morsel[common_len] = '\\0';\n *place = common_len;\n } else if (num_matches == 1)\n beep();\n if (num_matches > 1) {\n int lastrow = editwinrows - 1 - (((flags[((ZERO) / (sizeof(unsigned) * 8))] & ((unsigned)1 << ((ZERO) % (sizeof(unsigned) * 8)))) != 0) && LINES > 1 ? 1 : 0);\n size_t longest_name = 0;\n size_t nrows, ncols;\n int row;\n if (!*listed)\n beep();\n qsort(matches, num_matches, sizeof(char *), diralphasort);\n for (match = 0; match < num_matches; match++) {\n size_t namelen = breadth(matches[match]);\n if (namelen > longest_name)\n longest_name = namelen;\n }\n if (longest_name > COLS - 1)\n longest_name = COLS - 1;\n ncols = (COLS + 1) / (longest_name + 2);\n nrows = (num_matches + ncols - 1) / ncols;\n row = (nrows < lastrow) ? lastrow - nrows : 0;\n blank_edit();\n curs_set(0);\n for (match = 0; match < num_matches; match++) {\n char *disp;\n wmove(midwin, row, (longest_name + 2) * (match % ncols));\n if (row == lastrow && (match + 1) % ncols == 0 &&\n match + 1 < num_matches) {\n waddnstr(midwin,gettext(\"(more)\"),-1);\n break;\n }\n disp = display_string(matches[match], 0, longest_name, 0, 0);\n waddnstr(midwin,disp,-1);\n free(disp);\n if ((match + 1) % ncols == 0)\n row++;\n }\n wnoutrefresh(midwin);\n *listed = 1;\n }\n free_chararray(matches, num_matches);\n free(glued);\n free(shared);\n return morsel;\n}\n", "c_constructs": {"pointer_type": 5, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 8, "memory_management": 3, "memory_operation": 0, "if_statement": 16, "for_loop": 3, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 3}}, {"id": "transcoder-set#COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int a, int b ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngxrtif_prep#pngx_sig_is_tiff.c", "codebase": "optipng-0.7.8", "c_file": "pngxrtif.c", "function": "pngx_sig_is_tiff", "sloc": "16", "c_code": "int\npngx_sig_is_tiff(png_bytep sig, size_t sig_size,\n png_const_charpp fmt_name_ptr,\n png_const_charpp fmt_long_name_ptr)\n{\n if (sig_size < 8)\n return -1;\n if (memcmp(sig, minitiff_sig_m, 4) != 0 &&\n memcmp(sig, minitiff_sig_i, 4) != 0)\n return 0;\n if (fmt_name_ptr != ((void *)0))\n *fmt_name_ptr = tiff_fmt_name;\n if (fmt_long_name_ptr != ((void *)0))\n *fmt_long_name_ptr = tiff_fmt_long_name;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "dap-3.10#dapruns_prep#parseopts.c", "codebase": "dap-3.10", "c_file": "dapruns.c", "function": "parseopts", "sloc": "38", "c_code": "int parseopts(char *opts, char **arg)\n{\n static char *optcpy = ((void *)0);\n static int optlen = 0;\n int i;\n int a;\n if (!opts)\n return 0;\n if (strlen(opts) > optlen)\n {\n if (optcpy)\n free(optcpy);\n optlen = strlen(opts);\n if (!(optcpy = malloc(optlen + 1)))\n {\n perror(\"dap\");\n exit(1);\n }\n }\n strcpy(optcpy, opts);\n for (i = 0; optcpy[i] == ' '; i++)\n ;\n for (a = 0; optcpy[i]; a++)\n {\n if (arg)\n arg[a] = optcpy + i;\n while (optcpy[i] && optcpy[i] != ' ')\n i++;\n if (optcpy[i])\n {\n if (arg)\n optcpy[i] = '\\0';\n for (i++; optcpy[i] == ' '; i++)\n ;\n }\n }\n return a;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 2, "memory_operation": 0, "if_statement": 7, "for_loop": 3, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "dap-3.10#dap1_prep#dap_mnsparse.c", "codebase": "dap-3.10", "c_file": "dap1.c", "function": "dap_mnsparse", "sloc": "113", "c_code": "int dap_mnsparse(char *varlist, char *outlist, int *varv, int *wtvar, int stats[])\n{\n int v;\n int i;\n int j;\n int k;\n char *vname;\n char *tmplist;\n int vn;\n int wn;\n int nvar;\n int s;\n int nonly;\n if (!varlist)\n {\n fputs(\"(meansparse) Missing variable list.\\n\", dap_err);\n exit(1);\n }\n vname = dap_malloc(dap_namelen + 6, \"\");\n for (v = 0; varlist[v]; v++)\n ;\n for (--v; v >= 0 && varlist[v] == ' '; --v)\n ;\n nvar = 0;\n tmplist = dap_malloc(dap_listlen + 1, \"\");\n tmplist[0] = '\\0';\n wn = -1;\n for (nonly = 0; v >= 0; )\n {\n for (i = v; i >= 0 && varlist[i] != ' ' && varlist[i] != '*'; --i)\n ;\n for (j = 0; j < v - i; j++)\n {\n if (j < dap_namelen)\n vname[j] = varlist[i + j + 1];\n else\n {\n vname[j] = '\\0';\n fprintf(dap_err, \"(meansparse) Variable name too long: %s\\n\",\n vname);\n }\n }\n vname[j] = '\\0';\n while (i >= 0 && varlist[i] == ' ')\n --i;\n if ((vn = dap_varnum(vname)) >= 0)\n {\n if (dap_obs[0].do_len[vn] == (-1))\n {\n if (tmplist[0])\n strcat(tmplist, \" \");\n strcat(tmplist, vname);\n }\n else\n {\n fprintf(dap_err, \"(meansparse) Variable must be double: %s\\n\",\n vname);\n exit(1);\n }\n }\n else\n {\n for (s = 0; s < (((((((((((((((((((((((((((((((((((((((((((0 +1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1); s++)\n {\n if (s != 0 && stats[s])\n {\n fprintf(dap_err,\n \"(meansparse) Statistics other than N requested for unknown variable %s\\n\",\n vname);\n exit(1);\n }\n }\n strcpy(tmplist, vname);\n strcat(vname, \" -1\");\n vn = dap_vd(vname, 0);\n nonly = 1;\n }\n v = i;\n if (v >= 0 && varlist[v] == '*')\n {\n wn = vn;\n for (--v; v >= 0 && varlist[v] == ' '; --v)\n ;\n }\n else\n {\n wtvar[nvar] = wn;\n varv[nvar++] = vn;\n }\n }\n for (i = 0; tmplist[i]; i++)\n ;\n for (--i; i >= 0 && tmplist[i] == ' '; --i)\n ;\n for (outlist[0] = '\\0'; i >= 0; )\n {\n for (j = i; j > 0 && tmplist[j - 1] != ' '; --j)\n ;\n for (k = 0; k <= i - j; k++)\n vname[k] = tmplist[j + k];\n vname[k] = '\\0';\n if (outlist[0])\n strcat(outlist, \" \");\n strcat(outlist, vname);\n for (i = j - 1; i >= 0 && tmplist[i] == ' '; --i)\n ;\n }\n dap_free(vname, \"\");\n dap_free(tmplist, \"\");\n if (nonly)\n return -nvar;\n return nvar;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 8, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 9, "for_loop": 13, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#png_prep#png_info_init_3.c", "codebase": "optipng-0.7.8", "c_file": "png.c", "function": "png_info_init_3", "sloc": "17", "c_code": "void png_info_init_3 (png_infopp ptr_ptr, size_t png_info_struct_size)\n{\n png_inforp info_ptr = *ptr_ptr;\n ((void)0);\n if (info_ptr == ((void *)0))\n return;\n if ((sizeof (png_info)) > png_info_struct_size)\n {\n *ptr_ptr = ((void *)0);\n free(info_ptr);\n info_ptr = (png_malloc_base(((void *)0), (sizeof *info_ptr)));\n if (info_ptr == ((void *)0))\n return;\n *ptr_ptr = info_ptr;\n }\n memset(info_ptr, 0, (sizeof *info_ptr));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 1, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlParserNsCreate.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlParserNsCreate", "sloc": "9", "c_code": "xmlParserNsData *\nxmlParserNsCreate(void) {\n xmlParserNsData *nsdb = xmlMalloc(sizeof(*nsdb));\n if (nsdb == ((void *)0))\n return(((void *)0));\n memset(nsdb, 0, sizeof(*nsdb));\n nsdb->defaultNsIndex = 0x7fffffff;\n return(nsdb);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#encoding_prep#xmlDelEncodingAlias.c", "codebase": "libxml2", "c_file": "encoding.c", "function": "xmlDelEncodingAlias", "sloc": "19", "c_code": "int\nxmlDelEncodingAlias(const char *alias) {\n int i;\n if (alias == ((void *)0))\n return(-1);\n if (xmlCharEncodingAliases == ((void *)0))\n return(-1);\n for (i = 0;i < xmlCharEncodingAliasesNb;i++) {\n if (!strcmp(xmlCharEncodingAliases[i].alias, alias)) {\n xmlFree((char *) xmlCharEncodingAliases[i].name);\n xmlFree((char *) xmlCharEncodingAliases[i].alias);\n xmlCharEncodingAliasesNb--;\n memmove(&xmlCharEncodingAliases[i], &xmlCharEncodingAliases[i + 1],\n sizeof(xmlCharEncodingAlias) * (xmlCharEncodingAliasesNb - i));\n return(0);\n }\n }\n return(-1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#inputPush.c", "codebase": "libxml2", "c_file": "parser.c", "function": "inputPush", "sloc": "38", "c_code": "int\ninputPush(xmlParserCtxtPtr ctxt, xmlParserInputPtr value)\n{\n char *directory = ((void *)0);\n if ((ctxt == ((void *)0)) || (value == ((void *)0)))\n return(-1);\n if (ctxt->inputNr >= ctxt->inputMax) {\n size_t newSize = ctxt->inputMax * 2;\n xmlParserInputPtr *tmp;\n tmp = (xmlParserInputPtr *) xmlRealloc(ctxt->inputTab,\n newSize * sizeof(*tmp));\n if (tmp == ((void *)0)) {\n xmlErrMemory(ctxt);\n return (-1);\n }\n ctxt->inputTab = tmp;\n ctxt->inputMax = newSize;\n }\n if ((ctxt->inputNr == 0) && (value->filename != ((void *)0))) {\n directory = xmlParserGetDirectory(value->filename);\n if (directory == ((void *)0)) {\n xmlErrMemory(ctxt);\n return(-1);\n }\n }\n if (ctxt->input_id >= 0x7fffffff) {\n xmlFatalErrMsg(ctxt, XML_ERR_RESOURCE_LIMIT, \"Input ID overflow\\n\");\n return(-1);\n }\n ctxt->inputTab[ctxt->inputNr] = value;\n ctxt->input = value;\n if (ctxt->inputNr == 0) {\n xmlFree(ctxt->directory);\n ctxt->directory = directory;\n }\n value->id = ctxt->input_id++;\n return(ctxt->inputNr++);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "transcoder-set#LONGEST_PREFIX_ALSO_SUFFIX_1_prep#main.c", "codebase": "transcoder-set", "c_file": "LONGEST_PREFIX_ALSO_SUFFIX_1.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n char param0[][100] = {\"aabcdaabc\",\"1372494598\",\"110000100001\",\"abcab\",\"488938\",\"011010101011\",\"aaaa\",\"3356203205\",\"1010\",\"kkXiiTZkGeh\"};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "nettle-3.9.1#ccm_prep#nettle_ccm_encrypt_message.c", "codebase": "nettle-3.9.1", "c_file": "ccm.c", "function": "nettle_ccm_encrypt_message", "sloc": "14", "c_code": "void\nnettle_ccm_encrypt_message(const void *cipher, nettle_cipher_func *f,\n size_t nlength, const uint8_t *nonce,\n size_t alength, const uint8_t *adata, size_t tlength,\n size_t clength, uint8_t *dst, const uint8_t *src)\n{\n struct ccm_ctx ctx;\n uint8_t *tag = dst + (clength-tlength);\n ((void) sizeof ((clength >= tlength) ? 1 : 0), __extension__ ({ if (clength >= tlength) ; else __assert_fail (\"clength >= tlength\", \"ccm.c\", 242, __extension__ __PRETTY_FUNCTION__); }));\n nettle_ccm_set_nonce(&ctx, cipher, f, nlength, nonce, alength, clength-tlength, tlength);\n nettle_ccm_update(&ctx, cipher, f, alength, adata);\n nettle_ccm_encrypt(&ctx, cipher, f, clength-tlength, dst, src);\n nettle_ccm_digest(&ctx, cipher, f, tlength, tag);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_UNIQUE_RECTANGLES_FORMED_USING_N_UNIT_SQUARES_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "NUMBER_UNIQUE_RECTANGLES_FORMED_USING_N_UNIT_SQUARES.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlTextReaderReadString.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlTextReaderReadString", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlTextReaderReadString(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlChar * c_retval;\n xmlTextReaderPtr reader;\n PyObject *pyobj_reader;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlTextReaderReadString\", &pyobj_reader))\n return(((void *)0));\n reader = (xmlTextReaderPtr) (((pyobj_reader) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlTextReader_Object *)(pyobj_reader))->obj));\n c_retval = xmlTextReaderReadString(reader);\n py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tinycc#tccgen_prep#free_inline_functions.c", "codebase": "tinycc", "c_file": "tccgen.c", "function": "free_inline_functions", "sloc": "10", "c_code": "void free_inline_functions(TCCState *s)\n{\n int i;\n for (i = 0; i < s->nb_inline_fns; ++i) {\n struct InlineFunc *fn = s->inline_fns[i];\n if (fn->sym)\n tok_str_free(fn->func_str);\n }\n dynarray_reset(&s->inline_fns, &s->nb_inline_fns);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#png_prep#png_get_io_ptr.c", "codebase": "optipng-0.7.8", "c_file": "png.c", "function": "png_get_io_ptr", "sloc": "7", "c_code": "png_voidp\npng_get_io_ptr(png_const_structrp png_ptr)\n{\n if (png_ptr == ((void *)0))\n return (((void *)0));\n return (png_ptr->io_ptr);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_leading_or_trailing_decimal_point_prep#json_value_as_number.c", "codebase": "json.h", "c_file": "allow_leading_or_trailing_decimal_point.c", "function": "json_value_as_number", "sloc": "6", "c_code": "struct json_number_s *json_value_as_number(struct json_value_s *const value) {\n if (value->type != json_type_number) {\n return 0;\n }\n return (struct json_number_s *)value->payload;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#list_prep#xmlListAppend.c", "codebase": "libxml2", "c_file": "list.c", "function": "xmlListAppend", "sloc": "16", "c_code": "int xmlListAppend(xmlListPtr l, void *data)\n{\n xmlLinkPtr lkPlace, lkNew;\n if (l == ((void *)0))\n return(1);\n lkPlace = xmlListHigherSearch(l, data);\n lkNew = (xmlLinkPtr) xmlMalloc(sizeof(xmlLink));\n if (lkNew == ((void *)0))\n return (1);\n lkNew->data = data;\n lkNew->next = lkPlace->next;\n (lkPlace->next)->prev = lkNew;\n lkPlace->next = lkNew;\n lkNew->prev = lkPlace;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "json.h#allow_location_information_prep#json_extract_copy_value.c", "codebase": "json.h", "c_file": "allow_location_information.c", "function": "json_extract_copy_value", "sloc": "81", "c_code": "void json_extract_copy_value(struct json_extract_state_s *const state,\n const struct json_value_s *const value) {\n struct json_string_s *string;\n struct json_number_s *number;\n struct json_object_s *object;\n struct json_array_s *array;\n struct json_value_s *new_value;\n memcpy(state->dom, value, sizeof(struct json_value_s));\n new_value = (struct json_value_s *)state->dom;\n state->dom += sizeof(struct json_value_s);\n new_value->payload = state->dom;\n if (json_type_string == value->type) {\n memcpy(state->dom, value->payload, sizeof(struct json_string_s));\n string = (struct json_string_s *)state->dom;\n state->dom += sizeof(struct json_string_s);\n memcpy(state->data, string->string, string->string_size + 1);\n string->string = state->data;\n state->data += string->string_size + 1;\n } else if (json_type_number == value->type) {\n memcpy(state->dom, value->payload, sizeof(struct json_number_s));\n number = (struct json_number_s *)state->dom;\n state->dom += sizeof(struct json_number_s);\n memcpy(state->data, number->number, number->number_size);\n number->number = state->data;\n state->data += number->number_size;\n } else if (json_type_object == value->type) {\n struct json_object_element_s *element;\n size_t i;\n memcpy(state->dom, value->payload, sizeof(struct json_object_s));\n object = (struct json_object_s *)state->dom;\n state->dom += sizeof(struct json_object_s);\n element = object->start;\n object->start = (struct json_object_element_s *)state->dom;\n for (i = 0; i < object->length; i++) {\n struct json_value_s *previous_value;\n struct json_object_element_s *previous_element;\n memcpy(state->dom, element, sizeof(struct json_object_element_s));\n element = (struct json_object_element_s *)state->dom;\n state->dom += sizeof(struct json_object_element_s);\n string = element->name;\n memcpy(state->dom, string, sizeof(struct json_string_s));\n string = (struct json_string_s *)state->dom;\n state->dom += sizeof(struct json_string_s);\n element->name = string;\n memcpy(state->data, string->string, string->string_size + 1);\n string->string = state->data;\n state->data += string->string_size + 1;\n previous_value = element->value;\n element->value = (struct json_value_s *)state->dom;\n json_extract_copy_value(state, previous_value);\n previous_element = element;\n element = element->next;\n if (element) {\n previous_element->next = (struct json_object_element_s *)state->dom;\n }\n }\n } else if (json_type_array == value->type) {\n struct json_array_element_s *element;\n size_t i;\n memcpy(state->dom, value->payload, sizeof(struct json_array_s));\n array = (struct json_array_s *)state->dom;\n state->dom += sizeof(struct json_array_s);\n element = array->start;\n array->start = (struct json_array_element_s *)state->dom;\n for (i = 0; i < array->length; i++) {\n struct json_value_s *previous_value;\n struct json_array_element_s *previous_element;\n memcpy(state->dom, element, sizeof(struct json_array_element_s));\n element = (struct json_array_element_s *)state->dom;\n state->dom += sizeof(struct json_array_element_s);\n previous_value = element->value;\n element->value = (struct json_value_s *)state->dom;\n json_extract_copy_value(state, previous_value);\n previous_element = element;\n element = element->next;\n if (element) {\n previous_element->next = (struct json_array_element_s *)state->dom;\n }\n }\n }\n}\n", "c_constructs": {"pointer_type": 8, "array_type": 0, "struct_type": 13, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 30, "memory_management": 0, "memory_operation": 11, "if_statement": 6, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Fast_Inc.c", "codebase": "gprolog-1.5.0", "c_file": "arith_inl_c.c", "function": "Pl_Fct_Fast_Inc", "sloc": "6", "c_code": "WamWord\nPl_Fct_Fast_Inc(WamWord x)\n{\n PlLong vx = ((PlLong) ((x) << 0) >> 3);\n return (((PlULong) (vx + 1) << 3) | (PlULong)0x7);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#rec_prep#frec_discard_temp.c", "codebase": "uucp-1.07", "c_file": "rec.c", "function": "frec_discard_temp", "sloc": "13", "c_code": "boolean\nfrec_discard_temp (qdaemon, qtrans)\n struct sdaemon *qdaemon;\n struct stransfer *qtrans;\n{\n struct srecinfo *qinfo = (struct srecinfo *) qtrans->pinfo;\n if ((qdaemon->ifeatures & (02)) == 0\n || qtrans->s.ztemp == ((void *)0)\n || qtrans->s.ztemp[0] != 'D'\n || strcmp (qtrans->s.ztemp, \"D.0\") == 0)\n (void) remove (qinfo->ztemp);\n return (1);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngerror_prep#png_longjmp.c", "codebase": "optipng-0.7.8", "c_file": "pngerror.c", "function": "png_longjmp", "sloc": "6", "c_code": "__attribute__((__noreturn__)) void png_longjmp (png_const_structrp png_ptr, int val)\n{\n (void)png_ptr;\n (void)val;\n abort();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "screen-4.9.0#socket_prep#ReceiveMsg.c", "codebase": "screen-4.9.0", "c_file": "socket.c", "function": "ReceiveMsg", "sloc": "233", "c_code": "void\nReceiveMsg()\n{\n int left, len;\n static struct msg m;\n char *p;\n int ns = ServerSocket;\n struct win *wi;\n int recvfd = -1;\n struct acluser *user;\n _Bool is_socket;\n struct sockaddr_un a;\n struct msghdr msg;\n struct iovec iov;\n char control[1024];\n is_socket = IsSocket(SockPath);\n if (!is_socket)\n {\n do {} while (0);\n if (fcntl(ServerSocket, 4, 0) == -1)\n Panic((*__errno_location ()), \"BLOCK fcntl\");\n p = (char *)&m;\n left = sizeof(m);\n }\n else\n {\n len = sizeof(a);\n do {} while (0);\n if ((ns = accept(ns, (struct sockaddr *)&a, (void *)&len)) < 0)\n {\n Msg((*__errno_location ()), \"accept\");\n return;\n }\n p = (char *)&m;\n left = sizeof(m);\n bzero(&msg, sizeof(msg));\n iov.iov_base = &m;\n iov.iov_len = left;\n msg.msg_iov = &iov;\n msg.msg_iovlen = 1;\n msg.msg_controllen = sizeof(control);\n msg.msg_control = &control;\n while (left > 0)\n {\n len = recvmsg(ns, &msg, 0);\n if (len < 0 && (*__errno_location ()) == 4)\n continue;\n if (len < 0)\n {\n close(ns);\n Msg((*__errno_location ()), \"read\");\n return;\n }\n if (msg.msg_controllen)\n {\n struct cmsghdr *cmsg;\n for (cmsg = ((size_t) (&msg)->msg_controllen >= sizeof (struct cmsghdr) ? (struct cmsghdr *) (&msg)->msg_control : (struct cmsghdr *) 0); cmsg;\n cmsg = __cmsg_nxthdr (&msg, cmsg))\n {\n int cl;\n char *cp;\n if (cmsg->cmsg_level != 1 ||\n cmsg->cmsg_type != SCM_RIGHTS)\n continue;\n cp = (char *)((cmsg)->__cmsg_data);\n cl = cmsg->cmsg_len;\n while (cl >= ((((sizeof (struct cmsghdr)) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) + (sizeof(int))))\n {\n int passedfd;\n bcopy(cp, &passedfd, sizeof(int));\n if (recvfd >= 0 && passedfd != recvfd)\n close(recvfd);\n recvfd = passedfd;\n cl -= ((((sizeof (struct cmsghdr)) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) + (sizeof(int)));\n }\n }\n }\n p += len;\n left -= len;\n break;\n }\n }\n while (left > 0)\n {\n len = read(ns, p, left);\n if (len < 0 && (*__errno_location ()) == 4)\n continue;\n if (len <= 0)\n break;\n p += len;\n left -= len;\n }\n if (!is_socket)\n {\n close(ServerSocket);\n if ((ServerSocket = secopen(SockPath, 00 | 04000, 0)) < 0)\n Panic((*__errno_location ()), \"reopen fifo %s\", SockPath);\n evdeq(&serv_read);\n serv_read.fd = ServerSocket;\n evenq(&serv_read);\n }\n else\n {\n close(ns);\n }\n if (len < 0)\n {\n Msg((*__errno_location ()), \"read\");\n if (recvfd != -1)\n close(recvfd);\n return;\n }\n if (left > 0)\n {\n if (left != sizeof(m))\n Msg(0, \"Message %d of %d bytes too small\", left, (int)sizeof(m));\n else\n do {} while (0);\n return;\n }\n if (m.protocol_revision != (('m'<<24) | ('s'<<16) | ('g'<<8) | 5))\n {\n if (recvfd != -1)\n close(recvfd);\n Msg(0, \"Invalid message (magic 0x%08x).\", m.protocol_revision);\n return;\n }\n do {} while (0);\n if (m.type != 2 && recvfd != -1)\n {\n close(recvfd);\n recvfd = -1;\n }\n for (display = displays; display; display = display->d_next)\n if (strcmp(display->d_usertty, m.m_tty) == 0)\n break;\n do {} while (0);\n wi = 0;\n if (!display)\n {\n for (wi = windows; wi; wi = wi->w_next)\n if (!strcmp(m.m_tty, wi->w_tty))\n {\n display =\n wi->w_layer.l_cvlist ? wi->w_layer.l_cvlist->c_display : 0;\n do {} while (0);\n break;\n }\n }\n if (display && display->d_status)\n RemoveStatus();\n if (display && !display->d_tcinited && m.type != 7)\n {\n if (recvfd != -1)\n close(recvfd);\n return;\n }\n switch (m.type)\n {\n case 6:\n if (display)\n CheckScreenSize(1);\n break;\n case 0:\n ExecCreate(&m);\n break;\n case 3:\n if (display && display->d_userpid != 0 && kill(display->d_userpid, 0) == 0)\n break;\n do {} while (0);\n case 2:\n if (CreateTempDisplay(&m, recvfd, wi))\n break;\n if (display->d_user->u_password && *display->d_user->u_password)\n AskPassword(&m);\n else\n FinishAttach(&m);\n break;\n case 1:\n {\n int blocked=display->d_blocked;\n if(display->d_blocked == 4)\n display->d_blocked=0;\n Msg(0, \"%s\", m.m.message);\n display->d_blocked=blocked;\n }\n break;\n case 7:\n if (!wi)\n Hangup();\n break;\n case 4:\n case 5:\n user = *FindUserPtr(m.m.detach.duser);\n if (user && user->u_password && *user->u_password)\n {\n if (CreateTempDisplay(&m, recvfd, 0))\n break;\n AskPassword(&m);\n }\n else\n FinishDetach(&m);\n break;\n case 9:\n {\n char *oldSockPath = SaveStr(SockPath);\n strcpy(SockPath, m.m.command.writeback);\n _Bool is_socket = IsSocket(SockPath);\n int s = MakeClientSocket(0, is_socket);\n strcpy(SockPath, oldSockPath);\n {if ((oldSockPath) == 0) abort(); else free((void *)(oldSockPath)); (oldSockPath)=0;};\n if (s >= 0)\n {\n queryflag = s;\n DoCommandMsg(&m);\n close(s);\n }\n else\n queryflag = -1;\n Kill(m.m.command.apid,\n (queryflag >= 0)\n ? 18\n : 1);\n queryflag = -1;\n }\n break;\n case 8:\n DoCommandMsg(&m);\n break;\n default:\n Msg(0, \"Invalid message (type %d).\", m.type);\n }\n}\n", "c_constructs": {"pointer_type": 6, "array_type": 1, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 10, "memory_management": 1, "memory_operation": 0, "if_statement": 35, "for_loop": 3, "while_loop": 10, "switch_statement": 1, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 18}}, {"id": "transcoder-set#FIND_ROTATION_COUNT_ROTATED_SORTED_ARRAY_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "FIND_ROTATION_COUNT_ROTATED_SORTED_ARRAY.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "units-2.22#parse.tab_prep#logunit.c", "codebase": "units-2.22", "c_file": "parse.tab.c", "function": "logunit", "sloc": "15", "c_code": "int\nlogunit(struct unittype *theunit, int base)\n{\n if ((err=unit2num(theunit)))\n return err;\n if (base==2)\n theunit->factor = log2(theunit->factor);\n else if (base==10)\n theunit->factor = log10(theunit->factor);\n else\n theunit->factor = log(theunit->factor)/log((double)base);\n if ((*__errno_location ()))\n return 8;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "wget-1.21.4#log_prep#escnonprint_uri.c", "codebase": "wget-1.21.4", "c_file": "log.c", "function": "escnonprint_uri", "sloc": "5", "c_code": "const char *\nescnonprint_uri (const char *str)\n{\n return escnonprint_internal (str, '%', 16);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY_prep#main.c", "codebase": "transcoder-set", "c_file": "COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY.c", "function": "main", "sloc": "24", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {3,7,26,40,46,89,99};\nint param0_1[] = {98,42,-24,-60,74,86,6,8,72,-58,38,-20,6,-6,8,48,-34,30,60,66,38,-54,8,-94,-8,0,-64,-94,-94,-72,-84,-36,88,-62,-88,46,-4,88};\nint param0_2[] = {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,1,1,1,1,1,1};\nint param0_3[] = {37,97,57,82,29,68,94,38,81,48,13,84,57,5,27,87,11,35,82,53,67,31,15,99,6,93,91,92,3,23,90,27,6,33,78,3,19,19,27};\nint param0_4[] = {-80,-74,-72,-72,-66,-66,-62,-50,-44,-44,-28,-24,-24,-22,-16,-10,-6,-4,-2,2,2,4,12,16,16,28,30,32,32,38,38,72,84,86,88,90,96};\nint param0_5[] = {0,1,0,0,1,0,1,1,0,1,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,1,1,1};\nint param0_6[] = {25,67};\nint param0_7[] = {82,74,-82,22,-28,-78,-22,-86,-74,42,-6,54,-88,-92,-14,-50,68,46,-50,46,-18,66,-76,-30,36,12,66};\nint 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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};\nint param0_9[] = {50,23,56,9};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {5,24,44,36,34,18,1,14,32,3};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#search_prep#clr_hilite.c", "codebase": "less-633", "c_file": "search.c", "function": "clr_hilite", "sloc": "4", "c_code": "void clr_hilite(void)\n{\n clr_hlist(&hilite_anchor);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tinycc#libtcc_prep#tcc_set_error_func.c", "codebase": "tinycc", "c_file": "libtcc.c", "function": "tcc_set_error_func", "sloc": "6", "c_code": "void tcc_set_error_func(TCCState *s, void *error_opaque,\n void (*error_func)(void *opaque, const char *msg))\n{\n s->error_opaque = error_opaque;\n s->error_func = error_func;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlIO_prep#xmlParserInputBufferCreateFilenameDefault.c", "codebase": "libxml2", "c_file": "xmlIO.c", "function": "xmlParserInputBufferCreateFilenameDefault", "sloc": "13", "c_code": "xmlParserInputBufferCreateFilenameFunc\nxmlParserInputBufferCreateFilenameDefault(\n xmlParserInputBufferCreateFilenameFunc func)\n{\n xmlParserInputBufferCreateFilenameFunc old;\n old = (*__xmlParserInputBufferCreateFilenameValue());\n if (old == ((void *)0))\n old = __xmlParserInputBufferCreateFilename;\n if (func == __xmlParserInputBufferCreateFilename)\n func = ((void *)0);\n (*__xmlParserInputBufferCreateFilenameValue()) = func;\n return(old);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "which-2.21#which_prep#main.c", "codebase": "which-2.21", "c_file": "which.c", "function": "main", "sloc": "206", "c_code": "int main(int argc, char *argv[])\n{\n const char *path_list = getenv(\"PATH\");\n int short_option, fail_count = 0;\n static int long_option;\n struct option longopts[] = {\n {\"help\", 0, &long_option, opt_help},\n {\"version\", 0, &long_option, opt_version},\n {\"skip-dot\", 0, &long_option, opt_skip_dot},\n {\"skip-tilde\", 0, &long_option, opt_skip_tilde},\n {\"show-dot\", 0, &long_option, opt_show_dot},\n {\"show-tilde\", 0, &long_option, opt_show_tilde},\n {\"tty-only\", 0, &long_option, opt_tty_only},\n {\"all\", 0, ((void *)0), 'a'},\n {\"read-alias\", 0, ((void *)0), 'i'},\n {\"skip-alias\", 0, &long_option, opt_skip_alias},\n {\"read-functions\", 0, &long_option, opt_read_functions},\n {\"skip-functions\", 0, &long_option, opt_skip_functions},\n {((void *)0), 0, ((void *)0), 0}\n };\n progname = argv[0];\n while ((short_option = getopt_long(argc, argv, \"aivV\", longopts, ((void *)0))) != -1)\n {\n switch (short_option)\n {\n case 0:\n switch (long_option)\n {\n case opt_help:\n print_usage(stdout);\n return 0;\n case opt_version:\n print_version();\n return 0;\n case opt_skip_dot:\n skip_dot = !tty_only;\n break;\n case opt_skip_tilde:\n skip_tilde = !tty_only;\n break;\n case opt_skip_alias:\n skip_alias = 1;\n break;\n case opt_show_dot:\n show_dot = !tty_only;\n break;\n case opt_show_tilde:\n show_tilde = (!tty_only && geteuid() != superuser);\n break;\n case opt_tty_only:\n tty_only = !isatty(1);\n break;\n case opt_read_functions:\n read_functions = 1;\n break;\n case opt_skip_functions:\n skip_functions = 1;\n break;\n }\n break;\n case 'a':\n show_all = 1;\n break;\n case 'i':\n read_alias = 1;\n break;\n case 'v':\n case 'V':\n print_version();\n return 0;\n }\n }\n uidget();\n if (show_dot)\n get_current_working_directory();\n if (show_tilde || skip_tilde)\n {\n const char *h;\n if (!(h = getenv(\"HOME\")))\n h = sh_get_home_dir();\n strncpy(home, h, sizeof(home));\n home[sizeof(home) - 1] = 0;\n homelen = strlen(home);\n if (home[homelen - 1] != '/' && homelen < sizeof(home) - 1)\n {\n strcat(home, \"/\");\n ++homelen;\n }\n }\n if (skip_alias)\n read_alias = 0;\n if (skip_functions)\n read_functions = 0;\n argv += optind;\n argc -= optind;\n if (argc == 0)\n {\n print_usage(stderr);\n return -1;\n }\n int function_start_type = 0;\n if (read_alias || read_functions)\n {\n char buf[1024];\n int processing_aliases = read_alias;\n if (isatty(0))\n {\n fprintf(stderr, \"%s: %s: Warning: stdin is a tty.\\n\", progname,\n (read_functions ? read_alias ? \"--read-functions, --read-alias, -i\" : \"--read-functions\" : \"--read-alias, -i\"));\n }\n while (fgets(buf, sizeof(buf), stdin))\n {\n int looks_like_function_start = 0;\n int function_start_has_declare;\n if (read_functions)\n {\n char *p = buf + strlen(buf) - 1;\n while (((*__ctype_b_loc ())[(int) ((*p))] & (unsigned short int) _ISspace) && p > buf + 2)\n --p;\n if (*p == ')' && p[-1] == '(' && p[-2] == ' ')\n {\n looks_like_function_start = 1;\n function_start_has_declare = (strncmp(\"declare -\", buf, 9) == 0);\n }\n if (p > buf + 4 && *p == '{' && p[-1] == ' ' &&\n p[-2] == ')' && p[-3] == '(' && p[-4] == ' ')\n {\n looks_like_function_start = 1;\n function_start_type = 1;\n function_start_has_declare = 0;\n }\n }\n if (processing_aliases && !looks_like_function_start)\n {\n if (!strncmp(\"declare -\", buf, 9))\n continue;\n if (alias_count == max_alias_count)\n {\n max_alias_count += 32;\n aliases = (char **)xrealloc(aliases, max_alias_count * sizeof(char *));\n }\n aliases[alias_count++] = strcpy((char *)xmalloc(strlen(buf) + 1), buf);\n }\n else if (read_functions && looks_like_function_start)\n {\n struct function_st *function;\n int max_line_count;\n const char *p = buf;\n int len = 0;\n processing_aliases = 0;\n if (function_start_has_declare)\n {\n p += 9;\n while(*p && *p++ != ' ');\n }\n while(*p && *p != ' ')\n ++p, ++len;\n if (func_count == max_func_count)\n {\n max_func_count += 16;\n functions = (struct function_st *)xrealloc(functions, max_func_count * sizeof(struct function_st));\n }\n function = &functions[func_count++];\n function->name = (char *)xmalloc(len + 1);\n strncpy(function->name, &p[-len], len);\n function->name[len] = 0;\n function->len = len;\n max_line_count = 32;\n function->lines = (char **)xmalloc(max_line_count * sizeof(char *));\n function->line_count = 0;\n while (fgets(buf, sizeof(buf), stdin))\n {\n size_t blen = strlen(buf);\n function->lines[function->line_count++] = strcpy((char *)xmalloc(blen + 1), buf);\n if (!strcmp(buf, \"}\\n\"))\n break;\n if (function->line_count == max_line_count)\n {\n max_line_count += 32;\n function->lines = (char **)xrealloc(function->lines, max_line_count * sizeof(char *));\n }\n }\n }\n }\n if (read_alias)\n {\n int i;\n for (i = 0; i < alias_count; ++i)\n process_alias(aliases[i], argc, argv, path_list, function_start_type);\n }\n }\n for (; argc > 0; --argc, ++argv)\n {\n int found_something = 0;\n if (!*argv)\n continue;\n if (read_functions && !strchr(*argv, '/'))\n found_something = func_search(0, *argv, functions, function_start_type);\n if ((show_all || !found_something) && !path_search(0, *argv, path_list) && !found_something)\n {\n print_fail(absolute_path_given ? strrchr(*argv, '/') + 1 : *argv, absolute_path_given ? abs_path : path_list);\n ++fail_count;\n }\n }\n return fail_count;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 4, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 12, "memory_management": 0, "memory_operation": 0, "if_statement": 24, "for_loop": 2, "while_loop": 6, "switch_statement": 2, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 14}}, {"id": "libosip2-5.3.1#osip_content_length_prep#osip_message_get_content_length.c", "codebase": "libosip2-5.3.1", "c_file": "osip_content_length.c", "function": "osip_message_get_content_length", "sloc": "3", "c_code": "osip_content_length_t *osip_message_get_content_length(const osip_message_t *sip) {\n return sip->content_length;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ccm-aes192_prep#nettle_ccm_aes192_decrypt.c", "codebase": "nettle-3.9.1", "c_file": "ccm-aes192.c", "function": "nettle_ccm_aes192_decrypt", "sloc": "7", "c_code": "void\nnettle_ccm_aes192_decrypt(struct ccm_aes192_ctx *ctx,\n size_t length, uint8_t *dst, const uint8_t *src)\n{\n nettle_ccm_decrypt(&ctx->ccm, &ctx->cipher, (nettle_cipher_func *) nettle_aes192_encrypt,\n length, dst, src);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#options_prep#options_empty.c", "codebase": "tmux", "c_file": "options.c", "function": "options_empty", "sloc": "8", "c_code": "struct options_entry *\noptions_empty(struct options *oo, const struct options_table_entry *oe)\n{\n struct options_entry *o;\n o = options_add(oo, oe->name);\n o->tableentry = oe;\n return (o);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#xattrs_prep#xattrs_xattrs_set.c", "codebase": "tar-1.34", "c_file": "xattrs.c", "function": "xattrs_xattrs_set", "sloc": "24", "c_code": "void\nxattrs_xattrs_set (struct tar_stat_info const *st,\n char const *file_name, char typeflag, int later_run)\n{\n if (xattrs_option > 0)\n {\n size_t scan = 0;\n if (!st->xattr_map_size)\n return;\n for (; scan < st->xattr_map_size; ++scan)\n {\n char *keyword = st->xattr_map[scan].xkey;\n keyword += strlen (\"SCHILY.xattr.\");\n if (typeflag == '0'\n && later_run == !!strcmp (keyword, \"security.capability\"))\n continue;\n if (xattrs_masked_out (keyword, 0 ))\n continue;\n xattrs__fd_set (st, file_name, typeflag, keyword,\n st->xattr_map[scan].xval_ptr,\n st->xattr_map[scan].xval_len);\n }\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 2}}, {"id": "tar-1.34#paxerror_prep#open_warn.c", "codebase": "tar-1.34", "c_file": "paxerror.c", "function": "open_warn", "sloc": "5", "c_code": "void\nopen_warn (char const *name)\n{\n call_arg_warn (\"open\", name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#rcsgen_prep#yesorno.c", "codebase": "rcs-5.10.1", "c_file": "rcsgen.c", "function": "yesorno", "sloc": "25", "c_code": "_Bool\nyesorno (_Bool default_answer, char const *question, ...)\n{\n va_list args;\n register int c, r;\n if (!(top->behavior. quiet) && ttystdin ())\n {\n char *ans = default_answer\n ? \"yn\"\n : \"ny\";\n oflush ();\n __builtin_va_start(args,question);\n vcomplain (question, args);\n __builtin_va_end(args);\n complain (\"? [%s](%c): \", ans, ans[0]);\n r = c = getcstdin ();\n while (c != '\\n' && !feof (stdin))\n c = getcstdin ();\n if (r == 'y' || r == 'Y')\n return 1;\n if (r == 'n' || r == 'N')\n return 0;\n }\n return default_answer;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsSinhala.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsSinhala", "sloc": "4", "c_code": "int\nxmlUCSIsSinhala(int code) {\n return(((code >= 0x0D80) && (code <= 0x0DFF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#utf8_prep#utf8_padcstr.c", "codebase": "tmux", "c_file": "utf8.c", "function": "utf8_padcstr", "sloc": "17", "c_code": "char *\nutf8_padcstr(const char *s, u_int width)\n{\n size_t slen;\n char *out;\n u_int n, i;\n n = utf8_cstrwidth(s);\n if (n >= width)\n return (xstrdup(s));\n slen = strlen(s);\n out = xmalloc(slen + 1 + (width - n));\n memcpy(out, s, slen);\n for (i = n; i < width; i++)\n out[slen++] = ' ';\n out[slen] = '\\0';\n return (out);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#ADD_TWO_NUMBERS_WITHOUT_USING_ARITHMETIC_OPERATORS_prep#sort.c", "codebase": "transcoder-set", "c_file": "ADD_TWO_NUMBERS_WITHOUT_USING_ARITHMETIC_OPERATORS.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_multi_line_strings_prep#json_write_pretty_array.c", "codebase": "json.h", "c_file": "allow_multi_line_strings.c", "function": "json_write_pretty_array", "sloc": "41", "c_code": "char *json_write_pretty_array(const struct json_array_s *array, size_t depth,\n const char *indent, const char *newline,\n char *data) {\n size_t k, m;\n struct json_array_element_s *element;\n *data++ = '[';\n if (0 < array->length) {\n for (k = 0; '\\0' != newline[k]; k++) {\n *data++ = newline[k];\n }\n for (element = array->start; 0 != element;\n element = element->next) {\n if (element != array->start) {\n *data++ = ',';\n for (k = 0; '\\0' != newline[k]; k++) {\n *data++ = newline[k];\n }\n }\n for (k = 0; k < depth + 1; k++) {\n for (m = 0; '\\0' != indent[m]; m++) {\n *data++ = indent[m];\n }\n }\n data = json_write_pretty_value(element->value, depth + 1, indent, newline,\n data);\n if (0 == data) {\n return 0;\n }\n }\n for (k = 0; '\\0' != newline[k]; k++) {\n *data++ = newline[k];\n }\n for (k = 0; k < depth; k++) {\n for (m = 0; '\\0' != indent[m]; m++) {\n *data++ = indent[m];\n }\n }\n }\n *data++ = ']';\n return data;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 8, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderConstString.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderConstString", "sloc": "6", "c_code": "const xmlChar *\nxmlTextReaderConstString(xmlTextReaderPtr reader, const xmlChar *str) {\n if (reader == ((void *)0))\n return(((void *)0));\n return(constString(reader, str));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "heman#aabb3_prep#kmAABB3IntersectsAABB.c", "codebase": "heman", "c_file": "aabb3.c", "function": "kmAABB3IntersectsAABB", "sloc": "3", "c_code": "unsigned char kmAABB3IntersectsAABB(const kmAABB3* box, const kmAABB3* other) {\n return kmAABB3ContainsAABB(box, other) != (unsigned int)0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#stream_c_prep#Pl_Flush_Output_0.c", "codebase": "gprolog-1.5.0", "c_file": "stream_c.c", "function": "Pl_Flush_Output_0", "sloc": "5", "c_code": "void\nPl_Flush_Output_0(void)\n{\n Pl_Flush_Output_1(((PlLong) (0) + ((PlULong)0)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathNextAncestorOrSelf.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathNextAncestorOrSelf", "sloc": "7", "c_code": "xmlNodePtr\nxmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {\n if ((ctxt == ((void *)0)) || (ctxt->context == ((void *)0))) return(((void *)0));\n if (cur == ((void *)0))\n return(ctxt->context->node);\n return(xmlXPathNextAncestor(ctxt, cur));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#gcm_prep#nettle_gcm_decrypt.c", "codebase": "nettle-3.9.1", "c_file": "gcm.c", "function": "nettle_gcm_decrypt", "sloc": "10", "c_code": "void\nnettle_gcm_decrypt(struct gcm_ctx *ctx, const struct gcm_key *key,\n const void *cipher, nettle_cipher_func *f,\n size_t length, uint8_t *dst, const uint8_t *src)\n{\n ((void) sizeof ((ctx->data_size % 16 == 0) ? 1 : 0), __extension__ ({ if (ctx->data_size % 16 == 0) ; else __assert_fail (\"ctx->data_size % GCM_BLOCK_SIZE == 0\", \"gcm.c\", 223, __extension__ __PRETTY_FUNCTION__); }));\n gcm_hash(key, &ctx->x, length, src);\n _nettle_ctr_crypt16(cipher, f, gcm_fill, ctx->ctr.b, length, dst, src);\n ctx->data_size += length;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#example_prep#test_gzio.c", "codebase": "optipng-0.7.8", "c_file": "example.c", "function": "test_gzio", "sloc": "3", "c_code": "void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen) {\n fprintf(stderr, \"NO_GZCOMPRESS -- gz* functions cannot compress\\n\");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "patch-2.7.6#hash_prep#hash_get_first.c", "codebase": "patch-2.7.6", "c_file": "hash.c", "function": "hash_get_first", "sloc": "12", "c_code": "void *\nhash_get_first (const Hash_table *table)\n{\n struct hash_entry const *bucket;\n if (table->n_entries == 0)\n return ((void *)0);\n for (bucket = table->bucket; ; bucket++)\n if (! (bucket < table->bucket_limit))\n abort ();\n else if (bucket->data)\n return bucket->data;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tinycc#tccgen_prep#vpushi.c", "codebase": "tinycc", "c_file": "tccgen.c", "function": "vpushi", "sloc": "6", "c_code": "void vpushi(int v)\n{\n CValue cval;\n cval.i = v;\n vsetc(&int_type, 0x0030, &cval);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Rd_Codes_Check.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Rd_Codes_Check", "sloc": "6", "c_code": "char *\nPl_Rd_Codes_Check(WamWord start_word)\n{\n Pl_Rd_Codes_Str_Check(start_word, pl_glob_buff);\n return pl_glob_buff;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#hmac-md5_prep#nettle_hmac_md5_digest.c", "codebase": "nettle-3.9.1", "c_file": "hmac-md5.c", "function": "nettle_hmac_md5_digest", "sloc": "6", "c_code": "void\nnettle_hmac_md5_digest(struct hmac_md5_ctx *ctx,\n size_t length, uint8_t *digest)\n{\n nettle_hmac_digest( &(ctx)->outer, &(ctx)->inner, &(ctx)->state, (&nettle_md5), (length), (digest) );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#quotearg_prep#quotearg_buffer.c", "codebase": "tar-1.34", "c_file": "quotearg.c", "function": "quotearg_buffer", "sloc": "13", "c_code": "size_t\nquotearg_buffer (char *buffer, size_t buffersize,\n char const *arg, size_t argsize,\n struct quoting_options const *o)\n{\n struct quoting_options const *p = o ? o : &default_quoting_options;\n int e = (*__errno_location ());\n size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize,\n p->style, p->flags, p->quote_these_too,\n p->left_quote, p->right_quote);\n (*__errno_location ()) = e;\n return r;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsCyrillic.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsCyrillic", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsCyrillic(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsCyrillic\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsCyrillic\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsCyrillic(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_OPERATIONS_MAKE_GCD_ARRAY_MULTIPLE_K_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "MINIMUM_OPERATIONS_MAKE_GCD_ARRAY_MULTIPLE_K.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#window-copy_prep#window_copy_init_from_pane.c", "codebase": "tmux", "c_file": "window-copy.c", "function": "window_copy_init_from_pane", "sloc": "21", "c_code": "void\nwindow_copy_init_from_pane(struct window_pane *wp, int scroll_exit)\n{\n struct window_copy_mode_data *data = wp->modedata;\n struct screen *s = &data->screen;\n struct screen_write_ctx ctx;\n u_int i;\n if (wp->mode != &window_copy_mode)\n fatalx(\"not in copy mode\");\n data->backing = &wp->base;\n data->cx = data->backing->cx;\n data->cy = data->backing->cy;\n data->scroll_exit = scroll_exit;\n s->cx = data->cx;\n s->cy = data->cy;\n screen_write_start(&ctx, ((void *)0), s);\n for (i = 0; i < ((s)->grid->sy); i++)\n window_copy_write_line(wp, &ctx, i);\n screen_write_cursormove(&ctx, data->cx, data->cy);\n screen_write_stop(&ctx);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_edecay.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_edecay", "sloc": "13", "c_code": "int ti_edecay(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *input = inputs[0];\n const int period = (int)options[0];\n double *output = outputs[0];\n const double scale = 1.0 - 1.0 / period;\n *output++ = input[0];\n int i;\n for (i = 1; i < size; ++i) {\n double d = output[-1] * scale;\n *output++ = input[i] > d ? input[i] : d;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_authorization_prep#osip_authorization_clone.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authorization.c", "function": "osip_authorization_clone", "sloc": "131", "c_code": "int osip_authorization_clone(const osip_authorization_t *auth, osip_authorization_t **dest) {\n int i;\n osip_authorization_t *au;\n *dest = ((void *)0);\n if (auth == ((void *)0))\n return -2;\n i = osip_authorization_init(&au);\n if (i != 0)\n return i;\n if (auth->auth_type != ((void *)0)) {\n au->auth_type = osip_strdup(auth->auth_type);\n if (au->auth_type == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->username != ((void *)0)) {\n au->username = osip_strdup(auth->username);\n if (au->username == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->realm != ((void *)0)) {\n au->realm = osip_strdup(auth->realm);\n if (auth->realm == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->nonce != ((void *)0)) {\n au->nonce = osip_strdup(auth->nonce);\n if (auth->nonce == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->uri != ((void *)0)) {\n au->uri = osip_strdup(auth->uri);\n if (au->uri == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->response != ((void *)0)) {\n au->response = osip_strdup(auth->response);\n if (auth->response == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->digest != ((void *)0)) {\n au->digest = osip_strdup(auth->digest);\n if (au->digest == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->algorithm != ((void *)0)) {\n au->algorithm = osip_strdup(auth->algorithm);\n if (auth->algorithm == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->cnonce != ((void *)0)) {\n au->cnonce = osip_strdup(auth->cnonce);\n if (au->cnonce == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->opaque != ((void *)0)) {\n au->opaque = osip_strdup(auth->opaque);\n if (auth->opaque == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->message_qop != ((void *)0)) {\n au->message_qop = osip_strdup(auth->message_qop);\n if (auth->message_qop == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->nonce_count != ((void *)0)) {\n au->nonce_count = osip_strdup(auth->nonce_count);\n if (auth->nonce_count == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->version != ((void *)0)) {\n au->version = osip_strdup(auth->version);\n if (auth->version == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->targetname != ((void *)0)) {\n au->targetname = osip_strdup(auth->targetname);\n if (auth->targetname == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->gssapi_data != ((void *)0)) {\n au->gssapi_data = osip_strdup(auth->gssapi_data);\n if (auth->gssapi_data == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->crand != ((void *)0)) {\n au->crand = osip_strdup(auth->crand);\n if (auth->crand == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n if (auth->cnum != ((void *)0)) {\n au->cnum = osip_strdup(auth->cnum);\n if (auth->cnum == ((void *)0)) {\n osip_authorization_free(au);\n return -4;\n }\n }\n *dest = au;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 36, "memory_management": 0, "memory_operation": 0, "if_statement": 36, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 20, "break_continue_statement": 0}}, {"id": "transcoder-set#NTH_PENTAGONAL_NUMBER_prep#min.c", "codebase": "transcoder-set", "c_file": "NTH_PENTAGONAL_NUMBER.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#scsi_prep#scsi_max_length.c", "codebase": "mtools-4.0.43", "c_file": "scsi.c", "function": "scsi_max_length", "sloc": "4", "c_code": "unsigned int scsi_max_length(void)\n{\n return 8;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#get-permissions_prep#get_permissions.c", "codebase": "tar-1.34", "c_file": "get-permissions.c", "function": "get_permissions", "sloc": "8", "c_code": "int\nget_permissions (const char *name, int desc, mode_t mode,\n struct permission_context *ctx)\n{\n memset (ctx, 0, sizeof *ctx);\n ctx->mode = mode;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_pqueue_prep#__pth_pqueue_insert.c", "codebase": "pth-2.0.7", "c_file": "pth_pqueue.c", "function": "__pth_pqueue_insert", "sloc": "39", "c_code": "void __pth_pqueue_insert(pth_pqueue_t *q, int prio, pth_t t)\n{\n pth_t c;\n int p;\n if (q == ((void *)0))\n return;\n if (q->q_head == ((void *)0) || q->q_num == 0) {\n t->q_prev = t;\n t->q_next = t;\n t->q_prio = prio;\n q->q_head = t;\n }\n else if (q->q_head->q_prio < prio) {\n t->q_prev = q->q_head->q_prev;\n t->q_next = q->q_head;\n t->q_prev->q_next = t;\n t->q_next->q_prev = t;\n t->q_prio = prio;\n t->q_next->q_prio = prio - t->q_next->q_prio;\n q->q_head = t;\n }\n else {\n c = q->q_head;\n p = c->q_prio;\n while ((p - c->q_next->q_prio) >= prio && c->q_next != q->q_head) {\n c = c->q_next;\n p -= c->q_prio;\n }\n t->q_prev = c;\n t->q_next = c->q_next;\n t->q_prev->q_next = t;\n t->q_next->q_prev = t;\n t->q_prio = p - prio;\n if (t->q_next != q->q_head)\n t->q_next->q_prio -= t->q_prio;\n }\n q->q_num++;\n return;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsCatPc.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsCatPc", "sloc": "11", "c_code": "int\nxmlUCSIsCatPc(int code) {\n return((code == 0x5f) ||\n ((code >= 0x203f) && (code <= 0x2040)) ||\n (code == 0x2054) ||\n (code == 0x30fb) ||\n ((code >= 0xfe33) && (code <= 0xfe34)) ||\n ((code >= 0xfe4d) && (code <= 0xfe4f)) ||\n (code == 0xff3f) ||\n (code == 0xff65));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#ioutil_prep#opng_path_replace_ext.c", "codebase": "optipng-0.7.8", "c_file": "ioutil.c", "function": "opng_path_replace_ext", "sloc": "26", "c_code": "char *\nopng_path_replace_ext(char *buffer, size_t bufsize,\n const char *old_path, const char *new_extname)\n{\n size_t i, pos;\n if (new_extname[0] != '.')\n return ((void *)0);\n for (i = 0, pos = (size_t)(-1); old_path[i] != '\\0'; ++i)\n {\n if (i >= bufsize)\n return ((void *)0);\n if ((buffer[i] = old_path[i]) == '.')\n pos = i;\n }\n if (i > pos)\n {\n i = pos;\n }\n for ( ; ; ++i, ++new_extname)\n {\n if (i >= bufsize)\n return ((void *)0);\n if ((buffer[i] = *new_extname) == '\\0')\n return buffer;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_TIME_TO_FINISH_TASKS_WITHOUT_SKIPPING_TWO_CONSECUTIVE_prep#len.c", "codebase": "transcoder-set", "c_file": "MINIMUM_TIME_TO_FINISH_TASKS_WITHOUT_SKIPPING_TWO_CONSECUTIVE.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "units-2.22#units_prep#replacectrlchars.c", "codebase": "units-2.22", "c_file": "units.c", "function": "replacectrlchars", "sloc": "7", "c_code": "void\nreplacectrlchars(char *string)\n{\n for(;*string;string++)\n if (((*__ctype_b_loc ())[(int) ((*string))] & (unsigned short int) _IScntrl))\n *string = ' ';\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_DISTINCT_OCCURRENCES_AS_A_SUBSEQUENCE_prep#sort.c", "codebase": "transcoder-set", "c_file": "COUNT_DISTINCT_OCCURRENCES_AS_A_SUBSEQUENCE.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "patch-2.7.6#xmalloc_prep#xrealloc.c", "codebase": "patch-2.7.6", "c_file": "xmalloc.c", "function": "xrealloc", "sloc": "13", "c_code": "void *\nxrealloc (void *p, size_t n)\n{\n if (!n && p)\n {\n free (p);\n return ((void *)0);\n }\n p = realloc (p, n);\n if (!p && n)\n xalloc_die ();\n return p;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 2, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#SQUARE_ROOT_OF_AN_INTEGER_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "SQUARE_ROOT_OF_AN_INTEGER_1.c", "function": "f_gold", "sloc": "14", "c_code": "int f_gold ( int x ) {\n if ( x == 0 || x == 1 ) return x;\n int start = 1, end = x, ans;\n while ( start <= end ) {\n int mid = ( start + end ) / 2;\n if ( mid * mid == x ) return mid;\n if ( mid * mid < x ) {\n start = mid + 1;\n ans = mid;\n }\n else end = mid - 1;\n }\n return ans;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#xmlwriter_prep#xmlNewTextWriter.c", "codebase": "libxml2", "c_file": "xmlwriter.c", "function": "xmlNewTextWriter", "sloc": "43", "c_code": "xmlTextWriterPtr\nxmlNewTextWriter(xmlOutputBufferPtr out)\n{\n xmlTextWriterPtr ret;\n ret = (xmlTextWriterPtr) xmlMalloc(sizeof(xmlTextWriter));\n if (ret == ((void *)0)) {\n xmlWriterErrMsg(((void *)0), XML_ERR_NO_MEMORY,\n \"xmlNewTextWriter : out of memory!\\n\");\n return ((void *)0);\n }\n memset(ret, 0, sizeof(xmlTextWriter));\n ret->nodes = xmlListCreate(xmlFreeTextWriterStackEntry,\n xmlCmpTextWriterStackEntry);\n if (ret->nodes == ((void *)0)) {\n xmlWriterErrMsg(((void *)0), XML_ERR_NO_MEMORY,\n \"xmlNewTextWriter : out of memory!\\n\");\n xmlFree(ret);\n return ((void *)0);\n }\n ret->nsstack = xmlListCreate(xmlFreeTextWriterNsStackEntry,\n xmlCmpTextWriterNsStackEntry);\n if (ret->nsstack == ((void *)0)) {\n xmlWriterErrMsg(((void *)0), XML_ERR_NO_MEMORY,\n \"xmlNewTextWriter : out of memory!\\n\");\n xmlListDelete(ret->nodes);\n xmlFree(ret);\n return ((void *)0);\n }\n ret->out = out;\n ret->ichar = xmlStrdup((xmlChar *) \" \");\n ret->qchar = '\"';\n if (!ret->ichar) {\n xmlListDelete(ret->nodes);\n xmlListDelete(ret->nsstack);\n xmlFree(ret);\n xmlWriterErrMsg(((void *)0), XML_ERR_NO_MEMORY,\n \"xmlNewTextWriter : out of memory!\\n\");\n return ((void *)0);\n }\n ret->doc = xmlNewDoc(((void *)0));\n ret->no_doc_free = 0;\n return ret;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 12, "memory_management": 0, "memory_operation": 1, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "pexec-1.0rc8#numhash_prep#numhash_first_wdata.c", "codebase": "pexec-1.0rc8", "c_file": "numhash.c", "function": "numhash_first_wdata", "sloc": "7", "c_code": "int numhash_first_wdata(numhashtable *nt,void **dret)\n{\n int c;\n c=numhash_get_terminal_used(nt,+1);\n if ( c>=0 && dret != ((void *)0) ) numhash_search(nt,c,dret);\n return(c);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#EULERS_CRITERION_CHECK_IF_SQUARE_ROOT_UNDER_MODULO_P_EXISTS_prep#min.c", "codebase": "transcoder-set", "c_file": "EULERS_CRITERION_CHECK_IF_SQUARE_ROOT_UNDER_MODULO_P_EXISTS.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#hash_fct_prep#Hash_Buffer.c", "codebase": "gprolog-1.5.0", "c_file": "hash_fct.c", "function": "Hash_Buffer", "sloc": "7", "c_code": "uint32_t\nHash_Buffer(const void *key, int len, uint32_t seed)\n{\n if (((uintptr_t) key & 3) == 0)\n return Hash_Buffer_Aligned(key, len, seed);\n return Hash_Buffer_Unaligned(key, len, seed);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#sha256_prep#nettle_sha224_init.c", "codebase": "nettle-3.9.1", "c_file": "sha256.c", "function": "nettle_sha224_init", "sloc": "12", "c_code": "void\nnettle_sha224_init(struct sha256_ctx *ctx)\n{\n static const uint32_t H0[8] =\n {\n 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4,\n };\n memcpy(ctx->state, H0, sizeof(H0));\n ctx->count = 0;\n ctx->index = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#parserInternals_prep#xmlCtxtGetStatus.c", "codebase": "libxml2", "c_file": "parserInternals.c", "function": "xmlCtxtGetStatus", "sloc": "19", "c_code": "int\nxmlCtxtGetStatus(xmlParserCtxt *ctxt) {\n int bits = 0;\n if (xmlCtxtIsCatastrophicError(ctxt)) {\n bits |= (1 << 3) |\n (1 << 0) |\n (1 << 1);\n if ((ctxt != ((void *)0)) && (ctxt->validate))\n bits |= (1 << 2);\n return(bits);\n }\n if (!ctxt->wellFormed)\n bits |= (1 << 0);\n if (!ctxt->nsWellFormed)\n bits |= (1 << 1);\n if ((ctxt->validate) && (!ctxt->valid))\n bits |= (1 << 2);\n return(bits);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "heman#generate_prep#heman_generate_archipelago_political_3.c", "codebase": "heman", "c_file": "generate.c", "function": "heman_generate_archipelago_political_3", "sloc": "40", "c_code": "heman_image* heman_generate_archipelago_political_3(int width, int height,\n const heman_color* colors, int ncolors, heman_color ocean, int seed,\n heman_image* political)\n{\n heman_image** elevations = malloc(sizeof(heman_image*) * ncolors);\n for (int cindex = 0; cindex < ncolors; cindex++) {\n elevations[cindex] = heman_generate_archipelago_political_2(\n width, height, colors[cindex], seed, political, 1);\n }\n heman_image* elevation = heman_image_create(width, height, 1);\n heman_image_clear(elevation, 0);\n for (int cindex = 0; cindex < ncolors; cindex++) {\n int y;\n#pragma omp parallel for\n for (y = 0; y < height; ++y) {\n float* dst = elevation->data + y * width;\n float* src = elevations[cindex]->data + y * width;\n for (int x = 0; x < width; ++x, ++dst, ++src) {\n *dst = (*src > *dst ? *src : *dst);\n }\n }\n heman_image_destroy(elevations[cindex]);\n }\n free(elevations);\n heman_image* ocean_elevation = heman_generate_archipelago_political_2(\n width, height, ocean, seed, political, 0);\n int y;\n#pragma omp parallel for\n for (y = 0; y < height; ++y) {\n float* dst = elevation->data + y * width;\n float* src = ocean_elevation->data + y * width;\n for (int x = 0; x < width; ++x, ++dst, ++src) {\n if (*src < 0) {\n *dst = *src;\n }\n }\n }\n heman_image_destroy(ocean_elevation);\n return elevation;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 2, "memory_operation": 0, "if_statement": 1, "for_loop": 6, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#parserInternals_prep#xmlParserInputGrow.c", "codebase": "libxml2", "c_file": "parserInternals.c", "function": "xmlParserInputGrow", "sloc": "27", "c_code": "int\nxmlParserInputGrow(xmlParserInputPtr in, int len) {\n int ret;\n size_t indx;\n if ((in == ((void *)0)) || (len < 0)) return(-1);\n if (in->buf == ((void *)0)) return(-1);\n if (in->base == ((void *)0)) return(-1);\n if (in->cur == ((void *)0)) return(-1);\n if (in->buf->buffer == ((void *)0)) return(-1);\n if ((in->buf->encoder == ((void *)0)) && (in->buf->readcallback == ((void *)0)))\n return(0);\n indx = in->cur - in->base;\n if (xmlBufUse(in->buf->buffer) > (unsigned int) indx + 250) {\n return(0);\n }\n ret = xmlParserInputBufferGrow(in->buf, len);\n in->base = xmlBufContent(in->buf->buffer);\n if (in->base == ((void *)0)) {\n in->base = (xmlChar *) \"\";\n in->cur = in->base;\n in->end = in->base;\n return(-1);\n }\n in->cur = in->base + indx;\n in->end = xmlBufEnd(in->buf->buffer);\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 0, "if_statement": 8, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 9, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_list_map.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_list_map", "sloc": "5", "c_code": "void * binn_list_map(void *list, int pos) {\n void *value;\n binn_list_get(list, pos, 0xE1, &value, ((void *)0));\n return value;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlSchemaValidateSetFilename.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlSchemaValidateSetFilename", "sloc": "12", "c_code": "PyObject *\nlibxml_xmlSchemaValidateSetFilename(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlSchemaValidCtxtPtr vctxt;\n PyObject *pyobj_vctxt;\n char * filename;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Oz:xmlSchemaValidateSetFilename\", &pyobj_vctxt, &filename))\n return(((void *)0));\n vctxt = (xmlSchemaValidCtxtPtr) (((pyobj_vctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PySchemaValidCtxt_Object *)(pyobj_vctxt))->obj));\n xmlSchemaValidateSetFilename(vctxt, filename);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tar-1.34#regex_prep#rpl_re_compile_fastmap.c", "codebase": "tar-1.34", "c_file": "regex.c", "function": "rpl_re_compile_fastmap", "sloc": "16", "c_code": "int\nrpl_re_compile_fastmap (struct re_pattern_buffer *bufp)\n{\n re_dfa_t *dfa = bufp->buffer;\n char *fastmap = bufp->fastmap;\n memset (fastmap, '\\0', sizeof (char) * ((0x7f * 2 + 1) + 1));\n re_compile_fastmap_iter (bufp, dfa->init_state, fastmap);\n if (dfa->init_state != dfa->init_state_word)\n re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap);\n if (dfa->init_state != dfa->init_state_nl)\n re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap);\n if (dfa->init_state != dfa->init_state_begbuf)\n re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap);\n bufp->fastmap_accurate = 1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsGeometricShapes.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsGeometricShapes", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsGeometricShapes(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsGeometricShapes\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsGeometricShapes\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsGeometricShapes(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_SET_36_CUT_A_ROPE_TO_MAXIMIZE_PRODUCT_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_SET_36_CUT_A_ROPE_TO_MAXIMIZE_PRODUCT_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_FACTORS_NUMBER_prep#main.c", "codebase": "transcoder-set", "c_file": "SUM_FACTORS_NUMBER.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {76,21,4,49,35,55,43,39,36,5};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libosip2-5.3.1#osip_www_authenticate_prep#osip_www_authenticate_get_opaque.c", "codebase": "libosip2-5.3.1", "c_file": "osip_www_authenticate.c", "function": "osip_www_authenticate_get_opaque", "sloc": "3", "c_code": "char *osip_www_authenticate_get_opaque(osip_www_authenticate_t *www_authenticate) {\n return www_authenticate->opaque;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#window_prep#window_pane_get_palette.c", "codebase": "tmux", "c_file": "window.c", "function": "window_pane_get_palette", "sloc": "17", "c_code": "int\nwindow_pane_get_palette(const struct window_pane *wp, int c)\n{\n int new;\n if (wp == ((void *)0) || wp->palette == ((void *)0))\n return (-1);\n new = -1;\n if (c < 8)\n new = wp->palette[c];\n else if (c >= 90 && c <= 97)\n new = wp->palette[8 + c - 90];\n else if (c & 0x01000000)\n new = wp->palette[c & ~0x01000000];\n if (new == 0)\n return (-1);\n return (new);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tar-1.34#extract_prep#extract_finish.c", "codebase": "tar-1.34", "c_file": "extract.c", "function": "extract_finish", "sloc": "7", "c_code": "void\nextract_finish (void)\n{\n apply_nonancestor_delayed_set_stat (\"\", 0);\n apply_delayed_links ();\n apply_nonancestor_delayed_set_stat (\"\", 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#move_prep#to_last_line.c", "codebase": "nano-7.2", "c_file": "move.c", "function": "to_last_line", "sloc": "10", "c_code": "void to_last_line(void)\n{\n openfile->current = openfile->filebot;\n openfile->current_x = (inhelp) ? 0 : strlen(openfile->filebot->data);\n openfile->placewewant = xplustabs();\n openfile->current_y = editwinrows - 1;\n refresh_needed = 1;\n recook |= perturbed;\n focusing = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#EQUILIBRIUM_INDEX_OF_AN_ARRAY_1_prep#main.c", "codebase": "transcoder-set", "c_file": "EQUILIBRIUM_INDEX_OF_AN_ARRAY_1.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {24,31,44,52,78,95};\nint param0_1[] = {-78,-38,22,58,68,-60,-30,6,58,20,-64,-40,-14,80,-2,-88,-68,-16,-4,78,-38,-74,78,-72,46,-12,82,-76,-98,-28,-32,88,72,72,64,-10,98,-24,-96};\nint param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1};\nint param0_3[] = {98,69,41,48,40,90,76,61,17,81,74,92,54,16,11,15,8,16,84,86,34,34,75,92,67,54,93,19,31,62,89,26,96,91,32,78,42,84,66,79,29,48,49,5};\nint param0_4[] = {-28,42};\nint param0_5[] = {1,1,1,1,0,0,0,0,0,1,0,1,1,0,1,1,0,1,0,1,0,0,0,1,0,1};\nint param0_6[] = {18,21,23,24,36,37,39,49,55,68,80,81,88,90};\nint param0_7[] = {94,22,42,-42,78,50,96,98,46,74,98,84,-2,-76,48,18,28,-62,78,6,-76,-12,46,62,14,76,44,-26,-92,12,62,-72,-42};\nint param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};\nint param0_9[] = {1,23,18,91,65,2,73,12,91,47,14,48,1,69,95,81,59,36,79,35,9,52,55,73,54,25,8,41,64,96};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {4,19,11,27,1,25,11,32,14,19};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "mtools-4.0.43#dirCache_prep#addFreeEntry.c", "codebase": "mtools-4.0.43", "c_file": "dirCache.c", "function": "addFreeEntry", "sloc": "6", "c_code": "dirCacheEntry_t *addFreeEntry(dirCache_t *cache,\n unsigned int beginSlot,\n unsigned int endSlot)\n{\n return addFreeEndEntry(cache, beginSlot, endSlot, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#forwback_prep#eof_bell.c", "codebase": "less-633", "c_file": "forwback.c", "function": "eof_bell", "sloc": "12", "c_code": "void eof_bell(void)\n{\n static time_t last_eof_bell = 0;\n time_t now = get_time();\n if (now == last_eof_bell)\n return;\n last_eof_bell = now;\n if (quiet == 0)\n bell();\n else\n vbell();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4.c", "function": "f_gold", "sloc": "9", "c_code": "int f_gold ( int n ) {\n int DP [ n + 1 ];\n DP [ 0 ] = DP [ 1 ] = DP [ 2 ] = 1;\n DP [ 3 ] = 2;\n for ( int i = 4;\n i <= n;\n i ++ ) DP [ i ] = DP [ i - 1 ] + DP [ i - 3 ] + DP [ i - 4 ];\n return DP [ n ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_1_prep#main.c", "codebase": "transcoder-set", "c_file": "MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_1.c", "function": "main", "sloc": "16", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {43,76,57,10,59,92,49,16,33,66};\n int param1[] = {24,54,5,13,47,14,62,95,41,63};\n int param2[] = {7,66,40,4,56,50,65,12,90,46};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#CIRCLE_LATTICE_POINTS_prep#len.c", "codebase": "transcoder-set", "c_file": "CIRCLE_LATTICE_POINTS.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_authentication_info_prep#osip_message_set_authentication_info.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authentication_info.c", "function": "osip_message_set_authentication_info", "sloc": "19", "c_code": "int osip_message_set_authentication_info(osip_message_t *sip, const char *hvalue) {\n osip_authentication_info_t *authentication_info;\n int i;\n if (hvalue == ((void *)0) || hvalue[0] == '\\0')\n return 0;\n if (sip == ((void *)0))\n return -2;\n i = osip_authentication_info_init(&authentication_info);\n if (i != 0)\n return i;\n i = osip_authentication_info_parse(authentication_info, hvalue);\n if (i != 0) {\n osip_authentication_info_free(authentication_info);\n return i;\n }\n sip->message_property = 2;\n osip_list_add(&sip->authentication_infos, authentication_info, -1);\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "robotfindskitten#robotfindskitten_prep#draw.c", "codebase": "robotfindskitten", "c_file": "robotfindskitten.c", "function": "draw", "sloc": "1", "c_code": "void draw(screen_object o) { full_draw(o,0); }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_global_object_prep#json_get_key_size.c", "codebase": "json.h", "c_file": "allow_global_object.c", "function": "json_get_key_size", "sloc": "31", "c_code": "int json_get_key_size(struct json_parse_state_s *state) {\n const size_t flags_bitset = state->flags_bitset;\n if (json_parse_flags_allow_unquoted_keys & flags_bitset) {\n size_t offset = state->offset;\n const size_t size = state->size;\n const char *const src = state->src;\n size_t data_size = state->data_size;\n if ('\"' == src[offset]) {\n return json_get_string_size(state, 1);\n } else if ((json_parse_flags_allow_single_quoted_strings & flags_bitset) &&\n ('\\'' == src[offset])) {\n return json_get_string_size(state, 1);\n } else {\n while ((offset < size) && is_valid_unquoted_key_char(src[offset])) {\n offset++;\n data_size++;\n }\n data_size++;\n if (json_parse_flags_allow_location_information & flags_bitset) {\n state->dom_size += sizeof(struct json_string_ex_s);\n } else {\n state->dom_size += sizeof(struct json_string_s);\n }\n state->offset = offset;\n state->data_size = data_size;\n return 0;\n }\n } else {\n return json_get_string_size(state, 1);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#profile_prep#pp_string_fp.c", "codebase": "gawk-5.2.2", "c_file": "profile.c", "function": "pp_string_fp", "sloc": "18", "c_code": "void\npp_string_fp(Func_print print_func, FILE *fp, const char *in_str,\n size_t len, int delim, _Bool breaklines)\n{\n char *s = pp_string(in_str, len, delim);\n int count;\n size_t slen;\n const char *str = (const char *) s;\n slen = strlen(str);\n for (count = 0; slen > 0; slen--, str++) {\n print_func(fp, \"%c\", *str);\n if (++count >= 70 && breaklines) {\n print_func(fp, \"%c\\n%c\", delim, delim);\n count = 0;\n }\n }\n pma_free(s);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_DISTINCT_NON_NEGATIVE_PAIRS_X_Y_SATISFY_INEQUALITY_XX_YY_N_2_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "COUNT_DISTINCT_NON_NEGATIVE_PAIRS_X_Y_SATISFY_INEQUALITY_XX_YY_N_2_1.c", "function": "f_gold", "sloc": "12", "c_code": "int f_gold ( int n ) {\n int x = 0, yCount, res = 0;\n for ( yCount = 0;\n yCount * yCount < n;\n yCount ++ );\n while ( yCount != 0 ) {\n res += yCount;\n x ++;\n while ( yCount != 0 && ( x * x + ( yCount - 1 ) * ( yCount - 1 ) >= n ) ) yCount --;\n }\n return res;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SMALLEST_OF_THREE_INTEGERS_WITHOUT_COMPARISON_OPERATORS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SMALLEST_OF_THREE_INTEGERS_WITHOUT_COMPARISON_OPERATORS.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int x, int y, int z ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ecc-gostdsa-verify_prep#nettle_ecc_gostdsa_verify_itch.c", "codebase": "nettle-3.9.1", "c_file": "ecc-gostdsa-verify.c", "function": "nettle_ecc_gostdsa_verify_itch", "sloc": "5", "c_code": "mp_size_t\nnettle_ecc_gostdsa_verify_itch (const struct ecc_curve *ecc)\n{\n return 5*ecc->p.size + (((3 << 4) + 8) * (ecc->p.size));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#atom_prep#Pl_Find_Next_Atom.c", "codebase": "gprolog-1.5.0", "c_file": "atom.c", "function": "Pl_Find_Next_Atom", "sloc": "10", "c_code": "int\nPl_Find_Next_Atom(int last_atom)\n{\n while ((PlULong) ++last_atom < pl_max_atom)\n {\n if (pl_atom_tbl[last_atom].name)\n return last_atom;\n }\n return -1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "heman#mat4_prep#kmMat4ExtractPlane.c", "codebase": "heman", "c_file": "mat4.c", "function": "kmMat4ExtractPlane", "sloc": "52", "c_code": "kmPlane* kmMat4ExtractPlane(kmPlane* pOut, const kmMat4* pIn, const unsigned int plane)\n{\n float t = 1.0f;\n switch(plane) {\n case 1:\n pOut->a = pIn->mat[3] - pIn->mat[0];\n pOut->b = pIn->mat[7] - pIn->mat[4];\n pOut->c = pIn->mat[11] - pIn->mat[8];\n pOut->d = pIn->mat[15] - pIn->mat[12];\n break;\n case 0:\n pOut->a = pIn->mat[3] + pIn->mat[0];\n pOut->b = pIn->mat[7] + pIn->mat[4];\n pOut->c = pIn->mat[11] + pIn->mat[8];\n pOut->d = pIn->mat[15] + pIn->mat[12];\n break;\n case 2:\n pOut->a = pIn->mat[3] + pIn->mat[1];\n pOut->b = pIn->mat[7] + pIn->mat[5];\n pOut->c = pIn->mat[11] + pIn->mat[9];\n pOut->d = pIn->mat[15] + pIn->mat[13];\n break;\n case 3:\n pOut->a = pIn->mat[3] - pIn->mat[1];\n pOut->b = pIn->mat[7] - pIn->mat[5];\n pOut->c = pIn->mat[11] - pIn->mat[9];\n pOut->d = pIn->mat[15] - pIn->mat[13];\n break;\n case 5:\n pOut->a = pIn->mat[3] - pIn->mat[2];\n pOut->b = pIn->mat[7] - pIn->mat[6];\n pOut->c = pIn->mat[11] - pIn->mat[10];\n pOut->d = pIn->mat[15] - pIn->mat[14];\n break;\n case 4:\n pOut->a = pIn->mat[3] + pIn->mat[2];\n pOut->b = pIn->mat[7] + pIn->mat[6];\n pOut->c = pIn->mat[11] + pIn->mat[10];\n pOut->d = pIn->mat[15] + pIn->mat[14];\n break;\n default:\n ((void) sizeof ((0 && \"Invalid plane index\") ? 1 : 0), __extension__ ({ if (0 && \"Invalid plane index\") ; else __assert_fail (\"0 && \\\"Invalid plane index\\\"\", \"/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/heman/kazmath/mat4.c\", 779, __extension__ __PRETTY_FUNCTION__); }));\n }\n t = sqrtf(pOut->a * pOut->a +\n pOut->b * pOut->b +\n pOut->c * pOut->c);\n pOut->a /= t;\n pOut->b /= t;\n pOut->c /= t;\n pOut->d /= t;\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 6}}, {"id": "patch-2.7.6#pch_prep#pch_rename.c", "codebase": "patch-2.7.6", "c_file": "pch.c", "function": "pch_rename", "sloc": "4", "c_code": "_Bool pch_rename (void)\n{\n return p_rename[OLD] && p_rename[NEW];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlsave_prep#xmlSaveToFd.c", "codebase": "libxml2", "c_file": "xmlsave.c", "function": "xmlSaveToFd", "sloc": "13", "c_code": "xmlSaveCtxtPtr\nxmlSaveToFd(int fd, const char *encoding, int options)\n{\n xmlSaveCtxtPtr ret;\n ret = xmlNewSaveCtxt(encoding, options);\n if (ret == ((void *)0)) return(((void *)0));\n ret->buf = xmlOutputBufferCreateFd(fd, ret->handler);\n if (ret->buf == ((void *)0)) {\n xmlFreeSaveCtxt(ret);\n return(((void *)0));\n }\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "nano-7.2#global_prep#backwards_void.c", "codebase": "nano-7.2", "c_file": "global.c", "function": "backwards_void", "sloc": "1", "c_code": "void backwards_void(void) {;}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY_1_prep#len.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#HYPERCUBE_GRAPH_prep#main.c", "codebase": "transcoder-set", "c_file": "HYPERCUBE_GRAPH.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {72,28,45,41,94,97,97,36,91,84};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "gprolog-1.5.0#g_var_inl_c_prep#Pl_Blt_G_Link.c", "codebase": "gprolog-1.5.0", "c_file": "g_var_inl_c.c", "function": "Pl_Blt_G_Link", "sloc": "7", "c_code": "void\nPl_Blt_G_Link(WamWord x, WamWord y)\n{\n Pl_Set_C_Bip_Name(\"g_link\", 2);\n G_Assign(x, y, 1, 0);\n Pl_Unset_C_Bip_Name();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#compress_prep#compress.c", "codebase": "optipng-0.7.8", "c_file": "compress.c", "function": "compress", "sloc": "4", "c_code": "int compress(Bytef *dest, uLongf *destLen, const Bytef *source,\n uLong sourceLen) {\n return compress2(dest, destLen, source, sourceLen, (-1));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bc-1.07.1#scan_prep#yypop_buffer_state.c", "codebase": "bc-1.07.1", "c_file": "scan.c", "function": "yypop_buffer_state", "sloc": "13", "c_code": "void yypop_buffer_state (void)\n{\n if (!( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)))\n return;\n yy_delete_buffer(( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)) );\n (yy_buffer_stack)[(yy_buffer_stack_top)] = ((void *)0);\n if ((yy_buffer_stack_top) > 0)\n --(yy_buffer_stack_top);\n if (( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0))) {\n yy_load_buffer_state( );\n (yy_did_buffer_switch_on_eof) = 1;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FINDING_POWER_PRIME_NUMBER_P_N_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FINDING_POWER_PRIME_NUMBER_P_N.c", "function": "f_gold", "sloc": "9", "c_code": "int f_gold ( int n, int p ) {\n int ans = 0;\n int temp = p;\n while ( temp <= n ) {\n ans += n / temp;\n temp = temp * p;\n }\n return ans;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#const_io_c_prep#Pl_Display_To_String.c", "codebase": "gprolog-1.5.0", "c_file": "const_io_c.c", "function": "Pl_Display_To_String", "sloc": "7", "c_code": "char *\nPl_Display_To_String(WamWord term_word)\n{\n char *ret_str;\n { int stm; WamWord stm_word; char *str; stm = Pl_Add_Str_Stream(((void *)0), 1); stm_word = Pl_Make_Stream_Tagged_Word(stm); { Pl_Display_2(stm_word, term_word); } str = Pl_Term_Write_Str_Stream(stm); { ret_str = Pl_Strdup_Check(str, \"const_io_c.c\", 186); } Pl_Delete_Str_Stream(stm); };\n return ret_str;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "dap-3.10#machdep_prep#dap_putdouble.c", "codebase": "dap-3.10", "c_file": "machdep.c", "function": "dap_putdouble", "sloc": "50", "c_code": "void dap_putdouble(DFILE *dfp)\n{\nunsigned int ix[2];\nunsigned int sign;\nunsigned int e;\nchar dstr[13];\nint d;\nd = 0;\nix[0] = *(((unsigned int *) &dap_double) + dap_dbllow);\nix[1] = *(((unsigned int *) &dap_double) + dap_dblhigh);\nif (!(ix[0] & 0x7fffffff) && !ix[1])\n {\n dstr[d++] = 'A';\n for (e = 0; e < 11; e++)\n dstr[d++] = '!';\n }\nelse\n {\n sign = ((ix[1] >> 20) & 0x800);\n e =((ix[1] >> 20) & 0x7ff);\n if (!e)\n {\n dstr[d++] = 'A';\n for (e = 0; e < 11; e++)\n dstr[d++] = '!';\n }\n else if (e == 0x7ff)\n {\n for (e = 0; e < 12; e++)\n dstr[d++] = 'a';\n }\n else\n {\n if (sign)\n {\n e = 0x800 - e;\n ix[1] = ((~ix[1]) & 0xfffff);\n ix[0] = (~ix[0]);\n }\n else\n e += 0x800;\n d += putnd(e, 2, dstr + d);\n d += putnd(ix[1], 4, dstr + d);\n d += putnd(ix[0], 6, dstr + d);\n }\n }\ndstr[d] = '\\0';\nfor (d = 0; dstr[d]; d++)\n dap_putc(dstr[d], dfp);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 4, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "wget-1.21.4#css__prep#yy_delete_buffer.c", "codebase": "wget-1.21.4", "c_file": "css_.c", "function": "yy_delete_buffer", "sloc": "10", "c_code": "void yy_delete_buffer (YY_BUFFER_STATE b )\n{\n if ( ! b )\n return;\n if ( b == ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)) )\n (yy_buffer_stack)[(yy_buffer_stack_top)] = (YY_BUFFER_STATE) 0;\n if ( b->yy_is_our_buffer )\n yyfree( (void *) b->yy_ch_buf );\n yyfree( (void *) b );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngerror_prep#png_app_error.c", "codebase": "optipng-0.7.8", "c_file": "pngerror.c", "function": "png_app_error", "sloc": "8", "c_code": "void\npng_app_error(png_const_structrp png_ptr, png_const_charp error_message)\n{\n if ((png_ptr->flags & 0x400000U) != 0)\n png_warning(png_ptr, error_message);\n else\n png_error(png_ptr, error_message);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#malloca_prep#freea.c", "codebase": "tar-1.34", "c_file": "malloca.c", "function": "freea", "sloc": "13", "c_code": "void\nfreea (void *p)\n{\n if ((uintptr_t) p & (sa_alignment_max - 1))\n {\n abort ();\n }\n if ((uintptr_t) p & sa_alignment_max)\n {\n void *mem = (char *) p - ((small_t *) p)[-1];\n free (mem);\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#proc_prep#proc_toggle_log.c", "codebase": "tmux", "c_file": "proc.c", "function": "proc_toggle_log", "sloc": "5", "c_code": "void\nproc_toggle_log(struct tmuxproc *tp)\n{\n log_toggle(tp->name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#output_prep#sexp_put_char.c", "codebase": "nettle-3.9.1", "c_file": "output.c", "function": "sexp_put_char", "sloc": "25", "c_code": "void\nsexp_put_char(struct sexp_output *output, uint8_t c)\n{\n if (output->coding)\n {\n char encoded[2];\n unsigned done;\n unsigned i;\n done = output->coding->encode_update(&output->base64, encoded,\n 1, &c);\n ((void) sizeof ((done <= sizeof(encoded)) ? 1 : 0), __extension__ ({ if (done <= sizeof(encoded)) ; else __assert_fail (\"done <= sizeof(encoded)\", \"output.c\", 124, __extension__ __PRETTY_FUNCTION__); }));\n for (i = 0; iline_width\n && output->pos >= output->line_width\n && output->pos >= (output->coding_indent + 10))\n sexp_put_newline(output, output->coding_indent);\n sexp_put_raw_char(output, encoded[i]);\n }\n }\n else if (output->hash)\n output->hash->update(output->ctx, 1, &c);\n else\n sexp_put_raw_char(output, c);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#error_supp_prep#Pl_Err_Evaluation.c", "codebase": "gprolog-1.5.0", "c_file": "error_supp.c", "function": "Pl_Err_Evaluation", "sloc": "7", "c_code": "void\nPl_Err_Evaluation(int pl_atom_error)\n{\n Update_Cur_From_C_Bip();\n (pl_reg_bank[0]) = (((PlLong) (pl_atom_error) << 3) + ((PlULong)0x3));\n Pl_Execute_A_Continuation(X1_24706C5F6572725F6576616C756174696F6E__a1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "wget-1.21.4#iri_prep#idn_decode.c", "codebase": "wget-1.21.4", "c_file": "iri.c", "function": "idn_decode", "sloc": "5", "c_code": "char *\nidn_decode (const char *host)\n{\n return xstrdup(host);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlNodeSetContentLen.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlNodeSetContentLen", "sloc": "15", "c_code": "PyObject *\nlibxml_xmlNodeSetContentLen(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlNodePtr cur;\n PyObject *pyobj_cur;\n xmlChar * content;\n int len;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Ozi:xmlNodeSetContentLen\", &pyobj_cur, &content, &len))\n return(((void *)0));\n cur = (xmlNodePtr) (((pyobj_cur) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_cur))->obj));\n c_retval = xmlNodeSetContentLen(cur, content, len);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tmux#imsg-buffer_prep#ibuf_size.c", "codebase": "tmux", "c_file": "imsg-buffer.c", "function": "ibuf_size", "sloc": "5", "c_code": "size_t\nibuf_size(struct ibuf *buf)\n{\n return (buf->wpos);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_SUM_SUBARRAY_REMOVING_ONE_ELEMENT_prep#max.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_SUM_SUBARRAY_REMOVING_ONE_ELEMENT.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_cosh.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_cosh", "sloc": "1", "c_code": "int ti_cosh(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *in1 = inputs[0]; (void)options; double *output = outputs[0]; int i; for (i = 0; i < size; ++i) { output[i] = (cosh(in1[i])); } return 0; }\n", "c_constructs": {"pointer_type": 3, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FINDING_POWER_PRIME_NUMBER_P_N_prep#sort.c", "codebase": "transcoder-set", "c_file": "FINDING_POWER_PRIME_NUMBER_P_N.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#control_c_prep#Pl_Between_Alt_0.c", "codebase": "gprolog-1.5.0", "c_file": "control_c.c", "function": "Pl_Between_Alt_0", "sloc": "17", "c_code": "void\nPl_Between_Alt_0(void)\n{\n PlLong l, u;\n WamWord i_word;\n Pl_Update_Choice_Point((CodePtr) X1_246265747765656E5F616C74__a0, 0);\n l = (*(WamWord *) &(B[-9 - (0)]));\n u = (*(WamWord *) &(B[-9 - (1)]));\n i_word = (*(WamWord *) &(B[-9 - (2)]));\n if (l == u)\n (B = ((*(WamWord **) &(B[-5]))), (((WamWordP *) pl_reg_bank)[256 +0]) = (*(WamWord **) &(B[-6])));\n else\n {\n (*(WamWord *) &(B[-9 - (0)])) = l + 1;\n }\n Pl_Get_Integer(l, i_word);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_extract_get_array_size.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_extract_get_array_size", "sloc": "17", "c_code": "struct json_extract_result_s\njson_extract_get_array_size(const struct json_array_s *const array) {\n struct json_extract_result_s result;\n size_t i;\n const struct json_array_element_s *element = array->start;\n result.dom_size = sizeof(struct json_array_s) +\n (sizeof(struct json_array_element_s) * array->length);\n result.data_size = 0;\n for (i = 0; i < array->length; i++) {\n const struct json_extract_result_s value_result =\n json_extract_get_value_size(element->value);\n result.dom_size += value_result.dom_size;\n result.data_size += value_result.data_size;\n element = element->next;\n }\n return result;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bc-1.07.1#number_prep#bc_new_num.c", "codebase": "bc-1.07.1", "c_file": "number.c", "function": "bc_new_num", "sloc": "21", "c_code": "bc_num\nbc_new_num (int length, int scale)\n{\n bc_num temp;\n if (_bc_Free_list != ((void *)0)) {\n temp = _bc_Free_list;\n _bc_Free_list = temp->n_next;\n } else {\n temp = (bc_num) malloc (sizeof(bc_struct));\n if (temp == ((void *)0)) out_of_memory ();\n }\n temp->n_sign = PLUS;\n temp->n_len = length;\n temp->n_scale = scale;\n temp->n_refs = 1;\n temp->n_ptr = (char *) malloc (length+scale);\n if (temp->n_ptr == ((void *)0)) out_of_memory();\n temp->n_value = temp->n_ptr;\n memset (temp->n_ptr, 0, length+scale);\n return temp;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 2, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DOUBLE_FACTORIAL_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "DOUBLE_FACTORIAL_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#regex_prep#rpl_regerror.c", "codebase": "tar-1.34", "c_file": "regex.c", "function": "rpl_regerror", "sloc": "23", "c_code": "size_t\nrpl_regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf,\n size_t errbuf_size)\n{\n const char *msg;\n size_t msg_size;\n int nerrcodes = sizeof __re_error_msgid_idx / sizeof __re_error_msgid_idx[0];\n if (__builtin_expect ((errcode < 0 || errcode >= nerrcodes), 0))\n abort ();\n msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]);\n msg_size = strlen (msg) + 1;\n if (__builtin_expect ((errbuf_size != 0), 1))\n {\n size_t cpy_size = msg_size;\n if (__builtin_expect ((msg_size > errbuf_size), 0))\n {\n cpy_size = errbuf_size - 1;\n errbuf[cpy_size] = '\\0';\n }\n memcpy (errbuf, msg, cpy_size);\n }\n return msg_size;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#environ_prep#environ_RB_FIND.c", "codebase": "tmux", "c_file": "environ.c", "function": "environ_RB_FIND", "sloc": "1", "c_code": "struct environ_entry * environ_RB_FIND(struct environ *head, struct environ_entry *elm) { struct environ_entry *tmp = (head)->rbh_root; int comp; while (tmp) { comp = environ_cmp(elm, tmp); if (comp < 0) tmp = (tmp)->entry.rbe_left; else if (comp > 0) tmp = (tmp)->entry.rbe_right; else return (tmp); } return (((void *)0)); }\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_object_str.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_object_str", "sloc": "5", "c_code": "char * binn_object_str(void *obj, const char *key) {\n char *value;\n binn_object_get(obj, key, 0xA0, &value, ((void *)0));\n return value;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cflow-1.7#posix_prep#posix_output_handler.c", "codebase": "cflow-1.7", "c_file": "posix.c", "function": "posix_output_handler", "sloc": "27", "c_code": "int\nposix_output_handler(cflow_output_command cmd,\n FILE *outfile, int line,\n void *data, void *handler_data)\n{\n switch (cmd) {\n case cflow_output_init:\n if (emacs_option)\n error(3, 0,\n gettext(\"--format=posix is not compatible with --emacs\"));\n brief_listing = print_line_numbers = omit_symbol_names_option = 1;\n break;\n case cflow_output_begin:\n case cflow_output_end:\n case cflow_output_separator:\n break;\n case cflow_output_newline:\n fprintf(outfile, \"\\n\");\n break;\n case cflow_output_text:\n fprintf(outfile, \"%s\", (char*) data);\n break;\n case cflow_output_symbol:\n return print_symbol(outfile, line, data);\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 4}}, {"id": "optipng-0.7.8#pnmin_prep#pnm_fget_values.c", "codebase": "optipng-0.7.8", "c_file": "pnmin.c", "function": "pnm_fget_values", "sloc": "115", "c_code": "int pnm_fget_values(const pnm_struct *pnm_ptr,\n unsigned int *sample_values,\n unsigned int num_rows,\n FILE *stream)\n{\n unsigned int format = pnm_ptr->format;\n unsigned int depth = pnm_ptr->depth;\n unsigned int width = pnm_ptr->width;\n unsigned int maxval = pnm_ptr->maxval;\n size_t row_length = (size_t)depth * (size_t)width;\n size_t num_samples = num_rows * row_length;\n int ch, ch8;\n int ch16, ch24;\n int mask;\n size_t i, j;\n switch (format)\n {\n case PNM_P1:\n for (i = 0; i < num_samples; ++i)\n {\n do\n {\n ch = pnm_fget_char(stream);\n } while (((ch) == ' ' || (ch) == '\\t' || (ch) == '\\n' || (ch) == '\\r'));\n if (ch != '0' && ch != '1')\n {\n ungetc(ch, stream);\n break;\n }\n sample_values[i] = (ch == '0') ? 1 : 0;\n }\n break;\n case PNM_P2:\n case PNM_P3:\n for (i = 0; i < num_samples; ++i)\n {\n if (pnm_fscan_uint(stream, &sample_values[i]) != 1)\n break;\n }\n break;\n case PNM_P4:\n for (i = j = 0; i < num_samples; )\n {\n ch = getc(stream);\n if (ch == (-1))\n break;\n for (mask = 0x80; mask != 0; mask >>= 1)\n {\n sample_values[i++] = (ch & mask) ? 0 : 1;\n if (++j == row_length)\n {\n j = 0;\n break;\n }\n }\n }\n break;\n case PNM_P5:\n case PNM_P6:\n case PNM_P7:\n if (maxval <= 0xffU)\n {\n for (i = 0; i < num_samples; ++i)\n {\n ch = getc(stream);\n if (ch == (-1))\n break;\n sample_values[i] = (unsigned int)ch;\n }\n }\n else if (maxval <= 0xffffU)\n {\n for (i = 0; i < num_samples; ++i)\n {\n ch8 = getc(stream);\n ch = getc(stream);\n if (ch == (-1))\n break;\n sample_values[i] = ((unsigned int)ch8 << 8) + (unsigned int)ch;\n }\n }\n else if (maxval <= 0xffffffffU)\n {\n ch24 = 0;\n for (i = 0; i < num_samples; ++i)\n {\n if (maxval > 0xffffffU)\n ch24 = getc(stream);\n ch16 = getc(stream);\n ch8 = getc(stream);\n ch = getc(stream);\n if (ch == (-1))\n break;\n sample_values[i] =\n ((unsigned int)ch24 << 24) + ((unsigned int)ch16 << 16) +\n ((unsigned int)ch8 << 8) + ((unsigned int)ch);\n }\n }\n else\n {\n (*__errno_location ()) = 22;\n return 0;\n }\n break;\n default:\n (*__errno_location ()) = 22;\n return 0;\n }\n if (i < num_samples)\n {\n memset(sample_values + i, 0, (num_samples - i) * sizeof(unsigned int));\n return -1;\n }\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 12, "for_loop": 7, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 11}}, {"id": "optipng-0.7.8#png_prep#png_reset_zstream.c", "codebase": "optipng-0.7.8", "c_file": "png.c", "function": "png_reset_zstream", "sloc": "7", "c_code": "int\npng_reset_zstream(png_structrp png_ptr)\n{\n if (png_ptr == ((void *)0))\n return (-2);\n return (inflateReset(&png_ptr->zstream));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#GCD_ELEMENTS_GIVEN_RANGE_prep#main.c", "codebase": "transcoder-set", "c_file": "GCD_ELEMENTS_GIVEN_RANGE.c", "function": "main", "sloc": "15", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {57,22,17,74,93,56,5,5,9,98};\n int param1[] = {57,22,17,74,22,54,33,68,75,21};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "bc-1.07.1#util_prep#insert_id_rec.c", "codebase": "bc-1.07.1", "c_file": "util.c", "function": "insert_id_rec", "sloc": "111", "c_code": "int insert_id_rec (id_rec **root, id_rec *new_id)\n{\n id_rec *A, *B;\n if (*root == ((void *)0))\n {\n *root = new_id;\n new_id->left = ((void *)0);\n new_id->right = ((void *)0);\n new_id->balance = 0;\n return (1);\n }\n if (strcmp (new_id->id, (*root)->id) < 0)\n {\n if (insert_id_rec (&((*root)->left), new_id))\n {\n (*root)->balance --;\n switch ((*root)->balance)\n {\n case 0:\n return (0);\n case -1:\n return (1);\n case -2:\n A = *root;\n B = (*root)->left;\n if (B->balance <= 0)\n {\n A->left = B->right;\n B->right = A;\n *root = B;\n A->balance = 0;\n B->balance = 0;\n }\n else\n {\n *root = B->right;\n B->right = (*root)->left;\n A->left = (*root)->right;\n (*root)->left = B;\n (*root)->right = A;\n switch ((*root)->balance)\n {\n case -1:\n A->balance = 1;\n B->balance = 0;\n break;\n case 0:\n A->balance = 0;\n B->balance = 0;\n break;\n case 1:\n A->balance = 0;\n B->balance = -1;\n break;\n }\n (*root)->balance = 0;\n }\n }\n }\n }\n else\n {\n if (insert_id_rec (&((*root)->right), new_id))\n {\n (*root)->balance ++;\n switch ((*root)->balance)\n {\n case 0:\n return (0);\n case 1:\n return (1);\n case 2:\n A = *root;\n B = (*root)->right;\n if (B->balance >= 0)\n {\n A->right = B->left;\n B->left = A;\n *root = B;\n A->balance = 0;\n B->balance = 0;\n }\n else\n {\n *root = B->left;\n B->left = (*root)->right;\n A->right = (*root)->left;\n (*root)->left = A;\n (*root)->right = B;\n switch ((*root)->balance)\n {\n case -1:\n A->balance = 0;\n B->balance = 1;\n break;\n case 0:\n A->balance = 0;\n B->balance = 0;\n break;\n case 1:\n A->balance = -1;\n B->balance = 0;\n break;\n }\n (*root)->balance = 0;\n }\n }\n }\n }\n return (0);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 4, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 6}}, {"id": "wget-1.21.4#ftp-basic_prep#ftp_rest.c", "codebase": "wget-1.21.4", "c_file": "ftp-basic.c", "function": "ftp_rest", "sloc": "25", "c_code": "uerr_t\nftp_rest (int csock, wgint offset)\n{\n char *request, *respline;\n int nwritten;\n uerr_t err;\n request = ftp_request (\"REST\", number_to_static_string (offset));\n nwritten = fd_write (csock, request, strlen (request), -1);\n if (nwritten < 0)\n {\n do { free ((void *) (request)); request = ((void *)0); } while (0);\n return WRITEFAILED;\n }\n do { free ((void *) (request)); request = ((void *)0); } while (0);\n err = ftp_response (csock, &respline);\n if (err != FTPOK)\n return err;\n if (*respline != '3')\n {\n do { free ((void *) (respline)); respline = ((void *)0); } while (0);\n return FTPRESTFAIL;\n }\n do { free ((void *) (respline)); respline = ((void *)0); } while (0);\n return FTPOK;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 4, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 4, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "less-633#optfunc_prep#set_tabs.c", "codebase": "less-633", "c_file": "optfunc.c", "function": "set_tabs", "sloc": "27", "c_code": "void set_tabs(char *s, int len)\n{\n int i;\n char *es = s + len;\n for (i = 1; i < 128; )\n {\n int n = 0;\n int v = 0;\n while (s < es && *s == ' ')\n s++;\n for (; s < es && *s >= '0' && *s <= '9'; s++)\n {\n v |= help_ckd_mul(&n, n, 10, sizeof *(&n), ((1 ? 0 : *(&n)) - 1 < 0));\n v |= help_ckd_add(&n, n, *s - '0', sizeof *(&n), ((1 ? 0 : *(&n)) - 1 < 0));\n }\n if (!v && n > tabstops[i-1])\n tabstops[i++] = n;\n while (s < es && *s == ' ')\n s++;\n if (s == es || *s++ != ',')\n break;\n }\n if (i < 2)\n return;\n ntabstops = i;\n tabdefault = tabstops[ntabstops-1] - tabstops[ntabstops-2];\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 2, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY_prep#main.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {11,12,16,26,29,40,54,59,65,70,71,73,78,81,87,87,88,90,95,97};\nint param0_1[] = {-46,-32,54,96,-72,-58,-36,-44,26,-2,-68,42,90,26,-92,-96,88,-42,-18,46,-70,24,0,24,34,34,-52,50,94,-60,64,58};\nint param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};\nint param0_3[] = {48,2,79,98,28,17,41,47,61,76,82,5,74,4,80,51,22,45,91,75,91,93,42,45,69,98,76,74,83,17,30,88,53,25,35,19,26};\nint param0_4[] = {-88,-84,-82,-74,-44,-34,-32,-20,-20,-14,6,6,10,12,16,24,32,34,38,46,54,54,56,60,82,88,90,94,98};\nint param0_5[] = {0,1,1,1,1,0,1,1,1,1,1,1,1};\nint param0_6[] = {10,14,14,14,19,20,22,26,35,36,40,53,54,55,55,57,57,67,72,72,77,78,83,84,95,96};\nint param0_7[] = {-80,18,-76,48,-52,-38,52,-82,40,-44,-90,86,-86,-36,-32,-2,56,-12,-88,14,-16,8,52,24,46,56,84,-36,84,-60,72,-46,32,-16,-20,68,-86,-62,58,8,78,-52,22,-28,-22,-42,12,-48};\nint param0_8[] = {0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1};\nint param0_9[] = {20,94,36,2,50,62,84,50,66,75,1,18,41,48,72,61,86,22,54,6,71,46,92,68,59,51,89,31,58,78,82,84};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {11,22,33,20,24,7,16,30,14,25};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlGetDocEntity.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlGetDocEntity", "sloc": "14", "c_code": "PyObject *\nlibxml_xmlGetDocEntity(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlEntityPtr c_retval;\n xmlDoc * doc;\n PyObject *pyobj_doc;\n xmlChar * name;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Oz:xmlGetDocEntity\", &pyobj_doc, &name))\n return(((void *)0));\n doc = (xmlDoc *) (((pyobj_doc) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_doc))->obj));\n c_retval = xmlGetDocEntity(doc, name);\n py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_CIRCUMFERENCE_PARALLELOGRAM_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "PROGRAM_CIRCUMFERENCE_PARALLELOGRAM.c", "function": "f_filled", "sloc": "1", "c_code": "float f_filled ( float a, float b ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#di_prep#ti_di.c", "codebase": "tulipindicators-0.9.1", "c_file": "di.c", "function": "ti_di", "sloc": "40", "c_code": "int ti_di(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *high = inputs[0];\n const double *low = inputs[1];\n const double *close = inputs[2];\n const int period = (int)options[0];\n double *plus_di = outputs[0];\n double *minus_di = outputs[1];\n if (period < 1) return 1;\n if (size <= ti_di_start(options)) return 0;\n const double per = ((double)period-1) / ((double)period);\n double atr = 0;\n double dmup = 0;\n double dmdown = 0;\n int i;\n for (i = 1; i < period; ++i) {\n double truerange;\n do{ const double l = low[i]; const double h = high[i]; const double c = close[i-1]; const double ych = fabs(h - c); const double ycl = fabs(l - c); double v = h - l; if (ych > v) v = ych; if (ycl > v) v = ycl; truerange = v;}while(0);\n atr += truerange;\n double dp, dm;\n do { dp = high[i] - high[i-1]; dm = low[i-1] - low[i]; if (dp < 0) dp = 0; else if (dp > dm) dm = 0; if (dm < 0) dm = 0; else if (dm > dp) dp = 0;} while (0);\n dmup += dp;\n dmdown += dm;\n }\n *plus_di++ = 100.0 * dmup / atr;\n *minus_di++ = 100.0 * dmdown / atr;\n for (i = period; i < size; ++i) {\n double truerange;\n do{ const double l = low[i]; const double h = high[i]; const double c = close[i-1]; const double ych = fabs(h - c); const double ycl = fabs(l - c); double v = h - l; if (ych > v) v = ych; if (ycl > v) v = ycl; truerange = v;}while(0);\n atr = atr * per + truerange;\n double dp, dm;\n do { dp = high[i] - high[i-1]; dm = low[i-1] - low[i]; if (dp < 0) dp = 0; else if (dp > dm) dm = 0; if (dm < 0) dm = 0; else if (dm > dp) dp = 0;} while (0);\n dmup = dmup * per + dp;\n dmdown = dmdown * per + dm;\n *plus_di++ = 100.0 * dmup / atr;\n *minus_di++ = 100.0 * dmdown / atr;\n }\n ((void) sizeof ((plus_di - outputs[0] == size - ti_di_start(options)) ? 1 : 0), __extension__ ({ if (plus_di - outputs[0] == size - ti_di_start(options)) ; else __assert_fail (\"plus_di - outputs[0] == size - ti_di_start(options)\", \"indicators/di.c\", 88, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((minus_di - outputs[1] == size - ti_di_start(options)) ? 1 : 0), __extension__ ({ if (minus_di - outputs[1] == size - ti_di_start(options)) ; else __assert_fail (\"minus_di - outputs[1] == size - ti_di_start(options)\", \"indicators/di.c\", 89, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 5, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 8, "for_loop": 2, "while_loop": 4, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsSpacingModifierLetters.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsSpacingModifierLetters", "sloc": "4", "c_code": "int\nxmlUCSIsSpacingModifierLetters(int code) {\n return(((code >= 0x02B0) && (code <= 0x02FF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_equals_in_object_prep#json_get_string_size.c", "codebase": "json.h", "c_file": "allow_equals_in_object.c", "function": "json_get_string_size", "sloc": "126", "c_code": "int json_get_string_size(struct json_parse_state_s *state, size_t is_key) {\n size_t offset = state->offset;\n const size_t size = state->size;\n size_t data_size = 0;\n const char *const src = state->src;\n const int is_single_quote = '\\'' == src[offset];\n const char quote_to_use = is_single_quote ? '\\'' : '\"';\n const size_t flags_bitset = state->flags_bitset;\n unsigned long codepoint;\n unsigned long high_surrogate = 0;\n if ((json_parse_flags_allow_location_information & flags_bitset) != 0 &&\n is_key != 0) {\n state->dom_size += sizeof(struct json_string_ex_s);\n } else {\n state->dom_size += sizeof(struct json_string_s);\n }\n if ('\"' != src[offset]) {\n if (!((json_parse_flags_allow_single_quoted_strings & flags_bitset) &&\n is_single_quote)) {\n state->error = json_parse_error_expected_opening_quote;\n state->offset = offset;\n return 1;\n }\n }\n offset++;\n while ((offset < size) && (quote_to_use != src[offset])) {\n data_size++;\n switch (src[offset]) {\n default:\n break;\n case '\\0':\n case '\\t':\n state->error = json_parse_error_invalid_string;\n state->offset = offset;\n return 1;\n }\n if ('\\\\' == src[offset]) {\n offset++;\n if (offset == size) {\n state->error = json_parse_error_premature_end_of_buffer;\n state->offset = offset;\n return 1;\n }\n switch (src[offset]) {\n default:\n state->error = json_parse_error_invalid_string_escape_sequence;\n state->offset = offset;\n return 1;\n case '\"':\n case '\\\\':\n case '/':\n case 'b':\n case 'f':\n case 'n':\n case 'r':\n case 't':\n offset++;\n break;\n case 'u':\n if (!(offset + 5 < size)) {\n state->error = json_parse_error_invalid_string_escape_sequence;\n state->offset = offset;\n return 1;\n }\n codepoint = 0;\n if (!json_hexadecimal_value(&src[offset + 1], 4, &codepoint)) {\n state->error = json_parse_error_invalid_string_escape_sequence;\n state->offset = offset;\n return 1;\n }\n if (high_surrogate != 0) {\n if (codepoint >= 0xdc00 &&\n codepoint <= 0xdfff) {\n data_size += 3;\n high_surrogate = 0;\n } else {\n state->error = json_parse_error_invalid_string_escape_sequence;\n state->offset = offset;\n return 1;\n }\n } else if (codepoint <= 0x7f) {\n data_size += 0;\n } else if (codepoint <= 0x7ff) {\n data_size += 1;\n } else if (codepoint >= 0xd800 &&\n codepoint <= 0xdbff) {\n if (offset + 11 > size || '\\\\' != src[offset + 5] ||\n 'u' != src[offset + 6]) {\n state->error = json_parse_error_invalid_string_escape_sequence;\n state->offset = offset;\n return 1;\n }\n high_surrogate = codepoint;\n } else if (codepoint >= 0xd800 &&\n codepoint <= 0xdfff) {\n state->error = json_parse_error_invalid_string_escape_sequence;\n state->offset = offset;\n return 1;\n } else {\n data_size += 2;\n }\n offset += 5;\n break;\n }\n } else if (('\\r' == src[offset]) || ('\\n' == src[offset])) {\n if (!(json_parse_flags_allow_multi_line_strings & flags_bitset)) {\n state->error = json_parse_error_invalid_string_escape_sequence;\n state->offset = offset;\n return 1;\n }\n offset++;\n } else {\n offset++;\n }\n }\n if (offset == size) {\n state->error = json_parse_error_premature_end_of_buffer;\n state->offset = offset - 1;\n return 1;\n }\n offset++;\n state->data_size += data_size;\n state->data_size++;\n state->offset = offset;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 17, "for_loop": 0, "while_loop": 1, "switch_statement": 2, "goto_statement": 0, "return_statement": 12, "break_continue_statement": 3}}, {"id": "tmux#layout_prep#layout_spread_out.c", "codebase": "tmux", "c_file": "layout.c", "function": "layout_spread_out", "sloc": "16", "c_code": "void\nlayout_spread_out(struct window_pane *wp)\n{\n struct layout_cell *parent;\n struct window *w = wp->window;\n parent = wp->layout_cell->parent;\n if (parent == ((void *)0))\n return;\n do {\n if (layout_spread_cell(w, parent)) {\n layout_fix_offsets(parent);\n layout_fix_panes(w, w->sx, w->sy);\n break;\n }\n } while ((parent = parent->parent) != ((void *)0));\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS_1_prep#min.c", "codebase": "transcoder-set", "c_file": "TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cflow-1.7#parser_prep#skip_balanced.c", "codebase": "cflow-1.7", "c_file": "parser.c", "function": "skip_balanced", "sloc": "25", "c_code": "int\nskip_balanced(int open_tok, int close_tok, int level)\n{\n if (level == 0) {\n if (nexttoken() != open_tok) {\n return 1;\n }\n level++;\n }\n while (nexttoken()) {\n if (tok.type == LBRACE0 && open_tok == '{')\n tok.type = '{';\n else if (tok.type == RBRACE0 && close_tok == '}')\n tok.type = '}';\n if (tok.type == open_tok)\n level++;\n else if (tok.type == close_tok) {\n if (--level == 0) {\n nexttoken();\n return 0;\n }\n }\n }\n return -1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_STRING_FOLLOWS_ANBN_PATTERN_NOT_prep#min.c", "codebase": "transcoder-set", "c_file": "CHECK_STRING_FOLLOWS_ANBN_PATTERN_NOT.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#init_prep#wgetrc_user_file_name.c", "codebase": "wget-1.21.4", "c_file": "init.c", "function": "wgetrc_user_file_name", "sloc": "16", "c_code": "char *\nwgetrc_user_file_name (void)\n{\n char *file = ((void *)0);\n if (opt.homedir) {\n file = ajoin_dir_file(opt.homedir, \".wgetrc\");\n }\n if (!file)\n return ((void *)0);\n if (!file_exists_p (file, ((void *)0)))\n {\n do { free ((void *) (file)); file = ((void *)0); } while (0);\n return ((void *)0);\n }\n return file;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 1, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#CEILING_IN_A_SORTED_ARRAY_prep#len.c", "codebase": "transcoder-set", "c_file": "CEILING_IN_A_SORTED_ARRAY.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlstring_prep#xmlUTF8Strsub.c", "codebase": "libxml2", "c_file": "xmlstring.c", "function": "xmlUTF8Strsub", "sloc": "22", "c_code": "xmlChar *\nxmlUTF8Strsub(const xmlChar *utf, int start, int len) {\n int i;\n int ch;\n if (utf == ((void *)0)) return(((void *)0));\n if (start < 0) return(((void *)0));\n if (len < 0) return(((void *)0));\n for (i = 0; i < start; i++) {\n ch = *utf++;\n if (ch == 0)\n return(((void *)0));\n if (ch & 0x80) {\n ch <<= 1;\n while (ch & 0x80) {\n if (*utf++ == 0)\n return(((void *)0));\n ch <<= 1;\n }\n }\n }\n return(xmlUTF8Strndup(utf, len));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_prep#len.c", "codebase": "transcoder-set", "c_file": "COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_1.c", "function": "f_filled", "sloc": "1", "c_code": "_Bool f_filled ( unsigned int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "less-633#edit_prep#save_curr_ifile.c", "codebase": "less-633", "c_file": "edit.c", "function": "save_curr_ifile", "sloc": "6", "c_code": "void* save_curr_ifile(void)\n{\n if (curr_ifile != ((void*)((void *)0)))\n hold_ifile(curr_ifile, 1);\n return (curr_ifile);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#eax_prep#nettle_eax_set_key.c", "codebase": "nettle-3.9.1", "c_file": "eax.c", "function": "nettle_eax_set_key", "sloc": "9", "c_code": "void\nnettle_eax_set_key (struct eax_key *key, const void *cipher, nettle_cipher_func *f)\n{\n static const union nettle_block16 zero_block;\n f (cipher, 16, key->pad_block.b, zero_block.b);\n block16_mulx_be (&key->pad_block, &key->pad_block);\n block16_mulx_be (&key->pad_partial, &key->pad_block);\n block16_xor (&key->pad_partial, &key->pad_block);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 1, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_WHETHER_TRIANGLE_VALID_NOT_SIDES_GIVEN_prep#sort.c", "codebase": "transcoder-set", "c_file": "CHECK_WHETHER_TRIANGLE_VALID_NOT_SIDES_GIVEN.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#sdp_message_prep#sdp_message_clone.c", "codebase": "libosip2-5.3.1", "c_file": "sdp_message.c", "function": "sdp_message_clone", "sloc": "18", "c_code": "int sdp_message_clone(sdp_message_t *sdp, sdp_message_t **dest) {\n int i;\n char *body;\n i = sdp_message_init(dest);\n if (i != 0)\n return -1;\n i = sdp_message_to_str(sdp, &body);\n if (i != 0)\n goto error_sc1;\n i = sdp_message_parse(*dest, body);\n { if (body != ((void *)0)) { if (osip_free_func) osip_free_func(body); else free(body); } };\n if (i != 0)\n goto error_sc1;\n return 0;\nerror_sc1:\n sdp_message_free(*dest);\n return -1;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 2, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_MINIMUM_NUMBER_SUBSETS_SUBSEQUENCES_CONSECUTIVE_NUMBERS_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "COUNT_MINIMUM_NUMBER_SUBSETS_SUBSEQUENCES_CONSECUTIVE_NUMBERS.c", "function": "f_gold", "sloc": "10", "c_code": "int f_gold ( int arr [ ], int n ) {\n sort ( arr, arr + n );\n int count = 1;\n for ( int i = 0;\n i < n - 1;\n i ++ ) {\n if ( arr [ i ] + 1 != arr [ i + 1 ] ) count ++;\n }\n return count;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DETECT_IF_TWO_INTEGERS_HAVE_OPPOSITE_SIGNS_prep#sort.c", "codebase": "transcoder-set", "c_file": "DETECT_IF_TWO_INTEGERS_HAVE_OPPOSITE_SIGNS.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#winio_prep#convert_SS3_sequence.c", "codebase": "nano-7.2", "c_file": "winio.c", "function": "convert_SS3_sequence", "sloc": "116", "c_code": "int convert_SS3_sequence(const int *seq, size_t length, int *consumed)\n{\n switch (seq[0]) {\n case '1':\n if (length > 3 && seq[1] == ';') {\n *consumed = 4;\n switch (seq[2]) {\n case '2':\n if ('A' <= seq[3] && seq[3] <= 'D') {\n shift_held = 1;\n return arrow_from_ABCD(seq[3]);\n }\n break;\n case '5':\n switch (seq[3]) {\n case 'A':\n return 0x403;\n case 'B':\n return 0x404;\n case 'C':\n return 0x402;\n case 'D':\n return 0x401;\n }\n break;\n }\n }\n break;\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n if (length > 1) {\n *consumed = 2;\n if (seq[0] == '4' || seq[0] > '5')\n return 0x4FC;\n switch (seq[1]) {\n case 'A':\n return 0x403;\n case 'B':\n return 0x404;\n case 'C':\n return 0x402;\n case 'D':\n return 0x401;\n }\n return (seq[1] - 0x40);\n }\n break;\n case 'A':\n case 'B':\n case 'C':\n case 'D':\n return arrow_from_ABCD(seq[0]);\n case 'F':\n return 0550;\n case 'H':\n return 0406;\n case 'M':\n return 0527;\n case 'P':\n case 'Q':\n case 'R':\n case 'S':\n return (0410 +(seq[0] - 'O'));\n case 'T':\n case 'U':\n case 'V':\n case 'W':\n case 'X':\n case 'Y':\n return (0410 +(seq[0] - 'O'));\n case 'a':\n return 0x403;\n case 'b':\n return 0x404;\n case 'c':\n return 0x402;\n case 'd':\n return 0x401;\n case 'j':\n return '*';\n case 'k':\n return '+';\n case 'l':\n return ',';\n case 'm':\n return '-';\n case 'n':\n return 0512;\n case 'o':\n return '/';\n case 'p':\n return 0513;\n case 'q':\n return 0550;\n case 'r':\n return 0402;\n case 's':\n return 0522;\n case 't':\n return 0404;\n case 'v':\n return 0405;\n case 'w':\n return 0406;\n case 'x':\n return 0403;\n case 'y':\n return 0523;\n }\n return 0x4FC;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 4, "goto_statement": 0, "return_statement": 37, "break_continue_statement": 4}}, {"id": "units-2.22#units_prep#initializeunit.c", "codebase": "units-2.22", "c_file": "units.c", "function": "initializeunit", "sloc": "6", "c_code": "void\ninitializeunit(struct unittype *theunit)\n{\n theunit->factor = 1.0;\n theunit->numerator[0] = theunit->denominator[0] = ((void *)0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderGetParserLineNumber.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderGetParserLineNumber", "sloc": "9", "c_code": "int\nxmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader)\n{\n if ((reader == ((void *)0)) || (reader->ctxt == ((void *)0)) ||\n (reader->ctxt->input == ((void *)0))) {\n return (0);\n }\n return (reader->ctxt->input->line);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gzip-1.12#bits_prep#bi_reverse.c", "codebase": "gzip-1.12", "c_file": "bits.c", "function": "bi_reverse", "sloc": "11", "c_code": "unsigned bi_reverse(code, len)\n unsigned code;\n int len;\n{\n register unsigned res = 0;\n do {\n res |= code & 1;\n code >>= 1, res <<= 1;\n } while (--len > 0);\n return res >> 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#stream_prep#pwrite_pass_through.c", "codebase": "mtools-4.0.43", "c_file": "stream.c", "function": "pwrite_pass_through", "sloc": "5", "c_code": "ssize_t pwrite_pass_through(Stream_t *Stream, char *buf,\n mt_off_t start, size_t len)\n{\n return ((Stream->Next)->Class->pwrite)( (Stream->Next), (char *) (buf), (start), (len) );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "indent-2.2.13#output_prep#close_output.c", "codebase": "indent-2.2.13", "c_file": "output.c", "function": "close_output", "sloc": "25", "c_code": "extern void close_output(\n struct stat * file_stats,\n const char * filename)\n{\n if (output != stdout)\n {\n if (fclose(output) != 0)\n {\n fatal(gettext(\"Can't close output file %s\"), filename);\n }\n else\n {\n if (file_stats != ((void *)0) && filename)\n {\n struct utimbuf buf;\n buf.actime = time (((void *)0));\n buf.modtime = file_stats->st_mtim.tv_sec;\n if (utime(filename, &buf) != 0)\n {\n message(gettext(\"Warning\"), gettext(\"Can't preserve modification time on output file %s\"), (char *)(filename), (char *)(0));\n }\n }\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#symbol_prep#release_symbols.c", "codebase": "gawk-5.2.2", "c_file": "symbol.c", "function": "release_symbols", "sloc": "13", "c_code": "void\nrelease_symbols(NODE *symlist, int keep_globals)\n{\n NODE *p, *next;\n for (p = symlist->sub.nodep.r.rptr; p != ((void *)0); p = next) {\n if (! keep_globals) {\n destroy_symbol(p->sub.nodep.l.lptr);\n }\n next = p->sub.nodep.r.rptr;\n (void) (((struct block_item *) p)->freep = nextfree[BLOCK_NODE].freep, nextfree[BLOCK_NODE].freep = (struct block_item *) p);\n }\n symlist->sub.nodep.r.rptr = ((void *)0);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngrtran_prep#png_do_read_transformations.c", "codebase": "optipng-0.7.8", "c_file": "pngrtran.c", "function": "png_do_read_transformations", "sloc": "17", "c_code": "void\npng_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)\n{\n ((void)0);\n if (png_ptr->row_buf == ((void *)0))\n {\n png_error(png_ptr, \"NULL row buffer\");\n }\n if ((png_ptr->flags & 0x4000U) != 0 &&\n (png_ptr->flags & 0x0040U) == 0)\n {\n png_error(png_ptr, \"Uninitialized row\");\n }\n if (row_info->color_type == (2 | 1) &&\n png_ptr->num_palette_max >= 0)\n png_do_check_palette_indexes(png_ptr, row_info);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#ppo_prep#ti_ppo.c", "codebase": "tulipindicators-0.9.1", "c_file": "ppo.c", "function": "ti_ppo", "sloc": "23", "c_code": "int ti_ppo(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *input = inputs[0];\n double *ppo = outputs[0];\n const int short_period = (int)options[0];\n const int long_period = (int)options[1];\n if (short_period < 1) return 1;\n if (long_period < 2) return 1;\n if (long_period < short_period) return 1;\n if (size <= ti_ppo_start(options)) return 0;\n double short_per = 2 / ((double)short_period + 1);\n double long_per = 2 / ((double)long_period + 1);\n double short_ema = input[0];\n double long_ema = input[0];\n int i;\n for (i = 1; i < size; ++i) {\n short_ema = (input[i]-short_ema) * short_per + short_ema;\n long_ema = (input[i]-long_ema) * long_per + long_ema;\n const double out = 100.0 * (short_ema - long_ema) / long_ema;\n *ppo++ = out;\n }\n ((void) sizeof ((ppo - outputs[0] == size - ti_ppo_start(options)) ? 1 : 0), __extension__ ({ if (ppo - outputs[0] == size - ti_ppo_start(options)) ; else __assert_fail (\"ppo - outputs[0] == size - ti_ppo_start(options)\", \"indicators/ppo.c\", 63, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "transcoder-set#BIN_PACKING_PROBLEM_MINIMIZE_NUMBER_OF_USED_BINS_prep#len.c", "codebase": "transcoder-set", "c_file": "BIN_PACKING_PROBLEM_MINIMIZE_NUMBER_OF_USED_BINS.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#bop_prep#ti_bop.c", "codebase": "tulipindicators-0.9.1", "c_file": "bop.c", "function": "ti_bop", "sloc": "18", "c_code": "int ti_bop(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *open = inputs[0];\n const double *high = inputs[1];\n const double *low = inputs[2];\n const double *close = inputs[3];\n (void)options;\n double *output = outputs[0];\n int i;\n for (i = 0; i < size; ++i) {\n double hl = high[i] - low[i];\n if (hl <= 0.0) {\n output[i] = 0;\n } else {\n output[i] = (close[i] - open[i]) / hl;\n }\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 5, "array_type": 7, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_multi_line_strings_prep#json_write_pretty.c", "codebase": "json.h", "c_file": "allow_multi_line_strings.c", "function": "json_write_pretty", "sloc": "42", "c_code": "void *json_write_pretty(const struct json_value_s *value, const char *indent,\n const char *newline, size_t *out_size) {\n size_t size = 0;\n size_t indent_size = 0;\n size_t newline_size = 0;\n char *data = 0;\n char *data_end = 0;\n if (0 == value) {\n return 0;\n }\n if (0 == indent) {\n indent = \" \";\n }\n if (0 == newline) {\n newline = \"\\n\";\n }\n while ('\\0' != indent[indent_size]) {\n ++indent_size;\n }\n while ('\\0' != newline[newline_size]) {\n ++newline_size;\n }\n if (json_write_pretty_get_value_size(value, 0, indent_size, newline_size,\n &size)) {\n return 0;\n }\n size += 1;\n data = (char *)malloc(size);\n if (0 == data) {\n return 0;\n }\n data_end = json_write_pretty_value(value, 0, indent, newline, data);\n if (0 == data_end) {\n free(data);\n return 0;\n }\n *data_end = '\\0';\n if (0 != out_size) {\n *out_size = size;\n }\n return data;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 2, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 2, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#bc_supp_prep#Pl_BC_Start_Emit_0.c", "codebase": "gprolog-1.5.0", "c_file": "bc_supp.c", "function": "Pl_BC_Start_Emit_0", "sloc": "5", "c_code": "void\nPl_BC_Start_Emit_0(void)\n{\n bc_sp = bc;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_PAIRWISE_PRODUCTS_2_prep#main.c", "codebase": "transcoder-set", "c_file": "SUM_PAIRWISE_PRODUCTS_2.c", "function": "main", "sloc": "15", "c_code": "int main(void)\n{\n int n_success = 0;\n int param0[] = {57, 18, 97, 9, 42, 67, 71, 66, 69, 18};\n for (int i = 0; i < len(param0); ++i)\n {\n if (f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success += 1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libosip2-5.3.1#osip_dialog_prep#osip_dialog_update_osip_cseq_as_uas.c", "codebase": "libosip2-5.3.1", "c_file": "osip_dialog.c", "function": "osip_dialog_update_osip_cseq_as_uas", "sloc": "8", "c_code": "int osip_dialog_update_osip_cseq_as_uas(osip_dialog_t *dialog, osip_message_t *invite) {\n if (dialog == ((void *)0))\n return -2;\n if (invite == ((void *)0) || invite->cseq == ((void *)0) || invite->cseq->number == ((void *)0))\n return -2;\n dialog->remote_cseq = osip_atoi(invite->cseq->number);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsHiragana.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsHiragana", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsHiragana(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsHiragana\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsHiragana\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsHiragana(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#HOW_TO_BEGIN_WITH_COMPETITIVE_PROGRAMMING_prep#min.c", "codebase": "transcoder-set", "c_file": "HOW_TO_BEGIN_WITH_COMPETITIVE_PROGRAMMING.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#port_fifo_prep#osip_fifo_free.c", "codebase": "libosip2-5.3.1", "c_file": "port_fifo.c", "function": "osip_fifo_free", "sloc": "7", "c_code": "void osip_fifo_free(osip_fifo_t *ff) {\n if (ff == ((void *)0))\n return;\n osip_mutex_destroy(ff->qislocked);\n osip_sem_destroy(ff->qisempty);\n { if (ff != ((void *)0)) { if (osip_free_func) osip_free_func(ff); else free(ff); } };\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#files_prep#do_writeout.c", "codebase": "nano-7.2", "c_file": "files.c", "function": "do_writeout", "sloc": "5", "c_code": "void do_writeout(void)\n{\n if (write_it_out(0, 1) == 2)\n close_and_go();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#color_prep#found_in_list.c", "codebase": "nano-7.2", "c_file": "color.c", "function": "found_in_list", "sloc": "7", "c_code": "_Bool found_in_list(regexlisttype *head, const char *shibboleth)\n{\n for (regexlisttype *item = head; item != ((void *)0); item = item->next)\n if (regexec(item->one_rgx, shibboleth, 0, ((void *)0), 0) == 0)\n return 1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP_prep#len.c", "codebase": "transcoder-set", "c_file": "HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json-c#json_object_prep#json_object_object_length.c", "codebase": "json-c", "c_file": "json_object.c", "function": "json_object_object_length", "sloc": "5", "c_code": "int json_object_object_length(const struct json_object *jso)\n{\n ((void) sizeof ((json_object_get_type(jso) == json_type_object) ? 1 : 0), __extension__ ({ if (json_object_get_type(jso) == json_type_object) ; else __assert_fail (\"json_object_get_type(jso) == json_type_object\", \"/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/json-c/json_object.c\", 601, __extension__ __PRETTY_FUNCTION__); }));\n return lh_table_length(JC_OBJECT_C(jso)->c_object);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAKING_ELEMENTS_OF_TWO_ARRAYS_SAME_WITH_MINIMUM_INCREMENTDECREMENT_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "MAKING_ELEMENTS_OF_TWO_ARRAYS_SAME_WITH_MINIMUM_INCREMENTDECREMENT.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int a [ ], int b [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PRIMALITY_TEST_SET_1_INTRODUCTION_AND_SCHOOL_METHOD_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "PRIMALITY_TEST_SET_1_INTRODUCTION_AND_SCHOOL_METHOD_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "patch-2.7.6#verror_prep#verror_at_line.c", "codebase": "patch-2.7.6", "c_file": "verror.c", "function": "verror_at_line", "sloc": "19", "c_code": "void\nverror_at_line (int status, int errnum, const char *file,\n unsigned int line_number, const char *format, va_list args)\n{\n char *message = xvasprintf (format, args);\n if (message)\n {\n if (file)\n error_at_line (status, errnum, file, line_number, \"%s\", message);\n else\n error (status, errnum, \"%s\", message);\n }\n else\n {\n error (0, (*__errno_location ()), \"unable to display error message\");\n abort ();\n }\n free (message);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_PRODUCT_SUBSET_ARRAY_prep#sort.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_PRODUCT_SUBSET_ARRAY.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#misc_prep#blocking_read.c", "codebase": "tar-1.34", "c_file": "misc.c", "function": "blocking_read", "sloc": "13", "c_code": "size_t\nblocking_read (int fd, void *buf, size_t count)\n{\n size_t bytes = safe_read (fd, buf, count);\n if (bytes == ((size_t) -1) && (*__errno_location ()) == 11)\n {\n int flags = rpl_fcntl (fd, 3);\n if (0 <= flags && flags & 04000\n && rpl_fcntl (fd, 4, flags & ~04000) != -1)\n bytes = safe_read (fd, buf, count);\n }\n return bytes;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cpio-2.14#paxerror_prep#truncate_error.c", "codebase": "cpio-2.14", "c_file": "paxerror.c", "function": "truncate_error", "sloc": "5", "c_code": "void\ntruncate_error (char const *name)\n{\n call_arg_error (\"truncate\", name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "cflow-1.7#symbol_prep#delete_autos.c", "codebase": "cflow-1.7", "c_file": "symbol.c", "function": "delete_autos", "sloc": "6", "c_code": "void\ndelete_autos(int level)\n{\n linked_list_iterate(&auto_symbol_list, delete_level_autos, &level);\n linked_list_iterate(&static_symbol_list, delete_level_statics, &level);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#QUICK_WAY_CHECK_CHARACTERS_STRING_prep#main.c", "codebase": "transcoder-set", "c_file": "QUICK_WAY_CHECK_CHARACTERS_STRING.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n char param0[][100] = {\"\",\"ggg\",\"11\",\"KoYIHns\",\"232\",\"10111000011101\",\"DDDD\",\"11\",\"11111\",\"ewJvixQzu\"};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#AREA_OF_THE_CIRCLE_THAT_HAS_A_SQUARE_AND_A_CIRCLE_INSCRIBED_IN_IT_prep#main.c", "codebase": "transcoder-set", "c_file": "AREA_OF_THE_CIRCLE_THAT_HAS_A_SQUARE_AND_A_CIRCLE_INSCRIBED_IN_IT.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {669,18,83,39,68,28,71,14,21,73};\n for(int i = 0; i < len(param0); ++i)\n {\n if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001F)\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "mtools-4.0.43#strtonum_prep#strtou16.c", "codebase": "mtools-4.0.43", "c_file": "strtonum.c", "function": "strtou16", "sloc": "3", "c_code": "uint16_t strtou16(const char *nptr, char **endptr, int base) {\n return (uint16_t) strtoul_with_range(nptr, endptr, base, (65535));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNTS_PATHS_POINT_REACH_ORIGIN_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "COUNTS_PATHS_POINT_REACH_ORIGIN_1.c", "function": "f_gold", "sloc": "15", "c_code": "int f_gold ( int n, int m ) {\n int dp [ n + 1 ] [ m + 1 ];\n for ( int i = 0;\n i <= n;\n i ++ ) dp [ i ] [ 0 ] = 1;\n for ( int i = 0;\n i <= m;\n i ++ ) dp [ 0 ] [ i ] = 1;\n for ( int i = 1;\n i <= n;\n i ++ ) for ( int j = 1;\n j <= m;\n j ++ ) dp [ i ] [ j ] = dp [ i - 1 ] [ j ] + dp [ i ] [ j - 1 ];\n return dp [ n ] [ m ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 4, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CALCULATING_FACTORIALS_USING_STIRLING_APPROXIMATION_prep#main.c", "codebase": "transcoder-set", "c_file": "CALCULATING_FACTORIALS_USING_STIRLING_APPROXIMATION.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n double param0[] = {1.0,5.0,10.0,20.0,40.0,2.0,3.0,-1.0,4663.43115050185,-3722.039522409859};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#SEARCH_ALMOST_SORTED_ARRAY_prep#len.c", "codebase": "transcoder-set", "c_file": "SEARCH_ALMOST_SORTED_ARRAY.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_STEPS_TO_DELETE_A_STRING_AFTER_REPEATED_DELETION_OF_PALINDROME_SUBSTRINGS_prep#sort.c", "codebase": "transcoder-set", "c_file": "MINIMUM_STEPS_TO_DELETE_A_STRING_AFTER_REPEATED_DELETION_OF_PALINDROME_SUBSTRINGS.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#arctwo_prep#nettle_arctwo128_set_key_gutmann.c", "codebase": "nettle-3.9.1", "c_file": "arctwo.c", "function": "nettle_arctwo128_set_key_gutmann", "sloc": "6", "c_code": "void\nnettle_arctwo128_set_key_gutmann (struct arctwo_ctx *ctx,\n const uint8_t *key)\n{\n nettle_arctwo_set_key_ekb (ctx, 16, key, 1024);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "enscript-1.6.6#lex_prep#yyget_leng.c", "codebase": "enscript-1.6.6", "c_file": "lex.c", "function": "yyget_leng", "sloc": "4", "c_code": "int yyget_leng (void)\n{\n return yyleng;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#screen-write_prep#screen_write_scrollup.c", "codebase": "tmux", "c_file": "screen-write.c", "function": "screen_write_scrollup", "sloc": "20", "c_code": "void\nscreen_write_scrollup(struct screen_write_ctx *ctx, u_int lines, u_int bg)\n{\n struct screen *s = ctx->s;\n struct grid *gd = s->grid;\n u_int i;\n if (lines == 0)\n lines = 1;\n else if (lines > s->rlower - s->rupper + 1)\n lines = s->rlower - s->rupper + 1;\n if (bg != ctx->bg) {\n screen_write_collect_flush(ctx, 1);\n ctx->bg = bg;\n }\n for (i = 0; i < lines; i++) {\n grid_view_scroll_region_up(gd, s->rupper, s->rlower, bg);\n screen_write_collect_scroll(ctx);\n }\n ctx->scrolled += lines;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#modelu_prep#GetVarValue.c", "codebase": "mcsim-6.2.0", "c_file": "modelu.c", "function": "GetVarValue", "sloc": "23", "c_code": "double GetVarValue (HVAR hvar)\n{\n double dReturn = 0.0;\n switch (GetVarType(hvar)) {\n case 0x20000:\n dReturn = vrgInputs[((int) ((hvar) & 0x0FFFF))].dVal;\n break;\n case 0x30000:\n case 0x10000:\n dReturn = vrgModelVars[((int) ((hvar) & 0x0FFFF))];\n break;\n case 0x40000:\n {\n PVMMAPSTRCT pvm;\n pvm = &vrgvmGlo[((int) ((hvar) & 0x0FFFF))];\n dReturn = *(PDOUBLE) pvm->pVar;\n break;\n }\n default:\n break;\n }\n return (dReturn);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 4}}, {"id": "less-633#pattern_prep#is_null_pattern.c", "codebase": "less-633", "c_file": "pattern.c", "function": "is_null_pattern", "sloc": "4", "c_code": "int is_null_pattern(regex_t * pattern)\n{\n return (pattern == ((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#modd_prep#GetVarPTR.c", "codebase": "mcsim-6.2.0", "c_file": "modd.c", "function": "GetVarPTR", "sloc": "6", "c_code": "PVMMAPSTRCT GetVarPTR (PVMMAPSTRCT pvm, PSTR szName)\n{\n while (pvm && strcmp (szName, pvm->szName))\n pvm = pvm->pvmNextVar;\n return (pvm);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cflow-1.7#getprogname_prep#getprogname.c", "codebase": "cflow-1.7", "c_file": "getprogname.c", "function": "getprogname", "sloc": "5", "c_code": "char const *\ngetprogname (void)\n{\n return program_invocation_short_name;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES_2_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES_2.c", "function": "f_gold", "sloc": "7", "c_code": "int f_gold ( int ar [ ], int ar_size ) {\n int res = 0;\n for ( int i = 0;\n i < ar_size;\n i ++ ) res = res ^ ar [ i ];\n return res;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_from_prep#osip_from_clone.c", "codebase": "libosip2-5.3.1", "c_file": "osip_from.c", "function": "osip_from_clone", "sloc": "31", "c_code": "int osip_from_clone(const osip_from_t *from, osip_from_t **dest) {\n int i;\n osip_from_t *fr;\n *dest = ((void *)0);\n if (from == ((void *)0))\n return -2;\n i = osip_from_init(&fr);\n if (i != 0)\n return i;\n if (from->displayname != ((void *)0)) {\n fr->displayname = osip_strdup(from->displayname);\n if (fr->displayname == ((void *)0)) {\n osip_from_free(fr);\n return -4;\n }\n }\n if (from->url != ((void *)0)) {\n i = osip_uri_clone(from->url, &(fr->url));\n if (i != 0) {\n osip_from_free(fr);\n return i;\n }\n }\n i = osip_list_clone(&from->gen_params, &fr->gen_params, (int (*)(void *, void **)) & osip_uri_param_clone);\n if (i != 0) {\n osip_from_free(fr);\n return i;\n }\n *dest = fr;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_GIVEN_STRING_ROTATION_PALINDROME_prep#main.c", "codebase": "transcoder-set", "c_file": "CHECK_GIVEN_STRING_ROTATION_PALINDROME.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n char param0[][100] = {\"aadaa\",\"2674377254\",\"11\",\"0011000\",\"26382426486138\",\"111010111010\",\"abccba\",\"5191\",\"1110101101\",\"abcdecbe\"};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "nano-7.2#move_prep#to_prev_word.c", "codebase": "nano-7.2", "c_file": "move.c", "function": "to_prev_word", "sloc": "6", "c_code": "void to_prev_word(void)\n{\n linestruct *was_current = openfile->current;\n do_prev_word();\n edit_redraw(was_current, FLOWING);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#stream_c_prep#Pl_Set_Debugger_Streams_2.c", "codebase": "gprolog-1.5.0", "c_file": "stream_c.c", "function": "Pl_Set_Debugger_Streams_2", "sloc": "8", "c_code": "void\nPl_Set_Debugger_Streams_2(WamWord sora_in_word, WamWord sora_out_word)\n{\n pl_stm_debugger_input = Pl_Get_Stream_Or_Alias(sora_in_word, 2);\n pl_stm_debugger_output = Pl_Get_Stream_Or_Alias(sora_out_word, 3);\n Pl_Reassign_Alias(pl_atom_debugger_input, pl_stm_debugger_input);\n Pl_Reassign_Alias(pl_atom_debugger_output, pl_stm_debugger_output);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "heman#ops_prep#heman_ops_max.c", "codebase": "heman", "c_file": "ops.c", "function": "heman_ops_max", "sloc": "16", "c_code": "heman_image* heman_ops_max(heman_image* imga, heman_image* imgb)\n{\n ((void) sizeof ((imga->width == imgb->width) ? 1 : 0), __extension__ ({ if (imga->width == imgb->width) ; else __assert_fail (\"imga->width == imgb->width\", \"/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/heman/src/ops.c\", 30, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((imga->height == imgb->height) ? 1 : 0), __extension__ ({ if (imga->height == imgb->height) ; else __assert_fail (\"imga->height == imgb->height\", \"/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/heman/src/ops.c\", 31, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((imga->nbands == imgb->nbands) ? 1 : 0), __extension__ ({ if (imga->nbands == imgb->nbands) ; else __assert_fail (\"imga->nbands == imgb->nbands\", \"/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/heman/src/ops.c\", 32, __extension__ __PRETTY_FUNCTION__); }));\n heman_image* result =\n heman_image_create(imga->width, imga->height, imga->nbands);\n int size = imga->height * imga->width * imga->nbands;\n float* srca = imga->data;\n float* srcb = imgb->data;\n float* dst = result->data;\n for (int i = 0; i < size; ++i, ++dst, ++srca, ++srcb) {\n *dst = (*srca > *srcb ? *srca : *srcb);\n }\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bc-1.07.1#main_prep#new_yy_file.c", "codebase": "bc-1.07.1", "c_file": "main.c", "function": "new_yy_file", "sloc": "7", "c_code": "void\nnew_yy_file (FILE *file)\n{\n if (!first_file) fclose (yyin);\n yyin = file;\n first_file = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#mainloop_prep#init_mp.c", "codebase": "mtools-4.0.43", "c_file": "mainloop.c", "function": "init_mp", "sloc": "15", "c_code": "void init_mp(MainParam_t *mp)\n{\n fix_mcwd(mp->mcwd);\n mp->openflags = 00;\n mp->lookupflags = 0;\n mp->targetName = 0;\n mp->targetDir = 0;\n mp->dirCallback = dispatchToFile;\n mp->unixcallback = ((void *)0);\n mp->shortname.data = mp->longname.data = 0;\n mp->shortname.len = mp->longname.len = 0;\n mp->File = 0;\n mp->fast_quit = 0;\n mp->originalArg = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "cpio-2.14#paxerror_prep#seek_warn_details.c", "codebase": "cpio-2.14", "c_file": "paxerror.c", "function": "seek_warn_details", "sloc": "7", "c_code": "void\nseek_warn_details (char const *name, off_t offset)\n{\n intmax_t off = offset;\n int e = (*__errno_location ());\n do { if (error_hook) error_hook (); error (0, e, gettext (\"%s: Warning: Cannot seek to %jd\"), quotearg_colon (name), off); } while (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#devices_prep#send_one_cmd.c", "codebase": "mtools-4.0.43", "c_file": "devices.c", "function": "send_one_cmd", "sloc": "26", "c_code": "int send_one_cmd(int fd, RawRequest_t *raw_cmd, const char *message)\n{\n if (ioctl( fd, (((0U) << (((0 +8)+8)+14)) | (((2)) << (0 +8)) | (((0x58)) << 0) | ((0) << ((0 +8)+8))), raw_cmd) >= 0) {\n if (raw_cmd->reply_count < 7) {\n fprintf(stderr,\"Short reply from FDC\\n\");\n return -1;\n }\n return 0;\n }\n switch((*__errno_location ())) {\n case 16:\n fprintf(stderr, \"FDC busy, sleeping for a second\\n\");\n sleep(1);\n return 1;\n case 5:\n fprintf(stderr,\"resetting controller\\n\");\n if(ioctl(fd, (((0U) << (((0 +8)+8)+14)) | (((2)) << (0 +8)) | (((0x54)) << 0) | ((0) << ((0 +8)+8))), 2) < 0){\n perror(\"reset\");\n return -1;\n }\n return 1;\n default:\n perror(message);\n return -1;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 0}}, {"id": "tinycc#tccgen_prep#tcc_debug_funcstart.c", "codebase": "tinycc", "c_file": "tccgen.c", "function": "tcc_debug_funcstart", "sloc": "13", "c_code": "void tcc_debug_funcstart(TCCState *s1, Sym *sym)\n{\n char buf[512];\n if (!s1->do_debug)\n return;\n snprintf(buf, sizeof(buf), \"%s:%c1\",\n funcname, sym->type.t & 0x00002000 ? 'f' : 'F');\n put_stabs_r(buf, N_FUN, 0, file->line_num, 0,\n cur_text_section, sym->c);\n put_stabn(N_SLINE, 0, file->line_num, 0);\n last_ind = 0;\n last_line_num = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COMPUTE_MODULUS_DIVISION_BY_A_POWER_OF_2_NUMBER_prep#min.c", "codebase": "transcoder-set", "c_file": "COMPUTE_MODULUS_DIVISION_BY_A_POWER_OF_2_NUMBER.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#SAX2_prep#xmlSAX2SetDocumentLocator.c", "codebase": "libxml2", "c_file": "SAX2.c", "function": "xmlSAX2SetDocumentLocator", "sloc": "4", "c_code": "void\nxmlSAX2SetDocumentLocator(void *ctx __attribute__((unused)), xmlSAXLocatorPtr loc __attribute__((unused)))\n{\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tinycc#tccpp_prep#tok_str_add_tok.c", "codebase": "tinycc", "c_file": "tccpp.c", "function": "tok_str_add_tok", "sloc": "10", "c_code": "void tok_str_add_tok(TokenString *s)\n{\n CValue cval;\n if (file->line_num != s->last_line_num) {\n s->last_line_num = file->line_num;\n cval.i = s->last_line_num;\n tok_str_add2(s, 0xc0, &cval);\n }\n tok_str_add2(s, tok, &tokc);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#pattern_prep#xmlFreeStreamCtxt.c", "codebase": "libxml2", "c_file": "pattern.c", "function": "xmlFreeStreamCtxt", "sloc": "11", "c_code": "void\nxmlFreeStreamCtxt(xmlStreamCtxtPtr stream) {\n xmlStreamCtxtPtr next;\n while (stream != ((void *)0)) {\n next = stream->next;\n if (stream->states != ((void *)0))\n xmlFree(stream->states);\n xmlFree(stream);\n stream = next;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#cmd_prep#cmd_print.c", "codebase": "tmux", "c_file": "cmd.c", "function": "cmd_print", "sloc": "12", "c_code": "char *\ncmd_print(struct cmd *cmd)\n{\n char *out, *s;\n s = args_print(cmd->args);\n if (*s != '\\0')\n xasprintf(&out, \"%s %s\", cmd->entry->name, s);\n else\n out = xstrdup(cmd->entry->name);\n free(s);\n return (out);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "lil#lil_prep#lil_get_var_or.c", "codebase": "lil", "c_file": "lil.c", "function": "lil_get_var_or", "sloc": "12", "c_code": "lil_value_t lil_get_var_or(lil_t lil, const char* name, lil_value_t defvalue)\n{\n lil_var_t var = lil_find_var(lil, lil->env, name);\n lil_value_t retval = var ? var->v : defvalue;\n if (lil->callback[7] && (!var || var->env == lil->rootenv)) {\n lil_getvar_callback_proc_t proc = (lil_getvar_callback_proc_t)lil->callback[7];\n lil_value_t newretval = retval;\n if (proc(lil, name, &newretval))\n retval = newretval;\n }\n return retval;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderHasValue.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderHasValue", "sloc": "24", "c_code": "int\nxmlTextReaderHasValue(xmlTextReaderPtr reader) {\n xmlNodePtr node;\n if (reader == ((void *)0))\n return(-1);\n if (reader->node == ((void *)0))\n return(0);\n if (reader->curnode != ((void *)0))\n node = reader->curnode;\n else\n node = reader->node;\n switch (node->type) {\n case XML_ATTRIBUTE_NODE:\n case XML_TEXT_NODE:\n case XML_CDATA_SECTION_NODE:\n case XML_PI_NODE:\n case XML_COMMENT_NODE:\n case XML_NAMESPACE_DECL:\n return(1);\n default:\n break;\n }\n return(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 1}}, {"id": "wget-1.21.4#ptimer_prep#ptimer_measure.c", "codebase": "wget-1.21.4", "c_file": "ptimer.c", "function": "ptimer_measure", "sloc": "16", "c_code": "double\nptimer_measure (struct ptimer *pt)\n{\n ptimer_system_time now;\n double elapsed;\n posix_measure (&now);\n elapsed = pt->elapsed_pre_start + posix_diff (&now, &pt->start);\n if (elapsed < pt->elapsed_last)\n {\n pt->start = now;\n pt->elapsed_pre_start = pt->elapsed_last;\n elapsed = pt->elapsed_last;\n }\n pt->elapsed_last = elapsed;\n return elapsed;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#nict_prep#osip_nict_set_destination.c", "codebase": "libosip2-5.3.1", "c_file": "nict.c", "function": "osip_nict_set_destination", "sloc": "9", "c_code": "int osip_nict_set_destination(osip_nict_t *nict, char *destination, int port) {\n if (nict == ((void *)0))\n return -2;\n if (nict->destination != ((void *)0))\n { if (nict->destination != ((void *)0)) { if (osip_free_func) osip_free_func(nict->destination); else free(nict->destination); } };\n nict->destination = destination;\n nict->port = port;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 1, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "bc-1.07.1#scan_prep#yyalloc.c", "codebase": "bc-1.07.1", "c_file": "scan.c", "function": "yyalloc", "sloc": "4", "c_code": "void *yyalloc (yy_size_t size )\n{\n return (void *) malloc( size );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#N_TH_TERM_SERIES_2_12_36_80_150_prep#len.c", "codebase": "transcoder-set", "c_file": "N_TH_TERM_SERIES_2_12_36_80_150.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#server_prep#server_is_marked.c", "codebase": "tmux", "c_file": "server.c", "function": "server_is_marked", "sloc": "11", "c_code": "int\nserver_is_marked(struct session *s, struct winlink *wl, struct window_pane *wp)\n{\n if (s == ((void *)0) || wl == ((void *)0) || wp == ((void *)0))\n return (0);\n if (marked_pane.s != s || marked_pane.wl != wl)\n return (0);\n if (marked_pane.wp != wp)\n return (0);\n return (server_check_marked());\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathNewFloat.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathNewFloat", "sloc": "11", "c_code": "xmlXPathObjectPtr\nxmlXPathNewFloat(double val) {\n xmlXPathObjectPtr ret;\n ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));\n if (ret == ((void *)0))\n return(((void *)0));\n memset(ret, 0 , sizeof(xmlXPathObject));\n ret->type = XPATH_NUMBER;\n ret->floatval = val;\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_equals_in_object_prep#json_write_minified.c", "codebase": "json.h", "c_file": "allow_equals_in_object.c", "function": "json_write_minified", "sloc": "26", "c_code": "void *json_write_minified(const struct json_value_s *value, size_t *out_size) {\n size_t size = 0;\n char *data = 0;\n char *data_end = 0;\n if (0 == value) {\n return 0;\n }\n if (json_write_minified_get_value_size(value, &size)) {\n return 0;\n }\n size += 1;\n data = (char *)malloc(size);\n if (0 == data) {\n return 0;\n }\n data_end = json_write_minified_value(value, data);\n if (0 == data_end) {\n free(data);\n return 0;\n }\n *data_end = '\\0';\n if (0 != out_size) {\n *out_size = size;\n }\n return data;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 2, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "less-633#ifile_prep#get_altpipe.c", "codebase": "less-633", "c_file": "ifile.c", "function": "get_altpipe", "sloc": "4", "c_code": "void *get_altpipe(void* ifile)\n{\n return (((struct ifile *)(ifile))->h_altpipe);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#awkgram_prep#make_regnode.c", "codebase": "gawk-5.2.2", "c_file": "awkgram.c", "function": "make_regnode", "sloc": "20", "c_code": "NODE *\nmake_regnode(NODETYPE type, NODE *exp)\n{\n NODE *n;\n ((void) (0));\n (void) ((n = (NODE *) nextfree[BLOCK_NODE].freep) ? (NODE *) (nextfree[BLOCK_NODE].freep = ((struct block_item *) n)->freep) : (n = (NODE *) more_blocks(BLOCK_NODE)));\n memset(n, 0, sizeof(NODE));\n n->type = type;\n n->flags = 1;\n if (type == Node_regex) {\n n->sub.nodep.r.preg[0] = make_regexp(exp->sub.val.sp, exp->sub.val.slen, 0, 1, 0);\n if (n->sub.nodep.r.preg[0] == ((void *)0)) {\n (void) (((struct block_item *) n)->freep = nextfree[BLOCK_NODE].freep, nextfree[BLOCK_NODE].freep = (struct block_item *) n);\n return ((void *)0);\n }\n n->sub.nodep.x.extra = exp;\n n->sub.nodep.reflags = CONSTANT;\n }\n return n;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 1, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "heman#quaternion_prep#kmQuaternionSubtract.c", "codebase": "heman", "c_file": "quaternion.c", "function": "kmQuaternionSubtract", "sloc": "7", "c_code": "kmQuaternion* kmQuaternionSubtract(kmQuaternion* pOut, const kmQuaternion* pQ1, const kmQuaternion* pQ2) {\n pOut->x = pQ1->x - pQ2->x;\n pOut->y = pQ1->y - pQ2->y;\n pOut->z = pQ1->z - pQ2->z;\n pOut->w = pQ1->w - pQ2->w;\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cpio-2.14#util_prep#fchown_or_chown.c", "codebase": "cpio-2.14", "c_file": "util.c", "function": "fchown_or_chown", "sloc": "8", "c_code": "int\nfchown_or_chown (int fd, const char *name, uid_t uid, uid_t gid)\n{\n if (1 && fd != -1)\n return fchown (fd, uid, gid);\n else\n return chown (name, uid, gid);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_hma.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_hma", "sloc": "54", "c_code": "int ti_hma(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *input = inputs[0];\n const int period = (int)options[0];\n double *output = outputs[0];\n if (period < 1) return 1;\n if (size <= ti_hma_start(options)) return 0;\n const int period2 = (int)(period / 2);\n const int periodsqrt = (int)(sqrt(period));\n const double weights = period * (period+1) / 2;\n const double weights2 = period2 * (period2+1) / 2;\n const double weightssqrt = periodsqrt * (periodsqrt+1) / 2;\n double sum = 0;\n double weight_sum = 0;\n double sum2 = 0;\n double weight_sum2 = 0;\n double sumsqrt = 0;\n double weight_sumsqrt = 0;\n int i;\n for (i = 0; i < period-1; ++i) {\n weight_sum += input[i] * (i+1);\n sum += input[i];\n if (i >= period - period2) {\n weight_sum2 += input[i] * (i+1-(period-period2));\n sum2 += input[i];\n }\n }\n ti_buffer *buff = ti_buffer_new(periodsqrt);\n for (i = period-1; i < size; ++i) {\n weight_sum += input[i] * period;\n sum += input[i];\n weight_sum2 += input[i] * period2;\n sum2 += input[i];\n const double wma = weight_sum / weights;\n const double wma2 = weight_sum2 / weights2;\n const double diff = 2 * wma2 - wma;\n weight_sumsqrt += diff * periodsqrt;\n sumsqrt += diff;\n do { (buff)->vals[(buff)->index] = (diff); (buff)->index = ((buff)->index + 1); if ((buff)->index >= (buff)->size) (buff)->index = 0; } while (0);\n if (i >= (period-1) + (periodsqrt-1)) {\n *output++ = weight_sumsqrt / weightssqrt;\n weight_sumsqrt -= sumsqrt;\n sumsqrt -= ((buff)->vals[((buff)->index + (buff)->size - 1 + (1)) % (buff)->size]);\n } else {\n weight_sumsqrt -= sumsqrt;\n }\n weight_sum -= sum;\n sum -= input[i-period+1];\n weight_sum2 -= sum2;\n sum2 -= input[i-period2+1];\n }\n ti_buffer_free(buff);\n ((void) sizeof ((output - outputs[0] == size - ti_hma_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_hma_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_hma_start(options)\", \"tiamalgamation.c\", 2592, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 2, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#debug_prep#do_save.c", "codebase": "gawk-5.2.2", "c_file": "debug.c", "function": "do_save", "sloc": "25", "c_code": "int\ndo_save(CMDARG *arg, int cmd __attribute__ ((__unused__)))\n{\n FILE *fp;\n HIST_ENTRY **hist_list;\n int i;\n if ((fp = fopen(arg->value.sval, \"w\")) == ((void *)0)) {\n d_error(gettext(\"could not open `%s' for writing: %s\"),\n arg->value.sval, strerror((*__errno_location ())));\n return 0;\n }\n hist_list = history_list();\n if (hist_list && history_length > sess_history_base) {\n for (i = sess_history_base; hist_list[i] != ((void *)0); i++) {\n char *line;\n line = hist_list[i]->line;\n if (strlen(line) > 1\n && strncmp(line, \"sa\", 2) == 0)\n continue;\n fprintf(fp, \"%s\\n\", line);\n }\n }\n fclose(fp);\n return 0;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 1}}, {"id": "optipng-0.7.8#deflate_prep#deflateInit_.c", "codebase": "optipng-0.7.8", "c_file": "deflate.c", "function": "deflateInit_", "sloc": "5", "c_code": "int deflateInit_(z_streamp strm, int level, const char *version,\n int stream_size) {\n return deflateInit2_(strm, level, 8, 15, 8,\n 0, version, stream_size);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_single_quoted_strings_prep#json_parse_object.c", "codebase": "json.h", "c_file": "allow_single_quoted_strings.c", "function": "json_parse_object", "sloc": "89", "c_code": "void json_parse_object(struct json_parse_state_s *state, int is_global_object,\n struct json_object_s *object) {\n const size_t flags_bitset = state->flags_bitset;\n const size_t size = state->size;\n const char *const src = state->src;\n size_t elements = 0;\n int allow_comma = 0;\n struct json_object_element_s *previous = 0;\n if (is_global_object) {\n if ('{' == src[state->offset]) {\n is_global_object = 0;\n }\n }\n if (!is_global_object) {\n state->offset++;\n }\n (void)json_skip_all_skippables(state);\n elements = 0;\n while (state->offset < size) {\n struct json_object_element_s *element = 0;\n struct json_string_s *string = 0;\n struct json_value_s *value = 0;\n if (!is_global_object) {\n (void)json_skip_all_skippables(state);\n if ('}' == src[state->offset]) {\n state->offset++;\n break;\n }\n } else {\n if (json_skip_all_skippables(state)) {\n break;\n }\n }\n if (allow_comma) {\n if (',' == src[state->offset]) {\n state->offset++;\n allow_comma = 0;\n continue;\n }\n }\n element = (struct json_object_element_s *)state->dom;\n state->dom += sizeof(struct json_object_element_s);\n if (0 == previous) {\n object->start = element;\n } else {\n previous->next = element;\n }\n previous = element;\n if (json_parse_flags_allow_location_information & flags_bitset) {\n struct json_string_ex_s *string_ex =\n (struct json_string_ex_s *)state->dom;\n state->dom += sizeof(struct json_string_ex_s);\n string_ex->offset = state->offset;\n string_ex->line_no = state->line_no;\n string_ex->row_no = state->offset - state->line_offset;\n string = &(string_ex->string);\n } else {\n string = (struct json_string_s *)state->dom;\n state->dom += sizeof(struct json_string_s);\n }\n element->name = string;\n (void)json_parse_key(state, string);\n (void)json_skip_all_skippables(state);\n state->offset++;\n (void)json_skip_all_skippables(state);\n if (json_parse_flags_allow_location_information & flags_bitset) {\n struct json_value_ex_s *value_ex = (struct json_value_ex_s *)state->dom;\n state->dom += sizeof(struct json_value_ex_s);\n value_ex->offset = state->offset;\n value_ex->line_no = state->line_no;\n value_ex->row_no = state->offset - state->line_offset;\n value = &(value_ex->value);\n } else {\n value = (struct json_value_s *)state->dom;\n state->dom += sizeof(struct json_value_s);\n }\n element->value = value;\n json_parse_value(state, 0, value);\n elements++;\n allow_comma = 1;\n }\n if (previous) {\n previous->next = 0;\n }\n if (0 == elements) {\n object->start = 0;\n }\n object->length = elements;\n}\n", "c_constructs": {"pointer_type": 6, "array_type": 0, "struct_type": 8, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 15, "memory_management": 0, "memory_operation": 0, "if_statement": 13, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 3}}, {"id": "libxml2#xmlsave_prep#xmlNodeDumpOutput.c", "codebase": "libxml2", "c_file": "xmlsave.c", "function": "xmlNodeDumpOutput", "sloc": "36", "c_code": "void\nxmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,\n int level, int format, const char *encoding)\n{\n xmlSaveCtxt ctxt;\n int options;\n xmlDtdPtr dtd;\n int is_xhtml = 0;\n (void) doc;\n xmlInitParser();\n if ((buf == ((void *)0)) || (cur == ((void *)0))) return;\n if (level < 0)\n level = 0;\n else if (level > 100)\n level = 100;\n if (encoding == ((void *)0))\n encoding = \"UTF-8\";\n memset(&ctxt, 0, sizeof(ctxt));\n ctxt.buf = buf;\n ctxt.level = level;\n ctxt.encoding = (const xmlChar *) encoding;\n options = XML_SAVE_AS_XML;\n if (format)\n options |= XML_SAVE_FORMAT;\n xmlSaveCtxtInit(&ctxt, options);\n dtd = xmlGetIntSubset(doc);\n if (dtd != ((void *)0)) {\n is_xhtml = xmlIsXHTML(dtd->SystemID, dtd->ExternalID);\n if (is_xhtml < 0)\n is_xhtml = 0;\n }\n if (is_xhtml)\n xhtmlNodeDumpOutput(&ctxt, cur);\n else\n xmlNodeDumpOutputInternal(&ctxt, cur);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 1, "if_statement": 8, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE_1_prep#min.c", "codebase": "transcoder-set", "c_file": "PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json-c#json_object_prep#json_object_array_shrink.c", "codebase": "json-c", "c_file": "json_object.c", "function": "json_object_array_shrink", "sloc": "6", "c_code": "int json_object_array_shrink(struct json_object *jso, int empty_slots)\n{\n if (empty_slots < 0)\n json_abort(\"json_object_array_shrink called with negative empty_slots\");\n return array_list_shrink(JC_ARRAY(jso)->c_array, empty_slots);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_htmlNewDoc.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_htmlNewDoc", "sloc": "12", "c_code": "PyObject *\nlibxml_htmlNewDoc(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n htmlDocPtr c_retval;\n xmlChar * URI;\n xmlChar * ExternalID;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"zz:htmlNewDoc\", &URI, &ExternalID))\n return(((void *)0));\n c_retval = htmlNewDoc(URI, ExternalID);\n py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#layer_prep#LCDisplayLineWrap.c", "codebase": "screen-4.9.0", "c_file": "layer.c", "function": "LCDisplayLineWrap", "sloc": "13", "c_code": "void LCDisplayLineWrap(struct layer *l, struct mline *ml, int y, int from, int to, int isblank)\n{\n struct mchar nc;\n do { (&nc)->image = (ml)->image[0]; (&nc)->attr = (ml)->attr[0]; (&nc)->font = (ml)->font[0]; (&nc)->fontx = (ml)->fontx[0]; (&nc)->color = (ml)->color[0]; (&nc)->mbcs = 0; } while (0);\n if (((l->l_encoding == 8) ? (unsigned char)(ml)->font[(0) + 1] == 0xff && (unsigned char)(ml)->image[(0) + 1] == 0xff : ((unsigned char)(ml)->font[0] & 0x1f) != 0 && ((unsigned char)(ml)->font[0] & 0xe0) == 0 )) {\n nc.mbcs = ml->image[1];\n from++;\n }\n LWrapChar(l, &nc, y - 1, -1, -1, 0);\n from++;\n if (from <= to)\n LCDisplayLine(l, ml, y, from, to, isblank);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 5, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_htmlSetMetaEncoding.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_htmlSetMetaEncoding", "sloc": "14", "c_code": "PyObject *\nlibxml_htmlSetMetaEncoding(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n htmlDocPtr doc;\n PyObject *pyobj_doc;\n xmlChar * encoding;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Oz:htmlSetMetaEncoding\", &pyobj_doc, &encoding))\n return(((void *)0));\n doc = (htmlDocPtr) (((pyobj_doc) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_doc))->obj));\n c_retval = htmlSetMetaEncoding(doc, encoding);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#xmlwriter_prep#xmlTextWriterWriteFormatCDATA.c", "codebase": "libxml2", "c_file": "xmlwriter.c", "function": "xmlTextWriterWriteFormatCDATA", "sloc": "11", "c_code": "int\nxmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer, const char *format,\n ...)\n{\n int rc;\n va_list ap;\n __builtin_va_start(ap,format);\n rc = xmlTextWriterWriteVFormatCDATA(writer, format, ap);\n __builtin_va_end(ap);\n return rc;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Atanh.c", "codebase": "gprolog-1.5.0", "c_file": "arith_inl_c.c", "function": "Pl_Fct_Atanh", "sloc": "5", "c_code": "WamWord\nPl_Fct_Atanh(WamWord x)\n{\n return Make_Tagged_Float(atanh(To_Double(x)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Mk_Codes.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Mk_Codes", "sloc": "18", "c_code": "WamWord\nPl_Mk_Codes(char *str)\n{\n WamWord res_word;\n if (*str == '\\0')\n return (((PlLong) (256) << 3) + ((PlULong)0x3));\n res_word = Pl_Put_List();\n for (;;)\n {\n Pl_Unify_Integer(*str);\n str++;\n if (*str == '\\0')\n break;\n Pl_Unify_List();\n }\n Pl_Unify_Nil();\n return res_word;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 1}}, {"id": "nettle-3.9.1#gmp-glue_prep#_nettle_mpn_get_base256.c", "codebase": "nettle-3.9.1", "c_file": "gmp-glue.c", "function": "_nettle_mpn_get_base256", "sloc": "30", "c_code": "void\n_nettle_mpn_get_base256 (uint8_t *rp, size_t rn,\n const mp_limb_t *xp, mp_size_t xn)\n{\n unsigned bits;\n mp_limb_t in;\n for (bits = in = 0; xn > 0 && rn > 0; )\n {\n if (bits >= 8)\n {\n rp[--rn] = in;\n in >>= 8;\n bits -= 8;\n }\n else\n {\n uint8_t old = in;\n in = *xp++;\n xn--;\n rp[--rn] = old | (in << bits);\n in >>= (8 - bits);\n bits += (64 - 0) - 8;\n }\n }\n while (rn > 0)\n {\n rp[--rn] = in;\n in >>= 8;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Rd_Char_Check.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Rd_Char_Check", "sloc": "13", "c_code": "int\nPl_Rd_Char_Check(WamWord start_word)\n{\n WamWord word, tag_mask;\n int atom;\n do { WamWord deref_last_word; word = start_word; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0);\n if (tag_mask == (PlULong)0)\n Pl_Err_Instantiation();\n atom = ((PlULong) (word) >> 3);\n if (tag_mask != (PlULong)0x3 || pl_atom_tbl[atom].prop.length != 1)\n Pl_Err_Type(pl_type_character, word);\n return pl_atom_tbl[atom].name[0];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "lil#lil_prep#lil_subst_to_list.c", "codebase": "lil", "c_file": "lil.c", "function": "lil_subst_to_list", "sloc": "19", "c_code": "lil_list_t lil_subst_to_list(lil_t lil, lil_value_t code)\n{\n const char* save_code = lil->code;\n size_t save_clen = lil->clen;\n size_t save_head = lil->head;\n int save_igeol = lil->ignoreeol;\n lil_list_t words;\n lil->code = lil_to_string(code);\n lil->clen = code->l;\n lil->head = 0;\n lil->ignoreeol = 1;\n words = substitute(lil);\n if (!words) words = lil_alloc_list();\n lil->code = save_code;\n lil->clen = save_clen;\n lil->head = save_head;\n lil->ignoreeol = save_igeol;\n return words;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#opngreduc_prep#opng_validate_image.c", "codebase": "optipng-0.7.8", "c_file": "opngreduc.c", "function": "opng_validate_image", "sloc": "15", "c_code": "int\nopng_validate_image(png_structp png_ptr, png_infop info_ptr)\n{\n ((void)0);\n if (png_get_bit_depth(png_ptr, info_ptr) == 0)\n return 0;\n if (png_get_color_type(png_ptr, info_ptr) & 1)\n {\n if (!png_get_valid(png_ptr, info_ptr, 0x0008U))\n return 0;\n }\n if (!png_get_valid(png_ptr, info_ptr, 0x8000U))\n return 0;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_lib_prep#pth_raise.c", "codebase": "pth-2.0.7", "c_file": "pth_lib.c", "function": "pth_raise", "sloc": "20", "c_code": "int pth_raise(pth_t t, int sig)\n{\n struct sigaction sa;\n if (t == ((void *)0) || t == __pth_current || (sig < 0 || sig > 65))\n return ((*__errno_location ()) = (22), ((0)));\n if (sig == 0)\n return __pth_thread_exists(t);\n else {\n if (sigaction(sig, ((void *)0), &sa) != 0)\n return (0);\n if (sa.__sigaction_handler.sa_handler == ((__sighandler_t) 1))\n return (!(0));\n if (!sigismember(&t->sigpending, sig)) {\n sigaddset(&t->sigpending, sig);\n t->sigpendcnt++;\n }\n pth_yield(t);\n return (!(0));\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_LARGE_NUMBER_DIVISIBLE_4_NOT_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "CHECK_LARGE_NUMBER_DIVISIBLE_4_NOT.c", "function": "f_filled", "sloc": "1", "c_code": "_Bool f_filled ( char str [] ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#rcsfnms_prep#basefilename.c", "codebase": "rcs-5.10.1", "c_file": "rcsfnms.c", "function": "basefilename", "sloc": "14", "c_code": "char const *\nbasefilename (char const *p)\n{\n register char const *b = p, *q = p;\n for (;;)\n switch (*q++)\n {\n case '/':\n b = q;\n break;\n case 0:\n return b;\n }\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "mcsim-6.2.0#simo_prep#CloseMCFiles.c", "codebase": "mcsim-6.2.0", "c_file": "simo.c", "function": "CloseMCFiles", "sloc": "5", "c_code": "void CloseMCFiles (PANALYSIS panal)\n{\n fclose (panal->mc.pfileMCOut);\n printf (\"\\nWrote results to \\\"%s\\\"\\n\", panal->mc.szMCOutfilename);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_uri_prep#osip_uri_param_freelist.c", "codebase": "libosip2-5.3.1", "c_file": "osip_uri.c", "function": "osip_uri_param_freelist", "sloc": "8", "c_code": "void osip_uri_param_freelist(osip_list_t *params) {\n osip_uri_param_t *u_param;\n while (!osip_list_eol(params, 0)) {\n u_param = (osip_uri_param_t *) osip_list_get(params, 0);\n osip_list_remove(params, 0);\n osip_uri_param_free(u_param);\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlmemory_prep#xmlMemoryStrdup.c", "codebase": "libxml2", "c_file": "xmlmemory.c", "function": "xmlMemoryStrdup", "sloc": "21", "c_code": "char *\nxmlMemoryStrdup(const char *str) {\n char *s;\n size_t size = strlen(str) + 1;\n MEMHDR *p;\n xmlInitParser();\n if (size > (((size_t)-1) - (((sizeof(MEMHDR) + sizeof(double) - 1) / sizeof(double) ) * sizeof(double))))\n return(((void *)0));\n p = (MEMHDR *) malloc((((sizeof(MEMHDR) + sizeof(double) - 1) / sizeof(double) ) * sizeof(double)) + size);\n if (!p)\n return(((void *)0));\n p->mh_tag = 0x5aa5U;\n p->mh_size = size;\n xmlMutexLock(&xmlMemMutex);\n debugMemSize += size;\n debugMemBlocks++;\n xmlMutexUnlock(&xmlMemMutex);\n s = (char *) ((void *) (((char *) (p)) + (((sizeof(MEMHDR) + sizeof(double) - 1) / sizeof(double) ) * sizeof(double))));\n memcpy(s, str, size);\n return(s);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 1, "memory_operation": 1, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MINIMUM_DIFFERENCE_PAIR_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_MINIMUM_DIFFERENCE_PAIR_1.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#knuth-lfib_prep#nettle_knuth_lfib_init.c", "codebase": "nettle-3.9.1", "c_file": "knuth-lfib.c", "function": "nettle_knuth_lfib_init", "sloc": "46", "c_code": "void\nnettle_knuth_lfib_init(struct knuth_lfib_ctx *ctx, uint32_t seed)\n{\n uint32_t t,j;\n uint32_t x[2*100 - 1];\n uint32_t ss = (seed + 2) & ((1UL << 30)-2);\n for (j = 0; j<100; j++)\n {\n x[j] = ss;\n ss <<= 1; if (ss >= (1UL << 30)) ss -= ((1UL << 30)-2);\n }\n for (;j< 2*100 -1; j++)\n x[j] = 0;\n x[1]++;\n ss = seed & ((1UL << 30)-1);\n for (t = 70 -1; t; )\n {\n for (j = 100 -1; j>0; j--)\n x[j+j] = x[j];\n for (j = 2*100 -2; j > 100 -37; j-= 2)\n x[2*100 -1-j] = x[j] & ~1;\n for (j = 2*100 -2; j>=100; j--)\n if (x[j] & 1)\n {\n x[j-(100 -37)] = (x[j - (100 -37)] - x[j]) & ((1UL << 30)-1);\n x[j-100] = (x[j-100] - x[j]) & ((1UL << 30)-1);\n }\n if (ss & 1)\n {\n for (j=100; j>0; j--)\n x[j] = x[j-1];\n x[0] = x[100];\n if (x[100] & 1)\n x[37] = (x[37] - x[100]) & ((1UL << 30)-1);\n }\n if (ss)\n ss >>= 1;\n else\n t--;\n }\n for (j=0; j<37; j++)\n ctx->x[j+100 -37] = x[j];\n for (; j<100; j++)\n ctx->x[j-37] = x[j];\n ctx->index = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 9, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#adx_prep#ti_adx.c", "codebase": "tulipindicators-0.9.1", "c_file": "adx.c", "function": "ti_adx", "sloc": "50", "c_code": "int ti_adx(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *high = inputs[0];\n const double *low = inputs[1];\n const int period = (int)options[0];\n double *output = outputs[0];\n if (period < 2) return 1;\n if (size <= ti_adx_start(options)) return 0;\n const double per = ((double)period-1) / ((double)period);\n const double invper = 1.0 / ((double)period);\n double dmup = 0;\n double dmdown = 0;\n int i;\n for (i = 1; i < period; ++i) {\n double dp, dm;\n do { dp = high[i] - high[i-1]; dm = low[i-1] - low[i]; if (dp < 0) dp = 0; else if (dp > dm) dm = 0; if (dm < 0) dm = 0; else if (dm > dp) dp = 0;} while (0);\n dmup += dp;\n dmdown += dm;\n }\n double adx = 0.0;\n {\n double di_up = dmup;\n double di_down = dmdown;\n double dm_diff = fabs(di_up - di_down);\n double dm_sum = di_up + di_down;\n double dx = dm_diff / dm_sum * 100;\n adx += dx;\n }\n for (i = period; i < size; ++i) {\n double dp, dm;\n do { dp = high[i] - high[i-1]; dm = low[i-1] - low[i]; if (dp < 0) dp = 0; else if (dp > dm) dm = 0; if (dm < 0) dm = 0; else if (dm > dp) dp = 0;} while (0);\n dmup = dmup * per + dp;\n dmdown = dmdown * per + dm;\n double di_up = dmup;\n double di_down = dmdown;\n double dm_diff = fabs(di_up - di_down);\n double dm_sum = di_up + di_down;\n double dx = dm_diff / dm_sum * 100;\n if (i-period < period-2) {\n adx += dx;\n } else if (i-period == period-2) {\n adx += dx;\n *output++ = adx * invper;\n } else {\n adx = adx * per + dx;\n *output++ = adx * invper;\n }\n }\n ((void) sizeof ((output - outputs[0] == size - ti_adx_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_adx_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_adx_start(options)\", \"indicators/adx.c\", 102, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 2, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "uucp-1.07#xqtfil_prep#fsysdep_get_xqt_init.c", "codebase": "uucp-1.07", "c_file": "xqtfil.c", "function": "fsysdep_get_xqt_init", "sloc": "28", "c_code": "boolean\nfsysdep_get_xqt_init (zsystem)\n const char *zsystem;\n{\n usysdep_get_xqt_free ((const char *) ((void *)0));\n if (zsystem != ((void *)0))\n {\n zSdir = zsysdep_in_dir (zsystem, \"X.\");\n qSxqt_dir = opendir ((char *) zSdir);\n if (qSxqt_dir != ((void *)0))\n {\n qSxqt_topdir = qSxqt_dir;\n fSone_dir = (1);\n zSsystem = zbufcpy (zsystem);\n return (1);\n }\n }\n fSone_dir = (0);\n qSxqt_topdir = opendir ((char *) \".\");\n if (qSxqt_topdir == ((void *)0))\n {\n if ((*__errno_location ()) == 2)\n return (1);\n ulog (LOG_ERROR, \"opendir (%s): %s\", \".\", strerror ((*__errno_location ())));\n return (0);\n }\n return (1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "sed-4.9#localename_prep#gl_locale_name_default.c", "codebase": "sed-4.9", "c_file": "localename.c", "function": "gl_locale_name_default", "sloc": "5", "c_code": "const char *\ngl_locale_name_default (void)\n{\n return \"C\";\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#variadic_prep#tcc_warning.c", "codebase": "tinycc", "c_file": "variadic.c", "function": "tcc_warning", "sloc": "10", "c_code": "void tcc_warning(const char *fmt, ...)\n{\n TCCState *s1 = tcc_state;\n va_list ap;\n if (s1->warn_none)\n return;\n __builtin_va_start(ap,fmt);\n error1(s1, 1, fmt, ap);\n __builtin_va_end(ap);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "patch-2.7.6#patch_prep#copy_till.c", "codebase": "patch-2.7.6", "c_file": "patch.c", "function": "copy_till", "sloc": "27", "c_code": "_Bool\ncopy_till (struct outstate *outstate, lin lastline)\n{\n lin R_last_frozen_line = last_frozen_line;\n FILE *fp = outstate->ofp;\n char const *s;\n size_t size;\n if (R_last_frozen_line > lastline)\n {\n say (\"misordered hunks! output would be garbled\\n\");\n return 0;\n }\n while (R_last_frozen_line < lastline)\n {\n s = ifetch (++R_last_frozen_line, 0, &size);\n if (size)\n {\n if ((! outstate->after_newline && putc ('\\n', fp) == (-1))\n || ! fwrite (s, sizeof *s, size, fp))\n write_fatal ();\n outstate->after_newline = s[size - 1] == '\\n';\n outstate->zero_output = 0;\n }\n }\n last_frozen_line = R_last_frozen_line;\n return 1;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_LENGTH_SUBARRAY_SUM_GREATER_GIVEN_VALUE_1_prep#min.c", "codebase": "transcoder-set", "c_file": "MINIMUM_LENGTH_SUBARRAY_SUM_GREATER_GIVEN_VALUE_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_IF_STRING_REMAINS_PALINDROME_AFTER_REMOVING_GIVEN_NUMBER_OF_CHARACTERS_prep#max.c", "codebase": "transcoder-set", "c_file": "CHECK_IF_STRING_REMAINS_PALINDROME_AFTER_REMOVING_GIVEN_NUMBER_OF_CHARACTERS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "brotli-1.0.9#block_splitter_prep#BrotliSplitBlock.c", "codebase": "brotli-1.0.9", "c_file": "block_splitter.c", "function": "BrotliSplitBlock", "sloc": "58", "c_code": "void BrotliSplitBlock(MemoryManager* m,\n const Command* cmds,\n const size_t num_commands,\n const uint8_t* data,\n const size_t pos,\n const size_t mask,\n const BrotliEncoderParams* params,\n BlockSplit* literal_split,\n BlockSplit* insert_and_copy_split,\n BlockSplit* dist_split) {\n {\n size_t literals_count = CountLiterals(cmds, num_commands);\n uint8_t* literals = ((literals_count) > 0 ? ((uint8_t*)BrotliAllocate((m), (literals_count) * sizeof(uint8_t))) : ((void *)0));\n if ((!!0) || (!!0)) return;\n CopyLiteralsToByteArray(cmds, num_commands, data, pos, mask, literals);\n SplitByteVectorLiteral(\n m, literals, literals_count,\n kSymbolsPerLiteralHistogram, kMaxLiteralHistograms,\n kLiteralStrideLength, kLiteralBlockSwitchCost, params,\n literal_split);\n if ((!!0)) return;\n { BrotliFree((m), (literals)); literals = ((void *)0); };\n }\n {\n uint16_t* insert_and_copy_codes = ((num_commands) > 0 ? ((uint16_t*)BrotliAllocate((m), (num_commands) * sizeof(uint16_t))) : ((void *)0));\n size_t i;\n if ((!!0) || (!!0)) return;\n for (i = 0; i < num_commands; ++i) {\n insert_and_copy_codes[i] = cmds[i].cmd_prefix_;\n }\n SplitByteVectorCommand(\n m, insert_and_copy_codes, num_commands,\n kSymbolsPerCommandHistogram, kMaxCommandHistograms,\n kCommandStrideLength, kCommandBlockSwitchCost, params,\n insert_and_copy_split);\n if ((!!0)) return;\n { BrotliFree((m), (insert_and_copy_codes)); insert_and_copy_codes = ((void *)0); };\n }\n {\n uint16_t* distance_prefixes = ((num_commands) > 0 ? ((uint16_t*)BrotliAllocate((m), (num_commands) * sizeof(uint16_t))) : ((void *)0));\n size_t j = 0;\n size_t i;\n if ((!!0) || (!!0)) return;\n for (i = 0; i < num_commands; ++i) {\n const Command* cmd = &cmds[i];\n if (CommandCopyLen(cmd) && cmd->cmd_prefix_ >= 128) {\n distance_prefixes[j++] = cmd->dist_prefix_ & 0x3FF;\n }\n }\n SplitByteVectorDistance(\n m, distance_prefixes, j,\n kSymbolsPerDistanceHistogram, kMaxCommandHistograms,\n kCommandStrideLength, kDistanceBlockSwitchCost, params,\n dist_split);\n if ((!!0)) return;\n { BrotliFree((m), (distance_prefixes)); distance_prefixes = ((void *)0); };\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#yourcode_prep#Definite_Integral.c", "codebase": "mcsim-6.2.0", "c_file": "yourcode.c", "function": "Definite_Integral", "sloc": "36", "c_code": "double Definite_Integral (double (*Function)(double), double dFrom, double dTo)\n{\n double dTotal_Area, dDelta_Area;\n double pdArea[25 +2], pdTemp[25 +2];\n int i;\n if (dFrom >= dTo) {\n if (dFrom == dTo)\n return (0);\n else {\n printf (\"\\nError: inverted integration bounds in Definite_Integral - \"\n \"Exiting\\n\\n\");\n exit (0);\n }\n }\n pdTemp[0] = 1;\n for (i = 0; i < 25; i++) {\n pdArea[i] = Trapezes (Function, dFrom, dTo, i+1);\n if (i >= 4) {\n Interpolate_Poly (&pdTemp[i-4], &pdArea[i-4], 4 + 1,\n 0.0, &dTotal_Area, &dDelta_Area);\n if (dTotal_Area == 0) {\n if (fabs(dDelta_Area) < 1.0e-6)\n return dTotal_Area;\n }\n else {\n if (fabs(dDelta_Area) < 1.0e-6 * fabs(dTotal_Area))\n return dTotal_Area;\n }\n }\n pdArea[i+1] = pdArea[i];\n pdTemp[i+1] = 0.25 * pdTemp[i];\n }\n printf (\"\\nError: Too many steps in routine Definite_Integral \"\n \"- Exiting\\n\\n\");\n exit (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "json.h#allow_leading_or_trailing_decimal_point_prep#json_hexadecimal_digit.c", "codebase": "json.h", "c_file": "allow_leading_or_trailing_decimal_point.c", "function": "json_hexadecimal_digit", "sloc": "12", "c_code": "int json_hexadecimal_digit(const char c) {\n if ('0' <= c && c <= '9') {\n return c - '0';\n }\n if ('a' <= c && c <= 'f') {\n return c - 'a' + 10;\n }\n if ('A' <= c && c <= 'F') {\n return c - 'A' + 10;\n }\n return -1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_CHECK_PLUS_PERFECT_NUMBER_prep#len.c", "codebase": "transcoder-set", "c_file": "PROGRAM_CHECK_PLUS_PERFECT_NUMBER.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#gzlib_prep#gzerror.c", "codebase": "optipng-0.7.8", "c_file": "gzlib.c", "function": "gzerror", "sloc": "12", "c_code": "const char * gzerror(gzFile file, int *errnum) {\n gz_statep state;\n if (file == ((void *)0))\n return ((void *)0);\n state = (gz_statep)file;\n if (state->mode != 7247 && state->mode != 31153)\n return ((void *)0);\n if (errnum != ((void *)0))\n *errnum = state->err;\n return state->err == (-4) ? \"out of memory\" :\n (state->msg == ((void *)0) ? \"\" : state->msg);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "less-633#line_prep#set_status_col.c", "codebase": "less-633", "c_file": "line.c", "function": "set_status_col", "sloc": "4", "c_code": "void set_status_col(char c, int attr)\n{\n set_pfx(0, c, attr);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_STEPS_TO_DELETE_A_STRING_AFTER_REPEATED_DELETION_OF_PALINDROME_SUBSTRINGS_prep#min.c", "codebase": "transcoder-set", "c_file": "MINIMUM_STEPS_TO_DELETE_A_STRING_AFTER_REPEATED_DELETION_OF_PALINDROME_SUBSTRINGS.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#tty_prep#brktty.c", "codebase": "screen-4.9.0", "c_file": "tty.c", "function": "brktty", "sloc": "5", "c_code": "void brktty(int fd)\n{\n if (separate_sids)\n setsid();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#optim_prep#opng_initialize.c", "codebase": "optipng-0.7.8", "c_file": "optim.c", "function": "opng_initialize", "sloc": "23", "c_code": "int\nopng_initialize(const struct opng_options *init_options,\n const struct opng_ui *init_ui)\n{\n usr_printf = init_ui->printf_fn;\n usr_print_cntrl = init_ui->print_cntrl_fn;\n usr_progress = init_ui->progress_fn;\n usr_panic = init_ui->panic_fn;\n if (usr_printf == ((void *)0) ||\n usr_print_cntrl == ((void *)0) ||\n usr_progress == ((void *)0) ||\n usr_panic == ((void *)0))\n return -1;\n s_options = *init_options;\n if (s_options.optim_level == 0)\n {\n s_options.nb = s_options.nc = s_options.np = 1;\n s_options.nz = 1;\n }\n memset(&s_summary, 0, sizeof(s_summary));\n s_engine.started = 1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 1, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlRelaxNGParse.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlRelaxNGParse", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlRelaxNGParse(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlRelaxNGPtr c_retval;\n xmlRelaxNGParserCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlRelaxNGParse\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlRelaxNGParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyrelaxNgParserCtxt_Object *)(pyobj_ctxt))->obj));\n c_retval = xmlRelaxNGParse(ctxt);\n py_retval = libxml_xmlRelaxNGPtrWrap((xmlRelaxNGPtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_alert_info_prep#osip_message_get_alert_info.c", "codebase": "libosip2-5.3.1", "c_file": "osip_alert_info.c", "function": "osip_message_get_alert_info", "sloc": "9", "c_code": "int osip_message_get_alert_info(const osip_message_t *sip, int pos, osip_alert_info_t **dest) {\n osip_alert_info_t *alert_info;\n *dest = ((void *)0);\n if (osip_list_size(&sip->alert_infos) <= pos)\n return -1;\n alert_info = (osip_alert_info_t *) osip_list_get(&sip->alert_infos, pos);\n *dest = alert_info;\n return pos;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_cseq_prep#osip_message_set_cseq.c", "codebase": "libosip2-5.3.1", "c_file": "osip_cseq.c", "function": "osip_message_set_cseq", "sloc": "18", "c_code": "int osip_message_set_cseq(osip_message_t *sip, const char *hvalue) {\n int i;\n if (hvalue == ((void *)0) || hvalue[0] == '\\0')\n return 0;\n if (sip->cseq != ((void *)0))\n return -2;\n i = osip_cseq_init(&(sip->cseq));\n if (i != 0)\n return i;\n sip->message_property = 2;\n i = osip_cseq_parse(sip->cseq, hvalue);\n if (i != 0) {\n osip_cseq_free(sip->cseq);\n sip->cseq = ((void *)0);\n return i;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathRoundFunction.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathRoundFunction", "sloc": "17", "c_code": "void\nxmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs) {\n double f;\n if (ctxt == ((void *)0)) return; if (nargs != (1)) { xmlXPathErr(ctxt, XPATH_INVALID_ARITY); return; }; if (ctxt->valueNr < (1)) { xmlXPathErr(ctxt, XPATH_STACK_ERROR); return; };;\n if ((ctxt->value != ((void *)0)) && (ctxt->value->type != XPATH_NUMBER)) xmlXPathNumberFunction(ctxt, 1);;\n if ((ctxt->value == ((void *)0)) || (ctxt->value->type != XPATH_NUMBER)) { xmlXPathErr(ctxt, XPATH_INVALID_TYPE); return; };\n f = ctxt->value->floatval;\n if ((f >= -0.5) && (f < 0.5)) {\n ctxt->value->floatval *= 0.0;\n }\n else {\n double rounded = floor(f);\n if (f - rounded >= 0.5)\n rounded += 1.0;\n ctxt->value->floatval = rounded;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#base64-encode_prep#nettle_base64_encode_update.c", "codebase": "nettle-3.9.1", "c_file": "base64-encode.c", "function": "nettle_base64_encode_update", "sloc": "33", "c_code": "size_t\nnettle_base64_encode_update(struct base64_encode_ctx *ctx,\n char *dst,\n size_t length,\n const uint8_t *src)\n{\n size_t done = 0;\n size_t left = length;\n unsigned left_over;\n size_t bulk;\n while (ctx->bits && left)\n {\n left--;\n done += nettle_base64_encode_single(ctx, dst + done, *src++);\n }\n left_over = left % 3;\n bulk = left - left_over;\n if (bulk)\n {\n ((void) sizeof ((!(bulk % 3)) ? 1 : 0), __extension__ ({ if (!(bulk % 3)) ; else __assert_fail (\"!(bulk % 3)\", \"base64-encode.c\", 161, __extension__ __PRETTY_FUNCTION__); }));\n encode_raw(ctx->alphabet, dst + done, bulk, src);\n done += ((((bulk) + 2)/3)*4);\n src += bulk;\n left = left_over;\n }\n while (left)\n {\n left--;\n done += nettle_base64_encode_single(ctx, dst + done, *src++);\n }\n ((void) sizeof ((done <= (((length) * 8 + 4)/6)) ? 1 : 0), __extension__ ({ if (done <= (((length) * 8 + 4)/6)) ; else __assert_fail (\"done <= BASE64_ENCODE_LENGTH(length)\", \"base64-encode.c\", 175, __extension__ __PRETTY_FUNCTION__); }));\n return done;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#vis_prep#strvisx.c", "codebase": "tmux", "c_file": "vis.c", "function": "strvisx", "sloc": "14", "c_code": "int\nstrvisx(char *dst, const char *src, size_t len, int flag)\n{\n char c;\n char *start;\n for (start = dst; len > 1; len--) {\n c = *src;\n dst = vis(dst, c, flag, *++src);\n }\n if (len)\n dst = vis(dst, *src, flag, '\\0');\n *dst = '\\0';\n return (dst - start);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_hexadecimal_numbers_prep#json_value_is_null.c", "codebase": "json.h", "c_file": "allow_hexadecimal_numbers.c", "function": "json_value_is_null", "sloc": "3", "c_code": "int json_value_is_null(const struct json_value_s *const value) {\n return value->type == json_type_null;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "lodepng#lodepng_prep#lodepng_is_palette_type.c", "codebase": "lodepng", "c_file": "lodepng.c", "function": "lodepng_is_palette_type", "sloc": "3", "c_code": "unsigned lodepng_is_palette_type(const LodePNGColorMode* info) {\n return info->colortype == LCT_PALETTE;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_SUBSET_SUM_PROBLEM_1_prep#max.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_SUBSET_SUM_PROBLEM_1.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "patch-2.7.6#openat-proc_prep#openat_proc_name.c", "codebase": "patch-2.7.6", "c_file": "openat-proc.c", "function": "openat_proc_name", "sloc": "48", "c_code": "char *\nopenat_proc_name (char buf[((4096) < (4096 - 64) ? (4096) : (4096 - 64))], int fd, char const *file)\n{\n char *result = buf;\n int dirlen;\n if (!*file)\n {\n buf[0] = '\\0';\n return buf;\n }\n {\n enum {\n PROC_SELF_FD_DIR_SIZE_BOUND\n = (sizeof \"/proc/self/fd/%d/\" - (sizeof \"%d\" - 1)\n + (((((sizeof (int) * 8) - (! ((__typeof__ (int)) 0 < (__typeof__ (int)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (int)) 0 < (__typeof__ (int)) -1))))\n };\n static int proc_status = 0;\n if (! proc_status)\n {\n int proc_self_fd = open (\"/proc/self/fd\",\n 00 | 0200000 | 0400 | 04000);\n if (proc_self_fd < 0)\n proc_status = -1;\n else\n {\n char dotdot_buf[PROC_SELF_FD_DIR_SIZE_BOUND + sizeof \"../fd\" - 1];\n sprintf (dotdot_buf, \"/proc/self/fd/%d/\" \"../fd\", proc_self_fd);\n proc_status = access (dotdot_buf, 0) ? -1 : 1;\n close (proc_self_fd);\n }\n }\n if (proc_status < 0)\n return ((void *)0);\n else\n {\n size_t bufsize = PROC_SELF_FD_DIR_SIZE_BOUND + strlen (file);\n if (((4096) < (4096 - 64) ? (4096) : (4096 - 64)) < bufsize)\n {\n result = malloc (bufsize);\n if (! result)\n return ((void *)0);\n }\n dirlen = sprintf (result, \"/proc/self/fd/%d/\", fd);\n }\n }\n strcpy (result + dirlen, file);\n return result;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 1, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_TRAILING_ZEROES_FACTORIAL_NUMBER_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "COUNT_TRAILING_ZEROES_FACTORIAL_NUMBER.c", "function": "f_gold", "sloc": "7", "c_code": "int f_gold ( int n ) {\n int count = 0;\n for ( int i = 5;\n n / i >= 1;\n i *= 5 ) count += n / i;\n return count;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#msw_prep#ti_msw.c", "codebase": "tulipindicators-0.9.1", "c_file": "msw.c", "function": "ti_msw", "sloc": "36", "c_code": "int ti_msw(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *input = inputs[0];\n double *sine = outputs[0];\n double *lead = outputs[1];\n const int period = (int)options[0];\n if (period < 1) return 1;\n if (size <= ti_msw_start(options)) return 0;\n const double pi = 3.1415926;\n const double tpi = 2 * pi;\n double weight = 0, phase;\n double rp, ip;\n int i, j;\n for (i = period; i < size; ++i) {\n rp = 0;\n ip = 0;\n for (j = 0; j < period; ++j) {\n weight = input[i-j];\n rp = rp + cos(tpi * j / period) * weight;\n ip = ip + sin(tpi * j / period) * weight;\n }\n if (fabs(rp) > .001) {\n phase = atan(ip/rp);\n } else {\n phase = tpi / 2.0 * (ip < 0 ? -1.0 : 1.0);\n }\n if (rp < 0.0) phase += pi;\n phase += pi/2.0;\n if (phase < 0.0) phase += tpi;\n if (phase > tpi) phase -= tpi;\n *sine++ = sin(phase);\n *lead++ = sin(phase + pi/4.0);\n }\n ((void) sizeof ((sine - outputs[0] == size - ti_msw_start(options)) ? 1 : 0), __extension__ ({ if (sine - outputs[0] == size - ti_msw_start(options)) ; else __assert_fail (\"sine - outputs[0] == size - ti_msw_start(options)\", \"indicators/msw.c\", 73, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((lead - outputs[1] == size - ti_msw_start(options)) ? 1 : 0), __extension__ ({ if (lead - outputs[1] == size - ti_msw_start(options)) ; else __assert_fail (\"lead - outputs[1] == size - ti_msw_start(options)\", \"indicators/msw.c\", 74, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 8, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "cflow-1.7#c_prep#yylex_destroy.c", "codebase": "cflow-1.7", "c_file": "c.c", "function": "yylex_destroy", "sloc": "12", "c_code": "int yylex_destroy (void)\n{\n while(( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0))){\n yy_delete_buffer(( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)) );\n (yy_buffer_stack)[(yy_buffer_stack_top)] = ((void *)0);\n yypop_buffer_state();\n }\n yyfree((yy_buffer_stack) );\n (yy_buffer_stack) = ((void *)0);\n yy_init_globals( );\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#QUERIES_COUNTS_ARRAY_ELEMENTS_VALUES_GIVEN_RANGE_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "QUERIES_COUNTS_ARRAY_ELEMENTS_VALUES_GIVEN_RANGE.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int n, int x, int y ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlFirstElementChild.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlFirstElementChild", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlFirstElementChild(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlNodePtr c_retval;\n xmlNodePtr parent;\n PyObject *pyobj_parent;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlFirstElementChild\", &pyobj_parent))\n return(((void *)0));\n parent = (xmlNodePtr) (((pyobj_parent) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_parent))->obj));\n c_retval = xmlFirstElementChild(parent);\n py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_HIGH_EFFORT_VS_LOW_EFFORT_TASKS_PROBLEM_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_HIGH_EFFORT_VS_LOW_EFFORT_TASKS_PROBLEM.c", "function": "f_gold", "sloc": "4", "c_code": "int f_gold ( int high [ ], int low [ ], int n ) {\n if ( n <= 0 ) return 0;\n return max ( high [ n - 1 ] + f_gold ( high, low, ( n - 2 ) ), low [ n - 1 ] + f_gold ( high, low, ( n - 1 ) ) );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsCatSo.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsCatSo", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsCatSo(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsCatSo\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsCatSo\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsCatSo(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_HARMONIC_MEAN_USING_ARITHMETIC_MEAN_GEOMETRIC_MEAN_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FIND_HARMONIC_MEAN_USING_ARITHMETIC_MEAN_GEOMETRIC_MEAN.c", "function": "f_gold", "sloc": "7", "c_code": "double f_gold ( int a, int b ) {\n double AM, GM, HM;\n AM = ( a + b ) / 2;\n GM = sqrt ( a * b );\n HM = ( GM * GM ) / AM;\n return HM;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#tree_prep#xmlNewPI.c", "codebase": "libxml2", "c_file": "tree.c", "function": "xmlNewPI", "sloc": "4", "c_code": "xmlNodePtr\nxmlNewPI(const xmlChar *name, const xmlChar *content) {\n return(xmlNewDocPI(((void *)0), name, content));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_extract_get_value_size.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_extract_get_value_size", "sloc": "26", "c_code": "struct json_extract_result_s\njson_extract_get_value_size(const struct json_value_s *const value) {\n struct json_extract_result_s result = {0, 0};\n switch (value->type) {\n default:\n break;\n case json_type_object:\n result = json_extract_get_object_size(\n (const struct json_object_s *)value->payload);\n break;\n case json_type_array:\n result = json_extract_get_array_size(\n (const struct json_array_s *)value->payload);\n break;\n case json_type_number:\n result = json_extract_get_number_size(\n (const struct json_number_s *)value->payload);\n break;\n case json_type_string:\n result = json_extract_get_string_size(\n (const struct json_string_s *)value->payload);\n break;\n }\n result.dom_size += sizeof(struct json_value_s);\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 5}}, {"id": "screen-4.9.0#mark_prep#MakePaster.c", "codebase": "screen-4.9.0", "c_file": "mark.c", "function": "MakePaster", "sloc": "11", "c_code": "void\nMakePaster(struct paster *pa, char *buf, int len, int bufiscopy)\n{\n FreePaster(pa);\n pa->pa_pasteptr = buf;\n pa->pa_pastelen = len;\n if (bufiscopy)\n pa->pa_pastebuf = buf;\n pa->pa_pastelayer = flayer;\n DoProcess(((struct win *)(flayer)->l_bottom->l_data), &pa->pa_pasteptr, &pa->pa_pastelen, pa);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "patch-2.7.6#pch_prep#pch_says_nonexistent.c", "codebase": "patch-2.7.6", "c_file": "pch.c", "function": "pch_says_nonexistent", "sloc": "5", "c_code": "int\npch_says_nonexistent (_Bool which)\n{\n return p_says_nonexistent[which];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#globals_prep#__xmlParserInputBufferCreateFilenameValue.c", "codebase": "libxml2", "c_file": "globals.c", "function": "__xmlParserInputBufferCreateFilenameValue", "sloc": "1", "c_code": "xmlParserInputBufferCreateFilenameFunc *__xmlParserInputBufferCreateFilenameValue(void) { return (&xmlGetThreadLocalStorage(0)->gs_xmlParserInputBufferCreateFilenameValue); }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#NTH_NON_FIBONACCI_NUMBER_prep#sort.c", "codebase": "transcoder-set", "c_file": "NTH_NON_FIBONACCI_NUMBER.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#gcm-aes192_prep#nettle_gcm_aes192_update.c", "codebase": "nettle-3.9.1", "c_file": "gcm-aes192.c", "function": "nettle_gcm_aes192_update", "sloc": "6", "c_code": "void\nnettle_gcm_aes192_update (struct gcm_aes192_ctx *ctx,\n size_t length, const uint8_t *data)\n{\n nettle_gcm_update(&(ctx)->gcm, &(ctx)->key, (length), (data));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "wget-1.21.4#retr_prep#fd_read_line.c", "codebase": "wget-1.21.4", "c_file": "retr.c", "function": "fd_read_line", "sloc": "5", "c_code": "char *\nfd_read_line (int fd)\n{\n return fd_read_hunk (fd, line_terminator, 128, 4096);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_from_prep#osip_from_parse.c", "codebase": "libosip2-5.3.1", "c_file": "osip_from.c", "function": "osip_from_parse", "sloc": "133", "c_code": "int osip_from_parse(osip_from_t *from, const char *hvalue) {\n const char *displayname = ((void *)0);\n const char *url = ((void *)0);\n const char *url_end = ((void *)0);\n const char *gen_params;\n const char *ptr;\n int i;\n if (from == ((void *)0) || hvalue == ((void *)0))\n return -2;\n ptr = hvalue;\n while (ptr[0] != '\\0') {\n if (ptr[0] == ' ') {\n ptr++;\n continue;\n }\n if (ptr[0] == '\"') {\n displayname = ptr;\n break;\n }\n break;\n }\n if (ptr[0] == '\\0')\n return 0;\n if (displayname != ((void *)0)) {\n const char *second = ((void *)0);\n second = __osip_quote_find(displayname + 1);\n if (second == ((void *)0))\n return -5;\n if (second - displayname + 2 >= 2) {\n from->displayname = (char *) (osip_malloc_func ? osip_malloc_func(second - displayname + 2) : malloc(second - displayname + 2));\n if (from->displayname == ((void *)0))\n return -4;\n osip_strncpy(from->displayname, displayname, second - displayname + 1);\n }\n ptr = second + 1;\n while (ptr[0] != '\\0') {\n if (ptr[0] == ' ') {\n ptr++;\n continue;\n }\n if (ptr[0] == '<') {\n url = ptr;\n break;\n }\n break;\n }\n if (url == ((void *)0))\n return -5;\n if (ptr[1] == '\\0')\n return -5;\n } else {\n const char *beg = ptr;\n while (ptr[0] != '\\0') {\n if (ptr[0] == ' ') {\n ptr++;\n continue;\n }\n if (ptr[0] >= 'a' && ptr[0] <= 'z') {\n ptr++;\n continue;\n }\n if (ptr[0] >= 'A' && ptr[0] <= 'Z') {\n ptr++;\n continue;\n }\n if (ptr[0] >= '0' && ptr[0] <= '9') {\n ptr++;\n continue;\n }\n if (ptr[0] == '-' || ptr[0] == '.' || ptr[0] == '!' || ptr[0] == '%' || ptr[0] == '*' || ptr[0] == '_' || ptr[0] == '+' || ptr[0] == '`' || ptr[0] == '\\'' || ptr[0] == '~') {\n ptr++;\n continue;\n }\n url = ptr;\n break;\n }\n if (ptr[0] == '\\0' || url == ((void *)0))\n return -5;\n if (ptr[0] == '<') {\n if (ptr[1] == '\\0')\n return -5;\n if (url - beg > 0) {\n from->displayname = (char *) (osip_malloc_func ? osip_malloc_func(url - beg + 1) : malloc(url - beg + 1));\n if (from->displayname == ((void *)0))\n return -4;\n osip_clrncpy(from->displayname, hvalue, url - beg);\n }\n } else if (ptr[0] == ':') {\n url = beg;\n } else {\n url = beg;\n }\n }\n if (url[0] == '<') {\n url++;\n ptr = url;\n url_end = strchr(ptr, '>');\n if (url_end == ((void *)0))\n return -5;\n url_end--;\n gen_params = strchr(url_end, ';');\n }\n if (url_end == ((void *)0)) {\n gen_params = strchr(url, ';');\n if (gen_params != ((void *)0))\n url_end = gen_params - 1;\n else\n url_end = url + strlen(url);\n }\n if (gen_params != ((void *)0)) {\n i = __osip_generic_param_parseall(&from->gen_params, gen_params);\n if (i != 0) {\n return i;\n }\n }\n {\n char *tmp;\n if (url_end - url + 2 < 7)\n return -5;\n i = osip_uri_init(&(from->url));\n if (i != 0)\n return i;\n tmp = (char *) (osip_malloc_func ? osip_malloc_func(url_end - url + 2) : malloc(url_end - url + 2));\n if (tmp == ((void *)0))\n return -4;\n osip_strncpy(tmp, url, url_end - url + 1);\n i = osip_uri_parse(from->url, tmp);\n { if (tmp != ((void *)0)) { if (osip_free_func) osip_free_func(tmp); else free(tmp); } };\n if (i != 0)\n return i;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 8, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 20, "memory_management": 4, "memory_operation": 0, "if_statement": 34, "for_loop": 0, "while_loop": 3, "switch_statement": 0, "goto_statement": 0, "return_statement": 16, "break_continue_statement": 12}}, {"id": "wget-1.21.4#iri_prep#set_content_encoding.c", "codebase": "wget-1.21.4", "c_file": "iri.c", "function": "set_content_encoding", "sloc": "14", "c_code": "void\nset_content_encoding (struct iri *i, const char *charset)\n{\n do { if (__builtin_expect ((opt.debug), 0)) { debug_logprintf (\"URI content encoding = %s\\n\", charset ? quote (charset) : \"None\"); } } while (0);\n if (opt.encoding_remote)\n return;\n if (i->content_encoding)\n {\n if (charset && !c_strcasecmp (i->content_encoding, charset))\n return;\n do { free ((void *) (i->content_encoding)); i->content_encoding = ((void *)0); } while (0);\n }\n i->content_encoding = charset ? xstrdup (charset) : ((void *)0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 1, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlGetDtdQAttrDesc.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlGetDtdQAttrDesc", "sloc": "16", "c_code": "PyObject *\nlibxml_xmlGetDtdQAttrDesc(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlAttributePtr c_retval;\n xmlDtdPtr dtd;\n PyObject *pyobj_dtd;\n xmlChar * elem;\n xmlChar * name;\n xmlChar * prefix;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Ozzz:xmlGetDtdQAttrDesc\", &pyobj_dtd, &elem, &name, &prefix))\n return(((void *)0));\n dtd = (xmlDtdPtr) (((pyobj_dtd) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_dtd))->obj));\n c_retval = xmlGetDtdQAttrDesc(dtd, elem, name, prefix);\n py_retval = libxml_xmlAttributePtrWrap((xmlAttributePtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_proxy_authentication_info_prep#osip_message_get_proxy_authentication_info.c", "codebase": "libosip2-5.3.1", "c_file": "osip_proxy_authentication_info.c", "function": "osip_message_get_proxy_authentication_info", "sloc": "9", "c_code": "int osip_message_get_proxy_authentication_info(const osip_message_t *sip, int pos, osip_proxy_authentication_info_t **dest) {\n osip_proxy_authentication_info_t *proxy_authentication_info;\n *dest = ((void *)0);\n if (osip_list_size(&sip->proxy_authentication_infos) <= pos)\n return -1;\n proxy_authentication_info = (osip_proxy_authentication_info_t *) osip_list_get(&sip->proxy_authentication_infos, pos);\n *dest = proxy_authentication_info;\n return pos;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#pred_c_prep#Pl_Pred_Prop_User_2.c", "codebase": "gprolog-1.5.0", "c_file": "pred_c.c", "function": "Pl_Pred_Prop_User_2", "sloc": "8", "c_code": "Bool\nPl_Pred_Prop_User_2(WamWord func_word, WamWord arity_word)\n{\n int func = Pl_Rd_Atom(func_word);\n int arity = Pl_Rd_Integer(arity_word);\n PredInf *pred = Pl_Lookup_Pred(func, arity);\n return pred != ((void *)0) && (pred->prop & 8) == 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_write_minified.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_write_minified", "sloc": "26", "c_code": "void *json_write_minified(const struct json_value_s *value, size_t *out_size) {\n size_t size = 0;\n char *data = 0;\n char *data_end = 0;\n if (0 == value) {\n return 0;\n }\n if (json_write_minified_get_value_size(value, &size)) {\n return 0;\n }\n size += 1;\n data = (char *)malloc(size);\n if (0 == data) {\n return 0;\n }\n data_end = json_write_minified_value(value, data);\n if (0 == data_end) {\n free(data);\n return 0;\n }\n *data_end = '\\0';\n if (0 != out_size) {\n *out_size = size;\n }\n return data;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 2, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#int_array_prep#int_kilobytes.c", "codebase": "gawk-5.2.2", "c_file": "int_array.c", "function": "int_kilobytes", "sloc": "17", "c_code": "double\nint_kilobytes(NODE *symbol)\n{\n unsigned long i, bucket_cnt = 0;\n BUCKET *b;\n double kb;\n extern double str_kilobytes(NODE *symbol);\n for (i = 0; i < symbol->sub.nodep.cnt; i++) {\n for (b = symbol->sub.nodep.r.bv[i]; b != ((void *)0); b = b->hi.next)\n bucket_cnt++;\n }\n kb = (((double) bucket_cnt) * sizeof (BUCKET) +\n ((double) symbol->sub.nodep.cnt) * sizeof (BUCKET *)) / 1024.0;\n if (symbol->sub.nodep.rn != ((void *)0))\n kb += str_kilobytes(symbol->sub.nodep.rn);\n return kb;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#LONGEST_INCREASING_ODD_EVEN_SUBSEQUENCE_prep#len.c", "codebase": "transcoder-set", "c_file": "LONGEST_INCREASING_ODD_EVEN_SUBSEQUENCE.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int stack1 [ ], int stack2 [ ], int stack3 [ ], int n1, int n2, int n3 ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_high_prep#pth_read.c", "codebase": "pth-2.0.7", "c_file": "pth_high.c", "function": "pth_read", "sloc": "4", "c_code": "ssize_t pth_read(int fd, void *buf, size_t nbytes)\n{\n return pth_read_ev(fd, buf, nbytes, ((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_WHETHER_AN_ARRAY_IS_SUBSET_OF_ANOTHER_ARRAY_SET_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "FIND_WHETHER_AN_ARRAY_IS_SUBSET_OF_ANOTHER_ARRAY_SET_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#screen-write_prep#screen_write_deletecharacter.c", "codebase": "tmux", "c_file": "screen-write.c", "function": "screen_write_deletecharacter", "sloc": "20", "c_code": "void\nscreen_write_deletecharacter(struct screen_write_ctx *ctx, u_int nx, u_int bg)\n{\n struct screen *s = ctx->s;\n struct tty_ctx ttyctx;\n if (nx == 0)\n nx = 1;\n if (nx > ((s)->grid->sx) - s->cx)\n nx = ((s)->grid->sx) - s->cx;\n if (nx == 0)\n return;\n if (s->cx > ((s)->grid->sx) - 1)\n return;\n screen_write_initctx(ctx, &ttyctx);\n ttyctx.bg = bg;\n grid_view_delete_cells(s->grid, s->cx, s->cy, nx, bg);\n screen_write_collect_flush(ctx, 0);\n ttyctx.num = nx;\n tty_write(tty_cmd_deletecharacter, &ttyctx);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#volatility_prep#ti_volatility.c", "codebase": "tulipindicators-0.9.1", "c_file": "volatility.c", "function": "ti_volatility", "sloc": "29", "c_code": "int ti_volatility(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *input = inputs[0];\n double *output = outputs[0];\n const int period = (int)options[0];\n const double scale = 1.0 / period;\n const double annual = sqrt(252);\n if (period < 1) return 1;\n if (size <= ti_volatility_start(options)) return 0;\n double sum = 0;\n double sum2 = 0;\n int i;\n for (i = 1; i <= period; ++i) {\n const double c = (input[i]/input[i-1]-1.0);\n sum += c;\n sum2 += c * c;\n }\n *output++ = sqrt(sum2 * scale - (sum * scale) * (sum * scale)) * annual;\n for (i = period+1; i < size; ++i) {\n const double c = (input[i]/input[i-1]-1.0);\n sum += c;\n sum2 += c * c;\n const double cp = (input[i-period]/input[i-period-1]-1.0);\n sum -= cp;\n sum2 -= cp * cp;\n *output++ = sqrt(sum2 * scale - (sum * scale) * (sum * scale)) * annual;\n }\n ((void) sizeof ((output - outputs[0] == size - ti_volatility_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_volatility_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_volatility_start(options)\", \"indicators/volatility.c\", 69, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#sdp_accessor_prep#sdp_message_i_info_get.c", "codebase": "libosip2-5.3.1", "c_file": "sdp_accessor.c", "function": "sdp_message_i_info_get", "sloc": "12", "c_code": "char *sdp_message_i_info_get(sdp_message_t *sdp, int pos_media) {\n sdp_media_t *med;\n if (sdp == ((void *)0))\n return ((void *)0);\n if (pos_media == -1) {\n return sdp->i_info;\n }\n med = osip_list_get(&sdp->m_medias, pos_media);\n if (med == ((void *)0))\n return ((void *)0);\n return med->i_info;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_DIFFERENCE_MAX_MIN_K_SIZE_SUBSETS_prep#max.c", "codebase": "transcoder-set", "c_file": "MINIMUM_DIFFERENCE_MAX_MIN_K_SIZE_SUBSETS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#fd_range_prep#Pl_Vector_Mod_Vector.c", "codebase": "gprolog-1.5.0", "c_file": "fd_range.c", "function": "Pl_Vector_Mod_Vector", "sloc": "19", "c_code": "void\nPl_Vector_Mod_Vector(Vector vec, Vector vec1)\n{\n Vector aux_vec;\n int vec_elem, vec_elem1;\n int x;\n do { aux_vec = (Vector) (((WamWordP *) pl_reg_bank)[256 +3]); (((WamWordP *) pl_reg_bank)[256 +3]) += pl_vec_size; } while (0);\n Pl_Vector_Copy(aux_vec, vec);\n Pl_Vector_Empty(vec);\n { Vector enum_end = aux_vec + pl_vec_size, enum_i = aux_vec; int enum_j; VecWord enum_word; vec_elem = 0; do { enum_word = *enum_i; for (enum_j = 0; enum_j++ < (8 * 8); enum_word >>= 1, vec_elem++) { if (enum_word & 1) {;\n { Vector enum_end = vec1 + pl_vec_size, enum_i = vec1; int enum_j; VecWord enum_word; vec_elem1 = 0; do { enum_word = *enum_i; for (enum_j = 0; enum_j++ < (8 * 8); enum_word >>= 1, vec_elem1++) { if (enum_word & 1) {;\n if (vec_elem1 != 0)\n {\n x = vec_elem % vec_elem1;\n (vec[((VecWord) (x) >> 6)] |= ((VecWord) 1 << ((x) & (((VecWord) 1 << 6)-1))));\n }\n } } } while (++enum_i < enum_end); };\n } } } while (++enum_i < enum_end); };\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 2, "while_loop": 3, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#printf-args_prep#printf_fetchargs.c", "codebase": "findutils-4.9.0", "c_file": "printf-args.c", "function": "printf_fetchargs", "sloc": "95", "c_code": "int\nprintf_fetchargs (va_list args, arguments *a)\n{\n size_t i;\n argument *ap;\n for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)\n switch (ap->type)\n {\n case TYPE_SCHAR:\n ap->a.a_schar = __builtin_va_arg(args,int);\n break;\n case TYPE_UCHAR:\n ap->a.a_uchar = __builtin_va_arg(args,int);\n break;\n case TYPE_SHORT:\n ap->a.a_short = __builtin_va_arg(args,int);\n break;\n case TYPE_USHORT:\n ap->a.a_ushort = __builtin_va_arg(args,int);\n break;\n case TYPE_INT:\n ap->a.a_int = __builtin_va_arg(args,int);\n break;\n case TYPE_UINT:\n ap->a.a_uint = __builtin_va_arg(args,unsigned int);\n break;\n case TYPE_LONGINT:\n ap->a.a_longint = __builtin_va_arg(args,long int);\n break;\n case TYPE_ULONGINT:\n ap->a.a_ulongint = __builtin_va_arg(args,unsigned long int);\n break;\n case TYPE_LONGLONGINT:\n ap->a.a_longlongint = __builtin_va_arg(args,long long int);\n break;\n case TYPE_ULONGLONGINT:\n ap->a.a_ulonglongint = __builtin_va_arg(args,unsigned long long int);\n break;\n case TYPE_DOUBLE:\n ap->a.a_double = __builtin_va_arg(args,double);\n break;\n case TYPE_LONGDOUBLE:\n ap->a.a_longdouble = __builtin_va_arg(args,long double);\n break;\n case TYPE_CHAR:\n ap->a.a_char = __builtin_va_arg(args,int);\n break;\n case TYPE_WIDE_CHAR:\n ap->a.a_wide_char =\n (sizeof (wint_t) < sizeof (int)\n ? (wint_t) __builtin_va_arg(args,int)\n : __builtin_va_arg(args,wint_t));\n break;\n case TYPE_STRING:\n ap->a.a_string = __builtin_va_arg(args,const char *);\n if (ap->a.a_string == ((void *)0))\n ap->a.a_string = \"(NULL)\";\n break;\n case TYPE_WIDE_STRING:\n ap->a.a_wide_string = __builtin_va_arg(args,const wchar_t *);\n if (ap->a.a_wide_string == ((void *)0))\n {\n static const wchar_t wide_null_string[] =\n {\n (wchar_t)'(',\n (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L',\n (wchar_t)')',\n (wchar_t)0\n };\n ap->a.a_wide_string = wide_null_string;\n }\n break;\n case TYPE_POINTER:\n ap->a.a_pointer = __builtin_va_arg(args,void *);\n break;\n case TYPE_COUNT_SCHAR_POINTER:\n ap->a.a_count_schar_pointer = __builtin_va_arg(args,signed char *);\n break;\n case TYPE_COUNT_SHORT_POINTER:\n ap->a.a_count_short_pointer = __builtin_va_arg(args,short *);\n break;\n case TYPE_COUNT_INT_POINTER:\n ap->a.a_count_int_pointer = __builtin_va_arg(args,int *);\n break;\n case TYPE_COUNT_LONGINT_POINTER:\n ap->a.a_count_longint_pointer = __builtin_va_arg(args,long int *);\n break;\n case TYPE_COUNT_LONGLONGINT_POINTER:\n ap->a.a_count_longlongint_pointer = __builtin_va_arg(args,long long int *);\n break;\n default:\n return -1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 22}}, {"id": "gprolog-1.5.0#stream_supp_prep#Del_Aliases_Of_Stream.c", "codebase": "gprolog-1.5.0", "c_file": "stream_supp.c", "function": "Del_Aliases_Of_Stream", "sloc": "10", "c_code": "void\nDel_Aliases_Of_Stream(int stm)\n{\n HashScan scan;\n AliasInf *alias;\n for (alias = (AliasInf *) Pl_Hash_First(pl_alias_tbl, &scan); alias;\n alias = (AliasInf *) Pl_Hash_Next(&scan))\n if (alias->stm == stm)\n Pl_Hash_Delete(pl_alias_tbl, alias->atom);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_DIVISORS_1_N_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "SUM_DIVISORS_1_N_1.c", "function": "f_gold", "sloc": "7", "c_code": "int f_gold ( int n ) {\n int sum = 0;\n for ( int i = 1;\n i <= n;\n ++ i ) sum += ( n / i ) * i;\n return sum;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#b-fro_prep#fro_tello.c", "codebase": "rcs-5.10.1", "c_file": "b-fro.c", "function": "fro_tello", "sloc": "16", "c_code": "off_t\nfro_tello (struct fro *f)\n{\n off_t rv = 0;\n switch (f->rm)\n {\n case RM_MMAP:\n case RM_MEM:\n rv = f->ptr - f->base;\n break;\n case RM_STDIO:\n rv = ftello (f->stream);\n break;\n }\n return rv;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 2}}, {"id": "json.h#allow_location_information_prep#json_write_minified_object.c", "codebase": "json.h", "c_file": "allow_location_information.c", "function": "json_write_minified_object", "sloc": "21", "c_code": "char *json_write_minified_object(const struct json_object_s *object,\n char *data) {\n struct json_object_element_s *element = 0;\n *data++ = '{';\n for (element = object->start; 0 != element; element = element->next) {\n if (element != object->start) {\n *data++ = ',';\n }\n data = json_write_string(element->name, data);\n if (0 == data) {\n return 0;\n }\n *data++ = ':';\n data = json_write_minified_value(element->value, data);\n if (0 == data) {\n return 0;\n }\n }\n *data++ = '}';\n return data;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#torad_prep#ti_torad.c", "codebase": "tulipindicators-0.9.1", "c_file": "torad.c", "function": "ti_torad", "sloc": "1", "c_code": "int ti_torad(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] = ((in1[i] * (3.14159265358979323846 / 180.0))); } return 0; }\n", "c_constructs": {"pointer_type": 3, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_unquoted_keys_prep#json_write_minified_value.c", "codebase": "json.h", "c_file": "allow_unquoted_keys.c", "function": "json_write_minified_value", "sloc": "35", "c_code": "char *json_write_minified_value(const struct json_value_s *value, char *data) {\n switch (value->type) {\n default:\n return 0;\n case json_type_number:\n return json_write_number((struct json_number_s *)value->payload, data);\n case json_type_string:\n return json_write_string((struct json_string_s *)value->payload, data);\n case json_type_array:\n return json_write_minified_array((struct json_array_s *)value->payload,\n data);\n case json_type_object:\n return json_write_minified_object((struct json_object_s *)value->payload,\n data);\n case json_type_true:\n data[0] = 't';\n data[1] = 'r';\n data[2] = 'u';\n data[3] = 'e';\n return data + 4;\n case json_type_false:\n data[0] = 'f';\n data[1] = 'a';\n data[2] = 'l';\n data[3] = 's';\n data[4] = 'e';\n return data + 5;\n case json_type_null:\n data[0] = 'n';\n data[1] = 'u';\n data[2] = 'l';\n data[3] = 'l';\n return data + 4;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 8, "break_continue_statement": 0}}, {"id": "json-c#json_object_prep#json_object_get_int.c", "codebase": "json-c", "c_file": "json_object.c", "function": "json_object_get_int", "sloc": "48", "c_code": "int32_t json_object_get_int(const struct json_object *jso)\n{\n int64_t cint64 = 0;\n double cdouble;\n enum json_type o_type;\n if (!jso)\n return 0;\n o_type = jso->o_type;\n if (o_type == json_type_int)\n {\n const struct json_object_int *jsoint = JC_INT_C(jso);\n if (jsoint->cint_type == json_object_int_type_int64)\n {\n cint64 = jsoint->cint.c_int64;\n }\n else\n {\n if (jsoint->cint.c_uint64 >= (9223372036854775807L))\n cint64 = (9223372036854775807L);\n else\n cint64 = (int64_t)jsoint->cint.c_uint64;\n }\n }\n else if (o_type == json_type_string)\n {\n if (json_parse_int64(get_string_component(jso), &cint64) != 0)\n return 0;\n o_type = json_type_int;\n }\n switch (o_type)\n {\n case json_type_int:\n if (cint64 <= (-2147483647-1))\n return (-2147483647-1);\n if (cint64 >= (2147483647))\n return (2147483647);\n return (int32_t)cint64;\n case json_type_double:\n cdouble = JC_DOUBLE_C(jso)->c_double;\n if (cdouble <= (-2147483647-1))\n return (-2147483647-1);\n if (cdouble >= (2147483647))\n return (2147483647);\n return (int32_t)cdouble;\n case json_type_boolean: return JC_BOOL_C(jso)->c_boolean;\n default: return 0;\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 1, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 10, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 10, "break_continue_statement": 0}}, {"id": "units-2.22#units_prep#invfnlookup.c", "codebase": "units-2.22", "c_file": "units.c", "function": "invfnlookup", "sloc": "8", "c_code": "struct func *\ninvfnlookup(char *str)\n{\n if (*str != '~')\n return 0;\n removespaces(str+1);\n return fnlookup(str+1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "brotli-1.0.9#encode_prep#BrotliEncoderCompress.c", "codebase": "brotli-1.0.9", "c_file": "encode.c", "function": "BrotliEncoderCompress", "sloc": "63", "c_code": "int BrotliEncoderCompress(\n int quality, int lgwin, BrotliEncoderMode mode, size_t input_size,\n const uint8_t* input_buffer, size_t* encoded_size,\n uint8_t* encoded_buffer) {\n BrotliEncoderState* s;\n size_t out_size = *encoded_size;\n const uint8_t* input_start = input_buffer;\n uint8_t* output_start = encoded_buffer;\n size_t max_out_size = BrotliEncoderMaxCompressedSize(input_size);\n if (out_size == 0) {\n return 0;\n }\n if (input_size == 0) {\n *encoded_size = 1;\n *encoded_buffer = 6;\n return 1;\n }\n if (quality == 10) {\n const int lg_win = (brotli_min_int((30), ((brotli_max_int((16), (lgwin))))));\n int ok = BrotliCompressBufferQuality10(lg_win, input_size, input_buffer,\n encoded_size, encoded_buffer);\n if (!ok || (max_out_size && *encoded_size > max_out_size)) {\n goto fallback;\n }\n return 1;\n }\n s = BrotliEncoderCreateInstance(0, 0, 0);\n if (!s) {\n return 0;\n } else {\n size_t available_in = input_size;\n const uint8_t* next_in = input_buffer;\n size_t available_out = *encoded_size;\n uint8_t* next_out = encoded_buffer;\n size_t total_out = 0;\n int result = 0;\n BrotliEncoderSetParameter(s, BROTLI_PARAM_QUALITY, (uint32_t)quality);\n BrotliEncoderSetParameter(s, BROTLI_PARAM_LGWIN, (uint32_t)lgwin);\n BrotliEncoderSetParameter(s, BROTLI_PARAM_MODE, (uint32_t)mode);\n BrotliEncoderSetParameter(s, BROTLI_PARAM_SIZE_HINT, (uint32_t)input_size);\n if (lgwin > 24) {\n BrotliEncoderSetParameter(s, BROTLI_PARAM_LARGE_WINDOW, 1);\n }\n result = BrotliEncoderCompressStream(s, BROTLI_OPERATION_FINISH,\n &available_in, &next_in, &available_out, &next_out, &total_out);\n if (!BrotliEncoderIsFinished(s)) result = 0;\n *encoded_size = total_out;\n BrotliEncoderDestroyInstance(s);\n if (!result || (max_out_size && *encoded_size > max_out_size)) {\n goto fallback;\n }\n return 1;\n }\nfallback:\n *encoded_size = 0;\n if (!max_out_size) return 0;\n if (out_size >= max_out_size) {\n *encoded_size =\n MakeUncompressedStream(input_start, input_size, output_start);\n return 1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 10, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 2, "return_statement": 8, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_high_prep#pth_writev.c", "codebase": "pth-2.0.7", "c_file": "pth_high.c", "function": "pth_writev", "sloc": "4", "c_code": "ssize_t pth_writev(int fd, const struct iovec *iov, int iovcnt)\n{\n return pth_writev_ev(fd, iov, iovcnt, ((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#imsg_prep#imsg_free.c", "codebase": "tmux", "c_file": "imsg.c", "function": "imsg_free", "sloc": "5", "c_code": "void\nimsg_free(struct imsg *imsg)\n{\n freezero(imsg->data, imsg->hdr.len - sizeof(struct imsg_hdr));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "cpio-2.14#paxerror_prep#write_error_details.c", "codebase": "cpio-2.14", "c_file": "paxerror.c", "function": "write_error_details", "sloc": "8", "c_code": "void\nwrite_error_details (char const *name, size_t status, size_t size)\n{\n if (status == 0)\n write_error (name);\n else\n do { if (error_hook) error_hook (); error (0, 0, ngettext (\"%s: Wrote only %zu of %zu byte\", \"%s: Wrote only %zu of %zu bytes\", size), name, status, size); exit_status = 2; } while (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#eddsa-pubkey_prep#_nettle_eddsa_public_key_itch.c", "codebase": "nettle-3.9.1", "c_file": "eddsa-pubkey.c", "function": "_nettle_eddsa_public_key_itch", "sloc": "6", "c_code": "mp_size_t\n_nettle_eddsa_public_key_itch (const struct ecc_curve *ecc)\n{\n ((void) sizeof ((ecc->mul_g_itch <= _nettle_eddsa_compress_itch (ecc)) ? 1 : 0), __extension__ ({ if (ecc->mul_g_itch <= _nettle_eddsa_compress_itch (ecc)) ; else __assert_fail (\"ecc->mul_g_itch <= _eddsa_compress_itch (ecc)\", \"eddsa-pubkey.c\", 46, __extension__ __PRETTY_FUNCTION__); }));\n return 3*ecc->p.size + _nettle_eddsa_compress_itch (ecc);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_leading_plus_sign_prep#json_write_pretty.c", "codebase": "json.h", "c_file": "allow_leading_plus_sign.c", "function": "json_write_pretty", "sloc": "42", "c_code": "void *json_write_pretty(const struct json_value_s *value, const char *indent,\n const char *newline, size_t *out_size) {\n size_t size = 0;\n size_t indent_size = 0;\n size_t newline_size = 0;\n char *data = 0;\n char *data_end = 0;\n if (0 == value) {\n return 0;\n }\n if (0 == indent) {\n indent = \" \";\n }\n if (0 == newline) {\n newline = \"\\n\";\n }\n while ('\\0' != indent[indent_size]) {\n ++indent_size;\n }\n while ('\\0' != newline[newline_size]) {\n ++newline_size;\n }\n if (json_write_pretty_get_value_size(value, 0, indent_size, newline_size,\n &size)) {\n return 0;\n }\n size += 1;\n data = (char *)malloc(size);\n if (0 == data) {\n return 0;\n }\n data_end = json_write_pretty_value(value, 0, indent, newline, data);\n if (0 == data_end) {\n free(data);\n return 0;\n }\n *data_end = '\\0';\n if (0 != out_size) {\n *out_size = size;\n }\n return data;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 2, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 2, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#mh_prep#NextDown.c", "codebase": "mcsim-6.2.0", "c_file": "mh.c", "function": "NextDown", "sloc": "12", "c_code": "double NextDown (double Perk)\n{\n int i;\n static double PTable[21] = {0, 1E-6, 1E-5, 1E-4, 1E-3, 1E-2,\n 0.1, 0.2, 0.3, 0.5, 0.6, 0.7, 0.8, 0.9,\n 0.95, 0.97, 0.99, 0.999, 0.9999, 0.99999, 1};\n i = 0;\n while (Perk > PTable[i]) {\n i++;\n }\n return (i == 0 ? PTable[i] : PTable[i-1]);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#parserInternals_prep#xmlFreeInputStream.c", "codebase": "libxml2", "c_file": "parserInternals.c", "function": "xmlFreeInputStream", "sloc": "11", "c_code": "void\nxmlFreeInputStream(xmlParserInputPtr input) {\n if (input == ((void *)0)) return;\n if (input->filename != ((void *)0)) xmlFree((char *) input->filename);\n if (input->version != ((void *)0)) xmlFree((char *) input->version);\n if ((input->free != ((void *)0)) && (input->base != ((void *)0)))\n input->free((xmlChar *) input->base);\n if (input->buf != ((void *)0))\n xmlFreeParserInputBuffer(input->buf);\n xmlFree(input);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 1, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#utils_prep#is_separate_word.c", "codebase": "nano-7.2", "c_file": "utils.c", "function": "is_separate_word", "sloc": "7", "c_code": "_Bool is_separate_word(size_t position, size_t length, const char *text)\n{\n const char *before = text + step_left(text, position);\n const char *after = text + position + length;\n return ((position == 0 || !is_alpha_char(before)) &&\n (*after == '\\0' || !is_alpha_char(after)));\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#ch_prep#ch_beg_seek.c", "codebase": "less-633", "c_file": "ch.c", "function": "ch_beg_seek", "sloc": "18", "c_code": "int ch_beg_seek(void)\n{\n struct bufnode *bn;\n struct bufnode *firstbn;\n if (ch_seek(((POSITION)0)) == 0)\n return (0);\n firstbn = thisfile->buflist.next;\n if (firstbn == (&thisfile->buflist))\n return (1);\n for (bn = thisfile->buflist.next; bn != (&thisfile->buflist); bn = bn->next)\n {\n if (((struct buf *) bn)->block < ((struct buf *) firstbn)->block)\n firstbn = bn;\n }\n thisfile->block = ((struct buf *) firstbn)->block;\n thisfile->offset = 0;\n return (0);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "json.h#allow_multi_line_strings_prep#json_write_minified_object.c", "codebase": "json.h", "c_file": "allow_multi_line_strings.c", "function": "json_write_minified_object", "sloc": "21", "c_code": "char *json_write_minified_object(const struct json_object_s *object,\n char *data) {\n struct json_object_element_s *element = 0;\n *data++ = '{';\n for (element = object->start; 0 != element; element = element->next) {\n if (element != object->start) {\n *data++ = ',';\n }\n data = json_write_string(element->name, data);\n if (0 == data) {\n return 0;\n }\n *data++ = ':';\n data = json_write_minified_value(element->value, data);\n if (0 == data) {\n return 0;\n }\n }\n *data++ = '}';\n return data;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tmux#alerts_prep#alerts_reset_all.c", "codebase": "tmux", "c_file": "alerts.c", "function": "alerts_reset_all", "sloc": "7", "c_code": "void\nalerts_reset_all(void)\n{\n struct window *w;\n for ((w) = windows_RB_MINMAX(&windows, -1); (w) != ((void *)0); (w) = windows_RB_NEXT(w))\n alerts_reset(w);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#le_interf_c_prep#Pl_Add_Linedit_Completion_1.c", "codebase": "gprolog-1.5.0", "c_file": "le_interf_c.c", "function": "Pl_Add_Linedit_Completion_1", "sloc": "19", "c_code": "Bool\nPl_Add_Linedit_Completion_1(WamWord compl_word)\n{\n int atom;\n AtomProp prop;\n char *p;\n atom = Pl_Rd_Atom_Check(compl_word);\n prop = pl_atom_tbl[atom].prop;\n if (prop.length == 0)\n return 0;\n if (prop.type != 0)\n {\n for (p = pl_atom_tbl[atom].name; *p; p++)\n if (!((*__ctype_b_loc ())[(int) ((*p))] & (unsigned short int) _ISalnum) && *p != '_')\n return 0;\n }\n Pl_LE_Compl_Add_Word(pl_atom_tbl[atom].name, prop.length);\n return 1;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_PRINT_SUM_GIVEN_NTH_TERM_1_prep#main.c", "codebase": "transcoder-set", "c_file": "PROGRAM_PRINT_SUM_GIVEN_NTH_TERM_1.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n long param0[] = {42,40,67,73,18,16,74,33,92,22};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#AREA_SQUARE_CIRCUMSCRIBED_CIRCLE_prep#max.c", "codebase": "transcoder-set", "c_file": "AREA_SQUARE_CIRCUMSCRIBED_CIRCLE.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#ROUND_THE_GIVEN_NUMBER_TO_NEAREST_MULTIPLE_OF_10_prep#sort.c", "codebase": "transcoder-set", "c_file": "ROUND_THE_GIVEN_NUMBER_TO_NEAREST_MULTIPLE_OF_10.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlmemory_prep#xmlInitMemory.c", "codebase": "libxml2", "c_file": "xmlmemory.c", "function": "xmlInitMemory", "sloc": "5", "c_code": "int\nxmlInitMemory(void) {\n xmlInitParser();\n return(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlValidateDtdFinal.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlValidateDtdFinal", "sloc": "18", "c_code": "PyObject *\nlibxml_xmlValidateDtdFinal(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlValidCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n xmlDocPtr doc;\n PyObject *pyobj_doc;\n if (libxml_deprecationWarning(\"xmlValidateDtdFinal\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"OO:xmlValidateDtdFinal\", &pyobj_ctxt, &pyobj_doc))\n return(((void *)0));\n ctxt = (xmlValidCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyValidCtxt_Object *)(pyobj_ctxt))->obj));\n doc = (xmlDocPtr) (((pyobj_doc) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_doc))->obj));\n c_retval = xmlValidateDtdFinal(ctxt, doc);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_cos.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_cos", "sloc": "1", "c_code": "int ti_cos(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] = (cos(in1[i])); } return 0; }\n", "c_constructs": {"pointer_type": 3, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlNewProp.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlNewProp", "sloc": "15", "c_code": "PyObject *\nlibxml_xmlNewProp(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlAttrPtr c_retval;\n xmlNodePtr node;\n PyObject *pyobj_node;\n xmlChar * name;\n xmlChar * value;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Ozz:xmlNewProp\", &pyobj_node, &name, &value))\n return(((void *)0));\n node = (xmlNodePtr) (((pyobj_node) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_node))->obj));\n c_retval = xmlNewProp(node, name, value);\n py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "make-4.4.1#read_prep#parse_file_seq.c", "codebase": "make-4.4.1", "c_file": "read.c", "function": "parse_file_seq", "sloc": "194", "c_code": "void *\nparse_file_seq (char **stringp, size_t size, int stopmap,\n const char *prefix, int flags)\n{\n static char *tmpbuf = ((void *)0);\n int cachep = (! ((((flags))&((0x0010))) != 0));\n struct nameseq *new = 0;\n struct nameseq **newp = &new;\n char *p;\n glob_t gl;\n char *tp;\n int findmap = stopmap|0x0000|0x0001;\n int found_wait = 0;\n if ((! ((((flags))&((0x0020))) != 0)))\n findmap |= 0x0002;\n stopmap |= 0x0001;\n if (size < sizeof (struct nameseq))\n size = sizeof (struct nameseq);\n if ((! ((((flags))&((0x0004))) != 0)))\n dir_setup_glob (&gl);\n {\n static size_t tmpbuf_len = 0;\n size_t l = strlen (*stringp) + 1;\n if (l > tmpbuf_len)\n {\n tmpbuf = xrealloc (tmpbuf, l);\n tmpbuf_len = l;\n }\n }\n tp = tmpbuf;\n p = *stringp;\n while (1)\n {\n const char *name;\n const char **nlist = 0;\n char *tildep = 0;\n int globme = 1;\n char *arname = 0;\n char *memname = 0;\n char *s;\n size_t nlen;\n int tot, i;\n while ((((stopchar_map[(unsigned char)((*(p)))])&(((0x0002|0x0004)))) != 0)) ++(p);\n if ((((stopchar_map[(unsigned char)(*p)])&((stopmap))) != 0))\n break;\n s = p;\n p = find_map_unquote (p, findmap);\n if (!p)\n p = s + strlen (s);\n if ((((flags)&(0x0040)) != 0) && p - s == (sizeof (\".WAIT\")-1)\n && memcmp (s, \".WAIT\", (sizeof (\".WAIT\")-1)) == 0)\n {\n found_wait = 1;\n continue;\n }\n if ((! ((((flags))&((0x0001))) != 0)))\n while (p - s > 2 && s[0] == '.' && s[1] == '/')\n {\n s += 2;\n while (*s == '/')\n ++s;\n }\n if (s == p)\n {\n tp[0] = '.';\n tp[1] = '/';\n tp[2] = '\\0';\n nlen = 2;\n }\n else\n {\n nlen = p - s;\n memcpy (tp, s, nlen);\n tp[nlen] = '\\0';\n }\n if ((! ((((flags))&((0x0002))) != 0))\n && tp == tmpbuf && tp[0] != '(' && tp[nlen-1] != ')')\n {\n char *n = strchr (tp, '(');\n if (n)\n {\n const char *e = p;\n do\n {\n const char *o = e;\n while ((((stopchar_map[(unsigned char)((*(e)))])&(((0x0002|0x0004)))) != 0)) ++(e);\n while (! (((stopchar_map[(unsigned char)(*e)])&((findmap))) != 0))\n ++e;\n if (e == o)\n break;\n if (e[-1] == ')')\n {\n nlen -= (n + 1) - tp;\n tp = n + 1;\n break;\n }\n }\n while (*e != '\\0');\n if (! nlen)\n continue;\n }\n }\n if (tp > tmpbuf)\n {\n if (tp[nlen-1] == ')')\n {\n tp = tmpbuf;\n if (nlen == 1)\n continue;\n }\n else\n {\n tp[nlen++] = ')';\n tp[nlen] = '\\0';\n }\n }\n if ((((flags)&(0x0004)) != 0))\n {\n do { struct nameseq *_ns = xcalloc (size); const char *__n = (concat (2, prefix, tmpbuf)); _ns->name = (cachep ? strcache_add (__n) : xstrdup (__n)); if (found_wait) { ((struct dep*)_ns)->wait_here = 1; found_wait = 0; } *newp = _ns; newp = &_ns->next; } while(0);\n continue;\n }\n name = tmpbuf;\n if (tmpbuf[0] == '~')\n {\n tildep = tilde_expand (tmpbuf);\n if (tildep != 0)\n name = tildep;\n }\n if ((! ((((flags))&((0x0002))) != 0)) && ar_name (name))\n {\n ar_parse_name (name, &arname, &memname);\n name = arname;\n }\n if ((! ((((flags))&((0x0008))) != 0)) && strpbrk (name, \"?*[\") == ((void *)0))\n {\n globme = 0;\n tot = 1;\n nlist = &name;\n }\n else\n switch (glob (name, (1 << 9), ((void *)0), &gl))\n {\n case 1:\n out_of_memory ();\n case 0:\n tot = gl.gl_pathc;\n nlist = (const char **)gl.gl_pathv;\n break;\n case 3:\n if ((((flags)&(0x0008)) != 0))\n {\n tot = 0;\n break;\n }\n default:\n tot = 1;\n nlist = &name;\n break;\n }\n for (i = 0; i < tot; ++i)\n if (memname != 0)\n {\n struct nameseq *found = ar_glob (nlist[i], memname, size);\n if (! found)\n do { struct nameseq *_ns = xcalloc (size); const char *__n = (concat (5, prefix, nlist[i], \"(\", memname, \")\")); _ns->name = (cachep ? strcache_add (__n) : xstrdup (__n)); if (found_wait) { ((struct dep*)_ns)->wait_here = 1; found_wait = 0; } *newp = _ns; newp = &_ns->next; } while(0);\n else\n {\n if (*newp)\n (*newp)->next = found;\n else\n *newp = found;\n while (1)\n {\n if (! cachep)\n found->name = xstrdup (concat (2, prefix, name));\n else if (prefix)\n found->name = strcache_add (concat (2, prefix, name));\n if (found->next == 0)\n break;\n found = found->next;\n }\n newp = &found->next;\n }\n }\n else\n do { struct nameseq *_ns = xcalloc (size); const char *__n = (concat (2, prefix, nlist[i])); _ns->name = (cachep ? strcache_add (__n) : xstrdup (__n)); if (found_wait) { ((struct dep*)_ns)->wait_here = 1; found_wait = 0; } *newp = _ns; newp = &_ns->next; } while(0);\n if (globme)\n globfree (&gl);\n free (arname);\n free (tildep);\n }\n *stringp = p;\n return new;\n}\n", "c_constructs": {"pointer_type": 17, "array_type": 4, "struct_type": 5, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 8, "memory_management": 2, "memory_operation": 1, "if_statement": 33, "for_loop": 1, "while_loop": 11, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 11}}, {"id": "libxml2#debugXML_prep#xmlDebugDumpAttrList.c", "codebase": "libxml2", "c_file": "debugXML.c", "function": "xmlDebugDumpAttrList", "sloc": "11", "c_code": "void\nxmlDebugDumpAttrList(FILE * output, xmlAttrPtr attr, int depth)\n{\n xmlDebugCtxt ctxt;\n if (output == ((void *)0)) return;\n xmlCtxtDumpInitCtxt(&ctxt);\n ctxt.output = output;\n ctxt.depth = depth;\n xmlCtxtDumpAttrList(&ctxt, attr);\n xmlCtxtDumpCleanCtxt(&ctxt);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_single_quoted_strings_prep#utest_run_allow_single_quoted_strings_read_write_pretty_read.c", "codebase": "json.h", "c_file": "allow_single_quoted_strings.c", "function": "utest_run_allow_single_quoted_strings_read_write_pretty_read", "sloc": "7", "c_code": "void utest_run_allow_single_quoted_strings_read_write_pretty_read(int *utest_result, struct allow_single_quoted_strings *utest_fixture) {\n size_t size = 0;\n void *json = json_write_pretty(utest_fixture->value, \" \", \"\\n\", &size);\n free(utest_fixture->value);\n utest_fixture->value = json_parse(json, size - 1);\n free(json);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 2, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "bzip2#bzlib_prep#BZ2_bzdopen.c", "codebase": "bzip2", "c_file": "bzlib.c", "function": "BZ2_bzdopen", "sloc": "6", "c_code": "BZFILE * BZ2_bzdopen\n ( int fd,\n const char *mode )\n{\n return bzopen_or_bzdopen(((void *)0),fd,mode, 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlcatalog_prep#main.c", "codebase": "libxml2", "c_file": "xmlcatalog.c", "function": "main", "sloc": "260", "c_code": "int main(int argc, char **argv) {\n int i;\n int ret;\n int exit_value = 0;\n if (argc <= 1) {\n usage(argv[0]);\n return(1);\n }\n xmlCheckVersion(21400);\n for (i = 1; i < argc ; i++) {\n if (!strcmp(argv[i], \"-\"))\n break;\n if (argv[i][0] != '-')\n break;\n if ((!strcmp(argv[i], \"-verbose\")) ||\n (!strcmp(argv[i], \"-v\")) ||\n (!strcmp(argv[i], \"--verbose\"))) {\n verbose++;\n xmlCatalogSetDebug(verbose);\n } else if ((!strcmp(argv[i], \"-noout\")) ||\n (!strcmp(argv[i], \"--noout\"))) {\n noout = 1;\n } else if ((!strcmp(argv[i], \"-shell\")) ||\n (!strcmp(argv[i], \"--shell\"))) {\n shell++;\n noout = 1;\n } else if ((!strcmp(argv[i], \"-sgml\")) ||\n (!strcmp(argv[i], \"--sgml\"))) {\n sgml++;\n } else if ((!strcmp(argv[i], \"-create\")) ||\n (!strcmp(argv[i], \"--create\"))) {\n create++;\n } else if ((!strcmp(argv[i], \"-convert\")) ||\n (!strcmp(argv[i], \"--convert\"))) {\n convert++;\n } else if ((!strcmp(argv[i], \"-no-super-update\")) ||\n (!strcmp(argv[i], \"--no-super-update\"))) {\n no_super_update++;\n } else if ((!strcmp(argv[i], \"-add\")) ||\n (!strcmp(argv[i], \"--add\"))) {\n if (sgml)\n i += 2;\n else\n i += 3;\n add++;\n } else if ((!strcmp(argv[i], \"-del\")) ||\n (!strcmp(argv[i], \"--del\"))) {\n i += 1;\n del++;\n } else {\n fprintf(stderr, \"Unknown option %s\\n\", argv[i]);\n usage(argv[0]);\n return(1);\n }\n }\n for (i = 1; i < argc; i++) {\n if ((!strcmp(argv[i], \"-add\")) ||\n (!strcmp(argv[i], \"--add\"))) {\n if (sgml)\n i += 2;\n else\n i += 3;\n continue;\n } else if ((!strcmp(argv[i], \"-del\")) ||\n (!strcmp(argv[i], \"--del\"))) {\n i += 1;\n if (i == argc || (sgml && i + 1 == argc)) {\n fprintf(stderr, \"No catalog entry specified to remove from\\n\");\n usage (argv[0]);\n return(1);\n }\n continue;\n } else if (argv[i][0] == '-')\n continue;\n if (filename == ((void *)0) && argv[i][0] == '\\0') {\n xmlInitializeCatalog();\n } else {\n filename = argv[i];\n ret = xmlLoadCatalog(argv[i]);\n if ((ret < 0) && (create)) {\n xmlCatalogAdd((xmlChar *) \"catalog\", (xmlChar *) argv[i], ((void *)0));\n }\n xmlCatalogResolvePublic((xmlChar *) \"\");\n }\n break;\n }\n if (convert)\n ret = xmlCatalogConvert();\n if ((add) || (del)) {\n for (i = 1; i < argc ; i++) {\n if (!strcmp(argv[i], \"-\"))\n break;\n if (argv[i][0] != '-')\n continue;\n if (strcmp(argv[i], \"-add\") && strcmp(argv[i], \"--add\") &&\n strcmp(argv[i], \"-del\") && strcmp(argv[i], \"--del\"))\n continue;\n if (sgml) {\n xmlCatalogPtr catal = ((void *)0);\n xmlCatalogPtr super = ((void *)0);\n catal = xmlLoadSGMLSuperCatalog(argv[i + 1]);\n if ((!strcmp(argv[i], \"-add\")) ||\n (!strcmp(argv[i], \"--add\"))) {\n if (catal == ((void *)0))\n catal = xmlNewCatalog(1);\n xmlACatalogAdd(catal, (xmlChar *) \"CATALOG\",\n (xmlChar *) argv[i + 2], ((void *)0));\n if (!no_super_update) {\n super = xmlLoadSGMLSuperCatalog(\"/usr/local/etc\" \"/sgml/catalog\");\n if (super == ((void *)0))\n super = xmlNewCatalog(1);\n xmlACatalogAdd(super, (xmlChar *) \"CATALOG\",\n (xmlChar *) argv[i + 1], ((void *)0));\n }\n } else {\n if (catal != ((void *)0))\n ret = xmlACatalogRemove(catal, (xmlChar *) argv[i + 2]);\n else\n ret = -1;\n if (ret < 0) {\n fprintf(stderr, \"Failed to remove entry from %s\\n\",\n argv[i + 1]);\n exit_value = 1;\n }\n if ((!no_super_update) && (noout) && (catal != ((void *)0)) &&\n (xmlCatalogIsEmpty(catal))) {\n super = xmlLoadSGMLSuperCatalog(\n \"/usr/local/etc\" \"/sgml/catalog\");\n if (super != ((void *)0)) {\n ret = xmlACatalogRemove(super,\n (xmlChar *) argv[i + 1]);\n if (ret < 0) {\n fprintf(stderr,\n \"Failed to remove entry from %s\\n\",\n \"/usr/local/etc\" \"/sgml/catalog\");\n exit_value = 1;\n }\n }\n }\n }\n if (noout) {\n FILE *out;\n if (xmlCatalogIsEmpty(catal)) {\n remove(argv[i + 1]);\n } else {\n out = fopen(argv[i + 1], \"wb\");\n if (out == ((void *)0)) {\n fprintf(stderr, \"could not open %s for saving\\n\",\n argv[i + 1]);\n exit_value = 2;\n noout = 0;\n } else {\n xmlACatalogDump(catal, out);\n fclose(out);\n }\n }\n if (!no_super_update && super != ((void *)0)) {\n if (xmlCatalogIsEmpty(super)) {\n remove(\"/usr/local/etc\" \"/sgml/catalog\");\n } else {\n out = fopen(\"/usr/local/etc\" \"/sgml/catalog\", \"wb\");\n if (out == ((void *)0)) {\n fprintf(stderr,\n \"could not open %s for saving\\n\",\n \"/usr/local/etc\" \"/sgml/catalog\");\n exit_value = 2;\n noout = 0;\n } else {\n xmlACatalogDump(super, out);\n fclose(out);\n }\n }\n }\n } else {\n xmlACatalogDump(catal, stdout);\n }\n i += 2;\n xmlFreeCatalog(catal);\n xmlFreeCatalog(super);\n } else {\n if ((!strcmp(argv[i], \"-add\")) ||\n (!strcmp(argv[i], \"--add\"))) {\n if ((argv[i + 3] == ((void *)0)) || (argv[i + 3][0] == 0))\n ret = xmlCatalogAdd((xmlChar *) argv[i + 1], ((void *)0),\n (xmlChar *) argv[i + 2]);\n else\n ret = xmlCatalogAdd((xmlChar *) argv[i + 1],\n (xmlChar *) argv[i + 2],\n (xmlChar *) argv[i + 3]);\n if (ret != 0) {\n printf(\"add command failed\\n\");\n exit_value = 3;\n }\n i += 3;\n } else if ((!strcmp(argv[i], \"-del\")) ||\n (!strcmp(argv[i], \"--del\"))) {\n ret = xmlCatalogRemove((xmlChar *) argv[i + 1]);\n if (ret < 0) {\n fprintf(stderr, \"Failed to remove entry %s\\n\",\n argv[i + 1]);\n exit_value = 1;\n }\n i += 1;\n }\n }\n }\n } else if (shell) {\n usershell();\n } else {\n for (i++; i < argc; i++) {\n xmlURIPtr uri;\n xmlChar *ans;\n uri = xmlParseURI(argv[i]);\n if (uri == ((void *)0)) {\n ans = xmlCatalogResolvePublic((const xmlChar *) argv[i]);\n if (ans == ((void *)0)) {\n printf(\"No entry for PUBLIC %s\\n\", argv[i]);\n exit_value = 4;\n } else {\n printf(\"%s\\n\", (char *) ans);\n xmlFree(ans);\n }\n } else {\n xmlFreeURI(uri);\n ans = xmlCatalogResolveSystem((const xmlChar *) argv[i]);\n if (ans == ((void *)0)) {\n printf(\"No entry for SYSTEM %s\\n\", argv[i]);\n ans = xmlCatalogResolveURI ((const xmlChar *) argv[i]);\n if (ans == ((void *)0)) {\n printf (\"No entry for URI %s\\n\", argv[i]);\n exit_value = 4;\n } else {\n printf(\"%s\\n\", (char *) ans);\n xmlFree (ans);\n }\n } else {\n printf(\"%s\\n\", (char *) ans);\n xmlFree(ans);\n }\n }\n }\n }\n if ((!sgml) && ((add) || (del) || (create) || (convert))) {\n if (noout && filename && *filename) {\n FILE *out;\n out = fopen(filename, \"wb\");\n if (out == ((void *)0)) {\n fprintf(stderr, \"could not open %s for saving\\n\", filename);\n exit_value = 2;\n noout = 0;\n } else {\n xmlCatalogDump(out);\n }\n } else {\n xmlCatalogDump(stdout);\n }\n }\n xmlCleanupParser();\n return(exit_value);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 24, "memory_management": 0, "memory_operation": 0, "if_statement": 54, "for_loop": 4, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 9}}, {"id": "transcoder-set#FIND_MAXIMUM_AVERAGE_SUBARRAY_OF_K_LENGTH_1_prep#main.c", "codebase": "transcoder-set", "c_file": "FIND_MAXIMUM_AVERAGE_SUBARRAY_OF_K_LENGTH_1.c", "function": "main", "sloc": "26", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {2,5,11,37,41,49,49,63,98};\nint param0_1[] = {84,-72,12,0,86,-32,-18,48,60,42,8,-6,-10,-6,-52,-84,-98,76,-10,-14,-94,-48,94,-10,-20,40,-52,0,94,-68,44,-34,-26,-6,-94,34,-80,-62,-40,56,52,-20,74,-46,-88,-26,22};\nint param0_2[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1};\nint param0_3[] = {94,97,74,88,14,66,65,50,76,55,70,93,53,30,2,60,65,24,80,73,84,95,49,32,55,70,17,26,96,20,36,2,89,49,83,67,42,51,71,11,61,78,17,78,94,68};\nint param0_4[] = {-98,-90,-60,-38,38,42};\nint param0_5[] = {1,0,0,1,1,1,1};\nint param0_6[] = {4,9,17,17,19,32,35,36,37,40,44,45,47,48,48,56,56,60,61,65,66,79,83,91,93,99};\nint param0_7[] = {78,82,-92,-46,-16,-64,28,60,64,52,54,-84,70,22,24,0,-14,20,-90,30,0,86,12,72,-64,-52,86,16,-42};\nint param0_8[] = {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};\nint param0_9[] = {81,77,6,3,72,24,75,47,17,29,69,15,15,50,30,83,11,7,59,7,12,82,45,76,9,48,98,49,29,66,3,53,37,13,72,58,37,87,55};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {8,34,11,35,3,3,22,25,25,34};\n int param2[] = {7,43,18,33,5,4,24,27,20,23};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "screen-4.9.0#layer_prep#LCursorVisibility.c", "codebase": "screen-4.9.0", "c_file": "layer.c", "function": "LCursorVisibility", "sloc": "12", "c_code": "void LCursorVisibility(struct layer *l, int vis)\n{\n struct canvas *cv;\n for (cv = l->l_cvlist; cv; cv = cv->c_lnext) {\n display = cv->c_display;\n if (display->d_blocked)\n continue;\n if (cv != display->d_forecv)\n continue;\n CursorVisibility(vis);\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 2}}, {"id": "json.h#allow_global_object_prep#utest_run_allow_global_object_read_write_minified_read.c", "codebase": "json.h", "c_file": "allow_global_object.c", "function": "utest_run_allow_global_object_read_write_minified_read", "sloc": "7", "c_code": "void utest_run_allow_global_object_read_write_minified_read(int *utest_result, struct allow_global_object *utest_fixture) {\n size_t size = 0;\n void *json = json_write_minified(utest_fixture->value, &size);\n free(utest_fixture->value);\n utest_fixture->value = json_parse(json, size - 1);\n free(json);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 2, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#DIFFERENCE_BETWEEN_HIGHEST_AND_LEAST_FREQUENCIES_IN_AN_ARRAY_prep#sort.c", "codebase": "transcoder-set", "c_file": "DIFFERENCE_BETWEEN_HIGHEST_AND_LEAST_FREQUENCIES_IN_AN_ARRAY.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_map_int32.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_map_int32", "sloc": "5", "c_code": "int binn_map_int32(void *map, int id) {\n int value;\n binn_map_get(map, id, 0x61, &value, ((void *)0));\n return value;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "ed-1.19#signal_prep#set_window_lines.c", "codebase": "ed-1.19", "c_file": "signal.c", "function": "set_window_lines", "sloc": "1", "c_code": "void set_window_lines( const int lines ) { window_lines_ = lines; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json-c#json_object_prep#json_object_new_null.c", "codebase": "json-c", "c_file": "json_object.c", "function": "json_object_new_null", "sloc": "4", "c_code": "struct json_object *json_object_new_null(void)\n{\n return ((void *)0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#buf_prep#xmlBufGrow.c", "codebase": "libxml2", "c_file": "buf.c", "function": "xmlBufGrow", "sloc": "12", "c_code": "int\nxmlBufGrow(xmlBufPtr buf, size_t len) {\n if ((buf == ((void *)0)) || (((buf)->flags & ((1u << 0) | (1u << 1)))) || (((buf)->flags & (1u << 2))))\n return(-1);\n if (buf->size != (size_t) buf->compat_size) if (buf->compat_size < 0x7fffffff) buf->size = buf->compat_size; if (buf->use != (size_t) buf->compat_use) if (buf->compat_use < 0x7fffffff) buf->use = buf->compat_use;\n if (len <= buf->size - buf->use)\n return(0);\n if (xmlBufGrowInternal(buf, len) < 0)\n return(-1);\n if (buf->size < 0x7fffffff) buf->compat_size = buf->size; else buf->compat_size = 0x7fffffff; if (buf->use < 0x7fffffff) buf->compat_use = buf->use; else buf->compat_use = 0x7fffffff;\n return(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "units-2.22#parse.tab_prep#makenumunit.c", "codebase": "units-2.22", "c_file": "parse.tab.c", "function": "makenumunit", "sloc": "13", "c_code": "struct unittype *\nmakenumunit(double num,int *myerr)\n{\n struct unittype *ret;\n ret=getnewunit();\n if (!ret){\n *myerr = 14;\n return 0;\n }\n ret->factor = num;\n *myerr = 0;\n return ret;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nano-7.2#history_prep#get_history_completion.c", "codebase": "nano-7.2", "c_file": "history.c", "function": "get_history_completion", "sloc": "30", "c_code": "char *get_history_completion(linestruct **here, char *string, size_t len)\n{\n linestruct *htop = ((void *)0), *hbot = ((void *)0);\n linestruct *item;\n if (*here == search_history) {\n htop = searchtop;\n hbot = searchbot;\n } else if (*here == replace_history) {\n htop = replacetop;\n hbot = replacebot;\n } else if (*here == execute_history) {\n htop = executetop;\n hbot = executebot;\n }\n item = find_in_history((*here)->prev, htop, string, len);\n while (item != ((void *)0) && strcmp(item->data, string) == 0)\n item = find_in_history(item->prev, htop, string, len);\n if (item) {\n *here = item;\n return mallocstrcpy(string, item->data);\n }\n item = find_in_history(hbot, *here, string, len);\n while (item != ((void *)0) && strcmp(item->data, string) == 0)\n item = find_in_history(item->prev, *here, string, len);\n if (item) {\n *here = item;\n return mallocstrcpy(string, item->data);\n }\n return (char *)string;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "json.h#test_prep#json_extract_value.c", "codebase": "json.h", "c_file": "test.c", "function": "json_extract_value", "sloc": "3", "c_code": "struct json_value_s *json_extract_value(const struct json_value_s *value) {\n return json_extract_value_ex(value, 0, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#proti_prep#fisendcmd.c", "codebase": "uucp-1.07", "c_file": "proti.c", "function": "fisendcmd", "sloc": "28", "c_code": "boolean\nfisendcmd (qdaemon, z, ilocal, iremote)\n struct sdaemon *qdaemon;\n const char *z;\n int ilocal;\n int iremote;\n{\n size_t clen;\n do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, (\"fisendcmd: Sending command \\\"%s\\\"\"), (z)); } while (0);\n clen = strlen (z);\n while ((1))\n {\n char *zpacket;\n size_t csize;\n zpacket = zigetspace (qdaemon, &csize);\n if (clen < csize)\n {\n memcpy (zpacket, z, clen + 1);\n return fisenddata (qdaemon, zpacket, clen + 1, ilocal, iremote,\n (long) -1);\n }\n memcpy (zpacket, z, csize);\n z += csize;\n clen -= csize;\n if (! fisenddata (qdaemon, zpacket, csize, ilocal, iremote, (long) -1))\n return (0);\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 2, "if_statement": 3, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tar-1.34#misc_prep#xpipe.c", "codebase": "tar-1.34", "c_file": "misc.c", "function": "xpipe", "sloc": "6", "c_code": "void\nxpipe (int fd[2])\n{\n if (pipe (fd) < 0)\n call_arg_fatal (\"pipe\", gettext (\"interprocess channel\"));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "patch-2.7.6#asnprintf_prep#asnprintf.c", "codebase": "patch-2.7.6", "c_file": "asnprintf.c", "function": "asnprintf", "sloc": "10", "c_code": "char *\nasnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)\n{\n va_list args;\n char *result;\n __builtin_va_start(args,format);\n result = vasnprintf (resultbuf, lengthp, format, args);\n __builtin_va_end(args);\n return result;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#display_prep#RedisplayDisplays.c", "codebase": "screen-4.9.0", "c_file": "display.c", "function": "RedisplayDisplays", "sloc": "9", "c_code": "void\nRedisplayDisplays(cur_only)\nint cur_only;\n{\n struct display *olddisplay = display;\n for (display = displays; display; display = display->d_next)\n Redisplay(cur_only);\n display = olddisplay;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "wget-1.21.4#utils_prep#compile_pcre2_regex.c", "codebase": "wget-1.21.4", "c_file": "utils.c", "function": "compile_pcre2_regex", "sloc": "13", "c_code": "void *\ncompile_pcre2_regex (const char *str)\n{\n int errornumber;\n size_t erroroffset;\n pcre2_code_8 *regex = pcre2_compile_8((PCRE2_SPTR8) str, (~(size_t)0), 0, &errornumber, &erroroffset, ((void *)0));\n if (! regex)\n {\n fprintf (stderr, gettext(\"Invalid regular expression %s, PCRE2 error %d\\n\"),\n quote (str), errornumber);\n }\n return regex;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathCastBooleanToNumber.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathCastBooleanToNumber", "sloc": "6", "c_code": "double\nxmlXPathCastBooleanToNumber(int val) {\n if (val)\n return(1.0);\n return(0.0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_route_prep#osip_route_parse.c", "codebase": "libosip2-5.3.1", "c_file": "osip_route.c", "function": "osip_route_parse", "sloc": "3", "c_code": "int osip_route_parse(osip_route_t *route, const char *hvalue) {\n return osip_from_parse((osip_from_t *) route, hvalue);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#misc_prep#Pl_Popcount.c", "codebase": "gprolog-1.5.0", "c_file": "misc.c", "function": "Pl_Popcount", "sloc": "32", "c_code": "int\nPl_Popcount(PlLong x)\n{\n static int nb_bits_in_byte[256] =\n { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3,\n 4, 2, 3, 3, 4, 3, 4, 4, 5,\n 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5,\n 3, 4, 4, 5, 4, 5, 5, 6,\n 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5,\n 3, 4, 4, 5, 4, 5, 5, 6,\n 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6,\n 4, 5, 5, 6, 5, 6, 6, 7,\n 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5,\n 3, 4, 4, 5, 4, 5, 5, 6,\n 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6,\n 4, 5, 5, 6, 5, 6, 6, 7,\n 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6,\n 4, 5, 5, 6, 5, 6, 6, 7,\n 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7,\n 5, 6, 6, 7, 6, 7, 7, 8\n };\n int n = 0;\n n += nb_bits_in_byte[x & 0xFF];\n n += nb_bits_in_byte[(x >> 8) & 0xFF];\n n += nb_bits_in_byte[(x >> 16) & 0xFF];\n n += nb_bits_in_byte[(x >> 24) & 0xFF];\n n += nb_bits_in_byte[(x >> 32) & 0xFF];\n n += nb_bits_in_byte[(x >> 40) & 0xFF];\n n += nb_bits_in_byte[(x >> 48) & 0xFF];\n n += nb_bits_in_byte[(x >> 56) & 0xFF];\n return n;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bc-1.07.1#misc_prep#dc_system.c", "codebase": "bc-1.07.1", "c_file": "misc.c", "function": "dc_system", "sloc": "20", "c_code": "const char *\ndc_system (\n const char *s )\n{\n const char *p;\n char *tmpstr;\n size_t len;\n p = strchr(s, '\\n');\n if (p != ((void *)0)) {\n len = (size_t) (p - s);\n tmpstr = dc_malloc(len + 1);\n strncpy(tmpstr, s, len);\n tmpstr[len] = '\\0';\n system(tmpstr);\n free(tmpstr);\n return p + 1;\n }\n system(s);\n return s + strlen(s);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#HOW_TO_PRINT_MAXIMUM_NUMBER_OF_A_USING_GIVEN_FOUR_KEYS_prep#len.c", "codebase": "transcoder-set", "c_file": "HOW_TO_PRINT_MAXIMUM_NUMBER_OF_A_USING_GIVEN_FOUR_KEYS.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#modelu_prep#IsOutput.c", "codebase": "mcsim-6.2.0", "c_file": "modelu.c", "function": "IsOutput", "sloc": "4", "c_code": "BOOL IsOutput (HVAR hvar)\n{\n return (GetVarType(hvar) == 0x30000);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "units-2.22#units_prep#fgetscont.c", "codebase": "units-2.22", "c_file": "units.c", "function": "fgetscont", "sloc": "20", "c_code": "char *\nfgetscont(char *buf, int size, FILE *file, int *count)\n{\n if (!fgets(buf,size,file))\n return 0;\n (*count)++;\n while(strlen(buf)>=2 && 0==strcmp(buf+strlen(buf)-2,\"\\\\\\n\")){\n (*count)++;\n buf[strlen(buf)-2] = 0;\n if (strlen(buf)>=size-1)\n return buf;\n if (!fgets(buf+strlen(buf), size - strlen(buf), file))\n return buf;\n }\n if ((*((buf)+strlen(buf)-1)) == '\\\\') {\n ungetc('\\\\', file);\n (*((buf)+strlen(buf)-1)) = 0;\n }\n return buf;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#matutil_prep#InitlMatrix.c", "codebase": "mcsim-6.2.0", "c_file": "matutil.c", "function": "InitlMatrix", "sloc": "20", "c_code": "long **InitlMatrix (long cVectors, long cElemsEach)\n{\n register long i;\n long **rgp;\n if ((cVectors == 0) || (cElemsEach == 0)) {\n printf (\"Error: zero length array allocation in InitlMatrix - Exiting\\n\");\n exit (0);\n }\n rgp = (long **) malloc (cVectors * sizeof(long *));\n if (rgp) {\n for (i = 0; i < cVectors; i++) {\n rgp[i] = (long *) malloc (cElemsEach * sizeof(long));\n if (!rgp[i]) {\n rgp = 0;\n break;\n }\n }\n }\n return (rgp);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 2, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "tmux#arguments_prep#args_has.c", "codebase": "tmux", "c_file": "arguments.c", "function": "args_has", "sloc": "5", "c_code": "int\nargs_has(struct args *args, u_char ch)\n{\n return (args_find(args, ch) != ((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_PATTERNS_101_GIVEN_STRING_prep#main.c", "codebase": "transcoder-set", "c_file": "FIND_PATTERNS_101_GIVEN_STRING.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n char param0[][100] = {\"fkyso nGZSLfhj\",\"3841\",\"0100001110111\",\"zXZkptcbnQot\",\"4364264685264\",\"10\",\"wDgox\",\"1215572\",\"1\",\"bftZvRTamdUvL\"};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#MINIMUM_TIME_WRITE_CHARACTERS_USING_INSERT_DELETE_COPY_OPERATION_prep#max.c", "codebase": "transcoder-set", "c_file": "MINIMUM_TIME_WRITE_CHARACTERS_USING_INSERT_DELETE_COPY_OPERATION.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_atr_ref.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_atr_ref", "sloc": "20", "c_code": "int ti_atr_ref(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const int period = (int)options[0];\n if (period < 1) return 1;\n if (size <= ti_atr_start(options)) return 0;\n const int tr_start = ti_tr_start(options);\n const int tr_size = size - tr_start;\n double *truerange = malloc((unsigned int)tr_size * sizeof(double));\n if (!truerange) {return 2;}\n double *tr_outputs[1] = {truerange};\n const int tr_ret = ti_tr(size, inputs, 0, tr_outputs);\n if (tr_ret != 0) {\n free(truerange);\n return tr_ret;\n }\n const double *wilders_inputs[1] = {truerange};\n const int wilders_ret = ti_wilders(tr_size, wilders_inputs, options, outputs);\n free(truerange);\n ((void) sizeof ((size - ti_atr_start(options) == size - ti_wilders_start(options)) ? 1 : 0), __extension__ ({ if (size - ti_atr_start(options) == size - ti_wilders_start(options)) ; else __assert_fail (\"size - ti_atr_start(options) == size - ti_wilders_start(options)\", \"tiamalgamation.c\", 1931, __extension__ __PRETTY_FUNCTION__); }));\n return wilders_ret;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 3, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlSetNs.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlSetNs", "sloc": "14", "c_code": "PyObject *\nlibxml_xmlSetNs(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlNodePtr node;\n PyObject *pyobj_node;\n xmlNsPtr ns;\n PyObject *pyobj_ns;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"OO:xmlSetNs\", &pyobj_node, &pyobj_ns))\n return(((void *)0));\n node = (xmlNodePtr) (((pyobj_node) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_node))->obj));\n ns = (xmlNsPtr) (((pyobj_ns) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_ns))->obj));\n xmlSetNs(node, ns);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#fat-x86_64_prep#nettle_aes256_decrypt.c", "codebase": "nettle-3.9.1", "c_file": "fat-x86_64.c", "function": "nettle_aes256_decrypt", "sloc": "1", "c_code": "void nettle_aes256_decrypt (const struct aes256_ctx *ctx, size_t length, uint8_t *dst,const uint8_t *src) { return nettle_aes256_decrypt_vec (ctx, length, dst, src); }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#dynarray_finalize_prep#__libc_dynarray_finalize.c", "codebase": "gawk-5.2.2", "c_file": "dynarray_finalize.c", "function": "__libc_dynarray_finalize", "sloc": "30", "c_code": "_Bool\n__libc_dynarray_finalize (struct dynarray_header *list,\n void *scratch, size_t element_size,\n struct dynarray_finalize_result *result)\n{\n if (__dynarray_error (list))\n return 0;\n size_t used = list->used;\n if (used == 0)\n {\n if (list->array != scratch)\n pma_free (list->array);\n *result = (struct dynarray_finalize_result) { ((void *)0), 0 };\n return 1;\n }\n size_t allocation_size = used * element_size;\n void *heap_array = pma_malloc (allocation_size);\n if (heap_array != ((void *)0))\n {\n if (list->array != ((void *)0))\n memcpy (heap_array, list->array, allocation_size);\n if (list->array != scratch)\n pma_free (list->array);\n *result = (struct dynarray_finalize_result)\n { .array = heap_array, .length = used };\n return 1;\n }\n else\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 1, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_CIRCUMFERENCE_PARALLELOGRAM_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "PROGRAM_CIRCUMFERENCE_PARALLELOGRAM.c", "function": "f_gold", "sloc": "3", "c_code": "float f_gold ( float a, float b ) {\n return ( ( 2 * a ) + ( 2 * b ) );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FLOOR_IN_A_SORTED_ARRAY_prep#sort.c", "codebase": "transcoder-set", "c_file": "FLOOR_IN_A_SORTED_ARRAY.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_ROTATION_COUNT_ROTATED_SORTED_ARRAY_1_prep#main.c", "codebase": "transcoder-set", "c_file": "FIND_ROTATION_COUNT_ROTATED_SORTED_ARRAY_1.c", "function": "main", "sloc": "26", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {4,16,38,39,48,74,79};\nint param0_1[] = {-46,72,72,-66,96,92,40,8,94,-84,6,-90,38,-6,48,-20,-86,-76,88,-50,-44,-14,54,-6,-2,72,8,-64,-46,44,-88,50,86,38,42,-56};\nint param0_2[] = {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};\nint param0_3[] = {48,74,59,57,95,11,25,61,46,54,34,84,7,97,62,57,99,93,76,5,76,93,35,84,37,60,65,16,30,73,42,61,74,77,48,62,84,93,64,57,68,46,28,77};\nint param0_4[] = {-72,-68,-66,-66,-62,-62,-52,-48,-42,-42,-42,-38,-30,-22,-20,-20,-16,-16,-14,0,2,2,2,4,12,20,22,26,32,34,46,46,64,64,64,66,68,68,68,74,80,84,84,88,88,90,96,98};\nint param0_5[] = {1};\nint param0_6[] = {7,11,20,21,22,27,30,30,34,35,36,37,38,60,61,63,63,69,70,75,80,84,88,97};\nint param0_7[] = {-2,70,-40};\nint param0_8[] = {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};\nint param0_9[] = {71,71,27,10,97,43,55,71,6,6,77,48,77,2,83,51,61,19,2,51,26,70,20,23,54,15,6,92,35,75,8,57,50,49,88,21,36};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {6,32,16,24,29,0,23,2,30,24};\n int param2[] = {6,21,29,26,43,0,22,1,17,22};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "nettle-3.9.1#chacha-set-nonce_prep#nettle_chacha_set_counter32.c", "codebase": "nettle-3.9.1", "c_file": "chacha-set-nonce.c", "function": "nettle_chacha_set_counter32", "sloc": "5", "c_code": "void\nnettle_chacha_set_counter32(struct chacha_ctx *ctx, const uint8_t *counter)\n{\n ctx->state[12] = ( (((uint32_t) (counter + 0)[3]) << 24) | (((uint32_t) (counter + 0)[2]) << 16) | (((uint32_t) (counter + 0)[1]) << 8) | ((uint32_t) (counter + 0)[0]));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#TAIL_RECURSION_prep#main.c", "codebase": "transcoder-set", "c_file": "TAIL_RECURSION.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {77,62,42,16,82,37,29,32,82,91};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR_prep#len.c", "codebase": "transcoder-set", "c_file": "PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#paxerror_prep#rmdir_error.c", "codebase": "tar-1.34", "c_file": "paxerror.c", "function": "rmdir_error", "sloc": "5", "c_code": "void\nrmdir_error (char const *name)\n{\n call_arg_error (\"rmdir\", name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#read_c_prep#Pl_Char_Conversion_2.c", "codebase": "gprolog-1.5.0", "c_file": "read_c.c", "function": "Pl_Char_Conversion_2", "sloc": "8", "c_code": "void\nPl_Char_Conversion_2(WamWord in_char_word, WamWord out_char_word)\n{\n int c_in, c_out;\n c_in = Pl_Rd_Char_Check(in_char_word);\n c_out = Pl_Rd_Char_Check(out_char_word);\n pl_char_conv[c_in] = c_out;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "indent-2.2.13#handletoken_prep#check_code_size.c", "codebase": "indent-2.2.13", "c_file": "handletoken.c", "function": "check_code_size", "sloc": "11", "c_code": "extern void check_code_size(void)\n{\n if (e_code >= l_code)\n {\n int nsize = l_code - s_code + 400;\n codebuf = xrealloc(codebuf, nsize);\n e_code = codebuf + (e_code - s_code) + 1;\n l_code = codebuf + nsize - 5;\n s_code = codebuf + 1;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#paxerror_prep#seek_error.c", "codebase": "tar-1.34", "c_file": "paxerror.c", "function": "seek_error", "sloc": "5", "c_code": "void\nseek_error (char const *name)\n{\n call_arg_error (\"seek\", name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MAXIMUM_HEIGHT_PYRAMID_FROM_THE_GIVEN_ARRAY_OF_OBJECTS_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "FIND_MAXIMUM_HEIGHT_PYRAMID_FROM_THE_GIVEN_ARRAY_OF_OBJECTS.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#random_prep#CalcCumulative.c", "codebase": "mcsim-6.2.0", "c_file": "random.c", "function": "CalcCumulative", "sloc": "25", "c_code": "void CalcCumulative (long cDim, double *rg_x, double *rg_pdf,\n double *rg_Cdf, int iOrder)\n{\n long i;\n if (iOrder > 1) {\n printf (\"CalcCumulative: Order %d not supported\"\n \"-> using piecewise-linear\\n\", iOrder);\n iOrder = 1;\n }\n rg_Cdf[0] = 0.0;\n switch (iOrder) {\n case 0:\n for (i = 1; i < cDim; i++)\n rg_Cdf[i] = rg_Cdf[i-1] + rg_pdf[i]*(rg_x[i] - rg_x[i-1]);\n break;\n case 1:\n for (i = 1; i < cDim; i++)\n rg_Cdf[i] = rg_Cdf[i-1] + ((rg_x[i] - rg_x[i - 1]) *\n (rg_pdf[i] + rg_pdf[i - 1]) / 2);\n break;\n default:\n ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail (\"0\", \"random.c\", 1476, __extension__ __PRETTY_FUNCTION__); }));\n break;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 2, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 3}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlXPathRegisteredVariablesCleanup.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlXPathRegisteredVariablesCleanup", "sloc": "11", "c_code": "PyObject *\nlibxml_xmlXPathRegisteredVariablesCleanup(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlXPathContextPtr ctxt;\n PyObject *pyobj_ctxt;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlXPathRegisteredVariablesCleanup\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlXPathContextPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlXPathContext_Object *)(pyobj_ctxt))->obj));\n xmlXPathRegisteredVariablesCleanup(ctxt);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlLastElementChild.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlLastElementChild", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlLastElementChild(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlNodePtr c_retval;\n xmlNodePtr parent;\n PyObject *pyobj_parent;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlLastElementChild\", &pyobj_parent))\n return(((void *)0));\n parent = (xmlNodePtr) (((pyobj_parent) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_parent))->obj));\n c_retval = xmlLastElementChild(parent);\n py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_stderr_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_stderr_start", "sloc": "3", "c_code": "int ti_stderr_start(double const *options) {\n return (int)options[0]-1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "hello-2.12.1#quotearg_prep#quotearg_alloc.c", "codebase": "hello-2.12.1", "c_file": "quotearg.c", "function": "quotearg_alloc", "sloc": "6", "c_code": "char *\nquotearg_alloc (char const *arg, size_t argsize,\n struct quoting_options const *o)\n{\n return quotearg_alloc_mem (arg, argsize, ((void *)0), o);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_HIGH_EFFORT_VS_LOW_EFFORT_TASKS_PROBLEM_prep#max.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_HIGH_EFFORT_VS_LOW_EFFORT_TASKS_PROBLEM.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_OF_ALL_PROPER_DIVISORS_OF_A_NATURAL_NUMBER_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "SUM_OF_ALL_PROPER_DIVISORS_OF_A_NATURAL_NUMBER.c", "function": "f_gold", "sloc": "12", "c_code": "int f_gold ( int num ) {\n int result = 0;\n for ( int i = 2;\n i <= sqrt ( num );\n i ++ ) {\n if ( num % i == 0 ) {\n if ( i == ( num / i ) ) result += i;\n else result += ( i + num / i );\n }\n }\n return ( result + 1 );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_SERIES_ALTERNATE_SIGNED_SQUARES_AP_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "SUM_SERIES_ALTERNATE_SIGNED_SQUARES_AP.c", "function": "f_gold", "sloc": "10", "c_code": "int f_gold ( int n, int a [ ] ) {\n int res = 0;\n for ( int i = 0;\n i < 2 * n;\n i ++ ) {\n if ( i % 2 == 0 ) res += a [ i ] * a [ i ];\n else res -= a [ i ] * a [ i ];\n }\n return res;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cpio-2.14#dstring_prep#ds_fgetstr.c", "codebase": "cpio-2.14", "c_file": "dstring.c", "function": "ds_fgetstr", "sloc": "17", "c_code": "char *\nds_fgetstr (FILE *f, dynamic_string *s, char eos)\n{\n int next_ch;\n s->ds_idx = 0;\n while ((next_ch = getc (f)) != eos && next_ch != (-1))\n {\n ds_resize (s, 0);\n s->ds_string[s->ds_idx++] = next_ch;\n }\n ds_resize (s, 0);\n s->ds_string[s->ds_idx] = '\\0';\n if (s->ds_idx == 0 && next_ch == (-1))\n return ((void *)0);\n else\n return s->ds_string;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_OF_BINARY_TREES_FOR_GIVEN_PREORDER_SEQUENCE_LENGTH_prep#sort.c", "codebase": "transcoder-set", "c_file": "NUMBER_OF_BINARY_TREES_FOR_GIVEN_PREORDER_SEQUENCE_LENGTH.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MEDIAN_OF_TWO_SORTED_ARRAYS_prep#min.c", "codebase": "transcoder-set", "c_file": "MEDIAN_OF_TWO_SORTED_ARRAYS.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#fdleak_prep#remember_non_cloexec_fds.c", "codebase": "findutils-4.9.0", "c_file": "fdleak.c", "function": "remember_non_cloexec_fds", "sloc": "13", "c_code": "void\nremember_non_cloexec_fds (void)\n{\n int max_fd = get_max_fd ();\n struct remember_fd_context cb_data;\n cb_data.buf = ((void *)0);\n cb_data.used = cb_data.allocated = 0;\n if (max_fd < 0x7fffffff)\n ++max_fd;\n visit_open_fds (0, max_fd, remember_fd_if_non_cloexec, &cb_data);\n non_cloexec_fds = cb_data.buf;\n num_cloexec_fds = cb_data.used;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "make-4.4.1#function_prep#patsubst_expand.c", "codebase": "make-4.4.1", "c_file": "function.c", "function": "patsubst_expand", "sloc": "12", "c_code": "char *\npatsubst_expand (char *o, const char *text, char *pattern, char *replace)\n{\n const char *pattern_percent = find_percent (pattern);\n const char *replace_percent = find_percent (replace);\n if (replace_percent)\n ++replace_percent;\n if (pattern_percent)\n ++pattern_percent;\n return patsubst_expand_pat (o, text, pattern, replace,\n pattern_percent, replace_percent);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cflow-1.7#symbol_prep#clear_starters.c", "codebase": "cflow-1.7", "c_file": "symbol.c", "function": "clear_starters", "sloc": "5", "c_code": "void\nclear_starters(void)\n{\n linked_list_destroy(&start_symbol_list);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#pattern_prep#xmlStreamWantsAnyNode.c", "codebase": "libxml2", "c_file": "pattern.c", "function": "xmlStreamWantsAnyNode", "sloc": "12", "c_code": "int\nxmlStreamWantsAnyNode(xmlStreamCtxtPtr streamCtxt)\n{\n if (streamCtxt == ((void *)0))\n return(-1);\n while (streamCtxt != ((void *)0)) {\n if (streamCtxt->comp->flags & 1<<14)\n return(1);\n streamCtxt = streamCtxt->next;\n }\n return(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "json.h#allow_simplified_json_prep#utest_run_allow_simplified_json_read_write_pretty_read.c", "codebase": "json.h", "c_file": "allow_simplified_json.c", "function": "utest_run_allow_simplified_json_read_write_pretty_read", "sloc": "7", "c_code": "void utest_run_allow_simplified_json_read_write_pretty_read(int *utest_result, struct allow_simplified_json *utest_fixture) {\n size_t size = 0;\n void *json = json_write_pretty(utest_fixture->value, \" \", \"\\n\", &size);\n free(utest_fixture->value);\n utest_fixture->value = json_parse(json, size - 1);\n free(json);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 2, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_PERIMETER_N_BLOCKS_prep#main.c", "codebase": "transcoder-set", "c_file": "MINIMUM_PERIMETER_N_BLOCKS.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {45,80,54,48,83,68,32,20,68,66};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "gawk-5.2.2#regex_prep#re_compile_fastmap.c", "codebase": "gawk-5.2.2", "c_file": "regex.c", "function": "re_compile_fastmap", "sloc": "16", "c_code": "int\nre_compile_fastmap (struct re_pattern_buffer *bufp)\n{\n re_dfa_t *dfa = bufp->buffer;\n char *fastmap = bufp->fastmap;\n memset (fastmap, '\\0', sizeof (char) * ((0x7f * 2 + 1) + 1));\n re_compile_fastmap_iter (bufp, dfa->init_state, fastmap);\n if (dfa->init_state != dfa->init_state_word)\n re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap);\n if (dfa->init_state != dfa->init_state_nl)\n re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap);\n if (dfa->init_state != dfa->init_state_begbuf)\n re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap);\n bufp->fastmap_accurate = 1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#utils_prep#nmalloc.c", "codebase": "nano-7.2", "c_file": "utils.c", "function": "nmalloc", "sloc": "7", "c_code": "void *nmalloc(size_t howmuch)\n{\n void *section = malloc(howmuch);\n if (section == ((void *)0))\n die(gettext(\"Nano is out of memory!\\n\"));\n return section;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#stream_supp_prep#Pl_Term_Write_Str_Stream.c", "codebase": "gprolog-1.5.0", "c_file": "stream_supp.c", "function": "Pl_Term_Write_Str_Stream", "sloc": "8", "c_code": "char *\nPl_Term_Write_Str_Stream(int stm)\n{\n StrSInf *str_stream;\n str_stream = (StrSInf *) (pl_stm_tbl[stm]->file);\n *(str_stream->ptr) = '\\0';\n return str_stream->buff;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngrutil_prep#png_get_uint_16.c", "codebase": "optipng-0.7.8", "c_file": "pngrutil.c", "function": "png_get_uint_16", "sloc": "8", "c_code": "png_uint_16 (\npng_get_uint_16)(png_const_bytep buf)\n{\n unsigned int val =\n ((unsigned int)(*buf) << 8) +\n ((unsigned int)(*(buf + 1)));\n return (png_uint_16)val;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#buffer_prep#nettle_buffer_init_size.c", "codebase": "nettle-3.9.1", "c_file": "buffer.c", "function": "nettle_buffer_init_size", "sloc": "10", "c_code": "void\nnettle_buffer_init_size(struct nettle_buffer *buffer,\n size_t length, uint8_t *space)\n{\n buffer->contents = space;\n buffer->alloc = length;\n buffer->realloc = ((void *)0);\n buffer->realloc_ctx = ((void *)0);\n buffer->size = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SQUARE_ROOT_OF_AN_INTEGER_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "SQUARE_ROOT_OF_AN_INTEGER_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#dict_prep#xmlDictComputeHash.c", "codebase": "libxml2", "c_file": "dict.c", "function": "xmlDictComputeHash", "sloc": "5", "c_code": "unsigned\nxmlDictComputeHash(const xmlDict *dict, const xmlChar *string) {\n size_t len;\n return(xmlDictHashName(dict->seed, string, ((size_t) -1), &len));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_trix_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_trix_start", "sloc": "4", "c_code": "int ti_trix_start(double const *options) {\n const int period = (int)options[0];\n return ((period-1)*3)+1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#process_prep#FindCommnr.c", "codebase": "screen-4.9.0", "c_file": "process.c", "function": "FindCommnr", "sloc": "18", "c_code": "int\nFindCommnr(str)\nconst char *str;\n{\n int x, m, l = 0, r = 189;\n while (l <= r)\n {\n m = (l + r) / 2;\n x = strcmp(str, comms[m].name);\n if (x > 0)\n l = m + 1;\n else if (x < 0)\n r = m - 1;\n else\n return m;\n }\n return -1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_htmlIsScriptAttribute.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_htmlIsScriptAttribute", "sloc": "11", "c_code": "PyObject *\nlibxml_htmlIsScriptAttribute(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlChar * name;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"z:htmlIsScriptAttribute\", &name))\n return(((void *)0));\n c_retval = htmlIsScriptAttribute(name);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_single_quoted_strings_prep#json_extract_value_ex.c", "codebase": "json.h", "c_file": "allow_single_quoted_strings.c", "function": "json_extract_value_ex", "sloc": "23", "c_code": "struct json_value_s *json_extract_value_ex(const struct json_value_s *value,\n void *(*alloc_func_ptr)(void *,\n size_t),\n void *user_data) {\n void *allocation;\n struct json_extract_result_s result;\n struct json_extract_state_s state;\n size_t total_size;\n if (0 == value) {\n return 0;\n }\n result = json_extract_get_value_size(value);\n total_size = result.dom_size + result.data_size;\n if (0 == alloc_func_ptr) {\n allocation = malloc(total_size);\n } else {\n allocation = alloc_func_ptr(user_data, total_size);\n }\n state.dom = (char *)allocation;\n state.data = state.dom + result.dom_size;\n json_extract_copy_value(&state, value);\n return (struct json_value_s *)allocation;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 2, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Rd_Float_Check.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Rd_Float_Check", "sloc": "11", "c_code": "double\nPl_Rd_Float_Check(WamWord start_word)\n{\n WamWord word, tag_mask;\n do { WamWord deref_last_word; word = start_word; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0);\n if (tag_mask == (PlULong)0)\n Pl_Err_Instantiation();\n if (tag_mask != (PlULong)0x4)\n Pl_Err_Type(pl_type_float, word);\n return Pl_Obtain_Float(((WamWord *) ((word) & (PlULong)0xfffffffffffffff8)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "bzip2#bzip2_prep#main.c", "codebase": "bzip2", "c_file": "bzip2.c", "function": "main", "sloc": "207", "c_code": "IntNative main ( IntNative argc, Char *argv[] )\n{\n Int32 i, j;\n Char *tmp;\n Cell *argList;\n Cell *aa;\n Bool decode;\n if (sizeof(Int32) != 4 || sizeof(UInt32) != 4 ||\n sizeof(Int16) != 2 || sizeof(UInt16) != 2 ||\n sizeof(Char) != 1 || sizeof(UChar) != 1)\n configError();\n outputHandleJustInCase = ((void *)0);\n smallMode = ((Bool)0);\n keepInputFiles = ((Bool)0);\n forceOverwrite = ((Bool)0);\n noisy = ((Bool)1);\n verbosity = 0;\n blockSize100k = 9;\n testFailsExist = ((Bool)0);\n unzFailsExist = ((Bool)0);\n numFileNames = 0;\n numFilesProcessed = 0;\n workFactor = 30;\n deleteOutputOnInterrupt = ((Bool)0);\n exitValue = 0;\n i = j = 0;\n signal (11, mySIGSEGVorSIGBUScatcher);\n signal (7, mySIGSEGVorSIGBUScatcher);\n copyFileName ( inName, (Char*)\"(none)\" );\n copyFileName ( outName, (Char*)\"(none)\" );\n copyFileName ( progNameReally, argv[0] );\n progName = &progNameReally[0];\n for (tmp = &progNameReally[0]; *tmp != '\\0'; tmp++)\n if (*tmp == '/') progName = tmp + 1;\n argList = ((void *)0);\n addFlagsFromEnvVar ( &argList, (Char*)\"BZIP2\" );\n addFlagsFromEnvVar ( &argList, (Char*)\"BZIP\" );\n for (i = 1; i <= argc-1; i++)\n argList=snocString((argList), (argv[i]));\n longestFileName = 7;\n numFileNames = 0;\n decode = ((Bool)1);\n for (aa = argList; aa != ((void *)0); aa = aa->link) {\n if ((strcmp(aa->name, (\"--\"))==0)) { decode = ((Bool)0); continue; }\n if (aa->name[0] == '-' && decode) continue;\n numFileNames++;\n if (longestFileName < (Int32)strlen(aa->name) )\n longestFileName = (Int32)strlen(aa->name);\n }\n if (numFileNames == 0)\n srcMode = 1; else srcMode = 3;\n opMode = 1;\n if ( (strstr ( progName, \"unzip\" ) != 0) ||\n (strstr ( progName, \"UNZIP\" ) != 0) )\n opMode = 2;\n if ( (strstr ( progName, \"z2cat\" ) != 0) ||\n (strstr ( progName, \"Z2CAT\" ) != 0) ||\n (strstr ( progName, \"zcat\" ) != 0) ||\n (strstr ( progName, \"ZCAT\" ) != 0) ) {\n opMode = 2;\n srcMode = (numFileNames == 0) ? 1 : 2;\n }\n for (aa = argList; aa != ((void *)0); aa = aa->link) {\n if ((strcmp(aa->name, (\"--\"))==0)) break;\n if (aa->name[0] == '-' && aa->name[1] != '-') {\n for (j = 1; aa->name[j] != '\\0'; j++) {\n switch (aa->name[j]) {\n case 'c': srcMode = 2; break;\n case 'd': opMode = 2; break;\n case 'z': opMode = 1; break;\n case 'f': forceOverwrite = ((Bool)1); break;\n case 't': opMode = 3; break;\n case 'k': keepInputFiles = ((Bool)1); break;\n case 's': smallMode = ((Bool)1); break;\n case 'q': noisy = ((Bool)0); break;\n case '1': blockSize100k = 1; break;\n case '2': blockSize100k = 2; break;\n case '3': blockSize100k = 3; break;\n case '4': blockSize100k = 4; break;\n case '5': blockSize100k = 5; break;\n case '6': blockSize100k = 6; break;\n case '7': blockSize100k = 7; break;\n case '8': blockSize100k = 8; break;\n case '9': blockSize100k = 9; break;\n case 'V':\n case 'L': license(); break;\n case 'v': verbosity++; break;\n case 'h': usage ( progName );\n exit ( 0 );\n break;\n default: fprintf ( stderr, \"%s: Bad flag `%s'\\n\",\n progName, aa->name );\n usage ( progName );\n exit ( 1 );\n break;\n }\n }\n }\n }\n for (aa = argList; aa != ((void *)0); aa = aa->link) {\n if ((strcmp(aa->name, (\"--\"))==0)) break;\n if ((strcmp(aa->name, (\"--stdout\"))==0)) srcMode = 2; else\n if ((strcmp(aa->name, (\"--decompress\"))==0)) opMode = 2; else\n if ((strcmp(aa->name, (\"--compress\"))==0)) opMode = 1; else\n if ((strcmp(aa->name, (\"--force\"))==0)) forceOverwrite = ((Bool)1); else\n if ((strcmp(aa->name, (\"--test\"))==0)) opMode = 3; else\n if ((strcmp(aa->name, (\"--keep\"))==0)) keepInputFiles = ((Bool)1); else\n if ((strcmp(aa->name, (\"--small\"))==0)) smallMode = ((Bool)1); else\n if ((strcmp(aa->name, (\"--quiet\"))==0)) noisy = ((Bool)0); else\n if ((strcmp(aa->name, (\"--version\"))==0)) license(); else\n if ((strcmp(aa->name, (\"--license\"))==0)) license(); else\n if ((strcmp(aa->name, (\"--exponential\"))==0)) workFactor = 1; else\n if ((strcmp(aa->name, (\"--repetitive-best\"))==0)) redundant(aa->name); else\n if ((strcmp(aa->name, (\"--repetitive-fast\"))==0)) redundant(aa->name); else\n if ((strcmp(aa->name, (\"--fast\"))==0)) blockSize100k = 1; else\n if ((strcmp(aa->name, (\"--best\"))==0)) blockSize100k = 9; else\n if ((strcmp(aa->name, (\"--verbose\"))==0)) verbosity++; else\n if ((strcmp(aa->name, (\"--help\"))==0)) { usage ( progName ); exit ( 0 ); }\n else\n if (strncmp ( aa->name, \"--\", 2) == 0) {\n fprintf ( stderr, \"%s: Bad flag `%s'\\n\", progName, aa->name );\n usage ( progName );\n exit ( 1 );\n }\n }\n if (verbosity > 4) verbosity = 4;\n if (opMode == 1 && smallMode && blockSize100k > 2)\n blockSize100k = 2;\n if (opMode == 3 && srcMode == 2) {\n fprintf ( stderr, \"%s: -c and -t cannot be used together.\\n\",\n progName );\n exit ( 1 );\n }\n if (srcMode == 2 && numFileNames == 0)\n srcMode = 1;\n if (opMode != 1) blockSize100k = 0;\n if (srcMode == 3) {\n signal (2, mySignalCatcher);\n signal (15, mySignalCatcher);\n signal (1, mySignalCatcher);\n }\n if (opMode == 1) {\n if (srcMode == 1) {\n compress ( ((void *)0) );\n } else {\n decode = ((Bool)1);\n for (aa = argList; aa != ((void *)0); aa = aa->link) {\n if ((strcmp(aa->name, (\"--\"))==0)) { decode = ((Bool)0); continue; }\n if (aa->name[0] == '-' && decode) continue;\n numFilesProcessed++;\n compress ( aa->name );\n }\n }\n }\n else\n if (opMode == 2) {\n unzFailsExist = ((Bool)0);\n if (srcMode == 1) {\n uncompress ( ((void *)0) );\n } else {\n decode = ((Bool)1);\n for (aa = argList; aa != ((void *)0); aa = aa->link) {\n if ((strcmp(aa->name, (\"--\"))==0)) { decode = ((Bool)0); continue; }\n if (aa->name[0] == '-' && decode) continue;\n numFilesProcessed++;\n uncompress ( aa->name );\n }\n }\n if (unzFailsExist) {\n setExit(2);\n exit(exitValue);\n }\n }\n else {\n testFailsExist = ((Bool)0);\n if (srcMode == 1) {\n testf ( ((void *)0) );\n } else {\n decode = ((Bool)1);\n for (aa = argList; aa != ((void *)0); aa = aa->link) {\n if ((strcmp(aa->name, (\"--\"))==0)) { decode = ((Bool)0); continue; }\n if (aa->name[0] == '-' && decode) continue;\n numFilesProcessed++;\n testf ( aa->name );\n }\n }\n if (testFailsExist) {\n if (noisy) {\n fprintf ( stderr,\n \"\\n\"\n \"You can use the `bzip2recover' program to attempt to recover\\n\"\n \"data from undamaged sections of corrupted files.\\n\\n\"\n );\n }\n setExit(2);\n exit(exitValue);\n }\n }\n aa = argList;\n while (aa != ((void *)0)) {\n Cell* aa2 = aa->link;\n if (aa->name != ((void *)0)) free(aa->name);\n free(aa);\n aa = aa2;\n }\n return exitValue;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 13, "memory_management": 2, "memory_operation": 0, "if_statement": 50, "for_loop": 9, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 31}}, {"id": "rcs-5.10.1#b-excwho_prep#nosetid.c", "codebase": "rcs-5.10.1", "c_file": "b-excwho.c", "function": "nosetid", "sloc": "5", "c_code": "void\nnosetid (void)\n{\n (top->behavior. stick_with_euid) = 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "less-633#line_prep#skip_ansi.c", "codebase": "less-633", "c_file": "line.c", "function": "skip_ansi", "sloc": "7", "c_code": "void skip_ansi(struct ansi_state *pansi, char **pp, const char *limit)\n{\n LWCHAR c;\n do {\n c = step_char(pp, +1, limit);\n } while (*pp < limit && ansi_step(pansi, c) == 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "units-2.22#units_prep#readunits.c", "codebase": "units-2.22", "c_file": "units.c", "function": "readunits", "sloc": "282", "c_code": "int\nreadunits(char *file, FILE *errfile,\n int *unitcount, int *prefixcount, int *funccount, int depth)\n{\n FILE *unitfile;\n char *line = 0, *lineptr, *unitdef, *unitname, *permfile;\n int linenum, linebufsize, goterr, retcode;\n int locunitcount, locprefixcount, locfunccount, redefinition;\n int wronglocale = 0;\n int inlocale = 0;\n int in_utf8 = 0;\n int invar = 0;\n int wrongvar = 0;\n locunitcount = 0;\n locprefixcount = 0;\n locfunccount = 0;\n linenum = 0;\n linebufsize = 0;\n goterr = 0;\n unitfile = openfile(file, \"rt\");\n if (!unitfile){\n if (errfile)\n fprintf(errfile, \"%s: Unable to read units file '%s': %s\\n\", progname, file, strerror((*__errno_location ())));\n return 16;\n }\n growbuffer(&line,&linebufsize);\n permfile = dupstr(file);\n while (!feof(unitfile)) {\n if (!fgetslong(&line, &linebufsize, unitfile, &linenum))\n break;\n if (linenum==1 && (!strncmp(line, \"\\xEF\\xBB\\xBF\", strlen(\"\\xEF\\xBB\\xBF\")))){\n int i;\n for(lineptr=line,i=0;i5){\n (goterr=1) && errfile && fprintf(errfile,\n \"%s: max include depth of %d exceeded in file '%s' line %d\\n\",\n progname, 5, file, linenum);\n } else {\n int readerr;\n char *includefile;\n unitname = strtok(0, \" \");\n if (!unitname){\n (goterr=1) && errfile && fprintf(errfile,\n \"%s: missing include filename on line %d of '%s'\\n\",\n progname, linenum, file);\n continue;\n }\n includefile = mymalloc(strlen(file)+strlen(unitname)+1, \"(readunits)\");\n if (isfullpath(unitname))\n strcpy(includefile,unitname);\n else {\n strcpy(includefile,file);\n strcpy(pathend(includefile), unitname);\n }\n readerr = readunits(includefile, errfile, unitcount, prefixcount,\n funccount, depth+1);\n if (readerr == 18){\n fclose(unitfile);\n free(line);\n free(includefile);\n return readerr;\n }\n if (readerr == 16) {\n (goterr=1) && errfile && fprintf(errfile, \"%s: file was included at line %d of file '%s'\\n\", progname,linenum, file);\n }\n if (readerr)\n goterr = 1;\n free(includefile);\n }\n } else\n (goterr=1) && errfile && fprintf(errfile,\"%s: error in units file '%s' line %d\\n\", progname, file, linenum);\n continue;\n }\n if (in_utf8 && !utf8mode) continue;\n if (wronglocale || wrongvar) continue;\n splitline(line, &unitname, &unitdef);\n if (!unitname) continue;\n if (*unitname == '+'){\n unitname++;\n redefinition=1;\n if (strlen(unitname)==0){\n (goterr=1) && errfile && fprintf(errfile,\n \"%s: expecting name of unit to redefine after '+' at line %d of '%s'\\n\",\n progname, linenum,file);\n continue;\n }\n } else\n redefinition=0;\n if (!strcmp(unitname,\"-\")) {\n (goterr=1) && errfile && fprintf(errfile,\n \"%s: expecting prefix name before '-' at line %d of '%s'\\n\",\n progname, linenum,file);\n continue;\n }\n if (!unitdef){\n (goterr=1) && errfile && fprintf(errfile,\n \"%s: unit '%s' lacks a definition at line %d of '%s'\\n\",\n progname, unitname, linenum, file);\n continue;\n }\n if ((*((unitname)+strlen(unitname)-1)) == '-'){\n if (newprefix(unitname,unitdef,&locprefixcount,linenum,\n permfile,errfile,redefinition))\n goterr=1;\n }\n else if (strchr(unitname,'[')){\n retcode=newtable(unitname,unitdef,&locfunccount,linenum,\n permfile,errfile,redefinition);\n if (retcode){\n if (retcode != 17){\n fclose(unitfile);\n free(line);\n return retcode;\n }\n goterr=1;\n }\n }\n else if (strchr(unitname,'(')){\n if (newfunction(unitname,unitdef,&locfunccount,linenum,\n permfile,errfile,redefinition))\n goterr = 1;\n }\n else {\n if (newunit(unitname,unitdef,&locunitcount,linenum,permfile,errfile,redefinition))\n goterr = 1;\n }\n }\n fclose(unitfile);\n free(line);\n if (unitcount)\n *unitcount+=locunitcount;\n if (prefixcount)\n *prefixcount+=locprefixcount;\n if (funccount)\n *funccount+=locfunccount;\n if (goterr)\n return 17;\n else return 0;\n}\n", "c_constructs": {"pointer_type": 7, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 6, "memory_operation": 0, "if_statement": 66, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 23}}, {"id": "json.h#allow_equals_in_object_prep#utest_should_filter_test.c", "codebase": "json.h", "c_file": "allow_equals_in_object.c", "function": "utest_should_filter_test", "sloc": "42", "c_code": "__attribute__((weak)) int utest_should_filter_test(const char *filter,\n const char *testcase) {\n if (filter) {\n const char *filter_cur = filter;\n const char *testcase_cur = testcase;\n const char *filter_wildcard = 0;\n while (('\\0' != *filter_cur) && ('\\0' != *testcase_cur)) {\n if ('*' == *filter_cur) {\n filter_wildcard = filter_cur;\n filter_cur++;\n while (('\\0' != *filter_cur) && ('\\0' != *testcase_cur)) {\n if ('*' == *filter_cur) {\n break;\n } else if (*filter_cur != *testcase_cur) {\n filter_cur = filter_wildcard;\n }\n testcase_cur++;\n filter_cur++;\n }\n if (('\\0' == *filter_cur) && ('\\0' == *testcase_cur)) {\n return 0;\n }\n if ('\\0' == *testcase_cur) {\n return 1;\n }\n } else {\n if (*testcase_cur != *filter_cur) {\n return 1;\n } else {\n testcase_cur++;\n filter_cur++;\n }\n }\n }\n if (('\\0' != *filter_cur) ||\n (('\\0' != *testcase_cur) &&\n ((filter == filter_cur) || ('*' != filter_cur[-1])))) {\n return 1;\n }\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 8, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 1}}, {"id": "json.h#allow_unquoted_keys_prep#json_extract_get_object_size.c", "codebase": "json.h", "c_file": "allow_unquoted_keys.c", "function": "json_extract_get_object_size", "sloc": "21", "c_code": "struct json_extract_result_s\njson_extract_get_object_size(const struct json_object_s *const object) {\n struct json_extract_result_s result;\n size_t i;\n const struct json_object_element_s *element = object->start;\n result.dom_size = sizeof(struct json_object_s) +\n (sizeof(struct json_object_element_s) * object->length);\n result.data_size = 0;\n for (i = 0; i < object->length; i++) {\n const struct json_extract_result_s string_result =\n json_extract_get_string_size(element->name);\n const struct json_extract_result_s value_result =\n json_extract_get_value_size(element->value);\n result.dom_size += string_result.dom_size;\n result.data_size += string_result.data_size;\n result.dom_size += value_result.dom_size;\n result.data_size += value_result.data_size;\n element = element->next;\n }\n return result;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNTING_PAIRS_PERSON_CAN_FORM_PAIR_ONE_1_prep#main.c", "codebase": "transcoder-set", "c_file": "COUNTING_PAIRS_PERSON_CAN_FORM_PAIR_ONE_1.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {22,92,15,81,3,30,88,4,43,92};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "nettle-3.9.1#hmac-md5_prep#nettle_hmac_md5_set_key.c", "codebase": "nettle-3.9.1", "c_file": "hmac-md5.c", "function": "nettle_hmac_md5_set_key", "sloc": "6", "c_code": "void\nnettle_hmac_md5_set_key(struct hmac_md5_ctx *ctx,\n size_t key_length, const uint8_t *key)\n{\n nettle_hmac_set_key( &(ctx)->outer, &(ctx)->inner, &(ctx)->state, (&nettle_md5), (key_length), (key) );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#catalog_prep#xmlCatalogDump.c", "codebase": "libxml2", "c_file": "catalog.c", "function": "xmlCatalogDump", "sloc": "8", "c_code": "void\nxmlCatalogDump(FILE *out) {\n if (out == ((void *)0))\n return;\n if (!xmlCatalogInitialized)\n xmlInitializeCatalog();\n xmlACatalogDump(xmlDefaultCatalog, out);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_wilders_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_wilders_start", "sloc": "3", "c_code": "int ti_wilders_start(double const *options) {\n return (int)options[0]-1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_multi_line_strings_prep#json_parse_string.c", "codebase": "json.h", "c_file": "allow_multi_line_strings.c", "function": "json_parse_string", "sloc": "102", "c_code": "void json_parse_string(struct json_parse_state_s *state,\n struct json_string_s *string) {\n size_t offset = state->offset;\n size_t bytes_written = 0;\n const char *const src = state->src;\n const char quote_to_use = '\\'' == src[offset] ? '\\'' : '\"';\n char *data = state->data;\n unsigned long high_surrogate = 0;\n unsigned long codepoint;\n string->string = data;\n offset++;\n while (quote_to_use != src[offset]) {\n if ('\\\\' == src[offset]) {\n offset++;\n switch (src[offset++]) {\n default:\n return;\n case 'u': {\n codepoint = 0;\n if (!json_hexadecimal_value(&src[offset], 4, &codepoint)) {\n return;\n }\n offset += 4;\n if (codepoint <= 0x7fu) {\n data[bytes_written++] = (char)codepoint;\n } else if (codepoint <= 0x7ffu) {\n data[bytes_written++] =\n (char)(0xc0u | (codepoint >> 6));\n data[bytes_written++] =\n (char)(0x80u | (codepoint & 0x3fu));\n } else if (codepoint >= 0xd800 &&\n codepoint <= 0xdbff) {\n high_surrogate = codepoint;\n continue;\n } else if (codepoint >= 0xdc00 &&\n codepoint <= 0xdfff) {\n const unsigned long surrogate_offset =\n 0x10000u - (0xD800u << 10) - 0xDC00u;\n codepoint = (high_surrogate << 10) + codepoint + surrogate_offset;\n high_surrogate = 0;\n data[bytes_written++] =\n (char)(0xF0u | (codepoint >> 18));\n data[bytes_written++] =\n (char)(0x80u | ((codepoint >> 12) & 0x3fu));\n data[bytes_written++] =\n (char)(0x80u | ((codepoint >> 6) & 0x3fu));\n data[bytes_written++] =\n (char)(0x80u | (codepoint & 0x3fu));\n } else {\n data[bytes_written++] =\n (char)(0xe0u | (codepoint >> 12));\n data[bytes_written++] =\n (char)(0x80u | ((codepoint >> 6) & 0x3fu));\n data[bytes_written++] =\n (char)(0x80u | (codepoint & 0x3fu));\n }\n } break;\n case '\"':\n data[bytes_written++] = '\"';\n break;\n case '\\\\':\n data[bytes_written++] = '\\\\';\n break;\n case '/':\n data[bytes_written++] = '/';\n break;\n case 'b':\n data[bytes_written++] = '\\b';\n break;\n case 'f':\n data[bytes_written++] = '\\f';\n break;\n case 'n':\n data[bytes_written++] = '\\n';\n break;\n case 'r':\n data[bytes_written++] = '\\r';\n break;\n case 't':\n data[bytes_written++] = '\\t';\n break;\n case '\\r':\n data[bytes_written++] = '\\r';\n if ('\\n' == src[offset]) {\n data[bytes_written++] = '\\n';\n offset++;\n }\n break;\n case '\\n':\n data[bytes_written++] = '\\n';\n break;\n }\n } else {\n data[bytes_written++] = src[offset++];\n }\n }\n offset++;\n string->string_size = bytes_written;\n data[bytes_written++] = '\\0';\n state->data += bytes_written;\n state->offset = offset;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 10, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 12}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlIsRef.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlIsRef", "sloc": "21", "c_code": "PyObject *\nlibxml_xmlIsRef(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlDocPtr doc;\n PyObject *pyobj_doc;\n xmlNodePtr elem;\n PyObject *pyobj_elem;\n xmlAttrPtr attr;\n PyObject *pyobj_attr;\n if (libxml_deprecationWarning(\"xmlIsRef\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"OOO:xmlIsRef\", &pyobj_doc, &pyobj_elem, &pyobj_attr))\n return(((void *)0));\n doc = (xmlDocPtr) (((pyobj_doc) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_doc))->obj));\n elem = (xmlNodePtr) (((pyobj_elem) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_elem))->obj));\n attr = (xmlAttrPtr) (((pyobj_attr) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_attr))->obj));\n c_retval = xmlIsRef(doc, elem, attr);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "nano-7.2#utils_prep#digits.c", "codebase": "nano-7.2", "c_file": "utils.c", "function": "digits", "sloc": "28", "c_code": "int digits(ssize_t n)\n{\n if (n < 100000) {\n if (n < 1000) {\n if (n < 100)\n return 2;\n else\n return 3;\n } else {\n if (n < 10000)\n return 4;\n else\n return 5;\n }\n } else {\n if (n < 10000000) {\n if (n < 1000000)\n return 6;\n else\n return 7;\n } else {\n if (n < 100000000)\n return 8;\n else\n return 9;\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 8, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_And.c", "codebase": "gprolog-1.5.0", "c_file": "arith_inl_c.c", "function": "Pl_Fct_And", "sloc": "5", "c_code": "WamWord\nPl_Fct_And(WamWord x, WamWord y)\n{\n if ((((PlLong) (x) & ((PlULong)0x7)) == (PlULong)0x4)) Pl_Err_Type(pl_type_integer, x); if ((((PlLong) (y) & ((PlULong)0x7)) == (PlULong)0x4)) Pl_Err_Type(pl_type_integer, y); return Pl_Fct_Fast_And(x, y);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#prompt_prep#do_statusbar_verbatim_input.c", "codebase": "nano-7.2", "c_file": "prompt.c", "function": "do_statusbar_verbatim_input", "sloc": "11", "c_code": "void do_statusbar_verbatim_input(void)\n{\n size_t count = 1;\n char *bytes;\n bytes = get_verbatim_kbinput(footwin, &count);\n if (0 < count && count < 999)\n inject_into_answer(bytes, count);\n else if (count == 0)\n beep();\n free(bytes);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathCompile.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathCompile", "sloc": "4", "c_code": "xmlXPathCompExprPtr\nxmlXPathCompile(const xmlChar *str) {\n return(xmlXPathCtxtCompile(((void *)0), str));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_OBTUSE_ANGLES_CIRCLE_K_EQUIDISTANT_POINTS_2_GIVEN_POINTS_prep#main.c", "codebase": "transcoder-set", "c_file": "COUNT_OBTUSE_ANGLES_CIRCLE_K_EQUIDISTANT_POINTS_2_GIVEN_POINTS.c", "function": "main", "sloc": "16", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {83,3,11,50,40,62,40,66,6,25};\n int param1[] = {98,39,96,67,16,86,78,11,9,5};\n int param2[] = {86,87,30,48,32,76,71,74,19,5};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_aroon_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_aroon_start", "sloc": "3", "c_code": "int ti_aroon_start(double const *options) {\n return (int)options[0];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNTING_PAIRS_PERSON_CAN_FORM_PAIR_ONE_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "COUNTING_PAIRS_PERSON_CAN_FORM_PAIR_ONE_1.c", "function": "f_gold", "sloc": "8", "c_code": "int f_gold ( int x ) {\n int dp [ x + 1 ];\n dp [ 0 ] = dp [ 1 ] = 1;\n for ( int i = 2;\n i <= x;\n i ++ ) dp [ i ] = dp [ i - 1 ] + ( i - 1 ) * dp [ i - 2 ];\n return dp [ x ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#screen-write_prep#screen_write_reverseindex.c", "codebase": "tmux", "c_file": "screen-write.c", "function": "screen_write_reverseindex", "sloc": "14", "c_code": "void\nscreen_write_reverseindex(struct screen_write_ctx *ctx, u_int bg)\n{\n struct screen *s = ctx->s;\n struct tty_ctx ttyctx;\n screen_write_initctx(ctx, &ttyctx);\n ttyctx.bg = bg;\n if (s->cy == s->rupper)\n grid_view_scroll_region_down(s->grid, s->rupper, s->rlower, bg);\n else if (s->cy > 0)\n s->cy--;\n screen_write_collect_flush(ctx, 0);\n tty_write(tty_cmd_reverseindex, &ttyctx);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#LONGEST_REPEATING_SUBSEQUENCE_prep#len.c", "codebase": "transcoder-set", "c_file": "LONGEST_REPEATING_SUBSEQUENCE.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#ident_prep#main.c", "codebase": "rcs-5.10.1", "c_file": "ident.c", "function": "main", "sloc": "51", "c_code": "int\nmain (int argc, char *argv[static argc])\n{\n FILE *fp;\n int status = 0;\n char const *a;\n do { program.invoke = argv[0]; program.name = \"ident\"; check_hv (argc, argv, &program); } while (0);\n gnurcs_init (&program);\n while ((a = *++argv) && *a == '-')\n while (*++a)\n switch (*a)\n {\n case 'q':\n (top->behavior. quiet) = 1;\n break;\n case 'V':\n if (! a[1])\n {\n display_version (&program, 1);\n gnurcs_goodbye ();\n return 0;\n }\n default:\n bad_option (a - 1);\n gnurcs_goodbye ();\n return exit_failure;\n break;\n }\n if (!a)\n scanfile (stdin, ((void *)0));\n else\n do\n {\n if (!(fp = fopen (a, \"r\")))\n {\n syserror ((*__errno_location ()), a);\n status = exit_failure;\n }\n else if ((0 > (scanfile (fp, a)))\n || (argv[1] && putchar ('\\n') == (-1)))\n break;\n }\n while ((a = *++argv));\n if (ferror (stdout) || (0 > (fclose (stdout))))\n {\n syserror ((*__errno_location ()), \"standard output\");\n status = exit_failure;\n }\n gnurcs_goodbye ();\n return status;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 4, "switch_statement": 1, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 3}}, {"id": "tmux#layout_prep#layout_resize.c", "codebase": "tmux", "c_file": "layout.c", "function": "layout_resize", "sloc": "32", "c_code": "void\nlayout_resize(struct window *w, u_int sx, u_int sy)\n{\n struct layout_cell *lc = w->layout_root;\n int xlimit, ylimit, xchange, ychange;\n xchange = sx - w->sx;\n xlimit = layout_resize_check(w, lc, LAYOUT_LEFTRIGHT);\n if (xchange < 0 && xchange < -xlimit)\n xchange = -xlimit;\n if (xlimit == 0) {\n if (sx <= lc->sx)\n xchange = 0;\n else\n xchange = sx - lc->sx;\n }\n if (xchange != 0)\n layout_resize_adjust(w, lc, LAYOUT_LEFTRIGHT, xchange);\n ychange = sy - w->sy;\n ylimit = layout_resize_check(w, lc, LAYOUT_TOPBOTTOM);\n if (ychange < 0 && ychange < -ylimit)\n ychange = -ylimit;\n if (ylimit == 0) {\n if (sy <= lc->sy)\n ychange = 0;\n else\n ychange = sy - lc->sy;\n }\n if (ychange != 0)\n layout_resize_adjust(w, lc, LAYOUT_TOPBOTTOM, ychange);\n layout_fix_offsets(lc);\n layout_fix_panes(w, sx, sy);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 8, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tinycc#libtcc_prep#tcc_add_include_path.c", "codebase": "tinycc", "c_file": "libtcc.c", "function": "tcc_add_include_path", "sloc": "5", "c_code": "int tcc_add_include_path(TCCState *s, const char *pathname)\n{\n tcc_split_path(s, &s->include_paths, &s->nb_include_paths, pathname);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#camellia256-set-decrypt-key_prep#nettle_camellia256_set_decrypt_key.c", "codebase": "nettle-3.9.1", "c_file": "camellia256-set-decrypt-key.c", "function": "nettle_camellia256_set_decrypt_key", "sloc": "7", "c_code": "void\nnettle_camellia256_set_decrypt_key(struct camellia256_ctx *ctx,\n const uint8_t *key)\n{\n nettle_camellia256_set_encrypt_key(ctx, key);\n nettle_camellia256_invert_key(ctx, ctx);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#K_TH_PRIME_FACTOR_GIVEN_NUMBER_prep#max.c", "codebase": "transcoder-set", "c_file": "K_TH_PRIME_FACTOR_GIVEN_NUMBER.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#types_prep#libxml_xmlCharPtrConstWrap.c", "codebase": "libxml2", "c_file": "types.c", "function": "libxml_xmlCharPtrConstWrap", "sloc": "11", "c_code": "PyObject *\nlibxml_xmlCharPtrConstWrap(const xmlChar * str)\n{\n PyObject *ret;\n if (str == ((void *)0)) {\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return ((&_Py_NoneStruct));\n }\n ret = PyUnicode_FromString((char *) str);\n return (ret);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_uri_prep#osip_uri_param_clone.c", "codebase": "libosip2-5.3.1", "c_file": "osip_uri.c", "function": "osip_uri_param_clone", "sloc": "19", "c_code": "int osip_uri_param_clone(const osip_uri_param_t *uparam, osip_uri_param_t **dest) {\n int i;\n osip_uri_param_t *up;\n *dest = ((void *)0);\n if (uparam == ((void *)0))\n return -2;\n if (uparam->gname == ((void *)0))\n return -2;\n i = osip_uri_param_init(&up);\n if (i != 0)\n return i;\n up->gname = osip_strdup(uparam->gname);\n if (uparam->gvalue != ((void *)0))\n up->gvalue = osip_strdup(uparam->gvalue);\n else\n up->gvalue = ((void *)0);\n *dest = up;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "less-633#filename_prep#fcomplete.c", "codebase": "less-633", "c_file": "filename.c", "function": "fcomplete", "sloc": "22", "c_code": "char * fcomplete(char *s)\n{\n char *fpat;\n char *qs;\n if (secure)\n return (((void *)0));\n {\n int len = (int) strlen(s) + 2;\n fpat = (char *) ecalloc(len, sizeof(char));\n snprintf((fpat), (len), (\"%s*\"), (s));\n }\n qs = lglob(fpat);\n s = shell_unquote(qs);\n if (strcmp(s,fpat) == 0)\n {\n free(qs);\n qs = ((void *)0);\n }\n free(s);\n free(fpat);\n return (qs);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 3, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_SERIES_23_45_67_89_UPTO_N_TERMS_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "SUM_SERIES_23_45_67_89_UPTO_N_TERMS.c", "function": "f_gold", "sloc": "17", "c_code": "double f_gold ( int n ) {\n int i = 1;\n double res = 0.0;\n _Bool sign = 1;\n while ( n > 0 ) {\n n --;\n if ( sign ) {\n sign = ! sign;\n res = res + ( double ) ++ i / ++ i;\n }\n else {\n sign = ! sign;\n res = res - ( double ) ++ i / ++ i;\n }\n }\n return res;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsDevanagari.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsDevanagari", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsDevanagari(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsDevanagari\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsDevanagari\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsDevanagari(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#yourcode_prep#Interpolate_Poly.c", "codebase": "mcsim-6.2.0", "c_file": "yourcode.c", "function": "Interpolate_Poly", "sloc": "38", "c_code": "void Interpolate_Poly (double rgdX[], double rgdY[], int n, double x,\n double *pdY, double *pdDY)\n{\n int i, j, nIndex = 1;\n double dDenom, dDiff, dTemp1, dTemp2;\n static PDOUBLE pdTerm1 = ((void *)0), pdTerm2 = ((void *)0);\n if (!pdTerm1)\n if ( !(pdTerm1 = InitdVector (n+1)) || !(pdTerm2 = InitdVector (n+1)))\n ReportError (((void *)0), 0x0004 | 0x8000, \"Interpolate_Poly\", ((void *)0));\n dDiff = fabs (x - rgdX[0]);\n pdTerm1[0] = rgdY[0];\n pdTerm2[0] = rgdY[0];\n for (i = 1; i < n; i++) {\n if ((dTemp1 = fabs (x - rgdX[i])) < dDiff) {\n nIndex = i;\n dDiff = dTemp1;\n }\n pdTerm1[i] = rgdY[i];\n pdTerm2[i] = rgdY[i];\n }\n *pdY = rgdY[nIndex--];\n for (j = 1; j < n; j++) {\n for (i = 0; i < n - j; i++) {\n dTemp1 = rgdX[i] - x;\n dTemp2 = rgdX[i+j] - x;\n if ((dDenom = dTemp1 - dTemp2) == 0) {\n printf (\"\\nError: null denominator in Interpolate_Poly - Exiting\\n\\n\");\n exit (0);\n }\n dDenom = (pdTerm1[i+1] - pdTerm2[i]) / dDenom;\n pdTerm2[i] = dTemp2 * dDenom;\n pdTerm1[i] = dTemp1 * dDenom;\n }\n *pdDY = (2 * (nIndex + 1) < (n - j) ?\n pdTerm1[nIndex+1] : pdTerm2[nIndex--]);\n *pdY = *pdY + *pdDY;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SUBSET_SUM_DIVISIBLE_M_prep#sort.c", "codebase": "transcoder-set", "c_file": "SUBSET_SUM_DIVISIBLE_M.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#lex_prep#SkipComment.c", "codebase": "mcsim-6.2.0", "c_file": "lex.c", "function": "SkipComment", "sloc": "14", "c_code": "void SkipComment (PINPUTBUF pibIn)\n{\n if (!pibIn)\n return;\n if (!*pibIn->pbufCur)\n FillBuffer (pibIn);\n while (*pibIn->pbufCur++ != ('\\n'))\n if (!*pibIn->pbufCur)\n if (FillBuffer (pibIn) == (-1))\n break;\n pibIn->iLineNum++;\n if (!*pibIn->pbufCur)\n FillBuffer (pibIn);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES_prep#len.c", "codebase": "transcoder-set", "c_file": "NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_NUMBER_2X2_SQUARES_CAN_FIT_INSIDE_RIGHT_ISOSCELES_TRIANGLE_prep#sort.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_NUMBER_2X2_SQUARES_CAN_FIT_INSIDE_RIGHT_ISOSCELES_TRIANGLE.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#fd_symbolic_c_prep#Pl_Fd_Element_V_To_I.c", "codebase": "gprolog-1.5.0", "c_file": "fd_symbolic_c.c", "function": "Pl_Fd_Element_V_To_I", "sloc": "17", "c_code": "void\nPl_Fd_Element_V_To_I(Range *i, Range *v, WamWord *l)\n{\n int val;\n int n;\n int j;\n do { i->vec = (Vector) (((WamWordP *) pl_reg_bank)[256 +3]); (((WamWordP *) pl_reg_bank)[256 +3]) += pl_vec_size; } while (0);\n Pl_Vector_Empty(i->vec);\n n = *l;\n for (j = 1; j <= n; j++)\n {\n val = l[j];\n if (Pl_Range_Test_Value(v, val))\n (i->vec[((VecWord) (j) >> 6)] |= ((VecWord) 1 << ((j) & (((VecWord) 1 << 6)-1))));\n }\n Pl_Range_From_Vector(i);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#willr_prep#ti_willr_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "willr.c", "function": "ti_willr_start", "sloc": "3", "c_code": "int ti_willr_start(double const *options) {\n return (int)options[0]-1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libzahl-1.0#zmodpow_prep#zmodpow.c", "codebase": "libzahl-1.0", "c_file": "zmodpow.c", "function": "zmodpow", "sloc": "45", "c_code": "void\nzmodpow(z_t a, z_t b, z_t c, z_t d)\n{\n size_t i, j, n, bits;\n zahl_char_t x;\n if (zsignum(c) <= 0) {\n if (zzero(c)) {\n if (zzero(b))\n (libzahl_error = (33), longjmp(libzahl_jmp_buf, 1));\n else if (zzero(d))\n (libzahl_error = (33), longjmp(libzahl_jmp_buf, 1));\n zsetu(a, 1);\n } else if (zzero(b) || zzero(d)) {\n (libzahl_error = (33), longjmp(libzahl_jmp_buf, 1));\n } else {\n ((a)->sign = (0));\n }\n return;\n } else if (zzero(d)) {\n (libzahl_error = (33), longjmp(libzahl_jmp_buf, 1));\n } else if (zzero(b)) {\n ((a)->sign = (0));\n return;\n }\n bits = zbits(c);\n n = ((bits) >> 5);\n zmod(libzahl_tmp_pow_b, b, d);\n zset(libzahl_tmp_pow_c, c);\n zset(libzahl_tmp_pow_d, d);\n zsetu(a, 1);\n for (i = 0; i < n; i++) {\n x = libzahl_tmp_pow_c->chars[i];\n for (j = 32; j--; x >>= 1) {\n if (x & 1)\n zmodmul(a, a, libzahl_tmp_pow_b, libzahl_tmp_pow_d);\n zmodsqr(libzahl_tmp_pow_b, libzahl_tmp_pow_b, libzahl_tmp_pow_d);\n }\n }\n x = libzahl_tmp_pow_c->chars[i];\n for (; x; x >>= 1) {\n if (x & 1)\n zmodmul(a, a, libzahl_tmp_pow_b, libzahl_tmp_pow_d);\n zmodsqr(libzahl_tmp_pow_b, libzahl_tmp_pow_b, libzahl_tmp_pow_d);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 9, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nano-7.2#chars_prep#mbrevstrpbrk.c", "codebase": "nano-7.2", "c_file": "chars.c", "function": "mbrevstrpbrk", "sloc": "15", "c_code": "char *mbrevstrpbrk(const char *head, const char *accept, const char *pointer)\n{\n if (*pointer == '\\0') {\n if (pointer == head)\n return ((void *)0);\n pointer = head + step_left(head, pointer - head);\n }\n while (1) {\n if (mbstrchr(accept, pointer) != ((void *)0))\n return (char *)pointer;\n if (pointer == head)\n return ((void *)0);\n pointer = head + step_left(head, pointer - head);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "screen-4.9.0#tty_prep#CheckTtyname.c", "codebase": "screen-4.9.0", "c_file": "tty.c", "function": "CheckTtyname", "sloc": "16", "c_code": "int CheckTtyname (char *tty)\n{\n struct stat st;\n char realbuf[4096];\n const char *real;\n int rc;\n real = realpath(tty, realbuf);\n if (!real)\n return -1;\n realbuf[sizeof(realbuf)-1]='\\0';\n if (lstat(real, &st) || !((((st.st_mode)) & 0170000) == (0020000)) || (st.st_nlink > 1 && strncmp(real, \"/dev\", 4)))\n rc = -1;\n else\n rc = 0;\n return rc;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "dap-3.10#ps_prep#nport.c", "codebase": "dap-3.10", "c_file": "ps.c", "function": "nport", "sloc": "18", "c_code": "void nport(pict *p, int nplots, int nperpage)\n{\n int pn;\n if (nplots % nperpage)\n {\n fprintf(dap_err,\n \"(nport) Number of plots %d not a multiple of number per page %d\\n\",\n nplots, nperpage);\n exit(1);\n }\n pict_port(nplots / nperpage);\n for (pn = 0; pn < nplots; pn += nperpage)\n {\n pict_page();\n pict_show(p + pn);\n }\n pict_end();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlwriter_prep#xmlTextWriterStartDTDEntity.c", "codebase": "libxml2", "c_file": "xmlwriter.c", "function": "xmlTextWriterStartDTDEntity", "sloc": "78", "c_code": "int\nxmlTextWriterStartDTDEntity(xmlTextWriterPtr writer,\n int pe, const xmlChar * name)\n{\n int count;\n int sum;\n xmlLinkPtr lk;\n xmlTextWriterStackEntry *p;\n if (writer == ((void *)0) || name == ((void *)0) || *name == '\\0')\n return -1;\n sum = 0;\n lk = xmlListFront(writer->nodes);\n if (lk != 0) {\n p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);\n if (p != 0) {\n switch (p->state) {\n case XML_TEXTWRITER_DTD:\n count = xmlOutputBufferWriteString(writer->out, \" [\");\n if (count < 0)\n return -1;\n sum += count;\n if (writer->indent) {\n count =\n xmlOutputBufferWriteString(writer->out, \"\\n\");\n if (count < 0)\n return -1;\n sum += count;\n }\n p->state = XML_TEXTWRITER_DTD_TEXT;\n case XML_TEXTWRITER_DTD_TEXT:\n case XML_TEXTWRITER_NONE:\n break;\n default:\n return -1;\n }\n }\n }\n p = (xmlTextWriterStackEntry *)\n xmlMalloc(sizeof(xmlTextWriterStackEntry));\n if (p == 0) {\n xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,\n \"xmlTextWriterStartDTDElement : out of memory!\\n\");\n return -1;\n }\n p->name = xmlStrdup(name);\n if (p->name == 0) {\n xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,\n \"xmlTextWriterStartDTDElement : out of memory!\\n\");\n xmlFree(p);\n return -1;\n }\n if (pe != 0)\n p->state = XML_TEXTWRITER_DTD_PENT;\n else\n p->state = XML_TEXTWRITER_DTD_ENTY;\n xmlListPushFront(writer->nodes, p);\n if (writer->indent) {\n count = xmlTextWriterWriteIndent(writer);\n if (count < 0)\n return -1;\n sum += count;\n }\n count = xmlOutputBufferWriteString(writer->out, \"out, \"% \");\n if (count < 0)\n return -1;\n sum += count;\n }\n count = xmlOutputBufferWriteString(writer->out, (const char *) name);\n if (count < 0)\n return -1;\n sum += count;\n return sum;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 15, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 11, "break_continue_statement": 1}}, {"id": "screen-4.9.0#list_generic_prep#glist_remove_rows.c", "codebase": "screen-4.9.0", "c_file": "list_generic.c", "function": "glist_remove_rows", "sloc": "13", "c_code": "void\nglist_remove_rows(struct ListData *ldata)\n{\n struct ListRow *row;\n for (row = ldata->root; row; )\n {\n struct ListRow *r = row;\n row = row->next;\n ldata->list_fn->gl_freerow(ldata, r);\n free(r);\n }\n ldata->root = ldata->selected = ldata->top = ((void *)0);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMIZE_VOLUME_CUBOID_GIVEN_SUM_SIDES_1_prep#max.c", "codebase": "transcoder-set", "c_file": "MAXIMIZE_VOLUME_CUBOID_GIVEN_SUM_SIDES_1.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_2_prep#len.c", "codebase": "transcoder-set", "c_file": "PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_2.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CALCULATE_AREA_TETRAHEDRON_prep#main.c", "codebase": "transcoder-set", "c_file": "CALCULATE_AREA_TETRAHEDRON.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {58,56,35,99,13,45,40,92,7,13};\n for(int i = 0; i < len(param0); ++i)\n {\n if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001)\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "diffutils-3.10#util_prep#print_1_line_nl.c", "codebase": "diffutils-3.10", "c_file": "util.c", "function": "print_1_line_nl", "sloc": "24", "c_code": "void\nprint_1_line_nl (char const *line_flag, char const *const *line, _Bool skip_nl)\n{\n char const *base = line[0], *limit = line[1];\n FILE *out = outfile;\n char const *flag_format = 0;\n if (line_flag && *line_flag)\n {\n char const *flag_format_1 = flag_format = initial_tab ? \"%s\\t\" : \"%s \";\n char const *line_flag_1 = line_flag;\n if (suppress_blank_empty && **line == '\\n')\n {\n flag_format_1 = \"%s\";\n line_flag_1 += *line_flag_1 == ' ';\n }\n fprintf (out, flag_format_1, line_flag_1);\n }\n output_1_line (base, limit - (skip_nl && limit[-1] == '\\n'), flag_format, line_flag);\n if ((!line_flag || line_flag[0]) && limit[-1] != '\\n')\n {\n set_color_context (RESET_CONTEXT);\n fprintf (out, \"\\n\\\\ %s\\n\", gettext (\"No newline at end of file\"));\n }\n}\n", "c_constructs": {"pointer_type": 6, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "pexec-1.0rc8#fifo_prep#fifo_read.c", "codebase": "pexec-1.0rc8", "c_file": "fifo.c", "function": "fifo_read", "sloc": "22", "c_code": "size_t fifo_read(fifo *f,void *vbuffer,size_t size)\n{\n unsigned char *buffer=(unsigned char *)vbuffer;\n size_t rsize,rsize0,msize;\n if ( sizewrts ) rsize=size;\n else rsize=f->wrts;\n rsize0=rsize;\n while ( rsize>0 )\n { msize=f->size-f->rpnt;\n if ( rsizebuffer+f->rpnt,msize);\n buffer+=msize;\n }\n f->rpnt+=msize;\n f->wrts-=msize;\n if ( f->rpnt >= f->size )\n f->rpnt=0;\n rsize-=msize;\n }\n return(rsize0);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DETECT_IF_TWO_INTEGERS_HAVE_OPPOSITE_SIGNS_prep#min.c", "codebase": "transcoder-set", "c_file": "DETECT_IF_TWO_INTEGERS_HAVE_OPPOSITE_SIGNS.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1_prep#main.c", "codebase": "transcoder-set", "c_file": "SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1.c", "function": "main", "sloc": "15", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {10,5,2,83,91,18,83,98,43,31};\n int param1[] = {4,2,8,7,0,53,41,53,37,20};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "nettle-3.9.1#poly1305-update_prep#_nettle_poly1305_update.c", "codebase": "nettle-3.9.1", "c_file": "poly1305-update.c", "function": "_nettle_poly1305_update", "sloc": "15", "c_code": "unsigned\n_nettle_poly1305_update (struct poly1305_ctx *ctx,\n uint8_t *block, unsigned index,\n size_t length, const uint8_t *m)\n{\n if (index > 0)\n {\n do { unsigned __md_left = (16) - (index); if ((length) < __md_left) { memcpy(block + (index), (m), (length)); return (index) + (length); } memcpy((block) + (index), (m), __md_left); (m) += __md_left; (length) -= __md_left; } while(0);\n _nettle_poly1305_block(ctx, block, 1);\n }\n m = _nettle_poly1305_blocks (ctx, length >> 4, m);\n length &= 15;\n memcpy (block, m, length);\n return length;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 2, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#fd_range_prep#Pl_Vector_Empty.c", "codebase": "gprolog-1.5.0", "c_file": "fd_range.c", "function": "Pl_Vector_Empty", "sloc": "8", "c_code": "void\nPl_Vector_Empty(Vector vec)\n{\n Vector end = vec + pl_vec_size;\n do\n *vec++ = 0;\n while (vec < end);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderConstLocalName.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderConstLocalName", "sloc": "21", "c_code": "const xmlChar *\nxmlTextReaderConstLocalName(xmlTextReaderPtr reader) {\n xmlNodePtr node;\n if ((reader == ((void *)0)) || (reader->node == ((void *)0)))\n return(((void *)0));\n if (reader->curnode != ((void *)0))\n node = reader->curnode;\n else\n node = reader->node;\n if (node->type == XML_NAMESPACE_DECL) {\n xmlNsPtr ns = (xmlNsPtr) node;\n if (ns->prefix == ((void *)0))\n return(constString(reader, (xmlChar *) \"xmlns\"));\n else\n return(ns->prefix);\n }\n if ((node->type != XML_ELEMENT_NODE) &&\n (node->type != XML_ATTRIBUTE_NODE))\n return(xmlTextReaderConstName(reader));\n return(node->name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING_prep#max.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#LONGEST_COMMON_SUBSTRING_SPACE_OPTIMIZED_DP_SOLUTION_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "LONGEST_COMMON_SUBSTRING_SPACE_OPTIMIZED_DP_SOLUTION.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsArrows.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsArrows", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsArrows(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsArrows\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsArrows\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsArrows(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "hello-2.12.1#version-etc_prep#version_etc_ar.c", "codebase": "hello-2.12.1", "c_file": "version-etc.c", "function": "version_etc_ar", "sloc": "10", "c_code": "void\nversion_etc_ar (FILE *stream,\n const char *command_name, const char *package,\n const char *version, const char * const * authors)\n{\n size_t n_authors;\n for (n_authors = 0; authors[n_authors]; n_authors++)\n ;\n version_etc_arn (stream, command_name, package, version, authors, n_authors);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_FIRST_NATURAL_NUMBER_WHOSE_FACTORIAL_DIVISIBLE_X_prep#main.c", "codebase": "transcoder-set", "c_file": "FIND_FIRST_NATURAL_NUMBER_WHOSE_FACTORIAL_DIVISIBLE_X.c", "function": "main", "sloc": "13", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {67,47,57,89,67,40,16,83,93,43};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#cos_prep#ti_cos_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "cos.c", "function": "ti_cos_start", "sloc": "1", "c_code": "int ti_cos_start(double const *options) { (void)options; return 0; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#ioutil_prep#opng_os_copy_file_attr.c", "codebase": "optipng-0.7.8", "c_file": "ioutil.c", "function": "opng_os_copy_file_attr", "sloc": "22", "c_code": "int\nopng_os_copy_file_attr(const char *src_path, const char *dest_path)\n{\n struct stat sbuf;\n int result;\n if (stat(src_path, &sbuf) != 0)\n return -1;\n result = 0;\n if (chown(dest_path, sbuf.st_uid, sbuf.st_gid) != 0)\n {\n }\n if (chmod(dest_path, sbuf.st_mode) != 0)\n result = -1;\n {\n struct timespec times[2];\n times[0] = sbuf.st_atim;\n times[1] = sbuf.st_mtim;\n if (utimensat(-100, dest_path, times, 0) != 0)\n result = -1;\n }\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#benchmark_prep#ppo_option_setter.c", "codebase": "tulipindicators-0.9.1", "c_file": "benchmark.c", "function": "ppo_option_setter", "sloc": "5", "c_code": "void ppo_option_setter(double period, double *options, int ti) {\n (void)ti;\n options[0] = period;\n options[1] = period + 10;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_location_information_prep#json_extract_value.c", "codebase": "json.h", "c_file": "allow_location_information.c", "function": "json_extract_value", "sloc": "3", "c_code": "struct json_value_s *json_extract_value(const struct json_value_s *value) {\n return json_extract_value_ex(value, 0, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#utmp_prep#RemoveUtmp.c", "codebase": "screen-4.9.0", "c_file": "utmp.c", "function": "RemoveUtmp", "sloc": "35", "c_code": "int\nRemoveUtmp(wi)\nstruct win *wi;\n{\n struct utmp u, *uu;\n slot_t slot;\n slot = wi->w_slot;\n do {} while (0);\n if (!utmpok)\n return -1;\n if (slot == (slot_t)0 || slot == (slot_t)-1)\n {\n wi->w_slot = (slot_t)-1;\n return 0;\n }\n bzero((char *) &u, sizeof(u));\n if ((uu = getutslot(slot)) == 0)\n {\n Msg(0, \"Utmp slot not found -> not removed\");\n return -1;\n }\n bcopy((char *)uu, (char *)&wi->w_savut, sizeof(wi->w_savut));\n u = *uu;\n makedead(&u);\n if (pututslot(slot, &u, (char *)0, wi) == 0)\n {\n Msg((*__errno_location ()),\"Could not write %s\", UtmpName);\n ;\n return -1;\n }\n do {} while (0);\n wi->w_slot = (slot_t)-1;\n ;\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#siv-gcm_prep#nettle_siv_gcm_decrypt_message.c", "codebase": "nettle-3.9.1", "c_file": "siv-gcm.c", "function": "nettle_siv_gcm_decrypt_message", "sloc": "28", "c_code": "int\nnettle_siv_gcm_decrypt_message (const struct nettle_cipher *nc,\n const void *ctx,\n void *ctr_ctx,\n size_t nlength, const uint8_t *nonce,\n size_t alength, const uint8_t *adata,\n size_t mlength, uint8_t *dst, const uint8_t *src)\n{\n union nettle_block16 authentication_key;\n uint8_t *encryption_key;\n union nettle_block16 state;\n uint8_t tag[16];\n ((void) sizeof ((nlength == 12) ? 1 : 0), __extension__ ({ if (nlength == 12) ; else __assert_fail (\"nlength == SIV_GCM_NONCE_SIZE\", \"siv-gcm.c\", 204, __extension__ __PRETTY_FUNCTION__); }));\n (encryption_key = __builtin_alloca (sizeof (*encryption_key) * (nc->key_size)));\n siv_gcm_derive_keys (ctx, nc->encrypt, nc->key_size, nlength, nonce,\n &authentication_key, encryption_key);\n memcpy (state.b, src + mlength, 16);\n state.b[15] |= 0x80;\n nc->set_encrypt_key (ctr_ctx, encryption_key);\n _nettle_ctr_crypt16 (ctr_ctx, nc->encrypt, siv_gcm_fill, state.b,\n mlength, dst, src);\n siv_gcm_authenticate (ctr_ctx, nc,\n &authentication_key,\n nonce, alength, adata,\n mlength, dst,\n tag);\n return nettle_memeql_sec (tag, src + mlength, 16);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 1, "enum_type": 0, "union_type": 2, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "heman#utility_prep#kmMin.c", "codebase": "heman", "c_file": "utility.c", "function": "kmMin", "sloc": "3", "c_code": "float kmMin(float lhs, float rhs) {\n return (lhs < rhs)? lhs : rhs;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#div_prep#ti_div.c", "codebase": "tulipindicators-0.9.1", "c_file": "div.c", "function": "ti_div", "sloc": "1", "c_code": "int ti_div(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *in1 = inputs[0]; const double *in2 = inputs[1]; (void)options; double *output = outputs[0]; int i; for (i = 0; i < size; ++i) { output[i] = (in1[i] / in2[i]); } return 0; }\n", "c_constructs": {"pointer_type": 4, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#gnutls_prep#ssl_cleanup.c", "codebase": "wget-1.21.4", "c_file": "gnutls.c", "function": "ssl_cleanup", "sloc": "10", "c_code": "void\nssl_cleanup (void)\n{\n if (!ssl_initialized)\n return;\n if (credentials)\n gnutls_certificate_free_credentials(credentials);\n gnutls_global_deinit();\n ssl_initialized = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#rcsutil_prep#chk_set_rev.c", "codebase": "rcs-5.10.1", "c_file": "rcsutil.c", "function": "chk_set_rev", "sloc": "9", "c_code": "void\nchk_set_rev (const char **rev, char *arg)\n{\n if (! *arg)\n return;\n if (*rev)\n generic_warn (((void *)0), \"redefinition of %s\", ks_revno);\n *rev = arg;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_2_prep#sort.c", "codebase": "transcoder-set", "c_file": "FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_2.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PYTHAGOREAN_QUADRUPLE_prep#main.c", "codebase": "transcoder-set", "c_file": "PYTHAGOREAN_QUADRUPLE.c", "function": "main", "sloc": "17", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {1,3,0,-1,82,14,6,13,96,70};\n int param1[] = {2,2,0,-1,79,57,96,7,65,33};\n int param2[] = {2,5,0,-1,6,35,45,3,72,6};\n int param3[] = {3,38,0,1,59,29,75,63,93,2};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libosip2-5.3.1#port_thread_prep#osip_thread_exit.c", "codebase": "libosip2-5.3.1", "c_file": "port_thread.c", "function": "osip_thread_exit", "sloc": "3", "c_code": "void osip_thread_exit() {\n pthread_exit(((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#simi_prep#GetStringArg.c", "codebase": "mcsim-6.2.0", "c_file": "simi.c", "function": "GetStringArg", "sloc": "18", "c_code": "BOOL GetStringArg (PINPUTBUF pibIn, PSTR *pszArg, PSTR szLex, BOOL bDelim)\n{\n BOOL bErr;\n ((void) sizeof ((szLex) ? 1 : 0), __extension__ ({ if (szLex) ; else __assert_fail (\"szLex\", \"simi.c\", 1155, __extension__ __PRETTY_FUNCTION__); }));\n if (bDelim)\n GetOptPunct(pibIn, szLex, ',');\n bErr = ENextLex(pibIn, szLex, 0x0010);\n if (!bErr) {\n if (szLex[0]) {\n if ( !(*pszArg = (PSTR) malloc(((szLex) ? strlen((szLex)) : (int) 0) + 1)))\n ReportError(pibIn, 0x0004 | 0x8000, \"GetStringArg\", ((void *)0));\n ((*pszArg) && (szLex) ? strcpy((*pszArg), (szLex)) : ((void *)0));\n }\n else\n *pszArg = ((void *)0);\n }\n return(bErr);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 1, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#screen-write_prep#screen_write_insertline.c", "codebase": "tmux", "c_file": "screen-write.c", "function": "screen_write_insertline", "sloc": "35", "c_code": "void\nscreen_write_insertline(struct screen_write_ctx *ctx, u_int ny, u_int bg)\n{\n struct screen *s = ctx->s;\n struct grid *gd = s->grid;\n struct tty_ctx ttyctx;\n if (ny == 0)\n ny = 1;\n if (s->cy < s->rupper || s->cy > s->rlower) {\n if (ny > ((s)->grid->sy) - s->cy)\n ny = ((s)->grid->sy) - s->cy;\n if (ny == 0)\n return;\n screen_write_initctx(ctx, &ttyctx);\n ttyctx.bg = bg;\n grid_view_insert_lines(gd, s->cy, ny, bg);\n screen_write_collect_flush(ctx, 0);\n ttyctx.num = ny;\n tty_write(tty_cmd_insertline, &ttyctx);\n return;\n }\n if (ny > s->rlower + 1 - s->cy)\n ny = s->rlower + 1 - s->cy;\n if (ny == 0)\n return;\n screen_write_initctx(ctx, &ttyctx);\n ttyctx.bg = bg;\n if (s->cy < s->rupper || s->cy > s->rlower)\n grid_view_insert_lines(gd, s->cy, ny, bg);\n else\n grid_view_insert_lines_region(gd, s->rlower, s->cy, ny, bg);\n screen_write_collect_flush(ctx, 0);\n ttyctx.num = ny;\n tty_write(tty_cmd_insertline, &ttyctx);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlURIGetFragment.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlURIGetFragment", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlURIGetFragment(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n const char * c_retval;\n xmlURIPtr URI;\n PyObject *pyobj_URI;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlURIGetFragment\", &pyobj_URI))\n return(((void *)0));\n URI = (xmlURIPtr) (((pyobj_URI) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyURI_Object *)(pyobj_URI))->obj));\n c_retval = URI->fragment;\n py_retval = libxml_charPtrConstWrap((const char *) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tmux#screen-write_prep#screen_write_setselection.c", "codebase": "tmux", "c_file": "screen-write.c", "function": "screen_write_setselection", "sloc": "9", "c_code": "void\nscreen_write_setselection(struct screen_write_ctx *ctx, u_char *str, u_int len)\n{\n struct tty_ctx ttyctx;\n screen_write_initctx(ctx, &ttyctx);\n ttyctx.ptr = str;\n ttyctx.num = len;\n tty_write(tty_cmd_setselection, &ttyctx);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#printquoted_prep#print_quoted.c", "codebase": "findutils-4.9.0", "c_file": "printquoted.c", "function": "print_quoted", "sloc": "35", "c_code": "int\nprint_quoted (FILE *fp,\n const struct quoting_options *qopts,\n _Bool dest_is_tty,\n const char *format,\n const char *s)\n{\n int rv;\n if (dest_is_tty)\n {\n char smallbuf[8192];\n size_t len = quotearg_buffer (smallbuf, sizeof smallbuf, s, -1, qopts);\n char *buf;\n if (len < sizeof smallbuf)\n buf = smallbuf;\n else\n {\n buf = xmalloc (len + 1);\n quotearg_buffer (buf, len + 1, s, -1, qopts);\n }\n len = qmark_chars (buf, len);\n buf[len] = 0;\n rv = fprintf (fp, format, buf);\n if (buf != smallbuf)\n {\n free (buf);\n buf = ((void *)0);\n }\n }\n else\n {\n rv = fprintf (fp, format, s);\n }\n return rv;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "brotli-1.0.9#utf8_util_prep#BrotliIsMostlyUTF8.c", "codebase": "brotli-1.0.9", "c_file": "utf8_util.c", "function": "BrotliIsMostlyUTF8", "sloc": "14", "c_code": "int BrotliIsMostlyUTF8(\n const uint8_t* data, const size_t pos, const size_t mask,\n const size_t length, const double min_fraction) {\n size_t size_utf8 = 0;\n size_t i = 0;\n while (i < length) {\n int symbol;\n size_t bytes_read =\n BrotliParseAsUTF8(&symbol, &data[(pos + i) & mask], length - i);\n i += bytes_read;\n if (symbol < 0x110000) size_utf8 += bytes_read;\n }\n return (!!((double)size_utf8 > min_fraction * (double)length) ? 1 : 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#paxerror_prep#truncate_warn.c", "codebase": "tar-1.34", "c_file": "paxerror.c", "function": "truncate_warn", "sloc": "5", "c_code": "void\ntruncate_warn (char const *name)\n{\n call_arg_warn (\"truncate\", name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlsave_prep#xmlSaveFile.c", "codebase": "libxml2", "c_file": "xmlsave.c", "function": "xmlSaveFile", "sloc": "4", "c_code": "int\nxmlSaveFile(const char *filename, xmlDocPtr cur) {\n return(xmlSaveFormatFileEnc(filename, cur, ((void *)0), 0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#basename_prep#base_name.c", "codebase": "tar-1.34", "c_file": "basename.c", "function": "base_name", "sloc": "21", "c_code": "char *\nbase_name (char const *name)\n{\n char const *base = last_component (name);\n size_t length;\n if (! *base)\n return xstrndup (name, base_len (name));\n length = base_len (base);\n if (((base[length]) == '/'))\n length++;\n if (((void) (base), 0))\n {\n char *p = xmalloc (length + 3);\n p[0] = '.';\n p[1] = '/';\n memcpy (p + 2, base, length);\n p[length + 2] = '\\0';\n return p;\n }\n return xstrndup (base, length);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "json.h#test_prep#json_extract_value_ex.c", "codebase": "json.h", "c_file": "test.c", "function": "json_extract_value_ex", "sloc": "23", "c_code": "struct json_value_s *json_extract_value_ex(const struct json_value_s *value,\n void *(*alloc_func_ptr)(void *,\n size_t),\n void *user_data) {\n void *allocation;\n struct json_extract_result_s result;\n struct json_extract_state_s state;\n size_t total_size;\n if (0 == value) {\n return 0;\n }\n result = json_extract_get_value_size(value);\n total_size = result.dom_size + result.data_size;\n if (0 == alloc_func_ptr) {\n allocation = malloc(total_size);\n } else {\n allocation = alloc_func_ptr(user_data, total_size);\n }\n state.dom = (char *)allocation;\n state.data = state.dom + result.dom_size;\n json_extract_copy_value(&state, value);\n return (struct json_value_s *)allocation;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 2, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#TEMPLE_OFFERINGS_prep#sort.c", "codebase": "transcoder-set", "c_file": "TEMPLE_OFFERINGS.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#asnprintf_prep#asnprintf.c", "codebase": "nano-7.2", "c_file": "asnprintf.c", "function": "asnprintf", "sloc": "10", "c_code": "char *\nasnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)\n{\n va_list args;\n char *result;\n __builtin_va_start(args,format);\n result = vasnprintf (resultbuf, lengthp, format, args);\n __builtin_va_end(args);\n return result;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#uri_prep#xmlParseURISafe.c", "codebase": "libxml2", "c_file": "uri.c", "function": "xmlParseURISafe", "sloc": "20", "c_code": "int\nxmlParseURISafe(const char *str, xmlURIPtr *uriOut) {\n xmlURIPtr uri;\n int ret;\n if (uriOut == ((void *)0))\n return(1);\n *uriOut = ((void *)0);\n if (str == ((void *)0))\n return(1);\n uri = xmlCreateURI();\n if (uri == ((void *)0))\n return(-1);\n ret = xmlParse3986URIReference(uri, str);\n if (ret) {\n xmlFreeURI(uri);\n return(ret);\n }\n *uriOut = uri;\n return(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Rd_In_Code.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Rd_In_Code", "sloc": "5", "c_code": "int\nPl_Rd_In_Code(WamWord start_word)\n{\n return Pl_Rd_Integer(start_word);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_DISTINCT_OCCURRENCES_AS_A_SUBSEQUENCE_prep#min.c", "codebase": "transcoder-set", "c_file": "COUNT_DISTINCT_OCCURRENCES_AS_A_SUBSEQUENCE.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#xmalloc_prep#x2realloc.c", "codebase": "tar-1.34", "c_file": "xmalloc.c", "function": "x2realloc", "sloc": "5", "c_code": "void *\nx2realloc (void *p, size_t *pn)\n{\n return x2nrealloc (p, pn, 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "heman#mat3_prep#kmMat3Scaling.c", "codebase": "heman", "c_file": "mat3.c", "function": "kmMat3Scaling", "sloc": "7", "c_code": "kmMat3* kmMat3Scaling(kmMat3* pOut, const float x, const float y)\n{\n kmMat3Identity(pOut);\n pOut->mat[0] = x;\n pOut->mat[4] = y;\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DICE_THROW_PROBLEM_prep#sort.c", "codebase": "transcoder-set", "c_file": "DICE_THROW_PROBLEM.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#linedit_prep#Pl_LE_Get_Current_Position.c", "codebase": "gprolog-1.5.0", "c_file": "linedit.c", "function": "Pl_LE_Get_Current_Position", "sloc": "5", "c_code": "int\nPl_LE_Get_Current_Position(void)\n{\n return global_pos - global_str;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_UNIT_DIGIT_X_RAISED_POWER_Y_prep#len.c", "codebase": "transcoder-set", "c_file": "FIND_UNIT_DIGIT_X_RAISED_POWER_Y.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlschemastypes_prep#xmlSchemaValueGetAsBoolean.c", "codebase": "libxml2", "c_file": "xmlschemastypes.c", "function": "xmlSchemaValueGetAsBoolean", "sloc": "7", "c_code": "int\nxmlSchemaValueGetAsBoolean(xmlSchemaValPtr val)\n{\n if ((val == ((void *)0)) || (val->type != XML_SCHEMAS_BOOLEAN))\n return (0);\n return (val->value.b);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "patch-2.7.6#util_prep#savestr.c", "codebase": "patch-2.7.6", "c_file": "util.c", "function": "savestr", "sloc": "5", "c_code": "char *\nsavestr (char const *s)\n{\n return savebuf (s, strlen (s) + 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#chvalid_prep#xmlIsChar.c", "codebase": "libxml2", "c_file": "chvalid.c", "function": "xmlIsChar", "sloc": "4", "c_code": "int\nxmlIsChar(unsigned int ch) {\n return((((ch) < 0x100) ? (((0x9 <= ((ch))) && (((ch)) <= 0xa)) || (((ch)) == 0xd) || (0x20 <= ((ch)))) : (((0x100 <= (ch)) && ((ch) <= 0xd7ff)) || ((0xe000 <= (ch)) && ((ch) <= 0xfffd)) || ((0x10000 <= (ch)) && ((ch) <= 0x10ffff)))));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bc-1.07.1#scan_prep#yy_scan_buffer.c", "codebase": "bc-1.07.1", "c_file": "scan.c", "function": "yy_scan_buffer", "sloc": "22", "c_code": "YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )\n{\n YY_BUFFER_STATE b;\n if ( size < 2 ||\n base[size-2] != 0 ||\n base[size-1] != 0 )\n return 0;\n b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );\n if ( ! b )\n yy_fatal_error( \"out of dynamic memory in yy_scan_buffer()\" );\n b->yy_buf_size = size - 2;\n b->yy_buf_pos = b->yy_ch_buf = base;\n b->yy_is_our_buffer = 0;\n b->yy_input_file = 0;\n b->yy_n_chars = b->yy_buf_size;\n b->yy_is_interactive = 0;\n b->yy_at_bol = 1;\n b->yy_fill_buffer = 0;\n b->yy_buffer_status = 0;\n yy_switch_to_buffer(b );\n return b;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#port_condv_prep#osip_cond_timedwait.c", "codebase": "libosip2-5.3.1", "c_file": "port_condv.c", "function": "osip_cond_timedwait", "sloc": "5", "c_code": "int osip_cond_timedwait(struct osip_cond *_cond, struct osip_mutex *_mut, const struct timespec *abstime) {\n if (!_cond)\n return -2;\n return pthread_cond_timedwait(&_cond->cv, (pthread_mutex_t *) _mut, (const struct timespec *) abstime);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#DIVISIBILITY_9_USING_BITWISE_OPERATORS_prep#max.c", "codebase": "transcoder-set", "c_file": "DIVISIBILITY_9_USING_BITWISE_OPERATORS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#testparser_prep#main.c", "codebase": "libxml2", "c_file": "testparser.c", "function": "main", "sloc": "22", "c_code": "int\nmain(void) {\n int err = 0;\n err |= testNewDocNode();\n err |= testStandaloneWithEncoding();\n err |= testUnsupportedEncoding();\n err |= testNodeGetContent();\n err |= testCFileIO();\n err |= testCtxtParseContent();\n err |= testBalancedChunk();\n err |= testHugePush();\n err |= testHugeEncodedChunk();\n err |= testHtmlIds();\n err |= testHtmlPushWithEncoding();\n err |= testReaderEncoding();\n err |= testReaderContent();\n err |= testReaderXIncludeError();\n err |= testWriterClose();\n err |= testBuildRelativeUri();\n err |= testCharEncConvImpl();\n return err;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "heman#color_prep#heman_color_from_cpcf.c", "codebase": "heman", "c_file": "color.c", "function": "heman_color_from_cpcf", "sloc": "25", "c_code": "heman_image* heman_color_from_cpcf(heman_image* cfield, heman_image* texture)\n{\n if (!texture) {\n return heman_internal_rg(cfield);\n }\n ((void) sizeof ((cfield->nbands == 2) ? 1 : 0), __extension__ ({ if (cfield->nbands == 2) ; else __assert_fail (\"cfield->nbands == 2\", \"/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/heman/src/color.c\", 151, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((texture->nbands == 3 || texture->nbands == 4) ? 1 : 0), __extension__ ({ if (texture->nbands == 3 || texture->nbands == 4) ; else __assert_fail (\"texture->nbands == 3 || texture->nbands == 4\", \"/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/heman/src/color.c\", 152, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((cfield->width == texture->width) ? 1 : 0), __extension__ ({ if (cfield->width == texture->width) ; else __assert_fail (\"cfield->width == texture->width\", \"/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/heman/src/color.c\", 153, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((cfield->height == texture->height) ? 1 : 0), __extension__ ({ if (cfield->height == texture->height) ; else __assert_fail (\"cfield->height == texture->height\", \"/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/heman/src/color.c\", 154, __extension__ __PRETTY_FUNCTION__); }));\n int w = cfield->width;\n int h = cfield->height;\n heman_image* target = heman_image_create(w, h, texture->nbands);\n float* dst = target->data;\n float* src = cfield->data;\n int size = w * h;\n for (int i = 0; i < size; i++) {\n float u = *src++;\n float v = *src++;\n float* texel = heman_image_texel(texture, u, v);\n for (int c = 0; c < texture->nbands; c++) {\n *dst++ = *texel++;\n }\n }\n return target;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#base16-decode_prep#nettle_base16_decode_single.c", "codebase": "nettle-3.9.1", "c_file": "base16-decode.c", "function": "nettle_base16_decode_single", "sloc": "33", "c_code": "int\nnettle_base16_decode_single(struct base16_decode_ctx *ctx,\n uint8_t *dst,\n char src)\n{\n unsigned char usrc = src;\n int digit;\n if (usrc >= 0x80)\n return -1;\n digit = hex_decode_table[usrc];\n switch (digit)\n {\n case -1:\n return -1;\n case -2:\n return 0;\n default:\n ((void) sizeof ((digit >= 0) ? 1 : 0), __extension__ ({ if (digit >= 0) ; else __assert_fail (\"digit >= 0\", \"base16-decode.c\", 86, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((digit < 0x10) ? 1 : 0), __extension__ ({ if (digit < 0x10) ; else __assert_fail (\"digit < 0x10\", \"base16-decode.c\", 87, __extension__ __PRETTY_FUNCTION__); }));\n if (ctx->bits)\n {\n *dst = (ctx->word << 4) | digit;\n ctx->bits = 0;\n return 1;\n }\n else\n {\n ctx->word = digit;\n ctx->bits = 4;\n return 0;\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "libxml2#globals_prep#__xmlGenericError.c", "codebase": "libxml2", "c_file": "globals.c", "function": "__xmlGenericError", "sloc": "1", "c_code": "xmlGenericErrorFunc *__xmlGenericError(void) { return (&xmlGetThreadLocalStorage(0)->gs_xmlGenericError); }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#parserInternals_prep#xmlCtxtSetResourceLoader.c", "codebase": "libxml2", "c_file": "parserInternals.c", "function": "xmlCtxtSetResourceLoader", "sloc": "8", "c_code": "void\nxmlCtxtSetResourceLoader(xmlParserCtxtPtr ctxt, xmlResourceLoader loader,\n void *vctxt) {\n if (ctxt == ((void *)0))\n return;\n ctxt->resourceLoader = loader;\n ctxt->resourceCtxt = vctxt;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_prep#osip_timers_ist_execute.c", "codebase": "libosip2-5.3.1", "c_file": "osip.c", "function": "osip_timers_ist_execute", "sloc": "24", "c_code": "void osip_timers_ist_execute(osip_t *osip) {\n osip_transaction_t *tr;\n osip_list_iterator_t iterator;\n osip_mutex_lock(osip->ist_fastmutex);\n tr = (osip_transaction_t *) osip_list_get_first(&osip->osip_ist_transactions, &iterator);\n while ((0 != (iterator).actual && (iterator).pos < (iterator).li->nb_elt)) {\n osip_event_t *evt;\n evt = __osip_ist_need_timer_i_event(tr->ist_context, tr->state, tr->transactionid);\n if (evt != ((void *)0))\n osip_fifo_add(tr->transactionff, evt);\n else {\n evt = __osip_ist_need_timer_h_event(tr->ist_context, tr->state, tr->transactionid);\n if (evt != ((void *)0))\n osip_fifo_add(tr->transactionff, evt);\n else {\n evt = __osip_ist_need_timer_g_event(tr->ist_context, tr->state, tr->transactionid);\n if (evt != ((void *)0))\n osip_fifo_add(tr->transactionff, evt);\n }\n }\n tr = (osip_transaction_t *) osip_list_get_next(&iterator);\n }\n osip_mutex_unlock(osip->ist_fastmutex);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_WHETHER_GIVEN_INTEGER_POWER_3_NOT_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FIND_WHETHER_GIVEN_INTEGER_POWER_3_NOT.c", "function": "f_gold", "sloc": "3", "c_code": "_Bool f_gold ( int n ) {\n return 1162261467 % n == 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_authorization_prep#osip_authorization_get_version.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authorization.c", "function": "osip_authorization_get_version", "sloc": "3", "c_code": "char *osip_authorization_get_version(osip_authorization_t *authorization) {\n return authorization->version;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlTextReaderGetParserLineNumber.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlTextReaderGetParserLineNumber", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlTextReaderGetParserLineNumber(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlTextReaderPtr reader;\n PyObject *pyobj_reader;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlTextReaderGetParserLineNumber\", &pyobj_reader))\n return(((void *)0));\n reader = (xmlTextReaderPtr) (((pyobj_reader) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlTextReader_Object *)(pyobj_reader))->obj));\n c_retval = xmlTextReaderGetParserLineNumber(reader);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "heman#distance_prep#heman_distance_from_cpcf.c", "codebase": "heman", "c_file": "distance.c", "function": "heman_distance_from_cpcf", "sloc": "17", "c_code": "heman_image* heman_distance_from_cpcf(heman_image* cf)\n{\n ((void) sizeof ((cf->nbands == 2 && \"Coordinate field input must have 2 bands.\") ? 1 : 0), __extension__ ({ if (cf->nbands == 2 && \"Coordinate field input must have 2 bands.\") ; else __assert_fail (\"cf->nbands == 2 && \\\"Coordinate field input must have 2 bands.\\\"\", \"/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/heman/src/distance.c\", 259, __extension__ __PRETTY_FUNCTION__); }));\n heman_image* udf = heman_image_create(cf->width, cf->height, 1);\n float* dptr = udf->data;\n float* sptr = cf->data;\n float scale = 1.0f / sqrt(((cf->width) * (cf->width)) + ((cf->height) * (cf->height)));\n for (int y = 0; y < cf->height; y++) {\n for (int x = 0; x < cf->width; x++) {\n float u = *sptr++;\n float v = *sptr++;\n float dist = sqrt(((u - x) * (u - x)) + ((v - y) * (v - y))) * scale;\n *dptr++ = dist;\n }\n }\n return udf;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "urlparser#gen_char_category_table_prep#fill.c", "codebase": "urlparser", "c_file": "gen_char_category_table.c", "function": "fill", "sloc": "11", "c_code": "void fill(unsigned value, const char* alnum, const char* special)\n{\n for(;*alnum;++alnum)\n {\n char_cat[ (unsigned char)(*alnum) ] |= value;\n }\n for(;*special;++special)\n {\n char_cat[ (unsigned char)(*special) ] |= value;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "buffer-0.4.0#buffer_prep#buffer_append_n.c", "codebase": "buffer-0.4.0", "c_file": "buffer.c", "function": "buffer_append_n", "sloc": "13", "c_code": "int\nbuffer_append_n(buffer_t *self, const char *str, size_t len) {\n size_t prev = strlen(self->data);\n size_t needed = len + prev;\n if (self->len > needed) {\n strncat(self->data, str, len);\n return 0;\n }\n int ret = buffer_resize(self, needed);\n if (-1 == ret) return -1;\n strncat(self->data, str, len);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "uucp-1.07#statsb_prep#fsysdep_touch_file.c", "codebase": "uucp-1.07", "c_file": "statsb.c", "function": "fsysdep_touch_file", "sloc": "11", "c_code": "boolean\nfsysdep_touch_file (zfile)\n const char *zfile;\n{\n if (issettime (zfile, time ((time_t *) ((void *)0))) != 0)\n {\n ulog (LOG_ERROR, \"utime (%s): %s\", zfile, strerror ((*__errno_location ())));\n return (0);\n }\n return (1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_write_pretty.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_write_pretty", "sloc": "42", "c_code": "void *json_write_pretty(const struct json_value_s *value, const char *indent,\n const char *newline, size_t *out_size) {\n size_t size = 0;\n size_t indent_size = 0;\n size_t newline_size = 0;\n char *data = 0;\n char *data_end = 0;\n if (0 == value) {\n return 0;\n }\n if (0 == indent) {\n indent = \" \";\n }\n if (0 == newline) {\n newline = \"\\n\";\n }\n while ('\\0' != indent[indent_size]) {\n ++indent_size;\n }\n while ('\\0' != newline[newline_size]) {\n ++newline_size;\n }\n if (json_write_pretty_get_value_size(value, 0, indent_size, newline_size,\n &size)) {\n return 0;\n }\n size += 1;\n data = (char *)malloc(size);\n if (0 == data) {\n return 0;\n }\n data_end = json_write_pretty_value(value, 0, indent, newline, data);\n if (0 == data_end) {\n free(data);\n return 0;\n }\n *data_end = '\\0';\n if (0 != out_size) {\n *out_size = size;\n }\n return data;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 2, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 2, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "enscript-1.6.6#afm_prep#afm_error.c", "codebase": "enscript-1.6.6", "c_file": "afm.c", "function": "afm_error", "sloc": "5", "c_code": "void\nafm_error (AFMHandle handle, char *message)\n{\n fprintf (stderr, \"AFM Error: %s\\n\", message);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#unlink_prep#queue_deferred_unlink.c", "codebase": "tar-1.34", "c_file": "unlink.c", "function": "queue_deferred_unlink", "sloc": "28", "c_code": "void\nqueue_deferred_unlink (const char *name, _Bool is_dir)\n{\n struct deferred_unlink *p;\n if (dunlink_head\n && records_written > dunlink_head->records_written + deferred_unlink_delay)\n flush_deferred_unlinks (0);\n p = dunlink_alloc ();\n p->next = ((void *)0);\n p->dir_idx = chdir_current;\n p->file_name = xstrdup (name);\n normalize_filename_x (p->file_name);\n p->is_dir = is_dir;\n p->records_written = records_written;\n if (((p)->is_dir && ((p)->file_name[0] == 0 || strcmp ((p)->file_name, \".\") == 0)))\n {\n struct deferred_unlink *q, *prev;\n for (q = dunlink_head, prev = ((void *)0); q; prev = q, q = q->next)\n if (((q)->is_dir && ((q)->file_name[0] == 0 || strcmp ((q)->file_name, \".\") == 0)) && q->dir_idx < p->dir_idx)\n break;\n if (q)\n dunlink_insert (prev, p);\n else\n dunlink_insert (dunlink_tail, p);\n }\n else\n dunlink_insert (dunlink_tail, p);\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 1, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "cflow-1.7#getopt_prep#rpl_getopt.c", "codebase": "cflow-1.7", "c_file": "getopt.c", "function": "rpl_getopt", "sloc": "1", "c_code": "int rpl_getopt (int argc, char *const *argv, const char *optstring) { return rpl_getopt_internal (argc, (char **)argv, optstring, 0, 0, 0, 1); }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_SUBSEQUENCES_AB_STRING_REPEATED_K_TIMES_prep#min.c", "codebase": "transcoder-set", "c_file": "NUMBER_SUBSEQUENCES_AB_STRING_REPEATED_K_TIMES.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#wam2ma_prep#BT_String_List_Rec.c", "codebase": "gprolog-1.5.0", "c_file": "wam2ma.c", "function": "BT_String_List_Rec", "sloc": "9", "c_code": "void\nBT_String_List_Rec(BTNode *bt_node, BTStrLstFct fct)\n{\n if (bt_node == ((void *)0))\n return;\n BT_String_List_Rec(bt_node->left, fct);\n (*fct) (bt_node->no, bt_node->str, (void *) bt_node->info);\n BT_String_List_Rec(bt_node->right, fct);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#POSITION_ELEMENT_STABLE_SORT_prep#main.c", "codebase": "transcoder-set", "c_file": "POSITION_ELEMENT_STABLE_SORT.c", "function": "main", "sloc": "26", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {4,8,9,12,15,16,18,28,28,31,33,36,36,37,40,41,44,44,46,50,50,50,52,52,54,55,60,61,65,68,71,75,75,78,81,84,87,89,90,92,94,97,97,98,98,99};\nint param0_1[] = {-16,86,94,-86,-38,64,96,-64,94,10,-10,-62,-50,-46,-62,-32,-4,72,14,36,74,-66,46,82,-44,-22,-26,16,-8,0,-90,94,-50,22,-82,8,92,-84,-34,-36,-66};\nint param0_2[] = {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};\nint param0_3[] = {66,8,30,84,36,96,45,63,23,23,14,34,86,51,18,97,21,39,96,70,28,96,78,68,88,66,13,24,74,94};\nint param0_4[] = {-94,-90,-86,-86,-72,-72,-58,-50,-32,-22,-18,-10,-4,-2,-2,0,0,6,14,22,22,36,36,40,44,58,60,70,70,76,82,82,84,88,96};\nint param0_5[] = {1,1,1,0,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,1,0,0,1,0,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1};\nint param0_6[] = {3,5,6,7,8,10,17,20,20,26,27,27,27,32,32,38,40,44,45,45,45,45,47,50,57,57,57,58,62,63,63,67,68,73,75,76,77,79,79,80,85,88,89,89,89,94,96,98};\nint param0_7[] = {98,-92,18,-18,44,-88,-90,-66,-38,78,-22,-46,-20,64,-10,54};\nint 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,1,1,1,1,1,1,1,1,1,1,1,1,1};\nint param0_9[] = {14,17};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {37,31,30,26,17,30,42,14,19,1};\n int param2[] = {32,27,34,21,31,36,35,12,31,1};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "json.h#test_prep#json_extract_get_array_size.c", "codebase": "json.h", "c_file": "test.c", "function": "json_extract_get_array_size", "sloc": "17", "c_code": "struct json_extract_result_s\njson_extract_get_array_size(const struct json_array_s *const array) {\n struct json_extract_result_s result;\n size_t i;\n const struct json_array_element_s *element = array->start;\n result.dom_size = sizeof(struct json_array_s) +\n (sizeof(struct json_array_element_s) * array->length);\n result.data_size = 0;\n for (i = 0; i < array->length; i++) {\n const struct json_extract_result_s value_result =\n json_extract_get_value_size(element->value);\n result.dom_size += value_result.dom_size;\n result.data_size += value_result.data_size;\n element = element->next;\n }\n return result;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "xzoom#xzoom_prep#main.c", "codebase": "xzoom", "c_file": "xzoom.c", "function": "main", "sloc": "375", "c_code": "int\nmain(int argc, char **argv) {\n XSetWindowAttributes xswa;\n XEvent event;\n XTextProperty str;\n XSizeHints *sizeh = ((void *)0);\n XClassHint *ch;\n int buttonpressed = 0;\n int visible = 0;\n int scroll = 1;\n char title[80];\n XGCValues gcv;\n char *dpyname = ((void *)0);\n int source_geom_mask = 0x0000,\n dest_geom_mask = 0x0000,\n copy_from_src_mask;\n int xpos = 0, ypos = 0;\n int isdock = 0;\n atexit(destroy_images);\n progname = strrchr(argv[0], '/');\n if(progname)\n ++progname;\n else\n progname = argv[0];\n while(--argc > 0) {\n ++argv;\n if(argv[0][0] == '=') {\n dest_geom_mask = XParseGeometry(argv[0],\n &xpos, &ypos,\n &width[1], &height[1]);\n continue;\n }\n if(!strcmp(argv[0], \"-mag\")) {\n ++argv; --argc;\n magx = argc > 0 ? atoi(argv[0]) : -1;\n if(magx <= 0)\n Usage();\n magy = argc > 1 ? atoi(argv[1]) : -1;\n if(magy <= 0)\n magy = magx;\n else {\n ++argv; --argc;\n }\n continue;\n }\n if(!strcmp(argv[0], \"-x\")) {\n flipx = 1;\n continue;\n }\n if(!strcmp(argv[0], \"-y\")) {\n flipy = 1;\n continue;\n }\n if(!strcmp(argv[0], \"-z\") ||\n !strcmp(argv[0], \"-xy\")) {\n flipxy = 1;\n continue;\n }\n if(!strcmp(argv[0], \"-source\")) {\n ++argv; --argc;\n if(argc < 1)\n Usage();\n source_geom_mask = XParseGeometry(argv[0],\n &xgrab, &ygrab,\n &width[0], &height[0]);\n continue;\n }\n if(!strcmp(argv[0], \"-dest\") ||\n !strcmp(argv[0], \"-geometry\")) {\n ++argv; --argc;\n if(argc < 1)\n Usage();\n dest_geom_mask = XParseGeometry(argv[0],\n &xpos, &ypos,\n &width[1], &height[1]);\n continue;\n }\n if(!strcmp(argv[0], \"-d\") ||\n !strcmp(argv[0], \"-display\")) {\n ++argv; --argc;\n if(argc < 1)\n Usage();\n dpyname = argv[0];\n continue;\n }\n if(!strcmp(argv[0], \"-delay\")) {\n ++argv; --argc;\n if(argc < 1)\n Usage();\n if(sscanf(argv[0], \"%u\", &delay) != 1)\n Usage();\n delay *= 1000;\n continue;\n }\n if(!strcmp(argv[0], \"-dock\")) {\n isdock = 1;\n continue;\n }\n Usage();\n }\n if (!(dpy = XOpenDisplay(dpyname))) {\n perror(\"Cannot open display\");\n exit(-1);\n }\n copy_from_src_mask = 0x0000;\n if(source_geom_mask & 0x0004) {\n if(flipxy) {\n height[1] = magy * width[0];\n copy_from_src_mask |= 0x0008;\n }\n else {\n width[1] = magx * width[0];\n copy_from_src_mask |= 0x0004;\n }\n }\n if(source_geom_mask & 0x0008) {\n if(flipxy) {\n width[1] = magx * height[0];\n copy_from_src_mask |= 0x0004;\n }\n else {\n height[1] = magy * height[0];\n copy_from_src_mask |= 0x0008;\n }\n }\n if(copy_from_src_mask & dest_geom_mask) {\n fprintf(stderr, \"Conflicting dimensions between source and dest geometry\\n\");\n Usage();\n }\n scr = (&((_XPrivDisplay)(dpy))->screens[(((_XPrivDisplay)(dpy))->default_screen)]);\n depth = ((scr)->root_depth);\n if (depth < 8) {\n fprintf(stderr, \"%s: need at least 8 bits/pixel\\n\", progname);\n exit(1);\n }\n if(source_geom_mask & 0x0010)\n xgrab += ((scr)->width);\n if(source_geom_mask & 0x0020)\n ygrab += ((scr)->height);\n if(dest_geom_mask & 0x0010)\n xpos += ((scr)->width);\n if(dest_geom_mask & 0x0020)\n ypos += ((scr)->height);\n printf(\"=%dx%d+%d+%d\\n\", width[1], height[1], xpos, ypos);\n xswa.event_mask = (1L<<2)|(1L<<3)|(1L<<13);\n xswa.event_mask |= (1L<<17);\n xswa.event_mask |= (1L<<0)|(1L<<1);\n xswa.event_mask |= (1L<<16);\n xswa.background_pixel = ((scr)->black_pixel);\n win = XCreateWindow(dpy, ((scr)->root),\n xpos, ypos, width[1], height[1], 0,\n ((scr)->root_depth), 1,\n ((scr)->root_visual),\n (1L<<11) | (1L<<1), &xswa);\n XChangeProperty(dpy, win, ((Atom) 37), ((Atom) 31), 8,\n 0,\n (unsigned char *)progname, strlen(progname));\n if(!isdock) {\n sizeh = XAllocSizeHints();\n sizeh->flags = (1L << 5) | (1L << 4);\n sizeh->min_width = sizeh->max_width = width[1];\n sizeh->min_height = sizeh->max_height = height[1];\n }\n XStringListToTextProperty(&progname, 1, &str);\n ch = XAllocClassHint();\n ch->res_class = progname;\n ch->res_name = progname;\n XSetWMProperties(dpy, win, &str, &str, ((void *)0), 0, sizeh, ((void *)0), ch);\n if(isdock) {\n wm_windowtype = XInternAtom(dpy, \"_NET_WM_WINDOW_TYPE\", 0);\n wm_dock = XInternAtom(dpy, \"_NET_WM_WINDOW_TYPE_DOCK\", 0);\n XChangeProperty(dpy, win, wm_windowtype, ((Atom) 4), 32,\n 0, (unsigned char *)&wm_dock,\n 1);\n }\n wm_delete_window = XInternAtom (dpy, \"WM_DELETE_WINDOW\", 0);\n wm_protocols = XInternAtom(dpy, \"WM_PROTOCOLS\", 0);\n status = XSetWMProtocols(dpy, win, &wm_delete_window, 1);\n set_title = 1;\n status = XMapWindow(dpy, win);\n gcv.plane_mask = ((unsigned long)~0L);\n gcv.subwindow_mode = 1;\n gcv.function = 0x3;\n gcv.foreground = ((scr)->white_pixel);\n gcv.background = ((scr)->black_pixel);\n gc = XCreateGC(dpy, ((scr)->root),\n (1L<<0)|(1L<<1)|(1L<<15)|(1L<<2)|(1L<<3),\n &gcv);\n resize(width[1], height[1]);\n when_button = XCreateFontCursor(dpy, 144);\n crosshair = XCreateFontCursor(dpy, 34);\n XDefineCursor(dpy, win, crosshair);\n for(;;) {\n while(XPending(dpy)) {\n XNextEvent(dpy, &event);\n switch(event.type) {\n case 33:\n if ((event.xclient.message_type == wm_protocols) &&\n (event.xclient.data.l[0] == wm_delete_window)) {\n exit(0);\n }\n break;\n case 22:\n if(event.xconfigure.width != width[1] ||\n event.xconfigure.height != height[1]) {\n resize(event.xconfigure.width, event.xconfigure.height);\n }\n break;\n case 21:\n break;\n case 15:\n visible = (event.xvisibility.state!=2);\n break;\n case 3:\n switch(XKeycodeToKeysym(dpy, event.xkey.keycode, 0)) {\n case 0xffe3:\n case 0xffe4:\n scroll = 1;\n break;\n }\n break;\n case 2:\n switch(XKeycodeToKeysym(dpy, event.xkey.keycode, 0)) {\n case 0xffe3:\n case 0xffe4:\n scroll = 10;\n break;\n case '+':\n case '=':\n case 0xffab:\n if(!yzoom_flag) ++magx;\n if(!xzoom_flag) ++magy;\n xzoom_flag = yzoom_flag = 0;\n resize(width[1], height[1]);\n set_title = 1;\n break;\n case '-':\n case 0xffad:\n if(!yzoom_flag) --magx;\n if(!xzoom_flag) --magy;\n xzoom_flag = yzoom_flag = 0;\n if(magx < 1) magx = 1;\n if(magy < 1) magy = 1;\n resize(width[1], height[1]);\n set_title = 1;\n break;\n case 0xff51:\n case 0xff96:\n if(flipxy)\n if(flipx)\n ygrab += scroll;\n else\n ygrab -= scroll;\n else\n if(flipx)\n xgrab += scroll;\n else\n xgrab -= scroll;\n break;\n case 0xff53:\n case 0xff98:\n if(flipxy)\n if(flipx)\n ygrab -= scroll;\n else\n ygrab += scroll;\n else\n if(flipx)\n xgrab -= scroll;\n else\n xgrab += scroll;\n break;\n case 0xff52:\n case 0xff97:\n if(flipxy)\n if(flipy)\n xgrab -= scroll;\n else\n xgrab += scroll;\n else\n if(flipy)\n ygrab += scroll;\n else\n ygrab -= scroll;\n break;\n case 0xff54:\n case 0xff99:\n if(flipxy)\n if(flipy)\n xgrab += scroll;\n else\n xgrab -= scroll;\n else\n if(flipy)\n ygrab -= scroll;\n else\n ygrab += scroll;\n break;\n case 'x':\n flipx = !flipx;\n set_title = 1;\n break;\n case 'y':\n flipy = !flipy;\n set_title = 1;\n break;\n case 'z':\n if(flipx^flipy^flipxy) {\n flipx = !flipx;\n flipy = !flipy;\n }\n flipxy = !flipxy;\n resize(width[1], height[1]);\n set_title = 1;\n break;\n case 'w':\n xzoom_flag = 1;\n yzoom_flag = 0;\n break;\n case 'h':\n yzoom_flag = 1;\n xzoom_flag = 0;\n break;\n case 'g':\n gridx = !gridx;\n gridy = !gridy;\n break;\n case 'd':\n if(++delay_index >= 5)\n delay_index = 0;\n delay = delays[delay_index];\n sprintf(title, \"delay = %d ms\", delay/1000);\n XChangeProperty(dpy, win, ((Atom) 39), ((Atom) 31), 8,\n 0,\n (unsigned char *)title, strlen(title));\n signal(14, timeout_func);\n alarm(2);\n break;\n case 'q':\n exit(0);\n break;\n }\n break;\n case 4:\n xgrab = event.xbutton.x_root;\n ygrab = event.xbutton.y_root;\n XDefineCursor(dpy, win, when_button);\n buttonpressed = 1;\n break;\n case 5:\n XDefineCursor(dpy, win, crosshair);\n buttonpressed = 0;\n break;\n case 6:\n if(buttonpressed) {\n xgrab = event.xmotion.x_root;\n ygrab = event.xmotion.y_root;\n }\n break;\n }\n if(xgrab < 0)\n xgrab = 0;\n if(xgrab > ((scr)->width)-width[0])\n xgrab = ((scr)->width)-width[0];\n if(ygrab < 0)\n ygrab = 0;\n if(ygrab > ((scr)->height)-height[0])\n ygrab = ((scr)->height)-height[0];\n }\n if(visible)\n xzoom(buttonpressed);\n if(!buttonpressed && delay > 0)\n usleep(delay);\n }\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 6, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 60, "for_loop": 1, "while_loop": 2, "switch_statement": 3, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 35}}, {"id": "transcoder-set#PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE_prep#main.c", "codebase": "transcoder-set", "c_file": "PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {98,9,18,38,84,8,39,6,60,47};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "patch-2.7.6#hash_prep#hash_get_max_bucket_length.c", "codebase": "patch-2.7.6", "c_file": "hash.c", "function": "hash_get_max_bucket_length", "sloc": "19", "c_code": "size_t\nhash_get_max_bucket_length (const Hash_table *table)\n{\n struct hash_entry const *bucket;\n size_t max_bucket_length = 0;\n for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)\n {\n if (bucket->data)\n {\n struct hash_entry const *cursor = bucket;\n size_t bucket_length = 1;\n while (cursor = cursor->next, cursor)\n bucket_length++;\n if (bucket_length > max_bucket_length)\n max_bucket_length = bucket_length;\n }\n }\n return max_bucket_length;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#socket_prep#ReceiveRaw.c", "codebase": "screen-4.9.0", "c_file": "socket.c", "function": "ReceiveRaw", "sloc": "31", "c_code": "void\nReceiveRaw(s)\nint s;\n{\n char rd[256];\n int len = 0;\n struct sockaddr_un a;\n _Bool is_socket;\n is_socket = IsSocket(SockPath);\n if (!is_socket)\n {\n if (fcntl(s, 4, 0) < 0)\n Panic((*__errno_location ()), \"BLOCK fcntl\");\n }\n else\n {\n len = sizeof(a);\n s = accept(s, (struct sockaddr *)&a, (void *)&len);\n if (s < 0)\n {\n Msg((*__errno_location ()), \"accept\");\n return;\n }\n }\n while ((len = read(s, rd, 255)) > 0)\n {\n rd[len] = 0;\n printf(\"%s\", rd);\n }\n close(s);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#stream_c_prep#Pl_Add_Stream_Mirror_2.c", "codebase": "gprolog-1.5.0", "c_file": "stream_c.c", "function": "Pl_Add_Stream_Mirror_2", "sloc": "9", "c_code": "void\nPl_Add_Stream_Mirror_2(WamWord sora_word, WamWord mirror_word)\n{\n int stm;\n int m_stm;\n stm = Pl_Get_Stream_Or_Alias(sora_word, 1);\n m_stm = Pl_Get_Stream_Or_Alias(mirror_word, 3);\n Pl_Add_Mirror_To_Stream(stm, m_stm);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "screen-4.9.0#screen_prep#Hangup.c", "codebase": "screen-4.9.0", "c_file": "screen.c", "function": "Hangup", "sloc": "14", "c_code": "void Hangup()\n{\n if (display == 0)\n return;\n do {} while (0);\n if (display->d_userfd >= 0) {\n close(display->d_userfd);\n display->d_userfd = -1;\n }\n if (auto_detach || displays->d_next)\n Detach(6);\n else\n Finit(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_PERIMETER_CYLINDER_prep#max.c", "codebase": "transcoder-set", "c_file": "FIND_PERIMETER_CYLINDER.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#tccrun_prep#tcc_run.c", "codebase": "tinycc", "c_file": "tccrun.c", "function": "tcc_run", "sloc": "38", "c_code": "int tcc_run(TCCState *s1, int argc, char **argv)\n{\n int (*prog_main)(int, char **);\n s1->runtime_main = \"main\";\n if ((s1->dflag & 16) && !find_elf_sym(s1->symtab, s1->runtime_main))\n return 0;\n if (tcc_relocate(s1, (void*)1) < 0)\n return -1;\n prog_main = tcc_get_symbol_err(s1, s1->runtime_main);\n if (s1->do_debug) {\n set_exception_handler();\n tcc_set_rt_prog_main(prog_main);\n }\n (*__errno_location ()) = 0;\n if (s1->do_bounds_check) {\n void (*bound_init)(void);\n void (*bound_exit)(void);\n void (*bound_new_region)(void *p, Elf64_Addr size);\n int (*bound_delete_region)(void *p);\n int i, ret;\n rt_bound_error_msg = tcc_get_symbol_err(s1, \"__bound_error_msg\");\n bound_init = tcc_get_symbol_err(s1, \"__bound_init\");\n bound_exit = tcc_get_symbol_err(s1, \"__bound_exit\");\n bound_new_region = tcc_get_symbol_err(s1, \"__bound_new_region\");\n bound_delete_region = tcc_get_symbol_err(s1, \"__bound_delete_region\");\n bound_init();\n bound_new_region(argv, argc*sizeof(argv[0]));\n for (i=0; iname);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libcsv#libcsv_prep#csv_strerror.c", "codebase": "libcsv", "c_file": "libcsv.c", "function": "csv_strerror", "sloc": "8", "c_code": "const char *\ncsv_strerror(int status)\n{\n if (status >= 4 || status < 0)\n return csv_errors[4];\n else\n return csv_errors[status];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_contact_prep#osip_contact_to_str.c", "codebase": "libosip2-5.3.1", "c_file": "osip_contact.c", "function": "osip_contact_to_str", "sloc": "13", "c_code": "int osip_contact_to_str(const osip_contact_t *contact, char **dest) {\n if (contact == ((void *)0))\n return -2;\n if (contact->displayname != ((void *)0)) {\n if (strncmp(contact->displayname, \"*\", 1) == 0) {\n *dest = osip_strdup(\"*\");\n if (*dest == ((void *)0))\n return -4;\n return 0;\n }\n }\n return osip_from_to_str((osip_from_t *) contact, dest);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libxml2#xmlstring_prep#xmlEscapeFormatString.c", "codebase": "libxml2", "c_file": "xmlstring.c", "function": "xmlEscapeFormatString", "sloc": "37", "c_code": "xmlChar *\nxmlEscapeFormatString(xmlChar **msg)\n{\n xmlChar *msgPtr = ((void *)0);\n xmlChar *result = ((void *)0);\n xmlChar *resultPtr = ((void *)0);\n size_t count = 0;\n size_t msgLen = 0;\n size_t resultLen = 0;\n if (!msg || !*msg)\n return(((void *)0));\n for (msgPtr = *msg; *msgPtr != '\\0'; ++msgPtr) {\n ++msgLen;\n if (*msgPtr == '%')\n ++count;\n }\n if (count == 0)\n return(*msg);\n if ((count > 0x7fffffff) || (msgLen > 0x7fffffff - count))\n return(((void *)0));\n resultLen = msgLen + count + 1;\n result = xmlMalloc(resultLen);\n if (result == ((void *)0)) {\n xmlFree(*msg);\n *msg = ((void *)0);\n return(((void *)0));\n }\n for (msgPtr = *msg, resultPtr = result; *msgPtr != '\\0'; ++msgPtr, ++resultPtr) {\n *resultPtr = *msgPtr;\n if (*msgPtr == '%')\n *(++resultPtr) = '%';\n }\n result[resultLen - 1] = '\\0';\n xmlFree(*msg);\n *msg = result;\n return *msg;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 8, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "libxml2#testapi_prep#main.c", "codebase": "libxml2", "c_file": "testapi.c", "function": "main", "sloc": "34", "c_code": "int main(int argc, char **argv) {\n int ret;\n int blocks, mem;\n memset(chartab, 0, sizeof(chartab));\n strncpy((char *) chartab, \" chartab\\n\", 20);\n memset(inttab, 0, sizeof(inttab));\n memset(longtab, 0, sizeof(longtab));\n xmlInitParser();\n xmlInitializeCatalog();\n xmlRelaxNGInitTypes();\n xmlCheckVersion(21400);\n xmlSetStructuredErrorFunc(((void *)0), structured_errors);\n xmlSetExternalEntityLoader(xmlNoNetExternalEntityLoader);\n if (argc >= 2) {\n if (!strcmp(argv[1], \"-q\")) {\n quiet = 1;\n if (argc >= 3)\n ret = test_module(argv[2]);\n else\n ret = testlibxml2();\n } else {\n ret = test_module(argv[1]);\n }\n } else\n ret = testlibxml2();\n xmlCleanupParser();\n blocks = xmlMemBlocks();\n mem = xmlMemUsed();\n if ((blocks != 0) || (mem != 0)) {\n printf(\"testapi leaked %d bytes in %d blocks\\n\", mem, blocks);\n ret = 1;\n }\n return (ret != 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 3, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUBSET_SUM_DIVISIBLE_M_prep#max.c", "codebase": "transcoder-set", "c_file": "SUBSET_SUM_DIVISIBLE_M.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_LARGE_NUMBER_DIVISIBLE_9_NOT_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "CHECK_LARGE_NUMBER_DIVISIBLE_9_NOT.c", "function": "f_gold", "sloc": "8", "c_code": "int f_gold ( char str [] ) {\n int n = strlen(str);\n int digitSum = 0;\n for ( int i = 0;\n i < n;\n i ++ ) digitSum += ( str [ i ] - '0' );\n return ( digitSum % 9 == 0 );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlstring_prep#xmlUTF8Size.c", "codebase": "libxml2", "c_file": "xmlstring.c", "function": "xmlUTF8Size", "sloc": "18", "c_code": "int\nxmlUTF8Size(const xmlChar *utf) {\n xmlChar mask;\n int len;\n if (utf == ((void *)0))\n return -1;\n if (*utf < 0x80)\n return 1;\n if (!(*utf & 0x40))\n return -1;\n len = 2;\n for (mask=0x20; mask != 0; mask>>=1) {\n if (!(*utf & mask))\n return len;\n len++;\n }\n return -1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "diffutils-3.10#util_prep#translate_range.c", "codebase": "diffutils-3.10", "c_file": "util.c", "function": "translate_range", "sloc": "8", "c_code": "void\ntranslate_range (struct file_data const *file,\n lin a, lin b,\n lin *aptr, lin *bptr)\n{\n *aptr = translate_line_number (file, a - 1) + 1;\n *bptr = translate_line_number (file, b + 1) - 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#port_sema_prep#osip_sem_destroy.c", "codebase": "libosip2-5.3.1", "c_file": "port_sema.c", "function": "osip_sem_destroy", "sloc": "8", "c_code": "int osip_sem_destroy(struct osip_sem *_sem) {\n osip_sem_t *sem = (osip_sem_t *) _sem;\n if (sem == ((void *)0))\n return 0;\n sem_destroy(sem);\n { if (sem != ((void *)0)) { if (osip_free_func) osip_free_func(sem); else free(sem); } };\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlParseChunk.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlParseChunk", "sloc": "17", "c_code": "PyObject *\nlibxml_xmlParseChunk(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlParserCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n char * chunk;\n Py_ssize_t py_buffsize0;\n int size;\n int terminate;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Os#ii:xmlParseChunk\", &pyobj_ctxt, &chunk, &py_buffsize0, &size, &terminate))\n return(((void *)0));\n ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj));\n c_retval = xmlParseChunk(ctxt, chunk, size, terminate);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_PAIRWISE_PRODUCTS_1_prep#len.c", "codebase": "transcoder-set", "c_file": "SUM_PAIRWISE_PRODUCTS_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "which-2.21#bash_prep#file_status.c", "codebase": "which-2.21", "c_file": "bash.c", "function": "file_status", "sloc": "16", "c_code": "int\nfile_status (char const* name)\n{\n struct stat finfo;\n int r;\n if (stat (name, &finfo) < 0)\n return (0);\n if (((((finfo.st_mode)) & 0170000) == (0040000)))\n return (0x1|0x10);\n r = 0x1;\n if (eaccess (name, 1) == 0)\n r |= 0x2;\n if (eaccess (name, 4) == 0)\n r |= 0x40;\n return r;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "uucp-1.07#trans_prep#fqueue_local.c", "codebase": "uucp-1.07", "c_file": "trans.c", "function": "fqueue_local", "sloc": "9", "c_code": "boolean\nfqueue_local (qdaemon, qtrans)\n struct sdaemon *qdaemon __attribute__ ((__unused__));\n struct stransfer *qtrans;\n{\n utdequeue (qtrans);\n utqueue (&qTlocal, qtrans, (0));\n return (1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1.c", "function": "f_gold", "sloc": "9", "c_code": "int f_gold ( int arr [ ], int n, int x ) {\n int i = 0;\n while ( i < n ) {\n if ( arr [ i ] == x ) return i;\n i = i + abs ( arr [ i ] - x );\n }\n printf(\"number is not present!\");\n return - 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#sexp2dsa_prep#nettle_dsa_sha256_keypair_from_sexp.c", "codebase": "nettle-3.9.1", "c_file": "sexp2dsa.c", "function": "nettle_dsa_sha256_keypair_from_sexp", "sloc": "14", "c_code": "int\nnettle_dsa_sha256_keypair_from_sexp(struct dsa_params *params,\n mpz_t pub,\n mpz_t priv,\n unsigned p_max_bits,\n size_t length, const uint8_t *expr)\n{\n struct sexp_iterator i;\n return nettle_sexp_iterator_first(&i, length, expr)\n && nettle_sexp_iterator_check_type(&i, priv ? \"private-key\" : \"public-key\")\n && nettle_sexp_iterator_check_type(&i, \"dsa-sha256\")\n && nettle_dsa_keypair_from_sexp_alist(params, pub, priv,\n p_max_bits, 256, &i);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DICE_THROW_PROBLEM_prep#main.c", "codebase": "transcoder-set", "c_file": "DICE_THROW_PROBLEM.c", "function": "main", "sloc": "16", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {94,7,20,90,50,32,46,82,43,6};\n int param1[] = {4,12,44,94,58,90,25,50,82,83};\n int param2[] = {69,33,24,88,27,29,6,87,70,19};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#SUM_SERIES_ALTERNATE_SIGNED_SQUARES_AP_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SUM_SERIES_ALTERNATE_SIGNED_SQUARES_AP.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n, int a [ ] ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderIsNamespaceDecl.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderIsNamespaceDecl", "sloc": "16", "c_code": "int\nxmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader) {\n xmlNodePtr node;\n if (reader == ((void *)0))\n return(-1);\n if (reader->node == ((void *)0))\n return(-1);\n if (reader->curnode != ((void *)0))\n node = reader->curnode;\n else\n node = reader->node;\n if (XML_NAMESPACE_DECL == node->type)\n return(1);\n else\n return(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "json.h#allow_no_commas_prep#json_write_pretty_value.c", "codebase": "json.h", "c_file": "allow_no_commas.c", "function": "json_write_pretty_value", "sloc": "37", "c_code": "char *json_write_pretty_value(const struct json_value_s *value, size_t depth,\n const char *indent, const char *newline,\n char *data) {\n switch (value->type) {\n default:\n return 0;\n case json_type_number:\n return json_write_number((struct json_number_s *)value->payload, data);\n case json_type_string:\n return json_write_string((struct json_string_s *)value->payload, data);\n case json_type_array:\n return json_write_pretty_array((struct json_array_s *)value->payload, depth,\n indent, newline, data);\n case json_type_object:\n return json_write_pretty_object((struct json_object_s *)value->payload,\n depth, indent, newline, data);\n case json_type_true:\n data[0] = 't';\n data[1] = 'r';\n data[2] = 'u';\n data[3] = 'e';\n return data + 4;\n case json_type_false:\n data[0] = 'f';\n data[1] = 'a';\n data[2] = 'l';\n data[3] = 's';\n data[4] = 'e';\n return data + 5;\n case json_type_null:\n data[0] = 'n';\n data[1] = 'u';\n data[2] = 'l';\n data[3] = 'l';\n return data + 4;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 8, "break_continue_statement": 0}}, {"id": "tinycc#tccgen_prep#put_extern_sym.c", "codebase": "tinycc", "c_file": "tccgen.c", "function": "put_extern_sym", "sloc": "6", "c_code": "void put_extern_sym(Sym *sym, Section *section,\n Elf64_Addr value, unsigned long size)\n{\n int sh_num = section ? section->sh_num : 0;\n put_extern_sym2(sym, sh_num, value, size, 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#CONVERTING_ONE_STRING_USING_APPEND_DELETE_LAST_OPERATIONS_prep#min.c", "codebase": "transcoder-set", "c_file": "CONVERTING_ONE_STRING_USING_APPEND_DELETE_LAST_OPERATIONS.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#key-bindings_prep#key_bindings_RB_INSERT.c", "codebase": "tmux", "c_file": "key-bindings.c", "function": "key_bindings_RB_INSERT", "sloc": "1", "c_code": "struct key_binding * key_bindings_RB_INSERT(struct key_bindings *head, struct key_binding *elm) { struct key_binding *tmp; struct key_binding *parent = ((void *)0); int comp = 0; tmp = (head)->rbh_root; while (tmp) { parent = tmp; comp = (key_bindings_cmp)(elm, parent); if (comp < 0) tmp = (tmp)->entry.rbe_left; else if (comp > 0) tmp = (tmp)->entry.rbe_right; else return (tmp); } do { (elm)->entry.rbe_parent = parent; (elm)->entry.rbe_left = (elm)->entry.rbe_right = ((void *)0); (elm)->entry.rbe_color = 1; } while (0); if (parent != ((void *)0)) { if (comp < 0) (parent)->entry.rbe_left = elm; else (parent)->entry.rbe_right = elm; do {} while (0); } else (head)->rbh_root = elm; key_bindings_RB_INSERT_COLOR(head, elm); return (((void *)0)); }\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlDocSetRootElement.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlDocSetRootElement", "sloc": "16", "c_code": "PyObject *\nlibxml_xmlDocSetRootElement(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlNodePtr c_retval;\n xmlDocPtr doc;\n PyObject *pyobj_doc;\n xmlNodePtr root;\n PyObject *pyobj_root;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"OO:xmlDocSetRootElement\", &pyobj_doc, &pyobj_root))\n return(((void *)0));\n doc = (xmlDocPtr) (((pyobj_doc) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_doc))->obj));\n root = (xmlNodePtr) (((pyobj_root) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_root))->obj));\n c_retval = xmlDocSetRootElement(doc, root);\n py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_list_prep#osip_list_get_next.c", "codebase": "libosip2-5.3.1", "c_file": "osip_list.c", "function": "osip_list_get_next", "sloc": "13", "c_code": "void *osip_list_get_next(osip_list_iterator_t *iterator) {\n if (iterator->actual == ((void *)0)) {\n return 0;\n }\n iterator->prev = &(iterator->actual->next);\n iterator->actual = iterator->actual->next;\n ++(iterator->pos);\n if ((0 != (*iterator).actual && (*iterator).pos < (*iterator).li->nb_elt)) {\n return iterator->actual->element;\n }\n iterator->actual = 0;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlCtxtSetMaxAmplification.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlCtxtSetMaxAmplification", "sloc": "5", "c_code": "void\nxmlCtxtSetMaxAmplification(xmlParserCtxtPtr ctxt, unsigned maxAmpl)\n{\n ctxt->maxAmpl = maxAmpl;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_no_commas_prep#json_write_pretty_array.c", "codebase": "json.h", "c_file": "allow_no_commas.c", "function": "json_write_pretty_array", "sloc": "41", "c_code": "char *json_write_pretty_array(const struct json_array_s *array, size_t depth,\n const char *indent, const char *newline,\n char *data) {\n size_t k, m;\n struct json_array_element_s *element;\n *data++ = '[';\n if (0 < array->length) {\n for (k = 0; '\\0' != newline[k]; k++) {\n *data++ = newline[k];\n }\n for (element = array->start; 0 != element;\n element = element->next) {\n if (element != array->start) {\n *data++ = ',';\n for (k = 0; '\\0' != newline[k]; k++) {\n *data++ = newline[k];\n }\n }\n for (k = 0; k < depth + 1; k++) {\n for (m = 0; '\\0' != indent[m]; m++) {\n *data++ = indent[m];\n }\n }\n data = json_write_pretty_value(element->value, depth + 1, indent, newline,\n data);\n if (0 == data) {\n return 0;\n }\n }\n for (k = 0; '\\0' != newline[k]; k++) {\n *data++ = newline[k];\n }\n for (k = 0; k < depth; k++) {\n for (m = 0; '\\0' != indent[m]; m++) {\n *data++ = indent[m];\n }\n }\n }\n *data++ = ']';\n return data;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 8, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#xmlregexp_prep#xmlAutomataNewCountTrans.c", "codebase": "libxml2", "c_file": "xmlregexp.c", "function": "xmlAutomataNewCountTrans", "sloc": "49", "c_code": "xmlAutomataStatePtr\nxmlAutomataNewCountTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,\n xmlAutomataStatePtr to, const xmlChar *token,\n int min, int max, void *data) {\n xmlRegAtomPtr atom;\n int counter;\n if ((am == ((void *)0)) || (from == ((void *)0)) || (token == ((void *)0)))\n return(((void *)0));\n if (min < 0)\n return(((void *)0));\n if ((max < min) || (max < 1))\n return(((void *)0));\n atom = xmlRegNewAtom(am, XML_REGEXP_STRING);\n if (atom == ((void *)0))\n return(((void *)0));\n atom->valuep = xmlStrdup(token);\n if (atom->valuep == ((void *)0))\n goto error;\n atom->data = data;\n if (min == 0)\n atom->min = 1;\n else\n atom->min = min;\n atom->max = max;\n counter = xmlRegGetCounter(am);\n if (counter < 0)\n goto error;\n am->counters[counter].min = min;\n am->counters[counter].max = max;\n if (to == ((void *)0)) {\n to = xmlRegStatePush(am);\n if (to == ((void *)0))\n goto error;\n }\n xmlRegStateAddTrans(am, from, atom, to, counter, -1);\n if (xmlRegAtomPush(am, atom) < 0)\n goto error;\n am->state = to;\n if (to == ((void *)0))\n to = am->state;\n if (to == ((void *)0))\n return(((void *)0));\n if (min == 0)\n xmlFAGenerateEpsilonTransition(am, from, to);\n return(to);\nerror:\n xmlRegFreeAtom(atom);\n return(((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 13, "memory_management": 0, "memory_operation": 0, "if_statement": 13, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 4, "return_statement": 7, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#oper_supp_prep#Pl_Nth_Root_Exact.c", "codebase": "gprolog-1.5.0", "c_file": "oper_supp.c", "function": "Pl_Nth_Root_Exact", "sloc": "11", "c_code": "unsigned\nPl_Nth_Root_Exact(unsigned y, unsigned n)\n{\n unsigned x;\n if (y == 0)\n return 0;\n x = Pl_Nth_Root_Dn(y, n);\n if (Pl_Power(x, n) != y)\n return (unsigned) -1;\n return x;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#relaxng_prep#xmlRelaxNGGetValidErrors.c", "codebase": "libxml2", "c_file": "relaxng.c", "function": "xmlRelaxNGGetValidErrors", "sloc": "15", "c_code": "int\nxmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,\n xmlRelaxNGValidityErrorFunc * err,\n xmlRelaxNGValidityWarningFunc * warn, void **ctx)\n{\n if (ctxt == ((void *)0))\n return (-1);\n if (err != ((void *)0))\n *err = ctxt->error;\n if (warn != ((void *)0))\n *warn = ctxt->warning;\n if (ctx != ((void *)0))\n *ctx = ctxt->userData;\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "heman#vec4_prep#kmVec4LengthSq.c", "codebase": "heman", "c_file": "vec4.c", "function": "kmVec4LengthSq", "sloc": "3", "c_code": "float kmVec4LengthSq(const kmVec4* pIn) {\n return kmSQR(pIn->x) + kmSQR(pIn->y) + kmSQR(pIn->z) + kmSQR(pIn->w);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#list_prep#xmlListRemoveFirst.c", "codebase": "libxml2", "c_file": "list.c", "function": "xmlListRemoveFirst", "sloc": "13", "c_code": "int\nxmlListRemoveFirst(xmlListPtr l, void *data)\n{\n xmlLinkPtr lk;\n if (l == ((void *)0))\n return(0);\n lk = xmlListLinkSearch(l, data);\n if (lk != ((void *)0)) {\n xmlLinkDeallocator(l, lk);\n return 1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "json.h#allow_global_object_prep#json_value_as_string.c", "codebase": "json.h", "c_file": "allow_global_object.c", "function": "json_value_as_string", "sloc": "6", "c_code": "struct json_string_s *json_value_as_string(struct json_value_s *const value) {\n if (value->type != json_type_string) {\n return 0;\n }\n return (struct json_string_s *)value->payload;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngset_prep#png_set_chunk_malloc_max.c", "codebase": "optipng-0.7.8", "c_file": "pngset.c", "function": "png_set_chunk_malloc_max", "sloc": "7", "c_code": "void\npng_set_chunk_malloc_max(png_structrp png_ptr,\n png_alloc_size_t user_chunk_malloc_max)\n{\n if (png_ptr != ((void *)0))\n png_ptr->user_chunk_malloc_max = user_chunk_malloc_max;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_authorization_prep#osip_authorization_set_uri.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authorization.c", "function": "osip_authorization_set_uri", "sloc": "3", "c_code": "void osip_authorization_set_uri(osip_authorization_t *authorization, char *uri) {\n authorization->uri = (char *) uri;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "cflow-1.7#argp-help_prep#argp_state_help.c", "codebase": "cflow-1.7", "c_file": "argp-help.c", "function": "argp_state_help", "sloc": "18", "c_code": "void\nargp_state_help (const struct argp_state *state, FILE *stream, unsigned flags)\n{\n if ((!state || ! (state->flags & 0x02)) && stream)\n {\n if (state && (state->flags & 0x40))\n flags |= 0x80;\n _help (state ? state->root_argp : 0, state, stream, flags,\n state ? state->name : (program_invocation_short_name));\n if (!state || ! (state->flags & 0x20))\n {\n if (flags & 0x100)\n exit (argp_err_exit_status);\n if (flags & 0x200)\n exit (0);\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#candles_prep#tc_big_white_candle.c", "codebase": "tulipindicators-0.9.1", "c_file": "candles.c", "function": "tc_big_white_candle", "sloc": "5", "c_code": "int tc_big_white_candle(int size, TC_REAL const *const *inputs, tc_config const *options, tc_result *output) {\n const TC_REAL *open = inputs[0]; const TC_REAL *high = inputs[1]; const TC_REAL *low = inputs[2]; const TC_REAL *close = inputs[3]; const int period = options->period; const TC_REAL div = 1.0 / period; TC_REAL avg_body_sum = 0; TC_REAL avg_total_sum = 0; if (period < 1) return 1; if (size < period) return 0; int i; for (i = 0; i < period; ++i) { avg_body_sum += (fabs(open[(i)] - close[(i)])); avg_total_sum += (high[(i)] - low[(i)]); }\n while(i < size) { const TC_REAL top = (open[(i)] > close[(i)] ? open[(i)] : close[(i)]); const TC_REAL bottom = (open[(i)] < close[(i)] ? open[(i)] : close[(i)]); const TC_REAL body = (fabs(open[(i)] - close[(i)])); const TC_REAL total = (high[(i)] - low[(i)]); const TC_REAL upper = (high[(i)] - top); const TC_REAL lower = (bottom - low[(i)]); const TC_REAL avg_body = avg_body_sum * div; const TC_REAL avg_total = avg_total_sum * div; (void)top;(void)bottom;(void)body;(void)total; (void)upper;(void)lower;(void)avg_body;(void)avg_total; if ((open[i] (options->body_long * avg_body))) { do { const tc_hit hit = {i, (1L<<3)}; const int r = tc_result_add(output, hit); if (r != 0) return r; } while (0); } avg_body_sum += body; avg_body_sum -= (fabs(open[(i-period)] - close[(i-period)])); avg_total_sum += total; avg_total_sum -= (high[(i-period)] - low[(i-period)]); ++i; };\n return 0;\n }\n", "c_constructs": {"pointer_type": 4, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#type_inl_c_prep#Pl_Blt_Non_Fd_Var.c", "codebase": "gprolog-1.5.0", "c_file": "type_inl_c.c", "function": "Pl_Blt_Non_Fd_Var", "sloc": "5", "c_code": "Bool\nPl_Blt_Non_Fd_Var(WamWord x)\n{\n WamWord word, tag_mask; do { WamWord deref_last_word; word = x; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0); return (!(tag_mask == (PlULong)0x5));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#LENGTH_OF_THE_LONGEST_ARITHMATIC_PROGRESSION_IN_A_SORTED_ARRAY_prep#sort.c", "codebase": "transcoder-set", "c_file": "LENGTH_OF_THE_LONGEST_ARITHMATIC_PROGRESSION_IN_A_SORTED_ARRAY.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_PAIRS_DIFFERENCE_EQUAL_K_prep#max.c", "codebase": "transcoder-set", "c_file": "COUNT_PAIRS_DIFFERENCE_EQUAL_K.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_message_parse_prep#__osip_find_next_occurence.c", "codebase": "libosip2-5.3.1", "c_file": "osip_message_parse.c", "function": "__osip_find_next_occurence", "sloc": "15", "c_code": "int __osip_find_next_occurence(const char *str, const char *buf, const char **index_of_str, const char *end_of_buf) {\n size_t slen;\n *index_of_str = ((void *)0);\n if (str == ((void *)0) || buf == ((void *)0))\n return -2;\n slen = strlen(str);\n while (slen < (size_t)(end_of_buf - buf)) {\n if (!memcmp(str, buf, slen)) {\n *index_of_str = buf;\n return 0;\n }\n ++buf;\n }\n return -5;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#file_prep#getDirentry.c", "codebase": "mtools-4.0.43", "c_file": "file.c", "function": "getDirentry", "sloc": "4", "c_code": "direntry_t *getDirentry(Stream_t *Stream)\n{\n return &getUnbufferedFile(Stream)->direntry;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_DIGITS_PRODUCT_TWO_NUMBERS_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "NUMBER_DIGITS_PRODUCT_TWO_NUMBERS.c", "function": "f_gold", "sloc": "10", "c_code": "int f_gold ( int a, int b ) {\n int count = 0;\n int p = abs ( a * b );\n if ( p == 0 ) return 1;\n while ( p > 0 ) {\n count ++;\n p = p / 10;\n }\n return count;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#tree_prep#xmlDocCopyNode.c", "codebase": "libxml2", "c_file": "tree.c", "function": "xmlDocCopyNode", "sloc": "6", "c_code": "xmlNodePtr\nxmlDocCopyNode(xmlNodePtr node, xmlDocPtr doc, int extended) {\n xmlNodePtr ret;\n ret = xmlStaticCopyNode(node, doc, ((void *)0), extended);\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bc-1.07.1#numeric_prep#dc_add.c", "codebase": "bc-1.07.1", "c_file": "numeric.c", "function": "dc_add", "sloc": "11", "c_code": "int\ndc_add (\n dc_num a ,\n dc_num b ,\n int kscale __attribute__((unused)) ,\n dc_num *result )\n{\n bc_init_num((result));\n bc_add((a), (b), (result), 0);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cflow-1.7#parser_prep#nexttoken.c", "codebase": "cflow-1.7", "c_file": "parser.c", "function": "nexttoken", "sloc": "14", "c_code": "int\nnexttoken()\n{\n int type;\n if (curs == tos) {\n type = get_token();\n tokpush(type, line_num, yylval.str);\n yylval.str = ((void *)0);\n }\n tok = token_stack[curs];\n curs++;\n debugtoken(&tok, \"next token\");\n return tok.type;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_tanh_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_tanh_start", "sloc": "1", "c_code": "int ti_tanh_start(double const *options) { (void)options; return 0; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "lodepng#lodepng_prep#lodepng_chunk_find.c", "codebase": "lodepng", "c_file": "lodepng.c", "function": "lodepng_chunk_find", "sloc": "7", "c_code": "unsigned char* lodepng_chunk_find(unsigned char* chunk, unsigned char* end, const char type[5]) {\n for(;;) {\n if(chunk >= end || end - chunk < 12) return 0;\n if(lodepng_chunk_type_equals(chunk, type)) return chunk;\n chunk = lodepng_chunk_next(chunk, end);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THE_MINIMUM_DISTANCE_BETWEEN_TWO_NUMBERS_1_prep#min.c", "codebase": "transcoder-set", "c_file": "FIND_THE_MINIMUM_DISTANCE_BETWEEN_TWO_NUMBERS_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#input_prep#Input.c", "codebase": "screen-4.9.0", "c_file": "input.c", "function": "Input", "sloc": "45", "c_code": "void\nInput(istr, len, mode, finfunc, priv, data)\nchar *istr;\nint len;\nint mode;\nvoid (*finfunc) (char *buf, int len, char *priv);\nchar *priv;\nint data;\n{\n int maxlen;\n struct inpdata *inpdata;\n if (!flayer)\n return;\n if (len > 768)\n len = 768;\n if (!(mode & 1))\n {\n maxlen = flayer->l_width - 1 - strlen(istr);\n if (len > maxlen)\n len = maxlen;\n }\n if (len < 0)\n {\n LMsg(0, \"Width %d chars too small\", -len);\n return;\n }\n if (InitOverlayPage(sizeof(*inpdata), &InpLf, 1))\n return;\n flayer->l_mode = 1;\n inpdata = (struct inpdata *)flayer->l_data;\n inpdata->inpmaxlen = len;\n inpdata->inpfinfunc = finfunc;\n inpdata->inp.pos = inpdata->inp.len = 0;\n inpdata->inp.prev = inphist.prev;\n inpdata->inpmode = mode;\n inpdata->privdata = data;\n if (!priv)\n priv = (char*)&inpdata->privdata;\n inpdata->priv = priv;\n inpdata->inpstringlen = 0;\n inpdata->inpstring = ((void *)0);\n inpdata->search = ((void *)0);\n if (istr)\n inp_setprompt(istr, (char *)((void *)0));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 8, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#b-excwho_prep#getcaller.c", "codebase": "rcs-5.10.1", "c_file": "b-excwho.c", "function": "getcaller", "sloc": "5", "c_code": "char const *\ngetcaller (void)\n{\n return getusername (currently_setuid_p ());\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_content_disposition_prep#osip_content_disposition_parse.c", "codebase": "libosip2-5.3.1", "c_file": "osip_content_disposition.c", "function": "osip_content_disposition_parse", "sloc": "18", "c_code": "int osip_content_disposition_parse(osip_content_disposition_t *cd, const char *hvalue) {\n const char *cd_params;\n int i;\n cd_params = strchr(hvalue, ';');\n if (cd_params != ((void *)0)) {\n i = __osip_generic_param_parseall(&cd->gen_params, cd_params);\n if (i != 0)\n return i;\n } else\n cd_params = hvalue + strlen(hvalue);\n if (cd_params - hvalue + 1 < 2)\n return -5;\n cd->element = (char *) (osip_malloc_func ? osip_malloc_func(cd_params - hvalue + 1) : malloc(cd_params - hvalue + 1));\n if (cd->element == ((void *)0))\n return -4;\n osip_clrncpy(cd->element, hvalue, cd_params - hvalue);\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 1, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libxml2#valid_prep#xmlCopyEnumeration.c", "codebase": "libxml2", "c_file": "valid.c", "function": "xmlCopyEnumeration", "sloc": "20", "c_code": "xmlEnumerationPtr\nxmlCopyEnumeration(xmlEnumerationPtr cur) {\n xmlEnumerationPtr ret = ((void *)0);\n xmlEnumerationPtr last = ((void *)0);\n while (cur != ((void *)0)) {\n xmlEnumerationPtr copy = xmlCreateEnumeration(cur->name);\n if (copy == ((void *)0)) {\n xmlFreeEnumeration(ret);\n return(((void *)0));\n }\n if (ret == ((void *)0)) {\n ret = last = copy;\n } else {\n last->next = copy;\n last = copy;\n }\n cur = cur->next;\n }\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#b-anchor_prep#looking_at.c", "codebase": "rcs-5.10.1", "c_file": "b-anchor.c", "function": "looking_at", "sloc": "5", "c_code": "_Bool\nlooking_at (struct tinysym const *sym, char const *start)\n{\n return (0 == memcmp ((start), (sym->bytes), (sym->len)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#conn_prep#fconn_set.c", "codebase": "uucp-1.07", "c_file": "conn.c", "function": "fconn_set", "sloc": "14", "c_code": "boolean\nfconn_set (qconn, tparity, tstrip, txonxoff)\n struct sconnection *qconn;\n enum tparitysetting tparity;\n enum tstripsetting tstrip;\n enum txonxoffsetting txonxoff;\n{\n boolean (*pfset) (struct sconnection *, enum tparitysetting, enum tstripsetting, enum txonxoffsetting);\n pfset = qconn->qcmds->pfset;\n if (pfset == ((void *)0))\n return (1);\n do { if (((iDebug & ((040))) != 0)) ulog (LOG_DEBUG, (\"fconn_set: Changing setting to %d, %d, %d\"), ((int) tparity), ((int) tstrip), ((int) txonxoff)); } while (0);\n return (*pfset) (qconn, tparity, tstrip, txonxoff);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 3, "union_type": 0, "function_pointer": 2, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#b-isr_prep#access_page.c", "codebase": "rcs-5.10.1", "c_file": "b-isr.c", "function": "access_page", "sloc": "10", "c_code": "char\naccess_page (struct isr_scratch *scratch,\n char const *filename, char const *p)\n{\n char volatile t;\n (scratch->access_name) = filename;\n t = *p;\n (scratch->access_name) = ((void *)0);\n return t;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlParseEncName.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlParseEncName", "sloc": "15", "c_code": "PyObject *\nlibxml_xmlParseEncName(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlChar * c_retval;\n xmlParserCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n if (libxml_deprecationWarning(\"xmlParseEncName\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlParseEncName\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj));\n c_retval = xmlParseEncName(ctxt);\n py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "screen-4.9.0#help_prep#ZmodemPage.c", "codebase": "screen-4.9.0", "c_file": "help.c", "function": "ZmodemPage", "sloc": "7", "c_code": "void ZmodemPage() {\n if (InitOverlayPage(1, &ZmodemLf, 1))\n return;\n LRefreshAll(flayer, 0);\n flayer->l_x = flayer->l_width > 32 ? 32 : 0;\n flayer->l_y = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderXmlLang.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderXmlLang", "sloc": "8", "c_code": "xmlChar *\nxmlTextReaderXmlLang(xmlTextReaderPtr reader) {\n if (reader == ((void *)0))\n return(((void *)0));\n if (reader->node == ((void *)0))\n return(((void *)0));\n return(xmlNodeGetLang(reader->node));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tar-1.34#create_prep#simple_finish_header.c", "codebase": "tar-1.34", "c_file": "create.c", "function": "simple_finish_header", "sloc": "14", "c_code": "void\nsimple_finish_header (union block *header)\n{\n size_t i;\n int sum;\n char *p;\n memcpy (header->header.chksum, \" \", sizeof header->header.chksum);\n sum = 0;\n p = header->buffer;\n for (i = sizeof *header; i-- != 0; )\n sum += 0xFF & *p++;\n uintmax_to_chars ((uintmax_t) sum, header->header.chksum, 7);\n set_next_block_after (header);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 1, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "hello-2.12.1#xmalloc_prep#xrealloc.c", "codebase": "hello-2.12.1", "c_file": "xmalloc.c", "function": "xrealloc", "sloc": "13", "c_code": "void *\nxrealloc (void *p, size_t n)\n{\n if (!HAVE_GNU_REALLOC && !n && p)\n {\n free (p);\n return ((void *)0);\n }\n void *r = realloc (p, n);\n if (!r && (n || (HAVE_GNU_REALLOC && !p)))\n xalloc_die ();\n return r;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 2, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "buffer-0.4.0#buffer_prep#buffer_length.c", "codebase": "buffer-0.4.0", "c_file": "buffer.c", "function": "buffer_length", "sloc": "4", "c_code": "size_t\nbuffer_length(buffer_t *self) {\n return strlen(self->data);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#search_prep#chg_hilite.c", "codebase": "less-633", "c_file": "search.c", "function": "chg_hilite", "sloc": "7", "c_code": "void chg_hilite(void)\n{\n clr_hilite();\n hide_hilite = 0;\n if (hilite_search == 2)\n hilite_screen();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#pkcs1-sec-decrypt_prep#_nettle_pkcs1_sec_decrypt.c", "codebase": "nettle-3.9.1", "c_file": "pkcs1-sec-decrypt.c", "function": "_nettle_pkcs1_sec_decrypt", "sloc": "20", "c_code": "int\n_nettle_pkcs1_sec_decrypt (size_t length, uint8_t *message,\n size_t padded_message_length,\n const volatile uint8_t *padded_message)\n{\n volatile int ok;\n size_t i, t;\n if (length + 11 > padded_message_length)\n return 0;\n t = padded_message_length - length - 1;\n ok = ((((uint32_t)(padded_message[0]) ^ (uint32_t)(0)) - 1U) >> 31);\n ok &= ((((uint32_t)(padded_message[1]) ^ (uint32_t)(2)) - 1U) >> 31);\n for (i = 2; i < t; i++)\n {\n ok &= ((0U - ((uint32_t)(padded_message[i]) ^ (uint32_t)(0))) >> 31);\n }\n ok &= ((((uint32_t)(padded_message[t]) ^ (uint32_t)(0)) - 1U) >> 31);\n nettle_cnd_memcpy(ok, message, padded_message + t + 1, length);\n return ok;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_pvi.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_pvi", "sloc": "18", "c_code": "int ti_pvi(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *close = inputs[0];\n const double *volume = inputs[1];\n (void)options;\n double *output = outputs[0];\n if (size <= ti_pvi_start(options)) return 0;\n double pvi = 1000;\n *output++ = pvi;\n int i;\n for (i = 1; i < size; ++i) {\n if (volume[i] > volume[i-1]) {\n pvi += ((close[i] - close[i-1])/close[i-1]) * pvi;\n }\n *output++ = pvi;\n }\n ((void) sizeof ((output - outputs[0] == size - ti_pvi_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_pvi_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_pvi_start(options)\", \"tiamalgamation.c\", 3256, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#ADD_1_TO_A_GIVEN_NUMBER_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "ADD_1_TO_A_GIVEN_NUMBER_1.c", "function": "f_gold", "sloc": "3", "c_code": "int f_gold ( int x ) {\n return ( - ( ~ x ) );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#session_prep#session_group_contains.c", "codebase": "tmux", "c_file": "session.c", "function": "session_group_contains", "sloc": "13", "c_code": "struct session_group *\nsession_group_contains(struct session *target)\n{\n struct session_group *sg;\n struct session *s;\n for ((sg) = session_groups_RB_MINMAX(&session_groups, -1); (sg) != ((void *)0); (sg) = session_groups_RB_NEXT(sg)) {\n for((s) = ((&sg->sessions)->tqh_first); (s) != ((void *)0); (s) = ((s)->gentry.tqe_next)) {\n if (s == target)\n return (sg);\n }\n }\n return (((void *)0));\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nano-7.2#move_prep#to_para_end.c", "codebase": "nano-7.2", "c_file": "move.c", "function": "to_para_end", "sloc": "12", "c_code": "void to_para_end(void)\n{\n linestruct *was_current = openfile->current;\n do_para_end(&openfile->current);\n if (openfile->current->next != ((void *)0)) {\n openfile->current = openfile->current->next;\n openfile->current_x = 0;\n } else\n openfile->current_x = strlen(openfile->current->data);\n edit_redraw(was_current, CENTERING);\n recook |= perturbed;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlsave_prep#xmlSaveTree.c", "codebase": "libxml2", "c_file": "xmlsave.c", "function": "xmlSaveTree", "sloc": "19", "c_code": "long\nxmlSaveTree(xmlSaveCtxtPtr ctxt, xmlNodePtr cur)\n{\n long ret = 0;\n if ((ctxt == ((void *)0)) || (cur == ((void *)0))) return(-1);\n if (ctxt->options & XML_SAVE_XHTML) {\n xhtmlNodeDumpOutput(ctxt, cur);\n return(ret);\n }\n if (((cur->type != XML_NAMESPACE_DECL) && (cur->doc != ((void *)0)) &&\n (cur->doc->type == XML_HTML_DOCUMENT_NODE) &&\n ((ctxt->options & XML_SAVE_AS_XML) == 0)) ||\n (ctxt->options & XML_SAVE_AS_HTML)) {\n htmlNodeDumpOutputInternal(ctxt, cur);\n return(ret);\n }\n xmlNodeDumpOutputInternal(ctxt, cur);\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MAXIMUM_HEIGHT_PYRAMID_FROM_THE_GIVEN_ARRAY_OF_OBJECTS_prep#max.c", "codebase": "transcoder-set", "c_file": "FIND_MAXIMUM_HEIGHT_PYRAMID_FROM_THE_GIVEN_ARRAY_OF_OBJECTS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SQUARE_ROOT_OF_AN_INTEGER_prep#max.c", "codebase": "transcoder-set", "c_file": "SQUARE_ROOT_OF_AN_INTEGER.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#filename_prep#homefile.c", "codebase": "less-633", "c_file": "filename.c", "function": "homefile", "sloc": "8", "c_code": "char * homefile(char *filename)\n{\n char *pathname;\n pathname = dirfile(lgetenv(\"HOME\"), filename, 1);\n if (pathname != ((void *)0))\n return (pathname);\n return (((void *)0));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "make-4.4.1#variable_prep#init_hash_global_variable_set.c", "codebase": "make-4.4.1", "c_file": "variable.c", "function": "init_hash_global_variable_set", "sloc": "6", "c_code": "void\ninit_hash_global_variable_set (void)\n{\n hash_init (&global_variable_set.table, 523,\n variable_hash_1, variable_hash_2, variable_hash_cmp);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#session_prep#session_find.c", "codebase": "tmux", "c_file": "session.c", "function": "session_find", "sloc": "7", "c_code": "struct session *\nsession_find(const char *name)\n{\n struct session s;\n s.name = (char *) name;\n return (sessions_RB_FIND(&sessions, &s));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_unquoted_keys_prep#json_value_is_true.c", "codebase": "json.h", "c_file": "allow_unquoted_keys.c", "function": "json_value_is_true", "sloc": "3", "c_code": "int json_value_is_true(const struct json_value_s *const value) {\n return value->type == json_type_true;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_FOR_SURFACE_AREA_OF_OCTAHEDRON_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "PROGRAM_FOR_SURFACE_AREA_OF_OCTAHEDRON.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#tccpp_prep#inp.c", "codebase": "tinycc", "c_file": "tccpp.c", "function": "inp", "sloc": "6", "c_code": "void inp(void)\n{\n ch = *(++(file->buf_ptr));\n if (ch == '\\\\')\n ch = handle_eob();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THE_FIRST_MISSING_NUMBER_prep#len.c", "codebase": "transcoder-set", "c_file": "FIND_THE_FIRST_MISSING_NUMBER.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bc-1.07.1#storage_prep#init_storage.c", "codebase": "bc-1.07.1", "c_file": "storage.c", "function": "init_storage", "sloc": "18", "c_code": "void\ninit_storage (void)\n{\n f_count = 0;\n more_functions ();\n f_names[0] = strdup(\"(main)\");\n v_count = 0;\n more_variables ();\n a_count = 0;\n more_arrays ();\n ex_stack = ((void *)0);\n fn_stack = ((void *)0);\n i_base = 10;\n o_base = 10;\n scale = 0;\n c_code = 0;\n bc_init_numbers();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#HEIGHT_COMPLETE_BINARY_TREE_HEAP_N_NODES_prep#min.c", "codebase": "transcoder-set", "c_file": "HEIGHT_COMPLETE_BINARY_TREE_HEAP_N_NODES.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_SUBSEQUENCES_STRING_DIVISIBLE_N_prep#min.c", "codebase": "transcoder-set", "c_file": "NUMBER_SUBSEQUENCES_STRING_DIVISIBLE_N.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#ist_fsm_prep#ist_snd_1xx.c", "codebase": "libosip2-5.3.1", "c_file": "ist_fsm.c", "function": "ist_snd_1xx", "sloc": "14", "c_code": "void ist_snd_1xx(osip_transaction_t *ist, osip_event_t *evt) {\n int i;\n if (ist->last_response != ((void *)0)) {\n osip_message_free(ist->last_response);\n }\n ist->last_response = evt->sip;\n i = __osip_transaction_snd_xxx(ist, evt->sip);\n if (i != 0) {\n ist_handle_transport_error(ist, i);\n return;\n } else\n __osip_message_callback(OSIP_IST_STATUS_1XX_SENT, ist, ist->last_response);\n return;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#SEARCH_AN_ELEMENT_IN_A_SORTED_AND_PIVOTED_ARRAY_prep#min.c", "codebase": "transcoder-set", "c_file": "SEARCH_AN_ELEMENT_IN_A_SORTED_AND_PIVOTED_ARRAY.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPatherror.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPatherror", "sloc": "5", "c_code": "void\nxmlXPatherror(xmlXPathParserContextPtr ctxt, const char *file __attribute__((unused)),\n int line __attribute__((unused)), int no) {\n xmlXPathErr(ctxt, no);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#force_io_prep#force_write.c", "codebase": "mtools-4.0.43", "c_file": "force_io.c", "function": "force_write", "sloc": "4", "c_code": "ssize_t force_write(Stream_t *Stream, char *buf, size_t len)\n{\n return force_pio(Stream, buf, 0, len, write_wrapper);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#connect_prep#retryable_socket_connect_error.c", "codebase": "wget-1.21.4", "c_file": "connect.c", "function": "retryable_socket_connect_error", "sloc": "20", "c_code": "_Bool\nretryable_socket_connect_error (int err)\n{\n if (0\n || err == 97\n || err == 96\n || err == 94\n || err == 93\n || err == 92\n || err == 22\n )\n return 0;\n if (!opt.retry_connrefused)\n if (err == 111\n || err == 101\n || err == 113\n )\n return 0;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "hello-2.12.1#quotearg_prep#quotearg_colon_mem.c", "codebase": "hello-2.12.1", "c_file": "quotearg.c", "function": "quotearg_colon_mem", "sloc": "5", "c_code": "char *\nquotearg_colon_mem (char const *arg, size_t argsize)\n{\n return quotearg_char_mem (arg, argsize, ':');\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cflow-1.7#c_prep#yyget_lineno.c", "codebase": "cflow-1.7", "c_file": "c.c", "function": "yyget_lineno", "sloc": "4", "c_code": "int yyget_lineno (void)\n{\n return yylineno;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "patch-2.7.6#xmalloc_prep#xstrdup.c", "codebase": "patch-2.7.6", "c_file": "xmalloc.c", "function": "xstrdup", "sloc": "5", "c_code": "char *\nxstrdup (char const *string)\n{\n return xmemdup (string, strlen (string) + 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#xattrs_prep#xattrs_acls_set.c", "codebase": "tar-1.34", "c_file": "xattrs.c", "function": "xattrs_acls_set", "sloc": "12", "c_code": "void\nxattrs_acls_set (struct tar_stat_info const *st,\n char const *file_name, char typeflag)\n{\n if (acls_option > 0 && typeflag != '2')\n {\n static int done = 0;\n if (!done)\n do { if (error_hook) error_hook (); error (0, 0, gettext (\"POSIX ACL support is not available\")); } while (0);\n done = 1;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME_1_prep#min.c", "codebase": "transcoder-set", "c_file": "FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cflow-1.7#getopt1_prep#_getopt_long_only_r.c", "codebase": "cflow-1.7", "c_file": "getopt1.c", "function": "_getopt_long_only_r", "sloc": "8", "c_code": "int\n_getopt_long_only_r (int argc, char **argv, const char *options,\n const struct rpl_option *long_options, int *opt_index,\n struct _getopt_data *d)\n{\n return _getopt_internal_r (argc, argv, options, long_options, opt_index,\n 1, d, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#files_prep#outside_of_confinement.c", "codebase": "nano-7.2", "c_file": "files.c", "function": "outside_of_confinement", "sloc": "14", "c_code": "_Bool outside_of_confinement(const char *somepath, _Bool tabbing)\n{\n _Bool is_inside, begins_to_be;\n char *fullpath;\n if (operating_dir == ((void *)0))\n return 0;\n fullpath = get_full_path(somepath);\n if (fullpath == ((void *)0))\n return tabbing;\n is_inside = (strstr(fullpath, operating_dir) == fullpath);\n begins_to_be = (tabbing && strstr(operating_dir, fullpath) == operating_dir);\n free(fullpath);\n return (!is_inside && !begins_to_be);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_XOR_VALUE_PAIR_1_prep#main.c", "codebase": "transcoder-set", "c_file": "MINIMUM_XOR_VALUE_PAIR_1.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {8,11,12,27,32,32,36,56,57,66,68,70,74,78,82,83,96};\nint param0_1[] = {40,48,66,4,-60,42,-8,38};\nint param0_2[] = {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};\nint param0_3[] = {98,6,82,95,87,20,11,63,78,70,37,12,57,67,10,49,38,28,86,7,61,50,32,68,91,66,57,29,2,64,65,15,16,4,7,76,44,52,81,89,3,36,57,95,48,24};\nint param0_4[] = {-88,-84,-76,-58,-40,-38,-28,-24,-20,-14,-12,16,20,28,28,30,40,44,56,58,60,92,92};\nint param0_5[] = {0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,0,1,1,0,1,0};\nint param0_6[] = {6,6,19,31,41,45,49,56,78,96,98};\nint param0_7[] = {62,-90,22,-84,-4};\nint param0_8[] = {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};\nint param0_9[] = {83,13,43,99,34,74,56,20,93,65,92,58,91,72,37,10,39,7,29,69,42,28};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {10,7,19,36,13,20,6,3,21,14};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "nettle-3.9.1#hmac-streebog_prep#nettle_hmac_streebog256_digest.c", "codebase": "nettle-3.9.1", "c_file": "hmac-streebog.c", "function": "nettle_hmac_streebog256_digest", "sloc": "6", "c_code": "void\nnettle_hmac_streebog256_digest(struct hmac_streebog512_ctx *ctx,\n size_t length, uint8_t *digest)\n{\n nettle_hmac_digest( &(ctx)->outer, &(ctx)->inner, &(ctx)->state, (&nettle_streebog256), (length), (digest) );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#globals_prep#xmlThrDefDoValidityCheckingDefaultValue.c", "codebase": "libxml2", "c_file": "globals.c", "function": "xmlThrDefDoValidityCheckingDefaultValue", "sloc": "8", "c_code": "int xmlThrDefDoValidityCheckingDefaultValue(int v) {\n int ret;\n xmlMutexLock(&xmlThrDefMutex);\n ret = xmlDoValidityCheckingDefaultValueThrDef;\n xmlDoValidityCheckingDefaultValueThrDef = v;\n xmlMutexUnlock(&xmlThrDefMutex);\n return ret;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libcsv#libcsv_prep#csv_get_delim.c", "codebase": "libcsv", "c_file": "libcsv.c", "function": "csv_get_delim", "sloc": "6", "c_code": "unsigned char\ncsv_get_delim(const struct csv_parser *p)\n{\n ((void) sizeof ((p && \"received null csv_parser\") ? 1 : 0), __extension__ ({ if (p && \"received null csv_parser\") ; else __assert_fail (\"p && \\\"received null csv_parser\\\"\", \"libcsv.c\", 222, __extension__ __PRETTY_FUNCTION__); }));\n return p->delim_char;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ccm-aes256_prep#nettle_ccm_aes256_encrypt_message.c", "codebase": "nettle-3.9.1", "c_file": "ccm-aes256.c", "function": "nettle_ccm_aes256_encrypt_message", "sloc": "11", "c_code": "void\nnettle_ccm_aes256_encrypt_message(struct ccm_aes256_ctx *ctx,\n size_t nlength, const uint8_t *nonce,\n size_t alength, const uint8_t *adata,\n size_t tlength,\n size_t clength, uint8_t *dst, const uint8_t *src)\n{\n nettle_ccm_encrypt_message(&ctx->cipher, (nettle_cipher_func *) nettle_aes256_encrypt,\n nlength, nonce, alength, adata,\n tlength, clength, dst, src);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#fat_prep#fatDecode.c", "codebase": "mtools-4.0.43", "c_file": "fat.c", "function": "fatDecode", "sloc": "10", "c_code": "unsigned int fatDecode(Fs_t *This, unsigned int pos)\n{\n unsigned int ret;\n ret = This->fat_decode(This, pos);\n if(ret && (ret < 2 || ret > This->num_clus+1) && ret < This->last_fat) {\n fprintf(stderr, \"Bad FAT entry %d at %d\\n\", ret, pos);\n This->fat_error++;\n }\n return ret;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_no_commas_prep#json_write_string.c", "codebase": "json.h", "c_file": "allow_no_commas.c", "function": "json_write_string", "sloc": "41", "c_code": "char *json_write_string(const struct json_string_s *string, char *data) {\n size_t i;\n *data++ = '\"';\n for (i = 0; i < string->string_size; i++) {\n switch (string->string[i]) {\n case '\"':\n *data++ = '\\\\';\n *data++ = '\"';\n break;\n case '\\\\':\n *data++ = '\\\\';\n *data++ = '\\\\';\n break;\n case '\\b':\n *data++ = '\\\\';\n *data++ = 'b';\n break;\n case '\\f':\n *data++ = '\\\\';\n *data++ = 'f';\n break;\n case '\\n':\n *data++ = '\\\\';\n *data++ = 'n';\n break;\n case '\\r':\n *data++ = '\\\\';\n *data++ = 'r';\n break;\n case '\\t':\n *data++ = '\\\\';\n *data++ = 't';\n break;\n default:\n *data++ = string->string[i];\n break;\n }\n }\n *data++ = '\"';\n return data;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 8}}, {"id": "transcoder-set#CEILING_IN_A_SORTED_ARRAY_1_prep#main.c", "codebase": "transcoder-set", "c_file": "CEILING_IN_A_SORTED_ARRAY_1.c", "function": "main", "sloc": "27", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {2,6,13,16,23,24,24,27,30,32,34,34,55,56,56,63,66,81,83,96};\nint param0_1[] = {-28,-96,48,22,-12,72,48,-70,-96,-84,-62,22,18,-92,-74,14,28,52,64,72,16,-76,46};\nint param0_2[] = {0,1};\nint param0_3[] = {51,98,25,10,43,91,33,25,85,51,94,6,35,48,11,97,67,21,50,9,11,51,86,61,22,88,89,11};\nint param0_4[] = {-94,-92,-88,-74,-52,-50,-48,-44,-40,-36,-32,-26,20,22,30,32,46,56,56,60,62,64,80,84,86,94,96,96};\nint param0_5[] = {1,0,0,1,1,0,0,1,0,1,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0};\nint param0_6[] = {4,5,5,13,26,40,46,51,58,60,64,66,68,69,71,74,78,81,83,88,88,90,98,99};\nint param0_7[] = {92,6,-54,84,-10,32,50,40,-38,64,-64,-10,70,-68,-6,-16,68,34,-66,-82,84,98,50,82,78,4,34,-34,78,64,32,58,-94,40,50,0,-92,-36,10,-54,58,-78,-88,32,6};\nint param0_8[] = {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};\nint param0_9[] = {80,67,30,35,9};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {13,11,1,20,20,15,12,23,24,2};\n int param2[] = {11,18,1,20,15,17,17,28,17,3};\n int param3[] = {18,21,1,15,15,22,14,28,22,2};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "gprolog-1.5.0#foreign_supp_prep#Pl_Get_Exception.c", "codebase": "gprolog-1.5.0", "c_file": "foreign_supp.c", "function": "Pl_Get_Exception", "sloc": "5", "c_code": "WamWord\nPl_Get_Exception(void)\n{\n return pl_query_exception;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsByzantineMusicalSymbols.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsByzantineMusicalSymbols", "sloc": "4", "c_code": "int\nxmlUCSIsByzantineMusicalSymbols(int code) {\n return(((code >= 0x1D000) && (code <= 0x1D0FF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderNormalization.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderNormalization", "sloc": "6", "c_code": "int\nxmlTextReaderNormalization(xmlTextReaderPtr reader) {\n if (reader == ((void *)0))\n return(-1);\n return(1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#str_array_prep#init_env_array.c", "codebase": "gawk-5.2.2", "c_file": "str_array.c", "function": "init_env_array", "sloc": "7", "c_code": "void\ninit_env_array(NODE *env_node)\n{\n if ((do_flags & DO_POSIX))\n return;\n env_node->sub.nodep.l.lp = & env_array_func;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "indent-2.2.13#globs_prep#do_exit.c", "codebase": "indent-2.2.13", "c_file": "globs.c", "function": "do_exit", "sloc": "6", "c_code": "extern void do_exit(int code)\n{\n uninit_parser();\n cleanup_user_specials();\n exit(code);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_SMALLEST_VALUE_REPRESENTED_SUM_SUBSET_GIVEN_ARRAY_prep#max.c", "codebase": "transcoder-set", "c_file": "FIND_SMALLEST_VALUE_REPRESENTED_SUM_SUBSET_GIVEN_ARRAY.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlschemastypes_prep#xmlSchemaValidateLengthFacetWhtsp.c", "codebase": "libxml2", "c_file": "xmlschemastypes.c", "function": "xmlSchemaValidateLengthFacetWhtsp", "sloc": "11", "c_code": "int\nxmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,\n xmlSchemaValType valType,\n const xmlChar *value,\n xmlSchemaValPtr val,\n unsigned long *length,\n xmlSchemaWhitespaceValueType ws)\n{\n return (xmlSchemaValidateLengthFacetInternal(facet, valType, value, val,\n length, ws));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#xattr-at_prep#llistxattrat.c", "codebase": "tar-1.34", "c_file": "xattr-at.c", "function": "llistxattrat", "sloc": "53", "c_code": "ssize_t\nllistxattrat (int fd, char const *file , char *list , size_t size)\n{\n ;\n if (fd == -100 || (((file)[0]) == '/'))\n return (llistxattr (file , list , size));\n {\n struct saved_cwd saved_cwd;\n int saved_errno;\n ssize_t err;\n {\n char proc_buf[((4096) < (4096 - 64) ? (4096) : (4096 - 64))];\n char *proc_file = openat_proc_name (proc_buf, fd, file);\n if (proc_file)\n {\n ssize_t proc_result = (llistxattr (proc_file , list , size));\n int proc_errno = (*__errno_location ());\n if (proc_file != proc_buf)\n free (proc_file);\n if (-1 != proc_result)\n return proc_result;\n if (! ((proc_errno) == 20 || (proc_errno) == 2 || (proc_errno) == 1 || (proc_errno) == 13 || (proc_errno) == 38 || (proc_errno) == 95 ))\n {\n (*__errno_location ()) = proc_errno;\n return proc_result;\n }\n }\n }\n if (save_cwd (&saved_cwd) != 0)\n openat_save_fail ((*__errno_location ()));\n if (0 <= fd && fd == saved_cwd.desc)\n {\n free_cwd (&saved_cwd);\n (*__errno_location ()) = 9;\n return -1;\n }\n if (fchdir (fd) != 0)\n {\n saved_errno = (*__errno_location ());\n free_cwd (&saved_cwd);\n (*__errno_location ()) = saved_errno;\n return -1;\n }\n err = (llistxattr (file , list , size));\n saved_errno = (err == -1 ? (*__errno_location ()) : 0);\n if (restore_cwd (&saved_cwd) != 0)\n openat_restore_fail ((*__errno_location ()));\n free_cwd (&saved_cwd);\n if (saved_errno)\n (*__errno_location ()) = saved_errno;\n return err;\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 10, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_is_valid_ex.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_is_valid_ex", "sloc": "46", "c_code": "BOOL binn_is_valid_ex(void *ptr, int *ptype, int *pcount, int *psize) {\n int i, type, count, size, header_size;\n unsigned char *p, *plimit, *base, len;\n void *pbuf;\n pbuf = binn_ptr(ptr);\n if (pbuf == ((void *)0)) return 0;\n if (psize && *psize > 0) {\n size = *psize;\n } else {\n size = 0;\n }\n if (!IsValidBinnHeader(pbuf, &type, &count, &size, &header_size)) return 0;\n if (psize && *psize > 0) {\n if (size != *psize) return 0;\n }\n if (pcount && *pcount > 0) {\n if (count != *pcount) return 0;\n }\n if (ptype && *ptype != 0) {\n if (type != *ptype) return 0;\n }\n p = (unsigned char *)pbuf;\n base = p;\n plimit = p + size;\n p += header_size;\n for (i = 0; i < count; i++) {\n switch (type) {\n case 0xE2:\n len = *p;\n p++;\n p += len;\n break;\n case 0xE1:\n read_map_id(&p, plimit);\n break;\n }\n p = AdvanceDataPos(p, plimit);\n if ((p == 0) || (p < base)) goto Invalid;\n }\n if (ptype && *ptype==0) *ptype = type;\n if (pcount && *pcount==0) *pcount = count;\n if (psize && *psize==0) *psize = size;\n return 1;\nInvalid:\n return 0;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 13, "for_loop": 1, "while_loop": 0, "switch_statement": 1, "goto_statement": 1, "return_statement": 7, "break_continue_statement": 2}}, {"id": "mcsim-6.2.0#modelu_prep#IsModelVar.c", "codebase": "mcsim-6.2.0", "c_file": "modelu.c", "function": "IsModelVar", "sloc": "5", "c_code": "BOOL IsModelVar (HVAR hvar)\n{\n int iType = GetVarType(hvar);\n return (iType == 0x10000 || iType == 0x30000);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_json5_prep#json_extract_get_value_size.c", "codebase": "json.h", "c_file": "allow_json5.c", "function": "json_extract_get_value_size", "sloc": "26", "c_code": "struct json_extract_result_s\njson_extract_get_value_size(const struct json_value_s *const value) {\n struct json_extract_result_s result = {0, 0};\n switch (value->type) {\n default:\n break;\n case json_type_object:\n result = json_extract_get_object_size(\n (const struct json_object_s *)value->payload);\n break;\n case json_type_array:\n result = json_extract_get_array_size(\n (const struct json_array_s *)value->payload);\n break;\n case json_type_number:\n result = json_extract_get_number_size(\n (const struct json_number_s *)value->payload);\n break;\n case json_type_string:\n result = json_extract_get_string_size(\n (const struct json_string_s *)value->payload);\n break;\n }\n result.dom_size += sizeof(struct json_value_s);\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 5}}, {"id": "tar-1.34#buffer_prep#reset_eof.c", "codebase": "tar-1.34", "c_file": "buffer.c", "function": "reset_eof", "sloc": "11", "c_code": "void\nreset_eof (void)\n{\n if (hit_eof)\n {\n hit_eof = 0;\n current_block = record_start;\n record_end = record_start + blocking_factor;\n access_mode = ACCESS_WRITE;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#ps_prep#pict_end.c", "codebase": "dap-3.10", "c_file": "ps.c", "function": "pict_end", "sloc": "7", "c_code": "void pict_end()\n{\n fputs(\"gr\\n\", pict_out);\n fputs(\"showpage\\n\", pict_out);\n fputs(\"%%Trailer\\n\", pict_out);\n fflush(pict_out);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#POSSIBLE_FORM_TRIANGLE_ARRAY_VALUES_prep#max.c", "codebase": "transcoder-set", "c_file": "POSSIBLE_FORM_TRIANGLE_ARRAY_VALUES.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#prompt_prep#handle_editing.c", "codebase": "nano-7.2", "c_file": "prompt.c", "function": "handle_editing", "sloc": "38", "c_code": "_Bool handle_editing(functionptrtype function)\n{\n if (function == do_left)\n do_statusbar_left();\n else if (function == do_right)\n do_statusbar_right();\n else if (function == to_prev_word)\n do_statusbar_prev_word();\n else if (function == to_next_word)\n do_statusbar_next_word();\n else if (function == do_home)\n do_statusbar_home();\n else if (function == do_end)\n do_statusbar_end();\n else if (((flags[((RESTRICTED) / (sizeof(unsigned) * 8))] & ((unsigned)1 << ((RESTRICTED) % (sizeof(unsigned) * 8)))) != 0) && currmenu == (1<<5) &&\n openfile->filename[0] != '\\0' &&\n (function == do_verbatim_input ||\n function == do_delete || function == do_backspace ||\n function == cut_text || function == paste_text))\n ;\n else if (function == do_verbatim_input)\n do_statusbar_verbatim_input();\n else if (function == do_delete)\n do_statusbar_delete();\n else if (function == do_backspace)\n do_statusbar_backspace();\n else if (function == cut_text)\n lop_the_answer();\n else if (function == copy_text)\n copy_the_answer();\n else if (function == paste_text) {\n if (cutbuffer != ((void *)0))\n paste_into_answer();\n }\n else\n return 0;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 14, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tinycc#libtcc_prep#tcc_define_symbol.c", "codebase": "tinycc", "c_file": "libtcc.c", "function": "tcc_define_symbol", "sloc": "15", "c_code": "void tcc_define_symbol(TCCState *s1, const char *sym, const char *value)\n{\n int len1, len2;\n if (!value)\n value = \"1\";\n len1 = strlen(sym);\n len2 = strlen(value);\n tcc_open_bf(s1, \"\", len1 + len2 + 1);\n memcpy(file->buffer, sym, len1);\n file->buffer[len1] = ' ';\n memcpy(file->buffer + len1 + 1, value, len2);\n next_nomacro();\n parse_define();\n tcc_close();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 2, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_content_type_prep#osip_content_type_free.c", "codebase": "libosip2-5.3.1", "c_file": "osip_content_type.c", "function": "osip_content_type_free", "sloc": "10", "c_code": "void osip_content_type_free(osip_content_type_t *content_type) {\n if (content_type == ((void *)0))\n return;\n { if (content_type->type != ((void *)0)) { if (osip_free_func) osip_free_func(content_type->type); else free(content_type->type); } };\n { if (content_type->subtype != ((void *)0)) { if (osip_free_func) osip_free_func(content_type->subtype); else free(content_type->subtype); } };\n osip_uri_param_freelist(&content_type->gen_params);\n content_type->type = ((void *)0);\n content_type->subtype = ((void *)0);\n { if (content_type != ((void *)0)) { if (osip_free_func) osip_free_func(content_type); else free(content_type); } };\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 3, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#xqtsub_prep#fsysdep_unlock_uuxqt_dir.c", "codebase": "uucp-1.07", "c_file": "xqtsub.c", "function": "fsysdep_unlock_uuxqt_dir", "sloc": "15", "c_code": "boolean\nfsysdep_unlock_uuxqt_dir (iseq)\n int iseq;\n{\n const char *zxqtdir;\n char abxqtdir[sizeof \".Xqtdir\" + 4];\n if (iseq == 0)\n zxqtdir = \".Xqtdir\";\n else\n {\n sprintf (abxqtdir, \"%s%04d\", \".Xqtdir\", iseq);\n zxqtdir = abxqtdir;\n }\n return fclean_uuxqt_dir (zxqtdir);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#safe-write_prep#safe_write.c", "codebase": "tar-1.34", "c_file": "safe-write.c", "function": "safe_write", "sloc": "16", "c_code": "size_t\nsafe_write (int fd, void const *buf, size_t count)\n{\n for (;;)\n {\n ssize_t result = write (fd, buf, count);\n if (0 <= result)\n return result;\n else if ((((*__errno_location ())) == 4))\n continue;\n else if ((*__errno_location ()) == 22 && SYS_BUFSIZE_MAX < count)\n count = SYS_BUFSIZE_MAX;\n else\n return result;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 1}}, {"id": "units-2.22#units_prep#round_digits.c", "codebase": "units-2.22", "c_file": "units.c", "function": "round_digits", "sloc": "16", "c_code": "double\nround_digits(double value, int digits, int base)\n{\n double mult_factor;\n double (*logfunc)(double);\n if (digits == 0)\n return 0.0;\n if (base == 2)\n logfunc = log2;\n else\n logfunc = log10;\n if (value != 0)\n digits -= ceil(logfunc(fabs(value)));\n mult_factor = pow((double) base, digits);\n return round(value*mult_factor)/mult_factor;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlParseEntityDecl.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlParseEntityDecl", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlParseEntityDecl(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlParserCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n if (libxml_deprecationWarning(\"xmlParseEntityDecl\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlParseEntityDecl\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj));\n xmlParseEntityDecl(ctxt);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#PRODUCT_MAXIMUM_FIRST_ARRAY_MINIMUM_SECOND_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "PRODUCT_MAXIMUM_FIRST_ARRAY_MINIMUM_SECOND.c", "function": "f_gold", "sloc": "5", "c_code": "int f_gold ( int arr1 [ ], int arr2 [ ], int n1, int n2 ) {\n sort ( arr1, arr1 + n1 );\n sort ( arr2, arr2 + n2 );\n return arr1 [ n1 - 1 ] * arr2 [ 0 ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_write_pretty_get_array_size.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_write_pretty_get_array_size", "sloc": "22", "c_code": "int json_write_pretty_get_array_size(const struct json_array_s *array,\n size_t depth, size_t indent_size,\n size_t newline_size, size_t *size) {\n struct json_array_element_s *element;\n *size += 1;\n if (0 < array->length) {\n *size += newline_size;\n *size += array->length - 1;\n for (element = array->start; 0 != element;\n element = element->next) {\n *size += (depth + 1) * indent_size;\n if (json_write_pretty_get_value_size(element->value, depth + 1,\n indent_size, newline_size, size)) {\n return 1;\n }\n *size += newline_size;\n }\n *size += depth * indent_size;\n }\n *size += 1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#DELANNOY_NUMBER_1_prep#len.c", "codebase": "transcoder-set", "c_file": "DELANNOY_NUMBER_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderGetLastError.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderGetLastError", "sloc": "7", "c_code": "const xmlError *\nxmlTextReaderGetLastError(xmlTextReaderPtr reader)\n{\n if (reader == ((void *)0))\n return(((void *)0));\n return(&reader->ctxt->lastError);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "wget-1.21.4#hash_prep#hash_table_remove.c", "codebase": "wget-1.21.4", "c_file": "hash.c", "function": "hash_table_remove", "sloc": "30", "c_code": "int\nhash_table_remove (struct hash_table *ht, const void *key)\n{\n struct cell *c = find_cell (ht, key);\n if (!((c)->key != ((void *) ~(uintptr_t) 0)))\n return 0;\n else\n {\n int size = ht->size;\n struct cell *cells = ht->cells;\n hashfun_t hasher = ht->hash_function;\n ((c)->key = ((void *) ~(uintptr_t) 0));\n --ht->count;\n c = (c != cells + (size - 1) ? c + 1 : cells);\n for (; ((c)->key != ((void *) ~(uintptr_t) 0)); c = (c != cells + (size - 1) ? c + 1 : cells))\n {\n const void *key2 = c->key;\n struct cell *c_new;\n c_new = cells + ((hasher) (key2) % size);\n for (; ((c_new)->key != ((void *) ~(uintptr_t) 0)); c_new = (c_new != cells + (size - 1) ? c_new + 1 : cells))\n if (key2 == c_new->key)\n goto next_rehash;\n *c_new = *c;\n ((c)->key = ((void *) ~(uintptr_t) 0));\n next_rehash:\n ;\n }\n return 1;\n }\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 0, "struct_type": 4, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 1, "return_statement": 2, "break_continue_statement": 0}}, {"id": "screen-4.9.0#screen_prep#main.c", "codebase": "screen-4.9.0", "c_file": "screen.c", "function": "main", "sloc": "723", "c_code": "int main(int ac, char** av)\n{\n register int n;\n char *ap;\n char *av0;\n char socknamebuf[2 * 768];\n int mflag = 0;\n char *myname = (ac == 0) ? \"screen\" : av[0];\n char *SockDir;\n struct stat st;\n int oumask;\n struct NewWindow nwin;\n int detached = 0;\n char *sockp;\n char *sty = 0;\n closeallfiles(0);\n snprintf(version, 59, \"%d.%.2d.%.2d%s (%s%s) %s\", 4, 9,\n 0, \"\", \"GNU\", \"\", \"30-Jan-22\");\n nversion = 4 * 10000 + 9 * 100 + 0;\n do {} while (0);\n do {} while (0);\n do {} while (0);\n do {} while (0);\n do {} while (0);\n do {} while (0);\n do {} while (0);\n do {} while (0);\n do {} while (0);\n do {} while (0);\n do {} while (0);\n do {} while (0);\n BellString = SaveStr(\"Bell in window %n\");\n VisualBellString = SaveStr(\" Wuff, Wuff!! \");\n ActivityString = SaveStr(\"Activity in window %n\");\n screenlogfile = SaveStr(\"screenlog.%n\");\n logtstamp_string = SaveStr(\"-- %n:%t -- time-stamp -- %M/%d/%y %c:%s --\\n\");\n hstatusstring = SaveStr(\"%h\");\n captionstring = SaveStr(\"%4n %t\");\n timestring = SaveStr(\"%c:%s %M %d %H%? %l%?\");\n wlisttit = SaveStr(\" Num Name%=Flags\");\n wliststr = SaveStr(\"%4n %t%=%f\");\n BufferFile = SaveStr(\"/tmp/screen-exchange\");\n ShellProg = ((void *)0);\n PowDetachString = 0;\n default_startup = (ac > 1) ? 0 : 1;\n adaptflag = 0;\n VBellWait = 1 * 1000;\n MsgWait = 5 * 1000;\n MsgMinWait = 1 * 1000;\n SilenceWait = 30;\n zmodem_sendcmd = SaveStr(\"!!! sz -vv -b \");\n zmodem_recvcmd = SaveStr(\"!!! rz -vv -b -E\");\n CompileKeys((char *)0, 0, mark_key_tab);\n InitBuiltinTabs();\n screenencodings = SaveStr(\"/usr/share/screen/utf8encodings\");\n cjkwidth = 0;\n nwin = nwin_undef;\n nwin_options = nwin_undef;\n strncpy(screenterm, \"screen\", 32);\n screenterm[32] = '\\0';\n real_uid = getuid();\n real_gid = getgid();\n eff_uid = geteuid();\n eff_gid = getegid();\n logreopen_register(lf_secreopen);\n av0 = *av;\n if (*av0 == '-') {\n rflag = 4;\n xflag = 1;\n ShellProg = SaveStr(DefaultShell);\n }\n while (ac > 0){\n ap = *++av;\n if (--ac > 0 && *ap == '-') {\n if (ap[1] == '-' && ap[2] == 0) {\n av++;\n ac--;\n break;\n }\n if (ap[1] == '-' && !strcmp(ap, \"--version\")) {\n printf(\"Screen version %s\\n\", version);\n exit(0);\n }\n if (ap[1] == '-' && !strcmp(ap, \"--help\"))\n exit_with_usage(myname, ((void *)0), ((void *)0));\n while (ap && *ap && *++ap) {\n switch (*ap) {\n case 'a':\n nwin_options.aflag = 1;\n break;\n case 'A':\n adaptflag = 1;\n break;\n case 'p':\n if (*++ap)\n preselect = ap;\n else {\n if (!--ac)\n exit_with_usage(myname, \"Specify a window to preselect with -p\", ((void *)0));\n preselect = *++av;\n }\n ap = ((void *)0);\n break;\n case 'c':\n if (*++ap)\n RcFileName = ap;\n else {\n if (--ac == 0)\n exit_with_usage(myname, \"Specify an alternate rc-filename with -c\", ((void *)0));\n RcFileName = *++av;\n }\n ap = ((void *)0);\n break;\n case 'e':\n if (!*++ap) {\n if (--ac == 0)\n exit_with_usage(myname, \"Specify command characters with -e\", ((void *)0));\n ap = *++av;\n }\n if (ParseEscape(ap))\n Panic(0, \"Two characters are required with -e option, not '%s'.\", ap);\n ap = ((void *)0);\n break;\n case 'f':\n ap++;\n switch (*ap++) {\n case 'n':\n case '0':\n nwin_options.flowflag = (1<<0) * 0;\n break;\n case '\\0':\n ap--;\n case 'y':\n case '1':\n nwin_options.flowflag = (1<<0) * 1;\n break;\n case 'a':\n nwin_options.flowflag = (1<<2);\n break;\n default:\n exit_with_usage(myname, \"Unknown flow option -%s\", --ap);\n }\n break;\n case 'h':\n if (--ac == 0)\n exit_with_usage(myname, ((void *)0), ((void *)0));\n nwin_options.histheight = atoi(*++av);\n if (nwin_options.histheight < 0)\n exit_with_usage(myname, \"-h: %s: negative scrollback size?\", *av);\n break;\n case 'i':\n iflag = 1;\n break;\n case 't':\n if (--ac == 0)\n exit_with_usage(myname, \"Specify a new window-name with -t\", ((void *)0));\n nwin_options.aka = *++av;\n break;\n case 'l':\n ap++;\n switch (*ap++) {\n case 'n':\n case '0':\n nwin_options.lflag = 0;\n break;\n case '\\0':\n ap--;\n case 'y':\n case '1':\n nwin_options.lflag = 1;\n break;\n case 'a':\n nwin_options.lflag = 3;\n break;\n case 's':\n case 'i':\n lsflag = 1;\n if (ac > 1 && !SockMatch) {\n SockMatch = *++av;\n ac--;\n }\n ap = ((void *)0);\n break;\n default:\n exit_with_usage(myname, \"%s: Unknown suboption to -l\", --ap);\n }\n break;\n case 'w':\n if (strcmp(ap+1, \"ipe\"))\n exit_with_usage(myname, \"Unknown option %s\", --ap);\n lsflag = 1;\n wipeflag = 1;\n if (ac > 1 && !SockMatch) {\n SockMatch = *++av;\n ac--;\n }\n break;\n case 'L':\n if (!strcmp(ap + 1, \"ogfile\")) {\n if (--ac == 0)\n exit_with_usage(myname, \"Specify logfile path with -Logfile\", ((void *)0));\n if (strlen(*++av) > 4096)\n Panic(1, \"-Logfile name too long. (max. %d char)\", 4096);\n free(screenlogfile);\n screenlogfile = SaveStr(*av);\n ap = ((void *)0);\n } else if (!strcmp(ap, \"L\"))\n nwin_options.Lflag = 1;\n break;\n case 'm':\n mflag = 1;\n break;\n case 'O':\n force_vt = 0;\n break;\n case 'T':\n if (--ac == 0)\n exit_with_usage(myname, \"Specify terminal-type with -T\", ((void *)0));\n if (strlen(*++av) < 32) {\n strncpy(screenterm, *av, 32);\n screenterm[32] = '\\0';\n } else\n Panic(0, \"-T: terminal name too long. (max. %d char)\", 32);\n nwin_options.term = screenterm;\n break;\n case 'q':\n quietflag = 1;\n break;\n case 'Q':\n queryflag = 1;\n cmdflag = 1;\n break;\n case 'r':\n case 'R':\n case 'x':\n if (ac > 1 && *av[1] != '-' && !SockMatch) {\n SockMatch = *++av;\n ac--;\n do {} while (0);\n }\n if (*ap == 'x')\n xflag = 1;\n if (rflag)\n rflag = 2;\n rflag += (*ap == 'R') ? 2 : 1;\n break;\n case 'd':\n dflag = 1;\n case 'D':\n if (!dflag)\n dflag = 2;\n if (ac == 2) {\n if (*av[1] != '-' && !SockMatch) {\n SockMatch = *++av;\n ac--;\n do {} while (0);\n }\n }\n break;\n case 's':\n if (--ac == 0)\n exit_with_usage(myname, \"Specify shell with -s\", ((void *)0));\n if (ShellProg)\n free(ShellProg);\n ShellProg = SaveStr(*++av);\n do {} while (0);\n break;\n case 'S':\n if (!SockMatch) {\n if (--ac == 0)\n exit_with_usage(myname, \"Specify session-name with -S\", ((void *)0));\n SockMatch = *++av;\n do {} while (0);\n do {} while (0);\n if (strlen(SockMatch) > 80)\n exit_with_usage(myname, \"Session-name is too long (max length is 80 symbols)\", ((void *)0));\n }\n if (!*SockMatch)\n exit_with_usage(myname, \"Empty session-name?\", ((void *)0));\n break;\n case 'X':\n cmdflag = 1;\n break;\n case 'v':\n printf(\"Screen version %s\\n\", version);\n exit(0);\n case 'U':\n nwin_options.encoding = nwin_options.encoding == -1 ? 8 : 0;\n break;\n default:\n exit_with_usage(myname, \"Unknown option %s\", --ap);\n }\n }\n }\n else\n break;\n }\n xsignal(7, CoreDump);\n xsignal(11, CoreDump);\n setlocale(6, \"\");\n if (nwin_options.encoding == -1) {\n nwin_options.encoding = FindEncoding(nl_langinfo(CODESET));\n do {} while (0);\n }\n {\n char *s;\n if ((s = locale_name())) {\n if(!strncmp(s, \"zh_\", 3) || !strncmp(s, \"ja_\", 3) || !strncmp(s, \"ko_\", 3)) {\n cjkwidth = 1;\n }\n }\n }\n if (nwin_options.aka) {\n if (nwin_options.encoding > 0) {\n size_t len = strlen(nwin_options.aka);\n size_t newsz;\n char *newbuf = malloc(3 * len);\n if (!newbuf)\n Panic(0, \"%s\", strnomem);\n newsz = RecodeBuf((unsigned char *)nwin_options.aka, len,\n nwin_options.encoding, 0, (unsigned char *)newbuf);\n newbuf[newsz] = '\\0';\n nwin_options.aka = newbuf;\n } else\n {\n nwin_options.aka = SaveStr(nwin_options.aka);\n }\n }\n if (SockMatch && strlen(SockMatch) >= 768)\n Panic(0, \"Ridiculously long socketname - try again.\");\n if (cmdflag && !rflag && !dflag && !xflag)\n xflag = 1;\n if (!cmdflag && dflag && mflag && !(rflag || xflag))\n detached = 1;\n nwin = nwin_options;\n nwin.encoding = nwin_undef.encoding;\n if (ac)\n nwin.args = av;\n xsignal(25, ((__sighandler_t) 1));\n xsignal(13, ((__sighandler_t) 1));\n if (!ShellProg) {\n register char *sh;\n sh = getenv(\"SHELL\");\n ShellProg = SaveStr(sh ? sh : DefaultShell);\n }\n ShellArgs[0] = ShellProg;\n home = getenv(\"HOME\");\n if (!mflag && !SockMatch) {\n sty = getenv(\"STY\");\n if (sty && *sty == 0)\n sty = 0;\n }\n if (!(nethackflag = (getenv(\"NETHACKOPTIONS\") != ((void *)0)))) {\n char nethackrc[4096];\n if (home && (strlen(home) < (4096 - 20))) {\n sprintf(nethackrc,\"%s/.nethackrc\", home);\n nethackflag = !access(nethackrc, 0);\n }\n }\n own_uid = multi_uid = real_uid;\n if (SockMatch && (sockp = index(SockMatch, '/'))) {\n *sockp = 0;\n multi = SockMatch;\n SockMatch = sockp + 1;\n if (*multi) {\n struct passwd *mppp;\n if ((mppp = getpwnam(multi)) == (struct passwd *)0)\n Panic(0, \"Cannot identify account '%s'.\", multi);\n multi_uid = mppp->pw_uid;\n multi_home = SaveStr(mppp->pw_dir);\n if (strlen(multi_home) > 4096 - 10)\n Panic(0, \"home directory path too long\");\n if (rflag || lsflag)\n xflag = 1;\n detached = 0;\n multiattach = 1;\n }\n if (eff_uid && (multi_uid != eff_uid))\n Panic(0, \"Must run suid root for multiuser support.\");\n }\n if (SockMatch && *SockMatch == 0)\n SockMatch = 0;\n if ((LoginName = getlogin()) && LoginName[0] != '\\0') {\n if ((ppp = getpwnam(LoginName)) != (struct passwd *) 0)\n if ((int)ppp->pw_uid != real_uid)\n ppp = (struct passwd *) 0;\n }\n if (ppp == 0) {\n if ((ppp = getpwuid(real_uid)) == 0) {\n Panic(0, \"getpwuid() can't identify your account!\");\n exit(1);\n }\n LoginName = ppp->pw_name;\n }\n LoginName = SaveStr(LoginName);\n ppp = getpwbyname(LoginName, ppp);\n if (home == 0 || *home == '\\0')\n home = ppp->pw_dir;\n if (strlen(LoginName) > 256)\n Panic(0, \"LoginName too long - sorry.\");\n if (multi && strlen(multi) > 256)\n Panic(0, \"Screen owner name too long - sorry.\");\n if (strlen(home) > 4096 - 25)\n Panic(0, \"$HOME too long - sorry.\");\n attach_tty = \"\";\n if (!detached && !lsflag && !cmdflag && !(dflag && !mflag && !rflag && !xflag) &&\n !(sty && !SockMatch && !mflag && !rflag && !xflag)) {\n int fl;\n SetTtyname(1, &st);\n tty_mode = (int)st.st_mode & 0777;\n fl = fcntl(0, 3, 0);\n if (fl != -1 && (fl & (02|00|01)) == 02)\n attach_fd = 0;\n if (attach_fd == -1) {\n if ((n = secopen(attach_tty, 02 | 04000, 0)) < 0)\n Panic(0, \"Cannot open your terminal '%s' - please check.\", attach_tty);\n attach_fd = n;\n }\n do {} while (0);\n if ((attach_term = getenv(\"TERM\")) == 0 || *attach_term == 0)\n Panic(0, \"Please set a terminal type.\");\n if (strlen(attach_term) > 32)\n Panic(0, \"$TERM too long - sorry.\");\n GetTTY(0, &attach_Mode);\n }\n if ((oumask = (int)umask(0)) == -1)\n Panic((*__errno_location ()), \"Cannot change umask to zero\");\n SockDir = getenv(\"SCREENDIR\");\n if (SockDir) {\n if (strlen(SockDir) >= 4096 - 1)\n Panic(0, \"Ridiculously long $SCREENDIR - try again.\");\n if (multi)\n Panic(0, \"No $SCREENDIR with multi screens, please.\");\n }\n if (multiattach) {\n SockDir = (eff_uid ? \"/tmp/uscreens\" : \"/tmp/screens\");\n sprintf(SockPath, \"%s/S-%s\", SockDir, multi);\n } else\n {\n if (SockDir) {\n if (access(SockDir, 0)) {\n do {} while (0);\n if (UserContext() > 0) {\n if (mkdir(SockDir, 0700))\n UserReturn(0);\n UserReturn(1);\n }\n if (UserStatus() <= 0)\n Panic(0, \"Cannot make directory '%s'.\", SockDir);\n }\n if (SockDir != SockPath)\n strcpy(SockPath, SockDir);\n }\n else {\n SockDir = (eff_uid ? \"/tmp/uscreens\" : \"/tmp/screens\");\n if (stat(SockDir, &st)) {\n n = (eff_uid == 0 && (real_uid || eff_gid == real_gid)) ? 0755 :\n (eff_gid != real_gid) ? 0775 :\n 0777|01000;\n if (mkdir(SockDir, n) == -1)\n Panic((*__errno_location ()), \"Cannot make directory '%s'\", SockDir);\n }\n else {\n if (!((((st.st_mode)) & 0170000) == (0040000)))\n Panic(0, \"'%s' must be a directory.\", SockDir);\n if (eff_uid == 0 && real_uid && (int)st.st_uid != eff_uid)\n Panic(0, \"Directory '%s' must be owned by root.\", SockDir);\n n = (eff_uid == 0 && (real_uid || (st.st_mode & 0775) != 0775)) ? 0755 :\n (eff_gid == (int)st.st_gid && eff_gid != real_gid) ? 0775 : 0777;\n if (((int)st.st_mode & 0777) != n)\n Panic(0, \"Directory '%s' must have mode %03o.\", SockDir, n);\n }\n sprintf(SockPath, \"%s/S-%s\", SockDir, LoginName);\n if (access(SockPath, 0)) {\n if (mkdir(SockPath, 0700) == -1 && (*__errno_location ()) != 17)\n Panic((*__errno_location ()), \"Cannot make directory '%s'\", SockPath);\n (void) chown(SockPath, real_uid, real_gid);\n }\n }\n }\n if (stat(SockPath, &st) == -1)\n Panic((*__errno_location ()), \"Cannot access %s\", SockPath);\n else\n if (!((((st.st_mode)) & 0170000) == (0040000)))\n Panic(0, \"%s is not a directory.\", SockPath);\n if (multi) {\n if ((int)st.st_uid != multi_uid)\n Panic(0, \"%s is not the owner of %s.\", multi, SockPath);\n }\n else\n {\n if ((int)st.st_uid != real_uid)\n Panic(0, \"You are not the owner of %s.\", SockPath);\n }\n if ((st.st_mode & 0777) != 0700)\n Panic(0, \"Directory %s must have mode 700.\", SockPath);\n if (SockMatch && index(SockMatch, '/'))\n Panic(0, \"Bad session name '%s'\", SockMatch);\n SockName = SockPath + strlen(SockPath) + 1;\n *SockName = 0;\n (void) umask(oumask);\n do {} while (0);\n (void) gethostname(HostName, 768);\n HostName[768 - 1] = '\\0';\n if ((ap = index(HostName, '.')) != ((void *)0))\n *ap = '\\0';\n if (lsflag) {\n int i, fo, oth;\n _Bool sock;\n if (multi)\n real_uid = multi_uid;\n do { setgid(real_gid); setuid(real_uid); eff_uid = real_uid; eff_gid = real_gid; } while (0);\n i = FindSocket((int *)((void *)0), &fo, &oth, SockMatch, &sock);\n if (quietflag) {\n if (rflag)\n exit(10 + i);\n else\n exit(9 + (fo || oth ? 1 : 0) + fo);\n }\n if (fo == 0)\n Panic(0, \"No Sockets found in %s.\\n\", SockPath);\n Msg(0, \"%d Socket%s in %s.\", fo, fo > 1 ? \"s\" : \"\", SockPath);\n eexit(0);\n }\n xsignal(1, AttacherFinit);\n if (cmdflag) {\n if (multi)\n real_uid = multi_uid;\n SetTtyname(0, &st);\n if (!*av)\n Panic(0, \"Please specify a command.\");\n if (!strncmp(\"sessionname\", *av, 11)) {\n if (!*++av)\n Panic(0, \"Please specify a parameter.\");\n if (strlen(*av) > 80)\n Panic(0, \"Parameter of command 'sessionname' is too long.\");\n *--av;\n }\n do { setgid(real_gid); setuid(real_uid); eff_uid = real_uid; eff_gid = real_gid; } while (0);\n SendCmdMessage(sty, SockMatch, av, queryflag >= 0);\n exit(0);\n }\n else if (rflag || xflag) {\n do {} while (0);\n if (Attach(2)) {\n Attacher();\n }\n if (multiattach)\n Panic(0, \"Can't create sessions of other users.\");\n do {} while (0);\n }\n else if (dflag && !mflag) {\n SetTtyname(0, &st);\n Attach(4);\n Msg(0, \"[%s %sdetached.]\\n\", SockName, (dflag > 1 ? \"power \" : \"\"));\n eexit(0);\n }\n if (!SockMatch && !mflag && sty) {\n SetTtyname(0, &st);\n do { setgid(real_gid); setuid(real_uid); eff_uid = real_uid; eff_gid = real_gid; } while (0);\n nwin_options.args = av;\n SendCreateMsg(sty, &nwin);\n exit(0);\n }\n nwin_compose(&nwin_default, &nwin_options, &nwin_default);\n if (!detached || dflag != 2)\n MasterPid = fork();\n else\n MasterPid = 0;\n switch (MasterPid) {\n case -1:\n Panic((*__errno_location ()), \"fork\");\n case 0:\n break;\n default:\n if (detached)\n exit(0);\n if (SockMatch)\n sprintf(socknamebuf, \"%d.%s\", MasterPid, SockMatch);\n else\n sprintf(socknamebuf, \"%d.%s.%s\", MasterPid, stripdev(attach_tty), HostName);\n for (ap = socknamebuf; *ap; ap++)\n if (*ap == '/')\n *ap = '-';\n if (strlen(socknamebuf) > 255)\n socknamebuf[255] = 0;\n sprintf(SockPath + strlen(SockPath), \"/%s\", socknamebuf);\n do { setgid(real_gid); setuid(real_uid); eff_uid = real_uid; eff_gid = real_gid; } while (0);\n Attacher();\n }\n if (!detached)\n PanicPid = getppid();\n if (DefaultEsc == -1)\n DefaultEsc = (('a')&037);\n if (DefaultMetaEsc == -1)\n DefaultMetaEsc = 'a';\n ap = av0 + strlen(av0) - 1;\n while (ap >= av0) {\n if (!strncmp(\"screen\", ap, 6)) {\n memcpy(ap, \"SCREEN\", 6);\n break;\n }\n ap--;\n }\n if (ap < av0)\n *av0 = 'S';\n if (!detached) {\n if (attach_fd == -1) {\n if ((n = secopen(attach_tty, 02 | 04000, 0)) < 0)\n Panic(0, \"Cannot reopen '%s' - please check.\", attach_tty);\n }\n else\n n = dup(attach_fd);\n }\n else\n n = -1;\n freopen(\"/dev/null\", \"r\", stdin);\n freopen(\"/dev/null\", \"w\", stdout);\n freopen(\"/dev/null\", \"w\", stderr);\n do {} while (0);\n if (UserAdd(LoginName, (char *)0, (struct acluser **)0) < 0)\n Panic(0, \"Could not create user info\");\n if (!detached) {\n if (MakeDisplay(LoginName, attach_tty, attach_term, n, getppid(), &attach_Mode) == 0)\n Panic(0, \"Could not alloc display\");\n PanicPid = 0;\n display->d_encoding = nwin_options.encoding > 0 ? nwin_options.encoding : 0;\n do {} while (0);\n }\n if (SockMatch) {\n sprintf(socknamebuf, \"%d.%s\", (int)getpid(), SockMatch);\n }\n else {\n sprintf(socknamebuf, \"%d.%s.%s\", (int)getpid(), stripdev(attach_tty), HostName);\n }\n for (ap = socknamebuf; *ap; ap++)\n if (*ap == '/')\n *ap = '-';\n if (strlen(socknamebuf) > 255) {\n do {} while (0);\n socknamebuf[255] = 0;\n }\n sprintf(SockPath + strlen(SockPath), \"/%s\", socknamebuf);\n ServerSocket = MakeServerSocket(1);\n if ((ap = getenv(\"SYSSCREENRC\")))\n (void)StartRc(ap, 0);\n else\n (void)StartRc(\"/usr/etc/screenrc\", 0);\n (void)StartRc(RcFileName, 0);\n InitUtmp();\n if (display) {\n if (InitTermcap(0, 0)) {\n do {} while (0);\n fcntl(display->d_userfd, 4, 0);\n freetty();\n if (display->d_userpid)\n Kill(display->d_userpid, 1);\n eexit(1);\n }\n MakeDefaultCanvas();\n InitTerm(0);\n RemoveLoginSlot();\n }\n else\n MakeTermcap(1);\n InitLoadav();\n InitKeytab();\n MakeNewEnv();\n xsignal(1, SigHup);\n xsignal(2, FinitHandler);\n xsignal(3, FinitHandler);\n xsignal(15, FinitHandler);\n xsignal(21, ((__sighandler_t) 1));\n xsignal(22, ((__sighandler_t) 1));\n if (display) {\n brktty(display->d_userfd);\n SetMode(&display->d_OldMode, &display->d_NewMode, display->d_flow, iflag);\n SetTTY(display->d_userfd, &display->d_NewMode);\n if (fcntl(display->d_userfd, 4, 04000))\n Msg((*__errno_location ()), \"Warning: NBLOCK fcntl failed\");\n }\n else\n brktty(-1);\n xsignal(17, SigChld);\n if ((ap = getenv(\"SYSSCREENRC\")))\n FinishRc(ap);\n else\n FinishRc(\"/usr/etc/screenrc\");\n FinishRc(RcFileName);\n do {} while (0);\n if (windows == ((void *)0)) {\n do {} while (0);\n if (MakeWindow(&nwin) == -1) {\n fd_set rfd;\n struct timeval tv = { MsgWait/1000, 1000*(MsgWait%1000) };\n ((void) (((&rfd)->__fds_bits)[((0) / (8 * (int) sizeof (__fd_mask)))] |= ((__fd_mask) (1UL << ((0) % (8 * (int) sizeof (__fd_mask)))))));\n Msg(0, \"Sorry, could not find a PTY or TTY.\");\n select(1, &rfd, ((void *)0), ((void *)0), &tv);\n Finit(0);\n }\n }\n else if (ac)\n MakeWindow(&nwin);\n if (display && default_startup)\n display_copyright();\n xsignal(2, SigInt);\n if (rflag && (rflag & 1) == 0 && !quietflag) {\n Msg(0, \"New screen...\");\n rflag = 0;\n }\n serv_read.type = 1;\n serv_read.fd = ServerSocket;\n serv_read.handler = serv_read_fn;\n evenq(&serv_read);\n serv_select.pri = -10;\n serv_select.type = 3;\n serv_select.handler = serv_select_fn;\n evenq(&serv_select);\n logflushev.type = 0;\n logflushev.handler = logflush_fn;\n sched();\n return 0;\n}\n", "c_constructs": {"pointer_type": 10, "array_type": 8, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 45, "memory_management": 3, "memory_operation": 1, "if_statement": 146, "for_loop": 2, "while_loop": 36, "switch_statement": 4, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 34}}, {"id": "uucp-1.07#prott_prep#ftsendcmd.c", "codebase": "uucp-1.07", "c_file": "prott.c", "function": "ftsendcmd", "sloc": "21", "c_code": "boolean\nftsendcmd (qdaemon, z, ilocal, iremote)\n struct sdaemon *qdaemon;\n const char *z;\n int ilocal __attribute__ ((__unused__));\n int iremote __attribute__ ((__unused__));\n{\n size_t clen, csend;\n char *zalc;\n boolean fret;\n do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, (\"ftsendcmd: Sending command \\\"%s\\\"\"), (z)); } while (0);\n clen = strlen (z);\n csend = ((clen / (512)) + 1) * (512);\n zalc = zbufalc (csend);\n memcpy (zalc, z, clen);\n if (csend > clen)\n bzero (zalc + clen, csend - clen);\n fret = fsend_data (qdaemon->qconn, zalc, csend, (1));\n ubuffree (zalc);\n return fret;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_PROFIT_BY_BUYING_AND_SELLING_A_SHARE_AT_MOST_K_TIMES_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_PROFIT_BY_BUYING_AND_SELLING_A_SHARE_AT_MOST_K_TIMES.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int price [ ], int n, int k ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#EFFICIENT_WAY_CHECK_WHETHER_N_TH_FIBONACCI_NUMBER_MULTIPLE_10_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "EFFICIENT_WAY_CHECK_WHETHER_N_TH_FIBONACCI_NUMBER_MULTIPLE_10.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_PERIMETER_N_BLOCKS_prep#sort.c", "codebase": "transcoder-set", "c_file": "MINIMUM_PERIMETER_N_BLOCKS.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gzip-1.12#util_prep#gzip_error.c", "codebase": "gzip-1.12", "c_file": "util.c", "function": "gzip_error", "sloc": "6", "c_code": "void\ngzip_error (char const *m)\n{\n fprintf (stderr, \"\\n%s: %s: %s\\n\", program_name, ifname, m);\n abort_gzip();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_write_get_string_size.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_write_get_string_size", "sloc": "22", "c_code": "int json_write_get_string_size(const struct json_string_s *string,\n size_t *size) {\n size_t i;\n for (i = 0; i < string->string_size; i++) {\n switch (string->string[i]) {\n case '\"':\n case '\\\\':\n case '\\b':\n case '\\f':\n case '\\n':\n case '\\r':\n case '\\t':\n *size += 2;\n break;\n default:\n *size += 1;\n break;\n }\n }\n *size += 2;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 2}}, {"id": "gprolog-1.5.0#error_supp_prep#Pl_Err_Instantiation.c", "codebase": "gprolog-1.5.0", "c_file": "error_supp.c", "function": "Pl_Err_Instantiation", "sloc": "6", "c_code": "void\nPl_Err_Instantiation(void)\n{\n Update_Cur_From_C_Bip();\n Pl_Execute_A_Continuation(X1_24706C5F6572725F696E7374616E74696174696F6E__a0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "units-2.22#units_prep#write_files_sig.c", "codebase": "units-2.22", "c_file": "units.c", "function": "write_files_sig", "sloc": "9", "c_code": "void\nwrite_files_sig(int sig)\n{\n if (historyfile)\n save_history();\n close_logfile();\n signal(sig, ((__sighandler_t) 0));\n raise(sig);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#notify_prep#notify_winlink.c", "codebase": "tmux", "c_file": "notify.c", "function": "notify_winlink", "sloc": "7", "c_code": "void\nnotify_winlink(const char *name, struct winlink *wl)\n{\n struct cmd_find_state fs;\n cmd_find_from_winlink(&fs, wl, 0);\n notify_add(name, &fs, ((void *)0), wl->session, wl->window, ((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#tc_result_pattern_count.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "tc_result_pattern_count", "sloc": "3", "c_code": "int tc_result_pattern_count(const tc_result *result) {\n return result->pattern_count;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "heman#mat4_prep#kmMat4RotationTranslation.c", "codebase": "heman", "c_file": "mat4.c", "function": "kmMat4RotationTranslation", "sloc": "20", "c_code": "kmMat4* kmMat4RotationTranslation(kmMat4* pOut, const kmMat3* rotation, const kmVec3* translation)\n{\n pOut->mat[0] = rotation->mat[0];\n pOut->mat[1] = rotation->mat[1];\n pOut->mat[2] = rotation->mat[2];\n pOut->mat[3] = 0.0f;\n pOut->mat[4] = rotation->mat[3];\n pOut->mat[5] = rotation->mat[4];\n pOut->mat[6] = rotation->mat[5];\n pOut->mat[7] = 0.0f;\n pOut->mat[8] = rotation->mat[6];\n pOut->mat[9] = rotation->mat[7];\n pOut->mat[10] = rotation->mat[8];\n pOut->mat[11] = 0.0f;\n pOut->mat[12] = translation->x;\n pOut->mat[13] = translation->y;\n pOut->mat[14] = translation->z;\n pOut->mat[15] = 1.0f;\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#NON_REPEATING_ELEMENT_prep#len.c", "codebase": "transcoder-set", "c_file": "NON_REPEATING_ELEMENT.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#trans_prep#floop.c", "codebase": "uucp-1.07", "c_file": "trans.c", "function": "floop", "sloc": "205", "c_code": "boolean\nfloop (qdaemon)\n struct sdaemon *qdaemon;\n{\n boolean fret;\n fret = (1);\n while (! qdaemon->fhangup)\n {\n register struct stransfer *q;\n if (iDebug != 0)\n {\n ulog_close ();\n ustats_close ();\n }\n if (qdaemon->fmaster)\n {\n boolean fhangup;\n qdaemon->frequest_hangup = (0);\n fhangup = (0);\n if (qdaemon->fhangup_requested\n && qTsend == ((void *)0)\n && (qTreceive == ((void *)0) || qdaemon->cchans > 1))\n {\n do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, (\"floop: Transferring control at remote request\")); } while (0);\n fhangup = (1);\n }\n else if (qTremote == ((void *)0)\n && qTlocal == ((void *)0)\n && qTsend == ((void *)0)\n && qTreceive == ((void *)0))\n {\n if (! fqueue (qdaemon, (boolean *) ((void *)0)))\n {\n fret = (0);\n break;\n }\n if (qTlocal == ((void *)0))\n {\n do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, (\"floop: No work for master\")); } while (0);\n fhangup = (1);\n }\n }\n if (fhangup)\n {\n if (! (*qdaemon->qproto->pfsendcmd) (qdaemon, \"H\", 0, 0))\n {\n fret = (0);\n break;\n }\n qdaemon->fmaster = (0);\n }\n }\n if (! qdaemon->fmaster)\n qdaemon->fhangup_requested = (0);\n while (qTremote != ((void *)0))\n {\n q = qTremote;\n utdequeue (q);\n utqueue (&qTsend, q, (1));\n }\n if (qdaemon->fmaster || qdaemon->cchans > 1)\n {\n while (qTlocal != ((void *)0) && cTchans < qdaemon->cchans)\n {\n q = qTlocal;\n if (! fqueue_send (qdaemon, q))\n {\n fret = (0);\n break;\n }\n utchanalc (qdaemon, q);\n }\n if (! fret)\n break;\n }\n q = qTsend;\n if (q == ((void *)0))\n {\n ulog_user ((const char *) ((void *)0));\n do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, (\"floop: Waiting for data\")); } while (0);\n if (! (*qdaemon->qproto->pfwait) (qdaemon))\n {\n fret = (0);\n break;\n }\n }\n else\n {\n ulog_user (q->s.zuser);\n if (! q->fsendfile)\n {\n if (! (*q->psendfn) (q, qdaemon))\n {\n fret = (0);\n break;\n }\n }\n else\n {\n long isecs, imicros;\n boolean fcharged;\n long cmax_time;\n long istart = 0;\n long inextsecs = 0, inextmicros;\n if (! fttime (qdaemon, &isecs, &imicros))\n {\n fret = (0);\n break;\n }\n fcharged = (0);\n if (q->zlog != ((void *)0))\n {\n ulog (LOG_NORMAL, \"%s\", q->zlog);\n ubuffree (q->zlog);\n q->zlog = ((void *)0);\n }\n cmax_time = qdaemon->qsys->uuconf_cmax_file_time;\n if (qdaemon->cchans <= 1)\n cmax_time = 0;\n if (cmax_time > 0)\n istart = ixsysdep_time (((void *)0));\n while (q == qTsend\n && q->fsendfile\n && qTremote == ((void *)0))\n {\n char *zdata;\n size_t cdata;\n long ipos;\n zdata = (*qdaemon->qproto->pzgetspace) (qdaemon, &cdata);\n if (zdata == ((void *)0))\n {\n fret = (0);\n break;\n }\n if (feof (q->e))\n cdata = 0;\n else\n {\n cdata = fread ((zdata), 1, (cdata), (q->e));\n if (ferror (q->e))\n {\n ulog (LOG_ERROR, \"read: %s\", strerror ((*__errno_location ())));\n fret = (0);\n break;\n }\n }\n ipos = q->ipos;\n q->ipos += cdata;\n q->cbytes += cdata;\n if (! (*qdaemon->qproto->pfsenddata) (qdaemon, zdata,\n cdata, q->ilocal,\n q->iremote, ipos))\n {\n fret = (0);\n break;\n }\n if (cdata == 0)\n {\n inextsecs = ixsysdep_process_time (&inextmicros);\n do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, (\"floop: Charging %ld to %c %s %s\"), (((inextsecs - isecs) * 1000000 + inextmicros - imicros)), (q->s.bcmd), (q->s.zfrom), (q->s.zto)); } while (0);\n q->isecs += inextsecs - isecs;\n q->imicros += inextmicros - imicros;\n fcharged = (1);\n q->fsendfile = (0);\n if (! (*q->psendfn) (q, qdaemon))\n fret = (0);\n break;\n }\n if (cmax_time > 0\n && q->qnext != q\n && ixsysdep_time (((void *)0)) - istart >= cmax_time)\n {\n do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, (\"floop: Switch file\")); } while (0);\n utdequeue (q);\n utqueue (&qTsend, q, (0));\n }\n }\n if (! fret)\n break;\n if (! fcharged)\n {\n inextsecs = ixsysdep_process_time (&inextmicros);\n do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, (\"floop: Charging %ld to %c %s %s\"), (((inextsecs - isecs) * 1000000 + inextmicros - imicros)), (q->s.bcmd), (q->s.zfrom), (q->s.zto)); } while (0);\n q->isecs += inextsecs - isecs;\n q->imicros += inextmicros - imicros;\n }\n if (inextsecs - iTchecktime >= (600))\n {\n if (! fcheck_queue (qdaemon))\n {\n fret = (0);\n break;\n }\n }\n }\n }\n }\n ulog_user ((const char *) ((void *)0));\n (void) (*qdaemon->qproto->pfshutdown) (qdaemon);\n if (fret)\n uwindow_acked (qdaemon, (1));\n else\n ufailed (qdaemon);\n return fret;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 20, "memory_management": 0, "memory_operation": 0, "if_statement": 38, "for_loop": 0, "while_loop": 10, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 13}}, {"id": "json.h#allow_hexadecimal_numbers_prep#json_value_is_false.c", "codebase": "json.h", "c_file": "allow_hexadecimal_numbers.c", "function": "json_value_is_false", "sloc": "3", "c_code": "int json_value_is_false(const struct json_value_s *const value) {\n return value->type == json_type_false;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#TRIANGULAR_MATCHSTICK_NUMBER_prep#main.c", "codebase": "transcoder-set", "c_file": "TRIANGULAR_MATCHSTICK_NUMBER.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {6,25,15,30,17,80,27,13,12,67};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_nvi_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_nvi_start", "sloc": "4", "c_code": "int ti_nvi_start(double const *options) {\n (void)options;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_log10_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_log10_start", "sloc": "1", "c_code": "int ti_log10_start(double const *options) { (void)options; return 0; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#output_prep#postoa.c", "codebase": "less-633", "c_file": "output.c", "function": "postoa", "sloc": "1", "c_code": "void postoa(POSITION num, char *buf, int radix) { int neg = (num < 0); char tbuf[((sizeof(num) * 8 - 1) * 302 / 1000 + 1 + 1)+2]; char *s = tbuf + sizeof(tbuf); if (neg) num = -num; *--s = '\\0'; do { *--s = \"0123456789ABCDEF\"[num % radix]; } while ((num /= radix) != 0); if (neg) *--s = '-'; strcpy(buf, s); }\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_tcb_prep#__pth_tcb_free.c", "codebase": "pth-2.0.7", "c_file": "pth_tcb.c", "function": "__pth_tcb_free", "sloc": "13", "c_code": "void __pth_tcb_free(pth_t t)\n{\n if (t == ((void *)0))\n return;\n if (t->stack != ((void *)0) && !t->stackloan)\n free(t->stack);\n if (t->data_value != ((void *)0))\n free(t->data_value);\n if (t->cleanups != ((void *)0))\n __pth_cleanup_popall(t, (0));\n free(t);\n return;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 3, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tmux#format_prep#format_entry_tree_RB_REMOVE_COLOR.c", "codebase": "tmux", "c_file": "format.c", "function": "format_entry_tree_RB_REMOVE_COLOR", "sloc": "1", "c_code": "void format_entry_tree_RB_REMOVE_COLOR(struct format_entry_tree *head, struct format_entry *parent, struct format_entry *elm) { struct format_entry *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 { (tmp)->entry.rbe_color = 0; (parent)->entry.rbe_color = 1; } while (0); do { (tmp) = (parent)->entry.rbe_right; if (((parent)->entry.rbe_right = (tmp)->entry.rbe_left)) { ((tmp)->entry.rbe_left)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_left = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_right; } if (((tmp)->entry.rbe_left == ((void *)0) || ((tmp)->entry.rbe_left)->entry.rbe_color == 0) && ((tmp)->entry.rbe_right == ((void *)0) || ((tmp)->entry.rbe_right)->entry.rbe_color == 0)) { (tmp)->entry.rbe_color = 1; elm = parent; parent = (elm)->entry.rbe_parent; } else { if ((tmp)->entry.rbe_right == ((void *)0) || ((tmp)->entry.rbe_right)->entry.rbe_color == 0) { struct format_entry *oleft; if ((oleft = (tmp)->entry.rbe_left)) (oleft)->entry.rbe_color = 0; (tmp)->entry.rbe_color = 1; do { (oleft) = (tmp)->entry.rbe_left; if (((tmp)->entry.rbe_left = (oleft)->entry.rbe_right)) { ((oleft)->entry.rbe_right)->entry.rbe_parent = (tmp); } do {} while (0); if (((oleft)->entry.rbe_parent = (tmp)->entry.rbe_parent)) { if ((tmp) == ((tmp)->entry.rbe_parent)->entry.rbe_left) ((tmp)->entry.rbe_parent)->entry.rbe_left = (oleft); else ((tmp)->entry.rbe_parent)->entry.rbe_right = (oleft); } else (head)->rbh_root = (oleft); (oleft)->entry.rbe_right = (tmp); (tmp)->entry.rbe_parent = (oleft); do {} while (0); if (((oleft)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_right; } (tmp)->entry.rbe_color = (parent)->entry.rbe_color; (parent)->entry.rbe_color = 0; if ((tmp)->entry.rbe_right) ((tmp)->entry.rbe_right)->entry.rbe_color = 0; do { (tmp) = (parent)->entry.rbe_right; if (((parent)->entry.rbe_right = (tmp)->entry.rbe_left)) { ((tmp)->entry.rbe_left)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_left = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); elm = (head)->rbh_root; break; } } else { tmp = (parent)->entry.rbe_left; if ((tmp)->entry.rbe_color == 1) { do { (tmp)->entry.rbe_color = 0; (parent)->entry.rbe_color = 1; } while (0); do { (tmp) = (parent)->entry.rbe_left; if (((parent)->entry.rbe_left = (tmp)->entry.rbe_right)) { ((tmp)->entry.rbe_right)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_right = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_left; } if (((tmp)->entry.rbe_left == ((void *)0) || ((tmp)->entry.rbe_left)->entry.rbe_color == 0) && ((tmp)->entry.rbe_right == ((void *)0) || ((tmp)->entry.rbe_right)->entry.rbe_color == 0)) { (tmp)->entry.rbe_color = 1; elm = parent; parent = (elm)->entry.rbe_parent; } else { if ((tmp)->entry.rbe_left == ((void *)0) || ((tmp)->entry.rbe_left)->entry.rbe_color == 0) { struct format_entry *oright; if ((oright = (tmp)->entry.rbe_right)) (oright)->entry.rbe_color = 0; (tmp)->entry.rbe_color = 1; do { (oright) = (tmp)->entry.rbe_right; if (((tmp)->entry.rbe_right = (oright)->entry.rbe_left)) { ((oright)->entry.rbe_left)->entry.rbe_parent = (tmp); } do {} while (0); if (((oright)->entry.rbe_parent = (tmp)->entry.rbe_parent)) { if ((tmp) == ((tmp)->entry.rbe_parent)->entry.rbe_left) ((tmp)->entry.rbe_parent)->entry.rbe_left = (oright); else ((tmp)->entry.rbe_parent)->entry.rbe_right = (oright); } else (head)->rbh_root = (oright); (oright)->entry.rbe_left = (tmp); (tmp)->entry.rbe_parent = (oright); do {} while (0); if (((oright)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_left; } (tmp)->entry.rbe_color = (parent)->entry.rbe_color; (parent)->entry.rbe_color = 0; if ((tmp)->entry.rbe_left) ((tmp)->entry.rbe_left)->entry.rbe_color = 0; do { (tmp) = (parent)->entry.rbe_left; if (((parent)->entry.rbe_left = (tmp)->entry.rbe_right)) { ((tmp)->entry.rbe_right)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_right = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); elm = (head)->rbh_root; break; } } } if (elm) (elm)->entry.rbe_color = 0; }\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "less-633#line_prep#pflushmbc.c", "codebase": "less-633", "c_file": "line.c", "function": "pflushmbc", "sloc": "10", "c_code": "int pflushmbc(void)\n{\n int r = 0;\n if (mbc_buf_len > 0)\n {\n r = flush_mbc_buf(mbc_pos);\n mbc_buf_len = 0;\n }\n return r;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_simplified_json_prep#json_parse_object.c", "codebase": "json.h", "c_file": "allow_simplified_json.c", "function": "json_parse_object", "sloc": "89", "c_code": "void json_parse_object(struct json_parse_state_s *state, int is_global_object,\n struct json_object_s *object) {\n const size_t flags_bitset = state->flags_bitset;\n const size_t size = state->size;\n const char *const src = state->src;\n size_t elements = 0;\n int allow_comma = 0;\n struct json_object_element_s *previous = 0;\n if (is_global_object) {\n if ('{' == src[state->offset]) {\n is_global_object = 0;\n }\n }\n if (!is_global_object) {\n state->offset++;\n }\n (void)json_skip_all_skippables(state);\n elements = 0;\n while (state->offset < size) {\n struct json_object_element_s *element = 0;\n struct json_string_s *string = 0;\n struct json_value_s *value = 0;\n if (!is_global_object) {\n (void)json_skip_all_skippables(state);\n if ('}' == src[state->offset]) {\n state->offset++;\n break;\n }\n } else {\n if (json_skip_all_skippables(state)) {\n break;\n }\n }\n if (allow_comma) {\n if (',' == src[state->offset]) {\n state->offset++;\n allow_comma = 0;\n continue;\n }\n }\n element = (struct json_object_element_s *)state->dom;\n state->dom += sizeof(struct json_object_element_s);\n if (0 == previous) {\n object->start = element;\n } else {\n previous->next = element;\n }\n previous = element;\n if (json_parse_flags_allow_location_information & flags_bitset) {\n struct json_string_ex_s *string_ex =\n (struct json_string_ex_s *)state->dom;\n state->dom += sizeof(struct json_string_ex_s);\n string_ex->offset = state->offset;\n string_ex->line_no = state->line_no;\n string_ex->row_no = state->offset - state->line_offset;\n string = &(string_ex->string);\n } else {\n string = (struct json_string_s *)state->dom;\n state->dom += sizeof(struct json_string_s);\n }\n element->name = string;\n (void)json_parse_key(state, string);\n (void)json_skip_all_skippables(state);\n state->offset++;\n (void)json_skip_all_skippables(state);\n if (json_parse_flags_allow_location_information & flags_bitset) {\n struct json_value_ex_s *value_ex = (struct json_value_ex_s *)state->dom;\n state->dom += sizeof(struct json_value_ex_s);\n value_ex->offset = state->offset;\n value_ex->line_no = state->line_no;\n value_ex->row_no = state->offset - state->line_offset;\n value = &(value_ex->value);\n } else {\n value = (struct json_value_s *)state->dom;\n state->dom += sizeof(struct json_value_s);\n }\n element->value = value;\n json_parse_value(state, 0, value);\n elements++;\n allow_comma = 1;\n }\n if (previous) {\n previous->next = 0;\n }\n if (0 == elements) {\n object->start = 0;\n }\n object->length = elements;\n}\n", "c_constructs": {"pointer_type": 6, "array_type": 0, "struct_type": 8, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 15, "memory_management": 0, "memory_operation": 0, "if_statement": 13, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 3}}, {"id": "libxml2#xmlwriter_prep#xmlTextWriterWriteComment.c", "codebase": "libxml2", "c_file": "xmlwriter.c", "function": "xmlTextWriterWriteComment", "sloc": "20", "c_code": "int\nxmlTextWriterWriteComment(xmlTextWriterPtr writer, const xmlChar * content)\n{\n int count;\n int sum;\n sum = 0;\n count = xmlTextWriterStartComment(writer);\n if (count < 0)\n return -1;\n sum += count;\n count = xmlTextWriterWriteString(writer, content);\n if (count < 0)\n return -1;\n sum += count;\n count = xmlTextWriterEndComment(writer);\n if (count < 0)\n return -1;\n sum += count;\n return sum;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "tmux#screen_prep#screen_pop_title.c", "codebase": "tmux", "c_file": "screen.c", "function": "screen_pop_title", "sloc": "14", "c_code": "void\nscreen_pop_title(struct screen *s)\n{\n struct screen_title_entry *title_entry;\n if (s->titles == ((void *)0))\n return;\n title_entry = ((s->titles)->tqh_first);\n if (title_entry != ((void *)0)) {\n screen_set_title(s, title_entry->text);\n do { if (((title_entry)->entry.tqe_next) != ((void *)0)) (title_entry)->entry.tqe_next->entry.tqe_prev = (title_entry)->entry.tqe_prev; else (s->titles)->tqh_last = (title_entry)->entry.tqe_prev; *(title_entry)->entry.tqe_prev = (title_entry)->entry.tqe_next; ; ; } while (0);\n free(title_entry->text);\n free(title_entry);\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 2, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "lodepng#lodepng_prep#lodepng_clear_icc.c", "codebase": "lodepng", "c_file": "lodepng.c", "function": "lodepng_clear_icc", "sloc": "7", "c_code": "void lodepng_clear_icc(LodePNGInfo* info) {\n string_cleanup(&info->iccp_name);\n lodepng_free(info->iccp_profile);\n info->iccp_profile = ((void *)0);\n info->iccp_profile_size = 0;\n info->iccp_defined = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#testutils_prep#print_hex.c", "codebase": "nettle-3.9.1", "c_file": "testutils.c", "function": "print_hex", "sloc": "21", "c_code": "void\nprint_hex(size_t length, const uint8_t *data)\n{\n size_t i;\n for (i = 0; i < length; i++)\n {\n switch (i % 16)\n {\n default:\n break;\n case 0:\n printf(\"\\n\");\n break;\n case 8:\n printf(\" \");\n break;\n }\n printf(\"%02x\", data[i]);\n }\n printf(\"\\n\");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 3}}, {"id": "dap-3.10#machdep_prep#dap_getint.c", "codebase": "dap-3.10", "c_file": "machdep.c", "function": "dap_getint", "sloc": "24", "c_code": "int dap_getint(char code[])\n{\nint i, j;\nint ndig;\nint sign;\nif (!strncmp(code, \"0\", 1))\n return 0;\nsign = (code[0] < '0');\nif (sign)\n ndig = '0' - code[0];\nelse\n ndig = code[0] - '0';\nif (sign)\n {\n for (j = 1, i = 0; j <= ndig; j++)\n i = ((i << 6) | (0x40 + '!' - code[j]));\n }\nelse\n {\n for (j = 1, i = 0; j <= ndig; j++)\n i = ((i << 6) | (code[j] - '!'));\n }\nreturn (sign ? -i : i);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlXPathRegisteredNsCleanup.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlXPathRegisteredNsCleanup", "sloc": "11", "c_code": "PyObject *\nlibxml_xmlXPathRegisteredNsCleanup(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlXPathContextPtr ctxt;\n PyObject *pyobj_ctxt;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlXPathRegisteredNsCleanup\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlXPathContextPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlXPathContext_Object *)(pyobj_ctxt))->obj));\n xmlXPathRegisteredNsCleanup(ctxt);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngread_prep#png_read_rows.c", "codebase": "optipng-0.7.8", "c_file": "pngread.c", "function": "png_read_rows", "sloc": "34", "c_code": "void\npng_read_rows(png_structrp png_ptr, png_bytepp row,\n png_bytepp display_row, png_uint_32 num_rows)\n{\n png_uint_32 i;\n png_bytepp rp;\n png_bytepp dp;\n ((void)0);\n if (png_ptr == ((void *)0))\n return;\n rp = row;\n dp = display_row;\n if (rp != ((void *)0) && dp != ((void *)0))\n for (i = 0; i < num_rows; i++)\n {\n png_bytep rptr = *rp++;\n png_bytep dptr = *dp++;\n png_read_row(png_ptr, rptr, dptr);\n }\n else if (rp != ((void *)0))\n for (i = 0; i < num_rows; i++)\n {\n png_bytep rptr = *rp;\n png_read_row(png_ptr, rptr, ((void *)0));\n rp++;\n }\n else if (dp != ((void *)0))\n for (i = 0; i < num_rows; i++)\n {\n png_bytep dptr = *dp;\n png_read_row(png_ptr, ((void *)0), dptr);\n dp++;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#modelu_prep#SetInput.c", "codebase": "mcsim-6.2.0", "c_file": "modelu.c", "function": "SetInput", "sloc": "7", "c_code": "BOOL SetInput (HVAR hvar, PIFN pifn)\n{\n if (!pifn || !IsInput(hvar))\n return (0);\n memcpy (&vrgInputs[((int) ((hvar) & 0x0FFFF))], pifn, sizeof(IFN));\n return (1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#buf_prep#xmlBufferFree.c", "codebase": "libxml2", "c_file": "buf.c", "function": "xmlBufferFree", "sloc": "10", "c_code": "void\nxmlBufferFree(xmlBufferPtr buf) {\n if (buf == ((void *)0))\n return;\n if (buf->alloc == XML_BUFFER_ALLOC_IO)\n xmlFree(buf->contentIO);\n else\n xmlFree(buf->content);\n xmlFree(buf);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#rcstime_prep#str2date.c", "codebase": "rcs-5.10.1", "c_file": "rcstime.c", "function": "str2date", "sloc": "11", "c_code": "void\nstr2date (char const *source, char target[(6 + 16)])\n{\n time2date (str2time_checked (source, (top->behavior. now.tv_sec),\n (top->behavior. zone_offset.valid)\n ? (top->behavior. zone_offset.seconds)\n : ((top->behavior. version) < ((5) - 5)\n ? (((long) -24 * 60 * 60) - 1)\n : 0)),\n target);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#REMAINDER_7_LARGE_NUMBERS_prep#max.c", "codebase": "transcoder-set", "c_file": "REMAINDER_7_LARGE_NUMBERS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#bytfre_prep#csysdep_bytes_free.c", "codebase": "uucp-1.07", "c_file": "bytfre.c", "function": "csysdep_bytes_free", "sloc": "11", "c_code": "long\ncsysdep_bytes_free (zfile)\n const char *zfile;\n{\n struct fs_usage s;\n if (get_fs_usage ((char *) zfile, (char *) ((void *)0), &s) < 0)\n return -1;\n if (s.fsu_bavail >= 0x7fffffffffffffffL / (long) 512)\n return 0x7fffffffffffffffL;\n return s.fsu_bavail * (long) 512;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_SET_BITS_IN_AN_INTEGER_3_prep#min.c", "codebase": "transcoder-set", "c_file": "COUNT_SET_BITS_IN_AN_INTEGER_3.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "ed-1.19#io_prep#get_stdin_line.c", "codebase": "ed-1.19", "c_file": "io.c", "function": "get_stdin_line", "sloc": "34", "c_code": "const char * get_stdin_line( int * const sizep )\n {\n static char * buf = 0;\n static int bufsz = 0;\n int i = 0;\n while( true )\n {\n const int c = getchar();\n if( !resize_buffer( &buf, &bufsz, i + 2 ) ) { *sizep = 0; return 0; }\n if( c == (-1) )\n {\n if( ferror( stdin ) )\n {\n show_strerror( \"stdin\", (*__errno_location ()) );\n set_error_msg( \"Cannot read stdin\" );\n clearerr( stdin );\n *sizep = 0; return 0;\n }\n if( feof( stdin ) )\n {\n set_error_msg( \"Unexpected end-of-file\" );\n clearerr( stdin );\n buf[0] = 0; *sizep = 0; if( i > 0 ) ++linenum_;\n return buf;\n }\n }\n else\n {\n buf[i++] = c; if( c == 0 ) set_binary(); if( c != '\\n' ) continue;\n ++linenum_; buf[i] = 0; *sizep = i;\n return buf;\n }\n }\n }\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 1}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlParseDTD.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlParseDTD", "sloc": "12", "c_code": "PyObject *\nlibxml_xmlParseDTD(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlDtdPtr c_retval;\n xmlChar * ExternalID;\n xmlChar * SystemID;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"zz:xmlParseDTD\", &ExternalID, &SystemID))\n return(((void *)0));\n c_retval = xmlParseDTD(ExternalID, SystemID);\n py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY_prep#len.c", "codebase": "transcoder-set", "c_file": "COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#warc_prep#warc_tempfile.c", "codebase": "wget-1.21.4", "c_file": "warc.c", "function": "warc_tempfile", "sloc": "17", "c_code": "FILE *\nwarc_tempfile (void)\n{\n char filename[100];\n int fd;\n if (path_search (filename, 100, opt.warc_tempdir, \"wget\", 1) == -1)\n return ((void *)0);\n fd = mkostemp (filename, 0);\n if (fd < 0)\n return ((void *)0);\n if (unlink (filename) < 0)\n {\n close(fd);\n return ((void *)0);\n }\n return fdopen (fd, \"wb+\");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "tar-1.34#xattr-at_prep#setxattrat.c", "codebase": "tar-1.34", "c_file": "xattr-at.c", "function": "setxattrat", "sloc": "53", "c_code": "int\nsetxattrat (int fd, char const *file , const char *name, const void *value , size_t size, int flags)\n{\n ;\n if (fd == -100 || (((file)[0]) == '/'))\n return (setxattr (file , name, value, size, flags));\n {\n struct saved_cwd saved_cwd;\n int saved_errno;\n int err;\n {\n char proc_buf[((4096) < (4096 - 64) ? (4096) : (4096 - 64))];\n char *proc_file = openat_proc_name (proc_buf, fd, file);\n if (proc_file)\n {\n int proc_result = (setxattr (proc_file , name, value, size, flags));\n int proc_errno = (*__errno_location ());\n if (proc_file != proc_buf)\n free (proc_file);\n if (-1 != proc_result)\n return proc_result;\n if (! ((proc_errno) == 20 || (proc_errno) == 2 || (proc_errno) == 1 || (proc_errno) == 13 || (proc_errno) == 38 || (proc_errno) == 95 ))\n {\n (*__errno_location ()) = proc_errno;\n return proc_result;\n }\n }\n }\n if (save_cwd (&saved_cwd) != 0)\n openat_save_fail ((*__errno_location ()));\n if (0 <= fd && fd == saved_cwd.desc)\n {\n free_cwd (&saved_cwd);\n (*__errno_location ()) = 9;\n return -1;\n }\n if (fchdir (fd) != 0)\n {\n saved_errno = (*__errno_location ());\n free_cwd (&saved_cwd);\n (*__errno_location ()) = saved_errno;\n return -1;\n }\n err = (setxattr (file , name, value, size, flags));\n saved_errno = (err == -1 ? (*__errno_location ()) : 0);\n if (restore_cwd (&saved_cwd) != 0)\n openat_restore_fail ((*__errno_location ()));\n free_cwd (&saved_cwd);\n if (saved_errno)\n (*__errno_location ()) = saved_errno;\n return err;\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 10, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 0}}, {"id": "tmux#session_prep#sessions_RB_MINMAX.c", "codebase": "tmux", "c_file": "session.c", "function": "sessions_RB_MINMAX", "sloc": "1", "c_code": "struct session * sessions_RB_MINMAX(struct sessions *head, int val) { struct session *tmp = (head)->rbh_root; struct session *parent = ((void *)0); while (tmp) { parent = tmp; if (val < 0) tmp = (tmp)->entry.rbe_left; else tmp = (tmp)->entry.rbe_right; } return (parent); };\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "make-4.4.1#main_prep#reset_makeflags.c", "codebase": "make-4.4.1", "c_file": "main.c", "function": "reset_makeflags", "sloc": "7", "c_code": "void\nreset_makeflags (enum variable_origin origin)\n{\n decode_env_switches ((\"MAKEFLAGS\"), (sizeof (\"MAKEFLAGS\")-1), origin);\n construct_include_path (include_dirs ? include_dirs->list : ((void *)0));\n define_makeflags (rebuilding_makefiles);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 1, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#input_prep#sexp_get_char.c", "codebase": "nettle-3.9.1", "c_file": "input.c", "function": "sexp_get_char", "sloc": "26", "c_code": "void\nsexp_get_char(struct sexp_input *input)\n{\n if (input->coding)\n for (;;)\n {\n size_t done;\n sexp_get_raw_char(input);\n if (input->ctype == SEXP_EOF_CHAR)\n die(\"Unexpected end of file in coded data.\\n\");\n if (input->c == input->terminator)\n {\n input->ctype = SEXP_END_CHAR;\n return;\n }\n done = 1;\n if (!input->coding->decode_update(&input->state,\n &done, &input->c,\n 1, (const char*) &input->c))\n die(\"Invalid coded data.\\n\");\n if (done)\n return;\n }\n else\n sexp_get_raw_char(input);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#benchmark_prep#run_ti.c", "codebase": "tulipindicators-0.9.1", "c_file": "benchmark.c", "function": "run_ti", "sloc": "23", "c_code": "int run_ti(const ti_indicator_info *info, double *options, int goal) {\n static double *inputs[] = {0, 0, 0, 0, 0};\n static double *outputs[] = {out[0], out[1], out[2], out[3], out[4]};\n if (goal == 0) {\n ind_offset = info->start(options);\n const int ret = info->indicator(4000, (double const *const *)inputs, options, outputs);\n if (ret != 0) {\n printf(\" *ERROR* (%d)\\n\", ret);\n printf(\"options:\\n\");\n int i;\n for (i = 0; i < info->options; ++i) {\n printf(\"%d = %f\\n\", i, options[i]);\n }\n return 1;\n }\n } else if (goal == 1) {\n ti_setup(info, inputs);\n } else if (goal == 2) {\n } else {\n ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail (\"0\", \"benchmark.c\", 400, __extension__ __PRETTY_FUNCTION__); }));\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_COST_FOR_ACQUIRING_ALL_COINS_WITH_K_EXTRA_COINS_ALLOWED_WITH_EVERY_COIN_prep#len.c", "codebase": "transcoder-set", "c_file": "MINIMUM_COST_FOR_ACQUIRING_ALL_COINS_WITH_K_EXTRA_COINS_ALLOWED_WITH_EVERY_COIN.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "dap-3.10#sbstrans_prep#sbsgetc.c", "codebase": "dap-3.10", "c_file": "sbstrans.c", "function": "sbsgetc", "sloc": "8", "c_code": "int sbsgetc(FILE *sbsfile)\n{\n int c;\n c = dgetc(sbsfile, ((void *)0), 0);\n if (c == '\\n')\n sbslineno++;\n return c;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COMPUTE_NCR_P_SET_1_INTRODUCTION_AND_DYNAMIC_PROGRAMMING_SOLUTION_prep#len.c", "codebase": "transcoder-set", "c_file": "COMPUTE_NCR_P_SET_1_INTRODUCTION_AND_DYNAMIC_PROGRAMMING_SOLUTION.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#arguments_prep#args_free.c", "codebase": "tmux", "c_file": "arguments.c", "function": "args_free", "sloc": "13", "c_code": "void\nargs_free(struct args *args)\n{\n struct args_entry *entry;\n struct args_entry *entry1;\n cmd_free_argv(args->argc, args->argv);\n for ((entry) = args_tree_RB_MINMAX(&args->tree, -1); ((entry) != ((void *)0)) && ((entry1) = args_tree_RB_NEXT(entry), 1); (entry) = (entry1)) {\n args_tree_RB_REMOVE(&args->tree, entry);\n free(entry->value);\n free(entry);\n }\n free(args);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 3, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#gcm-aes_prep#nettle_gcm_aes_decrypt.c", "codebase": "nettle-3.9.1", "c_file": "gcm-aes.c", "function": "nettle_gcm_aes_decrypt", "sloc": "6", "c_code": "void\nnettle_gcm_aes_decrypt(struct gcm_aes_ctx *ctx,\n size_t length, uint8_t *dst, const uint8_t *src)\n{\n (0 ? (nettle_aes_encrypt)(&(ctx)->cipher, ~(size_t) 0, (uint8_t *) 0, (const uint8_t *) 0) : nettle_gcm_decrypt(&(ctx)->gcm, &(ctx)->key, &(ctx)->cipher, (nettle_cipher_func *) (nettle_aes_encrypt), (length), (dst), (src)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_CHECK_INPUT_INTEGER_STRING_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "PROGRAM_CHECK_INPUT_INTEGER_STRING.c", "function": "f_gold", "sloc": "6", "c_code": "_Bool f_gold ( char s [] ) {\n for ( int i = 0;\n i < strlen(s);\n i ++ ) if ( isdigit ( s [ i ] ) == 0 ) return 0;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "screen-4.9.0#layer_prep#KillLayerChain.c", "codebase": "screen-4.9.0", "c_file": "layer.c", "function": "KillLayerChain", "sloc": "23", "c_code": "void KillLayerChain(struct layer *lay)\n{\n struct canvas *cv, *ncv;\n struct layer *l, *oldflayer;\n oldflayer = flayer;\n do {} while (0);\n for (l = lay; l; l = l->l_next) {\n if (l->l_layfn == &WinLf || l->l_layfn == &BlankLf)\n break;\n do {} while (0);\n if (oldflayer == l)\n oldflayer = 0;\n for (cv = l->l_cvlist; cv; cv = ncv) {\n ncv = cv->c_lnext;\n cv->c_layer = 0;\n cv->c_lnext = 0;\n }\n }\n flayer = lay;\n while (flayer != l)\n ExitOverlayPage();\n flayer = oldflayer;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 2, "while_loop": 3, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "gprolog-1.5.0#dynam_supp_prep#Pl_Delete_Dynamic_Clause.c", "codebase": "gprolog-1.5.0", "c_file": "dynam_supp.c", "function": "Pl_Delete_Dynamic_Clause", "sloc": "18", "c_code": "void\nPl_Delete_Dynamic_Clause(DynCInf *clause)\n{\n DynPInf *dyn;\n Bool first;\n dyn = clause->dyn;\n first = (dyn->first_erased_cl == ((void *)0));\n clause->erase_stamp = erase_stamp;\n clause->next_erased_cl = dyn->first_erased_cl;\n dyn->first_erased_cl = clause;\n if (first)\n {\n dyn->next_dyn_with_erase = first_dyn_with_erase;\n first_dyn_with_erase = dyn;\n }\n size_of_erased += clause->term_size;\n Clean_Erased_Clauses();\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY_prep#len.c", "codebase": "transcoder-set", "c_file": "FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SQUARE_ROOT_OF_AN_INTEGER_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SQUARE_ROOT_OF_AN_INTEGER_1.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int x ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "heman#draw_prep#heman_draw_colored_circles.c", "codebase": "heman", "c_file": "draw.c", "function": "heman_draw_colored_circles", "sloc": "32", "c_code": "void heman_draw_colored_circles(heman_image* target, heman_points* pts,\n int radius, const heman_color* colors)\n{\n int fwidth = radius * 2 + 1;\n int radius2 = radius * radius;\n float* src = pts->data;\n float inv = 1.0f / 255.0f;\n int w = target->width;\n int h = target->height;\n for (int k = 0; k < pts->width; k++) {\n float x = src[0];\n float y = src[1];\n src += pts->nbands;\n int ii = x * w - radius;\n int jj = y * h - radius;\n for (int kj = 0; kj < fwidth; kj++) {\n for (int ki = 0; ki < fwidth; ki++) {\n int i = ii + ki;\n int j = jj + kj;\n int r2 = ((i - x * w) * (i - x * w)) + ((j - y * h) * (j - y * h));\n if (r2 > radius2) {\n continue;\n }\n float* texel = heman_image_texel(target, i, j);\n heman_color rgb = colors[k];\n *texel++ = (float)(rgb >> 16) * inv;\n *texel++ = (float)((rgb >> 8) & 0xff) * inv;\n *texel = (float)(rgb & 0xff) * inv;\n }\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "nano-7.2#utils_prep#mallocstrcpy.c", "codebase": "nano-7.2", "c_file": "utils.c", "function": "mallocstrcpy", "sloc": "7", "c_code": "char *mallocstrcpy(char *dest, const char *src)\n{\n size_t count = strlen(src) + 1;\n dest = nrealloc(dest, count);\n strncpy(dest, src, count);\n return dest;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlKeepBlanksDefault.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlKeepBlanksDefault", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlKeepBlanksDefault(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int val;\n if (libxml_deprecationWarning(\"xmlKeepBlanksDefault\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlKeepBlanksDefault\", &val))\n return(((void *)0));\n c_retval = xmlKeepBlanksDefault(val);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#pred_prep#pred_links.c", "codebase": "findutils-4.9.0", "c_file": "pred.c", "function": "pred_links", "sloc": "21", "c_code": "_Bool\npred_links (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)\n{\n (void) pathname;\n switch (pred_ptr->args.numinfo.kind)\n {\n case COMP_GT:\n if (stat_buf->st_nlink > pred_ptr->args.numinfo.l_val)\n return (1);\n break;\n case COMP_LT:\n if (stat_buf->st_nlink < pred_ptr->args.numinfo.l_val)\n return (1);\n break;\n case COMP_EQ:\n if (stat_buf->st_nlink == pred_ptr->args.numinfo.l_val)\n return (1);\n break;\n }\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 3}}, {"id": "libxml2#xmlschemastypes_prep#xmlSchemaNewStringValue.c", "codebase": "libxml2", "c_file": "xmlschemastypes.c", "function": "xmlSchemaNewStringValue", "sloc": "16", "c_code": "xmlSchemaValPtr\nxmlSchemaNewStringValue(xmlSchemaValType type,\n const xmlChar *value)\n{\n xmlSchemaValPtr val;\n if (type != XML_SCHEMAS_STRING)\n return(((void *)0));\n val = (xmlSchemaValPtr) xmlMalloc(sizeof(xmlSchemaVal));\n if (val == ((void *)0)) {\n return(((void *)0));\n }\n memset(val, 0, sizeof(xmlSchemaVal));\n val->type = type;\n val->value.str = (xmlChar *) value;\n return(val);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 1, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "brotli-1.0.9#metablock_prep#BrotliBuildMetaBlock.c", "codebase": "brotli-1.0.9", "c_file": "metablock.c", "function": "BrotliBuildMetaBlock", "sloc": "141", "c_code": "void BrotliBuildMetaBlock(MemoryManager* m,\n const uint8_t* ringbuffer,\n const size_t pos,\n const size_t mask,\n BrotliEncoderParams* params,\n uint8_t prev_byte,\n uint8_t prev_byte2,\n Command* cmds,\n size_t num_commands,\n ContextType literal_context_mode,\n MetaBlockSplit* mb) {\n static const size_t kMaxNumberOfHistograms = 256;\n HistogramDistance* distance_histograms;\n HistogramLiteral* literal_histograms;\n ContextType* literal_context_modes = ((void *)0);\n size_t literal_histograms_size;\n size_t distance_histograms_size;\n size_t i;\n size_t literal_context_multiplier = 1;\n uint32_t npostfix;\n uint32_t ndirect_msb = 0;\n int check_orig = 1;\n double best_dist_cost = 1e99;\n BrotliEncoderParams orig_params = *params;\n BrotliEncoderParams new_params = *params;\n for (npostfix = 0; npostfix <= 3; npostfix++) {\n for (; ndirect_msb < 16; ndirect_msb++) {\n uint32_t ndirect = ndirect_msb << npostfix;\n int skip;\n double dist_cost;\n BrotliInitDistanceParams(&new_params, npostfix, ndirect);\n if (npostfix == orig_params.dist.distance_postfix_bits &&\n ndirect == orig_params.dist.num_direct_distance_codes) {\n check_orig = 0;\n }\n skip = !ComputeDistanceCost(\n cmds, num_commands,\n &orig_params.dist, &new_params.dist, &dist_cost);\n if (skip || (dist_cost > best_dist_cost)) {\n break;\n }\n best_dist_cost = dist_cost;\n params->dist = new_params.dist;\n }\n if (ndirect_msb > 0) ndirect_msb--;\n ndirect_msb /= 2;\n }\n if (check_orig) {\n double dist_cost;\n ComputeDistanceCost(cmds, num_commands,\n &orig_params.dist, &orig_params.dist, &dist_cost);\n if (dist_cost < best_dist_cost) {\n params->dist = orig_params.dist;\n }\n }\n RecomputeDistancePrefixes(cmds, num_commands,\n &orig_params.dist, ¶ms->dist);\n BrotliSplitBlock(m, cmds, num_commands,\n ringbuffer, pos, mask, params,\n &mb->literal_split,\n &mb->command_split,\n &mb->distance_split);\n if ((!!0)) return;\n if (!params->disable_literal_context_modeling) {\n literal_context_multiplier = 1 << 6;\n literal_context_modes =\n ((mb->literal_split.num_types) > 0 ? ((ContextType*)BrotliAllocate((m), (mb->literal_split.num_types) * sizeof(ContextType))) : ((void *)0));\n if ((!!0) || (!!0)) return;\n for (i = 0; i < mb->literal_split.num_types; ++i) {\n literal_context_modes[i] = literal_context_mode;\n }\n }\n literal_histograms_size =\n mb->literal_split.num_types * literal_context_multiplier;\n literal_histograms =\n ((literal_histograms_size) > 0 ? ((HistogramLiteral*)BrotliAllocate((m), (literal_histograms_size) * sizeof(HistogramLiteral))) : ((void *)0));\n if ((!!0) || (!!0)) return;\n ClearHistogramsLiteral(literal_histograms, literal_histograms_size);\n distance_histograms_size =\n mb->distance_split.num_types << 2;\n distance_histograms =\n ((distance_histograms_size) > 0 ? ((HistogramDistance*)BrotliAllocate((m), (distance_histograms_size) * sizeof(HistogramDistance))) : ((void *)0));\n if ((!!0) || (!!0)) return;\n ClearHistogramsDistance(distance_histograms, distance_histograms_size);\n ;\n mb->command_histograms_size = mb->command_split.num_types;\n mb->command_histograms =\n ((mb->command_histograms_size) > 0 ? ((HistogramCommand*)BrotliAllocate((m), (mb->command_histograms_size) * sizeof(HistogramCommand))) : ((void *)0));\n if ((!!0) || (!!0)) return;\n ClearHistogramsCommand(mb->command_histograms, mb->command_histograms_size);\n BrotliBuildHistogramsWithContext(cmds, num_commands,\n &mb->literal_split, &mb->command_split, &mb->distance_split,\n ringbuffer, pos, mask, prev_byte, prev_byte2, literal_context_modes,\n literal_histograms, mb->command_histograms, distance_histograms);\n { BrotliFree((m), (literal_context_modes)); literal_context_modes = ((void *)0); };\n ;\n mb->literal_context_map_size =\n mb->literal_split.num_types << 6;\n mb->literal_context_map =\n ((mb->literal_context_map_size) > 0 ? ((uint32_t*)BrotliAllocate((m), (mb->literal_context_map_size) * sizeof(uint32_t))) : ((void *)0));\n if ((!!0) || (!!0)) return;\n ;\n mb->literal_histograms_size = mb->literal_context_map_size;\n mb->literal_histograms =\n ((mb->literal_histograms_size) > 0 ? ((HistogramLiteral*)BrotliAllocate((m), (mb->literal_histograms_size) * sizeof(HistogramLiteral))) : ((void *)0));\n if ((!!0) || (!!0)) return;\n BrotliClusterHistogramsLiteral(m, literal_histograms, literal_histograms_size,\n kMaxNumberOfHistograms, mb->literal_histograms,\n &mb->literal_histograms_size, mb->literal_context_map);\n if ((!!0)) return;\n { BrotliFree((m), (literal_histograms)); literal_histograms = ((void *)0); };\n if (params->disable_literal_context_modeling) {\n for (i = mb->literal_split.num_types; i != 0;) {\n size_t j = 0;\n i--;\n for (; j < (1 << 6); j++) {\n mb->literal_context_map[(i << 6) + j] =\n mb->literal_context_map[i];\n }\n }\n }\n ;\n mb->distance_context_map_size =\n mb->distance_split.num_types << 2;\n mb->distance_context_map =\n ((mb->distance_context_map_size) > 0 ? ((uint32_t*)BrotliAllocate((m), (mb->distance_context_map_size) * sizeof(uint32_t))) : ((void *)0));\n if ((!!0) || (!!0)) return;\n ;\n mb->distance_histograms_size = mb->distance_context_map_size;\n mb->distance_histograms =\n ((mb->distance_histograms_size) > 0 ? ((HistogramDistance*)BrotliAllocate((m), (mb->distance_histograms_size) * sizeof(HistogramDistance))) : ((void *)0));\n if ((!!0) || (!!0)) return;\n BrotliClusterHistogramsDistance(m, distance_histograms,\n mb->distance_context_map_size,\n kMaxNumberOfHistograms,\n mb->distance_histograms,\n &mb->distance_histograms_size,\n mb->distance_context_map);\n if ((!!0)) return;\n { BrotliFree((m), (distance_histograms)); distance_histograms = ((void *)0); };\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 12, "memory_management": 0, "memory_operation": 0, "if_statement": 18, "for_loop": 5, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 11, "break_continue_statement": 1}}, {"id": "gprolog-1.5.0#fd_range_prep#Pl_Vector_Div_Value.c", "codebase": "gprolog-1.5.0", "c_file": "fd_range.c", "function": "Pl_Vector_Div_Value", "sloc": "19", "c_code": "void\nPl_Vector_Div_Value(Vector vec, int n)\n{\n Vector aux_vec;\n int vec_elem;\n int x;\n do { aux_vec = (Vector) (((WamWordP *) pl_reg_bank)[256 +3]); (((WamWordP *) pl_reg_bank)[256 +3]) += pl_vec_size; } while (0);\n Pl_Vector_Copy(aux_vec, vec);\n Pl_Vector_Empty(vec);\n if (n == 0)\n return;\n { Vector enum_end = aux_vec + pl_vec_size, enum_i = aux_vec; int enum_j; VecWord enum_word; vec_elem = 0; do { enum_word = *enum_i; for (enum_j = 0; enum_j++ < (8 * 8); enum_word >>= 1, vec_elem++) { if (enum_word & 1) {;\n if (vec_elem % n == 0)\n {\n x = vec_elem / n;\n (vec[((VecWord) (x) >> 6)] |= ((VecWord) 1 << ((x) & (((VecWord) 1 << 6)-1))));\n }\n } } } while (++enum_i < enum_end); };\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#valid_prep#xmlValidateNamesValue.c", "codebase": "libxml2", "c_file": "valid.c", "function": "xmlValidateNamesValue", "sloc": "4", "c_code": "int\nxmlValidateNamesValue(const xmlChar *value) {\n return(xmlValidateNamesValueInternal(((void *)0), value));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#eddsa-verify_prep#_nettle_eddsa_verify_itch.c", "codebase": "nettle-3.9.1", "c_file": "eddsa-verify.c", "function": "_nettle_eddsa_verify_itch", "sloc": "6", "c_code": "mp_size_t\n_nettle_eddsa_verify_itch (const struct ecc_curve *ecc)\n{\n ((void) sizeof ((_nettle_eddsa_decompress_itch (ecc) <= ecc->mul_itch) ? 1 : 0), __extension__ ({ if (_nettle_eddsa_decompress_itch (ecc) <= ecc->mul_itch) ; else __assert_fail (\"_eddsa_decompress_itch (ecc) <= ecc->mul_itch\", \"eddsa-verify.c\", 68, __extension__ __PRETTY_FUNCTION__); }));\n return 8*ecc->p.size + ecc->mul_itch;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW_1_prep#len.c", "codebase": "transcoder-set", "c_file": "COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsKatakana.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsKatakana", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsKatakana(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsKatakana\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsKatakana\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsKatakana(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#inflate_prep#inflateCodesUsed.c", "codebase": "optipng-0.7.8", "c_file": "inflate.c", "function": "inflateCodesUsed", "sloc": "6", "c_code": "unsigned long inflateCodesUsed(z_streamp strm) {\n struct inflate_state *state;\n if (inflateStateCheck(strm)) return (unsigned long)-1;\n state = (struct inflate_state *)strm->state;\n return (unsigned long)(state->next - state->codes);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "units-2.22#units_prep#unitcopy.c", "codebase": "units-2.22", "c_file": "units.c", "function": "unitcopy", "sloc": "7", "c_code": "void\nunitcopy(struct unittype *dest, struct unittype *source)\n{\n dest->factor = source->factor;\n copyproduct(dest->numerator, source->numerator);\n copyproduct(dest->denominator, source->denominator);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#session_prep#sessions_RB_PREV.c", "codebase": "tmux", "c_file": "session.c", "function": "sessions_RB_PREV", "sloc": "1", "c_code": "struct session * sessions_RB_PREV(struct session *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); }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#backup-find_prep#xget_version.c", "codebase": "tar-1.34", "c_file": "backup-find.c", "function": "xget_version", "sloc": "8", "c_code": "enum backup_type\nxget_version (char const *context, char const *version)\n{\n if (version && *version)\n return get_version (context, version);\n else\n return get_version (\"$VERSION_CONTROL\", getenv (\"VERSION_CONTROL\"));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlParseEndTag.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlParseEndTag", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlParseEndTag(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlParserCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n if (libxml_deprecationWarning(\"xmlParseEndTag\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlParseEndTag\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj));\n xmlParseEndTag(ctxt);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tar-1.34#opendir-safer_prep#opendir_safer.c", "codebase": "tar-1.34", "c_file": "opendir-safer.c", "function": "opendir_safer", "sloc": "31", "c_code": "DIR *\nopendir_safer (char const *name)\n{\n DIR *dp = opendir (name);\n if (dp)\n {\n int fd = dirfd (dp);\n if (0 <= fd && fd <= 2)\n {\n DIR *newdp;\n int e;\n int f = rpl_fcntl (fd, 1030, 2 + 1);\n if (f < 0)\n {\n e = (*__errno_location ());\n newdp = ((void *)0);\n }\n else\n {\n newdp = fdopendir (f);\n e = (*__errno_location ());\n if (! newdp)\n close (f);\n }\n closedir (dp);\n (*__errno_location ()) = e;\n dp = newdp;\n }\n }\n return dp;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#sim_prep#AnnounceProgram.c", "codebase": "mcsim-6.2.0", "c_file": "sim.c", "function": "AnnounceProgram", "sloc": "14", "c_code": "void AnnounceProgram (int iRank)\n{\n if (iRank == 0) {\n printf (\"\\n________________________________________\\n\");\n printf (\"\\nMCSim \" \"v6.2.0\" \"\\n\\n\");\n printf (\"Copyright (c) 1993-2020 Free Software Foundation, Inc.\" \"\\n\\n\");\n printf (\"MCSim comes with ABSOLUTELY NO WARRANTY;\\n\"\n \"This is free software, and you are welcome to redistribute it\\n\"\n \"under certain conditions; \"\n \"see the GNU General Public License.\\n\\n\");\n printf (\"* Using `%s' model in file \\\"%s\\\" created by %s\\n\\n\",\n szModelDescFilename, szModelSourceFilename, szModelGenAndVersion);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_list_blob.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_list_blob", "sloc": "5", "c_code": "void * binn_list_blob(void *list, int pos, int *psize) {\n void *value;\n binn_list_get(list, pos, 0xC0, &value, psize);\n return value;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#GIVEN_LARGE_NUMBER_CHECK_SUBSEQUENCE_DIGITS_DIVISIBLE_8_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "GIVEN_LARGE_NUMBER_CHECK_SUBSEQUENCE_DIGITS_DIVISIBLE_8_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngerror_prep#png_error.c", "codebase": "optipng-0.7.8", "c_file": "pngerror.c", "function": "png_error", "sloc": "7", "c_code": "__attribute__((__noreturn__)) void png_error (png_const_structrp png_ptr, png_const_charp error_message)\n{\n if (png_ptr != ((void *)0) && png_ptr->error_fn != ((void *)0))\n (*(png_ptr->error_fn))(((png_structrp)(void*)(const void*)(png_ptr)),\n error_message);\n png_default_error(png_ptr, error_message);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_kama.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_kama", "sloc": "33", "c_code": "int ti_kama(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *input = inputs[0];\n const int period = (int)options[0];\n double *output = outputs[0];\n if (period < 1) return 1;\n if (size <= ti_kama_start(options)) return 0;\n const double short_per = 2 / (2.0 + 1);\n const double long_per = 2 / (30.0 + 1);\n double sum = 0;\n int i;\n for (i = 1; i < period; ++i) {\n sum += fabs(input[i] - input[i-1]);\n }\n double kama = input[period-1];\n *output++ = kama;\n double er, sc;\n for (i = period; i < size; ++i) {\n sum += fabs(input[i] - input[i-1]);\n if (i > period) {\n sum -= fabs(input[i-period] - input[i-period-1]);\n }\n if (sum != 0.0) {\n er = fabs(input[i] - input[i-period]) / sum;\n } else {\n er = 1.0;\n }\n sc = pow(er * (short_per - long_per) + long_per, 2);\n kama = kama + sc * (input[i] - kama);\n *output++ = kama;\n }\n ((void) sizeof ((output - outputs[0] == size - ti_kama_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_kama_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_kama_start(options)\", \"tiamalgamation.c\", 2628, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#EFFICIENT_WAY_CHECK_WHETHER_N_TH_FIBONACCI_NUMBER_MULTIPLE_10_prep#min.c", "codebase": "transcoder-set", "c_file": "EFFICIENT_WAY_CHECK_WHETHER_N_TH_FIBONACCI_NUMBER_MULTIPLE_10.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_single_quoted_strings_prep#json_parse.c", "codebase": "json.h", "c_file": "allow_single_quoted_strings.c", "function": "json_parse", "sloc": "4", "c_code": "struct json_value_s *json_parse(const void *src, size_t src_size) {\n return json_parse_ex(src, src_size, json_parse_flags_default, 0,\n 0, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#acl-errno-valid_prep#acl_errno_valid.c", "codebase": "tar-1.34", "c_file": "acl-errno-valid.c", "function": "acl_errno_valid", "sloc": "12", "c_code": "_Bool\nacl_errno_valid (int errnum)\n{\n switch (errnum)\n {\n case 16: return 0;\n case 22: return 0;\n case 38: return 0;\n case 95: return 0;\n default: return 1;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "grep-3.11#locale_prep#main.c", "codebase": "grep-3.11", "c_file": "locale.c", "function": "main", "sloc": "20", "c_code": "int\nmain (void)\n{\n setlocale (6, \"\");\n printf (\"LANG=%s\\n\", defaulted_getenv (\"LANG\"));\n print_category (0, \"LC_CTYPE\");\n print_category (1, \"LC_NUMERIC\");\n print_category (2, \"LC_TIME\");\n print_category (3, \"LC_COLLATE\");\n print_category (4, \"LC_MONETARY\");\n print_category (5, \"LC_MESSAGES\");\n print_category (7, \"LC_PAPER\");\n print_category (8, \"LC_NAME\");\n print_category (9, \"LC_ADDRESS\");\n print_category (10, \"LC_TELEPHONE\");\n print_category (11, \"LC_MEASUREMENT\");\n print_category (12, \"LC_IDENTIFICATION\");\n printf (\"LC_ALL=%s\\n\", defaulted_getenv (\"LC_ALL\"));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#globals_prep#xmlThrDefOutputBufferCreateFilenameDefault.c", "codebase": "libxml2", "c_file": "globals.c", "function": "xmlThrDefOutputBufferCreateFilenameDefault", "sloc": "13", "c_code": "xmlOutputBufferCreateFilenameFunc\nxmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func)\n{\n xmlOutputBufferCreateFilenameFunc old;\n xmlMutexLock(&xmlThrDefMutex);\n old = xmlOutputBufferCreateFilenameValueThrDef;\n if (old == ((void *)0)) {\n old = __xmlOutputBufferCreateFilename;\n }\n xmlOutputBufferCreateFilenameValueThrDef = func;\n xmlMutexUnlock(&xmlThrDefMutex);\n return(old);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlCreateFileParserCtxt.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlCreateFileParserCtxt", "sloc": "5", "c_code": "xmlParserCtxtPtr\nxmlCreateFileParserCtxt(const char *filename)\n{\n return(xmlCreateURLParserCtxt(filename, 0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME.c", "function": "f_gold", "sloc": "10", "c_code": "_Bool f_gold ( char s [] ) {\n int l = strlen(s);\n int j;\n for ( int i = 0, j = l - 1;\n i <= j;\n i ++, j -- ) {\n if ( s [ i ] != s [ j ] ) return 0;\n }\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#node_prep#wstrstr.c", "codebase": "gawk-5.2.2", "c_file": "node.c", "function": "wstrstr", "sloc": "18", "c_code": "const wchar_t *\nwstrstr(const wchar_t *haystack, size_t hs_len,\n const wchar_t *needle, size_t needle_len)\n{\n size_t i;\n if (haystack == ((void *)0) || needle == ((void *)0) || needle_len > hs_len)\n return ((void *)0);\n for (i = 0; i < hs_len; i++) {\n if (haystack[i] == needle[0]\n && i+needle_len-1 < hs_len\n && haystack[i+needle_len-1] == needle[needle_len-1]) {\n if (memcmp(haystack+i, needle, sizeof(wchar_t) * needle_len) == 0) {\n return haystack + i;\n }\n }\n }\n return ((void *)0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pnmutil_prep#pnm_raw_sample_size.c", "codebase": "optipng-0.7.8", "c_file": "pnmutil.c", "function": "pnm_raw_sample_size", "sloc": "19", "c_code": "size_t pnm_raw_sample_size(const pnm_struct *pnm_ptr)\n{\n unsigned int maxval = pnm_ptr->maxval;\n if (maxval == 0)\n (*__errno_location ()) = 22;\n if (maxval <= 0xffU)\n return 1;\n else if (maxval <= 0xffffU)\n return 2;\n else if (maxval <= 0xffffffU)\n return 3;\n else if (maxval <= 0xffffffffU)\n return 4;\n else\n {\n (*__errno_location ()) = 22;\n return 0;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#fd_range_prep#Pl_Vector_Add_Vector.c", "codebase": "gprolog-1.5.0", "c_file": "fd_range.c", "function": "Pl_Vector_Add_Vector", "sloc": "19", "c_code": "void\nPl_Vector_Add_Vector(Vector vec, Vector vec1)\n{\n Vector aux_vec;\n int vec_elem, vec_elem1;\n int x;\n do { aux_vec = (Vector) (((WamWordP *) pl_reg_bank)[256 +3]); (((WamWordP *) pl_reg_bank)[256 +3]) += pl_vec_size; } while (0);\n Pl_Vector_Copy(aux_vec, vec);\n Pl_Vector_Empty(vec);\n { Vector enum_end = aux_vec + pl_vec_size, enum_i = aux_vec; int enum_j; VecWord enum_word; vec_elem = 0; do { enum_word = *enum_i; for (enum_j = 0; enum_j++ < (8 * 8); enum_word >>= 1, vec_elem++) { if (enum_word & 1) {;\n { Vector enum_end = vec1 + pl_vec_size, enum_i = vec1; int enum_j; VecWord enum_word; vec_elem1 = 0; do { enum_word = *enum_i; for (enum_j = 0; enum_j++ < (8 * 8); enum_word >>= 1, vec_elem1++) { if (enum_word & 1) {;\n x = vec_elem + vec_elem1;\n if (x > pl_vec_max_integer)\n goto loop1;\n (vec[((VecWord) (x) >> 6)] |= ((VecWord) 1 << ((x) & (((VecWord) 1 << 6)-1))));\n } } } while (++enum_i < enum_end); };\nloop1:;\n } } } while (++enum_i < enum_end); };\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 2, "while_loop": 3, "switch_statement": 0, "goto_statement": 1, "return_statement": 0, "break_continue_statement": 0}}, {"id": "lil#lil_prep#lil_arg.c", "codebase": "lil", "c_file": "lil.c", "function": "lil_arg", "sloc": "4", "c_code": "lil_value_t lil_arg(lil_value_t* argv, size_t index)\n{\n return argv ? argv[index] : ((void *)0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#server-client_prep#server_client_suspend.c", "codebase": "tmux", "c_file": "server-client.c", "function": "server_client_suspend", "sloc": "10", "c_code": "void\nserver_client_suspend(struct client *c)\n{\n struct session *s = c->session;\n if (s == ((void *)0) || (c->flags & 0x1000))\n return;\n tty_stop_tty(&c->tty);\n c->flags |= 0x40;\n proc_send(c->peer, MSG_SUSPEND, -1, ((void *)0), 0);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM_prep#len.c", "codebase": "transcoder-set", "c_file": "PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlXPathIsNaN.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlXPathIsNaN", "sloc": "11", "c_code": "PyObject *\nlibxml_xmlXPathIsNaN(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n double val;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"d:xmlXPathIsNaN\", &val))\n return(((void *)0));\n c_retval = xmlXPathIsNaN(val);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#parserInternals_prep#xmlCtxtSetErrorHandler.c", "codebase": "libxml2", "c_file": "parserInternals.c", "function": "xmlCtxtSetErrorHandler", "sloc": "9", "c_code": "void\nxmlCtxtSetErrorHandler(xmlParserCtxtPtr ctxt, xmlStructuredErrorFunc handler,\n void *data)\n{\n if (ctxt == ((void *)0))\n return;\n ctxt->errorHandler = handler;\n ctxt->errorCtxt = data;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_object_uint8.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_object_uint8", "sloc": "5", "c_code": "unsigned char binn_object_uint8(void *obj, const char *key) {\n unsigned char value;\n binn_object_get(obj, key, 0x20, &value, ((void *)0));\n return value;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlOutputBufferWrite.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlOutputBufferWrite", "sloc": "15", "c_code": "PyObject *\nlibxml_xmlOutputBufferWrite(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlOutputBufferPtr out;\n PyObject *pyobj_out;\n int len;\n char * buf;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Oiz:xmlOutputBufferWrite\", &pyobj_out, &len, &buf))\n return(((void *)0));\n out = (xmlOutputBufferPtr) (((pyobj_out) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyoutputBuffer_Object *)(pyobj_out))->obj));\n c_retval = xmlOutputBufferWrite(out, len, buf);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlCtxtGetOptions.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlCtxtGetOptions", "sloc": "7", "c_code": "int\nxmlCtxtGetOptions(xmlParserCtxtPtr ctxt)\n{\n if (ctxt == ((void *)0))\n return(-1);\n return(ctxt->options);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_LENGTH_SUBSEQUENCE_DIFFERENCE_ADJACENT_ELEMENTS_EITHER_0_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_LENGTH_SUBSEQUENCE_DIFFERENCE_ADJACENT_ELEMENTS_EITHER_0_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_LINE_PASSES_ORIGIN_prep#sort.c", "codebase": "transcoder-set", "c_file": "CHECK_LINE_PASSES_ORIGIN.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "pth-2.0.7#test_common_prep#pth_readline.c", "codebase": "pth-2.0.7", "c_file": "test_common.c", "function": "pth_readline", "sloc": "4", "c_code": "ssize_t pth_readline(int fd, void *buf, size_t buflen)\n{\n return pth_readline_ev(fd, buf, buflen, ((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#mpfr_prep#mpfr_unset.c", "codebase": "gawk-5.2.2", "c_file": "mpfr.c", "function": "mpfr_unset", "sloc": "8", "c_code": "void\nmpfr_unset(NODE *n)\n{\n if ((((n)->flags & MPFN) != 0))\n mpfr_clear(n->sub.val.nm.mpnum);\n else if ((((n)->flags & MPZN) != 0))\n __gmpz_clear(n->sub.val.nm.mpi);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#winio_prep#actual_last_column.c", "codebase": "nano-7.2", "c_file": "winio.c", "function": "actual_last_column", "sloc": "14", "c_code": "size_t actual_last_column(size_t leftedge, size_t column)\n{\n if (((flags[((SOFTWRAP) / (sizeof(unsigned) * 8))] & ((unsigned)1 << ((SOFTWRAP) % (sizeof(unsigned) * 8)))) != 0)) {\n _Bool kickoff = 1;\n _Bool last_chunk = 0;\n size_t end_col = get_softwrap_breakpoint(openfile->current->data,\n leftedge, &kickoff, &last_chunk) - leftedge;\n if (!last_chunk)\n end_col--;\n if (column > end_col)\n column = end_col;\n }\n return leftedge + column;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cpio-2.14#util_prep#set_file_times.c", "codebase": "cpio-2.14", "c_file": "util.c", "function": "set_file_times", "sloc": "11", "c_code": "void\nset_file_times (int fd,\n const char *name, unsigned long atime, unsigned long mtime)\n{\n struct timespec ts[2];\n memset (&ts, 0, sizeof ts);\n ts[0].tv_sec = atime;\n ts[1].tv_sec = mtime;\n if (fdutimens (fd, name, ts) < 0 && (*__errno_location ()) != 30)\n utime_error (name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY_prep#max.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "quadtree-0.1.0#bounds_prep#quadtree_bounds_extend.c", "codebase": "quadtree-0.1.0", "c_file": "bounds.c", "function": "quadtree_bounds_extend", "sloc": "9", "c_code": "void\nquadtree_bounds_extend(quadtree_bounds_t *bounds, double x, double y){\n bounds->nw->x = fmin(x, bounds->nw->x);\n bounds->nw->y = fmax(y, bounds->nw->y);\n bounds->se->x = fmax(x, bounds->se->x);\n bounds->se->y = fmin(y, bounds->se->y);\n bounds->width = fabs(bounds->nw->x - bounds->se->x);\n bounds->height = fabs(bounds->nw->y - bounds->se->y);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlCreateURI.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlCreateURI", "sloc": "8", "c_code": "PyObject *\nlibxml_xmlCreateURI(PyObject *self __attribute__ ((__unused__)), PyObject *args __attribute__ ((__unused__))) {\n PyObject *py_retval;\n xmlURIPtr c_retval;\n c_retval = xmlCreateURI();\n py_retval = libxml_xmlURIPtrWrap((xmlURIPtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#UNBOUNDED_KNAPSACK_REPETITION_ITEMS_ALLOWED_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "UNBOUNDED_KNAPSACK_REPETITION_ITEMS_ALLOWED.c", "function": "f_gold", "sloc": "11", "c_code": "int f_gold ( int W, int n, int val [ ], int wt [ ] ) {\n int dp [ W + 1 ];\n memset ( dp, 0, sizeof dp );\n int ans = 0;\n for ( int i = 0;\n i <= W;\n i ++ ) for ( int j = 0;\n j < n;\n j ++ ) if ( wt [ j ] <= i ) dp [ i ] = max ( dp [ i ], dp [ i - wt [ j ] ] + val [ j ] );\n return dp [ W ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_tan_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_tan_start", "sloc": "1", "c_code": "int ti_tan_start(double const *options) { (void)options; return 0; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_location_information_prep#json_write_minified.c", "codebase": "json.h", "c_file": "allow_location_information.c", "function": "json_write_minified", "sloc": "26", "c_code": "void *json_write_minified(const struct json_value_s *value, size_t *out_size) {\n size_t size = 0;\n char *data = 0;\n char *data_end = 0;\n if (0 == value) {\n return 0;\n }\n if (json_write_minified_get_value_size(value, &size)) {\n return 0;\n }\n size += 1;\n data = (char *)malloc(size);\n if (0 == data) {\n return 0;\n }\n data_end = json_write_minified_value(value, data);\n if (0 == data_end) {\n free(data);\n return 0;\n }\n *data_end = '\\0';\n if (0 != out_size) {\n *out_size = size;\n }\n return data;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 2, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#llong_prep#log_2.c", "codebase": "mtools-4.0.43", "c_file": "llong.c", "function": "log_2", "sloc": "9", "c_code": "unsigned int log_2(unsigned int size)\n{\n unsigned int i;\n for(i=0; i<24; i++) {\n if(1u << i == size)\n return i;\n }\n return 24;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#pgp-encode_prep#nettle_pgp_put_header.c", "codebase": "nettle-3.9.1", "c_file": "pgp-encode.c", "function": "nettle_pgp_put_header", "sloc": "8", "c_code": "int\nnettle_pgp_put_header(struct nettle_buffer *buffer,\n unsigned tag, unsigned length)\n{\n ((void) sizeof ((tag < 0x40) ? 1 : 0), __extension__ ({ if (tag < 0x40) ; else __assert_fail (\"tag < 0x40\", \"pgp-encode.c\", 137, __extension__ __PRETTY_FUNCTION__); }));\n return (( (((buffer)->size < (buffer)->alloc) || nettle_buffer_grow((buffer), 1)) && ((buffer)->contents[(buffer)->size++] = (0xC0 | tag), 1) )\n && nettle_pgp_put_length(buffer, length));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_LINE_PASSES_ORIGIN_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "CHECK_LINE_PASSES_ORIGIN.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_SET_13_CUTTING_A_ROD_prep#max.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_SET_13_CUTTING_A_ROD.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsOsmanya.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsOsmanya", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsOsmanya(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsOsmanya\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsOsmanya\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsOsmanya(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_OF_ALL_PROPER_DIVISORS_OF_A_NATURAL_NUMBER_prep#sort.c", "codebase": "transcoder-set", "c_file": "SUM_OF_ALL_PROPER_DIVISORS_OF_A_NATURAL_NUMBER.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_authentication_info_prep#osip_authentication_info_set_qop_options.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authentication_info.c", "function": "osip_authentication_info_set_qop_options", "sloc": "3", "c_code": "void osip_authentication_info_set_qop_options(osip_authentication_info_t *authentication_info, char *qop_options) {\n authentication_info->qop_options = (char *) qop_options;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#siv-cmac-aes256_prep#nettle_siv_cmac_aes256_set_key.c", "codebase": "nettle-3.9.1", "c_file": "siv-cmac-aes256.c", "function": "nettle_siv_cmac_aes256_set_key", "sloc": "5", "c_code": "void\nnettle_siv_cmac_aes256_set_key(struct siv_cmac_aes256_ctx *ctx, const uint8_t *key)\n{\n nettle_siv_cmac_set_key(&ctx->cmac_key, &ctx->cmac_cipher, &ctx->ctr_cipher, &nettle_aes256, key);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "hello-2.12.1#quotearg_prep#quote_n_mem.c", "codebase": "hello-2.12.1", "c_file": "quotearg.c", "function": "quote_n_mem", "sloc": "5", "c_code": "char const *\nquote_n_mem (int n, char const *arg, size_t argsize)\n{\n return quotearg_n_options (n, arg, argsize, "e_quoting_options);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderAttributeCount.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderAttributeCount", "sloc": "32", "c_code": "int\nxmlTextReaderAttributeCount(xmlTextReaderPtr reader) {\n int ret;\n xmlAttrPtr attr;\n xmlNsPtr ns;\n xmlNodePtr node;\n if (reader == ((void *)0))\n return(-1);\n if (reader->node == ((void *)0))\n return(0);\n if (reader->curnode != ((void *)0))\n node = reader->curnode;\n else\n node = reader->node;\n if (node->type != XML_ELEMENT_NODE)\n return(0);\n if ((reader->state == XML_TEXTREADER_END) ||\n (reader->state == XML_TEXTREADER_BACKTRACK))\n return(0);\n ret = 0;\n attr = node->properties;\n while (attr != ((void *)0)) {\n ret++;\n attr = attr->next;\n }\n ns = node->nsDef;\n while (ns != ((void *)0)) {\n ret++;\n ns = ns->next;\n }\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_SUBSTRINGS_WITH_SAME_FIRST_AND_LAST_CHARACTERS_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "COUNT_SUBSTRINGS_WITH_SAME_FIRST_AND_LAST_CHARACTERS.c", "function": "f_gold", "sloc": "10", "c_code": "int f_gold ( char s [] ) {\n int result = 0;\n int n = strlen(s);\n for ( int i = 0;\n i < n;\n i ++ ) for ( int j = i;\n j < n;\n j ++ ) if ( s [ i ] == s [ j ] ) result ++;\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_msg_prep#pth_msgport_pending.c", "codebase": "pth-2.0.7", "c_file": "pth_msg.c", "function": "pth_msgport_pending", "sloc": "6", "c_code": "int pth_msgport_pending(pth_msgport_t mp)\n{\n if (mp == ((void *)0))\n return ((*__errno_location ()) = (22), (-1));\n return ((&mp->mp_queue) == ((void *)0) ? (-1) : (&mp->mp_queue)->r_nodes);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_SUM_TWO_NUMBERS_FORMED_DIGITS_ARRAY_2_prep#min.c", "codebase": "transcoder-set", "c_file": "MINIMUM_SUM_TWO_NUMBERS_FORMED_DIGITS_ARRAY_2.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "quadtree-0.1.0#bounds_prep#quadtree_bounds_new.c", "codebase": "quadtree-0.1.0", "c_file": "bounds.c", "function": "quadtree_bounds_new", "sloc": "11", "c_code": "quadtree_bounds_t*\nquadtree_bounds_new(){\n quadtree_bounds_t *bounds;\n if((bounds = malloc(sizeof(*bounds))) == ((void *)0))\n return ((void *)0);\n bounds->nw = quadtree_point_new((__builtin_inff ()), -(__builtin_inff ()));\n bounds->se = quadtree_point_new(-(__builtin_inff ()), (__builtin_inff ()));\n bounds->width = 0;\n bounds->height = 0;\n return bounds;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_error_info_prep#osip_message_set_error_info.c", "codebase": "libosip2-5.3.1", "c_file": "osip_error_info.c", "function": "osip_message_set_error_info", "sloc": "17", "c_code": "int osip_message_set_error_info(osip_message_t *sip, const char *hvalue) {\n osip_error_info_t *error_info;\n int i;\n if (hvalue == ((void *)0) || hvalue[0] == '\\0')\n return 0;\n i = osip_call_info_init(&error_info);\n if (i != 0)\n return i;\n i = osip_call_info_parse(error_info, hvalue);\n if (i != 0) {\n osip_call_info_free(error_info);\n return i;\n }\n sip->message_property = 2;\n osip_list_add(&sip->error_infos, error_info, -1);\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngget_prep#png_get_tRNS.c", "codebase": "optipng-0.7.8", "c_file": "pngget.c", "function": "png_get_tRNS", "sloc": "37", "c_code": "png_uint_32\npng_get_tRNS(png_const_structrp png_ptr, png_inforp info_ptr,\n png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color)\n{\n png_uint_32 retval = 0;\n if (png_ptr != ((void *)0) && info_ptr != ((void *)0) &&\n (info_ptr->valid & 0x0010U) != 0)\n {\n ((void)0);\n if (info_ptr->color_type == (2 | 1))\n {\n if (trans_alpha != ((void *)0))\n {\n *trans_alpha = info_ptr->trans_alpha;\n retval |= 0x0010U;\n }\n if (trans_color != ((void *)0))\n *trans_color = &(info_ptr->trans_color);\n }\n else\n {\n if (trans_color != ((void *)0))\n {\n *trans_color = &(info_ptr->trans_color);\n retval |= 0x0010U;\n }\n if (trans_alpha != ((void *)0))\n *trans_alpha = ((void *)0);\n }\n if (num_trans != ((void *)0))\n {\n *num_trans = info_ptr->num_trans;\n retval |= 0x0010U;\n }\n }\n return (retval);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 8, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_PATTERNS_101_GIVEN_STRING_prep#max.c", "codebase": "transcoder-set", "c_file": "FIND_PATTERNS_101_GIVEN_STRING.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#position_prep#pos_clear.c", "codebase": "less-633", "c_file": "position.c", "function": "pos_clear", "sloc": "6", "c_code": "void pos_clear(void)\n{\n int i;\n for (i = 0; i < sc_height; i++)\n table[i] = ((POSITION)(-1));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "screen-4.9.0#encoding_prep#LoadFontTranslationsForEncoding.c", "codebase": "screen-4.9.0", "c_file": "encoding.c", "function": "LoadFontTranslationsForEncoding", "sloc": "15", "c_code": "void\nLoadFontTranslationsForEncoding(encoding)\nint encoding;\n{\n char *c;\n int f;\n do {} while (0);\n if ((c = encodings[encoding].fontlist) != 0)\n while ((f = (unsigned char)*c++) != 0)\n if (recodetabs[f].flags == 0)\n LoadFontTranslation(f, 0);\n f = encodings[encoding].deffont;\n if (f > 0 && recodetabs[f].flags == 0)\n LoadFontTranslation(f, 0);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Un_Codes_Check.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Un_Codes_Check", "sloc": "6", "c_code": "Bool\nPl_Un_Codes_Check(char *str, WamWord start_word)\n{\n Pl_Check_For_Un_Codes(start_word);\n return Pl_Un_Codes(str, start_word);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#fat_prep#getfreeMinBytes.c", "codebase": "mtools-4.0.43", "c_file": "fat.c", "function": "getfreeMinBytes", "sloc": "14", "c_code": "int getfreeMinBytes(Stream_t *Dir, mt_off_t size)\n{\n Stream_t *Stream = GetFs(Dir);\n Fs_t *This = (Fs_t *) Stream;\n mt_off_t size2;\n size2 = size / (This->sector_size * This->cluster_size);\n if(size % (This->sector_size * This->cluster_size))\n size2++;\n if((smt_off_t)size2 > (4294967295U)) {\n fprintf(stderr, \"Requested size too big\\n\");\n exit(1);\n }\n return getfreeMinClusters(Dir, (uint32_t) size2);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_DIGITS_FACTORIAL_SET_1_prep#main.c", "codebase": "transcoder-set", "c_file": "COUNT_DIGITS_FACTORIAL_SET_1.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {66,7,55,37,76,16,17,95,71,90};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlValidateQName.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlValidateQName", "sloc": "12", "c_code": "PyObject *\nlibxml_xmlValidateQName(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlChar * value;\n int space;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"zi:xmlValidateQName\", &value, &space))\n return(((void *)0));\n c_retval = xmlValidateQName(value, space);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_body_prep#osip_body_clone.c", "codebase": "libosip2-5.3.1", "c_file": "osip_body.c", "function": "osip_body_clone", "sloc": "31", "c_code": "int osip_body_clone(const osip_body_t *body, osip_body_t **dest) {\n int i;\n osip_body_t *copy;\n if (body == ((void *)0) || body->length <= 0)\n return -2;\n i = osip_body_init(©);\n if (i != 0)\n return i;\n copy->body = (char *) (osip_malloc_func ? osip_malloc_func(body->length + 2) : malloc(body->length + 2));\n if (copy->body == ((void *)0)) {\n osip_body_free(copy);\n return -4;\n }\n copy->length = body->length;\n memcpy(copy->body, body->body, body->length);\n copy->body[body->length] = '\\0';\n if (body->content_type != ((void *)0)) {\n i = osip_content_type_clone(body->content_type, &(copy->content_type));\n if (i != 0) {\n osip_body_free(copy);\n return i;\n }\n }\n i = osip_list_clone(body->headers, copy->headers, (int (*)(void *, void **)) & osip_header_clone);\n if (i != 0) {\n osip_body_free(copy);\n return i;\n }\n *dest = copy;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 1, "memory_operation": 1, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#error_supp_prep#Pl_Set_C_Bip_Name.c", "codebase": "gprolog-1.5.0", "c_file": "error_supp.c", "function": "Pl_Set_C_Bip_Name", "sloc": "6", "c_code": "void\nPl_Set_C_Bip_Name(char *func_str, int arity)\n{\n c_bip_func_str = func_str;\n c_bip_arity = arity;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderSetResourceLoader.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderSetResourceLoader", "sloc": "9", "c_code": "void\nxmlTextReaderSetResourceLoader(xmlTextReaderPtr reader,\n xmlResourceLoader loader, void *data) {\n if ((reader == ((void *)0)) || (reader->ctxt == ((void *)0)))\n return;\n reader->resourceLoader = loader;\n reader->resourceCtxt = data;\n xmlCtxtSetResourceLoader(reader->ctxt, loader, data);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_leading_or_trailing_decimal_point_prep#json_write_minified.c", "codebase": "json.h", "c_file": "allow_leading_or_trailing_decimal_point.c", "function": "json_write_minified", "sloc": "26", "c_code": "void *json_write_minified(const struct json_value_s *value, size_t *out_size) {\n size_t size = 0;\n char *data = 0;\n char *data_end = 0;\n if (0 == value) {\n return 0;\n }\n if (json_write_minified_get_value_size(value, &size)) {\n return 0;\n }\n size += 1;\n data = (char *)malloc(size);\n if (0 == data) {\n return 0;\n }\n data_end = json_write_minified_value(value, data);\n if (0 == data_end) {\n free(data);\n return 0;\n }\n *data_end = '\\0';\n if (0 != out_size) {\n *out_size = size;\n }\n return data;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 2, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THE_MINIMUM_DISTANCE_BETWEEN_TWO_NUMBERS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_THE_MINIMUM_DISTANCE_BETWEEN_TWO_NUMBERS.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int n, int x, int y ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#file_prep#isRootDir.c", "codebase": "mtools-4.0.43", "c_file": "file.c", "function": "isRootDir", "sloc": "5", "c_code": "int isRootDir(Stream_t *Stream)\n{\n File_t *This = getUnbufferedFile(Stream);\n return This->map == root_map;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#write_c_prep#Pl_Write_Canonical_1.c", "codebase": "gprolog-1.5.0", "c_file": "write_c.c", "function": "Pl_Write_Canonical_1", "sloc": "8", "c_code": "void\nPl_Write_Canonical_1(WamWord term_word)\n{\n (pl_sys_var[0]) = 2 | 1;\n (pl_sys_var[1]) = -1;\n (pl_sys_var[2]) = 1200;\n Pl_Write_Term_2(((PlLong) (0) + ((PlULong)0)), term_word);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsCatL.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsCatL", "sloc": "4", "c_code": "int\nxmlUCSIsCatL(int code) {\n return(xmlCharInRange((unsigned int)code, &xmlLG));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#yarrow256_prep#nettle_yarrow256_fast_reseed.c", "codebase": "nettle-3.9.1", "c_file": "yarrow256.c", "function": "nettle_yarrow256_fast_reseed", "sloc": "21", "c_code": "void\nnettle_yarrow256_fast_reseed(struct yarrow256_ctx *ctx)\n{\n uint8_t digest[32];\n unsigned i;\n if (ctx->seeded)\n {\n uint8_t blocks[16 * 2];\n yarrow_generate_block(ctx, blocks);\n yarrow_generate_block(ctx, blocks + 16);\n nettle_sha256_update(&ctx->pools[YARROW_FAST], sizeof(blocks), blocks);\n }\n nettle_sha256_digest(&ctx->pools[YARROW_FAST], sizeof(digest), digest);\n yarrow_iterate(digest);\n nettle_aes256_set_encrypt_key(&ctx->key, digest);\n ctx->seeded = 1;\n memset(ctx->counter, 0, sizeof(ctx->counter));\n nettle_aes256_encrypt(&ctx->key, sizeof(ctx->counter), ctx->counter, ctx->counter);\n for (i = 0; insources; i++)\n ctx->sources[i].estimate[YARROW_FAST] = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 4, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ccm-aes192_prep#nettle_ccm_aes192_set_key.c", "codebase": "nettle-3.9.1", "c_file": "ccm-aes192.c", "function": "nettle_ccm_aes192_set_key", "sloc": "5", "c_code": "void\nnettle_ccm_aes192_set_key(struct ccm_aes192_ctx *ctx, const uint8_t *key)\n{\n nettle_aes192_set_encrypt_key(&ctx->cipher, key);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#profile_prep#pp_number.c", "codebase": "gawk-5.2.2", "c_file": "profile.c", "function": "pp_number", "sloc": "9", "c_code": "char *\npp_number(NODE *n)\n{\n char *str;\n ((void) (0));\n (void) (str = (char *) emalloc_real((size_t)(n->sub.val.slen + 1), \"pp_number\", \"str\", \"profile.c\", 1753));\n strcpy(str, n->sub.val.sp);\n return str;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlParserHandlePEReference.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlParserHandlePEReference", "sloc": "4", "c_code": "void\nxmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {\n xmlParsePEReference(ctxt);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#init_prep#calc_clus_start.c", "codebase": "mtools-4.0.43", "c_file": "init.c", "function": "calc_clus_start", "sloc": "3", "c_code": "uint32_t calc_clus_start(Fs_t *Fs) {\n return Fs->fat_start + Fs->fat_len*Fs->num_fat + Fs->dir_len;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_get_array_size.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_get_array_size", "sloc": "49", "c_code": "int json_get_array_size(struct json_parse_state_s *state) {\n const size_t flags_bitset = state->flags_bitset;\n size_t elements = 0;\n int allow_comma = 0;\n const char *const src = state->src;\n const size_t size = state->size;\n if ('[' != src[state->offset]) {\n state->error = json_parse_error_unknown;\n return 1;\n }\n state->offset++;\n state->dom_size += sizeof(struct json_array_s);\n while (state->offset < size) {\n if (json_skip_all_skippables(state)) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n if (']' == src[state->offset]) {\n state->offset++;\n state->dom_size += sizeof(struct json_array_element_s) * elements;\n return 0;\n }\n if (allow_comma) {\n if (',' == src[state->offset]) {\n state->offset++;\n allow_comma = 0;\n } else if (!(json_parse_flags_allow_no_commas & flags_bitset)) {\n state->error = json_parse_error_expected_comma_or_closing_bracket;\n return 1;\n }\n if (json_parse_flags_allow_trailing_comma & flags_bitset) {\n allow_comma = 0;\n continue;\n } else {\n if (json_skip_all_skippables(state)) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n }\n }\n if (json_get_value_size(state, 0)) {\n return 1;\n }\n elements++;\n allow_comma = 1;\n }\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 9, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 7, "break_continue_statement": 1}}, {"id": "nettle-3.9.1#pgp-encode_prep#nettle_pgp_sub_packet_end.c", "codebase": "nettle-3.9.1", "c_file": "pgp-encode.c", "function": "nettle_pgp_sub_packet_end", "sloc": "9", "c_code": "void\nnettle_pgp_sub_packet_end(struct nettle_buffer *buffer, unsigned start)\n{\n unsigned length;\n ((void) sizeof ((start >= 2) ? 1 : 0), __extension__ ({ if (start >= 2) ; else __assert_fail (\"start >= 2\", \"pgp-encode.c\", 205, __extension__ __PRETTY_FUNCTION__); }));\n ((void) sizeof ((start <= buffer->size) ? 1 : 0), __extension__ ({ if (start <= buffer->size) ; else __assert_fail (\"start <= buffer->size\", \"pgp-encode.c\", 206, __extension__ __PRETTY_FUNCTION__); }));\n length = buffer->size - start;\n do { (buffer->contents + start - 2)[0] = ((length) >> 24) & 0xff; (buffer->contents + start - 2)[1] = ((length) >> 16) & 0xff; (buffer->contents + start - 2)[2] = ((length) >> 8) & 0xff; (buffer->contents + start - 2)[3] = (length) & 0xff; } while(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#hash_prep#xmlHashScan3.c", "codebase": "libxml2", "c_file": "hash.c", "function": "xmlHashScan3", "sloc": "9", "c_code": "void\nxmlHashScan3(xmlHashTablePtr hash, const xmlChar *key,\n const xmlChar *key2, const xmlChar *key3,\n xmlHashScanner scan, void *data) {\n stubData sdata;\n sdata.data = data;\n sdata.scan = scan;\n xmlHashScanFull3(hash, key, key2, key3, stubHashScannerFull, &sdata);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#window_prep#winlink_remove.c", "codebase": "tmux", "c_file": "window.c", "function": "winlink_remove", "sloc": "12", "c_code": "void\nwinlink_remove(struct winlinks *wwl, struct winlink *wl)\n{\n struct window *w = wl->window;\n if (w != ((void *)0)) {\n do { if (((wl)->wentry.tqe_next) != ((void *)0)) (wl)->wentry.tqe_next->wentry.tqe_prev = (wl)->wentry.tqe_prev; else (&w->winlinks)->tqh_last = (wl)->wentry.tqe_prev; *(wl)->wentry.tqe_prev = (wl)->wentry.tqe_next; ; ; } while (0);\n window_remove_ref(w, __func__);\n }\n winlinks_RB_REMOVE(wwl, wl);\n free(wl->status_text);\n free(wl);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 2, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "quadtree-0.1.0#point_prep#quadtree_point_free.c", "codebase": "quadtree-0.1.0", "c_file": "point.c", "function": "quadtree_point_free", "sloc": "4", "c_code": "void\nquadtree_point_free(quadtree_point_t *point){\n free(point);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_clean_prep#pth_cleanup_pop.c", "codebase": "pth-2.0.7", "c_file": "pth_clean.c", "function": "pth_cleanup_pop", "sloc": "14", "c_code": "int pth_cleanup_pop(int execute)\n{\n pth_cleanup_t *cleanup;\n int rc;\n rc = (0);\n if ((cleanup = __pth_current->cleanups) != ((void *)0)) {\n __pth_current->cleanups = cleanup->next;\n if (execute)\n cleanup->func(cleanup->arg);\n free(cleanup);\n rc = (!(0));\n }\n return rc;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CALCULATE_VOLUME_DODECAHEDRON_prep#min.c", "codebase": "transcoder-set", "c_file": "CALCULATE_VOLUME_DODECAHEDRON.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#debug_prep#do_up.c", "codebase": "gawk-5.2.2", "c_file": "debug.c", "function": "do_up", "sloc": "15", "c_code": "int\ndo_up(CMDARG *arg, int cmd __attribute__ ((__unused__)))\n{\n do { if (! prog_running) { d_error(gettext(\"program not running\")); return 0; } } while (0);\n if (arg != ((void *)0) && arg->type == D_int)\n cur_frame += arg->value.lval;\n else\n cur_frame++;\n if (cur_frame < 0)\n cur_frame = 0;\n else if (cur_frame > fcall_count)\n cur_frame = fcall_count;\n print_cur_frame_and_sourceline();\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "uucp-1.07#proti_prep#fishutdown.c", "codebase": "uucp-1.07", "c_file": "proti.c", "function": "fishutdown", "sloc": "43", "c_code": "boolean\nfishutdown (qdaemon)\n struct sdaemon *qdaemon;\n{\n char *z;\n size_t clen;\n fIclosing = (1);\n z = zigetspace (qdaemon, &clen) - (6);\n z[(0)] = ('\\007');\n z[(1)] = (((iIsendseq) << 3) | (0));\n z[(2)] = (((iIrecseq) << 3) | (0));\n iIlocal_ack = iIrecseq;\n z[(3)] = ((((5)) << 5) | ((qdaemon->fcaller) ? (1 << 4) : 0) | (((0) >> 8) & 0x0f));\n z[(4)] = ((0) & 0xff);\n z[(5)] = ((z[(1)] ^ z[(2)] ^ z[(3)] ^ z[(4)]) & 0xff);\n do { if (((iDebug & ((020))) != 0)) ulog (LOG_DEBUG, (\"fishutdown: Sending CLOSE\")); } while (0);\n if (! (*pfIsend) (qdaemon->qconn, z, (6), (0)))\n return (0);\n ulog (LOG_NORMAL,\n \"Protocol '%c' packets: sent %ld, resent %ld, received %ld\",\n qdaemon->qproto->bname, cIsent_packets, cIresent_packets,\n cIreceived_packets);\n if (cIbad_hdr != 0\n || cIbad_cksum != 0\n || cIbad_order != 0\n || cIremote_rejects != 0)\n ulog (LOG_NORMAL,\n \"Errors: header %ld, checksum %ld, order %ld, remote rejects %ld\",\n cIbad_hdr, cIbad_cksum, cIbad_order, cIremote_rejects);\n iIrequest_packsize = (1024);\n iIrequest_winsize = (16);\n iIforced_remote_packsize = 0;\n cIsync_timeout = (10);\n cIsync_retries = (6);\n cItimeout = (10);\n cIwindow_timeout = (10);\n cIretries = (6);\n cIerrors = (100);\n cIerror_decay = (10);\n cIack_frequency = 0;\n zJavoid_parameter = \"\\\\021\\\\023\";\n return (1);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#crossany_prep#ti_crossany_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "crossany.c", "function": "ti_crossany_start", "sloc": "4", "c_code": "int ti_crossany_start(double const *options) {\n (void)options;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#buffer-init_prep#nettle_buffer_init.c", "codebase": "nettle-3.9.1", "c_file": "buffer-init.c", "function": "nettle_buffer_init", "sloc": "5", "c_code": "void\nnettle_buffer_init(struct nettle_buffer *buffer)\n{\n nettle_buffer_init_realloc(buffer, ((void *)0), nettle_realloc);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#ps_prep#pict_curve.c", "codebase": "dap-3.10", "c_file": "ps.c", "function": "pict_curve", "sloc": "16", "c_code": "void pict_curve(pict *p, double (*xf)(double t), double (*yf)(double t),\n double t0, double t1, int nsteps)\n{\n int step;\n double h;\n double t;\n h = (t1 - t0) / ((double) nsteps);\n for (step = 0; step <= nsteps; step++)\n {\n t = t0 + ((double) step) * h;\n if (xf)\n pict_point(p, (*xf)(t), (*yf)(t));\n else\n pict_point(p, t, (*yf)(t));\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 3, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "make-4.4.1#function_prep#shell_completed.c", "codebase": "make-4.4.1", "c_file": "function.c", "function": "shell_completed", "sloc": "14", "c_code": "void\nshell_completed (int exit_code, int exit_sig)\n{\n char buf[(53 * sizeof(uintmax_t) / 22 + 3)];\n shell_function_pid = 0;\n if (exit_sig == 0 && exit_code == 127)\n shell_function_completed = -1;\n else\n shell_function_completed = 1;\n if (exit_code == 0 && exit_sig > 0)\n exit_code = 128 + exit_sig;\n sprintf (buf, \"%d\", exit_code);\n define_variable_in_set((\".SHELLSTATUS\"),(sizeof (\".SHELLSTATUS\") - 1),(buf),(o_override),(0), current_variable_set_list->set,((floc *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#b-divvy_prep#pointer_array.c", "codebase": "rcs-5.10.1", "c_file": "b-divvy.c", "function": "pointer_array", "sloc": "8", "c_code": "void *\npointer_array (struct divvy *divvy, size_t count)\n{\n struct obstack *o = &divvy->space;\n while (count--)\n __extension__ ({ struct obstack *__o = (o); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < sizeof (void *)) _obstack_newchunk (__o, sizeof (void *)); __extension__ ({ struct obstack *__o1 = (__o); void *__p1 = __o1->next_free; *(const void **) __p1 = (((void *)0)); __o1->next_free += sizeof (const void *); (void) 0; }); });\n return __extension__ ({ struct obstack *__o1 = (o); void *__value = (void *) __o1->object_base; if (__o1->next_free == __value) __o1->maybe_empty_object = 1; __o1->next_free = ((sizeof (ptrdiff_t) < sizeof (void *) ? (__o1->object_base) : (char *) 0) + (((__o1->next_free) - (sizeof (ptrdiff_t) < sizeof (void *) ? (__o1->object_base) : (char *) 0) + (__o1->alignment_mask)) & ~(__o1->alignment_mask))); if ((size_t) (__o1->next_free - (char *) __o1->chunk) > (size_t) (__o1->chunk_limit - (char *) __o1->chunk)) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; __value; });\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 4, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#hash_prep#hash_table_put.c", "codebase": "wget-1.21.4", "c_file": "hash.c", "function": "hash_table_put", "sloc": "19", "c_code": "void\nhash_table_put (struct hash_table *ht, const void *key, const void *value)\n{\n struct cell *c = find_cell (ht, key);\n if (((c)->key != ((void *) ~(uintptr_t) 0)))\n {\n c->key = (void *)key;\n c->value = (void *)value;\n return;\n }\n if (ht->count >= ht->resize_threshold)\n {\n grow_hash_table (ht);\n c = find_cell (ht, key);\n }\n ++ht->count;\n c->key = (void *)key;\n c->value = (void *)value;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#crossany_prep#ti_crossany.c", "codebase": "tulipindicators-0.9.1", "c_file": "crossany.c", "function": "ti_crossany", "sloc": "12", "c_code": "int ti_crossany(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *a = inputs[0];\n const double *b = inputs[1];\n (void)options;\n double *output = outputs[0];\n int i;\n for (i = 1; i < size; ++i) {\n *output++ = (a[i] > b[i] && a[i-1] <= b[i-1])\n || (a[i] < b[i] && a[i-1] >= b[i-1]);\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#server-client_prep#server_client_check_nested.c", "codebase": "tmux", "c_file": "server-client.c", "function": "server_client_check_nested", "sloc": "14", "c_code": "int\nserver_client_check_nested(struct client *c)\n{\n struct environ_entry *envent;\n struct window_pane *wp;\n envent = environ_find(c->environ, \"TMUX\");\n if (envent == ((void *)0) || *envent->value == '\\0')\n return (0);\n for ((wp) = window_pane_tree_RB_MINMAX(&all_window_panes, -1); (wp) != ((void *)0); (wp) = window_pane_tree_RB_NEXT(wp)) {\n if (strcmp(wp->tty, c->ttyname) == 0)\n return (1);\n }\n return (0);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#FINDING_POWER_PRIME_NUMBER_P_N_1_prep#main.c", "codebase": "transcoder-set", "c_file": "FINDING_POWER_PRIME_NUMBER_P_N_1.c", "function": "main", "sloc": "15", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {76,77,9,59,8,97,78,41,72,71};\n int param1[] = {43,91,42,67,52,8,24,88,61,28};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#NUMBER_TRIANGLES_N_MOVES_1_prep#min.c", "codebase": "transcoder-set", "c_file": "NUMBER_TRIANGLES_N_MOVES_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_MATRIX_ELEMENT_ELEMENT_INTEGER_DIVISION_ROW_COLUMN_prep#main.c", "codebase": "transcoder-set", "c_file": "SUM_MATRIX_ELEMENT_ELEMENT_INTEGER_DIVISION_ROW_COLUMN.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {60,74,8,74,34,66,96,11,45,72};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#xmlschemastypes_prep#xmlSchemaGetBuiltInListSimpleTypeItemType.c", "codebase": "libxml2", "c_file": "xmlschemastypes.c", "function": "xmlSchemaGetBuiltInListSimpleTypeItemType", "sloc": "16", "c_code": "xmlSchemaTypePtr\nxmlSchemaGetBuiltInListSimpleTypeItemType(xmlSchemaTypePtr type)\n{\n if ((type == ((void *)0)) || (type->type != XML_SCHEMA_TYPE_BASIC))\n return (((void *)0));\n switch (type->builtInType) {\n case XML_SCHEMAS_NMTOKENS:\n return (xmlSchemaTypeNmtokenDef );\n case XML_SCHEMAS_IDREFS:\n return (xmlSchemaTypeIdrefDef);\n case XML_SCHEMAS_ENTITIES:\n return (xmlSchemaTypeEntityDef);\n default:\n return (((void *)0));\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "uucp-1.07#isfork_prep#ixsfork.c", "codebase": "uucp-1.07", "c_file": "isfork.c", "function": "ixsfork", "sloc": "14", "c_code": "pid_t\nixsfork ()\n{\n int i;\n pid_t iret;\n for (i = 0; i < 10; i++)\n {\n iret = fork ();\n if (iret >= 0 || (*__errno_location ()) != 11)\n return iret;\n sleep (5);\n }\n return iret;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nano-7.2#history_prep#has_old_position.c", "codebase": "nano-7.2", "c_file": "history.c", "function": "has_old_position", "sloc": "17", "c_code": "_Bool has_old_position(const char *file, ssize_t *line, ssize_t *column)\n{\n char *fullpath = get_full_path(file);\n poshiststruct *item;\n if (fullpath == ((void *)0))\n return 0;\n reload_positions_if_needed();\n item = position_history;\n while (item != ((void *)0) && strcmp(item->filename, fullpath) != 0)\n item = item->next;\n free(fullpath);\n if (item == ((void *)0))\n return 0;\n *line = item->linenumber;\n *column = item->columnnumber;\n return 1;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_ARRAY_REPRESENTS_INORDER_BINARY_SEARCH_TREE_NOT_prep#sort.c", "codebase": "transcoder-set", "c_file": "CHECK_ARRAY_REPRESENTS_INORDER_BINARY_SEARCH_TREE_NOT.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "diffutils-3.10#asnprintf_prep#asnprintf.c", "codebase": "diffutils-3.10", "c_file": "asnprintf.c", "function": "asnprintf", "sloc": "10", "c_code": "char *\nasnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)\n{\n va_list args;\n char *result;\n __builtin_va_start(args,format);\n result = vasnprintf (resultbuf, lengthp, format, args);\n __builtin_va_end(args);\n return result;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#list_prep#xmlListFront.c", "codebase": "libxml2", "c_file": "list.c", "function": "xmlListFront", "sloc": "7", "c_code": "xmlLinkPtr\nxmlListFront(xmlListPtr l)\n{\n if (l == ((void *)0))\n return(((void *)0));\n return (l->sentinel->next);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "indent-2.2.13#backup_prep#version_control_value.c", "codebase": "indent-2.2.13", "c_file": "backup.c", "function": "version_control_value", "sloc": "27", "c_code": "backup_mode_ty version_control_value(void)\n{\n char * version = getenv(\"VERSION_CONTROL\");\n version_control_values_ty * v;\n backup_mode_ty ret = unknown;\n if ((version == ((void *)0)) || (*version == 0))\n {\n ret = numbered_existing;\n }\n else\n {\n v = &values[0];\n while (v->name)\n {\n if (strcmp(version, v->name) == 0)\n {\n ret = v->value;\n break;\n }\n else\n {\n v++;\n }\n }\n }\n return ret;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libosip2-5.3.1#osip_body_prep#osip_body_parse.c", "codebase": "libosip2-5.3.1", "c_file": "osip_body.c", "function": "osip_body_parse", "sloc": "15", "c_code": "int osip_body_parse(osip_body_t *body, const char *start_of_body, size_t length) {\n if (body == ((void *)0))\n return -2;\n if (start_of_body == ((void *)0))\n return -2;\n if (body->headers == ((void *)0))\n return -2;\n body->body = (char *) (osip_malloc_func ? osip_malloc_func(length + 1) : malloc(length + 1));\n if (body->body == ((void *)0))\n return -4;\n memcpy(body->body, start_of_body, length);\n body->body[length] = '\\0';\n body->length = length;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 1, "memory_operation": 1, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "transcoder-set#PRIME_NUMBERS_prep#min.c", "codebase": "transcoder-set", "c_file": "PRIME_NUMBERS.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "make-4.4.1#remote-stub_prep#start_remote_job_p.c", "codebase": "make-4.4.1", "c_file": "remote-stub.c", "function": "start_remote_job_p", "sloc": "5", "c_code": "int\nstart_remote_job_p (int first_p __attribute__ ((unused)))\n{\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_parse_array.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_parse_array", "sloc": "57", "c_code": "void json_parse_array(struct json_parse_state_s *state,\n struct json_array_s *array) {\n const char *const src = state->src;\n const size_t size = state->size;\n size_t elements = 0;\n int allow_comma = 0;\n struct json_array_element_s *previous = 0;\n state->offset++;\n (void)json_skip_all_skippables(state);\n elements = 0;\n do {\n struct json_array_element_s *element = 0;\n struct json_value_s *value = 0;\n (void)json_skip_all_skippables(state);\n if (']' == src[state->offset]) {\n state->offset++;\n break;\n }\n if (allow_comma) {\n if (',' == src[state->offset]) {\n state->offset++;\n allow_comma = 0;\n continue;\n }\n }\n element = (struct json_array_element_s *)state->dom;\n state->dom += sizeof(struct json_array_element_s);\n if (0 == previous) {\n array->start = element;\n } else {\n previous->next = element;\n }\n previous = element;\n if (json_parse_flags_allow_location_information & state->flags_bitset) {\n struct json_value_ex_s *value_ex = (struct json_value_ex_s *)state->dom;\n state->dom += sizeof(struct json_value_ex_s);\n value_ex->offset = state->offset;\n value_ex->line_no = state->line_no;\n value_ex->row_no = state->offset - state->line_offset;\n value = &(value_ex->value);\n } else {\n value = (struct json_value_s *)state->dom;\n state->dom += sizeof(struct json_value_s);\n }\n element->value = value;\n json_parse_value(state, 0, value);\n elements++;\n allow_comma = 1;\n } while (state->offset < size);\n if (previous) {\n previous->next = 0;\n }\n if (0 == elements) {\n array->start = 0;\n }\n array->length = elements;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 0, "struct_type": 6, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 8, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 2}}, {"id": "wget-1.21.4#convert_prep#register_html.c", "codebase": "wget-1.21.4", "c_file": "convert.c", "function": "register_html", "sloc": "7", "c_code": "void\nregister_html (const char *file)\n{\n if (!downloaded_html_set)\n downloaded_html_set = make_string_hash_table (0);\n string_set_add (downloaded_html_set, file);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "patch-2.7.6#save-cwd_prep#free_cwd.c", "codebase": "patch-2.7.6", "c_file": "save-cwd.c", "function": "free_cwd", "sloc": "7", "c_code": "void\nfree_cwd (struct saved_cwd *cwd)\n{\n if (cwd->desc >= 0)\n close (cwd->desc);\n free (cwd->name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_hexadecimal_numbers_prep#json_hexadecimal_value.c", "codebase": "json.h", "c_file": "allow_hexadecimal_numbers.c", "function": "json_hexadecimal_value", "sloc": "18", "c_code": "int json_hexadecimal_value(const char *c, const unsigned long size,\n unsigned long *result) {\n const char *p;\n int digit;\n if (size > sizeof(unsigned long) * 2) {\n return 0;\n }\n *result = 0;\n for (p = c; (unsigned long)(p - c) < size; ++p) {\n *result <<= 4;\n digit = json_hexadecimal_digit(*p);\n if (digit < 0 || digit > 15) {\n return 0;\n }\n *result |= (unsigned char)digit;\n }\n return 1;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_REMOVAL_FROM_ARRAY_WHEN_REMOVAL_TIME_WAITING_TIME_prep#min.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_REMOVAL_FROM_ARRAY_WHEN_REMOVAL_TIME_WAITING_TIME.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_GIVEN_CIRCLE_LIES_COMPLETELY_INSIDE_RING_FORMED_TWO_CONCENTRIC_CIRCLES_prep#max.c", "codebase": "transcoder-set", "c_file": "CHECK_GIVEN_CIRCLE_LIES_COMPLETELY_INSIDE_RING_FORMED_TWO_CONCENTRIC_CIRCLES.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json-c#linkhash_prep#lh_table_length.c", "codebase": "json-c", "c_file": "linkhash.c", "function": "lh_table_length", "sloc": "4", "c_code": "int lh_table_length(struct lh_table *t)\n{\n return t->count;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cpio-2.14#rtapelib_prep#rmt_read__.c", "codebase": "cpio-2.14", "c_file": "rtapelib.c", "function": "rmt_read__", "sloc": "23", "c_code": "size_t\nrmt_read__ (int handle, char *buffer, size_t length)\n{\n char command_buffer[sizeof \"R\\n\" + (((((sizeof (size_t) * 8) - (! ((__typeof__ (size_t)) 0 < (__typeof__ (size_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (size_t)) 0 < (__typeof__ (size_t)) -1)))];\n size_t status;\n size_t rlen;\n size_t counter;\n sprintf (command_buffer, \"R%zu\\n\", length);\n if (do_command (handle, command_buffer) == -1\n || (status = get_status (handle)) == ((size_t) -1)\n || status > length)\n return ((size_t) -1);\n for (counter = 0; counter < status; counter += rlen, buffer += rlen)\n {\n rlen = safe_read ((from_remote[handle][0]), buffer, status - counter);\n if (rlen == ((size_t) -1) || rlen == 0)\n {\n _rmt_shutdown (handle, 5);\n return ((size_t) -1);\n }\n }\n return status;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_via_prep#osip_via_clone.c", "codebase": "libosip2-5.3.1", "c_file": "osip_via.c", "function": "osip_via_clone", "sloc": "52", "c_code": "int osip_via_clone(const osip_via_t *via, osip_via_t **dest) {\n int i;\n osip_via_t *vi;\n *dest = ((void *)0);\n if (via == ((void *)0))\n return -2;\n if (via->version == ((void *)0))\n return -2;\n if (via->protocol == ((void *)0))\n return -2;\n if (via->host == ((void *)0))\n return -2;\n i = osip_via_init(&vi);\n if (i != 0)\n return i;\n vi->version = osip_strdup(via->version);\n if (vi->version == ((void *)0) && via->version != ((void *)0)) {\n osip_via_free(vi);\n return -4;\n }\n vi->protocol = osip_strdup(via->protocol);\n if (vi->protocol == ((void *)0) && via->protocol != ((void *)0)) {\n osip_via_free(vi);\n return -4;\n }\n vi->host = osip_strdup(via->host);\n if (vi->host == ((void *)0) && via->host != ((void *)0)) {\n osip_via_free(vi);\n return -4;\n }\n if (via->port != ((void *)0)) {\n vi->port = osip_strdup(via->port);\n if (vi->port == ((void *)0)) {\n osip_via_free(vi);\n return -4;\n }\n }\n if (via->comment != ((void *)0)) {\n vi->comment = osip_strdup(via->comment);\n if (vi->comment == ((void *)0)) {\n osip_via_free(vi);\n return -4;\n }\n }\n i = osip_list_clone(&via->via_params, &vi->via_params, (int (*)(void *, void **)) & osip_uri_param_clone);\n if (i != 0) {\n osip_via_free(vi);\n return i;\n }\n *dest = vi;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 12, "memory_management": 0, "memory_operation": 0, "if_statement": 13, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 12, "break_continue_statement": 0}}, {"id": "dap-3.10#daprun_prep#dappprun.c", "codebase": "dap-3.10", "c_file": "daprun.c", "function": "dappprun", "sloc": "30", "c_code": "int dappprun(int argc, char **argv)\n{\n char **arg;\n int a;\n int status;\n pid_t pid;\n if (!(arg = (char **) malloc(sizeof(char *) * (argc + 1))))\n {\n perror(\"dap\");\n exit(1);\n }\n arg[0] = dappp;\n for (a = 1; a < argc && strcmp(argv[a], \"-a\") && strcmp(argv[a], \"--args\"); a++)\n arg[a] = argv[a];\n arg[a] = ((void *)0);\n if (!(pid = fork()))\n {\n fputs(\"Preprocessing...\\n\", stderr);\n execv(arg[0], arg);\n perror(arg[0]);\n exit(1);\n }\n else if (pid == -1)\n {\n perror(\"dap\");\n exit(1);\n }\n waitpid(pid, &status, 0);\n return status;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 1, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#spider_prep#print_broken_links.c", "codebase": "wget-1.21.4", "c_file": "spider.c", "function": "print_broken_links", "sloc": "23", "c_code": "void\nprint_broken_links (void)\n{\n hash_table_iterator iter;\n int num_elems;\n if (!nonexisting_urls_set)\n {\n logprintf (LOG_NOTQUIET, gettext(\"Found no broken links.\\n\\n\"));\n return;\n }\n num_elems = hash_table_count (nonexisting_urls_set);\n ((void) sizeof ((num_elems > 0) ? 1 : 0), __extension__ ({ if (num_elems > 0) ; else __assert_fail (\"num_elems > 0\", \"spider.c\", 82, __extension__ __PRETTY_FUNCTION__); }));\n logprintf (LOG_NOTQUIET, ngettext(\"Found %d broken link.\\n\\n\",\n \"Found %d broken links.\\n\\n\", num_elems),\n num_elems);\n for (hash_table_iterate (nonexisting_urls_set, &iter);\n hash_table_iter_next (&iter); )\n {\n const char *url = (const char *) iter.key;\n logprintf (LOG_NOTQUIET, gettext(\"%s\\n\"), url);\n }\n logputs (LOG_NOTQUIET, \"\\n\");\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngset_prep#png_set_user_limits.c", "codebase": "optipng-0.7.8", "c_file": "pngset.c", "function": "png_set_user_limits", "sloc": "9", "c_code": "void\npng_set_user_limits(png_structrp png_ptr, png_uint_32 user_width_max,\n png_uint_32 user_height_max)\n{\n if (png_ptr == ((void *)0))\n return;\n png_ptr->user_width_max = user_width_max;\n png_ptr->user_height_max = user_height_max;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "diffutils-3.10#util_prep#message.c", "codebase": "diffutils-3.10", "c_file": "util.c", "function": "message", "sloc": "42", "c_code": "void\nmessage (char const *format_msgid, ...)\n{\n va_list ap;\n __builtin_va_start(ap,format_msgid);\n if (paginate)\n {\n size_t argbytes = 0;\n for (char const *m = format_msgid; *m; m++)\n if (*m == '%')\n {\n if (m[1] == '%')\n m++;\n else\n argbytes += strlen (__builtin_va_arg(ap,char const *)) + 1;\n }\n __builtin_va_end(ap);\n struct msg *new = xmalloc (((__builtin_offsetof (struct msg, args) + _Alignof (struct msg) - 1 + (argbytes)) & ~ (_Alignof (struct msg) - 1)));\n new->msgid = format_msgid;\n new->argbytes = argbytes;\n __builtin_va_start(ap,format_msgid);\n char *p = new->args;\n for (char const *m = format_msgid; *m; m++)\n if (*m == '%')\n {\n if (m[1] == '%')\n m++;\n else\n p = stpcpy (p, __builtin_va_arg(ap,char const *)) + 1;\n }\n *msg_chain_end = new;\n new->next = 0;\n msg_chain_end = &new->next;\n }\n else\n {\n if (sdiff_merge_assist)\n putchar_unlocked (' ');\n vprintf (gettext (format_msgid), ap);\n }\n __builtin_va_end(ap);\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "uucp-1.07#protf_prep#ffsendcmd.c", "codebase": "uucp-1.07", "c_file": "protf.c", "function": "ffsendcmd", "sloc": "20", "c_code": "boolean\nffsendcmd (qdaemon, z, ilocal, iremote)\n struct sdaemon *qdaemon;\n const char *z;\n int ilocal __attribute__ ((__unused__));\n int iremote __attribute__ ((__unused__));\n{\n size_t clen;\n char *zalc;\n boolean fret;\n do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, (\"ffsendcmd: Sending command \\\"%s\\\"\"), (z)); } while (0);\n clen = strlen (z);\n zalc = zbufalc (clen + 2);\n memcpy (zalc, z, clen);\n zalc[clen] = '\\r';\n zalc[clen + 1] = '\\0';\n fret = fsend_data (qdaemon->qconn, zalc, clen + 1, (1));\n ubuffree (zalc);\n return fret;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#C_PROGRAM_FACTORIAL_NUMBER_1_prep#max.c", "codebase": "transcoder-set", "c_file": "C_PROGRAM_FACTORIAL_NUMBER_1.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#HOW_TO_PRINT_MAXIMUM_NUMBER_OF_A_USING_GIVEN_FOUR_KEYS_prep#sort.c", "codebase": "transcoder-set", "c_file": "HOW_TO_PRINT_MAXIMUM_NUMBER_OF_A_USING_GIVEN_FOUR_KEYS.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#SAX2_prep#xmlSAX2StartElement.c", "codebase": "libxml2", "c_file": "SAX2.c", "function": "xmlSAX2StartElement", "sloc": "15", "c_code": "void\nxmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts) {\n xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;\n (void) atts;\n if ((ctxt == ((void *)0)) || (fullname == ((void *)0)) || (ctxt->myDoc == ((void *)0)))\n return;\n if (!ctxt->html) {\n xmlSAX1StartElement(ctxt, fullname, atts);\n return;\n }\n if (ctxt->html) {\n xmlSAX2StartHtmlElement(ctxt, fullname, atts);\n return;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#FIRST_UPPERCASE_LETTER_IN_A_STRING_ITERATIVE_AND_RECURSIVE_prep#min.c", "codebase": "transcoder-set", "c_file": "FIRST_UPPERCASE_LETTER_IN_A_STRING_ITERATIVE_AND_RECURSIVE.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#wam2ma_prep#F_call.c", "codebase": "gprolog-1.5.0", "c_file": "wam2ma.c", "function": "F_call", "sloc": "7", "c_code": "void\nF_call(ArgVal arg[])\n{\n ArgVal *top = arg; char *m; char *p; PlLong n; ((m) = *((char * *) (top)) , (top)++); ((p) = *((char * *) (top)) , (top)++); ((n) = *((PlLong *) (top)) , (top)++);\n Encode_Hexa(m, p, n, buff_hexa);\n Inst_Printf(\"pl_call\", buff_hexa);\n}\n", "c_constructs": {"pointer_type": 10, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "heman#generate_prep#heman_internal_generate_rock_noise.c", "codebase": "heman", "c_file": "generate.c", "function": "heman_internal_generate_rock_noise", "sloc": "26", "c_code": "heman_image* heman_internal_generate_rock_noise(\n int width, int height, int seed)\n{\n struct osn_context* ctx;\n open_simplex_noise(seed, &ctx);\n heman_image* img = heman_image_create(width, height, 1);\n float* data = img->data;\n float invh = 1.0f / (width > height ? width : height);\n float invw = 1.0f / (width > height ? width : height);\n float freqs[] = {2.0, 4.0, 16.0};\n float ampls[] = {0.2, 0.05, 0.01};\n int y;\n#pragma omp parallel for\n for (y = 0; y < height; ++y) {\n float v = y * invh;\n float* dst = data + y * width;\n for (int x = 0; x < width; ++x) {\n float u = x * invw;\n *dst++ = ampls[0] * open_simplex_noise2(ctx, u * freqs[0], v * freqs[0]) +\n ampls[1] * open_simplex_noise2(ctx, u * freqs[1], v * freqs[1]) +\n ampls[2] * open_simplex_noise2(ctx, u * freqs[2], v * freqs[2]);\n }\n }\n open_simplex_noise_free(ctx);\n return img;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#valid_prep#xmlFreeIDTable.c", "codebase": "libxml2", "c_file": "valid.c", "function": "xmlFreeIDTable", "sloc": "4", "c_code": "void\nxmlFreeIDTable(xmlIDTablePtr table) {\n xmlHashFree(table, xmlFreeIDTableEntry);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#ma2asm_prep#Label_Gen_Init.c", "codebase": "gprolog-1.5.0", "c_file": "ma2asm.c", "function": "Label_Gen_Init", "sloc": "7", "c_code": "void\nLabel_Gen_Init(LabelGen *g, char *prefix)\n{\n g->prefix = prefix;\n g->no = 0;\n g->label[0] = '\\0';\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngerror_prep#png_warning_parameter.c", "codebase": "optipng-0.7.8", "c_file": "pngerror.c", "function": "png_warning_parameter", "sloc": "7", "c_code": "void\npng_warning_parameter(png_warning_parameters p, int number,\n png_const_charp string)\n{\n if (number > 0 && number <= 8)\n (void)png_safecat(p[number-1], (sizeof p[number-1]), 0, string);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "diffutils-3.10#util_prep#print_message_queue.c", "codebase": "diffutils-3.10", "c_file": "util.c", "function": "print_message_queue", "sloc": "19", "c_code": "void\nprint_message_queue (void)\n{\n for (struct msg *m = msg_chain; m; )\n {\n char const *p = m->args;\n char const *plim = p + m->argbytes;\n char const *arg0 = p; p += p < plim ? strlen (p) + 1 : 0;\n char const *arg1 = p; p += p < plim ? strlen (p) + 1 : 0;\n char const *arg2 = p; p += p < plim ? strlen (p) + 1 : 0;\n char const *arg3 = p; p += p < plim ? strlen (p) + 1 : 0;\n printf (gettext (m->msgid), arg0, arg1, arg2, arg3);\n if (p < plim)\n abort ();\n struct msg *next = m->next;\n free (m);\n m = next;\n }\n}\n", "c_constructs": {"pointer_type": 8, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#DICE_THROW_PROBLEM_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "DICE_THROW_PROBLEM_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#fat_prep#getClusterBytes.c", "codebase": "mtools-4.0.43", "c_file": "fat.c", "function": "getClusterBytes", "sloc": "3", "c_code": "uint32_t getClusterBytes(Fs_t *Fs) {\n return Fs->cluster_size * Fs->sector_size;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_prep#max.c", "codebase": "transcoder-set", "c_file": "SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#regex_prep#re_set_syntax.c", "codebase": "gawk-5.2.2", "c_file": "regex.c", "function": "re_set_syntax", "sloc": "7", "c_code": "reg_syntax_t\nre_set_syntax (reg_syntax_t syntax)\n{\n reg_syntax_t ret = re_syntax_options;\n re_syntax_options = syntax;\n return ret;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#text_prep#replace_buffer.c", "codebase": "nano-7.2", "c_file": "text.c", "function": "replace_buffer", "sloc": "23", "c_code": "_Bool replace_buffer(const char *filename, undo_type action, const char *operation)\n{\n linestruct *was_cutbuffer = cutbuffer;\n int descriptor;\n FILE *stream;\n descriptor = open_file(filename, 0, &stream);\n if (descriptor < 0)\n return 0;\n add_undo(COUPLE_BEGIN, operation);\n if (action == CUT_TO_EOF) {\n openfile->current = openfile->filetop;\n openfile->current_x = 0;\n }\n cutbuffer = ((void *)0);\n add_undo(action, ((void *)0));\n do_snip(openfile->mark != ((void *)0), openfile->mark == ((void *)0), 0);\n update_undo(action);\n free_lines(cutbuffer);\n cutbuffer = was_cutbuffer;\n read_file(stream, descriptor, filename, 1);\n add_undo(COUPLE_END, operation);\n return 1;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tinycc#tccelf_prep#section_reserve.c", "codebase": "tinycc", "c_file": "tccelf.c", "function": "section_reserve", "sloc": "7", "c_code": "void section_reserve(Section *sec, unsigned long size)\n{\n if (size > sec->data_allocated)\n section_realloc(sec, size);\n if (size > sec->data_offset)\n sec->data_offset = size;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "less-633#ifile_prep#get_pos.c", "codebase": "less-633", "c_file": "ifile.c", "function": "get_pos", "sloc": "4", "c_code": "void get_pos(void* ifile, struct scrpos *scrpos)\n{\n *scrpos = ((struct ifile *)(ifile))->h_scrpos;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_SERIES_ALTERNATE_SIGNED_SQUARES_AP_prep#sort.c", "codebase": "transcoder-set", "c_file": "SUM_SERIES_ALTERNATE_SIGNED_SQUARES_AP.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_call_id_prep#osip_call_id_set_number.c", "codebase": "libosip2-5.3.1", "c_file": "osip_call_id.c", "function": "osip_call_id_set_number", "sloc": "3", "c_code": "void osip_call_id_set_number(osip_call_id_t *callid, char *number) {\n callid->number = number;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MINIMUM_NUMBER_DIVIDED_MAKE_NUMBER_PERFECT_SQUARE_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_MINIMUM_NUMBER_DIVIDED_MAKE_NUMBER_PERFECT_SQUARE.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THREE_ELEMENT_FROM_DIFFERENT_THREE_ARRAYS_SUCH_THAT_THAT_A_B_C_K_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_THREE_ELEMENT_FROM_DIFFERENT_THREE_ARRAYS_SUCH_THAT_THAT_A_B_C_K.c", "function": "f_filled", "sloc": "1", "c_code": "_Bool f_filled ( int a1 [ ], int a2 [ ], int a3 [ ], int n1, int n2, int n3, int sum ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FRIENDS_PAIRING_PROBLEM_prep#max.c", "codebase": "transcoder-set", "c_file": "FRIENDS_PAIRING_PROBLEM.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#deflate_prep#deflateBound.c", "codebase": "optipng-0.7.8", "c_file": "deflate.c", "function": "deflateBound", "sloc": "26", "c_code": "uLong deflateBound(z_streamp strm, uLong sourceLen) {\n deflate_state *s;\n uLong fixedlen, storelen, wraplen;\n fixedlen = sourceLen + (sourceLen >> 3) + (sourceLen >> 8) +\n (sourceLen >> 9) + 4;\n storelen = sourceLen + (sourceLen >> 5) + (sourceLen >> 7) +\n (sourceLen >> 11) + 7;\n if (deflateStateCheck(strm))\n return (fixedlen > storelen ? fixedlen : storelen) + 6;\n s = strm->state;\n switch (s->wrap) {\n case 0:\n wraplen = 0;\n break;\n case 1:\n wraplen = 6 + (s->strstart ? 4 : 0);\n break;\n default:\n wraplen = 6;\n }\n if (s->w_bits != 15 || s->hash_bits != 8 + 7)\n return (s->w_bits <= s->hash_bits && s->level ? fixedlen : storelen) +\n wraplen;\n return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +\n (sourceLen >> 25) + 13 - 6 + wraplen;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 2}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsOriya.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsOriya", "sloc": "4", "c_code": "int\nxmlUCSIsOriya(int code) {\n return(((code >= 0x0B00) && (code <= 0x0B7F)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ctr16_prep#_nettle_ctr_crypt16.c", "codebase": "nettle-3.9.1", "c_file": "ctr16.c", "function": "_nettle_ctr_crypt16", "sloc": "51", "c_code": "void\n_nettle_ctr_crypt16(const void *ctx, nettle_cipher_func *f,\n nettle_fill16_func *fill, uint8_t *ctr,\n size_t length, uint8_t *dst,\n const uint8_t *src)\n{\n if (dst != src && !((uintptr_t) dst % sizeof(uint64_t)))\n {\n size_t blocks = length / 16u;\n size_t done;\n fill (ctr, blocks, (union nettle_block16 *) dst);\n done = blocks * 16;\n f(ctx, done, dst, dst);\n nettle_memxor (dst, src, done);\n length -= done;\n if (length > 0)\n {\n union nettle_block16 block;\n dst += done;\n src += done;\n ((void) sizeof ((length < 16) ? 1 : 0), __extension__ ({ if (length < 16) ; else __assert_fail (\"length < 16\", \"ctr16.c\", 71, __extension__ __PRETTY_FUNCTION__); }));\n fill (ctr, 1, &block);\n f (ctx, 16, block.b, block.b);\n nettle_memxor3 (dst, src, block.b, length);\n }\n }\n else\n {\n union nettle_block16 *buffer;\n size_t blocks = (length + 15) / 16u;\n size_t i;\n (buffer = __builtin_alloca (sizeof (*buffer) * ((((blocks) < (512 / 16)) ? (blocks) : (512 / 16)))));\n for (i = 0; blocks >= 512 / 16;\n i += 512, blocks -= 512 / 16)\n {\n fill (ctr, 512 / 16, buffer);\n f(ctx, 512, buffer->b, buffer->b);\n if (length - i < 512)\n goto done;\n nettle_memxor3 (dst + i, src + i, buffer->b, 512);\n }\n if (blocks > 0)\n {\n ((void) sizeof ((length - i < 512) ? 1 : 0), __extension__ ({ if (length - i < 512) ; else __assert_fail (\"length - i < CTR_BUFFER_LIMIT\", \"ctr16.c\", 99, __extension__ __PRETTY_FUNCTION__); }));\n fill (ctr, blocks, buffer);\n f(ctx, blocks * 16, buffer->b, buffer->b);\n done:\n nettle_memxor3 (dst + i, src + i, buffer->b, length - i);\n }\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 3, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 1, "return_statement": 0, "break_continue_statement": 0}}, {"id": "bc-1.07.1#storage_prep#store_array.c", "codebase": "bc-1.07.1", "c_file": "storage.c", "function": "store_array", "sloc": "24", "c_code": "void\nstore_array (int var_name)\n{\n bc_num *num_ptr;\n long idx;\n if (!check_stack(2)) return;\n idx = bc_num2long (ex_stack->s_next->s_num);\n if (idx < 0 || idx > 16777215 ||\n (idx == 0 && !bc_is_zero(ex_stack->s_next->s_num)))\n rt_error (\"Array %s subscript out of bounds.\", a_names[var_name]);\n else\n {\n num_ptr = get_array_num (var_name, idx);\n if (num_ptr != ((void *)0))\n {\n bc_free_num (num_ptr);\n *num_ptr = bc_copy_num (ex_stack->s_num);\n bc_free_num (&ex_stack->s_next->s_num);\n ex_stack->s_next->s_num = ex_stack->s_num;\n bc_init_num (&ex_stack->s_num);\n pop();\n }\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ocb-aes128_prep#nettle_ocb_aes128_set_encrypt_key.c", "codebase": "nettle-3.9.1", "c_file": "ocb-aes128.c", "function": "nettle_ocb_aes128_set_encrypt_key", "sloc": "6", "c_code": "void\nnettle_ocb_aes128_set_encrypt_key (struct ocb_aes128_encrypt_key *ocb_key, const uint8_t *key)\n{\n nettle_aes128_set_encrypt_key (&ocb_key->encrypt, key);\n nettle_ocb_set_key (&ocb_key->ocb, &ocb_key->encrypt, (nettle_cipher_func *) nettle_aes128_encrypt);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#sub_prep#ti_sub.c", "codebase": "tulipindicators-0.9.1", "c_file": "sub.c", "function": "ti_sub", "sloc": "1", "c_code": "int ti_sub(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *in1 = inputs[0]; const double *in2 = inputs[1]; (void)options; double *output = outputs[0]; int i; for (i = 0; i < size; ++i) { output[i] = (in1[i] - in2[i]); } return 0; }\n", "c_constructs": {"pointer_type": 4, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THE_ELEMENT_THAT_APPEARS_ONCE_prep#sort.c", "codebase": "transcoder-set", "c_file": "FIND_THE_ELEMENT_THAT_APPEARS_ONCE.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N.c", "function": "f_gold", "sloc": "9", "c_code": "unsigned int f_gold ( unsigned int n ) {\n unsigned count = 0;\n if ( n && ! ( n & ( n - 1 ) ) ) return n;\n while ( n != 0 ) {\n n >>= 1;\n count += 1;\n }\n return 1 << count;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ocb-aes128_prep#nettle_ocb_aes128_encrypt.c", "codebase": "nettle-3.9.1", "c_file": "ocb-aes128.c", "function": "nettle_ocb_aes128_encrypt", "sloc": "7", "c_code": "void\nnettle_ocb_aes128_encrypt(struct ocb_ctx *ctx, const struct ocb_aes128_encrypt_key *key,\n size_t length, uint8_t *dst, const uint8_t *src)\n{\n nettle_ocb_encrypt (ctx, &key->ocb, &key->encrypt, (nettle_cipher_func *) nettle_aes128_encrypt,\n length, dst, src);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#gzlib_prep#gzoffset64.c", "codebase": "optipng-0.7.8", "c_file": "gzlib.c", "function": "gzoffset64", "sloc": "15", "c_code": "off_t gzoffset64(gzFile file) {\n off_t offset;\n gz_statep state;\n if (file == ((void *)0))\n return -1;\n state = (gz_statep)file;\n if (state->mode != 7247 && state->mode != 31153)\n return -1;\n offset = lseek(state->fd, 0, 1);\n if (offset == -1)\n return -1;\n if (state->mode == 7247)\n offset -= state->strm.avail_in;\n return offset;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_SET_8_MATRIX_CHAIN_MULTIPLICATION_1_prep#main.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_SET_8_MATRIX_CHAIN_MULTIPLICATION_1.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {1,4,11,17,26,33,37,51,62,70,71,73,74,74,81,82,83,90,95,98,98};\nint param0_1[] = {-50,74,-8,2,-24,28,-86,34,-36,92,-70,-98};\nint param0_2[] = {0,0,0,1,1,1,1};\nint param0_3[] = {4,73,3,88,79,40,25,58,39,53,32,20,95,60,60,98,23,95,42,26,95,14,43,97,30,83,29,37,74,72,37,31,32,83,57,40,56,95,8,79,67,62};\nint param0_4[] = {-92,-88,-88,-88,-86,-84,-80,-78,-76,-74,-72,-68,-68,-66,-62,-42,-34,-30,-28,-24,-20,-14,-12,-10,-8,-8,-8,6,10,26,26,36,38,42,46,48,48,54,54,58,60,66,70,76,78,80,82,98};\nint param0_5[] = {1,1,0,1,0,0,1};\nint param0_6[] = {8,25,38,39,41,57,71,89};\nint param0_7[] = {76,-28,20,62,-44,8,-46,52,26,76,22,38,-36,10,2,-86,42,-62,-68,-56,10};\nint param0_8[] = {0,0,0,0,1,1,1};\nint param0_9[] = {98,96,76,76,8,4,53,34,54,10,98,46,58,7,36,72,32,59,52,99,40,52,50,43,26,93,76,90,12,82,31,50,55,34,61,78};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {20,10,3,41,47,4,6,18,5,26};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#FIND_MAXIMUM_PRODUCT_OF_A_TRIPLET_IN_ARRAY_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FIND_MAXIMUM_PRODUCT_OF_A_TRIPLET_IN_ARRAY.c", "function": "f_gold", "sloc": "12", "c_code": "int f_gold ( int arr [ ], int n ) {\n if ( n < 3 ) return - 1;\n int max_product = (-0x7fffffff - 1);\n for ( int i = 0;\n i < n - 2;\n i ++ ) for ( int j = i + 1;\n j < n - 1;\n j ++ ) for ( int k = j + 1;\n k < n;\n k ++ ) max_product = max ( max_product, arr [ i ] * arr [ j ] * arr [ k ] );\n return max_product;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ecc-secp521r1_prep#nettle_get_secp_521r1.c", "codebase": "nettle-3.9.1", "c_file": "ecc-secp521r1.c", "function": "nettle_get_secp_521r1", "sloc": "4", "c_code": "const struct ecc_curve *nettle_get_secp_521r1(void)\n{\n return &_nettle_secp_521r1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "make-4.4.1#default_prep#install_default_suffix_rules.c", "codebase": "make-4.4.1", "c_file": "default.c", "function": "install_default_suffix_rules", "sloc": "20", "c_code": "void\ninstall_default_suffix_rules ()\n{\n const char **s;\n if (no_builtin_rules_flag)\n return;\n for (s = default_suffix_rules; *s != 0; s += 2)\n {\n struct file *f = enter_file (strcache_add (s[0]));\n if (!f->cmds)\n {\n f->cmds = xmalloc (sizeof (struct commands));\n f->cmds->fileinfo.filenm = ((void *)0);\n f->cmds->commands = xstrdup (s[1]);\n f->cmds->command_lines = ((void *)0);\n f->cmds->recipe_prefix = '\\t';\n f->builtin = 1;\n }\n }\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#exec_prep#impl_pred_exec.c", "codebase": "findutils-4.9.0", "c_file": "exec.c", "function": "impl_pred_exec", "sloc": "84", "c_code": "_Bool\nimpl_pred_exec (const char *pathname,\n struct stat *stat_buf,\n struct predicate *pred_ptr)\n{\n struct exec_val *execp = &pred_ptr->args.exec_vec;\n char *buf = ((void *)0);\n const char *target;\n _Bool result;\n const _Bool local = is_exec_in_local_dir (pred_ptr->pred_func);\n const char *prefix;\n size_t pfxlen;\n (void) stat_buf;\n if (local)\n {\n if (!record_exec_dir (execp))\n {\n ((!!sizeof (struct { _Static_assert (1, \"verify_expr (\" \"1\" \", \" \"(error (1, (*__errno_location ()), gettext (\\\"Failed to save working directory in order to \\\" \\\"run a command on %s\\\"), safely_quote_err_filename (0, pathname)), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (1, (*__errno_location ()), gettext (\"Failed to save working directory in order to \" \"run a command on %s\"), safely_quote_err_filename (0, pathname)), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (1, (*__errno_location ()), gettext (\"Failed to save working directory in order to \" \"run a command on %s\"), safely_quote_err_filename (0, pathname)), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n target = buf = base_name (state.rel_pathname);\n if ('/' == target[0])\n {\n prefix = ((void *)0);\n pfxlen = 0;\n }\n else\n {\n prefix = \"./\";\n pfxlen = 2u;\n }\n }\n else\n {\n ((void) sizeof ((execp->wd_for_exec == initial_wd) ? 1 : 0), __extension__ ({ if (execp->wd_for_exec == initial_wd) ; else __assert_fail (\"execp->wd_for_exec == initial_wd\", \"exec.c\", 148, __extension__ __PRETTY_FUNCTION__); }));\n target = pathname;\n prefix = ((void *)0);\n pfxlen = 0u;\n }\n if (execp->multiple)\n {\n bc_push_arg (&execp->ctl,\n &execp->state,\n target, strlen (target)+1,\n prefix, pfxlen,\n 0);\n if (execp->state.todo)\n state.execdirs_outstanding = 1;\n result = 1;\n }\n else\n {\n int i;\n for (i=0; inum_args; ++i)\n {\n bc_do_insert (&execp->ctl,\n &execp->state,\n execp->replace_vec[i],\n strlen (execp->replace_vec[i]),\n prefix, pfxlen,\n target, strlen (target),\n 0);\n }\n bc_do_exec (&execp->ctl, &execp->state);\n if ((((execp->last_child_status) & 0x7f) == 0))\n {\n if (0 == (((execp->last_child_status) & 0xff00) >> 8))\n result = 1;\n else\n result = 0;\n }\n else\n {\n result = 0;\n }\n if (local)\n free_cwd (execp->wd_for_exec);\n }\n if (buf)\n {\n ((void) sizeof ((local) ? 1 : 0), __extension__ ({ if (local) ; else __assert_fail (\"local\", \"exec.c\", 208, __extension__ __PRETTY_FUNCTION__); }));\n free (buf);\n }\n return result;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 2, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 1, "memory_operation": 0, "if_statement": 11, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#pattern_prep#xmlPatternMatch.c", "codebase": "libxml2", "c_file": "pattern.c", "function": "xmlPatternMatch", "sloc": "14", "c_code": "int\nxmlPatternMatch(xmlPatternPtr comp, xmlNodePtr node)\n{\n int ret = 0;\n if ((comp == ((void *)0)) || (node == ((void *)0)))\n return(-1);\n while (comp != ((void *)0)) {\n ret = xmlPatMatch(comp, node);\n if (ret != 0)\n return(ret);\n comp = comp->next;\n }\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_via_prep#osip_via_get_host.c", "codebase": "libosip2-5.3.1", "c_file": "osip_via.c", "function": "osip_via_get_host", "sloc": "5", "c_code": "char *osip_via_get_host(osip_via_t *via) {\n if (via == ((void *)0))\n return ((void *)0);\n return via->host;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_TOTAL_SET_BITS_IN_ALL_NUMBERS_FROM_1_TO_N_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "COUNT_TOTAL_SET_BITS_IN_ALL_NUMBERS_FROM_1_TO_N.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_FACTORS_NUMBER_prep#len.c", "codebase": "transcoder-set", "c_file": "SUM_FACTORS_NUMBER.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_DIVISORS_1_N_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "SUM_DIVISORS_1_N_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#os_interf_c_prep#Pl_Select_5.c", "codebase": "gprolog-1.5.0", "c_file": "os_interf_c.c", "function": "Pl_Select_5", "sloc": "28", "c_code": "Bool\nPl_Select_5(WamWord reads_word, WamWord ready_reads_word,\n WamWord writes_word, WamWord ready_writes_word,\n WamWord time_out_word)\n{\n double time_out;\n struct timeval *p, t;\n fd_set read_set, write_set;\n int max, n;\n max = Select_Init_Set(reads_word, &read_set, 2);\n Pl_Check_For_Un_List(ready_reads_word);\n n = Select_Init_Set(writes_word, &write_set, 3);\n if (n > max)\n max = n;\n Pl_Check_For_Un_List(ready_writes_word);\n time_out = Pl_Rd_Number_Check(time_out_word);\n if (time_out <= 0)\n p = ((void *)0);\n else\n {\n t.tv_sec = (PlLong) (time_out / 1000);\n t.tv_usec = (PlLong) (fmod(time_out, 1000) * 1000);\n p = &t;\n }\n do { int _tst = (select(max + 1, &read_set, &write_set, ((void *)0), p)); if (_tst < 0) { Pl_Os_Error(_tst); return 0; } } while(0);\n return Select_Init_Ready_List(reads_word, &read_set, ready_reads_word) &&\n Select_Init_Ready_List(writes_word, &write_set, ready_writes_word);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tar-1.34#xheader_prep#xheader_finish.c", "codebase": "tar-1.34", "c_file": "xheader.c", "function": "xheader_finish", "sloc": "8", "c_code": "void\nxheader_finish (struct xheader *xhdr)\n{\n struct keyword_list *kp;\n for (kp = keyword_override_list; kp; kp = kp->next)\n code_string (kp->value, kp->pattern, xhdr);\n xhdr->buffer = __extension__ ({ struct obstack *__o1 = (xhdr->stk); void *__value = (void *) __o1->object_base; if (__o1->next_free == __value) __o1->maybe_empty_object = 1; __o1->next_free = ((sizeof (ptrdiff_t) < sizeof (void *) ? (__o1->object_base) : (char *) 0) + (((__o1->next_free) - (sizeof (ptrdiff_t) < sizeof (void *) ? (__o1->object_base) : (char *) 0) + (__o1->alignment_mask)) & ~(__o1->alignment_mask))); if ((size_t) (__o1->next_free - (char *) __o1->chunk) > (size_t) (__o1->chunk_limit - (char *) __o1->chunk)) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; __value; });\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "uucp-1.07#chmod_prep#fsysdep_change_mode.c", "codebase": "uucp-1.07", "c_file": "chmod.c", "function": "fsysdep_change_mode", "sloc": "12", "c_code": "boolean\nfsysdep_change_mode (zfile, imode)\n const char *zfile;\n unsigned int imode;\n{\n if (chmod ((char *) zfile, imode) < 0)\n {\n ulog (LOG_ERROR, \"chmod (%s): %s\", zfile, strerror ((*__errno_location ())));\n return (0);\n }\n return (1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "grep-3.11#searchutils_prep#wordinit.c", "codebase": "grep-3.11", "c_file": "searchutils.c", "function": "wordinit", "sloc": "6", "c_code": "void\nwordinit (void)\n{\n for (int i = 0; i < NCHAR; i++)\n sbwordchar[i] = wordchar (localeinfo.sbctowc[i]);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "cpio-2.14#rtapelib_prep#rmt_ioctl__.c", "codebase": "cpio-2.14", "c_file": "rtapelib.c", "function": "rmt_ioctl__", "sloc": "55", "c_code": "int\nrmt_ioctl__ (int handle, unsigned long int operation, void *argument)\n{\n switch (operation)\n {\n default:\n (*__errno_location ()) = 95;\n return -1;\n case (((1U) << (((0 +8)+8)+14)) | ((('m')) << (0 +8)) | (((1)) << 0) | ((((sizeof(struct mtop)))) << ((0 +8)+8))):\n {\n struct mtop *mtop = argument;\n enum { oplen = (((((sizeof (mtop->mt_op) * 8) - (! ((__typeof__ (mtop->mt_op)) 0 < (__typeof__ (mtop->mt_op)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (mtop->mt_op)) 0 < (__typeof__ (mtop->mt_op)) -1))) };\n enum { countlen = (((((sizeof (mtop->mt_count) * 8) - (! ((__typeof__ (mtop->mt_count)) 0 < (__typeof__ (mtop->mt_count)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (mtop->mt_count)) 0 < (__typeof__ (mtop->mt_count)) -1))) };\n char command_buffer[sizeof \"I\\n\\n\" + oplen + countlen];\n intmax_t count = mtop->mt_count;\n sprintf (command_buffer, \"I%d\\n%jd\\n\", mtop->mt_op, count);\n if (do_command (handle, command_buffer) == -1)\n return -1;\n return get_status (handle);\n }\n case (((2U) << (((0 +8)+8)+14)) | ((('m')) << (0 +8)) | (((2)) << 0) | ((((sizeof(struct mtget)))) << ((0 +8)+8))):\n {\n ssize_t status;\n size_t counter;\n if (do_command (handle, \"S\") == -1\n || (status = get_status (handle), status == -1))\n return -1;\n if (status > sizeof (struct mtop))\n {\n (*__errno_location ()) = 75;\n return -1;\n }\n for (char *p = argument; status > 0; status -= counter, p += counter)\n {\n counter = safe_read ((from_remote[handle][0]), p, status);\n if (counter == ((size_t) -1) || counter == 0)\n {\n _rmt_shutdown (handle, 5);\n return -1;\n }\n }\n struct mtget *mtget = argument;\n if (mtget->mt_type < 256)\n return 0;\n char *buf = argument;\n for (counter = 0; counter < status; counter += 2)\n {\n char copy = buf[counter];\n buf[counter] = buf[counter + 1];\n buf[counter + 1] = copy;\n }\n return 0;\n }\n }\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 2, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 2, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 8, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#eval_prep#elem_new_to_scalar.c", "codebase": "gawk-5.2.2", "c_file": "eval.c", "function": "elem_new_to_scalar", "sloc": "12", "c_code": "NODE *\nelem_new_to_scalar(NODE *n)\n{\n if (n->type != Node_elem_new)\n return n;\n if (n->valref > 1) {\n unref(n);\n return dupnode(Nnull_string);\n }\n n->type = Node_val;\n return n;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "json.h#allow_json5_prep#json_extract_copy_value.c", "codebase": "json.h", "c_file": "allow_json5.c", "function": "json_extract_copy_value", "sloc": "81", "c_code": "void json_extract_copy_value(struct json_extract_state_s *const state,\n const struct json_value_s *const value) {\n struct json_string_s *string;\n struct json_number_s *number;\n struct json_object_s *object;\n struct json_array_s *array;\n struct json_value_s *new_value;\n memcpy(state->dom, value, sizeof(struct json_value_s));\n new_value = (struct json_value_s *)state->dom;\n state->dom += sizeof(struct json_value_s);\n new_value->payload = state->dom;\n if (json_type_string == value->type) {\n memcpy(state->dom, value->payload, sizeof(struct json_string_s));\n string = (struct json_string_s *)state->dom;\n state->dom += sizeof(struct json_string_s);\n memcpy(state->data, string->string, string->string_size + 1);\n string->string = state->data;\n state->data += string->string_size + 1;\n } else if (json_type_number == value->type) {\n memcpy(state->dom, value->payload, sizeof(struct json_number_s));\n number = (struct json_number_s *)state->dom;\n state->dom += sizeof(struct json_number_s);\n memcpy(state->data, number->number, number->number_size);\n number->number = state->data;\n state->data += number->number_size;\n } else if (json_type_object == value->type) {\n struct json_object_element_s *element;\n size_t i;\n memcpy(state->dom, value->payload, sizeof(struct json_object_s));\n object = (struct json_object_s *)state->dom;\n state->dom += sizeof(struct json_object_s);\n element = object->start;\n object->start = (struct json_object_element_s *)state->dom;\n for (i = 0; i < object->length; i++) {\n struct json_value_s *previous_value;\n struct json_object_element_s *previous_element;\n memcpy(state->dom, element, sizeof(struct json_object_element_s));\n element = (struct json_object_element_s *)state->dom;\n state->dom += sizeof(struct json_object_element_s);\n string = element->name;\n memcpy(state->dom, string, sizeof(struct json_string_s));\n string = (struct json_string_s *)state->dom;\n state->dom += sizeof(struct json_string_s);\n element->name = string;\n memcpy(state->data, string->string, string->string_size + 1);\n string->string = state->data;\n state->data += string->string_size + 1;\n previous_value = element->value;\n element->value = (struct json_value_s *)state->dom;\n json_extract_copy_value(state, previous_value);\n previous_element = element;\n element = element->next;\n if (element) {\n previous_element->next = (struct json_object_element_s *)state->dom;\n }\n }\n } else if (json_type_array == value->type) {\n struct json_array_element_s *element;\n size_t i;\n memcpy(state->dom, value->payload, sizeof(struct json_array_s));\n array = (struct json_array_s *)state->dom;\n state->dom += sizeof(struct json_array_s);\n element = array->start;\n array->start = (struct json_array_element_s *)state->dom;\n for (i = 0; i < array->length; i++) {\n struct json_value_s *previous_value;\n struct json_array_element_s *previous_element;\n memcpy(state->dom, element, sizeof(struct json_array_element_s));\n element = (struct json_array_element_s *)state->dom;\n state->dom += sizeof(struct json_array_element_s);\n previous_value = element->value;\n element->value = (struct json_value_s *)state->dom;\n json_extract_copy_value(state, previous_value);\n previous_element = element;\n element = element->next;\n if (element) {\n previous_element->next = (struct json_array_element_s *)state->dom;\n }\n }\n }\n}\n", "c_constructs": {"pointer_type": 8, "array_type": 0, "struct_type": 13, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 30, "memory_management": 0, "memory_operation": 11, "if_statement": 6, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_SUM_MODULO_K_FIRST_N_NATURAL_NUMBER_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "FIND_SUM_MODULO_K_FIRST_N_NATURAL_NUMBER.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json-c#json_util_prep#json_util_get_last_err.c", "codebase": "json-c", "c_file": "json_util.c", "function": "json_util_get_last_err", "sloc": "6", "c_code": "const char *json_util_get_last_err(void)\n{\n if (_last_err[0] == '\\0')\n return ((void *)0);\n return _last_err;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "buffer-0.4.0#test_prep#test_buffer_slice__end.c", "codebase": "buffer-0.4.0", "c_file": "test.c", "function": "test_buffer_slice__end", "sloc": "15", "c_code": "void\ntest_buffer_slice__end() {\n buffer_t *buf = buffer_new_with_copy(\"Tobi Ferret\");\n buffer_t *a = buffer_slice(buf, 5, -1);\n equal(\"Tobi Ferret\", (buf->data));\n equal(\"Ferret\", (a->data));\n buffer_t *b = buffer_slice(buf, 5, -3);\n equal(\"Ferr\", (b->data));\n buffer_t *c = buffer_slice(buf, 8, -1);\n equal(\"ret\", (c->data));\n buffer_free(buf);\n buffer_free(a);\n buffer_free(b);\n buffer_free(c);\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlNewParserCtxt.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlNewParserCtxt", "sloc": "8", "c_code": "PyObject *\nlibxml_xmlNewParserCtxt(PyObject *self __attribute__ ((__unused__)), PyObject *args __attribute__ ((__unused__))) {\n PyObject *py_retval;\n xmlParserCtxtPtr c_retval;\n c_retval = xmlNewParserCtxt();\n py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_LARGE_NUMBER_DIVISIBLE_9_NOT_prep#len.c", "codebase": "transcoder-set", "c_file": "CHECK_LARGE_NUMBER_DIVISIBLE_9_NOT.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_type.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_type", "sloc": "12", "c_code": "int binn_type(void *ptr) {\n binn *item;\n switch (binn_get_ptr_type(ptr)) {\n case 1:\n item = (binn*) ptr;\n return item->type;\n case 2:\n return binn_buf_type(ptr);\n default:\n return -1;\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_www_authenticate_prep#osip_www_authenticate_free.c", "codebase": "libosip2-5.3.1", "c_file": "osip_www_authenticate.c", "function": "osip_www_authenticate_free", "sloc": "16", "c_code": "void osip_www_authenticate_free(osip_www_authenticate_t *www_authenticate) {\n if (www_authenticate == ((void *)0))\n return;\n { if (www_authenticate->auth_type != ((void *)0)) { if (osip_free_func) osip_free_func(www_authenticate->auth_type); else free(www_authenticate->auth_type); } };\n { if (www_authenticate->realm != ((void *)0)) { if (osip_free_func) osip_free_func(www_authenticate->realm); else free(www_authenticate->realm); } };\n { if (www_authenticate->domain != ((void *)0)) { if (osip_free_func) osip_free_func(www_authenticate->domain); else free(www_authenticate->domain); } };\n { if (www_authenticate->nonce != ((void *)0)) { if (osip_free_func) osip_free_func(www_authenticate->nonce); else free(www_authenticate->nonce); } };\n { if (www_authenticate->opaque != ((void *)0)) { if (osip_free_func) osip_free_func(www_authenticate->opaque); else free(www_authenticate->opaque); } };\n { if (www_authenticate->stale != ((void *)0)) { if (osip_free_func) osip_free_func(www_authenticate->stale); else free(www_authenticate->stale); } };\n { if (www_authenticate->algorithm != ((void *)0)) { if (osip_free_func) osip_free_func(www_authenticate->algorithm); else free(www_authenticate->algorithm); } };\n { if (www_authenticate->qop_options != ((void *)0)) { if (osip_free_func) osip_free_func(www_authenticate->qop_options); else free(www_authenticate->qop_options); } };\n { if (www_authenticate->version != ((void *)0)) { if (osip_free_func) osip_free_func(www_authenticate->version); else free(www_authenticate->version); } };\n { if (www_authenticate->targetname != ((void *)0)) { if (osip_free_func) osip_free_func(www_authenticate->targetname); else free(www_authenticate->targetname); } };\n { if (www_authenticate->gssapi_data != ((void *)0)) { if (osip_free_func) osip_free_func(www_authenticate->gssapi_data); else free(www_authenticate->gssapi_data); } };\n { if (www_authenticate != ((void *)0)) { if (osip_free_func) osip_free_func(www_authenticate); else free(www_authenticate); } };\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 13, "memory_management": 12, "memory_operation": 0, "if_statement": 13, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cpio-2.14#tar_prep#tar_checksum.c", "codebase": "cpio-2.14", "c_file": "tar.c", "function": "tar_checksum", "sloc": "18", "c_code": "unsigned int\ntar_checksum (struct tar_header *tar_hdr)\n{\n unsigned int sum = 0;\n char *p = (char *) tar_hdr;\n char *q = p + 512;\n int i;\n while (p < tar_hdr->chksum)\n sum += *p++ & 0xff;\n for (i = 0; i < 8; ++i)\n {\n sum += ' ';\n ++p;\n }\n while (p < q)\n sum += *p++ & 0xff;\n return sum;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngerror_prep#png_formatted_warning.c", "codebase": "optipng-0.7.8", "c_file": "pngerror.c", "function": "png_formatted_warning", "sloc": "31", "c_code": "void\npng_formatted_warning(png_const_structrp png_ptr, png_warning_parameters p,\n png_const_charp message)\n{\n size_t i = 0;\n char msg[192];\n while (i<(sizeof msg)-1 && *message != '\\0')\n {\n if (p != ((void *)0) && *message == '@' && message[1] != '\\0')\n {\n int parameter_char = *++message;\n static const char valid_parameters[] = \"123456789\";\n int parameter = 0;\n while (valid_parameters[parameter] != parameter_char &&\n valid_parameters[parameter] != '\\0')\n ++parameter;\n if (parameter < 8)\n {\n png_const_charp parm = p[parameter];\n png_const_charp pend = p[parameter] + (sizeof p[parameter]);\n while (i<(sizeof msg)-1 && *parm != '\\0' && parm < pend)\n msg[i++] = *parm++;\n ++message;\n continue;\n }\n }\n msg[i++] = *message++;\n }\n msg[i] = '\\0';\n png_warning(png_ptr, msg);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 3, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Rd_Codes_Str_Check.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Rd_Codes_Str_Check", "sloc": "25", "c_code": "int\nPl_Rd_Codes_Str_Check(WamWord start_word, char *str)\n{\n WamWord word, tag_mask;\n WamWord save_start_word;\n WamWord *lst_adr;\n int n = 0;\n save_start_word = start_word;\n for (;;)\n {\n do { WamWord deref_last_word; word = start_word; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0);\n if (tag_mask == (PlULong)0)\n Pl_Err_Instantiation();\n if (word == (((PlLong) (256) << 3) + ((PlULong)0x3)))\n break;\n if (tag_mask != (PlULong)0x1)\n Pl_Err_Type(pl_type_list, save_start_word);\n lst_adr = ((WamWord *) ((word) & (PlULong)0xfffffffffffffff8));\n *str++ = Pl_Rd_Code_Check((((WamWord *) lst_adr)[0]));\n n++;\n start_word = (((WamWord *) lst_adr)[0 +1]);\n }\n *str = '\\0';\n return n;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 2}}, {"id": "transcoder-set#FIND_A_ROTATION_WITH_MAXIMUM_HAMMING_DISTANCE_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "FIND_A_ROTATION_WITH_MAXIMUM_HAMMING_DISTANCE.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsDingbats.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsDingbats", "sloc": "4", "c_code": "int\nxmlUCSIsDingbats(int code) {\n return(((code >= 0x2700) && (code <= 0x27BF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#trees_prep#_tr_tally.c", "codebase": "optipng-0.7.8", "c_file": "trees.c", "function": "_tr_tally", "sloc": "15", "c_code": "int _tr_tally(deflate_state *s, unsigned dist, unsigned lc) {\n s->sym_buf[s->sym_next++] = (uch)dist;\n s->sym_buf[s->sym_next++] = (uch)(dist >> 8);\n s->sym_buf[s->sym_next++] = (uch)lc;\n if (dist == 0) {\n s->dyn_ltree[lc].fc.freq++;\n } else {\n s->matches++;\n dist--;\n ;\n s->dyn_ltree[_length_code[lc] + 256 + 1].fc.freq++;\n s->dyn_dtree[((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])].fc.freq++;\n }\n return (s->sym_next == s->sym_end);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#eval_prep#opcode2str.c", "codebase": "gawk-5.2.2", "c_file": "eval.c", "function": "opcode2str", "sloc": "8", "c_code": "const char *\nopcode2str(OPCODE op)\n{\n if (op >= Op_illegal && op < Op_final)\n return optypes[(int) op].desc;\n (*(set_loc(\"eval.c\", 416), r_fatal))(gettext(\"unknown opcode %d\"), (int) op);\n return ((void *)0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#AREA_SQUARE_CIRCUMSCRIBED_CIRCLE_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "AREA_SQUARE_CIRCUMSCRIBED_CIRCLE.c", "function": "f_gold", "sloc": "3", "c_code": "int f_gold ( int r ) {\n return ( 2 * r * r );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#msg_prep#err.c", "codebase": "gawk-5.2.2", "c_file": "msg.c", "function": "err", "sloc": "59", "c_code": "void\nerr(_Bool isfatal, const char *s, const char *emsg, va_list argp)\n{\n char *file;\n const char *me;\n static _Bool first = 1;\n static _Bool add_src_info = 0;\n static long lineno_val = 0;\n if (first) {\n first = 0;\n add_src_info = (getenv(\"GAWK_MSG_SRC\") != ((void *)0));\n if (! (do_flags & DO_TRADITIONAL)) {\n NODE *n = lookup(\"LINENO\");\n if (n != ((void *)0) && n->type == Node_var)\n lineno_val = (!(((n->sub.nodep.l.lptr))->flags & (MPFN|MPZN)) ? ((double) (n->sub.nodep.l.lptr)->sub.val.nm.fltnum) : ((((n->sub.nodep.l.lptr))->flags & MPFN) ? (mpfr_get_d((n->sub.nodep.l.lptr)->sub.val.nm.mpnum, ROUND_MODE)) : (__gmpz_get_d((n->sub.nodep.l.lptr)->sub.val.nm.mpi))));\n }\n }\n (void) fflush(output_fp);\n me = myname;\n (void) fprintf(stderr, \"%s: \", me);\n if (srcfile != ((void *)0) && add_src_info) {\n fprintf(stderr, \"%s:%d:\", srcfile, srcline);\n srcfile = ((void *)0);\n }\n if (sourceline > 0) {\n if (source != ((void *)0))\n (void) fprintf(stderr, \"%s:\", source);\n else\n (void) fprintf(stderr, gettext(\"cmd. line:\"));\n (void) fprintf(stderr, \"%ld: \", sourceline + lineno_val);\n }\n if (FNR_node && FNR_node->sub.nodep.l.lptr && (((FNR_node->sub.nodep.l.lptr)->flags & (MPZN|MPFN)) != 0)) {\n NODE *val;\n val = mpg_update_var(FNR_node);\n ((void) (0));\n if (((val->sub.val.nm.mpi)->_mp_size < 0 ? -1 : (val->sub.val.nm.mpi)->_mp_size > 0) > 0) {\n int len = FILENAME_node->sub.nodep.l.lptr->sub.val.slen;\n file = FILENAME_node->sub.nodep.l.lptr->sub.val.sp;\n (void) putc('(', stderr);\n if (file)\n (void) fprintf(stderr, \"FILENAME=%.*s \", len, file);\n (void) __gmpfr_fprintf(stderr, \"FNR=%Zd) \", val->sub.val.nm.mpi);\n }\n } else\n if (FNR > 0) {\n int len = FILENAME_node->sub.nodep.l.lptr->sub.val.slen;\n file = FILENAME_node->sub.nodep.l.lptr->sub.val.sp;\n (void) putc('(', stderr);\n if (file)\n (void) fprintf(stderr, \"FILENAME=%.*s \", len, file);\n (void) fprintf(stderr, \"FNR=%ld) \", FNR);\n }\n (void) fprintf(stderr, \"%s\", s);\n vfprintf(stderr, emsg, argp);\n (void) fprintf(stderr, \"\\n\");\n (void) fflush(stderr);\n if (isfatal)\n gawk_exit(2);\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 21, "memory_management": 0, "memory_operation": 0, "if_statement": 12, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM_prep#sort.c", "codebase": "transcoder-set", "c_file": "PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#sbstrans_prep#findvar.c", "codebase": "dap-3.10", "c_file": "sbstrans.c", "function": "findvar", "sloc": "12", "c_code": "int findvar(char *varname, char var[][127 + 1], int nvars)\n{\n int v;\n for (v = 0; v < nvars; v++)\n {\n if (!linecmp(varname, var[v]))\n break;\n }\n if (v < 512 - 1)\n strcpy(var[v], varname);\n return v;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#globals_prep#xmlCleanupGlobals.c", "codebase": "libxml2", "c_file": "globals.c", "function": "xmlCleanupGlobals", "sloc": "2", "c_code": "void xmlCleanupGlobals(void) {\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_TWO_GIVEN_CIRCLES_TOUCH_INTERSECT_prep#len.c", "codebase": "transcoder-set", "c_file": "CHECK_TWO_GIVEN_CIRCLES_TOUCH_INTERSECT.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "make-4.4.1#variable_prep#merge_variable_set_lists.c", "codebase": "make-4.4.1", "c_file": "variable.c", "function": "merge_variable_set_lists", "sloc": "34", "c_code": "void\nmerge_variable_set_lists (struct variable_set_list **setlist0,\n struct variable_set_list *setlist1)\n{\n struct variable_set_list *to = *setlist0;\n struct variable_set_list *last0 = 0;\n if (!setlist1 || setlist1 == &global_setlist)\n return;\n if (to)\n {\n while (to != &global_setlist)\n {\n if (to == setlist1)\n return;\n to = to->next;\n }\n to = *setlist0;\n while (setlist1 != &global_setlist && to != &global_setlist)\n {\n struct variable_set_list *from = setlist1;\n setlist1 = setlist1->next;\n merge_variable_sets (to->set, from->set);\n last0 = to;\n to = to->next;\n }\n }\n if (setlist1 != &global_setlist)\n {\n if (last0 == 0)\n *setlist0 = setlist1;\n else\n last0->next = setlist1;\n }\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 4, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlXPathNsLookup.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlXPathNsLookup", "sloc": "14", "c_code": "PyObject *\nlibxml_xmlXPathNsLookup(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n const xmlChar * c_retval;\n xmlXPathContextPtr ctxt;\n PyObject *pyobj_ctxt;\n xmlChar * prefix;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Oz:xmlXPathNsLookup\", &pyobj_ctxt, &prefix))\n return(((void *)0));\n ctxt = (xmlXPathContextPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlXPathContext_Object *)(pyobj_ctxt))->obj));\n c_retval = xmlXPathNsLookup(ctxt, prefix);\n py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_LARGEST_PRIME_FACTOR_NUMBER_prep#min.c", "codebase": "transcoder-set", "c_file": "FIND_LARGEST_PRIME_FACTOR_NUMBER.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_contact_prep#osip_message_set_contact.c", "codebase": "libosip2-5.3.1", "c_file": "osip_contact.c", "function": "osip_message_set_contact", "sloc": "17", "c_code": "int osip_message_set_contact(osip_message_t *sip, const char *hvalue) {\n int i;\n osip_contact_t *contact;\n if (hvalue == ((void *)0) || hvalue[0] == '\\0')\n return 0;\n i = osip_contact_init(&contact);\n if (i != 0)\n return i;\n i = osip_contact_parse(contact, hvalue);\n if (i != 0) {\n osip_contact_free(contact);\n return i;\n }\n sip->message_property = 2;\n osip_list_add(&sip->contacts, contact, -1);\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#N_TH_TERM_SERIES_2_12_36_80_150_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "N_TH_TERM_SERIES_2_12_36_80_150.c", "function": "f_gold", "sloc": "3", "c_code": "int f_gold ( int n ) {\n return ( n * n ) + ( n * n * n );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlsave_prep#xmlBufAttrSerializeTxtContent.c", "codebase": "libxml2", "c_file": "xmlsave.c", "function": "xmlBufAttrSerializeTxtContent", "sloc": "9", "c_code": "void\nxmlBufAttrSerializeTxtContent(xmlOutputBufferPtr buf, xmlDocPtr doc,\n const xmlChar *string)\n{\n int flags = (1u << 0);\n if ((doc == ((void *)0)) || (doc->encoding == ((void *)0)))\n flags |= (1u << 1);\n xmlSerializeText(buf, string, flags);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#INTEGER_POSITIVE_VALUE_POSITIVE_NEGATIVE_VALUE_ARRAY_1_prep#main.c", "codebase": "transcoder-set", "c_file": "INTEGER_POSITIVE_VALUE_POSITIVE_NEGATIVE_VALUE_ARRAY_1.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {49,98};\nint param0_1[] = {82,66,-68,24,-10};\nint param0_2[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1};\nint param0_3[] = {56,3,18,5,20,56,47,29,60,98,60,40,42,2,54,56,91,8,93,14,31,27,61,49,23,12,71};\nint param0_4[] = {-94,-94,-92,-86,-50,-48,-6,8,28,40,44,58,62,72,94};\nint param0_5[] = {0,0,1,0,1,0,1,1,1,0,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,0,0,1,1,1,0,1,0,1};\nint param0_6[] = {16,56,56};\nint param0_7[] = {74,-90,-92,30,-18,66,-66,22};\nint param0_8[] = {0,0,0,1,1,1,1,1,1,1,1,1,1,1};\nint param0_9[] = {21,64,82,78,30,34,35};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {1,2,8,25,12,36,1,5,7,5};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Rd_Integer_Check.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Rd_Integer_Check", "sloc": "11", "c_code": "PlLong\nPl_Rd_Integer_Check(WamWord start_word)\n{\n WamWord word, tag_mask;\n do { WamWord deref_last_word; word = start_word; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0);\n if (tag_mask == (PlULong)0)\n Pl_Err_Instantiation();\n if (tag_mask != (PlULong)0x7)\n Pl_Err_Type(pl_type_integer, word);\n return ((PlLong) ((word) << 0) >> 3);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "tulipindicators-0.9.1#lag_prep#ti_lag_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "lag.c", "function": "ti_lag_start", "sloc": "3", "c_code": "int ti_lag_start(double const *options) {\n return (int)options[0];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#acls_prep#AclLinkUser.c", "codebase": "screen-4.9.0", "c_file": "acls.c", "function": "AclLinkUser", "sloc": "20", "c_code": "int\nAclLinkUser(from, to)\nchar *from, *to;\n{\n struct acluser **u1, **u2;\n struct aclusergroup **g;\n if (!*(u1 = FindUserPtr(from)) && UserAdd(from, ((void *)0), u1))\n return -1;\n if (!*(u2 = FindUserPtr(to)) && UserAdd(to, ((void *)0), u2))\n return -1;\n if (*FindGroupPtr(&(*u2)->u_group, *u1, 1))\n return 1;\n if (*(g = FindGroupPtr(&(*u1)->u_group, *u2, 0)))\n return 2;\n if (!(*g = (struct aclusergroup *)malloc(sizeof(struct aclusergroup))))\n return -1;\n (*g)->u = (*u2);\n (*g)->next = ((void *)0);\n return 0;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 1, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#wam2ma_prep#F_put_list.c", "codebase": "gprolog-1.5.0", "c_file": "wam2ma.c", "function": "F_put_list", "sloc": "7", "c_code": "void\nF_put_list(ArgVal arg[])\n{\n ArgVal *top = arg; PlLong a; ((a) = *((PlLong *) (top)) , (top)++);\n Inst_Printf(\"call_c\", \"Pl_Put_List()\");\n Inst_Printf(\"move_ret\", \"X(%\" \"l\" \"d\" \")\", a);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#winio_prep#convert_to_control.c", "codebase": "nano-7.2", "c_file": "winio.c", "function": "convert_to_control", "sloc": "16", "c_code": "int convert_to_control(int kbinput)\n{\n if ('@' <= kbinput && kbinput <= '_')\n return kbinput - '@';\n if ('`' <= kbinput && kbinput <= '~')\n return kbinput - '`';\n if ('3' <= kbinput && kbinput <= '7')\n return kbinput - 24;\n if (kbinput == '?' || kbinput == '8')\n return 0x7F;\n if (kbinput == ' ' || kbinput == '2')\n return 0;\n if (kbinput == '/')\n return 31;\n return kbinput;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 7, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#rcsutil_prep#redefined.c", "codebase": "rcs-5.10.1", "c_file": "rcsutil.c", "function": "redefined", "sloc": "5", "c_code": "void\nredefined (int c)\n{\n generic_warn (((void *)0), \"redefinition of -%c option\", c);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "grep-3.11#dfasearch_prep#dfawarn.c", "codebase": "grep-3.11", "c_file": "dfasearch.c", "function": "dfawarn", "sloc": "5", "c_code": "void\ndfawarn (char const *mesg)\n{\n error (0, 0, gettext(\"warning: %s\"), mesg);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#misc_prep#savedir_diag.c", "codebase": "tar-1.34", "c_file": "misc.c", "function": "savedir_diag", "sloc": "11", "c_code": "void\nsavedir_diag (char const *name)\n{\n if (ignore_failed_read_option)\n {\n if ((warning_option & (0x00800000)))\n savedir_warn (name);\n }\n else\n savedir_error (name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Fast_Not.c", "codebase": "gprolog-1.5.0", "c_file": "arith_inl_c.c", "function": "Pl_Fct_Fast_Not", "sloc": "6", "c_code": "WamWord\nPl_Fct_Fast_Not(WamWord x)\n{\n PlLong vx = ((PlLong) ((x) << 0) >> 3);\n return (((PlULong) (~vx) << 3) | (PlULong)0x7);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#K_NUMBERS_DIFFERENCE_MAXIMUM_MINIMUM_K_NUMBER_MINIMIZED_prep#min.c", "codebase": "transcoder-set", "c_file": "K_NUMBERS_DIFFERENCE_MAXIMUM_MINIMUM_K_NUMBER_MINIMIZED.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#tccgen_prep#gaddrof.c", "codebase": "tinycc", "c_file": "tccgen.c", "function": "gaddrof", "sloc": "6", "c_code": "void gaddrof(void)\n{\n vtop->r &= ~0x0100;\n if ((vtop->r & 0x003f) == 0x0031)\n vtop->r = (vtop->r & ~(0x003f | (0x1000 | 0x2000 | 0x4000))) | 0x0032 | 0x0100;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "heman#vec2_prep#kmVec2Normalize.c", "codebase": "heman", "c_file": "vec2.c", "function": "kmVec2Normalize", "sloc": "12", "c_code": "kmVec2* kmVec2Normalize(kmVec2* pOut, const kmVec2* pIn)\n{\n if (!pIn->x && !pIn->y)\n return kmVec2Assign(pOut, pIn);\n float l = 1.0f / kmVec2Length(pIn);\n kmVec2 v;\n v.x = pIn->x * l;\n v.y = pIn->y * l;\n pOut->x = v.x;\n pOut->y = v.y;\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Mk_In_Code.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Mk_In_Code", "sloc": "5", "c_code": "WamWord\nPl_Mk_In_Code(int value)\n{\n return Pl_Put_Integer(value);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#debugXML_prep#xmlDebugDumpOneNode.c", "codebase": "libxml2", "c_file": "debugXML.c", "function": "xmlDebugDumpOneNode", "sloc": "11", "c_code": "void\nxmlDebugDumpOneNode(FILE * output, xmlNodePtr node, int depth)\n{\n xmlDebugCtxt ctxt;\n if (output == ((void *)0)) return;\n xmlCtxtDumpInitCtxt(&ctxt);\n ctxt.output = output;\n ctxt.depth = depth;\n xmlCtxtDumpOneNode(&ctxt, node);\n xmlCtxtDumpCleanCtxt(&ctxt);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#WRITE_A_C_PROGRAM_TO_FIND_THE_PARITY_OF_AN_UNSIGNED_INTEGER_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "WRITE_A_C_PROGRAM_TO_FIND_THE_PARITY_OF_AN_UNSIGNED_INTEGER.c", "function": "f_filled", "sloc": "1", "c_code": "_Bool f_filled ( unsigned int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#sin_prep#ti_sin.c", "codebase": "tulipindicators-0.9.1", "c_file": "sin.c", "function": "ti_sin", "sloc": "1", "c_code": "int ti_sin(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] = (sin(in1[i])); } return 0; }\n", "c_constructs": {"pointer_type": 3, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_map_get_value.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_map_get_value", "sloc": "13", "c_code": "BOOL binn_map_get_value(void* ptr, int id, binn *value) {\n int type, count, size=0, header_size;\n unsigned char *p;\n ptr = binn_ptr(ptr);\n if ((ptr == 0) || (value == 0)) return 0;\n if (IsValidBinnHeader(ptr, &type, &count, &size, &header_size) == 0) return 0;\n if (type != 0xE1) return 0;\n if (count == 0) return 0;\n p = (unsigned char *) ptr;\n p = SearchForID(p, header_size, size, count, id);\n if (p == 0) return 0;\n return GetValue(p, value);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 0}}, {"id": "transcoder-set#GCD_ELEMENTS_GIVEN_RANGE_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "GCD_ELEMENTS_GIVEN_RANGE.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n, int m ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "indent-2.2.13#output_prep#count_columns.c", "codebase": "indent-2.2.13", "c_file": "output.c", "function": "count_columns", "sloc": "26", "c_code": "int count_columns (\n int column,\n char *bp,\n int stop_char)\n{\n while (*bp != stop_char && *bp != '\\0')\n {\n switch (*bp++)\n {\n case '\\n':\n case '\\f':\n column = 1;\n break;\n case '\\t':\n column += settings.tabsize - (column - 1) % settings.tabsize;\n break;\n case 010:\n --column;\n break;\n default:\n ++column;\n break;\n }\n }\n return column;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 4}}, {"id": "libxml2#buf_prep#xmlBufferCreateStatic.c", "codebase": "libxml2", "c_file": "buf.c", "function": "xmlBufferCreateStatic", "sloc": "6", "c_code": "xmlBufferPtr\nxmlBufferCreateStatic(void *mem, size_t size) {\n xmlBufferPtr buf = xmlBufferCreateSize(size);\n xmlBufferAdd(buf, mem, size);\n return(buf);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "ed-1.19#main_loop_prep#unmark_line_node.c", "codebase": "ed-1.19", "c_file": "main_loop.c", "function": "unmark_line_node", "sloc": "7", "c_code": "void unmark_line_node( const line_t * const lp )\n {\n int i;\n for( i = 0; markno && i < 26; ++i )\n if( mark[i] == lp )\n { mark[i] = 0; --markno; }\n }\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_OCTAL_DECIMAL_CONVERSION_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "PROGRAM_OCTAL_DECIMAL_CONVERSION.c", "function": "f_gold", "sloc": "13", "c_code": "int f_gold ( int n ) {\n int num = n;\n int dec_value = 0;\n int base = 1;\n int temp = num;\n while ( temp ) {\n int last_digit = temp % 10;\n temp = temp / 10;\n dec_value += last_digit * base;\n base = base * 8;\n }\n return dec_value;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#rmt_prep#xalloc_die.c", "codebase": "tar-1.34", "c_file": "rmt.c", "function": "xalloc_die", "sloc": "6", "c_code": "void\nxalloc_die (void)\n{\n rmt_error (12);\n exit (1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#mh_prep#SetFixedVars.c", "codebase": "mcsim-6.2.0", "c_file": "mh.c", "function": "SetFixedVars", "sloc": "12", "c_code": "void SetFixedVars (PLEVEL plevel)\n{\n long n;\n PVARMOD pFVar;\n for (n = 0; n < plevel->nFixedVars; n++) {\n pFVar = plevel->rgpFixedVars[n];\n if (IsInput (pFVar->hvar))\n SetInput (pFVar->hvar, pFVar->uvar.pifn);\n else\n SetVar (pFVar->hvar, pFVar->uvar.dVal);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#trees_prep#_tr_stored_block.c", "codebase": "optipng-0.7.8", "c_file": "trees.c", "function": "_tr_stored_block", "sloc": "10", "c_code": "void _tr_stored_block(deflate_state *s, charf *buf,\n ulg stored_len, int last) {\n { int len = 3; if (s->bi_valid > (int)16 - len) { int val = (int)(0<<1) + last; s->bi_buf |= (ush)val << s->bi_valid; { {s->pending_buf[s->pending++] = (Bytef)((uch)((s->bi_buf) & 0xff));}; {s->pending_buf[s->pending++] = (Bytef)((uch)((ush)(s->bi_buf) >> 8));}; }; s->bi_buf = (ush)val >> (16 - s->bi_valid); s->bi_valid += len - 16; } else { s->bi_buf |= (ush)((0<<1) + last) << s->bi_valid; s->bi_valid += len; }};\n bi_windup(s);\n { {s->pending_buf[s->pending++] = (Bytef)((uch)(((ush)stored_len) & 0xff));}; {s->pending_buf[s->pending++] = (Bytef)((uch)((ush)((ush)stored_len) >> 8));}; };\n { {s->pending_buf[s->pending++] = (Bytef)((uch)(((ush)~stored_len) & 0xff));}; {s->pending_buf[s->pending++] = (Bytef)((uch)((ush)((ush)~stored_len) >> 8));}; };\n if (stored_len)\n memcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len);\n s->pending += stored_len;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#globals_prep#xmlThrDefBufferAllocScheme.c", "codebase": "libxml2", "c_file": "globals.c", "function": "xmlThrDefBufferAllocScheme", "sloc": "4", "c_code": "xmlBufferAllocationScheme\nxmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v __attribute__((unused))) {\n return xmlBufferAllocScheme;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#utils_prep#vec_append.c", "codebase": "wget-1.21.4", "c_file": "utils.c", "function": "vec_append", "sloc": "17", "c_code": "char **\nvec_append (char **vec, const char *str)\n{\n int cnt;\n if (vec != ((void *)0))\n {\n for (cnt = 0; vec[cnt]; cnt++)\n ;\n ++cnt;\n }\n else\n cnt = 1;\n vec = xrealloc (vec, (cnt + 1) * sizeof (char *));\n vec[cnt - 1] = xstrdup (str);\n vec[cnt] = ((void *)0);\n return vec;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#prote_prep#festart.c", "codebase": "uucp-1.07", "c_file": "prote.c", "function": "festart", "sloc": "14", "c_code": "boolean\nfestart (qdaemon, pzlog)\n struct sdaemon *qdaemon;\n char **pzlog;\n{\n *pzlog = ((void *)0);\n if (! fconn_set (qdaemon->qconn, PARITYSETTING_NONE,\n STRIPSETTING_EIGHTBITS, XONXOFF_OFF))\n return (0);\n zEbuf = (char *) xmalloc (((16384) / 2));\n fEfile = (0);\n usysdep_sleep (2);\n return (1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tmux#colour_prep#colour_find_rgb.c", "codebase": "tmux", "c_file": "colour.c", "function": "colour_find_rgb", "sloc": "24", "c_code": "int\ncolour_find_rgb(u_char r, u_char g, u_char b)\n{\n static const int q2c[6] = { 0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff };\n int qr, qg, qb, cr, cg, cb, d, idx;\n int grey_avg, grey_idx, grey;\n qr = colour_to_6cube(r); cr = q2c[qr];\n qg = colour_to_6cube(g); cg = q2c[qg];\n qb = colour_to_6cube(b); cb = q2c[qb];\n if (cr == r && cg == g && cb == b)\n return ((16 + (36 * qr) + (6 * qg) + qb) | 0x01000000);\n grey_avg = (r + g + b) / 3;\n if (grey_avg > 238)\n grey_idx = 23;\n else\n grey_idx = (grey_avg - 3) / 10;\n grey = 8 + (10 * grey_idx);\n d = colour_dist_sq(cr, cg, cb, r, g, b);\n if (colour_dist_sq(grey, grey, grey, r, g, b) < d)\n idx = 232 + grey_idx;\n else\n idx = 16 + (36 * qr) + (6 * qg) + qb;\n return (idx | 0x01000000);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ecc-secp384r1_prep#nettle_get_secp_384r1.c", "codebase": "nettle-3.9.1", "c_file": "ecc-secp384r1.c", "function": "nettle_get_secp_384r1", "sloc": "4", "c_code": "const struct ecc_curve *nettle_get_secp_384r1(void)\n{\n return &_nettle_secp_384r1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#session_prep#session_detach.c", "codebase": "tmux", "c_file": "session.c", "function": "session_detach", "sloc": "18", "c_code": "int\nsession_detach(struct session *s, struct winlink *wl)\n{\n if (s->curw == wl &&\n session_last(s) != 0 &&\n session_previous(s, 0) != 0)\n session_next(s, 0);\n wl->flags &= ~(0x1|0x2|0x4);\n notify_session_window(\"window-unlinked\", s, wl->window);\n winlink_stack_remove(&s->lastw, wl);\n winlink_remove(&s->windows, wl);\n session_group_synchronize_from(s);\n if (((&s->windows)->rbh_root == ((void *)0))) {\n session_destroy(s, __func__);\n return (1);\n }\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THE_MISSING_NUMBER_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "FIND_THE_MISSING_NUMBER_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#base64-decode_prep#nettle_base64_decode_final.c", "codebase": "nettle-3.9.1", "c_file": "base64-decode.c", "function": "nettle_base64_decode_final", "sloc": "5", "c_code": "int\nnettle_base64_decode_final(struct base64_decode_ctx *ctx)\n{\n return ctx->bits == 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#regex_prep#re_match.c", "codebase": "gawk-5.2.2", "c_file": "regex.c", "function": "re_match", "sloc": "6", "c_code": "regoff_t\nre_match (struct re_pattern_buffer *bufp, const char *string, Idx length,\n Idx start, struct re_registers *regs)\n{\n return re_search_stub (bufp, string, length, start, 0, length, regs, 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#WRITE_A_C_PROGRAM_TO_FIND_THE_PARITY_OF_AN_UNSIGNED_INTEGER_prep#max.c", "codebase": "transcoder-set", "c_file": "WRITE_A_C_PROGRAM_TO_FIND_THE_PARITY_OF_AN_UNSIGNED_INTEGER.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#ifile_prep#getoff_ifile.c", "codebase": "less-633", "c_file": "ifile.c", "function": "getoff_ifile", "sloc": "9", "c_code": "void* getoff_ifile(void* ifile)\n{\n void* newifile;\n if ((newifile = prev_ifile(ifile)) != ((void*)((void *)0)))\n return (newifile);\n if ((newifile = next_ifile(ifile)) != ((void*)((void *)0)))\n return (newifile);\n return (((void*)((void *)0)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "patch-2.7.6#fd-safer_prep#fd_safer.c", "codebase": "patch-2.7.6", "c_file": "fd-safer.c", "function": "fd_safer", "sloc": "13", "c_code": "int\nfd_safer (int fd)\n{\n if (0 <= fd && fd <= 2)\n {\n int f = dup_safer (fd);\n int e = (*__errno_location ());\n close (fd);\n (*__errno_location ()) = e;\n fd = f;\n }\n return fd;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_www_authenticate_prep#osip_www_authenticate_set_nonce.c", "codebase": "libosip2-5.3.1", "c_file": "osip_www_authenticate.c", "function": "osip_www_authenticate_set_nonce", "sloc": "3", "c_code": "void osip_www_authenticate_set_nonce(osip_www_authenticate_t *www_authenticate, char *nonce) {\n www_authenticate->nonce = (char *) nonce;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#layout_prep#layout_fix_offsets.c", "codebase": "tmux", "c_file": "layout.c", "function": "layout_fix_offsets", "sloc": "25", "c_code": "void\nlayout_fix_offsets(struct layout_cell *lc)\n{\n struct layout_cell *lcchild;\n u_int xoff, yoff;\n if (lc->type == LAYOUT_LEFTRIGHT) {\n xoff = lc->xoff;\n for((lcchild) = ((&lc->cells)->tqh_first); (lcchild) != ((void *)0); (lcchild) = ((lcchild)->entry.tqe_next)) {\n lcchild->xoff = xoff;\n lcchild->yoff = lc->yoff;\n if (lcchild->type != LAYOUT_WINDOWPANE)\n layout_fix_offsets(lcchild);\n xoff += lcchild->sx + 1;\n }\n } else {\n yoff = lc->yoff;\n for((lcchild) = ((&lc->cells)->tqh_first); (lcchild) != ((void *)0); (lcchild) = ((lcchild)->entry.tqe_next)) {\n lcchild->xoff = lc->xoff;\n lcchild->yoff = yoff;\n if (lcchild->type != LAYOUT_WINDOWPANE)\n layout_fix_offsets(lcchild);\n yoff += lcchild->sy + 1;\n }\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "less-633#main_prep#skipsp.c", "codebase": "less-633", "c_file": "main.c", "function": "skipsp", "sloc": "6", "c_code": "char * skipsp(char *s)\n{\n while (*s == ' ' || *s == '\\t')\n s++;\n return (s);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#ratio_prep#opng_ulratio_to_factor_string.c", "codebase": "optipng-0.7.8", "c_file": "ratio.c", "function": "opng_ulratio_to_factor_string", "sloc": "8", "c_code": "int\nopng_ulratio_to_factor_string(char *buffer, size_t buffer_size,\n const struct opng_ulratio *ratio)\n{\n opng_uxlong_impl_t num = ratio->num;\n opng_uxlong_impl_t denom = ratio->denom;\n return opng_sprint_uratio_impl(buffer, buffer_size, num, denom, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "brotli-1.0.9#cluster_prep#BrotliCompareAndPushToQueueDistance.c", "codebase": "brotli-1.0.9", "c_file": "cluster.c", "function": "BrotliCompareAndPushToQueueDistance", "sloc": "4", "c_code": "__attribute__ ((visibility (\"hidden\"))) void BrotliCompareAndPushToQueueDistance(\n const HistogramDistance* out, const uint32_t* cluster_size, uint32_t idx1,\n uint32_t idx2, size_t max_num_pairs, HistogramPair* pairs,\n size_t* num_pairs) { int is_good_pair = 0; HistogramPair p; p.idx1 = p.idx2 = 0; p.cost_diff = p.cost_combo = 0; if (idx1 == idx2) { return; } if (idx2 < idx1) { uint32_t t = idx2; idx2 = idx1; idx1 = t; } p.idx1 = idx1; p.idx2 = idx2; p.cost_diff = 0.5 * ClusterCostDiff(cluster_size[idx1], cluster_size[idx2]); p.cost_diff -= out[idx1].bit_cost_; p.cost_diff -= out[idx2].bit_cost_; if (out[idx1].total_count_ == 0) { p.cost_combo = out[idx2].bit_cost_; is_good_pair = 1; } else if (out[idx2].total_count_ == 0) { p.cost_combo = out[idx1].bit_cost_; is_good_pair = 1; } else { double threshold = *num_pairs == 0 ? 1e99 : (brotli_max_double((0.0), (pairs[0].cost_diff))); HistogramDistance combo = out[idx1]; double cost_combo; HistogramAddHistogramDistance(&combo, &out[idx2]); cost_combo = BrotliPopulationCostDistance(&combo); if (cost_combo < threshold - p.cost_diff) { p.cost_combo = cost_combo; is_good_pair = 1; } } if (is_good_pair) { p.cost_diff += p.cost_combo; if (*num_pairs > 0 && HistogramPairIsLess(&pairs[0], &p)) { if (*num_pairs < max_num_pairs) { pairs[*num_pairs] = pairs[0]; ++(*num_pairs); } pairs[0] = p; } else if (*num_pairs < max_num_pairs) { pairs[*num_pairs] = p; ++(*num_pairs); } } }\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#lex_prep#GetOptPunct.c", "codebase": "mcsim-6.2.0", "c_file": "lex.c", "function": "GetOptPunct", "sloc": "10", "c_code": "int GetOptPunct (PINPUTBUF pibIn, PSTR szLex, char chPunct)\n{\n int iReturn, iType;\n iReturn = SkipWhitespace (pibIn);\n if (NextChar (pibIn) == chPunct) {\n iReturn = 1;\n NextLex (pibIn, szLex, &iType);\n }\n return (iReturn);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S_prep#main.c", "codebase": "transcoder-set", "c_file": "LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {56,8,67,35,19,82,81,66,10,24,82,2,42,48,18,63,48,74,60,64,64,95,95,20,95,55,63,96,54};\nint param0_1[] = {78,67,1,78,48,83,17,19,21,44,99,68,16,54,9};\nint param0_2[] = {3,69,97,21,12,67,45,53,77,70,26,43};\nint param0_3[] = {21,80,29,22,77,64,42,4,71,75,62,27,30,36,66,37,49,97};\nint param0_4[] = {18,66,9,90,21,95,74,48,44,9,43,17};\nint param0_5[] = {42,41,87,3,64,25,96,55,99,57,32,64,10,75,69,95,11,36,15,2,78,70,14,54,11,28,55,47,27,85,47,62,97,68,44,70,12,27,36,85,76,91,17,75,83,34,32,89,55};\nint param0_6[] = {44};\nint param0_7[] = {1,43,28,17,30,46,89,51,15,70,96,79,65,55,8};\nint param0_8[] = {25,91,68,4,35,49,33};\nint param0_9[] = {14,86,22,42,94,54,28,41,48,8,82,84,99,92,33,75,38,31,59,86,21,6,77,89,79,83,57,26,89,45,60,55,60,76,76,6,40,57,38,44,7,98,64,65,88,73,88,99};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {26,8,9,10,10,41,0,9,4,26};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"No such subarray\");\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "lil#lil_prep#lil_set_error_at.c", "codebase": "lil", "c_file": "lil.c", "function": "lil_set_error_at", "sloc": "8", "c_code": "void lil_set_error_at(lil_t lil, size_t pos, const char* msg)\n{\n if (lil->error) return;\n free(lil->err_msg);\n lil->error = 1;\n lil->err_head = pos;\n lil->err_msg = strclone(msg ? msg : \"\");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cpio-2.14#copyout_prep#to_ascii_or_error.c", "codebase": "cpio-2.14", "c_file": "copyout.c", "function": "to_ascii_or_error", "sloc": "12", "c_code": "int\nto_ascii_or_error (char *where, uintmax_t n, size_t digits,\n unsigned logbase,\n const char *filename, const char *fieldname)\n{\n if (to_ascii (where, n, digits, logbase, 0))\n {\n field_width_error (filename, fieldname, n, digits, 0);\n return 1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "heman#points_prep#heman_points_from_grid.c", "codebase": "heman", "c_file": "points.c", "function": "heman_points_from_grid", "sloc": "24", "c_code": "heman_points* heman_points_from_grid(float width, float height,\n float cellsize, float jitter)\n{\n int cols = width / cellsize;\n int rows = height / cellsize;\n int ncells = cols * rows;\n heman_points* result = heman_image_create(ncells, 1, 2);\n float rscale = 2.0 * jitter / (float) 2147483647;\n int j;\n#pragma omp parallel for\n for (j = 0; j < rows; j++) {\n float* dst = result->data + j * cols * 2;\n float y = cellsize * 0.5 + cellsize * j;\n float x = cellsize * 0.5;\n for (int i = 0; i < cols; i++) {\n float rx = rand() * rscale - jitter;\n float ry = rand() * rscale - jitter;\n *dst++ = x + rx;\n *dst++ = y + ry;\n x += cellsize;\n }\n }\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#NEXT_POWER_OF_2_2_prep#min.c", "codebase": "transcoder-set", "c_file": "NEXT_POWER_OF_2_2.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNTING_PAIRS_PERSON_CAN_FORM_PAIR_ONE_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "COUNTING_PAIRS_PERSON_CAN_FORM_PAIR_ONE_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#array_prep#indent.c", "codebase": "gawk-5.2.2", "c_file": "array.c", "function": "indent", "sloc": "7", "c_code": "void\nindent(int indent_level)\n{\n int i;\n for (i = 0; i < indent_level; i++)\n fprintf(output_fp, \"%s\", indent_char);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "uucp-1.07#debug_prep#cdebug_char.c", "codebase": "uucp-1.07", "c_file": "debug.c", "function": "cdebug_char", "sloc": "37", "c_code": "size_t\ncdebug_char (z, ichar)\n char *z;\n int ichar;\n{\n char b;\n if (((*__ctype_b_loc ())[(int) ((((unsigned char) (ichar))))] & (unsigned short int) _ISprint)\n && ichar != '\\\"'\n && ichar != '\\\\')\n {\n *z++ = (char) ichar;\n *z = '\\0';\n return 1;\n }\n *z++ = '\\\\';\n switch (ichar)\n {\n case '\\n':\n b = 'n';\n break;\n case '\\r':\n b = 'r';\n break;\n case '\\\"':\n b = '\\\"';\n break;\n case '\\\\':\n b = '\\\\';\n break;\n default:\n sprintf (z, \"%03o\", (unsigned int) ((unsigned char) (ichar)));\n return strlen (z) + 1;\n }\n *z++ = b;\n *z = '\\0';\n return 2;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 4}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlFreeProp.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlFreeProp", "sloc": "11", "c_code": "PyObject *\nlibxml_xmlFreeProp(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlAttrPtr cur;\n PyObject *pyobj_cur;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlFreeProp\", &pyobj_cur))\n return(((void *)0));\n cur = (xmlAttrPtr) (((pyobj_cur) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_cur))->obj));\n xmlFreeProp(cur);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_leading_or_trailing_decimal_point_prep#utest_run_allow_leading_or_trailing_decimal_point_read_write_minified_read.c", "codebase": "json.h", "c_file": "allow_leading_or_trailing_decimal_point.c", "function": "utest_run_allow_leading_or_trailing_decimal_point_read_write_minified_read", "sloc": "7", "c_code": "void utest_run_allow_leading_or_trailing_decimal_point_read_write_minified_read(int *utest_result, struct allow_leading_or_trailing_decimal_point *utest_fixture) {\n size_t size = 0;\n void *json = json_write_minified(utest_fixture->value, &size);\n free(utest_fixture->value);\n utest_fixture->value = json_parse(json, size - 1);\n free(json);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 2, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#WAYS_TRANSFORMING_ONE_STRING_REMOVING_0_CHARACTERS_prep#len.c", "codebase": "transcoder-set", "c_file": "WAYS_TRANSFORMING_ONE_STRING_REMOVING_0_CHARACTERS.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_XOR_VALUE_PAIR_1_prep#max.c", "codebase": "transcoder-set", "c_file": "MINIMUM_XOR_VALUE_PAIR_1.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_location_information_prep#utest_should_filter_test.c", "codebase": "json.h", "c_file": "allow_location_information.c", "function": "utest_should_filter_test", "sloc": "42", "c_code": "__attribute__((weak)) int utest_should_filter_test(const char *filter,\n const char *testcase) {\n if (filter) {\n const char *filter_cur = filter;\n const char *testcase_cur = testcase;\n const char *filter_wildcard = 0;\n while (('\\0' != *filter_cur) && ('\\0' != *testcase_cur)) {\n if ('*' == *filter_cur) {\n filter_wildcard = filter_cur;\n filter_cur++;\n while (('\\0' != *filter_cur) && ('\\0' != *testcase_cur)) {\n if ('*' == *filter_cur) {\n break;\n } else if (*filter_cur != *testcase_cur) {\n filter_cur = filter_wildcard;\n }\n testcase_cur++;\n filter_cur++;\n }\n if (('\\0' == *filter_cur) && ('\\0' == *testcase_cur)) {\n return 0;\n }\n if ('\\0' == *testcase_cur) {\n return 1;\n }\n } else {\n if (*testcase_cur != *filter_cur) {\n return 1;\n } else {\n testcase_cur++;\n filter_cur++;\n }\n }\n }\n if (('\\0' != *filter_cur) ||\n (('\\0' != *testcase_cur) &&\n ((filter == filter_cur) || ('*' != filter_cur[-1])))) {\n return 1;\n }\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 8, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 1}}, {"id": "enscript-1.6.6#gram_prep#yyparse.c", "codebase": "enscript-1.6.6", "c_file": "gram.c", "function": "yyparse", "sloc": "459", "c_code": "int\nyyparse (void)\n{\n int yystate;\n int yyerrstatus;\n yytype_int16 yyssa[200];\n yytype_int16 *yyss;\n yytype_int16 *yyssp;\n YYSTYPE yyvsa[200];\n YYSTYPE *yyvs;\n YYSTYPE *yyvsp;\n long unsigned int yystacksize;\n int yyn;\n int yyresult;\n int yytoken;\n YYSTYPE yyval;\n int yylen = 0;\n yytoken = 0;\n yyss = yyssa;\n yyvs = yyvsa;\n yystacksize = 200;\n ;\n yystate = 0;\n yyerrstatus = 0;\n yynerrs = 0;\n yychar = (-2);\n yyssp = yyss;\n yyvsp = yyvs;\n goto yysetstate;\n yynewstate:\n yyssp++;\n yysetstate:\n *yyssp = yystate;\n if (yyss + yystacksize - 1 <= yyssp)\n {\n long unsigned int yysize = yyssp - yyss + 1;\n if (10000 <= yystacksize)\n goto yyexhaustedlab;\n yystacksize *= 2;\n if (10000 < yystacksize)\n yystacksize = 10000;\n {\n yytype_int16 *yyss1 = yyss;\n union yyalloc *yyptr =\n (union yyalloc *) malloc (((yystacksize) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) + (sizeof (union yyalloc) - 1)));\n if (! yyptr)\n goto yyexhaustedlab;\n do { long unsigned int yynewbytes; __builtin_memcpy (&yyptr->yyss_alloc, yyss, (yysize) * sizeof (*(yyss))); yyss = &yyptr->yyss_alloc; yynewbytes = yystacksize * sizeof (*yyss) + (sizeof (union yyalloc) - 1); yyptr += yynewbytes / sizeof (*yyptr); } while ((0));\n do { long unsigned int yynewbytes; __builtin_memcpy (&yyptr->yyvs_alloc, yyvs, (yysize) * sizeof (*(yyvs))); yyvs = &yyptr->yyvs_alloc; yynewbytes = yystacksize * sizeof (*yyvs) + (sizeof (union yyalloc) - 1); yyptr += yynewbytes / sizeof (*yyptr); } while ((0));\n if (yyss1 != yyssa)\n free (yyss1);\n }\n yyssp = yyss + yysize - 1;\n yyvsp = yyvs + yysize - 1;\n ;\n if (yyss + yystacksize - 1 <= yyssp)\n goto yyabortlab;\n }\n ;\n if (yystate == 2)\n goto yyacceptlab;\n goto yybackup;\nyybackup:\n yyn = yypact[yystate];\n if (((yyn) == (-41)))\n goto yydefault;\n if (yychar == (-2))\n {\n ;\n yychar = yylex ();\n }\n if (yychar <= 0)\n {\n yychar = yytoken = 0;\n ;\n }\n else\n {\n yytoken = ((unsigned int) (yychar) <= 289 ? yytranslate[yychar] : 2);\n ;\n }\n yyn += yytoken;\n if (yyn < 0 || 571 < yyn || yycheck[yyn] != yytoken)\n goto yydefault;\n yyn = yytable[yyn];\n if (yyn <= 0)\n {\n if ((0))\n goto yyerrlab;\n yyn = -yyn;\n goto yyreduce;\n }\n if (yyerrstatus)\n yyerrstatus--;\n ;\n yychar = (-2);\n yystate = yyn;\n *++yyvsp = yylval;\n goto yynewstate;\nyydefault:\n yyn = yydefact[yystate];\n if (yyn == 0)\n goto yyerrlab;\n goto yyreduce;\nyyreduce:\n yylen = yyr2[yyn];\n yyval = yyvsp[1-yylen];\n ;\n switch (yyn)\n {\n case 4:\n { start_stmts = (yyvsp[(3) - (4)].lst); }\n break;\n case 5:\n { startrules = (yyvsp[(3) - (4)].lst); }\n break;\n case 6:\n { namerules = (yyvsp[(3) - (4)].lst); }\n break;\n case 7:\n { define_state ((yyvsp[(2) - (5)].node), ((void *)0), (yyvsp[(4) - (5)].lst)); }\n break;\n case 8:\n { define_state ((yyvsp[(2) - (7)].node), (yyvsp[(4) - (7)].node), (yyvsp[(6) - (7)].lst)); }\n break;\n case 9:\n { list_append (global_stmts, (yyvsp[(1) - (1)].stmt)); }\n break;\n case 10:\n { (yyval.lst) = list (); }\n break;\n case 11:\n { list_append ((yyvsp[(1) - (4)].lst), cons ((yyvsp[(2) - (4)].node), (yyvsp[(3) - (4)].node))); }\n break;\n case 12:\n { (yyval.lst) = list (); }\n break;\n case 13:\n { list_append ((yyvsp[(1) - (2)].lst), (yyvsp[(2) - (2)].cons)); }\n break;\n case 14:\n { (yyval.cons) = cons (((void *) 0), (yyvsp[(3) - (4)].lst)); }\n break;\n case 15:\n { (yyval.cons) = cons (((void *) 1), (yyvsp[(3) - (4)].lst)); }\n break;\n case 16:\n { (yyval.cons) = cons ((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].lst)); }\n break;\n case 17:\n { (yyval.cons) = cons ((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].lst)); }\n break;\n case 18:\n { (yyval.lst) = list (); }\n break;\n case 19:\n { (yyval.lst) = (yyvsp[(1) - (1)].lst); }\n break;\n case 20:\n { (yyval.lst) = list (); list_append ((yyval.lst), (yyvsp[(1) - (1)].node)); }\n break;\n case 21:\n { list_append ((yyvsp[(1) - (3)].lst), (yyvsp[(3) - (3)].node)); }\n break;\n case 22:\n { (yyval.lst) = list (); }\n break;\n case 23:\n { (yyval.lst) = (yyvsp[(2) - (3)].lst); }\n break;\n case 24:\n { (yyval.lst) = list (); list_append ((yyval.lst), (yyvsp[(1) - (1)].cons)); }\n break;\n case 25:\n { list_append ((yyvsp[(1) - (3)].lst), (yyvsp[(3) - (3)].cons)); }\n break;\n case 26:\n { (yyval.cons) = cons ((yyvsp[(1) - (1)].node), ((void *)0)); }\n break;\n case 27:\n { (yyval.cons) = cons ((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].expr)); }\n break;\n case 28:\n { (yyval.lst) = list (); }\n break;\n case 29:\n { list_append ((yyvsp[(1) - (2)].lst), (yyvsp[(2) - (2)].stmt)); }\n break;\n case 30:\n { (yyval.stmt) = mk_stmt (sRETURN, ((void *)0), ((void *)0),\n ((void *)0), ((void *)0)); }\n break;\n case 31:\n { (yyval.stmt) = mk_stmt (sRETURN, (yyvsp[(2) - (3)].expr), ((void *)0),\n ((void *)0), ((void *)0)); }\n break;\n case 32:\n { (yyval.stmt) = mk_stmt (sDEFSUB, (yyvsp[(2) - (9)].node),\n cons (cons ((yyvsp[(4) - (9)].lst), (yyvsp[(7) - (9)].lst)),\n (yyvsp[(8) - (9)].lst)),\n ((void *)0), ((void *)0)); }\n break;\n case 33:\n { (yyval.stmt) = mk_stmt (sBLOCK, (yyvsp[(2) - (3)].lst), ((void *)0),\n ((void *)0), ((void *)0)); }\n break;\n case 34:\n { (yyval.stmt) = mk_stmt (sIF, (yyvsp[(3) - (5)].expr), (yyvsp[(5) - (5)].stmt), ((void *)0),\n ((void *)0)); }\n break;\n case 35:\n { (yyval.stmt) = mk_stmt (sIF, (yyvsp[(3) - (7)].expr), (yyvsp[(5) - (7)].stmt), (yyvsp[(7) - (7)].stmt),\n ((void *)0)); }\n break;\n case 36:\n { (yyval.stmt) = mk_stmt (sWHILE, (yyvsp[(3) - (5)].expr), (yyvsp[(5) - (5)].stmt),\n ((void *)0), ((void *)0)); }\n break;\n case 37:\n { (yyval.stmt) = mk_stmt (sFOR, (yyvsp[(3) - (9)].expr), (yyvsp[(5) - (9)].expr), (yyvsp[(7) - (9)].expr),\n (yyvsp[(9) - (9)].stmt)); }\n break;\n case 38:\n { (yyval.stmt) = mk_stmt (sEXPR, (yyvsp[(1) - (2)].expr), ((void *)0),\n ((void *)0), ((void *)0)); }\n break;\n case 39:\n { (yyval.expr) = mk_expr (eSTRING, (yyvsp[(1) - (1)].node), ((void *)0),\n ((void *)0)); }\n break;\n case 40:\n { (yyval.expr) = mk_expr (eREGEXP, (yyvsp[(1) - (1)].node), ((void *)0),\n ((void *)0)); }\n break;\n case 41:\n { (yyval.expr) = mk_expr (eINTEGER, (yyvsp[(1) - (1)].node), ((void *)0),\n ((void *)0)); }\n break;\n case 42:\n { (yyval.expr) = mk_expr (eREAL, (yyvsp[(1) - (1)].node), ((void *)0),\n ((void *)0)); }\n break;\n case 43:\n { (yyval.expr) = mk_expr (eSYMBOL, (yyvsp[(1) - (1)].node), ((void *)0),\n ((void *)0)); }\n break;\n case 44:\n { (yyval.expr) = mk_expr (eNOT, (yyvsp[(2) - (2)].expr), ((void *)0),\n ((void *)0)); }\n break;\n case 45:\n { (yyval.expr) = mk_expr (eAND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), ((void *)0)); }\n break;\n case 46:\n { (yyval.expr) = mk_expr (eOR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), ((void *)0)); }\n break;\n case 47:\n { (yyval.expr) = mk_expr (eFCALL, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].lst),\n ((void *)0)); }\n break;\n case 48:\n { (yyval.expr) = mk_expr (eASSIGN, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].expr),\n ((void *)0)); }\n break;\n case 49:\n { (yyval.expr) = mk_expr (eADDASSIGN, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].expr),\n ((void *)0)); }\n break;\n case 50:\n { (yyval.expr) = mk_expr (eSUBASSIGN, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].expr),\n ((void *)0)); }\n break;\n case 51:\n { (yyval.expr) = mk_expr (eMULASSIGN, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].expr),\n ((void *)0)); }\n break;\n case 52:\n { (yyval.expr) = mk_expr (eDIVASSIGN, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].expr),\n ((void *)0)); }\n break;\n case 53:\n { (yyval.expr) = mk_expr (ePOSTFIXADD, (yyvsp[(1) - (2)].node), ((void *)0),\n ((void *)0)); }\n break;\n case 54:\n { (yyval.expr) = mk_expr (ePOSTFIXSUB, (yyvsp[(1) - (2)].node), ((void *)0),\n ((void *)0)); }\n break;\n case 55:\n { (yyval.expr) = mk_expr (ePREFIXADD, (yyvsp[(2) - (2)].node), ((void *)0),\n ((void *)0)); }\n break;\n case 56:\n { (yyval.expr) = mk_expr (ePREFIXSUB, (yyvsp[(2) - (2)].node), ((void *)0),\n ((void *)0)); }\n break;\n case 57:\n { (yyval.expr) = mk_expr (eARRAYASSIGN, (yyvsp[(1) - (6)].expr), (yyvsp[(3) - (6)].expr),\n (yyvsp[(6) - (6)].expr)); }\n break;\n case 58:\n { (yyval.expr) = (yyvsp[(2) - (3)].expr); }\n break;\n case 59:\n { (yyval.expr) = mk_expr (eARRAYREF, (yyvsp[(1) - (4)].expr), (yyvsp[(3) - (4)].expr),\n ((void *)0)); }\n break;\n case 60:\n { (yyval.expr) = mk_expr (eQUESTCOLON, (yyvsp[(1) - (5)].expr), (yyvsp[(3) - (5)].expr),\n (yyvsp[(5) - (5)].expr)); }\n break;\n case 61:\n { (yyval.expr) = mk_expr (eMULT, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), ((void *)0)); }\n break;\n case 62:\n { (yyval.expr) = mk_expr (eDIV, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), ((void *)0)); }\n break;\n case 63:\n { (yyval.expr) = mk_expr (ePLUS, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), ((void *)0)); }\n break;\n case 64:\n { (yyval.expr) = mk_expr (eMINUS, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr),\n ((void *)0)); }\n break;\n case 65:\n { (yyval.expr) = mk_expr (eLT, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), ((void *)0)); }\n break;\n case 66:\n { (yyval.expr) = mk_expr (eGT, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), ((void *)0)); }\n break;\n case 67:\n { (yyval.expr) = mk_expr (eEQ, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), ((void *)0)); }\n break;\n case 68:\n { (yyval.expr) = mk_expr (eNE, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), ((void *)0)); }\n break;\n case 69:\n { (yyval.expr) = mk_expr (eGE, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), ((void *)0)); }\n break;\n case 70:\n { (yyval.expr) = mk_expr (eLE, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), ((void *)0)); }\n break;\n case 71:\n { (yyval.expr) = ((void *)0); }\n break;\n case 72:\n { (yyval.expr) = (yyvsp[(1) - (1)].expr); }\n break;\n case 73:\n { (yyval.lst) = list (); }\n break;\n case 74:\n { (yyval.lst) = (yyvsp[(1) - (1)].lst); }\n break;\n case 75:\n { (yyval.lst) = list (); list_append ((yyval.lst), (yyvsp[(1) - (1)].expr)); }\n break;\n case 76:\n { list_append ((yyvsp[(1) - (3)].lst), (yyvsp[(3) - (3)].expr)); }\n break;\n default: break;\n }\n ;\n (yyvsp -= (yylen), yyssp -= (yylen));\n yylen = 0;\n ;\n *++yyvsp = yyval;\n yyn = yyr1[yyn];\n yystate = yypgoto[yyn - 52] + *yyssp;\n if (0 <= yystate && yystate <= 571 && yycheck[yystate] == *yyssp)\n yystate = yytable[yystate];\n else\n yystate = yydefgoto[yyn - 52];\n goto yynewstate;\nyyerrlab:\n yytoken = yychar == (-2) ? (-2) : ((unsigned int) (yychar) <= 289 ? yytranslate[yychar] : 2);\n if (!yyerrstatus)\n {\n ++yynerrs;\n yyerror (\"syntax error\");\n }\n if (yyerrstatus == 3)\n {\n if (yychar <= 0)\n {\n if (yychar == 0)\n goto yyabortlab;\n }\n else\n {\n yydestruct (\"Error: discarding\",\n yytoken, &yylval);\n yychar = (-2);\n }\n }\n goto yyerrlab1;\nyyerrorlab:\n if ( 0)\n goto yyerrorlab;\n (yyvsp -= (yylen), yyssp -= (yylen));\n yylen = 0;\n ;\n yystate = *yyssp;\n goto yyerrlab1;\nyyerrlab1:\n yyerrstatus = 3;\n for (;;)\n {\n yyn = yypact[yystate];\n if (!((yyn) == (-41)))\n {\n yyn += 1;\n if (0 <= yyn && yyn <= 571 && yycheck[yyn] == 1)\n {\n yyn = yytable[yyn];\n if (0 < yyn)\n break;\n }\n }\n if (yyssp == yyss)\n goto yyabortlab;\n yydestruct (\"Error: popping\",\n yystos[yystate], yyvsp);\n (yyvsp -= (1), yyssp -= (1));\n yystate = *yyssp;\n ;\n }\n *++yyvsp = yylval;\n ;\n yystate = yyn;\n goto yynewstate;\nyyacceptlab:\n yyresult = 0;\n goto yyreturn;\nyyabortlab:\n yyresult = 1;\n goto yyreturn;\nyyexhaustedlab:\n yyerror (\"memory exhausted\");\n yyresult = 2;\nyyreturn:\n if (yychar != (-2))\n {\n yytoken = ((unsigned int) (yychar) <= 289 ? yytranslate[yychar] : 2);\n yydestruct (\"Cleanup: discarding lookahead\",\n yytoken, &yylval);\n }\n (yyvsp -= (yylen), yyssp -= (yylen));\n ;\n while (yyssp != yyss)\n {\n yydestruct (\"Cleanup: popping\",\n yystos[*yyssp], yyvsp);\n (yyvsp -= (1), yyssp -= (1));\n }\n if (yyss != yyssa)\n free (yyss);\n return (yyresult);\n}\n", "c_constructs": {"pointer_type": 6, "array_type": 10, "struct_type": 0, "enum_type": 0, "union_type": 4, "function_pointer": 0, "type_casting": 61, "memory_management": 3, "memory_operation": 0, "if_statement": 27, "for_loop": 1, "while_loop": 3, "switch_statement": 1, "goto_statement": 22, "return_statement": 1, "break_continue_statement": 75}}, {"id": "less-633#optfunc_prep#opt_o.c", "codebase": "less-633", "c_file": "optfunc.c", "function": "opt_o", "sloc": "45", "c_code": "void opt_o(int type, char *s)\n{\n PARG parg;\n char *filename;\n if (secure)\n {\n error(\"log file support is not available\", ((PARG *)((void *)0)));\n return;\n }\n switch (type)\n {\n case 0:\n namelogfile = save(s);\n break;\n case 2:\n if (ch_getflags() & 001)\n {\n error(\"Input is not a pipe\", ((PARG *)((void *)0)));\n return;\n }\n if (logfile >= 0)\n {\n error(\"Log file is already in use\", ((PARG *)((void *)0)));\n return;\n }\n s = skipsp(s);\n if (namelogfile != ((void *)0))\n free(namelogfile);\n filename = lglob(s);\n namelogfile = shell_unquote(filename);\n free(filename);\n use_logfile(namelogfile);\n sync_logfile();\n break;\n case 1:\n if (logfile < 0)\n error(\"No log file\", ((PARG *)((void *)0)));\n else\n {\n parg.p_string = namelogfile;\n error(\"Log file \\\"%s\\\"\", &parg);\n }\n break;\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 2, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 3}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlXIncludeProcessTree.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlXIncludeProcessTree", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlXIncludeProcessTree(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlNodePtr tree;\n PyObject *pyobj_tree;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlXIncludeProcessTree\", &pyobj_tree))\n return(((void *)0));\n tree = (xmlNodePtr) (((pyobj_tree) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_tree))->obj));\n c_retval = xmlXIncludeProcessTree(tree);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "wget-1.21.4#ftp-basic_prep#ftp_process_type.c", "codebase": "wget-1.21.4", "c_file": "ftp-basic.c", "function": "ftp_process_type", "sloc": "10", "c_code": "char\nftp_process_type (const char *params)\n{\n if (params\n && 0 == strncasecmp (params, \"type=\", 5)\n && params[5] != '\\0')\n return c_toupper (params[5]);\n else\n return 'I';\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_SET_14_MAXIMUM_SUM_INCREASING_SUBSEQUENCE_prep#len.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_SET_14_MAXIMUM_SUM_INCREASING_SUBSEQUENCE.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#chars_prep#has_blank_char.c", "codebase": "nano-7.2", "c_file": "chars.c", "function": "has_blank_char", "sloc": "6", "c_code": "_Bool has_blank_char(const char *string)\n{\n while (*string != '\\0' && !is_blank_char(string))\n string += char_length(string);\n return *string;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_RECTANGLES_NM_GRID_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "NUMBER_RECTANGLES_NM_GRID.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n, int m ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ocb-aes128_prep#nettle_ocb_aes128_update.c", "codebase": "nettle-3.9.1", "c_file": "ocb-aes128.c", "function": "nettle_ocb_aes128_update", "sloc": "7", "c_code": "void\nnettle_ocb_aes128_update (struct ocb_ctx *ctx, const struct ocb_aes128_encrypt_key *key,\n size_t length, const uint8_t *data)\n{\n nettle_ocb_update (ctx, &key->ocb, &key->encrypt, (nettle_cipher_func *) nettle_aes128_encrypt,\n length, data);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json-c#arraylist_prep#array_list_new2.c", "codebase": "json-c", "c_file": "arraylist.c", "function": "array_list_new2", "sloc": "18", "c_code": "struct array_list *array_list_new2(array_list_free_fn *free_fn, int initial_size)\n{\n struct array_list *arr;\n if (initial_size < 0 || (size_t)initial_size >= (0x7fffffffffffffffL * 2UL + 1UL) / sizeof(void *))\n return ((void *)0);\n arr = (struct array_list *)malloc(sizeof(struct array_list));\n if (!arr)\n return ((void *)0);\n arr->size = initial_size;\n arr->length = 0;\n arr->free_fn = free_fn;\n if (!(arr->array = (void **)malloc(arr->size * sizeof(void *))))\n {\n free(arr);\n return ((void *)0);\n }\n return arr;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 3, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libxml2#xmlregexp_prep#xmlRegNewExecCtxt.c", "codebase": "libxml2", "c_file": "xmlregexp.c", "function": "xmlRegNewExecCtxt", "sloc": "46", "c_code": "xmlRegExecCtxtPtr\nxmlRegNewExecCtxt(xmlRegexpPtr comp, xmlRegExecCallbacks callback, void *data) {\n xmlRegExecCtxtPtr exec;\n if (comp == ((void *)0))\n return(((void *)0));\n if ((comp->compact == ((void *)0)) && (comp->states == ((void *)0)))\n return(((void *)0));\n exec = (xmlRegExecCtxtPtr) xmlMalloc(sizeof(xmlRegExecCtxt));\n if (exec == ((void *)0))\n return(((void *)0));\n memset(exec, 0, sizeof(xmlRegExecCtxt));\n exec->inputString = ((void *)0);\n exec->index = 0;\n exec->determinist = 1;\n exec->maxRollbacks = 0;\n exec->nbRollbacks = 0;\n exec->rollbacks = ((void *)0);\n exec->status = 0;\n exec->comp = comp;\n if (comp->compact == ((void *)0))\n exec->state = comp->states[0];\n exec->transno = 0;\n exec->transcount = 0;\n exec->callback = callback;\n exec->data = data;\n if (comp->nbCounters > 0) {\n exec->counts = (int *) xmlMalloc(comp->nbCounters * sizeof(int)\n * 2);\n if (exec->counts == ((void *)0)) {\n xmlFree(exec);\n return(((void *)0));\n }\n memset(exec->counts, 0, comp->nbCounters * sizeof(int) * 2);\n exec->errCounts = &exec->counts[comp->nbCounters];\n } else {\n exec->counts = ((void *)0);\n exec->errCounts = ((void *)0);\n }\n exec->inputStackMax = 0;\n exec->inputStackNr = 0;\n exec->inputStack = ((void *)0);\n exec->errStateNo = -1;\n exec->errString = ((void *)0);\n exec->nbPush = 0;\n return(exec);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 17, "memory_management": 0, "memory_operation": 2, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_AREA_SQUARE_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "PROGRAM_AREA_SQUARE.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int side ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_MANHATTAN_DISTANCES_PAIRS_POINTS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SUM_MANHATTAN_DISTANCES_PAIRS_POINTS.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int x [ ], int y [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#utils_prep#nrealloc.c", "codebase": "nano-7.2", "c_file": "utils.c", "function": "nrealloc", "sloc": "7", "c_code": "void *nrealloc(void *section, size_t howmuch)\n{\n section = realloc(section, howmuch);\n if (section == ((void *)0))\n die(gettext(\"Nano is out of memory!\\n\"));\n return section;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "lodepng#lodepng_prep#lodepng_info_copy.c", "codebase": "lodepng", "c_file": "lodepng.c", "function": "lodepng_info_copy", "sloc": "14", "c_code": "unsigned lodepng_info_copy(LodePNGInfo* dest, const LodePNGInfo* source) {\n lodepng_info_cleanup(dest);\n lodepng_memcpy(dest, source, sizeof(LodePNGInfo));\n lodepng_color_mode_init(&dest->color);\n { unsigned error = lodepng_color_mode_copy(&dest->color, &source->color); if(error) return error;};\n { unsigned error = LodePNGText_copy(dest, source); if(error) return error;};\n { unsigned error = LodePNGIText_copy(dest, source); if(error) return error;};\n if(source->iccp_defined) {\n { unsigned error = lodepng_assign_icc(dest, source->iccp_name, source->iccp_profile, source->iccp_profile_size); if(error) return error;};\n }\n LodePNGUnknownChunks_init(dest);\n { unsigned error = LodePNGUnknownChunks_copy(dest, source); if(error) return error;};\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 0}}, {"id": "make-4.4.1#misc_prep#make_pid.c", "codebase": "make-4.4.1", "c_file": "misc.c", "function": "make_pid", "sloc": "4", "c_code": "pid_t make_pid ()\n{\n return getpid ();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_BINARY_DECIMAL_CONVERSION_prep#max.c", "codebase": "transcoder-set", "c_file": "PROGRAM_BINARY_DECIMAL_CONVERSION.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FREQUENT_ELEMENT_ARRAY_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "FREQUENT_ELEMENT_ARRAY.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#mark_prep#badmark.c", "codebase": "less-633", "c_file": "mark.c", "function": "badmark", "sloc": "4", "c_code": "int badmark(LWCHAR c)\n{\n return (getmark(c) == ((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_ONE_EXTRA_CHARACTER_STRING_1_prep#len.c", "codebase": "transcoder-set", "c_file": "FIND_ONE_EXTRA_CHARACTER_STRING_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "heman#plane_prep#kmPlaneExtractFromMat4.c", "codebase": "heman", "c_file": "plane.c", "function": "kmPlaneExtractFromMat4", "sloc": "9", "c_code": "kmPlane* kmPlaneExtractFromMat4(kmPlane* pOut, const struct kmMat4* pIn, int row) {\n int scale = (row < 0) ? -1 : 1;\n row = abs(row) - 1;\n pOut->a = pIn->mat[3] + scale * pIn->mat[row];\n pOut->b = pIn->mat[7] + scale * pIn->mat[row + 4];\n pOut->c = pIn->mat[11] + scale * pIn->mat[row + 8];\n pOut->d = pIn->mat[15] + scale * pIn->mat[row + 12];\n return kmPlaneNormalize(pOut, pOut);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "dap-3.10#ps1_prep#pict_axes.c", "codebase": "dap-3.10", "c_file": "ps1.c", "function": "pict_axes", "sloc": "122", "c_code": "void pict_axes(pict *p, double minx, double maxx, tick xtick[], int nxticks,\n double miny, double maxy, tick ytick[], int nyticks,\n char style[], double bpos, double lpos, double tpos, double rpos)\n{\n double xpos, ypos;\n int rmarks, tmarks;\n xpos = 0.0;\n ypos = 0.0;\n rmarks = 0;\n tmarks = 0;\n if (style[0] == '+' || style[0] == '#')\n tmarks = 1;\n if (style[1] == '+' || style[1] == '#')\n rmarks = 1;\n if (style[0] != '=' && style[1] != '=' &&\n style[0] != '#' && style[1] != '#')\n {\n switch (style[0])\n {\n case '-':\n xpos = bpos;\n break;\n case '+':\n xpos = tpos;\n break;\n case '0':\n case 'n':\n xpos = 0.0;\n break;\n }\n switch (style[1])\n {\n case '-':\n ypos = lpos;\n break;\n case '+':\n ypos = rpos;\n break;\n case '0':\n case 'n':\n ypos = 0.0;\n break;\n }\n switch (style[0])\n {\n case '-':\n case '0':\n xaxis(p, minx, maxx, xtick, nxticks, xpos, ypos, 1.0, tmarks);\n break;\n case '+':\n xaxis(p, minx, maxx, xtick, nxticks, xpos, ypos, -1.0, tmarks);\n break;\n case 'n':\n break;\n }\n switch (style[1])\n {\n case '-':\n case '0':\n yaxis(p, miny, maxy, ytick, nyticks, xpos, ypos, 1.0, rmarks);\n break;\n case '+':\n yaxis(p, miny, maxy, ytick, nyticks, xpos, ypos, -1.0, rmarks);\n break;\n case 'n':\n break;\n }\n }\n else if (style[0] != '=' && style[0] != '#')\n {\n switch (style[0])\n {\n case '-':\n xpos = bpos;\n case '0':\n yaxis(p, miny, maxy, ytick, nyticks, xpos, lpos, 1.0, rmarks);\n xaxis(p, minx, maxx, xtick, nxticks, xpos, lpos, 1.0, tmarks);\n xaxis(p, minx, maxx, xtick, nxticks, xpos, rpos, 1.0, tmarks);\n yaxis(p, miny, maxy, ytick, nyticks, xpos, rpos, -1.0, rmarks);\n break;\n case '+':\n yaxis(p, miny, maxy, ytick, nyticks, tpos, lpos, 1.0, rmarks);\n xaxis(p, minx, maxx, xtick, nxticks, tpos, lpos, -1.0, tmarks);\n xaxis(p, minx, maxx, xtick, nxticks, tpos, rpos, -1.0, tmarks);\n yaxis(p, miny, maxy, ytick, nyticks, tpos, rpos, -1.0, rmarks);\n break;\n case 'n':\n fputs(\"(axes) Can't have double y-axes and no x-axis.\\n\", dap_err);\n exit(1);\n }\n }\n else if (style[1] != '=' && style[1] != '#')\n {\n switch (style[1])\n {\n case '-':\n ypos = lpos;\n case '0':\n xaxis(p, minx, maxx, xtick, nxticks, bpos, ypos, 1.0, tmarks);\n yaxis(p, miny, maxy, ytick, nyticks, bpos, ypos, 1.0, rmarks);\n yaxis(p, miny, maxy, ytick, nyticks, tpos, ypos, 1.0, rmarks);\n xaxis(p, minx, maxx, xtick, nxticks, tpos, ypos, -1.0, tmarks);\n break;\n case '+':\n xaxis(p, minx, maxx, xtick, nxticks, bpos, rpos, 1.0, tmarks);\n yaxis(p, miny, maxy, ytick, nyticks, bpos, rpos, -1.0, rmarks);\n yaxis(p, miny, maxy, ytick, nyticks, tpos, rpos, -1.0, rmarks);\n xaxis(p, minx, maxx, xtick, nxticks, tpos, rpos, -1.0, tmarks);\n break;\n case 'n':\n fputs(\"(axes) Can't have double x-axes and no y-axis.\\n\", dap_err);\n exit(1);\n }\n }\n else\n {\n yaxis(p, miny, maxy, ytick, nyticks, bpos, lpos, 1.0, rmarks);\n xaxis(p, minx, maxx, xtick, nxticks, bpos, rpos, 1.0, tmarks);\n yaxis(p, miny, maxy, ytick, nyticks, tpos, rpos, -1.0, rmarks);\n xaxis(p, minx, maxx, xtick, nxticks, tpos, lpos, -1.0, tmarks);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 6, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 16}}, {"id": "libosip2-5.3.1#ict_prep#__osip_ict_init.c", "codebase": "libosip2-5.3.1", "c_file": "ict.c", "function": "__osip_ict_init", "sloc": "74", "c_code": "int __osip_ict_init(osip_ict_t **ict, osip_t *osip, osip_message_t *invite) {\n osip_route_t *route;\n int i;\n osip_trace(\"ict.c\", 30, TRACE_LEVEL5, ((void *)0), \"allocating ICT context\\n\");\n *ict = (osip_ict_t *) (osip_malloc_func ? osip_malloc_func(sizeof(osip_ict_t)) : malloc(sizeof(osip_ict_t)));\n if (*ict == ((void *)0))\n return -4;\n memset(*ict, 0, sizeof(osip_ict_t));\n {\n osip_via_t *via;\n char *proto;\n i = osip_message_get_via(invite, 0, &via);\n if (i < 0) {\n { if (*ict != ((void *)0)) { if (osip_free_func) osip_free_func(*ict); else free(*ict); } };\n return i;\n }\n proto = osip_via_get_protocol(via);\n if (proto == ((void *)0)) {\n { if (*ict != ((void *)0)) { if (osip_free_func) osip_free_func(*ict); else free(*ict); } };\n return -5;\n }\n if (osip_strcasecmp(proto, \"TCP\") != 0 && osip_strcasecmp(proto, \"TLS\") != 0 && osip_strcasecmp(proto, \"SCTP\") != 0) {\n (*ict)->timer_a_length = 500;\n if (64 * 500 < 32000)\n (*ict)->timer_d_length = 32000;\n else\n (*ict)->timer_d_length = 64 * 500;\n osip_gettimeofday(&(*ict)->timer_a_start, ((void *)0));\n add_gettimeofday(&(*ict)->timer_a_start, (*ict)->timer_a_length);\n (*ict)->timer_d_start.tv_sec = -1;\n } else {\n (*ict)->timer_a_length = 500;\n (*ict)->timer_d_length = 0;\n osip_gettimeofday(&(*ict)->timer_a_start, ((void *)0));\n add_gettimeofday(&(*ict)->timer_a_start, (*ict)->timer_a_length);\n (*ict)->timer_d_start.tv_sec = -1;\n }\n }\n osip_message_get_route(invite, 0, &route);\n if (route != ((void *)0) && route->url != ((void *)0)) {\n osip_uri_param_t *lr_param;\n osip_uri_param_get_byname((&(route->url)->url_params), \"lr\", &lr_param);\n if (lr_param == ((void *)0)) {\n route = ((void *)0);\n }\n }\n if (route != ((void *)0) && route->url != ((void *)0)) {\n int port = 5060;\n if (route->url->port != ((void *)0))\n port = osip_atoi(route->url->port);\n osip_ict_set_destination((*ict), osip_strdup(route->url->host), port);\n } else {\n int port = 5060;\n osip_uri_param_t *maddr_param = ((void *)0);\n osip_uri_param_t *obr_param = ((void *)0);\n osip_uri_param_t *obp_param = ((void *)0);\n port = 5060;\n if (invite->req_uri->port != ((void *)0))\n port = osip_atoi(invite->req_uri->port);\n osip_uri_param_get_byname((&(invite->req_uri)->url_params), \"x-obr\", &obr_param);\n osip_uri_param_get_byname((&(invite->req_uri)->url_params), \"x-obp\", &obp_param);\n osip_uri_param_get_byname((&(invite->req_uri)->url_params), \"maddr\", &maddr_param);\n if (maddr_param != ((void *)0) && maddr_param->gvalue != ((void *)0))\n osip_ict_set_destination((*ict), osip_strdup(maddr_param->gvalue), port);\n else if (obr_param != ((void *)0) && obr_param->gvalue != ((void *)0) && obp_param != ((void *)0) && obp_param->gvalue != ((void *)0))\n osip_ict_set_destination((*ict), osip_strdup(obr_param->gvalue), osip_atoi(obp_param->gvalue));\n else\n osip_ict_set_destination((*ict), osip_strdup(invite->req_uri->host), port);\n }\n (*ict)->timer_b_length = 64 * 500;\n osip_gettimeofday(&(*ict)->timer_b_start, ((void *)0));\n add_gettimeofday(&(*ict)->timer_b_start, (*ict)->timer_b_length);\n return 0;\n}\n", "c_constructs": {"pointer_type": 7, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 19, "memory_management": 3, "memory_operation": 1, "if_statement": 14, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "tar-1.34#exclist_prep#exclude_vcs_ignores.c", "codebase": "tar-1.34", "c_file": "exclist.c", "function": "exclude_vcs_ignores", "sloc": "7", "c_code": "void\nexclude_vcs_ignores (void)\n{\n struct vcs_ignore_file *p;\n for (p = vcs_ignore_files; p->filename; p++)\n excfile_add (p->filename, 0x00);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#globals_prep#__oldXMLWDcompatibility.c", "codebase": "libxml2", "c_file": "globals.c", "function": "__oldXMLWDcompatibility", "sloc": "4", "c_code": "const int *\n__oldXMLWDcompatibility(void) {\n return &oldXMLWDcompatibility;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#valid_prep#xmlIsMixedElement.c", "codebase": "libxml2", "c_file": "valid.c", "function": "xmlIsMixedElement", "sloc": "20", "c_code": "int\nxmlIsMixedElement(xmlDocPtr doc, const xmlChar *name) {\n xmlElementPtr elemDecl;\n if ((doc == ((void *)0)) || (doc->intSubset == ((void *)0))) return(-1);\n elemDecl = xmlGetDtdElementDesc(doc->intSubset, name);\n if ((elemDecl == ((void *)0)) && (doc->extSubset != ((void *)0)))\n elemDecl = xmlGetDtdElementDesc(doc->extSubset, name);\n if (elemDecl == ((void *)0)) return(-1);\n switch (elemDecl->etype) {\n case XML_ELEMENT_TYPE_UNDEFINED:\n return(-1);\n case XML_ELEMENT_TYPE_ELEMENT:\n return(0);\n case XML_ELEMENT_TYPE_EMPTY:\n case XML_ELEMENT_TYPE_ANY:\n case XML_ELEMENT_TYPE_MIXED:\n return(1);\n }\n return(1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 0}}, {"id": "nano-7.2#nano_prep#delete_node.c", "codebase": "nano-7.2", "c_file": "nano.c", "function": "delete_node", "sloc": "10", "c_code": "void delete_node(linestruct *line)\n{\n if (line == openfile->edittop)\n openfile->edittop = line->prev;\n if (line == openfile->spillage_line)\n openfile->spillage_line = ((void *)0);\n free(line->data);\n free(line->multidata);\n free(line);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 3, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#timespec-sub_prep#timespec_sub.c", "codebase": "tar-1.34", "c_file": "timespec-sub.c", "function": "timespec_sub", "sloc": "34", "c_code": "struct timespec\ntimespec_sub (struct timespec a, struct timespec b)\n{\n time_t rs = a.tv_sec;\n time_t bs = b.tv_sec;\n int ns = a.tv_nsec - b.tv_nsec;\n int rns = ns;\n if (ns < 0)\n {\n rns = ns + TIMESPEC_HZ;\n time_t bs1;\n if (!__builtin_add_overflow (bs, 1, &bs1))\n bs = bs1;\n else if (- (! ((time_t) 0 < (time_t) -1)) < rs)\n rs--;\n else\n goto low_overflow;\n }\n if (__builtin_sub_overflow (rs, bs, &rs))\n {\n if (0 < bs)\n {\n low_overflow:\n rs = ((time_t) ~ ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1))));\n rns = 0;\n }\n else\n {\n rs = ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1)));\n rns = TIMESPEC_HZ - 1;\n }\n }\n return make_timespec (rs, rns);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 1, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#WRITE_YOU_OWN_POWER_WITHOUT_USING_MULTIPLICATION_AND_DIVISION_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "WRITE_YOU_OWN_POWER_WITHOUT_USING_MULTIPLICATION_AND_DIVISION.c", "function": "f_gold", "sloc": "17", "c_code": "int f_gold ( int a, int b ) {\n if ( b == 0 ) return 1;\n int answer = a;\n int increment = a;\n int i, j;\n for ( i = 1;\n i < b;\n i ++ ) {\n for ( j = 1;\n j < a;\n j ++ ) {\n answer += increment;\n }\n increment = answer;\n }\n return answer;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_ROTATIONS_UNLOCK_CIRCULAR_LOCK_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "MINIMUM_ROTATIONS_UNLOCK_CIRCULAR_LOCK.c", "function": "f_gold", "sloc": "12", "c_code": "int f_gold ( int input, int unlock_code ) {\n int rotation = 0;\n int input_digit, code_digit;\n while ( input || unlock_code ) {\n input_digit = input % 10;\n code_digit = unlock_code % 10;\n rotation += min ( abs ( input_digit - code_digit ), 10 - abs ( input_digit - code_digit ) );\n input /= 10;\n unlock_code /= 10;\n }\n return rotation;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsCombiningDiacriticalMarksforSymbols.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsCombiningDiacriticalMarksforSymbols", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsCombiningDiacriticalMarksforSymbols(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsCombiningDiacriticalMarksforSymbols\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsCombiningDiacriticalMarksforSymbols\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsCombiningDiacriticalMarksforSymbols(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tar-1.34#renameatu_prep#renameatu.c", "codebase": "tar-1.34", "c_file": "renameatu.c", "function": "renameatu", "sloc": "67", "c_code": "int\nrenameatu (int fd1, char const *src, int fd2, char const *dst,\n unsigned int flags)\n{\n int ret_val = -1;\n int err = 22;\n ret_val = renameat2 (fd1, src, fd2, dst, flags);\n err = (*__errno_location ());\n if (! (ret_val < 0 && (err == 22 || err == 38 || err == 95)))\n return ret_val;\n {\n size_t src_len;\n size_t dst_len;\n char *src_temp = (char *) src;\n char *dst_temp = (char *) dst;\n _Bool src_slash;\n _Bool dst_slash;\n int rename_errno = 20;\n struct stat src_st;\n struct stat dst_st;\n _Bool dst_found_nonexistent = 0;\n if (flags & ~(1 << 0))\n return errno_fail (95);\n if ((flags & (1 << 0)) != 0)\n {\n if (lstatat (fd2, dst, &dst_st) == 0 || (*__errno_location ()) == 75)\n return errno_fail (17);\n if ((*__errno_location ()) != 2)\n return -1;\n dst_found_nonexistent = 1;\n }\n src_len = strlen (src);\n dst_len = strlen (dst);\n if (!src_len || !dst_len)\n return renameat (fd1, src, fd2, dst);\n src_slash = src[src_len - 1] == '/';\n dst_slash = dst[dst_len - 1] == '/';\n if (!src_slash && !dst_slash)\n return renameat (fd1, src, fd2, dst);\n if (lstatat (fd1, src, &src_st))\n return -1;\n if (dst_found_nonexistent)\n {\n if (!((((src_st.st_mode)) & 0170000) == (0040000)))\n return errno_fail (2);\n }\n else if (lstatat (fd2, dst, &dst_st))\n {\n if ((*__errno_location ()) != 2 || !((((src_st.st_mode)) & 0170000) == (0040000)))\n return -1;\n }\n else if (!((((dst_st.st_mode)) & 0170000) == (0040000)))\n return errno_fail (20);\n else if (!((((src_st.st_mode)) & 0170000) == (0040000)))\n return errno_fail (21);\n ret_val = renameat (fd1, src_temp, fd2, dst_temp);\n rename_errno = (*__errno_location ());\n goto out;\n out:\n if (src_temp != src)\n free (src_temp);\n if (dst_temp != dst)\n free (dst_temp);\n (*__errno_location ()) = rename_errno;\n return ret_val;\n }\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 2, "memory_operation": 0, "if_statement": 16, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 1, "return_statement": 12, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_NUMBER_WAYS_REACH_GIVEN_SCORE_GAME_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBER_WAYS_REACH_GIVEN_SCORE_GAME.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#history_prep#history_init.c", "codebase": "nano-7.2", "c_file": "history.c", "function": "history_init", "sloc": "15", "c_code": "void history_init(void)\n{\n search_history = make_new_node(((void *)0));\n search_history->data = copy_of(\"\");\n searchtop = search_history;\n searchbot = search_history;\n replace_history = make_new_node(((void *)0));\n replace_history->data = copy_of(\"\");\n replacetop = replace_history;\n replacebot = replace_history;\n execute_history = make_new_node(((void *)0));\n execute_history->data = copy_of(\"\");\n executetop = execute_history;\n executebot = execute_history;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#stream_supp_prep#Pl_Make_Stream_Tagged_Word.c", "codebase": "gprolog-1.5.0", "c_file": "stream_supp.c", "function": "Pl_Make_Stream_Tagged_Word", "sloc": "8", "c_code": "WamWord\nPl_Make_Stream_Tagged_Word(int stm)\n{\n static WamWord h[2];\n h[0] = stream_1;\n h[1] = (((PlULong) (stm) << 3) | (PlULong)0x7);\n return ((PlLong) (h) + ((PlULong)0x2));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#error_supp_prep#Pl_Set_Last_Syntax_Error.c", "codebase": "gprolog-1.5.0", "c_file": "error_supp.c", "function": "Pl_Set_Last_Syntax_Error", "sloc": "9", "c_code": "void\nPl_Set_Last_Syntax_Error(char *file_name, int err_line, int err_col,\n char *err_msg)\n{\n last_err_file = file_name;\n last_err_line = err_line;\n last_err_col = err_col;\n last_err_msg = err_msg;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#trees_prep#_tr_init.c", "codebase": "optipng-0.7.8", "c_file": "trees.c", "function": "_tr_init", "sloc": "12", "c_code": "void _tr_init(deflate_state *s) {\n tr_static_init();\n s->l_desc.dyn_tree = s->dyn_ltree;\n s->l_desc.stat_desc = &static_l_desc;\n s->d_desc.dyn_tree = s->dyn_dtree;\n s->d_desc.stat_desc = &static_d_desc;\n s->bl_desc.dyn_tree = s->bl_tree;\n s->bl_desc.stat_desc = &static_bl_desc;\n s->bi_buf = 0;\n s->bi_valid = 0;\n init_block(s);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathNextFollowingSibling.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathNextFollowingSibling", "sloc": "12", "c_code": "xmlNodePtr\nxmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {\n if ((ctxt == ((void *)0)) || (ctxt->context == ((void *)0))) return(((void *)0));\n if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) ||\n (ctxt->context->node->type == XML_NAMESPACE_DECL))\n return(((void *)0));\n if (cur == (xmlNodePtr) ctxt->context->doc)\n return(((void *)0));\n if (cur == ((void *)0))\n return(ctxt->context->node->next);\n return(cur->next);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_skip_all_skippables.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_skip_all_skippables", "sloc": "31", "c_code": "int json_skip_all_skippables(struct json_parse_state_s *state) {\n int did_consume = 0;\n const size_t size = state->size;\n if (json_parse_flags_allow_c_style_comments & state->flags_bitset) {\n do {\n if (state->offset == size) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n did_consume = json_skip_whitespace(state);\n if (state->offset >= size) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n did_consume |= json_skip_c_style_comments(state);\n } while (0 != did_consume);\n } else {\n do {\n if (state->offset == size) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n did_consume = json_skip_whitespace(state);\n } while (0 != did_consume);\n }\n if (state->offset == size) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "cflow-1.7#hash_prep#hash_lookup.c", "codebase": "cflow-1.7", "c_file": "hash.c", "function": "hash_lookup", "sloc": "12", "c_code": "void *\nhash_lookup (const Hash_table *table, const void *entry)\n{\n struct hash_entry const *bucket = safe_hasher (table, entry);\n struct hash_entry const *cursor;\n if (bucket->data == ((void *)0))\n return ((void *)0);\n for (cursor = bucket; cursor; cursor = cursor->next)\n if (entry == cursor->data || table->comparator (entry, cursor->data))\n return cursor->data;\n return ((void *)0);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "nano-7.2#winio_prep#full_refresh.c", "codebase": "nano-7.2", "c_file": "winio.c", "function": "full_refresh", "sloc": "4", "c_code": "void full_refresh(void)\n{\n wrefresh(curscr);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#test_prep#json_write_minified_object.c", "codebase": "json.h", "c_file": "test.c", "function": "json_write_minified_object", "sloc": "21", "c_code": "char *json_write_minified_object(const struct json_object_s *object,\n char *data) {\n struct json_object_element_s *element = 0;\n *data++ = '{';\n for (element = object->start; 0 != element; element = element->next) {\n if (element != object->start) {\n *data++ = ',';\n }\n data = json_write_string(element->name, data);\n if (0 == data) {\n return 0;\n }\n *data++ = ':';\n data = json_write_minified_value(element->value, data);\n if (0 == data) {\n return 0;\n }\n }\n *data++ = '}';\n return data;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#NEWMAN_CONWAY_SEQUENCE_1_prep#len.c", "codebase": "transcoder-set", "c_file": "NEWMAN_CONWAY_SEQUENCE_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#debug_prep#do_finish.c", "codebase": "gawk-5.2.2", "c_file": "debug.c", "function": "do_finish", "sloc": "18", "c_code": "int\ndo_finish(CMDARG *arg __attribute__ ((__unused__)), int cmd)\n{\n do { if (! prog_running) { d_error(gettext(\"program not running\")); return 0; } } while (0);\n if (cur_frame == fcall_count) {\n fprintf(out_fp,\n gettext(\"'finish' not meaningful in the outermost frame main()\\n\"));\n return 0;\n }\n stop.fcall_count = fcall_count - cur_frame - 1;\n ((void) (0));\n fprintf(out_fp, gettext(\"Run until return from \"));\n print_numbered_frame(cur_frame);\n stop.check_func = check_finish;\n stop.command = (enum argtype) cmd;\n stop.print_ret = 1;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "ed-1.19#regex_prep#next_matching_node_addr.c", "codebase": "ed-1.19", "c_file": "regex.c", "function": "next_matching_node_addr", "sloc": "21", "c_code": "int next_matching_node_addr( const char ** const ibufpp )\n {\n const bool forward = ( **ibufpp == '/' );\n const regex_t * const exp = get_compiled_regex( ibufpp );\n int addr = current_addr();\n if( !exp ) return -1;\n do {\n addr = ( forward ? inc_addr( addr ) : dec_addr( addr ) );\n if( addr )\n {\n const line_t * const lp = search_line_node( addr );\n char * const s = get_sbuf_line( lp );\n if( !s ) return -1;\n if( isbinary() ) nul_to_newline( s, lp->len );\n if( !regexec( exp, s, 0, 0, 0 ) ) return addr;\n }\n }\n while( addr != current_addr() );\n set_error_msg( no_match );\n return -1;\n }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "tmux#server-fn_prep#server_status_session_group.c", "codebase": "tmux", "c_file": "server-fn.c", "function": "server_status_session_group", "sloc": "11", "c_code": "void\nserver_status_session_group(struct session *s)\n{\n struct session_group *sg;\n if ((sg = session_group_contains(s)) == ((void *)0))\n server_status_session(s);\n else {\n for((s) = ((&sg->sessions)->tqh_first); (s) != ((void *)0); (s) = ((s)->gentry.tqe_next))\n server_status_session(s);\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_www_authenticate_prep#osip_www_authenticate_get_targetname.c", "codebase": "libosip2-5.3.1", "c_file": "osip_www_authenticate.c", "function": "osip_www_authenticate_get_targetname", "sloc": "3", "c_code": "char *osip_www_authenticate_get_targetname(osip_www_authenticate_t *www_authenticate) {\n return www_authenticate->targetname;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#encoding_prep#EncodeChar.c", "codebase": "screen-4.9.0", "c_file": "encoding.c", "function": "EncodeChar", "sloc": "167", "c_code": "int\nEncodeChar(bp, c, encoding, fontp)\nchar *bp;\nint c;\nint encoding;\nint *fontp;\n{\n int t, f, l;\n do {} while (0);\n if (c == -1 && fontp)\n {\n if (*fontp == 0)\n return 0;\n if (bp)\n {\n *bp++ = 033;\n *bp++ = '(';\n *bp++ = 'B';\n }\n return 3;\n }\n f = (c >> 16) & 0xff;\n if (encoding == 8)\n {\n if (f)\n {\n if (((f) && ((f) & 0x60) == 0))\n {\n int c2 = c & 0xff;\n c = (c >> 8 & 0xff) | (f << 8);\n c = recode_char_dw_to_encoding(c, &c2, encoding);\n }\n else\n {\n c = (c & 0xff) | (f << 8);\n c = recode_char_to_encoding(c, encoding);\n }\n }\n return ToUtf8(bp, c);\n }\n if (f == 0 && (c & 0x7f00ff00) != 0)\n {\n if (c >= 0x10000)\n c = (c & 0x7f0000) >> 8 | (c & 0xffff);\n if (utf8_isdouble(c))\n {\n int c2 = 0xffff;\n c = recode_char_dw_to_encoding(c, &c2, encoding);\n c = (c << 8) | (c2 & 0xff);\n }\n else\n {\n c = recode_char_to_encoding(c, encoding);\n c = ((c & 0xff00) << 8) | (c & 0xff);\n }\n do {} while (0);\n f = c >> 16;\n }\n if (f & 0x80)\n f = 0;\n if (encoding == 2)\n {\n if (f == 'I')\n c = (c & 0xff) | 0x80;\n else if (f == ('B' & 037))\n {\n if (!bp)\n return 2;\n t = c & 0xff;\n c = (c >> 8) & 0xff;\n t += (c & 1) ? ((t <= 0x5f) ? 0x1f : 0x20) : 0x7e;\n c = (c - 0x21) / 2 + ((c < 0x5f) ? 0x81 : 0xc1);\n *bp++ = c;\n *bp++ = t;\n return 2;\n }\n }\n if (encoding == 1)\n {\n if (f == 'I')\n {\n if (bp)\n {\n *bp++ = 0x8e;\n *bp++ = c;\n }\n return 2;\n }\n if (f == ('B' & 037))\n {\n if (bp)\n {\n *bp++ = (c >> 8) | 0x80;\n *bp++ = c | 0x80;\n }\n return 2;\n }\n if (f == ('D' & 037))\n {\n if (bp)\n {\n *bp++ = 0x8f;\n *bp++ = c >> 8;\n *bp++ = c;\n }\n return 3;\n }\n }\n if ((encoding == 3 && f == 3) || (encoding == 4 && f == 1))\n {\n if (bp)\n {\n *bp++ = (c >> 8) | 0x80;\n *bp++ = c | 0x80;\n }\n return 2;\n }\n if ((encoding == 5 && f == 030) || (encoding == 20 && f == 031))\n {\n if (bp)\n {\n *bp++ = (c >> 8) | 0x80;\n *bp++ = c;\n }\n return 2;\n }\n if (encoding == 20 && f == 0 && c == 0xa4)\n c = 0x80;\n l = 0;\n if (fontp && f != *fontp)\n {\n *fontp = f;\n if (f && f < ' ')\n {\n if (bp)\n {\n *bp++ = 033;\n *bp++ = '$';\n if (f > 2)\n *bp++ = '(';\n *bp++ = '@' + f;\n }\n l += f > 2 ? 4 : 3;\n }\n else if (f < 128)\n {\n if (f == 0)\n f = 'B';\n if (bp)\n {\n *bp++ = 033;\n *bp++ = '(';\n *bp++ = f;\n }\n l += 3;\n }\n }\n if (c & 0xff00)\n {\n if (bp)\n *bp++ = c >> 8;\n l++;\n }\n if (bp)\n *bp++ = c;\n return l + 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 36, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 11, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#misc_prep#str_to_offset_with_end.c", "codebase": "mtools-4.0.43", "c_file": "misc.c", "function": "str_to_offset_with_end", "sloc": "19", "c_code": "off_t str_to_offset_with_end(const char *str, char **endp) {\n char s;\n off_t ofs;\n *endp = ((void *)0);\n ofs = strtol(str, endp, 0);\n s = **endp;\n if (s == 's' || s == 'S')\n ofs <<= 9;\n else if (s == 'k' || s == 'K')\n ofs <<= 10;\n else if (s == 'm' || s == 'M')\n ofs <<= 20;\n else if (s == 'g' || s == 'G')\n ofs <<= 30;\n else\n return ofs;\n (*endp)++;\n return ofs;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#candles_prep#tc_engulfing_bear.c", "codebase": "tulipindicators-0.9.1", "c_file": "candles.c", "function": "tc_engulfing_bear", "sloc": "5", "c_code": "int tc_engulfing_bear(int size, TC_REAL const *const *inputs, tc_config const *options, tc_result *output) {\n const TC_REAL *open = inputs[0]; const TC_REAL *high = inputs[1]; const TC_REAL *low = inputs[2]; const TC_REAL *close = inputs[3]; const int period = options->period; const TC_REAL div = 1.0 / period; TC_REAL avg_body_sum = 0; TC_REAL avg_total_sum = 0; if (period < 1) return 1; if (size < period) return 0; int i; for (i = 0; i < period; ++i) { avg_body_sum += (fabs(open[(i)] - close[(i)])); avg_total_sum += (high[(i)] - low[(i)]); }\n while(i < size) { const TC_REAL top = (open[(i)] > close[(i)] ? open[(i)] : close[(i)]); const TC_REAL bottom = (open[(i)] < close[(i)] ? open[(i)] : close[(i)]); const TC_REAL body = (fabs(open[(i)] - close[(i)])); const TC_REAL total = (high[(i)] - low[(i)]); const TC_REAL upper = (high[(i)] - top); const TC_REAL lower = (bottom - low[(i)]); const TC_REAL avg_body = avg_body_sum * div; const TC_REAL avg_total = avg_total_sum * div; (void)top;(void)bottom;(void)body;(void)total; (void)upper;(void)lower;(void)avg_body;(void)avg_total; if (i>=1 && (open[i]>close[i]) && (open[i-1] close[i-1]) { do { const tc_hit hit = {i, (1L<<7)}; const int r = tc_result_add(output, hit); if (r != 0) return r; } while (0); } avg_body_sum += body; avg_body_sum -= (fabs(open[(i-period)] - close[(i-period)])); avg_total_sum += total; avg_total_sum -= (high[(i-period)] - low[(i-period)]); ++i; };\n return 0;\n }\n", "c_constructs": {"pointer_type": 4, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "enscript-1.6.6#strhash_prep#strhash_get.c", "codebase": "enscript-1.6.6", "c_file": "strhash.c", "function": "strhash_get", "sloc": "25", "c_code": "int\nstrhash_get (StringHashPtr hash, const char *key, int keylen, void **data)\n{\n HashList *list;\n int pos, cmp_val;\n if (!hash || !key || keylen <= 0 || !data)\n return 0;\n *data = ((void *)0);\n pos = count_hash (key, keylen);\n for (list = hash->hash_table[pos]; list; list = list->next)\n if (list->keylen == keylen)\n {\n cmp_val = memcmp (key, list->key, keylen);\n if (cmp_val == 0)\n {\n *data = list->data;\n return 1;\n }\n else if (cmp_val < 0)\n break;\n }\n else if (list->keylen > keylen)\n break;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 2}}, {"id": "tmux#xmalloc_prep#xmalloc.c", "codebase": "tmux", "c_file": "xmalloc.c", "function": "xmalloc", "sloc": "12", "c_code": "void *\nxmalloc(size_t size)\n{\n void *ptr;\n if (size == 0)\n fatalx(\"xmalloc: zero size\");\n ptr = malloc(size);\n if (ptr == ((void *)0))\n fatalx(\"xmalloc: allocating %zu bytes: %s\",\n size, strerror((*__errno_location ())));\n return ptr;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_fisher_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_fisher_start", "sloc": "3", "c_code": "int ti_fisher_start(double const *options) {\n return (int)options[0]-1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_EQUAL_POINT_STRING_BRACKETS_prep#min.c", "codebase": "transcoder-set", "c_file": "FIND_EQUAL_POINT_STRING_BRACKETS.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlReaderForDoc.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlReaderForDoc", "sloc": "14", "c_code": "PyObject *\nlibxml_xmlReaderForDoc(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlTextReaderPtr c_retval;\n xmlChar * cur;\n char * URL;\n char * encoding;\n int options;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"zzzi:xmlReaderForDoc\", &cur, &URL, &encoding, &options))\n return(((void *)0));\n c_retval = xmlReaderForDoc(cur, URL, encoding, options);\n py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsSupplementaryPrivateUseAreaA.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsSupplementaryPrivateUseAreaA", "sloc": "4", "c_code": "int\nxmlUCSIsSupplementaryPrivateUseAreaA(int code) {\n return(((code >= 0xF0000) && (code <= 0xFFFFF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ecc-size_prep#nettle_ecc_size.c", "codebase": "nettle-3.9.1", "c_file": "ecc-size.c", "function": "nettle_ecc_size", "sloc": "5", "c_code": "mp_size_t\nnettle_ecc_size (const struct ecc_curve *ecc)\n{\n return ecc->p.size;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cflow-1.7#wordsplit_prep#wordsplit_free_envbuf.c", "codebase": "cflow-1.7", "c_file": "wordsplit.c", "function": "wordsplit_free_envbuf", "sloc": "15", "c_code": "void\nwordsplit_free_envbuf (struct wordsplit *ws)\n{\n if (!(ws->ws_flags & 0x00080000))\n return;\n if (ws->ws_envbuf)\n {\n size_t i;\n for (i = 0; ws->ws_envbuf[i]; i++)\n free (ws->ws_envbuf[i]);\n free (ws->ws_envbuf);\n ws->ws_envidx = ws->ws_envsiz = 0;\n ws->ws_envbuf = ((void *)0);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 2, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_IF_A_NUMBER_IS_JUMBLED_OR_NOT_prep#max.c", "codebase": "transcoder-set", "c_file": "CHECK_IF_A_NUMBER_IS_JUMBLED_OR_NOT.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#fstype_prep#is_used_fs_type.c", "codebase": "findutils-4.9.0", "c_file": "fstype.c", "function": "is_used_fs_type", "sloc": "26", "c_code": "_Bool\nis_used_fs_type(const char *name)\n{\n if (0 == strcmp(\"afs\", name))\n {\n return 1;\n }\n else\n {\n const struct mount_entry *entries = get_file_system_list(0);\n if (entries)\n {\n const struct mount_entry *entry;\n for (entry = entries; entry; entry = entry->me_next)\n {\n if (0 == strcmp(name, entry->me_type))\n return 1;\n }\n }\n else\n {\n return 1;\n }\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#QUERIES_COUNTS_ARRAY_ELEMENTS_VALUES_GIVEN_RANGE_prep#main.c", "codebase": "transcoder-set", "c_file": "QUERIES_COUNTS_ARRAY_ELEMENTS_VALUES_GIVEN_RANGE.c", "function": "main", "sloc": "27", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {9,16,19,24,36,38,42,49,51,53,53,57,57,58,71,78,78,92,92,93};\nint param0_1[] = {28,-74,-18,10,26,28,-96,-80,82,94,22,50,72,-90,76,50,20,-44,-80};\nint param0_2[] = {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,1};\nint param0_3[] = {25,8,66,90,50,65,76,90,27};\nint param0_4[] = {-98,-96,-90,-82,-80,-78,-70,-66,-60,-60,-50,-48,-34,-26,-24,-16,-14,-8,-6,4,22,24,26,30,30,48,52,56,60,62,74,76,78,86};\nint param0_5[] = {1,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,0,0};\nint param0_6[] = {4,6,17,19,24,29,30,31,32,37,37,40,43,44,44,45,57,64,69,70,73,78,86,89,91,92,94};\nint param0_7[] = {32,-88,70,-6,28,-48};\nint param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1};\nint param0_9[] = {37,84,97,74,12,26,47,10,14,33};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {13,18,30,4,32,15,17,4,13,5};\n int param2[] = {12,13,21,8,24,16,21,3,12,9};\n int param3[] = {13,13,31,5,24,12,15,4,11,8};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libzahl-1.0#zrsh_prep#zrsh.c", "codebase": "libzahl-1.0", "c_file": "zrsh.c", "function": "zrsh", "sloc": "34", "c_code": "void\nzrsh(z_t a, z_t b, size_t bits)\n{\n size_t i, chars, cbits;\n if (!bits) {\n do { if ((a) != (b)) zset(a, b); } while (0);\n return;\n }\n chars = ((bits) >> 5);\n if (zzero(b) || chars >= b->used || zbits(b) <= bits) {\n ((a)->sign = (0));\n return;\n }\n bits = ((bits) & (32 - 1));\n cbits = 32 - bits;\n if (chars && a == b) {\n a->used -= chars;\n memmove(a->chars, a->chars + chars, (a->used) * sizeof(zahl_char_t));\n } else if (a != b) {\n a->used = b->used - chars;\n do { if ((a)->alloced < (a->used)) libzahl_realloc(a, (a->used)); } while (0);\n memcpy(a->chars, b->chars + chars, (a->used) * sizeof(zahl_char_t));\n }\n if (bits) {\n a->chars[0] >>= bits;\n for (i = 1; i < a->used; i++) {\n a->chars[i - 1] |= a->chars[i] << cbits;\n a->chars[i] >>= bits;\n }\n while (!a->chars[a->used - 1])\n a->used--;\n }\n ((a)->sign = (zsignum(b)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 2, "if_statement": 7, "for_loop": 1, "while_loop": 3, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THE_FIRST_MISSING_NUMBER_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_THE_FIRST_MISSING_NUMBER.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int array [ ], int start, int end ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "diffutils-3.10#dtotimespec_prep#dtotimespec.c", "codebase": "diffutils-3.10", "c_file": "dtotimespec.c", "function": "dtotimespec", "sloc": "23", "c_code": "struct timespec\ndtotimespec (double sec)\n{\n if (! (((time_t) ~ ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1)))) < sec))\n return make_timespec (((time_t) ~ ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1)))), 0);\n else if (! (sec < 1.0 + ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1)))))\n return make_timespec (((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1))), TIMESPEC_HZ - 1);\n else\n {\n time_t s = sec;\n double frac = TIMESPEC_HZ * (sec - s);\n long ns = frac;\n ns += ns < frac;\n s += ns / TIMESPEC_HZ;\n ns %= TIMESPEC_HZ;\n if (ns < 0)\n {\n s--;\n ns += TIMESPEC_HZ;\n }\n return make_timespec (s, ns);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "lodepng#lodepng_prep#lodepng_get_raw_size.c", "codebase": "lodepng", "c_file": "lodepng.c", "function": "lodepng_get_raw_size", "sloc": "3", "c_code": "size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* color) {\n return lodepng_get_raw_size_lct(w, h, color->colortype, color->bitdepth);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Rd_Boolean_Check.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Rd_Boolean_Check", "sloc": "13", "c_code": "int\nPl_Rd_Boolean_Check(WamWord start_word)\n{\n WamWord word, tag_mask;\n int atom;\n do { WamWord deref_last_word; word = start_word; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0);\n if (tag_mask == (PlULong)0)\n Pl_Err_Instantiation();\n atom = ((PlULong) (word) >> 3);\n if (tag_mask != (PlULong)0x3 || (atom != pl_atom_true && atom != pl_atom_false))\n Pl_Err_Type(pl_type_boolean, word);\n return atom != pl_atom_false;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "json.h#allow_simplified_json_prep#json_get_key_size.c", "codebase": "json.h", "c_file": "allow_simplified_json.c", "function": "json_get_key_size", "sloc": "31", "c_code": "int json_get_key_size(struct json_parse_state_s *state) {\n const size_t flags_bitset = state->flags_bitset;\n if (json_parse_flags_allow_unquoted_keys & flags_bitset) {\n size_t offset = state->offset;\n const size_t size = state->size;\n const char *const src = state->src;\n size_t data_size = state->data_size;\n if ('\"' == src[offset]) {\n return json_get_string_size(state, 1);\n } else if ((json_parse_flags_allow_single_quoted_strings & flags_bitset) &&\n ('\\'' == src[offset])) {\n return json_get_string_size(state, 1);\n } else {\n while ((offset < size) && is_valid_unquoted_key_char(src[offset])) {\n offset++;\n data_size++;\n }\n data_size++;\n if (json_parse_flags_allow_location_information & flags_bitset) {\n state->dom_size += sizeof(struct json_string_ex_s);\n } else {\n state->dom_size += sizeof(struct json_string_s);\n }\n state->offset = offset;\n state->data_size = data_size;\n return 0;\n }\n } else {\n return json_get_string_size(state, 1);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "nano-7.2#prompt_prep#do_statusbar_delete.c", "codebase": "nano-7.2", "c_file": "prompt.c", "function": "do_statusbar_delete", "sloc": "10", "c_code": "void do_statusbar_delete(void)\n{\n if (answer[typing_x] != '\\0') {\n int charlen = char_length(answer + typing_x);\n memmove(answer + typing_x, answer + typing_x + charlen,\n strlen(answer) - typing_x - charlen + 1);\n if (is_zerowidth(answer + typing_x))\n do_statusbar_delete();\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#re_prep#refree.c", "codebase": "gawk-5.2.2", "c_file": "re.c", "function": "refree", "sloc": "17", "c_code": "void\nrefree(Regexp *rp)\n{\n if (rp == ((void *)0))\n return;\n rp->pat.translate = ((void *)0);\n regfree(& rp->pat);\n if (rp->regs.start)\n pma_free(rp->regs.start);\n if (rp->regs.end)\n pma_free(rp->regs.end);\n if (rp->dfareg != ((void *)0)) {\n dfafree(rp->dfareg);\n pma_free(rp->dfareg);\n }\n pma_free(rp);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#convert_prep#register_download.c", "codebase": "wget-1.21.4", "c_file": "convert.c", "function": "register_download", "sloc": "27", "c_code": "void\nregister_download (const char *url, const char *file)\n{\n char *old_file, *old_url;\n do { if (!dl_file_url_map) dl_file_url_map = make_string_hash_table (0); if (!dl_url_file_map) dl_url_file_map = make_string_hash_table (0); } while (0);\n if (hash_table_get_pair (dl_file_url_map, file, &old_file, &old_url))\n {\n if (0 == strcmp (url, old_url))\n return;\n if (match_except_index (url, old_url)\n && !hash_table_contains (dl_url_file_map, url))\n goto url_only;\n hash_table_remove (dl_file_url_map, file);\n do { free ((void *) (old_file)); old_file = ((void *)0); } while (0);\n do { free ((void *) (old_url)); old_url = ((void *)0); } while (0);\n dissociate_urls_from_file (file);\n }\n hash_table_put (dl_file_url_map, xstrdup (file), xstrdup (url));\n url_only:\n if (hash_table_get_pair (dl_url_file_map, url, &old_url, &old_file))\n {\n hash_table_remove (dl_url_file_map, url);\n do { free ((void *) (old_url)); old_url = ((void *)0); } while (0);\n do { free ((void *) (old_file)); old_file = ((void *)0); } while (0);\n }\n hash_table_put (dl_url_file_map, xstrdup (url), xstrdup (file));\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 4, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 5, "switch_statement": 0, "goto_statement": 1, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_LAST_DIGIT_FACTORIAL_DIVIDES_FACTORIAL_B_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FIND_LAST_DIGIT_FACTORIAL_DIVIDES_FACTORIAL_B.c", "function": "f_gold", "sloc": "11", "c_code": "int f_gold ( long long int A, long long int B ) {\n int variable = 1;\n if ( A == B ) return 1;\n else if ( ( B - A ) >= 5 ) return 0;\n else {\n for ( long long int i = A + 1;\n i <= B;\n i ++ ) variable = ( variable * ( i % 10 ) ) % 10;\n return variable % 10;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlParseContent.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlParseContent", "sloc": "9", "c_code": "void\nxmlParseContent(xmlParserCtxtPtr ctxt) {\n if ((ctxt == ((void *)0)) || (ctxt->input == ((void *)0)))\n return;\n xmlCtxtInitializeLate(ctxt);\n xmlParseContentInternal(ctxt);\n if (ctxt->input->cur < ctxt->input->end)\n xmlFatalErr(ctxt, XML_ERR_NOT_WELL_BALANCED, ((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#der-iterator_prep#nettle_asn1_der_iterator_next.c", "codebase": "nettle-3.9.1", "c_file": "der-iterator.c", "function": "nettle_asn1_der_iterator_next", "sloc": "47", "c_code": "enum asn1_iterator_result\nnettle_asn1_der_iterator_next(struct asn1_der_iterator *i)\n{\n uint8_t tag;\n if (!((i)->buffer_length - (i)->pos))\n return ASN1_ITERATOR_END;\n tag = ((i)->buffer[(i)->pos++]);\n if (!((i)->buffer_length - (i)->pos))\n return ASN1_ITERATOR_ERROR;\n if ( (tag & TAG_MASK) == TAG_MASK)\n {\n return ASN1_ITERATOR_ERROR;\n }\n i->length = ((i)->buffer[(i)->pos++]);\n if (i->length & 0x80)\n {\n unsigned k = i->length & 0x7f;\n unsigned j;\n const uint8_t *data = i->buffer + i->pos;\n if (k == 0)\n return ASN1_ITERATOR_ERROR;\n if (((i)->buffer_length - (i)->pos) < k)\n return ASN1_ITERATOR_ERROR;\n if (k > sizeof(i->length))\n return ASN1_ITERATOR_ERROR;\n i->pos += k;\n i->length = data[0];\n if (i->length == 0\n || (k == 1 && i->length < 0x80))\n return ASN1_ITERATOR_ERROR;\n for (j = 1; j < k; j++)\n i->length = (i->length << 8) | data[j];\n }\n if (((i)->buffer_length - (i)->pos) < i->length)\n return ASN1_ITERATOR_ERROR;\n i->data = i->buffer + i->pos;\n i->pos += i->length;\n i->type = tag & TAG_MASK;\n i->type |= (tag & CLASS_MASK) << (ASN1_CLASS_SHIFT - 6);\n if (tag & CONSTRUCTED_MASK)\n {\n i->type |= ASN1_TYPE_CONSTRUCTED;\n return ASN1_ITERATOR_CONSTRUCTED;\n }\n else\n return ASN1_ITERATOR_PRIMITIVE;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 10, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 10, "break_continue_statement": 0}}, {"id": "tinycc#tccelf_prep#put_stabs_r.c", "codebase": "tinycc", "c_file": "tccelf.c", "function": "put_stabs_r", "sloc": "8", "c_code": "void put_stabs_r(const char *str, int type, int other, int desc,\n unsigned long value, Section *sec, int sym_index)\n{\n put_stabs(str, type, other, desc, value);\n put_elf_reloc(symtab_section, stab_section,\n stab_section->data_offset - sizeof(unsigned int),\n 11, sym_index);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "less-633#lesskey_prep#homefile.c", "codebase": "less-633", "c_file": "lesskey.c", "function": "homefile", "sloc": "13", "c_code": "char * homefile(char *filename)\n{\n char *p;\n char *pathname;\n if ((p = getenv(\"HOME\")) != ((void *)0) && *p != '\\0')\n pathname = mkpathname(p, filename);\n else\n {\n fprintf(stderr, \"cannot find $HOME - using current directory\\n\");\n pathname = mkpathname(\".\", filename);\n }\n return (pathname);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#strtonum_prep#atou8.c", "codebase": "mtools-4.0.43", "c_file": "strtonum.c", "function": "atou8", "sloc": "3", "c_code": "uint8_t atou8(const char *str) {\n return strtou8(str, 0, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_leading_plus_sign_prep#json_get_value_size.c", "codebase": "json.h", "c_file": "allow_leading_plus_sign.c", "function": "json_get_value_size", "sloc": "94", "c_code": "int json_get_value_size(struct json_parse_state_s *state,\n int is_global_object) {\n const size_t flags_bitset = state->flags_bitset;\n const char *const src = state->src;\n size_t offset;\n const size_t size = state->size;\n if (json_parse_flags_allow_location_information & flags_bitset) {\n state->dom_size += sizeof(struct json_value_ex_s);\n } else {\n state->dom_size += sizeof(struct json_value_s);\n }\n if (is_global_object) {\n return json_get_object_size(state, 1);\n } else {\n if (json_skip_all_skippables(state)) {\n state->error = json_parse_error_premature_end_of_buffer;\n return 1;\n }\n offset = state->offset;\n switch (src[offset]) {\n case '\"':\n return json_get_string_size(state, 0);\n case '\\'':\n if (json_parse_flags_allow_single_quoted_strings & flags_bitset) {\n return json_get_string_size(state, 0);\n } else {\n state->error = json_parse_error_invalid_value;\n return 1;\n }\n case '{':\n return json_get_object_size(state, 0);\n case '[':\n return json_get_array_size(state);\n case '-':\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n return json_get_number_size(state);\n case '+':\n if (json_parse_flags_allow_leading_plus_sign & flags_bitset) {\n return json_get_number_size(state);\n } else {\n state->error = json_parse_error_invalid_number_format;\n return 1;\n }\n case '.':\n if (json_parse_flags_allow_leading_or_trailing_decimal_point &\n flags_bitset) {\n return json_get_number_size(state);\n } else {\n state->error = json_parse_error_invalid_number_format;\n return 1;\n }\n default:\n if ((offset + 4) <= size && 't' == src[offset + 0] &&\n 'r' == src[offset + 1] && 'u' == src[offset + 2] &&\n 'e' == src[offset + 3]) {\n state->offset += 4;\n return 0;\n } else if ((offset + 5) <= size && 'f' == src[offset + 0] &&\n 'a' == src[offset + 1] && 'l' == src[offset + 2] &&\n 's' == src[offset + 3] && 'e' == src[offset + 4]) {\n state->offset += 5;\n return 0;\n } else if ((offset + 4) <= size && 'n' == state->src[offset + 0] &&\n 'u' == state->src[offset + 1] &&\n 'l' == state->src[offset + 2] &&\n 'l' == state->src[offset + 3]) {\n state->offset += 4;\n return 0;\n } else if ((json_parse_flags_allow_inf_and_nan & flags_bitset) &&\n (offset + 3) <= size && 'N' == src[offset + 0] &&\n 'a' == src[offset + 1] && 'N' == src[offset + 2]) {\n return json_get_number_size(state);\n } else if ((json_parse_flags_allow_inf_and_nan & flags_bitset) &&\n (offset + 8) <= size && 'I' == src[offset + 0] &&\n 'n' == src[offset + 1] && 'f' == src[offset + 2] &&\n 'i' == src[offset + 3] && 'n' == src[offset + 4] &&\n 'i' == src[offset + 5] && 't' == src[offset + 6] &&\n 'y' == src[offset + 7]) {\n return json_get_number_size(state);\n }\n state->error = json_parse_error_invalid_value;\n return 1;\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 11, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 18, "break_continue_statement": 0}}, {"id": "cflow-1.7#c_prep#yy_flush_buffer.c", "codebase": "cflow-1.7", "c_file": "c.c", "function": "yy_flush_buffer", "sloc": "13", "c_code": "void yy_flush_buffer (YY_BUFFER_STATE b )\n{\n if ( ! b )\n return;\n b->yy_n_chars = 0;\n b->yy_ch_buf[0] = 0;\n b->yy_ch_buf[1] = 0;\n b->yy_buf_pos = &b->yy_ch_buf[0];\n b->yy_at_bol = 1;\n b->yy_buffer_status = 0;\n if ( b == ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)) )\n yy_load_buffer_state( );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#exclude_prep#new_exclude.c", "codebase": "tar-1.34", "c_file": "exclude.c", "function": "new_exclude", "sloc": "5", "c_code": "struct exclude *\nnew_exclude (void)\n{\n return xzalloc (sizeof *new_exclude ());\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#benchmark_prep#vidya_option_setter.c", "codebase": "tulipindicators-0.9.1", "c_file": "benchmark.c", "function": "vidya_option_setter", "sloc": "6", "c_code": "void vidya_option_setter(double period, double *options, int ti) {\n (void)ti;\n options[0] = period;\n options[1] = period + 10;\n options[2] = .2;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_prep#osip_get_application_context.c", "codebase": "libosip2-5.3.1", "c_file": "osip.c", "function": "osip_get_application_context", "sloc": "5", "c_code": "void *osip_get_application_context(osip_t *osip) {\n if (osip == ((void *)0))\n return ((void *)0);\n return osip->application_context;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_fork_prep#pth_atfork_push.c", "codebase": "pth-2.0.7", "c_file": "pth_fork.c", "function": "pth_atfork_push", "sloc": "12", "c_code": "int pth_atfork_push(void (*prepare)(void *), void (*parent)(void *),\n void (*child)(void *), void *arg)\n{\n if (pth_atfork_idx > 128 -1)\n return ((*__errno_location ()) = (12), ((0)));\n pth_atfork_list[pth_atfork_idx].prepare = prepare;\n pth_atfork_list[pth_atfork_idx].parent = parent;\n pth_atfork_list[pth_atfork_idx].child = child;\n pth_atfork_list[pth_atfork_idx].arg = arg;\n pth_atfork_idx++;\n return (!(0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 2, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_list_bool.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_list_bool", "sloc": "5", "c_code": "BOOL binn_list_bool(void *list, int pos) {\n BOOL value;\n binn_list_get(list, pos, 0x80061, &value, ((void *)0));\n return value;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "patch-2.7.6#patch_prep#fatal_exit.c", "codebase": "patch-2.7.6", "c_file": "patch.c", "function": "fatal_exit", "sloc": "8", "c_code": "void\nfatal_exit (int sig)\n{\n cleanup ();\n if (sig)\n exit_with_signal (sig);\n exit (2);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#tiffutil_prep#minitiff_validate_info.c", "codebase": "optipng-0.7.8", "c_file": "tiffutil.c", "function": "minitiff_validate_info", "sloc": "15", "c_code": "void minitiff_validate_info(const struct minitiff_info *info_ptr)\n{\n if (info_ptr->width == 0 || info_ptr->height == 0)\n minitiff_error(info_ptr, \"Invalid image dimensions in TIFF file\");\n if (info_ptr->bits_per_sample == 0 || info_ptr->samples_per_pixel == 0)\n minitiff_error(info_ptr, \"Invalid pixel info in TIFF file\");\n if (info_ptr->strip_offsets == ((void *)0) || info_ptr->rows_per_strip == 0)\n minitiff_error(info_ptr, \"Invalid strip info in TIFF file\");\n if (info_ptr->compression != MINITIFF_COMPRESSION_NONE)\n minitiff_error(info_ptr,\n \"Unsupported compression method in TIFF file\");\n if (info_ptr->photometric >= MINITIFF_PHOTOMETRIC_PALETTE)\n minitiff_error(info_ptr,\n \"Unsupported photometric interpretation in TIFF file\");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#utils_prep#actual_x.c", "codebase": "nano-7.2", "c_file": "utils.c", "function": "actual_x", "sloc": "12", "c_code": "size_t actual_x(const char *text, size_t column)\n{\n const char *start = text;\n size_t width = 0;\n while (*text != '\\0') {\n int charlen = advance_over(text, &width);\n if (width > column)\n break;\n text += charlen;\n }\n return (text - start);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#SUM_SERIES_555555_N_TERMS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SUM_SERIES_555555_N_TERMS.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#inffast_prep#inflate_fast.c", "codebase": "optipng-0.7.8", "c_file": "inffast.c", "function": "inflate_fast", "sloc": "211", "c_code": "void inflate_fast(z_streamp strm, unsigned start) {\n struct inflate_state *state;\n const unsigned char *in;\n const unsigned char *last;\n unsigned char *out;\n unsigned char *beg;\n unsigned char *end;\n unsigned wsize;\n unsigned whave;\n unsigned wnext;\n unsigned char *window;\n unsigned long hold;\n unsigned bits;\n code const *lcode;\n code const *dcode;\n unsigned lmask;\n unsigned dmask;\n code const *here;\n unsigned op;\n unsigned len;\n unsigned dist;\n unsigned char *from;\n state = (struct inflate_state *)strm->state;\n in = strm->next_in;\n last = in + (strm->avail_in - 5);\n out = strm->next_out;\n beg = out - (start - strm->avail_out);\n end = out + (strm->avail_out - 257);\n wsize = state->wsize;\n whave = state->whave;\n wnext = state->wnext;\n window = state->window;\n hold = state->hold;\n bits = state->bits;\n lcode = state->lencode;\n dcode = state->distcode;\n lmask = (1U << state->lenbits) - 1;\n dmask = (1U << state->distbits) - 1;\n do {\n if (bits < 15) {\n hold += (unsigned long)(*in++) << bits;\n bits += 8;\n hold += (unsigned long)(*in++) << bits;\n bits += 8;\n }\n here = lcode + (hold & lmask);\n dolen:\n op = (unsigned)(here->bits);\n hold >>= op;\n bits -= op;\n op = (unsigned)(here->op);\n if (op == 0) {\n ;\n *out++ = (unsigned char)(here->val);\n }\n else if (op & 16) {\n len = (unsigned)(here->val);\n op &= 15;\n if (op) {\n if (bits < op) {\n hold += (unsigned long)(*in++) << bits;\n bits += 8;\n }\n len += (unsigned)hold & ((1U << op) - 1);\n hold >>= op;\n bits -= op;\n }\n ;\n if (bits < 15) {\n hold += (unsigned long)(*in++) << bits;\n bits += 8;\n hold += (unsigned long)(*in++) << bits;\n bits += 8;\n }\n here = dcode + (hold & dmask);\n dodist:\n op = (unsigned)(here->bits);\n hold >>= op;\n bits -= op;\n op = (unsigned)(here->op);\n if (op & 16) {\n dist = (unsigned)(here->val);\n op &= 15;\n if (bits < op) {\n hold += (unsigned long)(*in++) << bits;\n bits += 8;\n if (bits < op) {\n hold += (unsigned long)(*in++) << bits;\n bits += 8;\n }\n }\n dist += (unsigned)hold & ((1U << op) - 1);\n hold >>= op;\n bits -= op;\n ;\n op = (unsigned)(out - beg);\n if (dist > op) {\n op = dist - op;\n if (op > whave) {\n if (state->sane) {\n strm->msg =\n (char *)\"invalid distance too far back\";\n state->mode = BAD;\n break;\n }\n }\n from = window;\n if (wnext == 0) {\n from += wsize - op;\n if (op < len) {\n len -= op;\n do {\n *out++ = *from++;\n } while (--op);\n from = out - dist;\n }\n }\n else if (wnext < op) {\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) {\n len -= op;\n do {\n *out++ = *from++;\n } while (--op);\n from = window;\n if (wnext < len) {\n op = wnext;\n len -= op;\n do {\n *out++ = *from++;\n } while (--op);\n from = out - dist;\n }\n }\n }\n else {\n from += wnext - op;\n if (op < len) {\n len -= op;\n do {\n *out++ = *from++;\n } while (--op);\n from = out - dist;\n }\n }\n while (len > 2) {\n *out++ = *from++;\n *out++ = *from++;\n *out++ = *from++;\n len -= 3;\n }\n if (len) {\n *out++ = *from++;\n if (len > 1)\n *out++ = *from++;\n }\n }\n else {\n from = out - dist;\n do {\n *out++ = *from++;\n *out++ = *from++;\n *out++ = *from++;\n len -= 3;\n } while (len > 2);\n if (len) {\n *out++ = *from++;\n if (len > 1)\n *out++ = *from++;\n }\n }\n }\n else if ((op & 64) == 0) {\n here = dcode + here->val + (hold & ((1U << op) - 1));\n goto dodist;\n }\n else {\n strm->msg = (char *)\"invalid distance code\";\n state->mode = BAD;\n break;\n }\n }\n else if ((op & 64) == 0) {\n here = lcode + here->val + (hold & ((1U << op) - 1));\n goto dolen;\n }\n else if (op & 32) {\n ;\n state->mode = TYPE;\n break;\n }\n else {\n strm->msg = (char *)\"invalid literal/length code\";\n state->mode = BAD;\n break;\n }\n } while (in < last && out < end);\n len = bits >> 3;\n in -= len;\n bits -= len << 3;\n hold &= (1U << bits) - 1;\n strm->next_in = in;\n strm->next_out = out;\n strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));\n strm->avail_out = (unsigned)(out < end ?\n 257 + (end - out) : 257 - (out - end));\n state->hold = hold;\n state->bits = bits;\n return;\n}\n", "c_constructs": {"pointer_type": 11, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 15, "memory_management": 0, "memory_operation": 0, "if_statement": 25, "for_loop": 0, "while_loop": 7, "switch_statement": 0, "goto_statement": 2, "return_statement": 1, "break_continue_statement": 4}}, {"id": "libxml2#relaxng_prep#xmlRelaxNGValidatePushCData.c", "codebase": "libxml2", "c_file": "relaxng.c", "function": "xmlRelaxNGValidatePushCData", "sloc": "21", "c_code": "int\nxmlRelaxNGValidatePushCData(xmlRelaxNGValidCtxtPtr ctxt,\n const xmlChar * data, int len __attribute__((unused)))\n{\n int ret = 1;\n if ((ctxt == ((void *)0)) || (ctxt->elem == ((void *)0)) || (data == ((void *)0)))\n return (-1);\n while (*data != 0) {\n if (!(((*data) == 0x20) || ((0x9 <= (*data)) && ((*data) <= 0xa)) || ((*data) == 0xd)))\n break;\n data++;\n }\n if (*data == 0)\n return (1);\n ret = xmlRegExecPushString(ctxt->elem, (xmlChar *) \"#text\", ctxt);\n if (ret < 0) {\n xmlRelaxNGAddValidError(ctxt, XML_RELAXNG_ERR_TEXTWRONG, (xmlChar *) \" TODO \", ((void *)0), 0);;\n return (-1);\n }\n return (1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 1}}, {"id": "enscript-1.6.6#util_prep#is_ungetc.c", "codebase": "enscript-1.6.6", "c_file": "util.c", "function": "is_ungetc", "sloc": "11", "c_code": "int\nis_ungetc (int ch, InputStream *is)\n{\n if (is->unget_pos >= is->unget_alloc)\n {\n is->unget_alloc += 1024;\n is->unget_ch = xrealloc (is->unget_ch, is->unget_alloc);\n }\n is->unget_ch[is->unget_pos++] = ch;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#random_prep#NormalRandom.c", "codebase": "mcsim-6.2.0", "c_file": "random.c", "function": "NormalRandom", "sloc": "18", "c_code": "double NormalRandom (double dMean, double dSD)\n{\n double dRacine, dTemp1, dTemp2, dTemp3;\n static double memGauss;\n if (vbSwitchGauss) {\n vbSwitchGauss = 0;\n return (dMean + dSD * memGauss);\n }\n do {\n dTemp1 = 2 * Randoms() - 1;\n dTemp2 = 2 * Randoms() - 1;\n dRacine = dTemp1 * dTemp1 + dTemp2 * dTemp2;\n } while ((dRacine >= 1) || (dRacine == 0));\n dTemp3 = sqrt(-2 * log(dRacine) / dRacine);\n vbSwitchGauss = 1;\n memGauss = dTemp1 * dTemp3;\n return (dMean + dSD * (dTemp2 * dTemp3));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "grep-3.11#offtostr_prep#offtostr.c", "codebase": "grep-3.11", "c_file": "offtostr.c", "function": "offtostr", "sloc": "20", "c_code": "__attribute__ ((__warn_unused_result__)) char *\nofftostr (off_t i, char *buf)\n{\n char *p = buf + (((((sizeof (off_t) * 8) - (! ((__typeof__ (off_t)) 0 < (__typeof__ (off_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (off_t)) 0 < (__typeof__ (off_t)) -1)));\n *p = 0;\n if (i < 0)\n {\n do\n *--p = '0' - i % 10;\n while ((i /= 10) != 0);\n *--p = '-';\n }\n else\n {\n do\n *--p = '0' + i % 10;\n while ((i /= 10) != 0);\n }\n return p;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#ch_prep#ch_setbufspace.c", "codebase": "less-633", "c_file": "ch.c", "function": "ch_setbufspace", "sloc": "12", "c_code": "void ch_setbufspace(int bufspace)\n{\n if (bufspace < 0)\n maxbufs = -1;\n else\n {\n int lbufk = 8192 / 1024;\n maxbufs = bufspace / lbufk + (bufspace % lbufk != 0);\n if (maxbufs < 1)\n maxbufs = 1;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "units-2.22#units_prep#freefunction.c", "codebase": "units-2.22", "c_file": "units.c", "function": "freefunction", "sloc": "19", "c_code": "void\nfreefunction(struct func *funcentry)\n{\n if (funcentry->table){\n free(funcentry->table);\n free(funcentry->tableunit);\n } else {\n free(funcentry->forward.param);\n free(funcentry->forward.def);\n if (funcentry->forward.domain_min) free(funcentry->forward.domain_min);\n if (funcentry->forward.domain_max) free(funcentry->forward.domain_max);\n if (funcentry->inverse.domain_min) free(funcentry->inverse.domain_min);\n if (funcentry->inverse.domain_max) free(funcentry->inverse.domain_max);\n if (funcentry->forward.dimen) free(funcentry->forward.dimen);\n if (funcentry->inverse.dimen) free(funcentry->inverse.dimen);\n if (funcentry->inverse.def) free(funcentry->inverse.def);\n if (funcentry->inverse.param) free(funcentry->inverse.param);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 12, "memory_operation": 0, "if_statement": 9, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_SUM_BITONIC_SUBARRAY_prep#main.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_SUM_BITONIC_SUBARRAY.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n 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};\nint 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};\nint 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};\nint param0_3[] = {69,31,85,84,28,28};\nint param0_4[] = {-80,-74,-24,-22,-22,4,20,28,30,32,36,58,58,68,92,94,98};\nint param0_5[] = {1,1,0,0,0,1,0,1,1,1,1};\nint 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};\nint param0_7[] = {26,-86,8,64,-40,64,60,-16,54,-42,-86,14,-48,-20,-42,-4,-34,-52,-74,22,10};\nint 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};\nint param0_9[] = {8,5,5,56,5,38};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {13,37,33,5,16,10,46,18,27,3};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "findutils-4.9.0#pred_prep#pred_newer.c", "codebase": "findutils-4.9.0", "c_file": "pred.c", "function": "pred_newer", "sloc": "7", "c_code": "_Bool\npred_newer (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)\n{\n (void) pathname;\n ((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__); }));\n return compare_ts (get_stat_mtime(stat_buf), pred_ptr->args.reftime.ts) > 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#buffer_prep#zbufcpy.c", "codebase": "uucp-1.07", "c_file": "buffer.c", "function": "zbufcpy", "sloc": "13", "c_code": "char *\nzbufcpy (z)\n const char *z;\n{\n size_t csize;\n char *zret;\n if (z == ((void *)0))\n return ((void *)0);\n csize = strlen (z) + 1;\n zret = zbufalc (csize);\n memcpy (zret, z, csize);\n return zret;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#SWAP_BITS_IN_A_GIVEN_NUMBER_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "SWAP_BITS_IN_A_GIVEN_NUMBER.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MINIMUM_NUMBER_OF_COINS_THAT_MAKE_A_CHANGE_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FIND_MINIMUM_NUMBER_OF_COINS_THAT_MAKE_A_CHANGE_1.c", "function": "f_gold", "sloc": "18", "c_code": "int f_gold ( int coins [ ], int m, int V ) {\n int table [ V + 1 ];\n table [ 0 ] = 0;\n for ( int i = 1;\n i <= V;\n i ++ ) table [ i ] = 0x7fffffff;\n for ( int i = 1;\n i <= V;\n i ++ ) {\n for ( int j = 0;\n j < m;\n j ++ ) if ( coins [ j ] <= i ) {\n int sub_res = table [ i - coins [ j ] ];\n if ( sub_res != 0x7fffffff && sub_res + 1 < table [ i ] ) table [ i ] = sub_res + 1;\n }\n }\n return table [ V ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DISTRIBUTING_M_ITEMS_CIRCLE_SIZE_N_STARTING_K_TH_POSITION_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "DISTRIBUTING_M_ITEMS_CIRCLE_SIZE_N_STARTING_K_TH_POSITION.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n, int m, int k ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#simo_prep#NextOutputTime.c", "codebase": "mcsim-6.2.0", "c_file": "simo.c", "function": "NextOutputTime", "sloc": "11", "c_code": "void NextOutputTime (PEXPERIMENT pexp, PDOUBLE pdTout, PINT piOut)\n{\n if (pexp->dTime < pexp->dTfinal) {\n if (++*piOut < pexp->os.cDistinctTimes) {\n *pdTout = pexp->os.rgdDistinctTimes[*piOut];\n }\n else {\n *pdTout = pexp->dTfinal;\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "make-4.4.1#file_prep#file_timestamp_sprintf.c", "codebase": "make-4.4.1", "c_file": "file.c", "function": "file_timestamp_sprintf", "sloc": "24", "c_code": "void\nfile_timestamp_sprintf (char *p, uintmax_t ts)\n{\n time_t t = (((ts) - (2 + 1)) >> (1 ? 30 : 0));\n struct tm *tm = localtime (&t);\n if (tm)\n {\n intmax_t year = tm->tm_year;\n sprintf (p, \"%04\" \"l\" \"d\" \"-%02d-%02d %02d:%02d:%02d\",\n year + 1900, tm->tm_mon + 1, tm->tm_mday,\n tm->tm_hour, tm->tm_min, tm->tm_sec);\n }\n else if (t < 0)\n sprintf (p, \"%\" \"l\" \"d\", (intmax_t) t);\n else\n sprintf (p, \"%\" \"l\" \"u\", (uintmax_t) t);\n p += strlen (p);\n sprintf (p, \".%09d\", ((int) (((ts) - (2 + 1)) & ((1 << (1 ? 30 : 0)) - 1))));\n p += strlen (p) - 1;\n while (*p == '0')\n p--;\n p += *p != '.';\n *p = '\\0';\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_PALINDROME_SUB_STRINGS_STRING_prep#len.c", "codebase": "transcoder-set", "c_file": "COUNT_PALINDROME_SUB_STRINGS_STRING.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_ring_prep#__pth_ring_pop.c", "codebase": "pth-2.0.7", "c_file": "pth_ring.c", "function": "__pth_ring_pop", "sloc": "8", "c_code": "pth_ringnode_t *__pth_ring_pop(pth_ring_t *r)\n{\n pth_ringnode_t *rn;\n rn = ((r) == ((void *)0) ? ((void *)0) : (r)->r_hook);\n if (rn != ((void *)0))\n __pth_ring_delete(r, rn);\n return rn;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#file_prep#OpenRoot.c", "codebase": "mtools-4.0.43", "c_file": "file.c", "function": "OpenRoot", "sloc": "21", "c_code": "Stream_t *OpenRoot(Stream_t *Dir)\n{\n unsigned int num;\n direntry_t entry;\n uint32_t size;\n Stream_t *file;\n memset(&entry, 0, sizeof(direntry_t));\n num = fat32RootCluster(Dir);\n entry.entry = -3;\n entry.name[0] = '\\0';\n mk_entry_from_base(\"/\", 0x10, num, 0, 0, &entry.dir);\n if(num)\n size = countBytes(Dir, num);\n else {\n Fs_t *Fs = (Fs_t *) GetFs(Dir);\n size = Fs->dir_len * Fs->sector_size;\n }\n file = _internalFileOpen(Dir, num, size, &entry);\n bufferize(&file);\n return file;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsKannada.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsKannada", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsKannada(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsKannada\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsKannada\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsKannada(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "buffer-0.4.0#buffer_prep#buffer_resize.c", "codebase": "buffer-0.4.0", "c_file": "buffer.c", "function": "buffer_resize", "sloc": "9", "c_code": "int\nbuffer_resize(buffer_t *self, size_t n) {\n n = (((n) + ((1024) - 1)) & ~((1024) - 1));\n self->len = n;\n self->alloc = self->data = realloc(self->alloc, n + 1);\n if (!self->alloc) return -1;\n self->alloc[n] = '\\0';\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#PYTHAGOREAN_QUADRUPLE_prep#len.c", "codebase": "transcoder-set", "c_file": "PYTHAGOREAN_QUADRUPLE.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#status_prep#status_message_clear.c", "codebase": "tmux", "c_file": "status.c", "function": "status_message_clear", "sloc": "12", "c_code": "void\nstatus_message_clear(struct client *c)\n{\n if (c->message_string == ((void *)0))\n return;\n free(c->message_string);\n c->message_string = ((void *)0);\n if (c->prompt_string == ((void *)0))\n c->tty.flags &= ~(0x1|0x2);\n c->flags |= 0x8;\n screen_reinit(&c->status.status);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#EVEN_FIBONACCI_NUMBERS_SUM_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "EVEN_FIBONACCI_NUMBERS_SUM.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "brotli-1.0.9#memory_prep#BrotliWipeOutMemoryManager.c", "codebase": "brotli-1.0.9", "c_file": "memory.c", "function": "BrotliWipeOutMemoryManager", "sloc": "3", "c_code": "void BrotliWipeOutMemoryManager(MemoryManager* m) {\n (void)(m);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_CIRCUMFERENCE_PARALLELOGRAM_prep#min.c", "codebase": "transcoder-set", "c_file": "PROGRAM_CIRCUMFERENCE_PARALLELOGRAM.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_create_map.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_create_map", "sloc": "3", "c_code": "BOOL binn_create_map(binn *map) {\n return binn_create(map, 0xE1, 0, ((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_uri_prep#osip_uri_get_port.c", "codebase": "libosip2-5.3.1", "c_file": "osip_uri.c", "function": "osip_uri_get_port", "sloc": "5", "c_code": "char *osip_uri_get_port(osip_uri_t *url) {\n if (url == ((void *)0))\n return ((void *)0);\n return url->port;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "patch-2.7.6#quotearg_prep#quotearg_custom_mem.c", "codebase": "patch-2.7.6", "c_file": "quotearg.c", "function": "quotearg_custom_mem", "sloc": "7", "c_code": "char *\nquotearg_custom_mem (char const *left_quote, char const *right_quote,\n char const *arg, size_t argsize)\n{\n return quotearg_n_custom_mem (0, left_quote, right_quote, arg,\n argsize);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#builtin_prep#do_sprintf.c", "codebase": "gawk-5.2.2", "c_file": "builtin.c", "function": "do_sprintf", "sloc": "11", "c_code": "NODE *\ndo_sprintf(int nargs)\n{\n NODE *r;\n if (nargs == 0)\n (*(set_loc(\"builtin.c\", 1767), r_fatal))(gettext(\"sprintf: no arguments\"));\n r = printf_common(nargs);\n if (r == ((void *)0))\n gawk_exit(2);\n return r;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlParseEndTag.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlParseEndTag", "sloc": "4", "c_code": "void\nxmlParseEndTag(xmlParserCtxtPtr ctxt) {\n xmlParseEndTag1(ctxt, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#term_inl_c_prep#Pl_Blt_Term_Lte.c", "codebase": "gprolog-1.5.0", "c_file": "term_inl_c.c", "function": "Pl_Blt_Term_Lte", "sloc": "5", "c_code": "Bool\nPl_Blt_Term_Lte(WamWord x, WamWord y)\n{\n return Pl_Term_Compare(x, y) <= 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlmemory_prep#xmlMemRealloc.c", "codebase": "libxml2", "c_file": "xmlmemory.c", "function": "xmlMemRealloc", "sloc": "30", "c_code": "void *\nxmlMemRealloc(void *ptr, size_t size) {\n MEMHDR *p, *tmp;\n size_t oldSize;\n if (ptr == ((void *)0))\n return(xmlMemMalloc(size));\n xmlInitParser();\n if (size > (((size_t)-1) - (((sizeof(MEMHDR) + sizeof(double) - 1) / sizeof(double) ) * sizeof(double))))\n return(((void *)0));\n p = ((void *) (((char *) (ptr)) - (((sizeof(MEMHDR) + sizeof(double) - 1) / sizeof(double) ) * sizeof(double))));\n if (p->mh_tag != 0x5aa5U) {\n xmlPrintErrorMessage(\"xmlMemRealloc: Tag error\\n\");\n return(((void *)0));\n }\n oldSize = p->mh_size;\n p->mh_tag = ~0x5aa5U;\n tmp = (MEMHDR *) realloc(p, (((sizeof(MEMHDR) + sizeof(double) - 1) / sizeof(double) ) * sizeof(double)) + size);\n if (!tmp) {\n p->mh_tag = 0x5aa5U;\n return(((void *)0));\n }\n p = tmp;\n p->mh_tag = 0x5aa5U;\n p->mh_size = size;\n xmlMutexLock(&xmlMemMutex);\n debugMemSize -= oldSize;\n debugMemSize += size;\n xmlMutexUnlock(&xmlMemMutex);\n return(((void *) (((char *) (p)) + (((sizeof(MEMHDR) + sizeof(double) - 1) / sizeof(double) ) * sizeof(double)))));\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 8, "memory_management": 1, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "transcoder-set#N_TH_TERM_SERIES_2_12_36_80_150_prep#min.c", "codebase": "transcoder-set", "c_file": "N_TH_TERM_SERIES_2_12_36_80_150.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#unknwn_prep#fsysdep_unknown_caller.c", "codebase": "uucp-1.07", "c_file": "unknwn.c", "function": "fsysdep_unknown_caller", "sloc": "24", "c_code": "boolean\nfsysdep_unknown_caller (zscript, zsystem)\n const char *zscript;\n const char *zsystem;\n{\n const char *azargs[3];\n int aidescs[3];\n pid_t ipid;\n azargs[0] = zscript;\n azargs[1] = zsystem;\n azargs[2] = ((void *)0);\n aidescs[0] = (-1);\n aidescs[1] = (-1);\n aidescs[2] = (-1);\n ipid = ixsspawn (azargs, aidescs, (1), (1), (const char *) ((void *)0), (0),\n (1), (const char *) ((void *)0), (const char *) ((void *)0),\n (const char *) ((void *)0));\n if (ipid < 0)\n {\n ulog (LOG_ERROR, \"ixsspawn: %s\", strerror ((*__errno_location ())));\n return (0);\n }\n return ixswait ((unsigned long) ipid, (const char *) ((void *)0)) != 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_IS_DIVISIBLE_BY_29_OR_NOT_prep#main.c", "codebase": "transcoder-set", "c_file": "NUMBER_IS_DIVISIBLE_BY_29_OR_NOT.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n long param0[] = {50,11,65,32,8,54,7,44,34,63};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsCJKCompatibility.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsCJKCompatibility", "sloc": "4", "c_code": "int\nxmlUCSIsCJKCompatibility(int code) {\n return(((code >= 0x3300) && (code <= 0x33FF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_unquoted_keys_prep#json_value_as_object.c", "codebase": "json.h", "c_file": "allow_unquoted_keys.c", "function": "json_value_as_object", "sloc": "6", "c_code": "struct json_object_s *json_value_as_object(struct json_value_s *const value) {\n if (value->type != json_type_object) {\n return 0;\n }\n return (struct json_object_s *)value->payload;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#gmp-glue_prep#_nettle_sec_zero_p.c", "codebase": "nettle-3.9.1", "c_file": "gmp-glue.c", "function": "_nettle_sec_zero_p", "sloc": "9", "c_code": "int\n_nettle_sec_zero_p (const mp_limb_t *ap, mp_size_t n)\n{\n volatile mp_limb_t w;\n mp_size_t i;\n for (i = 0, w = 0; i < n; i++)\n w |= ap[i];\n return w == 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#EVEN_FIBONACCI_NUMBERS_SUM_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "EVEN_FIBONACCI_NUMBERS_SUM.c", "function": "f_gold", "sloc": "13", "c_code": "int f_gold ( int limit ) {\n if ( limit < 2 ) return 0;\n long long int ef1 = 0, ef2 = 2;\n long long int sum = ef1 + ef2;\n while ( ef2 <= limit ) {\n long long int ef3 = 4 * ef2 + ef1;\n if ( ef3 > limit ) break;\n ef1 = ef2;\n ef2 = ef3;\n sum += ef2;\n }\n return sum;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 1}}, {"id": "tar-1.34#warning_prep#set_warning_option.c", "codebase": "tar-1.34", "c_file": "warning.c", "function": "set_warning_option", "sloc": "21", "c_code": "void\nset_warning_option (const char *arg)\n{\n int negate = 0;\n int option;\n if (strcmp (arg, \"none\") == 0)\n {\n warning_option = 0;\n return;\n }\n if (strlen (arg) > 2 && memcmp (arg, \"no-\", 3) == 0)\n {\n negate = 1;\n arg += 3;\n }\n option = ((warning_types) [__xargmatch_internal (\"--warning\", arg, warning_args, (void const *) (warning_types), sizeof *(warning_types), argmatch_die)]);\n if (negate)\n warning_option &= ~option;\n else\n warning_option |= option;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_WHICH_HAS_THE_MAXIMUM_NUMBER_OF_DISTINCT_PRIME_FACTORS_IN_RANGE_M_TO_N_prep#len.c", "codebase": "transcoder-set", "c_file": "NUMBER_WHICH_HAS_THE_MAXIMUM_NUMBER_OF_DISTINCT_PRIME_FACTORS_IN_RANGE_M_TO_N.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_POSSIBLE_TRANSFORM_ONE_STRING_ANOTHER_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "CHECK_POSSIBLE_TRANSFORM_ONE_STRING_ANOTHER.c", "function": "f_filled", "sloc": "1", "c_code": "_Bool f_filled ( char s1 [], char s2 [] ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#LONGEST_PREFIX_ALSO_SUFFIX_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "LONGEST_PREFIX_ALSO_SUFFIX_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#log_prep#log_open.c", "codebase": "tmux", "c_file": "log.c", "function": "log_open", "sloc": "15", "c_code": "void\nlog_open(const char *name)\n{\n char *path;\n if (log_level == 0)\n return;\n log_close();\n xasprintf(&path, \"tmux-%s-%ld.log\", name, (long)getpid());\n log_file = fopen(path, \"a\");\n free(path);\n if (log_file == ((void *)0))\n return;\n setvbuf(log_file, ((void *)0), 1, 0);\n event_set_log_callback(log_event_cb);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_2_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_2.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int a, int b, int c ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#namePush.c", "codebase": "libxml2", "c_file": "parser.c", "function": "namePush", "sloc": "22", "c_code": "int\nnamePush(xmlParserCtxtPtr ctxt, const xmlChar * value)\n{\n if (ctxt == ((void *)0)) return (-1);\n if (ctxt->nameNr >= ctxt->nameMax) {\n const xmlChar * *tmp;\n tmp = (const xmlChar * *) xmlRealloc((xmlChar * *)ctxt->nameTab,\n ctxt->nameMax * 2 *\n sizeof(ctxt->nameTab[0]));\n if (tmp == ((void *)0)) {\n goto mem_error;\n }\n ctxt->nameTab = tmp;\n ctxt->nameMax *= 2;\n }\n ctxt->nameTab[ctxt->nameNr] = value;\n ctxt->name = value;\n return (ctxt->nameNr++);\nmem_error:\n xmlErrMemory(ctxt);\n return (-1);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 1, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_2_prep#sort.c", "codebase": "transcoder-set", "c_file": "PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_2.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#tree_prep#xmlNodeAddContent.c", "codebase": "libxml2", "c_file": "tree.c", "function": "xmlNodeAddContent", "sloc": "4", "c_code": "int\nxmlNodeAddContent(xmlNodePtr cur, const xmlChar *content) {\n return(xmlNodeAddContentLen(cur, content, xmlStrlen(content)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#entities_prep#xmlGetPredefinedEntity.c", "codebase": "libxml2", "c_file": "entities.c", "function": "xmlGetPredefinedEntity", "sloc": "27", "c_code": "xmlEntityPtr\nxmlGetPredefinedEntity(const xmlChar *name) {\n if (name == ((void *)0)) return(((void *)0));\n switch (name[0]) {\n case 'l':\n if (xmlStrEqual(name, (xmlChar *) \"lt\"))\n return(&xmlEntityLt);\n break;\n case 'g':\n if (xmlStrEqual(name, (xmlChar *) \"gt\"))\n return(&xmlEntityGt);\n break;\n case 'a':\n if (xmlStrEqual(name, (xmlChar *) \"amp\"))\n return(&xmlEntityAmp);\n if (xmlStrEqual(name, (xmlChar *) \"apos\"))\n return(&xmlEntityApos);\n break;\n case 'q':\n if (xmlStrEqual(name, (xmlChar *) \"quot\"))\n return(&xmlEntityQuot);\n break;\n default:\n break;\n }\n return(((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 7, "break_continue_statement": 5}}, {"id": "json.h#allow_leading_plus_sign_prep#utest_run_allow_leading_plus_sign_read_write_pretty_read.c", "codebase": "json.h", "c_file": "allow_leading_plus_sign.c", "function": "utest_run_allow_leading_plus_sign_read_write_pretty_read", "sloc": "7", "c_code": "void utest_run_allow_leading_plus_sign_read_write_pretty_read(int *utest_result, struct allow_leading_plus_sign *utest_fixture) {\n size_t size = 0;\n void *json = json_write_pretty(utest_fixture->value, \" \", \"\\n\", &size);\n free(utest_fixture->value);\n utest_fixture->value = json_parse(json, size - 1);\n free(json);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 2, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tinycc#tccgen_prep#vrott.c", "codebase": "tinycc", "c_file": "tccgen.c", "function": "vrott", "sloc": "4", "c_code": "void vrott(int n)\n{\n vrote(vtop, n);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CASSINIS_IDENTITY_prep#max.c", "codebase": "transcoder-set", "c_file": "CASSINIS_IDENTITY.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#awkgram_prep#parse_program.c", "codebase": "gawk-5.2.2", "c_file": "awkgram.c", "function": "parse_program", "sloc": "42", "c_code": "int\nparse_program(INSTRUCTION **pcode, _Bool from_eval)\n{\n int ret;\n called_from_eval = from_eval;\n ip_end = bcalloc(Op_no_op, 1, 0);\n if (! in_main_context())\n ip_newfile = ip_rec = ip_atexit = ip_beginfile = ip_endfile = ((void *)0);\n else {\n ip_endfile = bcalloc(Op_no_op, 1, 0);\n main_beginfile = ip_beginfile = bcalloc(Op_no_op, 1, 0);\n ip_rec = bcalloc(Op_get_record, 1, 0);\n ip_newfile = bcalloc(Op_newfile, 2, 0);\n ip_newfile->d.di = ip_end;\n ip_newfile->x.xi = ip_endfile;\n (ip_newfile + 1)->x.xi = ip_rec;\n ip_rec->d.di = ip_newfile;\n ip_atexit = bcalloc(Op_atexit, 1, 0);\n }\n for (sourcefile = srcfiles->next; sourcefile->stype == SRC_EXTLIB;\n sourcefile = sourcefile->next)\n ;\n lexeof = 0;\n lexptr = ((void *)0);\n lasttok = 0;\n memset(rule_block, 0, sizeof(rule_block));\n errcount = 0;\n tok = tokstart != ((void *)0) ? tokstart : tokexpand();\n ret = yyparse();\n *pcode = mk_program();\n source = ((void *)0);\n sourceline = 0;\n if (ret == 0)\n check_funcs();\n if ((do_flags & DO_POSIX) && ! check_param_names())\n errcount++;\n if (args_array == ((void *)0))\n (void) (args_array = (NODE **) emalloc_real((size_t)((max_args + 2) * sizeof(NODE *)), \"parse_program\", \"args_array\", \"awkgram.y\", 2819));\n else\n (void) (args_array = (NODE **) erealloc_real((void *) args_array, (size_t)((max_args + 2) * sizeof(NODE *)), \"parse_program\", \"args_array\", \"awkgram.y\", 2821));\n return (ret || errcount);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 1, "if_statement": 4, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#EQUILIBRIUM_INDEX_OF_AN_ARRAY_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "EQUILIBRIUM_INDEX_OF_AN_ARRAY_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#aes-encrypt_prep#nettle_aes_encrypt.c", "codebase": "nettle-3.9.1", "c_file": "aes-encrypt.c", "function": "nettle_aes_encrypt", "sloc": "19", "c_code": "void\nnettle_aes_encrypt(const struct aes_ctx *ctx,\n size_t length, uint8_t *dst,\n const uint8_t *src)\n{\n switch (ctx->key_size)\n {\n default: abort();\n case 16:\n nettle_aes128_encrypt(&ctx->u.ctx128, length, dst, src);\n break;\n case 24:\n nettle_aes192_encrypt(&ctx->u.ctx192, length, dst, src);\n break;\n case 32:\n nettle_aes256_encrypt(&ctx->u.ctx256, length, dst, src);\n break;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 3}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlXPathModValues.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlXPathModValues", "sloc": "11", "c_code": "PyObject *\nlibxml_xmlXPathModValues(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlXPathParserContextPtr ctxt;\n PyObject *pyobj_ctxt;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlXPathModValues\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlXPathParserContextPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlXPathParserContext_Object *)(pyobj_ctxt))->obj));\n xmlXPathModValues(ctxt);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "wget-1.21.4#utils_prep#run_with_timeout.c", "codebase": "wget-1.21.4", "c_file": "utils.c", "function": "run_with_timeout", "sloc": "26", "c_code": "_Bool\nrun_with_timeout (double timeout, void (*fun) (void *), void *arg)\n{\n int saved_errno;\n if (timeout == 0)\n {\n fun (arg);\n return 0;\n }\n if (__sigsetjmp (run_with_timeout_env, 1) != 0)\n {\n signal (14, ((__sighandler_t) 0));\n return 1;\n }\n else\n {\n signal (14, abort_run_with_timeout);\n }\n alarm_set (timeout);\n fun (arg);\n saved_errno = (*__errno_location ());\n alarm_cancel ();\n signal (14, ((__sighandler_t) 0));\n (*__errno_location ()) = saved_errno;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_NUMBERS_THAT_DONT_CONTAIN_3_prep#min.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBERS_THAT_DONT_CONTAIN_3.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#tty-term_prep#tty_term_string2.c", "codebase": "tmux", "c_file": "tty-term.c", "function": "tty_term_string2", "sloc": "5", "c_code": "const char *\ntty_term_string2(struct tty_term *term, enum tty_code_code code, int a, int b)\n{\n return (tparm((char *) tty_term_string(term, code), a, b, 0, 0, 0, 0, 0, 0, 0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 1, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#xqtsub_prep#fsysdep_lock_uuxqt_dir.c", "codebase": "uucp-1.07", "c_file": "xqtsub.c", "function": "fsysdep_lock_uuxqt_dir", "sloc": "22", "c_code": "boolean\nfsysdep_lock_uuxqt_dir (iseq)\n int iseq;\n{\n const char *zxqtdir;\n char abxqtdir[sizeof \".Xqtdir\" + 4];\n if (iseq == 0)\n zxqtdir = \".Xqtdir\";\n else\n {\n sprintf (abxqtdir, \"%s%04d\", \".Xqtdir\", iseq);\n zxqtdir = abxqtdir;\n }\n if (mkdir (zxqtdir, (0400|0200|0100)) < 0\n && (*__errno_location ()) != 17\n && (*__errno_location ()) != 21)\n {\n ulog (LOG_ERROR, \"mkdir (%s): %s\", zxqtdir, strerror ((*__errno_location ())));\n return (0);\n }\n return fclean_uuxqt_dir (zxqtdir);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_port_prep#osip_strn_append.c", "codebase": "libosip2-5.3.1", "c_file": "osip_port.c", "function": "osip_strn_append", "sloc": "6", "c_code": "char *osip_strn_append(char *dst, const char *src, size_t len) {\n memmove((void *) dst, (void *) src, len);\n dst += len;\n *dst = '\\0';\n return dst;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#wam2ma_prep#Inst_Printf.c", "codebase": "gprolog-1.5.0", "c_file": "wam2ma.c", "function": "Inst_Printf", "sloc": "13", "c_code": "void\nInst_Printf(char *op, char *operands, ...)\n{\n va_list arg_ptr;\n __builtin_va_start(arg_ptr,operands);\n fprintf(file_out, \"\\t%-10s \", op);\n if (operands)\n {\n vfprintf(file_out, operands, arg_ptr);\n fputc('\\n', file_out);\n }\n __builtin_va_end(arg_ptr);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#mpfr_prep#do_mpfr_sin.c", "codebase": "gawk-5.2.2", "c_file": "mpfr.c", "function": "do_mpfr_sin", "sloc": "5", "c_code": "NODE *\ndo_mpfr_sin(int nargs)\n{\n NODE *result; result = do_mpfr_func(\"sin\", mpfr_sin, nargs, 0); return result;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsMalayalam.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsMalayalam", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsMalayalam(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsMalayalam\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsMalayalam\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsMalayalam(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsLatin1Supplement.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsLatin1Supplement", "sloc": "4", "c_code": "int\nxmlUCSIsLatin1Supplement(int code) {\n return(((code >= 0x0080) && (code <= 0x00FF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#filename_prep#dirfile.c", "codebase": "less-633", "c_file": "filename.c", "function": "dirfile", "sloc": "26", "c_code": "char * dirfile(char *dirname, char *filename, int must_exist)\n{\n char *pathname;\n int len;\n int f;\n if (dirname == ((void *)0) || *dirname == '\\0')\n return (((void *)0));\n len = (int) (strlen(dirname) + strlen(filename) + 2);\n pathname = (char *) calloc(len, sizeof(char));\n if (pathname == ((void *)0))\n return (((void *)0));\n snprintf((pathname), (len), (\"%s%s%s\"), (dirname), (\"/\"), (filename));\n if (must_exist)\n {\n f = open(pathname, (00));\n if (f < 0)\n {\n free(pathname);\n pathname = ((void *)0);\n } else\n {\n close(f);\n }\n }\n return (pathname);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 2, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_uri_prep#osip_uri_set_host.c", "codebase": "libosip2-5.3.1", "c_file": "osip_uri.c", "function": "osip_uri_set_host", "sloc": "5", "c_code": "void osip_uri_set_host(osip_uri_t *url, char *host) {\n if (url == ((void *)0))\n return;\n url->host = host;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#utils_prep#accept_url.c", "codebase": "wget-1.21.4", "c_file": "utils.c", "function": "accept_url", "sloc": "9", "c_code": "_Bool\naccept_url (const char *s)\n{\n if (opt.acceptregex && !opt.regex_match_fun (opt.acceptregex, s))\n return 0;\n if (opt.rejectregex && opt.regex_match_fun (opt.rejectregex, s))\n return 0;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#valid_prep#xmlValidateAttributeValue.c", "codebase": "libxml2", "c_file": "valid.c", "function": "xmlValidateAttributeValue", "sloc": "4", "c_code": "int\nxmlValidateAttributeValue(xmlAttributeType type, const xmlChar *value) {\n return(xmlValidateAttributeValueInternal(((void *)0), type, value));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#sha3-512_prep#nettle_sha3_512_update.c", "codebase": "nettle-3.9.1", "c_file": "sha3-512.c", "function": "nettle_sha3_512_update", "sloc": "9", "c_code": "void\nnettle_sha3_512_update (struct sha3_512_ctx *ctx,\n size_t length,\n const uint8_t *data)\n{\n ctx->index = _nettle_sha3_update (&ctx->state,\n 72, ctx->block,\n ctx->index, length, data);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_prep#min.c", "codebase": "transcoder-set", "c_file": "COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#profile_prep#redir2str.c", "codebase": "gawk-5.2.2", "c_file": "profile.c", "function": "redir2str", "sloc": "16", "c_code": "const char *\nredir2str(int redirtype)\n{\n static const char *const redirtab[] = {\n \"\",\n \" > \",\n \" >> \",\n \" | \",\n \" | \",\n \" < \",\n \" |& \",\n };\n if (redirtype < 0 || redirtype > redirect_twoway)\n (*(set_loc(\"profile.c\", 2052), r_fatal))(gettext(\"redir2str: unknown redirection type %d\"), redirtype);\n return redirtab[redirtype];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SMALLEST_DIFFERENCE_PAIR_VALUES_TWO_UNSORTED_ARRAYS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SMALLEST_DIFFERENCE_PAIR_VALUES_TWO_UNSORTED_ARRAYS.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int A [ ], int B [ ], int m, int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_wad.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_wad", "sloc": "24", "c_code": "int ti_wad(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *high = inputs[0];\n const double *low = inputs[1];\n const double *close = inputs[2];\n (void)options;\n if (size <= ti_wad_start(options)) return 0;\n double *output = outputs[0];\n double sum = 0;\n double yc = close[0];\n int i;\n for (i = 1; i < size; ++i) {\n const double c = close[i];\n if (c > yc) {\n sum += c - ((yc)<(low[i])?(yc):(low[i]));\n } else if (c < yc) {\n sum += c - ((yc)>(high[i])?(yc):(high[i]));\n } else {\n }\n *output++ = sum;\n yc = close[i];\n }\n ((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__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "indent-2.2.13#utils_prep#DieError.c", "codebase": "indent-2.2.13", "c_file": "utils.c", "function": "DieError", "sloc": "11", "c_code": "extern void DieError(\n int errval,\n const char * fmt,\n ...)\n{\n va_list ap;\n __builtin_va_start(ap,fmt);\n vfprintf(stderr, fmt, ap);\n __builtin_va_end(ap);\n do_exit(errval);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#ema_prep#ti_ema.c", "codebase": "tulipindicators-0.9.1", "c_file": "ema.c", "function": "ti_ema", "sloc": "17", "c_code": "int ti_ema(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *input = inputs[0];\n const int period = (int)options[0];\n double *output = outputs[0];\n if (period < 1) return 1;\n if (size <= ti_ema_start(options)) return 0;\n const double per = 2 / ((double)period + 1);\n double val = input[0];\n *output++ = val;\n int i;\n for (i = 1; i < size; ++i) {\n val = (input[i]-val) * per + val;\n *output++ = val;\n }\n ((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__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "bc-1.07.1#numeric_prep#dc_math_init.c", "codebase": "bc-1.07.1", "c_file": "numeric.c", "function": "dc_math_init", "sloc": "5", "c_code": "void\ndc_math_init (void)\n{\n bc_init_numbers();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "heman#quaternion_prep#kmQuaternionRotationPitchYawRoll.c", "codebase": "heman", "c_file": "quaternion.c", "function": "kmQuaternionRotationPitchYawRoll", "sloc": "20", "c_code": "kmQuaternion* kmQuaternionRotationPitchYawRoll(kmQuaternion* pOut,\n float pitch,\n float yaw,\n float roll)\n{\n ((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__); }));\n ((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__); }));\n ((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__); }));\n float sY = sinf(yaw * 0.5);\n float cY = cosf(yaw * 0.5);\n float sZ = sinf(roll * 0.5);\n float cZ = cosf(roll * 0.5);\n float sX = sinf(pitch * 0.5);\n float cX = cosf(pitch * 0.5);\n pOut->w = cY * cZ * cX - sY * sZ * sX;\n pOut->x = sY * sZ * cX + cY * cZ * sX;\n pOut->y = sY * cZ * cX + cY * sZ * sX;\n pOut->z = cY * sZ * cX - sY * cZ * sX;\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cflow-1.7#basename-lgpl_prep#last_component.c", "codebase": "cflow-1.7", "c_file": "basename-lgpl.c", "function": "last_component", "sloc": "20", "c_code": "char *\nlast_component (char const *name)\n{\n char const *base = name + ((void) (name), 0);\n char const *p;\n _Bool last_was_slash = 0;\n while (((*base) == '/'))\n base++;\n for (p = base; *p; p++)\n {\n if (((*p) == '/'))\n last_was_slash = 1;\n else if (last_was_slash)\n {\n base = p;\n last_was_slash = 0;\n }\n }\n return (char *) base;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#line_prep#prewind.c", "codebase": "less-633", "c_file": "line.c", "function": "prewind", "sloc": "30", "c_code": "void prewind(void)\n{\n int ax;\n linebuf.print = 6;\n linebuf.pfx_end = 0;\n for (linebuf.end = 0; linebuf.end < linebuf.print; linebuf.end++)\n {\n linebuf.buf[linebuf.end] = '\\0';\n linebuf.attr[linebuf.end] = 0;\n }\n end_column = 0;\n right_curr = 0;\n right_column = 0;\n cshift = 0;\n overstrike = 0;\n last_overstrike = (0);\n mbc_buf_len = 0;\n is_null_line = 0;\n pendc = '\\0';\n in_hilite = 0;\n ansi_in_line = 0;\n hlink_in_line = 0;\n line_mark_attr = 0;\n line_pos = ((POSITION)(-1));\n xbuf_reset(&shifted_ansi);\n xbuf_reset(&last_ansi);\n for (ax = 0; ax < 3; ax++)\n xbuf_reset(&last_ansis[ax]);\n curr_last_ansi = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#directory_prep#low_level_dir_write.c", "codebase": "mtools-4.0.43", "c_file": "directory.c", "function": "low_level_dir_write", "sloc": "6", "c_code": "void low_level_dir_write(direntry_t *entry)\n{\n force_pwrite(entry->Dir,\n (char *) (&entry->dir),\n (mt_off_t) entry->entry * 32, 32);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_2_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_2.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "heman#quaternion_prep#kmQuaternionMultiply.c", "codebase": "heman", "c_file": "quaternion.c", "function": "kmQuaternionMultiply", "sloc": "16", "c_code": "extern\nkmQuaternion* kmQuaternionMultiply(kmQuaternion* pOut,\n const kmQuaternion* qu1,\n const kmQuaternion* qu2)\n{\n kmQuaternion tmp1, tmp2;\n kmQuaternionAssign(&tmp1, qu1);\n kmQuaternionAssign(&tmp2, qu2);\n kmQuaternion* q1 = &tmp1;\n kmQuaternion* q2 = &tmp2;\n pOut->x = q1->w * q2->x + q1->x * q2->w + q1->y * q2->z - q1->z * q2->y;\n pOut->y = q1->w * q2->y + q1->y * q2->w + q1->z * q2->x - q1->x * q2->z;\n pOut->z = q1->w * q2->z + q1->z * q2->w + q1->x * q2->y - q1->y * q2->x;\n pOut->w = q1->w * q2->w - q1->x * q2->x - q1->y * q2->y - q1->z * q2->z;\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#output_prep#sexp_output_hash_init.c", "codebase": "nettle-3.9.1", "c_file": "output.c", "function": "sexp_output_hash_init", "sloc": "8", "c_code": "void\nsexp_output_hash_init(struct sexp_output *output,\n const struct nettle_hash *hash, void *ctx)\n{\n output->hash = hash;\n output->ctx = ctx;\n hash->init(ctx);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#pss-mgf1_prep#nettle_pss_mgf1.c", "codebase": "nettle-3.9.1", "c_file": "pss-mgf1.c", "function": "nettle_pss_mgf1", "sloc": "24", "c_code": "void\nnettle_pss_mgf1(const void *seed, const struct nettle_hash *hash,\n size_t length, uint8_t *mask)\n{\n uint8_t *h;\n void *state;\n size_t i;\n uint8_t c[4];\n (h = __builtin_alloca (sizeof (*h) * (hash->digest_size)));\n (state = __builtin_alloca (hash->context_size));\n for (i = 0;;\n i++, mask += hash->digest_size, length -= hash->digest_size)\n {\n do { (c)[0] = ((i) >> 24) & 0xff; (c)[1] = ((i) >> 16) & 0xff; (c)[2] = ((i) >> 8) & 0xff; (c)[3] = (i) & 0xff; } while(0);\n memcpy(state, seed, hash->context_size);\n hash->update(state, 4, c);\n if (length <= hash->digest_size)\n {\n hash->digest(state, length, mask);\n return;\n }\n hash->digest(state, hash->digest_size, mask);\n }\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderRelaxNGValidateCtxt.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderRelaxNGValidateCtxt", "sloc": "7", "c_code": "int\nxmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader,\n xmlRelaxNGValidCtxtPtr ctxt,\n int options)\n{\n return(xmlTextReaderRelaxNGValidateInternal(reader, ((void *)0), ctxt, options));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#list_generic_prep#glist_abort.c", "codebase": "screen-4.9.0", "c_file": "list_generic.c", "function": "glist_abort", "sloc": "4", "c_code": "void glist_abort(void)\n{\n ListAbort();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#window_prep#windows_RB_PREV.c", "codebase": "tmux", "c_file": "window.c", "function": "windows_RB_PREV", "sloc": "1", "c_code": "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); }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Fast_Popcount.c", "codebase": "gprolog-1.5.0", "c_file": "arith_inl_c.c", "function": "Pl_Fct_Fast_Popcount", "sloc": "6", "c_code": "WamWord\nPl_Fct_Fast_Popcount(WamWord x)\n{\n PlLong vx = ((PlLong) ((x) << 0) >> 3);\n return (((PlULong) ((__builtin_popcountl(vx))) << 3) | (PlULong)0x7);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY_1_prep#len.c", "codebase": "transcoder-set", "c_file": "FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_EQUAL_POINT_STRING_BRACKETS_prep#main.c", "codebase": "transcoder-set", "c_file": "FIND_EQUAL_POINT_STRING_BRACKETS.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n char param0[][100] = {\"(())))(\",\"))\",\"((\",\"))(()(()()(\",\")((()(()\",\"))(()\",\"()))\",\"()\",\"1100110\",\"dhfSnebD\"};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlCleanupCharEncodingHandlers.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlCleanupCharEncodingHandlers", "sloc": "8", "c_code": "PyObject *\nlibxml_xmlCleanupCharEncodingHandlers(PyObject *self __attribute__ ((__unused__)), PyObject *args __attribute__ ((__unused__))) {\n if (libxml_deprecationWarning(\"xmlCleanupCharEncodingHandlers\") == -1)\n return(((void *)0));\n xmlCleanupCharEncodingHandlers();\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_equals_in_object_prep#json_write_pretty.c", "codebase": "json.h", "c_file": "allow_equals_in_object.c", "function": "json_write_pretty", "sloc": "42", "c_code": "void *json_write_pretty(const struct json_value_s *value, const char *indent,\n const char *newline, size_t *out_size) {\n size_t size = 0;\n size_t indent_size = 0;\n size_t newline_size = 0;\n char *data = 0;\n char *data_end = 0;\n if (0 == value) {\n return 0;\n }\n if (0 == indent) {\n indent = \" \";\n }\n if (0 == newline) {\n newline = \"\\n\";\n }\n while ('\\0' != indent[indent_size]) {\n ++indent_size;\n }\n while ('\\0' != newline[newline_size]) {\n ++newline_size;\n }\n if (json_write_pretty_get_value_size(value, 0, indent_size, newline_size,\n &size)) {\n return 0;\n }\n size += 1;\n data = (char *)malloc(size);\n if (0 == data) {\n return 0;\n }\n data_end = json_write_pretty_value(value, 0, indent, newline, data);\n if (0 == data_end) {\n free(data);\n return 0;\n }\n *data_end = '\\0';\n if (0 != out_size) {\n *out_size = size;\n }\n return data;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 2, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 2, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "tmux#grid-view_prep#grid_view_scroll_region_up.c", "codebase": "tmux", "c_file": "grid-view.c", "function": "grid_view_scroll_region_up", "sloc": "19", "c_code": "void\ngrid_view_scroll_region_up(struct grid *gd, u_int rupper, u_int rlower,\n u_int bg)\n{\n if (gd->flags & 0x1) {\n grid_collect_history(gd);\n if (rupper == 0 && rlower == gd->sy - 1)\n grid_scroll_history(gd, bg);\n else {\n rupper = ((gd)->hsize + (rupper));\n rlower = ((gd)->hsize + (rlower));\n grid_scroll_history_region(gd, rupper, rlower, bg);\n }\n } else {\n rupper = ((gd)->hsize + (rupper));\n rlower = ((gd)->hsize + (rlower));\n grid_move_lines(gd, rupper, rupper + 1, rlower - rupper, bg);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#sdp_accessor_prep#sdp_message_a_att_field_get.c", "codebase": "libosip2-5.3.1", "c_file": "sdp_accessor.c", "function": "sdp_message_a_att_field_get", "sloc": "6", "c_code": "char *sdp_message_a_att_field_get(sdp_message_t *sdp, int pos_media, int pos) {\n sdp_attribute_t *attr = sdp_message_attribute_get(sdp, pos_media, pos);\n if (attr == ((void *)0))\n return ((void *)0);\n return attr->a_att_field;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#C_PROGRAM_FACTORIAL_NUMBER_2_prep#max.c", "codebase": "transcoder-set", "c_file": "C_PROGRAM_FACTORIAL_NUMBER_2.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_unquoted_keys_prep#json_extract_value_ex.c", "codebase": "json.h", "c_file": "allow_unquoted_keys.c", "function": "json_extract_value_ex", "sloc": "23", "c_code": "struct json_value_s *json_extract_value_ex(const struct json_value_s *value,\n void *(*alloc_func_ptr)(void *,\n size_t),\n void *user_data) {\n void *allocation;\n struct json_extract_result_s result;\n struct json_extract_state_s state;\n size_t total_size;\n if (0 == value) {\n return 0;\n }\n result = json_extract_get_value_size(value);\n total_size = result.dom_size + result.data_size;\n if (0 == alloc_func_ptr) {\n allocation = malloc(total_size);\n } else {\n allocation = alloc_func_ptr(user_data, total_size);\n }\n state.dom = (char *)allocation;\n state.data = state.dom + result.dom_size;\n json_extract_copy_value(&state, value);\n return (struct json_value_s *)allocation;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 2, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#sha512_prep#nettle_sha512_256_init.c", "codebase": "nettle-3.9.1", "c_file": "sha512.c", "function": "nettle_sha512_256_init", "sloc": "14", "c_code": "void\nnettle_sha512_256_init(struct sha512_ctx *ctx)\n{\n static const uint64_t H0[8] =\n {\n 0x22312194fc2bf72cULL, 0x9f555fa3c84c64c2ULL,\n 0x2393b86b6f53b151ULL, 0x963877195940eabdULL,\n 0x96283ee2a88effe3ULL, 0xbe5e1e2553863992ULL,\n 0x2b0199fc2c85b8aaULL, 0x0eb72ddc81c52ca2ULL,\n };\n memcpy(ctx->state, H0, sizeof(H0));\n ctx->count_low = ctx->count_high = 0;\n ctx->index = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "units-2.22#units_prep#compareproducts.c", "codebase": "units-2.22", "c_file": "units.c", "function": "compareproducts", "sloc": "22", "c_code": "int\ncompareproducts(char **one, char **two, int (*isdimless)(char *name))\n{\n int oneblank, twoblank;\n while (*one || *two) {\n oneblank = (*one==NULLUNIT) || isdimless(*one);\n twoblank = (*two==NULLUNIT) || isdimless(*two);\n if (!*one && !twoblank)\n return 1;\n if (!*two && !oneblank)\n return 1;\n if (oneblank)\n one++;\n else if (twoblank)\n two++;\n else if (strcmp(*one, *two))\n return 1;\n else\n one++, two++;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libxml2#valid_prep#xmlFreeDocElementContent.c", "codebase": "libxml2", "c_file": "valid.c", "function": "xmlFreeDocElementContent", "sloc": "53", "c_code": "void\nxmlFreeDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {\n xmlDictPtr dict = ((void *)0);\n size_t depth = 0;\n if (cur == ((void *)0))\n return;\n if (doc != ((void *)0))\n dict = doc->dict;\n while (1) {\n xmlElementContentPtr parent;\n while ((cur->c1 != ((void *)0)) || (cur->c2 != ((void *)0))) {\n cur = (cur->c1 != ((void *)0)) ? cur->c1 : cur->c2;\n depth += 1;\n }\n switch (cur->type) {\n case XML_ELEMENT_CONTENT_PCDATA:\n case XML_ELEMENT_CONTENT_ELEMENT:\n case XML_ELEMENT_CONTENT_SEQ:\n case XML_ELEMENT_CONTENT_OR:\n break;\n default:\n xmlErrValid(((void *)0), XML_ERR_INTERNAL_ERROR,\n \"Internal: ELEMENT content corrupted invalid type\\n\",\n ((void *)0));\n return;\n }\n if (dict) {\n if ((cur->name != ((void *)0)) && (!xmlDictOwns(dict, cur->name)))\n xmlFree((xmlChar *) cur->name);\n if ((cur->prefix != ((void *)0)) && (!xmlDictOwns(dict, cur->prefix)))\n xmlFree((xmlChar *) cur->prefix);\n } else {\n if (cur->name != ((void *)0)) xmlFree((xmlChar *) cur->name);\n if (cur->prefix != ((void *)0)) xmlFree((xmlChar *) cur->prefix);\n }\n parent = cur->parent;\n if ((depth == 0) || (parent == ((void *)0))) {\n xmlFree(cur);\n break;\n }\n if (cur == parent->c1)\n parent->c1 = ((void *)0);\n else\n parent->c2 = ((void *)0);\n xmlFree(cur);\n if (parent->c2 != ((void *)0)) {\n cur = parent->c2;\n } else {\n depth -= 1;\n cur = parent;\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 15, "memory_management": 0, "memory_operation": 0, "if_statement": 10, "for_loop": 0, "while_loop": 2, "switch_statement": 1, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 2}}, {"id": "transcoder-set#MEDIAN_OF_TWO_SORTED_ARRAYS_prep#main.c", "codebase": "transcoder-set", "c_file": "MEDIAN_OF_TWO_SORTED_ARRAYS.c", "function": "main", "sloc": "35", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {2,6,18,21,23,27,44,44,69,72,78,88,90,98};\nint 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};\nint param0_2[] = {0,1,1};\nint param0_3[] = {53,17,94,21,16,75,67,51,44,71,65,82};\nint 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};\nint 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};\nint 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};\nint 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};\nint param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};\nint param0_9[] = {61,69,66,3};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1_0[] = {6,12,16,18,26,34,48,48,49,56,61,79,81,89};\nint 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};\nint param1_2[] = {0,1,1};\nint param1_3[] = {98,50,8,11,80,41,59,24,94,41,75,78};\nint 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};\nint 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};\nint 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};\nint 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};\nint param1_8[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};\nint param1_9[] = {39,84,97,15};\nint *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9};\n int param2[] = {12,16,2,10,25,40,29,17,17,3};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#array_prep#array_vname.c", "codebase": "gawk-5.2.2", "c_file": "array.c", "function": "array_vname", "sloc": "52", "c_code": "const char *\narray_vname(const NODE *symbol)\n{\n static char *message = ((void *)0);\n static size_t msglen = 0;\n char *s;\n size_t len;\n int n;\n const NODE *save_symbol = symbol;\n const char *from = gettext(\"from %s\");\n const char *aname;\n if (symbol->type != Node_array_ref\n || symbol->sub.nodep.l.lptr->type != Node_var_array\n ) {\n if (symbol->type != Node_var_array || symbol->sub.nodep.x.extra == ((void *)0))\n return symbol->sub.nodep.name;\n return make_aname(symbol);\n }\n len = 2;\n n = 0;\n while (symbol->type == Node_array_ref) {\n len += strlen(symbol->sub.nodep.name);\n n++;\n symbol = symbol->sub.nodep.r.rptr;\n }\n if (symbol->sub.nodep.x.extra == ((void *)0))\n aname = symbol->sub.nodep.name;\n else\n aname = make_aname(symbol);\n len += strlen(aname);\n len += n * strlen(from);\n if (message == ((void *)0)) {\n (void) (message = (char *) emalloc_real((size_t)(len), \"array_vname\", \"message\", \"array.c\", 285));\n msglen = len;\n } else if (len > msglen) {\n (void) (message = (char *) erealloc_real((void *) message, (size_t)(len), \"array_vname\", \"message\", \"array.c\", 288));\n msglen = len;\n }\n symbol = save_symbol;\n s = message;\n s += sprintf(s, \"%s (\", symbol->sub.nodep.name);\n for (;;) {\n symbol = symbol->sub.nodep.r.rptr;\n if (symbol->type != Node_array_ref)\n break;\n s += sprintf(s, from, symbol->sub.nodep.name);\n s += sprintf(s, \", \");\n }\n s += sprintf(s, from, aname);\n strcpy(s, \")\");\n return message;\n}\n", "c_constructs": {"pointer_type": 5, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 1}}, {"id": "transcoder-set#COUNT_DIGITS_FACTORIAL_SET_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "COUNT_DIGITS_FACTORIAL_SET_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#wam2ma_prep#F_call_c.c", "codebase": "gprolog-1.5.0", "c_file": "wam2ma.c", "function": "F_call_c", "sloc": "139", "c_code": "void\nF_call_c(ArgVal arg[])\n{\n int ret = 0;\n Bool fast_call = 0;\n Bool tagged = 0;\n Bool set_cp = 0;\n char *str;\n Bool adr_of;\n PlLong ret_xy = 0;\n char ret_c = 0;\n int i;\n char *c_option;\n PlLong arg_type;\n BTNode *atom; char *str_atom;\n char *aux_functor;\n PlLong aux_arity;\n PlLong n;\n double n1;\n PlLong xy; char c;\n ArgVal *top = arg; char *fct_name; PlLong nb_elem; ((fct_name) = *((char * *) (top)) , (top)++); ((nb_elem) = *((PlLong *) (top)) , (top)++);\n for (i = 0; i < nb_elem; i++)\n {\n ((arg_type) = *((PlLong *) (top)) , (top)++);\n if (arg_type == X_Y)\n {\n ((xy) = *((PlLong *) (top)) , (top)++); if (xy < 5000) c = 'X'; else xy -= 5000, c='Y';\n ret = 3;\n ret_xy = xy;\n ret_c = c;\n continue;\n }\n ((c_option) = *((char * *) (top)) , (top)++);\n if (strcmp(c_option, \"boolean\") == 0)\n ret = 1;\n else if (strcmp(c_option, \"jump\") == 0)\n ret = 2;\n else if (strcmp(c_option, \"fast_call\") == 0)\n fast_call = 1;\n else if (strcmp(c_option, \"tagged\") == 0)\n tagged = 1;\n else if (strcmp(c_option, \"set_cp\") == 0)\n set_cp = 1;\n }\n ((nb_elem) = *((PlLong *) (top)) , (top)++);\n if (set_cp)\n Inst_Printf(\"prep_cp\", \"\");\n Inst_Printf(\"call_c\", ((void *)0));\n if (fast_call)\n fputs( \"\", file_out);\n fprintf(file_out, \"%s(\", fct_name);\n i = 0;\n adr_of = 0;\n goto write_a_arg;\n while(i < nb_elem)\n {\n fputc(',', file_out);\n write_a_arg:\n ((arg_type) = *((PlLong *) (top)) , (top)++);\n switch(arg_type)\n {\n case ATOM:\n str = *((char **) top);\n if (*str == '&' && str[1] == '\\0')\n {\n if ((i < nb_elem - 1 && *(PlLong *) (top+1) == X_Y) ||\n (i < nb_elem - 2 && *(PlLong *) (top+1) == ATOM && *(PlLong *) (top+3) == INTEGER))\n {\n adr_of = 1;\n i++;\n top++;\n goto write_a_arg;\n }\n }\n if (adr_of)\n {\n ((aux_functor) = *((char * *) (top)) , (top)++);\n i++;\n top++;\n ((aux_arity) = *((PlLong *) (top)) , (top)++);\n Encode_Hexa(((void *)0), aux_functor, aux_arity, buff_hexa);\n fprintf(file_out, \"&%s\", buff_hexa);\n adr_of = 0;\n }\n else if (tagged)\n {\n ((str_atom) = *((char * *) (top)) , (top)++); atom = BT_String_Add(&bt_tagged_atom, str_atom);\n fprintf(file_out, \"ta(%d)\", atom->no);\n }\n else\n {\n ((str_atom) = *((char * *) (top)) , (top)++); atom = BT_String_Add(&bt_atom, str_atom);\n fprintf(file_out, \"at(%d)\", atom->no);\n }\n break;\n case INTEGER:\n ((n) = *((PlLong *) (top)) , (top)++);\n fprintf(file_out, \"%\" \"l\" \"d\", (tagged) ? (((PlULong) (n) << 3) | (PlULong)0x7) : n);\n break;\n case FLOAT:\n ((n1) = *((double *) (top)) , (top)++);\n fprintf(file_out, \"%1.20e\", n1);\n break;\n case X_Y:\n ((xy) = *((PlLong *) (top)) , (top)++); if (xy < 5000) c = 'X'; else xy -= 5000, c='Y';\n if (adr_of)\n {\n fprintf(file_out, \"&\");\n adr_of = 0;\n }\n fprintf(file_out, \"%c(%\" \"l\" \"d\" \")\", c, xy);\n break;\n case F_N:\n if (tagged)\n {\n char *str_atom; PlLong n; int f_n_no;\n ((str_atom) = *((char * *) (top)) , (top)++); ((n) = *((PlLong *) (top)) , (top)++); f_n_no = Add_F_N_Tagged(str_atom, n);\n fprintf(file_out, \"fn(%d)\", f_n_no);\n }\n else\n {\n BTNode *atom; char *str_atom; PlLong n;\n ((str_atom) = *((char * *) (top)) , (top)++); atom = BT_String_Add(&bt_atom, str_atom); ((n) = *((PlLong *) (top)) , (top)++);\n fprintf(file_out, \"at(%d),%\" \"l\" \"d\" \"\", atom->no, n);\n }\n break;\n }\n i++;\n }\n fprintf(file_out, \")\\n\");\n if (ret == 1)\n Inst_Printf(\"fail_ret\", \"\");\n else if (ret == 2)\n Inst_Printf(\"jump_ret\", \"\");\n else if (ret == 3)\n Inst_Printf(\"move_ret\", \"%c(%\" \"l\" \"d\" \")\", ret_c, ret_xy);\n if (set_cp)\n Inst_Printf(\"here_cp\", \"\");\n}\n", "c_constructs": {"pointer_type": 7, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 20, "for_loop": 1, "while_loop": 1, "switch_statement": 1, "goto_statement": 2, "return_statement": 0, "break_continue_statement": 6}}, {"id": "tar-1.34#dirname-lgpl_prep#dir_len.c", "codebase": "tar-1.34", "c_file": "dirname-lgpl.c", "function": "dir_len", "sloc": "19", "c_code": "size_t\ndir_len (char const *file)\n{\n size_t prefix_length = ((void) (file), 0);\n size_t length;\n prefix_length += (prefix_length != 0\n ? (0\n && ((file[prefix_length]) == '/'))\n : (((file[0]) == '/')\n ? ((0\n && ((file[1]) == '/') && ! ((file[2]) == '/')\n ? 2 : 1))\n : 0));\n for (length = last_component (file) - file;\n prefix_length < length; length--)\n if (! ((file[length - 1]) == '/'))\n break;\n return length;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "pexec-1.0rc8#str_prep#strkcpy.c", "codebase": "pexec-1.0rc8", "c_file": "str.c", "function": "strkcpy", "sloc": "6", "c_code": "char * strkcpy(char *out,char *in,int size)\n{\n strncpy(out,in,size);\n out[size-1]=0;\n return(out);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "ed-1.19#regex_prep#set_subst_regex.c", "codebase": "ed-1.19", "c_file": "regex.c", "function": "set_subst_regex", "sloc": "14", "c_code": "bool set_subst_regex( const char * const pat, const bool ignore_case )\n {\n if( !pat ) return false;\n if( !*pat && ignore_case ) { set_error_msg( inv_i_suf ); return false; }\n disable_interrupts();\n regex_t * exp = *pat ? compile_regex( pat, ignore_case ) : last_regexp;\n if( exp && exp != subst_regexp )\n {\n if( subst_regexp ) regfree( subst_regexp );\n subst_regexp = exp;\n }\n enable_interrupts();\n return ( exp ? true : false );\n }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#CONVERTING_ONE_STRING_USING_APPEND_DELETE_LAST_OPERATIONS_prep#len.c", "codebase": "transcoder-set", "c_file": "CONVERTING_ONE_STRING_USING_APPEND_DELETE_LAST_OPERATIONS.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_single_quoted_strings_prep#json_value_as_object.c", "codebase": "json.h", "c_file": "allow_single_quoted_strings.c", "function": "json_value_as_object", "sloc": "6", "c_code": "struct json_object_s *json_value_as_object(struct json_value_s *const value) {\n if (value->type != json_type_object) {\n return 0;\n }\n return (struct json_object_s *)value->payload;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#uri_prep#xmlNormalizeURIPath.c", "codebase": "libxml2", "c_file": "uri.c", "function": "xmlNormalizeURIPath", "sloc": "4", "c_code": "int\nxmlNormalizeURIPath(char *path) {\n return(xmlNormalizePath(path, 0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MINIMUM_DIFFERENCE_PAIR_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_MINIMUM_DIFFERENCE_PAIR.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#fat_prep#getStart.c", "codebase": "mtools-4.0.43", "c_file": "fat.c", "function": "getStart", "sloc": "10", "c_code": "uint32_t getStart(Stream_t *Dir, struct directory *dir)\n{\n Stream_t *Stream = GetFs(Dir);\n uint32_t first;\n first = (((uint16_t)((unsigned char)((dir)->start)[0] + (((unsigned char)((dir)->start)[1]) << 8))));\n if(fat32RootCluster(Stream)) {\n first |= (uint32_t) (((uint16_t)((unsigned char)((dir)->startHi)[0] + (((unsigned char)((dir)->startHi)[1]) << 8)))) << 16;\n }\n return first;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#threads_prep#xmlInitParser.c", "codebase": "libxml2", "c_file": "threads.c", "function": "xmlInitParser", "sloc": "4", "c_code": "void\nxmlInitParser(void) {\n pthread_once(&onceControl, xmlInitParserInternal);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#chvalid_prep#xmlIsExtender.c", "codebase": "libxml2", "c_file": "chvalid.c", "function": "xmlIsExtender", "sloc": "4", "c_code": "int\nxmlIsExtender(unsigned int ch) {\n return((((ch) < 0x100) ? ((((ch)) == 0xb7)) : xmlCharInRange((ch), &xmlIsExtenderGroup)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#builtin_prep#check_exact_args.c", "codebase": "gawk-5.2.2", "c_file": "builtin.c", "function": "check_exact_args", "sloc": "6", "c_code": "void\ncheck_exact_args(int nargs, const char *fname, int count)\n{\n if (nargs != count)\n (*(set_loc(\"builtin.c\", 98), r_fatal))(gettext(\"%s: called with %d arguments\"), fname, nargs);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#arctwo_prep#nettle_arctwo40_set_key.c", "codebase": "nettle-3.9.1", "c_file": "arctwo.c", "function": "nettle_arctwo40_set_key", "sloc": "5", "c_code": "void\nnettle_arctwo40_set_key (struct arctwo_ctx *ctx, const uint8_t *key)\n{\n nettle_arctwo_set_key_ekb (ctx, 5, key, 40);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#port_sema_prep#osip_sem_wait.c", "codebase": "libosip2-5.3.1", "c_file": "port_sema.c", "function": "osip_sem_wait", "sloc": "6", "c_code": "int osip_sem_wait(struct osip_sem *_sem) {\n osip_sem_t *sem = (osip_sem_t *) _sem;\n if (sem == ((void *)0))\n return -2;\n return sem_wait(sem);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#format_c_prep#Pl_Format_2.c", "codebase": "gprolog-1.5.0", "c_file": "format_c.c", "function": "Pl_Format_2", "sloc": "5", "c_code": "void\nPl_Format_2(WamWord format_word, WamWord args_word)\n{\n Pl_Format_3(((PlLong) (0) + ((PlULong)0)), format_word, args_word);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json-c#linkhash_prep#lh_kchar_table_new.c", "codebase": "json-c", "c_file": "linkhash.c", "function": "lh_kchar_table_new", "sloc": "4", "c_code": "struct lh_table *lh_kchar_table_new(int size, lh_entry_free_fn *free_fn)\n{\n return lh_table_new(size, free_fn, char_hash_fn, lh_char_equal);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_SERIES_12_32_52_2N_12_prep#min.c", "codebase": "transcoder-set", "c_file": "SUM_SERIES_12_32_52_2N_12.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "make-4.4.1#misc_prep#concat.c", "codebase": "make-4.4.1", "c_file": "misc.c", "function": "concat", "sloc": "31", "c_code": "const char *\nconcat (unsigned int num, ...)\n{\n static size_t rlen = 0;\n static char *result = ((void *)0);\n size_t ri = 0;\n va_list args;\n __builtin_va_start(args,num);\n while (num-- > 0)\n {\n const char *s = __builtin_va_arg(args,const char *);\n size_t l = ((s)==((void *)0) ? 0 : strlen (s));\n if (l == 0)\n continue;\n if (ri + l > rlen)\n {\n rlen = ((rlen ? rlen : 60) + l) * 2;\n result = xrealloc (result, rlen);\n }\n memcpy (result + ri, s, l);\n ri += l;\n }\n __builtin_va_end(args);\n if (ri == rlen)\n {\n rlen = (rlen ? rlen : 60) * 2;\n result = xrealloc (result, rlen);\n }\n result[ri] = '\\0';\n return result;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "grep-3.11#printf-args_prep#printf_fetchargs.c", "codebase": "grep-3.11", "c_file": "printf-args.c", "function": "printf_fetchargs", "sloc": "167", "c_code": "int\nprintf_fetchargs (va_list args, arguments *a)\n{\n size_t i;\n argument *ap;\n for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)\n switch (ap->type)\n {\n case TYPE_SCHAR:\n ap->a.a_schar = __builtin_va_arg(args,int);\n break;\n case TYPE_UCHAR:\n ap->a.a_uchar = __builtin_va_arg(args,int);\n break;\n case TYPE_SHORT:\n ap->a.a_short = __builtin_va_arg(args,int);\n break;\n case TYPE_USHORT:\n ap->a.a_ushort = __builtin_va_arg(args,int);\n break;\n case TYPE_INT:\n ap->a.a_int = __builtin_va_arg(args,int);\n break;\n case TYPE_UINT:\n ap->a.a_uint = __builtin_va_arg(args,unsigned int);\n break;\n case TYPE_LONGINT:\n ap->a.a_longint = __builtin_va_arg(args,long int);\n break;\n case TYPE_ULONGINT:\n ap->a.a_ulongint = __builtin_va_arg(args,unsigned long int);\n break;\n case TYPE_LONGLONGINT:\n ap->a.a_longlongint = __builtin_va_arg(args,long long int);\n break;\n case TYPE_ULONGLONGINT:\n ap->a.a_ulonglongint = __builtin_va_arg(args,unsigned long long int);\n break;\n case TYPE_INT8_T:\n ap->a.a_int8_t = __builtin_va_arg(args,int);\n break;\n case TYPE_UINT8_T:\n ap->a.a_uint8_t = __builtin_va_arg(args,int);\n break;\n case TYPE_INT16_T:\n ap->a.a_int16_t = __builtin_va_arg(args,int);\n break;\n case TYPE_UINT16_T:\n ap->a.a_uint16_t = __builtin_va_arg(args,int);\n break;\n case TYPE_INT32_T:\n ap->a.a_int32_t = __builtin_va_arg(args,int32_t);\n break;\n case TYPE_UINT32_T:\n ap->a.a_uint32_t = __builtin_va_arg(args,uint32_t);\n break;\n case TYPE_INT64_T:\n ap->a.a_int64_t = __builtin_va_arg(args,int64_t);\n break;\n case TYPE_UINT64_T:\n ap->a.a_uint64_t = __builtin_va_arg(args,uint64_t);\n break;\n case TYPE_INT_FAST8_T:\n ap->a.a_int_fast8_t = __builtin_va_arg(args,int);\n break;\n case TYPE_UINT_FAST8_T:\n ap->a.a_uint_fast8_t = __builtin_va_arg(args,int);\n break;\n case TYPE_INT_FAST16_T:\n ap->a.a_int_fast16_t = __builtin_va_arg(args,int_fast16_t);\n break;\n case TYPE_UINT_FAST16_T:\n ap->a.a_uint_fast16_t = __builtin_va_arg(args,uint_fast16_t);\n break;\n case TYPE_INT_FAST32_T:\n ap->a.a_int_fast32_t = __builtin_va_arg(args,int_fast32_t);\n break;\n case TYPE_UINT_FAST32_T:\n ap->a.a_uint_fast32_t = __builtin_va_arg(args,uint_fast32_t);\n break;\n case TYPE_INT_FAST64_T:\n ap->a.a_int_fast64_t = __builtin_va_arg(args,int_fast64_t);\n break;\n case TYPE_UINT_FAST64_T:\n ap->a.a_uint_fast64_t = __builtin_va_arg(args,uint_fast64_t);\n break;\n case TYPE_DOUBLE:\n ap->a.a_double = __builtin_va_arg(args,double);\n break;\n case TYPE_LONGDOUBLE:\n ap->a.a_longdouble = __builtin_va_arg(args,long double);\n break;\n case TYPE_CHAR:\n ap->a.a_char = __builtin_va_arg(args,int);\n break;\n case TYPE_WIDE_CHAR:\n ap->a.a_wide_char =\n (sizeof (wint_t) < sizeof (int)\n ? (wint_t) __builtin_va_arg(args,int)\n : __builtin_va_arg(args,wint_t));\n break;\n case TYPE_STRING:\n ap->a.a_string = __builtin_va_arg(args,const char *);\n if (ap->a.a_string == ((void *)0))\n ap->a.a_string = \"(NULL)\";\n break;\n case TYPE_WIDE_STRING:\n ap->a.a_wide_string = __builtin_va_arg(args,const wchar_t *);\n if (ap->a.a_wide_string == ((void *)0))\n {\n static const wchar_t wide_null_string[] =\n {\n (wchar_t)'(',\n (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L',\n (wchar_t)')',\n (wchar_t)0\n };\n ap->a.a_wide_string = wide_null_string;\n }\n break;\n case TYPE_POINTER:\n ap->a.a_pointer = __builtin_va_arg(args,void *);\n break;\n case TYPE_COUNT_SCHAR_POINTER:\n ap->a.a_count_schar_pointer = __builtin_va_arg(args,signed char *);\n break;\n case TYPE_COUNT_SHORT_POINTER:\n ap->a.a_count_short_pointer = __builtin_va_arg(args,short *);\n break;\n case TYPE_COUNT_INT_POINTER:\n ap->a.a_count_int_pointer = __builtin_va_arg(args,int *);\n break;\n case TYPE_COUNT_LONGINT_POINTER:\n ap->a.a_count_longint_pointer = __builtin_va_arg(args,long int *);\n break;\n case TYPE_COUNT_LONGLONGINT_POINTER:\n ap->a.a_count_longlongint_pointer = __builtin_va_arg(args,long long int *);\n break;\n case TYPE_COUNT_INT8_T_POINTER:\n ap->a.a_count_int8_t_pointer = __builtin_va_arg(args,int8_t *);\n break;\n case TYPE_COUNT_INT16_T_POINTER:\n ap->a.a_count_int16_t_pointer = __builtin_va_arg(args,int16_t *);\n break;\n case TYPE_COUNT_INT32_T_POINTER:\n ap->a.a_count_int32_t_pointer = __builtin_va_arg(args,int32_t *);\n break;\n case TYPE_COUNT_INT64_T_POINTER:\n ap->a.a_count_int64_t_pointer = __builtin_va_arg(args,int64_t *);\n break;\n case TYPE_COUNT_INT_FAST8_T_POINTER:\n ap->a.a_count_int_fast8_t_pointer = __builtin_va_arg(args,int_fast8_t *);\n break;\n case TYPE_COUNT_INT_FAST16_T_POINTER:\n ap->a.a_count_int_fast16_t_pointer = __builtin_va_arg(args,int_fast16_t *);\n break;\n case TYPE_COUNT_INT_FAST32_T_POINTER:\n ap->a.a_count_int_fast32_t_pointer = __builtin_va_arg(args,int_fast32_t *);\n break;\n case TYPE_COUNT_INT_FAST64_T_POINTER:\n ap->a.a_count_int_fast64_t_pointer = __builtin_va_arg(args,int_fast64_t *);\n break;\n default:\n return -1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 46}}, {"id": "units-2.22#units_prep#showunitlistdef.c", "codebase": "units-2.22", "c_file": "units.c", "function": "showunitlistdef", "sloc": "8", "c_code": "void\nshowunitlistdef(struct wantalias *alias)\n{\n logprintf(\"%sunit list, \",deftext);\n tightprint(stdout,alias->definition);\n if (logfile) tightprint(logfile,alias->definition);\n logputchar('\\n');\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_N_TH_ELEMENT_FROM_STERNS_DIATOMIC_SERIES_prep#main.c", "codebase": "transcoder-set", "c_file": "FIND_N_TH_ELEMENT_FROM_STERNS_DIATOMIC_SERIES.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {37,24,13,56,26,67,82,60,64,65};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "json.h#test_prep#json_hexadecimal_value.c", "codebase": "json.h", "c_file": "test.c", "function": "json_hexadecimal_value", "sloc": "18", "c_code": "int json_hexadecimal_value(const char *c, const unsigned long size,\n unsigned long *result) {\n const char *p;\n int digit;\n if (size > sizeof(unsigned long) * 2) {\n return 0;\n }\n *result = 0;\n for (p = c; (unsigned long)(p - c) < size; ++p) {\n *result <<= 4;\n digit = json_hexadecimal_digit(*p);\n if (digit < 0 || digit > 15) {\n return 0;\n }\n *result |= (unsigned char)digit;\n }\n return 1;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#wam_inst_prep#Pl_Defeasible_Undo.c", "codebase": "gprolog-1.5.0", "c_file": "wam_inst.c", "function": "Pl_Defeasible_Undo", "sloc": "5", "c_code": "void\nPl_Defeasible_Undo()\n{\n Pl_Update_Choice_Point0(((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tinycc#tccelf_prep#tccelf_bounds_new.c", "codebase": "tinycc", "c_file": "tccelf.c", "function": "tccelf_bounds_new", "sloc": "7", "c_code": "void tccelf_bounds_new(TCCState *s)\n{\n bounds_section = new_section(s, \".bounds\",\n 1, (1 << 1));\n lbounds_section = new_section(s, \".lbounds\",\n 1, (1 << 1));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "cflow-1.7#xmalloc_prep#xzalloc.c", "codebase": "cflow-1.7", "c_file": "xmalloc.c", "function": "xzalloc", "sloc": "5", "c_code": "void *\nxzalloc (size_t n)\n{\n return xcalloc (n, 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DECIMAL_REPRESENTATION_GIVEN_BINARY_STRING_DIVISIBLE_10_NOT_prep#main.c", "codebase": "transcoder-set", "c_file": "DECIMAL_REPRESENTATION_GIVEN_BINARY_STRING_DIVISIBLE_10_NOT.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n char param0[][100] = {\"101000\",\"39613456759141\",\"11\",\"PoiHjo\",\"2\",\"0000101\",\"T s dZKeDX gK\",\"3944713969\",\"1000\",\"ifYUgdpmt\"};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libxml2#xmlIO_prep#xmlPopOutputCallbacks.c", "codebase": "libxml2", "c_file": "xmlIO.c", "function": "xmlPopOutputCallbacks", "sloc": "9", "c_code": "int\nxmlPopOutputCallbacks(void)\n{\n xmlInitParser();\n if (xmlOutputCallbackNr <= 0)\n return(-1);\n xmlOutputCallbackNr--;\n return(xmlOutputCallbackNr);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_vhf_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_vhf_start", "sloc": "3", "c_code": "int ti_vhf_start(double const *options) {\n return (int)options[0];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlParseMarkupDecl.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlParseMarkupDecl", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlParseMarkupDecl(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlParserCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n if (libxml_deprecationWarning(\"xmlParseMarkupDecl\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlParseMarkupDecl\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj));\n xmlParseMarkupDecl(ctxt);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tmux#control-notify_prep#control_notify_session_window_changed.c", "codebase": "tmux", "c_file": "control-notify.c", "function": "control_notify_session_window_changed", "sloc": "11", "c_code": "void\ncontrol_notify_session_window_changed(struct session *s)\n{\n struct client *c;\n for((c) = ((&clients)->tqh_first); (c) != ((void *)0); (c) = ((c)->entry.tqe_next)) {\n if (!((c) != ((void *)0) && ((c)->flags & 0x2000)))\n continue;\n control_write(c, \"%%session-window-changed $%u @%u\", s->id,\n s->curw->window->id);\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "bc-1.07.1#scan_prep#yylex.c", "codebase": "bc-1.07.1", "c_file": "scan.c", "function": "yylex", "sloc": "352", "c_code": "int yylex (void)\n{\n register yy_state_type yy_current_state;\n register char *yy_cp, *yy_bp;\n register int yy_act;\n if ( !(yy_init) )\n {\n (yy_init) = 1;\n if ( ! (yy_start) )\n (yy_start) = 1;\n if ( ! yyin )\n yyin = stdin;\n if ( ! yyout )\n yyout = stdout;\n if ( ! ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)) ) {\n yyensure_buffer_stack ();\n (yy_buffer_stack)[(yy_buffer_stack_top)] =\n yy_create_buffer(yyin,16384 );\n }\n yy_load_buffer_state( );\n }\n while ( 1 )\n {\n yy_cp = (yy_c_buf_p);\n *yy_cp = (yy_hold_char);\n yy_bp = yy_cp;\n yy_current_state = (yy_start);\nyy_match:\n do\n {\n register YY_CHAR yy_c = yy_ec[((unsigned int) (unsigned char) *yy_cp)];\n if ( yy_accept[yy_current_state] )\n {\n (yy_last_accepting_state) = yy_current_state;\n (yy_last_accepting_cpos) = yy_cp;\n }\n while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )\n {\n yy_current_state = (int) yy_def[yy_current_state];\n if ( yy_current_state >= 316 )\n yy_c = yy_meta[(unsigned int) yy_c];\n }\n yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];\n ++yy_cp;\n }\n while ( yy_base[yy_current_state] != 554 );\nyy_find_action:\n yy_act = yy_accept[yy_current_state];\n if ( yy_act == 0 )\n {\n yy_cp = (yy_last_accepting_cpos);\n yy_current_state = (yy_last_accepting_state);\n yy_act = yy_accept[yy_current_state];\n }\n (yytext) = yy_bp; yyleng = (size_t) (yy_cp - yy_bp); (yy_hold_char) = *yy_cp; *yy_cp = '\\0'; (yy_c_buf_p) = yy_cp;;\ndo_action:\n switch ( yy_act )\n {\n case 0:\n *yy_cp = (yy_hold_char);\n yy_cp = (yy_last_accepting_cpos);\n yy_current_state = (yy_last_accepting_state);\n goto yy_find_action;\ncase 1:\n\n{\n if (!std_only)\n (yy_start) = 1 + 2 *(1);\n else\n yyerror (\"illegal character: #\");\n }\n break;\ncase 2:\n\n{ (yy_start) = 1 + 2 *(0); }\n break;\ncase 3:\n\n{ line_no++; (yy_start) = 1 + 2 *(0); return(258); }\n break;\ncase 4:\n\nreturn(268);\n break;\ncase 5:\n\nreturn(269);\n break;\ncase 6:\n\nreturn(270);\n break;\ncase 7:\n\nreturn(271);\n break;\ncase 8:\n\nreturn(272);\n break;\ncase 9:\n\nreturn(273);\n break;\ncase 10:\n\nreturn(274);\n break;\ncase 11:\n\nreturn(275);\n break;\ncase 12:\n\nreturn(276);\n break;\ncase 13:\n\nreturn(278);\n break;\ncase 14:\n\nreturn(279);\n break;\ncase 15:\n\nreturn(280);\n break;\ncase 16:\n\nreturn(281);\n break;\ncase 17:\n\nreturn(277);\n break;\ncase 18:\n\nreturn(282);\n break;\ncase 19:\n\nreturn(283);\n break;\ncase 20:\n\nreturn(285);\n break;\ncase 21:\n\nreturn(286);\n break;\ncase 22:\n\nreturn(292);\n break;\ncase 23:\n\n{\n yylval.s_value = strcopyof(yytext); return(263);\n }\n break;\ncase 24:\n\nreturn(284);\n break;\ncase 25:\n\nreturn(287);\n break;\ncase 26:\n\nreturn(288);\n break;\ncase 27:\n\nreturn(289);\n break;\ncase 28:\n\n{\n return(286);\n }\n break;\ncase 29:\n\n{ yylval.c_value = yytext[0];\n return((int)yytext[0]); }\n break;\ncase 30:\n\n{ return(259); }\n break;\ncase 31:\n\n{ return(260); }\n break;\ncase 32:\n\n{ return(261); }\n break;\ncase 33:\n\n{ yylval.c_value = yytext[0]; return((int)yytext[0]); }\n break;\ncase 34:\n\n{ yylval.c_value = yytext[0]; return(265); }\n break;\ncase 35:\n\n{\n yylval.c_value = '=';\n do { int yyless_macro_arg = (1); ; *yy_cp = (yy_hold_char); (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - 0; (yytext) = yy_bp; yyleng = (size_t) (yy_cp - yy_bp); (yy_hold_char) = *yy_cp; *yy_cp = '\\0'; (yy_c_buf_p) = yy_cp;; } while ( 0 );\n return(265);\n }\n break;\ncase 36:\n\n{ yylval.s_value = strcopyof(yytext); return(266); }\n break;\ncase 37:\n\n{ yylval.c_value = yytext[0]; return(267); }\n break;\ncase 38:\n\n{ line_no++; return(258); }\n break;\ncase 39:\n\n{ line_no++; }\n break;\ncase 40:\n\n{ }\n break;\ncase 41:\n\n{\n int c;\n for (;;)\n {\n while ( ((c=input()) != '*') && (c != (-1)))\n if (c == '\\n') line_no++;\n if (c == '*')\n {\n while ( (c=input()) == '*') ;\n if (c == '/') break;\n if (c == '\\n') line_no++;\n }\n if (c == (-1))\n {\n fprintf (stderr,\"EOF encountered in a comment.\\n\");\n break;\n }\n }\n }\n break;\ncase 42:\n\n{ yylval.s_value = strcopyof(yytext); return(263); }\n break;\ncase 43:\n\n{\n const char *look;\n int count = 0;\n yylval.s_value = strcopyof(yytext);\n for (look = yytext; *look != 0; look++)\n {\n if (*look == '\\n') line_no++;\n if (*look == '\"') count++;\n }\n if (count != 2) yyerror (\"NUL character in string.\");\n return(262);\n }\n break;\ncase 44:\n\n{\n char *src, *dst;\n int len;\n len = strlen(yytext);\n if (yytext[len-1] == '.')\n yytext[len-1] = 0;\n src = yytext;\n dst = yytext;\n while (*src == '0') src++;\n if (*src == 0) src--;\n while (*src != 0)\n {\n if (*src == '\\\\')\n {\n src++; src++;\n line_no++;\n }\n if (*src == ',')\n {\n src++;\n ct_warn(\"Commas in numbers\");\n }\n else\n *dst++ = *src++;\n }\n *dst = 0;\n yylval.s_value = strcopyof(yytext);\n return(264);\n }\n break;\ncase 45:\n\n{\n if (yytext[0] < ' ')\n yyerror (\"illegal character: ^%c\",yytext[0] + '@');\n else\n if (yytext[0] > '~')\n yyerror (\"illegal character: \\\\%03o\", (int) yytext[0]);\n else\n yyerror (\"illegal character: %s\",yytext);\n }\n break;\ncase 46:\n\nfwrite( yytext, yyleng, 1, yyout );\n break;\ncase (47 + 0 + 1):\ncase (47 + 1 + 1):\n return 0;\n case 47:\n {\n int yy_amount_of_matched_text = (int) (yy_cp - (yytext)) - 1;\n *yy_cp = (yy_hold_char);\n \n if ( (yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buffer_status == 0 )\n {\n (yy_n_chars) = (yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars;\n (yy_buffer_stack)[(yy_buffer_stack_top)]->yy_input_file = yyin;\n (yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buffer_status = 1;\n }\n if ( (yy_c_buf_p) <= &(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars)] )\n {\n yy_state_type yy_next_state;\n (yy_c_buf_p) = (yytext) + yy_amount_of_matched_text;\n yy_current_state = yy_get_previous_state( );\n yy_next_state = yy_try_NUL_trans( yy_current_state );\n yy_bp = (yytext) + 0;\n if ( yy_next_state )\n {\n yy_cp = ++(yy_c_buf_p);\n yy_current_state = yy_next_state;\n goto yy_match;\n }\n else\n {\n yy_cp = (yy_c_buf_p);\n goto yy_find_action;\n }\n }\n else switch ( yy_get_next_buffer( ) )\n {\n case 1:\n {\n (yy_did_buffer_switch_on_eof) = 0;\n if ( yywrap( ) )\n {\n (yy_c_buf_p) = (yytext) + 0;\n yy_act = (47 + (((yy_start) - 1) / 2) + 1);\n goto do_action;\n }\n else\n {\n if ( ! (yy_did_buffer_switch_on_eof) )\n yyrestart(yyin );\n }\n break;\n }\n case 0:\n (yy_c_buf_p) =\n (yytext) + yy_amount_of_matched_text;\n yy_current_state = yy_get_previous_state( );\n yy_cp = (yy_c_buf_p);\n yy_bp = (yytext) + 0;\n goto yy_match;\n case 2:\n (yy_c_buf_p) =\n &(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars)];\n yy_current_state = yy_get_previous_state( );\n yy_cp = (yy_c_buf_p);\n yy_bp = (yytext) + 0;\n goto yy_find_action;\n }\n break;\n }\n default:\n yy_fatal_error( \"fatal flex scanner internal error--no action found\" );\n }\n }\n}\n", "c_constructs": {"pointer_type": 5, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 9, "memory_management": 0, "memory_operation": 0, "if_statement": 28, "for_loop": 2, "while_loop": 8, "switch_statement": 2, "goto_statement": 6, "return_statement": 40, "break_continue_statement": 50}}, {"id": "hello-2.12.1#basename_prep#base_name.c", "codebase": "hello-2.12.1", "c_file": "basename.c", "function": "base_name", "sloc": "21", "c_code": "char *\nbase_name (char const *name)\n{\n char const *base = last_component (name);\n size_t length;\n if (! *base)\n return xstrndup (name, base_len (name));\n length = base_len (base);\n if (((base[length]) == '/'))\n length++;\n if (((void) (base), 0))\n {\n char *p = xmalloc (length + 3);\n p[0] = '.';\n p[1] = '/';\n memcpy (p + 2, base, length);\n p[length + 2] = '\\0';\n return p;\n }\n return xstrndup (base, length);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlParseCharData.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlParseCharData", "sloc": "4", "c_code": "void\nxmlParseCharData(xmlParserCtxtPtr ctxt, __attribute__((unused)) int cdata) {\n xmlParseCharDataInternal(ctxt, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlCatalogConvert.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlCatalogConvert", "sloc": "8", "c_code": "PyObject *\nlibxml_xmlCatalogConvert(PyObject *self __attribute__ ((__unused__)), PyObject *args __attribute__ ((__unused__))) {\n PyObject *py_retval;\n int c_retval;\n c_retval = xmlCatalogConvert();\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "make-4.4.1#hash_prep#hash_delete_at.c", "codebase": "make-4.4.1", "c_file": "hash.c", "function": "hash_delete_at", "sloc": "13", "c_code": "void *\nhash_delete_at (struct hash_table *ht, const void *slot)\n{\n void *item = *(void **) slot;\n if (!((item) == 0 || (void *) (item) == hash_deleted_item))\n {\n *(void const **) slot = hash_deleted_item;\n ht->ht_fill--;\n return item;\n }\n else\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#CALCULATE_VOLUME_DODECAHEDRON_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "CALCULATE_VOLUME_DODECAHEDRON.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE.c", "function": "f_gold", "sloc": "15", "c_code": "_Bool f_gold ( int arr [ ], int n, int k ) {\n int count;\n for ( int i = 0;\n i < n;\n i ++ ) {\n count = 0;\n for ( int j = 0;\n j < n;\n j ++ ) {\n if ( arr [ j ] == arr [ i ] ) count ++;\n if ( count > 2 * k ) return 0;\n }\n }\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "pexec-1.0rc8#numhash_prep#numhash_free.c", "codebase": "pexec-1.0rc8", "c_file": "numhash.c", "function": "numhash_free", "sloc": "6", "c_code": "int numhash_free(numhashtable *nt)\n{\n numhash_local_free(&nt->table,0,nt->depth,nt->bitsize);\n numhash_init(nt,nt->bitsize,nt->depth);\n return(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#global_prep#shown_entries_for.c", "codebase": "nano-7.2", "c_file": "global.c", "function": "shown_entries_for", "sloc": "15", "c_code": "size_t shown_entries_for(int menu)\n{\n funcstruct *item = allfuncs;\n size_t maximum = ((COLS + 40) / 20) * 2;\n size_t count = 0;\n while (count < maximum && item != ((void *)0)) {\n if (item->menus & menu)\n count++;\n item = item->next;\n }\n if (menu == (1<<5) && item == ((void *)0) &&\n first_sc_for(menu, discard_buffer) == ((void *)0))\n count--;\n return count;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#EQUILIBRIUM_INDEX_OF_AN_ARRAY_1_prep#min.c", "codebase": "transcoder-set", "c_file": "EQUILIBRIUM_INDEX_OF_AN_ARRAY_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlSaveFile.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlSaveFile", "sloc": "14", "c_code": "PyObject *\nlibxml_xmlSaveFile(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n char * filename;\n xmlDocPtr cur;\n PyObject *pyobj_cur;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"zO:xmlSaveFile\", &filename, &pyobj_cur))\n return(((void *)0));\n cur = (xmlDocPtr) (((pyobj_cur) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_cur))->obj));\n c_retval = xmlSaveFile(filename, cur);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "uucp-1.07#cusub_prep#fsysdep_terminal_puts.c", "codebase": "uucp-1.07", "c_file": "cusub.c", "function": "fsysdep_terminal_puts", "sloc": "41", "c_code": "boolean\nfsysdep_terminal_puts (zline)\n const char *zline;\n{\n char *zalc, *zprint;\n size_t clen;\n if (zline == ((void *)0))\n {\n zalc = zbufalc (2);\n clen = 0;\n }\n else\n {\n clen = strlen (zline);\n zalc = zbufalc (clen + 2);\n memcpy (zalc, zline, clen);\n }\n if (fSterm)\n {\n zalc[clen] = '\\r';\n ++clen;\n }\n zalc[clen] = '\\n';\n ++clen;\n zprint = zalc;\n while (clen > 0)\n {\n int c;\n c = write (1, zprint, clen);\n if (c <= 0)\n {\n ubuffree (zalc);\n ulog (LOG_ERROR, \"write: %s\", strerror ((*__errno_location ())));\n return (0);\n }\n clen -= c;\n zprint += c;\n }\n ubuffree (zalc);\n return (1);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathCastToNumber.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathCastToNumber", "sloc": "4", "c_code": "double\nxmlXPathCastToNumber(xmlXPathObjectPtr val) {\n return(xmlXPathCastToNumberInternal(((void *)0), val));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#error_supp_prep#Pl_Os_Error.c", "codebase": "gprolog-1.5.0", "c_file": "error_supp.c", "function": "Pl_Os_Error", "sloc": "12", "c_code": "void\nPl_Os_Error(int ret_val)\n{\n char *err_str = Pl_M_Sys_Err_String(ret_val);\n if (((pl_flag_os_error)->value) == 0)\n Pl_Err_System(Pl_Create_Allocate_Atom(err_str));\n Update_Cur_From_C_Bip();\n if (((pl_flag_os_error)->value) == 1)\n Pl_Stream_Printf(pl_stm_tbl[pl_stm_top_level_output],\n \"warning: OS error: %s (from %s)\\n\",\n err_str, Context_Error_String());\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "screen-4.9.0#layer_prep#LayerCleanupMemory.c", "codebase": "screen-4.9.0", "c_file": "layer.c", "function": "LayerCleanupMemory", "sloc": "7", "c_code": "void LayerCleanupMemory(struct layer *layer)\n{\n if (layer->l_pause.left)\n free(layer->l_pause.left);\n if (layer->l_pause.right)\n free(layer->l_pause.right);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 2, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SEARCH_INSERT_AND_DELETE_IN_A_SORTED_ARRAY_1_prep#len.c", "codebase": "transcoder-set", "c_file": "SEARCH_INSERT_AND_DELETE_IN_A_SORTED_ARRAY_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#tc_result_new.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "tc_result_new", "sloc": "6", "c_code": "tc_result *tc_result_new() {\n tc_result *k = malloc(sizeof(tc_result));\n if (!k) return 0;\n memset(k, 0, sizeof(tc_result));\n return k;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#LONGEST_COMMON_INCREASING_SUBSEQUENCE_LCS_LIS_prep#max.c", "codebase": "transcoder-set", "c_file": "LONGEST_COMMON_INCREASING_SUBSEQUENCE_LCS_LIS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "patch-2.7.6#quotearg_prep#quotearg_custom.c", "codebase": "patch-2.7.6", "c_file": "quotearg.c", "function": "quotearg_custom", "sloc": "6", "c_code": "char *\nquotearg_custom (char const *left_quote, char const *right_quote,\n char const *arg)\n{\n return quotearg_n_custom (0, left_quote, right_quote, arg);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1_prep#min.c", "codebase": "transcoder-set", "c_file": "SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_transaction_prep#osip_transaction_set_your_instance.c", "codebase": "libosip2-5.3.1", "c_file": "osip_transaction.c", "function": "osip_transaction_set_your_instance", "sloc": "6", "c_code": "int osip_transaction_set_your_instance(osip_transaction_t *transaction, void *ptr) {\n if (transaction == ((void *)0))\n return -2;\n transaction->reserved1 = ptr;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "hello-2.12.1#quotearg_prep#set_char_quoting.c", "codebase": "hello-2.12.1", "c_file": "quotearg.c", "function": "set_char_quoting", "sloc": "11", "c_code": "int\nset_char_quoting (struct quoting_options *o, char c, int i)\n{\n unsigned char uc = c;\n unsigned int *p =\n (o ? o : &default_quoting_options)->quote_these_too + uc / (sizeof (int) * 8);\n int shift = uc % (sizeof (int) * 8);\n int r = (*p >> shift) & 1;\n *p ^= ((i & 1) ^ r) << shift;\n return r;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS_1_prep#max.c", "codebase": "transcoder-set", "c_file": "TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS_1.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#sharefile_prep#sharefile_destroy.c", "codebase": "findutils-4.9.0", "c_file": "sharefile.c", "function": "sharefile_destroy", "sloc": "7", "c_code": "void\nsharefile_destroy (sharefile_handle pv)\n{\n struct sharefile *p = pv;\n free (p->mode);\n hash_free (p->table);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#debugXML_prep#xmlDebugDumpAttr.c", "codebase": "libxml2", "c_file": "debugXML.c", "function": "xmlDebugDumpAttr", "sloc": "10", "c_code": "void\nxmlDebugDumpAttr(FILE *output, xmlAttrPtr attr, int depth) {\n xmlDebugCtxt ctxt;\n if (output == ((void *)0)) return;\n xmlCtxtDumpInitCtxt(&ctxt);\n ctxt.output = output;\n ctxt.depth = depth;\n xmlCtxtDumpAttr(&ctxt, attr);\n xmlCtxtDumpCleanCtxt(&ctxt);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "COUNT_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#format_prep#format_entry_tree_RB_NFIND.c", "codebase": "tmux", "c_file": "format.c", "function": "format_entry_tree_RB_NFIND", "sloc": "1", "c_code": "struct format_entry * format_entry_tree_RB_NFIND(struct format_entry_tree *head, struct format_entry *elm) { struct format_entry *tmp = (head)->rbh_root; struct format_entry *res = ((void *)0); int comp; while (tmp) { comp = format_entry_cmp(elm, tmp); if (comp < 0) { res = tmp; tmp = (tmp)->entry.rbe_left; } else if (comp > 0) tmp = (tmp)->entry.rbe_right; else return (tmp); } return (res); }\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "patch-2.7.6#cloexec_prep#dup_cloexec.c", "codebase": "patch-2.7.6", "c_file": "cloexec.c", "function": "dup_cloexec", "sloc": "5", "c_code": "int\ndup_cloexec (int fd)\n{\n return rpl_fcntl (fd, 1030, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#screen_prep#screen_resize.c", "codebase": "tmux", "c_file": "screen.c", "function": "screen_resize", "sloc": "17", "c_code": "void\nscreen_resize(struct screen *s, u_int sx, u_int sy, int reflow)\n{\n if (sx < 1)\n sx = 1;\n if (sy < 1)\n sy = 1;\n if (sx != ((s)->grid->sx)) {\n screen_resize_x(s, sx);\n screen_reset_tabs(s);\n } else\n reflow = 0;\n if (sy != ((s)->grid->sy))\n screen_resize_y(s, sy);\n if (reflow)\n screen_reflow(s, sx);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#bignum_prep#nettle_mpz_init_set_str_256_s.c", "codebase": "nettle-3.9.1", "c_file": "bignum.c", "function": "nettle_mpz_init_set_str_256_s", "sloc": "7", "c_code": "void\nnettle_mpz_init_set_str_256_s(mpz_t x,\n size_t length, const uint8_t *s)\n{\n __gmpz_init(x);\n nettle_mpz_set_str_256_s(x, length, s);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "heman#plane_prep#kmPlaneFill.c", "codebase": "heman", "c_file": "plane.c", "function": "kmPlaneFill", "sloc": "7", "c_code": "kmPlane* kmPlaneFill(kmPlane* plane, float a, float b, float c, float d) {\n plane->a = a;\n plane->b = b;\n plane->c = c;\n plane->d = d;\n return plane;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#nodePop.c", "codebase": "libxml2", "c_file": "parser.c", "function": "nodePop", "sloc": "16", "c_code": "xmlNodePtr\nnodePop(xmlParserCtxtPtr ctxt)\n{\n xmlNodePtr ret;\n if (ctxt == ((void *)0)) return(((void *)0));\n if (ctxt->nodeNr <= 0)\n return (((void *)0));\n ctxt->nodeNr--;\n if (ctxt->nodeNr > 0)\n ctxt->node = ctxt->nodeTab[ctxt->nodeNr - 1];\n else\n ctxt->node = ((void *)0);\n ret = ctxt->nodeTab[ctxt->nodeNr];\n ctxt->nodeTab[ctxt->nodeNr] = ((void *)0);\n return (ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "lodepng#lodepng_prep#lodepng_add_itext.c", "codebase": "lodepng", "c_file": "lodepng.c", "function": "lodepng_add_itext", "sloc": "4", "c_code": "unsigned lodepng_add_itext(LodePNGInfo* info, const char* key, const char* langtag,\n const char* transkey, const char* str) {\n return lodepng_add_itext_sized(info, key, langtag, transkey, str, lodepng_strlen(str));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PYTHAGOREAN_QUADRUPLE_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "PYTHAGOREAN_QUADRUPLE.c", "function": "f_gold", "sloc": "5", "c_code": "_Bool f_gold ( int a, int b, int c, int d ) {\n int sum = a * a + b * b + c * c;\n if ( d * d == sum ) return 1;\n else return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "less-633#pattern_prep#match_pattern.c", "codebase": "less-633", "c_file": "pattern.c", "function": "match_pattern", "sloc": "11", "c_code": "int match_pattern(regex_t * pattern, char *tpattern, char *line, int line_len, char **sp, char **ep, int nsp, int notbol, int search_type)\n{\n int matched = match_pattern1(pattern, tpattern, line, line_len, sp, ep, nsp, notbol, search_type);\n int i;\n for (i = 1; i <= (16 -10-1); i++)\n {\n if ((search_type & (1 << (16+(i)))) && ep[i] == sp[i])\n matched = 0;\n }\n return matched;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#connect_prep#socket_family.c", "codebase": "wget-1.21.4", "c_file": "connect.c", "function": "socket_family", "sloc": "18", "c_code": "int\nsocket_family (int sock, int endpoint)\n{\n struct sockaddr_storage storage;\n struct sockaddr *sockaddr = (struct sockaddr *) &storage;\n socklen_t addrlen = sizeof (storage);\n int ret;\n memset (sockaddr, 0, addrlen);\n if (endpoint == ENDPOINT_LOCAL)\n ret = getsockname (sock, sockaddr, &addrlen);\n else if (endpoint == ENDPOINT_PEER)\n ret = getpeername (sock, sockaddr, &addrlen);\n else\n abort ();\n if (ret < 0)\n return -1;\n return sockaddr->sa_family;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "less-633#optfunc_prep#opt__P.c", "codebase": "less-633", "c_file": "optfunc.c", "function": "opt__P", "sloc": "27", "c_code": "void opt__P(int type, char *s)\n{\n char **proto;\n PARG parg;\n switch (type)\n {\n case 0:\n case 2:\n switch (*s)\n {\n case 's': proto = &prproto[0]; s++; break;\n case 'm': proto = &prproto[1]; s++; break;\n case 'M': proto = &prproto[2]; s++; break;\n case '=': proto = &eqproto; s++; break;\n case 'h': proto = &hproto; s++; break;\n case 'w': proto = &wproto; s++; break;\n default: proto = &prproto[0]; break;\n }\n free(*proto);\n *proto = save(s);\n break;\n case 1:\n parg.p_string = prproto[pr_type];\n error(\"%s\", &parg);\n break;\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 2, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 9}}, {"id": "transcoder-set#SPLIT_N_MAXIMUM_COMPOSITE_NUMBERS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "SPLIT_N_MAXIMUM_COMPOSITE_NUMBERS.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Rd_Boolean.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Rd_Boolean", "sloc": "9", "c_code": "int\nPl_Rd_Boolean(WamWord start_word)\n{\n WamWord word, tag_mask;\n int atom;\n do { WamWord deref_last_word; word = start_word; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0);\n atom = ((PlULong) (word) >> 3);\n return atom != pl_atom_false;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "mcsim-6.2.0#mh_prep#PrintExpt.c", "codebase": "mcsim-6.2.0", "c_file": "mh.c", "function": "PrintExpt", "sloc": "51", "c_code": "int PrintExpt (PLEVEL plevel, char **args)\n{\n PANALYSIS panal = (PANALYSIS)args[0];\n PFILE pOutFile = (PFILE)args[1];\n long k, l, m, n;\n PEXPERIMENT pExpt = plevel->pexpt;\n POUTSPEC pos;\n static long printed_head = 0;\n if (!printed_head) {\n fprintf (pOutFile,\n \"Level\\tSimulation\\tOutput_Var\\tTime\\tData\\tPrediction\\n\");\n printed_head = 1;\n }\n panal->pCurrentLevel[plevel->iDepth] = plevel;\n panal->iInstance[plevel->iDepth] = plevel->iSequence;\n if (pExpt != ((void *)0)) {\n InitModel ();\n for (n = 0; n <= plevel->iDepth; n++) {\n SetModelVars (panal->pCurrentLevel[n]);\n SetFixedVars (panal->pCurrentLevel[n]);\n }\n if (!DoOneExperiment (pExpt)) {\n printf (\"Warning: DoOneExperiment failed\\n\");\n return 0;\n }\n else {\n pos = &pExpt->os;\n for (m = 0; m < pos->nOutputs; m++) {\n for (k = 0; k < pos->nData; k++)\n if (!strcmp(pos->pszDataNames[k], pos->pszOutputNames[m]))\n break;\n for (l = 0; l < pos->pcOutputTimes[m]; l++) {\n for (n = 1; n < plevel->iDepth; n++)\n fprintf (pOutFile, \"%d_\", panal->iInstance[n]);\n fprintf (pOutFile, \"%d\\t\", panal->iInstance[plevel->iDepth]);\n if (k != pos->nData)\n fprintf (pOutFile, \"%d\\t%s\\t%g\\t%g\\t%g\\n\", pExpt->iExp,\n pos->pszOutputNames[m], pos->prgdOutputTimes[m][l],\n pos->prgdDataVals[k][l], pos->prgdOutputVals[m][l]);\n else\n fprintf (pOutFile, \"%d\\t%s\\t%g\\t\\t%g\\n\", pExpt->iExp,\n pos->pszOutputNames[m], pos->prgdOutputTimes[m][l],\n pos->prgdOutputVals[m][l]);\n }\n fprintf (pOutFile, \"\\n\");\n }\n fprintf (pOutFile, \"\\n\");\n }\n }\n return (1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 9, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 5, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 1}}, {"id": "mtools-4.0.43#strtonum_prep#strtoui.c", "codebase": "mtools-4.0.43", "c_file": "strtonum.c", "function": "strtoui", "sloc": "3", "c_code": "unsigned int strtoui(const char *nptr, char **endptr, int base) {\n return (unsigned int) strtoul_with_range(nptr, endptr, base, (0x7fffffff * 2U + 1U));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlParseDocTypeDecl.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlParseDocTypeDecl", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlParseDocTypeDecl(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlParserCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n if (libxml_deprecationWarning(\"xmlParseDocTypeDecl\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlParseDocTypeDecl\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj));\n xmlParseDocTypeDecl(ctxt);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tinycc#tccelf_prep#fill_got_entry.c", "codebase": "tinycc", "c_file": "tccelf.c", "function": "fill_got_entry", "sloc": "11", "c_code": "void fill_got_entry(TCCState *s1, Elf64_Rela *rel)\n{\n int sym_index = ((rel->r_info) >> 32);\n Elf64_Sym *sym = &((Elf64_Sym *) symtab_section->data)[sym_index];\n struct sym_attr *attr = get_sym_attr(s1, sym_index, 0);\n unsigned offset = attr->got_offset;\n if (0 == offset)\n return;\n section_reserve(s1->got, offset + 8);\n write64le(s1->got->data + offset, sym->st_value);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#parserInternals_prep#xmlNewParserCtxt.c", "codebase": "libxml2", "c_file": "parserInternals.c", "function": "xmlNewParserCtxt", "sloc": "5", "c_code": "xmlParserCtxtPtr\nxmlNewParserCtxt(void)\n{\n return(xmlNewSAXParserCtxt(((void *)0), ((void *)0)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsYiRadicals.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsYiRadicals", "sloc": "4", "c_code": "int\nxmlUCSIsYiRadicals(int code) {\n return(((code >= 0xA490) && (code <= 0xA4CF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#tc_result_free.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "tc_result_free", "sloc": "5", "c_code": "void tc_result_free(tc_result *result) {\n if (!result) return;\n free(result->hits);\n free(result);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 2, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#AREA_OF_A_HEXAGON_prep#main.c", "codebase": "transcoder-set", "c_file": "AREA_OF_A_HEXAGON.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n double param0[] = {1772.6589509256596,-599.737107809315,1074.1765931782,-1182.4087746714795,8083.035797247716,-6126.414356565494,5370.057504189614,-6947.020794285176,2110.5107873533325,-6458.751326919488};\n for(int i = 0; i < len(param0); ++i)\n {\n if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001)\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "libosip2-5.3.1#osip_authentication_info_prep#osip_authentication_info_get_auth_type.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authentication_info.c", "function": "osip_authentication_info_get_auth_type", "sloc": "3", "c_code": "char *osip_authentication_info_get_auth_type(osip_authentication_info_t *authentication_info) {\n return authentication_info->auth_type;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlmemory_prep#xmlMemoryDump.c", "codebase": "libxml2", "c_file": "xmlmemory.c", "function": "xmlMemoryDump", "sloc": "4", "c_code": "void\nxmlMemoryDump(void)\n{\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "hello-2.12.1#quotearg_prep#quotearg_buffer.c", "codebase": "hello-2.12.1", "c_file": "quotearg.c", "function": "quotearg_buffer", "sloc": "13", "c_code": "size_t\nquotearg_buffer (char *buffer, size_t buffersize,\n char const *arg, size_t argsize,\n struct quoting_options const *o)\n{\n struct quoting_options const *p = o ? o : &default_quoting_options;\n int e = (*__errno_location ());\n size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize,\n p->style, p->flags, p->quote_these_too,\n p->left_quote, p->right_quote);\n (*__errno_location ()) = e;\n return r;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_multi_line_strings_prep#json_value_as_number.c", "codebase": "json.h", "c_file": "allow_multi_line_strings.c", "function": "json_value_as_number", "sloc": "6", "c_code": "struct json_number_s *json_value_as_number(struct json_value_s *const value) {\n if (value->type != json_type_number) {\n return 0;\n }\n return (struct json_number_s *)value->payload;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_OPERATIONS_MAKE_GCD_ARRAY_MULTIPLE_K_prep#max.c", "codebase": "transcoder-set", "c_file": "MINIMUM_OPERATIONS_MAKE_GCD_ARRAY_MULTIPLE_K.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cflow-1.7#malloca_prep#freea.c", "codebase": "cflow-1.7", "c_file": "malloca.c", "function": "freea", "sloc": "13", "c_code": "void\nfreea (void *p)\n{\n if ((uintptr_t) p & (sa_alignment_max - 1))\n {\n abort ();\n }\n if ((uintptr_t) p & sa_alignment_max)\n {\n void *mem = (char *) p - ((small_t *) p)[-1];\n free (mem);\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#type_inl_c_prep#Pl_Blt_Non_Generic_Var.c", "codebase": "gprolog-1.5.0", "c_file": "type_inl_c.c", "function": "Pl_Blt_Non_Generic_Var", "sloc": "5", "c_code": "Bool\nPl_Blt_Non_Generic_Var(WamWord x)\n{\n WamWord word, tag_mask; do { WamWord deref_last_word; word = x; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0); return (!((tag_mask == (PlULong)0) || (tag_mask == (PlULong)0x5)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#PAINTING_FENCE_ALGORITHM_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "PAINTING_FENCE_ALGORITHM.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_list_get_value.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_list_get_value", "sloc": "20", "c_code": "BOOL binn_list_get_value(void* ptr, int pos, binn *value) {\n int i, type, count, size=0, header_size;\n unsigned char *p, *plimit, *base;\n ptr = binn_ptr(ptr);\n if ((ptr == 0) || (value == 0)) return 0;\n if (IsValidBinnHeader(ptr, &type, &count, &size, &header_size) == 0) return 0;\n if (type != 0xE0) return 0;\n if (count == 0) return 0;\n if ((pos <= 0) | (pos > count)) return 0;\n pos--;\n p = (unsigned char *) ptr;\n base = p;\n plimit = p + size;\n p += header_size;\n for (i = 0; i < pos; i++) {\n p = AdvanceDataPos(p, plimit);\n if ((p == 0) || (p < base)) return 0;\n }\n return GetValue(p, value);\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 7, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#hash_prep#hash_lookup.c", "codebase": "mtools-4.0.43", "c_file": "hash.c", "function": "hash_lookup", "sloc": "5", "c_code": "int hash_lookup(T_HashTable *H,void *E, void **E2,\n size_t *hint)\n{\n return _hash_lookup(H, E, E2, hint, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathIsNaN.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathIsNaN", "sloc": "4", "c_code": "int\nxmlXPathIsNaN(double val) {\n return __builtin_isnan (val);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#simmonte_prep#InitSetPoints.c", "codebase": "mcsim-6.2.0", "c_file": "simmonte.c", "function": "InitSetPoints", "sloc": "14", "c_code": "BOOL InitSetPoints (PMONTECARLO pMC)\n{\n register char c;\n PFILE pfile;\n if (!(pfile = fopen(pMC->szSetPointsFilename, \"r\")))\n ReportError (((void *)0), 0x0003 | 0x8000,\n pMC->szSetPointsFilename, ((void *)0));\n pMC->pfileSetPoints = pfile;\n do { c = getc(pMC->pfileSetPoints); } while (c != '\\n');\n if (feof(pMC->pfileSetPoints))\n ReportError (((void *)0), 0x0208 | 0x8000,\n pMC->szSetPointsFilename, ((void *)0));\n return (!pfile);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#b-feph_prep#dirtempunlink.c", "codebase": "rcs-5.10.1", "c_file": "b-feph.c", "function": "dirtempunlink", "sloc": "5", "c_code": "void\ndirtempunlink (void)\n{\n reap ((0 + 2), (top->behavior. sff), un_link);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#status_prep#status_prompt_load_history.c", "codebase": "tmux", "c_file": "status.c", "function": "status_prompt_load_history", "sloc": "34", "c_code": "void\nstatus_prompt_load_history(void)\n{\n FILE *f;\n char *history_file, *line, *tmp;\n size_t length;\n if ((history_file = status_prompt_find_history_file()) == ((void *)0))\n return;\n log_debug(\"loading history from %s\", history_file);\n f = fopen(history_file, \"r\");\n if (f == ((void *)0)) {\n log_debug(\"%s: %s\", history_file, strerror((*__errno_location ())));\n free(history_file);\n return;\n }\n free(history_file);\n for (;;) {\n if ((line = fgetln(f, &length)) == ((void *)0))\n break;\n if (length > 0) {\n if (line[length - 1] == '\\n') {\n line[length - 1] = '\\0';\n status_prompt_add_history(line);\n } else {\n tmp = xmalloc(length + 1);\n memcpy(tmp, line, length);\n tmp[length] = '\\0';\n status_prompt_add_history(tmp);\n free(tmp);\n }\n }\n }\n fclose(f);\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 3, "memory_operation": 1, "if_statement": 5, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 1}}, {"id": "gawk-5.2.2#getopt1_prep#_getopt_long_only_r.c", "codebase": "gawk-5.2.2", "c_file": "getopt1.c", "function": "_getopt_long_only_r", "sloc": "8", "c_code": "int\n_getopt_long_only_r (int argc, char *const *argv, const char *options,\n const struct option *long_options, int *opt_index,\n struct _getopt_data *d)\n{\n return _getopt_internal_r (argc, argv, options, long_options, opt_index,\n 1, d, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "dap-3.10#ps_prep#pict_scale.c", "codebase": "dap-3.10", "c_file": "ps.c", "function": "pict_scale", "sloc": "27", "c_code": "void pict_scale(pict *p, double cx, double cy, double sx, double sy)\n{\n int ptn;\n int t;\n while (p)\n {\n if (sx >= sy)\n p->pict_r *= sy;\n else\n p->pict_r *= sx;\n for (t = 0; t < p->pict_ntxt; t++)\n {\n p->pict_tpt[t][0] = cx + sx * (p->pict_tpt[t][0] - cx);\n p->pict_tpt[t][1] = cy + sy * (p->pict_tpt[t][1] - cy);\n }\n for (ptn = 0; ptn < p->pict_npts; ptn++)\n {\n p->pict_pt[ptn][0] = cx + sx * (p->pict_pt[ptn][0] - cx);\n p->pict_pt[ptn][1] = cy + sy * (p->pict_pt[ptn][1] - cy);\n }\n p->pict_minx = cx + sx * (p->pict_minx - cx);\n p->pict_maxx = cx + sx * (p->pict_maxx - cx);\n p->pict_miny = cx + sx * (p->pict_miny - cx);\n p->pict_maxy = cx + sx * (p->pict_maxy - cx);\n p = p->pict_next;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 2, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#node_prep#r_free_wstr.c", "codebase": "gawk-5.2.2", "c_file": "node.c", "function": "r_free_wstr", "sloc": "12", "c_code": "void\nr_free_wstr(NODE *n)\n{\n ((void) (0));\n if ((n->flags & WSTRCUR) != 0) {\n ((void) (0));\n pma_free(n->sub.val.wsp);\n }\n n->sub.val.wsp = ((void *)0);\n n->sub.val.wslen = 0;\n n->flags &= ~WSTRCUR;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#schematron_prep#xmlSchematronNewMemParserCtxt.c", "codebase": "libxml2", "c_file": "schematron.c", "function": "xmlSchematronNewMemParserCtxt", "sloc": "25", "c_code": "xmlSchematronParserCtxtPtr\nxmlSchematronNewMemParserCtxt(const char *buffer, int size)\n{\n xmlSchematronParserCtxtPtr ret;\n if ((buffer == ((void *)0)) || (size <= 0))\n return (((void *)0));\n ret =\n (xmlSchematronParserCtxtPtr)\n xmlMalloc(sizeof(xmlSchematronParserCtxt));\n if (ret == ((void *)0)) {\n xmlSchematronPErrMemory(((void *)0));\n return (((void *)0));\n }\n memset(ret, 0, sizeof(xmlSchematronParserCtxt));\n ret->buffer = buffer;\n ret->size = size;\n ret->dict = xmlDictCreate();\n ret->xctxt = xmlXPathNewContext(((void *)0));\n if (ret->xctxt == ((void *)0)) {\n xmlSchematronPErrMemory(((void *)0));\n xmlSchematronFreeParserCtxt(ret);\n return (((void *)0));\n }\n return (ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 9, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#dsa-verify_prep#nettle_dsa_verify.c", "codebase": "nettle-3.9.1", "c_file": "dsa-verify.c", "function": "nettle_dsa_verify", "sloc": "39", "c_code": "int\nnettle_dsa_verify(const struct dsa_params *params,\n const mpz_t y,\n size_t digest_size,\n const uint8_t *digest,\n const struct dsa_signature *signature)\n{\n mpz_t w;\n mpz_t tmp;\n mpz_t v;\n int res;\n if (((signature->r)->_mp_size < 0 ? -1 : (signature->r)->_mp_size > 0) <= 0 || __gmpz_cmp(signature->r, params->q) >= 0)\n return 0;\n if (((signature->s)->_mp_size < 0 ? -1 : (signature->s)->_mp_size > 0) <= 0 || __gmpz_cmp(signature->s, params->q) >= 0)\n return 0;\n __gmpz_init(w);\n if (!__gmpz_invert(w, signature->s, params->q))\n {\n __gmpz_clear(w);\n return 0;\n }\n __gmpz_init(tmp);\n __gmpz_init(v);\n _nettle_dsa_hash (tmp, __gmpz_sizeinbase (params->q, 2), digest_size, digest);\n __gmpz_mul(tmp, tmp, w);\n __gmpz_fdiv_r(tmp, tmp, params->q);\n __gmpz_powm(v, params->g, tmp, params->p);\n __gmpz_mul(tmp, signature->r, w);\n __gmpz_fdiv_r(tmp, tmp, params->q);\n __gmpz_powm(tmp, y, tmp, params->p);\n __gmpz_mul(v, v, tmp);\n __gmpz_fdiv_r(v, v, params->p);\n __gmpz_fdiv_r(v, v, params->q);\n res = !__gmpz_cmp(v, signature->r);\n __gmpz_clear(w);\n __gmpz_clear(tmp);\n __gmpz_clear(v);\n return res;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "screen-4.9.0#fileio_prep#ReadFile.c", "codebase": "screen-4.9.0", "c_file": "fileio.c", "function": "ReadFile", "sloc": "41", "c_code": "char *\nReadFile(char *fn, int *lenp)\n{\n int i, l, size;\n char c, *bp, *buf;\n struct stat stb;\n do {} while (0);\n do {} while (0);\n if ((i = secopen(fn, 00, 0)) < 0) {\n Msg((*__errno_location ()), \"no %s -- no slurp\", fn);\n return ((void *)0);\n }\n if (fstat(i, &stb)) {\n Msg((*__errno_location ()), \"no good %s -- no slurp\", fn);\n close(i);\n return ((void *)0);\n }\n size = stb.st_size;\n if ((buf = malloc(size)) == ((void *)0)) {\n close(i);\n Msg(0, \"%s\", strnomem);\n return ((void *)0);\n }\n (*__errno_location ()) = 0;\n if ((l = read(i, buf, size)) != size) {\n if (l < 0)\n l = 0;\n Msg((*__errno_location ()), \"Got only %d bytes from %s\", l, fn);\n } else {\n if (read(i, &c, 1) > 0)\n Msg(0, \"Slurped only %d characters (of %d) into buffer - try again\", l, size);\n else\n Msg(0, \"Slurped %d characters into buffer\", l);\n }\n close(i);\n *lenp = l;\n for (bp = buf; l-- > 0; bp++)\n if (*bp == '\\n' && (bp == buf || bp[-1] != '\\r'))\n *bp = '\\r';\n return buf;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 1, "memory_operation": 0, "if_statement": 7, "for_loop": 1, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_REPETITIVE_ELEMENT_1_N_1_2_prep#max.c", "codebase": "transcoder-set", "c_file": "FIND_REPETITIVE_ELEMENT_1_N_1_2.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "make-4.4.1#hash_prep#hash_print_stats.c", "codebase": "make-4.4.1", "c_file": "hash.c", "function": "hash_print_stats", "sloc": "11", "c_code": "void\nhash_print_stats (struct hash_table *ht, FILE *out_FILE)\n{\n fprintf (out_FILE, gettext (\"Load=%lu/%lu=%.0f%%, \"), ht->ht_fill, ht->ht_size,\n 100.0 * (double) ht->ht_fill / (double) ht->ht_size);\n fprintf (out_FILE, gettext (\"Rehash=%u, \"), ht->ht_rehashes);\n fprintf (out_FILE, gettext (\"Collisions=%lu/%lu=%.0f%%\"), ht->ht_collisions, ht->ht_lookups,\n (ht->ht_lookups\n ? (100.0 * (double) ht->ht_collisions / (double) ht->ht_lookups)\n : 0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xlink_prep#xlinkSetDefaultHandler.c", "codebase": "libxml2", "c_file": "xlink.c", "function": "xlinkSetDefaultHandler", "sloc": "4", "c_code": "void\nxlinkSetDefaultHandler(xlinkHandlerPtr handler) {\n xlinkDefaultHandler = handler;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_TRIPLET_SUM_ARRAY_prep#max.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_TRIPLET_SUM_ARRAY.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#UNBOUNDED_KNAPSACK_REPETITION_ITEMS_ALLOWED_prep#max.c", "codebase": "transcoder-set", "c_file": "UNBOUNDED_KNAPSACK_REPETITION_ITEMS_ALLOWED.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#valid_prep#xmlFreeValidCtxt.c", "codebase": "libxml2", "c_file": "valid.c", "function": "xmlFreeValidCtxt", "sloc": "10", "c_code": "void\nxmlFreeValidCtxt(xmlValidCtxtPtr cur) {\n if (cur == ((void *)0))\n return;\n if (cur->vstateTab != ((void *)0))\n xmlFree(cur->vstateTab);\n if (cur->nodeTab != ((void *)0))\n xmlFree(cur->nodeTab);\n xmlFree(cur);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#list_prep#FreeList.c", "codebase": "mcsim-6.2.0", "c_file": "list.c", "function": "FreeList", "sloc": "17", "c_code": "void FreeList (PLIST *pplist, PFV_FREELISTCALLBACK pfvFreeData, BOOL bAndData)\n{\n PLIST plist = *pplist;\n if (!plist)\n return;\n while (plist->pleHead) {\n if (pfvFreeData)\n (*pfvFreeData)(plist->pleHead->pData);\n else if (bAndData && plist->pleHead->pData)\n free (plist->pleHead->pData);\n plist->pleTail = plist->pleHead;\n plist->pleHead = plist->pleHead->pleNext;\n free (plist->pleTail);\n }\n free (plist);\n *pplist = ((void *)0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 1, "memory_management": 3, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_DISTINCT_OCCURRENCES_AS_A_SUBSEQUENCE_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "COUNT_DISTINCT_OCCURRENCES_AS_A_SUBSEQUENCE.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( char S [], char T [] ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED_1_prep#min.c", "codebase": "transcoder-set", "c_file": "CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#tccelf_prep#tcc_object_type.c", "codebase": "tinycc", "c_file": "tccelf.c", "function": "tcc_object_type", "sloc": "14", "c_code": "int tcc_object_type(int fd, Elf64_Ehdr *h)\n{\n int size = read(fd, h, sizeof *h);\n if (size == sizeof *h && 0 == memcmp(h, \"\\177ELF\", 4)) {\n if (h->e_type == 1)\n return 1;\n if (h->e_type == 3)\n return 2;\n } else if (size >= 8) {\n if (0 == memcmp(h, \"!\\012\", 8))\n return 3;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#namePop.c", "codebase": "libxml2", "c_file": "parser.c", "function": "namePop", "sloc": "15", "c_code": "const xmlChar *\nnamePop(xmlParserCtxtPtr ctxt)\n{\n const xmlChar *ret;\n if ((ctxt == ((void *)0)) || (ctxt->nameNr <= 0))\n return (((void *)0));\n ctxt->nameNr--;\n if (ctxt->nameNr > 0)\n ctxt->name = ctxt->nameTab[ctxt->nameNr - 1];\n else\n ctxt->name = ((void *)0);\n ret = ctxt->nameTab[ctxt->nameNr];\n ctxt->nameTab[ctxt->nameNr] = ((void *)0);\n return (ret);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_FIND_SLOPE_LINE_prep#len.c", "codebase": "transcoder-set", "c_file": "PROGRAM_FIND_SLOPE_LINE.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_to_prep#osip_to_to_str.c", "codebase": "libosip2-5.3.1", "c_file": "osip_to.c", "function": "osip_to_to_str", "sloc": "3", "c_code": "int osip_to_to_str(const osip_to_t *to, char **dest) {\n return osip_from_to_str((osip_from_t *) to, dest);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#screen-write_prep#screen_write_putc.c", "codebase": "tmux", "c_file": "screen-write.c", "function": "screen_write_putc", "sloc": "9", "c_code": "void\nscreen_write_putc(struct screen_write_ctx *ctx, const struct grid_cell *gcp,\n u_char ch)\n{\n struct grid_cell gc;\n memcpy(&gc, gcp, sizeof gc);\n utf8_set(&gc.data, ch);\n screen_write_cell(ctx, &gc);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlSchemaNewParserCtxt.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlSchemaNewParserCtxt", "sloc": "11", "c_code": "PyObject *\nlibxml_xmlSchemaNewParserCtxt(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlSchemaParserCtxtPtr c_retval;\n char * URL;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"z:xmlSchemaNewParserCtxt\", &URL))\n return(((void *)0));\n c_retval = xmlSchemaNewParserCtxt(URL);\n py_retval = libxml_xmlSchemaParserCtxtPtrWrap((xmlSchemaParserCtxtPtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_SUM_SUBSEQUENCE_LEAST_K_DISTANT_ELEMENTS_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_SUM_SUBSEQUENCE_LEAST_K_DISTANT_ELEMENTS.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_NUMBER_WAYS_REACH_GIVEN_SCORE_GAME_prep#min.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBER_WAYS_REACH_GIVEN_SCORE_GAME.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#TRIANGULAR_NUMBERS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "TRIANGULAR_NUMBERS.c", "function": "f_filled", "sloc": "1", "c_code": "_Bool f_filled ( int num ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "uucp-1.07#uustat_prep#main.c", "codebase": "uucp-1.07", "c_file": "uustat.c", "function": "main", "sloc": "290", "c_code": "int\nmain (argc, argv)\n int argc;\n char **argv;\n{\n boolean fall = (0);\n int cstdin = 100;\n int ccommands = 0;\n char **pazcommands = ((void *)0);\n boolean fnotcommands = (0);\n boolean fexecute = (0);\n int ckills = 0;\n char **pazkills = ((void *)0);\n boolean fmachine = (0);\n int ioldhours = -1;\n boolean fps = (0);\n boolean fquery = (0);\n int crejuvs = 0;\n char **pazrejuvs = ((void *)0);\n int csystems = 0;\n char **pazsystems = ((void *)0);\n boolean fnotsystems = (0);\n int cusers = 0;\n char **pazusers = ((void *)0);\n boolean fnotusers = (0);\n const char *zcomment = ((void *)0);\n int iyounghours = -1;\n const char *zconfig = ((void *)0);\n int icmd = (01);\n int ccmds;\n int iopt;\n pointer puuconf;\n int iuuconf;\n long iold;\n long iyoung;\n const char *azoneuser[1];\n boolean fret;\n zProgram = argv[0];\n while ((iopt = getopt_long (argc, argv,\n \"aB:c:C:eiI:k:KmMNo:pqQr:Rs:S:u:U:vW:x:y:\",\n asSlongopts, (int *) ((void *)0))) != (-1))\n {\n switch (iopt)\n {\n case 'a':\n fall = (1);\n break;\n case 'B':\n cstdin = (int) strtol (gnu_optarg, (char **) ((void *)0), 10);\n break;\n case 'C':\n fnotcommands = (1);\n case 'c':\n ++ccommands;\n pazcommands = (char **) xrealloc ((pointer) pazcommands,\n ccommands * sizeof (char *));\n pazcommands[ccommands - 1] = gnu_optarg;\n break;\n case 'e':\n fexecute = (1);\n break;\n case 'i':\n icmd |= (02);\n break;\n case 'I':\n if (fsysdep_other_config (gnu_optarg))\n zconfig = gnu_optarg;\n break;\n case 'k':\n ++ckills;\n pazkills = (char **) xrealloc ((pointer) pazkills,\n ckills * sizeof (char *));\n pazkills[ckills - 1] = gnu_optarg;\n break;\n case 'K':\n icmd |= (04);\n break;\n case 'm':\n fmachine = (1);\n break;\n case 'M':\n icmd |= (020);\n break;\n case 'N':\n icmd |= (040);\n break;\n case 'o':\n ioldhours = (int) strtol (gnu_optarg, (char **) ((void *)0), 10);\n break;\n case 'p':\n fps = (1);\n break;\n case 'q':\n fquery = (1);\n break;\n case 'Q':\n icmd &=~ (01);\n break;\n case 'r':\n ++crejuvs;\n pazrejuvs = (char **) xrealloc ((pointer) pazrejuvs,\n crejuvs * sizeof (char *));\n pazrejuvs[crejuvs - 1] = gnu_optarg;\n break;\n case 'R':\n icmd |= (010);\n break;\n case 'S':\n fnotsystems = (1);\n case 's':\n ++csystems;\n pazsystems = (char **) xrealloc ((pointer) pazsystems,\n csystems * sizeof (char *));\n pazsystems[csystems - 1] = gnu_optarg;\n break;\n case 'U':\n fnotusers = (1);\n case 'u':\n ++cusers;\n pazusers = (char **) xrealloc ((pointer) pazusers,\n cusers * sizeof (char *));\n pazusers[cusers - 1] = gnu_optarg;\n break;\n case 'W':\n zcomment = gnu_optarg;\n break;\n case 'x':\n iDebug |= idebug_parse (gnu_optarg);\n break;\n case 'y':\n iyounghours = (int) strtol (gnu_optarg, (char **) ((void *)0), 10);\n break;\n case 'v':\n printf (\"uustat (Taylor UUCP) %s\\n\", \"1.07\");\n printf (\"Copyright (C) 1991, 92, 93, 94, 1995, 2002 Ian Lance Taylor\\n\");\n printf (\"This program is free software; you may redistribute it under the terms of\\n\");\n printf (\"the GNU General Public LIcense. This program has ABSOLUTELY NO WARRANTY.\\n\");\n exit (0);\n case 1:\n ushelp ();\n exit (0);\n case 0:\n break;\n default:\n ususage ();\n }\n }\n if (gnu_optind != argc)\n ususage ();\n ccmds = 0;\n if (fall)\n ++ccmds;\n if (ckills > 0 || crejuvs > 0)\n ++ccmds;\n if (fmachine)\n ++ccmds;\n if (fps)\n ++ccmds;\n if (fexecute || fquery || csystems > 0 || cusers > 0 || ioldhours != -1\n || iyounghours != -1 || ccommands > 0)\n ++ccmds;\n if (fexecute && fquery)\n ++ccmds;\n if (ccmds > 1)\n {\n fprintf (stderr, \"%s: too many options\\n\", zProgram);\n ususage ();\n }\n if ((icmd & (04)) != 0\n && (icmd & (010)) != 0)\n {\n fprintf (stderr, \"%s: can not both rejuvenate and kill jobs\\n\",\n zProgram);\n ususage ();\n }\n iuuconf = uuconf_init (&puuconf, (const char *) ((void *)0), zconfig);\n if (iuuconf != (0))\n ulog_uuconf (LOG_FATAL, puuconf, iuuconf);\n {\n const char *zdebug;\n iuuconf = uuconf_debuglevel (puuconf, &zdebug);\n if (iuuconf != (0))\n ulog_uuconf (LOG_FATAL, puuconf, iuuconf);\n if (zdebug != ((void *)0))\n iDebug |= idebug_parse (zdebug);\n }\n usysdep_initialize (puuconf, (04));\n if (ccmds == 0)\n {\n cusers = 1;\n azoneuser[0] = zsysdep_login_name ();\n pazusers = (char **) azoneuser;\n }\n if (csystems > 0)\n {\n int i;\n for (i = 0; i < csystems; i++)\n {\n struct uuconf_system ssys;\n iuuconf = uuconf_system_info (puuconf, pazsystems[i], &ssys);\n if (iuuconf != (0))\n {\n if (iuuconf == (1))\n ulog (LOG_FATAL, \"%s: System not found\", pazsystems[i]);\n else\n ulog_uuconf (LOG_FATAL, puuconf, iuuconf);\n }\n if (strcmp (pazsystems[i], ssys.uuconf_zname) != 0)\n pazsystems[i] = zbufcpy (ssys.uuconf_zname);\n (void) uuconf_system_free (puuconf, &ssys);\n }\n }\n if (ioldhours == -1)\n iold = (long) -1;\n else\n {\n iold = (ixsysdep_time ((long *) ((void *)0))\n - (long) ioldhours * (long) 60 * (long) 60);\n if (iold < 0L)\n iold = 0L;\n }\n if (iyounghours == -1)\n iyoung = (long) -1;\n else\n {\n iyoung = (ixsysdep_time ((long *) ((void *)0))\n - (long) iyounghours * (long) 60 * (long) 60);\n if (iyoung < 0L)\n iyoung = 0L;\n }\n if (! fexecute\n && ! fquery\n && (fall\n || csystems > 0\n || cusers > 0\n || ioldhours != -1\n || iyounghours != -1\n || ccommands > 0))\n fret = fsworkfiles (puuconf, icmd, csystems, pazsystems, fnotsystems,\n cusers, pazusers, fnotusers, iold, iyoung,\n ccommands, pazcommands, fnotcommands, zcomment,\n cstdin);\n else if (fexecute)\n fret = fsexecutions (puuconf, icmd, csystems, pazsystems, fnotsystems,\n cusers, pazusers, fnotusers, iold, iyoung,\n ccommands, pazcommands, fnotcommands, zcomment,\n cstdin);\n else if (icmd != (01))\n {\n ulog (LOG_ERROR,\n \"-i, -K, -M, -N, -Q, -R not supported with -k, -m, -p, -q, -r\");\n ususage ();\n fret = (0);\n }\n else if (fquery)\n {\n if (cusers > 0 || ccommands > 0)\n {\n ulog (LOG_ERROR, \"-u, -c not supported with -q\");\n ususage ();\n fret = (0);\n }\n else\n fret = fsquery (puuconf, csystems, pazsystems, fnotsystems,\n iold, iyoung);\n }\n else if (fmachine)\n fret = fsmachines ();\n else if (ckills > 0 || crejuvs > 0)\n {\n int i;\n fret = (1);\n for (i = 0; i < ckills; i++)\n if (! fsysdep_kill_job (puuconf, pazkills[i]))\n fret = (0);\n for (i = 0; i < crejuvs; i++)\n if (! fsysdep_rejuvenate_job (puuconf, pazrejuvs[i]))\n fret = (0);\n }\n else if (fps)\n fret = fsysdep_lock_status ();\n else\n {\n ulog (LOG_FATAL, \"Can't happen\");\n fret = (0);\n }\n ulog_close ();\n usysdep_exit (fret);\n return 0;\n}\n", "c_constructs": {"pointer_type": 9, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 25, "memory_management": 0, "memory_operation": 0, "if_statement": 32, "for_loop": 3, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 23}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlXPathDivValues.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlXPathDivValues", "sloc": "11", "c_code": "PyObject *\nlibxml_xmlXPathDivValues(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlXPathParserContextPtr ctxt;\n PyObject *pyobj_ctxt;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlXPathDivValues\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlXPathParserContextPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlXPathParserContext_Object *)(pyobj_ctxt))->obj));\n xmlXPathDivValues(ctxt);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_multi_line_strings_prep#json_get_key_size.c", "codebase": "json.h", "c_file": "allow_multi_line_strings.c", "function": "json_get_key_size", "sloc": "31", "c_code": "int json_get_key_size(struct json_parse_state_s *state) {\n const size_t flags_bitset = state->flags_bitset;\n if (json_parse_flags_allow_unquoted_keys & flags_bitset) {\n size_t offset = state->offset;\n const size_t size = state->size;\n const char *const src = state->src;\n size_t data_size = state->data_size;\n if ('\"' == src[offset]) {\n return json_get_string_size(state, 1);\n } else if ((json_parse_flags_allow_single_quoted_strings & flags_bitset) &&\n ('\\'' == src[offset])) {\n return json_get_string_size(state, 1);\n } else {\n while ((offset < size) && is_valid_unquoted_key_char(src[offset])) {\n offset++;\n data_size++;\n }\n data_size++;\n if (json_parse_flags_allow_location_information & flags_bitset) {\n state->dom_size += sizeof(struct json_string_ex_s);\n } else {\n state->dom_size += sizeof(struct json_string_s);\n }\n state->offset = offset;\n state->data_size = data_size;\n return 0;\n }\n } else {\n return json_get_string_size(state, 1);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Cos.c", "codebase": "gprolog-1.5.0", "c_file": "arith_inl_c.c", "function": "Pl_Fct_Cos", "sloc": "5", "c_code": "WamWord\nPl_Fct_Cos(WamWord x)\n{\n return Make_Tagged_Float(cos(To_Double(x)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#x86_64-gen_prep#gen_cvt_ftoi.c", "codebase": "tinycc", "c_file": "x86_64-gen.c", "function": "gen_cvt_ftoi", "sloc": "26", "c_code": "void gen_cvt_ftoi(int t)\n{\n int ft, bt, size, r;\n ft = vtop->type.t;\n bt = ft & 0x000f;\n if (bt == 10) {\n gen_cvt_ftof(9);\n bt = 9;\n }\n gv(0x0002);\n if (t != 3)\n size = 8;\n else\n size = 4;\n r = get_reg(0x0001);\n if (bt == 8) {\n o(0xf3);\n } else if (bt == 9) {\n o(0xf2);\n } else {\n ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail (\"0\", \"x86_64-gen.c\", 2201, __extension__ __PRETTY_FUNCTION__); }));\n }\n orex(size == 8, r, 0, 0x2c0f);\n o(0xc0 + ((vtop->r) & 7) + ((r) & 7)*8);\n vtop->r = r;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#pretty_c_prep#Pl_Portray_Clause_3.c", "codebase": "gprolog-1.5.0", "c_file": "pretty_c.c", "function": "Pl_Portray_Clause_3", "sloc": "15", "c_code": "void\nPl_Portray_Clause_3(WamWord sora_word, WamWord term_word, WamWord above_word)\n{\n int stm;\n StmInf *pstm;\n WamWord *b;\n stm = (sora_word == ((PlLong) (0) + ((PlULong)0)))\n ? pl_stm_output : Pl_Get_Stream_Or_Alias(sora_word, 3);\n pstm = pl_stm_tbl[stm];\n pl_last_output_sora = sora_word;\n Pl_Check_Stream_Type(stm, 1, 0);\n b = (((WamWordP *) pl_reg_bank)[256 +7]) + Pl_Rd_Integer(above_word);\n above_H = (*(WamWord **) &(b[-6]));\n Portray_Clause(pstm, term_word);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlCreateURLParserCtxt.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlCreateURLParserCtxt", "sloc": "22", "c_code": "xmlParserCtxtPtr\nxmlCreateURLParserCtxt(const char *filename, int options)\n{\n xmlParserCtxtPtr ctxt;\n xmlParserInputPtr input;\n ctxt = xmlNewParserCtxt();\n if (ctxt == ((void *)0))\n return(((void *)0));\n xmlCtxtUseOptions(ctxt, options);\n ctxt->linenumbers = 1;\n input = xmlLoadResource(ctxt, filename, ((void *)0), XML_RESOURCE_MAIN_DOCUMENT);\n if (input == ((void *)0)) {\n xmlFreeParserCtxt(ctxt);\n return(((void *)0));\n }\n if (inputPush(ctxt, input) < 0) {\n xmlFreeInputStream(input);\n xmlFreeParserCtxt(ctxt);\n return(((void *)0));\n }\n return(ctxt);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tema_prep#ti_tema_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tema.c", "function": "ti_tema_start", "sloc": "4", "c_code": "int ti_tema_start(double const *options) {\n const int period = (int)options[0];\n return (period-1) * 3;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#type_inl_c_prep#Pl_Blt_Compound.c", "codebase": "gprolog-1.5.0", "c_file": "type_inl_c.c", "function": "Pl_Blt_Compound", "sloc": "5", "c_code": "Bool\nPl_Blt_Compound(WamWord x)\n{\n WamWord word, tag_mask; do { WamWord deref_last_word; word = x; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0); return (tag_mask == (PlULong)0x2 || tag_mask == (PlULong)0x1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "dap-3.10#prob_prep#varnorm.c", "codebase": "dap-3.10", "c_file": "prob.c", "function": "varnorm", "sloc": "12", "c_code": "double varnorm()\n{\n double u1, u2, v1, v2, w;\n do {\n u1 = 2.0 * ((double) random()) / randmax - 1.0;\n v1 = u1 * u1;\n u2 = 2.0 * ((double) random()) / randmax - 1.0;\n v2 = u2 * u2;\n } while ((w = v1 + v2) > 1.0);\n w = sqrt(-2.0 * log(w) / w);\n return u1 * w;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#encoding_prep#PrepareEncodedChar.c", "codebase": "screen-4.9.0", "c_file": "encoding.c", "function": "PrepareEncodedChar", "sloc": "50", "c_code": "int\nPrepareEncodedChar(c)\nint c;\n{\n int encoding;\n int t = 0;\n int f;\n encoding = display->d_encoding;\n f = display->d_rend.font;\n t = display->d_mbcs;\n if (encoding == 2)\n {\n if (f == 'I')\n return c | 0x80;\n else if (f == ('B' & 037))\n {\n t += (c & 1) ? ((t <= 0x5f) ? 0x1f : 0x20) : 0x7e;\n c = (c - 0x21) / 2 + ((c < 0x5f) ? 0x81 : 0xc1);\n display->d_mbcs = t;\n }\n return c;\n }\n if (encoding == 1)\n {\n if (f == 'I')\n {\n do { if (--display->d_obuffree <= 0) Resize_obuf(); *display->d_obufp++ = (0x8e); } while (0);\n return c | 0x80;\n }\n if (f == ('B' & 037))\n {\n display->d_mbcs = t | 0x80;\n return c | 0x80;\n }\n if (f == ('D' & 037))\n {\n do { if (--display->d_obuffree <= 0) Resize_obuf(); *display->d_obufp++ = (0x8f); } while (0);\n display->d_mbcs = t | 0x80;\n return c | 0x80;\n }\n }\n if ((encoding == 3 && f == 3) || (encoding == 4 && f == 1))\n {\n display->d_mbcs = t | 0x80;\n return c | 0x80;\n }\n if ((encoding == 5 && f == 030) || (encoding == 20 && f == 031))\n return c | 0x80;\n return c;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 11, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 8, "break_continue_statement": 0}}, {"id": "json.h#allow_unquoted_keys_prep#json_write_pretty_get_array_size.c", "codebase": "json.h", "c_file": "allow_unquoted_keys.c", "function": "json_write_pretty_get_array_size", "sloc": "22", "c_code": "int json_write_pretty_get_array_size(const struct json_array_s *array,\n size_t depth, size_t indent_size,\n size_t newline_size, size_t *size) {\n struct json_array_element_s *element;\n *size += 1;\n if (0 < array->length) {\n *size += newline_size;\n *size += array->length - 1;\n for (element = array->start; 0 != element;\n element = element->next) {\n *size += (depth + 1) * indent_size;\n if (json_write_pretty_get_value_size(element->value, depth + 1,\n indent_size, newline_size, size)) {\n return 1;\n }\n *size += newline_size;\n }\n *size += depth * indent_size;\n }\n *size += 1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#benchmark_prep#posc_option_setter.c", "codebase": "tulipindicators-0.9.1", "c_file": "benchmark.c", "function": "posc_option_setter", "sloc": "5", "c_code": "void posc_option_setter(double period, double *options, int ti) {\n (void)ti;\n options[0] = period;\n options[1] = 3;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_json5_prep#json_write_pretty_array.c", "codebase": "json.h", "c_file": "allow_json5.c", "function": "json_write_pretty_array", "sloc": "41", "c_code": "char *json_write_pretty_array(const struct json_array_s *array, size_t depth,\n const char *indent, const char *newline,\n char *data) {\n size_t k, m;\n struct json_array_element_s *element;\n *data++ = '[';\n if (0 < array->length) {\n for (k = 0; '\\0' != newline[k]; k++) {\n *data++ = newline[k];\n }\n for (element = array->start; 0 != element;\n element = element->next) {\n if (element != array->start) {\n *data++ = ',';\n for (k = 0; '\\0' != newline[k]; k++) {\n *data++ = newline[k];\n }\n }\n for (k = 0; k < depth + 1; k++) {\n for (m = 0; '\\0' != indent[m]; m++) {\n *data++ = indent[m];\n }\n }\n data = json_write_pretty_value(element->value, depth + 1, indent, newline,\n data);\n if (0 == data) {\n return 0;\n }\n }\n for (k = 0; '\\0' != newline[k]; k++) {\n *data++ = newline[k];\n }\n for (k = 0; k < depth; k++) {\n for (m = 0; '\\0' != indent[m]; m++) {\n *data++ = indent[m];\n }\n }\n }\n *data++ = ']';\n return data;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 8, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_PRINT_SUM_GIVEN_NTH_TERM_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "PROGRAM_PRINT_SUM_GIVEN_NTH_TERM_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SEARCH_INSERT_AND_DELETE_IN_A_SORTED_ARRAY_1_prep#main.c", "codebase": "transcoder-set", "c_file": "SEARCH_INSERT_AND_DELETE_IN_A_SORTED_ARRAY_1.c", "function": "main", "sloc": "27", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {69};\nint param0_1[] = {-34,-38,-72,90,-84,-40,-40,-52,-12,80,-4,-58};\nint param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1};\nint param0_3[] = {96,34,11,1,36,79,64,75,75,96,32,18,25,79,63,80,90,75,44,71,48,1,62,53,17,98};\nint param0_4[] = {-98,-92,-92,-84,-82,-80,-80,-74,-70,-60,-48,-42,-36,-34,-34,-34,-30,-28,-16,-6,-2,-2,2,12,14,20,24,40,46,50,60,66,70,72,78,82,88,92,94,94,96};\nint param0_5[] = {1,0,1,1,0,0,1,0,0,0,1,1,0};\nint param0_6[] = {10,12,12,19,20,21,24,27,37,47,50,54,55,58,61,63,63,68,73,75,87,90,90,92,92};\nint param0_7[] = {-74,62,74,92,-38,-28,-26,4,88,-68,-76,-20,-4,12,72,6,42,36,88,-96,-80,90,80,-26,-36,-72,-62,38,-20,40,-10,-22,-20,38,82,-84,8,-60,86,-26,44,-72,-70,-16,-22,18,-16,76,-50};\nint param0_8[] = {1,1,1,1,1};\nint param0_9[] = {64,80,47,58,41,3,85,96,51,4,22,89,67,54,88,15,83,31,19,28,40,67,37,13,63,38,27,14,7,68};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {0,6,13,21,30,12,12,37,3,23};\n int param2[] = {0,6,19,20,32,9,13,26,4,24};\n int param3[] = {0,9,11,13,28,10,21,42,2,25};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "transcoder-set#NUMBER_SUBSEQUENCES_FORM_AI_BJ_CK_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "NUMBER_SUBSEQUENCES_FORM_AI_BJ_CK.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#screen_prep#clear_eol.c", "codebase": "less-633", "c_file": "screen.c", "function": "clear_eol", "sloc": "4", "c_code": "void clear_eol(void)\n{\n ltputs(sc_eol_clear, 1, putchr);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#debugger_c_prep#Pl_Remove_One_Choice_Point_1.c", "codebase": "gprolog-1.5.0", "c_file": "debugger_c.c", "function": "Pl_Remove_One_Choice_Point_1", "sloc": "9", "c_code": "void\nPl_Remove_One_Choice_Point_1(WamWord b_word)\n{\n WamWord word, tag_mask;\n WamWord *b;\n do { WamWord deref_last_word; word = b_word; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0);\n b = ((((WamWordP *) pl_reg_bank)[256 +7]) + ((PlLong) ((word) << 0) >> 3));\n (B = ((*(WamWord **) &(b[-5]))), (((WamWordP *) pl_reg_bank)[256 +0]) = (*(WamWord **) &(B[-6])));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsArabic.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsArabic", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsArabic(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsArabic\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsArabic\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsArabic(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY_1.c", "function": "f_gold", "sloc": "12", "c_code": "int f_gold ( int arr [ ], int n ) {\n int result = 0;\n sort ( arr, arr + n );\n for ( int i = 0;\n i < n - 1;\n i ++ ) {\n if ( arr [ i ] != arr [ i + 1 ] ) result += abs ( arr [ i ] );\n else i ++;\n }\n if ( arr [ n - 2 ] != arr [ n - 1 ] ) result += abs ( arr [ n - 1 ] );\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY_1_prep#min.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_location_information_prep#json_write_pretty_object.c", "codebase": "json.h", "c_file": "allow_location_information.c", "function": "json_write_pretty_object", "sloc": "48", "c_code": "char *json_write_pretty_object(const struct json_object_s *object, size_t depth,\n const char *indent, const char *newline,\n char *data) {\n size_t k, m;\n struct json_object_element_s *element;\n *data++ = '{';\n if (0 < object->length) {\n for (k = 0; '\\0' != newline[k]; k++) {\n *data++ = newline[k];\n }\n for (element = object->start; 0 != element;\n element = element->next) {\n if (element != object->start) {\n *data++ = ',';\n for (k = 0; '\\0' != newline[k]; k++) {\n *data++ = newline[k];\n }\n }\n for (k = 0; k < depth + 1; k++) {\n for (m = 0; '\\0' != indent[m]; m++) {\n *data++ = indent[m];\n }\n }\n data = json_write_string(element->name, data);\n if (0 == data) {\n return 0;\n }\n *data++ = ' ';\n *data++ = ':';\n *data++ = ' ';\n data = json_write_pretty_value(element->value, depth + 1, indent, newline,\n data);\n if (0 == data) {\n return 0;\n }\n }\n for (k = 0; '\\0' != newline[k]; k++) {\n *data++ = newline[k];\n }\n for (k = 0; k < depth; k++) {\n for (m = 0; '\\0' != indent[m]; m++) {\n *data++ = indent[m];\n }\n }\n }\n *data++ = '}';\n return data;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 8, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_set_blob.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_set_blob", "sloc": "14", "c_code": "BOOL binn_set_blob(binn *item, void *ptr, int size, binn_mem_free pfree) {\n if (item == ((void *)0) || ptr == ((void *)0)) return 0;\n if (pfree == ((binn_mem_free)-1)) {\n item->ptr = binn_memdup(ptr, size);\n if (item->ptr == ((void *)0)) return 0;\n item->freefn = free_fn;\n } else {\n item->ptr = ptr;\n item->freefn = pfree;\n }\n item->type = 0xC0;\n item->size = size;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tinycc#tccgen_prep#inc.c", "codebase": "tinycc", "c_file": "tccgen.c", "function": "inc", "sloc": "15", "c_code": "void inc(int post, int c)\n{\n test_lvalue();\n vdup();\n if (post) {\n gv_dup();\n vrotb(3);\n vrotb(3);\n }\n vpushi(c - 0xa3);\n gen_op('+');\n vstore();\n if (post)\n vpop();\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "less-633#mark_prep#init_mark.c", "codebase": "less-633", "c_file": "mark.c", "function": "init_mark", "sloc": "15", "c_code": "void init_mark(void)\n{\n int i;\n for (i = 0; i < ((2*26)+2); i++)\n {\n char letter;\n switch (i) {\n case (((2*26)+2)-2): letter = '#'; break;\n case (((2*26)+2)-1): letter = '\\''; break;\n default: letter = (i < 26) ? 'a'+i : 'A'+i-26; break;\n }\n marks[i].m_letter = letter;\n cmark(&marks[i], ((void*)((void *)0)), ((POSITION)(-1)), -1);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 3}}, {"id": "transcoder-set#LCS_FORMED_CONSECUTIVE_SEGMENTS_LEAST_LENGTH_K_prep#sort.c", "codebase": "transcoder-set", "c_file": "LCS_FORMED_CONSECUTIVE_SEGMENTS_LEAST_LENGTH_K.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#mode-tree_prep#mode_tree_down.c", "codebase": "tmux", "c_file": "mode-tree.c", "function": "mode_tree_down", "sloc": "14", "c_code": "void\nmode_tree_down(struct mode_tree_data *mtd, int wrap)\n{\n if (mtd->current == mtd->line_size - 1) {\n if (wrap) {\n mtd->current = 0;\n mtd->offset = 0;\n }\n } else {\n mtd->current++;\n if (mtd->current > mtd->offset + mtd->height - 1)\n mtd->offset++;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#debug_prep#do_stepi.c", "codebase": "gawk-5.2.2", "c_file": "debug.c", "function": "do_stepi", "sloc": "9", "c_code": "int\ndo_stepi(CMDARG *arg, int cmd)\n{\n int ret;\n ret = next_step(arg, cmd);\n if (ret)\n stop.check_func = check_stepi;\n return ret;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#cnd-copy_prep#_nettle_cnd_copy.c", "codebase": "nettle-3.9.1", "c_file": "cnd-copy.c", "function": "_nettle_cnd_copy", "sloc": "10", "c_code": "void\n_nettle_cnd_copy (int cnd, mp_limb_t *rp, const mp_limb_t *ap, mp_size_t n)\n{\n mp_limb_t mask, keep;\n mp_size_t i;\n mask = -(mp_limb_t) (cnd !=0);\n keep = ~mask;\n for (i = 0; i < n; i++)\n rp[i] = (rp[i] & keep) + (ap[i] & mask);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json-c#linkhash_prep#lh_table_lookup_entry.c", "codebase": "json-c", "c_file": "linkhash.c", "function": "lh_table_lookup_entry", "sloc": "4", "c_code": "struct lh_entry *lh_table_lookup_entry(struct lh_table *t, const void *k)\n{\n return lh_table_lookup_entry_w_hash(t, k, lh_get_hash(t, k));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_PAIRWISE_PRODUCTS_2_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "SUM_PAIRWISE_PRODUCTS_2.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc(const void *a, const void *b) { return (*(int *)a - *(int *)b); }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_from_prep#osip_generic_param_get_name.c", "codebase": "libosip2-5.3.1", "c_file": "osip_from.c", "function": "osip_generic_param_get_name", "sloc": "5", "c_code": "char *osip_generic_param_get_name(const osip_generic_param_t *fparam) {\n if (fparam == ((void *)0))\n return ((void *)0);\n return fparam->gname;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#tree_prep#xmlGetIntSubset.c", "codebase": "libxml2", "c_file": "tree.c", "function": "xmlGetIntSubset", "sloc": "13", "c_code": "xmlDtdPtr\nxmlGetIntSubset(const xmlDoc *doc) {\n xmlNodePtr cur;\n if (doc == ((void *)0))\n return(((void *)0));\n cur = doc->children;\n while (cur != ((void *)0)) {\n if (cur->type == XML_DTD_NODE)\n return((xmlDtdPtr) cur);\n cur = cur->next;\n }\n return((xmlDtdPtr) doc->intSubset);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "gzip-1.12#unlzh_prep#unlzh.c", "codebase": "gzip-1.12", "c_file": "unlzh.c", "function": "unlzh", "sloc": "15", "c_code": "int unlzh(in, out)\n int in;\n int out;\n{\n unsigned n;\n ifd = in;\n ofd = out;\n decode_start();\n while (!done) {\n n = decode((unsigned) ((unsigned) 1 << 13), window);\n if (n > 0)\n write_buf (out, window, n);\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW_1_prep#main.c", "codebase": "transcoder-set", "c_file": "COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW_1.c", "function": "main", "sloc": "15", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {9,68,51,31,14,73,51,75,98,83};\n int param1[] = {81,79,2,49,10,9,13,67,51,74};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "wget-1.21.4#http_prep#http_atotm.c", "codebase": "wget-1.21.4", "c_file": "http.c", "function": "http_atotm", "sloc": "38", "c_code": "time_t\nhttp_atotm (const char *time_string)\n{\n static const char *time_formats[] = {\n \"%a, %d %b %Y %T\",\n \"%A, %d-%b-%y %T\",\n \"%a %b %d %T %Y\",\n \"%a, %d-%b-%Y %T\"\n };\n const char *oldlocale;\n char savedlocale[256];\n size_t i;\n time_t ret = (time_t) -1;\n oldlocale = setlocale (2, ((void *)0));\n if (oldlocale)\n {\n size_t l = strlen (oldlocale) + 1;\n if (l >= sizeof savedlocale)\n savedlocale[0] = '\\0';\n else\n memcpy (savedlocale, oldlocale, l);\n }\n else savedlocale[0] = '\\0';\n setlocale (2, \"C\");\n for (i = 0; i < (sizeof (time_formats) / sizeof ((time_formats)[0])); i++)\n {\n struct tm t;\n memset (&(t), '\\0', sizeof (t));\n if (check_end (strptime (time_string, time_formats[i], &t)))\n {\n ret = timegm (&t);\n break;\n }\n }\n if (savedlocale[0])\n setlocale (2, savedlocale);\n return ret;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 2, "if_statement": 4, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "heman#quaternion_prep#kmQuaternionExp.c", "codebase": "heman", "c_file": "quaternion.c", "function": "kmQuaternionExp", "sloc": "5", "c_code": "kmQuaternion* kmQuaternionExp(kmQuaternion* pOut, const kmQuaternion* pIn)\n{\n ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail (\"0\", \"/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/heman/kazmath/quaternion.c\", 68, __extension__ __PRETTY_FUNCTION__); }));\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#strlcpy_prep#strlcpy.c", "codebase": "tmux", "c_file": "strlcpy.c", "function": "strlcpy", "sloc": "20", "c_code": "size_t\nstrlcpy(char *dst, const char *src, size_t siz)\n{\n char *d = dst;\n const char *s = src;\n size_t n = siz;\n if (n != 0 && --n != 0) {\n do {\n if ((*d++ = *s++) == 0)\n break;\n } while (--n != 0);\n }\n if (n == 0) {\n if (siz != 0)\n *d = '\\0';\n while (*s++)\n ;\n }\n return(s - src - 1);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "wget-1.21.4#utils_prep#unique_create.c", "codebase": "wget-1.21.4", "c_file": "utils.c", "function": "unique_create", "sloc": "24", "c_code": "FILE *\nunique_create (const char *name, _Bool binary, char **opened_name)\n{\n char *uname = unique_name (name);\n FILE *fp;\n while ((fp = fopen_excl (uname, binary)) == ((void *)0) && (*__errno_location ()) == 17)\n {\n do { free ((void *) (uname)); uname = ((void *)0); } while (0);\n uname = unique_name (name);\n }\n if (opened_name)\n {\n if (fp)\n *opened_name = uname;\n else\n {\n *opened_name = ((void *)0);\n do { free ((void *) (uname)); uname = ((void *)0); } while (0);\n }\n }\n else\n do { free ((void *) (uname)); uname = ((void *)0); } while (0);\n return fp;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 3, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 4, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_CALCULATE_VOLUME_ELLIPSOID_prep#len.c", "codebase": "transcoder-set", "c_file": "PROGRAM_CALCULATE_VOLUME_ELLIPSOID.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "make-4.4.1#shuffle_prep#shuffle_deps_recursive.c", "codebase": "make-4.4.1", "c_file": "shuffle.c", "function": "shuffle_deps_recursive", "sloc": "14", "c_code": "void\nshuffle_deps_recursive (struct dep *deps)\n{\n struct dep *dep;\n if (config.mode == sm_none)\n return;\n if (not_parallel)\n return;\n if (config.mode == sm_random)\n make_seed (config.seed);\n shuffle_deps (deps);\n for (dep = deps; dep; dep = dep->next)\n shuffle_file_deps_recursive (dep->file);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "heman#ops_prep#heman_ops_normalize_f32.c", "codebase": "heman", "c_file": "ops.c", "function": "heman_ops_normalize_f32", "sloc": "15", "c_code": "heman_image* heman_ops_normalize_f32(\n heman_image* source, float minv, float maxv)\n{\n heman_image* result =\n heman_image_create(source->width, source->height, source->nbands);\n float* src = source->data;\n float* dst = result->data;\n float scale = 1.0f / (maxv - minv);\n int size = source->height * source->width * source->nbands;\n for (int i = 0; i < size; ++i) {\n float v = (*src++ - minv) * scale;\n *dst++ = (0 > (1 > v ? v : 1) ? 0 : (1 > v ? v : 1));\n }\n return result;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_lib_prep#__pth_thread_cleanup.c", "codebase": "pth-2.0.7", "c_file": "pth_lib.c", "function": "__pth_thread_cleanup", "sloc": "9", "c_code": "void __pth_thread_cleanup(pth_t thread)\n{\n if (thread->cleanups != ((void *)0))\n __pth_cleanup_popall(thread, (!(0)));\n if (thread->data_value != ((void *)0))\n __pth_key_destroydata(thread);\n __pth_mutex_releaseall(thread);\n return;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#lessecho_prep#main.c", "codebase": "less-633", "c_file": "lessecho.c", "function": "main", "sloc": "107", "c_code": "int main(int argc, char *argv[])\n{\n char *arg;\n char *s;\n int no_more_options;\n no_more_options = 0;\n while (--argc > 0)\n {\n arg = *++argv;\n if (*arg != '-' || no_more_options)\n break;\n switch (*++arg)\n {\n case 'a':\n quote_all = 1;\n break;\n case 'c':\n closequote = *++arg;\n break;\n case 'd':\n closequote = lstrtol(++arg, &s, 0);\n if (s == arg)\n pr_error(\"Missing number after -d\");\n break;\n case 'e':\n if (strcmp(++arg, \"-\") == 0)\n meta_escape = \"\";\n else\n meta_escape = arg;\n break;\n case 'f':\n meta_escape_buf[0] = lstrtol(++arg, &s, 0);\n meta_escape_buf[1] = '\\0';\n meta_escape = meta_escape_buf;\n if (s == arg)\n pr_error(\"Missing number after -f\");\n break;\n case 'o':\n openquote = *++arg;\n break;\n case 'p':\n openquote = lstrtol(++arg, &s, 0);\n if (s == arg)\n pr_error(\"Missing number after -p\");\n break;\n case 'm':\n add_metachar(*++arg);\n break;\n case 'n':\n add_metachar(lstrtol(++arg, &s, 0));\n if (s == arg)\n pr_error(\"Missing number after -n\");\n break;\n case '?':\n pr_usage();\n return (0);\n case '-':\n if (*++arg == '\\0')\n {\n no_more_options = 1;\n break;\n }\n if (strcmp(arg, \"version\") == 0)\n {\n pr_version();\n return (0);\n }\n if (strcmp(arg, \"help\") == 0)\n {\n pr_usage();\n return (0);\n }\n pr_error(\"Invalid option after --\");\n default:\n pr_error(\"Invalid option letter\");\n }\n }\n while (argc-- > 0)\n {\n int has_meta = 0;\n arg = *argv++;\n for (s = arg; *s != '\\0'; s++)\n {\n if (is_metachar(*s))\n {\n has_meta = 1;\n break;\n }\n }\n if (quote_all || (has_meta && strlen(meta_escape) == 0))\n printf(\"%c%s%c\", openquote, arg, closequote);\n else\n {\n for (s = arg; *s != '\\0'; s++)\n {\n if (is_metachar(*s))\n printf(\"%s\", meta_escape);\n printf(\"%c\", *s);\n }\n }\n if (argc > 0)\n printf(\" \");\n else\n printf(\"\\n\");\n }\n return (0);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 13, "for_loop": 2, "while_loop": 2, "switch_statement": 1, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 12}}, {"id": "json.h#allow_simplified_json_prep#json_extract_get_object_size.c", "codebase": "json.h", "c_file": "allow_simplified_json.c", "function": "json_extract_get_object_size", "sloc": "21", "c_code": "struct json_extract_result_s\njson_extract_get_object_size(const struct json_object_s *const object) {\n struct json_extract_result_s result;\n size_t i;\n const struct json_object_element_s *element = object->start;\n result.dom_size = sizeof(struct json_object_s) +\n (sizeof(struct json_object_element_s) * object->length);\n result.data_size = 0;\n for (i = 0; i < object->length; i++) {\n const struct json_extract_result_s string_result =\n json_extract_get_string_size(element->name);\n const struct json_extract_result_s value_result =\n json_extract_get_value_size(element->value);\n result.dom_size += string_result.dom_size;\n result.data_size += string_result.data_size;\n result.dom_size += value_result.dom_size;\n result.data_size += value_result.data_size;\n element = element->next;\n }\n return result;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#SAX2_prep#xmlSAX2Reference.c", "codebase": "libxml2", "c_file": "SAX2.c", "function": "xmlSAX2Reference", "sloc": "13", "c_code": "void\nxmlSAX2Reference(void *ctx, const xmlChar *name)\n{\n xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;\n xmlNodePtr ret;\n if (ctx == ((void *)0)) return;\n ret = xmlNewReference(ctxt->myDoc, name);\n if (ret == ((void *)0)) {\n xmlSAX2ErrMemory(ctxt);\n return;\n }\n xmlSAX2AppendChild(ctxt, ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlParseTextDecl.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlParseTextDecl", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlParseTextDecl(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlParserCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n if (libxml_deprecationWarning(\"xmlParseTextDecl\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlParseTextDecl\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj));\n xmlParseTextDecl(ctxt);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#stderr_prep#ti_stderr_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "stderr.c", "function": "ti_stderr_start", "sloc": "3", "c_code": "int ti_stderr_start(double const *options) {\n return (int)options[0]-1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlwriter_prep#xmlTextWriterWriteAttribute.c", "codebase": "libxml2", "c_file": "xmlwriter.c", "function": "xmlTextWriterWriteAttribute", "sloc": "21", "c_code": "int\nxmlTextWriterWriteAttribute(xmlTextWriterPtr writer, const xmlChar * name,\n const xmlChar * content)\n{\n int count;\n int sum;\n sum = 0;\n count = xmlTextWriterStartAttribute(writer, name);\n if (count < 0)\n return -1;\n sum += count;\n count = xmlTextWriterWriteString(writer, content);\n if (count < 0)\n return -1;\n sum += count;\n count = xmlTextWriterEndAttribute(writer);\n if (count < 0)\n return -1;\n sum += count;\n return sum;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "cflow-1.7#c_prep#yy_delete_buffer.c", "codebase": "cflow-1.7", "c_file": "c.c", "function": "yy_delete_buffer", "sloc": "10", "c_code": "void yy_delete_buffer (YY_BUFFER_STATE b )\n{\n if ( ! b )\n return;\n if ( b == ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)) )\n (yy_buffer_stack)[(yy_buffer_stack_top)] = (YY_BUFFER_STATE) 0;\n if ( b->yy_is_our_buffer )\n yyfree((void *) b->yy_ch_buf );\n yyfree((void *) b );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#paxerror_prep#savedir_warn.c", "codebase": "tar-1.34", "c_file": "paxerror.c", "function": "savedir_warn", "sloc": "5", "c_code": "void\nsavedir_warn (char const *name)\n{\n call_arg_warn (\"savedir\", name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tmux#proc_prep#proc_exit.c", "codebase": "tmux", "c_file": "proc.c", "function": "proc_exit", "sloc": "5", "c_code": "void\nproc_exit(struct tmuxproc *tp)\n{\n tp->exit = 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "brotli-1.0.9#huffman_prep#BrotliBuildSimpleHuffmanTable.c", "codebase": "brotli-1.0.9", "c_file": "huffman.c", "function": "BrotliBuildSimpleHuffmanTable", "sloc": "75", "c_code": "uint32_t BrotliBuildSimpleHuffmanTable(HuffmanCode* table,\n int root_bits,\n uint16_t* val,\n uint32_t num_symbols) {\n uint32_t table_size = 1;\n const uint32_t goal_size = 1U << root_bits;\n switch (num_symbols) {\n case 0:\n table[0] = ConstructHuffmanCode(0, val[0]);\n break;\n case 1:\n if (val[1] > val[0]) {\n table[0] = ConstructHuffmanCode(1, val[0]);\n table[1] = ConstructHuffmanCode(1, val[1]);\n } else {\n table[0] = ConstructHuffmanCode(1, val[1]);\n table[1] = ConstructHuffmanCode(1, val[0]);\n }\n table_size = 2;\n break;\n case 2:\n table[0] = ConstructHuffmanCode(1, val[0]);\n table[2] = ConstructHuffmanCode(1, val[0]);\n if (val[2] > val[1]) {\n table[1] = ConstructHuffmanCode(2, val[1]);\n table[3] = ConstructHuffmanCode(2, val[2]);\n } else {\n table[1] = ConstructHuffmanCode(2, val[2]);\n table[3] = ConstructHuffmanCode(2, val[1]);\n }\n table_size = 4;\n break;\n case 3: {\n int i, k;\n for (i = 0; i < 3; ++i) {\n for (k = i + 1; k < 4; ++k) {\n if (val[k] < val[i]) {\n uint16_t t = val[k];\n val[k] = val[i];\n val[i] = t;\n }\n }\n }\n table[0] = ConstructHuffmanCode(2, val[0]);\n table[2] = ConstructHuffmanCode(2, val[1]);\n table[1] = ConstructHuffmanCode(2, val[2]);\n table[3] = ConstructHuffmanCode(2, val[3]);\n table_size = 4;\n break;\n }\n case 4: {\n if (val[3] < val[2]) {\n uint16_t t = val[3];\n val[3] = val[2];\n val[2] = t;\n }\n table[0] = ConstructHuffmanCode(1, val[0]);\n table[1] = ConstructHuffmanCode(2, val[1]);\n table[2] = ConstructHuffmanCode(1, val[0]);\n table[3] = ConstructHuffmanCode(3, val[2]);\n table[4] = ConstructHuffmanCode(1, val[0]);\n table[5] = ConstructHuffmanCode(2, val[1]);\n table[6] = ConstructHuffmanCode(1, val[0]);\n table[7] = ConstructHuffmanCode(3, val[3]);\n table_size = 8;\n break;\n }\n }\n while (table_size != goal_size) {\n memcpy(&table[table_size], &table[0],\n (size_t)table_size * sizeof(table[0]));\n table_size <<= 1;\n }\n return goal_size;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 4, "for_loop": 2, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 5}}, {"id": "transcoder-set#CONVERT_STRICTLY_INCREASING_ARRAY_MINIMUM_CHANGES_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "CONVERT_STRICTLY_INCREASING_ARRAY_MINIMUM_CHANGES.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_SQUARES_BINOMIAL_COEFFICIENTS_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "SUM_SQUARES_BINOMIAL_COEFFICIENTS.c", "function": "f_gold", "sloc": "19", "c_code": "int f_gold ( int n ) {\n int C [ n + 1 ] [ n + 1 ];\n int i, j;\n for ( i = 0;\n i <= n;\n i ++ ) {\n for ( j = 0;\n j <= min ( i, n );\n j ++ ) {\n if ( j == 0 || j == i ) C [ i ] [ j ] = 1;\n else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ];\n }\n }\n int sum = 0;\n for ( int i = 0;\n i <= n;\n i ++ ) sum += ( C [ n ] [ i ] * C [ n ] [ i ] );\n return sum;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#url_prep#url_set_file.c", "codebase": "wget-1.21.4", "c_file": "url.c", "function": "url_set_file", "sloc": "7", "c_code": "void\nurl_set_file (struct url *url, const char *newfile)\n{\n do { free ((void *) (url->file)); url->file = ((void *)0); } while (0);\n url->file = xstrdup (newfile);\n sync_path (url);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_FACTORIAL_NUMBERS_IN_A_GIVEN_RANGE_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "COUNT_FACTORIAL_NUMBERS_IN_A_GIVEN_RANGE.c", "function": "f_gold", "sloc": "14", "c_code": "int f_gold ( int low, int high ) {\n int fact = 1, x = 1;\n while ( fact < low ) {\n fact = fact * x;\n x ++;\n }\n int res = 0;\n while ( fact <= high ) {\n res ++;\n fact = fact * x;\n x ++;\n }\n return res;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_high_prep#__pth_readv_faked.c", "codebase": "pth-2.0.7", "c_file": "pth_high.c", "function": "__pth_readv_faked", "sloc": "30", "c_code": "ssize_t __pth_readv_faked(int fd, const struct iovec *iov, int iovcnt)\n{\n char *buffer;\n size_t bytes, copy, rv;\n int i;\n bytes = 0;\n for (i = 0; i < iovcnt; i++) {\n if (iov[i].iov_len <= 0)\n return ((*__errno_location ()) = (22), ((ssize_t)(-1)));\n bytes += iov[i].iov_len;\n }\n if (bytes <= 0)\n return ((*__errno_location ()) = (22), ((ssize_t)(-1)));\n if ((buffer = (char *)malloc(bytes)) == ((void *)0))\n return (ssize_t)(-1);\n rv = read(fd, buffer, bytes);\n if (rv > 0) {\n bytes = rv;\n for (i = 0; i < iovcnt; i++) {\n copy = ((iov[i].iov_len) > (bytes) ? (bytes) : (iov[i].iov_len));\n memcpy(iov[i].iov_base, buffer, copy);\n buffer += copy;\n bytes -= copy;\n if (bytes <= 0)\n break;\n }\n }\n for ( __pth_errno_storage = (*__errno_location ()), __pth_errno_flag = (!(0)); __pth_errno_flag; (*__errno_location ()) = __pth_errno_storage, __pth_errno_flag = (0) ) { free(buffer); }\n return(rv);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 2, "memory_operation": 1, "if_statement": 5, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 1}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlSchemaParse.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlSchemaParse", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlSchemaParse(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlSchemaPtr c_retval;\n xmlSchemaParserCtxtPtr ctxt;\n PyObject *pyobj_ctxt;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlSchemaParse\", &pyobj_ctxt))\n return(((void *)0));\n ctxt = (xmlSchemaParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PySchemaParserCtxt_Object *)(pyobj_ctxt))->obj));\n c_retval = xmlSchemaParse(ctxt);\n py_retval = libxml_xmlSchemaPtrWrap((xmlSchemaPtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#maketime_prep#adjzone.c", "codebase": "rcs-5.10.1", "c_file": "maketime.c", "function": "adjzone", "sloc": "47", "c_code": "void\nadjzone (register struct tm *t, long seconds)\n{\n int leap_second = t->tm_sec == 60;\n long sec = seconds + (t->tm_sec - leap_second);\n if (sec < 0)\n {\n if ((t->tm_min -= (59 - sec) / 60) < 0)\n {\n if ((t->tm_hour -= (59 - t->tm_min) / 60) < 0)\n {\n t->tm_hour += 24;\n if ((0 <= (t->tm_wday)) && --t->tm_wday < 0)\n t->tm_wday = 6;\n if (--t->tm_mday <= 0)\n {\n if (--t->tm_mon < 0)\n {\n --t->tm_year;\n t->tm_mon = 11;\n }\n t->tm_mday = month_days (t);\n }\n }\n t->tm_min += 24 * 60;\n }\n sec += 24L * 60 * 60;\n }\n else if (60 <= (t->tm_min += sec / 60))\n if (24 <= (t->tm_hour += t->tm_min / 60))\n {\n t->tm_hour -= 24;\n if ((0 <= (t->tm_wday)) && ++t->tm_wday == 7)\n t->tm_wday = 0;\n if (month_days (t) < ++t->tm_mday)\n {\n if (11 < ++t->tm_mon)\n {\n ++t->tm_year;\n t->tm_mon = 0;\n }\n t->tm_mday = 1;\n }\n }\n t->tm_min %= 60;\n t->tm_sec = (int) (sec % 60) + leap_second;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 11, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xpointer_prep#xmlXPtrNewContext.c", "codebase": "libxml2", "c_file": "xpointer.c", "function": "xmlXPtrNewContext", "sloc": "10", "c_code": "xmlXPathContextPtr\nxmlXPtrNewContext(xmlDocPtr doc, xmlNodePtr here, xmlNodePtr origin) {\n xmlXPathContextPtr ret;\n (void) here;\n (void) origin;\n ret = xmlXPathNewContext(doc);\n if (ret == ((void *)0))\n return(ret);\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Fast_Neg.c", "codebase": "gprolog-1.5.0", "c_file": "arith_inl_c.c", "function": "Pl_Fct_Fast_Neg", "sloc": "6", "c_code": "WamWord\nPl_Fct_Fast_Neg(WamWord x)\n{\n PlLong vx = ((PlLong) ((x) << 0) >> 3);\n return (((PlULong) (-vx) << 3) | (PlULong)0x7);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#suffix_prep#strip_compression_suffix.c", "codebase": "tar-1.34", "c_file": "suffix.c", "function": "strip_compression_suffix", "sloc": "19", "c_code": "char *\nstrip_compression_suffix (const char *name)\n{\n char *s = ((void *)0);\n size_t len;\n struct compression_suffix const *p = find_compression_suffix (name, &len);\n if (p)\n {\n if (len > 4 && strncmp (name + len - 4, \".tar\", 4) == 0\n && p->suffix[0] != 't')\n len -= 4;\n if (len == 0)\n return ((void *)0);\n s = xmalloc (len + 1);\n memcpy (s, name, len);\n s[len] = 0;\n }\n return s;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "cflow-1.7#wordsplit_prep#wordsplit_c_quote_char.c", "codebase": "cflow-1.7", "c_file": "wordsplit.c", "function": "wordsplit_c_quote_char", "sloc": "5", "c_code": "int\nwordsplit_c_quote_char (int c)\n{\n return wsplt_quote_char (wordsplit_c_escape_tab, c);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD.c", "function": "f_gold", "sloc": "3", "c_code": "_Bool f_gold ( int n ) {\n return ( n % 2 == 0 );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_2_prep#min.c", "codebase": "transcoder-set", "c_file": "SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_2.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngget_prep#png_get_IHDR.c", "codebase": "optipng-0.7.8", "c_file": "pngget.c", "function": "png_get_IHDR", "sloc": "28", "c_code": "png_uint_32\npng_get_IHDR(png_const_structrp png_ptr, png_const_inforp info_ptr,\n png_uint_32 *width, png_uint_32 *height, int *bit_depth,\n int *color_type, int *interlace_type, int *compression_type,\n int *filter_type)\n{\n ((void)0);\n if (png_ptr == ((void *)0) || info_ptr == ((void *)0))\n return (0);\n if (width != ((void *)0))\n *width = info_ptr->width;\n if (height != ((void *)0))\n *height = info_ptr->height;\n if (bit_depth != ((void *)0))\n *bit_depth = info_ptr->bit_depth;\n if (color_type != ((void *)0))\n *color_type = info_ptr->color_type;\n if (compression_type != ((void *)0))\n *compression_type = info_ptr->compression_type;\n if (filter_type != ((void *)0))\n *filter_type = info_ptr->filter_type;\n if (interlace_type != ((void *)0))\n *interlace_type = info_ptr->interlace_type;\n png_check_IHDR(png_ptr, info_ptr->width, info_ptr->height,\n info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type,\n info_ptr->compression_type, info_ptr->filter_type);\n return (1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 9, "memory_management": 0, "memory_operation": 0, "if_statement": 8, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "pexec-1.0rc8#fifo_prep#fifo_available.c", "codebase": "pexec-1.0rc8", "c_file": "fifo.c", "function": "fifo_available", "sloc": "4", "c_code": "size_t fifo_available(fifo *f)\n{\n return(f->wrts);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pnmutil_prep#pnm_mem_size.c", "codebase": "optipng-0.7.8", "c_file": "pnmutil.c", "function": "pnm_mem_size", "sloc": "17", "c_code": "size_t pnm_mem_size(const pnm_struct *pnm_ptr,\n size_t sample_size, unsigned int num_rows)\n{\n unsigned int depth = pnm_ptr->depth;\n unsigned int width = pnm_ptr->width;\n if (sample_size == 0 || depth == 0 || width == 0)\n {\n (*__errno_location ()) = 22;\n return 0;\n }\n if (num_rows > (size_t)(-1) / sample_size / depth / width)\n {\n (*__errno_location ()) = 34;\n return 0;\n }\n return sample_size * depth * width * num_rows;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_SERIES_555555_N_TERMS_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "SUM_SERIES_555555_N_TERMS.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#dirCache_prep#growDirCache.c", "codebase": "mtools-4.0.43", "c_file": "dirCache.c", "function": "growDirCache", "sloc": "20", "c_code": "int growDirCache(dirCache_t *cache, unsigned int slot)\n{\n if((int) slot < 0) {\n fprintf(stderr, \"Bad slot %d\\n\", slot);\n exit(1);\n }\n if( cache->nr_entries <= slot) {\n unsigned int i;\n cache->entries = realloc(cache->entries,\n (slot+1) * 2 *\n sizeof(dirCacheEntry_t *));\n if(!cache->entries)\n return -1;\n for(i= cache->nr_entries; i < (slot+1) * 2; i++) {\n cache->entries[i] = 0;\n }\n cache->nr_entries = (slot+1) * 2;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_DERANGEMENTS_PERMUTATION_SUCH_THAT_NO_ELEMENT_APPEARS_IN_ITS_ORIGINAL_POSITION_1_prep#len.c", "codebase": "transcoder-set", "c_file": "COUNT_DERANGEMENTS_PERMUTATION_SUCH_THAT_NO_ELEMENT_APPEARS_IN_ITS_ORIGINAL_POSITION_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SMALLEST_OF_THREE_INTEGERS_WITHOUT_COMPARISON_OPERATORS_1_prep#min.c", "codebase": "transcoder-set", "c_file": "SMALLEST_OF_THREE_INTEGERS_WITHOUT_COMPARISON_OPERATORS_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_mime_version_prep#osip_message_get_mime_version.c", "codebase": "libosip2-5.3.1", "c_file": "osip_mime_version.c", "function": "osip_message_get_mime_version", "sloc": "3", "c_code": "osip_mime_version_t *osip_message_get_mime_version(const osip_message_t *sip) {\n return sip->mime_version;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#arith_inl_c_prep#Pl_Math_Fast_Load_Value.c", "codebase": "gprolog-1.5.0", "c_file": "arith_inl_c.c", "function": "Pl_Math_Fast_Load_Value", "sloc": "7", "c_code": "void\nPl_Math_Fast_Load_Value(WamWord start_word, WamWord *word_adr)\n{\n WamWord word, tag_mask;\n do { WamWord deref_last_word; word = start_word; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0);\n *word_adr = word;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "nettle-3.9.1#gcm-aes256_prep#nettle_gcm_aes256_decrypt.c", "codebase": "nettle-3.9.1", "c_file": "gcm-aes256.c", "function": "nettle_gcm_aes256_decrypt", "sloc": "6", "c_code": "void\nnettle_gcm_aes256_decrypt(struct gcm_aes256_ctx *ctx,\n size_t length, uint8_t *dst, const uint8_t *src)\n{\n (0 ? (nettle_aes256_encrypt)(&(ctx)->cipher, ~(size_t) 0, (uint8_t *) 0, (const uint8_t *) 0) : nettle_gcm_decrypt(&(ctx)->gcm, &(ctx)->key, &(ctx)->cipher, (nettle_cipher_func *) (nettle_aes256_encrypt), (length), (dst), (src)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_prep#osip_set_kill_transaction_callback.c", "codebase": "libosip2-5.3.1", "c_file": "osip.c", "function": "osip_set_kill_transaction_callback", "sloc": "8", "c_code": "int osip_set_kill_transaction_callback(osip_t *config, int type, osip_kill_transaction_cb_t cb) {\n if (type >= OSIP_KILL_CALLBACK_COUNT) {\n osip_trace(\"osip.c\", 1701, TRACE_LEVEL2, ((void *)0), \"invalid callback type %d\\n\", type);\n return -2;\n }\n config->kill_callbacks[type] = cb;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#md_prep#ti_md_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "md.c", "function": "ti_md_start", "sloc": "3", "c_code": "int ti_md_start(double const *options) {\n return (int)options[0]-1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_PAIR_WITH_GREATEST_PRODUCT_IN_ARRAY_prep#sort.c", "codebase": "transcoder-set", "c_file": "FIND_PAIR_WITH_GREATEST_PRODUCT_IN_ARRAY.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "buffer-0.4.0#buffer_prep#buffer_append.c", "codebase": "buffer-0.4.0", "c_file": "buffer.c", "function": "buffer_append", "sloc": "4", "c_code": "int\nbuffer_append(buffer_t *self, const char *str) {\n return buffer_append_n(self, str, strlen(str));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_hexadecimal_numbers_prep#json_value_as_string.c", "codebase": "json.h", "c_file": "allow_hexadecimal_numbers.c", "function": "json_value_as_string", "sloc": "6", "c_code": "struct json_string_s *json_value_as_string(struct json_value_s *const value) {\n if (value->type != json_type_string) {\n return 0;\n }\n return (struct json_string_s *)value->payload;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "less-633#charset_prep#is_utf8_well_formed.c", "codebase": "less-633", "c_file": "charset.c", "function": "is_utf8_well_formed", "sloc": "28", "c_code": "int is_utf8_well_formed(char *ss, int slen)\n{\n int i;\n int len;\n unsigned char *s = (unsigned char *) ss;\n if ((((s[0]) & 0xFE) == 0xFE))\n return (0);\n len = utf_len(s[0]);\n if (len > slen)\n return (0);\n if (len == 1)\n return (1);\n if (len == 2)\n {\n if (s[0] < 0xC2)\n return (0);\n } else\n {\n unsigned char mask;\n mask = (~((1 << (8-len)) - 1)) & 0xFF;\n if (s[0] == mask && (s[1] & mask) == 0x80)\n return (0);\n }\n for (i = 1; i < len; i++)\n if (!(((s[i]) & 0xC0) == 0x80))\n return (0);\n return (1);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 7, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 7, "break_continue_statement": 0}}, {"id": "json.h#allow_multi_line_strings_prep#json_get_string_size.c", "codebase": "json.h", "c_file": "allow_multi_line_strings.c", "function": "json_get_string_size", "sloc": "126", "c_code": "int json_get_string_size(struct json_parse_state_s *state, size_t is_key) {\n size_t offset = state->offset;\n const size_t size = state->size;\n size_t data_size = 0;\n const char *const src = state->src;\n const int is_single_quote = '\\'' == src[offset];\n const char quote_to_use = is_single_quote ? '\\'' : '\"';\n const size_t flags_bitset = state->flags_bitset;\n unsigned long codepoint;\n unsigned long high_surrogate = 0;\n if ((json_parse_flags_allow_location_information & flags_bitset) != 0 &&\n is_key != 0) {\n state->dom_size += sizeof(struct json_string_ex_s);\n } else {\n state->dom_size += sizeof(struct json_string_s);\n }\n if ('\"' != src[offset]) {\n if (!((json_parse_flags_allow_single_quoted_strings & flags_bitset) &&\n is_single_quote)) {\n state->error = json_parse_error_expected_opening_quote;\n state->offset = offset;\n return 1;\n }\n }\n offset++;\n while ((offset < size) && (quote_to_use != src[offset])) {\n data_size++;\n switch (src[offset]) {\n default:\n break;\n case '\\0':\n case '\\t':\n state->error = json_parse_error_invalid_string;\n state->offset = offset;\n return 1;\n }\n if ('\\\\' == src[offset]) {\n offset++;\n if (offset == size) {\n state->error = json_parse_error_premature_end_of_buffer;\n state->offset = offset;\n return 1;\n }\n switch (src[offset]) {\n default:\n state->error = json_parse_error_invalid_string_escape_sequence;\n state->offset = offset;\n return 1;\n case '\"':\n case '\\\\':\n case '/':\n case 'b':\n case 'f':\n case 'n':\n case 'r':\n case 't':\n offset++;\n break;\n case 'u':\n if (!(offset + 5 < size)) {\n state->error = json_parse_error_invalid_string_escape_sequence;\n state->offset = offset;\n return 1;\n }\n codepoint = 0;\n if (!json_hexadecimal_value(&src[offset + 1], 4, &codepoint)) {\n state->error = json_parse_error_invalid_string_escape_sequence;\n state->offset = offset;\n return 1;\n }\n if (high_surrogate != 0) {\n if (codepoint >= 0xdc00 &&\n codepoint <= 0xdfff) {\n data_size += 3;\n high_surrogate = 0;\n } else {\n state->error = json_parse_error_invalid_string_escape_sequence;\n state->offset = offset;\n return 1;\n }\n } else if (codepoint <= 0x7f) {\n data_size += 0;\n } else if (codepoint <= 0x7ff) {\n data_size += 1;\n } else if (codepoint >= 0xd800 &&\n codepoint <= 0xdbff) {\n if (offset + 11 > size || '\\\\' != src[offset + 5] ||\n 'u' != src[offset + 6]) {\n state->error = json_parse_error_invalid_string_escape_sequence;\n state->offset = offset;\n return 1;\n }\n high_surrogate = codepoint;\n } else if (codepoint >= 0xd800 &&\n codepoint <= 0xdfff) {\n state->error = json_parse_error_invalid_string_escape_sequence;\n state->offset = offset;\n return 1;\n } else {\n data_size += 2;\n }\n offset += 5;\n break;\n }\n } else if (('\\r' == src[offset]) || ('\\n' == src[offset])) {\n if (!(json_parse_flags_allow_multi_line_strings & flags_bitset)) {\n state->error = json_parse_error_invalid_string_escape_sequence;\n state->offset = offset;\n return 1;\n }\n offset++;\n } else {\n offset++;\n }\n }\n if (offset == size) {\n state->error = json_parse_error_premature_end_of_buffer;\n state->offset = offset - 1;\n return 1;\n }\n offset++;\n state->data_size += data_size;\n state->data_size++;\n state->offset = offset;\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 17, "for_loop": 0, "while_loop": 1, "switch_statement": 2, "goto_statement": 0, "return_statement": 12, "break_continue_statement": 3}}, {"id": "tar-1.34#paxerror_prep#open_fatal.c", "codebase": "tar-1.34", "c_file": "paxerror.c", "function": "open_fatal", "sloc": "5", "c_code": "void\nopen_fatal (char const *name)\n{\n call_arg_fatal (\"open\", name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsUnifiedCanadianAboriginalSyllabics.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsUnifiedCanadianAboriginalSyllabics", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsUnifiedCanadianAboriginalSyllabics(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsUnifiedCanadianAboriginalSyllabics\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsUnifiedCanadianAboriginalSyllabics\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsUnifiedCanadianAboriginalSyllabics(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsBopomofo.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsBopomofo", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsBopomofo(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsBopomofo\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsBopomofo\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsBopomofo(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "screen-4.9.0#tty_prep#SetBaud.c", "codebase": "screen-4.9.0", "c_file": "tty.c", "function": "SetBaud", "sloc": "11", "c_code": "int SetBaud(struct mode *m, int ibaud, int obaud)\n{\n struct baud_values *ip, *op;\n if ((!(ip = lookup_baud(ibaud)) && ibaud != -1) || (!(op = lookup_baud(obaud)) && obaud != -1))\n return -1;\n if (ip)\n cfsetispeed(&m->tio, ip->sym);\n if (op)\n cfsetospeed(&m->tio, op->sym);\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#cbc-aes256-encrypt_prep#_nettle_cbc_aes256_encrypt_c.c", "codebase": "nettle-3.9.1", "c_file": "cbc-aes256-encrypt.c", "function": "_nettle_cbc_aes256_encrypt_c", "sloc": "7", "c_code": "void\n_nettle_cbc_aes256_encrypt_c(const struct aes256_ctx *ctx, uint8_t *iv,\n size_t length, uint8_t *dst, const uint8_t *src)\n{\n nettle_cbc_encrypt(ctx, (nettle_cipher_func *) nettle_aes256_encrypt,\n 16, iv, length, dst, src);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_SET_BITS_IN_AN_INTEGER_3_prep#main.c", "codebase": "transcoder-set", "c_file": "COUNT_SET_BITS_IN_AN_INTEGER_3.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {6,58,90,69,15,54,60,51,46,91};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "gawk-5.2.2#grcat_prep#main.c", "codebase": "gawk-5.2.2", "c_file": "grcat.c", "function": "main", "sloc": "18", "c_code": "int\nmain(int argc, char **argv)\n{\n struct group *g;\n int i;\n while ((g = getgrent()) != ((void *)0)) {\n printf(\"%s:%s:%ld:\", g->gr_name, g->gr_passwd,\n (long) g->gr_gid);\n for (i = 0; g->gr_mem[i] != ((void *)0); i++) {\n printf(\"%s\", g->gr_mem[i]);\n if (g->gr_mem[i+1] != ((void *)0))\n putchar(',');\n }\n putchar('\\n');\n }\n endgrent();\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#fd_inst_prep#Pl_Fd_Prolog_To_Array_Any.c", "codebase": "gprolog-1.5.0", "c_file": "fd_inst.c", "function": "Pl_Fd_Prolog_To_Array_Any", "sloc": "31", "c_code": "WamWord *\nPl_Fd_Prolog_To_Array_Any(WamWord list_word)\n{\n WamWord word, tag_mask;\n WamWord save_list_word;\n WamWord *lst_adr;\n int n = 0;\n WamWord *array;\n WamWord *save_array;\n array = (((WamWordP *) pl_reg_bank)[256 +3]);\n save_list_word = list_word;\n save_array = array;\n array++;\n for (;;)\n {\n do { WamWord deref_last_word; word = list_word; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0);\n if (tag_mask == (PlULong)0)\n Pl_Err_Instantiation();\n if (word == (((PlLong) (256) << 3) + ((PlULong)0x3)))\n break;\n if (tag_mask != (PlULong)0x1)\n Pl_Err_Type(pl_type_list, save_list_word);\n lst_adr = ((WamWord *) ((word) & (PlULong)0xfffffffffffffff8));\n *array++ = (((WamWord *) lst_adr)[0]);\n n++;\n list_word = (((WamWord *) lst_adr)[0 +1]);\n }\n *save_array = n;\n (((WamWordP *) pl_reg_bank)[256 +3]) = array;\n return save_array;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 2}}, {"id": "tar-1.34#backupfile_prep#set_simple_backup_suffix.c", "codebase": "tar-1.34", "c_file": "backupfile.c", "function": "set_simple_backup_suffix", "sloc": "7", "c_code": "void\nset_simple_backup_suffix (char const *s)\n{\n if (!s)\n s = getenv (\"SIMPLE_BACKUP_SUFFIX\");\n simple_backup_suffix = s && *s && s == last_component (s) ? s : \"~\";\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_NUMBER_PAIRS_ARRAY_XOR_0_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FIND_NUMBER_PAIRS_ARRAY_XOR_0.c", "function": "f_gold", "sloc": "18", "c_code": "int f_gold ( int a [ ], int n ) {\n sort ( a, a + n );\n int count = 1;\n int answer = 0;\n for ( int i = 1;\n i < n;\n i ++ ) {\n if ( a [ i ] == a [ i - 1 ] ) {\n count += 1;\n }\n else {\n answer = answer + ( count * ( count - 1 ) ) / 2;\n count = 1;\n }\n }\n answer = answer + ( count * ( count - 1 ) ) / 2;\n return answer;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#directory_prep#dir_grow.c", "codebase": "mtools-4.0.43", "c_file": "directory.c", "function": "dir_grow", "sloc": "21", "c_code": "int dir_grow(Stream_t *Dir, unsigned int size)\n{\n Stream_t *Stream = GetFs(Dir);\n Fs_t *This = (Fs_t *) Stream;\n ssize_t ret;\n unsigned int buflen;\n char *buffer;\n if (!getfreeMinClusters(Dir, 1))\n return -1;\n buflen = getClusterBytes(This);\n if(! (buffer=malloc(buflen)) ){\n perror(\"dir_grow: malloc\");\n return -1;\n }\n memset((char *) buffer, '\\0', buflen);\n ret = force_pwrite(Dir, buffer, (mt_off_t) size * 32, buflen);\n free(buffer);\n if(ret < (int) buflen)\n return -1;\n return 0;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 2, "memory_operation": 1, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "tar-1.34#mbrtowc_prep#rpl_mbrtowc.c", "codebase": "tar-1.34", "c_file": "mbrtowc.c", "function": "rpl_mbrtowc", "sloc": "16", "c_code": "size_t\nrpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)\n{\n size_t ret;\n wchar_t wc;\n if (! pwc)\n pwc = &wc;\n ret = mbrtowc (pwc, s, n, ps);\n if ((size_t) -2 <= ret && n != 0 && ! hard_locale (0))\n {\n unsigned char uc = *s;\n *pwc = uc;\n return 1;\n }\n return ret;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#random_prep#GenLogNormalRandom.c", "codebase": "mcsim-6.2.0", "c_file": "random.c", "function": "GenLogNormalRandom", "sloc": "23", "c_code": "double GenLogNormalRandom (double dMean, double dSDNorm,\n double dSDLogNorm)\n{\n double dmuz, dSLogNorm, dLambda, dz;\n if (dMean < 0) {\n char str[10];\n sprintf(str, \"%5.2e\", dMean);\n ReportRunTimeError(((void *)0), 0x0303 | 0x8000,\n \"\", str, \"GenLogNormalRandom\");\n }\n else\n if (dSDLogNorm <= 0) {\n char str[10];\n sprintf(str, \"%5.2e\", dSDLogNorm);\n ReportRunTimeError(((void *)0), 0x0302 | 0x8000,\n \"\", str, \"GenLogNormalRandom\");\n }\n dSLogNorm = sqrt(exp(pow(dSDLogNorm,2)) * (exp(pow(dSDLogNorm,2)) - 1));\n dLambda = pow(dSDNorm/dSLogNorm,2);\n dmuz = log(dMean + sqrt(pow(dMean,2) + dLambda));\n dz = NormalRandom(dmuz, dSLogNorm);\n return (exp(dz) - dLambda * exp(-dz))/2;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "pexec-1.0rc8#iof_prep#freadline.c", "codebase": "pexec-1.0rc8", "c_file": "iof.c", "function": "freadline", "sloc": "15", "c_code": "char *freadline(FILE *fr)\n{\n char *ret,buff[256];\n ret=((void *)0);\n if ( feof(fr) ) return(((void *)0));\n while ( 1 )\n { if ( fgets(buff,255,fr)==((void *)0) ) break;\n if ( ret==((void *)0) ) ret=(char *)malloc(strlen(buff)+1),ret[0]=0;\n else ret=(char *)realloc(ret,strlen(ret)+strlen(buff)+1);\n do { if ( ret==((void *)0) && 1>0 ) { fprintf(stderr,\"iof.c: %s.\\n\",\"memory exhausted\"); abort(); } } while(0);\n strcat(ret,buff);\n if ( ret[strlen(ret)-1]==10 ) break;\n }\n return(ret);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 2, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 2}}, {"id": "libxml2#xmlwriter_prep#xmlTextWriterWriteDTDAttlist.c", "codebase": "libxml2", "c_file": "xmlwriter.c", "function": "xmlTextWriterWriteDTDAttlist", "sloc": "23", "c_code": "int\nxmlTextWriterWriteDTDAttlist(xmlTextWriterPtr writer,\n const xmlChar * name, const xmlChar * content)\n{\n int count;\n int sum;\n if (content == ((void *)0))\n return -1;\n sum = 0;\n count = xmlTextWriterStartDTDAttlist(writer, name);\n if (count == -1)\n return -1;\n sum += count;\n count = xmlTextWriterWriteString(writer, content);\n if (count == -1)\n return -1;\n sum += count;\n count = xmlTextWriterEndDTDAttlist(writer);\n if (count == -1)\n return -1;\n sum += count;\n return sum;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#exp_prep#ti_exp.c", "codebase": "tulipindicators-0.9.1", "c_file": "exp.c", "function": "ti_exp", "sloc": "1", "c_code": "int ti_exp(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] = (exp(in1[i])); } return 0; }\n", "c_constructs": {"pointer_type": 3, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#system_prep#sys_write_archive_buffer.c", "codebase": "tar-1.34", "c_file": "system.c", "function": "sys_write_archive_buffer", "sloc": "5", "c_code": "size_t\nsys_write_archive_buffer (void)\n{\n return (((archive) >= (1 << 30)) ? rmt_write__ (archive - (1 << 30), record_start->buffer, record_size) : full_write (archive, record_start->buffer, record_size));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#mh_prep#MaxMCVar.c", "codebase": "mcsim-6.2.0", "c_file": "mh.c", "function": "MaxMCVar", "sloc": "14", "c_code": "double MaxMCVar (PMCVAR pMCVar)\n{\n if (pMCVar->iType == 8 || pMCVar->iType == 12 ) {\n return( *(pMCVar->pdParm[3]));\n }\n else {\n if (pMCVar->iType == 0 || pMCVar->iType == 1 ) {\n return( *(pMCVar->pdParm[1]));\n }\n else {\n return( *(pMCVar->pdParm[3]));\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_STEPS_TO_DELETE_A_STRING_AFTER_REPEATED_DELETION_OF_PALINDROME_SUBSTRINGS_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "MINIMUM_STEPS_TO_DELETE_A_STRING_AFTER_REPEATED_DELETION_OF_PALINDROME_SUBSTRINGS.c", "function": "f_gold", "sloc": "26", "c_code": "int f_gold ( char str [] ) {\n int N = strlen(str);\n int dp [ N + 1 ] [ N + 1 ];\n for ( int i = 0;\n i <= N;\n i ++ ) for ( int j = 0;\n j <= N;\n j ++ ) dp [ i ] [ j ] = 0;\n for ( int len = 1;\n len <= N;\n len ++ ) {\n for ( int i = 0, j = len - 1;\n j < N;\n i ++, j ++ ) {\n if ( len == 1 ) dp [ i ] [ j ] = 1;\n else {\n dp [ i ] [ j ] = 1 + dp [ i + 1 ] [ j ];\n if ( str [ i ] == str [ i + 1 ] ) dp [ i ] [ j ] = min ( 1 + dp [ i + 2 ] [ j ], dp [ i ] [ j ] );\n for ( int K = i + 2;\n K <= j;\n K ++ ) if ( str [ i ] == str [ K ] ) dp [ i ] [ j ] = min ( dp [ i + 1 ] [ K - 1 ] + dp [ K + 1 ] [ j ], dp [ i ] [ j ] );\n }\n }\n }\n return dp [ 0 ] [ N - 1 ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 5, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CALCULATE_AREA_TETRAHEDRON_prep#len.c", "codebase": "transcoder-set", "c_file": "CALCULATE_AREA_TETRAHEDRON.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_N_TH_ELEMENT_FROM_STERNS_DIATOMIC_SERIES_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FIND_N_TH_ELEMENT_FROM_STERNS_DIATOMIC_SERIES.c", "function": "f_gold", "sloc": "12", "c_code": "int f_gold ( int n ) {\n int DP [ n + 1 ];\n DP [ 0 ] = 0;\n DP [ 1 ] = 1;\n for ( int i = 2;\n i <= n;\n i ++ ) {\n if ( i % 2 == 0 ) DP [ i ] = DP [ i / 2 ];\n else DP [ i ] = DP [ ( i - 1 ) / 2 ] + DP [ ( i + 1 ) / 2 ];\n }\n return DP [ n ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#cast128_prep#nettle_cast128_set_key.c", "codebase": "nettle-3.9.1", "c_file": "cast128.c", "function": "nettle_cast128_set_key", "sloc": "5", "c_code": "void\nnettle_cast128_set_key(struct cast128_ctx *ctx, const uint8_t *key)\n{\n nettle_cast5_set_key (ctx, 16, key);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "uucp-1.07#protj_prep#fjshutdown.c", "codebase": "uucp-1.07", "c_file": "protj.c", "function": "fjshutdown", "sloc": "10", "c_code": "boolean\nfjshutdown (qdaemon)\n struct sdaemon *qdaemon;\n{\n boolean fret;\n fret = fishutdown (qdaemon);\n ubuffree (zJavoid);\n ubuffree (zJbuf);\n return fret;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#screen_prep#lower_left.c", "codebase": "less-633", "c_file": "screen.c", "function": "lower_left", "sloc": "5", "c_code": "void lower_left(void)\n{\n assert_interactive();\n ltputs(sc_lower_left, 1, putchr);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#prob_prep#probt.c", "codebase": "dap-3.10", "c_file": "prob.c", "function": "probt", "sloc": "16", "c_code": "double probt(double t1, int di)\n{\n double c;\n double ddi;\n if (!finite(t1))\n return 0.0 / 0.0;\n ddi = (double) di;\n dddi = ddi;\n for (c = 1.0; ddi > 2.0; ddi -= 2.0)\n c *= (ddi - 1.0) / (ddi - 2.0);\n if (ddi == 2.0)\n c *= 0.5;\n else\n c /= 3.14159265358979323846;\n return c * dap_simp(&Tfun, atan(t1 / sqrt(dddi)), 1.57079632679489661923, 1024);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "units-2.22#units_prep#getuser_readline.c", "codebase": "units-2.22", "c_file": "units.c", "function": "getuser_readline", "sloc": "21", "c_code": "void\ngetuser_readline(char **buffer, int *bufsize, const char *query)\n{\n int valid = 0;\n while (!valid){\n if (*buffer) free(*buffer);\n *buffer = readline(query);\n if (*buffer)\n replacectrlchars(*buffer);\n if (!*buffer || strwidth(*buffer)>=0)\n valid=1;\n else\n printf(\"Error: %s\\n\",invalid_utf8);\n }\n if (((*buffer) && *(*buffer))) add_history(*buffer);\n if (!*buffer){\n if (!flags.quiet)\n putchar('\\n');\n exit(0);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlsave_prep#xmlDocDump.c", "codebase": "libxml2", "c_file": "xmlsave.c", "function": "xmlDocDump", "sloc": "4", "c_code": "int\nxmlDocDump(FILE *f, xmlDocPtr cur) {\n return(xmlDocFormatDump (f, cur, 0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "genann#genann_prep#genann_act_sigmoid_cached.c", "codebase": "genann", "c_file": "genann.c", "function": "genann_act_sigmoid_cached", "sloc": "8", "c_code": "double genann_act_sigmoid_cached(const genann *ann __attribute__((unused)), double a) {\n ((void) sizeof ((!__builtin_isnan (a)) ? 1 : 0), __extension__ ({ if (!__builtin_isnan (a)) ; else __assert_fail (\"!isnan(a)\", \"genann.c\", 87, __extension__ __PRETTY_FUNCTION__); }));\n if (a < sigmoid_dom_min) return lookup[0];\n if (a >= sigmoid_dom_max) return lookup[4096 - 1];\n size_t j = (size_t)((a-sigmoid_dom_min)*interval+0.5);\n if (__builtin_expect(!!(j >= 4096), 0)) return lookup[4096 - 1];\n return lookup[j];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "transcoder-set#MINIMUM_SUM_TWO_NUMBERS_FORMED_DIGITS_ARRAY_2_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "MINIMUM_SUM_TWO_NUMBERS_FORMED_DIGITS_ARRAY_2.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#b-peer_prep#one_beyond_last_dir_sep.c", "codebase": "rcs-5.10.1", "c_file": "b-peer.c", "function": "one_beyond_last_dir_sep", "sloc": "8", "c_code": "const char *\none_beyond_last_dir_sep (const char *name)\n{\n const char *end = strrchr (name, '/');\n return end\n ? 1 + end\n : ((void *)0);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#tccpp_prep#end_macro.c", "codebase": "tinycc", "c_file": "tccpp.c", "function": "end_macro", "sloc": "12", "c_code": "void end_macro(void)\n{\n TokenString *str = macro_stack;\n macro_stack = str->prev;\n macro_ptr = str->prev_ptr;\n file->line_num = str->save_line_num;\n if (str->alloc == 2) {\n str->alloc = 3;\n } else {\n tok_str_free(str);\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#base64-encode_prep#nettle_base64_encode_final.c", "codebase": "nettle-3.9.1", "c_file": "base64-encode.c", "function": "nettle_base64_encode_final", "sloc": "16", "c_code": "size_t\nnettle_base64_encode_final(struct base64_encode_ctx *ctx,\n char *dst)\n{\n unsigned done = 0;\n unsigned bits = ctx->bits;\n if (bits)\n {\n dst[done++] = ((ctx->alphabet)[0x3F & ((ctx->word << (6 - ctx->bits)))]);\n for (; bits < 6; bits += 2)\n dst[done++] = '=';\n ctx->bits = 0;\n }\n ((void) sizeof ((done <= 3) ? 1 : 0), __extension__ ({ if (done <= 3) ; else __assert_fail (\"done <= BASE64_ENCODE_FINAL_LENGTH\", \"base64-encode.c\", 198, __extension__ __PRETTY_FUNCTION__); }));\n return done;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlSchemaCleanupTypes.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlSchemaCleanupTypes", "sloc": "8", "c_code": "PyObject *\nlibxml_xmlSchemaCleanupTypes(PyObject *self __attribute__ ((__unused__)), PyObject *args __attribute__ ((__unused__))) {\n if (libxml_deprecationWarning(\"xmlSchemaCleanupTypes\") == -1)\n return(((void *)0));\n xmlSchemaCleanupTypes();\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tinycc#x86_64-gen_prep#ggoto.c", "codebase": "tinycc", "c_file": "x86_64-gen.c", "function": "ggoto", "sloc": "5", "c_code": "void ggoto(void)\n{\n gcall_or_jmp(1);\n vtop--;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#ADD_1_TO_A_GIVEN_NUMBER_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "ADD_1_TO_A_GIVEN_NUMBER.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#frcode_prep#main.c", "codebase": "findutils-4.9.0", "c_file": "frcode.c", "function": "main", "sloc": "122", "c_code": "int\nmain (int argc, char **argv)\n{\n char *path;\n char *oldpath;\n size_t pathsize, oldpathsize;\n int count, oldcount, diffcount;\n int line_len;\n int delimiter = '\\n';\n int optc;\n int slocate_compat = 0;\n long slocate_seclevel = 0L;\n if (argv[0])\n set_program_name (argv[0]);\n else\n set_program_name (\"frcode\");\n if (atexit (close_stdout))\n {\n ((!!sizeof (struct { _Static_assert (1, \"verify_expr (\" \"1\" \", \" \"(error (1, (*__errno_location ()), gettext (\\\"The atexit library function failed\\\")), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (1, (*__errno_location ()), gettext (\"The atexit library function failed\")), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (1, (*__errno_location ()), gettext (\"The atexit library function failed\")), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n pathsize = oldpathsize = 1026;\n path = xmalloc (pathsize);\n oldpath = xmalloc (oldpathsize);\n oldpath[0] = 0;\n oldcount = 0;\n while ((optc = getopt_long (argc, argv, \"hv0S:\", longopts, (int *) 0)) != -1)\n switch (optc)\n {\n case '0':\n delimiter = 0;\n break;\n case 'S':\n slocate_compat = 1;\n slocate_seclevel = get_seclevel (optarg);\n if (slocate_seclevel < 0 || slocate_seclevel > 1)\n {\n ((!!sizeof (struct { _Static_assert (1, \"verify_expr (\" \"1\" \", \" \"(error (1, 0, gettext (\\\"slocate security level %ld is unsupported.\\\"), slocate_seclevel), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (1, 0, gettext (\"slocate security level %ld is unsupported.\"), slocate_seclevel), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (1, 0, gettext (\"slocate security level %ld is unsupported.\"), slocate_seclevel), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n break;\n case 'h':\n usage (0);\n case 'v':\n display_findutils_version (\"frcode\");\n return 0;\n default:\n usage (1);\n }\n if (optind != argc)\n {\n error (0, 0, gettext (\"no argument expected.\"));\n usage (1);\n }\n if (slocate_compat)\n {\n fputc (slocate_seclevel ? '1' : '0', stdout);\n fputc (0, stdout);\n }\n else\n {\n if (fwrite (\"\\0LOCATE02\", 1, sizeof (\"\\0LOCATE02\"), stdout)\n != sizeof (\"\\0LOCATE02\"))\n {\n ((!!sizeof (struct { _Static_assert (1, \"verify_expr (\" \"1\" \", \" \"(error (1, (*__errno_location ()), gettext (\\\"Failed to write to standard output\\\")), assume (false))\" \")\"); int _gl_dummy; })) ? ((error (1, (*__errno_location ()), gettext (\"Failed to write to standard output\")), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (1, (*__errno_location ()), gettext (\"Failed to write to standard output\")), ((0) ? (void) 0 : __builtin_unreachable ()))));\n }\n }\n while ((line_len = getdelim (&path, &pathsize, delimiter, stdin)) > 0)\n {\n if (path[line_len - 1] != delimiter)\n {\n error (0, 0, gettext (\"The input file should end with the delimiter\"));\n }\n else\n {\n path[line_len - 1] = '\\0';\n }\n count = prefix_length (oldpath, path);\n diffcount = count - oldcount;\n if ( (diffcount > 0x7fff) || (diffcount < (-0x7fff - 1)) )\n {\n count = 0;\n diffcount = (-oldcount);\n }\n oldcount = count;\n if (slocate_compat)\n {\n slocate_compat = 0;\n }\n else\n {\n if (diffcount < (-127)\n || diffcount > (127))\n {\n if ((-1) == putc (0x80, stdout))\n outerr ();\n if (!put_short (diffcount, stdout))\n outerr ();\n }\n else\n {\n if ((-1) == putc (diffcount, stdout))\n outerr ();\n }\n }\n if ( ((-1) == fputs (path + count, stdout))\n || ((-1) == putc ('\\0', stdout)))\n {\n outerr ();\n }\n if (1)\n {\n char *tmppath = oldpath;\n size_t tmppathsize = oldpathsize;\n oldpath = path;\n oldpathsize = pathsize;\n path = tmppath;\n pathsize = tmppathsize;\n }\n }\n free (path);\n free (oldpath);\n return 0;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 2, "memory_operation": 0, "if_statement": 15, "for_loop": 0, "while_loop": 2, "switch_statement": 1, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 2}}, {"id": "rcs-5.10.1#b-anchor_prep#recognize_keyword.c", "codebase": "rcs-5.10.1", "c_file": "b-anchor.c", "function": "recognize_keyword", "sloc": "14", "c_code": "_Bool\nrecognize_keyword (char const *string, struct pool_found *found)\n{\n const char delims[3] = { '$', ':', '\\0' };\n size_t limit = strcspn (string, delims);\n const struct cbuf x =\n {\n .string = string,\n .size = limit\n };\n return (('$' == string[limit]\n || ':' == string[limit])\n && pool_lookup (keyword_pool, &x, found));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Check_For_Un_Codes.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Check_For_Un_Codes", "sloc": "19", "c_code": "void\nPl_Check_For_Un_Codes(WamWord start_word)\n{\n WamWord word, tag_mask;\n WamWord save_start_word;\n WamWord *lst_adr;\n save_start_word = start_word;\n for (;;)\n {\n do { WamWord deref_last_word; word = start_word; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0);\n if (tag_mask == (PlULong)0 || word == (((PlLong) (256) << 3) + ((PlULong)0x3)))\n return;\n if (tag_mask != (PlULong)0x1)\n Pl_Err_Type(pl_type_list, save_start_word);\n lst_adr = ((WamWord *) ((word) & (PlULong)0xfffffffffffffff8));\n Pl_Check_For_Un_Code((((WamWord *) lst_adr)[0]));\n start_word = (((WamWord *) lst_adr)[0 +1]);\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "snudown#buffer_prep#bufcstr.c", "codebase": "snudown", "c_file": "buffer.c", "function": "bufcstr", "sloc": "12", "c_code": "const char *\nbufcstr(struct buf *buf)\n{\n ((void) sizeof ((buf && buf->unit) ? 1 : 0), __extension__ ({ if (buf && buf->unit) ; else __assert_fail (\"buf && buf->unit\", \"buffer.c\", 94, __extension__ __PRETTY_FUNCTION__); }));\n if (buf->size < buf->asize && buf->data[buf->size] == 0)\n return (char *)buf->data;\n if (buf->size + 1 <= buf->asize || bufgrow(buf, buf->size + 1) == 0) {\n buf->data[buf->size] = 0;\n return (char *)buf->data;\n }\n return ((void *)0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "heman#mat3_prep#kmMat3Identity.c", "codebase": "heman", "c_file": "mat3.c", "function": "kmMat3Identity", "sloc": "6", "c_code": "kmMat3* kmMat3Identity(kmMat3* pOut)\n{\n memset(pOut->mat, 0, sizeof(float) * 9);\n pOut->mat[0] = pOut->mat[4] = pOut->mat[8] = 1.0f;\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_SUM_EVEN_FACTORS_NUMBER_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FIND_SUM_EVEN_FACTORS_NUMBER.c", "function": "f_gold", "sloc": "19", "c_code": "int f_gold ( int n ) {\n if ( n % 2 != 0 ) return 0;\n int res = 1;\n for ( int i = 2;\n i <= sqrt ( n );\n i ++ ) {\n int count = 0, curr_sum = 1, curr_term = 1;\n while ( n % i == 0 ) {\n count ++;\n n = n / i;\n if ( i == 2 && count == 1 ) curr_sum = 0;\n curr_term *= i;\n curr_sum += curr_term;\n }\n res *= curr_sum;\n }\n if ( n >= 2 ) res *= ( 1 + n );\n return res;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_object_object.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_object_object", "sloc": "5", "c_code": "void * binn_object_object(void *obj, const char *key) {\n void *value;\n binn_object_get(obj, key, 0xE2, &value, ((void *)0));\n return value;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_multi_line_strings_prep#json_write_number.c", "codebase": "json.h", "c_file": "allow_multi_line_strings.c", "function": "json_write_number", "sloc": "115", "c_code": "char *json_write_number(const struct json_number_s *number, char *data) {\n uintmax_t parsed_number, backup;\n size_t i;\n if (number->number_size >= 2) {\n switch (number->number[1]) {\n default:\n break;\n case 'x':\n case 'X':\n parsed_number = strtoumax(number->number, 0, 0);\n backup = parsed_number;\n i = 0;\n while (0 != parsed_number) {\n parsed_number /= 10;\n i++;\n }\n parsed_number = backup;\n backup = i;\n do {\n *(data + i - 1) = '0' + (char)(parsed_number % 10);\n parsed_number /= 10;\n i--;\n } while (0 != parsed_number);\n data += backup;\n return data;\n }\n }\n i = 0;\n if ((i < number->number_size) &&\n (('+' == number->number[i]) || ('-' == number->number[i]))) {\n i++;\n }\n if ((i < number->number_size) && ('I' == number->number[i])) {\n const char *inf = \"Infinity\";\n size_t k;\n for (k = i; k < number->number_size; k++) {\n const char c = *inf++;\n if ('\\0' == c) {\n break;\n } else if (c != number->number[k]) {\n break;\n }\n }\n if ('\\0' == *inf++) {\n const char *dbl_max;\n if ('-' == number->number[0]) {\n *data++ = '-';\n }\n for (dbl_max = \"1.7976931348623158e308\"; '\\0' != *dbl_max; dbl_max++) {\n *data++ = *dbl_max;\n }\n return data;\n }\n }\n if ((i < number->number_size) && ('N' == number->number[i])) {\n const char *nan = \"NaN\";\n size_t k;\n for (k = i; k < number->number_size; k++) {\n const char c = *nan++;\n if ('\\0' == c) {\n break;\n } else if (c != number->number[k]) {\n break;\n }\n }\n if ('\\0' == *nan++) {\n *data++ = '0';\n return data;\n }\n }\n if ((i < number->number_size) && ('.' == number->number[i])) {\n i = 0;\n if ('+' == number->number[i]) {\n i++;\n }\n if ('-' == number->number[i]) {\n *data++ = '-';\n i++;\n }\n *data++ = '0';\n for (; i < number->number_size; i++) {\n *data++ = number->number[i];\n }\n return data;\n }\n for (; i < number->number_size; i++) {\n const char c = number->number[i];\n if (!('0' <= c && c <= '9')) {\n break;\n }\n }\n if ((i + 1 == number->number_size) && ('.' == number->number[i])) {\n i = 0;\n if ('+' == number->number[i]) {\n i++;\n }\n if ('-' == number->number[i]) {\n *data++ = '-';\n i++;\n }\n for (; i < number->number_size; i++) {\n *data++ = number->number[i];\n }\n *data++ = '0';\n return data;\n }\n i = 0;\n if ('+' == number->number[i]) {\n i++;\n }\n for (; i < number->number_size; i++) {\n *data++ = number->number[i];\n }\n return data;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 19, "for_loop": 7, "while_loop": 2, "switch_statement": 1, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 6}}, {"id": "optipng-0.7.8#ioutil_prep#opng_os_unlink.c", "codebase": "optipng-0.7.8", "c_file": "ioutil.c", "function": "opng_os_unlink", "sloc": "5", "c_code": "int\nopng_os_unlink(const char *path)\n{\n return unlink(path);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#valid_prep#xmlDumpElementTable.c", "codebase": "libxml2", "c_file": "valid.c", "function": "xmlDumpElementTable", "sloc": "10", "c_code": "void\nxmlDumpElementTable(xmlBufferPtr buf, xmlElementTablePtr table) {\n xmlSaveCtxtPtr save;\n if ((buf == ((void *)0)) || (table == ((void *)0)))\n return;\n save = xmlSaveToBuffer(buf, ((void *)0), 0);\n xmlHashScan(table, xmlDumpElementDeclScan, save);\n if (xmlSaveFinish(save) != XML_ERR_OK)\n xmlFree(xmlBufferDetach(buf));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "ht#ht_prep#ht_create.c", "codebase": "ht", "c_file": "ht.c", "function": "ht_create", "sloc": "14", "c_code": "ht* ht_create(void) {\n ht* table = malloc(sizeof(ht));\n if (table == ((void *)0)) {\n return ((void *)0);\n }\n table->length = 0;\n table->capacity = 16;\n table->entries = calloc(table->capacity, sizeof(ht_entry));\n if (table->entries == ((void *)0)) {\n free(table);\n return ((void *)0);\n }\n return table;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 3, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tar-1.34#xheader_prep#xheader_format_name.c", "codebase": "tar-1.34", "c_file": "xheader.c", "function": "xheader_format_name", "sloc": "99", "c_code": "char *\nxheader_format_name (struct tar_stat_info *st, const char *fmt, size_t n)\n{\n char *buf;\n size_t len;\n char *q;\n const char *p;\n char *dirp = ((void *)0);\n char *dir = ((void *)0);\n char *base = ((void *)0);\n char pidbuf[((((((sizeof (uintmax_t) * 8) - (! ((__typeof__ (uintmax_t)) 0 < (__typeof__ (uintmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (uintmax_t)) 0 < (__typeof__ (uintmax_t)) -1))) + 1)];\n char const *pptr = ((void *)0);\n char nbuf[((((((sizeof (uintmax_t) * 8) - (! ((__typeof__ (uintmax_t)) 0 < (__typeof__ (uintmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (uintmax_t)) 0 < (__typeof__ (uintmax_t)) -1))) + 1)];\n char const *nptr = ((void *)0);\n len = 0;\n for (p = fmt; *p; p++)\n {\n if (*p == '%' && p[1])\n {\n switch (*++p)\n {\n case '%':\n len++;\n break;\n case 'd':\n if (st)\n {\n if (!dirp)\n dirp = dir_name (st->orig_file_name);\n dir = safer_name_suffix (dirp, 0, absolute_names_option);\n len += strlen (dir);\n }\n break;\n case 'f':\n if (st)\n {\n base = last_component (st->orig_file_name);\n len += strlen (base);\n }\n break;\n case 'p':\n pptr = umaxtostr (getpid (), pidbuf);\n len += pidbuf + sizeof pidbuf - 1 - pptr;\n break;\n case 'n':\n nptr = umaxtostr (n, nbuf);\n len += nbuf + sizeof nbuf - 1 - nptr;\n break;\n default:\n len += 2;\n }\n }\n else\n len++;\n }\n buf = xmalloc (len + 1);\n for (q = buf, p = fmt; *p; )\n {\n if (*p == '%')\n {\n switch (p[1])\n {\n case '%':\n *q++ = *p++;\n p++;\n break;\n case 'd':\n if (dir)\n q = stpcpy (q, dir);\n p += 2;\n break;\n case 'f':\n if (base)\n q = stpcpy (q, base);\n p += 2;\n break;\n case 'p':\n q = stpcpy (q, pptr);\n p += 2;\n break;\n case 'n':\n q = stpcpy (q, nptr);\n p += 2;\n break;\n default:\n *q++ = *p++;\n if (*p)\n *q++ = *p++;\n }\n }\n else\n *q++ = *p++;\n }\n free (dirp);\n while (q > buf && ((q[-1]) == '/'))\n q--;\n *q = 0;\n return buf;\n}\n", "c_constructs": {"pointer_type": 8, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 1, "memory_operation": 0, "if_statement": 8, "for_loop": 2, "while_loop": 1, "switch_statement": 2, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 10}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_cvi.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_cvi", "sloc": "25", "c_code": "int ti_cvi(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *high = inputs[0];\n const double *low = inputs[1];\n const int period = (int)options[0];\n double *output = outputs[0];\n if (period < 1) return 1;\n if (size <= ti_cvi_start(options)) return 0;\n const double per = 2 / ((double)period + 1);\n ti_buffer *lag = ti_buffer_new(period);\n double val = high[0]-low[0];\n int i;\n for (i = 1; i < period*2-1; ++i) {\n val = ((high[i]-low[i])-val) * per + val;\n do { (lag)->vals[(lag)->index] = (val); (lag)->index = ((lag)->index + 1); if ((lag)->index >= (lag)->size) (lag)->index = 0; } while (0);\n }\n for (i = period*2-1; i < size; ++i) {\n val = ((high[i]-low[i])-val) * per + val;\n const double old = lag->vals[lag->index];\n *output++ = 100.0 * (val - old) / old;\n do { (lag)->vals[(lag)->index] = (val); (lag)->index = ((lag)->index + 1); if ((lag)->index >= (lag)->size) (lag)->index = 0; } while (0);\n }\n ti_buffer_free(lag);\n ((void) sizeof ((output - outputs[0] == size - ti_cvi_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_cvi_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_cvi_start(options)\", \"tiamalgamation.c\", 2199, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 2, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "nano-7.2#utils_prep#tail.c", "codebase": "nano-7.2", "c_file": "utils.c", "function": "tail", "sloc": "8", "c_code": "const char *tail(const char *path)\n{\n const char *slash = strrchr(path, '/');\n if (slash == ((void *)0))\n return path;\n else\n return slash + 1;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "indent-2.2.13#parse_prep#parse.c", "codebase": "indent-2.2.13", "c_file": "parse.c", "function": "parse", "sloc": "177", "c_code": "extern exit_values_ty parse (\n codes_ty tk)\n{\n int i;\n while ((parser_state_tos->p_stack[parser_state_tos->tos] == ifhead) &&\n (tk != elselit))\n {\n parser_state_tos->p_stack[parser_state_tos->tos] = stmt;\n reduce ();\n }\n switch (tk)\n {\n case decl:\n parser_state_tos->search_brace = settings.braces_on_struct_decl_line;\n if ((parser_state_tos->p_stack[parser_state_tos->tos] != decl) &&\n (parser_state_tos->block_init == 0))\n {\n break_comma = 1;\n inc_pstack ();\n parser_state_tos->p_stack[parser_state_tos->tos] = decl;\n parser_state_tos->il[parser_state_tos->tos] = parser_state_tos->i_l_follow;\n if (settings.ljust_decl)\n {\n parser_state_tos->ind_level = 0;\n for (i = parser_state_tos->tos - 1; i > 0; --i)\n {\n if (parser_state_tos->p_stack[i] == decl)\n {\n parser_state_tos->ind_level += settings.ind_size;\n }\n }\n parser_state_tos->i_l_follow = parser_state_tos->ind_level;\n }\n }\n break;\n case ifstmt:\n if (parser_state_tos->p_stack[parser_state_tos->tos] == elsehead)\n {\n parser_state_tos->i_l_follow = parser_state_tos->il[parser_state_tos->tos];\n }\n case dolit:\n case forstmt:\n case casestmt:\n inc_pstack ();\n parser_state_tos->p_stack[parser_state_tos->tos] = tk;\n parser_state_tos->ind_level = parser_state_tos->i_l_follow;\n parser_state_tos->il[parser_state_tos->tos] = parser_state_tos->ind_level;\n if (tk != casestmt)\n {\n parser_state_tos->i_l_follow += settings.ind_size;\n }\n parser_state_tos->search_brace = settings.btype_2;\n break;\n case lbrace:\n break_comma = 0;\n if (parser_state_tos->p_stack[parser_state_tos->tos] == stmt\n || parser_state_tos->p_stack[parser_state_tos->tos] == stmtl)\n {\n parser_state_tos->i_l_follow += settings.ind_size;\n }\n else if (parser_state_tos->p_stack[parser_state_tos->tos] == decl)\n {\n parser_state_tos->i_l_follow += settings.ind_size;\n if ( ( (parser_state_tos->last_rw == rw_struct_like) ||\n (parser_state_tos->last_rw == rw_enum)) &&\n ( (parser_state_tos->block_init != 1) ||\n (parser_state_tos->block_init_level == 0)) &&\n (parser_state_tos->last_token != rparen) &&\n (!settings.braces_on_struct_decl_line))\n {\n parser_state_tos->ind_level += settings.struct_brace_indent;\n parser_state_tos->i_l_follow += settings.struct_brace_indent;\n }\n }\n else if (parser_state_tos->p_stack[parser_state_tos->tos] == casestmt)\n {\n parser_state_tos->ind_level += settings.case_brace_indent - settings.ind_size;\n parser_state_tos->i_l_follow += settings.case_brace_indent;\n }\n else\n {\n if (s_code == e_code)\n {\n parser_state_tos->ind_level -= settings.ind_size;\n }\n if (!settings.btype_2)\n {\n parser_state_tos->ind_level += settings.brace_indent;\n parser_state_tos->i_l_follow += settings.brace_indent;\n }\n if (parser_state_tos->p_stack[parser_state_tos->tos] == swstmt)\n {\n parser_state_tos->i_l_follow += settings.case_indent;\n }\n }\n inc_pstack ();\n parser_state_tos->p_stack[parser_state_tos->tos] = lbrace;\n parser_state_tos->il[parser_state_tos->tos] = parser_state_tos->ind_level;\n inc_pstack ();\n parser_state_tos->p_stack[parser_state_tos->tos] = stmt;\n parser_state_tos->il[parser_state_tos->tos] = parser_state_tos->i_l_follow;\n break;\n case whilestmt:\n if (parser_state_tos->p_stack[parser_state_tos->tos] == dohead)\n {\n parser_state_tos->i_l_follow = parser_state_tos->il[parser_state_tos->tos];\n parser_state_tos->ind_level = parser_state_tos->il[parser_state_tos->tos];\n inc_pstack ();\n parser_state_tos->p_stack[parser_state_tos->tos] = whilestmt;\n parser_state_tos->ind_level = parser_state_tos->i_l_follow;\n parser_state_tos->il[parser_state_tos->tos] = parser_state_tos->i_l_follow;\n }\n else\n {\n inc_pstack ();\n parser_state_tos->p_stack[parser_state_tos->tos] = whilestmt;\n parser_state_tos->il[parser_state_tos->tos] = parser_state_tos->i_l_follow;\n parser_state_tos->i_l_follow += settings.ind_size;\n parser_state_tos->search_brace = settings.btype_2;\n }\n break;\n case elselit:\n if (parser_state_tos->p_stack[parser_state_tos->tos] != ifhead)\n {\n message(gettext(\"Error\"), gettext(\"Unmatched 'else'\"), (char *)(((void *)0)), (char *)(((void *)0)));\n }\n else\n {\n parser_state_tos->ind_level = parser_state_tos->il[parser_state_tos->tos];\n parser_state_tos->i_l_follow = (parser_state_tos->ind_level + settings.ind_size);\n parser_state_tos->p_stack[parser_state_tos->tos] = elsehead;\n parser_state_tos->search_brace = 1;\n }\n break;\n case rbrace:\n if ((parser_state_tos->tos > 0) && (parser_state_tos->p_stack[parser_state_tos->tos - 1] == lbrace))\n {\n parser_state_tos->i_l_follow = parser_state_tos->il[--parser_state_tos->tos];\n parser_state_tos->ind_level = parser_state_tos->i_l_follow;\n parser_state_tos->p_stack[parser_state_tos->tos] = stmt;\n }\n else\n {\n message(gettext(\"Error\"), gettext(\"Stmt nesting error.\"), (char *)(((void *)0)), (char *)(((void *)0)));\n }\n break;\n case swstmt:\n inc_pstack ();\n parser_state_tos->p_stack[parser_state_tos->tos] = swstmt;\n parser_state_tos->cstk[parser_state_tos->tos] = settings.case_indent + parser_state_tos->i_l_follow;\n if (!settings.btype_2)\n {\n parser_state_tos->cstk[parser_state_tos->tos] += settings.brace_indent;\n }\n parser_state_tos->il[parser_state_tos->tos] = parser_state_tos->i_l_follow;\n parser_state_tos->i_l_follow += settings.ind_size;\n parser_state_tos->search_brace = settings.btype_2;\n break;\n case semicolon:\n break_comma = 0;\n if (parser_state_tos->p_stack[parser_state_tos->tos] == dostmt)\n {\n parser_state_tos->p_stack[parser_state_tos->tos] = stmt;\n }\n else\n {\n inc_pstack ();\n parser_state_tos->p_stack[parser_state_tos->tos] = stmt;\n parser_state_tos->il[parser_state_tos->tos] = parser_state_tos->ind_level;\n }\n break;\n default:\n fatal (gettext(\"Unknown code to parser\"), 0);\n }\n reduce ();\n return total_success;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 17, "for_loop": 1, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 8}}, {"id": "transcoder-set#COUNT_DIGITS_FACTORIAL_SET_2_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "COUNT_DIGITS_FACTORIAL_SET_2.c", "function": "f_gold", "sloc": "6", "c_code": "long long f_gold ( int n ) {\n if ( n < 0 ) return 0;\n if ( n <= 1 ) return 1;\n double x = ( ( n * log10 ( n / 2.718282 ) + log10 ( 2 * 3.14159265358979323846 * n ) / 2.0 ) );\n return floor ( x ) + 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#tree_prep#xmlGetCompressMode.c", "codebase": "libxml2", "c_file": "tree.c", "function": "xmlGetCompressMode", "sloc": "5", "c_code": "int\nxmlGetCompressMode(void)\n{\n return (xmlCompressMode);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#ZECKENDORFS_THEOREM_NON_NEIGHBOURING_FIBONACCI_REPRESENTATION_prep#min.c", "codebase": "transcoder-set", "c_file": "ZECKENDORFS_THEOREM_NON_NEIGHBOURING_FIBONACCI_REPRESENTATION.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#mark_prep#gomark.c", "codebase": "less-633", "c_file": "mark.c", "function": "gomark", "sloc": "18", "c_code": "void gomark(LWCHAR c)\n{\n struct mark *m;\n struct scrpos scrpos;\n m = getmark(c);\n if (m == ((void *)0))\n return;\n if (m == &marks[(((2*26)+2)-1)] && m->m_scrpos.pos == ((POSITION)(-1)))\n cmark(m, curr_ifile, ((POSITION)0), jump_sline);\n mark_get_ifile(m);\n scrpos = m->m_scrpos;\n if (m->m_ifile != curr_ifile)\n {\n if (edit_ifile(m->m_ifile))\n return;\n }\n jump_loc(scrpos.pos, scrpos.ln);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS.c", "function": "f_gold", "sloc": "21", "c_code": "int f_gold ( int stack1 [ ], int stack2 [ ], int stack3 [ ], int n1, int n2, int n3 ) {\n int sum1 = 0, sum2 = 0, sum3 = 0;\n for ( int i = 0;\n i < n1;\n i ++ ) sum1 += stack1 [ i ];\n for ( int i = 0;\n i < n2;\n i ++ ) sum2 += stack2 [ i ];\n for ( int i = 0;\n i < n3;\n i ++ ) sum3 += stack3 [ i ];\n int top1 = 0, top2 = 0, top3 = 0;\n int ans = 0;\n while ( 1 ) {\n if ( top1 == n1 || top2 == n2 || top3 == n3 ) return 0;\n if ( sum1 == sum2 && sum2 == sum3 ) return sum1;\n if ( sum1 >= sum2 && sum1 >= sum3 ) sum1 -= stack1 [ top1 ++ ];\n else if ( sum2 >= sum3 && sum2 >= sum3 ) sum2 -= stack2 [ top2 ++ ];\n else if ( sum3 >= sum2 && sum3 >= sum1 ) sum3 -= stack3 [ top3 ++ ];\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 3, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_NODES_K_TH_LEVEL_TREE_REPRESENTED_STRING_prep#max.c", "codebase": "transcoder-set", "c_file": "SUM_NODES_K_TH_LEVEL_TREE_REPRESENTED_STRING.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "cpio-2.14#paxerror_prep#symlink_error.c", "codebase": "cpio-2.14", "c_file": "paxerror.c", "function": "symlink_error", "sloc": "6", "c_code": "void\nsymlink_error (char const *contents, char const *name)\n{\n int e = (*__errno_location ());\n do { if (error_hook) error_hook (); error (0, e, gettext (\"%s: Cannot create symlink to %s\"), quotearg_colon (name), quote_n (1, contents)); exit_status = 2; } while (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#misc_prep#unquote_string.c", "codebase": "tar-1.34", "c_file": "misc.c", "function": "unquote_string", "sloc": "86", "c_code": "int\nunquote_string (char *string)\n{\n int result = 1;\n char *source = string;\n char *destination = string;\n while (*source)\n if (*source == '\\\\')\n switch (*++source)\n {\n case '\\\\':\n *destination++ = '\\\\';\n source++;\n break;\n case 'a':\n *destination++ = '\\a';\n source++;\n break;\n case 'b':\n *destination++ = '\\b';\n source++;\n break;\n case 'f':\n *destination++ = '\\f';\n source++;\n break;\n case 'n':\n *destination++ = '\\n';\n source++;\n break;\n case 'r':\n *destination++ = '\\r';\n source++;\n break;\n case 't':\n *destination++ = '\\t';\n source++;\n break;\n case 'v':\n *destination++ = '\\v';\n source++;\n break;\n case '?':\n *destination++ = 0177;\n source++;\n break;\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n {\n int value = *source++ - '0';\n if (*source < '0' || *source > '7')\n {\n *destination++ = value;\n break;\n }\n value = value * 8 + *source++ - '0';\n if (*source < '0' || *source > '7')\n {\n *destination++ = value;\n break;\n }\n value = value * 8 + *source++ - '0';\n *destination++ = value;\n break;\n }\n default:\n result = 0;\n *destination++ = '\\\\';\n if (*source)\n *destination++ = *source++;\n break;\n }\n else if (source != destination)\n *destination++ = *source++;\n else\n source++, destination++;\n if (source != destination)\n *destination = '\\0';\n return result;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 1, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 13}}, {"id": "json.h#allow_json5_prep#json_extract_get_object_size.c", "codebase": "json.h", "c_file": "allow_json5.c", "function": "json_extract_get_object_size", "sloc": "21", "c_code": "struct json_extract_result_s\njson_extract_get_object_size(const struct json_object_s *const object) {\n struct json_extract_result_s result;\n size_t i;\n const struct json_object_element_s *element = object->start;\n result.dom_size = sizeof(struct json_object_s) +\n (sizeof(struct json_object_element_s) * object->length);\n result.data_size = 0;\n for (i = 0; i < object->length; i++) {\n const struct json_extract_result_s string_result =\n json_extract_get_string_size(element->name);\n const struct json_extract_result_s value_result =\n json_extract_get_value_size(element->value);\n result.dom_size += string_result.dom_size;\n result.data_size += string_result.data_size;\n result.dom_size += value_result.dom_size;\n result.data_size += value_result.data_size;\n element = element->next;\n }\n return result;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SEARCHING_ARRAY_ADJACENT_DIFFER_K_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "SEARCHING_ARRAY_ADJACENT_DIFFER_K.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#der-iterator_prep#nettle_asn1_der_iterator_first.c", "codebase": "nettle-3.9.1", "c_file": "der-iterator.c", "function": "nettle_asn1_der_iterator_first", "sloc": "7", "c_code": "enum asn1_iterator_result\nnettle_asn1_der_iterator_first(struct asn1_der_iterator *i,\n size_t length, const uint8_t *input)\n{\n asn1_der_iterator_init(i, length, input);\n return nettle_asn1_der_iterator_next(i);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#history_prep#write_list.c", "codebase": "nano-7.2", "c_file": "history.c", "function": "write_list", "sloc": "12", "c_code": "_Bool write_list(const linestruct *head, FILE *histfile)\n{\n const linestruct *item;\n for (item = head; item != ((void *)0); item = item->next) {\n size_t length = recode_LF_to_NUL(item->data);\n if (fwrite(item->data, 1, length, histfile) < length)\n return 0;\n if (putc('\\n', histfile) == (-1))\n return 0;\n }\n return 1;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "make-4.4.1#rule_prep#create_pattern_rule.c", "codebase": "make-4.4.1", "c_file": "rule.c", "function": "create_pattern_rule", "sloc": "23", "c_code": "void\ncreate_pattern_rule (const char **targets, const char **target_percents,\n unsigned short n, int terminal, struct dep *deps,\n struct commands *commands, int override)\n{\n unsigned int i;\n struct rule *r = xmalloc (sizeof (struct rule));\n r->num = n;\n r->cmds = commands;\n r->deps = deps;\n r->targets = targets;\n r->suffixes = target_percents;\n r->lens = xmalloc (n * sizeof (unsigned int));\n r->_defn = ((void *)0);\n for (i = 0; i < n; ++i)\n {\n r->lens[i] = (unsigned int) strlen (targets[i]);\n ((void) (0));\n ++r->suffixes[i];\n }\n if (new_pattern_rule (r, override))\n r->terminal = terminal ? 1 : 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 3, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#rsa-sha1-sign-tr_prep#nettle_rsa_sha1_sign_digest_tr.c", "codebase": "nettle-3.9.1", "c_file": "rsa-sha1-sign-tr.c", "function": "nettle_rsa_sha1_sign_digest_tr", "sloc": "17", "c_code": "int\nnettle_rsa_sha1_sign_digest_tr(const struct rsa_public_key *pub,\n const struct rsa_private_key *key,\n void *random_ctx, nettle_random_func *random,\n const uint8_t *digest,\n mpz_t s)\n{\n mpz_t m;\n int res;\n __gmpz_init (m);\n res = (nettle_pkcs1_rsa_sha1_encode_digest(m, key->size, digest)\n && nettle_rsa_compute_root_tr (pub, key,\n random_ctx, random,\n s, m));\n __gmpz_clear (m);\n return res;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#yarrow_key_event_prep#nettle_yarrow_key_event_estimate.c", "codebase": "nettle-3.9.1", "c_file": "yarrow_key_event.c", "function": "nettle_yarrow_key_event_estimate", "sloc": "23", "c_code": "unsigned\nnettle_yarrow_key_event_estimate(struct yarrow_key_event_ctx *ctx,\n unsigned key, unsigned time)\n{\n unsigned entropy = 0;\n unsigned i;\n if (ctx->previous && (time > ctx->previous) )\n {\n if ( (time - ctx->previous) >= 256)\n entropy++;\n }\n ctx->previous = time;\n if (!key)\n return entropy;\n for (i = 0; i < 16; i++)\n if (key == ctx->chars[i])\n return entropy;\n if (ctx->chars[ctx->index])\n entropy++;\n ctx->chars[ctx->index] = key;\n ctx->index = (ctx->index + 1) % 16;\n return entropy;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#nettle-benchmark_prep#main.c", "codebase": "nettle-3.9.1", "c_file": "nettle-benchmark.c", "function": "main", "sloc": "120", "c_code": "int\nmain(int argc, char **argv)\n{\n unsigned i;\n int c;\n const char *alg;\n nettle_openssl_init();\n const struct nettle_hash *hashes[] =\n {\n &nettle_md2, &nettle_md4, &nettle_md5,\n &nettle_openssl_md5,\n &nettle_sha1, &nettle_openssl_sha1,\n &nettle_sha224, &nettle_sha256,\n &nettle_sha384, &nettle_sha512,\n &nettle_sha512_224, &nettle_sha512_256,\n &nettle_sha3_224, &nettle_sha3_256,\n &nettle_sha3_384, &nettle_sha3_512,\n &nettle_ripemd160, &nettle_gosthash94,\n &nettle_gosthash94cp, &nettle_streebog256,\n &nettle_streebog512, &nettle_sm3,\n ((void *)0)\n };\n const struct nettle_cipher *ciphers[] =\n {\n &nettle_aes128, &nettle_aes192, &nettle_aes256,\n &nettle_openssl_aes128,\n &nettle_openssl_aes192,\n &nettle_openssl_aes256,\n &nettle_blowfish128, &nettle_openssl_blowfish128,\n &nettle_camellia128, &nettle_camellia192, &nettle_camellia256,\n &nettle_cast128, &nettle_openssl_cast128,\n &nettle_des, &nettle_openssl_des,\n &nettle_des3,\n &nettle_serpent256,\n &nettle_twofish128, &nettle_twofish192, &nettle_twofish256,\n &nettle_sm4,\n ((void *)0)\n };\n const struct nettle_aead *aeads[] =\n {\n &nettle_arcfour128,\n &nettle_salsa20, &nettle_salsa20r12, &nettle_chacha,\n &nettle_cbc_aes128, &nettle_cbc_aes192, &nettle_cbc_aes256,\n &nettle_gcm_aes128,\n &nettle_gcm_aes192,\n &nettle_gcm_aes256,\n &nettle_openssl_gcm_aes128,\n &nettle_openssl_gcm_aes192,\n &nettle_openssl_gcm_aes256,\n &nettle_gcm_camellia128,\n &nettle_gcm_camellia256,\n &nettle_eax_aes128,\n &nettle_chacha_poly1305,\n &nettle_ocb_aes128,\n ((void *)0)\n };\n enum { OPT_HELP = 300 };\n static const struct option options[] =\n {\n { \"help\", 0, ((void *)0), OPT_HELP },\n { \"clock-frequency\", 1, ((void *)0), 'f' },\n { ((void *)0), 0, ((void *)0), 0 }\n };\n while ( (c = getopt_long(argc, argv, \"f:\", options, ((void *)0))) != -1)\n switch (c)\n {\n case 'f':\n frequency = atof(optarg);\n if (frequency > 0.0)\n break;\n case OPT_HELP:\n printf(\"Usage: nettle-benchmark [-f clock frequency] [alg...]\\n\");\n return 0;\n case '?':\n return 1;\n default:\n abort();\n }\n time_init();\n bench_sha1_compress();\n bench_salsa20_core();\n bench_sha3_permute();\n bench_ghash_update();\n printf(\"\\n\");\n header();\n do\n {\n alg = argv[optind];\n if (!alg || strstr (\"memxor\", alg))\n {\n time_memxor();\n printf(\"\\n\");\n }\n for (i = 0; hashes[i]; i++)\n if (!alg || strstr(hashes[i]->name, alg))\n time_hash(hashes[i]);\n if (!alg || strstr (\"umac\", alg))\n time_umac();\n if (!alg || strstr (\"cmac\", alg))\n time_cmac();\n if (!alg || strstr (\"poly1305-aes\", alg))\n time_poly1305_aes();\n for (i = 0; ciphers[i]; i++)\n if (!alg || strstr(ciphers[i]->name, alg))\n time_cipher(ciphers[i]);\n for (i = 0; aeads[i]; i++)\n if (!alg || strstr(aeads[i]->name, alg))\n time_aead(aeads[i]);\n if (!alg || strstr (\"hmac-md5\", alg))\n time_hmac_md5();\n if (!alg || strstr (\"hmac-sha1\", alg))\n time_hmac_sha1();\n if (!alg || strstr (\"hmac-sha256\", alg))\n time_hmac_sha256();\n if (!alg || strstr (\"hmac-sha512\", alg))\n time_hmac_sha512();\n optind++;\n } while (alg && argv[optind]);\n return 0;\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 4, "struct_type": 3, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 0, "if_statement": 12, "for_loop": 3, "while_loop": 2, "switch_statement": 1, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 1}}, {"id": "libxml2#dict_prep#xmlCleanupRandom.c", "codebase": "libxml2", "c_file": "dict.c", "function": "xmlCleanupRandom", "sloc": "4", "c_code": "void\nxmlCleanupRandom(void) {\n xmlCleanupMutex(&xmlRngMutex);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_uri_prep#osip_uri_init.c", "codebase": "libosip2-5.3.1", "c_file": "osip_uri.c", "function": "osip_uri_init", "sloc": "14", "c_code": "int osip_uri_init(osip_uri_t **url) {\n *url = (osip_uri_t *) (osip_malloc_func ? osip_malloc_func(sizeof(osip_uri_t)) : malloc(sizeof(osip_uri_t)));\n if (*url == ((void *)0))\n return -4;\n (*url)->scheme = ((void *)0);\n (*url)->username = ((void *)0);\n (*url)->password = ((void *)0);\n (*url)->host = ((void *)0);\n (*url)->port = ((void *)0);\n osip_list_init(&(*url)->url_params);\n osip_list_init(&(*url)->url_headers);\n (*url)->string = ((void *)0);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "heman#vec4_prep#kmVec4Lerp.c", "codebase": "heman", "c_file": "vec4.c", "function": "kmVec4Lerp", "sloc": "7", "c_code": "kmVec4* kmVec4Lerp(kmVec4* pOut, const kmVec4* pV1, const kmVec4* pV2, float t) {\n pOut->x = pV1->x + t * ( pV2->x - pV1->x );\n pOut->y = pV1->y + t * ( pV2->y - pV1->y );\n pOut->z = pV1->z + t * ( pV2->z - pV1->z );\n pOut->w = pV1->w + t * ( pV2->w - pV1->w );\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_DIGITS_PRODUCT_TWO_NUMBERS_1_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "NUMBER_DIGITS_PRODUCT_TWO_NUMBERS_1.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int a, int b ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "dap-3.10#dappp_prep#get1c.c", "codebase": "dap-3.10", "c_file": "dappp.c", "function": "get1c", "sloc": "16", "c_code": "int get1c(FILE *fp)\n{\n int c;\n c = getc(fp);\n if (newline)\n {\n lineno++;\n column = 0;\n }\n else\n column++;\n newline = (c == '\\n');\n if (newline)\n pound = 0;\n return c;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_lag.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_lag", "sloc": "13", "c_code": "int ti_lag(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *input = inputs[0];\n const int period = (int)options[0];\n double *output = outputs[0];\n if (period < 0) return 1;\n if (size <= ti_lag_start(options)) return 0;\n int i;\n for (i = period; i < size; ++i) {\n *output++ = input[i-period];\n }\n ((void) sizeof ((output - outputs[0] == size - ti_lag_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_lag_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_lag_start(options)\", \"tiamalgamation.c\", 2691, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_port_prep#osip_strncasecmp.c", "codebase": "libosip2-5.3.1", "c_file": "osip_port.c", "function": "osip_strncasecmp", "sloc": "3", "c_code": "int osip_strncasecmp(const char *s1, const char *s2, size_t len) {\n return strncasecmp(s1, s2, len);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "findutils-4.9.0#util_prep#insert_primary_withpred.c", "codebase": "findutils-4.9.0", "c_file": "util.c", "function": "insert_primary_withpred", "sloc": "14", "c_code": "struct predicate *\ninsert_primary_withpred (const struct parser_table *entry,\n PRED_FUNC pred_func,\n const char *arg)\n{\n struct predicate *new_pred;\n new_pred = get_new_pred_chk_op (entry, arg);\n new_pred->pred_func = pred_func;\n new_pred->p_name = entry->parser_name;\n new_pred->args.str = ((void *)0);\n new_pred->p_type = PRIMARY_TYPE;\n new_pred->p_prec = NO_PREC;\n return new_pred;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlCatalogResolveSystem.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlCatalogResolveSystem", "sloc": "11", "c_code": "PyObject *\nlibxml_xmlCatalogResolveSystem(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlChar * c_retval;\n xmlChar * sysID;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"z:xmlCatalogResolveSystem\", &sysID))\n return(((void *)0));\n c_retval = xmlCatalogResolveSystem(sysID);\n py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#bignum-random_prep#nettle_mpz_random_size.c", "codebase": "nettle-3.9.1", "c_file": "bignum-random.c", "function": "nettle_mpz_random_size", "sloc": "14", "c_code": "void\nnettle_mpz_random_size(mpz_t x,\n void *ctx, nettle_random_func *random,\n unsigned bits)\n{\n unsigned length = (bits + 7) / 8;\n uint8_t *data; size_t tmp_data_size;\n do { tmp_data_size = (length); (data) = _nettle_gmp_alloc(sizeof (*data) * (length)); } while (0);\n random(ctx, length, data);\n nettle_mpz_set_str_256_u(x, length, data);\n if (bits % 8)\n __gmpz_fdiv_r_2exp(x, x, bits);\n (_nettle_gmp_free(data, tmp_data_size));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nano-7.2#nano_prep#disable_kb_interrupt.c", "codebase": "nano-7.2", "c_file": "nano.c", "function": "disable_kb_interrupt", "sloc": "7", "c_code": "void disable_kb_interrupt(void)\n{\n struct termios settings = {0};\n tcgetattr(0, &settings);\n settings.c_lflag &= ~0000001;\n tcsetattr(0, 0, &settings);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "screen-4.9.0#viewport_prep#RethinkDisplayViewports.c", "codebase": "screen-4.9.0", "c_file": "viewport.c", "function": "RethinkDisplayViewports", "sloc": "33", "c_code": "int RethinkDisplayViewports() {\n struct canvas *cv;\n struct viewport *vp, *vpn;\n for (cv = display->d_cvlist; cv; cv = cv->c_next) {\n for (vp = cv->c_vplist; vp; vp = vpn) {\n vp->v_canvas = 0;\n vpn = vp->v_next;\n bzero((char *)vp, sizeof(*vp));\n free(vp);\n }\n cv->c_vplist = 0;\n }\n display->d_vpxmin = -1;\n display->d_vpxmax = -1;\n for (cv = display->d_cvlist; cv; cv = cv->c_next) {\n if ((vp = (struct viewport *)malloc(sizeof *vp)) == 0)\n return -1;\n vp->v_canvas = cv;\n vp->v_xs = cv->c_xs;\n vp->v_ys = cv->c_ys;\n vp->v_xe = cv->c_xe;\n vp->v_ye = cv->c_ye;\n vp->v_xoff = cv->c_xoff;\n vp->v_yoff = cv->c_yoff;\n vp->v_next = cv->c_vplist;\n cv->c_vplist = vp;\n if (cv->c_xs < display->d_vpxmin || display->d_vpxmin == -1)\n display->d_vpxmin = cv->c_xs;\n if (cv->c_xe > display->d_vpxmax || display->d_vpxmax == -1)\n display->d_vpxmax = cv->c_xe;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 2, "memory_operation": 0, "if_statement": 3, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_json5_prep#json_write_pretty.c", "codebase": "json.h", "c_file": "allow_json5.c", "function": "json_write_pretty", "sloc": "42", "c_code": "void *json_write_pretty(const struct json_value_s *value, const char *indent,\n const char *newline, size_t *out_size) {\n size_t size = 0;\n size_t indent_size = 0;\n size_t newline_size = 0;\n char *data = 0;\n char *data_end = 0;\n if (0 == value) {\n return 0;\n }\n if (0 == indent) {\n indent = \" \";\n }\n if (0 == newline) {\n newline = \"\\n\";\n }\n while ('\\0' != indent[indent_size]) {\n ++indent_size;\n }\n while ('\\0' != newline[newline_size]) {\n ++newline_size;\n }\n if (json_write_pretty_get_value_size(value, 0, indent_size, newline_size,\n &size)) {\n return 0;\n }\n size += 1;\n data = (char *)malloc(size);\n if (0 == data) {\n return 0;\n }\n data_end = json_write_pretty_value(value, 0, indent, newline, data);\n if (0 == data_end) {\n free(data);\n return 0;\n }\n *data_end = '\\0';\n if (0 != out_size) {\n *out_size = size;\n }\n return data;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 2, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 2, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "enscript-1.6.6#utils_prep#enter_system_variable.c", "codebase": "enscript-1.6.6", "c_file": "utils.c", "function": "enter_system_variable", "sloc": "16", "c_code": "void\nenter_system_variable (name, value)\n char *name;\n char *value;\n{\n Node *n, *old_val;\n n = node_alloc (nSTRING);\n n->u.str.len = strlen (value);\n n->u.str.data = xstrdup (value);\n if (!strhash_put (ns_vars, name, strlen (name), n, (void **) &old_val))\n {\n fprintf (stderr, gettext (\"%s: out of memory\\n\"), program);\n exit (1);\n }\n node_free (old_val);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "less-633#ttyin_prep#default_wheel_lines.c", "codebase": "less-633", "c_file": "ttyin.c", "function": "default_wheel_lines", "sloc": "5", "c_code": "int default_wheel_lines(void)\n{\n int lines = 1;\n return lines;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#STEINS_ALGORITHM_FOR_FINDING_GCD_1_prep#main.c", "codebase": "transcoder-set", "c_file": "STEINS_ALGORITHM_FOR_FINDING_GCD_1.c", "function": "main", "sloc": "15", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {52,36,12,69,45,7,45,62,96,89};\n int param1[] = {29,94,6,7,11,51,55,86,63,12};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "wget-1.21.4#utils_prep#file_exists_p.c", "codebase": "wget-1.21.4", "c_file": "utils.c", "function": "file_exists_p", "sloc": "27", "c_code": "_Bool\nfile_exists_p (const char *filename, file_stats_t *fstats)\n{\n struct stat buf;\n if (!filename)\n return 0;\n (*__errno_location ()) = 0;\n if (stat (filename, &buf) == 0 && ((((buf.st_mode)) & 0170000) == (0100000)) &&\n (((0400 & buf.st_mode) && (getuid() == buf.st_uid)) ||\n (((0400 >> 3) & buf.st_mode) && group_member(buf.st_gid)) ||\n (((0400 >> 3) >> 3) & buf.st_mode))) {\n if (fstats != ((void *)0))\n {\n fstats->access_err = 0;\n fstats->st_ino = buf.st_ino;\n fstats->st_dev = buf.st_dev;\n }\n return 1;\n }\n else\n {\n if (fstats != ((void *)0))\n fstats->access_err = ((*__errno_location ()) == 0 ? 13 : (*__errno_location ()));\n (*__errno_location ()) = 0;\n return 0;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_authentication_info_prep#osip_authentication_info_to_str.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authentication_info.c", "function": "osip_authentication_info_to_str", "sloc": "114", "c_code": "int osip_authentication_info_to_str(const osip_authentication_info_t *ainfo, char **dest) {\n size_t len;\n char *tmp, *start;\n *dest = ((void *)0);\n if (ainfo == ((void *)0))\n return -2;\n len = 0;\n if (ainfo->auth_type != ((void *)0))\n len = len + strlen(ainfo->auth_type) + 1;\n if (ainfo->nextnonce != ((void *)0))\n len = len + strlen(ainfo->nextnonce) + 12;\n if (ainfo->rspauth != ((void *)0))\n len = len + strlen(ainfo->rspauth) + 10;\n if (ainfo->cnonce != ((void *)0))\n len = len + strlen(ainfo->cnonce) + 9;\n if (ainfo->nonce_count != ((void *)0))\n len = len + strlen(ainfo->nonce_count) + 5;\n if (ainfo->qop_options != ((void *)0))\n len = len + strlen(ainfo->qop_options) + 6;\n if (ainfo->snum != ((void *)0))\n len = len + strlen(ainfo->snum) + 7;\n if (ainfo->srand != ((void *)0))\n len = len + strlen(ainfo->srand) + 8;\n if (ainfo->targetname != ((void *)0))\n len = len + strlen(ainfo->targetname) + 13;\n if (ainfo->realm != ((void *)0))\n len = len + strlen(ainfo->realm) + 8;\n if (ainfo->opaque != ((void *)0))\n len = len + strlen(ainfo->opaque) + 9;\n if (len == 0)\n return -2;\n len++;\n tmp = (char *) (osip_malloc_func ? osip_malloc_func(len) : malloc(len));\n if (tmp == ((void *)0))\n return -4;\n *dest = tmp;\n start = tmp;\n if (ainfo->auth_type != ((void *)0)) {\n tmp = osip_str_append(tmp, ainfo->auth_type);\n tmp = osip_str_append(tmp, \" \");\n start = tmp;\n }\n if (ainfo->qop_options != ((void *)0)) {\n if (tmp != start) {\n tmp = osip_strn_append(tmp, \", \", 2);\n }\n tmp = osip_strn_append(tmp, \"qop=\", 4);\n tmp = osip_str_append(tmp, ainfo->qop_options);\n }\n if (ainfo->nextnonce != ((void *)0)) {\n if (tmp != start) {\n tmp = osip_strn_append(tmp, \", \", 2);\n }\n tmp = osip_strn_append(tmp, \"nextnonce=\", 10);\n tmp = osip_str_append(tmp, ainfo->nextnonce);\n }\n if (ainfo->rspauth != ((void *)0)) {\n if (tmp != start) {\n tmp = osip_strn_append(tmp, \", \", 2);\n }\n tmp = osip_strn_append(tmp, \"rspauth=\", 8);\n tmp = osip_str_append(tmp, ainfo->rspauth);\n }\n if (ainfo->cnonce != ((void *)0)) {\n if (tmp != start) {\n tmp = osip_strn_append(tmp, \", \", 2);\n }\n tmp = osip_strn_append(tmp, \"cnonce=\", 7);\n tmp = osip_str_append(tmp, ainfo->cnonce);\n }\n if (ainfo->nonce_count != ((void *)0)) {\n if (tmp != start) {\n tmp = osip_strn_append(tmp, \", \", 2);\n }\n tmp = osip_strn_append(tmp, \"nc=\", 3);\n tmp = osip_str_append(tmp, ainfo->nonce_count);\n }\n if (ainfo->snum != ((void *)0)) {\n if (tmp != start) {\n tmp = osip_strn_append(tmp, \", \", 2);\n }\n tmp = osip_strn_append(tmp, \"snum=\", 5);\n tmp = osip_str_append(tmp, ainfo->snum);\n }\n if (ainfo->srand != ((void *)0)) {\n if (tmp != start) {\n tmp = osip_strn_append(tmp, \", \", 2);\n }\n tmp = osip_strn_append(tmp, \"srand=\", 6);\n tmp = osip_str_append(tmp, ainfo->srand);\n }\n if (ainfo->targetname != ((void *)0)) {\n if (tmp != start) {\n tmp = osip_strn_append(tmp, \", \", 2);\n }\n tmp = osip_strn_append(tmp, \"targetname=\", 11);\n tmp = osip_str_append(tmp, ainfo->targetname);\n }\n if (ainfo->realm != ((void *)0)) {\n if (tmp != start) {\n tmp = osip_strn_append(tmp, \", \", 2);\n }\n tmp = osip_strn_append(tmp, \"realm=\", 6);\n tmp = osip_str_append(tmp, ainfo->realm);\n }\n if (ainfo->opaque != ((void *)0)) {\n if (tmp != start) {\n tmp = osip_strn_append(tmp, \", \", 2);\n }\n tmp = osip_strn_append(tmp, \"opaque=\", 7);\n tmp = osip_str_append(tmp, ainfo->opaque);\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 26, "memory_management": 1, "memory_operation": 0, "if_statement": 35, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#mh_prep#CalculateTotals.c", "codebase": "mcsim-6.2.0", "c_file": "mh.c", "function": "CalculateTotals", "sloc": "9", "c_code": "void CalculateTotals (PLEVEL plevel, char **args)\n{\n PANALYSIS panal = (PANALYSIS)args[0];\n double *pdLnPrior = (double*)args[1];\n long n;\n for (n = 0; n < plevel->nMCVars; n++) {\n *pdLnPrior += LnDensity(plevel->rgpMCVars[n], panal);\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "heman#aabb2_prep#kmAABB2ContainsAABB.c", "codebase": "heman", "c_file": "aabb2.c", "function": "kmAABB2ContainsAABB", "sloc": "18", "c_code": "unsigned int kmAABB2ContainsAABB(const kmAABB2* container, const kmAABB2* to_check) {\n kmVec2 corners[4];\n kmVec2Fill(&corners[0], to_check->min.x, to_check->min.y);\n kmVec2Fill(&corners[1], to_check->max.x, to_check->min.y);\n kmVec2Fill(&corners[2], to_check->max.x, to_check->max.y);\n kmVec2Fill(&corners[3], to_check->min.x, to_check->max.y);\n int nContains = kmAABB2ContainsPoint( container, &corners[0] ) +\n kmAABB2ContainsPoint( container, &corners[1] ) +\n kmAABB2ContainsPoint( container, &corners[2] ) +\n kmAABB2ContainsPoint( container, &corners[3] );\n if( nContains == 0 ){\n return (unsigned int)0;\n }else if( nContains < 4 ){\n return (unsigned int)1;\n }else{\n return (unsigned int)2;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#HEIGHT_COMPLETE_BINARY_TREE_HEAP_N_NODES_prep#sort.c", "codebase": "transcoder-set", "c_file": "HEIGHT_COMPLETE_BINARY_TREE_HEAP_N_NODES.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "make-4.4.1#hash_prep#hash_free_items.c", "codebase": "make-4.4.1", "c_file": "hash.c", "function": "hash_free_items", "sloc": "15", "c_code": "void\nhash_free_items (struct hash_table *ht)\n{\n void **vec = ht->ht_vec;\n void **end = &vec[ht->ht_size];\n for (; vec < end; vec++)\n {\n void *item = *vec;\n if (!((item) == 0 || (void *) (item) == hash_deleted_item))\n free (item);\n *vec = 0;\n }\n ht->ht_fill = 0;\n ht->ht_empty_slots = ht->ht_size;\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#parserInternals_prep#xmlCtxtErrIO.c", "codebase": "libxml2", "c_file": "parserInternals.c", "function": "xmlCtxtErrIO", "sloc": "32", "c_code": "void\nxmlCtxtErrIO(xmlParserCtxtPtr ctxt, int code, const char *uri)\n{\n const char *errstr, *msg, *str1, *str2;\n xmlErrorLevel level;\n if (ctxt == ((void *)0))\n return;\n if (((code == XML_IO_ENOENT) ||\n (code == XML_IO_UNKNOWN))) {\n if (ctxt->validate == 0)\n level = XML_ERR_WARNING;\n else\n level = XML_ERR_ERROR;\n } else if (code == XML_IO_NETWORK_ATTEMPT) {\n level = XML_ERR_ERROR;\n } else {\n level = XML_ERR_FATAL;\n }\n errstr = xmlErrString(code);\n if (uri == ((void *)0)) {\n msg = \"%s\\n\";\n str1 = errstr;\n str2 = ((void *)0);\n } else {\n msg = \"failed to load \\\"%s\\\": %s\\n\";\n str1 = uri;\n str2 = errstr;\n }\n xmlCtxtErr(ctxt, ((void *)0), XML_FROM_IO, code, level,\n (const xmlChar *) uri, ((void *)0), ((void *)0), 0,\n msg, str1, str2);\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "enscript-1.6.6#lex_prep#yy_scan_bytes.c", "codebase": "enscript-1.6.6", "c_file": "lex.c", "function": "yy_scan_bytes", "sloc": "19", "c_code": "YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )\n{\n YY_BUFFER_STATE b;\n char *buf;\n yy_size_t n;\n int i;\n n = _yybytes_len + 2;\n buf = (char *) yyalloc(n );\n if ( ! buf )\n yy_fatal_error( \"out of dynamic memory in yy_scan_bytes()\" );\n for ( i = 0; i < _yybytes_len; ++i )\n buf[i] = yybytes[i];\n buf[_yybytes_len] = buf[_yybytes_len+1] = 0;\n b = yy_scan_buffer(buf,n );\n if ( ! b )\n yy_fatal_error( \"bad buffer in yy_scan_bytes()\" );\n b->yy_is_our_buffer = 1;\n return b;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsBoxDrawing.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsBoxDrawing", "sloc": "4", "c_code": "int\nxmlUCSIsBoxDrawing(int code) {\n return(((code >= 0x2500) && (code <= 0x257F)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlregexp_prep#xmlAutomataNewCountedTrans.c", "codebase": "libxml2", "c_file": "xmlregexp.c", "function": "xmlAutomataNewCountedTrans", "sloc": "10", "c_code": "xmlAutomataStatePtr\nxmlAutomataNewCountedTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,\n xmlAutomataStatePtr to, int counter) {\n if ((am == ((void *)0)) || (from == ((void *)0)) || (counter < 0))\n return(((void *)0));\n xmlFAGenerateCountedEpsilonTransition(am, from, to, counter);\n if (to == ((void *)0))\n return(am->state);\n return(to);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tar-1.34#argp-fmtstream_prep#argp_make_fmtstream.c", "codebase": "tar-1.34", "c_file": "argp-fmtstream.c", "function": "argp_make_fmtstream", "sloc": "28", "c_code": "argp_fmtstream_t\nargp_make_fmtstream (FILE *stream,\n size_t lmargin, size_t rmargin, ssize_t wmargin)\n{\n argp_fmtstream_t fs;\n fs = (struct argp_fmtstream *) malloc (sizeof (struct argp_fmtstream));\n if (fs != ((void *)0))\n {\n fs->stream = stream;\n fs->lmargin = lmargin;\n fs->rmargin = rmargin;\n fs->wmargin = wmargin;\n fs->point_col = 0;\n fs->point_offs = 0;\n fs->buf = (char *) malloc (200);\n if (! fs->buf)\n {\n free (fs);\n fs = 0;\n }\n else\n {\n fs->p = fs->buf;\n fs->end = fs->buf + 200;\n }\n }\n return fs;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 3, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#decode_prep#add_hometable.c", "codebase": "less-633", "c_file": "decode.c", "function": "add_hometable", "sloc": "32", "c_code": "int add_hometable(int (*call_lesskey)(char *, int), char *envname, char *def_filename, int sysvar)\n{\n char *filename;\n int r;\n if (envname != ((void *)0) && (filename = lgetenv(envname)) != ((void *)0))\n filename = save(filename);\n else if (sysvar)\n filename = save(def_filename);\n else\n {\n char *xdg = lgetenv(\"XDG_CONFIG_HOME\");\n if (!isnullenv(xdg))\n filename = dirfile(xdg, &def_filename[1], 1);\n if (filename == ((void *)0))\n {\n char *home = lgetenv(\"HOME\");\n if (!isnullenv(home))\n {\n char *cfg_dir = dirfile(home, \".config\", 0);\n filename = dirfile(cfg_dir, &def_filename[1], 1);\n free(cfg_dir);\n }\n }\n if (filename == ((void *)0))\n filename = homefile(def_filename);\n }\n if (filename == ((void *)0))\n return -1;\n r = (*call_lesskey)(filename, sysvar);\n free(filename);\n return (r);\n}\n", "c_constructs": {"pointer_type": 4, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 2, "type_casting": 4, "memory_management": 2, "memory_operation": 0, "if_statement": 7, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "brotli-1.0.9#dictionary_prep#BrotliSetDictionaryData.c", "codebase": "brotli-1.0.9", "c_file": "dictionary.c", "function": "BrotliSetDictionaryData", "sloc": "3", "c_code": "void BrotliSetDictionaryData(const uint8_t* data) {\n (void)(data);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "units-2.22#parse.tab_prep#unitserror.c", "codebase": "units-2.22", "c_file": "parse.tab.c", "function": "unitserror", "sloc": "1", "c_code": "void unitserror(struct commtype *comm, char *s){}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_linregintercept_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_linregintercept_start", "sloc": "3", "c_code": "int ti_linregintercept_start(double const *options) {\n return (int)options[0]-1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#paxnames_prep#removed_prefixes_p.c", "codebase": "tar-1.34", "c_file": "paxnames.c", "function": "removed_prefixes_p", "sloc": "6", "c_code": "_Bool\nremoved_prefixes_p (void)\n{\n return (prefix_table[0] && hash_get_n_entries (prefix_table[0]) != 0)\n || (prefix_table[1] && hash_get_n_entries (prefix_table[1]) != 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#WAYS_REMOVE_ONE_ELEMENT_BINARY_STRING_XOR_BECOMES_ZERO_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "WAYS_REMOVE_ONE_ELEMENT_BINARY_STRING_XOR_BECOMES_ZERO.c", "function": "f_gold", "sloc": "10", "c_code": "int f_gold ( char str [] ) {\n int one_count = 0, zero_count = 0;\n int n = strlen(str);\n for ( int i = 0;\n i < n;\n i ++ ) if ( str [ i ] == '1' ) one_count ++;\n else zero_count ++;\n if ( one_count % 2 == 0 ) return zero_count;\n return one_count;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#parserInternals_prep#xmlSwitchToEncoding.c", "codebase": "libxml2", "c_file": "parserInternals.c", "function": "xmlSwitchToEncoding", "sloc": "13", "c_code": "int\nxmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler)\n{\n int code;\n if (ctxt == ((void *)0))\n return(-1);\n code = xmlInputSetEncodingHandler(ctxt->input, handler);\n if (code != XML_ERR_OK) {\n xmlCtxtErrIO(ctxt, code, ((void *)0));\n return(-1);\n }\n return(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlCtxtReadMemory.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlCtxtReadMemory", "sloc": "13", "c_code": "xmlDocPtr\nxmlCtxtReadMemory(xmlParserCtxtPtr ctxt, const char *buffer, int size,\n const char *URL, const char *encoding, int options)\n{\n xmlParserInputPtr input;\n if ((ctxt == ((void *)0)) || (size < 0))\n return(((void *)0));\n xmlCtxtReset(ctxt);\n xmlCtxtUseOptions(ctxt, options);\n input = xmlCtxtNewInputFromMemory(ctxt, URL, buffer, size, encoding,\n (1 << 1));\n return(xmlCtxtParseDocument(ctxt, input));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#HOW_TO_PRINT_MAXIMUM_NUMBER_OF_A_USING_GIVEN_FOUR_KEYS_prep#max.c", "codebase": "transcoder-set", "c_file": "HOW_TO_PRINT_MAXIMUM_NUMBER_OF_A_USING_GIVEN_FOUR_KEYS.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_FIBONACCI_NUMBERS_GIVEN_RANGE_LOG_TIME_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "COUNT_FIBONACCI_NUMBERS_GIVEN_RANGE_LOG_TIME.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngget_prep#png_get_image_width.c", "codebase": "optipng-0.7.8", "c_file": "pngget.c", "function": "png_get_image_width", "sloc": "7", "c_code": "png_uint_32\npng_get_image_width(png_const_structrp png_ptr, png_const_inforp info_ptr)\n{\n if (png_ptr != ((void *)0) && info_ptr != ((void *)0))\n return info_ptr->width;\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW_prep#min.c", "codebase": "transcoder-set", "c_file": "COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE_prep#min.c", "codebase": "transcoder-set", "c_file": "PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_body_prep#osip_message_set_body.c", "codebase": "libosip2-5.3.1", "c_file": "osip_body.c", "function": "osip_message_set_body", "sloc": "15", "c_code": "int osip_message_set_body(osip_message_t *sip, const char *buf, size_t length) {\n osip_body_t *body;\n int i;\n i = osip_body_init(&body);\n if (i != 0)\n return i;\n i = osip_body_parse(body, buf, length);\n if (i != 0) {\n osip_body_free(body);\n return i;\n }\n sip->message_property = 2;\n osip_list_add(&sip->bodies, body, -1);\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "json.h#allow_leading_or_trailing_decimal_point_prep#json_write_minified_get_array_size.c", "codebase": "json.h", "c_file": "allow_leading_or_trailing_decimal_point.c", "function": "json_write_minified_get_array_size", "sloc": "14", "c_code": "int json_write_minified_get_array_size(const struct json_array_s *array,\n size_t *size) {\n struct json_array_element_s *element;\n *size += 2;\n if (1 < array->length) {\n *size += array->length - 1;\n }\n for (element = array->start; 0 != element; element = element->next) {\n if (json_write_minified_get_value_size(element->value, size)) {\n return 1;\n }\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Check_For_Un_In_Byte.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Check_For_Un_In_Byte", "sloc": "5", "c_code": "void\nPl_Check_For_Un_In_Byte(WamWord start_word)\n{\n WamWord word, tag_mask; PlLong c; do { WamWord deref_last_word; word = start_word; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0); c = ((PlLong) ((word) << 0) >> 3); if (tag_mask != (PlULong)0 && (tag_mask != (PlULong)0x7 || (c != -1 && !((PlULong) (c) < 256)))) Pl_Err_Type(pl_type_in_byte, word);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 1}}, {"id": "transcoder-set#PERFECT_REVERSIBLE_STRING_prep#max.c", "codebase": "transcoder-set", "c_file": "PERFECT_REVERSIBLE_STRING.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlInitializeCatalog.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlInitializeCatalog", "sloc": "6", "c_code": "PyObject *\nlibxml_xmlInitializeCatalog(PyObject *self __attribute__ ((__unused__)), PyObject *args __attribute__ ((__unused__))) {\n xmlInitializeCatalog();\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#names_prep#uname_to_uid.c", "codebase": "tar-1.34", "c_file": "names.c", "function": "uname_to_uid", "sloc": "26", "c_code": "int\nuname_to_uid (char const *uname, uid_t *uidp)\n{\n struct passwd *passwd;\n if (cached_no_such_uname\n && strcmp (uname, cached_no_such_uname) == 0)\n return 0;\n if (!cached_uname\n || uname[0] != cached_uname[0]\n || strcmp (uname, cached_uname) != 0)\n {\n passwd = getpwnam (uname);\n if (passwd)\n {\n cached_uid = passwd->pw_uid;\n assign_string (&cached_uname, passwd->pw_name);\n }\n else\n {\n assign_string (&cached_no_such_uname, uname);\n return 0;\n }\n }\n *uidp = cached_uid;\n return 1;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#pbkdf2_prep#nettle_pbkdf2.c", "codebase": "nettle-3.9.1", "c_file": "pbkdf2.c", "function": "nettle_pbkdf2", "sloc": "41", "c_code": "void\nnettle_pbkdf2 (void *mac_ctx,\n nettle_hash_update_func *update,\n nettle_hash_digest_func *digest,\n size_t digest_size, unsigned iterations,\n size_t salt_length, const uint8_t *salt,\n size_t length, uint8_t *dst)\n{\n uint8_t *U;\n uint8_t *T;\n unsigned i;\n ((void) sizeof ((iterations > 0) ? 1 : 0), __extension__ ({ if (iterations > 0) ; else __assert_fail (\"iterations > 0\", \"pbkdf2.c\", 61, __extension__ __PRETTY_FUNCTION__); }));\n if (length == 0)\n return;\n (U = __builtin_alloca (sizeof (*U) * (digest_size)));\n (T = __builtin_alloca (sizeof (*T) * (digest_size)));\n for (i = 1;;\n i++, dst += digest_size, length -= digest_size)\n {\n uint8_t tmp[4];\n uint8_t *prev;\n unsigned u;\n do { (tmp)[0] = ((i) >> 24) & 0xff; (tmp)[1] = ((i) >> 16) & 0xff; (tmp)[2] = ((i) >> 8) & 0xff; (tmp)[3] = (i) & 0xff; } while(0);\n update (mac_ctx, salt_length, salt);\n update (mac_ctx, sizeof(tmp), tmp);\n digest (mac_ctx, digest_size, T);\n prev = T;\n for (u = 1; u < iterations; u++, prev = U)\n {\n update (mac_ctx, digest_size, prev);\n digest (mac_ctx, digest_size, U);\n nettle_memxor (T, U, digest_size);\n }\n if (length <= digest_size)\n {\n memcpy (dst, T, length);\n return;\n }\n memcpy (dst, T, digest_size);\n }\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 2, "if_statement": 3, "for_loop": 2, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#os_interf_c_prep#Pl_Unlink_1.c", "codebase": "gprolog-1.5.0", "c_file": "os_interf_c.c", "function": "Pl_Unlink_1", "sloc": "7", "c_code": "void\nPl_Unlink_1(WamWord path_name_word)\n{\n char *path_name;\n path_name = Get_Path_Name(path_name_word);\n unlink(path_name);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathFreeCompExpr.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathFreeCompExpr", "sloc": "37", "c_code": "void\nxmlXPathFreeCompExpr(xmlXPathCompExprPtr comp)\n{\n xmlXPathStepOpPtr op;\n int i;\n if (comp == ((void *)0))\n return;\n if (comp->dict == ((void *)0)) {\n for (i = 0; i < comp->nbStep; i++) {\n op = &comp->steps[i];\n if (op->value4 != ((void *)0)) {\n if (op->op == XPATH_OP_VALUE)\n xmlXPathFreeObject(op->value4);\n else\n xmlFree(op->value4);\n }\n if (op->value5 != ((void *)0))\n xmlFree(op->value5);\n }\n } else {\n for (i = 0; i < comp->nbStep; i++) {\n op = &comp->steps[i];\n if (op->value4 != ((void *)0)) {\n if (op->op == XPATH_OP_VALUE)\n xmlXPathFreeObject(op->value4);\n }\n }\n xmlDictFree(comp->dict);\n }\n if (comp->steps != ((void *)0)) {\n xmlFree(comp->steps);\n }\n if (comp->expr != ((void *)0)) {\n xmlFree(comp->expr);\n }\n xmlFree(comp);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 0, "if_statement": 9, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FINDING_POWER_PRIME_NUMBER_P_N_1_prep#min.c", "codebase": "transcoder-set", "c_file": "FINDING_POWER_PRIME_NUMBER_P_N_1.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_abs_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_abs_start", "sloc": "1", "c_code": "int ti_abs_start(double const *options) { (void)options; return 0; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#list_prep#xmlListSort.c", "codebase": "libxml2", "c_file": "list.c", "function": "xmlListSort", "sloc": "15", "c_code": "void\nxmlListSort(xmlListPtr l)\n{\n xmlListPtr lTemp;\n if (l == ((void *)0))\n return;\n if(xmlListEmpty(l))\n return;\n lTemp = xmlListDup(l);\n if (lTemp == ((void *)0))\n return;\n xmlListClear(l);\n xmlListMerge(l, lTemp);\n xmlListDelete(lTemp);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#buf_prep#xmlBufBackToBuffer.c", "codebase": "libxml2", "c_file": "buf.c", "function": "xmlBufBackToBuffer", "sloc": "25", "c_code": "int\nxmlBufBackToBuffer(xmlBufPtr buf, xmlBufferPtr ret) {\n if ((buf == ((void *)0)) || (ret == ((void *)0)))\n return(-1);\n if ((((buf)->flags & ((1u << 0) | (1u << 1)))) || (((buf)->flags & (1u << 2))) ||\n (buf->use >= 0x7fffffff)) {\n xmlBufFree(buf);\n ret->content = ((void *)0);\n ret->contentIO = ((void *)0);\n ret->use = 0;\n ret->size = 0;\n return(-1);\n }\n ret->use = buf->use;\n if (buf->size >= 0x7fffffff) {\n ret->size = 0x7fffffff;\n } else {\n ret->size = buf->size + 1;\n }\n ret->alloc = XML_BUFFER_ALLOC_IO;\n ret->content = buf->content;\n ret->contentIO = buf->mem;\n xmlFree(buf);\n return(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_THE_MAXIMUM_ELEMENT_IN_AN_ARRAY_WHICH_IS_FIRST_INCREASING_AND_THEN_DECREASING_prep#sort.c", "codebase": "transcoder-set", "c_file": "FIND_THE_MAXIMUM_ELEMENT_IN_AN_ARRAY_WHICH_IS_FIRST_INCREASING_AND_THEN_DECREASING.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#xlink_prep#xlinkGetDefaultDetect.c", "codebase": "libxml2", "c_file": "xlink.c", "function": "xlinkGetDefaultDetect", "sloc": "4", "c_code": "xlinkNodeDetectFunc\nxlinkGetDefaultDetect (void) {\n return(xlinkDefaultDetect);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlRegexpIsDeterminist.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlRegexpIsDeterminist", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlRegexpIsDeterminist(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n xmlRegexpPtr comp;\n PyObject *pyobj_comp;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlRegexpIsDeterminist\", &pyobj_comp))\n return(((void *)0));\n comp = (xmlRegexpPtr) (((pyobj_comp) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlReg_Object *)(pyobj_comp))->obj));\n c_retval = xmlRegexpIsDeterminist(comp);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_POSITION_GIVEN_NUMBER_AMONG_NUMBERS_MADE_4_7_prep#main.c", "codebase": "transcoder-set", "c_file": "FIND_POSITION_GIVEN_NUMBER_AMONG_NUMBERS_MADE_4_7.c", "function": "main", "sloc": "13", "c_code": "int main(void) {\n int n_success = 0;\n char param0[][100] = {\"7\",\"305745689\",\"444\",\"4\",\"2074\",\"27\",\"447\",\"255\",\"10000111111011\",\"fAKcSDRTNz\"};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_equals_in_object_prep#json_write_minified_array.c", "codebase": "json.h", "c_file": "allow_equals_in_object.c", "function": "json_write_minified_array", "sloc": "15", "c_code": "char *json_write_minified_array(const struct json_array_s *array, char *data) {\n struct json_array_element_s *element = 0;\n *data++ = '[';\n for (element = array->start; 0 != element; element = element->next) {\n if (element != array->start) {\n *data++ = ',';\n }\n data = json_write_minified_value(element->value, data);\n if (0 == data) {\n return 0;\n }\n }\n *data++ = ']';\n return data;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#ma2asm_inst_prep#C_Ret.c", "codebase": "gprolog-1.5.0", "c_file": "ma2asm_inst.c", "function": "C_Ret", "sloc": "7", "c_code": "void\nC_Ret(void)\n{\n Inst_Printf(\"addq\", \"$%d, %%rsp\", 32 * 8);\n Inst_Printf(\"popq\", \"%%rbx\");\n Inst_Printf(\"ret\", \"%s\", \"\");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FRIENDS_PAIRING_PROBLEM_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "FRIENDS_PAIRING_PROBLEM.c", "function": "f_gold", "sloc": "10", "c_code": "int f_gold ( int n ) {\n int dp [ n + 1 ];\n for ( int i = 0;\n i <= n;\n i ++ ) {\n if ( i <= 2 ) dp [ i ] = i;\n else dp [ i ] = dp [ i - 1 ] + ( i - 1 ) * dp [ i - 2 ];\n }\n return dp [ n ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#LONGEST_SUBSEQUENCE_SUCH_THAT_DIFFERENCE_BETWEEN_ADJACENTS_IS_ONE_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "LONGEST_SUBSEQUENCE_SUCH_THAT_DIFFERENCE_BETWEEN_ADJACENTS_IS_ONE.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "brotli-1.0.9#decode_prep#BrotliDecoderVersion.c", "codebase": "brotli-1.0.9", "c_file": "decode.c", "function": "BrotliDecoderVersion", "sloc": "3", "c_code": "uint32_t BrotliDecoderVersion() {\n return 0x1000009;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlAddDtdEntity.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlAddDtdEntity", "sloc": "18", "c_code": "PyObject *\nlibxml_xmlAddDtdEntity(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlEntityPtr c_retval;\n xmlDocPtr doc;\n PyObject *pyobj_doc;\n xmlChar * name;\n int type;\n xmlChar * ExternalID;\n xmlChar * SystemID;\n xmlChar * content;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Ozizzz:xmlAddDtdEntity\", &pyobj_doc, &name, &type, &ExternalID, &SystemID, &content))\n return(((void *)0));\n doc = (xmlDocPtr) (((pyobj_doc) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_doc))->obj));\n c_retval = xmlAddDtdEntity(doc, name, type, ExternalID, SystemID, content);\n py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_authorization_prep#osip_authorization_set_crand.c", "codebase": "libosip2-5.3.1", "c_file": "osip_authorization.c", "function": "osip_authorization_set_crand", "sloc": "3", "c_code": "void osip_authorization_set_crand(osip_authorization_t *authorization, char *crand) {\n authorization->crand = (char *) crand;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#ANALYSIS_OF_ALGORITHMS_SET_2_ASYMPTOTIC_ANALYSIS_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "ANALYSIS_OF_ALGORITHMS_SET_2_ASYMPTOTIC_ANALYSIS.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int n, int x ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#mul_prep#ti_mul.c", "codebase": "tulipindicators-0.9.1", "c_file": "mul.c", "function": "ti_mul", "sloc": "1", "c_code": "int ti_mul(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *in1 = inputs[0]; const double *in2 = inputs[1]; (void)options; double *output = outputs[0]; int i; for (i = 0; i < size; ++i) { output[i] = (in1[i] * in2[i]); } return 0; }\n", "c_constructs": {"pointer_type": 4, "array_type": 5, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#rcsfnms_prep#rcsreadopen.c", "codebase": "rcs-5.10.1", "c_file": "rcsfnms.c", "function": "rcsreadopen", "sloc": "5", "c_code": "struct fro *\nrcsreadopen (struct maybe *m)\n{\n return fro_open (m->tentative.string, \"r\", m->status);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "bc-1.07.1#number_prep#bc_free_num.c", "codebase": "bc-1.07.1", "c_file": "number.c", "function": "bc_free_num", "sloc": "13", "c_code": "void\nbc_free_num (bc_num *num)\n{\n if (*num == ((void *)0)) return;\n (*num)->n_refs--;\n if ((*num)->n_refs == 0) {\n if ((*num)->n_ptr)\n free ((*num)->n_ptr);\n (*num)->n_next = _bc_Free_list;\n _bc_Free_list = *num;\n }\n *num = ((void *)0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 1, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#options_prep#options_get_string.c", "codebase": "tmux", "c_file": "options.c", "function": "options_get_string", "sloc": "11", "c_code": "const char *\noptions_get_string(struct options *oo, const char *name)\n{\n struct options_entry *o;\n o = options_get(oo, name);\n if (o == ((void *)0))\n fatalx(\"missing option %s\", name);\n if (!((o)->tableentry == ((void *)0) || (o)->tableentry->type == OPTIONS_TABLE_STRING))\n fatalx(\"option %s is not a string\", name);\n return (o->string);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CALCULATE_ANGLE_HOUR_HAND_MINUTE_HAND_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "CALCULATE_ANGLE_HOUR_HAND_MINUTE_HAND.c", "function": "f_gold", "sloc": "10", "c_code": "int f_gold ( double h, double m ) {\n if ( h < 0 || m < 0 || h > 12 || m > 60 ) printf ( \"Wrong input\" );\n if ( h == 12 ) h = 0;\n if ( m == 60 ) m = 0;\n int hour_angle = 0.5 * ( h * 60 + m );\n int minute_angle = 6 * m;\n int angle = abs ( hour_angle - minute_angle );\n angle = min ( 360 - angle, angle );\n return angle;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#hmac-sha512_prep#nettle_hmac_sha512_digest.c", "codebase": "nettle-3.9.1", "c_file": "hmac-sha512.c", "function": "nettle_hmac_sha512_digest", "sloc": "6", "c_code": "void\nnettle_hmac_sha512_digest(struct hmac_sha512_ctx *ctx,\n size_t length, uint8_t *digest)\n{\n nettle_hmac_digest( &(ctx)->outer, &(ctx)->inner, &(ctx)->state, (&nettle_sha512), (length), (digest) );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#config_prep#check_number_parse_errno.c", "codebase": "mtools-4.0.43", "c_file": "config.c", "function": "check_number_parse_errno", "sloc": "11", "c_code": "void check_number_parse_errno(char c, const char *oarg, char *endptr) {\n if(endptr && *endptr) {\n fprintf(stderr, \"Bad number %s\\n\", oarg);\n exit(1);\n }\n if((*__errno_location ())) {\n fprintf(stderr, \"Bad number %s for -%c (%s)\\n\", oarg,\n c, strerror((*__errno_location ())));\n exit(1);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsCatSc.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsCatSc", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsCatSc(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsCatSc\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsCatSc\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsCatSc(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tinycc#tccelf_prep#tccelf_delete.c", "codebase": "tinycc", "c_file": "tccelf.c", "function": "tccelf_delete", "sloc": "18", "c_code": "void tccelf_delete(TCCState *s1)\n{\n int i;\n for(i = 1; i < s1->nb_sections; i++)\n free_section(s1->sections[i]);\n dynarray_reset(&s1->sections, &s1->nb_sections);\n for(i = 0; i < s1->nb_priv_sections; i++)\n free_section(s1->priv_sections[i]);\n dynarray_reset(&s1->priv_sections, &s1->nb_priv_sections);\n for ( i = 0; i < s1->nb_loaded_dlls; i++) {\n DLLReference *ref = s1->loaded_dlls[i];\n if ( ref->handle )\n dlclose(ref->handle);\n }\n dynarray_reset(&s1->loaded_dlls, &s1->nb_loaded_dlls);\n tcc_free(s1->sym_attrs);\n symtab_section = ((void *)0);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 3, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_content_type_prep#osip_content_type_init.c", "codebase": "libosip2-5.3.1", "c_file": "osip_content_type.c", "function": "osip_content_type_init", "sloc": "9", "c_code": "int osip_content_type_init(osip_content_type_t **content_type) {\n *content_type = (osip_content_type_t *) (osip_malloc_func ? osip_malloc_func(sizeof(osip_content_type_t)) : malloc(sizeof(osip_content_type_t)));\n if (*content_type == ((void *)0))\n return -4;\n (*content_type)->type = ((void *)0);\n (*content_type)->subtype = ((void *)0);\n osip_list_init(&(*content_type)->gen_params);\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#sha512_prep#nettle_sha512_update.c", "codebase": "nettle-3.9.1", "c_file": "sha512.c", "function": "nettle_sha512_update", "sloc": "6", "c_code": "void\nnettle_sha512_update(struct sha512_ctx *ctx,\n size_t length, const uint8_t *data)\n{\n do { if ((ctx)->index) { unsigned __md_left = sizeof((ctx)->block) - (ctx)->index; if ((length) < __md_left) { memcpy((ctx)->block + (ctx)->index, (data), (length)); (ctx)->index += (length); goto __md_done; } else { memcpy((ctx)->block + (ctx)->index, (data), __md_left); (nettle_sha512_compress(((ctx))->state, ((ctx)->block))); (((ctx)->count_high += !++(ctx)->count_low)); (data) += __md_left; (length) -= __md_left; } } while ((length) >= sizeof((ctx)->block)) { (nettle_sha512_compress(((ctx))->state, ((data)))); (((ctx)->count_high += !++(ctx)->count_low)); (data) += sizeof((ctx)->block); (length) -= sizeof((ctx)->block); } memcpy ((ctx)->block, (data), (length)); (ctx)->index = (length); __md_done: ; } while (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 1, "return_statement": 0, "break_continue_statement": 0}}, {"id": "patch-2.7.6#fcntl_prep#rpl_fcntl.c", "codebase": "patch-2.7.6", "c_file": "fcntl.c", "function": "rpl_fcntl", "sloc": "52", "c_code": "int\nrpl_fcntl (int fd, int action, ...)\n{\n va_list arg;\n int result = -1;\n __builtin_va_start(arg,action);\n switch (action)\n {\n case 1030:\n {\n int target = __builtin_va_arg(arg,int);\n static int have_dupfd_cloexec = 0 ? -1 : 0;\n if (0 <= have_dupfd_cloexec)\n {\n result = fcntl (fd, action, target);\n if (0 <= result || (*__errno_location ()) != 22)\n {\n have_dupfd_cloexec = 1;\n }\n else\n {\n result = rpl_fcntl (fd, 0, target);\n if (result < 0)\n break;\n have_dupfd_cloexec = -1;\n }\n }\n else\n result = rpl_fcntl (fd, 0, target);\n if (0 <= result && have_dupfd_cloexec == -1)\n {\n int flags = fcntl (result, 1);\n if (flags < 0 || fcntl (result, 2, flags | 1) == -1)\n {\n int saved_errno = (*__errno_location ());\n close (result);\n (*__errno_location ()) = saved_errno;\n result = -1;\n }\n }\n break;\n }\n default:\n {\n void *p = __builtin_va_arg(arg,void *);\n result = fcntl (fd, action, p);\n break;\n }\n }\n __builtin_va_end(arg);\n return result;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 3}}, {"id": "less-633#output_prep#inttoa.c", "codebase": "less-633", "c_file": "output.c", "function": "inttoa", "sloc": "1", "c_code": "void inttoa(int num, char *buf, int radix) { int neg = (num < 0); char tbuf[((sizeof(num) * 8 - 1) * 302 / 1000 + 1 + 1)+2]; char *s = tbuf + sizeof(tbuf); if (neg) num = -num; *--s = '\\0'; do { *--s = \"0123456789ABCDEF\"[num % radix]; } while ((num /= radix) != 0); if (neg) *--s = '-'; strcpy(buf, s); }\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "less-633#ch_prep#ch_seek.c", "codebase": "less-633", "c_file": "ch.c", "function": "ch_seek", "sloc": "27", "c_code": "int ch_seek(POSITION pos)\n{\n BLOCKNUM new_block;\n POSITION len;\n if (thisfile == ((void *)0))\n return (0);\n len = ch_length();\n if (pos < ((POSITION)0) || (len != ((POSITION)(-1)) && pos > len))\n return (1);\n new_block = pos / 8192;\n if (!(thisfile->flags & 001) && pos != thisfile->fpos && !buffered(new_block))\n {\n if (thisfile->fpos > pos)\n return (1);\n while (thisfile->fpos < pos)\n {\n if (ch_forw_get() == (-1))\n return (1);\n if ((sigs & (01|02)))\n return (1);\n }\n return (0);\n }\n thisfile->block = new_block;\n thisfile->offset = pos % 8192;\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 7, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#sdp_message_prep#sdp_time_descr_free.c", "codebase": "libosip2-5.3.1", "c_file": "sdp_message.c", "function": "sdp_time_descr_free", "sloc": "8", "c_code": "void sdp_time_descr_free(sdp_time_descr_t *td) {\n if (td == ((void *)0))\n return;\n { if (td->t_start_time != ((void *)0)) { if (osip_free_func) osip_free_func(td->t_start_time); else free(td->t_start_time); } };\n { if (td->t_stop_time != ((void *)0)) { if (osip_free_func) osip_free_func(td->t_stop_time); else free(td->t_stop_time); } };\n osip_list_ofchar_free(&td->r_repeats);\n { if (td != ((void *)0)) { if (osip_free_func) osip_free_func(td); else free(td); } };\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 3, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#quotearg_prep#quotearg_colon_mem.c", "codebase": "tar-1.34", "c_file": "quotearg.c", "function": "quotearg_colon_mem", "sloc": "5", "c_code": "char *\nquotearg_colon_mem (char const *arg, size_t argsize)\n{\n return quotearg_char_mem (arg, argsize, ':');\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#NEXT_POWER_OF_2_prep#len.c", "codebase": "transcoder-set", "c_file": "NEXT_POWER_OF_2.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#direntry_prep#fprintShortPwd.c", "codebase": "mtools-4.0.43", "c_file": "direntry.c", "function": "fprintShortPwd", "sloc": "4", "c_code": "void fprintShortPwd(FILE *f, direntry_t *entry)\n{\n _fprintShortPwd(f, entry, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#CALCULATING_FACTORIALS_USING_STIRLING_APPROXIMATION_prep#len.c", "codebase": "transcoder-set", "c_file": "CALCULATING_FACTORIALS_USING_STIRLING_APPROXIMATION.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsIPAExtensions.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsIPAExtensions", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsIPAExtensions(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsIPAExtensions\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsIPAExtensions\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsIPAExtensions(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_2_prep#min.c", "codebase": "transcoder-set", "c_file": "SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_2.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#ch_prep#ch_end_seek.c", "codebase": "less-633", "c_file": "ch.c", "function": "ch_end_seek", "sloc": "15", "c_code": "int ch_end_seek(void)\n{\n POSITION len;\n if (thisfile == ((void *)0))\n return (0);\n if (thisfile->flags & 001)\n thisfile->fsize = filesize(thisfile->file);\n len = ch_length();\n if (len != ((POSITION)(-1)))\n return (ch_seek(len));\n while (ch_forw_get() != (-1))\n if ((sigs & (01|02)))\n return (1);\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 4, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathNewValueTree.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathNewValueTree", "sloc": "9", "c_code": "xmlXPathObjectPtr\nxmlXPathNewValueTree(xmlNodePtr val) {\n xmlXPathObjectPtr ret;\n ret = xmlXPathNewNodeSet(val);\n if (ret == ((void *)0))\n return(((void *)0));\n ret->type = XPATH_XSLT_TREE;\n return(ret);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#max_prep#ti_max.c", "codebase": "tulipindicators-0.9.1", "c_file": "max.c", "function": "ti_max", "sloc": "31", "c_code": "int ti_max(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *input = inputs[0];\n const int period = (int)options[0];\n double *output = outputs[0];\n if (period < 1) return 1;\n if (size <= ti_max_start(options)) return 0;\n int trail = 0, maxi = -1;\n double max = input[0];\n int i, j;\n for (i = period-1; i < size; ++i, ++trail) {\n double bar = input[i];\n if (maxi < trail) {\n maxi = trail;\n max = input[maxi];\n j = trail;\n while(++j <= i) {\n bar = input[j];\n if (bar >= max) {\n max = bar;\n maxi = j;\n }\n }\n } else if (bar >= max) {\n maxi = i;\n max = bar;\n }\n *output++ = max;\n }\n ((void) sizeof ((output - outputs[0] == size - ti_max_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_max_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_max_start(options)\", \"indicators/max.c\", 67, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsGreekandCoptic.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsGreekandCoptic", "sloc": "4", "c_code": "int\nxmlUCSIsGreekandCoptic(int code) {\n return(((code >= 0x0370) && (code <= 0x03FF)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "patch-2.7.6#pch_prep#pch_name.c", "codebase": "patch-2.7.6", "c_file": "pch.c", "function": "pch_name", "sloc": "5", "c_code": "const char *\npch_name (enum nametype type)\n{\n return type == NONE ? ((void *)0) : p_name[type];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 1, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngwutil_prep#png_write_finish_row.c", "codebase": "optipng-0.7.8", "c_file": "pngwutil.c", "function": "png_write_finish_row", "sloc": "47", "c_code": "void\npng_write_finish_row(png_structrp png_ptr)\n{\n static const png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};\n static const png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};\n static const png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};\n static const png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};\n ((void)0);\n png_ptr->row_number++;\n if (png_ptr->row_number < png_ptr->num_rows)\n return;\n if (png_ptr->interlaced != 0)\n {\n png_ptr->row_number = 0;\n if ((png_ptr->transformations & 0x0002U) != 0)\n {\n png_ptr->pass++;\n }\n else\n {\n do\n {\n png_ptr->pass++;\n if (png_ptr->pass >= 7)\n break;\n png_ptr->usr_width = (png_ptr->width +\n png_pass_inc[png_ptr->pass] - 1 -\n png_pass_start[png_ptr->pass]) /\n png_pass_inc[png_ptr->pass];\n png_ptr->num_rows = (png_ptr->height +\n png_pass_yinc[png_ptr->pass] - 1 -\n png_pass_ystart[png_ptr->pass]) /\n png_pass_yinc[png_ptr->pass];\n if ((png_ptr->transformations & 0x0002U) != 0)\n break;\n } while (png_ptr->usr_width == 0 || png_ptr->num_rows == 0);\n }\n if (png_ptr->pass < 7)\n {\n if (png_ptr->prev_row != ((void *)0))\n memset(png_ptr->prev_row, 0,\n ((png_ptr->usr_channels * png_ptr->usr_bit_depth) >= 8 ? ((size_t)(png_ptr->width) * (((size_t)(png_ptr->usr_channels * png_ptr->usr_bit_depth)) >> 3)) : (( ((size_t)(png_ptr->width) * ((size_t)(png_ptr->usr_channels * png_ptr->usr_bit_depth))) + 7) >> 3) ) + 1);\n return;\n }\n }\n png_compress_IDAT(png_ptr, ((void *)0), 0, 4);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 4, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 1, "if_statement": 7, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 2}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlURISetOpaque.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlURISetOpaque", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlURISetOpaque(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n xmlURIPtr URI;\n PyObject *pyobj_URI;\n char * opaque;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"Oz:xmlURISetOpaque\", &pyobj_URI, &opaque))\n return(((void *)0));\n URI = (xmlURIPtr) (((pyobj_URI) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyURI_Object *)(pyobj_URI))->obj));\n if (URI->opaque != ((void *)0)) xmlFree(URI->opaque);\n URI->opaque = (char *)xmlStrdup((const xmlChar *)opaque);\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return((&_Py_NoneStruct));\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 5, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsCatMc.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsCatMc", "sloc": "4", "c_code": "int\nxmlUCSIsCatMc(int code) {\n return(xmlCharInRange((unsigned int)code, &xmlMcG));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SUM_BINOMIAL_COEFFICIENTS_1_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "SUM_BINOMIAL_COEFFICIENTS_1.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#misc_prep#stat_diag.c", "codebase": "tar-1.34", "c_file": "misc.c", "function": "stat_diag", "sloc": "11", "c_code": "void\nstat_diag (char const *name)\n{\n if (ignore_failed_read_option)\n {\n if ((warning_option & (0x00800000)))\n stat_warn (name);\n }\n else\n stat_error (name);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tar-1.34#misc_prep#tar_dirname.c", "codebase": "tar-1.34", "c_file": "misc.c", "function": "tar_dirname", "sloc": "5", "c_code": "const char *\ntar_dirname (void)\n{\n return wd[chdir_current].name;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#globals_prep#xmlThrDefDeregisterNodeDefault.c", "codebase": "libxml2", "c_file": "globals.c", "function": "xmlThrDefDeregisterNodeDefault", "sloc": "11", "c_code": "xmlDeregisterNodeFunc\nxmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func)\n{\n xmlDeregisterNodeFunc old;\n xmlMutexLock(&xmlThrDefMutex);\n old = xmlDeregisterNodeDefaultValueThrDef;\n xmlRegisterCallbacks = 1;\n xmlDeregisterNodeDefaultValueThrDef = func;\n xmlMutexUnlock(&xmlThrDefMutex);\n return(old);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#search_prep#to_prev_anchor.c", "codebase": "nano-7.2", "c_file": "search.c", "function": "to_prev_anchor", "sloc": "7", "c_code": "void to_prev_anchor(void)\n{\n linestruct *line = openfile->current;\n do { line = (line->prev) ? line->prev : openfile->filebot;\n } while (!line->has_anchor && line != openfile->current);\n go_to_and_confirm(line);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#benchmark_prep#rvi_option_setter.c", "codebase": "tulipindicators-0.9.1", "c_file": "benchmark.c", "function": "rvi_option_setter", "sloc": "5", "c_code": "void rvi_option_setter(double period, double *options, int ti) {\n (void)ti;\n options[0] = period;\n options[1] = 10;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#nict_prep#__osip_nict_need_timer_k_event.c", "codebase": "libosip2-5.3.1", "c_file": "nict.c", "function": "__osip_nict_need_timer_k_event", "sloc": "3", "c_code": "osip_event_t *__osip_nict_need_timer_k_event(osip_nict_t *nict, state_t state, int transactionid) {\n return __osip_transaction_need_timer_x_event(nict, &nict->timer_k_start, state == NICT_COMPLETED, transactionid, TIMEOUT_K);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_location_information_prep#json_hexadecimal_value.c", "codebase": "json.h", "c_file": "allow_location_information.c", "function": "json_hexadecimal_value", "sloc": "18", "c_code": "int json_hexadecimal_value(const char *c, const unsigned long size,\n unsigned long *result) {\n const char *p;\n int digit;\n if (size > sizeof(unsigned long) * 2) {\n return 0;\n }\n *result = 0;\n for (p = c; (unsigned long)(p - c) < size; ++p) {\n *result <<= 4;\n digit = json_hexadecimal_digit(*p);\n if (digit < 0 || digit > 15) {\n return 0;\n }\n *result |= (unsigned char)digit;\n }\n return 1;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#sma_prep#ti_sma_stream_free.c", "codebase": "tulipindicators-0.9.1", "c_file": "sma.c", "function": "ti_sma_stream_free", "sloc": "3", "c_code": "void ti_sma_stream_free(ti_stream *stream) {\n free(stream);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "less-633#optfunc_prep#opt_status_col_width.c", "codebase": "less-633", "c_file": "optfunc.c", "function": "opt_status_col_width", "sloc": "18", "c_code": "void opt_status_col_width(int type, char *s)\n{\n PARG parg;\n switch (type)\n {\n case 0:\n case 2:\n if (status_col_width > 4)\n {\n parg.p_int = 4;\n error(\"Status column width must not be larger than %d\", &parg);\n status_col_width = 2;\n }\n break;\n case 1:\n break;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 2}}, {"id": "less-633#line_prep#pshift_all.c", "codebase": "less-633", "c_file": "line.c", "function": "pshift_all", "sloc": "9", "c_code": "void pshift_all(void)\n{\n int i;\n for (i = linebuf.print; i < linebuf.end; i++)\n if (linebuf.attr[i] == (1 << 4))\n xbuf_add_byte(&shifted_ansi, (unsigned char) linebuf.buf[i]);\n linebuf.end = linebuf.print;\n end_column = linebuf.pfx_end;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "pth-2.0.7#pth_sync_prep#pth_mutex_init.c", "codebase": "pth-2.0.7", "c_file": "pth_sync.c", "function": "pth_mutex_init", "sloc": "9", "c_code": "int pth_mutex_init(pth_mutex_t *mutex)\n{\n if (mutex == ((void *)0))\n return ((*__errno_location ()) = (22), ((0)));\n mutex->mx_state = (1<<(0));\n mutex->mx_owner = ((void *)0);\n mutex->mx_count = 0;\n return (!(0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#FLOOR_IN_A_SORTED_ARRAY_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "FLOOR_IN_A_SORTED_ARRAY_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "screen-4.9.0#encoding_prep#recode_mchar.c", "codebase": "screen-4.9.0", "c_file": "encoding.c", "function": "recode_mchar", "sloc": "32", "c_code": "struct mchar *\nrecode_mchar(mc, from, to)\nstruct mchar *mc;\nint from, to;\n{\n static struct mchar rmc;\n int c;\n do {} while (0);\n if (from == to || (from != 8 && to != 8))\n return mc;\n rmc = *mc;\n if (rmc.font == 0 && from != 8)\n rmc.font = encodings[from].deffont;\n if (rmc.font == 0)\n return mc;\n c = rmc.image | (rmc.font << 8);\n if (from == 8)\n c |= rmc.fontx << 16;\n if (rmc.mbcs)\n {\n int c2 = rmc.mbcs;\n c = recode_char_dw_to_encoding(c, &c2, to);\n rmc.mbcs = c2;\n }\n else\n c = recode_char_to_encoding(c, to);\n rmc.image = c & 255;\n rmc.font = c >> 8 & 255;\n if (to == 8)\n rmc.fontx = c >> 16 & 255;\n return &rmc;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "screen-4.9.0#display_prep#freetty.c", "codebase": "screen-4.9.0", "c_file": "display.c", "function": "freetty", "sloc": "17", "c_code": "void\nfreetty()\n{\n if (display->d_userfd >= 0)\n close(display->d_userfd);\n do {} while (0);\n display->d_userfd = -1;\n display->d_obufp = 0;\n display->d_obuffree = 0;\n if (display->d_obuf)\n free(display->d_obuf);\n display->d_obuf = 0;\n display->d_obuflen = 0;\n display->d_obuflenmax = -display->d_obufmax;\n display->d_blocked = 0;\n display->d_blocked_fuzz = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_LARGE_NUMBER_DIVISIBLE_11_NOT_prep#min.c", "codebase": "transcoder-set", "c_file": "CHECK_LARGE_NUMBER_DIVISIBLE_11_NOT.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_list_double.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_list_double", "sloc": "5", "c_code": "double binn_list_double(void *list, int pos) {\n double value;\n binn_list_get(list, pos, 0x82, &value, ((void *)0));\n return value;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CIRCLE_LATTICE_POINTS_prep#sort.c", "codebase": "transcoder-set", "c_file": "CIRCLE_LATTICE_POINTS.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#smoke_prep#compare_arrays.c", "codebase": "tulipindicators-0.9.1", "c_file": "smoke.c", "function": "compare_arrays", "sloc": "17", "c_code": "void compare_arrays(double *a, double *b, int size_a, int size_b) {\n int i;\n do { ++ltests; if ((size_a) != (size_b)) { ++lfails; printf(\"%s:%d (%d != %d)\\n\", \"smoke.c\", 42, (size_a), (size_b)); }} while (0);\n if (size_a != size_b) {\n printf(\"Size mismatch.\\n\");\n }\n const int f = lfails;\n for (i = 0; i < size_a; ++i) {\n do { ++ltests; if (fabs((double)(a[i])-(double)(b[i])) > 0.001) { ++lfails; printf(\"%s:%d (%f != %f)\\n\", \"smoke.c\", 50, (double)(a[i]), (double)(b[i])); }} while (0);\n }\n if (lfails != f) {\n printf(\"Expected Got\\n\");\n for (i = 0; i < size_a; ++i) {\n printf(\"%8.3f %8.3f\\n\", a[i], b[i]);\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 2, "while_loop": 2, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "cflow-1.7#hash_prep#hash_get_first.c", "codebase": "cflow-1.7", "c_file": "hash.c", "function": "hash_get_first", "sloc": "12", "c_code": "void *\nhash_get_first (const Hash_table *table)\n{\n struct hash_entry const *bucket;\n if (table->n_entries == 0)\n return ((void *)0);\n for (bucket = table->bucket; ; bucket++)\n if (! (bucket < table->bucket_limit))\n abort ();\n else if (bucket->data)\n return bucket->data;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "hello-2.12.1#version-etc_prep#version_etc_va.c", "codebase": "hello-2.12.1", "c_file": "version-etc.c", "function": "version_etc_va", "sloc": "15", "c_code": "void\nversion_etc_va (FILE *stream,\n const char *command_name, const char *package,\n const char *version, va_list authors)\n{\n size_t n_authors;\n const char *authtab[10];\n for (n_authors = 0;\n n_authors < 10\n && (authtab[n_authors] = __builtin_va_arg(authors,const char *)) != ((void *)0);\n n_authors++)\n ;\n version_etc_arn (stream, command_name, package, version,\n authtab, n_authors);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlHasFeature.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlHasFeature", "sloc": "71", "c_code": "int\nxmlHasFeature(xmlFeature feature)\n{\n switch (feature) {\n case XML_WITH_THREAD:\n return(1);\n case XML_WITH_TREE:\n return(1);\n case XML_WITH_OUTPUT:\n return(1);\n case XML_WITH_PUSH:\n return(1);\n case XML_WITH_READER:\n return(1);\n case XML_WITH_PATTERN:\n return(1);\n case XML_WITH_WRITER:\n return(1);\n case XML_WITH_SAX1:\n return(1);\n case XML_WITH_HTTP:\n return(0);\n case XML_WITH_VALID:\n return(1);\n case XML_WITH_HTML:\n return(1);\n case XML_WITH_LEGACY:\n return(0);\n case XML_WITH_C14N:\n return(1);\n case XML_WITH_CATALOG:\n return(1);\n case XML_WITH_XPATH:\n return(1);\n case XML_WITH_XPTR:\n return(1);\n case XML_WITH_XINCLUDE:\n return(1);\n case XML_WITH_ICONV:\n return(1);\n case XML_WITH_ISO8859X:\n return(1);\n case XML_WITH_UNICODE:\n return(1);\n case XML_WITH_REGEXP:\n return(1);\n case XML_WITH_AUTOMATA:\n return(1);\n case XML_WITH_EXPR:\n return(0);\n case XML_WITH_SCHEMAS:\n return(1);\n case XML_WITH_SCHEMATRON:\n return(1);\n case XML_WITH_MODULES:\n return(1);\n case XML_WITH_DEBUG:\n return(1);\n case XML_WITH_DEBUG_MEM:\n return(0);\n case XML_WITH_ZLIB:\n return(0);\n case XML_WITH_LZMA:\n return(0);\n case XML_WITH_ICU:\n return(0);\n default:\n break;\n }\n return(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 32, "break_continue_statement": 1}}, {"id": "heman#vec3_prep#kmVec3Zero.c", "codebase": "heman", "c_file": "vec3.c", "function": "kmVec3Zero", "sloc": "6", "c_code": "kmVec3* kmVec3Zero(kmVec3* pOut) {\n pOut->x = 0.0f;\n pOut->y = 0.0f;\n pOut->z = 0.0f;\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "screen-4.9.0#display_prep#AddStr.c", "codebase": "screen-4.9.0", "c_file": "display.c", "function": "AddStr", "sloc": "15", "c_code": "void\nAddStr(str)\nchar *str;\n{\n register char c;\n do {} while (0);\n if (display->d_encoding == 8)\n {\n while ((c = *str++))\n AddUtf8((unsigned char)c);\n return;\n }\n while ((c = *str++))\n do { if (--display->d_obuffree <= 0) Resize_obuf(); *display->d_obufp++ = (c); } while (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 4, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COMPUTE_NCR_P_SET_1_INTRODUCTION_AND_DYNAMIC_PROGRAMMING_SOLUTION_prep#main.c", "codebase": "transcoder-set", "c_file": "COMPUTE_NCR_P_SET_1_INTRODUCTION_AND_DYNAMIC_PROGRAMMING_SOLUTION.c", "function": "main", "sloc": "16", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {82,45,44,88,90,98,80,60,52,71};\n int param1[] = {5,24,68,24,75,55,54,75,73,26};\n int param2[] = {94,95,61,43,57,43,88,65,86,45};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "uucp-1.07#xqtsub_prep#fsysdep_unlock_uuxqt_file.c", "codebase": "uucp-1.07", "c_file": "xqtsub.c", "function": "fsysdep_unlock_uuxqt_file", "sloc": "16", "c_code": "boolean\nfsysdep_unlock_uuxqt_file (zfile)\n const char *zfile;\n{\n char *zcopy, *z;\n boolean fret;\n zcopy = zbufcpy (zfile);\n z = strrchr (zcopy, '/');\n if (z == ((void *)0))\n *zcopy = 'L';\n else\n *(z + 1) = 'L';\n fret = fsdo_unlock (zcopy, (1));\n ubuffree (zcopy);\n return fret;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#argp-help_prep#argp_failure.c", "codebase": "tar-1.34", "c_file": "argp-help.c", "function": "argp_failure", "sloc": "40", "c_code": "void\nargp_failure (const struct argp_state *state, int status, int errnum,\n const char *fmt, ...)\n{\n if (!state || !(state->flags & 0x02))\n {\n FILE *stream = state ? state->err_stream : stderr;\n if (stream)\n {\n flockfile (stream);\n fputs_unlocked (state ? state->name : (program_invocation_short_name),\n stream);\n if (fmt)\n {\n va_list ap;\n __builtin_va_start(ap,fmt);\n putc_unlocked (':', stream);\n putc_unlocked (' ', stream);\n vfprintf (stream, fmt, ap);\n __builtin_va_end(ap);\n }\n if (errnum)\n {\n char buf[200];\n char const *s = ((void *)0);\n putc_unlocked (':', stream);\n putc_unlocked (' ', stream);\n s = strerror_r (errnum, buf, sizeof buf);\n if (! s && ! (s = strerror (errnum)))\n s = dgettext (state->root_argp->argp_domain,\n \"Unknown system error\");\n fputs_unlocked (s, stream);\n }\n putc_unlocked ('\\n', stream);\n funlockfile (stream);\n if (status && (!state || !(state->flags & 0x20)))\n exit (status);\n }\n }\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "bc-1.07.1#warranty_prep#welcome.c", "codebase": "bc-1.07.1", "c_file": "warranty.c", "function": "welcome", "sloc": "6", "c_code": "void\nwelcome()\n{\n printf (\"This is free software with ABSOLUTELY NO WARRANTY.\\n\");\n printf (\"For details type `warranty'. \\n\");\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#rsa-pkcs1-verify_prep#nettle_rsa_pkcs1_verify.c", "codebase": "nettle-3.9.1", "c_file": "rsa-pkcs1-verify.c", "function": "nettle_rsa_pkcs1_verify", "sloc": "13", "c_code": "int\nnettle_rsa_pkcs1_verify(const struct rsa_public_key *key,\n size_t length, const uint8_t *digest_info,\n const mpz_t s)\n{\n int res;\n mpz_t m;\n __gmpz_init (m);\n res = (nettle_pkcs1_rsa_digest_encode (m, key->size, length, digest_info)\n && _nettle_rsa_verify (key, m, s));\n __gmpz_clear(m);\n return res;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#awkgram_prep#is_alpha.c", "codebase": "gawk-5.2.2", "c_file": "awkgram.c", "function": "is_alpha", "sloc": "18", "c_code": "_Bool\nis_alpha(int c)\n{\n switch (c) {\n case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':\n case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':\n case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':\n case 's': case 't': case 'u': case 'v': case 'w': case 'x':\n case 'y': case 'z':\n case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':\n case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':\n case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':\n case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':\n case 'Y': case 'Z':\n return 1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "json.h#allow_unquoted_keys_prep#json_write_get_number_size.c", "codebase": "json.h", "c_file": "allow_unquoted_keys.c", "function": "json_write_get_number_size", "sloc": "81", "c_code": "int json_write_get_number_size(const struct json_number_s *number,\n size_t *size) {\n uintmax_t parsed_number;\n size_t i;\n if (number->number_size >= 2) {\n switch (number->number[1]) {\n default:\n break;\n case 'x':\n case 'X':\n parsed_number = strtoumax(number->number, 0, 0);\n i = 0;\n while (0 != parsed_number) {\n parsed_number /= 10;\n i++;\n }\n *size += i;\n return 0;\n }\n }\n i = 0;\n if ((i < number->number_size) &&\n (('+' == number->number[i]) || ('-' == number->number[i]))) {\n i++;\n }\n if ((i < number->number_size) && ('I' == number->number[i])) {\n const char *inf = \"Infinity\";\n size_t k;\n for (k = i; k < number->number_size; k++) {\n const char c = *inf++;\n if ('\\0' == c) {\n break;\n } else if (c != number->number[k]) {\n break;\n }\n }\n if ('\\0' == *inf) {\n *size += 22;\n if ('-' == number->number[0]) {\n *size += 1;\n }\n }\n return 0;\n }\n if ((i < number->number_size) && ('N' == number->number[i])) {\n const char *nan = \"NaN\";\n size_t k;\n for (k = i; k < number->number_size; k++) {\n const char c = *nan++;\n if ('\\0' == c) {\n break;\n } else if (c != number->number[k]) {\n break;\n }\n }\n if ('\\0' == *nan) {\n *size += 1;\n return 0;\n }\n }\n if ((i < number->number_size) && ('.' == number->number[i])) {\n *size += 1;\n goto cleanup;\n }\n for (; i < number->number_size; i++) {\n const char c = number->number[i];\n if (!('0' <= c && c <= '9')) {\n break;\n }\n }\n if ((i + 1 == number->number_size) && ('.' == number->number[i])) {\n *size += 1;\n goto cleanup;\n }\ncleanup:\n *size += number->number_size;\n if ('+' == number->number[0]) {\n *size -= 1;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 15, "for_loop": 3, "while_loop": 1, "switch_statement": 1, "goto_statement": 2, "return_statement": 4, "break_continue_statement": 6}}, {"id": "cpio-2.14#rmt_prep#xalloc_die.c", "codebase": "cpio-2.14", "c_file": "rmt.c", "function": "xalloc_die", "sloc": "6", "c_code": "void\nxalloc_die (void)\n{\n rmt_error (12);\n exit (1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_1_prep#main.c", "codebase": "transcoder-set", "c_file": "CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_1.c", "function": "main", "sloc": "15", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {57,3,10,10,6,2,2,20,96,25};\n int param1[] = {1,9,101,10000,46656,2048,40,79,98,5};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_cmo.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_cmo", "sloc": "23", "c_code": "int ti_cmo(int size, double const *const *inputs, double const *options, double *const *outputs) {\n const double *input = inputs[0];\n double *output = outputs[0];\n const int period = (int)options[0];\n if (period < 1) return 1;\n if (size <= ti_cmo_start(options)) return 0;\n double up_sum = 0, down_sum = 0;\n int i;\n for (i = 1; i <= period; ++i) {\n up_sum += (input[(i)] > input[(i)-1] ? input[(i)] - input[(i)-1] : 0);\n down_sum += (input[(i)] < input[(i)-1] ? input[(i)-1] - input[(i)] : 0);\n }\n *output++ = 100 * (up_sum - down_sum) / (up_sum + down_sum);\n for (i = period+1; i < size; ++i) {\n up_sum -= (input[(i-period)] > input[(i-period)-1] ? input[(i-period)] - input[(i-period)-1] : 0);\n down_sum -= (input[(i-period)] < input[(i-period)-1] ? input[(i-period)-1] - input[(i-period)] : 0);\n up_sum += (input[(i)] > input[(i)-1] ? input[(i)] - input[(i)-1] : 0);\n down_sum += (input[(i)] < input[(i)-1] ? input[(i)-1] - input[(i)] : 0);\n *output++ = 100 * (up_sum - down_sum) / (up_sum + down_sum);\n }\n ((void) sizeof ((output - outputs[0] == size - ti_cmo_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_cmo_start(options)) ; else __assert_fail (\"output - outputs[0] == size - ti_cmo_start(options)\", \"tiamalgamation.c\", 2137, __extension__ __PRETTY_FUNCTION__); }));\n return 0;\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#entities_prep#xmlCopyEntitiesTable.c", "codebase": "libxml2", "c_file": "entities.c", "function": "xmlCopyEntitiesTable", "sloc": "4", "c_code": "xmlEntitiesTablePtr\nxmlCopyEntitiesTable(xmlEntitiesTablePtr table) {\n return(xmlHashCopySafe(table, xmlCopyEntity, xmlFreeEntityWrapper));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#utils_prep#fnmatch_nocase.c", "codebase": "wget-1.21.4", "c_file": "utils.c", "function": "fnmatch_nocase", "sloc": "5", "c_code": "int\nfnmatch_nocase (const char *pattern, const char *string, int flags)\n{\n return fnmatch (pattern, string, flags | (1 << 4));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#deflate_prep#deflateResetKeep.c", "codebase": "optipng-0.7.8", "c_file": "deflate.c", "function": "deflateResetKeep", "sloc": "22", "c_code": "int deflateResetKeep(z_streamp strm) {\n deflate_state *s;\n if (deflateStateCheck(strm)) {\n return (-2);\n }\n strm->total_in = strm->total_out = 0;\n strm->msg = 0;\n strm->data_type = 2;\n s = (deflate_state *)strm->state;\n s->pending = 0;\n s->pending_out = s->pending_buf;\n if (s->wrap < 0) {\n s->wrap = -s->wrap;\n }\n s->status =\n 42;\n strm->adler =\n adler32(0L, 0, 0);\n s->last_flush = -2;\n _tr_init(s);\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libxml2#HTMLtree_prep#htmlNodeDumpOutput.c", "codebase": "libxml2", "c_file": "HTMLtree.c", "function": "htmlNodeDumpOutput", "sloc": "5", "c_code": "void\nhtmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,\n xmlNodePtr cur, const char *encoding __attribute__((unused))) {\n htmlNodeDumpFormatOutput(buf, doc, cur, ((void *)0), 1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "heman#aabb2_prep#kmAABB2Sanitize.c", "codebase": "heman", "c_file": "aabb2.c", "function": "kmAABB2Sanitize", "sloc": "18", "c_code": "kmAABB2* kmAABB2Sanitize(kmAABB2* pOut, const kmAABB2* pIn)\n{\n if( pIn->min.x <= pIn->max.x ){\n pOut->min.x = pIn->min.x;\n pOut->max.x = pIn->max.x;\n }else{\n pOut->min.x = pIn->max.x;\n pOut->max.x = pIn->min.x;\n }\n if( pIn->min.y <= pIn->max.y ){\n pOut->min.y = pIn->min.y;\n pOut->max.y = pIn->max.y;\n }else{\n pOut->min.y = pIn->max.y;\n pOut->max.y = pIn->min.y;\n }\n return pOut;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlTextMerge.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlTextMerge", "sloc": "16", "c_code": "PyObject *\nlibxml_xmlTextMerge(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n xmlNodePtr c_retval;\n xmlNodePtr first;\n PyObject *pyobj_first;\n xmlNodePtr second;\n PyObject *pyobj_second;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"OO:xmlTextMerge\", &pyobj_first, &pyobj_second))\n return(((void *)0));\n first = (xmlNodePtr) (((pyobj_first) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_first))->obj));\n second = (xmlNodePtr) (((pyobj_second) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_second))->obj));\n c_retval = xmlTextMerge(first, second);\n py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#unix2dos_prep#open_unix2dos.c", "codebase": "mtools-4.0.43", "c_file": "unix2dos.c", "function": "open_unix2dos", "sloc": "12", "c_code": "Stream_t *open_unix2dos(Stream_t *Next, int convertCharset __attribute__ ((unused)))\n{\n Filter_t *This;\n This = ((Filter_t*)(calloc(1,sizeof(Filter_t))));\n if (!This)\n return ((void *)0);\n init_head(&This->head, &FilterClass, Next);\n This->readBytes = This->bufPos = 0;\n This->pendingNl = 0;\n This->eof = 0;\n return &This->head;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#LONGEST_REPEATING_SUBSEQUENCE_prep#max.c", "codebase": "transcoder-set", "c_file": "LONGEST_REPEATING_SUBSEQUENCE.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "wget-1.21.4#utils_prep#aprintf.c", "codebase": "wget-1.21.4", "c_file": "utils.c", "function": "aprintf", "sloc": "15", "c_code": "char *\naprintf (const char *fmt, ...)\n{\n int ret;\n va_list args;\n char *str;\n __builtin_va_start(args,fmt);\n ret = vasprintf (&str, fmt, args);\n __builtin_va_end(args);\n if (ret < 0 && (*__errno_location ()) == 12)\n memfatal (\"aprintf\", -3);\n else if (ret < 0)\n return ((void *)0);\n return str;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "pexec-1.0rc8#numhash_prep#numhash_search.c", "codebase": "pexec-1.0rc8", "c_file": "numhash.c", "function": "numhash_search", "sloc": "20", "c_code": "int numhash_search(numhashtable *nt,int value,void **ret)\n{\n int off,bit;\n numhashnode *nh;\n if ( nt==((void *)0) ) return(0);\n off=0;\n nh=&nt->table;\n if ( nt->bitsizebitsize)-1);\n do\n {\n bit=(((value)>>((nt->depth)*((((nt->bitsize)-1)/(nt->depth))-(off))))&((1<<(nt->depth))-1));\n if ( nh->node.leaves==((void *)0) )\n return(0);\n off++;\n nh=&nh->node.leaves[bit];\n } while ( off*nt->depth < nt->bitsize );\n if ( ret != ((void *)0) ) *ret=nh->node.data;\n return(nh->nchild);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "ed-1.19#regex_prep#get_pattern_for_s.c", "codebase": "ed-1.19", "c_file": "regex.c", "function": "get_pattern_for_s", "sloc": "15", "c_code": "const char * get_pattern_for_s( const char ** const ibufpp )\n {\n const char delimiter = **ibufpp;\n if( delimiter == ' ' || delimiter == '\\n' )\n { set_error_msg( inv_pat_del ); return 0; }\n if( *++*ibufpp == delimiter )\n {\n if( !last_regexp ) { set_error_msg( no_prev_pat ); return 0; }\n return \"\";\n }\n const char * const pat = extract_pattern( ibufpp, delimiter );\n if( !pat ) return 0;\n if( **ibufpp != delimiter ) { set_error_msg( mis_pat_del ); return 0; }\n return pat;\n }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#gcm-aes128_prep#nettle_gcm_aes128_digest.c", "codebase": "nettle-3.9.1", "c_file": "gcm-aes128.c", "function": "nettle_gcm_aes128_digest", "sloc": "6", "c_code": "void\nnettle_gcm_aes128_digest(struct gcm_aes128_ctx *ctx,\n size_t length, uint8_t *digest)\n{\n (0 ? (nettle_aes128_encrypt)(&(ctx)->cipher, ~(size_t) 0, (uint8_t *) 0, (const uint8_t *) 0) : nettle_gcm_digest(&(ctx)->gcm, &(ctx)->key, &(ctx)->cipher, (nettle_cipher_func *) (nettle_aes128_encrypt), (length), (digest)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#modd_prep#IsMathFunc.c", "codebase": "mcsim-6.2.0", "c_file": "modd.c", "function": "IsMathFunc", "sloc": "7", "c_code": "BOOL IsMathFunc (PSTR sz)\n{\n int i = 0;\n while (*vrgszMathFuncs[i] && strcmp (vrgszMathFuncs[i], sz))\n i++;\n return (*vrgszMathFuncs[i]);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#test_prep#json_write_minified_get_object_size.c", "codebase": "json.h", "c_file": "test.c", "function": "json_write_minified_get_object_size", "sloc": "18", "c_code": "int json_write_minified_get_object_size(const struct json_object_s *object,\n size_t *size) {\n struct json_object_element_s *element;\n *size += 2;\n *size += object->length;\n if (1 < object->length) {\n *size += object->length - 1;\n }\n for (element = object->start; 0 != element; element = element->next) {\n if (json_write_get_string_size(element->name, size)) {\n return 1;\n }\n if (json_write_minified_get_value_size(element->value, size)) {\n return 1;\n }\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 3, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "brotli-1.0.9#decode_prep#BrotliDecoderErrorString.c", "codebase": "brotli-1.0.9", "c_file": "decode.c", "function": "BrotliDecoderErrorString", "sloc": "6", "c_code": "const char* BrotliDecoderErrorString(BrotliDecoderErrorCode c) {\n switch (c) {\n case BROTLI_DECODER_NO_ERROR: return \"NO_ERROR\"; case BROTLI_DECODER_SUCCESS: return \"SUCCESS\"; case BROTLI_DECODER_NEEDS_MORE_INPUT: return \"NEEDS_MORE_INPUT\"; case BROTLI_DECODER_NEEDS_MORE_OUTPUT: return \"NEEDS_MORE_OUTPUT\"; case BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: return \"EXUBERANT_NIBBLE\"; case BROTLI_DECODER_ERROR_FORMAT_RESERVED: return \"RESERVED\"; case BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: return \"EXUBERANT_META_NIBBLE\"; case BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: return \"SIMPLE_HUFFMAN_ALPHABET\"; case BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: return \"SIMPLE_HUFFMAN_SAME\"; case BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: return \"CL_SPACE\"; case BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: return \"HUFFMAN_SPACE\"; case BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: return \"CONTEXT_MAP_REPEAT\"; case BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: return \"BLOCK_LENGTH_1\"; case BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: return \"BLOCK_LENGTH_2\"; case BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: return \"TRANSFORM\"; case BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: return \"DICTIONARY\"; case BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: return \"WINDOW_BITS\"; case BROTLI_DECODER_ERROR_FORMAT_PADDING_1: return \"PADDING_1\"; case BROTLI_DECODER_ERROR_FORMAT_PADDING_2: return \"PADDING_2\"; case BROTLI_DECODER_ERROR_FORMAT_DISTANCE: return \"DISTANCE\"; case BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: return \"DICTIONARY_NOT_SET\"; case BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: return \"INVALID_ARGUMENTS\"; case BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: return \"CONTEXT_MODES\"; case BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: return \"TREE_GROUPS\"; case BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: return \"CONTEXT_MAP\"; case BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: return \"RING_BUFFER_1\"; case BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: return \"RING_BUFFER_2\"; case BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: return \"BLOCK_TYPE_TREES\"; case BROTLI_DECODER_ERROR_UNREACHABLE: return \"UNREACHABLE\";\n default: return \"INVALID\";\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#pngget_prep#png_get_y_offset_microns.c", "codebase": "optipng-0.7.8", "c_file": "pngget.c", "function": "png_get_y_offset_microns", "sloc": "7", "c_code": "png_int_32\npng_get_y_offset_microns(png_const_structrp png_ptr, png_const_inforp info_ptr)\n{\n (void)png_ptr;\n (void)info_ptr;\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#MAXIMUM_VALUE_CHOICE_EITHER_DIVIDING_CONSIDERING_prep#main.c", "codebase": "transcoder-set", "c_file": "MAXIMUM_VALUE_CHOICE_EITHER_DIVIDING_CONSIDERING.c", "function": "main", "sloc": "14", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {3,19,39,89,96,68,48,5,3,4};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i]) == f_gold(param0[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "pth-2.0.7#pth_ring_prep#__pth_ring_insert_after.c", "codebase": "pth-2.0.7", "c_file": "pth_ring.c", "function": "__pth_ring_insert_after", "sloc": "11", "c_code": "void __pth_ring_insert_after(pth_ring_t *r, pth_ringnode_t *rn1, pth_ringnode_t *rn2)\n{\n if (r == ((void *)0) || rn1 == ((void *)0) || rn2 == ((void *)0))\n return;\n rn2->rn_prev = rn1;\n rn2->rn_next = rn1->rn_next;\n rn2->rn_prev->rn_next = rn2;\n rn2->rn_next->rn_prev = rn2;\n r->r_nodes++;\n return;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#c_supp_prep#Pl_Mk_Compound.c", "codebase": "gprolog-1.5.0", "c_file": "c_supp.c", "function": "Pl_Mk_Compound", "sloc": "14", "c_code": "WamWord\nPl_Mk_Compound(int func, int arity, WamWord *arg)\n{\n WamWord res_word;\n int i;\n if (arity == 0)\n return Pl_Put_Atom(func);\n if (arity == 2 && func == ((int) (unsigned char) ('.')))\n return Pl_Mk_List(arg);\n res_word = Pl_Put_Structure(func, arity);\n for (i = 0; i < arity; i++)\n Pl_Unify_Value(arg[i]);\n return res_word;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "transcoder-set#SWAP_TWO_NIBBLES_BYTE_prep#sort.c", "codebase": "transcoder-set", "c_file": "SWAP_TWO_NIBBLES_BYTE.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#tiamalgamation_prep#ti_crossany_start.c", "codebase": "tulipindicators-0.9.1", "c_file": "tiamalgamation.c", "function": "ti_crossany_start", "sloc": "4", "c_code": "int ti_crossany_start(double const *options) {\n (void)options;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xpath_prep#xmlXPathNewCString.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathNewCString", "sloc": "4", "c_code": "xmlXPathObjectPtr\nxmlXPathNewCString(const char *val) {\n return(xmlXPathNewString((xmlChar *) val));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlmemory_prep#xmlReallocLoc.c", "codebase": "libxml2", "c_file": "xmlmemory.c", "function": "xmlReallocLoc", "sloc": "6", "c_code": "void *\nxmlReallocLoc(void *ptr, size_t size, const char *file __attribute__((unused)),\n int line __attribute__((unused)))\n{\n return(xmlMemRealloc(ptr, size));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlschemas_prep#xmlSchemaValidCtxtGetParserCtxt.c", "codebase": "libxml2", "c_file": "xmlschemas.c", "function": "xmlSchemaValidCtxtGetParserCtxt", "sloc": "7", "c_code": "xmlParserCtxtPtr\nxmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt)\n{\n if (ctxt == ((void *)0))\n return(((void *)0));\n return (ctxt->parserCtxt);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_OCCURRENCES_CHARACTER_APPEAR_TOGETHER_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "CHECK_OCCURRENCES_CHARACTER_APPEAR_TOGETHER.c", "function": "f_filled", "sloc": "1", "c_code": "_Bool f_filled ( char s [], char c ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#CHECK_IF_A_NUMBER_IS_JUMBLED_OR_NOT_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "CHECK_IF_A_NUMBER_IS_JUMBLED_OR_NOT.c", "function": "f_filled", "sloc": "1", "c_code": "_Bool f_filled ( int num ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#mh_prep#TraverseLevels.c", "codebase": "mcsim-6.2.0", "c_file": "mh.c", "function": "TraverseLevels", "sloc": "17", "c_code": "void TraverseLevels (PLEVEL plevel,\n void (*routinePtr)(PLEVEL plevel, char **args), ...)\n{\n va_list ap;\n static char *arg[25], **args = arg;\n char *arg1;\n long n, nargs = 0;\n __builtin_va_start(ap,routinePtr);\n if ((arg1 = __builtin_va_arg(ap,char*)) != ((void *)0)) {\n arg[0] = arg1;\n while ((arg[++nargs] = __builtin_va_arg(ap,char*)) != ((void *)0)) {};\n }\n __builtin_va_end(ap);\n routinePtr (plevel, args);\n for (n = 0; n < plevel->iInstances; n++)\n TraverseLevels (plevel->pLevels[n], routinePtr, ((void *)0));\n}\n", "c_constructs": {"pointer_type": 3, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 1, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#NON_REPEATING_ELEMENT_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "NON_REPEATING_ELEMENT.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int arr [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_CALCULATE_VOLUME_OCTAHEDRON_prep#sort.c", "codebase": "transcoder-set", "c_file": "PROGRAM_CALCULATE_VOLUME_OCTAHEDRON.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#nettle-meta-macs_prep#nettle_get_macs.c", "codebase": "nettle-3.9.1", "c_file": "nettle-meta-macs.c", "function": "nettle_get_macs", "sloc": "5", "c_code": "const struct nettle_mac * const *\nnettle_get_macs (void)\n{\n return _nettle_macs;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#escape_prep#cescape.c", "codebase": "uucp-1.07", "c_file": "escape.c", "function": "cescape", "sloc": "82", "c_code": "size_t\ncescape (z)\n char *z;\n{\n char *zto, *zfrom;\n zto = z;\n zfrom = z;\n while (*zfrom != '\\0')\n {\n if (*zfrom != '\\\\')\n {\n *zto++ = *zfrom++;\n continue;\n }\n ++zfrom;\n switch (*zfrom)\n {\n case '-':\n *zto++ = '-';\n break;\n case 'b':\n *zto++ = '\\b';\n break;\n case 'n':\n *zto++ = '\\n';\n break;\n case 'N':\n *zto++ = '\\0';\n break;\n case 'r':\n *zto++ = '\\r';\n break;\n case 's':\n *zto++ = ' ';\n break;\n case 't':\n *zto++ = '\\t';\n break;\n case '\\0':\n --zfrom;\n case '\\\\':\n *zto++ = '\\\\';\n break;\n case '0': case '1': case '2': case '3': case '4':\n case '5': case '6': case '7': case '8': case '9':\n {\n int i;\n i = *zfrom - '0';\n if (zfrom[1] >= '0' && zfrom[1] <= '7')\n i = 8 * i + *++zfrom - '0';\n if (zfrom[1] >= '0' && zfrom[1] <= '7')\n i = 8 * i + *++zfrom - '0';\n *zto++ = (char) i;\n }\n break;\n case 'x':\n {\n int i;\n i = 0;\n while (((*__ctype_b_loc ())[(int) ((((unsigned char) (zfrom[1]))))] & (unsigned short int) _ISxdigit))\n {\n if (((*__ctype_b_loc ())[(int) ((((unsigned char) (zfrom[1]))))] & (unsigned short int) _ISdigit))\n i = 16 * i + *++zfrom - '0';\n else if (((*__ctype_b_loc ())[(int) ((((unsigned char) (zfrom[1]))))] & (unsigned short int) _ISupper))\n i = 16 * i + *++zfrom - 'A' + 10;\n else\n i = 16 * i + *++zfrom - 'a' + 10;\n }\n *zto++ = (char) i;\n }\n break;\n default:\n ulog (LOG_ERROR, \"Unrecognized escape sequence \\\\%c\",\n *zfrom);\n *zto++ = *zfrom;\n break;\n }\n ++zfrom;\n }\n *zto = '\\0';\n return (size_t) (zto - z);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 2, "switch_statement": 1, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 12}}, {"id": "transcoder-set#FIND_NUMBER_PAIRS_ARRAY_XOR_0_prep#min.c", "codebase": "transcoder-set", "c_file": "FIND_NUMBER_PAIRS_ARRAY_XOR_0.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_SET_10_0_1_KNAPSACK_PROBLEM_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_SET_10_0_1_KNAPSACK_PROBLEM.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int W, int wt [ ], int val [ ], int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_www_authenticate_prep#osip_www_authenticate_set_opaque.c", "codebase": "libosip2-5.3.1", "c_file": "osip_www_authenticate.c", "function": "osip_www_authenticate_set_opaque", "sloc": "3", "c_code": "void osip_www_authenticate_set_opaque(osip_www_authenticate_t *www_authenticate, char *opaque) {\n www_authenticate->opaque = (char *) opaque;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "less-633#xbuf_prep#xbuf_add_data.c", "codebase": "less-633", "c_file": "xbuf.c", "function": "xbuf_add_data", "sloc": "6", "c_code": "void xbuf_add_data(struct xbuffer *xbuf, unsigned char *data, int len)\n{\n int i;\n for (i = 0; i < len; i++)\n xbuf_add_byte(xbuf, data[i]);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#globals_prep#__xmlIndentTreeOutput.c", "codebase": "libxml2", "c_file": "globals.c", "function": "__xmlIndentTreeOutput", "sloc": "1", "c_code": "int *__xmlIndentTreeOutput(void) { return (&xmlGetThreadLocalStorage(0)->gs_xmlIndentTreeOutput); }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#format_prep#format_entry_tree_RB_INSERT.c", "codebase": "tmux", "c_file": "format.c", "function": "format_entry_tree_RB_INSERT", "sloc": "1", "c_code": "struct format_entry * format_entry_tree_RB_INSERT(struct format_entry_tree *head, struct format_entry *elm) { struct format_entry *tmp; struct format_entry *parent = ((void *)0); int comp = 0; tmp = (head)->rbh_root; while (tmp) { parent = tmp; comp = (format_entry_cmp)(elm, parent); if (comp < 0) tmp = (tmp)->entry.rbe_left; else if (comp > 0) tmp = (tmp)->entry.rbe_right; else return (tmp); } do { (elm)->entry.rbe_parent = parent; (elm)->entry.rbe_left = (elm)->entry.rbe_right = ((void *)0); (elm)->entry.rbe_color = 1; } while (0); if (parent != ((void *)0)) { if (comp < 0) (parent)->entry.rbe_left = elm; else (parent)->entry.rbe_right = elm; do {} while (0); } else (head)->rbh_root = elm; format_entry_tree_RB_INSERT_COLOR(head, elm); return (((void *)0)); }\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "indent-2.2.13#globs_prep#xrealloc.c", "codebase": "indent-2.2.13", "c_file": "globs.c", "function": "xrealloc", "sloc": "10", "c_code": "extern void *xrealloc(void *ptr, unsigned int size)\n{\n void *val = realloc(ptr, size);\n if (!val)\n {\n fprintf(stderr, gettext(\"indent: Virtual memory exhausted.\\n\"));\n do_exit(system_error);\n }\n return val;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mtools-4.0.43#direntry_prep#isRootEntry.c", "codebase": "mtools-4.0.43", "c_file": "direntry.c", "function": "isRootEntry", "sloc": "4", "c_code": "int isRootEntry(direntry_t *entry)\n{\n return entry->entry == -3;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#BINARY_SEARCH_prep#max.c", "codebase": "transcoder-set", "c_file": "BINARY_SEARCH.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlreader_prep#xmlTextReaderRead.c", "codebase": "libxml2", "c_file": "xmlreader.c", "function": "xmlTextReaderRead", "sloc": "286", "c_code": "int\nxmlTextReaderRead(xmlTextReaderPtr reader) {\n int val, olddepth = 0;\n xmlTextReaderState oldstate = XML_TEXTREADER_START;\n xmlNodePtr oldnode = ((void *)0);\n if (reader == ((void *)0))\n return(-1);\n if (reader->state == XML_TEXTREADER_ERROR)\n return(-1);\n reader->curnode = ((void *)0);\n if (reader->doc != ((void *)0))\n return(xmlTextReaderReadTree(reader));\n if (reader->ctxt == ((void *)0))\n return(-1);\n if (reader->mode == XML_TEXTREADER_MODE_INITIAL) {\n reader->mode = XML_TEXTREADER_MODE_INTERACTIVE;\n do {\n val = xmlTextReaderPushData(reader);\n if (val < 0) {\n reader->mode = XML_TEXTREADER_MODE_ERROR;\n reader->state = XML_TEXTREADER_ERROR;\n return(-1);\n }\n } while ((reader->ctxt->node == ((void *)0)) &&\n ((reader->mode != XML_TEXTREADER_MODE_EOF) &&\n (reader->state != XML_TEXTREADER_DONE)));\n if (reader->ctxt->node == ((void *)0)) {\n if (reader->ctxt->myDoc != ((void *)0)) {\n reader->node = reader->ctxt->myDoc->children;\n }\n if (reader->node == ((void *)0)) {\n reader->mode = XML_TEXTREADER_MODE_ERROR;\n reader->state = XML_TEXTREADER_ERROR;\n return(-1);\n }\n reader->state = XML_TEXTREADER_ELEMENT;\n } else {\n if (reader->ctxt->myDoc != ((void *)0)) {\n reader->node = reader->ctxt->myDoc->children;\n }\n if (reader->node == ((void *)0))\n reader->node = reader->ctxt->nodeTab[0];\n reader->state = XML_TEXTREADER_ELEMENT;\n }\n reader->depth = 0;\n reader->ctxt->parseMode = XML_PARSE_READER;\n goto node_found;\n }\n oldstate = reader->state;\n olddepth = reader->ctxt->nodeNr;\n oldnode = reader->node;\nget_next_node:\n if (reader->node == ((void *)0)) {\n if (reader->mode == XML_TEXTREADER_MODE_EOF) {\n return(0);\n } else {\n reader->mode = XML_TEXTREADER_MODE_ERROR;\n reader->state = XML_TEXTREADER_ERROR;\n return(-1);\n }\n }\n while ((reader->node != ((void *)0)) && (reader->node->next == ((void *)0)) &&\n (reader->ctxt->nodeNr == olddepth) &&\n ((oldstate == XML_TEXTREADER_BACKTRACK) ||\n (reader->node->children == ((void *)0)) ||\n (reader->node->type == XML_ENTITY_REF_NODE) ||\n ((reader->node->children != ((void *)0)) &&\n (reader->node->children->type == XML_TEXT_NODE) &&\n (reader->node->children->next == ((void *)0))) ||\n (reader->node->type == XML_DTD_NODE) ||\n (reader->node->type == XML_DOCUMENT_NODE) ||\n (reader->node->type == XML_HTML_DOCUMENT_NODE)) &&\n ((reader->ctxt->node == ((void *)0)) ||\n (reader->ctxt->node == reader->node) ||\n (reader->ctxt->node == reader->node->parent)) &&\n (reader->ctxt->instate != XML_PARSER_EOF) &&\n (((reader->ctxt)->disableSAX > 1) == 0)) {\n val = xmlTextReaderPushData(reader);\n if (val < 0) {\n reader->mode = XML_TEXTREADER_MODE_ERROR;\n reader->state = XML_TEXTREADER_ERROR;\n return(-1);\n }\n if (reader->node == ((void *)0))\n goto node_end;\n }\n if (oldstate != XML_TEXTREADER_BACKTRACK) {\n if ((reader->node->children != ((void *)0)) &&\n (reader->node->type != XML_ENTITY_REF_NODE) &&\n (reader->node->type != XML_XINCLUDE_START) &&\n (reader->node->type != XML_DTD_NODE)) {\n reader->node = reader->node->children;\n reader->depth++;\n reader->state = XML_TEXTREADER_ELEMENT;\n goto node_found;\n }\n }\n if (reader->node->next != ((void *)0)) {\n if ((oldstate == XML_TEXTREADER_ELEMENT) &&\n (reader->node->type == XML_ELEMENT_NODE) &&\n (reader->node->children == ((void *)0)) &&\n ((reader->node->extra & 0x1) == 0)\n && (reader->in_xinclude <= 0)\n ) {\n reader->state = XML_TEXTREADER_END;\n goto node_found;\n }\n if ((reader->validate) &&\n (reader->node->type == XML_ELEMENT_NODE))\n if (xmlTextReaderValidatePop(reader) < 0)\n return(-1);\n if ((reader->preserves > 0) &&\n (reader->node->extra & 0x4))\n reader->preserves--;\n reader->node = reader->node->next;\n reader->state = XML_TEXTREADER_ELEMENT;\n if ((reader->preserves == 0) &&\n (reader->in_xinclude == 0) &&\n (reader->entNr == 0) &&\n (reader->node->prev != ((void *)0)) &&\n (reader->node->prev->type != XML_DTD_NODE)) {\n xmlNodePtr tmp = reader->node->prev;\n if ((tmp->extra & 0x2) == 0) {\n if (oldnode == tmp)\n oldnode = ((void *)0);\n xmlUnlinkNode(tmp);\n xmlTextReaderFreeNode(reader, tmp);\n }\n }\n goto node_found;\n }\n if ((oldstate == XML_TEXTREADER_ELEMENT) &&\n (reader->node->type == XML_ELEMENT_NODE) &&\n (reader->node->children == ((void *)0)) &&\n ((reader->node->extra & 0x1) == 0)) {;\n reader->state = XML_TEXTREADER_END;\n goto node_found;\n }\n if ((reader->validate != XML_TEXTREADER_NOT_VALIDATE) &&\n (reader->node->type == XML_ELEMENT_NODE)) {\n if (xmlTextReaderValidatePop(reader) < 0)\n return(-1);\n }\n if ((reader->preserves > 0) &&\n (reader->node->extra & 0x4))\n reader->preserves--;\n reader->node = reader->node->parent;\n if ((reader->node == ((void *)0)) ||\n (reader->node->type == XML_DOCUMENT_NODE) ||\n (reader->node->type == XML_HTML_DOCUMENT_NODE)) {\n if (reader->mode != XML_TEXTREADER_MODE_EOF) {\n val = xmlParseChunk(reader->ctxt, \"\", 0, 1);\n reader->state = XML_TEXTREADER_DONE;\n if (val != 0) {\n reader->mode = XML_TEXTREADER_MODE_ERROR;\n reader->state = XML_TEXTREADER_ERROR;\n return(-1);\n }\n }\n reader->node = ((void *)0);\n reader->depth = -1;\n if ((oldnode != ((void *)0)) && (reader->preserves == 0) &&\n (reader->in_xinclude == 0) &&\n (reader->entNr == 0) &&\n (oldnode->type != XML_DTD_NODE) &&\n ((oldnode->extra & 0x2) == 0)) {\n xmlUnlinkNode(oldnode);\n xmlTextReaderFreeNode(reader, oldnode);\n }\n goto node_end;\n }\n if ((reader->preserves == 0) &&\n (reader->in_xinclude == 0) &&\n (reader->entNr == 0) &&\n (reader->node->last != ((void *)0)) &&\n ((reader->node->last->extra & 0x2) == 0)) {\n xmlNodePtr tmp = reader->node->last;\n xmlUnlinkNode(tmp);\n xmlTextReaderFreeNode(reader, tmp);\n }\n reader->depth--;\n reader->state = XML_TEXTREADER_BACKTRACK;\nnode_found:\n if ((reader->node != ((void *)0)) &&\n (reader->node->next == ((void *)0)) &&\n ((reader->node->type == XML_TEXT_NODE) ||\n (reader->node->type == XML_CDATA_SECTION_NODE))) {\n if (xmlTextReaderExpand(reader) == ((void *)0))\n return -1;\n }\n if ((reader->xinclude) && (reader->in_xinclude == 0) &&\n (reader->state != XML_TEXTREADER_BACKTRACK) &&\n (reader->node != ((void *)0)) &&\n (reader->node->type == XML_ELEMENT_NODE) &&\n (reader->node->ns != ((void *)0)) &&\n ((xmlStrEqual(reader->node->ns->href, (const xmlChar *) \"http://www.w3.org/2003/XInclude\")) ||\n (xmlStrEqual(reader->node->ns->href, (const xmlChar *) \"http://www.w3.org/2001/XInclude\")))) {\n if (reader->xincctxt == ((void *)0)) {\n reader->xincctxt = xmlXIncludeNewContext(reader->ctxt->myDoc);\n if (reader->xincctxt == ((void *)0)) {\n xmlTextReaderErrMemory(reader);\n return(-1);\n }\n xmlXIncludeSetFlags(reader->xincctxt,\n reader->parserFlags & (~XML_PARSE_NOXINCNODE));\n xmlXIncludeSetStreamingMode(reader->xincctxt, 1);\n if ((reader->errorFunc != ((void *)0)) || (reader->sErrorFunc != ((void *)0)))\n xmlXIncludeSetErrorHandler(reader->xincctxt,\n xmlTextReaderStructuredRelay, reader);\n if (reader->resourceLoader != ((void *)0))\n xmlXIncludeSetResourceLoader(reader->xincctxt,\n reader->resourceLoader, reader->resourceCtxt);\n }\n if (xmlTextReaderExpand(reader) == ((void *)0))\n return(-1);\n if (xmlXIncludeProcessNode(reader->xincctxt, reader->node) < 0) {\n int err = xmlXIncludeGetLastError(reader->xincctxt);\n if (err == XML_ERR_NO_MEMORY)\n xmlTextReaderErrMemory(reader);\n return(-1);\n }\n }\n if ((reader->node != ((void *)0)) && (reader->node->type == XML_XINCLUDE_START)) {\n reader->in_xinclude++;\n goto get_next_node;\n }\n if ((reader->node != ((void *)0)) && (reader->node->type == XML_XINCLUDE_END)) {\n reader->in_xinclude--;\n goto get_next_node;\n }\n if ((reader->node != ((void *)0)) &&\n (reader->node->type == XML_ENTITY_REF_NODE) &&\n (reader->ctxt != ((void *)0)) && (reader->ctxt->replaceEntities == 1)) {\n if ((reader->node->children != ((void *)0)) &&\n (reader->node->children->type == XML_ENTITY_DECL) &&\n (reader->node->children->children != ((void *)0))) {\n if (xmlTextReaderEntPush(reader, reader->node) < 0)\n goto get_next_node;\n reader->node = reader->node->children->children;\n }\n } else if ((reader->node != ((void *)0)) &&\n (reader->node->type == XML_ENTITY_REF_NODE) &&\n (reader->ctxt != ((void *)0)) && (reader->validate)) {\n if (xmlTextReaderValidateEntity(reader) < 0)\n return(-1);\n }\n if ((reader->node != ((void *)0)) &&\n (reader->node->type == XML_ENTITY_DECL) &&\n (reader->ent != ((void *)0)) && (reader->ent->children == reader->node)) {\n reader->node = xmlTextReaderEntPop(reader);\n reader->depth++;\n goto get_next_node;\n }\n if ((reader->validate != XML_TEXTREADER_NOT_VALIDATE) && (reader->node != ((void *)0))) {\n xmlNodePtr node = reader->node;\n if ((node->type == XML_ELEMENT_NODE) &&\n ((reader->state != XML_TEXTREADER_END) &&\n (reader->state != XML_TEXTREADER_BACKTRACK))) {\n if (xmlTextReaderValidatePush(reader) < 0)\n return(-1);\n } else if ((node->type == XML_TEXT_NODE) ||\n (node->type == XML_CDATA_SECTION_NODE)) {\n xmlTextReaderValidateCData(reader, node->content,\n xmlStrlen(node->content));\n }\n }\n if ((reader->patternNr > 0) && (reader->state != XML_TEXTREADER_END) &&\n (reader->state != XML_TEXTREADER_BACKTRACK)) {\n int i;\n for (i = 0;i < reader->patternNr;i++) {\n if (xmlPatternMatch(reader->patternTab[i], reader->node) == 1) {\n xmlTextReaderPreserve(reader);\n break;\n }\n }\n }\n if ((reader->validate == XML_TEXTREADER_VALIDATE_XSD) &&\n (reader->xsdValidErrors == 0) &&\n (reader->xsdValidCtxt != ((void *)0))) {\n reader->xsdValidErrors = !xmlSchemaIsValid(reader->xsdValidCtxt);\n }\n return(1);\nnode_end:\n reader->state = XML_TEXTREADER_DONE;\n return(0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 50, "memory_management": 0, "memory_operation": 0, "if_statement": 59, "for_loop": 1, "while_loop": 2, "switch_statement": 0, "goto_statement": 11, "return_statement": 20, "break_continue_statement": 1}}, {"id": "libxml2#types_prep#libxml_xmlRelaxNGValidCtxtPtrWrap.c", "codebase": "libxml2", "c_file": "types.c", "function": "libxml_xmlRelaxNGValidCtxtPtrWrap", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlRelaxNGValidCtxtPtrWrap(xmlRelaxNGValidCtxtPtr valid)\n{\n PyObject *ret;\n if (valid == ((void *)0)) {\n _Py_INCREF(((PyObject*)((&_Py_NoneStruct))));\n return ((&_Py_NoneStruct));\n }\n ret =\n PyCapsule_New((void *) valid,\n (char *) \"xmlRelaxNGValidCtxtPtr\", ((void *)0));\n return (ret);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "screen-4.9.0#process_prep#IsNumColon.c", "codebase": "screen-4.9.0", "c_file": "process.c", "function": "IsNumColon", "sloc": "16", "c_code": "int\nIsNumColon(s, base, p, psize)\nint base, psize;\nchar *s, *p;\n{\n char *q;\n if ((q = rindex(s, ':')) != 0)\n {\n strncpy(p, q + 1, psize - 1);\n p[psize - 1] = '\\0';\n *q = '\\0';\n }\n else\n *p = '\\0';\n return IsNum(s, base);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_SET_8_MATRIX_CHAIN_MULTIPLICATION_prep#len.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_SET_8_MATRIX_CHAIN_MULTIPLICATION.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#window_prep#window_pane_unset_palette.c", "codebase": "tmux", "c_file": "window.c", "function": "window_pane_unset_palette", "sloc": "8", "c_code": "void\nwindow_pane_unset_palette(struct window_pane *wp, u_int n)\n{\n if (n > 0xff || wp->palette == ((void *)0))\n return;\n wp->palette[n] = 0;\n wp->flags |= 0x1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#quotearg_prep#quotearg_char_mem.c", "codebase": "tar-1.34", "c_file": "quotearg.c", "function": "quotearg_char_mem", "sloc": "8", "c_code": "char *\nquotearg_char_mem (char const *arg, size_t argsize, char ch)\n{\n struct quoting_options options;\n options = default_quoting_options;\n set_char_quoting (&options, ch, 1);\n return quotearg_n_options (0, arg, argsize, &options);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "less-633#optfunc_prep#calc_jump_sline.c", "codebase": "less-633", "c_file": "optfunc.c", "function": "calc_jump_sline", "sloc": "6", "c_code": "void calc_jump_sline(void)\n{\n if (jump_sline_fraction < 0)\n return;\n jump_sline = muldiv(sc_height, jump_sline_fraction, 1000000);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#SMALLEST_SUM_CONTIGUOUS_SUBARRAY_prep#main.c", "codebase": "transcoder-set", "c_file": "SMALLEST_SUM_CONTIGUOUS_SUBARRAY.c", "function": "main", "sloc": "25", "c_code": "int main(void) {\n int n_success = 0;\n int param0_0[] = {2,9,13,14,15,18,19,19,25,26,29,29,29,30,31,36,37,37,38,39,39,40,40,42,42,46,50,53,58,60,62,64,65,67,68,69,72,77,78,83,85,89,90,93,95,95,97};\nint param0_1[] = {14,-58,8,78,-26,-20,-60,42,-64,-12};\nint param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};\nint param0_3[] = {44,88,20,47,69,42,26,49,71,91,18,95,9,66,60,37,47,29,98,63,15,9,80,66,1,9,57,56,20,2,1};\nint param0_4[] = {-78,-64,-62,-60,-52,4,8,46,72,74};\nint param0_5[] = {0,0,1,0,0,0,0,1,1,0,0,1,1,0,1,1};\nint param0_6[] = {3,7,16,17,23,23,23,28,29,30,34,38,40,41,43,43,44,46,51,51,51,55,57,58,61,62,66,66,67,69,70,73,75,77,79,80,85,85,87,87,93,96};\nint param0_7[] = {80,22,38,26,62,-48,-48,46,-54,4,76,46,48,40,-92,-98,-88,12,-42,-94,76,-16,-82,62,18,-24};\nint param0_8[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1};\nint param0_9[] = {85,44,1,97,50,74,62,90,3,78,8,48,96,41,36,91,57,97,85,90,78,43,28,92,85,59,29,38,34,65,20,26,27,23,71,22,47,99,68,93,67,66,69,82,98,15,44,51,65};\nint *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};\n int param1[] = {24,6,8,26,8,11,38,22,13,45};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "nettle-3.9.1#umac-poly128_prep#_nettle_umac_poly128.c", "codebase": "nettle-3.9.1", "c_file": "umac-poly128.c", "function": "_nettle_umac_poly128", "sloc": "39", "c_code": "void\n_nettle_umac_poly128 (const uint32_t *k, uint64_t *y, uint64_t mh, uint64_t ml)\n{\n uint64_t yh, yl, cy;\n if ( (mh >> 32) == 0xffffffff)\n {\n poly128_mul (k, y);\n if (y[1] > 0)\n y[1]--;\n else if (y[0] > 0)\n {\n y[0]--;\n y[1] = (~(uint64_t) 0);\n }\n else\n {\n y[0] = (~(uint64_t) 0);\n y[1] = (-(uint64_t) 159)-1;\n }\n mh -= (ml < 159);\n ml -= 159;\n }\n ((void) sizeof ((mh < (~(uint64_t) 0) || ml < (-(uint64_t) 159)) ? 1 : 0), __extension__ ({ if (mh < (~(uint64_t) 0) || ml < (-(uint64_t) 159)) ; else __assert_fail (\"mh < UMAC_P128_HI || ml < UMAC_P128_LO\", \"umac-poly128.c\", 131, __extension__ __PRETTY_FUNCTION__); }));\n poly128_mul (k, y);\n yl = y[1] + ml;\n cy = (yl < ml);\n yh = y[0] + cy;\n cy = (yh < cy);\n yh += mh;\n cy += (yh < mh);\n ((void) sizeof ((cy <= 1) ? 1 : 0), __extension__ ({ if (cy <= 1) ; else __assert_fail (\"cy <= 1\", \"umac-poly128.c\", 140, __extension__ __PRETTY_FUNCTION__); }));\n if (cy)\n {\n yl += 159;\n yh += yl < 159;\n }\n y[0] = yh;\n y[1] = yl;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "uucp-1.07#proty_prep#fywait.c", "codebase": "uucp-1.07", "c_file": "proty.c", "function": "fywait", "sloc": "12", "c_code": "boolean\nfywait (qdaemon)\n struct sdaemon *qdaemon;\n{\n boolean fexit = (0);\n while (! fexit)\n {\n if (! fywait_for_packet (qdaemon, &fexit))\n return (0);\n }\n return (1);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#HOW_TO_TURN_OFF_A_PARTICULAR_BIT_IN_A_NUMBER_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "HOW_TO_TURN_OFF_A_PARTICULAR_BIT_IN_A_NUMBER.c", "function": "f_gold", "sloc": "4", "c_code": "int f_gold ( int n, int k ) {\n if ( k <= 0 ) return n;\n return ( n & ~ ( 1 << ( k - 1 ) ) );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "tmux#cmd-find_prep#cmd_find_from_nothing.c", "codebase": "tmux", "c_file": "cmd-find.c", "function": "cmd_find_from_nothing", "sloc": "16", "c_code": "int\ncmd_find_from_nothing(struct cmd_find_state *fs, int flags)\n{\n cmd_find_clear_state(fs, flags);\n fs->s = cmd_find_best_session(((void *)0), 0, flags);\n if (fs->s == ((void *)0)) {\n cmd_find_clear_state(fs, flags);\n return (-1);\n }\n fs->wl = fs->s->curw;\n fs->idx = fs->wl->idx;\n fs->w = fs->wl->window;\n fs->wp = fs->w->active;\n cmd_find_log_state(__func__, fs);\n return (0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "optipng-0.7.8#png_prep#png_get_libpng_ver.c", "codebase": "optipng-0.7.8", "c_file": "png.c", "function": "png_get_libpng_ver", "sloc": "5", "c_code": "png_const_charp\npng_get_libpng_ver(png_const_structrp png_ptr)\n{\n return png_get_header_ver(png_ptr);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlXPathOrderDocElems.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlXPathOrderDocElems", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlXPathOrderDocElems(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n long c_retval;\n xmlDocPtr doc;\n PyObject *pyobj_doc;\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"O:xmlXPathOrderDocElems\", &pyobj_doc))\n return(((void *)0));\n doc = (xmlDocPtr) (((pyobj_doc) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_doc))->obj));\n c_retval = xmlXPathOrderDocElems(doc);\n py_retval = libxml_longWrap((long) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 2, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_NUMBERS_THAT_DONT_CONTAIN_3_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "COUNT_NUMBERS_THAT_DONT_CONTAIN_3.c", "function": "f_filled", "sloc": "1", "c_code": "int f_filled ( int n ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#PRODUCT_MAXIMUM_FIRST_ARRAY_MINIMUM_SECOND_prep#max.c", "codebase": "transcoder-set", "c_file": "PRODUCT_MAXIMUM_FIRST_ARRAY_MINIMUM_SECOND.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "json.h#allow_unquoted_keys_prep#utest_run_allow_unquoted_keys_read_write_minified_read.c", "codebase": "json.h", "c_file": "allow_unquoted_keys.c", "function": "utest_run_allow_unquoted_keys_read_write_minified_read", "sloc": "7", "c_code": "void utest_run_allow_unquoted_keys_read_write_minified_read(int *utest_result, struct allow_unquoted_keys *utest_fixture) {\n size_t size = 0;\n void *json = json_write_minified(utest_fixture->value, &size);\n free(utest_fixture->value);\n utest_fixture->value = json_parse(json, size - 1);\n free(json);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 2, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_inf_and_nan_prep#json_parse_value.c", "codebase": "json.h", "c_file": "allow_inf_and_nan.c", "function": "json_parse_value", "sloc": "95", "c_code": "void json_parse_value(struct json_parse_state_s *state, int is_global_object,\n struct json_value_s *value) {\n const size_t flags_bitset = state->flags_bitset;\n const char *const src = state->src;\n const size_t size = state->size;\n size_t offset;\n (void)json_skip_all_skippables(state);\n offset = state->offset;\n if (is_global_object) {\n value->type = json_type_object;\n value->payload = state->dom;\n state->dom += sizeof(struct json_object_s);\n json_parse_object(state, 1,\n (struct json_object_s *)value->payload);\n } else {\n switch (src[offset]) {\n case '\"':\n case '\\'':\n value->type = json_type_string;\n value->payload = state->dom;\n state->dom += sizeof(struct json_string_s);\n json_parse_string(state, (struct json_string_s *)value->payload);\n break;\n case '{':\n value->type = json_type_object;\n value->payload = state->dom;\n state->dom += sizeof(struct json_object_s);\n json_parse_object(state, 0,\n (struct json_object_s *)value->payload);\n break;\n case '[':\n value->type = json_type_array;\n value->payload = state->dom;\n state->dom += sizeof(struct json_array_s);\n json_parse_array(state, (struct json_array_s *)value->payload);\n break;\n case '-':\n case '+':\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n case '.':\n value->type = json_type_number;\n value->payload = state->dom;\n state->dom += sizeof(struct json_number_s);\n json_parse_number(state, (struct json_number_s *)value->payload);\n break;\n default:\n if ((offset + 4) <= size && 't' == src[offset + 0] &&\n 'r' == src[offset + 1] && 'u' == src[offset + 2] &&\n 'e' == src[offset + 3]) {\n value->type = json_type_true;\n value->payload = 0;\n state->offset += 4;\n } else if ((offset + 5) <= size && 'f' == src[offset + 0] &&\n 'a' == src[offset + 1] && 'l' == src[offset + 2] &&\n 's' == src[offset + 3] && 'e' == src[offset + 4]) {\n value->type = json_type_false;\n value->payload = 0;\n state->offset += 5;\n } else if ((offset + 4) <= size && 'n' == src[offset + 0] &&\n 'u' == src[offset + 1] && 'l' == src[offset + 2] &&\n 'l' == src[offset + 3]) {\n value->type = json_type_null;\n value->payload = 0;\n state->offset += 4;\n } else if ((json_parse_flags_allow_inf_and_nan & flags_bitset) &&\n (offset + 3) <= size && 'N' == src[offset + 0] &&\n 'a' == src[offset + 1] && 'N' == src[offset + 2]) {\n value->type = json_type_number;\n value->payload = state->dom;\n state->dom += sizeof(struct json_number_s);\n json_parse_number(state, (struct json_number_s *)value->payload);\n } else if ((json_parse_flags_allow_inf_and_nan & flags_bitset) &&\n (offset + 8) <= size && 'I' == src[offset + 0] &&\n 'n' == src[offset + 1] && 'f' == src[offset + 2] &&\n 'i' == src[offset + 3] && 'n' == src[offset + 4] &&\n 'i' == src[offset + 5] && 't' == src[offset + 6] &&\n 'y' == src[offset + 7]) {\n value->type = json_type_number;\n value->payload = state->dom;\n state->dom += sizeof(struct json_number_s);\n json_parse_number(state, (struct json_number_s *)value->payload);\n }\n break;\n }\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 15, "memory_management": 0, "memory_operation": 0, "if_statement": 6, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 5}}, {"id": "libxml2#parser_prep#xmlCtxtReadFile.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlCtxtReadFile", "sloc": "12", "c_code": "xmlDocPtr\nxmlCtxtReadFile(xmlParserCtxtPtr ctxt, const char *filename,\n const char *encoding, int options)\n{\n xmlParserInputPtr input;\n if (ctxt == ((void *)0))\n return(((void *)0));\n xmlCtxtReset(ctxt);\n xmlCtxtUseOptions(ctxt, options);\n input = xmlCtxtNewInputFromUrl(ctxt, filename, ((void *)0), encoding, 0);\n return(xmlCtxtParseDocument(ctxt, input));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 0}}, {"id": "libosip2-5.3.1#osip_body_prep#osip_body_set_contenttype.c", "codebase": "libosip2-5.3.1", "c_file": "osip_body.c", "function": "osip_body_set_contenttype", "sloc": "17", "c_code": "int osip_body_set_contenttype(osip_body_t *body, const char *hvalue) {\n int i;\n if (body == ((void *)0))\n return -2;\n if (hvalue == ((void *)0))\n return -2;\n i = osip_content_type_init(&(body->content_type));\n if (i != 0)\n return i;\n i = osip_content_type_parse(body->content_type, hvalue);\n if (i != 0) {\n osip_content_type_free(body->content_type);\n body->content_type = ((void *)0);\n return i;\n }\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 3, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 5, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_1_prep#main.c", "codebase": "transcoder-set", "c_file": "COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_1.c", "function": "main", "sloc": "15", "c_code": "int main(void) {\n int n_success = 0;\n int param0[] = {79,95,15,71,16,91,10,98,30,58};\n int param1[] = {16,62,9,18,85,52,91,81,42,69};\n for(int i = 0; i < len(param0); ++i)\n {\n if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))\n {\n n_success+=1;\n }\n break;\n }\n printf(\"#Results:\", \" \", n_success, \", \", len(param0));\n return 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 2, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 1, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 1}}, {"id": "nano-7.2#nano_prep#splice_node.c", "codebase": "nano-7.2", "c_file": "nano.c", "function": "splice_node", "sloc": "10", "c_code": "void splice_node(linestruct *afterthis, linestruct *newnode)\n{\n newnode->next = afterthis->next;\n newnode->prev = afterthis;\n if (afterthis->next != ((void *)0))\n afterthis->next->prev = newnode;\n afterthis->next = newnode;\n if (openfile && openfile->filebot == afterthis)\n openfile->filebot = newnode;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gawk-5.2.2#eval_prep#register_exec_hook.c", "codebase": "gawk-5.2.2", "c_file": "eval.c", "function": "register_exec_hook", "sloc": "20", "c_code": "int\nregister_exec_hook(Func_pre_exec preh, Func_post_exec posth)\n{\n int pos = 0;\n if (! preh || (post_execute && posth))\n return 0;\n if (num_exec_hook == 10)\n return 0;\n if (num_exec_hook > 0) {\n pos = !! (do_flags & DO_DEBUG);\n if (num_exec_hook > pos)\n memmove(pre_execute + pos + 1, pre_execute + pos,\n (num_exec_hook - pos) * sizeof (preh));\n }\n pre_execute[pos] = preh;\n num_exec_hook++;\n if (posth)\n post_execute = posth;\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlLineNumbersDefault.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlLineNumbersDefault", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlLineNumbersDefault(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int val;\n if (libxml_deprecationWarning(\"xmlLineNumbersDefault\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlLineNumbersDefault\", &val))\n return(((void *)0));\n c_retval = xmlLineNumbersDefault(val);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "json.h#allow_json5_prep#json_parse.c", "codebase": "json.h", "c_file": "allow_json5.c", "function": "json_parse", "sloc": "4", "c_code": "struct json_value_s *json_parse(const void *src, size_t src_size) {\n return json_parse_ex(src, src_size, json_parse_flags_default, 0,\n 0, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PRODUCT_NODES_K_TH_LEVEL_TREE_REPRESENTED_STRING_prep#cmpfunc.c", "codebase": "transcoder-set", "c_file": "PRODUCT_NODES_K_TH_LEVEL_TREE_REPRESENTED_STRING.c", "function": "cmpfunc", "sloc": "1", "c_code": "int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tmux#colour_prep#colour_split_rgb.c", "codebase": "tmux", "c_file": "colour.c", "function": "colour_split_rgb", "sloc": "7", "c_code": "void\ncolour_split_rgb(int c, u_char *r, u_char *g, u_char *b)\n{\n *r = (c >> 16) & 0xff;\n *g = (c >> 8) & 0xff;\n *b = c & 0xff;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "json.h#allow_leading_or_trailing_decimal_point_prep#json_parse.c", "codebase": "json.h", "c_file": "allow_leading_or_trailing_decimal_point.c", "function": "json_parse", "sloc": "4", "c_code": "struct json_value_s *json_parse(const void *src, size_t src_size) {\n return json_parse_ex(src, src_size, json_parse_flags_default, 0,\n 0, 0);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#COUNT_ROTATIONS_DIVISIBLE_8_prep#sort.c", "codebase": "transcoder-set", "c_file": "COUNT_ROTATIONS_DIVISIBLE_8.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "rcs-5.10.1#rcsutil_prep#runv.c", "codebase": "rcs-5.10.1", "c_file": "rcsutil.c", "function": "runv", "sloc": "50", "c_code": "int\nrunv (int infd, char const *outname, char const **args)\n{\n int wstatus;\n if (!(top->behavior. fixed_SIGCHLD))\n {\n (top->behavior. fixed_SIGCHLD) = 1;\n maybe_reset_sigchld ();\n }\n oflush ();\n {\n pid_t pid;\n if (!(pid = vfork ()))\n {\n char const *notfound;\n if (infd != -1\n && 0 != infd\n && 0 != (close (0),\n rpl_fcntl (infd, 0, 0)))\n exit_diff_trouble (\"%s: I/O redirection failed\",\n args[1]);\n if (outname)\n if ((0 > (fdreopen (1, outname, 0100 | 01000 | 01))))\n exit_diff_trouble (\"%s: %s: cannot create\",\n args[1], outname);\n execv (args[1], (char **) (args + 1));\n notfound = args[1];\n if ((*__errno_location ()) == 8)\n {\n args[0] = notfound = \"/bin/sh\";\n execv (args[0], (char **) args);\n }\n exit_diff_trouble (\"%s: not found\", notfound);\n }\n if ((0 > (pid)))\n fatal_sys (\"fork\");\n if ((0 > (waitpid (pid, &wstatus, 0))))\n fatal_sys (\"waitpid\");\n }\n if (!(((wstatus) & 0x7f) == 0))\n {\n if ((((signed char) (((wstatus) & 0x7f) + 1) >> 1) > 0))\n {\n complain_signal (args[1], ((wstatus) & 0x7f));\n generic_fatal (((void *)0), \"%s got a fatal signal\", args[1]);\n }\n generic_fatal (((void *)0), \"%s failed for unknown reason\", args[1]);\n }\n return (((wstatus) & 0xff00) >> 8);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 10, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "mcsim-6.2.0#mh_prep#TestImpRatioTemper.c", "codebase": "mcsim-6.2.0", "c_file": "mh.c", "function": "TestImpRatioTemper", "sloc": "27", "c_code": "BOOL TestImpRatioTemper (PGIBBSDATA pgd, BOOL bExptIsDep,\n double dLnKern, double dLnKernNew,\n double dLnPrior, double dLnPriorNew,\n double dLnLike, double dLnLikeNew,\n double dLnData, double dLnDataNew, long indexT)\n{\n double dPjump;\n if (dLnPriorNew == -1.0E+100 ||\n dLnLikeNew == -1.0E+100 ||\n dLnDataNew == -1.0E+100)\n return 0;\n if (pgd->rgdPerks[indexT] == 0)\n return 1;\n if (pgd->nSimTypeFlag == 3) {\n dPjump = pgd->rgdPerks[indexT] *\n (dLnPriorNew - dLnPrior + dLnLikeNew - dLnLike) +\n dLnKern - dLnKernNew;\n }\n else {\n dPjump = dLnPriorNew - dLnPrior +\n pgd->rgdPerks[indexT] * (dLnLikeNew - dLnLike) +\n dLnKern - dLnKernNew;\n }\n if (bExptIsDep)\n dPjump += pgd->rgdPerks[indexT] * (dLnDataNew - dLnData);\n return ((BOOL) (log(Randoms()) <= dPjump));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 4, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "lil#lil_prep#lil_alloc_integer.c", "codebase": "lil", "c_file": "lil.c", "function": "lil_alloc_integer", "sloc": "6", "c_code": "lil_value_t lil_alloc_integer(lilint_t num)\n{\n char buff[128];\n sprintf(buff, \"%\"\"l\" \"i\", num);\n return alloc_value(buff);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nettle-3.9.1#ecc-mul-m_prep#_nettle_ecc_mul_m.c", "codebase": "nettle-3.9.1", "c_file": "ecc-mul-m.c", "function": "_nettle_ecc_mul_m", "sloc": "59", "c_code": "void\n_nettle_ecc_mul_m (const struct ecc_modulo *m,\n mp_limb_t a24,\n unsigned bit_low, unsigned bit_high,\n mp_limb_t *qx, const uint8_t *n, const mp_limb_t *px,\n mp_limb_t *scratch)\n{\n unsigned i;\n mp_limb_t swap;\n __gmpn_copyi ((scratch), px, m->size);\n (scratch + m->size)[0] = 1;\n __gmpn_zero ((scratch + m->size)+1, m->size - 1);\n _nettle_ecc_mod_add (m, (scratch + 4*m->size), (scratch), (scratch + m->size));\n _nettle_ecc_mod_sub (m, (scratch + 5*m->size), (scratch), (scratch + m->size));\n _nettle_ecc_mod_sqr (m, (scratch + 4*m->size), (scratch + 4*m->size), (scratch + 6*m->size));\n _nettle_ecc_mod_sqr (m, (scratch + 5*m->size), (scratch + 5*m->size), (scratch + 6*m->size));\n _nettle_ecc_mod_mul (m, (scratch + 2*m->size), (scratch + 4*m->size), (scratch + 5*m->size), (scratch + 6*m->size));\n _nettle_ecc_mod_sub (m, (scratch + 5*m->size), (scratch + 4*m->size), (scratch + 5*m->size));\n _nettle_ecc_mod_addmul_1 (m, (scratch + 4*m->size), (scratch + 5*m->size), a24);\n _nettle_ecc_mod_mul (m, (scratch + 3*m->size), (scratch + 5*m->size), (scratch + 4*m->size), (scratch + 6*m->size));\n for (i = bit_high, swap = 0; i >= bit_low; i--)\n {\n mp_limb_t bit = (n[i/8] >> (i & 7)) & 1;\n __gmpn_cnd_swap (swap ^ bit, (scratch), (scratch + 2*m->size), 2*m->size);\n swap = bit;\n _nettle_ecc_mod_add (m, (scratch + 4*m->size), (scratch), (scratch + m->size));\n _nettle_ecc_mod_sub (m, (scratch + 5*m->size), (scratch + 2*m->size), (scratch + 3*m->size));\n _nettle_ecc_mod_mul (m, (scratch + 5*m->size), (scratch + 5*m->size), (scratch + 4*m->size), (scratch + 6*m->size));\n _nettle_ecc_mod_sqr (m, (scratch + 4*m->size), (scratch + 4*m->size), (scratch + 6*m->size));\n _nettle_ecc_mod_sub (m, (scratch + m->size), (scratch), (scratch + m->size));\n _nettle_ecc_mod_add (m, (scratch + 3*m->size), (scratch + 2*m->size), (scratch + 3*m->size));\n _nettle_ecc_mod_mul (m, (scratch + 3*m->size), (scratch + 3*m->size), (scratch + m->size), (scratch + 6*m->size));\n _nettle_ecc_mod_sqr (m, (scratch + m->size), (scratch + m->size), (scratch + 6*m->size));\n _nettle_ecc_mod_mul (m, (scratch), (scratch + 4*m->size), (scratch + m->size), (scratch + 6*m->size));\n _nettle_ecc_mod_sub (m, (scratch + m->size), (scratch + 4*m->size), (scratch + m->size));\n _nettle_ecc_mod_addmul_1 (m, (scratch + 4*m->size), (scratch + m->size), a24);\n _nettle_ecc_mod_mul (m, (scratch + m->size), (scratch + m->size), (scratch + 4*m->size), (scratch + 6*m->size));\n _nettle_ecc_mod_add (m, (scratch + 2*m->size), (scratch + 5*m->size), (scratch + 3*m->size));\n _nettle_ecc_mod_sqr (m, (scratch + 2*m->size), (scratch + 2*m->size), (scratch + 6*m->size));\n _nettle_ecc_mod_sub (m, (scratch + 3*m->size), (scratch + 5*m->size), (scratch + 3*m->size));\n _nettle_ecc_mod_sqr (m, (scratch + 3*m->size), (scratch + 3*m->size), (scratch + 6*m->size));\n _nettle_ecc_mod_mul (m, (scratch + 3*m->size), (scratch + 3*m->size), px, (scratch + 6*m->size));\n }\n __gmpn_cnd_swap (swap, (scratch), (scratch + 2*m->size), 2*m->size);\n for (i = 0; i < bit_low; i++)\n {\n _nettle_ecc_mod_add (m, (scratch + 4*m->size), (scratch), (scratch + m->size));\n _nettle_ecc_mod_sub (m, (scratch + 5*m->size), (scratch), (scratch + m->size));\n _nettle_ecc_mod_sqr (m, (scratch + 4*m->size), (scratch + 4*m->size), (scratch + 6*m->size));\n _nettle_ecc_mod_sqr (m, (scratch + 5*m->size), (scratch + 5*m->size), (scratch + 6*m->size));\n _nettle_ecc_mod_mul (m, (scratch), (scratch + 4*m->size), (scratch + 5*m->size), (scratch + 6*m->size));\n _nettle_ecc_mod_sub (m, (scratch + 5*m->size), (scratch + 4*m->size), (scratch + 5*m->size));\n _nettle_ecc_mod_addmul_1 (m, (scratch + 4*m->size), (scratch + 5*m->size), a24);\n _nettle_ecc_mod_mul (m, (scratch + m->size), (scratch + 5*m->size), (scratch + 4*m->size), (scratch + 6*m->size));\n }\n ((void) sizeof ((m->invert_itch <= 7 * m->size) ? 1 : 0), __extension__ ({ if (m->invert_itch <= 7 * m->size) ; else __assert_fail (\"m->invert_itch <= 7 * m->size\", \"ecc-mul-m.c\", 163, __extension__ __PRETTY_FUNCTION__); }));\n m->invert (m, (scratch + 2*m->size), (scratch + m->size), (scratch + 3*m->size) + m->size);\n _nettle_ecc_mod_mul_canonical (m, qx, (scratch), (scratch + 2*m->size), (scratch + 3*m->size));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 1, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#DYNAMIC_PROGRAMMING_SUBSET_SUM_PROBLEM_1_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "DYNAMIC_PROGRAMMING_SUBSET_SUM_PROBLEM_1.c", "function": "f_gold", "sloc": "20", "c_code": "_Bool f_gold ( int set [ ], int n, int sum ) {\n _Bool subset [ n + 1 ] [ sum + 1 ];\n for ( int i = 0;\n i <= n;\n i ++ ) subset [ i ] [ 0 ] = 1;\n for ( int i = 1;\n i <= sum;\n i ++ ) subset [ 0 ] [ i ] = 0;\n for ( int i = 1;\n i <= n;\n i ++ ) {\n for ( int j = 1;\n j <= sum;\n j ++ ) {\n if ( j < set [ i - 1 ] ) subset [ i ] [ j ] = subset [ i - 1 ] [ j ];\n if ( j >= set [ i - 1 ] ) subset [ i ] [ j ] = subset [ i - 1 ] [ j ] || subset [ i - 1 ] [ j - set [ i - 1 ] ];\n }\n }\n return subset [ n ] [ sum ];\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 4, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "brotli-1.0.9#decode_prep#BrotliDecoderDestroyInstance.c", "codebase": "brotli-1.0.9", "c_file": "decode.c", "function": "BrotliDecoderDestroyInstance", "sloc": "10", "c_code": "void BrotliDecoderDestroyInstance(BrotliDecoderStateInternal* state) {\n if (!state) {\n return;\n } else {\n brotli_free_func free_func = state->free_func;\n void* opaque = state->memory_manager_opaque;\n BrotliDecoderStateCleanup(state);\n free_func(opaque, state);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "uucp-1.07#uupick_prep#main.c", "codebase": "uucp-1.07", "c_file": "uupick.c", "function": "main", "sloc": "193", "c_code": "int\nmain (argc, argv)\n int argc;\n char **argv;\n{\n const char *zsystem = ((void *)0);\n const char *zconfig = ((void *)0);\n int iopt;\n pointer puuconf;\n int iuuconf;\n const char *zpubdir;\n char *zfile, *zfrom, *zfull;\n char *zallsys;\n char ab[1000];\n boolean fquit;\n zProgram = \"uupick\";\n while ((iopt = getopt_long (argc, argv, \"I:s:vx:\", asPlongopts,\n (int *) ((void *)0))) != (-1))\n {\n switch (iopt)\n {\n case 's':\n zsystem = gnu_optarg;\n break;\n case 'I':\n if (fsysdep_other_config (gnu_optarg))\n zconfig = gnu_optarg;\n break;\n case 'x':\n iDebug |= idebug_parse (gnu_optarg);\n break;\n case 'v':\n printf (\"uupick (Taylor UUCP) %s\\n\", \"1.07\");\n printf (\"Copyright (C) 1991, 92, 93, 94, 1995, 2002 Ian Lance Taylor\\n\");\n printf (\"This program is free software; you may redistribute it under the terms of\\n\");\n printf (\"the GNU General Public LIcense. This program has ABSOLUTELY NO WARRANTY.\\n\");\n exit (0);\n case 1:\n uphelp ();\n exit (0);\n case 0:\n break;\n default:\n upusage ();\n }\n }\n if (argc != gnu_optind)\n upusage ();\n iuuconf = uuconf_init (&puuconf, (const char *) ((void *)0), zconfig);\n if (iuuconf != (0))\n ulog_uuconf (LOG_FATAL, puuconf, iuuconf);\n usysdep_initialize (puuconf, (01) | (02));\n zpubdir = ((void *)0);\n if (zsystem != ((void *)0))\n {\n struct uuconf_system ssys;\n iuuconf = uuconf_system_info (puuconf, zsystem, &ssys);\n if (iuuconf == (0))\n {\n zpubdir = zbufcpy (ssys.uuconf_zpubdir);\n (void) uuconf_system_free (puuconf, &ssys);\n }\n }\n if (zpubdir == ((void *)0))\n {\n iuuconf = uuconf_pubdir (puuconf, &zpubdir);\n if (iuuconf != (0))\n ulog_uuconf (LOG_FATAL, puuconf, iuuconf);\n }\n if (! fsysdep_uupick_init (zsystem, zpubdir))\n usysdep_exit ((0));\n zallsys = ((void *)0);\n fquit = (0);\n while (! fquit\n && ((zfile = zsysdep_uupick (zsystem, zpubdir, &zfrom, &zfull))\n != ((void *)0)))\n {\n boolean fdir;\n char *zto, *zlocal;\n FILE *e;\n boolean fcontinue;\n fdir = fsysdep_directory (zfull);\n do\n {\n boolean fbadname;\n fcontinue = (0);\n if (zallsys == ((void *)0)\n || strcmp (zallsys, zfrom) != 0)\n {\n if (zallsys != ((void *)0))\n {\n ubuffree (zallsys);\n zallsys = ((void *)0);\n }\n printf (\"from %s: %s %s ?\\n\", zfrom, fdir ? \"dir\" : \"file\",\n zfile);\n if (fgets (ab, sizeof ab, stdin) == ((void *)0))\n break;\n }\n if (ab[0] == 'q')\n {\n fquit = (1);\n break;\n }\n switch (ab[0])\n {\n case '\\n':\n break;\n case 'd':\n if (fdir)\n (void) fsysdep_rmdir (zfull);\n else\n {\n if (remove (zfull) != 0)\n ulog (LOG_ERROR, \"remove (%s): %s\", zfull,\n strerror((*__errno_location ())));\n }\n break;\n case 'm':\n case 'a':\n zto = ab + 1 + strspn (ab + 1, \" \\t\");\n zto[strcspn (zto, \" \\t\\n\")] = '\\0';\n zlocal = zsysdep_uupick_local_file (zto, &fbadname);\n if (zlocal == ((void *)0))\n {\n if (! fbadname)\n usysdep_exit ((0));\n ulog (LOG_ERROR, \"%s: bad local file name\", zto);\n fcontinue = (1);\n break;\n }\n zto = zsysdep_in_dir (zlocal, zfile);\n ubuffree (zlocal);\n if (zto == ((void *)0))\n usysdep_exit ((0));\n if (! fdir)\n upmove (zfull, zto);\n else\n {\n usysdep_walk_tree (zfull, upmovedir, (pointer) zto);\n (void) fsysdep_rmdir (zfull);\n }\n ubuffree (zto);\n if (ab[0] == 'a')\n {\n zallsys = zbufcpy (zfrom);\n ab[0] = 'm';\n }\n break;\n case 'p':\n if (fdir)\n ulog (LOG_ERROR, \"Can't print directory\");\n else\n {\n e = fopen (zfull, \"r\");\n if (e == ((void *)0))\n ulog (LOG_ERROR, \"fopen (%s): %s\", zfull,\n strerror ((*__errno_location ())));\n else\n {\n while (fgets (ab, sizeof ab, e) != ((void *)0))\n (void) fputs (ab, stdout);\n (void) fclose (e);\n }\n }\n fcontinue = (1);\n break;\n case '!':\n (void) system (ab + 1);\n fcontinue = (1);\n break;\n default:\n printf (\"uupick commands:\\n\");\n printf (\"q: quit\\n\");\n printf (\": skip file\\n\");\n printf (\"m [dir]: move file to directory\\n\");\n printf (\"a [dir]: move all files from this system to directory\\n\");\n printf (\"p: list file to stdout\\n\");\n printf (\"d: delete file\\n\");\n printf (\"! command: shell escape\\n\");\n fcontinue = (1);\n break;\n }\n }\n while (fcontinue);\n ubuffree (zfull);\n ubuffree (zfrom);\n ubuffree (zfile);\n }\n (void) fsysdep_uupick_free (zsystem, zpubdir);\n usysdep_exit ((1));\n return 0;\n}\n", "c_constructs": {"pointer_type": 10, "array_type": 3, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 24, "memory_management": 0, "memory_operation": 0, "if_statement": 21, "for_loop": 0, "while_loop": 4, "switch_statement": 2, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 13}}, {"id": "tmux#utf8_prep#utf8_set.c", "codebase": "tmux", "c_file": "utf8.c", "function": "utf8_set", "sloc": "7", "c_code": "void\nutf8_set(struct utf8_data *ud, u_char ch)\n{\n static const struct utf8_data empty = { { 0 }, 1, 1, 1 };\n memcpy(ud, &empty, sizeof *ud);\n *ud->data = ch;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 1, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "tulipindicators-0.9.1#benchmark_prep#rmi_option_setter.c", "codebase": "tulipindicators-0.9.1", "c_file": "benchmark.c", "function": "rmi_option_setter", "sloc": "5", "c_code": "void rmi_option_setter(double period, double *options, int ti) {\n (void)ti;\n options[0] = period;\n options[1] = 3;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "cflow-1.7#parser_prep#clearstack.c", "codebase": "cflow-1.7", "c_file": "parser.c", "function": "clearstack", "sloc": "5", "c_code": "void\nclearstack()\n{\n tos = curs = 0;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_map_double.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_map_double", "sloc": "5", "c_code": "double binn_map_double(void *map, int id) {\n double value;\n binn_map_get(map, id, 0x82, &value, ((void *)0));\n return value;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlIO_prep#xmlOutputBufferWrite.c", "codebase": "libxml2", "c_file": "xmlIO.c", "function": "xmlOutputBufferWrite", "sloc": "64", "c_code": "int\nxmlOutputBufferWrite(xmlOutputBufferPtr out, int len, const char *data) {\n xmlBufPtr buf = ((void *)0);\n size_t written = 0;\n int ret;\n if ((out == ((void *)0)) || (out->error))\n return(-1);\n if (len < 0)\n return(0);\n ret = xmlBufAdd(out->buffer, (const xmlChar *) data, len);\n if (ret != 0) {\n out->error = XML_ERR_NO_MEMORY;\n return(-1);\n }\n if (out->encoder != ((void *)0)) {\n if (out->conv == ((void *)0)) {\n out->conv = xmlBufCreate(4000);\n if (out->conv == ((void *)0)) {\n out->error = XML_ERR_NO_MEMORY;\n return(-1);\n }\n }\n if (xmlBufUse(out->buffer) < 256) {\n ret = 0;\n } else {\n ret = xmlCharEncOutput(out, 0);\n if (ret < 0)\n return(-1);\n }\n if (out->writecallback)\n buf = out->conv;\n else\n written = ret;\n } else {\n if (out->writecallback)\n buf = out->buffer;\n else\n written = len;\n }\n if ((buf != ((void *)0)) && (out->writecallback)) {\n while (1) {\n size_t nbchars = xmlBufUse(buf);\n if (nbchars < 4000)\n break;\n ret = out->writecallback(out->context,\n (const char *)xmlBufContent(buf), nbchars);\n if (ret < 0) {\n out->error = (ret == -1) ? XML_IO_WRITE : -ret;\n return(-1);\n }\n if ((ret == 0) || ((size_t) ret > nbchars)) {\n out->error = XML_ERR_INTERNAL_ERROR;\n return(-1);\n }\n xmlBufShrink(buf, ret);\n written += ret;\n if (out->written > 0x7fffffff - ret)\n out->written = 0x7fffffff;\n else\n out->written += ret;\n }\n }\n return(written <= 0x7fffffff ? written : 0x7fffffff);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 0, "if_statement": 15, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 8, "break_continue_statement": 1}}, {"id": "less-633#command_prep#in_mca.c", "codebase": "less-633", "c_file": "command.c", "function": "in_mca", "sloc": "4", "c_code": "int in_mca(void)\n{\n return (mca != 0 && mca != 105);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#parser_prep#xmlParseXMLDecl.c", "codebase": "libxml2", "c_file": "parser.c", "function": "xmlParseXMLDecl", "sloc": "70", "c_code": "void\nxmlParseXMLDecl(xmlParserCtxtPtr ctxt) {\n xmlChar *version;\n ctxt->standalone = -2;\n do { ctxt->input->cur += (5),ctxt->input->col+=(5); if (*ctxt->input->cur == 0) xmlParserGrow(ctxt); } while (0);\n if (!((((*ctxt->input->cur)) == 0x20) || ((0x9 <= ((*ctxt->input->cur))) && (((*ctxt->input->cur)) <= 0xa)) || (((*ctxt->input->cur)) == 0xd))) {\n xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,\n \"Blank needed after 'options & XML_PARSE_OLD10) {\n xmlFatalErrMsgStr(ctxt, XML_ERR_UNKNOWN_VERSION,\n \"Unsupported version '%s'\\n\",\n version);\n } else {\n if ((version[0] == '1') && ((version[1] == '.'))) {\n xmlWarningMsg(ctxt, XML_WAR_UNKNOWN_VERSION,\n \"Unsupported version '%s'\\n\",\n version, ((void *)0));\n } else {\n xmlFatalErrMsgStr(ctxt, XML_ERR_UNKNOWN_VERSION,\n \"Unsupported version '%s'\\n\",\n version);\n }\n }\n }\n if (ctxt->version != ((void *)0))\n xmlFree((void *) ctxt->version);\n ctxt->version = version;\n }\n if (!((((*ctxt->input->cur)) == 0x20) || ((0x9 <= ((*ctxt->input->cur))) && (((*ctxt->input->cur)) <= 0xa)) || (((*ctxt->input->cur)) == 0xd))) {\n if (((*ctxt->input->cur) == '?') && (ctxt->input->cur[(1)] == '>')) {\n do { ctxt->input->cur += (2),ctxt->input->col+=(2); if (*ctxt->input->cur == 0) xmlParserGrow(ctxt); } while (0);\n return;\n }\n xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED, \"Blank needed here\\n\");\n }\n xmlParseEncodingDecl(ctxt);\n if ((ctxt->encoding != ((void *)0)) && (!((((*ctxt->input->cur)) == 0x20) || ((0x9 <= ((*ctxt->input->cur))) && (((*ctxt->input->cur)) <= 0xa)) || (((*ctxt->input->cur)) == 0xd)))) {\n if (((*ctxt->input->cur) == '?') && (ctxt->input->cur[(1)] == '>')) {\n do { ctxt->input->cur += (2),ctxt->input->col+=(2); if (*ctxt->input->cur == 0) xmlParserGrow(ctxt); } while (0);\n return;\n }\n xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED, \"Blank needed here\\n\");\n }\n if ((!((ctxt)->input->flags & (1u << 6))) && (ctxt->input->end - ctxt->input->cur < 250)) xmlParserGrow(ctxt);;\n xmlSkipBlankChars(ctxt);\n ctxt->standalone = xmlParseSDDecl(ctxt);\n xmlSkipBlankChars(ctxt);\n if (((*ctxt->input->cur) == '?') && (ctxt->input->cur[(1)] == '>')) {\n do { ctxt->input->cur += (2),ctxt->input->col+=(2); if (*ctxt->input->cur == 0) xmlParserGrow(ctxt); } while (0);\n } else if ((*ctxt->input->cur) == '>') {\n xmlFatalErr(ctxt, XML_ERR_XMLDECL_NOT_FINISHED, ((void *)0));\n xmlNextChar(ctxt);\n } else {\n int c;\n xmlFatalErr(ctxt, XML_ERR_XMLDECL_NOT_FINISHED, ((void *)0));\n while ((((ctxt)->disableSAX > 1) == 0) &&\n ((c = (*ctxt->input->cur)) != 0)) {\n xmlNextChar(ctxt);\n if (c == '>')\n break;\n }\n }\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 8, "memory_management": 0, "memory_operation": 0, "if_statement": 18, "for_loop": 0, "while_loop": 5, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 1}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsGurmukhi.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsGurmukhi", "sloc": "4", "c_code": "int\nxmlUCSIsGurmukhi(int code) {\n return(((code >= 0x0A00) && (code <= 0x0A7F)));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlunicode_prep#xmlUCSIsCatPd.c", "codebase": "libxml2", "c_file": "xmlunicode.c", "function": "xmlUCSIsCatPd", "sloc": "4", "c_code": "int\nxmlUCSIsCatPd(int code) {\n return(xmlCharInRange((unsigned int)code, &xmlPdG));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#globals_prep#xmlThrDefRegisterNodeDefault.c", "codebase": "libxml2", "c_file": "globals.c", "function": "xmlThrDefRegisterNodeDefault", "sloc": "11", "c_code": "xmlRegisterNodeFunc\nxmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func)\n{\n xmlRegisterNodeFunc old;\n xmlMutexLock(&xmlThrDefMutex);\n old = xmlRegisterNodeDefaultValueThrDef;\n xmlRegisterCallbacks = 1;\n xmlRegisterNodeDefaultValueThrDef = func;\n xmlMutexUnlock(&xmlThrDefMutex);\n return(old);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#CEILING_IN_A_SORTED_ARRAY_prep#max.c", "codebase": "transcoder-set", "c_file": "CEILING_IN_A_SORTED_ARRAY.c", "function": "max", "sloc": "1", "c_code": "int max(int x, int y) { return (x > y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "libxml2#xmlstring_prep#xmlStrchr.c", "codebase": "libxml2", "c_file": "xmlstring.c", "function": "xmlStrchr", "sloc": "9", "c_code": "const xmlChar *\nxmlStrchr(const xmlChar *str, xmlChar val) {\n if (str == ((void *)0)) return(((void *)0));\n while (*str != 0) {\n if (*str == val) return((xmlChar *) str);\n str++;\n }\n return(((void *)0));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 1, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#if_no_fd_prep#Pl_Fd_Reset_Solver.c", "codebase": "gprolog-1.5.0", "c_file": "if_no_fd.c", "function": "Pl_Fd_Reset_Solver", "sloc": "8", "c_code": "void\nPl_Fd_Reset_Solver(void)\n{\n void (*copy_of_pl_fd_reset_solver) () = Pl_Dummy_Ptr(pl_fd_reset_solver);\n if (copy_of_pl_fd_reset_solver == ((void *)0))\n return;\n (*copy_of_pl_fd_reset_solver) ();\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 2, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "heman#mat4_prep#kmMat4RotationToAxisAngle.c", "codebase": "heman", "c_file": "mat4.c", "function": "kmMat4RotationToAxisAngle", "sloc": "9", "c_code": "kmVec3* kmMat4RotationToAxisAngle(kmVec3* pAxis, float* radians, const kmMat4* pIn)\n{\n kmQuaternion temp;\n kmMat3 rotation;\n kmMat4ExtractRotation(&rotation, pIn);\n kmQuaternionRotationMatrix(&temp, &rotation);\n kmQuaternionToAxisAngle(&temp, pAxis, radians);\n return pAxis;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "units-2.22#units_prep#main.c", "codebase": "units-2.22", "c_file": "units.c", "function": "main", "sloc": "254", "c_code": "int\nmain(int argc, char **argv)\n{\n static struct unittype have, want;\n char *havestr=0, *wantstr=0;\n struct func *funcval;\n struct wantalias *alias;\n int havestrsize=0;\n int wantstrsize=0;\n int readerr;\n char **unitfileptr;\n int unitcount=0, prefixcount=0, funccount=0;\n char *queryhave, *querywant, *comment;\n int queryhavewidth, querywantwidth;\n num_format.format = ((void *)0);\n num_format.precision = 8;\n num_format.type = 'g';\n flags.quiet = 0;\n flags.unitcheck = 0;\n flags.verbose = 1;\n flags.round = 0;\n flags.strictconvert=0;\n flags.unitlists = 1;\n flags.oneline = 0;\n flags.showconformable=0;\n flags.showfactor = 0;\n parserflags.minusminus = 1;\n parserflags.oldstar = 0;\n progname = getprogramname(argv[0]);\n if (!(isfullpath(\"/usr/local/share/units/definitions.units\") && isfullpath(\"/usr/local/share/units/locale_map.txt\")))\n progdir = getprogdir(argv[0], &fullprogname);\n else {\n progdir = ((void *)0);\n fullprogname = ((void *)0);\n }\n datadir = getdatadir();\n checklocale();\n homedir = findhome(&homedir_error);\n rl_completion_entry_function = (rl_compentry_func_t *)completeunits;\n rl_basic_word_break_characters = \" \\t+-*/()|^;\";\n flags.readline = isatty(0);\n if (flags.readline){\n int file_exists;\n historyfile = personalfile(((void *)0),\".units_history\",1,&file_exists);\n }\n unitsfiles[0] = 0;\n pager = getenv(\"PAGER\");\n if (!pager)\n pager = \"/usr/bin/pager\";\n flags.interactive = processargs(argc, argv, &havestr, &wantstr);\n if (flags.interactive && flags.readline && historyfile){\n rl_initialize();\n read_history(historyfile);\n init_history_length = history_length;\n init_history_base = history_base;\n atexit(save_history);\n }\n signal(2, write_files_sig);\n signal(15, write_files_sig);\n if (logfilename) {\n if (!flags.interactive)\n fprintf(stderr,\n \"Log file '%s' ignored in non-interactive mode.\\n\",logfilename);\n else open_logfile();\n }\n if (num_format.format != ((void *)0)) {\n if (parsenumformat())\n exit(1);\n }\n else\n setnumformat();\n if (flags.verbose==0)\n deftext = \"\";\n if (!unitsfiles[0]){\n char *unitsfile;\n unitsfile = findunitsfile(-3);\n if (!unitsfile)\n exit(1);\n else {\n int file_exists;\n unitsfiles[0] = unitsfile;\n unitsfiles[1] = personalfile(\"MYUNITSFILE\",homeunitsfile,\n 0, &file_exists);\n unitsfiles[2] = 0;\n }\n }\n for(unitfileptr=unitsfiles;*unitfileptr;unitfileptr++){\n readerr = readunits(*unitfileptr, stderr, &unitcount, &prefixcount,\n &funccount, 0);\n if (readerr==18 || readerr==16)\n exit(1);\n }\n if (flags.quiet)\n queryhave = querywant = \"\";\n else {\n if (!promptprefix){\n queryhave = \"You have: \";\n querywant = \"You want: \";\n } else {\n queryhave = (char *)mymalloc(strlen(promptprefix)+strlen(\"You have: \")+1,\n \"(main)\");\n querywant = (char *)mymalloc(strlen(promptprefix)+strlen(\"You want: \")+1,\n \"(main)\");\n strcpy(queryhave, promptprefix);\n strcat(queryhave, \"You have: \");\n memset(querywant, ' ', strlen(promptprefix));\n strcpy(querywant+strlen(promptprefix), \"You want: \");\n }\n printf(\"%d units, %d prefixes, %d nonlinear units\\n\\n\",\n unitcount, prefixcount,funccount);\n }\n queryhavewidth = strwidth(queryhave);\n querywantwidth = strwidth(querywant);\n if (flags.unitcheck) {\n checkunits(flags.unitcheck==2 || flags.verbose==2);\n exit(0);\n }\n if (!flags.interactive) {\n replacectrlchars(havestr);\n if (wantstr)\n replacectrlchars(wantstr);\n if (strwidth(havestr)<0){\n printf(\"Error: %s on input\\n\",invalid_utf8);\n exit(1);\n }\n if (wantstr && strwidth(wantstr)<0){\n printf(\"Error: %s on input\\n\",invalid_utf8);\n exit(1);\n }\n replace_minus(havestr);\n removespaces(havestr);\n if (wantstr) {\n replace_minus(wantstr);\n removespaces(wantstr);\n }\n if ((funcval = fnlookup(havestr))){\n showfuncdefinition(funcval, 0);\n exit(0);\n }\n if ((funcval = invfnlookup(havestr))){\n showfuncdefinition(funcval, 1);\n exit(0);\n }\n if ((alias = aliaslookup(havestr))){\n showunitlistdef(alias);\n exit(0);\n }\n if (processunit(&have, havestr, -1))\n exit(1);\n if (flags.showconformable == 1) {\n tryallunits(&have,0);\n exit(0);\n }\n if (!wantstr){\n showdefinition(havestr,&have);\n exit(0);\n }\n if (replacealias(&wantstr, 0))\n exit(1);\n if ((funcval = fnlookup(wantstr))){\n if (showfunc(havestr, &have, funcval))\n exit(1);\n else\n exit(0);\n }\n if (processwant(&want, wantstr, -1))\n exit(1);\n if (strchr(wantstr, ';')){\n if (showunitlist(havestr, &have, wantstr))\n exit(1);\n else\n exit(0);\n }\n if (showanswer(havestr,&have,wantstr,&want))\n exit(1);\n else\n exit(0);\n } else {\n for (;;) {\n do {\n fflush(stdout);\n getuser(&havestr,&havestrsize,queryhave);\n replace_minus(havestr);\n comment = strip_comment(havestr);\n removespaces(havestr);\n if (logfile && comment && (*(havestr)==0))\n fprintf(logfile, \"#%s\\n\", comment);\n } while ((*(havestr)==0) || ishelpquery(havestr,0) ||\n (!fnlookup(havestr) && !invfnlookup(havestr)\n && !aliaslookup(havestr)\n && processunit(&have, havestr, queryhavewidth)));\n if (logfile) {\n if (comment)\n fprintf(logfile, \"%s%s\\t#%s\\n\", \"From: \", havestr,comment);\n else\n fprintf(logfile, \"%s%s\\n\", \"From: \", havestr);\n }\n if ((alias = aliaslookup(havestr))){\n showunitlistdef(alias);\n continue;\n }\n if ((funcval = fnlookup(havestr))){\n showfuncdefinition(funcval, 0);\n continue;\n }\n if ((funcval = invfnlookup(havestr))){\n showfuncdefinition(funcval, 1);\n continue;\n }\n do {\n int repeat;\n do {\n repeat = 0;\n fflush(stdout);\n getuser(&wantstr,&wantstrsize,querywant);\n replace_minus(wantstr);\n comment = strip_comment(wantstr);\n removespaces(wantstr);\n if (logfile && comment && (*(wantstr)==0)){\n fprintf(logfile, \"#%s\\n\", comment);\n repeat = 1;\n }\n if (ishelpquery(wantstr, &have)){\n repeat = 1;\n printf(\"%s%s\\n\",queryhave, havestr);\n }\n } while (repeat);\n } while (replacealias(&wantstr, &wantstrsize)\n || (!fnlookup(wantstr)\n && processwant(&want, wantstr, querywantwidth)));\n if (logfile) {\n fprintf(logfile, \"%s\", \"To: \");\n tightprint(logfile, wantstr);\n if (comment)\n fprintf(logfile, \"\\t#%s\", comment);\n putc('\\n', logfile);\n }\n if ((*(wantstr)==0))\n showdefinition(havestr,&have);\n else if (strchr(wantstr, ';'))\n showunitlist(havestr, &have, wantstr);\n else if ((funcval = fnlookup(wantstr)))\n showfunc(havestr, &have, funcval);\n else {\n showanswer(havestr,&have,wantstr, &want);\n freeunit(&want);\n }\n unitcopy(&lastunit, &have);\n lastunitset=1;\n freeunit(&have);\n }\n }\n return (0);\n}\n", "c_constructs": {"pointer_type": 9, "array_type": 2, "struct_type": 2, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 7, "memory_management": 0, "memory_operation": 1, "if_statement": 46, "for_loop": 2, "while_loop": 3, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 3}}, {"id": "libxml2#xpath_prep#xmlXPathRoot.c", "codebase": "libxml2", "c_file": "xpath.c", "function": "xmlXPathRoot", "sloc": "7", "c_code": "void\nxmlXPathRoot(xmlXPathParserContextPtr ctxt) {\n if ((ctxt == ((void *)0)) || (ctxt->context == ((void *)0)))\n return;\n valuePush(ctxt, xmlXPathCacheNewNodeSet(ctxt,\n (xmlNodePtr) ctxt->context->doc));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE_prep#f_filled.c", "codebase": "transcoder-set", "c_file": "DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE.c", "function": "f_filled", "sloc": "1", "c_code": "_Bool f_filled ( int arr [ ], int n, int k ) {}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsCatNl.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsCatNl", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsCatNl(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsCatNl\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsCatNl\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsCatNl(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "binn-3.0#binn_prep#binn_get_double.c", "codebase": "binn-3.0", "c_file": "binn.c", "function": "binn_get_double", "sloc": "31", "c_code": "BOOL binn_get_double(binn *value, double *pfloat) {\n int64 vint;\n if (value == ((void *)0) || pfloat == ((void *)0)) return 0;\n if (type_family(value->type) == 0xf2) {\n if (copy_int_value(value->ptr, &vint, value->type, 0x81) == 0) return 0;\n *pfloat = (double) vint;\n return 1;\n }\n switch (value->type) {\n case 0x62:\n *pfloat = value->vfloat;\n break;\n case 0x82:\n *pfloat = value->vdouble;\n break;\n case 0xA0:\n if (is_integer((char*)value->ptr))\n *pfloat = (double) atoi64((char*)value->ptr);\n else if (is_float((char*)value->ptr))\n *pfloat = atof((char*)value->ptr);\n else\n return 0;\n break;\n case 0x80061:\n *pfloat = value->vbool;\n break;\n default:\n return 0;\n }\n return 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 6, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 1, "goto_statement": 0, "return_statement": 6, "break_continue_statement": 4}}, {"id": "transcoder-set#DETECT_IF_TWO_INTEGERS_HAVE_OPPOSITE_SIGNS_prep#len.c", "codebase": "transcoder-set", "c_file": "DETECT_IF_TWO_INTEGERS_HAVE_OPPOSITE_SIGNS.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_UNIT_DIGIT_X_RAISED_POWER_Y_1_prep#len.c", "codebase": "transcoder-set", "c_file": "FIND_UNIT_DIGIT_X_RAISED_POWER_Y_1.c", "function": "len", "sloc": "1", "c_code": "int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#NUMBER_IS_DIVISIBLE_BY_29_OR_NOT_prep#min.c", "codebase": "transcoder-set", "c_file": "NUMBER_IS_DIVISIBLE_BY_29_OR_NOT.c", "function": "min", "sloc": "1", "c_code": "int min(int x, int y) { return (x < y)? x: y; }\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "nano-7.2#utils_prep#remove_magicline.c", "codebase": "nano-7.2", "c_file": "utils.c", "function": "remove_magicline", "sloc": "10", "c_code": "void remove_magicline(void)\n{\n if (openfile->filebot->data[0] == '\\0' &&\n openfile->filebot != openfile->filetop) {\n openfile->filebot = openfile->filebot->prev;\n delete_node(openfile->filebot->next);\n openfile->filebot->next = ((void *)0);\n openfile->totsize--;\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 2, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#misc_prep#Pl_Realloc_Check.c", "codebase": "gprolog-1.5.0", "c_file": "misc.c", "function": "Pl_Realloc_Check", "sloc": "8", "c_code": "char *\nPl_Realloc_Check(char *ptr, unsigned size, char *src_file, int src_line)\n{\n char *m = realloc(ptr, size);\n if (m == ((void *)0))\n Pl_Fatal_Error(\"Memory allocation fault (%s) in %s:%d\", \"realloc\", src_file, src_line);\n return m;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 1, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tinycc#tccasm_prep#get_asm_sym.c", "codebase": "tinycc", "c_file": "tccasm.c", "function": "get_asm_sym", "sloc": "10", "c_code": "Sym* get_asm_sym(int name, Sym *csym)\n{\n Sym *sym = asm_label_find(name);\n if (!sym) {\n sym = asm_label_push(name);\n if (csym)\n sym->c = csym->c;\n }\n return sym;\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "transcoder-set#PROGRAM_CALCULATE_AREA_OCTAGON_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "PROGRAM_CALCULATE_AREA_OCTAGON.c", "function": "f_gold", "sloc": "3", "c_code": "double f_gold ( double side ) {\n return ( float ) ( 2 * ( 1 + sqrt ( 2 ) ) * side * side );\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "tar-1.34#misc_prep#page_aligned_alloc.c", "codebase": "tar-1.34", "c_file": "misc.c", "function": "page_aligned_alloc", "sloc": "10", "c_code": "void *\npage_aligned_alloc (void **ptr, size_t size)\n{\n size_t alignment = getpagesize ();\n size_t size1 = size + alignment;\n if (size1 < size)\n xalloc_die ();\n *ptr = xmalloc (size1);\n return ptr_align (*ptr, alignment);\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 1, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 1, "break_continue_statement": 0}}, {"id": "gprolog-1.5.0#wam_inst_prep#Pl_Cut.c", "codebase": "gprolog-1.5.0", "c_file": "wam_inst.c", "function": "Pl_Cut", "sloc": "5", "c_code": "void\nPl_Cut(WamWord b_word)\n{\n (B = (((((WamWordP *) pl_reg_bank)[256 +7]) + ((PlLong) ((b_word) << 0) >> 3))), (((WamWordP *) pl_reg_bank)[256 +0]) = (*(WamWord **) &(B[-6])));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "libxml2#libxml2-py_prep#libxml_xmlUCSIsCatS.c", "codebase": "libxml2", "c_file": "libxml2-py.c", "function": "libxml_xmlUCSIsCatS", "sloc": "13", "c_code": "PyObject *\nlibxml_xmlUCSIsCatS(PyObject *self __attribute__ ((__unused__)), PyObject *args) {\n PyObject *py_retval;\n int c_retval;\n int code;\n if (libxml_deprecationWarning(\"xmlUCSIsCatS\") == -1)\n return(((void *)0));\n if (!_PyArg_ParseTuple_SizeT(args, (char *)\"i:xmlUCSIsCatS\", &code))\n return(((void *)0));\n c_retval = xmlUCSIsCatS(code);\n py_retval = libxml_intWrap((int) c_retval);\n return(py_retval);\n}\n", "c_constructs": {"pointer_type": 1, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 3, "break_continue_statement": 0}}, {"id": "dap-3.10#sbstrans3_prep#logistictrans.c", "codebase": "dap-3.10", "c_file": "sbstrans3.c", "function": "logistictrans", "sloc": "48", "c_code": "void logistictrans(char *step, FILE *dapfile)\n{\n int s;\n char setname[127 + 1];\n char outname[127 + 1];\n if (!getoption(step, \"data\", setname, 1))\n strcpy(setname, sbstmp);\n fprintf(dapfile, \"logreg(\\\"%s\\\", \\\"\", setname);\n if ((s = findstatement(step, \"model\")))\n {\n s += putlines(step + s, dapfile, '\\n') + 1;\n putc('/', dapfile);\n if (step[s] == '/')\n {\n s += 2;\n s += putlines(step + s, dapfile, '\\n') + 1;\n }\n else\n putc('1', dapfile);\n if (step[s] == '=')\n {\n fputs(\"\\\", \\\"\\\", \\\"\", dapfile);\n s += 2;\n s += putlines(step + s, dapfile, ';');\n fputs(\"\\\", \\\"\", dapfile);\n copylist(step, \"by\", dapfile);\n fputs(\"\\\", NULL, 0.95);\\n\", dapfile);\n }\n else\n {\n fprintf(stderr,\n \"sbstrans: before %d: missing = in model statement in proc logistic.\\n\",\n sbslineno);\n exit(1);\n }\n }\n else\n {\n fprintf(stderr, \"sbstrans: before %d: missing model statement in proc logistic.\\n\",\n sbslineno);\n exit(1);\n }\n if (getoption(step, \"outest\", outname, 1))\n {\n fprintf(dapfile, \"dataset(\\\"%s.cov\\\", \\\"%s\\\", \\\"RENAME\\\");\\n\", setname, outname);\n strcpy(sbstmp, outname);\n }\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 5, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#FIND_MINIMUM_NUMBER_OF_COINS_THAT_MAKE_A_CHANGE_1_prep#sort.c", "codebase": "transcoder-set", "c_file": "FIND_MINIMUM_NUMBER_OF_COINS_THAT_MAKE_A_CHANGE_1.c", "function": "sort", "sloc": "1", "c_code": "void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 1, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}, {"id": "transcoder-set#NON_REPEATING_ELEMENT_prep#f_gold.c", "codebase": "transcoder-set", "c_file": "NON_REPEATING_ELEMENT.c", "function": "f_gold", "sloc": "12", "c_code": "int f_gold ( int arr [ ], int n ) {\n for ( int i = 0;\n i < n;\n i ++ ) {\n int j;\n for ( j = 0;\n j < n;\n j ++ ) if ( i != j && arr [ i ] == arr [ j ] ) break;\n if ( j == n ) return arr [ i ];\n }\n return - 1;\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 1, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 0, "memory_management": 0, "memory_operation": 0, "if_statement": 2, "for_loop": 2, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 2, "break_continue_statement": 1}}, {"id": "rcs-5.10.1#b-feph_prep#init_ephemstuff.c", "codebase": "rcs-5.10.1", "c_file": "b-feph.c", "function": "init_ephemstuff", "sloc": "7", "c_code": "void\ninit_ephemstuff (void)\n{\n (top->behavior. sff) = (zlloc (plexus, sizeof (struct sff) * (0 + 2)));\n (top->behavior. ephemstuff) = (zlloc (plexus, sizeof (struct ephemstuff) * 1));\n ((top->behavior. ephemstuff)-> tpnames) = (zlloc (plexus, sizeof (struct sff) * 5));\n}\n", "c_constructs": {"pointer_type": 0, "array_type": 0, "struct_type": 0, "enum_type": 0, "union_type": 0, "function_pointer": 0, "type_casting": 4, "memory_management": 0, "memory_operation": 0, "if_statement": 0, "for_loop": 0, "while_loop": 0, "switch_statement": 0, "goto_statement": 0, "return_statement": 0, "break_continue_statement": 0}}]