<commit_before><project name="regex" default="jar">

<property name="regex-version" value="20020430"/>
<property name="build.xml" value="build.xml"/>
<property name="build.dir" value="build"/>
<property name="dist.dir" value="build/dist"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="apidoc.dir" value="${build.dir}/apidoc"/>
<property name="jar.file" value="${build.dir}/xsdregex.jar"/>
<property name="UnicodeData.file" value="UnicodeData-3.1.0.txt"/>
<property name="doc.src.dir" value="doc-src"/>
<property name="doc.build.dir" value="${build.dir}/doc"/>
<property name="util.src"
          value="com/thaiopensource/util/Utf16.java,
                 com/thaiopensource/util/Localizer.java,
                 com/thaiopensource/util/Service.java,
                 com/thaiopensource/util/UriOrFile.java"/>

<target name="init">
  <mkdir dir="${build.dir}"/>
  <mkdir dir="${dist.dir}"/>
</target>

<target name="compile-gen" depends="init">
  <mkdir dir="${build.dir}/gen"/>
  <javac srcdir="src" destdir="${build.dir}/gen" includes="com/thaiopensource/datatype/xsd/regex/jdk1_4/gen/*.java,com/thaiopensource/xml/util/Naming.java"/>
</target>

<target name="gen" depends="compile-gen,check-gen" unless="gen-ok">
  <mkdir dir="${build.dir}/src/com/thaiopensource/datatype/xsd/regex/jdk1_4"/>
  <java classname="com.thaiopensource.datatype.xsd.regex.jdk1_4.gen.NamingExceptionsGen" fork="yes" failonerror="yes">
    <arg value="com.thaiopensource.datatype.xsd.regex.jdk1_4.NamingExceptions"/>
    <arg value="${build.dir}/src"/>
    <classpath>
      <pathelement location="${build.dir}/gen"/>
    </classpath>
  </java>
  <java classname="com.thaiopensource.datatype.xsd.regex.jdk1_4.gen.CategoriesGen" fork="yes" failonerror="yes">
    <arg value="com.thaiopensource.datatype.xsd.regex.jdk1_4.Categories"/>
    <arg value="${build.dir}/src"/>
    <arg value="${UnicodeData.file}"/>
    <classpath>
      <pathelement location="${build.dir}/gen"/>
    </classpath>
  </java>
</target>

<target name="check-gen">
  <uptodate property="gen-ok"
    targetfile="${build.dir}/src/com/thaiopensource/datatype/xsd/regex/jdk1_4/Categories.java">
    <srcfiles dir="${build.dir}/gen" includes="**/*.class"/>
  </uptodate>
</target>

<target name="check-xerces">
  <available property="xerces-available"
             classname="org.apache.xerces.utils.regex.RegularExpression"/>
</target>

<target name="compile-xerces" depends="check-xerces" if="xerces-available">
  <javac srcdir="src" destdir="${classes.dir}" 
         includes="com/thaiopensource/datatype/xsd/regex/xerces/*.java"
         target="1.1"/>
</target>

<target name="check-xerces2">
  <available property="xerces2-available" 
             classname="org.apache.xerces.impl.xpath.regex.RegularExpression"/>
</target>

<target name="compile-xerces2" depends="check-xerces2" if="xerces2-available">
  <javac srcdir="src" destdir="${classes.dir}" 
         includes="com/thaiopensource/datatype/xsd/regex/xerces2/*.java"
         target="1.1"/>
</target>

<target name="check-jdk1_4">
  <available property="jdk1_4-available" classname="java.util.regex.Pattern"/>
</target>

<target name="compile-jdk1_4" depends="check-jdk1_4,gen" if="jdk1_4-available">
  <javac srcdir="src:${build.dir}/src" destdir="${classes.dir}" 
         includes="com/thaiopensource/datatype/xsd/regex/jdk1_4/*.java"
         target="1.1"/>
</target>

<target name="compile-base">
  <mkdir dir="${classes.dir}"/>
  <javac srcdir="src" destdir="${classes.dir}" 
         includes="com/thaiopensource/datatype/xsd/regex/*.java,
                   com/thaiopensource/datatype/xsd/regex/test/*.java,
                   ${util.src}"
          target="1.1"/>
</target>

<target name="compile" depends="compile-base,compile-xerces,compile-xerces2,compile-jdk1_4"/>

<target name="jar" depends="compile">
  <jar jarfile="${jar.file}">
    <fileset dir="${classes.dir}"/>
    <fileset dir="src" includes="com/thaiopensource/datatype/xsd/regex/**/*.properties,META-INF/services/com.thaiopensource.datatype.xsd.regex.RegexEngine"/>
  </jar>
</target>

<target name="test" depends="jar">
  <java classname="com.thaiopensource.datatype.xsd.regex.test.TestDriver" fork="yes" failonerror="yes">
    <arg value="com.thaiopensource.datatype.xsd.regex.jdk1_4.RegexEngineImpl"/>
    <arg value="test/regextest.xml"/>
    <classpath><commit_msg>Add source attribute to javac task.<commit_after><project name="regex" default="jar">

<property name="regex-version" value="20020430"/>
<property name="build.xml" value="build.xml"/>
<property name="build.dir" value="build"/>
<property name="dist.dir" value="build/dist"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="apidoc.dir" value="${build.dir}/apidoc"/>
<property name="jar.file" value="${build.dir}/xsdregex.jar"/>
<property name="UnicodeData.file" value="UnicodeData-3.1.0.txt"/>
<property name="doc.src.dir" value="doc-src"/>
<property name="doc.build.dir" value="${build.dir}/doc"/>
<property name="util.src"
          value="com/thaiopensource/util/Utf16.java,
                 com/thaiopensource/util/Localizer.java,
                 com/thaiopensource/util/Service.java,
                 com/thaiopensource/util/UriOrFile.java"/>

<target name="init">
  <mkdir dir="${build.dir}"/>
  <mkdir dir="${dist.dir}"/>
</target>

<target name="compile-gen" depends="init">
  <mkdir dir="${build.dir}/gen"/>
  <javac srcdir="src" destdir="${build.dir}/gen" includes="com/thaiopensource/datatype/xsd/regex/jdk1_4/gen/*.java,com/thaiopensource/xml/util/Naming.java"/>
</target>

<target name="gen" depends="compile-gen,check-gen" unless="gen-ok">
  <mkdir dir="${build.dir}/src/com/thaiopensource/datatype/xsd/regex/jdk1_4"/>
  <java classname="com.thaiopensource.datatype.xsd.regex.jdk1_4.gen.NamingExceptionsGen" fork="yes" failonerror="yes">
    <arg value="com.thaiopensource.datatype.xsd.regex.jdk1_4.NamingExceptions"/>
    <arg value="${build.dir}/src"/>
    <classpath>
      <pathelement location="${build.dir}/gen"/>
    </classpath>
  </java>
  <java classname="com.thaiopensource.datatype.xsd.regex.jdk1_4.gen.CategoriesGen" fork="yes" failonerror="yes">
    <arg value="com.thaiopensource.datatype.xsd.regex.jdk1_4.Categories"/>
    <arg value="${build.dir}/src"/>
    <arg value="${UnicodeData.file}"/>
    <classpath>
      <pathelement location="${build.dir}/gen"/>
    </classpath>
  </java>
</target>

<target name="check-gen">
  <uptodate property="gen-ok"
    targetfile="${build.dir}/src/com/thaiopensource/datatype/xsd/regex/jdk1_4/Categories.java">
    <srcfiles dir="${build.dir}/gen" includes="**/*.class"/>
  </uptodate>
</target>

<target name="check-xerces">
  <available property="xerces-available"
             classname="org.apache.xerces.utils.regex.RegularExpression"/>
</target>

<target name="compile-xerces" depends="check-xerces" if="xerces-available">
  <javac srcdir="src" destdir="${classes.dir}" 
         includes="com/thaiopensource/datatype/xsd/regex/xerces/*.java"
         target="1.1" source="1.2"/>
</target>

<target name="check-xerces2">
  <available property="xerces2-available" 
             classname="org.apache.xerces.impl.xpath.regex.RegularExpression"/>
</target>

<target name="compile-xerces2" depends="check-xerces2" if="xerces2-available">
  <javac srcdir="src" destdir="${classes.dir}" 
         includes="com/thaiopensource/datatype/xsd/regex/xerces2/*.java"
         target="1.1" source="1.2"/>
</target>

<target name="check-jdk1_4">
  <available property="jdk1_4-available" classname="java.util.regex.Pattern"/>
</target>

<target name="compile-jdk1_4" depends="check-jdk1_4,gen" if="jdk1_4-available">
  <javac srcdir="src:${build.dir}/src" destdir="${classes.dir}" 
         includes="com/thaiopensource/datatype/xsd/regex/jdk1_4/*.java"
         target="1.1" source="1.4"/>
</target>

<target name="compile-base">
  <mkdir dir="${classes.dir}"/>
  <javac srcdir="src" destdir="${classes.dir}" 
         includes="com/thaiopensource/datatype/xsd/regex/*.java,
                   com/thaiopensource/datatype/xsd/regex/test/*.java,
                   ${util.src}"
         target="1.1" source="1.2"/>
</target>

<target name="compile" depends="compile-base,compile-xerces,compile-xerces2,compile-jdk1_4"/>

<target name="jar" depends="compile">
  <jar jarfile="${jar.file}">
    <fileset dir="${classes.dir}"/>
    <fileset dir="src" includes="com/thaiopensource/datatype/xsd/regex/**/*.properties,META-INF/services/com.thaiopensource.datatype.xsd.regex.RegexEngine"/>
  </jar>
</target>

<target name="test" depends="jar">
  <java classname="com.thaiopensource.datatype.xsd.regex.test.TestDriver" fork="yes" failonerror="yes">
    <arg value="com.thaiopensource.datatype.xsd.regex.jdk1_4.RegexEngineImpl"/>
    <arg value="test/regextest.xml"/>
    <classpath>
{'fraction_non_alphanumeric': 0.19810148039326478, 'fraction_numerical': 0.014012882811617132, 'mean_word_length': 4.363636363636363, 'pattern_counts': {'":': 0, '<': 157, '<?xml version=': 0, '>': 157, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '297829', 'n_tokens_mistral': 3171, 'n_tokens_neox': 3099, 'n_words': 384}