code: public static double getCoverage(List<MathNode> refLeafs, List<MathNode> compLeafs) {
          if (compLeafs.size() == 0) {
              return 1.;
          }
          HashMultiset<MathNode> tmp = HashMultiset.create();
          tmp.addAll(compLeafs);
          tmp.removeAll(refLeafs);
          return 1 - (double) tmp.size() / (double) compLeafs.size();
      }
docs: Calculate the coverage factor between two trees, whereas only their leafs
  are considered. Leafs are typically identifiers or constants.
  
  @param refLeafs  all leafs from the partial (or full) reference tree
  @param compLeafs all leafs from the partial (or full) comparison tree
  @return coverage factor between 0 to 1, 1 is a full-match