<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 1999-2010 <NAME> - LICENSE: Apache 2.0 -->
<project basedir="." default="compile" name="orientdb-tests">
    <property name="project.jar-classpath" value="orientdb-client-${version}.jar orientdb-client-${version}.jar"/>
    <property name="project.src" value="src/test/java"/>
    <property name="project.build" value="target/test-classes"/>

    <import file="../_base/base-build.xml"/>

    <taskdef resource="testngtasks" classpath="lib/testng-5.10-jdk15.jar"/>


    <target name="test"
            depends="test-memory, test-local, test-plocal, test-remote">
    </target>

    <target name="test-init">
        <pathconvert property="project.root.dir" targetos="unix">
        <path location="."/>
        </pathconvert>
        <pathconvert property="test.path" targetos="unix">
        <path location="../${orient.path}/databases/demo"/>
        </pathconvert>
        <pathconvert property="project.root.dir" targetos="windows" dirsep="/">
        <path location="."/>
        </pathconvert>
        <pathconvert property="test.path" targetos="windows" dirsep="/">
            <path location="../${orient.path}/databases/demo"/>
        </pathconvert>
        <echo>Normalized paths</echo>
        <echo>project.root.dir=${project.root.dir}</echo>
        <echo>test.path=${test.path}</echo>


        <copy todir="${project.build}">
            <fileset dir="src/test/java">
                <include name="**/*.xml"/>
            </fileset>
        </copy>

        <replace dir="${project.build}/com/orientechnologies/orient/test/database/auto">
            <include name="*-test-db-from-scratch.xml"/>
            <exclude name="paginated-local-test-db-from-scratch.xml"/>

            <replacefilter token="@PATH@" value="${test.path}"/>
            <replacefilter token="@URL@" value="local:${test.path}"/>
            <replacefilter token="@TESTPATH@" value="${project.root.dir}"/>
        </replace>

        <replace dir="${project.build}/com/orientechnologies/orient/test/database/auto">
            <include name="paginated-local-test-db-from-scratch.xml"/>

            <replacefilter token="@PATH@" value="${test.path}"/>
            <replacefilter token="@URL@" value="plocal:${test.path}"/>
            <replacefilter token="@TESTPATH@" value="${project.root.dir}"/>
        </replace>

    </target>

    <target name="test-memory" depends="test-init">
        <echo>EXECUTING TESTS USING MEMORY DATABASE: memory:demo</echo>
        <testng outputDir="target/test-output" haltOnFailure="true" verbose="2">
            <jvmarg value="-Xmx2G"/>
            <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/>
            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <xmlfileset dir="${project.build}/com/orientechnologies/orient/test/database/auto"
                        includes="memory-test-db-from-scratch.xml"/>
        </testng>
    </target>


    <target name="test-local" depends="test-init">
        <echo>EXECUTING TESTS USING LOCAL DATABASE: local:${orient.path}/databases/demo</echo>
        <testng outputDir="target/test-output" haltOnFailure="true" verbose="2">
            <jvmarg value="-Xmx2G"/>
            <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/>
            <jvmarg value="-Dstorage.lockTimeout=60000"/>

            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <xmlfileset dir="${project.build}/com/orientechnologies/orient/test/database/auto"
                        includes="local-test-db-from-scratch.xml"/>
        </testng>
    </target>

    <target name="test-plocal" depends="test-init">
        <echo>EXECUTING TESTS USING PAGINATED LOCAL DATABASE: plocal:${orient.path}/databases/demo</echo>
        <testng outputDir="target/test-output" haltOnFailure="true" verbose="2">
            <jvmarg value="-Xmx2G"/>
            <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/>
            <jvmarg value="-Dstorage.lockTimeout=60000"/>
            <jvmarg value="-Dstorage.makeFullCheckpointAfterCreate=false"/>
            <jvmarg value="-Dstorage.makeFullCheckpointAfterClusterCreate=false"/>
            <jvmarg value="-Dstorage.wal.syncOnPageFlush=false"/>
            <jvmarg value="-Dstorage.configuration.syncOnUpdate=false"/>
            <jvmarg value="-Dindex.flushAfterCreate=false"/>

            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <xmlfileset dir="${project.build}/com/orientechnologies/orient/test/database/auto"
                        includes="paginated-local-test-db-from-scratch.xml"/>
        </testng>
    </target>


    <target name="test-local-lh" depends="test-init">
        <echo>EXECUTING TESTS USING LOCAL DATABASE and LH data cluster: local:${orient.path}/databases/demo</echo>
        <testng outputDir="target/test-output" haltOnFailure="true" verbose="2">
            <jvmarg value="-Xmx2G"/>
            <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/>
            <jvmarg value="-Dfile.cluster.useLHPEPS=true"/>
            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <xmlfileset dir="${project.build}/com/orientechnologies/orient/test/database/auto"
                        includes="local-test-db-from-scratch.xml"/>
        </testng>
    </target>


    <target name="test-remote" depends="test-init">
        <echo>STARTING REMOTE ORIENTDB SERVER INSTANCE...</echo>
        <exec dir="${orient.path}/bin" executable="cmd" spawn="true" osfamily="windows">
            <env key="JAVA_OPTS"
                 value="-XX:+HeapDumpOnOutOfMemoryError -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.port=10005 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dstorage.makeFullCheckpointAfterCreate=false -Dstorage.makeFullCheckpointAfterClusterCreate=false -Dstorage.wal.syncOnPageFlush=false -Dstorage.configuration.syncOnUpdate=false -Dindex.flushAfterCreate=false"/>
            <env key="CONFIG_FILE" value="${basedir}/src/test/resources/orientdb-server-config.xml"/>
            <arg value="/c start server.bat"/>
        </exec>

        <exec dir="${orient.path}/bin" executable="sh" spawn="true" osfamily="unix">
            <env key="JAVA_OPTS"
                 value="-XX:+HeapDumpOnOutOfMemoryError -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.port=10005 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dstorage.makeFullCheckpointAfterCreate=false -Dstorage.makeFullCheckpointAfterClusterCreate=false -Dstorage.wal.syncOnPageFlush=false -Dstorage.configuration.syncOnUpdate=false -Dindex.flushAfterCreate=false"/>
            <env key="CONFIG_FILE" value="${basedir}/src/test/resources/orientdb-server-config.xml"/>
            <arg value="./server.sh"/>
        </exec>

        <echo>WAITING FOR SERVER STARTUP...</echo>
        <sleep seconds="6"/>

        <echo>EXECUTING TESTS USING REMOTE DATABASE: remote:localhost/demo</echo>
        <testng outputDir="target/test-output" haltOnFailure="true">
            <jvmarg value="-Xmx2G"/>
            <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/>
            <jvmarg line="-Djava.rmi.server.hostname=localhost -Dorientdb.config.file=${basedir}/src/test/resources/orientdb-server-config.xml"/>
            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <xmlfileset dir="${project.build}/com/orientechnologies/orient/test/database/auto"
                        includes="remote-test-db-from-scratch.xml"/>
        </testng>

        <echo>SHUTDOWNING THE SERVER...</echo>
        <exec dir="${orient.path}/bin" executable="cmd" spawn="true" osfamily="windows">
            <env key="CONFIG_FILE" value="${basedir}/src/test/resources/orientdb-server-config.xml"/>
            <arg value="/c shutdown.bat"/>
        </exec>

        <exec dir="${orient.path}/bin" executable="sh" spawn="true" osfamily="unix">
            <env key="CONFIG_FILE" value="${basedir}/src/test/resources/orientdb-server-config.xml"/>
            <arg value="./shutdown.sh"/>
        </exec>
    </target>

    <target name="stress-test">
        <echo>MASSIVE INSERT 1,000,000 FLAT RECORDS</echo>
        <java classname="com.orientechnologies.orient.test.database.speed.LocalCreateFlatSpeedTest" fork="yes">
            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <sysproperty key="url" value="local:../${orient.path}/databases/demo"/>
            <jvmarg value="-server"/>
        </java>

        <echo>MASSIVE INSERT 1,000,000 DOCUMENT RECORDS</echo>
        <java classname="com.orientechnologies.orient.test.database.speed.LocalCreateDocumentSpeedTest" fork="yes">
            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <sysproperty key="url" value="local:../${orient.path}/databases/demo"/>
            <jvmarg value="-server"/>
        </java>

        <echo>MASSIVE INSERT 20,000 POJOs</echo>
        <java classname="com.orientechnologies.orient.test.database.speed.LocalCreateObjectSpeedTest" fork="yes">
            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <sysproperty key="url" value="local:../${orient.path}/databases/demo"/>
            <jvmarg value="-server"/>
        </java>

    </target>

    <target name="reports" depends="test">
        <mkdir dir=""/>
        <junitreport todir="target/test-output">
            <fileset dir="target/test-output">
                <include name="*.xml"/>
            </fileset>
            <report format="noframes" todir="target/test-output"/>
        </junitreport>

    </target>

</project>
<commit_msg>Issue with wrong db path was fixed.<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 1999-2010 <NAME> - LICENSE: Apache 2.0 -->
<project basedir="." default="compile" name="orientdb-tests">
    <property name="project.jar-classpath" value="orientdb-client-${version}.jar orientdb-client-${version}.jar"/>
    <property name="project.src" value="src/test/java"/>
    <property name="project.build" value="target/test-classes"/>

    <import file="../_base/base-build.xml"/>

    <taskdef resource="testngtasks" classpath="lib/testng-5.10-jdk15.jar"/>


    <target name="test"
            depends="test-memory, test-local, test-plocal, test-remote">
    </target>

    <target name="test-init">
        <pathconvert property="project.root.dir" targetos="unix">
        <path location="."/>
        </pathconvert>
        <pathconvert property="test.path" targetos="unix">
            <path location="${orient.path}/databases/demo"/>
        </pathconvert>
        <pathconvert property="project.root.dir" targetos="windows" dirsep="/">
        <path location="."/>
        </pathconvert>
        <pathconvert property="test.path" targetos="windows" dirsep="/">
            <path location="${orient.path}/databases/demo"/>
        </pathconvert>
        <echo>Normalized paths</echo>
        <echo>project.root.dir=${project.root.dir}</echo>
        <echo>test.path=${test.path}</echo>


        <copy todir="${project.build}">
            <fileset dir="src/test/java">
                <include name="**/*.xml"/>
            </fileset>
        </copy>

        <replace dir="${project.build}/com/orientechnologies/orient/test/database/auto">
            <include name="*-test-db-from-scratch.xml"/>
            <exclude name="paginated-local-test-db-from-scratch.xml"/>

            <replacefilter token="@PATH@" value="${test.path}"/>
            <replacefilter token="@URL@" value="local:${test.path}"/>
            <replacefilter token="@TESTPATH@" value="${project.root.dir}"/>
        </replace>

        <replace dir="${project.build}/com/orientechnologies/orient/test/database/auto">
            <include name="paginated-local-test-db-from-scratch.xml"/>

            <replacefilter token="@PATH@" value="${test.path}"/>
            <replacefilter token="@URL@" value="plocal:${test.path}"/>
            <replacefilter token="@TESTPATH@" value="${project.root.dir}"/>
        </replace>

    </target>

    <target name="test-memory" depends="test-init">
        <echo>EXECUTING TESTS USING MEMORY DATABASE: memory:demo</echo>
        <testng outputDir="target/test-output" haltOnFailure="true" verbose="2">
            <jvmarg value="-Xmx2G"/>
            <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/>
            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <xmlfileset dir="${project.build}/com/orientechnologies/orient/test/database/auto"
                        includes="memory-test-db-from-scratch.xml"/>
        </testng>
    </target>


    <target name="test-local" depends="test-init">
        <echo>EXECUTING TESTS USING LOCAL DATABASE: local:${orient.path}/databases/demo</echo>
        <testng outputDir="target/test-output" haltOnFailure="true" verbose="2">
            <jvmarg value="-Xmx2G"/>
            <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/>
            <jvmarg value="-Dstorage.lockTimeout=60000"/>

            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <xmlfileset dir="${project.build}/com/orientechnologies/orient/test/database/auto"
                        includes="local-test-db-from-scratch.xml"/>
        </testng>
    </target>

    <target name="test-plocal" depends="test-init">
        <echo>EXECUTING TESTS USING PAGINATED LOCAL DATABASE: plocal:${orient.path}/databases/demo</echo>
        <testng outputDir="target/test-output" haltOnFailure="true" verbose="2">
            <jvmarg value="-Xmx2G"/>
            <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/>
            <jvmarg value="-Dstorage.lockTimeout=60000"/>
            <jvmarg value="-Dstorage.makeFullCheckpointAfterCreate=false"/>
            <jvmarg value="-Dstorage.makeFullCheckpointAfterClusterCreate=false"/>
            <jvmarg value="-Dstorage.wal.syncOnPageFlush=false"/>
            <jvmarg value="-Dstorage.configuration.syncOnUpdate=false"/>
            <jvmarg value="-Dindex.flushAfterCreate=false"/>

            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <xmlfileset dir="${project.build}/com/orientechnologies/orient/test/database/auto"
                        includes="paginated-local-test-db-from-scratch.xml"/>
        </testng>
    </target>


    <target name="test-local-lh" depends="test-init">
        <echo>EXECUTING TESTS USING LOCAL DATABASE and LH data cluster: local:${orient.path}/databases/demo</echo>
        <testng outputDir="target/test-output" haltOnFailure="true" verbose="2">
            <jvmarg value="-Xmx2G"/>
            <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/>
            <jvmarg value="-Dfile.cluster.useLHPEPS=true"/>
            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <xmlfileset dir="${project.build}/com/orientechnologies/orient/test/database/auto"
                        includes="local-test-db-from-scratch.xml"/>
        </testng>
    </target>


    <target name="test-remote" depends="test-init">
        <echo>STARTING REMOTE ORIENTDB SERVER INSTANCE...</echo>
        <exec dir="${orient.path}/bin" executable="cmd" spawn="true" osfamily="windows">
            <env key="JAVA_OPTS"
                 value="-XX:+HeapDumpOnOutOfMemoryError -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.port=10005 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dstorage.makeFullCheckpointAfterCreate=false -Dstorage.makeFullCheckpointAfterClusterCreate=false -Dstorage.wal.syncOnPageFlush=false -Dstorage.configuration.syncOnUpdate=false -Dindex.flushAfterCreate=false"/>
            <env key="CONFIG_FILE" value="${basedir}/src/test/resources/orientdb-server-config.xml"/>
            <arg value="/c start server.bat"/>
        </exec>

        <exec dir="${orient.path}/bin" executable="sh" spawn="true" osfamily="unix">
            <env key="JAVA_OPTS"
                 value="-XX:+HeapDumpOnOutOfMemoryError -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.port=10005 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dstorage.makeFullCheckpointAfterCreate=false -Dstorage.makeFullCheckpointAfterClusterCreate=false -Dstorage.wal.syncOnPageFlush=false -Dstorage.configuration.syncOnUpdate=false -Dindex.flushAfterCreate=false"/>
            <env key="CONFIG_FILE" value="${basedir}/src/test/resources/orientdb-server-config.xml"/>
            <arg value="./server.sh"/>
        </exec>

        <echo>WAITING FOR SERVER STARTUP...</echo>
        <sleep seconds="6"/>

        <echo>EXECUTING TESTS USING REMOTE DATABASE: remote:localhost/demo</echo>
        <testng outputDir="target/test-output" haltOnFailure="true">
            <jvmarg value="-Xmx2G"/>
            <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/>
            <jvmarg line="-Djava.rmi.server.hostname=localhost -Dorientdb.config.file=${basedir}/src/test/resources/orientdb-server-config.xml"/>
            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <xmlfileset dir="${project.build}/com/orientechnologies/orient/test/database/auto"
                        includes="remote-test-db-from-scratch.xml"/>
        </testng>

        <echo>SHUTDOWNING THE SERVER...</echo>
        <exec dir="${orient.path}/bin" executable="cmd" spawn="true" osfamily="windows">
            <env key="CONFIG_FILE" value="${basedir}/src/test/resources/orientdb-server-config.xml"/>
            <arg value="/c shutdown.bat"/>
        </exec>

        <exec dir="${orient.path}/bin" executable="sh" spawn="true" osfamily="unix">
            <env key="CONFIG_FILE" value="${basedir}/src/test/resources/orientdb-server-config.xml"/>
            <arg value="./shutdown.sh"/>
        </exec>
    </target>

    <target name="stress-test">
        <echo>MASSIVE INSERT 1,000,000 FLAT RECORDS</echo>
        <java classname="com.orientechnologies.orient.test.database.speed.LocalCreateFlatSpeedTest" fork="yes">
            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <sysproperty key="url" value="local:../${orient.path}/databases/demo"/>
            <jvmarg value="-server"/>
        </java>

        <echo>MASSIVE INSERT 1,000,000 DOCUMENT RECORDS</echo>
        <java classname="com.orientechnologies.orient.test.database.speed.LocalCreateDocumentSpeedTest" fork="yes">
            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <sysproperty key="url" value="local:../${orient.path}/databases/demo"/>
            <jvmarg value="-server"/>
        </java>

        <echo>MASSIVE INSERT 20,000 POJOs</echo>
        <java classname="com.orientechnologies.orient.test.database.speed.LocalCreateObjectSpeedTest" fork="yes">
            <classpath>
                <pathelement location="${project.build}"/>
                <fileset dir="${global.lib}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
            <sysproperty key="url" value="local:../${orient.path}/databases/demo"/>
            <jvmarg value="-server"/>
        </java>

    </target>

    <target name="reports" depends="test">
        <mkdir dir=""/>
        <junitreport todir="target/test-output">
            <fileset dir="target/test-output">
                <include name="*.xml"/>
            </fileset>
            <report format="noframes" todir="target/test-output"/>
        </junitreport>

    </target>

</project>

{'fraction_non_alphanumeric': 0.16050540226805965, 'fraction_numerical': 0.005982677024734351, 'mean_word_length': 2.22845200345921, 'pattern_counts': {'":': 0, '<': 415, '<?xml version=': 2, '>': 415, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 44}, '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': '2526385', 'n_tokens_mistral': 6814, 'n_tokens_neox': 6317, 'n_words': 924}