<commit_before><!--
    Ant build script for the fb-contrib Eclipse Plugin.
    
    Use the dist target to build a distributable plugin zip file.

    Use the site target to build an update site.
-->

<project name="fbcontribeclipse" default="site">

	<!-- Eclipse plugin id, will never change -->
	<property name="plugin.id" value="fb-contrib-eclipse-quick-fixes" />
	<!-- Plugin id suffix which is the build date -->
	<tstamp>
		<format property="plugin.date" pattern="yyyyMMdd-HHmm" />
	</tstamp>

	<echo>"${plugin.date}"</echo>
	
	

	<!--
    The local.properties file must contain the location of
       - Eclipse platform (key is "eclipsePlugin.dir", value is the 3.3+ Eclipse plugins folder)
    This values are likely to be different for each checkout of the plugin,
    so the local.properties file is not managed by version control.
    
    See local.properties.example for an example setup file
-->
	<!-- <property file="local.properties" /> -->

	<property file="build.properties" />
	
	<!-- Sets a default plugin location -->
	<property name="eclipsePlugin.dir" value="./eclipse" />

	<property name="fbcontrib.dir" value="."/>

	<property name="src.dir" value="src"/>
	<property name="zip.dir" value="zips"/>
	<property name="dist.dir" value="dist"/>

	<!-- the binaries/classes, built by javac -->
	<property name="bin.dir" value="bin_build" />

	<!-- the binaries/classes, built by eclipse -->
	<property name="binEclipse.dir" value="bin_eclipse" />

	<!-- update site destination directory -->
	<property name="site.dir" value="${bin.dir}/site" />
	
	<!-- fb-contrib core package name in slashed notation -->
	<property name="fbcontribpackage" value="com/mebigfatguy/fbcontrib" />
	
	<!-- Location of fb-contrib.jar to extract and include in this build -->
	<property name="fb-contrib.jar" value="${fb-contrib.dir}/fb-contrib-${fb-contrib.version}.jar" />

	<path id="plugin.classpath">
		<fileset dir="${eclipsePlugin.dir}">
			<include name="**/*.jar"/>
			<exclude name="**/datanucleus-enhancer*.jar"/>
			<exclude name="fb-contrib-eclipse-quick-fixes/*.jar"/>
		</fileset>
	</path>

	<target name="init">
		<mkdir dir="${dist.dir}"/>
		<mkdir dir="${bin.dir}"/>
		<mkdir dir="${zip.dir}"/>
	</target>

	<target name="clean" depends="init" description="Clean up temporary files">
		<delete includeemptydirs="true" >
			<fileset dir="${bin.dir}"  includes="**/*"/>
			<fileset dir="${zip.dir}"  includes="**/*"/>
			<!-- defaultexcludes is required to delete .svn and .cvsignore -->
			<fileset dir="${dist.dir}" includes="**/*" defaultexcludes="false"/>
		</delete>
	</target>
	
	<target name="eclipse.check">
	    <condition property="eclipse.exists">
	      <available file="${eclipsePlugin.dir}" type="dir"/>
	    </condition>
		<echo message="Does the eclipse file exist?" />
		<echoproperties />
	  </target>
	
	<target name="downloadEclipse" depends="clean, eclipse.check" unless="eclipse.exists" description="download Eclipse if it doesn't exist">
		<echo message="Downloading Eclipse" />
		<mkdir dir="${eclipsePlugin.dir}"/>
		<get src="https://github.com/kjlubick/fb-contrib-eclipse-quick-fixes/releases/download/0.4.0/eclipse-with-findbugs3.0.1.zip" dest="eclipse.zip"/>	<!--Eclipse-luna with findbugs 3.0.1 01/05/2015-->
		<unzip src="eclipse.zip" dest="${eclipsePlugin.dir}"/>
	</target>

	<target name="extractJar" depends="init">
		<echo message="Copying fb-contrib classes to Eclipse plugin"/>
		<unzip src="${fb-contrib.jar}" dest="${bin.dir}">
			<patternset>
				<include name="**/*.*" />
				<exclude name="${fbcontribpackage}/collect/*.*" />
				<exclude name="*.xml" />
				<exclude name="bugrank.txt" />
				<exclude name="META-INF/*.*" />
			</patternset>
		</unzip>
	</target>

	<target name="classes" depends="init, extractJar, downloadEclipse" description="Compile java source files"><commit_msg>Sets up download of fb-contrib<commit_after><!--
    Ant build script for the fb-contrib Eclipse Plugin.
    
    Use the dist target to build a distributable plugin zip file.

    Use the site target to build an update site.
-->

<project name="fbcontribeclipse" default="site">

	<!-- Eclipse plugin id, will never change -->
	<property name="plugin.id" value="fb-contrib-eclipse-quick-fixes" />
	<!-- Plugin id suffix which is the build date -->
	<tstamp>
		<format property="plugin.date" pattern="yyyyMMdd-HHmm" />
	</tstamp>

	<echo>"${plugin.date}"</echo>
	
	

	<!--
    The local.properties file must contain the location of
       - Eclipse platform (key is "eclipsePlugin.dir", value is the 3.3+ Eclipse plugins folder)
    This values are likely to be different for each checkout of the plugin,
    so the local.properties file is not managed by version control.
    
    See local.properties.example for an example setup file
-->
	<!-- <property file="local.properties" /> -->

	<property file="build.properties" />
	
	<!-- Sets a default plugin location -->
	<property name="eclipsePlugin.dir" value="./eclipse" />

	<property name="src.dir" value="src"/>
	<property name="zip.dir" value="zips"/>
	<property name="dist.dir" value="dist"/>

	<!-- the binaries/classes, built by javac -->
	<property name="bin.dir" value="bin_build" />

	<!-- the binaries/classes, built by eclipse -->
	<property name="binEclipse.dir" value="bin_eclipse" />

	<!-- update site destination directory -->
	<property name="site.dir" value="${bin.dir}/site" />
	
	<!-- fb-contrib core package name in slashed notation -->
	<property name="fbcontribpackage" value="com/mebigfatguy/fbcontrib" />
	
	<!-- Location of fb-contrib.jar to extract and include in this build -->
	<property name="fb-contrib.jar" value="${fb-contrib.dir}/fb-contrib-${fb-contrib.version}.jar" />

	<path id="plugin.classpath">
		<fileset dir="${eclipsePlugin.dir}">
			<include name="**/*.jar"/>
			<exclude name="**/datanucleus-enhancer*.jar"/>
			<exclude name="fb-contrib-eclipse-quick-fixes/*.jar"/>
		</fileset>
	</path>

	<target name="init">
		<mkdir dir="${dist.dir}"/>
		<mkdir dir="${bin.dir}"/>
		<mkdir dir="${zip.dir}"/>
	</target>

	<target name="clean" depends="init" description="Clean up temporary files">
		<delete includeemptydirs="true" >
			<fileset dir="${bin.dir}"  includes="**/*"/>
			<fileset dir="${zip.dir}"  includes="**/*"/>
			<!-- defaultexcludes is required to delete .svn and .cvsignore -->
			<fileset dir="${dist.dir}" includes="**/*" defaultexcludes="false"/>
		</delete>
	</target>
	
	<target name="fb-contrib.check">
		    <condition property="fb-contrib.exists">
		      <available file="${fb-contrib.jar}" type="file"/>
		    </condition>
	</target>
	
	<target name="downloadFB-contrib" depends="clean, fb-contrib.check" unless="fb-contrib.exists" description="download fb-contrib if it doesn't exist">
		<echo message="Downloading fb-contrib" />
		<get src="https://github.com/kjlubick/fb-contrib-eclipse-quick-fixes/releases/download/0.4.0/fb-contrib-6.1.0.jar" dest="${fb-contrib.jar}"/>
	</target>
	
	<target name="eclipse.check">
	    <condition property="eclipse.exists">
	      <available file="${eclipsePlugin.dir}" type="dir"/>
	    </condition>
		<echo message="Does the eclipse file exist?" />
		<echoproperties />
	  </target>
	
	<target name="downloadEclipse" depends="clean, eclipse.check" unless="eclipse.exists" description="download Eclipse if it doesn't exist">
		<echo message="Downloading Eclipse" />
		<mkdir dir="${eclipsePlugin.dir}"/>
		<get src="https://github.com/kjlubick/fb-contrib-eclipse-quick-fixes/releases/download/0.4.0/eclipse-with-findbugs3.0.1.zip" dest="eclipse.zip"/>	<!--Eclipse-luna with findbugs 3.0.1 01/05/2015-->
		<unzip src="eclipse.zip" dest="${eclipsePlugin.dir}"/>
	</target>

	<target name="extractJar" depends="init">
		<echo message="Copying fb-contrib classes to Eclipse plugin"/>
		<unzip src="${fb-contrib.jar}" dest="${bin.dir}">
			<patternset>
				<include name="**/*.*" />
				<exclude name="${fbcontribpackage}/collect/*.*" />
				<exclude name="*.xml" />
				<exclude name="bugrank.txt" />
				<exclude name="META-INF/*.*" />
			</patternset>
		</unzip>
	</target>

	<target name="classes" depends="init, extractJar, downloadEclipse, downloadFB-contrib" description="Compile java source files">
{'fraction_non_alphanumeric': 0.18610603290676417, 'fraction_numerical': 0.005362583790371724, 'mean_word_length': 3.89910447761194, 'pattern_counts': {'":': 0, '<': 165, '<?xml version=': 0, '>': 165, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '552207', 'n_tokens_mistral': 2793, 'n_tokens_neox': 2509, 'n_words': 638}