<commit_before><?xml version="1.0"?>

<!--

  Ant script to build the BioJava (1.4.x) mapping for FlyMine.
  To run this ANT script:
  - set your JAVA_HOME variable properly //e.g. export JAVA_HOME=/opt/java
  - add junit.jar to the CLASSPATH       //e.g. export CLASSPATH=$JUNIT_HOME

  You also need:
  -intermine.properties
  -default.intermine.properties

  Have fun!

  @Author <NAME>

-->

<project name="BioJava 1.4.x - FlyMine - mapping" default="jar">

  <!-- global properties -->
  <property environment="env"/>
  <property name="jdk" value="${env.JAVA_HOME}"/>

  <property name="base.dir" value="."/>
  <property name="resources.dir" value="resources"/>

  <!-- ADATPT this to your working environment -->
  <property name="intermine-all.jar" value="lib/intermine-all.jar"/>
  <property name="intermine-genomic.jar" value="lib/intermine-genomic.jar"/>

  <property name="intermine.properties" value="${user.home}/intermine.properties"/>
  <property name="default.intermine.properties" value="${user.home}/default.intermine.properties"/>
  <property name="bjMapping.properties" value="${resources.dir}/biojava1/bjMapping.properties"/>
  <property name="java.policy" value="${resources.dir}/biojava1/java.policy"/>

  <property name="dest.dir" value="build/biojava1"/>
  <property name="classes.dir" value="${dest.dir}/classes"/>
  <property name="dist.dir" value="${dest.dir}/dist"/>
  <property name="jar.dist.dir" value="${dist.dir}"/>
  <property name="doc.dir" value="${dest.dir}/doc"/>
  <property name="junit.dir" value="${dest.dir}/junit"/>
  <property name="junit.xml.dir" value="${junit.dir}/xml"/>
  <property name="junit.html.dir" value="${junit.dir}/html"/>
  <property name="src.dir" value="model/genomic/src/java"/>
  <property name="test.dir" value="model/genomic/src/test"/>
  <property name="lib.dir" value="lib"/>

  <property name="compiler.args" value=""/>
  <property name="jvmarg" value="-Xmx128m"/>
  <property name="rmi.server.jvmarg" value="-Xmx300m"/>
  <property name="server.security.policy" value="${resources.dir}/biojava1/java.policy"/>

  <path id="classpath">
    <pathelement path="${intermine-all.jar}"/>
    <pathelement path="${lib.dir}/bytecode.jar"/>
    <pathelement path="${lib.dir}/commons-dbcp-1.1.jar"/>
    <pathelement path="${lib.dir}/commons-pool-1.1.jar"/>
    <pathelement path="${lib.dir}/commons-cli.jar"/>
    <pathelement path="${lib.dir}/htmlparser.jar"/>
    <pathelement path="${lib.dir}/biojava-1.4cvs.jar"/>
    <pathelement path="${intermine-genomic.jar}"/>
  </path>

  <path id="classes.classpath">
    <path refid="classpath"/>
    <pathelement location="${classes.dir}"/>
  </path>

  <path id="jar.classpath">
    <pathelement path="${jar.dist.dir}/properties.jar"/>
    <path refid="classes.classpath"/>
    <pathelement path="${jar.dist.dir}/bj1Mapping.jar"/>
  </path>

  <tstamp>
    <format property="YEAR" pattern="yyyy"/>
    <format property="DTSTAMP" pattern="yyyyMMddHHmm"/>
  </tstamp>

  <!-- clean classes and dist -->
  <target name="clean-build" description="cleans build classes">
    <delete dir="${classes.dir}"/>
    <mkdir dir="${classes.dir}"/>
  </target>

  <!-- clean dist jar -->
  <target name="clean-jar" description="cleans the jar">
    <delete dir="${dist.dir}"/>
    <mkdir dir="${dist.dir}"/>
  </target>

  <!-- clean doc -->
  <target name="clean-doc" description="cleans javadoc">
    <delete dir="${doc.dir}"/>
    <mkdir dir="${doc.dir}"/>
  </target>

  <!-- clean junit -->
  <target name="clean-junit" description="cleans junit results">
    <delete dir="${junit.dir}"/>
    <mkdir dir="${junit.dir}"/>
    <mkdir dir="${junit.xml.dir}"/>
    <mkdir dir="${junit.html.dir}"/>
  </target>

  <!-- clean all -->
  <target name="clean-all" depends="clean-build, clean-jar, clean-doc, clean-junit" description="cleans all"/>

  <!-- make a config jar file -->
  <target name="config" description="make a jar file for intermine.properties which get into lib directory">
    <delete file="${jar.dist.dir}/properties.jar"/>
    <jar destfile="${jar.dist.dir}/properties.jar">
      <fileset file="${intermine.properties}"/>
      <fileset file="${default.intermine.properties}"/>
      <fileset file="${bjMapping.properties}"/>
      <fileset file="${java.policy}"/>
    </jar>
  </target>

  <!-- build tasks -->
  <target name="build" depends="clean-build, config" description="build application">

    <echo message="${java.home}"/>
    <echo message="${jdk}"/>

    <javac source="1.4" fork="true" executable="${jdk}/bin/javac"
      srcdir="${src.dir}:${test.dir}"
      destdir="${classes.dir}"
      includes="org/flymine/biojava1/**">
      <classpath refid="classpath"/>
      <compilerarg line="${compiler.args}"/>
    </javac>
    <echo message="compiled files: ${classes.dir}"/>
  </target>

  <!-- make RMI stub -->
  <target name="stub" depends="build">
    <rmic base="${classes.dir}" includes="**/RemoteSequence.class" stubversion="1.2" debug="true">
      <classpath refid="classes.classpath"/>
    </rmic>
  </target>

  <!-- make a new jar, if jar is not already available -->
  <target name="check-jar">
    <echo message="check if jar is available"/>
    <condition property="ifjar">
      <available file="${jar.dist.dir}/bj1Mapping.jar"/>
    </condition>
    <antcall target="check-jar-available"/>
  </target>

  <target name="check-jar-available" unless="ifjar">
    <antcall target="jar"/>
  </target>

  <!-- make a jar -->
  <target name="jar" depends="clean-jar, stub" description="make a jar file to provide app as a library">
    <jar destfile="${jar.dist.dir}/bj1Mapping.jar">
      <fileset dir="${classes.dir}">
        <exclude name="**/tests/**"/>
      </fileset>
    </jar>
  </target>

  <!-- junit tests // currently directly tested by FlyMine build.xml file -->
  <!--
  <target name="junit-xml" depends="clean-junit, build" description="run junit tests and output xml results">
    <junit printsummary="yes" haltonfailure="yes">
      <classpath refid="jar.classpath"/>
      <formatter type="xml"/>
      <batchtest fork="yes" todir="${junit.xml.dir}">
        <fileset dir="${test.dir}">
          <include name="**/*Test*.java"/>
          <exclude name="**/FlyMineFixture.java"/>
        </fileset>
      </batchtest>
    </junit>
    <echo message="junit xml files: {junit.xml.dir}"/>
  </target>

  <target name="junit-html" depends="junit-xml" description="run junit tests and output html results">
    <junitreport todir="${junit.html.dir}">
      <fileset dir="${junit.xml.dir}">
        <include name="TEST-*.xml"/>
      </fileset>
      <report format="frames" todir="${junit.html.dir}"/>
    </junitreport>
    <echo message="junit html files: ${junit.html.dir}"/>
  </target>
  -->

  <!-- generate java documentation -->
  <target name="javadoc" depends="clean-doc" description="generate javadoc">
    <javadoc packagenames="org.flymine.biojava1.*"
      sourcepath="${src.dir}"
      source="1.4"
      breakiterator="true"
      destdir="${doc.dir}"
      author="true"
      version="true"
      use="false"
      access="private"
      windowtitle="BioJava 1.4.x - FlyMine - mapping API">
      <classpath refid="classpath"/>
    </javadoc>
    <echo message="java doc files: ${doc.dir}"/>
  </target>

  <!-- check if config file is correctly set by the user -->
  <target name="check-config">
    <input message="${configMsg} " validargs="y,n" addproperty="config"/>
    <condition property="ifconfig">
      <equals arg1="y" arg2="${config}"/>
    </condition>
    <fail unless="ifconfig" message="Please edit the config file first!"/>
  </target>

  <!-- start a class from the jar.classpath -->
  <target name="java">
    <java classname="${class}" failonerror="true" fork="true">
      <classpath refid="jar.classpath"/>
      <jvmarg value="${jvmarg}"/>
    </java>
  </target>

  <!-- start a Sequence Server -->
  <target name="start-rmi-sequence-server" depends="check-jar" description="starts the RMI Sequence Server">
    <property name="configMsg" value="Have you configured your config/bjMapping.properties properly?"/>
    <antcall target="check-config"/>
    <echo message="Server will be started with this java.policy ${server.security.policy};"/>
    <java classname="org.flymine.biojava1.server.RemoteSequence" failonerror="true" fork="true">
      <classpath refid="jar.classpath"/>
      <jvmarg value="${rmi.server.jvmarg}"/>
      <sysproperty key="java.security.policy" value="${server.security.policy}"/>
    </java>
  </target>

  <!-- use case for in memory processing -->
  <target name="use-case-InMemory" depends="check-jar" description="starts some use cases for in memory processing">
    <property name="configMsg"
      value="resources/biojava1/Mapping.properties: ENABLE hasA, invHasA, synonyms and memoryMode - done???"/>
    <antcall target="check-config"/>
    <property name="class" value="org.flymine.biojava1.app.useCase.UseCasesInMemory"/>
    <antcall target="java"/>
  </target>

  <!-- use case for dynamic processing (non memory mode) -->
  <target name="use-case-NotInMemory" depends="check-jar" description="starts some use cases for non memory mode">
    <property name="configMsg"
      value="resources/biojava1/bjMapping.properties: ENABLE hasA, invHasA; DISABLE synonyms and memoryMode - done???"/>
    <antcall target="check-config"/>
    <property name="class" value="org.flymine.biojava1.app.useCase.UseCasesNotInMemory"/>
    <antcall target="java"/>
  </target>

  <!-- use case for some example IO (wrinting EMBL file) -->
  <target name="use-case-IO" depends="check-jar" description="starts an example for I/O">
    <property name="configMsg"
      value="resources/biojava1/bjMapping.properties: ENABLE synonyms and memoryMode; DISABLE hasA, invHasA - done???"/>
    <antcall target="check-config"/>
    <property name="class" value="org.flymine.biojava1.app.useCase.IOExampleUseCase"/>
    <antcall target="java"/>
  </target>

  <!-- use case to show how to use an RMI Client-->
  <target name="use-case-RMI-client"
    depends="check-jar"
    description="starts an example Client connecting to the RMI server/sequence">
    <property name="class" value="org.flymine.biojava1.app.useCase.UseCaseRmiClient"/>
    <antcall target="java"/>
  </target>

</project>
<commit_msg>Fixed location of genomic Jar file.<commit_after><?xml version="1.0"?>

<!--

  Ant script to build the BioJava (1.4.x) mapping for FlyMine.
  To run this ANT script:
  - set your JAVA_HOME variable properly //e.g. export JAVA_HOME=/opt/java
  - add junit.jar to the CLASSPATH       //e.g. export CLASSPATH=$JUNIT_HOME

  You also need:
  -intermine.properties
  -default.intermine.properties

  Have fun!

  @Author <NAME>

-->

<project name="BioJava 1.4.x - FlyMine - mapping" default="jar">

  <!-- global properties -->
  <property environment="env"/>
  <property name="jdk" value="${env.JAVA_HOME}"/>

  <property name="base.dir" value="."/>
  <property name="resources.dir" value="resources"/>

  <!-- ADAPT this to your working environment -->
  <property name="intermine-all.jar" value="lib/intermine-all.jar"/>
  <property name="intermine-genomic.jar" value="dist/intermine-genomic.jar"/>

  <property name="intermine.properties" value="${user.home}/intermine.properties"/>
  <property name="default.intermine.properties" value="${user.home}/default.intermine.properties"/>
  <property name="bjMapping.properties" value="${resources.dir}/biojava1/bjMapping.properties"/>
  <property name="java.policy" value="${resources.dir}/biojava1/java.policy"/>

  <property name="dest.dir" value="build/biojava1"/>
  <property name="classes.dir" value="${dest.dir}/classes"/>
  <property name="dist.dir" value="${dest.dir}/dist"/>
  <property name="jar.dist.dir" value="${dist.dir}"/>
  <property name="doc.dir" value="${dest.dir}/doc"/>
  <property name="junit.dir" value="${dest.dir}/junit"/>
  <property name="junit.xml.dir" value="${junit.dir}/xml"/>
  <property name="junit.html.dir" value="${junit.dir}/html"/>
  <property name="src.dir" value="model/genomic/src/java"/>
  <property name="test.dir" value="model/genomic/src/test"/>
  <property name="lib.dir" value="lib"/>

  <property name="compiler.args" value=""/>
  <property name="jvmarg" value="-Xmx128m"/>
  <property name="rmi.server.jvmarg" value="-Xmx300m"/>
  <property name="server.security.policy" value="${resources.dir}/biojava1/java.policy"/>

  <path id="classpath">
    <pathelement path="${intermine-all.jar}"/>
    <pathelement path="${lib.dir}/bytecode.jar"/>
    <pathelement path="${lib.dir}/commons-dbcp-1.1.jar"/>
    <pathelement path="${lib.dir}/commons-pool-1.1.jar"/>
    <pathelement path="${lib.dir}/commons-cli.jar"/>
    <pathelement path="${lib.dir}/htmlparser.jar"/>
    <pathelement path="${lib.dir}/biojava-1.4cvs.jar"/>
    <pathelement path="${intermine-genomic.jar}"/>
  </path>

  <path id="classes.classpath">
    <path refid="classpath"/>
    <pathelement location="${classes.dir}"/>
  </path>

  <path id="jar.classpath">
    <pathelement path="${jar.dist.dir}/properties.jar"/>
    <path refid="classes.classpath"/>
    <pathelement path="${jar.dist.dir}/bj1Mapping.jar"/>
  </path>

  <tstamp>
    <format property="YEAR" pattern="yyyy"/>
    <format property="DTSTAMP" pattern="yyyyMMddHHmm"/>
  </tstamp>

  <!-- clean classes and dist -->
  <target name="clean-build" description="cleans build classes">
    <delete dir="${classes.dir}"/>
    <mkdir dir="${classes.dir}"/>
  </target>

  <!-- clean dist jar -->
  <target name="clean-jar" description="cleans the jar">
    <delete dir="${dist.dir}"/>
    <mkdir dir="${dist.dir}"/>
  </target>

  <!-- clean doc -->
  <target name="clean-doc" description="cleans javadoc">
    <delete dir="${doc.dir}"/>
    <mkdir dir="${doc.dir}"/>
  </target>

  <!-- clean junit -->
  <target name="clean-junit" description="cleans junit results">
    <delete dir="${junit.dir}"/>
    <mkdir dir="${junit.dir}"/>
    <mkdir dir="${junit.xml.dir}"/>
    <mkdir dir="${junit.html.dir}"/>
  </target>

  <!-- clean all -->
  <target name="clean-all" depends="clean-build, clean-jar, clean-doc, clean-junit" description="cleans all"/>

  <!-- make a config jar file -->
  <target name="config" description="make a jar file for intermine.properties which get into lib directory">
    <delete file="${jar.dist.dir}/properties.jar"/>
    <jar destfile="${jar.dist.dir}/properties.jar">
      <fileset file="${intermine.properties}"/>
      <fileset file="${default.intermine.properties}"/>
      <fileset file="${bjMapping.properties}"/>
      <fileset file="${java.policy}"/>
    </jar>
  </target>

  <!-- build tasks -->
  <target name="build" depends="clean-build, config" description="build application">

    <echo message="${java.home}"/>
    <echo message="${jdk}"/>

    <javac source="1.4" fork="true" executable="${jdk}/bin/javac"
      srcdir="${src.dir}:${test.dir}"
      destdir="${classes.dir}"
      includes="org/flymine/biojava1/**">
      <classpath refid="classpath"/>
      <compilerarg line="${compiler.args}"/>
    </javac>
    <echo message="compiled files: ${classes.dir}"/>
  </target>

  <!-- make RMI stub -->
  <target name="stub" depends="build">
    <rmic base="${classes.dir}" includes="**/RemoteSequence.class" stubversion="1.2" debug="true">
      <classpath refid="classes.classpath"/>
    </rmic>
  </target>

  <!-- make a new jar, if jar is not already available -->
  <target name="check-jar">
    <echo message="check if jar is available"/>
    <condition property="ifjar">
      <available file="${jar.dist.dir}/bj1Mapping.jar"/>
    </condition>
    <antcall target="check-jar-available"/>
  </target>

  <target name="check-jar-available" unless="ifjar">
    <antcall target="jar"/>
  </target>

  <!-- make a jar -->
  <target name="jar" depends="clean-jar, stub" description="make a jar file to provide app as a library">
    <jar destfile="${jar.dist.dir}/bj1Mapping.jar">
      <fileset dir="${classes.dir}">
        <exclude name="**/tests/**"/>
      </fileset>
    </jar>
  </target>

  <!-- junit tests // currently directly tested by FlyMine build.xml file -->
  <!--
  <target name="junit-xml" depends="clean-junit, build" description="run junit tests and output xml results">
    <junit printsummary="yes" haltonfailure="yes">
      <classpath refid="jar.classpath"/>
      <formatter type="xml"/>
      <batchtest fork="yes" todir="${junit.xml.dir}">
        <fileset dir="${test.dir}">
          <include name="**/*Test*.java"/>
          <exclude name="**/FlyMineFixture.java"/>
        </fileset>
      </batchtest>
    </junit>
    <echo message="junit xml files: {junit.xml.dir}"/>
  </target>

  <target name="junit-html" depends="junit-xml" description="run junit tests and output html results">
    <junitreport todir="${junit.html.dir}">
      <fileset dir="${junit.xml.dir}">
        <include name="TEST-*.xml"/>
      </fileset>
      <report format="frames" todir="${junit.html.dir}"/>
    </junitreport>
    <echo message="junit html files: ${junit.html.dir}"/>
  </target>
  -->

  <!-- generate java documentation -->
  <target name="javadoc" depends="clean-doc" description="generate javadoc">
    <javadoc packagenames="org.flymine.biojava1.*"
      sourcepath="${src.dir}"
      source="1.4"
      breakiterator="true"
      destdir="${doc.dir}"
      author="true"
      version="true"
      use="false"
      access="private"
      windowtitle="BioJava 1.4.x - FlyMine - mapping API">
      <classpath refid="classpath"/>
    </javadoc>
    <echo message="java doc files: ${doc.dir}"/>
  </target>

  <!-- check if config file is correctly set by the user -->
  <target name="check-config">
    <input message="${configMsg} " validargs="y,n" addproperty="config"/>
    <condition property="ifconfig">
      <equals arg1="y" arg2="${config}"/>
    </condition>
    <fail unless="ifconfig" message="Please edit the config file first!"/>
  </target>

  <!-- start a class from the jar.classpath -->
  <target name="java">
    <java classname="${class}" failonerror="true" fork="true">
      <classpath refid="jar.classpath"/>
      <jvmarg value="${jvmarg}"/>
    </java>
  </target>

  <!-- start a Sequence Server -->
  <target name="start-rmi-sequence-server" depends="check-jar" description="starts the RMI Sequence Server">
    <property name="configMsg" value="Have you configured your config/bjMapping.properties properly?"/>
    <antcall target="check-config"/>
    <echo message="Server will be started with this java.policy ${server.security.policy};"/>
    <java classname="org.flymine.biojava1.server.RemoteSequence" failonerror="true" fork="true">
      <classpath refid="jar.classpath"/>
      <jvmarg value="${rmi.server.jvmarg}"/>
      <sysproperty key="java.security.policy" value="${server.security.policy}"/>
    </java>
  </target>

  <!-- use case for in memory processing -->
  <target name="use-case-InMemory" depends="check-jar" description="starts some use cases for in memory processing">
    <property name="configMsg"
      value="resources/biojava1/Mapping.properties: ENABLE hasA, invHasA, synonyms and memoryMode - done???"/>
    <antcall target="check-config"/>
    <property name="class" value="org.flymine.biojava1.app.useCase.UseCasesInMemory"/>
    <antcall target="java"/>
  </target>

  <!-- use case for dynamic processing (non memory mode) -->
  <target name="use-case-NotInMemory" depends="check-jar" description="starts some use cases for non memory mode">
    <property name="configMsg"
      value="resources/biojava1/bjMapping.properties: ENABLE hasA, invHasA; DISABLE synonyms and memoryMode - done???"/>
    <antcall target="check-config"/>
    <property name="class" value="org.flymine.biojava1.app.useCase.UseCasesNotInMemory"/>
    <antcall target="java"/>
  </target>

  <!-- use case for some example IO (wrinting EMBL file) -->
  <target name="use-case-IO" depends="check-jar" description="starts an example for I/O">
    <property name="configMsg"
      value="resources/biojava1/bjMapping.properties: ENABLE synonyms and memoryMode; DISABLE hasA, invHasA - done???"/>
    <antcall target="check-config"/>
    <property name="class" value="org.flymine.biojava1.app.useCase.IOExampleUseCase"/>
    <antcall target="java"/>
  </target>

  <!-- use case to show how to use an RMI Client-->
  <target name="use-case-RMI-client"
    depends="check-jar"
    description="starts an example Client connecting to the RMI server/sequence">
    <property name="class" value="org.flymine.biojava1.app.useCase.UseCaseRmiClient"/>
    <antcall target="java"/>
  </target>

</project>

{'fraction_non_alphanumeric': 0.1919872105416142, 'fraction_numerical': 0.004360042631527953, 'mean_word_length': 3.7184, 'pattern_counts': {'":': 0, '<': 417, '<?xml version=': 2, '>': 417, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 28}, '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': '5418334', 'n_tokens_mistral': 6583, 'n_tokens_neox': 6439, 'n_words': 1417}