code: private static void addHeterozygousGenotypes(Variant variant, int numAllele, String[] alternateAlleles, VariantStats stats, String[] hetCounts) {
  
          if (hetCounts.length == alternateAlleles.length * (alternateAlleles.length + 1) / 2) {
              for (int i = 0; i < hetCounts.length; i++) {
                  Integer alleles[] = new Integer[2];
                  getHeterozygousGenotype(i, alternateAlleles.length, alleles);
                  String gt = VariantVcfFactory.mapToMultiallelicIndex(alleles[0], numAllele) + "/" + VariantVcfFactory.mapToMultiallelicIndex(alleles[1], numAllele);
                  Genotype genotype = new Genotype(gt, variant.getReference(), alternateAlleles[numAllele]);
                  stats.addGenotype(genotype, Integer.parseInt(hetCounts[i]));
              }
          }
      }
docs: Adds the heterozygous genotypes to a variant stats. Those are (in this order):
  0/1, 0/2, 0/3, 0/4... 1/2, 1/3, 1/4... 2/3, 2/4... 3/4...
  for a given amount n of alleles, the number of combinations is (latex): \sum_{i=1}^n( \sum_{j=i}^n( 1 ) ), which resolved is n*(n+1)/2
  @param variant to retrieve the alleles to construct the genotype
  @param numAllele
  @param alternateAlleles
  @param stats where to add the genotypes count
  @param hetCounts parsed string