static void unionSet ( int i , int j ) {
  if ( ! isSameSet ( i , j ) ) {
    sets -- ;
    int x = findSet ( i ) ;
    int y = findSet ( j ) ;
    if ( rank [ x ] > rank [ y ] ) p [ y ] = x ;
    else {
      p [ x ] = y ;
      if ( rank [ x ] == rank [ y ] ) rank [ y ] ++ ;
    }
  }
}

static void unionSet ( int i , int j ) { if ( ! isSameSet ( i , j ) ) { sets -- ; int x = findSet ( i ) ; int y = findSet ( j ) ; if ( rank [ x ] > rank [ y ] ) p [ y ] = x ; else { p [ x ] = y ; if ( rank [ x ] == rank [ y ] ) rank [ y ] ++ ; } } }
(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 (unary_expression operand: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))) consequence: (block (expression_statement (update_expression (identifier))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier)))) consequence: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier))) alternative: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier)))) consequence: (expression_statement (update_expression (array_access array: (identifier) index: (identifier)))))))))))