boolean (DfaVariableValue val1, DfaVariableValue val2) { DfaVariableValue var1 = getCanonicalVariable(val1); DfaVariableValue var2 = getCanonicalVariable(val2); int c1Index = getOrCreateEqClassIndex(val1); int c2Index = getOrCreateEqClassIndex(val2); if (c1Index == c2Index) return true; if (!myDistinctClasses.unite(c1Index, c2Index)) return false; EqClass c1 = myEqClasses.get(c1Index); EqClass c2 = myEqClasses.get(c2Index); EqClass newClass = new EqClass(c1); myEqClasses.set(c1Index, newClass); for (int i = 0; i < c2.size(); i++) { int c = c2.get(i); newClass.add(c); myIdToEqClassesIndices.put(c, c1Index); } myEqClasses.set(c2Index, null); checkInvariants(); if (var1 == null || var2 == null || var1 == var2) return true; int compare = EqClass.CANONICAL_VARIABLE_COMPARATOR.compare(var1, var2); return compare < 0 ? convertQualifiers(var2, var1) : convertQualifiers(var1, var2); }