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

<project name="voldemort" basedir="." default="all">
	<property file="build.properties"/>

	<property name="name" value="voldemort"/>
	<property name="display.name" value="Voldemort"/>
	<property name="author" value="<NAME>"/>
  <property environment="env"/>

	<path id="main-classpath">
		<fileset dir="${lib.dir}">
			<include name="*.jar"/>
		</fileset>
		<pathelement path="${classes.dir}"/>
	</path>

	<path id="contrib-classpath">
		<fileset dir="${dist.dir}">
			<include name="${name}-${curr.release}.jar" />
		</fileset>
		<fileset dir="${contrib.src.dir}">
			<include name="**/*.jar" />
		</fileset>
		<path refid="test-classpath" />
	</path>

	<path id="test-classpath">
	  <pathelement path="${env.VOLD_TEST_JARS}"/>
		<path refid="main-classpath" />
		<pathelement path="${testclasses.dir}"/>
	</path>

	<path id="contrib-test-classpath">
		<path refid="main-classpath" />
		<path refid="contrib-classpath" />
		<fileset dir="${dist.dir}">
			<include name="${name}-contrib-${curr.release}.jar" />
		</fileset>
	</path>
			
	<macrodef name="replace-dir">
		<attribute name="dir"/>
		<sequential>
			<delete dir="@{dir}"/>
			<mkdir dir="@{dir}"/>
		</sequential>
	</macrodef>

	<target name="all" depends="clean, srcjar, jar, test, contrib-jar" description="Build all artifacts." />

	<target name="clean" description="Delete generated files.">
		<delete dir="${dist.dir}" />
		<replace-dir dir="${javadoc.dir}"/>
	</target>

	<target name="build" description="Compile main source tree java files">
		<replace-dir dir="${classes.dir}"/>
		<!-- copy non-java files to classes dir to load from classpath -->
		<copy todir="${classes.dir}">
			<fileset dir="${java.dir}">
				<exclude name="**/*.java"/>
				<exclude name="**/*.html"/>
			</fileset>
		</copy>
		<javac destdir="${classes.dir}" target="1.5" debug="true" deprecation="true" failonerror="true">
			<src path="${java.dir}"/>
			<classpath refid="main-classpath"/>
		</javac>
	</target>
  
  <target name="buildtest" description="Compile test classes">
    <replace-dir dir="${testclasses.dir}"/>
    <copy todir="${testclasses.dir}">
      <fileset dir="${commontestsrc.dir}">
        <exclude name="**/*.java"/>
        <exclude name="**/*.html"/>
      </fileset>
    </copy>
    <javac destdir="${testclasses.dir}" target="1.5" debug="true" deprecation="true" failonerror="true">
      <src path="${unittestsrc.dir}"/>
      <src path="${inttestsrc.dir}"/>
      <src path="${commontestsrc.dir}"/>
      <classpath refid="main-classpath"/>
    </javac>
  </target>

	<target name="test" depends="build, buildtest" description="Build test jar file">
		<jar destfile="${dist.dir}/${name}-test-${curr.release}.jar">
			<fileset dir="${testclasses.dir}"/>
		</jar>
	</target>

	<target name="jar" depends="build" description="Build server jar file">
		<jar destfile="${dist.dir}/${name}-${curr.release}.jar">
			<fileset dir="${classes.dir}">
				<include name="**/*.*"/>
			</fileset>
			<!-- include xsds -->
			<fileset dir="${java.dir}">
				<include name="**/*.xsd"/>
			</fileset>
		</jar>
	</target>

	<target name="srcjar" description="Build source jar file">
		<mkdir dir="${dist.dir}"/>
		<jar destfile="${dist.dir}/${name}-${curr.release}-src.jar">
			<fileset dir="${java.dir}">
				<include name="**/*.java"/>
			</fileset>
		</jar>
	</target>

	<target name="contrib-build" depends="build, buildtest" description="Compile contrib packages (java and test) ">
		<replace-dir dir="${contrib.classes.dir}"/>
		<!-- copy non-java files to classes dir to load from classpath -->
		<copy todir="${contrib.classes.dir}">
			<fileset dir="${contrib.java.dir}">
				<exclude name="**/*.java"/>
				<exclude name="**/*.html"/>
			</fileset>
		</copy>
		<javac destdir="${contrib.classes.dir}" target="1.5" debug="true" deprecation="true" failonerror="true">
			<src path="${contrib.java.dir}"/>
			<classpath refid="main-classpath"/>
			<classpath refid="contrib-classpath"/>
		</javac>
	</target>

	<target name="contrib-jar" depends="contrib-build" description="Build contrib jar file">
		<jar destfile="${dist.dir}/${name}-contrib-${curr.release}.jar">
			<fileset dir="${contrib.classes.dir}">
				<include name="**/*.*"/>
			</fileset>
			<!-- include xsds -->
			<fileset dir="${contrib.java.dir}">
				<include name="**/*.xsd"/>
			</fileset>
		</jar>
	</target>

	<target name="contrib-srcjar" description="Build contrib source jar file">
		<mkdir dir="${dist.dir}"/>
		<jar destfile="${dist.dir}/${name}-contrib-${curr.release}-src.jar">
			<fileset dir="${contrib.java.dir}">
				<include name="**/*.java"/>
			</fileset>
		</jar>
	</target>

	<target name="utils" depends="build" description="Build a jar file with voldemort util classes.">
		<tstamp>
			<format property="TODAY" pattern="yyyy-MM-dd" locale="en,US"/>
		</tstamp>
		<jar destfile="${dist.dir}/${name}-utils-${TODAY}.jar">
			<fileset dir="${classes.dir}">
				<include name="voldemort/VoldemortException.class"/>
				<include name="voldemort/Serializer.class"/>
				<include name="voldemort/serialization/SerializationException.class"/>
				<include name="voldemort/serialization/json/*"/>
				<include name="voldemort/utils/*"/>
			</fileset>
		</jar>
	</target>

	<target name="contrib-junit" depends="contrib-jar" description="Run contrib junit tests.">
		<junit printsummary="yes" maxmemory="1024m" showoutput="true" failureProperty="test.failure">
			<classpath refid="contrib-test-classpath"/>
			<formatter type="brief" usefile="false"/>
			<batchtest fork="yes" todir="${testreport.dir}">
				<fileset dir="${contrib.classes.dir}">
					<include name="**/*Test.class"/>
					<exclude name="**/*PerformanceTest.class"/>
				</fileset>
			</batchtest>
		</junit>
	</target>

	<target name="junit" depends="build, buildtest" description="Run junit tests.">
		<replace-dir dir="${testreport.dir}"/>
		<replace-dir dir="${testhtml.dir}"/>
		<junit printsummary="yes" showoutput="true">
			<classpath refid="test-classpath"/>
			<formatter type="xml"/>
			<batchtest fork="yes" todir="${testreport.dir}">
				<fileset dir="${unittestsrc.dir}">
					<include name="**/*Test.java"/>
				  <exclude name="**/Abstract*.java" />
				</fileset>
			</batchtest>
		</junit>
		<junitreport todir="${testhtml.dir}">
			<fileset dir="${testreport.dir}">
				<include name="TEST-*.xml"/>
			</fileset>
			<report todir="${testhtml.dir}" format="frames" />
		</junitreport>
	</target><commit_msg>contrib test xml formatting fixed.<commit_after><?xml version="1.0"?>

<project name="voldemort" basedir="." default="all">
	<property file="build.properties"/>

	<property name="name" value="voldemort"/>
	<property name="display.name" value="Voldemort"/>
	<property name="author" value="<NAME>"/>
  <property environment="env"/>

	<path id="main-classpath">
		<fileset dir="${lib.dir}">
			<include name="*.jar"/>
		</fileset>
		<pathelement path="${classes.dir}"/>
	</path>

	<path id="contrib-classpath">
		<fileset dir="${dist.dir}">
			<include name="${name}-${curr.release}.jar" />
		</fileset>
		<fileset dir="${contrib.src.dir}">
			<include name="**/*.jar" />
		</fileset>
		<path refid="test-classpath" />
	</path>

	<path id="test-classpath">
	  <pathelement path="${env.VOLD_TEST_JARS}"/>
		<path refid="main-classpath" />
		<pathelement path="${testclasses.dir}"/>
	</path>

	<path id="contrib-test-classpath">
		<path refid="main-classpath" />
		<path refid="contrib-classpath" />
		<fileset dir="${dist.dir}">
			<include name="${name}-contrib-${curr.release}.jar" />
		</fileset>
	</path>
			
	<macrodef name="replace-dir">
		<attribute name="dir"/>
		<sequential>
			<delete dir="@{dir}"/>
			<mkdir dir="@{dir}"/>
		</sequential>
	</macrodef>

	<target name="all" depends="clean, srcjar, jar, test, contrib-jar" description="Build all artifacts." />

	<target name="clean" description="Delete generated files.">
		<delete dir="${dist.dir}" />
		<replace-dir dir="${javadoc.dir}"/>
	</target>

	<target name="build" description="Compile main source tree java files">
		<replace-dir dir="${classes.dir}"/>
		<!-- copy non-java files to classes dir to load from classpath -->
		<copy todir="${classes.dir}">
			<fileset dir="${java.dir}">
				<exclude name="**/*.java"/>
				<exclude name="**/*.html"/>
			</fileset>
		</copy>
		<javac destdir="${classes.dir}" target="1.5" debug="true" deprecation="true" failonerror="true">
			<src path="${java.dir}"/>
			<classpath refid="main-classpath"/>
		</javac>
	</target>
  
  <target name="buildtest" description="Compile test classes">
    <replace-dir dir="${testclasses.dir}"/>
    <copy todir="${testclasses.dir}">
      <fileset dir="${commontestsrc.dir}">
        <exclude name="**/*.java"/>
        <exclude name="**/*.html"/>
      </fileset>
    </copy>
    <javac destdir="${testclasses.dir}" target="1.5" debug="true" deprecation="true" failonerror="true">
      <src path="${unittestsrc.dir}"/>
      <src path="${inttestsrc.dir}"/>
      <src path="${commontestsrc.dir}"/>
      <classpath refid="main-classpath"/>
    </javac>
  </target>

	<target name="test" depends="build, buildtest" description="Build test jar file">
		<jar destfile="${dist.dir}/${name}-test-${curr.release}.jar">
			<fileset dir="${testclasses.dir}"/>
		</jar>
	</target>

	<target name="jar" depends="build" description="Build server jar file">
		<jar destfile="${dist.dir}/${name}-${curr.release}.jar">
			<fileset dir="${classes.dir}">
				<include name="**/*.*"/>
			</fileset>
			<!-- include xsds -->
			<fileset dir="${java.dir}">
				<include name="**/*.xsd"/>
			</fileset>
		</jar>
	</target>

	<target name="srcjar" description="Build source jar file">
		<mkdir dir="${dist.dir}"/>
		<jar destfile="${dist.dir}/${name}-${curr.release}-src.jar">
			<fileset dir="${java.dir}">
				<include name="**/*.java"/>
			</fileset>
		</jar>
	</target>

	<target name="contrib-build" depends="build, buildtest" description="Compile contrib packages (java and test) ">
		<replace-dir dir="${contrib.classes.dir}"/>
		<!-- copy non-java files to classes dir to load from classpath -->
		<copy todir="${contrib.classes.dir}">
			<fileset dir="${contrib.java.dir}">
				<exclude name="**/*.java"/>
				<exclude name="**/*.html"/>
			</fileset>
		</copy>
		<javac destdir="${contrib.classes.dir}" target="1.5" debug="true" deprecation="true" failonerror="true">
			<src path="${contrib.java.dir}"/>
			<classpath refid="main-classpath"/>
			<classpath refid="contrib-classpath"/>
		</javac>
	</target>

	<target name="contrib-jar" depends="contrib-build" description="Build contrib jar file">
		<jar destfile="${dist.dir}/${name}-contrib-${curr.release}.jar">
			<fileset dir="${contrib.classes.dir}">
				<include name="**/*.*"/>
			</fileset>
			<!-- include xsds -->
			<fileset dir="${contrib.java.dir}">
				<include name="**/*.xsd"/>
			</fileset>
		</jar>
	</target>

	<target name="contrib-srcjar" description="Build contrib source jar file">
		<mkdir dir="${dist.dir}"/>
		<jar destfile="${dist.dir}/${name}-contrib-${curr.release}-src.jar">
			<fileset dir="${contrib.java.dir}">
				<include name="**/*.java"/>
			</fileset>
		</jar>
	</target>

	<target name="utils" depends="build" description="Build a jar file with voldemort util classes.">
		<tstamp>
			<format property="TODAY" pattern="yyyy-MM-dd" locale="en,US"/>
		</tstamp>
		<jar destfile="${dist.dir}/${name}-utils-${TODAY}.jar">
			<fileset dir="${classes.dir}">
				<include name="voldemort/VoldemortException.class"/>
				<include name="voldemort/Serializer.class"/>
				<include name="voldemort/serialization/SerializationException.class"/>
				<include name="voldemort/serialization/json/*"/>
				<include name="voldemort/utils/*"/>
			</fileset>
		</jar>
	</target>

	<target name="contrib-junit" depends="contrib-jar" description="Run contrib junit tests.">
		<junit printsummary="yes" maxmemory="1024m" showoutput="true" failureProperty="test.failure">
			<classpath refid="contrib-test-classpath"/>
			<formatter type="xml"/>
			<batchtest fork="yes" todir="${testreport.dir}">
				<fileset dir="${contrib.classes.dir}">
					<include name="**/*Test.class"/>
					<exclude name="**/*PerformanceTest.class"/>
				</fileset>
			</batchtest>
		</junit>
		<junitreport todir="${testhtml.dir}">
			<fileset dir="${testreport.dir}">
				<include name="TEST-*.xml"/>
			</fileset>
			<report todir="${testhtml.dir}" format="frames" />
		</junitreport>
	</target>

	<target name="junit" depends="build, buildtest" description="Run junit tests.">
		<replace-dir dir="${testreport.dir}"/>
		<replace-dir dir="${testhtml.dir}"/>
		<junit printsummary="yes" showoutput="true">
			<classpath refid="test-classpath"/>
			<formatter type="xml"/>
			<batchtest fork="yes" todir="${testreport.dir}">
				<fileset dir="${unittestsrc.dir}">
					<include name="**/*Test.java"/>
				  <exclude name="**/Abstract*.java" />
				</fileset>
			</batchtest>
		</junit>
		<junitreport todir="${testhtml.dir}">
			<fileset dir="${testreport.dir}">
				<include name="TEST-*.xml"/>
			</fileset>
			<report todir="${testhtml.dir}" format="frames" />
		</junitreport>
	</target>
{'fraction_non_alphanumeric': 0.22783269961977187, 'fraction_numerical': 0.0018250950570342205, 'mean_word_length': 4.163329407145661, 'pattern_counts': {'":': 0, '<': 369, '<?xml version=': 2, '>': 369, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 9}, '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': '5639396', 'n_tokens_mistral': 4992, 'n_tokens_neox': 4418, 'n_words': 849}