static void setCost ( long total , int idx ) {
  if ( costs [ idx ] == - 1 ) {
    costs [ idx ] = total ;
    for ( Route r : lists [ idx ] ) {
      setCost ( total + r . cost , r . point ) ;
    }
  }
}

static void setCost ( long total , int idx ) { if ( costs [ idx ] == - 1 ) { costs [ idx ] = total ; for ( Route r : lists [ idx ] ) { setCost ( total + r . cost , r . point ) ; } } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (unary_expression operand: (decimal_integer_literal)))) consequence: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier))) (enhanced_for_statement type: (type_identifier) name: (identifier) value: (array_access array: (identifier) index: (identifier)) body: (block (expression_statement (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))) (field_access object: (identifier) field: (identifier)))))))))))