<commit_before>package com.palantir.semver;

import java.io.IOException;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.eclipse.jgit.errors.IncorrectObjectTypeException;
import org.eclipse.jgit.errors.MissingObjectException;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevSort;
import org.eclipse.jgit.revwalk.RevWalk;

public class Tags {

    private Tags() {
        // prevents instantiation
    }

    public static TagVersionAndCount getLatestTagVersionAndCount(Repository repo, String prefix)
            throws MissingObjectException, IncorrectObjectTypeException, IOException {
        TagAndVersion latestTag = getLatestTag(repo, prefix);
        if (latestTag == null) {<commit_msg>Add missing includes<commit_after>package com.palantir.semver;

import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.eclipse.jgit.errors.IncorrectObjectTypeException;
import org.eclipse.jgit.errors.MissingObjectException;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevSort;
import org.eclipse.jgit.revwalk.RevWalk;

public class Tags {

    private Tags() {
        // prevents instantiation
    }

    public static TagVersionAndCount getLatestTagVersionAndCount(Repository repo, String prefix)
            throws MissingObjectException, IncorrectObjectTypeException, IOException {
        TagAndVersion latestTag = getLatestTag(repo, prefix);
        if (latestTag == null) {
{'fraction_non_alphanumeric': 0.09447599380485286, 'fraction_numerical': 0.0, 'mean_word_length': 4.683284457478006, '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': '2224676', 'n_tokens_mistral': 581, 'n_tokens_neox': 579, 'n_words': 118}