<commit_before>package com.ttaylorr.uhc.pvp.util;

public class Continuation {
    Continuation next;
    public Continuation() {
        this(null);
    }

    protected Continuation(Continuation next) {
        this.next = next;
    }

    public void success() {
        if(next != null) next.success();
    }

    public void failure() {
        if(next != null) next.failure();
    }

    private static Continuation empty = new Continuation();

    public static Continuation empty() {
        return empty;
    }
}<commit_msg>Continuation can only be called a single time<commit_after>package com.ttaylorr.uhc.pvp.util;

public class Continuation {
    Continuation next;

    boolean called;

    public Continuation() {
        this(null);
    }

    protected Continuation(Continuation next) {
        this.next = next;
    }
    public void success() {
        validate();
        if(next != null) next.success();
    }

    public void failure() {
        validate();
        if(next != null) next.failure();
    }

    public void validate() {
        if(called)
            throw new IllegalStateException("Continuation has already been called");
        called = true; // Not foolproof, might not be called by subclass
    }

    protected Continuation getNext() {
        return next;
    }

    private static Continuation empty = new Continuation();

    public static Continuation empty() {
        return empty;
    }
}
{'fraction_non_alphanumeric': 0.10006949270326616, 'fraction_numerical': 0.0, 'mean_word_length': 2.3410672853828305, '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': '1369091', 'n_tokens_mistral': 401, 'n_tokens_neox': 383, 'n_words': 115}