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

<!--
Copyright 2011, <NAME>.

Licensed 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.
-->

<project name="mongo-java-tailable-cursor" default="usage" basedir="./" xmlns:aspectj="antlib:org.aspectj" xmlns:artifact="antlib:org.apache.maven.artifact.ant">

    <!-- ******************************************************************* -->
    <!-- Set the base attributes.                                            -->
    <!-- ******************************************************************* -->

    <property name="dir.build" value="build"/>
    <property name="dir.build.java" value="${dir.build}/java/classes"/>
    <property name="dir.build.release" value="${dir.build}/mongo-java-tailable-cursor"/>

    <property name="dir.src" value="src"/>
    <property name="dir.src.java" value="src/main"/>
    <property name="dir.src.java.unit" value="src/unit"/>
    <property name="dir.src.java.test" value="src/test"/>
    <property name="dir.lib" value="lib"/>
    <property name="dir.conf" value="conf"/>

    <property file="build.properties" prefix="build.conf"/>

    <property environment="env"/>

    <path id="classpath.all">
        <fileset dir="${dir.lib}"><include name="*.jar"/></fileset>
    </path>

    <path id="classpath.cp"><pathelement location="${dir.build.java}"/></path>

    <!-- ******************************************************************* -->
    <!-- Set the Maven attributes.                                           -->
    <!-- ******************************************************************* -->

    <property name="groupId" value="com.deftlabs"/>
    <property name="artifactId" value="mongo-java-tailable-cursor"/>

    <property name="maven-snapshots-repository-id" value="sonatype-nexus-snapshots-deftlabs"/>
    <property name="maven-snapshots-repository-url" value="https://oss.sonatype.org/content/repositories/snapshots"/>
    <property name="maven-staging-repository-id" value="sonatype-nexus-staging-deftlabs"/>
    <property name="maven-staging-repository-url" value="https://oss.sonatype.org/service/local/staging/deploy/maven2/"/>

    <!-- ******************************************************************* -->
    <!-- Remove the build directory.                                         -->
    <!-- ******************************************************************* -->

    <target name="clean">
        <delete dir="${dir.build}"/>
        <delete file="conf/maven-mongo-java-tailable-cursor.xml.asc"/>
    </target>

    <!-- ******************************************************************* -->
    <!-- Compile the java classes.                                           -->
    <!-- ******************************************************************* -->

    <target name="compile">
        <mkdir dir="${dir.build.java}"/>
        <javac  destdir="${dir.build.java}"
                target="${build.conf.javac.source}"
                debug="true" encoding="UTF-8"
                classpathref="classpath.cp"
                source="${build.conf.javac.source}"
                includeantruntime="false"
                debuglevel="lines,vars,source">

            <src path="${dir.src.java}"/>
            <src path="${dir.src.java.unit}"/>
            <src path="${dir.src.java.test}"/>
            <compilerarg value="-Xlint:all,-fallthrough"/>
            <classpath refid="classpath.all"/>
        </javac>
    </target>

    <!-- ******************************************************************* -->
    <!-- Create the jar file.                                                -->
    <!-- ******************************************************************* -->

    <target name="jar" depends="clean, unit, compile">
        <mkdir dir="${dir.build}/dist"/>

        <copy file="src/main/META-INF/MANIFEST.MF" tofile="${dir.build}/MANIFEST.MF" filtering="true">
            <filterset><filter token="VERSION" value="${build.conf.lib.version}"/></filterset>
        </copy>

        <jar destfile="${dir.build}/dist/mongo-java-tailable-cursor.jar" basedir="${dir.build.java}" manifest="${dir.build}/MANIFEST.MF"></jar>

       <copy file="conf/maven-mongo-java-tailable-cursor.xml" tofile="${dir.build}/maven-mongo-java-tailable-cursor.xml" filtering="true">
            <filterset><filter token="VERSION" value="${build.conf.lib.version}"/></filterset>
        </copy>

    </target>

    <!-- ******************************************************************* -->
    <!-- Create the additional jars.                                         -->
    <!-- ******************************************************************* -->

    <target name="jar.all" depends="jar, javadocs">

        <jar jarfile="${dir.build}/dist/mongo-java-tailable-cursor-sources-${build.conf.lib.version}.jar"><fileset dir="src/main"/></jar>
        <jar jarfile="${dir.build}/dist/mongo-java-tailable-cursor-javadoc-${build.conf.lib.version}.jar"><fileset dir="${dir.build}/javadocs"/></jar>
        <copy file="${dir.build}/dist/mongo-java-tailable-cursor.jar" tofile="${dir.build}/dist/mongo-java-tailable-cursor-${build.conf.lib.version}.jar"/>

    </target>

    <!-- ******************************************************************* -->
    <!-- Run the isolated unit tests.                                        -->
    <!-- ******************************************************************* -->

    <target name="unit" depends="compile">
        <junit fork="yes" haltonfailure="true">
            <jvmarg value="-Duser.timezone=GMT"/>
            <jvmarg value="-Dfile.encoding=UTF-8"/>
            <classpath refid="classpath.all"/>

            <classpath>
                <pathelement path="${dir.build.java}"/>
                <pathelement path="${dir.conf}"/>
            </classpath>

            <formatter type="brief" usefile="false"/>

            <batchtest todir=".">
                <fileset dir="${dir.build.java}">
                    <include name="**/*UnitTests.class"/>
                </fileset>
            </batchtest>
        </junit>
    </target>

    <!-- ******************************************************************* -->
    <!-- Run the integration tests. Server must be running to work.          -->
    <!-- ******************************************************************* -->

    <target name="test" depends="compile">

        <junit fork="yes" haltonfailure="true">
            <jvmarg value="-Duser.timezone=GMT"/>
            <jvmarg value="-Dfile.encoding=UTF-8"/>
            <classpath refid="classpath.all"/>

            <classpath>
                <pathelement path="${dir.build.java}"/>
                <pathelement path="${dir.conf}"/>
            </classpath>

            <formatter type="brief" usefile="false"/>

            <batchtest todir=".">
                <fileset dir="${dir.build.java}">
                    <include name="**/*IntTests.class"/>
                </fileset>
            </batchtest>
        </junit>
    </target>

    <!-- ******************************************************************* -->
    <!-- Run the standalone threaded tests. Server must be running to work.  -->
    <!-- ******************************************************************* -->

    <target name="test-thread" depends="compile">

        <java classname="com.deftlabs.lock.mongo.StandaloneThreadLockTests">
            <arg value="-Duser.timezone=GMT"/>
            <arg value="-Dfile.encoding=UTF-8"/>
            <classpath refid="classpath.all"/>

            <classpath>
                <pathelement path="${dir.build.java}"/>
                <pathelement path="${dir.conf}"/>
            </classpath>

        </java>
    </target>

    <!-- ******************************************************************* -->
    <!-- Generate the Javadocs.                                              -->
    <!-- ******************************************************************* -->

    <target name="javadocs" depends="compile" description="Generate Javadocs">
        <delete dir="${dir.build}/javadocs/"/>

        <javadoc
            packagenames="com.deftlabs.lock.mongo"
            excludepackagenames="com.deftlabs.lock.mongo.impl"
            sourcepath="src/main/"
            defaultexcludes="yes"
            destdir="${dir.build}/javadocs"
            author="true"
            version="true"
            source="1.5"
            use="true"
            access="protected">

            <link href="http://download.oracle.com/javase/1.5.0/docs/api/" />
            <classpath refid="classpath.all"/>
        </javadoc>

    </target>

    <!-- ******************************************************************* -->
    <!-- Deploy to Maven repository.                                         -->
    <!-- ******************************************************************* -->

    <target name="maven.snapshot" depends="jar.all" description="Deploy a snapshot version to Maven snapshot repository">
        <artifact:mvn>
            <arg value="org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy-file"/>
            <arg value="-Durl=${maven-snapshots-repository-url}"/>
            <arg value="-DrepositoryId=${maven-snapshots-repository-id}"/>
            <arg value="-DpomFile=${dir.build}/maven-mongo-java-tailable-cursor.xml"/>
            <arg value="-Dfile=${dir.build}/dist/mongo-java-tailable-cursor-${build.conf.lib.version}.jar"/>
        </artifact:mvn>
    </target>

    <!-- ******************************************************************* -->
    <!-- Stage in the Maven repository.                                      -->
    <!-- ******************************************************************* -->

    <target name="maven.stage" depends="jar.all" description="Deploy release version to Maven staging repository">

        <artifact:mvn>
            <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file"/>
            <arg value="-Durl=${maven-staging-repository-url}"/>
            <arg value="-DrepositoryId=${maven-staging-repository-id}"/>
            <arg value="-DpomFile=${dir.build}/maven-mongo-java-tailable-cursor.xml"/>
            <arg value="-Dfile=${dir.build}/dist/mongo-java-tailable-cursor-${build.conf.lib.version}.jar"/>
            <arg value="-Dkeyname=665C1184"/>
            <arg value="-Pgpg-deftlabs"/>
        </artifact:mvn>

        <artifact:mvn>
            <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file"/>
            <arg value="-Durl=${maven-staging-repository-url}"/>
            <arg value="-DrepositoryId=${maven-staging-repository-id}"/>
            <arg value="-DpomFile=${dir.build}/maven-mongo-java-tailable-cursor.xml"/>
            <arg value="-Dfile=${dir.build}/dist/mongo-java-tailable-cursor-sources-${build.conf.lib.version}.jar"/>
            <arg value="-Dclassifier=sources"/>
            <arg value="-Dkeyname=665C1184"/>
            <arg value="-Pgpg-deftlabs"/>
        </artifact:mvn>

        <artifact:mvn>
            <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file"/>
            <arg value="-Durl=${maven-staging-repository-url}"/>
            <arg value="-DrepositoryId=${maven-staging-repository-id}"/>
            <arg value="-DpomFile=${dir.build}/maven-mongo-java-tailable-cursor.xml"/>
            <arg value="-Dfile=${dir.build}/dist/mongo-java-tailable-cursor-javadoc-${build.conf.lib.version}.jar"/>
            <arg value="-Dclassifier=javadoc"/>
            <arg value="-Dkeyname=665C1184"/>
            <arg value="-Pgpg-deftlabs"/>
        </artifact:mvn>

    </target>

    <!-- ******************************************************************* -->
    <!-- Describe the build file usage.                                      -->
    <!-- ******************************************************************* -->

    <target name="usage">
<echo>
----------------------------------------

- Compile the Java files ......................... compile

- Create the jar file ............................ jar

- Create ALL of the build jar files .............. jar.all

- Clean the source tree .......................... clean

- Run the unit tests ............................. unit

- Run the integration tests ...................... test

- Generate the Javadocs .......................... javadocs

----------------------------------------
</echo>
    </target>

    <!-- ******************************************************************* -->

</project>
<commit_msg>updated standalone test.<commit_after><?xml version="1.0"?>

<!--
Copyright 2011, Deft Labs.

Licensed 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.
-->

<project name="mongo-java-tailable-cursor" default="usage" basedir="./" xmlns:aspectj="antlib:org.aspectj" xmlns:artifact="antlib:org.apache.maven.artifact.ant">

    <!-- ******************************************************************* -->
    <!-- Set the base attributes.                                            -->
    <!-- ******************************************************************* -->

    <property name="dir.build" value="build"/>
    <property name="dir.build.java" value="${dir.build}/java/classes"/>
    <property name="dir.build.release" value="${dir.build}/mongo-java-tailable-cursor"/>

    <property name="dir.src" value="src"/>
    <property name="dir.src.java" value="src/main"/>
    <property name="dir.src.java.unit" value="src/unit"/>
    <property name="dir.src.java.test" value="src/test"/>
    <property name="dir.lib" value="lib"/>
    <property name="dir.conf" value="conf"/>

    <property file="build.properties" prefix="build.conf"/>

    <property environment="env"/>

    <path id="classpath.all">
        <fileset dir="${dir.lib}"><include name="*.jar"/></fileset>
    </path>

    <path id="classpath.cp"><pathelement location="${dir.build.java}"/></path>

    <!-- ******************************************************************* -->
    <!-- Set the Maven attributes.                                           -->
    <!-- ******************************************************************* -->

    <property name="groupId" value="com.deftlabs"/>
    <property name="artifactId" value="mongo-java-tailable-cursor"/>

    <property name="maven-snapshots-repository-id" value="sonatype-nexus-snapshots-deftlabs"/>
    <property name="maven-snapshots-repository-url" value="https://oss.sonatype.org/content/repositories/snapshots"/>
    <property name="maven-staging-repository-id" value="sonatype-nexus-staging-deftlabs"/>
    <property name="maven-staging-repository-url" value="https://oss.sonatype.org/service/local/staging/deploy/maven2/"/>

    <!-- ******************************************************************* -->
    <!-- Remove the build directory.                                         -->
    <!-- ******************************************************************* -->

    <target name="clean">
        <delete dir="${dir.build}"/>
        <delete file="conf/maven-mongo-java-tailable-cursor.xml.asc"/>
    </target>

    <!-- ******************************************************************* -->
    <!-- Compile the java classes.                                           -->
    <!-- ******************************************************************* -->

    <target name="compile">
        <mkdir dir="${dir.build.java}"/>
        <javac  destdir="${dir.build.java}"
                target="${build.conf.javac.source}"
                debug="true" encoding="UTF-8"
                classpathref="classpath.cp"
                source="${build.conf.javac.source}"
                includeantruntime="false"
                debuglevel="lines,vars,source">

            <src path="${dir.src.java}"/>
            <src path="${dir.src.java.unit}"/>
            <src path="${dir.src.java.test}"/>
            <compilerarg value="-Xlint:all,-fallthrough"/>
            <classpath refid="classpath.all"/>
        </javac>
    </target>

    <!-- ******************************************************************* -->
    <!-- Create the jar file.                                                -->
    <!-- ******************************************************************* -->

    <target name="jar" depends="clean, unit, compile">
        <mkdir dir="${dir.build}/dist"/>

        <copy file="src/main/META-INF/MANIFEST.MF" tofile="${dir.build}/MANIFEST.MF" filtering="true">
            <filterset><filter token="VERSION" value="${build.conf.lib.version}"/></filterset>
        </copy>

        <jar destfile="${dir.build}/dist/mongo-java-tailable-cursor.jar" basedir="${dir.build.java}" manifest="${dir.build}/MANIFEST.MF"></jar>

       <copy file="conf/maven-mongo-java-tailable-cursor.xml" tofile="${dir.build}/maven-mongo-java-tailable-cursor.xml" filtering="true">
            <filterset><filter token="VERSION" value="${build.conf.lib.version}"/></filterset>
        </copy>

    </target>

    <!-- ******************************************************************* -->
    <!-- Create the additional jars.                                         -->
    <!-- ******************************************************************* -->

    <target name="jar.all" depends="jar, javadocs">

        <jar jarfile="${dir.build}/dist/mongo-java-tailable-cursor-sources-${build.conf.lib.version}.jar"><fileset dir="src/main"/></jar>
        <jar jarfile="${dir.build}/dist/mongo-java-tailable-cursor-javadoc-${build.conf.lib.version}.jar"><fileset dir="${dir.build}/javadocs"/></jar>
        <copy file="${dir.build}/dist/mongo-java-tailable-cursor.jar" tofile="${dir.build}/dist/mongo-java-tailable-cursor-${build.conf.lib.version}.jar"/>

    </target>

    <!-- ******************************************************************* -->
    <!-- Run the isolated unit tests.                                        -->
    <!-- ******************************************************************* -->

    <target name="unit" depends="compile">
        <junit fork="yes" haltonfailure="true">
            <jvmarg value="-Duser.timezone=GMT"/>
            <jvmarg value="-Dfile.encoding=UTF-8"/>
            <classpath refid="classpath.all"/>

            <classpath>
                <pathelement path="${dir.build.java}"/>
                <pathelement path="${dir.conf}"/>
            </classpath>

            <formatter type="brief" usefile="false"/>

            <batchtest todir=".">
                <fileset dir="${dir.build.java}">
                    <include name="**/*UnitTests.class"/>
                </fileset>
            </batchtest>
        </junit>
    </target>

    <!-- ******************************************************************* -->
    <!-- Run the integration tests. Server must be running to work.          -->
    <!-- ******************************************************************* -->

    <target name="test" depends="compile">

        <junit fork="yes" haltonfailure="true">
            <jvmarg value="-Duser.timezone=GMT"/>
            <jvmarg value="-Dfile.encoding=UTF-8"/>
            <classpath refid="classpath.all"/>

            <classpath>
                <pathelement path="${dir.build.java}"/>
                <pathelement path="${dir.conf}"/>
            </classpath>

            <formatter type="brief" usefile="false"/>

            <batchtest todir=".">
                <fileset dir="${dir.build.java}">
                    <include name="**/*IntTests.class"/>
                </fileset>
            </batchtest>
        </junit>
    </target>

    <!-- ******************************************************************* -->
    <!-- Run the standalone threaded tests. Server must be running to work.  -->
    <!-- ******************************************************************* -->

    <target name="test-thread" depends="compile">

        <java classname="com.deftlabs.cursor.mongo.StandaloneTailableCursorTests">
            <arg value="-Duser.timezone=GMT"/>
            <arg value="-Dfile.encoding=UTF-8"/>
            <classpath refid="classpath.all"/>

            <classpath>
                <pathelement path="${dir.build.java}"/>
                <pathelement path="${dir.conf}"/>
            </classpath>

        </java>
    </target>

    <!-- ******************************************************************* -->
    <!-- Generate the Javadocs.                                              -->
    <!-- ******************************************************************* -->

    <target name="javadocs" depends="compile" description="Generate Javadocs">
        <delete dir="${dir.build}/javadocs/"/>

        <javadoc
            packagenames="com.deftlabs.lock.mongo"
            excludepackagenames="com.deftlabs.lock.mongo.impl"
            sourcepath="src/main/"
            defaultexcludes="yes"
            destdir="${dir.build}/javadocs"
            author="true"
            version="true"
            source="1.5"
            use="true"
            access="protected">

            <link href="http://download.oracle.com/javase/1.5.0/docs/api/" />
            <classpath refid="classpath.all"/>
        </javadoc>

    </target>

    <!-- ******************************************************************* -->
    <!-- Deploy to Maven repository.                                         -->
    <!-- ******************************************************************* -->

    <target name="maven.snapshot" depends="jar.all" description="Deploy a snapshot version to Maven snapshot repository">
        <artifact:mvn>
            <arg value="org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy-file"/>
            <arg value="-Durl=${maven-snapshots-repository-url}"/>
            <arg value="-DrepositoryId=${maven-snapshots-repository-id}"/>
            <arg value="-DpomFile=${dir.build}/maven-mongo-java-tailable-cursor.xml"/>
            <arg value="-Dfile=${dir.build}/dist/mongo-java-tailable-cursor-${build.conf.lib.version}.jar"/>
        </artifact:mvn>
    </target>

    <!-- ******************************************************************* -->
    <!-- Stage in the Maven repository.                                      -->
    <!-- ******************************************************************* -->

    <target name="maven.stage" depends="jar.all" description="Deploy release version to Maven staging repository">

        <artifact:mvn>
            <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file"/>
            <arg value="-Durl=${maven-staging-repository-url}"/>
            <arg value="-DrepositoryId=${maven-staging-repository-id}"/>
            <arg value="-DpomFile=${dir.build}/maven-mongo-java-tailable-cursor.xml"/>
            <arg value="-Dfile=${dir.build}/dist/mongo-java-tailable-cursor-${build.conf.lib.version}.jar"/>
            <arg value="-Dkeyname=665C1184"/>
            <arg value="-Pgpg-deftlabs"/>
        </artifact:mvn>

        <artifact:mvn>
            <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file"/>
            <arg value="-Durl=${maven-staging-repository-url}"/>
            <arg value="-DrepositoryId=${maven-staging-repository-id}"/>
            <arg value="-DpomFile=${dir.build}/maven-mongo-java-tailable-cursor.xml"/>
            <arg value="-Dfile=${dir.build}/dist/mongo-java-tailable-cursor-sources-${build.conf.lib.version}.jar"/>
            <arg value="-Dclassifier=sources"/>
            <arg value="-Dkeyname=665C1184"/>
            <arg value="-Pgpg-deftlabs"/>
        </artifact:mvn>

        <artifact:mvn>
            <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file"/>
            <arg value="-Durl=${maven-staging-repository-url}"/>
            <arg value="-DrepositoryId=${maven-staging-repository-id}"/>
            <arg value="-DpomFile=${dir.build}/maven-mongo-java-tailable-cursor.xml"/>
            <arg value="-Dfile=${dir.build}/dist/mongo-java-tailable-cursor-javadoc-${build.conf.lib.version}.jar"/>
            <arg value="-Dclassifier=javadoc"/>
            <arg value="-Dkeyname=665C1184"/>
            <arg value="-Pgpg-deftlabs"/>
        </artifact:mvn>

    </target>

    <!-- ******************************************************************* -->
    <!-- Describe the build file usage.                                      -->
    <!-- ******************************************************************* -->

    <target name="usage">
<echo>
----------------------------------------

- Compile the Java files ......................... compile

- Create the jar file ............................ jar

- Create ALL of the build jar files .............. jar.all

- Clean the source tree .......................... clean

- Run the unit tests ............................. unit

- Run the integration tests ...................... test

- Generate the Javadocs .......................... javadocs

----------------------------------------
</echo>
    </target>

    <!-- ******************************************************************* -->

</project>

{'fraction_non_alphanumeric': 0.31061362414561094, 'fraction_numerical': 0.003763151831656555, 'mean_word_length': 2.3487205863443488, 'pattern_counts': {'":': 0, '<': 410, '<?xml version=': 2, '>': 410, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 20}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 34, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3647228', 'n_tokens_mistral': 6939, 'n_tokens_neox': 6428, 'n_words': 1051}