<commit_before>package com.campmongoose.serversaturday.common.submission;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public abstract class AbstractSubmitter<B extends AbstractBuild, I, L> {

    protected final Map<String, B> builds = new HashMap<>();
    @Nonnull
    protected final String name;
    @Nonnull
    protected final UUID uuid;

    protected AbstractSubmitter(@Nonnull String name, @Nonnull UUID uuid) {
        this.name = name;
        this.uuid = uuid;
    }

    @Nullable
    public B getBuild(@Nonnull String name) {
        return builds.get(name);
    }

    @Nonnull
    public List<B> getBuilds() {
        return new ArrayList<>(builds.values());
    }

    @Nonnull
    public abstract I getMenuRepresentation();

    @Nonnull
    public String getName() {
        return name;
    }

    @Nonnull
    public UUID getUUID() {
        return uuid;
    }

    @Nonnull
    public abstract B newBuild(@Nonnull String name, @Nonnull L location);

    public boolean removeBuild(@Nonnull String name) {
        return builds.remove(name) != null;
    }

    public abstract void save(@Nonnull File file);
}
<commit_msg>Fix an issue with updating builds.<commit_after>package com.campmongoose.serversaturday.common.submission;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public abstract class AbstractSubmitter<B extends AbstractBuild, I, L> {

    protected final Map<String, B> builds = new HashMap<>();
    @Nonnull
    protected final String name;
    @Nonnull
    protected final UUID uuid;

    protected AbstractSubmitter(@Nonnull String name, @Nonnull UUID uuid) {
        this.name = name;
        this.uuid = uuid;
    }

    @Nullable
    public B getBuild(@Nonnull String name) {
        return builds.get(name);
    }

    @Nonnull
    public List<B> getBuilds() {
        return new ArrayList<>(builds.values());
    }

    @Nonnull
    public abstract I getMenuRepresentation();

    @Nonnull
    public String getName() {
        return name;
    }

    @Nonnull
    public UUID getUUID() {
        return uuid;
    }

    @Nonnull
    public abstract B newBuild(@Nonnull String name, @Nonnull L location);

    public boolean removeBuild(@Nonnull String name) {
        return builds.remove(name) != null;
    }

    public void renameBuild(String newName, B build) {
        builds.remove(build.getName());
        build.setName(newName);
        builds.put(newName, build);
    }

    public abstract void save(@Nonnull File file);
}

{'fraction_non_alphanumeric': 0.09818569903948772, 'fraction_numerical': 0.0, 'mean_word_length': 2.9830028328611897, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '1122379', 'n_tokens_mistral': 821, 'n_tokens_neox': 820, 'n_words': 235}