static String removeRemarks(String s){
  char[] chars=s.toCharArray();
  for (int i=0; i >= 0 && i < s.length(); i++) {
    if (s.charAt(i) == '\'') {
      i++;
      while (true) {
        if (s.charAt(i) == '\\') {
          i++;
        }
 else         if (s.charAt(i) == '\'') {
          break;
        }
        i++;
      }
      continue;
    }
 else     if (s.charAt(i) == '\"') {
      i++;
      while (true) {
        if (s.charAt(i) == '\\') {
          i++;
        }
 else         if (s.charAt(i) == '\"') {
          break;
        }
        i++;
      }
      continue;
    }
    String sub=s.substring(i);
    if (sub.startsWith("/*") && !sub.startsWith("/* c:")) {
      int j=i;
      i=s.indexOf("*/",i + 2) + 2;
      for (; j < i; j++) {
        if (chars[j] > ' ') {
          chars[j]=' ';
        }
      }
    }
 else     if (sub.startsWith("//") && !sub.startsWith("// c:")) {
      int j=i;
      i=s.indexOf('\n',i);
      while (j < i) {
        chars[j++]=' ';
      }
    }
  }
  return new String(chars) + "  ";
}

static String removeRemarks ( String s ) { char [ ] chars = s . toCharArray ( ) ; for ( int i = 0 ; i >= 0 && i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) == '\'' ) { i ++ ; while ( true ) { if ( s . charAt ( i ) == '\\' ) { i ++ ; } else if ( s . charAt ( i ) == '\'' ) { break ; } i ++ ; } continue ; } else if ( s . charAt ( i ) == '\"' ) { i ++ ; while ( true ) { if ( s . charAt ( i ) == '\\' ) { i ++ ; } else if ( s . charAt ( i ) == '\"' ) { break ; } i ++ ; } continue ; } String sub = s . substring ( i ) ; if ( sub . startsWith ( "/*" ) && ! sub . startsWith ( "/* c:" ) ) { int j = i ; i = s . indexOf ( "*/" , i + 2 ) + 2 ; for ( ; j < i ; j ++ ) { if ( chars [ j ] > ' ' ) { chars [ j ] = ' ' ; } } } else if ( sub . startsWith ( "//" ) && ! sub . startsWith ( "// c:" ) ) { int j = i ; i = s . indexOf ( '\n' , i ) ; while ( j < i ) { chars [ j ++ ] = ' ' ; } } } return new String ( chars ) + "  " ; }
replace all unicode escapes and remove all remarks .
