private static String next ( ) throws IOException {
  String read ;
  while ( ! tokenizer . hasMoreTokens ( ) ) {
    read = reader . readLine ( ) ;
    if ( read == null || read . equals ( "" ) ) return "-1" ;
    tokenizer = new StringTokenizer ( read ) ;
  }
  return tokenizer . nextToken ( ) ;
}

private static String next ( ) throws IOException { String read ; while ( ! tokenizer . hasMoreTokens ( ) ) { read = reader . readLine ( ) ; if ( read == null || read . equals ( " " ) ) return " - 1" ; tokenizer = new StringTokenizer ( read ) ; } return tokenizer . nextToken ( ) ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier))) (while_statement condition: (parenthesized_expression (unary_expression operand: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) body: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (null_literal)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))))) consequence: (return_statement (string_literal))) (expression_statement (assignment_expression left: (identifier) right: (object_creation_expression type: (type_identifier) arguments: (argument_list (identifier))))))) (return_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))