<commit_before><?xml version="1.0" encoding="UTF-8"?>
<project name="ant-build-commons-extensions-phpcpd" basedir=".">

    <!--
        Import default properties for this extension.
    -->
    <property file="${resourcedir}/extensions/phpcpd/phpcpd.properties" />

    <!--
        Import utilized extensions
    -->
    <import file="pear.xml" />

    <!--
        Shortcut for the "phpcpd:phpcpd" target
    -->
    <target name="phpcpd" depends="phpcpd:phpcpd" />

    <!--
        Runs the PHPCPD cli tool against the project source code.
    -->
    <target name="phpcpd:phpcpd"
            depends="-phpcpd:before~hook,
                     -phpcpd:run,
                     -phpcpd:after~hook" />

    <!--
        This target runs PHPCPD against the project's source code and generates
        a log file "cpd.xml" in the configured ${commons:logsdir}.
    -->
    <target name="-phpcpd:run" depends="-phpcpd:install-or-upgrade">

        <exec executable="${commons.executable.php}" failonerror="${phpcpd.fail.on.violation}">
            <arg value="-d" />
            <arg value="memory_limit=1024M" />
            <arg value="-d" />
            <arg value="include_path=${pear.local.include.path}" />
            <arg value="${pear.local.bindir}/phpcpd" /><commit_msg>Only run phpcpd if php srcdir is available<commit_after><?xml version="1.0" encoding="UTF-8"?>
<project name="ant-build-commons-extensions-phpcpd" basedir=".">

    <!--
        Import default properties for this extension.
    -->
    <property file="${resourcedir}/extensions/phpcpd/phpcpd.properties" />

    <!--
        Import utilized extensions
    -->
    <import file="availability.xml" />
    <import file="pear.xml" />

    <!--
        Shortcut for the "phpcpd:phpcpd" target
    -->
    <target name="phpcpd" depends="phpcpd:phpcpd" />

    <!--
         Execute the phpcpd task only, if a php source directory is available
    -->
    <target name="phpcpd:phpcpd"
            depends="availability:php-srcdir-is-available"
            if="availability:php-srcdir-is-available">
        <antcall target="-phpcpd:phpcpd" />
    </target>

    <!--
        Runs the PHPCPD cli tool against the project source code.
    -->
    <target name="-phpcpd:phpcpd"
            depends="-phpcpd:before~hook,
                     -phpcpd:run,
                     -phpcpd:after~hook" />

    <!--
        This target runs PHPCPD against the project's source code and generates
        a log file "cpd.xml" in the configured ${commons:logsdir}.
    -->
    <target name="-phpcpd:run" depends="-phpcpd:install-or-upgrade">

        <exec executable="${commons.executable.php}" failonerror="${phpcpd.fail.on.violation}">
            <arg value="-d" />
            <arg value="memory_limit=1024M" />
            <arg value="-d" />
            <arg value="include_path=${pear.local.include.path}" />
            <arg value="${pear.local.bindir}/phpcpd" />
{'fraction_non_alphanumeric': 0.15654843110504774, 'fraction_numerical': 0.0047748976807639835, 'mean_word_length': 2.248062015503876, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 2, '>': 44, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 7}, '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': '216073', 'n_tokens_mistral': 915, 'n_tokens_neox': 882, 'n_words': 182}