<commit_before>package jenkins;

import hudson.Extension;
import hudson.FilePath;
import hudson.remoting.ChannelProperty;

import java.io.File;
import java.util.Collections;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * Maintains a bundle of {@link FilePathFilter} and implement a hook that broadcasts to all the filters.
 *
 * Accessible as channel property.
 *
 * @author <NAME>
 * @see FilePath
 * @since 1.587 / 1.580.1
 */
class FilePathFilterAggregator extends FilePathFilter {
    private final CopyOnWriteArrayList<Entry> all = new CopyOnWriteArrayList<>();

    private class Entry implements Comparable<Entry> {
        final FilePathFilter filter;
        final double ordinal;

        private Entry(FilePathFilter filter, double ordinal) {
            this.filter = filter;
            this.ordinal = ordinal;
        }

        @Override
        public int compareTo(Entry that) {

            double result = Double.compare(this.ordinal, that.ordinal);

            if (result < 0) return -1;
            if (result > 0) return 1;

            // to create predictable order that doesn't depend on the insertion order, use class name
            // to break a tie
            return this.filter.getClass().getName().compareTo(that.filter.getClass().getName());
        }
    }

    public final void add(FilePathFilter f) {
        add(f, DEFAULT_ORDINAL);
    }

    /**
     *
     * @param ordinal
     *      Crude ordering control among {@link FilePathFilter} ala {@link Extension#ordinal()}.
     *      A filter with a bigger value will get precedence. Defaults to 0.
     */
    public void add(FilePathFilter f, double ordinal) {
        Entry e = new Entry(f, ordinal);
        int i = Collections.binarySearch(all, e, Collections.reverseOrder());
        if (i>=0)   all.add(i,e);
        else        all.add(-i-1,e);
    }

    public void remove(FilePathFilter f) {<commit_msg>Removed empty line<commit_after>package jenkins;

import hudson.Extension;
import hudson.FilePath;
import hudson.remoting.ChannelProperty;

import java.io.File;
import java.util.Collections;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * Maintains a bundle of {@link FilePathFilter} and implement a hook that broadcasts to all the filters.
 *
 * Accessible as channel property.
 *
 * @author <NAME>
 * @see FilePath
 * @since 1.587 / 1.580.1
 */
class FilePathFilterAggregator extends FilePathFilter {
    private final CopyOnWriteArrayList<Entry> all = new CopyOnWriteArrayList<>();

    private class Entry implements Comparable<Entry> {
        final FilePathFilter filter;
        final double ordinal;

        private Entry(FilePathFilter filter, double ordinal) {
            this.filter = filter;
            this.ordinal = ordinal;
        }

        @Override
        public int compareTo(Entry that) {
            double result = Double.compare(this.ordinal, that.ordinal);

            if (result < 0) return -1;
            if (result > 0) return 1;

            // to create predictable order that doesn't depend on the insertion order, use class name
            // to break a tie
            return this.filter.getClass().getName().compareTo(that.filter.getClass().getName());
        }
    }

    public final void add(FilePathFilter f) {
        add(f, DEFAULT_ORDINAL);
    }

    /**
     *
     * @param ordinal
     *      Crude ordering control among {@link FilePathFilter} ala {@link Extension#ordinal()}.
     *      A filter with a bigger value will get precedence. Defaults to 0.
     */
    public void add(FilePathFilter f, double ordinal) {
        Entry e = new Entry(f, ordinal);
        int i = Collections.binarySearch(all, e, Collections.reverseOrder());
        if (i>=0)   all.add(i,e);
        else        all.add(-i-1,e);
    }

    public void remove(FilePathFilter f) {
{'fraction_non_alphanumeric': 0.0979676915059927, 'fraction_numerical': 0.008337675872850442, 'mean_word_length': 2.541512915129151, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '5997182', 'n_tokens_mistral': 1097, 'n_tokens_neox': 1037, 'n_words': 332}