source
stringlengths 23
1.83k
| target
stringlengths 42
1.55k
|
---|---|
void _main(){wchar_t * data;wchar_t * *data_ptr1=&data;wchar_t * *data_ptr2=&data;data=(wchar_t *)malloc(100*sizeof(wchar_t));data[0]=L'\0';{wchar_t * data=*data_ptr1;{size_t data_len=wcslen(data);FILE * pFile;if(100-data_len > 1){pFile=FOPEN(L"C:\\temp\\file.txt", L"r");if (pFile!=NULL){fgetws(data+data_len, (int)(100-data_len), pFile);fclose(pFile);}}}}{wchar_t * data=*data_ptr2;for (;*data!=L'\0';data++){if (*data==SEARCH_CHAR){printLine("We have a match!");break;}}free(data);}} | static void main(){wchar_t * data;wchar_t * *data_ptr1=&data;wchar_t * *data_ptr2=&data;data=(wchar_t *)malloc(100*sizeof(wchar_t));data[0]=L'\0';{wchar_t * data=*data_ptr1;{size_t data_len=wcslen(data);FILE * pFile;if(100-data_len > 1){pFile=FOPEN(L"C:\\temp\\file.txt", L"r");if (pFile!=NULL){fgetws(data+data_len, (int)(100-data_len), pFile);fclose(pFile);}}}}{wchar_t * data=*data_ptr2;{size_t i;for (i=0;i < wcslen(data);i++){if (data[i]==SEARCH_CHAR){printLine("We have a match!");break;}}free(data);}}} |
void _main(){wchar_t * data;_union_type my_union;wchar_t data_buf[FILENAME_MAX]=L"";data=data_buf;{size_t data_len=wcslen(data);wchar_t * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){wcsncat(data+data_len, environment, 100-data_len-1);}}my_union.a=data;{wchar_t * data=my_union.b;{int fd;fd=OPEN(data, O_RDWR|O_CREAT, S_IREAD|S_IWRITE);if (fd!=-1){CLOSE(fd);}}}} | static void main(){wchar_t * data;_union_type my_union;wchar_t data_buf[FILENAME_MAX]=L"";data=data_buf;wcscpy(data, L"c:\\temp\\file.txt");wcscpy(data, L"/tmp/file.txt");my_union.a=data;{wchar_t * data=my_union.b;{int fd;fd=OPEN(data, O_RDWR|O_CREAT, S_IREAD|S_IWRITE);if (fd!=-1){CLOSE(fd);}}}} |
void main_sink_b(long long * data);void main(){long long * data;data=NULL;data=new long long;main_sink_b(data);}void main_sink_c(long long * data);void main_sink_b(long long * data){main_sink_c(data);}void main_sink_c(long long * data){free(data);} | static void main(){long long * data;data=NULL;data=new long long;main_sink_b(data);}void main_sink_b(long long * data){main_sink_c(data);}void main_sink_c(long long * data){delete data;} |
void b_main_sink(void * void_data_ptr);void _main(){char * data;char data_buf[FILENAME_MAX]="";data=data_buf;{size_t data_len=strlen(data);FILE * pFile;if(FILENAME_MAX-data_len > 1){pFile=FOPEN("C:\\temp\\file.txt", "r");if (pFile!=NULL){fgets(data+data_len, (int)(FILENAME_MAX-data_len), pFile);fclose(pFile);}}}b_main_sink(&data);}void b_main_sink(void * void_data_ptr){char * * data_ptr=(char * *)void_data_ptr;char * data=(*data_ptr);{FILE *file=NULL;file=FOPEN(data, "wb+");if (file!=NULL) fclose(file);}} | void b_main_sink(void * void_data_ptr);static void main(){char * data;char data_buf[FILENAME_MAX]="";data=data_buf;strcpy(data, "c:\\temp\\file.txt");strcpy(data, "/tmp/file.txt");b_main_sink(&data);}void b_main_sink(void * void_data_ptr){char * * data_ptr=(char * *)void_data_ptr;char * data=(*data_ptr);{FILE *file=NULL;file=FOPEN(data, "wb+");if (file!=NULL) fclose(file);}} |
void b_main_sink(_struct_type my_struct);void _main(){wchar_t * data;_struct_type my_struct;wchar_t data_buf[100]=L"";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;wchar_t *replace;SOCKET connect_socket=INVALID_SOCKET;size_t data_len=wcslen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;connect_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (connect_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=inet_addr("127.0.0.1");s_in.sin_port=htons(TCP_PORT);if (connect(connect_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;recv_rv=recv(connect_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]=L'\0';replace=wcschr(data, L'\r');if (replace) *replace=L'\0';replace=wcschr(data, L'\n');if (replace) *replace=L'\0';}while (0);if (connect_socket!=INVALID_SOCKET) CLOSE_SOCKET(connect_socket);if (wsa_data_init) WSACleanup();}my_struct.a=data;b_main_sink(my_struct);}void b_main_sink(_struct_type my_struct){wchar_t * data=my_struct.a;{int i, n, v;if (swscanf(data, L"%d", &n)==1){v=0;for (i=0;i < n;i++){}printIntLine(v);}}} | static void main(){wchar_t * data;_struct_type my_struct;wchar_t data_buf[100]=L"";data=data_buf;wcscpy(data, L"15");my_struct.a=data;b_main_sink(my_struct);}void b_main_sink(_struct_type my_struct){wchar_t * data=my_struct.a;{int i, n, v;if (swscanf(data, L"%d", &n)==1){v=0;for (i=0;i < n;i++){}printIntLine(v);}}} |
void _main(){{charvoid * cv_struct=(charvoid *)malloc(sizeof(charvoid));cv_struct->y=SRC_STR;printWLine((wchar_t *)cv_struct->y);memcpy(cv_struct->x, SRC_STR, sizeof(*cv_struct));printWLine((wchar_t *)cv_struct->x);printWLine((wchar_t *)cv_struct->y);free(cv_struct);}} | static void main(){{charvoid * cv_struct=(charvoid *)malloc(sizeof(charvoid));cv_struct->y=SRC_STR;printWLine((wchar_t *)cv_struct->y);memcpy(cv_struct->x, SRC_STR, sizeof(cv_struct->x));printWLine((wchar_t *)cv_struct->x);printWLine((wchar_t *)cv_struct->y);free(cv_struct);}} |
void b_main_sink(int data);void _main(){int data;data=-1;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;char input_buf[CHAR_ARRAY_SIZE];do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, input_buf, CHAR_ARRAY_SIZE, 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data=atoi(input_buf);}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}b_main_sink(data);}void c_main_sink(int data);void b_main_sink(int data){c_main_sink(data);}void d_main_sink(int data);void c_main_sink(int data){d_main_sink(data);}void e_main_sink(int data);void d_main_sink(int data){e_main_sink(data);}void e_main_sink(int data){{if (data < 100){char * data_buf=(char *)malloc(data);memset(data_buf, 'A', data-1);data_buf[data-1]='\0';printLine(data_buf);free(data_buf);}}} | void b_main_sink(int data);static void main(){int data;data=-1;data=100-1;b_main_sink(data);}void c_main_sink(int data);void b_main_sink(int data){c_main_sink(data);}void d_main_sink(int data);void c_main_sink(int data){d_main_sink(data);}void e_main_sink(int data);void d_main_sink(int data){e_main_sink(data);}void e_main_sink(int data){{if (data < 100){char * data_buf=(char *)malloc(data);memset(data_buf, 'A', data-1);data_buf[data-1]='\0';printLine(data_buf);free(data_buf);}}} |
void main_sink();void main(){char * data;data=NULL;{char * data_buf=new char[100];memset(data_buf, 'A', 100-1);data_buf[100-1]='\0';data=data_buf-8;}_main_data=data;main_sink();}void main_sink(){char * data=_main_data;{char dest[100];memcpy(dest, data, 100*sizeof(char));dest[100-1]='\0';printLine(dest);}} | void main_sink();static void main(){char * data;data=NULL;{char * data_buf=new char[100];memset(data_buf, 'A', 100-1);data_buf[100-1]='\0';data=data_buf;}_main_data=data;main_sink();}void main_sink(){char * data=_main_data;{char dest[100];memcpy(dest, data, 100*sizeof(char));dest[100-1]='\0';printLine(dest);}} |
void main_sink(char * data_array[]);void main(){char * data;char * data_array[5];data=NULL;data=(char *)malloc(100*sizeof(char));data_array[2]=data;main_sink(data_array);}void main_sink(char * data_array[]){char * data=data_array[2];delete data;} | static void main(){char * data;char * data_array[5];data=NULL;data=(char *)malloc(100*sizeof(char));data_array[2]=data;main_sink(data_array);}void main_sink(char * data_array[]){char * data=data_array[2];free(data);} |
void b_main_sink(int data);void _main(){int data;data=-1;fscanf (stdin, "%d", &data);b_main_sink(data);}void b_main_sink(int data){{int result=data+1;printIntLine(result);}} | static void main(){int data;data=-1;data=5;b_main_sink(data);}void b_main_sink(int data){{int result=data+1;printIntLine(result);}} |
static void main_sink(){int data=_main_data;{int data_buf[10]={0,1,2,3,4,5,6,7,8,9};if (data >=0){printIntLine(data_buf[data]);}else{printLine("ERROR: Array index is negative");}}}void _main(){int data;fscanf (stdin, "%d", &data);_main_data=data;main_sink();} | static void main_sink(){int data=_main_data;{int data_buf[10]={0,1,2,3,4,5,6,7,8,9};if (data >=0 && data < 10){printIntLine(data_buf[data]);}else{printLine("ERROR: Array index is out-of-bounds");}}}static void main(){int data;fscanf (stdin, "%d", &data);_main_data=data;main_sink();} |
void b_main_sink(char * data_array[]);void _main(){char * data;char * data_array[5];char data_buf[100]="";data=data_buf;strcpy(data, BAD_OS_COMMAND);data_array[2]=data;b_main_sink(data_array);}void b_main_sink(char * data_array[]){char * data=data_array[2];{FILE *pipe;pipe=POPEN(data, "wb");if (pipe!=NULL) PCLOSE(pipe);}} | void b_main_sink(char * data_array[]);static void main(){char * data;char * data_array[5];char data_buf[100]="";data=data_buf;strcpy(data, GOOD_OS_COMMAND);data_array[2]=data;b_main_sink(data_array);}void b_main_sink(char * data_array[]){char * data=data_array[2];{FILE *pipe;pipe=POPEN(data, "wb");if (pipe!=NULL) PCLOSE(pipe);}} |
void _main(){if(global_returns_t_or_f()){{wchar_t data_buf[100]=L"";wchar_t * data=data_buf;fwscanf(stdin, L"%99s\0", data);}}else{{wchar_t data_buf[100]=L"";wchar_t * data=data_buf;if (fwscanf(stdin, L"%99s\0", data)==EOF){printLine("fwscanf failed!");}}}} | static void main(){if(global_returns_t_or_f()){{wchar_t data_buf[100]=L"";wchar_t * data=data_buf;if (fwscanf(stdin, L"%99s\0", data)==EOF){printLine("fwscanf failed!");}}}else{{wchar_t data_buf[100]=L"";wchar_t * data=data_buf;if (fwscanf(stdin, L"%99s\0", data)==EOF){printLine("fwscanf failed!");}}}} |
void main_sink(wchar_t * data);void main(){wchar_t * data;void (*func_ptr) (wchar_t *)=main_sink;data=NULL;data=new wchar_t[100];wcscpy(data, L"A String");printWLine(data);func_ptr(data);}void main_sink(wchar_t * data){} | static void main(){wchar_t * data;void (*func_ptr) (wchar_t *)=main_sink;data=NULL;{wchar_t data_goodbuf[100];data=data_goodbuf;wcscpy(data, L"A String");printWLine(data);}func_ptr(data);}void main_sink(wchar_t * data){} |
void _main(){int * data;data=NULL;if(global_returns_t_or_f()){data=(int *)malloc(100*sizeof(int));{size_t i;for(i=0;i < 100;i++){data[i]=5;}}free(data);}else{data=(int *)malloc(100*sizeof(int));{size_t i;for(i=0;i < 100;i++){data[i]=5;}}}if(global_returns_t_or_f()){printIntLine(data[0]);}else{}} | static void main(){int * data;data=NULL;if(global_returns_t_or_f()){data=(int *)malloc(100*sizeof(int));{size_t i;for(i=0;i < 100;i++){data[i]=5;}}free(data);}else{data=(int *)malloc(100*sizeof(int));{size_t i;for(i=0;i < 100;i++){data[i]=5;}}free(data);}if(global_returns_t_or_f()){}else{}} |
void main(){twoints * data;union_type my_union;{twoints data_buf[100];{size_t i;for (i=0;i < 100;i++){data_buf[i].a=1;data_buf[i].b=1;}}data=data_buf;}my_union.a=data;{twoints * data=my_union.b;printStructLine(&data[0]);delete [] data;}} | static void main(){twoints * data;union_type my_union;{twoints * data_buf=new twoints[100];{size_t i;for (i=0;i < 100;i++){data_buf[i].a=1;data_buf[i].b=1;}}data=data_buf;}my_union.a=data;{twoints * data=my_union.b;printStructLine(&data[0]);delete [] data;}} |
void _main(){wchar_t * data;_union_type my_union;data=NULL;data=NULL;data=(wchar_t *)realloc(data, 100*sizeof(wchar_t));wcscpy(data, L"A String");printWLine(data);my_union.a=data;{wchar_t * data=my_union.b;}} | static void main(){wchar_t * data;_union_type my_union;data=NULL;data=NULL;data=(wchar_t *)realloc(data, 100*sizeof(wchar_t));wcscpy(data, L"A String");printWLine(data);my_union.a=data;{wchar_t * data=my_union.b;free(data);}} |
void main_sink(struct_type my_struct);void main(){twoints * data;struct_type my_struct;data=NULL;data=NULL;data=(twoints *)realloc(data, 100*sizeof(twoints));my_struct.a=data;main_sink(my_struct);}void main_sink(struct_type my_struct){twoints * data=my_struct.a;delete data;} | static void main(){twoints * data;struct_type my_struct;data=NULL;data=new twoints;my_struct.a=data;main_sink(my_struct);}void main_sink(struct_type my_struct){twoints * data=my_struct.a;delete data;} |
void main_sink_b(twoints * data);void main(){twoints * data;data=NULL;data=new twoints;data->a=1;data->b=2;delete data;main_sink_b(data);}void main_sink_c(twoints * data);void main_sink_b(twoints * data){main_sink_c(data);}void main_sink_c(twoints * data){printStructLine(data);} | static void main(){twoints * data;data=NULL;data=new twoints;data->a=1;data->b=2;delete data;main_sink_b(data);}void main_sink_b(twoints * data){main_sink_c(data);}void main_sink_c(twoints * data){} |
void main_source(int &data);void main(){int data;data=-1;main_source(data);{size_t a,i;int *b;b=(int*)new char[a];for (i=0;i < (size_t)data;i++){}printIntLine(b[0]);delete [] b;}}void main_source(int &data){fscanf (stdin, "%d", &data);} | void main_source(int &data);static void main(){int data;data=-1;main_source(data);{size_t a,i;int *b;b=(int*)new char[a];for (i=0;i < (size_t)data;i++){}printIntLine(b[0]);delete [] b;}}void main_source(int &data){data=20;} |
void _main(){char * data;char * data_mainbuf=(char *)ALLOCA(50*sizeof(char));char * data_goodbuf=(char *)ALLOCA(100*sizeof(char));data=data_mainbuf;{char src[100];strcpy(data, src);printLine(data);}} | static void main(){char * data;char * data_badbuf=(char *)ALLOCA(50*sizeof(char));char * data_goodbuf=(char *)ALLOCA(100*sizeof(char));data=data_goodbuf;{char src[100];strcpy(data, src);printLine(data);}} |
void b_main_sink(void * void_data_ptr);void _main(){long long * data;data=NULL;data=(long long *)malloc(50*sizeof(long long));b_main_sink(&data);}void b_main_sink(void * void_data_ptr){long long * * data_ptr=(long long * *)void_data_ptr;long long * data=(*data_ptr);{memmove(data, src, 100*sizeof(long long));printLongLongLine(data[0]);free(data);}} | void b_main_sink(void * void_data_ptr);static void main(){long long * data;data=NULL;data=(long long *)malloc(100*sizeof(long long));b_main_sink(&data);}void b_main_sink(void * void_data_ptr){long long * * data_ptr=(long long * *)void_data_ptr;long long * data=(*data_ptr);{memmove(data, src, 100*sizeof(long long));printLongLongLine(data[0]);free(data);}} |
static char * main_source(char * data){{size_t data_len=strlen(data);char * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){strncat(data+data_len, environment, 100-data_len-1);}}return data;}static void main_vasink(char * data, ...){{va_list args;va_start(args, data);vprintf(data, args);va_end(args);}}void _main(){char * data;char data_buf[100]="";data=data_buf;data=main_source(data);main_vasink(data, data);} | static char * main_source(char * data){{size_t data_len=strlen(data);char * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){strncat(data+data_len, environment, 100-data_len-1);}}return data;}static void main_vasink(char * data, ...){{va_list args;va_start(args, data);vprintf("%s", args);va_end(args);}}static void main(){char * data;char data_buf[100]="";data=data_buf;data=main_source(data);main_vasink(data, data);} |
void b_main_sink(wchar_t * * data_ptr);void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{size_t data_len=wcslen(data);if(100-data_len > 1){fgetws(data+data_len, (int)(100-data_len), stdin);data_len=wcslen(data);if (data_len > 0){data[data_len-1]=L'\0';}}}b_main_sink(&data);}void b_main_sink(wchar_t * * data_ptr){wchar_t * data=*data_ptr;EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);} | void b_main_sink(wchar_t * * data);static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;wcscat(data, L"*.*");b_main_sink(&data);}void b_main_sink(wchar_t * * data_ptr){wchar_t * data=*data_ptr;EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);} |
void _main(){char * data;char data_buf[FILENAME_MAX]="";data=data_buf;{size_t data_len=strlen(data);FILE * pFile;if(FILENAME_MAX-data_len > 1){pFile=FOPEN("C:\\temp\\file.txt", "r");if (pFile!=NULL){fgets(data+data_len, (int)(FILENAME_MAX-data_len), pFile);fclose(pFile);}}}{char * data_copy=data;char * data=data_copy;{int fd;fd=OPEN(data, O_RDWR|O_CREAT, S_IREAD|S_IWRITE);if (fd!=-1){CLOSE(fd);}}}} | static void main(){char * data;char data_buf[FILENAME_MAX]="";data=data_buf;strcpy(data, "c:\\temp\\file.txt");strcpy(data, "/tmp/file.txt");{char * data_copy=data;char * data=data_copy;{int fd;fd=OPEN(data, O_RDWR|O_CREAT, S_IREAD|S_IWRITE);if (fd!=-1){CLOSE(fd);}}}} |
void _main(){{char * key="TEST\\TestKey";HKEY hKey;if (RegCreateKeyExA( HKEY_LOCAL_MACHINE, key, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL)!=ERROR_SUCCESS){printLine("Registry key could not be created");}else{printLine("Registry key created successfully");}}} | static void main(){{char * key="TEST\\TestKey";HKEY hKey;if (RegCreateKeyExA( HKEY_CURRENT_USER, key, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL)!=ERROR_SUCCESS){printLine("Registry key could not be created");}else{printLine("Registry key created successfully");}}} |
void b_main_sink(void * void_count_ptr);void _main(){int count;count=-1;{char input_buf[CHAR_ARRAY_SIZE]="";fgets(input_buf, CHAR_ARRAY_SIZE, stdin);count=atoi(input_buf);}b_main_sink(&count);}void b_main_sink(void * void_count_ptr){int * count_ptr=(int *)void_count_ptr;int count=(*count_ptr);{size_t i=0;for (i=0;i < (size_t)count;i++){printLine("Hello");}}} | static void main(){int count;count=-1;count=20;b_main_sink(&count);}void b_main_sink(void * void_count_ptr){int * count_ptr=(int *)void_count_ptr;int count=(*count_ptr);{size_t i=0;for (i=0;i < (size_t)count;i++){printLine("Hello");}}} |
void main_sink(twoints * data_array[]);void main(){twoints * data;twoints * data_array[5];data=NULL;data=new twoints;data_array[2]=data;main_sink(data_array);}void main_sink(twoints * data_array[]){twoints * data=data_array[2];free(data);} | static void main(){twoints * data;twoints * data_array[5];data=NULL;data=new twoints;data_array[2]=data;main_sink(data_array);}void main_sink(twoints * data_array[]){twoints * data=data_array[2];delete data;} |
void _main(){wchar_t * data;data=NULL;if(global_returns_t_or_f()){data=(wchar_t *)malloc(100*sizeof(wchar_t));wmemset(data, L'A', 100-1);data[100-1]=L'\0';free(data);}else{data=(wchar_t *)malloc(100*sizeof(wchar_t));wmemset(data, L'A', 100-1);data[100-1]=L'\0';}if(global_returns_t_or_f()){printWLine(data);}else{}} | static void main(){wchar_t * data;data=NULL;if(global_returns_t_or_f()){data=(wchar_t *)malloc(100*sizeof(wchar_t));wmemset(data, L'A', 100-1);data[100-1]=L'\0';}else{data=(wchar_t *)malloc(100*sizeof(wchar_t));wmemset(data, L'A', 100-1);data[100-1]=L'\0';}if(global_returns_t_or_f()){printWLine(data);}else{printWLine(data);}} |
void main_sink_b(int * data);void main(){int * data;{int * data_buf=(int *)ALLOCA(100*sizeof(int));{size_t i;for (i=0;i < 100;i++){data_buf[i]=5;}}data=data_buf;}main_sink_b(data);}void main_sink_c(int * data);void main_sink_b(int * data){main_sink_c(data);}void main_sink_d(int * data);void main_sink_c(int * data){main_sink_d(data);}void main_sink_d(int * data){printIntLine(data[0]);delete [] data;} | void main_sink_b(int * data);static void main(){int * data;{int * data_buf=new int[100];{size_t i;for (i=0;i < 100;i++){data_buf[i]=5;}}data=data_buf;}main_sink_b(data);}void main_sink_c(int * data);void main_sink_b(int * data){main_sink_c(data);}void main_sink_d(int * data);void main_sink_c(int * data){main_sink_d(data);}void main_sink_d(int * data){printIntLine(data[0]);delete [] data;} |
void _main(){{if (puts("string")==0){printLine("puts failed!");}}} | static void main(){{if (puts("string")==EOF){printLine("puts failed!");}}} |
void b_main_sink(char * * data_ptr);void _main(){char * data;char data_buf[100]="";data=data_buf;{size_t data_len=strlen(data);if(100-data_len > 1){fgets(data+data_len, (int)(100-data_len), stdin);data_len=strlen(data);if (data_len > 0){data[data_len-1]='\0';}}}b_main_sink(&data);}void b_main_sink(char * * data_ptr){char * data=*data_ptr;{char *args[]={COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL};_spawnv(_P_WAIT, COMMAND_INT_PATH, args);}} | void b_main_sink(char * * data);static void main(){char * data;char data_buf[100]="";data=data_buf;strcat(data, "*.*");b_main_sink(&data);}void b_main_sink(char * * data_ptr){char * data=*data_ptr;{char *args[]={COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL};_spawnv(_P_WAIT, COMMAND_INT_PATH, args);}} |
void b_main_sink(char * data);void _main(){char * data;char data_buf[FILENAME_MAX]="";data=data_buf;{size_t data_len=strlen(data);if(FILENAME_MAX-data_len > 1){fgets(data+data_len, (int)(FILENAME_MAX-data_len), stdin);data_len=strlen(data);if (data_len > 0){data[data_len-1]='\0';}}}b_main_sink(data);}void b_main_sink(char * data){{int fd;fd=OPEN(data, O_RDWR|O_CREAT, S_IREAD|S_IWRITE);if (fd!=-1){CLOSE(fd);}}} | void b_main_sink(char * data);static void main(){char * data;char data_buf[FILENAME_MAX]="";data=data_buf;strcpy(data, "c:\\temp\\file.txt");strcpy(data, "/tmp/file.txt");b_main_sink(data);}void b_main_sink(char * data){{int fd;fd=OPEN(data, O_RDWR|O_CREAT, S_IREAD|S_IWRITE);if (fd!=-1){CLOSE(fd);}}} |
void b_main_sink(_struct_type my_struct);void _main(){wchar_t * data;_struct_type my_struct;wchar_t data_buf[100]=L"";data=data_buf;{size_t data_len=wcslen(data);if(100-data_len > 1){fgetws(data+data_len, (int)(100-data_len), stdin);data_len=wcslen(data);if (data_len > 0){data[data_len-1]=L'\0';}}}my_struct.a=data;b_main_sink(my_struct);}static void main_vasink(wchar_t * data, ...){{va_list args;va_start(args, data);vwprintf(data, args);va_end(args);}}void b_main_sink(_struct_type my_struct){wchar_t * data=my_struct.a;main_vasink(data, data);} | static void main(){wchar_t * data;_struct_type my_struct;wchar_t data_buf[100]=L"";data=data_buf;{size_t data_len=wcslen(data);if(100-data_len > 1){fgetws(data+data_len, (int)(100-data_len), stdin);data_len=wcslen(data);if (data_len > 0){data[data_len-1]=L'\0';}}}my_struct.a=data;b_main_sink(my_struct);}static void main_vasink(wchar_t * data, ...){{va_list args;va_start(args, data);vwprintf(L"%s", args);va_end(args);}}void b_main_sink(_struct_type my_struct){wchar_t * data=my_struct.a;main_vasink(data, data);} |
void main(){char * data;char * &data_ref=data;data=NULL;data=new char[50];{char * data=data_ref;{char src[100];strcpy(data, src);printLine(data);delete [] data;}}} | static void main(){char * data;char * &data_ref=data;data=NULL;data=new char[100];{char * data=data_ref;{char src[100];strcpy(data, src);printLine(data);delete [] data;}}} |
void main_source(long long * &data);void main(){long long * data;main_source(data);printLongLongLine(data[0]);delete [] data;}void main_source(long long * &data){{static long long data_buf[100];{size_t i;for (i=0;i < 100;i++){data_buf[i]=5L;}}data=data_buf;}} | void main_source(long long * &data);static void main(){long long * data;main_source(data);printLongLongLine(data[0]);delete [] data;}void main_source(long long * &data){{long long * data_buf=new long long[100];{size_t i;for (i=0;i < 100;i++){data_buf[i]=5L;}}data=data_buf;}} |
void b_main_sink(wchar_t * data);void _main(){wchar_t * data;void (*func_ptr) (wchar_t *)=b_main_sink;wchar_t data_buf[100]=L"";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;wchar_t *replace;SOCKET connect_socket=INVALID_SOCKET;size_t data_len=wcslen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;connect_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (connect_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=inet_addr("127.0.0.1");s_in.sin_port=htons(TCP_PORT);if (connect(connect_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;recv_rv=recv(connect_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]=L'\0';replace=wcschr(data, L'\r');if (replace) *replace=L'\0';replace=wcschr(data, L'\n');if (replace) *replace=L'\0';}while (0);if (connect_socket!=INVALID_SOCKET) CLOSE_SOCKET(connect_socket);if (wsa_data_init) WSACleanup();}func_ptr(data);}void b_main_sink(wchar_t * data){_wspawnl(_P_WAIT, COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);} | void b_main_sink(wchar_t * data);static void main(){wchar_t * data;void (*func_ptr) (wchar_t *)=b_main_sink;wchar_t data_buf[100]=L"";data=data_buf;wcscat(data, L"*.*");func_ptr(data);}void b_main_sink(wchar_t * data){_wspawnl(_P_WAIT, COMMAND_INT_PATH, COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);} |
static void main_vasink(char * data, ...){{char dest[100]="";va_list args;va_start(args, data);vsnprintf(dest, 100-1, data, args);va_end(args);printLine(dest);}}void _main(){char * data;void (*func_ptr) (char *, ...)=main_vasink;char data_buf[100]="";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;char *replace;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;size_t data_len=strlen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]='\0';replace=strchr(data, '\r');if (replace) *replace='\0';replace=strchr(data, '\n');if (replace) *replace='\0';}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}func_ptr(data, data);} | static void main_vasink(char * data, ...){{char dest[100]="";va_list args;va_start(args, data);vsnprintf(dest, 100-1, "%s", args);va_end(args);printLine(dest);}}static void main(){char * data;void (*func_ptr) (char *, ...)=main_vasink;char data_buf[100]="";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;char *replace;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;size_t data_len=strlen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]='\0';replace=strchr(data, '\r');if (replace) *replace='\0';replace=strchr(data, '\n');if (replace) *replace='\0';}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}func_ptr(data);} |
void _main(){int * data;data=NULL;data=(int *)malloc(50*sizeof(int));{memmove(data, src, 100*sizeof(int));printIntLine(data[0]);free(data);}} | static void main(){int * data;data=NULL;data=(int *)malloc(100*sizeof(int));{memmove(data, src, 100*sizeof(int));printIntLine(data[0]);free(data);}} |
static char * main_source(char * data){{char data_buf[100];data=data_buf;}return data;}void main(){char * data;data=main_source(data);printLine(data);delete [] data;} | static char * main_source(char * data){{char * data_buf=new char[100];data=data_buf;}return data;}static void main(){char * data;data=main_source(data);printLine(data);delete [] data;} |
static void main_sink(unsigned char data){{unsigned char result=data-1;printHexUnsignedCharLine(result);}}void _main(){unsigned char data;data=' ';data=(unsigned char)rand();main_sink(data);} | static void main_sink(unsigned char data){{unsigned char result=data-1;printHexUnsignedCharLine(result);}}static void main(){unsigned char data;data=' ';data=5;main_sink(data);} |
void b_main_sink(int * data);void _main(){int * data;data=NULL;data=NULL;data=(int *)realloc(data, 100*sizeof(int));data[0]=5;printIntLine(data[0]);b_main_sink(data);}void c_main_sink(int * data);void b_main_sink(int * data){c_main_sink(data);}void c_main_sink(int * data){} | static void main(){int * data;data=NULL;data=NULL;data=(int *)realloc(data, 100*sizeof(int));data[0]=5;printIntLine(data[0]);b_main_sink(data);}void b_main_sink(int * data){c_main_sink(data);}void c_main_sink(int * data){free(data);} |
void b_main_sink(char * data);void _main(){char * data;void (*func_ptr) (char *)=b_main_sink;char data_buf[100]="";data=data_buf;{size_t data_len=strlen(data);if(100-data_len > 1){fgets(data+data_len, (int)(100-data_len), stdin);data_len=strlen(data);if (data_len > 0){data[data_len-1]='\0';}}}func_ptr(data);}void b_main_sink(char * data){if (strncmp(PASSWORD, data, strlen(data))==0) printLine("Access granted");else printLine("Access denied!");} | static void main(){char * data;void (*func_ptr) (char *)=b_main_sink;char data_buf[100]="";data=data_buf;data=PASSWORD;func_ptr(data);}void b_main_sink(char * data){if (strncmp(PASSWORD, data, strlen(data))==0) printLine("Access granted");else printLine("Access denied!");} |
void _main(){short data;data=0;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;SOCKET connect_socket=INVALID_SOCKET;char input_buf[CHAR_ARRAY_SIZE];do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;connect_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (connect_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=inet_addr("127.0.0.1");s_in.sin_port=htons(TCP_PORT);if (connect(connect_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;recv_rv=recv(connect_socket, input_buf, CHAR_ARRAY_SIZE, 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data=(short)atoi(input_buf);}while (0);if (connect_socket!=INVALID_SOCKET) CLOSE_SOCKET(connect_socket);if (wsa_data_init) WSACleanup();}{char src[100];char dest[100]="";memset(src, 'A', 100-1);src[100-1]='\0';if (data < 100){memcpy(dest, src, data);}printLine(dest);}} | static void main(){short data;data=0;data=100-1;{char src[100];char dest[100]="";memset(src, 'A', 100-1);src[100-1]='\0';if (data < 100){memcpy(dest, src, data);}printLine(dest);}} |
static void main_sink(){int data=_main_data;{char src[100];char dest[100]="";memset(src, 'A', 100-1);src[100-1]='\0';if (data < 100){memcpy(dest, src, data);}printLine(dest);}}void _main(){int data;data=-1;data=-1;_main_data=data;main_sink();} | static void main_sink(){int data=_main_data;{char src[100];char dest[100]="";memset(src, 'A', 100-1);src[100-1]='\0';if (data < 100){memcpy(dest, src, data);}printLine(dest);}}static void main(){int data;data=-1;data=100-1;_main_data=data;main_sink();} |
static void main_sink(int data){{wchar_t * wchar_t_string;if (data > 0){wchar_t_string=(wchar_t *)malloc(data*sizeof(wchar_t));wcscpy(wchar_t_string, HELLO_STRING);printWLine(wchar_t_string);free(wchar_t_string);}else{printLine("Input is less than 0");}}}void _main(){int data;void (*func_ptr) (int)=main_sink;data=-1;data=RAND32();func_ptr(data);} | static void main_sink(int data){{wchar_t * wchar_t_string;if ((size_t)data > wcslen(HELLO_STRING) && data < 100){wchar_t_string=(wchar_t *)malloc(data*sizeof(wchar_t));wcscpy(wchar_t_string, HELLO_STRING);printWLine(wchar_t_string);free(wchar_t_string);}else{printLine("Input is less than the length of the source string or too large");}}}static void main(){int data;void (*func_ptr) (int)=main_sink;data=-1;data=RAND32();func_ptr(data);} |
void b_main_sink(short data_array[]);void _main(){short data;short data_array[5];data=0;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;char input_buf[CHAR_ARRAY_SIZE];do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, input_buf, CHAR_ARRAY_SIZE, 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data=(short)atoi(input_buf);}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}data_array[2]=data;b_main_sink(data_array);}void b_main_sink(short data_array[]){short data=data_array[2];{char src[100];char dest[100]="";memset(src, 'A', 100-1);src[100-1]='\0';if (data < 100){memcpy(dest, src, data);}printLine(dest);}} | void b_main_sink(short data_array[]);static void main(){short data;short data_array[5];data=0;data=100-1;data_array[2]=data;b_main_sink(data_array);}void b_main_sink(short data_array[]){short data=data_array[2];{char src[100];char dest[100]="";memset(src, 'A', 100-1);src[100-1]='\0';if (data < 100){memcpy(dest, src, data);}printLine(dest);}} |
void b_main_sink(wchar_t * data);void _main(){wchar_t * data;data=NULL;data=(wchar_t *)calloc(100, sizeof(wchar_t));wcscpy(data, L"A String");printWLine(data);b_main_sink(data);}void c_main_sink(wchar_t * data);void b_main_sink(wchar_t * data){c_main_sink(data);}void d_main_sink(wchar_t * data);void c_main_sink(wchar_t * data){d_main_sink(data);}void d_main_sink(wchar_t * data){} | static void main(){wchar_t * data;data=NULL;{wchar_t data_goodbuf[100];data=data_goodbuf;wcscpy(data, L"A String");printWLine(data);}b_main_sink(data);}void b_main_sink(wchar_t * data){c_main_sink(data);}void c_main_sink(wchar_t * data){d_main_sink(data);}void d_main_sink(wchar_t * data){} |
void main_sink(struct_type my_struct);void main(){char * data;struct_type my_struct;data=NULL;data=new char;my_struct.a=data;main_sink(my_struct);}void main_sink(struct_type my_struct){char * data=my_struct.a;delete [] data;} | static void main(){char * data;struct_type my_struct;data=NULL;data=new char;my_struct.a=data;main_sink(my_struct);}void main_sink(struct_type my_struct){char * data=my_struct.a;delete data;} |
char * b_main_source(char * data);void _main(){char * data;char data_buf[100]="";data=data_buf;data=b_main_source(data);EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);}char * b_main_source(char * data){{size_t data_len=strlen(data);if(100-data_len > 1){fgets(data+data_len, (int)(100-data_len), stdin);data_len=strlen(data);if (data_len > 0){data[data_len-1]='\0';}}}return data;} | char * b_main_source(char * data);static void main(){char * data;char data_buf[100]="";data=data_buf;data=b_main_source(data);EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL);}char * b_main_source(char * data){strcat(data, "*.*");return data;} |
void _main(){long long * data;long long data_mainbuf[50];long long data_goodbuf[100];data=data_mainbuf;{long long * data_copy=data;long long * data=data_copy;{{size_t i;for (i=0;i < 100;i++){data[i]=src[i];}printLongLongLine(data[0]);}}}} | static void main(){long long * data;long long data_badbuf[50];long long data_goodbuf[100];data=data_goodbuf;{long long * data_copy=data;long long * data=data_copy;{{size_t i;for (i=0;i < 100;i++){data[i]=src[i];}printLongLongLine(data[0]);}}}} |
static void main_sink(short data){{if (data < 100){char * data_buf=(char *)malloc(data);memset(data_buf, 'A', data-1);data_buf[data-1]='\0';printLine(data_buf);free(data_buf);}}}void _main(){short data;void (*func_ptr) (short)=main_sink;data=0;{char input_buf[CHAR_ARRAY_SIZE]="";fgets(input_buf, CHAR_ARRAY_SIZE, stdin);data=(short)atoi(input_buf);}func_ptr(data);} | static void main_sink(short data){{if (data < 100){char * data_buf=(char *)malloc(data);memset(data_buf, 'A', data-1);data_buf[data-1]='\0';printLine(data_buf);free(data_buf);}}}static void main(){short data;void (*func_ptr) (short)=main_sink;data=0;data=100-1;func_ptr(data);} |
static void main_sink(int data){{if (data < 100){char * data_buf=(char *)malloc(data);memset(data_buf, 'A', data-1);data_buf[data-1]='\0';printLine(data_buf);free(data_buf);}}}void _main(){int data;void (*func_ptr) (int)=main_sink;data=-1;{char input_buf[CHAR_ARRAY_SIZE]="";fgets(input_buf, CHAR_ARRAY_SIZE, stdin);data=atoi(input_buf);}func_ptr(data);} | static void main_sink(int data){{if (data < 100){char * data_buf=(char *)malloc(data);memset(data_buf, 'A', data-1);data_buf[data-1]='\0';printLine(data_buf);free(data_buf);}}}static void main(){int data;void (*func_ptr) (int)=main_sink;data=-1;data=100-1;func_ptr(data);} |
void b_main_sink(void * void_data_ptr);void _main(){char * data;char data_buf[100];memset(data_buf, 'A', 100-1);data_buf[100-1]='\0';data=data_buf-8;b_main_sink(&data);}void b_main_sink(void * void_data_ptr){char * * data_ptr=(char * *)void_data_ptr;char * data=(*data_ptr);{char src[100];strncpy(data, src, 100);data[100-1]='\0';printLine(data);}} | void b_main_sink(void * void_data_ptr);static void main(){char * data;char data_buf[100];memset(data_buf, 'A', 100-1);data_buf[100-1]='\0';data=data_buf;b_main_sink(&data);}void b_main_sink(void * void_data_ptr){char * * data_ptr=(char * *)void_data_ptr;char * data=(*data_ptr);{char src[100];strncpy(data, src, 100);data[100-1]='\0';printLine(data);}} |
void b_main_sink(int * data);void _main(){int * data;data=NULL;data=(int *)malloc(100*sizeof(int));data[0]=5;printIntLine(data[0]);b_main_sink(data);}void c_main_sink(int * data);void b_main_sink(int * data){c_main_sink(data);}void c_main_sink(int * data){} | static void main(){int * data;data=NULL;data=(int *)malloc(100*sizeof(int));data[0]=5;printIntLine(data[0]);b_main_sink(data);}void b_main_sink(int * data){c_main_sink(data);}void c_main_sink(int * data){free(data);} |
static void main_sink(){int data=_main_data;printIntLine(100 % data);}void _main(){int data;data=-1;fscanf (stdin, "%d", &data);_main_data=data;main_sink();} | static void main_sink(){int data=_main_data;printIntLine(100 % data);}static void main(){int data;data=-1;data=7;_main_data=data;main_sink();} |
void b_main_sink(unsigned char data);void _main(){unsigned char data;data=' ';fscanf (stdin, "%hc", &data);b_main_sink(data);}void c_main_sink(unsigned char data);void b_main_sink(unsigned char data){c_main_sink(data);}void c_main_sink(unsigned char data){{unsigned char result=data * data;printHexUnsignedCharLine(result);}} | static void main(){unsigned char data;data=' ';data=5;b_main_sink(data);}void b_main_sink(unsigned char data){c_main_sink(data);}void c_main_sink(unsigned char data){{unsigned char result=data * data;printHexUnsignedCharLine(result);}} |
void b_main_sink(twoints * data);void _main(){twoints * data;twoints data_mainbuf[50];twoints data_goodbuf[100];data=data_mainbuf;b_main_sink(data);}void c_main_sink(twoints * data);void b_main_sink(twoints * data){c_main_sink(data);}void d_main_sink(twoints * data);void c_main_sink(twoints * data){d_main_sink(data);}void d_main_sink(twoints * data){{twoints src[100];{size_t i;for (i=0;i < 100;i++){src[i].a=0;src[i].b=0;}}memmove(data, src, 100*sizeof(twoints));printStructLine(&data[0]);}} | void b_main_sink(twoints * data);static void main(){twoints * data;twoints data_badbuf[50];twoints data_goodbuf[100];data=data_goodbuf;b_main_sink(data);}void c_main_sink(twoints * data);void b_main_sink(twoints * data){c_main_sink(data);}void d_main_sink(twoints * data);void c_main_sink(twoints * data){d_main_sink(data);}void d_main_sink(twoints * data){{twoints src[100];{size_t i;for (i=0;i < 100;i++){src[i].a=0;src[i].b=0;}}memmove(data, src, 100*sizeof(twoints));printStructLine(&data[0]);}} |
void b_main_sink(char * * data_ptr);void _main(){char * data;char data_buf[FILENAME_MAX]="";data=data_buf;{size_t data_len=strlen(data);if(FILENAME_MAX-data_len > 1){fgets(data+data_len, (int)(FILENAME_MAX-data_len), stdin);data_len=strlen(data);if (data_len > 0){data[data_len-1]='\0';}}}b_main_sink(&data);}void b_main_sink(char * * data_ptr){char * data=*data_ptr;{HANDLE hFile;hFile=CreateFileA(data, (GENERIC_WRITE|GENERIC_READ), 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);if (hFile!=INVALID_HANDLE_VALUE){CloseHandle(hFile);}}} | void b_main_sink(char * * data);static void main(){char * data;char data_buf[FILENAME_MAX]="";data=data_buf;strcpy(data, "c:\\temp\\file.txt");strcpy(data, "/tmp/file.txt");b_main_sink(&data);}void b_main_sink(char * * data_ptr){char * data=*data_ptr;{HANDLE hFile;hFile=CreateFileA(data, (GENERIC_WRITE|GENERIC_READ), 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);if (hFile!=INVALID_HANDLE_VALUE){CloseHandle(hFile);}}} |
static void main_sink(){char * data=_main_data;free(data);}void _main(){char * data;data=NULL;data=(char *)malloc(100*sizeof(char));free(data);_main_data=data;main_sink();} | static void main_sink(){char * data=_main_data;}static void main(){char * data;data=NULL;data=(char *)malloc(100*sizeof(char));free(data);_main_data=data;main_sink();} |
void _main_sink(short data){{char src[100];char dest[100]="";memset(src, 'A', 100-1);src[100-1]='\0';if (data < 100){strncpy(dest, src, data);}printLine(dest);}}void _main(){short data;data=0;data=(short)RAND32();_main_sink(data);} | void _main_sink(short data){{char src[100];char dest[100]="";memset(src, 'A', 100-1);src[100-1]='\0';if (data < 100){strncpy(dest, src, data);}printLine(dest);}}static void main(){short data;data=0;data=100-1;_main_sink(data);} |
void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{size_t data_len=wcslen(data);wchar_t * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){wcsncat(data+data_len, environment, 100-data_len-1);}}{wchar_t * data_copy=data;wchar_t * data=data_copy;fwprintf(stdout, data);}} | static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{size_t data_len=wcslen(data);wchar_t * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){wcsncat(data+data_len, environment, 100-data_len-1);}}{wchar_t * data_copy=data;wchar_t * data=data_copy;fwprintf(stdout, L"%s\n", data);}} |
void _main(){int data;data=-1;if(global_returns_t_or_f()){}else{data=20;}{size_t i;int *b;b=(int*)malloc(data * sizeof(int));for (i=0;i < (size_t)data;i++){}printIntLine(b[0]);free(b);}} | static void main(){int data;data=-1;if(global_returns_t_or_f()){data=20;}else{data=20;}{size_t i;int *b;b=(int*)malloc(data * sizeof(int));for (i=0;i < (size_t)data;i++){}printIntLine(b[0]);free(b);}} |
void main(){twoints * data;union_type my_union;data=NULL;data=(twoints *)malloc(100*sizeof(twoints));my_union.a=data;{twoints * data=my_union.b;delete data;}} | static void main(){twoints * data;union_type my_union;data=NULL;data=new twoints;my_union.a=data;{twoints * data=my_union.b;delete data;}} |
void _main(){char * data;data=NULL;data=NULL;data=(char *)realloc(data, 100*sizeof(char));strcpy(data, "A String");printLine(data);} | static void main(){char * data;data=NULL;data=NULL;data=(char *)realloc(data, 100*sizeof(char));strcpy(data, "A String");printLine(data);free(data);} |
void main_sink(twointsclass * * data_ptr);void main(){twointsclass * data;data=NULL;data=new twointsclass[50];main_sink(&data);}void main_sink(twointsclass * * data_ptr){twointsclass * data=*data_ptr;{twointsclass src[100];{size_t i;for (i=0;i < 100;i++){src[i].a=0;src[i].b=0;}}memmove(data, src, 100*sizeof(twointsclass));printIntLine(data[0].a);delete [] data;}} | void main_sink(twointsclass * * data);static void main(){twointsclass * data;data=NULL;data=new twointsclass[100];main_sink(&data);}void main_sink(twointsclass * * data_ptr){twointsclass * data=*data_ptr;{twointsclass src[100];{size_t i;for (i=0;i < 100;i++){src[i].a=0;src[i].b=0;}}memmove(data, src, 100*sizeof(twointsclass));printIntLine(data[0].a);delete [] data;}} |
void b_main_sink(wchar_t * data);void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{size_t data_len=wcslen(data);FILE * pFile;if(100-data_len > 1){pFile=FOPEN(L"C:\\temp\\file.txt", L"r");if (pFile!=NULL){fgetws(data+data_len, (int)(100-data_len), pFile);fclose(pFile);}}}b_main_sink(data);}void b_main_sink(wchar_t * data){{wchar_t *args[]={COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL};EXECV(COMMAND_INT_PATH, args);}} | void b_main_sink(wchar_t * data);static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;wcscat(data, L"*.*");b_main_sink(data);}void b_main_sink(wchar_t * data){{wchar_t *args[]={COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL};EXECV(COMMAND_INT_PATH, args);}} |
void main(){{char * pointer=new char;delete pointer;printHexCharLine(data);}} | static void main(){{char data;data=5;char * pointer=new char;{char data=*pointer;printHexCharLine(data);}delete pointer;}} |
void b_main_sink(char * data);void _main(){char * data;char data_buf[FILENAME_MAX]=BASEPATH;data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;char *replace;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;size_t data_len=strlen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, (char *)data+data_len, (int)(FILENAME_MAX-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]='\0';replace=strchr(data, '\r');if (replace) *replace='\0';replace=strchr(data, '\n');if (replace) *replace='\0';}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}b_main_sink(data);}void c_main_sink(char * data);void b_main_sink(char * data){c_main_sink(data);}void d_main_sink(char * data);void c_main_sink(char * data){d_main_sink(data);}void d_main_sink(char * data){{int fd;fd=OPEN(data, O_RDWR|O_CREAT, S_IREAD|S_IWRITE);if (fd!=-1){CLOSE(fd);}}} | void b_main_sink(char * data);static void main(){char * data;char data_buf[FILENAME_MAX]=BASEPATH;data=data_buf;strcat(data, "file.txt");b_main_sink(data);}void c_main_sink(char * data);void b_main_sink(char * data){c_main_sink(data);}void d_main_sink(char * data);void c_main_sink(char * data){d_main_sink(data);}void d_main_sink(char * data){{int fd;fd=OPEN(data, O_RDWR|O_CREAT, S_IREAD|S_IWRITE);if (fd!=-1){CLOSE(fd);}}} |
static void main_vasinkb(wchar_t * data, ...){{wchar_t dest[100]=L"";va_list args;va_start(args, data);_vsnwprintf(dest, 100-1, data, args);va_end(args);printWLine(dest);}}static void main_vasinkg(wchar_t * data, ...){{wchar_t dest[100]=L"";va_list args;va_start(args, data);_vsnwprintf(dest, 100-1, L"%s", args);va_end(args);printWLine(dest);}}void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{size_t data_len=wcslen(data);if(100-data_len > 1){fgetws(data+data_len, (int)(100-data_len), stdin);data_len=wcslen(data);if (data_len > 0){data[data_len-1]=L'\0';}}}main_vasinkb(data, data);} | static void main_vasinkb(wchar_t * data, ...){{wchar_t dest[100]=L"";va_list args;va_start(args, data);_vsnwprintf(dest, 100-1, data, args);va_end(args);printWLine(dest);}}static void main_vasinkg(wchar_t * data, ...){{wchar_t dest[100]=L"";va_list args;va_start(args, data);_vsnwprintf(dest, 100-1, L"%s", args);va_end(args);printWLine(dest);}}static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{size_t data_len=wcslen(data);if(100-data_len > 1){fgetws(data+data_len, (int)(100-data_len), stdin);data_len=wcslen(data);if (data_len > 0){data[data_len-1]=L'\0';}}}main_vasinkg(data, data);} |
void b_main_sink(int count);void _main(){int count;count=-1;{char input_buf[CHAR_ARRAY_SIZE]="";fgets(input_buf, CHAR_ARRAY_SIZE, stdin);count=atoi(input_buf);}b_main_sink(count);}void c_main_sink(int count);void b_main_sink(int count){c_main_sink(count);}void c_main_sink(int count){{size_t i=0;FILE *file=NULL;const char *filename="output_main.txt";file=fopen(filename, "w+");if (file==NULL) exit(1);for (i=0;i < (size_t)count;i++){if (strlen(SENTENCE)!=fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), file)) exit(1);}if (file){fclose(file);}}} | static void main(){int count;count=-1;count=20;b_main_sink(count);}void b_main_sink(int count){c_main_sink(count);}void c_main_sink(int count){{size_t i=0;FILE *file=NULL;const char *filename="output_bad.txt";file=fopen(filename, "w+");if (file==NULL) exit(1);for (i=0;i < (size_t)count;i++){if (strlen(SENTENCE)!=fwrite(SENTENCE, sizeof(char), strlen(SENTENCE), file)) exit(1);}if (file){fclose(file);}}} |
void main_sink_b(wchar_t * data);void main(){wchar_t * data;data=new wchar_t[100];main_sink_b(data);}void main_sink_c(wchar_t * data);void main_sink_b(wchar_t * data){main_sink_c(data);}void main_sink_d(wchar_t * data);void main_sink_c(wchar_t * data){main_sink_d(data);}void main_sink_e(wchar_t * data);void main_sink_d(wchar_t * data){main_sink_e(data);}void main_sink_e(wchar_t * data){{wchar_t dest[50]=L"";memmove(dest, data, wcslen(data)*sizeof(wchar_t));printWLine(data);delete [] data;}} | void main_sink_b(wchar_t * data);static void main(){wchar_t * data;data=new wchar_t[100];main_sink_b(data);}void main_sink_c(wchar_t * data);void main_sink_b(wchar_t * data){main_sink_c(data);}void main_sink_d(wchar_t * data);void main_sink_c(wchar_t * data){main_sink_d(data);}void main_sink_e(wchar_t * data);void main_sink_d(wchar_t * data){main_sink_e(data);}void main_sink_e(wchar_t * data){{wchar_t dest[50]=L"";memmove(dest, data, wcslen(data)*sizeof(wchar_t));printWLine(data);delete [] data;}} |
void main(){long long * data;data=NULL;if(global_returns_t_or_f()){data=new long long[100];}else{data=(long long *)malloc(100*sizeof(long long));}if(global_returns_t_or_f()){free(data);}else{delete [] data;}} | static void main(){long long * data;data=NULL;if(global_returns_t_or_f()){data=(long long *)malloc(100*sizeof(long long));}else{data=(long long *)malloc(100*sizeof(long long));}if(global_returns_t_or_f()){free(data);}else{free(data);}} |
static void main_vasink(wchar_t * data, ...){{va_list args;va_start(args, data);vwprintf(data, args);va_end(args);}}void _main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{size_t data_len=wcslen(data);wchar_t * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){wcsncat(data+data_len, environment, 100-data_len-1);}}{wchar_t * data_copy=data;wchar_t * data=data_copy;main_vasink(data, data);}} | static void main_vasink(wchar_t * data, ...){{va_list args;va_start(args, data);vwprintf(L"%s", args);va_end(args);}}static void main(){wchar_t * data;wchar_t data_buf[100]=L"";data=data_buf;{size_t data_len=wcslen(data);wchar_t * environment=GETENV(ENV_VARIABLE);if (environment!=NULL){wcsncat(data+data_len, environment, 100-data_len-1);}}{wchar_t * data_copy=data;wchar_t * data=data_copy;main_vasink(data, data);}} |
static void main_vasink(char * data, ...){{va_list args;va_start(args, data);vfprintf(stdout, data, args);va_end(args);}}void _main(){char * data;void (*func_ptr) (char *, ...)=main_vasink;char data_buf[100]="";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;char *replace;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;size_t data_len=strlen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]='\0';replace=strchr(data, '\r');if (replace) *replace='\0';replace=strchr(data, '\n');if (replace) *replace='\0';}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}func_ptr(data, data);} | static void main_vasink(char * data, ...){{va_list args;va_start(args, data);vfprintf(stdout, data, args);va_end(args);}}static void main(){char * data;void (*func_ptr) (char *, ...)=main_vasink;char data_buf[100]="";data=data_buf;strcpy(data, "fixedstringtest");func_ptr(data);} |
static void main_vasink(char * data, ...){{va_list args;va_start(args, data);vfprintf(stdout, data, args);va_end(args);}}void _main(){char * data;char data_buf[100]="";data=data_buf;{size_t data_len=strlen(data);FILE * pFile;if(100-data_len > 1){pFile=FOPEN("C:\\temp\\file.txt", "r");if (pFile!=NULL){fgets(data+data_len, (int)(100-data_len), pFile);fclose(pFile);}}}main_vasink(data, data);} | static void main_vasink(char * data, ...){{va_list args;va_start(args, data);vfprintf(stdout, data, args);va_end(args);}}static void main(){char * data;char data_buf[100]="";data=data_buf;strcpy(data, "fixedstringtest");main_vasink(data, data);} |
void b_main_sink(void * void_data_ptr);void _main(){int data;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;SOCKET connect_socket=INVALID_SOCKET;char input_buf[CHAR_ARRAY_SIZE];do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;connect_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (connect_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=inet_addr("127.0.0.1");s_in.sin_port=htons(TCP_PORT);if (connect(connect_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;recv_rv=recv(connect_socket, input_buf, CHAR_ARRAY_SIZE, 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data=atoi(input_buf);}while (0);if (connect_socket!=INVALID_SOCKET) CLOSE_SOCKET(connect_socket);if (wsa_data_init) WSACleanup();}b_main_sink(&data);}void b_main_sink(void * void_data_ptr){int * data_ptr=(int *)void_data_ptr;int data=(*data_ptr);{char data_buf[10]="AAAAAAAAA";if (data >=0){printHexCharLine(data_buf[data]);}else{printLine("ERROR: Array index is negative");}}} | static void main(){int data;data=7;b_main_sink(&data);}void b_main_sink(void * void_data_ptr){int * data_ptr=(int *)void_data_ptr;int data=(*data_ptr);{char data_buf[10]="AAAAAAAAA";if (data >=0){printHexCharLine(data_buf[data]);}else{printLine("ERROR: Array index is negative");}}} |
void _main(){float data;data=0.0F;data=0.0F;{float data_copy=data;float data=data_copy;printDoubleLine((double)(100.0/data));}} | static void main(){float data;data=0.0F;data=7.0F;{float data_copy=data;float data=data_copy;printDoubleLine((double)(100.0/data));}} |
char * b_main_source(char * data);void _main(){char * data;char data_buf[100]="";data=data_buf;data=b_main_source(data);if (strstr(PASSWORD, data)!=NULL) printLine("Access granted");else printLine("Access denied!");}char * b_main_source(char * data){{size_t data_len=strlen(data);FILE * pFile;if(100-data_len > 1){pFile=FOPEN("C:\\temp\\file.txt", "r");if (pFile!=NULL){fgets(data+data_len, (int)(100-data_len), pFile);fclose(pFile);}}}return data;} | static void main(){char * data;char data_buf[100]="";data=data_buf;data=b_main_source(data);if (strcmp(PASSWORD, data)==0) printLine("Access granted");else printLine("Access denied!");}char * b_main_source(char * data){{size_t data_len=strlen(data);FILE * pFile;if(100-data_len > 1){pFile=FOPEN("C:\\temp\\file.txt", "r");if (pFile!=NULL){fgets(data+data_len, (int)(100-data_len), pFile);fclose(pFile);}}}return data;} |
void b_main_sink(int data);void _main(){int data;{char input_buf[CHAR_ARRAY_SIZE]="";fgets(input_buf, CHAR_ARRAY_SIZE, stdin);data=atoi(input_buf);}b_main_sink(data);}void c_main_sink(int data);void b_main_sink(int data){c_main_sink(data);}void c_main_sink(int data){{int data_buf[10]={0,1,2,3,4,5,6,7,8,9};if (data >=0){printIntLine(data_buf[data]);}else{printLine("ERROR: Array index is negative");}}} | static void main(){int data;data=7;b_main_sink(data);}void b_main_sink(int data){c_main_sink(data);}void c_main_sink(int data){{int data_buf[10]={0,1,2,3,4,5,6,7,8,9};if (data >=0){printIntLine(data_buf[data]);}else{printLine("ERROR: Array index is negative");}}} |
void _main_sink(char * data){{char *args[]={COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL};EXECV(COMMAND_INT_PATH, args);}}void _main(){char * data;char data_buf[100]="";data=data_buf;{size_t data_len=strlen(data);if(100-data_len > 1){fgets(data+data_len, (int)(100-data_len), stdin);data_len=strlen(data);if (data_len > 0){data[data_len-1]='\0';}}}_main_sink(data);} | void _main_sink(char * data){{char *args[]={COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL};EXECV(COMMAND_INT_PATH, args);}}static void main(){char * data;char data_buf[100]="";data=data_buf;strcat(data, "*.*");_main_sink(data);} |
void b_main_sink(unsigned char data);void _main(){unsigned char data;void (*func_ptr) (unsigned char)=b_main_sink;data=' ';fscanf (stdin, "%hc", &data);func_ptr(data);}void b_main_sink(unsigned char data){{unsigned char result=data+1;printHexUnsignedCharLine(result);}} | static void main(){unsigned char data;void (*func_ptr) (unsigned char)=b_main_sink;data=' ';data=5;func_ptr(data);}void b_main_sink(unsigned char data){{unsigned char result=data+1;printHexUnsignedCharLine(result);}} |
void _main(){wchar_t * data;wchar_t data_buf[FILENAME_MAX]=BASEPATH;data=data_buf;{size_t data_len=wcslen(data);FILE * pFile;if(FILENAME_MAX-data_len > 1){pFile=FOPEN(L"C:\\temp\\file.txt", L"r");if (pFile!=NULL){fgetws(data+data_len, (int)(FILENAME_MAX-data_len), pFile);fclose(pFile);}}}{wchar_t * data_copy=data;wchar_t * data=data_copy;{FILE *file=NULL;file=FOPEN(data, L"wb+");if (file!=NULL) fclose(file);}}} | static void main(){wchar_t * data;wchar_t data_buf[FILENAME_MAX]=BASEPATH;data=data_buf;wcscat(data, L"file.txt");{wchar_t * data_copy=data;wchar_t * data=data_copy;{FILE *file=NULL;file=FOPEN(data, L"wb+");if (file!=NULL) fclose(file);}}} |
void b_main_sink(wchar_t * * data_ptr);void _main(){wchar_t * data;wchar_t data_buf[FILENAME_MAX]=L"";data=data_buf;{size_t data_len=wcslen(data);FILE * pFile;if(FILENAME_MAX-data_len > 1){pFile=FOPEN(L"C:\\temp\\file.txt", L"r");if (pFile!=NULL){fgetws(data+data_len, (int)(FILENAME_MAX-data_len), pFile);fclose(pFile);}}}b_main_sink(&data);}void b_main_sink(wchar_t * * data_ptr){wchar_t * data=*data_ptr;{HANDLE hFile;hFile=CreateFileW(data, (GENERIC_WRITE|GENERIC_READ), 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);if (hFile!=INVALID_HANDLE_VALUE){CloseHandle(hFile);}}} | void b_main_sink(wchar_t * * data);static void main(){wchar_t * data;wchar_t data_buf[FILENAME_MAX]=L"";data=data_buf;wcscpy(data, L"c:\\temp\\file.txt");wcscpy(data, L"/tmp/file.txt");b_main_sink(&data);}void b_main_sink(wchar_t * * data_ptr){wchar_t * data=*data_ptr;{HANDLE hFile;hFile=CreateFileW(data, (GENERIC_WRITE|GENERIC_READ), 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);if (hFile!=INVALID_HANDLE_VALUE){CloseHandle(hFile);}}} |
void main(){twoints * data;twoints * &data_ref=data;data=NULL;data=new twoints;delete data;{twoints * data=data_ref;delete data;}} | static void main(){twoints * data;twoints * &data_ref=data;data=NULL;data=new twoints;delete data;{twoints * data=data_ref;}} |
void main_sink_b(int * data);void main(){int * data;data=NULL;data=new int;main_sink_b(data);}void main_sink_c(int * data);void main_sink_b(int * data){main_sink_c(data);}void main_sink_d(int * data);void main_sink_c(int * data){main_sink_d(data);}void main_sink_d(int * data){free(data);} | static void main(){int * data;data=NULL;data=new int;main_sink_b(data);}void main_sink_b(int * data){main_sink_c(data);}void main_sink_c(int * data){main_sink_d(data);}void main_sink_d(int * data){delete data;} |
void _main(){char * data;char data_buf[100]="";data=data_buf;data="P";if (strncmp(PASSWORD, data, strlen(data))==0) printLine("Access granted");else printLine("Access denied!");} | static void main(){char * data;char data_buf[100]="";data=data_buf;data="P";if (strcmp(PASSWORD, data)==0) printLine("Access granted");else printLine("Access denied!");} |
void b_main_sink(wchar_t * data);void _main(){wchar_t * data;void (*func_ptr) (wchar_t *)=b_main_sink;wchar_t data_mainbuf[50];wchar_t data_goodbuf[100];data=data_mainbuf;func_ptr(data);}void b_main_sink(wchar_t * data){{wchar_t src[100];wcscpy(data, src);printWLine(data);}} | void b_main_sink(wchar_t * data);static void main(){wchar_t * data;void (*func_ptr) (wchar_t *)=b_main_sink;wchar_t data_badbuf[50];wchar_t data_goodbuf[100];data=data_goodbuf;func_ptr(data);}void b_main_sink(wchar_t * data){{wchar_t src[100];wcscpy(data, src);printWLine(data);}} |
void b_main_sink(wchar_t * * data_ptr);void _main(){wchar_t * data;wchar_t data_buf[100];data=data_buf;b_main_sink(&data);}void b_main_sink(wchar_t * * data_ptr){wchar_t * data=*data_ptr;{wchar_t dest[50]=L"";size_t i, data_len;data_len=wcslen(data);for (i=0;i < data_len;i++){dest[i]=data[i];}printWLine(data);}} | void b_main_sink(wchar_t * * data);static void main(){wchar_t * data;wchar_t data_buf[100];data=data_buf;b_main_sink(&data);}void b_main_sink(wchar_t * * data_ptr){wchar_t * data=*data_ptr;{wchar_t dest[50]=L"";size_t i, data_len;data_len=wcslen(data);for (i=0;i < data_len;i++){dest[i]=data[i];}printWLine(data);}} |
void _main(){char * data;_union_type my_union;data=NULL;data=(char *)calloc(100, sizeof(char));strcpy(data, "A String");printLine(data);my_union.a=data;{char * data=my_union.b;}} | static void main(){char * data;_union_type my_union;data=NULL;data=(char *)calloc(100, sizeof(char));strcpy(data, "A String");printLine(data);my_union.a=data;{char * data=my_union.b;free(data);}} |
static void main_sink(){wchar_t * data=_main_data;{wchar_t data_src[10+1]=SRC_STRING;wcscpy(data, data_src);printWLine(data);free(data);}}void _main(){wchar_t * data;data=NULL;data=(wchar_t *)malloc(10*sizeof(wchar_t));_main_data=data;main_sink();} | static void main_sink(){wchar_t * data=_main_data;{wchar_t data_src[10+1]=SRC_STRING;wcscpy(data, data_src);printWLine(data);free(data);}}static void main(){wchar_t * data;data=NULL;data=(wchar_t *)malloc((10+1)*sizeof(wchar_t));_main_data=data;main_sink();} |
void main_sink_b(int data);void main(){int data;data=-1;data=10000;main_sink_b(data);}void main_sink_c(int data);void main_sink_b(int data){main_sink_c(data);}void main_sink_d(int data);void main_sink_c(int data){main_sink_d(data);}void main_sink_d(int data){{char * char_string;if (data > 0){char_string=new char[data];strcpy(char_string, HELLO_STRING);printLine(char_string);delete [] char_string;}else{printLine("Input is less than 0");}}} | static void main(){int data;data=-1;data=20;main_sink_b(data);}void main_sink_b(int data){main_sink_c(data);}void main_sink_c(int data){main_sink_d(data);}void main_sink_d(int data){{char * char_string;if (data > 0){char_string=new char[data];strcpy(char_string, HELLO_STRING);printLine(char_string);delete [] char_string;}else{printLine("Input is less than 0");}}} |
char * b_main_source(char * data);static void main_vasink(char * data, ...){{char dest[100]="";va_list args;va_start(args, data);vsnprintf(dest, 100-1, data, args);va_end(args);printLine(dest);}}void _main(){char * data;char data_buf[100]="";data=data_buf;data=b_main_source(data);main_vasink(data, data);}char * b_main_source(char * data){{size_t data_len=strlen(data);if(100-data_len > 1){fgets(data+data_len, (int)(100-data_len), stdin);data_len=strlen(data);if (data_len > 0){data[data_len-1]='\0';}}}return data;} | static void main_vasink(char * data, ...){{char dest[100]="";va_list args;va_start(args, data);vsnprintf(dest, 100-1, data, args);va_end(args);printLine(dest);}}static void main(){char * data;char data_buf[100]="";data=data_buf;data=b_main_source(data);main_vasink(data, data);}char * b_main_source(char * data){strcpy(data, "fixedstringtest");return data;} |
void _main(){wchar_t * data;wchar_t data_buf[250]=L"PATH=";data=data_buf;{size_t data_len=wcslen(data);FILE * pFile;if(250-data_len > 1){pFile=FOPEN(L"C:\\temp\\file.txt", L"r");if (pFile!=NULL){fgetws(data+data_len, (int)(250-data_len), pFile);fclose(pFile);}}}PUTENV(data);} | static void main(){wchar_t * data;wchar_t data_buf[250]=L"PATH=";data=data_buf;wcscat(data, NEW_PATH);PUTENV(data);} |
void main(){wchar_t * data;data=NULL;data=new wchar_t[50];{wchar_t src[100];_snwprintf(data, 100, L"%s", src);printWLine(data);delete [] data;}} | static void main(){wchar_t * data;data=NULL;data=new wchar_t[100];{wchar_t src[100];_snwprintf(data, 100, L"%s", src);printWLine(data);delete [] data;}} |
void b_main_sink(char * data);void _main(){char * data;char data_buf[100]="";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;char *replace;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;size_t data_len=strlen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]='\0';replace=strchr(data, '\r');if (replace) *replace='\0';replace=strchr(data, '\n');if (replace) *replace='\0';}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}b_main_sink(data);}void b_main_sink(char * data){if (strncmp(PASSWORD, data, strlen(PASSWORD))==0) printLine("Access granted");else printLine("Access denied!");} | static void main(){char * data;char data_buf[100]="";data=data_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;char *replace;SOCKET listen_socket=INVALID_SOCKET;SOCKET accept_socket=INVALID_SOCKET;size_t data_len=strlen(data);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;listen_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (listen_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=INADDR_ANY;s_in.sin_port=htons(TCP_PORT);if (bind(listen_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;if (listen(listen_socket, LISTEN_BACKLOG)==SOCKET_ERROR) break;accept_socket=accept(listen_socket, NULL, NULL);if (accept_socket==SOCKET_ERROR) break;recv_rv=recv(accept_socket, (char *)data+data_len, (int)(100-data_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data[recv_rv]='\0';replace=strchr(data, '\r');if (replace) *replace='\0';replace=strchr(data, '\n');if (replace) *replace='\0';}while (0);if (listen_socket!=INVALID_SOCKET) CLOSE_SOCKET(listen_socket);if (accept_socket!=INVALID_SOCKET) CLOSE_SOCKET(accept_socket);if (wsa_data_init) WSACleanup();}b_main_sink(data);}void b_main_sink(char * data){if (strcmp(PASSWORD, data)==0) printLine("Access granted");else printLine("Access denied!");} |
int main_source(int data);void main(){int data;data=-1;data=main_source(data);{wchar_t * wchar_t_string;if (data > 0){wchar_t_string=new wchar_t[data];wcscpy(wchar_t_string, HELLO_STRING);printWLine(wchar_t_string);delete [] wchar_t_string;}else{printLine("Input is less than 0");}}}int main_source(int data){data=10000;return data;} | static void main(){int data;data=-1;data=main_source(data);{wchar_t * wchar_t_string;if ((size_t)data > wcslen(HELLO_STRING) && data < 100){wchar_t_string=new wchar_t[data];wcscpy(wchar_t_string, HELLO_STRING);printWLine(wchar_t_string);delete [] wchar_t_string;}else{printLine("Input is less than the length of the source string or too large");}}}int main_source(int data){data=10000;return data;} |
static void main_sink(int data){{int data_buf[10]={0,1,2,3,4,5,6,7,8,9};if (data >=0){printIntLine(data_buf[data]);}else{printLine("ERROR: Array index is negative");}}}void _main(){int data;void (*func_ptr) (int)=main_sink;fscanf (stdin, "%d", &data);func_ptr(data);} | static void main_sink(int data){{int data_buf[10]={0,1,2,3,4,5,6,7,8,9};if (data >=0 && data < 10){printIntLine(data_buf[data]);}else{printLine("ERROR: Array index is out-of-bounds");}}}static void main(){int data;void (*func_ptr) (int)=main_sink;fscanf (stdin, "%d", &data);func_ptr(data);} |
void b_main_sink(int data_array[]);void _main(){int data;int data_array[5];data=-1;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;SOCKET connect_socket=INVALID_SOCKET;char input_buf[CHAR_ARRAY_SIZE];do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;connect_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (connect_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=inet_addr("127.0.0.1");s_in.sin_port=htons(TCP_PORT);if (connect(connect_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;recv_rv=recv(connect_socket, input_buf, CHAR_ARRAY_SIZE, 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;data=atoi(input_buf);}while (0);if (connect_socket!=INVALID_SOCKET) CLOSE_SOCKET(connect_socket);if (wsa_data_init) WSACleanup();}data_array[2]=data;b_main_sink(data_array);}void b_main_sink(int data_array[]){int data=data_array[2];{char * char_string;if (data > 0){char_string=(char *)malloc(data*sizeof(char));strcpy(char_string, HELLO_STRING);printLine(char_string);free(char_string);}else{printLine("Input is less than 0");}}} | static void main(){int data;int data_array[5];data=-1;data=20;data_array[2]=data;b_main_sink(data_array);}void b_main_sink(int data_array[]){int data=data_array[2];{char * char_string;if (data > 0){char_string=(char *)malloc(data*sizeof(char));strcpy(char_string, HELLO_STRING);printLine(char_string);free(char_string);}else{printLine("Input is less than 0");}}} |
void b_main_sink(wchar_t * data_array[]);void _main(){wchar_t * data;wchar_t * data_array[5];data=NULL;data=NULL;data=(wchar_t *)realloc(data, 100*sizeof(wchar_t));wcscpy(data, L"A String");printWLine(data);data_array[2]=data;b_main_sink(data_array);}void b_main_sink(wchar_t * data_array[]){wchar_t * data=data_array[2];} | static void main(){wchar_t * data;wchar_t * data_array[5];data=NULL;{wchar_t data_goodbuf[100];data=data_goodbuf;wcscpy(data, L"A String");printWLine(data);}data_array[2]=data;b_main_sink(data_array);}void b_main_sink(wchar_t * data_array[]){wchar_t * data=data_array[2];} |