<commit_before><?xml version="1.0" encoding="UTF-8"?>
<project name="streamsx.iot.test" default="test">

	<property environment="env"/>
	<property name="streams.install" value="${env.STREAMS_INSTALL}"/>
	<taskdef resource="com/ibm/streamsx/ant/streams.xml"/>

	<property name="iot.tk"
	   location="${basedir}/../com.ibm.streamsx.iot"/>
	<property name="streams.tk"
	   location="${streams.install}/toolkits"/>
	<property name="extra.tk"
	   location="${env.HOME}/toolkits"/>
	<property name="sabs"
	   location="${basedir}/sabs"/>
	<property name="quarks"
	   location="${basedir}/ext/quarks/target/java8"/>

  <property name="testsrc.dir" value="src/test/java" />
  <property name="testbuild.dir" value="classes" />
  <property name="testreports.dir" value="reports" />

  <path id="cp.streams">
    <pathelement location="${streams.install}/lib/com.ibm.streams.operator.samples.jar" />
    <pathelement location="${user.home}/toolkits/com.ibm.streamsx.topology/lib/com.ibm.streamsx.topology.jar" />
    <pathelement location="${streams.install}/toolkits/com.ibm.streamsx.topology/lib/com.ibm.streamsx.topology.jar" />
  </path>

  <path id="cp.compile">
    <path refid="cp.streams" />
    <path refid="cp.quarks" />
    <pathelement location="../com.ibm.streamsx.iot/lib/com.ibm.streamsx.iot.jar" />
  </path>

  <path id="cp.quarks">
    <pathelement location="${quarks}/lib/quarks.providers.direct.jar"/>
    <pathelement location="${quarks}/connectors/iotf/lib/quarks.connectors.iotf.jar"/>
  </path>

       <target name="test" depends="init,unittests,build.spl.apps,build.sample.apps"/>

       <target name="init" depends="clean">
          <mkdir dir="${sabs}"/>
          <mkdir dir="${testbuild.dir}"/>
          <mkdir dir="${testreports.dir}"/>
       </target>

  <target name="compile" depends="init">
    <javac srcdir="${testsrc.dir}" destdir="${testbuild.dir}" debug="true"
	includeantruntime="yes">
	<classpath>
          <path refid="cp.compile" />
	</classpath>
    </javac>
   </target>

   <property name="streamsx.iot.test.device.cfg" value="skip"/>
   <target name="unittests" depends="compile">
   <junit threads=4  fork="yes" printsummary="yes" haltonfailure="yes">
     <sysproperty key="streamsx.iot.test.device.cfg"
                  value="${streamsx.iot.test.device.cfg}"/>
     <classpath>
         <pathelement location="${testbuild.dir}"/>
         <path refid="cp.compile"/>
     </classpath>

  <formatter type="xml"/>

    <batchtest todir="${testreports.dir}">
      <fileset dir="${testsrc.dir}">
         <include name="**/*Test.java"/>
      </fileset>
    </batchtest>
    </junit>
    </target>

	<!-- Compile the applications within the toolkit -->
	<target name="build.spl.apps" depends="init">
	  <build.iot.app
  	    namespace="com.ibm.streamsx.iot.watson.apps"
  	    composite="IotPlatform" />
	  <build.iot.app
  	    namespace="com.ibm.streamsx.iot.apps"
  	    composite="ViewAllDevices" />
	</target>
	<!-- Compile the sample applications -->
	<target name="build.sample.apps" depends="init">
	  <build.sample.app
  	    toolkit="${basedir}/../samples/CountEvents"
  	    namespace="com.ibm.streamsx.iot.sample.countevents"
  	    composite="CountEvents" />
	  <build.sample.app
  	    toolkit="${basedir}/../samples/Quarks"
  	    namespace="com.ibm.streamsx.iot.sample.quarks"
  	    composite="IotfSensors" />
	</target>

    <target name="clean">
        <delete dir="${basedir}/output"/>
        <delete dir="${sabs}"/>
        <delete dir="${testbuild.dir}"/>
        <delete dir="${testreports.dir}"/>
    </target>

    <macrodef name="build.iot.app">
     <attribute name="namespace"/>
     <attribute name="composite"/>
     <sequential>
         <splcompile
  	    mainComposite="@{namespace}::@{composite}"
  	      optimize="true" noToolkitIndexing="true">
	   <toolkit location="${iot.tk}" />
	   <toolkit location="${extra.tk}" />
           <toolkit location="${streams.tk}" />
        </splcompile>
        <move file="${basedir}/output/@{namespace}.@{composite}.sab"
             toDir="${sabs}"/>
        <delete dir="${basedir}/output"/>
     </sequential>
   </macrodef>

    <macrodef name="build.sample.app">
     <attribute name="toolkit"/>
     <attribute name="namespace"/>
     <attribute name="composite"/>
     <sequential>
         <splcompile
  	    mainComposite="@{namespace}::@{composite}"
  	      optimize="true" noToolkitIndexing="true">
           <toolkit location="@{toolkit}" />
	   <toolkit location="${iot.tk}" />
	   <toolkit location="${extra.tk}" />
           <toolkit location="${streams.tk}" />
        </splcompile>
        <move file="${basedir}/output/@{namespace}.@{composite}.sab"
             toDir="${sabs}"/>
        <delete dir="${basedir}/output"/>
     </sequential>
   </macrodef>

</project>

<commit_msg>Fix threads attr<commit_after><?xml version="1.0" encoding="UTF-8"?>
<project name="streamsx.iot.test" default="test">

	<property environment="env"/>
	<property name="streams.install" value="${env.STREAMS_INSTALL}"/>
	<taskdef resource="com/ibm/streamsx/ant/streams.xml"/>

	<property name="iot.tk"
	   location="${basedir}/../com.ibm.streamsx.iot"/>
	<property name="streams.tk"
	   location="${streams.install}/toolkits"/>
	<property name="extra.tk"
	   location="${env.HOME}/toolkits"/>
	<property name="sabs"
	   location="${basedir}/sabs"/>
	<property name="quarks"
	   location="${basedir}/ext/quarks/target/java8"/>

  <property name="testsrc.dir" value="src/test/java" />
  <property name="testbuild.dir" value="classes" />
  <property name="testreports.dir" value="reports" />

  <path id="cp.streams">
    <pathelement location="${streams.install}/lib/com.ibm.streams.operator.samples.jar" />
    <pathelement location="${user.home}/toolkits/com.ibm.streamsx.topology/lib/com.ibm.streamsx.topology.jar" />
    <pathelement location="${streams.install}/toolkits/com.ibm.streamsx.topology/lib/com.ibm.streamsx.topology.jar" />
  </path>

  <path id="cp.compile">
    <path refid="cp.streams" />
    <path refid="cp.quarks" />
    <pathelement location="../com.ibm.streamsx.iot/lib/com.ibm.streamsx.iot.jar" />
  </path>

  <path id="cp.quarks">
    <pathelement location="${quarks}/lib/quarks.providers.direct.jar"/>
    <pathelement location="${quarks}/connectors/iotf/lib/quarks.connectors.iotf.jar"/>
  </path>

       <target name="test" depends="init,unittests,build.spl.apps,build.sample.apps"/>

       <target name="init" depends="clean">
          <mkdir dir="${sabs}"/>
          <mkdir dir="${testbuild.dir}"/>
          <mkdir dir="${testreports.dir}"/>
       </target>

  <target name="compile" depends="init">
    <javac srcdir="${testsrc.dir}" destdir="${testbuild.dir}" debug="true"
	includeantruntime="yes">
	<classpath>
          <path refid="cp.compile" />
	</classpath>
    </javac>
   </target>

   <property name="streamsx.iot.test.device.cfg" value="skip"/>
   <target name="unittests" depends="compile">
   <junit threads="4"  fork="yes" printsummary="yes" haltonfailure="yes">
     <sysproperty key="streamsx.iot.test.device.cfg"
                  value="${streamsx.iot.test.device.cfg}"/>
     <classpath>
         <pathelement location="${testbuild.dir}"/>
         <path refid="cp.compile"/>
     </classpath>

  <formatter type="xml"/>

    <batchtest todir="${testreports.dir}">
      <fileset dir="${testsrc.dir}">
         <include name="**/*Test.java"/>
      </fileset>
    </batchtest>
    </junit>
    </target>

	<!-- Compile the applications within the toolkit -->
	<target name="build.spl.apps" depends="init">
	  <build.iot.app
  	    namespace="com.ibm.streamsx.iot.watson.apps"
  	    composite="IotPlatform" />
	  <build.iot.app
  	    namespace="com.ibm.streamsx.iot.apps"
  	    composite="ViewAllDevices" />
	</target>
	<!-- Compile the sample applications -->
	<target name="build.sample.apps" depends="init">
	  <build.sample.app
  	    toolkit="${basedir}/../samples/CountEvents"
  	    namespace="com.ibm.streamsx.iot.sample.countevents"
  	    composite="CountEvents" />
	  <build.sample.app
  	    toolkit="${basedir}/../samples/Quarks"
  	    namespace="com.ibm.streamsx.iot.sample.quarks"
  	    composite="IotfSensors" />
	</target>

    <target name="clean">
        <delete dir="${basedir}/output"/>
        <delete dir="${sabs}"/>
        <delete dir="${testbuild.dir}"/>
        <delete dir="${testreports.dir}"/>
    </target>

    <macrodef name="build.iot.app">
     <attribute name="namespace"/>
     <attribute name="composite"/>
     <sequential>
         <splcompile
  	    mainComposite="@{namespace}::@{composite}"
  	      optimize="true" noToolkitIndexing="true">
	   <toolkit location="${iot.tk}" />
	   <toolkit location="${extra.tk}" />
           <toolkit location="${streams.tk}" />
        </splcompile>
        <move file="${basedir}/output/@{namespace}.@{composite}.sab"
             toDir="${sabs}"/>
        <delete dir="${basedir}/output"/>
     </sequential>
   </macrodef>

    <macrodef name="build.sample.app">
     <attribute name="toolkit"/>
     <attribute name="namespace"/>
     <attribute name="composite"/>
     <sequential>
         <splcompile
  	    mainComposite="@{namespace}::@{composite}"
  	      optimize="true" noToolkitIndexing="true">
           <toolkit location="@{toolkit}" />
	   <toolkit location="${iot.tk}" />
	   <toolkit location="${extra.tk}" />
           <toolkit location="${streams.tk}" />
        </splcompile>
        <move file="${basedir}/output/@{namespace}.@{composite}.sab"
             toDir="${sabs}"/>
        <delete dir="${basedir}/output"/>
     </sequential>
   </macrodef>

</project>


{'fraction_non_alphanumeric': 0.1989018957836942, 'fraction_numerical': 0.0010359473738734072, 'mean_word_length': 3.199217050891692, 'pattern_counts': {'":': 0, '<': 205, '<?xml version=': 2, '>': 205, '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': '1725690', 'n_tokens_mistral': 3282, 'n_tokens_neox': 3192, 'n_words': 440}