code: private long getFrequentItemsets(PrintStream out, List<ItemSet> list, int[] itemset, int size, Node node) {
          ItemSet set = new ItemSet(itemset, node.support);
          if (out != null) {
              out.println(set);
          }
  
          if (list != null) {
              list.add(set);
          }
  
          long n = 1;
          if (node.children != null) {
              for (int i = 0; i < size; i++) {
                  Node child = node.children[i];
                  if (child != null && child.support >= minSupport) {
                      int[] newItemset = FPGrowth.insert(itemset, child.id);
                      n += getFrequentItemsets(out, list, newItemset, i, child);
                  }
              }
          }
  
          return n;
      }
docs: Returns the set of frequent item sets.
  @param out a print stream for output of frequent item sets.
  @param list a container to store frequent item sets on output.
  @param node the path from root to this node matches the given item set.
  @param itemset the frequent item set generated so far.
  @param size the length/size of the current array level in the T-tree.
  @return the number of discovered frequent item sets