<commit_before><project name="phpMyFAQ" default="build" basedir=".">
 <target name="clean">
  <!-- Clean up -->
  <delete dir="${basedir}/build"/>

  <!-- Create build directories -->
  <mkdir dir="${basedir}/build/api"/>
  <mkdir dir="${basedir}/build/code-browser"/>
  <mkdir dir="${basedir}/build/coverage"/>
  <mkdir dir="${basedir}/build/logs"/>
  <mkdir dir="${basedir}/build/pdepend"/>
 </target>

 <!-- Run unit tests and generate junit.xml and clover.xml -->
 <target name="phpunit">
  <exec executable="phpunit" failonerror="true">
    <arg line="--coverage-clover ${basedir}/build/logs/clover.xml
               --coverage-html ${basedir}/build/coverage/
               --log-junit ${basedir}/build/logs/junit.xml
               ${basedir}/phpmyfaq/tests" />
  </exec>
 </target>

 <!-- Run pdepend, phpmd, phpcpd, and phpcs in parallel -->
 <target name="parallelTasks">
  <parallel threadCount="2">
   <antcall target="pdepend"/>
   <antcall target="phpmd"/>
   <antcall target="phpcpd"/>
   <antcall target="phpcs"/>
   <antcall target="phpdoc"/>
  </parallel>
 </target>

 <!-- Generate jdepend.xml and software metrics charts -->
 <target name="pdepend">
  <exec executable="pdepend">
   <arg line="--jdepend-xml=${basedir}/build/logs/jdepend.xml
              --ignore=${basedir}/phpmyfaq/inc/libs ./" />
  </exec>
 </target>

 <!-- Generate pmd.xml -->
 <target name="phpmd">
  <exec executable="phpmd">
   <arg line="./ xml codesize,design,naming,unusedcode
              --reportfile ${basedir}/build/logs/pmd.xml
              --exclude    ${basedir}/phpmyfaq/inc/libs,
                           ${basedir}/phpmyfaq/tests" />
  </exec>
 </target>

 <!-- Generate pmd-cpd.xml -->
 <target name="phpcpd">
  <exec executable="phpcpd">
   <arg line="--log-pmd  ${basedir}/build/logs/pmd-cpd.xml
              --suffixes php
              --exclude  ${basedir}/phpmyfaq/inc/libs
              --exclude  ${basedir}/phpmyfaq/tests ./" />
  </exec>
 </target>

 <!-- Generate checkstyle.xml -->
 <target name="phpcs">
  <exec executable="phpcs" output="/dev/null">
   <arg line="--report=checkstyle 
              --report-file=${basedir}/build/logs/checkstyle.xml 
              --standard=Zend
              --extensions=php
              --ignore=${basedir}/phpmyfaq/inc/libs,${basedir}/phpmyfaq/tests ./" />
  </exec>
 </target>

 <!-- Generate API documentation -->
 <target name="phpdoc">
  <exec executable="phpdoc">
   <arg line="-d ${basedir}/phpmyfaq/inc -t ${basedir}/build/api" />
  </exec>
 </target>
 
 <target name="phpcb">
  <exec executable="phpcb">
   <arg line="--log         ${basedir}/build/logs
              --source      ${basedir}
              --output      ${basedir}/build/code-browser
              --excludePCRE %(${basedir}/phpmyfaq/inc/libs/.*)|(${basedir}/build/.*)|(${basedir}/phpmyfaq/scripts/.*)|(${basedir}/phpmyfaq/tests/.*)%" />
  </exec>
 </target>

 <target name="build" depends="clean,parallelTasks,phpunit,phpcb"/>
</project><commit_msg>Moved stuff from Makefile into build.xml<commit_after><project name="phpMyFAQ" default="build" basedir=".">
 <target name="clean">
  <!-- Clean up -->
  <delete dir="${basedir}/build"/>

  <!-- Create build directories -->
  <mkdir dir="${basedir}/build/api"/>
  <mkdir dir="${basedir}/build/code-browser"/>
  <mkdir dir="${basedir}/build/coverage"/>
  <mkdir dir="${basedir}/build/logs"/>
  <mkdir dir="${basedir}/build/pdepend"/>
 </target>

 <target name="sync" description="Updates all git submodules">
     <exec executable="git">
         <arg line="submodule update --init --recursive" />
     </exec>
 </target>

 <target name="mergejs" description="Merges all JavaScript files into one file">
     <exec executable="cat">
         <arg line=" ./vendor/bootstrap/js/bootstrap-transition.js ./vendor/bootstrap/js/bootstrap-alert.js ./vendor/bootstrap/js/bootstrap-button.js ./vendor/bootstrap/js/bootstrap-carousel.js ./vendor/bootstrap/js/bootstrap-collapse.js ./vendor/bootstrap/js/bootstrap-dropdown.js ./vendor/bootstrap/js/bootstrap-modal.js ./vendor/bootstrap/js/bootstrap-tooltip.js ./vendor/bootstrap/js/bootstrap-popover.js ./vendor/bootstrap/js/bootstrap-scrollspy.js ./vendor/bootstrap/js/bootstrap-tab.js ./vendor/bootstrap/js/bootstrap-typeahead.js ./phpmyfaq/js/functions.js > ./phpmyfaq/js/phpmyfaq.js;" />
     </exec>
 </target>

 <target name="phpunit" description="Run unit tests and generate junit.xml and clover.xml">
  <exec executable="phpunit" failonerror="true">
    <arg line="--coverage-clover ${basedir}/build/logs/clover.xml
               --coverage-html ${basedir}/build/coverage/
               --log-junit ${basedir}/build/logs/junit.xml
               ${basedir}/phpmyfaq/tests" />
  </exec>
 </target>

 <target name="parallelTasks" description="Run pdepend, phpmd, phpcpd, and phpcs in parallel">
  <parallel threadCount="2">
   <antcall target="pdepend"/>
   <antcall target="phpmd"/>
   <antcall target="phpcpd"/>
   <antcall target="phpcs"/>
   <antcall target="phpdoc"/>
  </parallel>
 </target>

 <!--  -->
 <target name="pdepend" description="Generate jdepend.xml and software metrics charts">
  <exec executable="pdepend">
   <arg line="--jdepend-xml=${basedir}/build/logs/jdepend.xml
              --ignore=${basedir}/phpmyfaq/inc/libs ./" />
  </exec>
 </target>

 <!-- Generate pmd.xml -->
 <target name="phpmd">
  <exec executable="phpmd">
   <arg line="./ xml codesize,design,naming,unusedcode
              --reportfile ${basedir}/build/logs/pmd.xml
              --exclude    ${basedir}/phpmyfaq/inc/libs,
                           ${basedir}/phpmyfaq/tests" />
  </exec>
 </target>

 <!-- Generate pmd-cpd.xml -->
 <target name="phpcpd">
  <exec executable="phpcpd">
   <arg line="--log-pmd  ${basedir}/build/logs/pmd-cpd.xml
              --suffixes php
              --exclude  ${basedir}/phpmyfaq/inc/libs
              --exclude  ${basedir}/phpmyfaq/tests ./" />
  </exec>
 </target>

 <!-- Generate checkstyle.xml -->
 <target name="phpcs">
  <exec executable="phpcs" output="/dev/null">
   <arg line="--report=checkstyle 
              --report-file=${basedir}/build/logs/checkstyle.xml 
              --standard=Zend
              --extensions=php
              --ignore=${basedir}/phpmyfaq/inc/libs,${basedir}/phpmyfaq/tests ./" />
  </exec>
 </target>

 <!-- Generate API documentation -->
 <target name="phpdoc">
  <exec executable="phpdoc">
   <arg line="-d ${basedir}/phpmyfaq/inc -t ${basedir}/build/api" />
  </exec>
 </target>
 
 <target name="phpcb">
  <exec executable="phpcb">
   <arg line="--log         ${basedir}/build/logs
              --source      ${basedir}
              --output      ${basedir}/build/code-browser
              --excludePCRE %(${basedir}/phpmyfaq/inc/libs/.*)|(${basedir}/build/.*)|(${basedir}/phpmyfaq/scripts/.*)|(${basedir}/phpmyfaq/tests/.*)%" />
  </exec>
 </target>

 <target name="build" depends="clean,sync,parallelTasks,phpunit,phpcb"/>
</project>
{'fraction_non_alphanumeric': 0.19798705966930266, 'fraction_numerical': 0.0002875629043853343, 'mean_word_length': 2.799016930638995, 'pattern_counts': {'":': 0, '<': 139, '<?xml version=': 0, '>': 140, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 29}, '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': '1906727', 'n_tokens_mistral': 2281, 'n_tokens_neox': 2207, 'n_words': 384}