<commit_before><?xml version="1.0" encoding="us-ascii"?>
<project name="cloveretl plugin" default="build" basedir=".">

	<!-- =========================== DEFAULT DIRECTORIES =========================== -->
	<basename property="plugin.name" file="${basedir}" />
	<propertyregex property="plugin.dir.name"
		input="${plugin.name}"
		regexp="cloveretl\.(.*)"
		select="org.jetel.\1" />

	<property name="dir.src" value="${basedir}/src"/>
	<property name="dir.src.test" value="${basedir}/test"/>
	<property name="dir.lib" value="${basedir}/lib"/>
	<property name="dir.dist" value="${basedir}/dist"/>
	<property name="dir.dist.other.plugins" value="${dir.dist}"/>
	<property name="dir.plugin.dist" value="${dir.dist}/plugins/${plugin.dir.name}"/>

	<property name="dir.engine" value="${basedir}/../cloveretl.engine"/>
	<property name="dir.gui" value="${basedir}/../cloveretl.gui"/>
	<property file="${dir.engine}/build.properties"/>		
	<property name="dir.engine.lib" value="${dir.engine}/lib"/>
	<property name="dir.engine.tools" value="${dir.engine}/tools"/>
	<property name="dir.cobertura" value="${dir.engine.tools}/cobertura" />
	<property name="dir.build-scripts" value="${dir.engine}/build-scripts"/>
	<property name="dir.engine.classes" value="${dir.engine}/build-tmp/classes" />
	<property name="engine.mapping.all" value="${dir.engine}/build-tmp/obfuscate/proGuard-mapping-all.txt" />
	<property name="dir.license" value="${basedir}/../cloveretl.license"/>
	
	<property name="dir.build" value="${basedir}/build"/>
	<property name="dir.testsresult" value="${dir.build}/testsresult"/>
	<property name="dir.classes" value="${dir.build}/classes"/>
	<property name="dir.classestest" value="${dir.build}/classes-test"/>
	<property name="dir.coverage.classes" value="${dir.build}/classes-coverage"/>
	<property name="dir.src.improved" value="${dir.build}/src-improved"/>
	<property name="dir.findbugsreport" value="${dir.build}/findbugsreport"/>
	<property name="dir.manifest" value="${dir.build}/manifest"/>
	<property name="dir.obfuscate" value="${dir.build}/obfuscate"/>
	<property name="dir.obfuscate.classes" value="${dir.obfuscate}/classes"/>
	<property name="dir.obfuscate.manifest" value="${dir.obfuscate}/manifest"/>
	<property name="required.plugins.file" value="required-plugins.txt"/>
	<property name="required.plugins.lib.collected" value="${dir.build}/required-plugins-lib-collected.txt" />
	<property name="required.plugins.collected" value="${dir.build}/required-plugins-collected.txt" />
	<property name="required.plugins.lib.collected" value="${dir.build}/required-plugins-lib-collected.txt" />
	<property name="cobertura.ser" value="${dir.build}/plugin-cobertura.ser"/>

	<property file="${basedir}/build-plugin.properties"/>
	<property name="javadoc.limited.include" value="**"/>
	
	<property name="script.name" value="cloveretl.engine\build-scripts\build-plugin.xml"/>
	
	<!-- ProGuard task definition -->
	<taskdef resource="proguard/ant/task.properties" classpath="${dir.engine.tools}/proguard.jar" />
		
	<taskdef resource="cz/mathan/ant/contrib/taskdef.properties">
	  <classpath>
	    <pathelement location="${dir.engine.tools}/mathan-ant-contrib.jar"/>
	  </classpath>
	</taskdef>
		
	<!-- =========================== LIBRARIES ============================= -->
	<fileset id="engine-libs" dir="${dir.engine.lib}" erroronmissingdir="false">
		<include name="**/*.jar"/>
	</fileset>

	<fileset id="engine-tools" dir="${dir.engine.tools}" erroronmissingdir="false">
		<include name="**/*.jar"/>
	</fileset>

	<fileset id="license-libs" dir="${dir.license}" erroronmissingdir="false">
		<include name="dist/*.jar"/>
	</fileset>

	<path id="cp.cobertura">
	    <fileset dir="${dir.cobertura}">
	        <include name="*.jar" />
	    </fileset>
	</path>

	<!-- =========================== TARGETS ============================== -->
	<target name="build" depends="compile,package" description="Compiles sources and creates a JAR file"/>

	<target name="init">

		<echo message="Using directory for classes: ${dir.classes}"/>
		<echo message="Using directory for dist: ${dir.dist}"/>

		<mkdir dir="${dir.build}"/>

		<if><available file="icons"/>
			<then>
				<fileset id="plugin-icons" dir="icons">
					<include name="**"/> 
				</fileset>
			</then>
			<else>
				<fileset id="plugin-icons" dir="${basedir}">
					<include name=""/>
				</fileset>
			</else>
		</if>

		<if><available file="${dir.lib}"/>
			<then>
				<echo message="Plugin has own libraries in ${dir.engine.lib}"/>
				<!-- fileset plugin-libs contains all jar files in plugin lib directory, used while compile plugin -->
				<fileset id="plugin-libs" dir="${dir.lib}">
					<include name="**/*.jar"/>
					<!-- this is not an actual library, the module is loaded dynamically into separated classloader -->
					<exclude name="**/cloveretl.component.dominoloader.jar"/>
					<exclude name="**/cloveretl.connection.mongodb.jar"/>
				</fileset>
				<!-- fileset plugin-lib-files contains all files in plugin lib directory, may contain executables (e.g. cloveretl.bulkloader), used while package plugin -->
				<fileset id="plugin-lib-files" dir="${dir.lib}">
					<include name="**"/> 
				</fileset>
			</then>
			<else>
				<echo message="Plugin has no own library"/>
				<!-- define empty fileset -->
				<fileset id="plugin-libs" dir="${basedir}">
					<include name=""/>
				</fileset>
				<fileset id="plugin-lib-files" dir="${basedir}">
					<include name=""/>
				</fileset>
			</else>
		</if>
		
		<if><available file="${dir.src.test}"/>
			<then>
				<echo message="Plugin has tests in ${dir.src.test}"/>
				<property name="tests-available" value="true"/>
			</then>
			<else>
				<echo message="Plugin has no test"/>
			</else>
		</if>
		
		<if><equals arg1="${plugin.obfuscate}" arg2="true"/>
			<then>
				<property name="plugin.obfuscate.run" value="true"/>
				<property name="dir.package.classes" value="${dir.obfuscate.classes}"/>
				<property name="dir.package.manifest" value="${dir.obfuscate.manifest}"/>
			</then>
			<else>
				<property name="dir.package.classes" value="${dir.classes}"/>
				<property name="dir.package.manifest" value="${dir.manifest}"/>
			</else>
		</if>

	</target>

	<!-- make a temp copy of source - necessary for substitute release number constants in source code -->
	<target name="improve-java-sources" depends="copy-java-sources">
		<echo message="*** ${script.name}, target: improve-java-sources" />
		<if><not><equals arg1="${java.src.header.file}" arg2="" trim="true"/></not>
			<then>
				<echo>Changing license of all files - license file java.src.header.file:${java.src.header.file} for all in dir.src.improved:${dir.src.improved}</echo>
				<fileheading heading="${java.src.header.file}">
					<fileset dir="${dir.src.improved}" includes="**/*.java"/>
				</fileheading>
			</then>
		</if>
	</target>
	
	<target name="copy-java-sources" depends="init">
		<copy todir="${dir.src.improved}" encoding="UTF-8">
			<fileset dir="${dir.src}" />
		</copy>
	</target><commit_msg>EXPERIMENT: copyright replacements<commit_after><?xml version="1.0" encoding="us-ascii"?>
<project name="cloveretl plugin" default="build" basedir=".">

	<!-- =========================== DEFAULT DIRECTORIES =========================== -->
	<basename property="plugin.name" file="${basedir}" />
	<propertyregex property="plugin.dir.name"
		input="${plugin.name}"
		regexp="cloveretl\.(.*)"
		select="org.jetel.\1" />

	<property name="dir.src" value="${basedir}/src"/>
	<property name="dir.src.test" value="${basedir}/test"/>
	<property name="dir.lib" value="${basedir}/lib"/>
	<property name="dir.dist" value="${basedir}/dist"/>
	<property name="dir.dist.other.plugins" value="${dir.dist}"/>
	<property name="dir.plugin.dist" value="${dir.dist}/plugins/${plugin.dir.name}"/>

	<property name="dir.engine" value="${basedir}/../cloveretl.engine"/>
	<property name="dir.gui" value="${basedir}/../cloveretl.gui"/>
	<property file="${dir.engine}/build.properties"/>		
	<property name="dir.engine.lib" value="${dir.engine}/lib"/>
	<property name="dir.engine.tools" value="${dir.engine}/tools"/>
	<property name="dir.cobertura" value="${dir.engine.tools}/cobertura" />
	<property name="dir.build-scripts" value="${dir.engine}/build-scripts"/>
	<property name="dir.engine.classes" value="${dir.engine}/build-tmp/classes" />
	<property name="engine.mapping.all" value="${dir.engine}/build-tmp/obfuscate/proGuard-mapping-all.txt" />
	<property name="dir.license" value="${basedir}/../cloveretl.license"/>
	
	<property name="dir.build" value="${basedir}/build"/>
	<property name="dir.testsresult" value="${dir.build}/testsresult"/>
	<property name="dir.classes" value="${dir.build}/classes"/>
	<property name="dir.classestest" value="${dir.build}/classes-test"/>
	<property name="dir.coverage.classes" value="${dir.build}/classes-coverage"/>
	<property name="dir.src.improved" value="${dir.build}/src-improved"/>
	<property name="dir.findbugsreport" value="${dir.build}/findbugsreport"/>
	<property name="dir.manifest" value="${dir.build}/manifest"/>
	<property name="dir.obfuscate" value="${dir.build}/obfuscate"/>
	<property name="dir.obfuscate.classes" value="${dir.obfuscate}/classes"/>
	<property name="dir.obfuscate.manifest" value="${dir.obfuscate}/manifest"/>
	<property name="required.plugins.file" value="required-plugins.txt"/>
	<property name="required.plugins.lib.collected" value="${dir.build}/required-plugins-lib-collected.txt" />
	<property name="required.plugins.collected" value="${dir.build}/required-plugins-collected.txt" />
	<property name="required.plugins.lib.collected" value="${dir.build}/required-plugins-lib-collected.txt" />
	<property name="cobertura.ser" value="${dir.build}/plugin-cobertura.ser"/>

	<property file="${basedir}/build-plugin.properties"/>
	<property name="javadoc.limited.include" value="**"/>
	
	<property name="script.name" value="cloveretl.engine\build-scripts\build-plugin.xml"/>
	
	<!-- ProGuard task definition -->
	<taskdef resource="proguard/ant/task.properties" classpath="${dir.engine.tools}/proguard.jar" />
		
	<taskdef resource="cz/mathan/ant/contrib/taskdef.properties">
	  <classpath>
	    <pathelement location="${dir.engine.tools}/mathan-ant-contrib.jar"/>
	  </classpath>
	</taskdef>
		
	<!-- =========================== LIBRARIES ============================= -->
	<fileset id="engine-libs" dir="${dir.engine.lib}" erroronmissingdir="false">
		<include name="**/*.jar"/>
	</fileset>

	<fileset id="engine-tools" dir="${dir.engine.tools}" erroronmissingdir="false">
		<include name="**/*.jar"/>
	</fileset>

	<fileset id="license-libs" dir="${dir.license}" erroronmissingdir="false">
		<include name="dist/*.jar"/>
	</fileset>

	<path id="cp.cobertura">
	    <fileset dir="${dir.cobertura}">
	        <include name="*.jar" />
	    </fileset>
	</path>

	<!-- =========================== TARGETS ============================== -->
	<target name="build" depends="compile,package" description="Compiles sources and creates a JAR file"/>

	<target name="init">

		<echo message="Using directory for classes: ${dir.classes}"/>
		<echo message="Using directory for dist: ${dir.dist}"/>

		<mkdir dir="${dir.build}"/>

		<if><available file="icons"/>
			<then>
				<fileset id="plugin-icons" dir="icons">
					<include name="**"/> 
				</fileset>
			</then>
			<else>
				<fileset id="plugin-icons" dir="${basedir}">
					<include name=""/>
				</fileset>
			</else>
		</if>

		<if><available file="${dir.lib}"/>
			<then>
				<echo message="Plugin has own libraries in ${dir.engine.lib}"/>
				<!-- fileset plugin-libs contains all jar files in plugin lib directory, used while compile plugin -->
				<fileset id="plugin-libs" dir="${dir.lib}">
					<include name="**/*.jar"/>
					<!-- this is not an actual library, the module is loaded dynamically into separated classloader -->
					<exclude name="**/cloveretl.component.dominoloader.jar"/>
					<exclude name="**/cloveretl.connection.mongodb.jar"/>
				</fileset>
				<!-- fileset plugin-lib-files contains all files in plugin lib directory, may contain executables (e.g. cloveretl.bulkloader), used while package plugin -->
				<fileset id="plugin-lib-files" dir="${dir.lib}">
					<include name="**"/> 
				</fileset>
			</then>
			<else>
				<echo message="Plugin has no own library"/>
				<!-- define empty fileset -->
				<fileset id="plugin-libs" dir="${basedir}">
					<include name=""/>
				</fileset>
				<fileset id="plugin-lib-files" dir="${basedir}">
					<include name=""/>
				</fileset>
			</else>
		</if>
		
		<if><available file="${dir.src.test}"/>
			<then>
				<echo message="Plugin has tests in ${dir.src.test}"/>
				<property name="tests-available" value="true"/>
			</then>
			<else>
				<echo message="Plugin has no test"/>
			</else>
		</if>
		
		<if><equals arg1="${plugin.obfuscate}" arg2="true"/>
			<then>
				<property name="plugin.obfuscate.run" value="true"/>
				<property name="dir.package.classes" value="${dir.obfuscate.classes}"/>
				<property name="dir.package.manifest" value="${dir.obfuscate.manifest}"/>
			</then>
			<else>
				<property name="dir.package.classes" value="${dir.classes}"/>
				<property name="dir.package.manifest" value="${dir.manifest}"/>
			</else>
		</if>

	</target>

	<!-- make a temp copy of source - necessary for substitute release number constants in source code -->
	<target name="improve-java-sources" depends="copy-java-sources">
		<echo message="*** ${script.name}, target: improve-java-sources, java.src.header.file - ${java.src.header.file} " />
		<if>
			<not>
				<equals arg1="${java.src.header.file}" arg2="" trim="true"/>
			</not>
			<then>
				<echo>Changing license of all files - license file java.src.header.file:${java.src.header.file} for all in dir.src.improved:${dir.src.improved}</echo>
				<fileheading heading="${java.src.header.file}">
					<fileset dir="${dir.src.improved}" includes="**/*.java"/>
				</fileheading>
			</then>
		</if>
	</target>
	
	<target name="copy-java-sources" depends="init">
		<copy todir="${dir.src.improved}" encoding="UTF-8">
			<fileset dir="${dir.src}" />
		</copy>
	</target>
{'fraction_non_alphanumeric': 0.23380301635629824, 'fraction_numerical': 0.0011329037739856971, 'mean_word_length': 4.463829787234043, 'pattern_counts': {'":': 0, '<': 307, '<?xml version=': 2, '>': 307, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '3740928', 'n_tokens_mistral': 5013, 'n_tokens_neox': 4477, 'n_words': 828}