code: public void printBigrams(PrintWriter output, 
                               SignificanceTest test, int minOccurrencePerToken) {
          
          String[] indexToToken = new String[tokenCounts.size()];
          for (Map.Entry<String,TokenStats> e : tokenCounts.entrySet()) 
              indexToToken[e.getValue().index] = e.getKey().toString();
  
          LOGGER.info("Number of bigrams: " + bigramCounts.size());
          
          for (Map.Entry<Long,Number> e : bigramCounts.entrySet()) {
              
              long bigram = e.getKey().longValue();
              int firstTokenIndex = (int)(bigram >>> 32);
              int secondTokenIndex = (int)(bigram & 0xFFFFFFFFL);
              int bigramCount = e.getValue().intValue();
  
              // Skip processing any bigram whose tokens occur less than the
              // minimum required
              TokenStats t1 = tokenCounts.get(indexToToken[firstTokenIndex]);
              TokenStats t2 = tokenCounts.get(indexToToken[secondTokenIndex]);
              
              //System.err.printf("t1: %s, t2: %s%n", t1, t2);
  
              if (t1.count < minOccurrencePerToken 
                      || t2.count < minOccurrencePerToken)
                  continue;
  
              int[] contingencyTable = getContingencyTable(t1, t2, bigramCount);
              double score = getScore(contingencyTable, test);
              
              output.println(score + " " + indexToToken[firstTokenIndex]
                             + " " + indexToToken[secondTokenIndex]);
          }
      }
docs: Prints all of the known bigrams, where each token in the
  bigram must occur at least the number of specified time.
  
  @param output the writer where all the bigrams should be printed
  @param test the significant test to use in rating the statistical
  correlation of two tokens
  @param minOccurrencePerToken the minimum number of times each token in a
  bigram must occur for the bigram's score to be reported