code: @Override
    public double similarity(VariantCall call1, VariantCall call2) {
      int minNumberOfGenotypes = Math.min(call1.getGenotypeCount(), call2.getGenotypeCount());
      int numberOfSharedAlleles = 0;
      for (int i = 0; i < minNumberOfGenotypes; ++i) {
        if (call1.getGenotype(i) == call2.getGenotype(i)) {
          ++numberOfSharedAlleles;
        }
      }
      int maxNumberOfGenotypes = Math.max(call1.getGenotypeCount(), call2.getGenotypeCount());
      return (double) numberOfSharedAlleles / maxNumberOfGenotypes;
    }
docs: scores when the number of alleles is different than 2 and when the genotypes are unphased.