code: private void associate( int a, int b, int[] labels ) {
  
          if (a > b) {
              associate(b, a, labels);
              return;
          }
          if ((a == b) || (labels[b] == a))
              return;
          if (labels[b] == b) {
              labels[b] = a;
          } else {
              associate(labels[b], a, labels);
              if (labels[b] > a) { // ***rbf new
                  labels[b] = a;
              }
          }
      }
docs: Associate(equivalence) a with b.
  a should be less than b to give some ordering (sorting)
  if b is already associated with some other value, then propagate
  down the list.
  @param labels