<commit_before><?xml version = "1.0" encoding="ISO-8859-1" ?>
<!-- 
 * OpenWMS, the open Warehouse Management System
 * 
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
-->
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="OpenWMS-common" default="all" basedir=".">
    <tstamp>
        <format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss 'GMT'Z" />
    </tstamp>

    <property environment="env" />
    <property file="build.properties" />

    <path id="class.path">
        <fileset dir="${deps.dir}/build">
            <include name="*.jar" />
        </fileset>
        <fileset dir="${deps.dir}/test">
            <include name="*.jar" />
        </fileset>
    </path>
    <path id="flex.classpath">
        <fileset dir="${lib.dir}">
            <include name="**/*.jar" />
        </fileset>
    </path>

    <!-- All non java files in the src directory -->
    <patternset id="all.nonjava.files">
        <include name="**/*.txt" />
        <include name="**/*.xml" />
		<include name="**/*.dtd"/>
        <include name="**/*.properties" />
    </patternset>

    <taskdef classpath="${FLEX_TASKS_JAR}" resource="flexTasks.tasks" />

    <target name="deps">
        <echo message="************************************************" />
        <echo message="Resolve dependencies..." />
        <echo message="************************************************" />
        <path id="ivy.path">
            <fileset dir="${lib.dir}/ivy" includes="**/*.jar" />
        </path>
        <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.path" />
        <ivy:configure file="${ivy.settings.file}" />
        <ivy:resolve file="${ivy.dep.file}" conf="build, test" />
        <ivy:retrieve pattern="${deps.dir}/[conf]/[artifact]-[revision].[ext]" />
    </target>

    <target name="deps-clean">
        <echo message="************************************************" />
        <echo message="Clear dependencies..." />
        <echo message="************************************************" />
        <delete>
            <fileset dir="${deps.test.dir}">
                <include name="**/*" />
            </fileset>
        </delete>
        <delete>
            <fileset dir="${deps.build.dir}">
                <include name="**/*" />
            </fileset>
        </delete>
        <antcall target="deps" />
    </target>

    <target name="initialize">
        <echo message="************************************************" />
        <echo message="Remove and create directories..." />
        <echo message="************************************************" />
        <mkdir dir="${dist.dir}" />
        <mkdir dir="${junit.reports.dir}" />
        <mkdir dir="${build.main.dir}" />
        <mkdir dir="${build.main.dir}/META-INF" />
        <mkdir dir="${build.test.dir}" />
        <mkdir dir="${build.test.dir}/META-INF" />
    </target>

    <target name="compile" depends="initialize">
        <echo message="************************************************" />
        <echo message="Compile sources in ${src.dir}..." />
        <echo message="************************************************" />
        <javac destdir="${build.main.dir}" classpathref="class.path" debug="on" deprecation="on" optimize="off" target="1.5">
            <src path="${src.dir}" />
        </javac>
        <copy todir="${build.main.dir}">
            <fileset dir="${src.dir}">
                <patternset refid="all.nonjava.files" />
            </fileset>
        </copy>
    </target>
	
	<taskdef name="gas3" classname="org.granite.generator.ant.AntJavaAs3Task"/>
	<target name="generate.as3">
	    <gas3 outputdir="client/flex/as3" >
	        <classpath>
	        	<pathelement location="${build.main.dir}" />
	        </classpath>
	        <fileset dir="${build.main.dir}">
	            <include name="org/openwms/common/domain/**/*.class"/>
	        </fileset>
	    </gas3>
	</target>

    <target name="compile-flex">
        <mkdir dir="${flex.build.dir}/META-INF" />

        <manifest file="${flex.build.dir}/META-INF/MANIFEST.MF">
            <section name="granite/swc">
                <attribute name="Implementation-Vendor" value="Granite Data Services" />
                <attribute name="Compilation-Date" value="${TODAY}" />
            </section>
        </manifest>
        <!-- Build Swcs and add Manifest -->
        <compc output="${flex.build.dir}/domainObjects.swc" use-network="false" warn-missing-namespace-decl="false" failonerror="no" logerror="yes" fork="yes">
            <source-path path-element="${flex.src.dir}" />
            <include-sources dir="${flex.src.dir}" includes="**/*.as" />
            <compiler.external-library-path dir="${env.FLEX_HOME}/frameworks/libs" append="true">
                <include name="framework.swc" />
            </compiler.external-library-path>
            <compiler.include-libraries dir="${lib.dir}/granite" append="true">
                <include name="granite.swc" />
                <include name="granite-essentials.swc" />
            </compiler.include-libraries>
        </compc>
        <zip basedir="${flex.build.dir}" update="true" keepcompression="true" destfile="${dist.dir}/domainObjects.swc" includes="META-INF/MANIFEST.MF" />
        <delete dir="${flex.build.dir}" failonerror="no" />
    </target>

    <target name="compile-tests" depends="compile">
        <echo message="************************************************" />
        <echo message="Compile sources in ${testsrc.dir}..." />
        <echo message="************************************************" />
        <javac destdir="${build.test.dir}" debug="on" deprecation="on">
            <src path="${testsrc.dir}" />
            <classpath>
                <pathelement location="${build.main.dir}" />
                <fileset dir="${deps.dir}/build">
                    <include name="*.jar" />
                </fileset>
                <fileset dir="${deps.dir}/test">
                    <include name="*.jar" />
                </fileset>
            </classpath>
        </javac>
        <copy todir="${build.test.dir}">
            <fileset dir="${testsrc.dir}">
                <patternset refid="all.nonjava.files" />
            </fileset>
        </copy>
    </target>

    <!-- ********************************* TESTS & REPORTS ********************************* -->
    <target name="junit" depends="compile, compile-tests">
        <echo message="************************************************" />
        <echo message="Running unit tests..." />
        <echo message="************************************************" />
        <delete>
            <fileset dir="${java.io.tmpdir}">
                <include name="TEST-*.xml" />
            </fileset>
        </delete>
        <junit printsummary="on" fork="true" failureproperty="failed" dir="." maxmemory="512m">
            <sysproperty key="exec.longrunning.tests" value="true" />

            <formatter type="xml" />

            <classpath>
                <path refid="class.path" />
                <pathelement location="${build.test.dir}" />
                <pathelement location="${build.main.dir}" />
            </classpath>

            <batchtest fork="yes" todir="${java.io.tmpdir}">
                <fileset dir="${build.test.dir}">
                    <include name="**/*Test.class" />
                </fileset>
            </batchtest>
        </junit>
        <mkdir dir="${junit.reports.html.dir}" />
        <mkdir dir="${junit.reports.xml.dir}" />
        <junitreport todir="${junit.reports.xml.dir}">
            <fileset dir="${java.io.tmpdir}">
                <include name="TEST-*.xml" />
            </fileset>
            <report format="frames" todir="${junit.reports.html.dir}" />
        </junitreport>
        <fail if="failed" message="One or more unit test have failed!" />
    </target>

    <path id="cobertura.classpath">
        <fileset dir="${deps.test.dir}">
            <include name="**/*.jar" />
        </fileset>
        <fileset dir="${deps.build.dir}">
            <include name="**/*.jar" />
        </fileset>
    </path>

    <taskdef classpathref="cobertura.classpath" resource="tasks.properties" />

    <target name="instrument" depends="compile-tests">
        <cobertura-instrument todir="${cobertura.instrumented.dir}" datafile="${cobertura.ser.file}">
            <fileset dir="${build.main.dir}">
                <include name="**/*.class" />
            </fileset>
        </cobertura-instrument>
    </target>

    <target name="cover-test" depends="instrument">
        <junit dir="." failureproperty="test.failure" printsummary="yes" fork="true" haltonerror="false" maxmemory="512m">
            <sysproperty key="exec.longrunning.tests" value="true" />
            <sysproperty key="net.sourceforge.cobertura.datafile" file="${cobertura.ser.file}" />

            <formatter type="xml" />

            <classpath>
                <pathelement path="${cobertura.instrumented.dir}" />
                <path refid="cobertura.classpath" />
                <pathelement path="${build.main.dir}" />
                <pathelement path="${build.test.dir}" />
            </classpath>

            <batchtest fork="yes" todir="${java.io.tmpdir}">
                <fileset dir="${build.test.dir}">
                    <include name="**/*Test.class" />
                </fileset>
            </batchtest>
        </junit>
        <mkdir dir="${junit.reports.html.dir}" />
        <mkdir dir="${junit.reports.xml.dir}" />
        <junitreport todir="${junit.reports.xml.dir}">
            <fileset dir="${java.io.tmpdir}">
                <include name="TEST-*.xml" />
            </fileset>
            <report format="frames" todir="${junit.reports.html.dir}" />
        </junitreport>
        <delete>
            <fileset dir="${java.io.tmpdir}">
                <include name="TEST-*.xml" />
            </fileset>
        </delete>
        <fail if="test.failure" message="One or more unit test have failed!" />
    </target>

    <!-- run this target to generate the coverage reports -->
    <target name="coverage-report" depends="cover-test">
        <delete dir="${cobertura.reports.coveragereport.dir}" failonerror="no" />
        <mkdir dir="${cobertura.reports.coveragereport.dir}" />
        <cobertura-report srcdir="${src.dir}" destdir="${cobertura.reports.coveragereport.dir}" datafile="${cobertura.ser.file}" />
        <delete dir="${cobertura.instrumented.dir}" failonerror="no" />
        <delete file="${cobertura.ser.file}" />
    </target>

    <target name="jar">
        <echo message="************************************************" />
        <echo message="Create jar file ${dist.dir}/${jar.file}..." />
        <echo message="************************************************" />
        <jar destfile="${dist.dir}/${jar.file}">
            <fileset dir="${build.main.dir}" />
            <manifest>
                <attribute name="Main-Class" value="" />
                <attribute name="Class-Path" value="." />
            </manifest>
        </jar>
    </target>

    <target name="jar-osgi">
        <echo message="************************************************" />
        <echo message="Create OSGi compliant jar file ${dist.dir}/${osgi-jar.file}..." />
        <echo message="************************************************" />
        <jar destfile="${dist.dir}/${osgi-jar.file}" manifest="${src.meta-inf.dir}/MANIFEST.MF">
            <fileset dir="${build.main.dir}" />
        </jar>
    </target>

    <target name="clean">
        <echo message="************************************************" />
        <echo message="Clean" />
        <echo message="************************************************" />
        <delete dir="${cobertura.reports.coveragereport.dir}" failonerror="no" />
        <delete dir="${build.main.dir}" />
        <delete dir="${build.test.dir}" />
        <delete dir="${cobertura.instrumented.dir}" failonerror="no" />
        <delete dir="${junit.reports.dir}" failonerror="no" />
        <delete>
            <fileset dir="${dist.dir}">
                <include name="**/*" />
            </fileset>
        </delete>
    </target>

    <target name="build" depends="clean, initialize, compile, jar, jar-osgi, compile-flex">
        <echo message="************************************************" />
        <echo message="Building..." />
        <echo message="************************************************" />
    </target>
    <target name="all" depends="clean, initialize, deps, compile, coverage-report, compile-flex, jar, jar-osgi">
        <echo message="************************************************" />
        <echo message="Building nightly build" />
        <echo message="************************************************" />
    </target>
</project><commit_msg>Ignore ActionScript generated files and removed flex compile from default build target<commit_after><?xml version = "1.0" encoding="ISO-8859-1" ?>
<!-- 
 * OpenWMS, the open Warehouse Management System
 * 
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
-->
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="OpenWMS-common" default="all" basedir=".">
    <tstamp>
        <format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss 'GMT'Z" />
    </tstamp>

    <property environment="env" />
    <property file="build.properties" />

    <path id="class.path">
        <fileset dir="${deps.dir}/build">
            <include name="*.jar" />
        </fileset>
        <fileset dir="${deps.dir}/test">
            <include name="*.jar" />
        </fileset>
    </path>
    <path id="flex.classpath">
        <fileset dir="${lib.dir}">
            <include name="**/*.jar" />
        </fileset>
    </path>

    <!-- All non java files in the src directory -->
    <patternset id="all.nonjava.files">
        <include name="**/*.txt" />
        <include name="**/*.xml" />
		<include name="**/*.dtd"/>
        <include name="**/*.properties" />
    </patternset>

    <taskdef classpath="${FLEX_TASKS_JAR}" resource="flexTasks.tasks" />

    <target name="deps">
        <echo message="************************************************" />
        <echo message="Resolve dependencies..." />
        <echo message="************************************************" />
        <path id="ivy.path">
            <fileset dir="${lib.dir}/ivy" includes="**/*.jar" />
        </path>
        <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.path" />
        <ivy:configure file="${ivy.settings.file}" />
        <ivy:resolve file="${ivy.dep.file}" conf="build, test" />
        <ivy:retrieve pattern="${deps.dir}/[conf]/[artifact]-[revision].[ext]" />
    </target>

    <target name="deps-clean">
        <echo message="************************************************" />
        <echo message="Clear dependencies..." />
        <echo message="************************************************" />
        <delete>
            <fileset dir="${deps.test.dir}">
                <include name="**/*" />
            </fileset>
        </delete>
        <delete>
            <fileset dir="${deps.build.dir}">
                <include name="**/*" />
            </fileset>
        </delete>
        <antcall target="deps" />
    </target>

    <target name="initialize">
        <echo message="************************************************" />
        <echo message="Remove and create directories..." />
        <echo message="************************************************" />
        <mkdir dir="${dist.dir}" />
        <mkdir dir="${junit.reports.dir}" />
        <mkdir dir="${build.main.dir}" />
        <mkdir dir="${build.main.dir}/META-INF" />
        <mkdir dir="${build.test.dir}" />
        <mkdir dir="${build.test.dir}/META-INF" />
    </target>

    <target name="compile" depends="initialize">
        <echo message="************************************************" />
        <echo message="Compile sources in ${src.dir}..." />
        <echo message="************************************************" />
        <javac destdir="${build.main.dir}" classpathref="class.path" debug="on" deprecation="on" optimize="off" target="1.5">
            <src path="${src.dir}" />
        </javac>
        <copy todir="${build.main.dir}">
            <fileset dir="${src.dir}">
                <patternset refid="all.nonjava.files" />
            </fileset>
        </copy>
    </target>
	
	<taskdef name="gas3" classname="org.granite.generator.ant.AntJavaAs3Task"/>
	<target name="generate.as3">
	    <gas3 outputdir="client/flex/as3" >
	        <classpath>
	        	<pathelement location="${build.main.dir}" />
	        </classpath>
	        <fileset dir="${build.main.dir}">
	            <include name="org/openwms/common/domain/**/*.class"/>
	        </fileset>
	    </gas3>
	</target>

    <target name="compile-flex">
        <mkdir dir="${flex.build.dir}/META-INF" />

        <manifest file="${flex.build.dir}/META-INF/MANIFEST.MF">
            <section name="granite/swc">
                <attribute name="Implementation-Vendor" value="Granite Data Services" />
                <attribute name="Compilation-Date" value="${TODAY}" />
            </section>
        </manifest>
        <!-- Build Swcs and add Manifest -->
        <compc output="${flex.build.dir}/domainObjects.swc" use-network="false" warn-missing-namespace-decl="false" failonerror="no" logerror="yes" fork="yes">
            <source-path path-element="${flex.src.dir}" />
            <include-sources dir="${flex.src.dir}" includes="**/*.as" />
            <compiler.external-library-path dir="${env.FLEX_HOME}/frameworks/libs" append="true">
                <include name="framework.swc" />
            </compiler.external-library-path>
            <compiler.include-libraries dir="${lib.dir}/granite" append="true">
                <include name="granite.swc" />
                <include name="granite-essentials.swc" />
            </compiler.include-libraries>
        </compc>
        <zip basedir="${flex.build.dir}" update="true" keepcompression="true" destfile="${dist.dir}/domainObjects.swc" includes="META-INF/MANIFEST.MF" />
        <delete dir="${flex.build.dir}" failonerror="no" />
    </target>

    <target name="compile-tests" depends="compile">
        <echo message="************************************************" />
        <echo message="Compile sources in ${testsrc.dir}..." />
        <echo message="************************************************" />
        <javac destdir="${build.test.dir}" debug="on" deprecation="on">
            <src path="${testsrc.dir}" />
            <classpath>
                <pathelement location="${build.main.dir}" />
                <fileset dir="${deps.dir}/build">
                    <include name="*.jar" />
                </fileset>
                <fileset dir="${deps.dir}/test">
                    <include name="*.jar" />
                </fileset>
            </classpath>
        </javac>
        <copy todir="${build.test.dir}">
            <fileset dir="${testsrc.dir}">
                <patternset refid="all.nonjava.files" />
            </fileset>
        </copy>
    </target>

    <!-- ********************************* TESTS & REPORTS ********************************* -->
    <target name="junit" depends="compile, compile-tests">
        <echo message="************************************************" />
        <echo message="Running unit tests..." />
        <echo message="************************************************" />
        <delete>
            <fileset dir="${java.io.tmpdir}">
                <include name="TEST-*.xml" />
            </fileset>
        </delete>
        <junit printsummary="on" fork="true" failureproperty="failed" dir="." maxmemory="512m">
            <sysproperty key="exec.longrunning.tests" value="true" />

            <formatter type="xml" />

            <classpath>
                <path refid="class.path" />
                <pathelement location="${build.test.dir}" />
                <pathelement location="${build.main.dir}" />
            </classpath>

            <batchtest fork="yes" todir="${java.io.tmpdir}">
                <fileset dir="${build.test.dir}">
                    <include name="**/*Test.class" />
                </fileset>
            </batchtest>
        </junit>
        <mkdir dir="${junit.reports.html.dir}" />
        <mkdir dir="${junit.reports.xml.dir}" />
        <junitreport todir="${junit.reports.xml.dir}">
            <fileset dir="${java.io.tmpdir}">
                <include name="TEST-*.xml" />
            </fileset>
            <report format="frames" todir="${junit.reports.html.dir}" />
        </junitreport>
        <fail if="failed" message="One or more unit test have failed!" />
    </target>

    <path id="cobertura.classpath">
        <fileset dir="${deps.test.dir}">
            <include name="**/*.jar" />
        </fileset>
        <fileset dir="${deps.build.dir}">
            <include name="**/*.jar" />
        </fileset>
    </path>

    <taskdef classpathref="cobertura.classpath" resource="tasks.properties" />

    <target name="instrument" depends="compile-tests">
        <cobertura-instrument todir="${cobertura.instrumented.dir}" datafile="${cobertura.ser.file}">
            <fileset dir="${build.main.dir}">
                <include name="**/*.class" />
            </fileset>
        </cobertura-instrument>
    </target>

    <target name="cover-test" depends="instrument">
        <junit dir="." failureproperty="test.failure" printsummary="yes" fork="true" haltonerror="false" maxmemory="512m">
            <sysproperty key="exec.longrunning.tests" value="true" />
            <sysproperty key="net.sourceforge.cobertura.datafile" file="${cobertura.ser.file}" />

            <formatter type="xml" />

            <classpath>
                <pathelement path="${cobertura.instrumented.dir}" />
                <path refid="cobertura.classpath" />
                <pathelement path="${build.main.dir}" />
                <pathelement path="${build.test.dir}" />
            </classpath>

            <batchtest fork="yes" todir="${java.io.tmpdir}">
                <fileset dir="${build.test.dir}">
                    <include name="**/*Test.class" />
                </fileset>
            </batchtest>
        </junit>
        <mkdir dir="${junit.reports.html.dir}" />
        <mkdir dir="${junit.reports.xml.dir}" />
        <junitreport todir="${junit.reports.xml.dir}">
            <fileset dir="${java.io.tmpdir}">
                <include name="TEST-*.xml" />
            </fileset>
            <report format="frames" todir="${junit.reports.html.dir}" />
        </junitreport>
        <delete>
            <fileset dir="${java.io.tmpdir}">
                <include name="TEST-*.xml" />
            </fileset>
        </delete>
        <fail if="test.failure" message="One or more unit test have failed!" />
    </target>

    <!-- run this target to generate the coverage reports -->
    <target name="coverage-report" depends="cover-test">
        <delete dir="${cobertura.reports.coveragereport.dir}" failonerror="no" />
        <mkdir dir="${cobertura.reports.coveragereport.dir}" />
        <cobertura-report srcdir="${src.dir}" destdir="${cobertura.reports.coveragereport.dir}" datafile="${cobertura.ser.file}" />
        <delete dir="${cobertura.instrumented.dir}" failonerror="no" />
        <delete file="${cobertura.ser.file}" />
    </target>

    <target name="jar">
        <echo message="************************************************" />
        <echo message="Create jar file ${dist.dir}/${jar.file}..." />
        <echo message="************************************************" />
        <jar destfile="${dist.dir}/${jar.file}">
            <fileset dir="${build.main.dir}" />
            <manifest>
                <attribute name="Main-Class" value="" />
                <attribute name="Class-Path" value="." />
            </manifest>
        </jar>
    </target>

    <target name="jar-osgi">
        <echo message="************************************************" />
        <echo message="Create OSGi compliant jar file ${dist.dir}/${osgi-jar.file}..." />
        <echo message="************************************************" />
        <jar destfile="${dist.dir}/${osgi-jar.file}" manifest="${src.meta-inf.dir}/MANIFEST.MF">
            <fileset dir="${build.main.dir}" />
        </jar>
    </target>

    <target name="clean">
        <echo message="************************************************" />
        <echo message="Clean" />
        <echo message="************************************************" />
        <delete dir="${cobertura.reports.coveragereport.dir}" failonerror="no" />
        <delete dir="${build.main.dir}" />
        <delete dir="${build.test.dir}" />
        <delete dir="${cobertura.instrumented.dir}" failonerror="no" />
        <delete dir="${junit.reports.dir}" failonerror="no" />
        <delete>
            <fileset dir="${dist.dir}">
                <include name="**/*" />
            </fileset>
        </delete>
    </target>

    <target name="build" depends="clean, initialize, compile, jar, jar-osgi, compile-flex">
        <echo message="************************************************" />
        <echo message="Building..." />
        <echo message="************************************************" />
    </target>
    <target name="all" depends="clean, initialize, deps, compile, coverage-report, jar, jar-osgi">
        <echo message="************************************************" />
        <echo message="Building nightly build" />
        <echo message="************************************************" />
    </target>
</project>
{'fraction_non_alphanumeric': 0.26355811170726057, 'fraction_numerical': 0.0016211834639286678, 'mean_word_length': 2.3455578512396693, 'pattern_counts': {'":': 0, '<': 549, '<?xml version=': 0, '>': 549, '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': '2130878', 'n_tokens_mistral': 7446, 'n_tokens_neox': 7093, 'n_words': 1243}