<commit_before><project name="cirrus" default="war" basedir=".">

  <property name="version" value="1.0" />

  <target name="init">
    <mkdir dir="target/classes" />
    <mkdir dir="target/test-classes" />
    <mkdir dir="target/${ant.project.name}-${version}" />
  </target>

  <target name="compile" depends="init" description="compile">
    <javac srcdir="src/main/java" destdir="target/classes"
        debug="on" source="1.5" target="1.5" includeAntRuntime="false">
      <classpath>
        <fileset dir="lib" />
      </classpath>
    </javac>
    <copy todir="target/classes">
      <fileset dir="src/main/resources"/>
    </copy>
 </target>

  <target name="compile-test" depends="compile" description="compile test">
    <javac srcdir="src/test/java" destdir="target/test-classes"
        debug="on" source="1.5" target="1.5" includeAntRuntime="false">
      <classpath>
        <pathelement location="target/classes"/>
        <fileset dir="lib" />
      </classpath>
    </javac>
    <copy todir="target/test-classes">
      <fileset dir="src/test/resources"/>
    </copy>
  </target>

  <target name="test" depends="compile-test" description="test">
    <taskdef name="jairusunit" classname="com.joelhockey.jairusunit.JairusUnitTask">
      <classpath>
        <fileset dir="lib" />
      </classpath>
    </taskdef>

    <jairusunit>
      <!--jvmarg value="-Ddebugjs" /-->
      <!--jvmarg value="-agentlib:jdwp=server=y,suspend=y,transport=dt_socket,address=2718" /-->
      <classpath>
        <pathelement location="target/test-classes"/>
        <pathelement location="target/classes"/>
        <fileset dir="lib" />
      </classpath>
      <batchtest>
        <fileset dir="src/test/javascript">
          <include name="**/*test*.js"/>
        </fileset>
      </batchtest>
    </jairusunit>
    <mkdir dir="target/report/html" />
    <junitreport todir="target/report">
      <fileset dir="target/surefire-reports">
        <include name="TEST-*.xml"/>
      </fileset>
      <report format="frames" todir="target/report/html"/>
    </junitreport>
  </target>
  
  <target name="jar" depends="compile" description="jar">
    <jar jarfile="target/${ant.project.name}-${version}.jar" basedir="target/classes" />
  </target>

  <target name="clean" description="clean">
    <delete dir="target" />
  </target>
  
  <target name="server" description="start web server" depends="compile-test">
    <java jar="lib/runtime/js-1.7R2.jar" fork="true">
      <jvmarg value="-server" />
      <!--jvmarg value="-Ddebugjs" /-->
      <!--jvmarg value="-agentlib:jdwp=server=y,suspend=n,transport=dt_socket,address=2718" /-->
      <arg value="script/server.js" />
    </java>
  </target>
</project>
<commit_msg>allow debug to be set on cmdline<commit_after><project name="cirrus" default="jar" basedir=".">

  <property name="version" value="1.0" />

  <target name="init">
    <mkdir dir="target/classes" />
    <mkdir dir="target/test-classes" />
    <mkdir dir="target/${ant.project.name}-${version}" />
  </target>

  <target name="compile" depends="init" description="compile">
    <javac srcdir="src/main/java" destdir="target/classes"
        debug="on" source="1.5" target="1.5" includeAntRuntime="false">
      <classpath>
        <fileset dir="lib" />
      </classpath>
    </javac>
    <copy todir="target/classes">
      <fileset dir="src/main/resources"/>
    </copy>
 </target>

  <target name="compile-test" depends="compile" description="compile test">
    <javac srcdir="src/test/java" destdir="target/test-classes"
        debug="on" source="1.5" target="1.5" includeAntRuntime="false">
      <classpath>
        <pathelement location="target/classes"/>
        <fileset dir="lib" />
      </classpath>
    </javac>
    <copy todir="target/test-classes">
      <fileset dir="src/test/resources"/>
    </copy>
  </target>

  <target name="test" depends="compile-test,no-debug" description="test">
    <taskdef name="jairusunit" classname="com.joelhockey.jairusunit.JairusUnitTask">
      <classpath>
        <fileset dir="lib" />
      </classpath>
    </taskdef>

    <jairusunit>
      <jvmarg line="-server ${debugjvm} ${suspendjvm} ${debugjs}" />
      <classpath>
        <pathelement location="target/test-classes"/>
        <pathelement location="target/classes"/>
        <fileset dir="lib" />
      </classpath>
      <batchtest>
        <fileset dir="src/test/javascript">
          <include name="**/*test*.js"/>
        </fileset>
      </batchtest>
    </jairusunit>
    <mkdir dir="target/report/html" />
    <junitreport todir="target/report">
      <fileset dir="target/surefire-reports">
        <include name="TEST-*.xml"/>
      </fileset>
      <report format="frames" todir="target/report/html"/>
    </junitreport>
  </target>
  
  <target name="jar" depends="compile" description="jar">
    <jar jarfile="target/${ant.project.name}-${version}.jar" basedir="target/classes" />
  </target>

  <target name="clean" description="clean">
    <delete dir="target" />
  </target>
  
  <target name="debugjs" description="turn on js debug">
    <property name="debugjs" value="-Ddebugjs"/>
  </target>
  <target name="debugjvm" description="turn on jvm debug">
    <property name="debugjvm" value="-agentlib:jdwp=server=y,suspend=n,transport=dt_socket,address=2718"/>
  </target>
  <target name="suspendjvm" description="turn on jvm debug">
    <property name="suspendjvm" value="-agentlib:jdwp=server=y,suspend=y,transport=dt_socket,address=2718"/>
  </target>
  <target name="no-debug" description="no debug">
    <property name="debugjs" value=""/>
    <property name="debugjvm" value=""/>
    <property name="suspendjvm" value=""/>
  </target>
  	
  <target name="server" depends="compile-test,no-debug" description="start web server">
    <java jar="lib/runtime/js-1.7R2.jar" fork="true">
      <jvmarg line="-server ${debugjvm} ${suspendjvm} ${debugjs}" />
      <arg value="script/server.js" />
    </java>
  </target>
</project>

{'fraction_non_alphanumeric': 0.18973587428953528, 'fraction_numerical': 0.007021063189568706, 'mean_word_length': 3.341799709724238, 'pattern_counts': {'":': 0, '<': 156, '<?xml version=': 0, '>': 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': '2576764', 'n_tokens_mistral': 1978, 'n_tokens_neox': 1962, 'n_words': 338}