public static void countMatches(double minIDF, double minTFIDF) {

        allDocPairs.clear();
        Iterator it2 = dictionaryMap.entrySet().iterator();
        while (it2.hasNext()) {
            Map.Entry termEntry = (Map.Entry) it2.next();
            String token = (String) termEntry.getKey();
            ArrayList<String[]> postingsList = (ArrayList) termEntry.getValue();
            for (int i = 0; i < postingsList.size() - 1; i++) {
                for (int j = i + 1; j < postingsList.size(); j++) {

                    String combinedName = postingsList.get(i)[DOC_NAME] + "_" + postingsList.get(j)[DOC_NAME];
                    String alternateName = postingsList.get(j)[DOC_NAME] + "_" + postingsList.get(i)[DOC_NAME];
                    Double[] currentIDFArray = (Double[]) inverseDocFreqMap.get(token);

                    if (((Double.parseDouble(postingsList.get(i)[TFIDF_WEIGHT])) >= minTFIDF
                            || (Double.parseDouble(postingsList.get(j)[TFIDF_WEIGHT])) >= minTFIDF)
                            && currentIDFArray[IDF] >= minIDF) {

                        if (allDocPairs.containsKey(combinedName)) {
                            int count = allDocPairs.get(combinedName);
                            count++;
                            allDocPairs.put(combinedName, count);
                        } else if (allDocPairs.containsKey(alternateName)) {
                            int count = allDocPairs.get(alternateName);
                            count++;
                            allDocPairs.put(alternateName, count);
                        } else {
                            allDocPairs.put(combinedName, 1);
                        }
                    }
                }
            }
        }
    }