static int next ( String [ ] sr , int ind ) {
  if ( sr [ ind ] . equals ( "S" ) || sr [ ind ] . equals ( "F" ) ) return 1000 ;
  return Integer . parseInt ( sr [ ind ] ) ;
}

static int next ( String [ ] sr , int ind ) { if ( sr [ ind ] . equals ( " S " ) || sr [ ind ] . equals ( " F " ) ) return 1000 ; return Integer . parseInt ( sr [ ind ] ) ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (array_access array: (identifier) index: (identifier)) name: (identifier) arguments: (argument_list (string_literal))) right: (method_invocation object: (array_access array: (identifier) index: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))) consequence: (return_statement (decimal_integer_literal))) (return_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier)))))))