<commit_before><?xml version="1.0" encoding="UTF-8"?>
<project name="mreg" basedir="." default="buildAll">
    <property name="APP_NAME" value="Mobilizr"/>
    <property name="APP_ROOT" value="${project.basedir}"/>
    <property name="SRC_DIR" value="${APP_ROOT}/src"/>
    <property name="TEST_DIR" value="${APP_ROOT}/tests"/>
    <property name="BUILD_DIR" value="${APP_ROOT}/build"/>
    <property name="CODE_STANDARD" value="PSR2"/>

    <fileset dir="${SRC_DIR}" id="filesetSource">
        <include name="**/*.php"/>
    </fileset>

    <fileset dir="${TEST_DIR}" id="filesetTests">
        <include name="**/*.php"/>
    </fileset>

    <target name="help">
        <echo msg="${APP_NAME} automated build file"/>
        <echo msg="======================================="/>
        <echo msg="test         run unittests"/>
        <echo msg="sniff        run php code sniffer"/>
        <echo msg="phpcpd       run php copy detector"/>
        <echo msg="phpmd        run php mess detector"/>
        <echo msg="pdepend      run php depend"/>
        <echo msg="document     generate api documentation"/>
    </target>

    <target name="buildAll" depends="test,sniff,phpcpd,phpmd,pdepend,document">
    </target>

    <target name="test" depends="install,createBuildDir">
        <exec
            command="phpunit --coverage-html ${BUILD_DIR}/test-coverage --coverage-text=${BUILD_DIR}/test-coverage.txt"
            dir="${TEST_DIR}"
            checkreturn="true"
            passthru="true"
            />
    </target>

    <target name="sniff" depends="createBuildDir">
        <phpcodesniffer
            standard="${CODE_STANDARD}"
            showWarnings="true"
            encoding="utf8"
            haltonerror="true"
            haltonwarning="false"
            docGenerator="HTML"
            docFile="${BUILD_DIR}/phpcs/rules.html"
            >
            <fileset refid="filesetSource"/>
            <fileset refid="filesetTests"/>
            <formatter type="full" outfile="${BUILD_DIR}/phpcs/sniff.txt"/>
            <formatter type="summary" usefile="false"/>
        </phpcodesniffer>
    </target>

    <target name="phpcpd" depends="createBuildDir">
        <phpcpd>
            <fileset refid="filesetSource"/>
            <fileset refid="filesetTests"/>
            <formatter type="default" outfile="${BUILD_DIR}/phpcpd.txt"/>
       </phpcpd>
    </target>

    <target name="phpmd" depends="createBuildDir">
        <phpmd>
            <fileset refid="filesetSource"/>
            <fileset refid="filesetTests"/>
            <formatter type="html" outfile="${BUILD_DIR}/phpmd.html"/>
        </phpmd>
    </target>

    <target name="pdepend" depends="createBuildDir">
        <phpdepend>
            <fileset refid="filesetSource"/>
            <logger type="jdepend-chart" outfile="${BUILD_DIR}/pdepend/jdepend.svg"/>
            <logger type="overview-pyramid" outfile="${BUILD_DIR}/pdepend/pyramid.svg"/>
            <logger type="summary-xml" outfile="${BUILD_DIR}/pdepend/summary.xml"/>
        </phpdepend>
    </target>

    <target name="document" depends="createBuildDir">
        <exec
            command="phpdoc --title ${APP_NAME} -d ${SRC_DIR} -t ${BUILD_DIR}/apidocs"
            dir="${APP_ROOT}"
            passthru="true"
            />
        <exec
            command="chmod -R 777 apidocs"
            dir="${BUILD_DIR}"
            />
    </target>

    <target name="createBuildDir">
        <mkdir dir="${BUILD_DIR}"/>
        <mkdir dir="${BUILD_DIR}/phpcs"/>
        <mkdir dir="${BUILD_DIR}/pdepend"/>
    </target>

    <target name="update" depends="install">
        <echo msg="Updating composer.phar..."/>
        <exec
            command="php composer.phar self-update"
            dir="${APP_ROOT}"
            checkreturn="true"
            />
        <echo msg="Updating dependencies using composer..."/>
        <exec
            command="php composer.phar update"
            dir="${APP_ROOT}"
            checkreturn="true"
            />
    </target>

    <target name="install" depends="getcomposer">
        <if>
            <available file="${APP_ROOT}/vendor"/>
            <then>
                <echo msg="Dependencies installed in vendor directory"/>
            </then>
            <else>
                <echo msg="Downloading dependencies using composer..."/>
                <exec
                    command="php composer.phar install --dev"
                    dir="${APP_ROOT}"
                    checkreturn="true"
                    />
            </else>
        </if>
    </target>

    <target name="getcomposer">
        <if>
            <available file="${APP_ROOT}/composer.phar"/>
            <then>
                <echo msg="Composer.phar installed"/>
            </then>
            <else>
                <echo msg="Downloading composer.phar..."/>
                <exec
                    command="curl -s http://getcomposer.org/installer | php"
                    dir="${APP_ROOT}"
                    checkreturn="true"
                    />
            </else>
        </if>
    </target>

</project>
<commit_msg>No halt on error<commit_after><?xml version="1.0" encoding="UTF-8"?>
<project name="mreg" basedir="." default="buildAll">
    <property name="APP_NAME" value="Mobilizr"/>
    <property name="APP_ROOT" value="${project.basedir}"/>
    <property name="SRC_DIR" value="${APP_ROOT}/src"/>
    <property name="TEST_DIR" value="${APP_ROOT}/tests"/>
    <property name="BUILD_DIR" value="${APP_ROOT}/build"/>
    <property name="CODE_STANDARD" value="PSR2"/>

    <fileset dir="${SRC_DIR}" id="filesetSource">
        <include name="**/*.php"/>
    </fileset>

    <fileset dir="${TEST_DIR}" id="filesetTests">
        <include name="**/*.php"/>
    </fileset>

    <target name="help">
        <echo msg="${APP_NAME} automated build file"/>
        <echo msg="======================================="/>
        <echo msg="test         run unittests"/>
        <echo msg="sniff        run php code sniffer"/>
        <echo msg="phpcpd       run php copy detector"/>
        <echo msg="phpmd        run php mess detector"/>
        <echo msg="pdepend      run php depend"/>
        <echo msg="document     generate api documentation"/>
    </target>

    <target name="buildAll" depends="test,sniff,phpcpd,phpmd,pdepend,document">
    </target>

    <target name="test" depends="install,createBuildDir">
        <exec
            command="phpunit --coverage-html ${BUILD_DIR}/test-coverage --coverage-text=${BUILD_DIR}/test-coverage.txt"
            dir="${TEST_DIR}"
            checkreturn="true"
            passthru="true"
            />
    </target>

    <target name="sniff" depends="createBuildDir">
        <phpcodesniffer
            standard="${CODE_STANDARD}"
            showWarnings="true"
            encoding="utf8"
            haltonerror="false"
            haltonwarning="false"
            docGenerator="HTML"
            docFile="${BUILD_DIR}/phpcs/rules.html"
            >
            <fileset refid="filesetSource"/>
            <fileset refid="filesetTests"/>
            <formatter type="full" outfile="${BUILD_DIR}/phpcs/sniff.txt"/>
            <formatter type="summary" usefile="false"/>
        </phpcodesniffer>
    </target>

    <target name="phpcpd" depends="createBuildDir">
        <phpcpd>
            <fileset refid="filesetSource"/>
            <fileset refid="filesetTests"/>
            <formatter type="default" outfile="${BUILD_DIR}/phpcpd.txt"/>
       </phpcpd>
    </target>

    <target name="phpmd" depends="createBuildDir">
        <phpmd>
            <fileset refid="filesetSource"/>
            <fileset refid="filesetTests"/>
            <formatter type="html" outfile="${BUILD_DIR}/phpmd.html"/>
        </phpmd>
    </target>

    <target name="pdepend" depends="createBuildDir">
        <phpdepend>
            <fileset refid="filesetSource"/>
            <logger type="jdepend-chart" outfile="${BUILD_DIR}/pdepend/jdepend.svg"/>
            <logger type="overview-pyramid" outfile="${BUILD_DIR}/pdepend/pyramid.svg"/>
            <logger type="summary-xml" outfile="${BUILD_DIR}/pdepend/summary.xml"/>
        </phpdepend>
    </target>

    <target name="document" depends="createBuildDir">
        <exec
            command="phpdoc --title ${APP_NAME} -d ${SRC_DIR} -t ${BUILD_DIR}/apidocs"
            dir="${APP_ROOT}"
            passthru="true"
            />
        <exec
            command="chmod -R 777 apidocs"
            dir="${BUILD_DIR}"
            />
    </target>

    <target name="createBuildDir">
        <mkdir dir="${BUILD_DIR}"/>
        <mkdir dir="${BUILD_DIR}/phpcs"/>
        <mkdir dir="${BUILD_DIR}/pdepend"/>
    </target>

    <target name="update" depends="install">
        <echo msg="Updating composer.phar..."/>
        <exec
            command="php composer.phar self-update"
            dir="${APP_ROOT}"
            checkreturn="true"
            />
        <echo msg="Updating dependencies using composer..."/>
        <exec
            command="php composer.phar update"
            dir="${APP_ROOT}"
            checkreturn="true"
            />
    </target>

    <target name="install" depends="getcomposer">
        <if>
            <available file="${APP_ROOT}/vendor"/>
            <then>
                <echo msg="Dependencies installed in vendor directory"/>
            </then>
            <else>
                <echo msg="Downloading dependencies using composer..."/>
                <exec
                    command="php composer.phar install --dev"
                    dir="${APP_ROOT}"
                    checkreturn="true"
                    />
            </else>
        </if>
    </target>

    <target name="getcomposer">
        <if>
            <available file="${APP_ROOT}/composer.phar"/>
            <then>
                <echo msg="Composer.phar installed"/>
            </then>
            <else>
                <echo msg="Downloading composer.phar..."/>
                <exec
                    command="curl -s http://getcomposer.org/installer | php"
                    dir="${APP_ROOT}"
                    checkreturn="true"
                    />
            </else>
        </if>
    </target>

</project>

{'fraction_non_alphanumeric': 0.16416747809152873, 'fraction_numerical': 0.001557935735150925, 'mean_word_length': 1.9228799089356858, 'pattern_counts': {'":': 0, '<': 201, '<?xml version=': 2, '>': 201, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3886598', 'n_tokens_mistral': 2938, 'n_tokens_neox': 2849, 'n_words': 541}