<commit_before><?xml version="1.0"?>

<project name="mjc" default="jar">

    <description>Compiler for the MiniJava language</description>

    <!-- Settings  -->

    <property file="build.properties"/>

    <path id="project-classpath">
        <fileset dir="${lib-dir}">
            <include name="**/*.jar"/>
        </fileset>
        <pathelement location="${main-classes-dir}"/>
        <pathelement location="${parser-classes-dir}"/>
        <pathelement location="${test-classes-dir}"/>
    </path>

    <!-- Internal Targets -->

    <target name="init">
        <mkdir dir="${parser-src-dir}"/>
        <uptodate property="parser-out-of-date" targetfile="${parser-grammar}">
            <srcfiles dir="${parser-src-dir}" includes="**/*.java"/>
        </uptodate>
    </target>

    <target name="generate-parser" if="parser-out-of-date" depends="init">
        <java jar="${lib-dir}/sablecc.jar" fork="true" failonerror="true">
            <arg value="-d"/>
            <arg value="${parser-src-dir}"/>
            <arg value="${parser-grammar}"/>
        </java>
    </target>

    <!-- Public Targets -->

    <target name="compile" description="Compile all sources" depends="generate-parser">

        <mkdir dir="${parser-classes-dir}"/>
        <javac srcdir="${parser-src-dir}"
               destdir="${parser-classes-dir}"
               classpathref="project-classpath"
               includeAntRuntime="false"
               debug="on"/>
        <copy todir="${parser-classes-dir}">
            <fileset dir="${parser-src-dir}" includes="**/*.dat"/>
        </copy>

        <mkdir dir="${main-classes-dir}"/>
        <javac srcdir="${main-src-dir}"
               destdir="${main-classes-dir}"
               classpathref="project-classpath"
               includeAntRuntime="false"
               debug="on"/>
        <copy todir="${main-classes-dir}">
            <fileset dir="${basedir}" includes="log4j.properties"/>
        </copy>

        <mkdir dir="${test-classes-dir}"/>
        <javac srcdir="${test-src-dir}"
               destdir="${test-classes-dir}"
               classpathref="project-classpath"
               includeAntRuntime="false"
               debug="on"/>
    </target>

    <target name="test" description="Run the unit tests" depends="compile">
        <mkdir dir="${test-reports-dir}"/>
        <junit printsummary="yes" haltonfailure="yes">
            <classpath refid="project-classpath"/>
            <formatter type="plain"/>
            <batchtest fork="yes" todir="${test-reports-dir}">
                <fileset dir="${test-src-dir}" includes="**/*Test.java"/>
            </batchtest>
        </junit>
    </target>

    <target name="jar" description="Build compiler JAR file" depends="test">
        <jar destfile="${output-jar}">
            <fileset dir="${main-classes-dir}"/>
            <fileset dir="${parser-classes-dir}"/>
        </jar>
    </target>

    <target name="tar" description="Build compressed source-only TAR archive" depends="test">
        <fail message="Missing property tigris.id!" unless="tigris.id"/>
        <fail message="Missing property tigris.email!" unless="tigris.email"/>

        <!-- Prepare TAR file contents in a temporary directory -->
        <tempfile property="temp-dir"
                  destDir="${java.io.tmpdir}"
                  prefix="${ant.project.name}"/>
        <mkdir dir="${temp-dir}/${ant.project.name}"/>
        <copy todir="${temp-dir}/${ant.project.name}">
            <fileset dir="${basedir}" id="tar-fileset">
                <exclude name="**/${build-dir}/**"/>
                <exclude name="${output-jar}"/>
                <exclude name="${output-tar}"/>
                <exclude name="**/*.swp"/>
            </fileset>
        </copy>
        <replace file="${temp-dir}/${ant.project.name}/DESC"
                 token="@ID@"
                 value="${tigris.id}"/>
        <replace file="${temp-dir}/${ant.project.name}/DESC"
                 token="@EMAIL@"
                 value="${tigris.email}"/>
<commit_msg>Exclude Eclipse-generated files from TAR archive.<commit_after><?xml version="1.0"?>

<project name="mjc" default="jar">

    <description>Compiler for the MiniJava language</description>

    <!-- Settings  -->

    <property file="build.properties"/>

    <path id="project-classpath">
        <fileset dir="${lib-dir}">
            <include name="**/*.jar"/>
        </fileset>
        <pathelement location="${main-classes-dir}"/>
        <pathelement location="${parser-classes-dir}"/>
        <pathelement location="${test-classes-dir}"/>
    </path>

    <!-- Internal Targets -->

    <target name="init">
        <mkdir dir="${parser-src-dir}"/>
        <uptodate property="parser-out-of-date" targetfile="${parser-grammar}">
            <srcfiles dir="${parser-src-dir}" includes="**/*.java"/>
        </uptodate>
    </target>

    <target name="generate-parser" if="parser-out-of-date" depends="init">
        <java jar="${lib-dir}/sablecc.jar" fork="true" failonerror="true">
            <arg value="-d"/>
            <arg value="${parser-src-dir}"/>
            <arg value="${parser-grammar}"/>
        </java>
    </target>

    <!-- Public Targets -->

    <target name="compile" description="Compile all sources" depends="generate-parser">

        <mkdir dir="${parser-classes-dir}"/>
        <javac srcdir="${parser-src-dir}"
               destdir="${parser-classes-dir}"
               classpathref="project-classpath"
               includeAntRuntime="false"
               debug="on"/>
        <copy todir="${parser-classes-dir}">
            <fileset dir="${parser-src-dir}" includes="**/*.dat"/>
        </copy>

        <mkdir dir="${main-classes-dir}"/>
        <javac srcdir="${main-src-dir}"
               destdir="${main-classes-dir}"
               classpathref="project-classpath"
               includeAntRuntime="false"
               debug="on"/>
        <copy todir="${main-classes-dir}">
            <fileset dir="${basedir}" includes="log4j.properties"/>
        </copy>

        <mkdir dir="${test-classes-dir}"/>
        <javac srcdir="${test-src-dir}"
               destdir="${test-classes-dir}"
               classpathref="project-classpath"
               includeAntRuntime="false"
               debug="on"/>
    </target>

    <target name="test" description="Run the unit tests" depends="compile">
        <mkdir dir="${test-reports-dir}"/>
        <junit printsummary="yes" haltonfailure="yes">
            <classpath refid="project-classpath"/>
            <formatter type="plain"/>
            <batchtest fork="yes" todir="${test-reports-dir}">
                <fileset dir="${test-src-dir}" includes="**/*Test.java"/>
            </batchtest>
        </junit>
    </target>

    <target name="jar" description="Build compiler JAR file" depends="test">
        <jar destfile="${output-jar}">
            <fileset dir="${main-classes-dir}"/>
            <fileset dir="${parser-classes-dir}"/>
        </jar>
    </target>

    <target name="tar" description="Build compressed source-only TAR archive" depends="test">
        <fail message="Missing property tigris.id!" unless="tigris.id"/>
        <fail message="Missing property tigris.email!" unless="tigris.email"/>

        <!-- Prepare TAR file contents in a temporary directory -->
        <tempfile property="temp-dir"
                  destDir="${java.io.tmpdir}"
                  prefix="${ant.project.name}"/>
        <mkdir dir="${temp-dir}/${ant.project.name}"/>
        <copy todir="${temp-dir}/${ant.project.name}">
            <fileset dir="${basedir}" id="tar-fileset">
                <exclude name="**/${build-dir}/**"/>
                <exclude name="${output-jar}"/>
                <exclude name="${output-tar}"/>
                <exclude name="**/*.classpath"/>
                <exclude name="**/*.project"/>
                <exclude name="**/*.settings"/>
                <exclude name="**/*.swp"/>
            </fileset>
        </copy>
        <replace file="${temp-dir}/${ant.project.name}/DESC"
                 token="@ID@"
                 value="${tigris.id}"/>
        <replace file="${temp-dir}/${ant.project.name}/DESC"
                 token="@EMAIL@"
                 value="${tigris.email}"/>

{'fraction_non_alphanumeric': 0.19355228205747405, 'fraction_numerical': 0.0007244626901714562, 'mean_word_length': 2.1150808574652125, 'pattern_counts': {'":': 0, '<': 156, '<?xml version=': 2, '>': 156, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1390291', 'n_tokens_mistral': 2377, 'n_tokens_neox': 2283, 'n_words': 405}