<commit_before><?xml version="1.0" encoding="UTF-8"?><!DOCTYPE project>
<project name="SFWeb" default="build" basedir="..">

	<property name="application.name" value="languageforge" />

	<property name="build.number" value="0.0.0.0" />
	<property name="build.output" value="output" />
	<property name="build.libJsFile" value="${build.output}/${application.name}.js" />
	<property name="build.minJsFile" value="${build.output}/${application.name}.min.js" />
	<property name="build.packageFile" value="${build.output}/${application.name}.tgz" />
	<property name="build.packageFileForTest" value="${build.output}/${application.name}_e2etest.tgz" />
	<property name="build.installPath" value="/var/www/${application.name}.org_dev" />
	<property name="build.installForTestPath" value="/var/www/${application.name}.org_e2etest" />
	<property name="build.uploadPath" value="/var/www/${application.name}.org" />
    <property name="build.doCompression" value="true" />
	<property name="e2etest.selenium.server.host" value="ba-wxp32c.psonet" />
	<property name="e2etest.selenium.server.port" value="4444" />
	<property name="e2etest.webserver.host" value="e2etest.${application.name}.local" />
	<property name="e2etest.protractor.conf" value="protractorConfLF.js" />  <!-- Filename with base dir test/app/ -->

	<target name="clean">
		<delete dir="${build.output}" quiet="true" />
	</target>
		
	<target name="install-clean" depends="">
		<delete dir="${build.installPath}" quiet="true" />
	</target>
	
	<target name="test-e2e-install-clean" depends="">
		<delete dir="${build.installForTestPath}" quiet="true" />
		<mkdir dir="${build.installForTestPath}" />
	</target>

	<target name="upload-clean" depends="">
		<delete dir="${build.uploadPath}" quiet="true" />
	</target>

	<target name="version">
		<property name="version" value="${build.number}" />
		<echo>${version}</echo>
	</target>
	
	<target name="build-prepare">
		<mkdir dir="${build.output}" />
	</target>

	<target name="build" />

	<target name="test-js-unit" depends="build-composer">
		<exec dir="test/app" executable="node">
			<arg value="node_modules/karma/bin/karma" />
			<arg value="start" />
			<arg file="test/app/karma.conf.js" />
			<arg value="--reporters" />
			<arg value="teamcity" />
			<arg value="--single-run" />
		</exec>
	</target>

	<target name="test-php" depends="build-prepare,build-composer">
		<echo>##teamcity[importData type='junit' path='${build.output}/AllTests.xml']</echo>
		<exec executable="php" dir="test/php" output="${build.output}/AllTests.xml"  error="${build.output}/error.log" failonerror="true">
			<arg line="AllTests.php" />
			<arg value="-j" />
		</exec>
	 </target>

	<target name="test">
		<!-- Commented out Karma tests: they are completely out of date and are superseded by E2E tests. 2014-08-26 RM
		NOTE: If re-enabling the Karma tests, ensure they are updated: they may have been written against old APIs.
		<antcall target="test-js-unit" />
		-->
		<antcall target="test-php" />
		<antcall target="test-e2e" />
	</target>
	
	<target name="build-composer">
		<exec executable="composer" dir="src" failonerror="true">
			<arg line="install" />
		</exec>
	</target>

	<target name="build-minify" depends="build-prepare">
		<concat destfile="${build.libJsFile}" overwrite="yes" fixlastline="yes">
			<fileset dir="src/angular-app"
				includes="**/*.js"
				excludes="**/*.min.js,**/assets/**, **/vendor/**"
			/>
			<fileset dir="src/js/lib"
				includes="ng-ui-*.js"
				excludes="ng-ui-*.min.js"
			/>
		</concat>

        <if>
            <equals arg1="build.doCompression" arg2="true" />
            <then>
                <exec executable="/usr/bin/yui-compressor">
                    <arg value="-o" />
                    <arg value="${build.minJsFile}" />
                    <arg value="${build.libJsFile}" />
                </exec>
            </then>
            <else>
                <copy file="${build.minJsFile}" tofile="${build.libJsFile}" />
            </else>
        </if>
	</target>

	<target name="package-copyWeb" depends="build-prepare,build-composer,build-minify,version">
		<copy todir="${build.output}/package/htdocs">
			<fileset dir="src"/>
		</copy>
		<copy todir="${build.output}/package/lib">
			<fileset dir="lib"/>
		</copy>
		<copy todir="${build.output}/package/htdocs/js/lib"
			file="${build.minJsFile}"
		/>
		<replace file="${build.output}/package/htdocs/config/sf_config.php">
			<replacefilter token="$config['sfenv'] = 'dev';" value="$config['sfenv'] = 'prod';" />
		</replace>
	    <replace file="${build.output}/package/htdocs/version.php">
			<replacefilter token="9.9.9" value="${version}" />
		</replace>
		<chgrp type="both" group="www-data"><commit_msg>fix build<commit_after><?xml version="1.0" encoding="UTF-8"?><!DOCTYPE project>
<project name="SFWeb" default="build" basedir="..">

	<property name="application.name" value="languageforge" />

	<property name="build.number" value="0.0.0.0" />
	<property name="build.output" value="output" />
	<property name="build.libJsFile" value="${build.output}/${application.name}.js" />
	<property name="build.minJsFile" value="${build.output}/${application.name}.min.js" />
	<property name="build.packageFile" value="${build.output}/${application.name}.tgz" />
	<property name="build.packageFileForTest" value="${build.output}/${application.name}_e2etest.tgz" />
	<property name="build.installPath" value="/var/www/${application.name}.org_dev" />
	<property name="build.installForTestPath" value="/var/www/${application.name}.org_e2etest" />
	<property name="build.uploadPath" value="/var/www/${application.name}.org" />
    <property name="build.doCompression" value="true" />
	<property name="e2etest.selenium.server.host" value="ba-wxp32c.psonet" />
	<property name="e2etest.selenium.server.port" value="4444" />
	<property name="e2etest.webserver.host" value="e2etest.${application.name}.local" />
	<property name="e2etest.protractor.conf" value="protractorConfLF.js" />  <!-- Filename with base dir test/app/ -->

	<target name="clean">
		<delete dir="${build.output}" quiet="true" />
	</target>
		
	<target name="install-clean" depends="">
		<delete dir="${build.installPath}" quiet="true" />
	</target>
	
	<target name="test-e2e-install-clean" depends="">
		<delete dir="${build.installForTestPath}" quiet="true" />
		<mkdir dir="${build.installForTestPath}" />
	</target>

	<target name="upload-clean" depends="">
		<delete dir="${build.uploadPath}" quiet="true" />
	</target>

	<target name="version">
		<property name="version" value="${build.number}" />
		<echo>${version}</echo>
	</target>
	
	<target name="build-prepare">
		<mkdir dir="${build.output}" />
	</target>

	<target name="build" />

	<target name="test-js-unit" depends="build-composer">
		<exec dir="test/app" executable="node">
			<arg value="node_modules/karma/bin/karma" />
			<arg value="start" />
			<arg file="test/app/karma.conf.js" />
			<arg value="--reporters" />
			<arg value="teamcity" />
			<arg value="--single-run" />
		</exec>
	</target>

	<target name="test-php" depends="build-prepare,build-composer">
		<echo>##teamcity[importData type='junit' path='${build.output}/AllTests.xml']</echo>
		<exec executable="php" dir="test/php" output="${build.output}/AllTests.xml"  error="${build.output}/error.log" failonerror="true">
			<arg line="AllTests.php" />
			<arg value="-j" />
		</exec>
	 </target>

	<target name="test">
		<!-- Commented out Karma tests: they are completely out of date and are superseded by E2E tests. 2014-08-26 RM
		NOTE: If re-enabling the Karma tests, ensure they are updated: they may have been written against old APIs.
		<antcall target="test-js-unit" />
		-->
		<antcall target="test-php" />
		<antcall target="test-e2e" />
	</target>
	
	<target name="build-composer">
		<exec executable="composer" dir="src" failonerror="true">
			<arg line="install" />
		</exec>
	</target>

	<target name="build-minify" depends="build-prepare">
		<concat destfile="${build.libJsFile}" overwrite="yes" fixlastline="yes">
			<fileset dir="src/angular-app"
				includes="**/*.js"
				excludes="**/*.min.js,**/assets/**, **/vendor/**"
			/>
			<fileset dir="src/js/lib"
				includes="ng-ui-*.js"
				excludes="ng-ui-*.min.js"
			/>
		</concat>
        <antcall target="build-compress-js" />
        <antcall target="build-nocompress-js" />
	</target>

    <target name="build-compress-js" if="build.doCompression">
        <exec executable="/usr/bin/yui-compressor">
            <arg value="-o" />
            <arg value="${build.minJsFile}" />
            <arg value="${build.libJsFile}" />
        </exec>
    </target>
    <target name="build-nocompress-js" unless="build.doCompression">
        <copy file="${build.minJsFile}" tofile="${build.libJsFile}" />
    </target>

	<target name="package-copyWeb" depends="build-prepare,build-composer,build-minify,version">
		<copy todir="${build.output}/package/htdocs">
			<fileset dir="src"/>
		</copy>
		<copy todir="${build.output}/package/lib">
			<fileset dir="lib"/>
		</copy>
		<copy todir="${build.output}/package/htdocs/js/lib"
			file="${build.minJsFile}"
		/>
		<replace file="${build.output}/package/htdocs/config/sf_config.php">
			<replacefilter token="$config['sfenv'] = 'dev';" value="$config['sfenv'] = 'prod';" />
		</replace>
	    <replace file="${build.output}/package/htdocs/version.php">
			<replacefilter token="9.9.9" value="${version}" />
		</replace>
		<chgrp type="both" group="www-data">
{'fraction_non_alphanumeric': 0.21313205953763328, 'fraction_numerical': 0.0073894225694077905, 'mean_word_length': 4.0744509908944835, 'pattern_counts': {'":': 0, '<': 210, '<?xml version=': 2, '>': 210, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 6}, 'pii_count': 2, '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': '721135', 'n_tokens_mistral': 3440, 'n_tokens_neox': 3165, 'n_words': 535}