<commit_before>import sbt._

import java.io.File
import scala.xml.NodeSeq

/** Support for compiling sbt across multiple versions of Scala.  The scala compiler is run in a
* separate JVM and no partial compilation is done.*/
abstract class CrossCompileProject extends BasicScalaProject
{
	/** Used for 2.8.0-SNAPSHOT*/
	val scalaToolsSnapshots = "Scala Tools Snapshots" at "http://scala-tools.org/repo-snapshots"

	/* The base configuration names for the versions of Scala*/
	private val version2_7_2 = "2.7.2"
	private val version2_7_3 = "2.7.3"
	private val version2_7_4 = "2.7.4"
	private val version2_8_0 = "2.8.0-SNAPSHOT"
	private val base = "base"

	/* The configurations for the versions of Scala.*/
	private val conf_2_7_2 = config(version2_7_2)
	private val conf_2_7_3 = config(version2_7_3)
	private val conf_2_7_4 = config(version2_7_4)
	private val conf_2_8_0 = config(version2_8_0)
	// the list of all configurations to cross-compile against
	private val allConfigurations = conf_2_7_2 :: conf_2_7_3 :: conf_2_7_4 :: conf_2_8_0 :: Nil
	// the names of all configurations to cross-compile against
	private val allConfigurationsNames = allConfigurations.map(_.toString)
	//private val allConfigurations = conf_2_7_3 :: Nil

	/* Methods to derive the configuration name from the base name 'v'.*/
	private def optional(v: String) = "optional-" + v
	private def scalac(v: String) = "scalac-" + v
	private def sbt(v: String) = "sbt_" + v
	private def depConf(v: String) = v + "->default"
	
	// =========== Cross-compilation across scala versions ===========
	
	// The dependencies that should go in each configuration are:
	//   base                             Required dependencies that are the same across all scala versions.
	//   <version>                  Required dependencies to use with Scala <version>
	//   optional-base              Optional dependencies that are the same for all scala versions
	//   optional-<version>   Optional dependencies to use with Scala <version>
	//   compile                        Used for normal development, it should extend a specific <version> and optional-<version>
	//   scalac-<version>       The scala compiler for Scala <version>
	// There should be a jar publication for each version of scala.  The artifact should be named sbt_<version>.
	override def ivyXML =
		(<configurations>
			<conf name={base}/>
			<conf name={optional(base)}/>
			{ variableConfigurations }
			<!-- The configuration used for normal development (actions other than cross-*) -->
			<conf name="default" extends={version2_7_2 + "," + optional(version2_7_2)} visibility="private"/>
		</configurations>
		<publications>
			{ publications }
		</publications>
		<dependencies>
			<!-- Dependencies that are the same across all Scala versions -->
			<dependency org="org.apache.ivy" name="ivy" rev="2.0.0" transitive="false" conf={depConf(base)}/>
			{testDependency("scalacheck", "1.5", false, base)}
			<dependency org="org.mortbay.jetty" name="jetty" rev="6.1.14" transitive="true" conf={depConf(optional(base))}/>

			<!-- the dependencies that are different dependeding on the version of Scala -->
			{ variableDependencies(version2_7_2, /*ScalaTest*/"0.9.3", /*Specs*/"1.4.0", false) }
			{ variableDependencies(version2_7_3, /*ScalaTest*/"0.9.4", /*Specs*/"1.4.3", true) }
			{ variableDependencies(version2_7_4, /*ScalaTest*/"0.9.5", /*Specs*/"1.4.4", true) }
			{ variableDependencies(version2_8_0, /*ScalaTest*/"0.9.5", /*Specs*/"1.4.4", true) }
		</dependencies>)

	/** Creates a publication (an 'artifact' element) for each Scala version */
	private def publications: NodeSeq =
	{
		for(conf <- allConfigurationsNames) yield
			<artifact name={sbt(conf)} conf={conf}/>
	}
	/** Creates the main, optional, and scalac configurations for each Scala version*/
	private def variableConfigurations: NodeSeq =
	{
		allConfigurationsNames flatMap
		{ conf =>
			scalaComment(conf) ++<commit_msg>Fixed build by putting specs version back to 1.4.3.<commit_after>import sbt._

import java.io.File
import scala.xml.NodeSeq

/** Support for compiling sbt across multiple versions of Scala.  The scala compiler is run in a
* separate JVM and no partial compilation is done.*/
abstract class CrossCompileProject extends BasicScalaProject
{
	/** Used for 2.8.0-SNAPSHOT*/
	val scalaToolsSnapshots = "Scala Tools Snapshots" at "http://scala-tools.org/repo-snapshots"

	/* The base configuration names for the versions of Scala*/
	private val version2_7_2 = "2.7.2"
	private val version2_7_3 = "2.7.3"
	private val version2_7_4 = "2.7.4"
	private val version2_8_0 = "2.8.0-SNAPSHOT"
	private val base = "base"

	/* The configurations for the versions of Scala.*/
	private val conf_2_7_2 = config(version2_7_2)
	private val conf_2_7_3 = config(version2_7_3)
	private val conf_2_7_4 = config(version2_7_4)
	private val conf_2_8_0 = config(version2_8_0)
	// the list of all configurations to cross-compile against
	private val allConfigurations = conf_2_7_2 :: conf_2_7_3 :: conf_2_7_4 :: conf_2_8_0 :: Nil
	// the names of all configurations to cross-compile against
	private val allConfigurationsNames = allConfigurations.map(_.toString)
	//private val allConfigurations = conf_2_7_3 :: Nil

	/* Methods to derive the configuration name from the base name 'v'.*/
	private def optional(v: String) = "optional-" + v
	private def scalac(v: String) = "scalac-" + v
	private def sbt(v: String) = "sbt_" + v
	private def depConf(v: String) = v + "->default"
	
	// =========== Cross-compilation across scala versions ===========
	
	// The dependencies that should go in each configuration are:
	//   base                             Required dependencies that are the same across all scala versions.
	//   <version>                  Required dependencies to use with Scala <version>
	//   optional-base              Optional dependencies that are the same for all scala versions
	//   optional-<version>   Optional dependencies to use with Scala <version>
	//   compile                        Used for normal development, it should extend a specific <version> and optional-<version>
	//   scalac-<version>       The scala compiler for Scala <version>
	// There should be a jar publication for each version of scala.  The artifact should be named sbt_<version>.
	override def ivyXML =
		(<configurations>
			<conf name={base}/>
			<conf name={optional(base)}/>
			{ variableConfigurations }
			<!-- The configuration used for normal development (actions other than cross-*) -->
			<conf name="default" extends={version2_7_2 + "," + optional(version2_7_2)} visibility="private"/>
		</configurations>
		<publications>
			{ publications }
		</publications>
		<dependencies>
			<!-- Dependencies that are the same across all Scala versions -->
			<dependency org="org.apache.ivy" name="ivy" rev="2.0.0" transitive="false" conf={depConf(base)}/>
			{testDependency("scalacheck", "1.5", false, base)}
			<dependency org="org.mortbay.jetty" name="jetty" rev="6.1.14" transitive="true" conf={depConf(optional(base))}/>

			<!-- the dependencies that are different dependeding on the version of Scala -->
			{ variableDependencies(version2_7_2, /*ScalaTest*/"0.9.3", /*Specs*/"1.4.0", false) }
			{ variableDependencies(version2_7_3, /*ScalaTest*/"0.9.4", /*Specs*/"1.4.3", true) }
			{ variableDependencies(version2_7_4, /*ScalaTest*/"0.9.5", /*Specs*/"1.4.3", true) }
			{ variableDependencies(version2_8_0, /*ScalaTest*/"0.9.5", /*Specs*/"1.4.3", true) }
		</dependencies>)

	/** Creates a publication (an 'artifact' element) for each Scala version */
	private def publications: NodeSeq =
	{
		for(conf <- allConfigurationsNames) yield
			<artifact name={sbt(conf)} conf={conf}/>
	}
	/** Creates the main, optional, and scalac configurations for each Scala version*/
	private def variableConfigurations: NodeSeq =
	{
		allConfigurationsNames flatMap
		{ conf =>
			scalaComment(conf) ++
{'fraction_non_alphanumeric': 0.1252850266024829, 'fraction_numerical': 0.030022802128198633, 'mean_word_length': 3.779055690072639, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 55, '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': '3215037', 'n_tokens_mistral': 2625, 'n_tokens_neox': 2458, 'n_words': 756}