<commit_before><?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="all" name="xal.core">
	<import file="../common.xml"/>
    
	<description>Builds Open XAL Core</description>
	
    <target name="init">
        <property name="srcroot" value="xal" />
        <mkdir dir="${build.root}" />
    </target>
    
    
    <!-- Build the core and run the tests. -->
    <target name="run-tests" depends="all">
        <subant target="run-tests">
            <fileset dir="test">
                <include name="build.xml" />
            </fileset>
        </subant>
    </target>
	
	
	<!-- Macro to compile the core XAL classes using the specified compiler flag -->
	<macrodef name="compile-flagged">
		<attribute name="flag" default="-Xlint:none" />
		<sequential>
			<mkdir dir="${build.compile.core.root}" />
			<javac debug="true" source="1.6" target="1.6" includeAntRuntime="no" deprecation="true" destdir="${build.compile.core.root}" srcdir="${srcroot}" sourcepath="">
				<classpath>
					<pathelement location="${build.compile.core.root}" />
					<pathelement location="${build.jar.root}/xal-lib.jar" />
				</classpath>
				<compilerarg value="@{flag}" />
			</javac>
                        
            <copy todir="${build.compile.core.root}/resources/xal">
                <fileset dir="resources" />
            </copy>

		</sequential>
	</macrodef>
	
	
	<!-- Compile the core XAL classes using the lint flag to show some recommended warnings -->
    <target name="compile-warn" depends="init, jar-lib" >
		<compile-flagged flag="-Xlint:unchecked" />
    </target>
	
	
	<!-- Compile the core XAL classes using the lint flag to show all recommended warnings -->
    <target name="compile-warn-all" depends="init, jar-lib" >
		<compile-flagged flag="-Xlint" />
    </target>
	
	
	<!-- Compile the core XAL classes reporting only mandated warnings -->
    <target name="compile" depends="init, jar-lib" >
		<compile-flagged />
    </target>
    
	
	<!-- Jar the core XAL classes -->
    <target  name="jar-core" depends="init, compile">
        <mkdir dir="${build.jar.root}" />
        <jar compress="true" jarfile="${build.jar.root}/xal-core.jar" index="true">
			<fileset dir="${build.compile.core.root}" includes="xal/**/*">
				<exclude name="**/datasource/" />
			</fileset>
            
			<fileset dir="${build.compile.core.root}/resources" />
       </jar>
    </target>
    
	
	<!-- Jar the core datasource placeholder classes -->
    <target  name="jar-datasource" depends="init, compile">
        <mkdir dir="${build.jar.root}" />
        <jar compress="true" jarfile="${build.jar.root}/xal-datasource.jar" index="true">
			<fileset dir="${build.root}/compile">
				<exclude name="**/*" />
				<include name="**/datasource/" />
			</fileset>
       </jar>
    </target>
	
	
	<!-- Join the third party jars into a common external jar file -->
    <target name="jar-lib" depends="init">
        <mkdir dir="${build.jar.root}" />
        <jar compress="true" jarfile="${build.jar.root}/xal-lib.jar" index="true" duplicate="preserve">
			<zipgroupfileset dir="lib">
				<patternset>
					<include name="*.jar" />
				</patternset>
			</zipgroupfileset>
        </jar>
    </target>
	
	
	<!-- merge the external jars and build XAL core -->
    <target name="all" depends="jar-lib,jar-core,jar-datasource" description="Build everything." >
        <echo message="Everything built. " />
    </target>
	
	
	<!-- Build everything and install in the the installation location -->
    <target name="install" depends="all" description="Build everything and install in the installation location." >
        <mkdir dir="${install.root}" />
		<copy todir="${install.root}">
			<fileset dir="${build.jar.root}">
                <include name="xal-core.jar" />
                <include name="xal-lib.jar" />
            </fileset>
		</copy>
        <echo message="XAL built and installed. " />
    </target>
	
	
	<!-- Build everything and install in the the installation location -->
    <target name="purge-install" depends="init" description="Build everything and install in the installation location." >
        <delete file="${install.root}/xal-core.jar" quiet="true" />
        <delete file="${install.root}/xal-lib.jar" quiet="true" />
        <echo message="Purged core installation!"/>
    </target>
	
	
	<!-- Javadoc the XAL core -->
    <target name="doc" depends="init" description="Javadoc XAL core." >
        <mkdir dir="${build.root}/javadoc" />
        <javadoc destdir="${build.root}/javadoc" packagenames="xal.*" author="false" version="false" maxmemory="512m">
            <sourcepath>
                <pathelement location="." />
            </sourcepath>
            <classpath>
                <pathelement location="${build.compile.core.root}" />
                <pathelement location="${build.jar.root}/xal-lib.jar" />
            </classpath>
        </javadoc>
    </target>
	
	
	<!-- clean compiled products -->
    <target name="clean" depends="init" description="Clean all build products." >
        <delete dir="${build.compile.core.root}" />
        <delete file="${build.jar.root}/xal-core.jar" quiet="true" />
        <delete file="${build.jar.root}/xal-lib.jar" quiet="true" />
        <delete file="${build.jar.root}/xal-datasource.jar" quiet="true" />
        
        <echo message="Core cleaned!" />
    </target>
	
	
	<!-- provide guidance on the various targets -->
    <target name="help">
		<echo message="Build the XAL core" />
		<echo message="Usage: ant [ant options] target1 [target2 | target3 | ... ]" />
		<echo message="" />
		<echo message="  where target(s) can be:" />
		<echo message="    help ....................... Print this message." />
		<echo message="    all ........................ Compile the core XAL classes and assemble the jar products." />
		<echo message="    clean ...................... Clean compiled classes and build products" />
		<echo message="    compile .................... Compile the core XAL classes reporting only mandated warnings." />
		<echo message="    compile-warn: .............. Compile the core XAL classes reporting unchecked conversions." />
		<echo message="    compile-warn-all: .......... Compile the core XAL classes reporting all recommended warnings." />
		<echo message="    doc: ....................... Generate documentation for the core." />
		<echo message="    install: ................... Install the core products intended for distribution." />
		<echo message="    jar-lib: ................... Assemble the external jar files into a single library, xal-lib.jar" />
		<echo message="    jar-datasource: ............ Assemble the datasource classes and resources into xal-datasource.jar" />
		<echo message="    jar-core: .................. Assemble the core XAL classes and resources into xal-core.jar" />
		<echo message="    purge-install: ............. Purge the core installation." />
		<echo message="    run-tests .................. Build and run the test cases." />
    </target>
</project>
<commit_msg>Remove datasource build features as this will no longer be necessary.<commit_after><?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="all" name="xal.core">
	<import file="../common.xml"/>
    
	<description>Builds Open XAL Core</description>
	
    <target name="init">
        <property name="srcroot" value="xal" />
        <mkdir dir="${build.root}" />
    </target>
    
    
    <!-- Build the core and run the tests. -->
    <target name="run-tests" depends="all">
        <subant target="run-tests">
            <fileset dir="test">
                <include name="build.xml" />
            </fileset>
        </subant>
    </target>
	
	
	<!-- Macro to compile the core XAL classes using the specified compiler flag -->
	<macrodef name="compile-flagged">
		<attribute name="flag" default="-Xlint:none" />
		<sequential>
			<mkdir dir="${build.compile.core.root}" />
			<javac debug="true" source="1.6" target="1.6" includeAntRuntime="no" deprecation="true" destdir="${build.compile.core.root}" srcdir="${srcroot}" sourcepath="">
				<classpath>
					<pathelement location="${build.compile.core.root}" />
					<pathelement location="${build.jar.root}/xal-lib.jar" />
				</classpath>
				<compilerarg value="@{flag}" />
			</javac>
                        
            <copy todir="${build.compile.core.root}/resources/xal">
                <fileset dir="resources" />
            </copy>

		</sequential>
	</macrodef>
	
	
	<!-- Compile the core XAL classes using the lint flag to show some recommended warnings -->
    <target name="compile-warn" depends="init, jar-lib" >
		<compile-flagged flag="-Xlint:unchecked" />
    </target>
	
	
	<!-- Compile the core XAL classes using the lint flag to show all recommended warnings -->
    <target name="compile-warn-all" depends="init, jar-lib" >
		<compile-flagged flag="-Xlint" />
    </target>
	
	
	<!-- Compile the core XAL classes reporting only mandated warnings -->
    <target name="compile" depends="init, jar-lib" >
		<compile-flagged />
    </target>
    
	
	<!-- Jar the core XAL classes -->
    <target  name="jar-core" depends="init, compile">
        <mkdir dir="${build.jar.root}" />
        <jar compress="true" jarfile="${build.jar.root}/xal-core.jar" index="true">
			<fileset dir="${build.compile.core.root}" includes="xal/**/*">
			</fileset>
            
			<fileset dir="${build.compile.core.root}/resources" />
       </jar>
    </target>
	
	
	<!-- Join the third party jars into a common external jar file -->
    <target name="jar-lib" depends="init">
        <mkdir dir="${build.jar.root}" />
        <jar compress="true" jarfile="${build.jar.root}/xal-lib.jar" index="true" duplicate="preserve">
			<zipgroupfileset dir="lib">
				<patternset>
					<include name="*.jar" />
				</patternset>
			</zipgroupfileset>
        </jar>
    </target>
	
	
	<!-- merge the external jars and build XAL core -->
    <target name="all" depends="jar-lib,jar-core" description="Build everything." >
        <echo message="Everything built. " />
    </target>
	
	
	<!-- Build everything and install in the the installation location -->
    <target name="install" depends="all" description="Build everything and install in the installation location." >
        <mkdir dir="${install.root}" />
		<copy todir="${install.root}">
			<fileset dir="${build.jar.root}">
                <include name="xal-core.jar" />
                <include name="xal-lib.jar" />
            </fileset>
		</copy>
        <echo message="XAL built and installed. " />
    </target>
	
	
	<!-- Build everything and install in the the installation location -->
    <target name="purge-install" depends="init" description="Build everything and install in the installation location." >
        <delete file="${install.root}/xal-core.jar" quiet="true" />
        <delete file="${install.root}/xal-lib.jar" quiet="true" />
        <echo message="Purged core installation!"/>
    </target>
	
	
	<!-- Javadoc the XAL core -->
    <target name="doc" depends="init" description="Javadoc XAL core." >
        <mkdir dir="${build.root}/javadoc" />
        <javadoc destdir="${build.root}/javadoc" packagenames="xal.*" author="false" version="false" maxmemory="512m">
            <sourcepath>
                <pathelement location="." />
            </sourcepath>
            <classpath>
                <pathelement location="${build.compile.core.root}" />
                <pathelement location="${build.jar.root}/xal-lib.jar" />
            </classpath>
        </javadoc>
    </target>
	
	
	<!-- clean compiled products -->
    <target name="clean" depends="init" description="Clean all build products." >
        <delete dir="${build.compile.core.root}" />
        <delete file="${build.jar.root}/xal-core.jar" quiet="true" />
        <delete file="${build.jar.root}/xal-lib.jar" quiet="true" />
        
        <echo message="Core cleaned!" />
    </target>
	
	
	<!-- provide guidance on the various targets -->
    <target name="help">
		<echo message="Build the XAL core" />
		<echo message="Usage: ant [ant options] target1 [target2 | target3 | ... ]" />
		<echo message="" />
		<echo message="  where target(s) can be:" />
		<echo message="    help ....................... Print this message." />
		<echo message="    all ........................ Compile the core XAL classes and assemble the jar products." />
		<echo message="    clean ...................... Clean compiled classes and build products" />
		<echo message="    compile .................... Compile the core XAL classes reporting only mandated warnings." />
		<echo message="    compile-warn: .............. Compile the core XAL classes reporting unchecked conversions." />
		<echo message="    compile-warn-all: .......... Compile the core XAL classes reporting all recommended warnings." />
		<echo message="    doc: ....................... Generate documentation for the core." />
		<echo message="    install: ................... Install the core products intended for distribution." />
		<echo message="    jar-lib: ................... Assemble the external jar files into a single library, xal-lib.jar" />
		<echo message="    jar-core: .................. Assemble the core XAL classes and resources into xal-core.jar" />
		<echo message="    purge-install: ............. Purge the core installation." />
		<echo message="    run-tests .................. Build and run the test cases." />
    </target>
</project>

{'fraction_non_alphanumeric': 0.19404647019523422, 'fraction_numerical': 0.0019300720065325513, 'mean_word_length': 2.415821501014199, 'pattern_counts': {'":': 0, '<': 270, '<?xml version=': 2, '>': 270, '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': '4080530', 'n_tokens_mistral': 4049, 'n_tokens_neox': 3736, 'n_words': 1023}