code: private void doSimpleMatching() {
          for (int i = 0; i < equalElements.size(); i++) {
              if (!alreadyMatched.get(i)) {
                  List<Integer> equalTo = equalElements.get(i);
                  if (equalTo.size() > 0) {
                      List<Integer> equivalentElements = getEquivalentElements(equalTo);
  
                      // We have the same set matching as is equivalent, we can remove them all
                      if (equalTo.size() == equivalentElements.size()) {
                          for (int j = 0; j < equivalentElements.size(); j++) {
                              recordMatch(equivalentElements.get(j), equalTo.get(j));
                          }
                      } else if (equivalentElements.size() > 1 && equalTo.size() > 1) {
                          List<Integer> equalToUsedOnlyInEquivalentElements = getEqualToUsedOnlyInEquivalentElements(equalTo, equivalentElements);
                          for (int j = 0; j < min(equivalentElements.size(), equalToUsedOnlyInEquivalentElements.size()); j++) {
                              recordMatch(equivalentElements.get(j), equalTo.get(j));
                          }
                      }
                  }
              }
          }
      }
docs: Algorithm above is not effective when we are comparing arrays with lot of matching values like [1,1,1,1,1,1] vs [8,1,1,1,1,1].
  We can make it faster if we collapse simple matching values.