<%--
 * Copyright by Intland Software
 *
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Intland Software. ("Confidential Information"). You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with Intland.
 *
 * $Revision$ $Date$
--%>
<meta name="decorator" content="main">
<meta name="module" content="sources">
<meta name="moduleCSSClass" content="sourceCodeModule">
<meta name="stylesheet" content="sources.css">

<%@ taglib uri="jstl-c" prefix="c" %>
<%@ taglib uri="jstl-fmt" prefix="fmt" %>

<%@ taglib uri="struts-html" prefix="html" %>


<%@ taglib uri="charttaglib" prefix="chart" %>
<%@ taglib uri="taglib" prefix="tag" %>
<%@ taglib uri="uitaglib" prefix="ui" %>

<%
	final String lineBreak = "<TR><TD>&nbsp;</TD></TR>";
	int counter = 0;
%>

<c:set var="geometry" value="${param.geometry}" />
<c:choose>
	<c:when test="${geometry == 'tight'}">
		<c:set var="whtd" value="450" />
		<c:set var="hght" value="250" />
	</c:when>

	<c:when test="${geometry == 'wide'}">
		<c:set var="whtd" value="750" />
		<c:set var="hght" value="400" />
	</c:when>

	<c:otherwise>
		<c:set var="whtd" value="600" />
		<c:set var="hght" value="300" />
	</c:otherwise>
</c:choose>

<jsp:useBean id="projectChartDateSelectorForm" class="com.intland.codebeamer.struts.ProjectChartDateSelectorForm" scope="session" />

<c:set var="dispDate" value="${projectChartDateSelectorForm.map.dispDate}" />
<c:set var="groupByUser" value="${projectChartDateSelectorForm.map.groupByUser}" />
<c:set var="proj_id" value="${PROJECT_DTO.id}" />

<%--URL for simian --%>
<c:url var="simianDetails" value="/proj/metrics/duplicatedFiles.do">
	<c:param name="proj_id" value="${proj_id}" />
</c:url>
<%--URL for PMD --%>
<c:url var="pmdDetails" value="/proj/metrics/pmd.do">
	<c:param name="proj_id" value="${proj_id}" />
</c:url>
<c:url var="jdependDetails" value="/proj/metrics/jdepend.do">
	<c:param name="proj_id" value="${proj_id}" />
</c:url>
<c:url var="checkstyleDetails" value="/proj/metrics/checkstyle.do">
	<c:param name="proj_id" value="${proj_id}" />
</c:url>

<c:set var="parseDatePattern" value="yyyy-MM-dd" />
<c:set var="formatDatePattern" value="yyyyMMdd" />

<c:catch>
	<fmt:parseDate var="startDate" value="${projectChartDateSelectorForm.map.startDate}"
		pattern="${parseDatePattern}" parseLocale="en" />
</c:catch>

<c:catch>
	<fmt:parseDate var="closeDate" value="${projectChartDateSelectorForm.map.closeDate}"
		pattern="${parseDatePattern}" parseLocale="en" />
</c:catch>

<c:set var="action" value="/proj/metrics/valuesChanges" />

<c:set var="screenFilter" scope="request">
	<html:form action="${action}">
		<html:hidden property="action" value="${action}" />
		<html:hidden property="proj_id" value="${proj_id}" />

		<span class="titlenormal" style="margin-left: 1em;">Period Start</span>
		<html:text property="startDate" size="12" styleId="startDate"/>
		<ui:calendarPopup textFieldId="startDate" otherFieldId="closeDate"/>

		<span class="titlenormal" style="margin-left: 1em;">Period End</span>
		<html:text property="closeDate" size="12" styleId="closeDate"/>
		<ui:calendarPopup textFieldId="closeDate" otherFieldId="startDate"/>

		<span class="titlenormal" style="margin-left: 1em;">Time Resolution</span>
		<html:select property="dispDate">
			<html:optionsCollection property="timeResolutionList" />
		</html:select>

		<span class="titlenormal" style="margin-left: 1em;">Geometry</span>
		<html:select property="geometry">
			<html:option value="tight">Tight</html:option>
			<html:option value="normal">Normal</html:option>
			<html:option value="wide">Wide</html:option>
		</html:select>

		&nbsp;<html:submit styleClass="button" property="GO" value="GO" />
	</html:form>
</c:set>

<jsp:include page="../sources/includes/actionBar.jsp" >
	<jsp:param name="screenTitle" value="Metrics"/>
	<jsp:param name="screenFilter" value="${screenFilter}" />
</jsp:include>

<html:errors />

<div class="actionBar">
	<a class="actionLink" href="${simianDetails}">Detailed Simian Report</a>
	<a class="actionLink" href="${pmdDetails}">Detailed PMD Report</a>
	<a class="actionLink" href="${jdependDetails}">Detailed JDepend Report</a>
	<a class="actionLink" href="${checkstyleDetails}">Detailed Checkstyle Report</a>
</div>

<a name="metricsTop"></a>

<c:choose>
	<c:when test="${dispDate == 'daily'}">
		<c:set var="dateSelectingPattern" value="%Y-%m-%d" />
		<c:set var="dateParsingPattern" value="yyyy-MM-dd" />
		<c:set var="dateFormattingPattern" value="dd-MMM-yyyy" />
		<c:set var="verticalTickLabels" value="true" />
	</c:when>

	<c:when test="${dispDate == 'monthly'}">
		<c:set var="dateSelectingPattern" value="%Y-%m" />
		<c:set var="dateParsingPattern" value="yyyy-MM" />
		<c:set var="dateFormattingPattern" value="MMM-yyyy" />
		<c:set var="verticalTickLabels" value="false" />
	</c:when>

	<c:otherwise>
		<c:set var="dispDate" value="weekly" />
		<c:set var="dateSelectingPattern" value="%Y-%v" />
		<c:set var="dateParsingPattern" value="yyyy-w" />
		<c:set var="dateFormattingPattern" value="'CW' w (MMM-yyyy)" />
		<c:set var="verticalTickLabels" value="true" />
	</c:otherwise>
</c:choose>

<chart:query name="valuesChanges" var="changes">
	<chart:param name="dateSelectingPattern" value="${dateSelectingPattern}" />
	<chart:param name="proj_id" value="${proj_id}" />
	<chart:param name="dispDate" value="${dispDate}" />
	<chart:param name="startDate">
		<fmt:formatDate value="${startDate}" pattern="${formatDatePattern}" />
	</chart:param>
	<chart:param name="closeDate">
		<fmt:formatDate value="${closeDate}" pattern="${formatDatePattern}" />
	</chart:param>
</chart:query>

<!-- Added by Sreenivas.::

Selecting all the information about Project Metrics from the
daily_code_stat table of the CodeBeamer Database.

-->
<chart:query name="codeMetrics" var="metrics">
	<chart:param name="dateSelectingPattern" value="${dateSelectingPattern}" />
	<chart:param name="proj_id" value="${proj_id}" />
	<chart:param name="dispDate" value="${dispDate}" />
	<chart:param name="startDate">
		<fmt:formatDate value="${startDate}" pattern="${formatDatePattern}" />
	</chart:param>
	<chart:param name="closeDate">
		<fmt:formatDate value="${closeDate}" pattern="${formatDatePattern}" />
	</chart:param>
</chart:query>

<%-- Create Chart ::Simian :
This part is to indicate the simian chart information
--%>

<chart:create var="chart" type="timeSeries" width="${whtd}" height="${hght}"
	legend="true" tooltips="false" title="Similarity Analysis by Date"
	yaxisLabel="Source Files" >

	<chart:dataset type="xy" value="${metrics}" dateParsingPattern="${dateParsingPattern}"
		seriesLabels="Source Files"
		categoryProperties="datum"
		valueProperties="simian_numoffiles" />

	<chart:dataset type="xy" value="${metrics}" dateParsingPattern="${dateParsingPattern}"
		axisLabel="Dupl.FileCountRatio / Dupl.Lines"
		seriesLabels="DuplicateFileCountRatio;DuplicateLines"
		categoryProperties="datum"
		valueProperties="simian_filedupratio;simian_numofduplines" />

	<chart:axis verticalTickLabels="${verticalTickLabels}"
		dateTickUnits="true" createIntegerTickUnits="true" />
</chart:create>

<a name="simianSummary"></a>

<ui:title style="top-sub-headline-decoration" topMargin="0" header="Similarity Analysis Summary by date." />

<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
	<TD WIDTH="<c:out value="${whtd}" />" COLSPAN="5">
		<div class="descriptionBox">
			<a target="_blank" href="http://www.redhillconsulting.com.au/products/simian/index.html">Simian</a>
			(Similarity Analyser) identifies duplication in Java, C#, C, C++, COBOL, Ruby,
			JSP, ASP, HTML, XML, Visual Basic source code and even plain text files. In fact, simian
			can be used on any human readable files such as ini files, deployment descriptors, you name it.
		</div>
	</TD>
</TR>
<TR>
	<%-- Display the Chart --%>
	<TD COLSPAN="2" WIDTH="<c:out value="${chart.width}" />"
		HEIGHT="<c:out value="${chart.height}" />"><html:img alt="Chart" border="0"
		width="${chart.width}" height="${chart.height}"
		page="/writeChart?id=${chart.id}" />
	</TD>
</TR>
<%=lineBreak%>
</TABLE>


<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
	<TR VALIGN="top" CLASS="head">
		<TH NOWRAP ALIGN="left">&nbsp;Date&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;Source Files&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;+/-&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;DuplicateFiles Ratio&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;+/-&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;Duplicate Lines&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;+/-&nbsp;</TH>
	</TR>

	<c:forEach items="${metrics}" var="metric">
	<TR CLASS="<%=((counter++ % 2) == 0 ? "even" : "odd")%>">

			<fmt:parseDate var="date" value="${metric.datum}" pattern="${dateParsingPattern}" parseLocale="en" />

			<TD NOWRAP>&nbsp;<fmt:formatDate value="${date}"
			pattern="${dateFormattingPattern}" />&nbsp;
			</TD>
			<tag:tableColumnSeparator />

			<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
				value="${metric.simian_numoffiles}" />&nbsp;
			</TD>
			<tag:tableColumnSeparator />

			<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
				value="${metric.simian_numoffiles_diff}" />&nbsp;
			</TD>
			<tag:tableColumnSeparator />

			<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
				value="${metric.simian_filedupratio}" minFractionDigits="1" maxFractionDigits="1" />&nbsp;
			</TD>
			<tag:tableColumnSeparator />

			<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
				value="${metric.simian_filedupratio_diff}" minFractionDigits="1" maxFractionDigits="1" />&nbsp;
			</TD>
			<tag:tableColumnSeparator />

			<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
				value="${metric.simian_numofduplines}" />&nbsp;</TD>
			<tag:tableColumnSeparator />

			<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
				value="${metric.simian_numofduplines_diff}" />&nbsp;
			</TD>
	</TR>
	</c:forEach>
	<%=lineBreak%>
</TABLE>

<div class="actionBar">
	<a class="actionLink" href="${simianDetails}">Detailed Simian Report</a>
</div>

<%-- Create Chart ::PMD

This part is to indicate the PMD chart information

--%>

<a name="pmdSummary"></a>

<ui:title style="top-sub-headline-decoration" topMargin="0" header="PMD Analysis Summary by date." />

<chart:create var="chart" type="timeSeries" width="${whtd}" height="${hght}"
	legend="true" tooltips="false" title="PMD Analysis by Date"
	yaxisLabel="Source Files" >

	<chart:dataset type="xy" value="${metrics}" dateParsingPattern="${dateParsingPattern}"
		seriesLabels="Source Files"
		categoryProperties="datum"
		valueProperties="pmd_numoffiles" />

	<chart:dataset type="xy" value="${metrics}" dateParsingPattern="${dateParsingPattern}"
		axisLabel="Viol.CountPerFile / Violations"
		seriesLabels="Viol.CountPerFile;Violations"
		categoryProperties="datum"
		valueProperties="pmd_filevioratio;pmd_numofviolations" />

	<chart:axis verticalTickLabels="${verticalTickLabels}"
		dateTickUnits="true" createIntegerTickUnits="true" />
</chart:create>

<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
	<TD WIDTH="<c:out value="${whtd}" />" COLSPAN="5">
		<div class="descriptionBox">
			<a target="_blank" href="http://pmd.sourceforge.net/">PMD</a>
			scans Java source code and looks for potential problems like:
			<ul>
				<li>Empty try/catch/finally/switch blocks.</li>
				<li>Unused local variables, parameters and private methods.</li>
				<li>Empty if/while statements.</li>
				<li>Overcomplicated expressions - unnecessary if statements, for loops that could be while loops.</li>
				<li>Classes with high Cyclomatic Complexity measurements.</li>
			</ul>
		</div>
	</TD>
</TR>
<TR>
	<%-- Display the Chart --%>
	<TD COLSPAN="2" WIDTH="<c:out value="${chart.width}" />"
		HEIGHT="<c:out value="${chart.height}" />"><html:img alt="Chart" border="0"
		width="${chart.width}" height="${chart.height}"
		page="/writeChart?id=${chart.id}" />
	</TD>
</TR>
<%=lineBreak%>
</TABLE>

<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
	<TR VALIGN="top" CLASS="head">
		<TH NOWRAP ALIGN="left">&nbsp;Date&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;Source Files&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;+/-&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;Violation Lines Per File&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;+/-&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;Violations&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;+/-&nbsp;</TH>
	</TR>

	<c:forEach items="${metrics}" var="metric">
	<TR CLASS="<%=((counter++ % 2) == 0 ? "even" : "odd")%>">
		<fmt:parseDate var="date" value="${metric.datum}" pattern="${dateParsingPattern}" parseLocale="en" />
		<TD NOWRAP>&nbsp;<fmt:formatDate value="${date}"
		pattern="${dateFormattingPattern}" />&nbsp;
		</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
			value="${metric.pmd_numoffiles}" />&nbsp;
		</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
			value="${metric.pmd_numoffiles_diff}" />&nbsp;
		</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
			value="${metric.pmd_filevioratio}" minFractionDigits="1" maxFractionDigits="1" />&nbsp;
		</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
			value="${metric.pmd_filevioratio_diff}" minFractionDigits="1" maxFractionDigits="1" />&nbsp;
		</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
			value="${metric.pmd_numofviolations}" />&nbsp;
		</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
		value="${metric.pmd_numofviolations_diff}" />&nbsp;
		</TD>
	</TR>
	</c:forEach>
	<%=lineBreak%>
</TABLE>

<div class="actionBar">
	<a class="actionLink" href="${pmdDetails}">Detailed PMD report</a>
</div>

<%-- Create Chart ::CPD

This part is to indicate the CPD chart information
--%>

<a name="cpdSummary"></a>

<ui:title style="top-sub-headline-decoration" topMargin="0" header="CPD Analysis Summary by date." />

<chart:create var="chart" type="timeSeries" width="${whtd}" height="${hght}"
	legend="true" tooltips="false" title="Copy-Pastes by Date"
	yaxisLabel="Copy-Paste Occurances" >

	<chart:dataset type="xy" value="${metrics}" dateParsingPattern="${dateParsingPattern}"
		seriesLabels="Copy-Paste Occurances"
		categoryProperties="datum"
		valueProperties="cpd_cpoccur" />

	<chart:axis verticalTickLabels="${verticalTickLabels}"
		dateTickUnits="true" createIntegerTickUnits="true" />
</chart:create>

<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
	<TD WIDTH="<c:out value="${whtd}" />" COLSPAN="5">
		<div class="descriptionBox">
			CPD (Copy Paste Detector) detects the number of Copy-Paste
			Occurences in a project.
		</div>
	</TD>
</TR>
<TR>
	<TD WIDTH="<c:out value="${chart.width}" />"
		HEIGHT="<c:out value="${chart.height}" />"><html:img alt="Chart" border="0"
		width="${chart.width}" height="${chart.height}"
		page="/writeChart?id=${chart.id}" /></TD>
</TR>
<%=lineBreak%>
</TABLE>

<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">

	<TR VALIGN="top" CLASS="head">
		<TH NOWRAP ALIGN="left">&nbsp;Date&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;Copy-Paste Occurances&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;+/-&nbsp;</TH>
	</TR>

	<c:forEach items="${metrics}" var="metric">
		<TR CLASS="<%=((counter++ % 2) == 0 ? "even" : "odd")%>">
			<fmt:parseDate var="date" value="${metric.datum}" pattern="${dateParsingPattern}" parseLocale="en" />
			<TD NOWRAP>&nbsp;<fmt:formatDate
				value="${date}"
				pattern="${dateFormattingPattern}" />&nbsp;</TD>

			<tag:tableColumnSeparator />
			<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
				value="${metric.cpd_cpoccur}" />&nbsp;</TD>
			<tag:tableColumnSeparator />

			<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
				value="${metric.cpd_cpoccur_diff}" />&nbsp;</TD>
		</TR>
	</c:forEach>
	<%=lineBreak%>
</TABLE>

<%-- Create Chart ::JDepend

This part is to indicate the JDepend chart information

--%>

<chart:create var="chart" type="timeSeries" width="${whtd}" height="${hght}"
	legend="true" tooltips="false" title="JDepend Analysis by Date"
	yaxisLabel="Packages" >

	<chart:dataset type="xy" value="${metrics}" dateParsingPattern="${dateParsingPattern}"
		seriesLabels="Packages"
		categoryProperties="datum"
		valueProperties="jdepend_numofpackages" />

	<chart:dataset type="xy" value="${metrics}" dateParsingPattern="${dateParsingPattern}"
		axisLabel="PackagesClassRatio / Instability Ratio"
		seriesLabels="PackagesClassRatio;Instability Ratio"
		categoryProperties="datum"
		valueProperties="jdepend_packclassratio;jdepend_instabilityratio" />

	<chart:axis verticalTickLabels="${verticalTickLabels}"
		dateTickUnits="true" createIntegerTickUnits="true" />
</chart:create>

<a name="jdependSummary"></a>

<ui:title style="top-sub-headline-decoration" topMargin="0" header="JDepend Analysis Summary by date." />

<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
	<TD WIDTH="<c:out value="${whtd}" />" COLSPAN="5">
	<div class="descriptionBox">
		<a target="_blank" href="http://www.clarkware.com/software/JDepend.html">JDepend</a>
		traverses Java class file directories and generates design quality
		metrics for each Java package. JDepend allows you to automatically measure
		the quality of a design in terms of its extensibility, reusability, and maintainability
		to manage package dependencies effectively.	</TD>
	</div>
</TR>
<TR>
	<%-- Display the Chart --%>
	<TD COLSPAN="2" WIDTH="<c:out value="${chart.width}" />"
		HEIGHT="<c:out value="${chart.height}" />"><html:img alt="Chart" border="0"
		width="${chart.width}" height="${chart.height}"
		page="/writeChart?id=${chart.id}" />
	</TD>
</TR>
<%=lineBreak%>
</TABLE>

<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
	<TR VALIGN="top" CLASS="head">
		<TH NOWRAP ALIGN="left">&nbsp;Date&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;Packages&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;+/-&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;Classes Per Packages&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;+/-&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;Instability Ratio&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;+/-&nbsp;</TH>
	</TR>

	<c:forEach items="${metrics}" var="metric">
	<TR CLASS="<%=((counter++ % 2) == 0 ? "even" : "odd")%>">
		<fmt:parseDate var="date" value="${metric.datum}" pattern="${dateParsingPattern}" parseLocale="en" />

		<TD NOWRAP>&nbsp;<fmt:formatDate value="${date}"
			pattern="${dateFormattingPattern}" />&nbsp;</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
			value="${metric.jdepend_numofpackages}" />&nbsp;</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
			value="${metric.jdepend_numofpackages_diff}" />&nbsp;</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
			value="${metric.jdepend_packclassratio}" minFractionDigits="1" maxFractionDigits="1" />&nbsp;</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
			value="${metric.jdepend_packclassratio_diff}" minFractionDigits="1" maxFractionDigits="1" />&nbsp;</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
			value="${metric.jdepend_instabilityratio}" type="percent" />&nbsp;</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
			value="${metric.jdepend_instabilityratio_diff}" maxFractionDigits="0" />&nbsp;</TD>

		</TR>
	</c:forEach>
	<%=lineBreak%>
</TABLE>

<div class="actionBar">
	<a class="actionLink" href="${jdependDetails}">Detailed JDepend Report</a>
</div>

<%-- Create Chart ::Checkstyle

This part is to indicate the Checkstyle chart information

--%>

<chart:create var="chart" type="timeSeries" width="${whtd}" height="${hght}"
	legend="true" tooltips="false" title="Checkstyle Analysis by Date"
	yaxisLabel="Checkstlye Errors" >

	<chart:dataset type="xy" value="${metrics}" dateParsingPattern="${dateParsingPattern}"
		seriesLabels="Checkstlye Errors"
		categoryProperties="datum"
		valueProperties="checkstyle_numoferrors" />

	<chart:dataset type="xy" value="${metrics}" dateParsingPattern="${dateParsingPattern}"
		axisLabel=" Errors Per File"
		seriesLabels="Errors Per File"
		categoryProperties="datum"
		valueProperties="checkstyle_fileerrorratio" />


	<chart:axis verticalTickLabels="${verticalTickLabels}"
		dateTickUnits="true" createIntegerTickUnits="true" />
</chart:create>

<a name="checkstyleSummary"></a>

<ui:title style="top-sub-headline-decoration" topMargin="0" header="Checkstyle Analysis Summary by date." />

<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
	<TD WIDTH="<c:out value="${whtd}" />" COLSPAN="5">
		<div class="descriptionBox">
			<a target="_blank" href="http://checkstyle.sourceforge.net/">Checkstyle</a>
			is a development tool to help programmers write Java code
			that adheres to a coding standard. It automates the process of checking
			Java code to spare humans of this boring (but important) task.
		</div>
	</TD>
</TR>
<TR>
	<%-- Display the Chart --%>
	<TD COLSPAN="2" WIDTH="<c:out value="${chart.width}" />"
		HEIGHT="<c:out value="${chart.height}" />"><html:img alt="Chart" border="0"
		width="${chart.width}" height="${chart.height}"
		page="/writeChart?id=${chart.id}" />
	</TD>
</TR>
<%=lineBreak%>
</TABLE>

<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
	<TR VALIGN="top" CLASS="head">
		<TH NOWRAP ALIGN="left">&nbsp;Date&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;Errors&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;+/-&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;Errors Per File&nbsp;</TH>
		<tag:tableColumnSeparator header="true" />

		<TH NOWRAP ALIGN="center">&nbsp;+/-&nbsp;</TH>

	</TR>

	<c:forEach items="${metrics}" var="metric">
	<TR CLASS="<%=((counter++ % 2) == 0 ? "even" : "odd")%>">

		<fmt:parseDate var="date" value="${metric.datum}" pattern="${dateParsingPattern}" parseLocale="en" />

		<TD NOWRAP>&nbsp;<fmt:formatDate value="${date}"
			pattern="${dateFormattingPattern}" />&nbsp;</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
			value="${metric.checkstyle_numoferrors}" />&nbsp;</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
			value="${metric.checkstyle_numoferrors_diff}" />&nbsp;</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
			value="${metric.checkstyle_fileerrorratio}" minFractionDigits="1" maxFractionDigits="1"/>&nbsp;</TD>
		<tag:tableColumnSeparator />

		<TD NOWRAP ALIGN="right">&nbsp;<fmt:formatNumber
			value="${metric.checkstyle_fileerrorratio_diff}" minFractionDigits="1" maxFractionDigits="1" />&nbsp;</TD>
	</TR>
	</c:forEach>
	<%=lineBreak%>
</TABLE>

<div class="actionBar">
	<a class="actionLink" href="${checkstyleDetails}">Detailed Checkstyle Report</a>
</div>
