static String toFnOut ( String fn ) {
  if ( fn . lastIndexOf ( '.' ) != - 1 ) {
    return fn . substring ( 0 , fn . lastIndexOf ( '.' ) ) + ".out" ;
  }
  else return fn + ".out" ;
}

static String toFnOut ( String fn ) { if ( fn . lastIndexOf ( ' . ' ) != - 1 ) { return fn . substring ( 0 , fn . lastIndexOf ( ' . ' ) ) + " . out " ; } else return fn + " . out " ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (character_literal))) right: (unary_expression operand: (decimal_integer_literal)))) consequence: (block (return_statement (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (character_literal))))) right: (string_literal)))) alternative: (return_statement (binary_expression left: (identifier) right: (string_literal))))))