<commit_before><?xml version="1.0" encoding="UTF-8"?>
<project name="phpunit" default="setup">
    <target name="setup" depends="clean,install-dependencies"/>
    <target name="validate" depends="php-syntax-check,validate-composer-json,validate-phpunit-xsd"/>

    <target name="clean" unless="clean.done" description="Cleanup build artifacts">
        <delete dir="${basedir}/bin"/>
        <delete dir="${basedir}/vendor"/>
        <delete file="${basedir}/composer.lock"/>
        <delete dir="${basedir}/build/phar"/>
        <delete>
            <fileset dir="${basedir}/build">
                <include name="**/*.phar"/>
                <include name="**/*.phar.asc"/>
            </fileset>
        </delete>

        <property name="clean.done" value="true"/>
    </target>

    <target name="validate-composer-json" unless="validate-composer-json.done" description="Validate composer.json">
        <exec executable="${basedir}/build/tools/composer" failonerror="true" taskname="composer">
            <env key="COMPOSER_DISABLE_XDEBUG_WARN" value="1"/>
            <arg value="validate"/>
            <arg value="--no-check-lock"/>
            <arg value="--strict"/>
            <arg value="${basedir}/composer.json"/>
        </exec>

        <property name="validate-composer-json.done" value="true"/>
    </target>

    <target name="-dependencies-installed">
        <available file="${basedir}/composer.lock" property="dependencies-installed"/>
    </target>

    <target name="install-dependencies" unless="dependencies-installed" depends="-dependencies-installed,validate-composer-json" description="Install dependencies with Composer">
        <exec executable="${basedir}/build/tools/composer" taskname="composer">
            <env key="COMPOSER_DISABLE_XDEBUG_WARN" value="1"/>
            <arg value="install"/>
        </exec>
    </target>

    <target name="php-syntax-check" unless="php-syntax-check.done" description="Perform syntax check on PHP files">
        <apply executable="php" failonerror="true" taskname="lint">
            <arg value="-l"/>

            <fileset dir="${basedir}/src">
                <include name="**/*.php"/>
                <modified/>
            </fileset>

            <fileset dir="${basedir}/tests">
                <include name="**/*.php"/>
                <modified/>
            </fileset>
        </apply>

        <property name="php-syntax-check.done" value="true"/>
    </target>

    <target name="validate-phpunit-xsd" unless="validate-phpunit-xsd.done" description="Validate phpunit.xsd">
        <exec executable="xmllint" failonerror="true" taskname="xmllint">
            <arg value="--noout"/>
            <arg path="${basedir}/phpunit.xsd"/>
        </exec>

        <property name="validate-phpunit-xsd.done" value="true"/>
    </target>

    <target name="test" depends="validate,install-dependencies" description="Run tests">
        <exec executable="${basedir}/phpunit" taskname="phpunit"/>
    </target>

    <target name="signed-phar" depends="phar" description="Create signed PHAR archive of PHPUnit and all its dependencies">
        <exec executable="gpg" failonerror="true">
            <arg value="--armor"/>
            <arg value="--detach-sign"/>
            <arg path="${basedir}/build/phpunit-library-${version}.phar"/>
        </exec>

        <exec executable="gpg" failonerror="true">
            <arg value="--armor"/>
            <arg value="--detach-sign"/>
            <arg path="${basedir}/build/phpunit-${version}.phar"/>
        </exec>
    </target>

    <target name="phar" depends="-phar-determine-version,-phar-prepare" description="Create PHAR archive of PHPUnit and all its dependencies">
        <antcall target="-phar-build">
            <param name="type" value="release"/>
        </antcall>
    </target>

    <target name="phar-nightly" depends="-phar-prepare" description="Create PHAR archive of PHPUnit and all its dependencies (nightly)">
        <antcall target="-phar-build">
            <param name="type" value="nightly"/>
        </antcall>
    </target>

    <target name="-phar-prepare" depends="clean,install-dependencies">
        <mkdir dir="${basedir}/build/phar"/>
        <copy file="${basedir}/composer.json" tofile="${basedir}/composer.json.bak"/>

        <exec executable="php">
            <arg value="composer.phar"/>
            <arg value="require"/>
            <arg value="phpunit/dbunit:~1.4"/>
            <arg value="phpunit/phpunit-selenium:~1.4"/>
            <arg value="phpunit/php-invoker:~1.1"/>
        </exec>

        <move file="${basedir}/composer.json.bak" tofile="${basedir}/composer.json"/>

        <exec executable="${basedir}/build/phar-manifest.php" output="${basedir}/build/phar/manifest.txt"/>
        <copy todir="${basedir}/build/phar" file="${basedir}/build/ca.pem"/>

        <copy file="${basedir}/vendor/phpunit/php-code-coverage/LICENSE"
              tofile="${basedir}/build/phar/php-code-coverage/LICENSE"/>
        <copy todir="${basedir}/build/phar/php-code-coverage">
            <fileset dir="${basedir}/vendor/phpunit/php-code-coverage/src">
                <include name="**/*"/><commit_msg>Leftover from 477f77eb841cd7c8ff27351d8d57e72e7df26d23<commit_after><?xml version="1.0" encoding="UTF-8"?>
<project name="phpunit" default="setup">
    <target name="setup" depends="clean,install-dependencies"/>
    <target name="validate" depends="php-syntax-check,validate-composer-json,validate-phpunit-xsd"/>

    <target name="clean" unless="clean.done" description="Cleanup build artifacts">
        <delete dir="${basedir}/bin"/>
        <delete dir="${basedir}/vendor"/>
        <delete file="${basedir}/composer.lock"/>
        <delete dir="${basedir}/build/phar"/>
        <delete>
            <fileset dir="${basedir}/build">
                <include name="**/*.phar"/>
                <include name="**/*.phar.asc"/>
            </fileset>
        </delete>

        <property name="clean.done" value="true"/>
    </target>

    <target name="validate-composer-json" unless="validate-composer-json.done" description="Validate composer.json">
        <exec executable="${basedir}/build/tools/composer" failonerror="true" taskname="composer">
            <env key="COMPOSER_DISABLE_XDEBUG_WARN" value="1"/>
            <arg value="validate"/>
            <arg value="--no-check-lock"/>
            <arg value="--strict"/>
            <arg value="${basedir}/composer.json"/>
        </exec>

        <property name="validate-composer-json.done" value="true"/>
    </target>

    <target name="-dependencies-installed">
        <available file="${basedir}/composer.lock" property="dependencies-installed"/>
    </target>

    <target name="install-dependencies" unless="dependencies-installed" depends="-dependencies-installed,validate-composer-json" description="Install dependencies with Composer">
        <exec executable="${basedir}/build/tools/composer" taskname="composer">
            <env key="COMPOSER_DISABLE_XDEBUG_WARN" value="1"/>
            <arg value="install"/>
        </exec>
    </target>

    <target name="php-syntax-check" unless="php-syntax-check.done" description="Perform syntax check on PHP files">
        <apply executable="php" failonerror="true" taskname="lint">
            <arg value="-l"/>

            <fileset dir="${basedir}/src">
                <include name="**/*.php"/>
                <modified/>
            </fileset>

            <fileset dir="${basedir}/tests">
                <include name="**/*.php"/>
                <modified/>
            </fileset>
        </apply>

        <property name="php-syntax-check.done" value="true"/>
    </target>

    <target name="validate-phpunit-xsd" unless="validate-phpunit-xsd.done" description="Validate phpunit.xsd">
        <exec executable="xmllint" failonerror="true" taskname="xmllint">
            <arg value="--noout"/>
            <arg path="${basedir}/phpunit.xsd"/>
        </exec>

        <property name="validate-phpunit-xsd.done" value="true"/>
    </target>

    <target name="test" depends="validate,install-dependencies" description="Run tests">
        <exec executable="${basedir}/phpunit" taskname="phpunit"/>
    </target>

    <target name="signed-phar" depends="phar" description="Create signed PHAR archive of PHPUnit and all its dependencies">
        <exec executable="gpg" failonerror="true">
            <arg value="--armor"/>
            <arg value="--detach-sign"/>
            <arg path="${basedir}/build/phpunit-library-${version}.phar"/>
        </exec>

        <exec executable="gpg" failonerror="true">
            <arg value="--armor"/>
            <arg value="--detach-sign"/>
            <arg path="${basedir}/build/phpunit-${version}.phar"/>
        </exec>
    </target>

    <target name="phar" depends="-phar-determine-version,-phar-prepare" description="Create PHAR archive of PHPUnit and all its dependencies">
        <antcall target="-phar-build">
            <param name="type" value="release"/>
        </antcall>
    </target>

    <target name="phar-nightly" depends="-phar-prepare" description="Create PHAR archive of PHPUnit and all its dependencies (nightly)">
        <antcall target="-phar-build">
            <param name="type" value="nightly"/>
        </antcall>
    </target>

    <target name="-phar-prepare" depends="clean,install-dependencies">
        <mkdir dir="${basedir}/build/phar"/>
        <copy file="${basedir}/composer.json" tofile="${basedir}/composer.json.bak"/>

        <exec executable="${basedir}/build/tools/composer">
            <arg value="require"/>
            <arg value="phpunit/dbunit:~1.4"/>
            <arg value="phpunit/phpunit-selenium:~1.4"/>
            <arg value="phpunit/php-invoker:~1.1"/>
        </exec>

        <move file="${basedir}/composer.json.bak" tofile="${basedir}/composer.json"/>

        <exec executable="${basedir}/build/phar-manifest.php" output="${basedir}/build/phar/manifest.txt"/>
        <copy todir="${basedir}/build/phar" file="${basedir}/build/ca.pem"/>

        <copy file="${basedir}/vendor/phpunit/php-code-coverage/LICENSE"
              tofile="${basedir}/build/phar/php-code-coverage/LICENSE"/>
        <copy todir="${basedir}/build/phar/php-code-coverage">
            <fileset dir="${basedir}/vendor/phpunit/php-code-coverage/src">
                <include name="**/*"/>
{'fraction_non_alphanumeric': 0.18047793409134708, 'fraction_numerical': 0.004528810946232415, 'mean_word_length': 2.706785714285714, 'pattern_counts': {'":': 0, '<': 200, '<?xml version=': 2, '>': 200, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '2512570', 'n_tokens_mistral': 3098, 'n_tokens_neox': 2956, 'n_words': 517}