<commit_before><?xml version="1.0"?>
<project name="Plugins-common" basedir=".">

	<property name="debug.mode" value="true"/>
  
	<target name="prepare-common">
		<mkdir dir="build/classes"/>
		<mkdir dir="dist"/>
		<mkdir dir="resources"/> <!-- defensive, to prevent file not found error later on -->
		<property name="jar.name" value="dist/${base.name}.jar"/>
		<fail message="Can't find ${pathvisio.dir}/modules/org.pathvisio.core.jar, please specify the path to pathvisio with -Dpathvisio.dir=....">
			<condition>
				<not><available file="${pathvisio.dir}/modules/org.pathvisio.core.jar"/></not>
			</condition>
		</fail>
	</target>
	
	<target name="prepare">
	</target>
	
	<target name="clean">
		<delete dir="build"/>
		<delete dir="dist"/>
	</target>

	<target name="compile" depends="prepare,prepare-common">
		<echo>Compiling: ${jar.name}</echo>
		<javac srcdir="src"
			   includes="**"
			   destdir="build/classes"
			   debug="${debug.mode}"
			   source="1.5">
		  <classpath refid="project.class.path"/>
		</javac>
	</target>

	<target name="jar" depends="compile"> 
		<echo>Creating JAR: ${jar.name}</echo>
		<copy toDir="dist" flatten="true">
			<path refid="project.class.path"/>
		</copy>
		<manifestclasspath property="manifest.cp" jarfile="${jar.name}">
			<classpath>
				<fileset dir="dist">
					<include name="*.jar"/>
					<exclude name="${base.name}.jar"/>
				</fileset>
			</classpath>
		</manifestclasspath>
		<jar jarfile="${jar.name}" manifest="META-INF/MANIFEST.MF">
		    <fileset dir="build/classes">
			    <include name="**/*"/>
			</fileset>
		    <fileset dir="resources">
				<include name="**/*"/>
			</fileset>
            <manifest>
				<attribute name="Class-Path" value="${manifest.cp}"/>
			</manifest>
        </jar>
	</target>

	  <target name="dist-clean" depends="clean">
		<delete file="${jar.name}"/>
	  </target>

	<target name="test">
		<javac srcdir="test" debug="${debug.mode}"
					includes="**"
					destdir="build"
					source="1.5">
			<classpath>
				<path refid="test.class.path"/>
				<path refid="project.class.path"/>
			</classpath>
		</javac>
		<junit printsummary="on" haltonfailure="true" fork="true" dir=".">
			<formatter type="brief" usefile="false"/>
			<classpath>
				<pathelement path="build"/>
				<path refid="project.class.path"/>
				<path refid="test.class.path"/>
			</classpath>
			<batchtest>
				<fileset dir="test">
					<include name="**/*Test*.java"/>
				</fileset>
			</batchtest>
		</junit>
	</target>

	<target name="exe" depends="jar">
		<mkdir dir="build/exe"/>
		<copy toDir="build/exe" flatten="true">
			<path refid="exe.bundle"/>
		</copy>
		<unjar src="${pathvisio.dir}/modules/org.pathvisio.launcher.jar" dest="build/exe"/>
		<unjar src="${pathvisio.dir}/lib/felix.jar" dest="build/exe"/>
		<jar file="pathvisio-with-${base.name}.jar" basedir="build/exe">
			<manifest>
				<attribute name="Main-Class" value="org.pathvisio.launcher.PathVisioMain"/>
			</manifest>
		</jar>
	</target>

  <target name="webstart" depends="exe">
	<fail message="You must specify a keystore password for opening visioKeyStore: ant -Dkeystore.password=***** [ant target]">
		<condition>
			<not> <isset property="keystore.password"/> </not>
		</condition>
	</fail>
  	<delete dir="build/webstart"/>
	<mkdir dir="build/webstart"/>	
  	<copy todir="build/webstart" file="pathvisio-with-${base.name}.jar"/>
  	<copy todir="build/webstart" file="${base.name}.jnlp"/>
	<replace file="build/webstart/${base.name}.jnlp" token="#BASEURL#" value="${webstart.base.url}"/>
    <signjar alias="PV" lazy = "true" 
		storepass="${keystore.password}" keystore="${pathvisio.dir}/lib/visioKeyStore">
		<fileset dir="build/webstart" includes="**/*.jar"/>
	</signjar>
  </target>

</project><commit_msg>Tweak plugin-common: use ant.project.name instead of base.name<commit_after><?xml version="1.0"?>
<project name="Plugins-common" basedir=".">

	<property name="debug.mode" value="true"/>
	
	<!-- the name of the plug-in jar uses the project name of the calling build file -->
	<property name="jar.name" value="dist/${ant.project.name}.jar"/>
	
	<!-- the name of the executable wrapper jar uses the project name of the calling build file -->
	<property name="exe.jar" value="pathvisio-with-${ant.project.name}.jar"/>

	<!-- perpare-common should not be overriden -> override prepare instead -->
	<target name="prepare-common">
		<mkdir dir="build/classes"/>
		<mkdir dir="dist"/>
		<mkdir dir="resources"/> <!-- defensive, to prevent file not found error later on -->
		<fail message="Can't find ${pathvisio.dir}/modules/org.pathvisio.core.jar, please specify the path to pathvisio with -Dpathvisio.dir=....">
			<condition>
				<not><available file="${pathvisio.dir}/modules/org.pathvisio.core.jar"/></not>
			</condition>
		</fail>
	</target>

	<!-- designed to be overridden -->
	<target name="prepare">
	</target>
	
	<target name="clean">
		<delete dir="build"/>
		<delete dir="dist"/>
	</target>

	<target name="compile" depends="prepare,prepare-common">
		<echo>Compiling: ${jar.name}</echo>
		<javac srcdir="src"
			   includes="**"
			   destdir="build/classes"
			   debug="${debug.mode}"
			   source="1.5">
		  <classpath refid="project.class.path"/>
		</javac>
	</target>

	<target name="jar" depends="compile"> 
		<echo>Creating JAR: ${jar.name}</echo>
		<copy toDir="dist" flatten="true">
			<path refid="project.class.path"/>
		</copy>
		<manifestclasspath property="manifest.cp" jarfile="${jar.name}">
			<classpath>
				<fileset dir="dist">
					<include name="*.jar"/>
					<exclude name="${ant.project.name}.jar"/>
				</fileset>
			</classpath>
		</manifestclasspath>
		<jar jarfile="${jar.name}" manifest="META-INF/MANIFEST.MF">
		    <fileset dir="build/classes">
			    <include name="**/*"/>
			</fileset>
		    <fileset dir="resources">
				<include name="**/*"/>
			</fileset>
            <manifest>
				<attribute name="Class-Path" value="${manifest.cp}"/>
			</manifest>
        </jar>
	</target>

	  <target name="dist-clean" depends="clean">
		<delete file="${jar.name}"/>
		<delete file="${exe.jar}"/>
	  </target>

	<target name="test">
		<javac srcdir="test" debug="${debug.mode}"
					includes="**"
					destdir="build"
					source="1.5">
			<classpath>
				<path refid="test.class.path"/>
				<path refid="project.class.path"/>
			</classpath>
		</javac>
		<junit printsummary="on" haltonfailure="true" fork="true" dir=".">
			<formatter type="brief" usefile="false"/>
			<classpath>
				<pathelement path="build"/>
				<path refid="project.class.path"/>
				<path refid="test.class.path"/>
			</classpath>
			<batchtest>
				<fileset dir="test">
					<include name="**/*Test*.java"/>
				</fileset>
			</batchtest>
		</junit>
	</target>

	<!-- create an executable bundle that includes pathvisio bundles and launcher -->
	<target name="exe" depends="jar">
		<mkdir dir="build/exe"/>
		<copy toDir="build/exe" flatten="true">
			<path refid="exe.bundle"/>
		</copy>
		<unjar src="${pathvisio.dir}/modules/org.pathvisio.launcher.jar" dest="build/exe"/>
		<unjar src="${pathvisio.dir}/lib/felix.jar" dest="build/exe"/>
		<jar file="${exe.jar}" basedir="build/exe">
			<manifest>
				<attribute name="Main-Class" value="org.pathvisio.launcher.PathVisioMain"/>
			</manifest>
		</jar>
	</target>

  <target name="webstart" depends="exe">
	<fail message="You must specify a keystore password for opening visioKeyStore: ant -Dkeystore.password=***** [ant target]">
		<condition>
			<not> <isset property="keystore.password"/> </not>
		</condition>
	</fail>
  	<delete dir="build/webstart"/>
	<mkdir dir="build/webstart"/>	
  	<copy todir="build/webstart" file="pathvisio-with-${ant.project.name}.jar"/>
  	<copy todir="build/webstart" file="${ant.project.name}.jnlp"/>
	<replace file="build/webstart/${ant.project.name}.jnlp" token="#BASEURL#" value="${webstart.base.url}"/>
    <signjar alias="PV" lazy = "true" 
		storepass="${keystore.password}" keystore="${pathvisio.dir}/lib/visioKeyStore">
		<fileset dir="build/webstart" includes="**/*.jar"/>
	</signjar>
  </target>

</project>
{'fraction_non_alphanumeric': 0.21072180264949858, 'fraction_numerical': 0.0014857001361891792, 'mean_word_length': 3.8780193236714977, 'pattern_counts': {'":': 0, '<': 232, '<?xml version=': 2, '>': 233, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1021944', 'n_tokens_mistral': 3151, 'n_tokens_neox': 2740, 'n_words': 541}