<commit_before>package com.hartwig.healthchecks.nesbit.extractor;

import com.hartwig.healthchecks.nesbit.model.VCFType;

import org.jetbrains.annotations.NotNull;

final class VCFExtractorFunctions {

    private static final int ALT_INDEX = 4;
    private static final int REF_INDEX = 3;
    private static final String MULTIPLE_ALTS_IDENTIFIER = ",";

    private VCFExtractorFunctions() {
    }

    @NotNull
    static VCFType getVCFType(@NotNull final String[] values) {
        final String refValue = values[REF_INDEX];
        final String altValue = values[ALT_INDEX];

        final String[] allAlts = altValue.split(MULTIPLE_ALTS_IDENTIFIER);

        VCFType type = VCFType.SNP;
        for (String alt : allAlts) {
            if (refValue.length() != alt.length()) {
                type = VCFType.INDELS;
            }
        }
        return type;
    }
}<commit_msg>Updated vcf type determination to match Peter's definition<commit_after>package com.hartwig.healthchecks.nesbit.extractor;

import com.hartwig.healthchecks.nesbit.model.VCFType;

import org.jetbrains.annotations.NotNull;

final class VCFExtractorFunctions {

    private static final int ALT_INDEX = 4;
    private static final int REF_INDEX = 3;
    private static final String MULTIPLE_ALTS_IDENTIFIER = ",";

    private VCFExtractorFunctions() {
    }

    @NotNull
    static VCFType getVCFType(@NotNull final String[] values) {
        final String refValue = values[REF_INDEX];
        final String altValue = values[ALT_INDEX];

        final String[] allAlts = altValue.split(MULTIPLE_ALTS_IDENTIFIER);

        return allAlts[0].length() != refValue.length() ? VCFType.INDELS : VCFType.SNP;

        //        VCFType type = VCFType.SNP;
        //
        //        for (String alt : allAlts) {
        //            if (refValue.length() != alt.length()) {
        //                type = VCFType.INDELS;
        //            }
        //        }
        //        return type;
    }
}
{'fraction_non_alphanumeric': 0.09672544080604534, 'fraction_numerical': 0.0025188916876574307, 'mean_word_length': 2.43598615916955, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6126790', 'n_tokens_mistral': 624, 'n_tokens_neox': 585, 'n_words': 134}