public static String nextToken ( ) {
  while ( st == null || ! st . hasMoreTokens ( ) ) {
    try {
      if ( ! br . ready ( ) ) {
        pw . close ( ) ;
        System . exit ( 0 ) ;
      }
      st = new StringTokenizer ( br . readLine ( ) ) ;
    }
    catch ( IOException e ) {
      System . err . println ( e ) ;
      System . exit ( 1 ) ;
    }
  }
  return st . nextToken ( ) ;
}

public static String nextToken ( ) { while ( st == null || ! st . hasMoreTokens ( ) ) { try { if ( ! br . ready ( ) ) { pw . close ( ) ; System . exit ( 0 ) ; } st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { System . err . println ( e ) ; System . exit ( 1 ) ; } } return st . nextToken ( ) ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters) body: (block (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (null_literal)) right: (unary_expression operand: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))) body: (block (try_statement body: (block (if_statement condition: (parenthesized_expression (unary_expression operand: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (object_creation_expression type: (type_identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))))) (catch_clause (catch_formal_parameter (catch_type (type_identifier)) name: (identifier)) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))))))))) (return_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))