<commit_before><?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	version="1.0">
	<xsl:output indent="yes" omit-xml-declaration="no" method="xml" />
	<xsl:param name="timestamp" />
	<xsl:param name="version" />
	<xsl:param name="sourcePath" />
	
	<xsl:template match="/">
		<xsl:apply-templates select="applicationCoverage" />
	</xsl:template>

	<xsl:template match="applicationCoverage">
		<coverage>
			<xsl:attribute name="line-rate">
				<xsl:value-of select="@lineCoverage" />
			</xsl:attribute>
			<xsl:attribute name="branch-rate">
				<xsl:value-of select="@branchCoverage" />
			</xsl:attribute>
			<xsl:attribute name="lines-covered">
				<xsl:value-of select="@coveredLines" />
			</xsl:attribute>
			<xsl:attribute name="line-valid">
				<xsl:value-of select="@lines" />
			</xsl:attribute>
			<xsl:attribute name="branches-covered">
				<xsl:value-of select="@coveredBranches" />
			</xsl:attribute>
			<xsl:attribute name="branches-valid">
				<xsl:value-of select="@branches" />
			</xsl:attribute>
			<xsl:attribute name="complexity" />
			<xsl:attribute name="version">
				<xsl:value-of select="$version" />
			</xsl:attribute>
			<xsl:attribute name="timestamp">
				<xsl:value-of select="$timestamp" />
			</xsl:attribute>
			<sources>
				<source>
					<xsl:value-of select="$sourcePath" />
				</source>
			</sources>
			<packages>
				<xsl:apply-templates select="package" />
			</packages>
		</coverage>
	</xsl:template>

	<xsl:template match="package">
		<package>
			<xsl:attribute name="name">
				<xsl:value-of select="@name" />
			</xsl:attribute>
			<xsl:attribute name="line-rate">
				<xsl:value-of select="@lineCoverage" />
			</xsl:attribute>
			<xsl:attribute name="branch-rate">
				<xsl:value-of select="@branchCoverage" />
			</xsl:attribute>
			<xsl:attribute name="complexity" />
			<classes>
				<xsl:apply-templates select="class" />
			</classes>
		</package>
	</xsl:template>

	<xsl:template match="class">
		<class>
			<xsl:attribute name="name">
				<xsl:value-of select="@name" />
			</xsl:attribute>
			<xsl:attribute name="filename">
				<xsl:variable name="safeSourcePath" select="replace($sourcePath, '\\', '/')" />
				<xsl:variable name="safePathname" select="replace(@pathname, '\\', '/')" />
				<xsl:value-of select="substring(replace($safePathname, $safeSourcePath, ''), 2)" />
			</xsl:attribute>
			<xsl:attribute name="line-rate">
				<xsl:value-of select="@lineCoverage" />
			</xsl:attribute>
			<xsl:attribute name="branch-rate">
				<xsl:value-of select="@branchCoverage" />
			</xsl:attribute>
			<xsl:attribute name="complexity" />
			<methods>
				<xsl:apply-templates select="function" />
			</methods>
			<lines>
				<xsl:apply-templates select="function/line" />
			</lines>
		</class>
	</xsl:template><commit_msg>Another update to fix cobertura xsl for FlexCover.<commit_after><?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	version="1.0">
	<xsl:output indent="yes" omit-xml-declaration="no" method="xml" />
	<xsl:param name="timestamp" />
	<xsl:param name="version" />
	<xsl:param name="sourcePath" />
	
	<xsl:template match="/">
		<xsl:apply-templates select="applicationCoverage" />
	</xsl:template>

	<xsl:template match="applicationCoverage">
		<coverage>
			<xsl:attribute name="line-rate">
				<xsl:value-of select="@lineCoverage" />
			</xsl:attribute>
			<xsl:attribute name="branch-rate">
				<xsl:value-of select="@branchCoverage" />
			</xsl:attribute>
			<xsl:attribute name="lines-covered">
				<xsl:value-of select="@coveredLines" />
			</xsl:attribute>
			<xsl:attribute name="line-valid">
				<xsl:value-of select="@lines" />
			</xsl:attribute>
			<xsl:attribute name="branches-covered">
				<xsl:value-of select="@coveredBranches" />
			</xsl:attribute>
			<xsl:attribute name="branches-valid">
				<xsl:value-of select="@branches" />
			</xsl:attribute>
			<xsl:attribute name="complexity" />
			<xsl:attribute name="version">
				<xsl:value-of select="$version" />
			</xsl:attribute>
			<xsl:attribute name="timestamp">
				<xsl:value-of select="$timestamp" />
			</xsl:attribute>
			<sources>
				<source>
					<xsl:value-of select="$sourcePath" />
				</source>
			</sources>
			<packages>
				<xsl:apply-templates select="package" />
			</packages>
		</coverage>
	</xsl:template>

	<xsl:template match="package">
		<package>
			<xsl:attribute name="name">
				<xsl:value-of select="@name" />
			</xsl:attribute>
			<xsl:attribute name="line-rate">
				<xsl:value-of select="@lineCoverage" />
			</xsl:attribute>
			<xsl:attribute name="branch-rate">
				<xsl:value-of select="@branchCoverage" />
			</xsl:attribute>
			<xsl:attribute name="complexity" />
			<classes>
				<xsl:apply-templates select="class" />
			</classes>
		</package>
	</xsl:template>

	<xsl:template match="class">
		<class>
			<xsl:attribute name="name">
				<xsl:value-of select="@name" />
			</xsl:attribute>
			<xsl:attribute name="filename">
				<xsl:variable name="safeSourcePath" select="lower-case(replace($sourcePath, '\\', '/'))" />
				<xsl:variable name="safePathname" select="lower-case(replace(@pathname, '\\', '/'))" />
				<xsl:if test="compare($safeSourcePath, substring($safePathname, 1, string-length($safeSourcePath))) = 0">
					<xsl:value-of select="substring(@pathname, string-length($safeSourcePath) + 2, string-length(@pathname))" />
				</xsl:if>
			</xsl:attribute>
			<xsl:attribute name="line-rate">
				<xsl:value-of select="@lineCoverage" />
			</xsl:attribute>
			<xsl:attribute name="branch-rate">
				<xsl:value-of select="@branchCoverage" />
			</xsl:attribute>
			<xsl:attribute name="complexity" />
			<methods>
				<xsl:apply-templates select="function" />
			</methods>
			<lines>
				<xsl:apply-templates select="function/line" />
			</lines>
		</class>
	</xsl:template>
{'fraction_non_alphanumeric': 0.20112685675260372, 'fraction_numerical': 0.00375618917534574, 'mean_word_length': 4.1978704525288375, 'pattern_counts': {'":': 0, '<': 181, '<?xml version=': 2, '>': 181, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, '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': '5916000', 'n_tokens_mistral': 2499, 'n_tokens_neox': 1952, 'n_words': 306}