<commit_before>package atg.tools.ant.types;

import org.apache.tools.ant.types.DataType;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.Reference;
import org.apache.tools.ant.types.Resource;
import org.apache.tools.ant.types.ResourceCollection;

import java.util.Iterator;

/**
 * @author msicker
 * @version 2.0
 */
public class ClassPath
        extends DataType
        implements ResourceCollection, Iterable<Resource> {
    // implements Iterable for convenience due to old versions of ant

    private AtgInstallation atgInstallation;

    private ModuleCollection modules;

    private Path path;

    public void setAtg(final AtgInstallation atgInstallation) {
        this.atgInstallation = atgInstallation;
    }

    public void setAtg(final Reference reference) {
        setAtg((AtgInstallation) reference.getReferencedObject());
    }

    public ModuleCollection createModules() {
        modules = new ModuleCollection();
        if (atgInstallation != null) {
            modules.setAtg(atgInstallation);
        }
        return modules;
    }

    private Path getPath() {
        if (path == null) {
            path = new Path(getProject());
            final ModuleCollection deps = modules.getDependencies();
            for (Resource dep : deps) {
                path.add(((Module) dep).getLocalClassPath());
            }
        }
        return path;
    }

    @Override
    public Iterator<Resource> iterator() {
        return getPath().iterator();
    }

    @Override
    public int size() {
        return getPath().size();
    }

    @Override
    public boolean isFilesystemOnly() {
        return getPath().isFilesystemOnly();
    }
}
<commit_msg>Fix warning in ClassPath task for old ant.<commit_after>package atg.tools.ant.types;

import org.apache.tools.ant.types.DataType;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.Reference;
import org.apache.tools.ant.types.Resource;
import org.apache.tools.ant.types.ResourceCollection;

import java.util.Iterator;

/**
 * @author msicker
 * @version 2.0
 */
public class ClassPath
        extends DataType
        implements ResourceCollection, Iterable<Resource> {
    // implements Iterable for convenience due to old versions of ant

    private AtgInstallation atgInstallation;

    private ModuleCollection modules;

    private Path path;

    public void setAtg(final AtgInstallation atgInstallation) {
        this.atgInstallation = atgInstallation;
    }

    public void setAtg(final Reference reference) {
        setAtg((AtgInstallation) reference.getReferencedObject());
    }

    public ModuleCollection createModules() {
        modules = new ModuleCollection();
        if (atgInstallation != null) {
            modules.setAtg(atgInstallation);
        }
        return modules;
    }

    private Path getPath() {
        if (path == null) {
            path = new Path(getProject());
            final ModuleCollection deps = modules.getDependencies();
            for (Resource dep : deps) {
                path.add(((Module) dep).getLocalClassPath());
            }
        }
        return path;
    }

    @Override
    public Iterator<Resource> iterator() {
        // yay old ant
        @SuppressWarnings("unchecked")
        final Iterator<Resource> iterator = getPath().iterator();
        return iterator;
    }

    @Override
    public int size() {
        return getPath().size();
    }

    @Override
    public boolean isFilesystemOnly() {
        return getPath().isFilesystemOnly();
    }
}

{'fraction_non_alphanumeric': 0.0992430613961312, 'fraction_numerical': 0.00112139052425007, 'mean_word_length': 2.5787362086258776, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '4885171', 'n_tokens_mistral': 985, 'n_tokens_neox': 966, 'n_words': 235}