<commit_before><!--
  Ant build script for FindBugs
  Contributed by <NAME> <<EMAIL>>
  Minor changes by <NAME> <<EMAIL>>
-->

<project name="find-bugs" default="release">

    <!--
       Set this to the location where you installed the generics-enabled
       version of javac.
     -->
    <property name="jsr14.home" value="/export/home/daveho/linux/java/jsr14_adding_generics-1_3-ea"/>
<!--
    <property name="jsr14.home" value="/home/software/java/jsr14_adding_generics-1_3-ea"/>
-->

    <!-- You should not need to change anything beyond this point. -->

    <property name="findbugs.dir" value="." />
    <property name="findbugs.src.dir" value="${findbugs.dir}/src" />
    <property name="findbugs.jar.name" value="findbugs.jar" />
    <property name="findbugsgui.jar.name" value="findbugsGUI.jar" />
    <property name="coreplugin.jar.name" value="coreplugin.jar" />
    <property name="doc.dir" value="${findbugs.dir}/doc" />
    <property name="web.dir" value="${findbugs.dir}/web" />
    <property name="build.dir" value="${findbugs.dir}/build" />
    <property name="jar.dir" value="${build.dir}/lib" />
    <property name="plugin.dir" value="${build.dir}/plugin" />
    <property name="class.dir" value="${build.dir}/classes" />
    <property name="release.dir" value="${build.dir}/release" />
    <property name="release.prop.file" value="release.properties" />

    <!-- define our classpath as all the jar files in the lib dir -->
     <path id="classpath">
      <fileset dir="lib">
        <include name="*.jar"/>
      </fileset>
    </path>

    <target name="clean" depends="init">
      <delete dir="${build.dir}"/>
      <delete dir="${web.dir}"/>
      <delete dir="${release.dir}"/>
      <delete file="${release.prop.file}"/>
    </target>

    <target name="init" >
      <mkdir dir="${jar.dir}" />
      <mkdir dir="${plugin.dir}" />
      <mkdir dir="${class.dir}" />
      <mkdir dir="${release.dir}" />
      <mkdir dir="${web.dir}" />
      <mkdir dir="${build.dir}" />
    </target>


    <!-- target to build the main engine -->
    <target name="findbugs" depends="init">
      <javac srcdir="${findbugs.src.dir}" destdir="${class.dir}"
             source="1.5"
             compiler="com.cortexeb.Jsr14CompilerAdapter">
        <classpath refid="classpath" />
        <exclude name="${findbugs.src.dir}/edu/umd/cs/findbugs/gui/**" />
        <exclude name="${findbugs.src.dir}/edu/umd/cs/findbugs/detect/**" />
      </javac>

      <copy todir="${class.dir}">
        <fileset dir="${findbugs.src.dir}" includes="**/*.properties"/>
      </copy>

      <!--
        Copy Jar files from lib to ${jar.dir}.
        We just want the library files that are essential for compiling
        and running FindBugs.  At the moment, this is just bcel.jar
        and dom4j-full.jar.
      -->
      <copy file="lib/bcel.jar" todir="${jar.dir}" />
      <copy file="lib/dom4j-full.jar" todir="${jar.dir}" />

      <uptodate property="findbugs.jarBuild.notRequired" 
                targetfile="${jar.dir}/${findbugs.jar.name}" >
         <srcfiles dir="${class.dir}" />
      </uptodate>

      <!--
        FindBugs engine - all classes except those in the GUI
        and the Detector implementations (which are part of the core plugin).
      -->
      <jar destfile="${jar.dir}/${findbugs.jar.name}"
           basedir="${class.dir}" manifest="${findbugs.dir}/etc/MANIFEST-findbugs.MF">
        <exclude name="edu/umd/cs/findbugs/gui/**" />
        <exclude name="edu/umd/cs/findbugs/detect/*" />
        <exclude name="*.xml" />
      </jar>
    </target>

    <!--
      The core plugin. This is all of the standard bug pattern detectors.
    -->
    <target name="coreplugin" depends="init,findbugs">

      <javac srcdir="${findbugs.src.dir}" destdir="${class.dir}"
             includes="edu/umd/cs/findbugs/detect/*.java">
        <classpath refid="classpath" />
      </javac>

      <copy file="etc/findbugs.xml" todir="${class.dir}" />
      <copy file="etc/messages.xml" todir="${class.dir}" /><commit_msg>Use GJ compiler for the coreplugin.<commit_after><!--
  Ant build script for FindBugs
  Contributed by <NAME> <<EMAIL>>
  Minor changes by <NAME> <<EMAIL>>
-->

<project name="find-bugs" default="release">

    <!--
       Set this to the location where you installed the generics-enabled
       version of javac.
     -->
    <property name="jsr14.home" value="/export/home/daveho/linux/java/jsr14_adding_generics-1_3-ea"/>
<!--
    <property name="jsr14.home" value="/home/software/java/jsr14_adding_generics-1_3-ea"/>
-->

    <!-- You should not need to change anything beyond this point. -->

    <property name="findbugs.dir" value="." />
    <property name="findbugs.src.dir" value="${findbugs.dir}/src" />
    <property name="findbugs.jar.name" value="findbugs.jar" />
    <property name="findbugsgui.jar.name" value="findbugsGUI.jar" />
    <property name="coreplugin.jar.name" value="coreplugin.jar" />
    <property name="doc.dir" value="${findbugs.dir}/doc" />
    <property name="web.dir" value="${findbugs.dir}/web" />
    <property name="build.dir" value="${findbugs.dir}/build" />
    <property name="jar.dir" value="${build.dir}/lib" />
    <property name="plugin.dir" value="${build.dir}/plugin" />
    <property name="class.dir" value="${build.dir}/classes" />
    <property name="release.dir" value="${build.dir}/release" />
    <property name="release.prop.file" value="release.properties" />

    <!-- define our classpath as all the jar files in the lib dir -->
     <path id="classpath">
      <fileset dir="lib">
        <include name="*.jar"/>
      </fileset>
    </path>

    <target name="clean" depends="init">
      <delete dir="${build.dir}"/>
      <delete dir="${web.dir}"/>
      <delete dir="${release.dir}"/>
      <delete file="${release.prop.file}"/>
    </target>

    <target name="init" >
      <mkdir dir="${jar.dir}" />
      <mkdir dir="${plugin.dir}" />
      <mkdir dir="${class.dir}" />
      <mkdir dir="${release.dir}" />
      <mkdir dir="${web.dir}" />
      <mkdir dir="${build.dir}" />
    </target>


    <!-- target to build the main engine -->
    <target name="findbugs" depends="init">
      <javac srcdir="${findbugs.src.dir}" destdir="${class.dir}"
             source="1.5"
             compiler="com.cortexeb.Jsr14CompilerAdapter">
        <classpath refid="classpath" />
        <exclude name="${findbugs.src.dir}/edu/umd/cs/findbugs/gui/**" />
        <exclude name="${findbugs.src.dir}/edu/umd/cs/findbugs/detect/**" />
      </javac>

      <copy todir="${class.dir}">
        <fileset dir="${findbugs.src.dir}" includes="**/*.properties"/>
      </copy>

      <!--
        Copy Jar files from lib to ${jar.dir}.
        We just want the library files that are essential for compiling
        and running FindBugs.  At the moment, this is just bcel.jar
        and dom4j-full.jar.
      -->
      <copy file="lib/bcel.jar" todir="${jar.dir}" />
      <copy file="lib/dom4j-full.jar" todir="${jar.dir}" />

      <uptodate property="findbugs.jarBuild.notRequired" 
                targetfile="${jar.dir}/${findbugs.jar.name}" >
         <srcfiles dir="${class.dir}" />
      </uptodate>

      <!--
        FindBugs engine - all classes except those in the GUI
        and the Detector implementations (which are part of the core plugin).
      -->
      <jar destfile="${jar.dir}/${findbugs.jar.name}"
           basedir="${class.dir}" manifest="${findbugs.dir}/etc/MANIFEST-findbugs.MF">
        <exclude name="edu/umd/cs/findbugs/gui/**" />
        <exclude name="edu/umd/cs/findbugs/detect/*" />
        <exclude name="*.xml" />
      </jar>
    </target>

    <!--
      The core plugin. This is all of the standard bug pattern detectors.
    -->
    <target name="coreplugin" depends="init,findbugs">

      <javac srcdir="${findbugs.src.dir}" destdir="${class.dir}"
             includes="edu/umd/cs/findbugs/detect/*.java"
             source="1.5"
             compiler="com.cortexeb.Jsr14CompilerAdapter">
        <classpath refid="classpath" />
      </javac>

      <copy file="etc/findbugs.xml" todir="${class.dir}" />
      <copy file="etc/messages.xml" todir="${class.dir}" />
{'fraction_non_alphanumeric': 0.19317904993909865, 'fraction_numerical': 0.0048721071863581, 'mean_word_length': 2.665625, 'pattern_counts': {'":': 0, '<': 155, '<?xml version=': 0, '>': 155, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '6392867', 'n_tokens_mistral': 2688, 'n_tokens_neox': 2554, 'n_words': 531}