<commit_before><!--
   Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<!-- $Id$ -->
<project name="commons-pool" default="test" basedir=".">

   <target name="init">
      <tstamp/>

      <!-- read properties from the build.properties, if any -->
      <property name="component-propfile" value="${basedir}/build.properties"/>
      <property file="${component-propfile}"/>

      <!-- read properties from the commons build.properties, if any -->
      <property name="commons-propfile" value="${basedir}/../build.properties"/>
      <property file="${commons-propfile}"/>

      <!-- read properties from the ${user.home}/propfile, if any -->
      <property name="user-propfile" value="${user.home}/build.properties"/>
      <property file="${user-propfile}"/>

      <!-- Repository base path -->
      <property name="repository" value="${user.home}/.m2/repository"/>

      <!-- The directories corresponding to your necessary dependencies -->
      <property name="junit.version" value="4.8.2"/>
      <property name="junit.home" value="${repository}/junit/junit/${junit.version}"/>
      <property name="junit.jar" value="${junit.home}/junit-${junit.version}.jar"/>

      <!-- command line classpath, if any -->
      <property name="cp" value=""/>

      <!-- now combine the classpaths -->
      <property name="classpath" value="${cp}"/>

      <property name="name" value="commons-pool"/>
      <property name="title" value="Apache Commons Object Pooling Package"/>
      <property name="version" value="2.0-SNAPSHOT"/>
      <property name="package" value="org.apache.commons.pool.*"/>

      <property name="src.dir" value="${basedir}/src"/>
      <property name="src.java.dir" value="${src.dir}/java"/>
      <property name="src.test.dir" value="${src.dir}/test"/>
      <property name="build.dir" value="${basedir}/build"/>
      <property name="build.classes.dir" value="${build.dir}/classes"/>
      <property name="build.test-classes.dir" value="${build.dir}/test-classes"/>
      <property name="dist.dir" value="${basedir}/dist"/>
      <property name="dist.jar" value="${dist.dir}/${name}.jar"/>

      <property name="test.failonerror" value="true" /> 
     
      <property name="javadoc.dir" value="${dist.dir}/docs/api"/>
      <property name="javadoc.bottom" value="&lt;small&gt;Copyright &amp;copy; 2001-2003 Apache Software Foundation. Documenation generated ${TODAY}&lt;/small&gt;."/>
      <property name="javadoc.overview" value="${src.java.dir}/org/apache/commons/pool/overview.html" />

      <property name="javac.optimize" value="false"/>
      <property name="javac.debug" value="true"/>
      <property name="javac.deprecation" value="true"/>
      <property name="javac.target.version" value="1.5"/>
      <property name="javac.src.version" value="1.5"/>
   	
      <!-- Construct unit test classpath -->
      <path id="test.classpath">
         <pathelement location="${build.classes.dir}" /> 
         <pathelement location="${build.test-classes.dir}" /> 
         <pathelement path="${classpath}" /> 
         <pathelement location="${junit.jar}"/>
      </path>

   </target>

   <!-- ######################################################### -->

   <target name="clean" depends="init" description="removes generated files">
      <delete dir="${build.dir}"/>
      <delete dir="${dist.dir}"/>
   </target>

   <target name="javadoc" depends="init" description="generates javadocs">
      <mkdir dir="${javadoc.dir}"/>
      <javadoc packagenames="org.*"
               sourcepath="${src.java.dir}"
               classpath="${classpath}"
               destdir="${javadoc.dir}"
               windowtitle="${title}"
               doctitle="${title}"
               bottom="${javadoc.bottom}"
               overview="${javadoc.overview}"
               public="true"
               version="true"
               author="true"
               splitindex="false"
               nodeprecated="true"
               nodeprecatedlist="true"
               notree="true"
               noindex="false"
               nohelp="true"
               nonavbar="false"
               serialwarn="false"
               source="${javac.src.version}">
          <link href="http://java.sun.com/j2se/1.5.0/docs/api"/>
      </javadoc>
   </target>

   <!-- ######################################################### -->

   <target name="compile" depends="init" description="compiles source files">
      <mkdir dir="${build.classes.dir}"/>
      <javac destdir="${build.classes.dir}"
             srcdir="${src.java.dir}"
             classpath="${classpath}"
             debug="${javac.debug}"
             deprecation="${javac.deprecation}"
             optimize="${javac.optimize}"
             target="${javac.target.version}"
             source="${javac.src.version}"/>
   </target>
   
   <target name="compile-test" depends="compile">
      <mkdir dir="${build.test-classes.dir}"/>
      <javac destdir="${build.test-classes.dir}"
             srcdir="${src.test.dir}"
             debug="${javac.debug}"
             deprecation="${javac.deprecation}"
             optimize="${javac.optimize}"
             target="${javac.target.version}"
             source="${javac.src.version}">
         <classpath refid="test.classpath"/>
      </javac>
   </target>

   <target name="test" depends="compile-test" description="runs (junit) unit tests">
      <echo message="Because we need to sleep to test the eviction threads, this takes a little while (around 2 minutes)..."/>
      <junit printsummary="true" showoutput="true" fork="yes" haltonerror="${test.failonerror}">
        <classpath refid="test.classpath"/>
        <!-- If test.entry is defined, run a single test, otherwise run all valid tests -->
        <test name="${test.entry}" if="test.entry"/>
        <batchtest todir="${build.dir}/ant-reports" unless="test.entry">
          <fileset dir="${src.test.dir}">
            <include name="**/Test*.java"/>
            <exclude name="org/apache/commons/pool/impl/TestSoftRefOutOfMemory.java"/>
            <!-- abstract classes -->
            <exclude name="**/TestObjectPool.java"/>
            <exclude name="**/TestObjectPoolFactory.java"/>
            <exclude name="**/TestKeyedObjectPool.java"/>
            <exclude name="**/TestKeyedObjectPoolFactory.java"/>
          </fileset>
        </batchtest>
      </junit>
   </target>

   <target name="build-jar" depends="compile">
      <mkdir dir="${dist.dir}"/>
      <jar jarfile="${dist.jar}">
         <fileset dir="${build.classes.dir}"/>
         <metainf dir="${basedir}" includes="LICENSE.txt,NOTICE.txt"/>
         <manifest>
            <attribute name="Built-By" value="${user.name}"/><commit_msg>fixed artifact name and package in ant build<commit_after><!--
   Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<!-- $Id$ -->
<project name="commons-pool" default="test" basedir=".">

   <target name="init">
      <tstamp/>

      <!-- read properties from the build.properties, if any -->
      <property name="component-propfile" value="${basedir}/build.properties"/>
      <property file="${component-propfile}"/>

      <!-- read properties from the commons build.properties, if any -->
      <property name="commons-propfile" value="${basedir}/../build.properties"/>
      <property file="${commons-propfile}"/>

      <!-- read properties from the ${user.home}/propfile, if any -->
      <property name="user-propfile" value="${user.home}/build.properties"/>
      <property file="${user-propfile}"/>

      <!-- Repository base path -->
      <property name="repository" value="${user.home}/.m2/repository"/>

      <!-- The directories corresponding to your necessary dependencies -->
      <property name="junit.version" value="4.8.2"/>
      <property name="junit.home" value="${repository}/junit/junit/${junit.version}"/>
      <property name="junit.jar" value="${junit.home}/junit-${junit.version}.jar"/>

      <!-- command line classpath, if any -->
      <property name="cp" value=""/>

      <!-- now combine the classpaths -->
      <property name="classpath" value="${cp}"/>

      <property name="name" value="commons-pool2"/>
      <property name="title" value="Apache Commons Object Pooling Package"/>
      <property name="version" value="2.0-SNAPSHOT"/>
      <property name="package" value="org.apache.commons.pool2.*"/>

      <property name="src.dir" value="${basedir}/src"/>
      <property name="src.java.dir" value="${src.dir}/java"/>
      <property name="src.test.dir" value="${src.dir}/test"/>
      <property name="build.dir" value="${basedir}/build"/>
      <property name="build.classes.dir" value="${build.dir}/classes"/>
      <property name="build.test-classes.dir" value="${build.dir}/test-classes"/>
      <property name="dist.dir" value="${basedir}/dist"/>
      <property name="dist.jar" value="${dist.dir}/${name}.jar"/>

      <property name="test.failonerror" value="true" /> 
     
      <property name="javadoc.dir" value="${dist.dir}/docs/api"/>
      <property name="javadoc.bottom" value="&lt;small&gt;Copyright &amp;copy; 2001-2003 Apache Software Foundation. Documenation generated ${TODAY}&lt;/small&gt;."/>
      <property name="javadoc.overview" value="${src.java.dir}/org/apache/commons/pool/overview.html" />

      <property name="javac.optimize" value="false"/>
      <property name="javac.debug" value="true"/>
      <property name="javac.deprecation" value="true"/>
      <property name="javac.target.version" value="1.5"/>
      <property name="javac.src.version" value="1.5"/>
   	
      <!-- Construct unit test classpath -->
      <path id="test.classpath">
         <pathelement location="${build.classes.dir}" /> 
         <pathelement location="${build.test-classes.dir}" /> 
         <pathelement path="${classpath}" /> 
         <pathelement location="${junit.jar}"/>
      </path>

   </target>

   <!-- ######################################################### -->

   <target name="clean" depends="init" description="removes generated files">
      <delete dir="${build.dir}"/>
      <delete dir="${dist.dir}"/>
   </target>

   <target name="javadoc" depends="init" description="generates javadocs">
      <mkdir dir="${javadoc.dir}"/>
      <javadoc packagenames="org.*"
               sourcepath="${src.java.dir}"
               classpath="${classpath}"
               destdir="${javadoc.dir}"
               windowtitle="${title}"
               doctitle="${title}"
               bottom="${javadoc.bottom}"
               overview="${javadoc.overview}"
               public="true"
               version="true"
               author="true"
               splitindex="false"
               nodeprecated="true"
               nodeprecatedlist="true"
               notree="true"
               noindex="false"
               nohelp="true"
               nonavbar="false"
               serialwarn="false"
               source="${javac.src.version}">
          <link href="http://java.sun.com/j2se/1.5.0/docs/api"/>
      </javadoc>
   </target>

   <!-- ######################################################### -->

   <target name="compile" depends="init" description="compiles source files">
      <mkdir dir="${build.classes.dir}"/>
      <javac destdir="${build.classes.dir}"
             srcdir="${src.java.dir}"
             classpath="${classpath}"
             debug="${javac.debug}"
             deprecation="${javac.deprecation}"
             optimize="${javac.optimize}"
             target="${javac.target.version}"
             source="${javac.src.version}"/>
   </target>
   
   <target name="compile-test" depends="compile">
      <mkdir dir="${build.test-classes.dir}"/>
      <javac destdir="${build.test-classes.dir}"
             srcdir="${src.test.dir}"
             debug="${javac.debug}"
             deprecation="${javac.deprecation}"
             optimize="${javac.optimize}"
             target="${javac.target.version}"
             source="${javac.src.version}">
         <classpath refid="test.classpath"/>
      </javac>
   </target>

   <target name="test" depends="compile-test" description="runs (junit) unit tests">
      <echo message="Because we need to sleep to test the eviction threads, this takes a little while (around 2 minutes)..."/>
      <junit printsummary="true" showoutput="true" fork="yes" haltonerror="${test.failonerror}">
        <classpath refid="test.classpath"/>
        <!-- If test.entry is defined, run a single test, otherwise run all valid tests -->
        <test name="${test.entry}" if="test.entry"/>
        <batchtest todir="${build.dir}/ant-reports" unless="test.entry">
          <fileset dir="${src.test.dir}">
            <include name="**/Test*.java"/>
            <exclude name="org/apache/commons/pool2/impl/TestSoftRefOutOfMemory.java"/>
            <!-- abstract classes -->
            <exclude name="**/TestObjectPool.java"/>
            <exclude name="**/TestObjectPoolFactory.java"/>
            <exclude name="**/TestKeyedObjectPool.java"/>
            <exclude name="**/TestKeyedObjectPoolFactory.java"/>
          </fileset>
        </batchtest>
      </junit>
   </target>

   <target name="build-jar" depends="compile">
      <mkdir dir="${dist.dir}"/>
      <jar jarfile="${dist.jar}">
         <fileset dir="${build.classes.dir}"/>
         <metainf dir="${basedir}" includes="LICENSE.txt,NOTICE.txt"/>
         <manifest>
            <attribute name="Built-By" value="${user.name}"/>
{'fraction_non_alphanumeric': 0.185809906291834, 'fraction_numerical': 0.003815261044176707, 'mean_word_length': 2.73525, 'pattern_counts': {'":': 0, '<': 205, '<?xml version=': 0, '>': 205, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, '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': '37968', 'n_tokens_mistral': 4120, 'n_tokens_neox': 4018, 'n_words': 910}