@Override public void run() { while (true) { final long currentIndex = index.getAndIncrement(); if (currentIndex >= length) { break; } System.out.println( "\t[" + currentIndex + "/" + length + "] judging " + currentIndex + " elements"); final ClonePair currentClonePair = clonePairs.get(currentIndex); final InstantCodeFragmentInfo fragment1 = currentClonePair.getFragment1(); if (clonePairsCategorizedByPath.containsKey(fragment1.getFilePath())) { final Set<ClonePair> tmpPairs = clonePairsCategorizedByPath.get(fragment1.getFilePath()); for (final ClonePair tmpPair : tmpPairs) { if (tmpPair.equals(currentClonePair)) { continue; } if (tmpPair.subsume(currentClonePair)) { subsumedClonePairs.add(currentIndex); break; } } } } }