code: public static CompilationUnit parse(String code, boolean withoutLocation) throws ParseException {
  
          ASTParser astParser = null;
          StringReader sr = new StringReader(code);
  
          if (!withoutLocation) {
              astParser = new ASTParser(sr);
              astParser.jj_input_stream.setTabSize(1);
          } else {
              JavaCharStream stream = new JavaCharStream(sr, 1, 1);
              CleanerTokenManager ctm = new CleanerTokenManager(stream);
              astParser = new ASTParser(ctm);
          }
  
          CompilationUnit cu = null;
          try {
              cu = astParser.CompilationUnit();
          } finally {
              sr.close();
          }
          return cu;
      }
docs: Parses Java code and store the AST into a
  {@link org.walkmod.javalang.ast.CompilationUnit} object with or without
  the nodes start & end locations (line numbers and columns).
  
  @param code
  source code to parse.
  @param withoutLocation
  true does not fulfill the location information inside the AST.
  Otherwise, it is defined.
  @return the abstract syntax tree (AST).
  @throws ParseException
  when the code contains an invalid syntax.